cjcj55

Honey Armor

Nov 4th, 2020
748
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.00 KB | None | 0 0
  1. public class HoneyArmorItem extends ArmorItem
  2. {
  3. public HoneyArmorItem(IArmorMaterial materialIn, EquipmentSlotType slot, Properties builder)
  4. {
  5. super(materialIn, slot, builder);
  6. }
  7.  
  8. @Override
  9. public void onArmorTick(ItemStack stack, World world, PlayerEntity player)
  10. {
  11. if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.HONEY_BOOTS.get() &&
  12. player.inventory.armorItemInSlot(1).getItem() == ItemInit.HONEY_LEGGINGS.get() &&
  13. player.inventory.armorItemInSlot(2).getItem() == ItemInit.HONEY_CHESTPLATE.get() &&
  14. player.inventory.armorItemInSlot(3).getItem() == ItemInit.HONEY_HELMET.get())
  15. {
  16. if(!player.isPotionActive(Effects.HEALTH_BOOST))
  17. {
  18. player.addPotionEffect(new EffectInstance(Effects.HEALTH_BOOST, 999999999, 0, false, false, false));
  19. }
  20. //player.addPotionEffect(new EffectInstance(Effects.HEALTH_BOOST, 200, 0, false, false));
  21. } else { super.onArmorTick(stack, world, player);
  22. player.removeActivePotionEffect(Effects.HEALTH_BOOST); }
  23. }
  24. }
Advertisement
Add Comment
Please, Sign In to add comment