Jump to content

Tral1s

Members
  • Posts

    2
  • Joined

  • Last visited

Converted

  • Gender
    Male

Tral1s's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. So I tried it again, and it worked! (For some reason it crashed the first time). All you have to do is Minecraft.getMinecraft().thePlayer.inventory.armorInventory[armorIndex] = itemStack; and it places it, regardless of what it is.... So I managed to put a barrier on my legs... because I'm that skilled.
  2. Hi, I'm attempting to make an armor hotswap mod where if the player right clicks a piece of armor it will replace the armor they currently have on with it. (For example, right clicking diamond boots to replace leather boots that are currently equipped) I found a thread which talks about how to do this in 1.13+, but I want to achieve this in 1.8.9. The answer there was use Minecraft.getInstance().player.inventory.armorInventory.set(armorIndex, itemStack); But in forge 1.8.9 the closest I can get is this: Minecraft.getMinecraft().thePlayer.inventory.armorInventory Which is just an ArmorStack array. How do I change the armor? Will simply updating the array do the trick? Thanks, - Tral1s (First time modder, 3d year programmer)
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.