Fixed External Storage being in item and fluid mode at the same time, fixes #601

This commit is contained in:
Raoul Van den Berge
2016-11-09 16:50:04 +01:00
parent 21613fe9f7
commit b5240a7d68
2 changed files with 23 additions and 16 deletions

View File

@@ -5,6 +5,7 @@
- Mod search can now also take mod name instead of just id (raoulvdberge) - Mod search can now also take mod name instead of just id (raoulvdberge)
- Fixed bug where Disk Manipulator doesn't save disks (raoulvdberge) - Fixed bug where Disk Manipulator doesn't save disks (raoulvdberge)
- Fixed Disk Drive stored quantity GUI text hovering over other text (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 ### 1.2.3
- Fixed fluid cache updating wrongly (raoulvdberge) - Fixed fluid cache updating wrongly (raoulvdberge)

View File

@@ -246,6 +246,7 @@ public class TileExternalStorage extends TileMultipartNode implements IItemStora
TileEntity facing = getFacingTile(); TileEntity facing = getFacingTile();
if (type == IType.ITEMS) {
if (facing instanceof IDrawerGroup) { if (facing instanceof IDrawerGroup) {
IDrawerGroup group = (IDrawerGroup) facing; IDrawerGroup group = (IDrawerGroup) facing;
@@ -264,7 +265,8 @@ public class TileExternalStorage extends TileMultipartNode implements IItemStora
if (itemHandler != null) { if (itemHandler != null) {
itemStorages.add(new ItemStorageItemHandler(this, itemHandler)); itemStorages.add(new ItemStorageItemHandler(this, itemHandler));
} }
}
} else if (type == IType.FLUIDS) {
IFluidHandler fluidHandler = RSUtils.getFluidHandler(facing, getDirection().getOpposite()); IFluidHandler fluidHandler = RSUtils.getFluidHandler(facing, getDirection().getOpposite());
if (fluidHandler != null) { if (fluidHandler != null) {
@@ -370,6 +372,10 @@ public class TileExternalStorage extends TileMultipartNode implements IItemStora
this.type = type; this.type = type;
markDirty(); markDirty();
if (network != null) {
updateStorage(network);
}
} }
@Override @Override