Advertisement
Guest User

onArmorTick(...)

a guest
Oct 31st, 2014
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.36 KB | None | 0 0
  1. @Override
  2. public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
  3.     float absorption = player.getAbsorptionAmount();
  4.     float limit = 10.0f;
  5.     if (this.armorType == 1) {
  6.         if (absorption < limit) {
  7.             if (player.ticksExisted % 80 == 0) {
  8.                 absorption += (limit - absorption);
  9.                 player.setAbsorptionAmount(absorption);
  10.             }
  11.         }
  12.     }
  13. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement