Posted June 19, 201213 yr I've been searching and searching but can't seem to find any way to give armor/tools an ability (breathing underwater, setting mobs on fire with a sword, etc.) I only found one tutorial, and the code it shows doesn't want to work... public void OnTick(float f, Minecraft Minecraft) { ItemStack boots = Minecraft.thePlayer.inventory.armorInventory[0]; ItemStack legs = Minecraft.thePlayer.inventory.armorInventory[1]; ItemStack chest = Minecraft.thePlayer.inventory.armorInventory[2]; ItemStack helm = Minecraft.thePlayer.inventory.armorInventory[3]; if(helm != null && helm.itemID == helmetCopper.shiftedIndex && boots != null && boots.itemID == bootsCopper.shiftedIndex && chest != null && chest.itemID == plateCopper.shiftedIndex && legs != null && legs.itemID == legsCopper.shiftedIndex) { Minecraft.thePlayer.fallDistance = 0.0F; Minecraft.thePlayer.isImmuneToFire = true; } } Is there any thing wrong with this code? And if so could you please point it out?
June 19, 201213 yr Author I also have another question... Can I use the same code above to give items an ability?
June 22, 201213 yr I am not sure either, but you might need a tick event and test for what you need each tick...
June 22, 201213 yr Author Would ISpeacilArmor be better? Been also trying to figure that out as well... but only errors so far...
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.