From d71444f966982037627895afd2026ed9fa886ea8 Mon Sep 17 00:00:00 2001 From: Fabse Date: Mon, 28 Mar 2016 00:52:36 +0200 Subject: [PATCH] Add a workaround for bugged Minecart drop names --- .../0120-Minecart-drop-name-workaround.patch | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 Spigot-Server-Patches/0120-Minecart-drop-name-workaround.patch diff --git a/Spigot-Server-Patches/0120-Minecart-drop-name-workaround.patch b/Spigot-Server-Patches/0120-Minecart-drop-name-workaround.patch new file mode 100644 index 0000000000..f43822fbd5 --- /dev/null +++ b/Spigot-Server-Patches/0120-Minecart-drop-name-workaround.patch @@ -0,0 +1,24 @@ +From 1cb42951e84776c7f32e6d2f243b9f41c167584a Mon Sep 17 00:00:00 2001 +From: Fabse +Date: Mon, 28 Mar 2016 00:46:46 +0200 +Subject: [PATCH] Minecart drop name workaround + +This is a workaround for MC-68446 (or similar). +In Survival Minecraft this bug only shows in minecart drops, so this is the only thing fixed here. + +diff --git a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java +index a649ae7..f0d503c 100644 +--- a/src/main/java/net/minecraft/server/EntityMinecartAbstract.java ++++ b/src/main/java/net/minecraft/server/EntityMinecartAbstract.java +@@ -168,7 +168,7 @@ public abstract class EntityMinecartAbstract extends Entity implements INamableT + if (this.world.getGameRules().getBoolean("doEntityDrops")) { + ItemStack itemstack = new ItemStack(Items.MINECART, 1); + +- if (this.getName() != null) { ++ if (this.hasCustomName()) { // Paper - Only set item name if custom name is set. Workaround for MC-68446 + itemstack.c(this.getName()); + } + +-- +2.7.4 +