Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class HoneyArmorItem extends ArmorItem
- {
- public HoneyArmorItem(IArmorMaterial materialIn, EquipmentSlotType slot, Properties builder)
- {
- super(materialIn, slot, builder);
- }
- @Override
- public void onArmorTick(ItemStack stack, World world, PlayerEntity player)
- {
- if(player.inventory.armorItemInSlot(0).getItem() == ItemInit.HONEY_BOOTS.get() &&
- player.inventory.armorItemInSlot(1).getItem() == ItemInit.HONEY_LEGGINGS.get() &&
- player.inventory.armorItemInSlot(2).getItem() == ItemInit.HONEY_CHESTPLATE.get() &&
- player.inventory.armorItemInSlot(3).getItem() == ItemInit.HONEY_HELMET.get())
- {
- if(!player.isPotionActive(Effects.HEALTH_BOOST))
- {
- player.addPotionEffect(new EffectInstance(Effects.HEALTH_BOOST, 999999999, 0, false, false, false));
- }
- //player.addPotionEffect(new EffectInstance(Effects.HEALTH_BOOST, 200, 0, false, false));
- } else { super.onArmorTick(stack, world, player);
- player.removeActivePotionEffect(Effects.HEALTH_BOOST); }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment