Egietje Posted August 20, 2016 Share Posted August 20, 2016 Hello, I want to know how to check if a player has a full armor set worn, how would I do that because now I have this: @Override public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { if(player.inventory.armorItemInSlot(103) != null && player.inventory.armorItemInSlot(103) == new ItemStack(KokkieItems.BOOM_HELMET)) { if(player.inventory.armorItemInSlot(102) != null && player.inventory.armorItemInSlot(102) == new ItemStack(KokkieItems.BOOM_CHESTPLATE)) { if(player.inventory.armorItemInSlot(101) != null && player.inventory.armorItemInSlot(101) == new ItemStack(KokkieItems.BOOM_LEGGINGS)) { if(player.inventory.armorItemInSlot(100) != null && player.inventory.armorItemInSlot(100) == new ItemStack(KokkieItems.BOOM_BOOTS)) { } } } } } But that crashes the game http://i.imgur.com/J4rrGt6.png[/img] Link to comment Share on other sites More sharing options...
Egietje Posted August 20, 2016 Author Share Posted August 20, 2016 Thats it, but it doesn't detect it, I have this: @Override public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) { if(player.getItemStackFromSlot(EntityEquipmentSlot.HEAD) != null && player.getItemStackFromSlot(EntityEquipmentSlot.HEAD) == new ItemStack(KokkieItems.BOOM_HELMET)) { if(player.getItemStackFromSlot(EntityEquipmentSlot.CHEST) != null && player.getItemStackFromSlot(EntityEquipmentSlot.CHEST) == new ItemStack(KokkieItems.BOOM_CHESTPLATE)) { if(player.getItemStackFromSlot(EntityEquipmentSlot.LEGS) != null && player.getItemStackFromSlot(EntityEquipmentSlot.LEGS) == new ItemStack(KokkieItems.BOOM_LEGGINGS)) { if(player.getItemStackFromSlot(EntityEquipmentSlot.FEET) != null && player.getItemStackFromSlot(EntityEquipmentSlot.FEET) == new ItemStack(KokkieItems.BOOM_BOOTS)) { System.out.println("Works"); } } } } } http://i.imgur.com/J4rrGt6.png[/img] Link to comment Share on other sites More sharing options...
Draco18s Posted August 20, 2016 Share Posted August 20, 2016 That's not how you compare ItemStacks. Apparently I'm a complete and utter jerk and come to this forum just like to make fun of people, be confrontational, and make your personal life miserable. If you think this is the case, JUST REPORT ME. Otherwise you're just going to get reported when you reply to my posts and point it out, because odds are, I was trying to be nice. Exception: If you do not understand Java, I WILL NOT HELP YOU and your thread will get locked. DO NOT PM ME WITH PROBLEMS. No help will be given. Link to comment Share on other sites More sharing options...
Egietje Posted August 20, 2016 Author Share Posted August 20, 2016 Then how should I do it? http://i.imgur.com/J4rrGt6.png[/img] Link to comment Share on other sites More sharing options...
Egietje Posted August 20, 2016 Author Share Posted August 20, 2016 Oh wait, just figured it out, still thanks! http://i.imgur.com/J4rrGt6.png[/img] Link to comment Share on other sites More sharing options...
Recommended Posts