diff --git a/common/net/minecraftforge/common/ITickingArmor.java b/common/net/minecraftforge/common/ITickingArmor.java new file mode 100644 index 0000000000..3c240d3d87 --- /dev/null +++ b/common/net/minecraftforge/common/ITickingArmor.java @@ -0,0 +1,15 @@ +package net.minecraftforge.common; + +import net.minecraft.entity.player.EntityPlayer; +import net.minecraft.item.ItemStack; +import net.minecraft.world.World; + +/** + * A simple interface to receive ticks from armor items when placed in armor slots. + * + * @author cpw + * + */ +public interface ITickingArmor { + void onArmorTickUpdate(World worldObj, EntityPlayer player, ItemStack itemStack); +} diff --git a/fml-src-1.4.7-4.7.30.549-master.zip b/fml-src-1.4.7-4.7.31.552-master.zip similarity index 98% rename from fml-src-1.4.7-4.7.30.549-master.zip rename to fml-src-1.4.7-4.7.31.552-master.zip index b60c5363b7..df4e31705b 100644 Binary files a/fml-src-1.4.7-4.7.30.549-master.zip and b/fml-src-1.4.7-4.7.31.552-master.zip differ diff --git a/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.java.patch b/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.java.patch new file mode 100644 index 0000000000..74f15678fc --- /dev/null +++ b/patches/minecraft/net/minecraft/entity/player/InventoryPlayer.java.patch @@ -0,0 +1,25 @@ +--- ../src_base/minecraft/net/minecraft/entity/player/InventoryPlayer.java ++++ ../src_work/minecraft/net/minecraft/entity/player/InventoryPlayer.java +@@ -10,6 +10,7 @@ + import net.minecraft.item.ItemStack; + import net.minecraft.nbt.NBTTagCompound; + import net.minecraft.nbt.NBTTagList; ++import net.minecraftforge.common.ITickingArmor; + + public class InventoryPlayer implements IInventory + { +@@ -337,6 +338,14 @@ + this.mainInventory[var1].updateAnimation(this.player.worldObj, this.player, var1, this.currentItem == var1); + } + } ++ ++ for (int i = 0; i < this.armorInventory.length; i++) ++ { ++ if (this.armorInventory[i] != null && this.armorInventory[i].getItem() instanceof ITickingArmor) ++ { ++ ((ITickingArmor)this.armorInventory[i].getItem()).onArmorTickUpdate(this.player.worldObj, this.player, this.armorInventory[i]); ++ } ++ } + } + + /**