Compare 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: on:
pull_request: pull_request:
branches: [ master, main ] branches: [ master, main, release/** ]
push: push:
branches: [ master, main ] branches: [ master, main, release/** ]
jobs: jobs:
build-and-test: build-and-test:
@@ -91,16 +91,11 @@ public class ItemCertusQuartzTank extends BaseItemBlockContainer implements IFlu
if (!container.stackTagCompound.hasKey("tileEntity") if (!container.stackTagCompound.hasKey("tileEntity")
|| container.stackTagCompound.getCompoundTag("tileEntity").hasKey("Empty")) { || container.stackTagCompound.getCompoundTag("tileEntity").hasKey("Empty")) {
NBTTagCompound fluidTag = resource.writeToNBT(new NBTTagCompound()); int finalAmount = Math.min(resource.amount, this.capacity);
NBTTagCompound fluidTag = new FluidStack(resource.getFluid(), finalAmount, resource.tag)
if (this.capacity < resource.amount) { .writeToNBT(new NBTTagCompound());
fluidTag.setInteger("Amount", this.capacity);
container.stackTagCompound.setTag("tileEntity", fluidTag);
return this.capacity;
}
container.stackTagCompound.setTag("tileEntity", fluidTag); container.stackTagCompound.setTag("tileEntity", fluidTag);
return resource.amount; return finalAmount;
} }
NBTTagCompound fluidTag = container.stackTagCompound.getCompoundTag("tileEntity"); NBTTagCompound fluidTag = container.stackTagCompound.getCompoundTag("tileEntity");