Update TileEntityApimancersDrainerCommon.java

This commit is contained in:
SST-03 authored and GitHub committed 2025-09-29 17:03:38 +08:00
1 parent b4da6ce38f
commit 7ce76d77cd
1 file changed
+4 -6
@@ -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;