diff --git a/CHANGELOG.md b/CHANGELOG.md index a05df2bd8..b79be8e81 100755 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,6 +5,7 @@ - Mod search can now also take mod name instead of just id (raoulvdberge) - Fixed bug where Disk Manipulator doesn't save disks (raoulvdberge) - Fixed Disk Drive stored quantity GUI text hovering over other text (raoulvdberge) +- Fixed External Storage being in item and fluid mode at the same time (raoulvdberge) ### 1.2.3 - Fixed fluid cache updating wrongly (raoulvdberge) diff --git a/src/main/java/com/raoulvdberge/refinedstorage/tile/externalstorage/TileExternalStorage.java b/src/main/java/com/raoulvdberge/refinedstorage/tile/externalstorage/TileExternalStorage.java index f4dfb8d09..537e79f83 100755 --- a/src/main/java/com/raoulvdberge/refinedstorage/tile/externalstorage/TileExternalStorage.java +++ b/src/main/java/com/raoulvdberge/refinedstorage/tile/externalstorage/TileExternalStorage.java @@ -246,25 +246,27 @@ public class TileExternalStorage extends TileMultipartNode implements IItemStora TileEntity facing = getFacingTile(); - if (facing instanceof IDrawerGroup) { - IDrawerGroup group = (IDrawerGroup) facing; + if (type == IType.ITEMS) { + if (facing instanceof IDrawerGroup) { + IDrawerGroup group = (IDrawerGroup) facing; - for (int i = 0; i < group.getDrawerCount(); ++i) { - if (group.isDrawerEnabled(i)) { - itemStorages.add(new ItemStorageDrawer(this, group.getDrawer(i))); + for (int i = 0; i < group.getDrawerCount(); ++i) { + if (group.isDrawerEnabled(i)) { + itemStorages.add(new ItemStorageDrawer(this, group.getDrawer(i))); + } + } + } else if (facing instanceof IDrawer) { + itemStorages.add(new ItemStorageDrawer(this, (IDrawer) facing)); + } else if (facing instanceof IDeepStorageUnit) { + itemStorages.add(new ItemStorageDSU(this, (IDeepStorageUnit) facing)); + } else { + IItemHandler itemHandler = RSUtils.getItemHandler(facing, getDirection().getOpposite()); + + if (itemHandler != null) { + itemStorages.add(new ItemStorageItemHandler(this, itemHandler)); } } - } else if (facing instanceof IDrawer) { - itemStorages.add(new ItemStorageDrawer(this, (IDrawer) facing)); - } else if (facing instanceof IDeepStorageUnit) { - itemStorages.add(new ItemStorageDSU(this, (IDeepStorageUnit) facing)); - } else { - IItemHandler itemHandler = RSUtils.getItemHandler(facing, getDirection().getOpposite()); - - if (itemHandler != null) { - itemStorages.add(new ItemStorageItemHandler(this, itemHandler)); - } - + } else if (type == IType.FLUIDS) { IFluidHandler fluidHandler = RSUtils.getFluidHandler(facing, getDirection().getOpposite()); if (fluidHandler != null) { @@ -370,6 +372,10 @@ public class TileExternalStorage extends TileMultipartNode implements IItemStora this.type = type; markDirty(); + + if (network != null) { + updateStorage(network); + } } @Override