Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Override
- public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
- if(player.inventory.armorItemInSlot(3) !=null && player.inventory.armorItemInSlot(3).getItem() == ItemMod.engineerHelm
- && player.inventory.armorItemInSlot(2) !=null && player.inventory.armorItemInSlot(2).getItem() == ItemMod.engineerChest
- && player.inventory.armorItemInSlot(1) !=null && player.inventory.armorItemInSlot(1).getItem() == ItemMod.engineerLegs
- && player.inventory.armorItemInSlot(0) !=null && player.inventory.armorItemInSlot(0).getItem() == ItemMod.engineerBoots)
- {
- this.effectPlayer(player, MobEffects.JUMP_BOOST ,1);
- this.effectPlayer(player, MobEffects.SPEED ,1);
- }
- }
- private void effectPlayer(EntityPlayer player, Potion potion, int amplifier) {
- if(player.getActivePotionEffect(potion) == null || player.getActivePotionEffect(potion).getDuration() <= 1)
- player.addPotionEffect(new PotionEffect(potion, 2, amplifier, false, false));
- // TODO Auto-generated method stub
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement