@Override public void onValidPlayerWornTick(ItemStack stack, EntityPlayer player) { if(player.isBurning() && ConfigHandler.ringOfOdinFireResist) player.extinguish(); }
@Override public boolean onTick(World world, EntityPlayer player, LivingArmour livingArmour) { if (player.isBurning()) { totalFireTicks++; this.markDirty(); return true; } return false; }
@Override protected void beforeFluidWalk(EntityPlayer player) { if (player.isBurning()) { player.extinguish(); player.motionY = 0.5; } }
@ExposeProperty public Boolean burning() { return player().isBurning(); }
@Override public void onTick(World world, EntityPlayer player, ILivingArmour livingArmour) { if (player.isBurning() && fireCooldown <= 0) { player.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, fireResistDuration[this.level])); fireCooldown = fireCooldownTime[this.level]; player.sendStatusMessage(new TextComponentString(TextHelper.localizeEffect(chatBase + "fireRemove")), true); } else if (fireCooldown > 0) { fireCooldown--; } }
if(InvigoratingPendantConfig.fireUsage >= 0 && player.isBurning() && canConsume(InvigoratingPendantConfig.fireUsage, itemStack, player)) { player.extinguish();
@Override public void onTick(ItemStack stack, EntityPlayer living) { if (!this.canTick(stack)) { return; } if (living.isBurning() && !living.isPotionActive(MobEffects.FIRE_RESISTANCE)) { // do nothing if you already have World worldIn = living.getEntityWorld(); living.addPotionEffect(new PotionEffect(MobEffects.FIRE_RESISTANCE, seconds * Const.TICKS_PER_SEC, Const.Potions.I)); super.damageCharm(living, stack); UtilSound.playSound(living, living.getPosition(), SoundEvents.BLOCK_FIRE_EXTINGUISH, living.getSoundCategory()); UtilParticle.spawnParticle(worldIn, EnumParticleTypes.WATER_WAKE, living.getPosition()); UtilParticle.spawnParticle(worldIn, EnumParticleTypes.WATER_WAKE, living.getPosition().up()); } }
if(player.isBurning())