Advertisement
Guest User

Untitled

a guest
Aug 18th, 2019
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.12 KB | None | 0 0
  1. @Override
  2. public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
  3. if(player.inventory.armorItemInSlot(3) !=null && player.inventory.armorItemInSlot(3).getItem() == ItemMod.engineerHelm
  4. && player.inventory.armorItemInSlot(2) !=null && player.inventory.armorItemInSlot(2).getItem() == ItemMod.engineerChest
  5. && player.inventory.armorItemInSlot(1) !=null && player.inventory.armorItemInSlot(1).getItem() == ItemMod.engineerLegs
  6. && player.inventory.armorItemInSlot(0) !=null && player.inventory.armorItemInSlot(0).getItem() == ItemMod.engineerBoots)
  7. {
  8. this.effectPlayer(player, MobEffects.JUMP_BOOST ,1);
  9. this.effectPlayer(player, MobEffects.SPEED ,1);
  10. }
  11.  
  12. }
  13.  
  14. private void effectPlayer(EntityPlayer player, Potion potion, int amplifier) {
  15. if(player.getActivePotionEffect(potion) == null || player.getActivePotionEffect(potion).getDuration() <= 1)
  16. player.addPotionEffect(new PotionEffect(potion, 2, amplifier, false, false));
  17.  
  18. // TODO Auto-generated method stub
  19.  
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement