mirror of
https://github.com/Ellpeck/ActuallyAdditions.git
synced 2024-12-23 03:49:22 +01:00
Check so that unnecessary code doesn't run
This commit is contained in:
parent
99ccd4465e
commit
c22ab90fdb
1 changed files with 10 additions and 7 deletions
|
@ -196,16 +196,19 @@ public abstract class BlockContainerBase extends BlockContainer{
|
|||
|
||||
if(tile instanceof IFluidSaver){
|
||||
int amount = stack.getTagCompound().getInteger("FluidAmount");
|
||||
FluidStack[] fluids = new FluidStack[amount];
|
||||
|
||||
for(int i = 0; i < amount; i++){
|
||||
NBTTagCompound compound = stack.getTagCompound().getCompoundTag("Fluid"+i);
|
||||
if(compound != null){
|
||||
fluids[i] = FluidStack.loadFluidStackFromNBT(compound);
|
||||
if(amount > 0){
|
||||
FluidStack[] fluids = new FluidStack[amount];
|
||||
|
||||
for(int i = 0; i < amount; i++){
|
||||
NBTTagCompound compound = stack.getTagCompound().getCompoundTag("Fluid"+i);
|
||||
if(compound != null){
|
||||
fluids[i] = FluidStack.loadFluidStackFromNBT(compound);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
((IFluidSaver)tile).setFluids(fluids);
|
||||
((IFluidSaver)tile).setFluids(fluids);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue