Fixed iridium helmet night vision flickering
This commit is contained in:
parent
38f342cfc6
commit
99896f7a79
1 changed files with 4 additions and 4 deletions
|
|
@ -29,19 +29,18 @@ public class ItemArmorIridium extends ItemArmor {
|
|||
@Override
|
||||
public void onArmorTick(World world, EntityPlayer player, ItemStack itemStack) {
|
||||
ItemStack helmet = player.getEquipmentInSlot(4);
|
||||
ItemStack plate = player.getEquipmentInSlot(3);
|
||||
ItemStack legs = player.getEquipmentInSlot(2);
|
||||
ItemStack boots = player.getEquipmentInSlot(1);
|
||||
if (helmet != null) {
|
||||
if (helmet.getItem() == ItemHandler.iridiumHelmet) {
|
||||
player.addPotionEffect((new PotionEffect(Potion.nightVision.getId(), 200, 0)));
|
||||
player.addPotionEffect((new PotionEffect(Potion.nightVision.getId(), 210, 0)));
|
||||
}
|
||||
}
|
||||
ItemStack plate = player.getEquipmentInSlot(3);
|
||||
if (plate != null) {
|
||||
if (plate.getItem() == ItemHandler.iridiumChestplate) {
|
||||
player.addPotionEffect((new PotionEffect(Potion.regeneration.getId(), 200, 0)));
|
||||
}
|
||||
}
|
||||
ItemStack legs = player.getEquipmentInSlot(2);
|
||||
if (legs != null) {
|
||||
if (legs.getItem() == ItemHandler.iridiumLeggings) {
|
||||
player.addPotionEffect((new PotionEffect(Potion.moveSpeed.getId(), 200, 2)));
|
||||
|
|
@ -49,6 +48,7 @@ public class ItemArmorIridium extends ItemArmor {
|
|||
player.stepHeight = 1.001F;
|
||||
}
|
||||
}
|
||||
ItemStack boots = player.getEquipmentInSlot(1);
|
||||
if (boots != null) {
|
||||
if (boots.getItem() == ItemHandler.iridiumBoots) {
|
||||
player.fallDistance = 0.0F;
|
||||
|
|
|
|||
Loading…
Reference in a new issue