Fixed External Storage being in item and fluid mode at the same time, fixes #601
This commit is contained in:
@@ -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)
|
||||||
|
@@ -246,25 +246,27 @@ public class TileExternalStorage extends TileMultipartNode implements IItemStora
|
|||||||
|
|
||||||
TileEntity facing = getFacingTile();
|
TileEntity facing = getFacingTile();
|
||||||
|
|
||||||
if (facing instanceof IDrawerGroup) {
|
if (type == IType.ITEMS) {
|
||||||
IDrawerGroup group = (IDrawerGroup) facing;
|
if (facing instanceof IDrawerGroup) {
|
||||||
|
IDrawerGroup group = (IDrawerGroup) facing;
|
||||||
|
|
||||||
for (int i = 0; i < group.getDrawerCount(); ++i) {
|
for (int i = 0; i < group.getDrawerCount(); ++i) {
|
||||||
if (group.isDrawerEnabled(i)) {
|
if (group.isDrawerEnabled(i)) {
|
||||||
itemStorages.add(new ItemStorageDrawer(this, group.getDrawer(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) {
|
} else if (type == IType.FLUIDS) {
|
||||||
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));
|
|
||||||
}
|
|
||||||
|
|
||||||
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
|
||||||
|
Reference in New Issue
Block a user