From d41a0265552ab0a4692b5a0eb6d474c83dd9bda0 Mon Sep 17 00:00:00 2001 From: Jake Potrebic Date: Tue, 7 Jun 2022 20:12:24 -0700 Subject: [PATCH] few more server decompile fixes --- ...ootTable-API-Replenishable-Lootables-Feature.patch | 11 ++++++++++- .../0209-Implement-EntityKnockbackByEntityEvent.patch | 4 ++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/patches/server/0091-LootTable-API-Replenishable-Lootables-Feature.patch b/patches/server/0091-LootTable-API-Replenishable-Lootables-Feature.patch index 8e6adff62..6c8405270 100644 --- a/patches/server/0091-LootTable-API-Replenishable-Lootables-Feature.patch +++ b/patches/server/0091-LootTable-API-Replenishable-Lootables-Feature.patch @@ -728,7 +728,7 @@ index 982adacb361b0590799dc68f9b7c13c7195627fd..e49eece9bff3a53469673d03a7bbf8f9 public CraftLootable(World world, T tileEntity) { super(world, tileEntity); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java -index ae07db69b11b993b50782c94aa5c45b97d949612..4b6631edfbfb8fb0421678a7ef8c930a3726a970 100644 +index ae07db69b11b993b50782c94aa5c45b97d949612..06a96f027f90fd5bf05de72c8722ff5a81608b66 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java @@ -11,8 +11,7 @@ import org.bukkit.entity.EntityType; @@ -741,6 +741,15 @@ index ae07db69b11b993b50782c94aa5c45b97d949612..4b6631edfbfb8fb0421678a7ef8c930a private final Inventory inventory; public CraftChestBoat(CraftServer server, ChestBoat entity) { +@@ -66,7 +65,7 @@ public class CraftChestBoat extends CraftBoat implements org.bukkit.entity.Chest + return this.getHandle().getLootTableSeed(); + } + +- private void setLootTable(LootTable table, long seed) { ++ public void setLootTable(LootTable table, long seed) { // Paper - change visibility since it overrides a public method + ResourceLocation newKey = (table == null) ? null : CraftNamespacedKey.toMinecraft(table.getKey()); + this.getHandle().setLootTable(newKey); + this.getHandle().setLootTableSeed(seed); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java index eb21b8457774d5ac765fa9008157cb29d9b72509..abf58bef2042a9efba5a78fd7f97339deceaa780 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java diff --git a/patches/server/0209-Implement-EntityKnockbackByEntityEvent.patch b/patches/server/0209-Implement-EntityKnockbackByEntityEvent.patch index c8c817324..23adf074b 100644 --- a/patches/server/0209-Implement-EntityKnockbackByEntityEvent.patch +++ b/patches/server/0209-Implement-EntityKnockbackByEntityEvent.patch @@ -69,7 +69,7 @@ index 932f54d8a6db9455d9fd947baad0de7850ccd563..2bec7466fcd61731d4da1cefdea8c375 } diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/RamTarget.java b/src/main/java/net/minecraft/world/entity/ai/behavior/RamTarget.java -index 3380b95e0eff5a6b1b683b8233b8991eb817b638..b6e1e2034edc771a3c67d1477e1b9a26af639db3 100644 +index 3380b95e0eff5a6b1b683b8233b8991eb817b638..de8485df1c23e903ff0721fdb682b98d580b634e 100644 --- a/src/main/java/net/minecraft/world/entity/ai/behavior/RamTarget.java +++ b/src/main/java/net/minecraft/world/entity/ai/behavior/RamTarget.java @@ -78,7 +78,7 @@ public class RamTarget extends Behavior { @@ -77,7 +77,7 @@ index 3380b95e0eff5a6b1b683b8233b8991eb817b638..b6e1e2034edc771a3c67d1477e1b9a26 float g = Mth.clamp(goat.getSpeed() * 1.65F, 0.2F, 3.0F) + f; float h = livingEntity.isDamageSourceBlocked(DamageSource.mobAttack(goat)) ? 0.5F : 1.0F; - livingEntity.knockback((double)(h * g) * this.getKnockbackForce.applyAsDouble(goat), this.ramDirection.x(), this.ramDirection.z()); -+ livingEntity.knockback((double)(h * g) * this.getKnockbackForce.applyAsDouble(goat), this.ramDirection.x(), this.ramDirection.z(), pathfinderMob); // Paper ++ livingEntity.knockback((double)(h * g) * this.getKnockbackForce.applyAsDouble(goat), this.ramDirection.x(), this.ramDirection.z(), goat); // Paper this.finishRam(serverLevel, goat); serverLevel.playSound((Player)null, goat, this.getImpactSound.apply(goat), SoundSource.HOSTILE, 1.0F, 1.0F); } else if (this.hasRammedHornBreakingBlock(serverLevel, goat)) {