mirror of
https://github.com/GTNewHorizons/EnderIO.git
synced 2026-10-25 20:22:23 +00:00
Fix an edge case pertaining to freshly crafted tanks (#141)
* Update dependencies * Replace faulty dummy object logic with object creation * Remove logic that is exiting a function erroneously
This commit is contained in:
1 parent
1251427388
commit
4b5837cac2
2 files changed
+3
-9
No files matched your search
@@ -489,11 +489,7 @@ public abstract class AbstractMachineEntity extends TileEntityEio
|
||||
if (stack == null || stack.stackTagCompound == null) {
|
||||
return;
|
||||
}
|
||||
NBTTagCompound root = stack.stackTagCompound;
|
||||
if (!root.hasKey("eio.abstractMachine")) {
|
||||
return;
|
||||
}
|
||||
readCommon(root);
|
||||
readCommon(stack.stackTagCompound);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -71,14 +71,12 @@ public class BlockItemTank extends ItemBlockWithMetadata implements IAdvancedToo
|
||||
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) {
|
||||
|
||||
Reference in new issue
Block a user