From 71127d1cc041ed4c96653ffd22ce51894eb86338 Mon Sep 17 00:00:00 2001 From: LexManos Date: Sat, 16 Mar 2013 22:11:55 -0700 Subject: [PATCH] Fix equipment slots for items when right clicked, and dispensed using a dispensor. --- .../minecraft/item/BehaviorDispenseArmor.java.patch | 11 +++++++++++ .../minecraft/net/minecraft/item/ItemArmor.java.patch | 11 +++++++++++ 2 files changed, 22 insertions(+) create mode 100644 patches/minecraft/net/minecraft/item/BehaviorDispenseArmor.java.patch create mode 100644 patches/minecraft/net/minecraft/item/ItemArmor.java.patch diff --git a/patches/minecraft/net/minecraft/item/BehaviorDispenseArmor.java.patch b/patches/minecraft/net/minecraft/item/BehaviorDispenseArmor.java.patch new file mode 100644 index 000000000..4d76640e5 --- /dev/null +++ b/patches/minecraft/net/minecraft/item/BehaviorDispenseArmor.java.patch @@ -0,0 +1,11 @@ +--- ../src_base/minecraft/net/minecraft/item/BehaviorDispenseArmor.java ++++ ../src_work/minecraft/net/minecraft/item/BehaviorDispenseArmor.java +@@ -31,7 +31,7 @@ + int i1 = EntityLiving.func_82159_b(par2ItemStack); + ItemStack itemstack1 = par2ItemStack.copy(); + itemstack1.stackSize = 1; +- entityliving.setCurrentItemOrArmor(i1 - l, itemstack1); ++ entityliving.setCurrentItemOrArmor(i1, itemstack1); //Forge: Vanilla bug fix associated with fixed setCurrentItemOrArmor indexs for players. + entityliving.func_96120_a(i1, 2.0F); + --par2ItemStack.stackSize; + return par2ItemStack; diff --git a/patches/minecraft/net/minecraft/item/ItemArmor.java.patch b/patches/minecraft/net/minecraft/item/ItemArmor.java.patch new file mode 100644 index 000000000..928624e62 --- /dev/null +++ b/patches/minecraft/net/minecraft/item/ItemArmor.java.patch @@ -0,0 +1,11 @@ +--- ../src_base/minecraft/net/minecraft/item/ItemArmor.java ++++ ../src_work/minecraft/net/minecraft/item/ItemArmor.java +@@ -218,7 +218,7 @@ + + if (itemstack1 == null) + { +- par3EntityPlayer.setCurrentItemOrArmor(i, par1ItemStack.copy()); ++ par3EntityPlayer.setCurrentItemOrArmor(i + 1, par1ItemStack.copy()); //Forge: Vanilla bug fix associated with fixed setCurrentItemOrArmor indexs for players. + par1ItemStack.stackSize = 0; + } +