mirror of
https://github.com/GTNewHorizons/MagicBees.git
synced 2026-11-25 06:24:54 +00:00
Compare commits
8
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
4eb810c4ac | ||
|
|
417c231cf2 | ||
|
|
88f97a6e83 | ||
|
|
d97b462cdc | ||
|
|
7ce76d77cd | ||
|
|
b4da6ce38f | ||
|
|
49a39bbd6c | ||
|
|
5c0169b7ea |
@@ -227,7 +227,8 @@ public class TileEntityApimancersDrainerCommon extends TileEntity
|
||||
|
||||
int total = this.essentia.getAmount(aspect);
|
||||
this.essentia.remove(aspect, amount); // if amount >= total then it will also remove aspect.
|
||||
return Math.min(amount, total);
|
||||
if (amount > total) return total;
|
||||
return amount;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
@@ -286,9 +287,6 @@ public class TileEntityApimancersDrainerCommon extends TileEntity
|
||||
public void readFromNBT(NBTTagCompound compound) {
|
||||
super.readFromNBT(compound);
|
||||
this.essentia.readFromNBT(compound);
|
||||
for (Aspect aspect : this.essentia.getAspects()) {
|
||||
if (this.essentia.getAmount(aspect) <= 0) this.essentia.remove(aspect);
|
||||
}
|
||||
if (this.essentia.visSize() > this.maxAmount) {
|
||||
this.essentia = new AspectList();
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user