From b9d82c5da5cec0cd5c84539620f6dad571a7be43 Mon Sep 17 00:00:00 2001 From: GlodBlock <1356392126@qq.com> Date: Wed, 31 Aug 2022 23:32:46 +0800 Subject: [PATCH] fix oversight in nbt load --- .../github/common/storage/FluidCellInventory.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/glodblock/github/common/storage/FluidCellInventory.java b/src/main/java/com/glodblock/github/common/storage/FluidCellInventory.java index e1a5ca8e..32c13194 100644 --- a/src/main/java/com/glodblock/github/common/storage/FluidCellInventory.java +++ b/src/main/java/com/glodblock/github/common/storage/FluidCellInventory.java @@ -221,14 +221,15 @@ public class FluidCellInventory implements IFluidCellInventory { for( int x = 0; x < types; x++ ) { final FluidStack t = FluidStack.loadFluidStackFromNBT( this.tagCompound.getCompoundTag( fluidSlots[x] ) ); + final AEFluidStack aet = AEFluidStack.create( t ); - if( t != null ) + if( aet != null ) { - t.amount = this.tagCompound.getInteger( fluidSlotCount[x] ); + aet.setStackSize( this.tagCompound.getLong( fluidSlotCount[x] ) ); - if( t.amount > 0 ) + if( aet.getStackSize() > 0 ) { - this.cellItems.add( AEFluidStack.create( t ) ); + this.cellItems.add( aet ); } } }