From 7198b6fc5f31ab6d7b62f4fa0317ca25c04f6b19 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Lindstr=C3=B6m?= Date: Fri, 18 Dec 2020 17:37:54 +0100 Subject: [PATCH] Revert to slowly killing mobs in smelteries, so regen enders are once again an endless source of enderpearls --- .../smeltery/logic/SmelteryLogic.java | 24 +------------------ 1 file changed, 1 insertion(+), 23 deletions(-) diff --git a/src/main/java/tconstruct/smeltery/logic/SmelteryLogic.java b/src/main/java/tconstruct/smeltery/logic/SmelteryLogic.java index 63364fef..bab4acde 100644 --- a/src/main/java/tconstruct/smeltery/logic/SmelteryLogic.java +++ b/src/main/java/tconstruct/smeltery/logic/SmelteryLogic.java @@ -387,29 +387,7 @@ public class SmelteryLogic extends InventoryLogic implements IActiveLogic, IFaci if (fluid != null && amount > 0 && damage > 0) { - boolean canFill = false; - - if (o instanceof EntityLivingBase) - { - int freeLiquid = Math.max(0, this.maxLiquid - this.currentLiquid - 1); - if (freeLiquid > 0) - { - int freeQuants = MathHelper.floor_float((float) freeLiquid / amount); - if (freeQuants > 0) - { - float health = ((EntityLivingBase) o).getHealth(); - int quantsAmount = MathHelper.ceiling_float_int(health / damage); - if (quantsAmount > 0) - { - int quantsToBeAdded = Math.min(freeQuants, quantsAmount); - amount = quantsToBeAdded * amount; - canFill = o.attackEntityFrom(DamageSource.outOfWorld, 9999); - } - } - } - } - else - canFill = o.attackEntityFrom(new SmelteryDamageSource(), damage); + boolean canFill = o.attackEntityFrom(new SmelteryDamageSource(), damage); if (canFill && amount > 0) this.fill(new FluidStack(fluid, amount), true);