@darcky voila
public class MinerHelmet extends ItemArmor implements IModel {
private PotionEffect potionEffect = new PotionEffect(Potion.getPotionById(16));
public MinerHelmet(String name, ArmorMaterial materialIn, int renderIndexIn, EntityEquipmentSlot equipmentSlotIn) {
super(materialIn, renderIndexIn, equipmentSlotIn);
setUnlocalizedName(name);
setRegistryName(name);
}
@Override
public IBakedModel bake(IModelState state, VertexFormat format,
Function<ResourceLocation, TextureAtlasSprite> bakedTextureGetter) {
return null;
}
@Override
public void onArmorTick(final World world, final EntityPlayer player, final ItemStack itemStack) {
if (!player.isPotionActive(potionEffect.getPotion())) {
player.addPotionEffect(new PotionEffect(Potion.getPotionById(16), Integer.MAX_VALUE, 0));
}
}
}