Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- long currentTime = System.currentTimeMillis();
- public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
- if (player.getCurrentArmor(2) != null && player.getCurrentArmor(2).getItem().equals(MyModItems.deanChestplate))
- {
- player.capabilities.allowFlying=true;
- if(System.currentTimeMillis() - currentTime > 9000)
- {
- if(player.getCurrentArmor(2) == null || !player.getCurrentArmor(2).getItem().equals(MyModItems.deanChestplate))
- {
- player.addPotionEffect(new PotionEffect(Potion.digSlowdown.id, 40, 1, true));
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment