From 7ce76d77cd29a2ff00925561a8935d28a2e575ea Mon Sep 17 00:00:00 2001 From: SST-03 <70825063+SST-03@users.noreply.github.com> Date: Mon, 29 Sep 2025 17:03:38 +0800 Subject: [PATCH] Update TileEntityApimancersDrainerCommon.java --- .../tileentity/TileEntityApimancersDrainerCommon.java | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/main/java/magicbees/tileentity/TileEntityApimancersDrainerCommon.java b/src/main/java/magicbees/tileentity/TileEntityApimancersDrainerCommon.java index 3be62a7..e524908 100644 --- a/src/main/java/magicbees/tileentity/TileEntityApimancersDrainerCommon.java +++ b/src/main/java/magicbees/tileentity/TileEntityApimancersDrainerCommon.java @@ -224,12 +224,10 @@ public class TileEntityApimancersDrainerCommon extends TileEntity if (!this.worldObj.isRemote) { this.worldObj.markBlockForUpdate(this.xCoord, this.yCoord, this.zCoord); } - if (amount > this.essentia.getAmount(aspect)) { - int total = this.essentia.getAmount(aspect); - this.essentia.reduce(aspect, total); - return total; - } - this.essentia.reduce(aspect, amount); + + int total = this.essentia.getAmount(aspect); + this.essentia.remove(aspect, amount); // if amount >= total then it will also remove aspect. + if (amount > total) return total; return amount; } return 0;