Compare commits

...
2 Commits
Author SHA1 Message Date
gorbit99 06e0821e67 Remove amountLong NBT tag when present (#483) 2026-11-24 09:44:08 +01:00
UltraProdigy a950c8f23b ci: run build and test on release branches 2026-11-09 02:21:23 -05:00
2 changed files with 6 additions and 11 deletions

No files matched your search

+2 -2
View File
@@ -3,9 +3,9 @@ name: Build and test
on:
pull_request:
branches: [ master, main ]
branches: [ master, main, release/** ]
push:
branches: [ master, main ]
branches: [ master, main, release/** ]
jobs:
build-and-test:
@@ -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");