From b3afb6d9f42f59c37c1df0f3f23caa8983463527 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 --- .../server/Implement-EntityKnockbackByEntityEvent.patch | 2 +- .../LootTable-API-Replenishable-Lootables-Feature.patch | 9 +++++++++ 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/patches/server/Implement-EntityKnockbackByEntityEvent.patch b/patches/server/Implement-EntityKnockbackByEntityEvent.patch index 76ca47910f..15a32bc588 100644 --- a/patches/server/Implement-EntityKnockbackByEntityEvent.patch +++ b/patches/server/Implement-EntityKnockbackByEntityEvent.patch @@ -77,7 +77,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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)) { diff --git a/patches/server/LootTable-API-Replenishable-Lootables-Feature.patch b/patches/server/LootTable-API-Replenishable-Lootables-Feature.patch index 1edbefec45..f97664d581 100644 --- a/patches/server/LootTable-API-Replenishable-Lootables-Feature.patch +++ b/patches/server/LootTable-API-Replenishable-Lootables-Feature.patch @@ -741,6 +741,15 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 private final Inventory inventory; public CraftChestBoat(CraftServer server, ChestBoat entity) { +@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java