mirror of
https://github.com/GTNewHorizons/AE2FluidCraft-Rework.git
synced 2026-11-24 13:54:39 +00:00
Remove amountLong NBT tag when present (#483)
This commit is contained in:
1 parent
a950c8f23b
commit
06e0821e67
1 file changed
+4
-9
@@ -91,16 +91,11 @@ public class ItemCertusQuartzTank extends BaseItemBlockContainer implements IFlu
|
||||
|
||||
if (!container.stackTagCompound.hasKey("tileEntity")
|
||||
|| container.stackTagCompound.getCompoundTag("tileEntity").hasKey("Empty")) {
|
||||
NBTTagCompound fluidTag = resource.writeToNBT(new NBTTagCompound());
|
||||
|
||||
if (this.capacity < resource.amount) {
|
||||
fluidTag.setInteger("Amount", this.capacity);
|
||||
container.stackTagCompound.setTag("tileEntity", fluidTag);
|
||||
return this.capacity;
|
||||
}
|
||||
|
||||
int finalAmount = Math.min(resource.amount, this.capacity);
|
||||
NBTTagCompound fluidTag = new FluidStack(resource.getFluid(), finalAmount, resource.tag)
|
||||
.writeToNBT(new NBTTagCompound());
|
||||
container.stackTagCompound.setTag("tileEntity", fluidTag);
|
||||
return resource.amount;
|
||||
return finalAmount;
|
||||
}
|
||||
|
||||
NBTTagCompound fluidTag = container.stackTagCompound.getCompoundTag("tileEntity");
|
||||
|
||||
Reference in new issue
Block a user