Skip to content

Commit

Permalink
Replace faulty dummy object logic with object creation
Browse files Browse the repository at this point in the history
  • Loading branch information
bearsdotzone committed Dec 12, 2023
1 parent 8202c6e commit b14c0a4
Showing 1 changed file with 2 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,12 @@ public void addDetailedEntries(ItemStack itemstack, EntityPlayer entityplayer, L
EnderIO.blockTank.addDetailedEntries(itemstack, entityplayer, list, flag);
}

private static final FluidTank dummy = new SmartTank(FluidRegistry.WATER, 16000);

private FluidTank loadTank(ItemStack stack) {
if (stack.hasTagCompound()) {
FluidTank tank = TileTank.loadTank(stack.getTagCompound());
return tank != null ? tank : dummy;
return tank != null ? tank : new SmartTank(FluidRegistry.WATER, 16000);
}
return dummy;
return new SmartTank(FluidRegistry.WATER, 16000);
}

private void saveTank(ItemStack stack, FluidTank tank) {
Expand Down

0 comments on commit b14c0a4

Please sign in to comment.