diff --git a/patches/server/0113-Totems-work-in-inventory.patch b/patches/server/0113-Totems-work-in-inventory.patch index 8af3a87a6..234bbc954 100644 --- a/patches/server/0113-Totems-work-in-inventory.patch +++ b/patches/server/0113-Totems-work-in-inventory.patch @@ -5,18 +5,19 @@ Subject: [PATCH] Totems work in inventory diff --git a/src/main/java/net/minecraft/server/EntityLiving.java b/src/main/java/net/minecraft/server/EntityLiving.java -index 061906a56..3b5548f59 100644 +index 061906a569..0b23d4f3e5 100644 --- a/src/main/java/net/minecraft/server/EntityLiving.java +++ b/src/main/java/net/minecraft/server/EntityLiving.java -@@ -1318,6 +1318,18 @@ public abstract class EntityLiving extends Entity { +@@ -1318,6 +1318,19 @@ public abstract class EntityLiving extends Entity { } } + // Purpur start -+ if (world.purpurConfig.totemOfUndyingWorksInInventory && itemstack == ItemStack.NULL_ITEM && this instanceof EntityPlayer) { ++ if (world.purpurConfig.totemOfUndyingWorksInInventory && this instanceof EntityPlayer && (itemstack == null || itemstack.getItem() != Items.TOTEM_OF_UNDYING)) { + EntityPlayer player = (EntityPlayer) this; + for (ItemStack item : player.inventory.items) { + if (item.getItem() == Items.TOTEM_OF_UNDYING) { ++ itemstack1 = item; + itemstack = item.cloneItemStack(); + break; + } @@ -28,7 +29,7 @@ index 061906a56..3b5548f59 100644 event.setCancelled(itemstack == null); this.world.getServer().getPluginManager().callEvent(event); diff --git a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java -index 26964f062..cb7812741 100644 +index 26964f0620..cb7812741e 100644 --- a/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java +++ b/src/main/java/net/pl3x/purpur/PurpurWorldConfig.java @@ -185,6 +185,11 @@ public class PurpurWorldConfig {