Some renames
This commit is contained in:
@@ -47,8 +47,8 @@ import com.raoulvdberge.refinedstorage.tile.config.RedstoneMode;
|
||||
import com.raoulvdberge.refinedstorage.tile.data.ITileDataProducer;
|
||||
import com.raoulvdberge.refinedstorage.tile.data.RSSerializers;
|
||||
import com.raoulvdberge.refinedstorage.tile.data.TileDataParameter;
|
||||
import com.raoulvdberge.refinedstorage.tile.externalstorage.FluidStorageExternal;
|
||||
import com.raoulvdberge.refinedstorage.tile.externalstorage.ItemStorageExternal;
|
||||
import com.raoulvdberge.refinedstorage.tile.externalstorage.StorageFluidExternal;
|
||||
import com.raoulvdberge.refinedstorage.tile.externalstorage.StorageItemExternal;
|
||||
import com.raoulvdberge.refinedstorage.tile.grid.IGrid;
|
||||
import net.darkhax.tesla.capability.TeslaCapabilities;
|
||||
import net.minecraft.block.state.IBlockState;
|
||||
@@ -596,8 +596,8 @@ public class TileController extends TileBase implements INetworkMaster, IRedston
|
||||
|
||||
if (remainder == null) {
|
||||
// The external storage is responsible for sending changes, we don't need to anymore
|
||||
if (storage instanceof ItemStorageExternal && !simulate) {
|
||||
((ItemStorageExternal) storage).detectChanges(this);
|
||||
if (storage instanceof StorageItemExternal && !simulate) {
|
||||
((StorageItemExternal) storage).detectChanges(this);
|
||||
|
||||
insertedExternally += size;
|
||||
}
|
||||
@@ -605,8 +605,8 @@ public class TileController extends TileBase implements INetworkMaster, IRedston
|
||||
break;
|
||||
} else {
|
||||
// The external storage is responsible for sending changes, we don't need to anymore
|
||||
if (size != remainder.getCount() && storage instanceof ItemStorageExternal && !simulate) {
|
||||
((ItemStorageExternal) storage).detectChanges(this);
|
||||
if (size != remainder.getCount() && storage instanceof StorageItemExternal && !simulate) {
|
||||
((StorageItemExternal) storage).detectChanges(this);
|
||||
|
||||
insertedExternally += size - remainder.getCount();
|
||||
}
|
||||
@@ -654,8 +654,8 @@ public class TileController extends TileBase implements INetworkMaster, IRedston
|
||||
|
||||
if (took != null) {
|
||||
// The external storage is responsible for sending changes, we don't need to anymore
|
||||
if (storage instanceof ItemStorageExternal && !simulate) {
|
||||
((ItemStorageExternal) storage).detectChanges(this);
|
||||
if (storage instanceof StorageItemExternal && !simulate) {
|
||||
((StorageItemExternal) storage).detectChanges(this);
|
||||
|
||||
extractedExternally += took.getCount();
|
||||
}
|
||||
@@ -701,8 +701,8 @@ public class TileController extends TileBase implements INetworkMaster, IRedston
|
||||
inserted += storage.getCacheDelta(storedPre, size, remainder);
|
||||
}
|
||||
|
||||
if (storage instanceof FluidStorageExternal && !simulate) {
|
||||
((FluidStorageExternal) storage).updateCacheForcefully();
|
||||
if (storage instanceof StorageFluidExternal && !simulate) {
|
||||
((StorageFluidExternal) storage).updateCacheForcefully();
|
||||
}
|
||||
|
||||
if (remainder == null) {
|
||||
@@ -735,8 +735,8 @@ public class TileController extends TileBase implements INetworkMaster, IRedston
|
||||
}
|
||||
|
||||
if (took != null) {
|
||||
if (storage instanceof FluidStorageExternal && !simulate) {
|
||||
((FluidStorageExternal) storage).updateCacheForcefully();
|
||||
if (storage instanceof StorageFluidExternal && !simulate) {
|
||||
((StorageFluidExternal) storage).updateCacheForcefully();
|
||||
}
|
||||
|
||||
if (newStack == null) {
|
||||
|
||||
@@ -40,10 +40,10 @@ public class TileDiskDrive extends TileNode implements IStorageProvider, IStorag
|
||||
public static final TileDataParameter<Boolean> VOID_EXCESS = IExcessVoidable.createParameter();
|
||||
public static final TileDataParameter<AccessType> ACCESS_TYPE = IAccessType.createParameter();
|
||||
|
||||
public class ItemStorage extends StorageItemNBT {
|
||||
public class StorageItem extends StorageItemNBT {
|
||||
private int lastState;
|
||||
|
||||
public ItemStorage(ItemStack disk) {
|
||||
public StorageItem(ItemStack disk) {
|
||||
super(disk.getTagCompound(), EnumItemStorageType.getById(disk.getItemDamage()).getCapacity(), TileDiskDrive.this);
|
||||
|
||||
lastState = getDiskState(getStored(), getCapacity());
|
||||
@@ -87,10 +87,10 @@ public class TileDiskDrive extends TileNode implements IStorageProvider, IStorag
|
||||
}
|
||||
}
|
||||
|
||||
public class FluidStorage extends StorageFluidNBT {
|
||||
public class StorageFluid extends StorageFluidNBT {
|
||||
private int lastState;
|
||||
|
||||
public FluidStorage(ItemStack disk) {
|
||||
public StorageFluid(ItemStack disk) {
|
||||
super(disk.getTagCompound(), EnumFluidStorageType.getById(disk.getItemDamage()).getCapacity(), TileDiskDrive.this);
|
||||
|
||||
lastState = getDiskState(getStored(), getCapacity());
|
||||
@@ -153,7 +153,7 @@ public class TileDiskDrive extends TileNode implements IStorageProvider, IStorag
|
||||
super.onContentsChanged(slot);
|
||||
|
||||
if (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER) {
|
||||
RSUtils.createStorages(getStackInSlot(slot), slot, itemStorages, fluidStorages, s -> new ItemStorage(s), s -> new FluidStorage(s));
|
||||
RSUtils.createStorages(getStackInSlot(slot), slot, itemStorages, fluidStorages, s -> new StorageItem(s), s -> new StorageFluid(s));
|
||||
|
||||
if (network != null) {
|
||||
network.getItemStorageCache().invalidate();
|
||||
@@ -181,8 +181,8 @@ public class TileDiskDrive extends TileNode implements IStorageProvider, IStorag
|
||||
private ItemHandlerBasic itemFilters = new ItemHandlerBasic(9, this);
|
||||
private ItemHandlerFluid fluidFilters = new ItemHandlerFluid(9, this);
|
||||
|
||||
private ItemStorage itemStorages[] = new ItemStorage[8];
|
||||
private FluidStorage fluidStorages[] = new FluidStorage[8];
|
||||
private StorageItem itemStorages[] = new StorageItem[8];
|
||||
private StorageFluid fluidStorages[] = new StorageFluid[8];
|
||||
|
||||
private AccessType accessType = AccessType.INSERT_EXTRACT;
|
||||
private int priority = 0;
|
||||
@@ -222,13 +222,13 @@ public class TileDiskDrive extends TileNode implements IStorageProvider, IStorag
|
||||
}
|
||||
|
||||
public void onBreak() {
|
||||
for (ItemStorage storage : this.itemStorages) {
|
||||
for (StorageItem storage : this.itemStorages) {
|
||||
if (storage != null) {
|
||||
storage.writeToNBT();
|
||||
}
|
||||
}
|
||||
|
||||
for (FluidStorage storage : this.fluidStorages) {
|
||||
for (StorageFluid storage : this.fluidStorages) {
|
||||
if (storage != null) {
|
||||
storage.writeToNBT();
|
||||
}
|
||||
|
||||
@@ -66,8 +66,8 @@ public class TileDiskManipulator extends TileNode implements IComparable, IFilte
|
||||
private int type = IType.ITEMS;
|
||||
private int ioMode = IO_MODE_INSERT;
|
||||
|
||||
private ItemStorage[] itemStorages = new ItemStorage[6];
|
||||
private FluidStorage[] fluidStorages = new FluidStorage[6];
|
||||
private StorageItem[] itemStorages = new StorageItem[6];
|
||||
private StorageFluid[] fluidStorages = new StorageFluid[6];
|
||||
|
||||
private Integer[] diskState = new Integer[6];
|
||||
|
||||
@@ -79,7 +79,7 @@ public class TileDiskManipulator extends TileNode implements IComparable, IFilte
|
||||
super.onContentsChanged(slot);
|
||||
|
||||
if (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER) {
|
||||
RSUtils.createStorages(getStackInSlot(slot), slot, itemStorages, fluidStorages, s -> new ItemStorage(s), s -> new FluidStorage(s));
|
||||
RSUtils.createStorages(getStackInSlot(slot), slot, itemStorages, fluidStorages, s -> new StorageItem(s), s -> new StorageFluid(s));
|
||||
|
||||
updateBlock();
|
||||
}
|
||||
@@ -106,17 +106,17 @@ public class TileDiskManipulator extends TileNode implements IComparable, IFilte
|
||||
super.onContentsChanged(slot);
|
||||
|
||||
if (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER) {
|
||||
RSUtils.createStorages(getStackInSlot(slot), 3 + slot, itemStorages, fluidStorages, s -> new ItemStorage(s), s -> new FluidStorage(s));
|
||||
RSUtils.createStorages(getStackInSlot(slot), 3 + slot, itemStorages, fluidStorages, s -> new StorageItem(s), s -> new StorageFluid(s));
|
||||
|
||||
updateBlock();
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
public class ItemStorage extends StorageItemNBT {
|
||||
public class StorageItem extends StorageItemNBT {
|
||||
private int lastState;
|
||||
|
||||
public ItemStorage(ItemStack disk) {
|
||||
public StorageItem(ItemStack disk) {
|
||||
super(disk.getTagCompound(), EnumItemStorageType.getById(disk.getItemDamage()).getCapacity(), TileDiskManipulator.this);
|
||||
|
||||
lastState = TileDiskDrive.getDiskState(getStored(), getCapacity());
|
||||
@@ -164,10 +164,10 @@ public class TileDiskManipulator extends TileNode implements IComparable, IFilte
|
||||
}
|
||||
}
|
||||
|
||||
public class FluidStorage extends StorageFluidNBT {
|
||||
public class StorageFluid extends StorageFluidNBT {
|
||||
private int lastState;
|
||||
|
||||
public FluidStorage(ItemStack disk) {
|
||||
public StorageFluid(ItemStack disk) {
|
||||
super(disk.getTagCompound(), EnumFluidStorageType.getById(disk.getItemDamage()).getCapacity(), TileDiskManipulator.this);
|
||||
|
||||
lastState = TileDiskDrive.getDiskState(getStored(), getCapacity());
|
||||
@@ -252,7 +252,7 @@ public class TileDiskManipulator extends TileNode implements IComparable, IFilte
|
||||
return;
|
||||
}
|
||||
|
||||
ItemStorage storage = itemStorages[slot];
|
||||
StorageItem storage = itemStorages[slot];
|
||||
|
||||
if (ioMode == IO_MODE_INSERT) {
|
||||
insertIntoNetwork(storage, slot);
|
||||
@@ -268,7 +268,7 @@ public class TileDiskManipulator extends TileNode implements IComparable, IFilte
|
||||
return;
|
||||
}
|
||||
|
||||
FluidStorage storage = fluidStorages[slot];
|
||||
StorageFluid storage = fluidStorages[slot];
|
||||
|
||||
if (ioMode == IO_MODE_INSERT) {
|
||||
insertIntoNetwork(storage, slot);
|
||||
@@ -278,7 +278,7 @@ public class TileDiskManipulator extends TileNode implements IComparable, IFilte
|
||||
}
|
||||
}
|
||||
|
||||
private void insertIntoNetwork(ItemStorage storage, int slot) {
|
||||
private void insertIntoNetwork(StorageItem storage, int slot) {
|
||||
if (storage.getStored() == 0) {
|
||||
moveDriveToOutput(slot);
|
||||
return;
|
||||
@@ -309,7 +309,7 @@ public class TileDiskManipulator extends TileNode implements IComparable, IFilte
|
||||
}
|
||||
}
|
||||
|
||||
private void extractFromNetwork(ItemStorage storage, int slot) {
|
||||
private void extractFromNetwork(StorageItem storage, int slot) {
|
||||
if (storage.getStored() == storage.getCapacity()) {
|
||||
moveDriveToOutput(slot);
|
||||
return;
|
||||
@@ -357,7 +357,7 @@ public class TileDiskManipulator extends TileNode implements IComparable, IFilte
|
||||
}
|
||||
}
|
||||
|
||||
private void insertIntoNetwork(FluidStorage storage, int slot) {
|
||||
private void insertIntoNetwork(StorageFluid storage, int slot) {
|
||||
if (storage.getStored() == 0) {
|
||||
moveDriveToOutput(slot);
|
||||
return;
|
||||
@@ -390,7 +390,7 @@ public class TileDiskManipulator extends TileNode implements IComparable, IFilte
|
||||
}
|
||||
}
|
||||
|
||||
private void extractFromNetwork(FluidStorage storage, int slot) {
|
||||
private void extractFromNetwork(StorageFluid storage, int slot) {
|
||||
if (storage.getStored() == storage.getCapacity()) {
|
||||
moveDriveToOutput(slot);
|
||||
return;
|
||||
@@ -614,13 +614,13 @@ public class TileDiskManipulator extends TileNode implements IComparable, IFilte
|
||||
}
|
||||
|
||||
public void onBreak() {
|
||||
for (ItemStorage storage : itemStorages) {
|
||||
for (StorageItem storage : itemStorages) {
|
||||
if (storage != null) {
|
||||
storage.writeToNBT();
|
||||
}
|
||||
}
|
||||
|
||||
for (FluidStorage storage : fluidStorages) {
|
||||
for (StorageFluid storage : fluidStorages) {
|
||||
if (storage != null) {
|
||||
storage.writeToNBT();
|
||||
}
|
||||
|
||||
@@ -35,8 +35,8 @@ public class TileFluidStorage extends TileNode implements IStorageProvider, ISto
|
||||
}
|
||||
});
|
||||
|
||||
class FluidStorage extends StorageFluidNBT {
|
||||
public FluidStorage() {
|
||||
class StorageFluid extends StorageFluidNBT {
|
||||
public StorageFluid() {
|
||||
super(TileFluidStorage.this.getStorageTag(), TileFluidStorage.this.getCapacity(), TileFluidStorage.this);
|
||||
}
|
||||
|
||||
@@ -76,7 +76,7 @@ public class TileFluidStorage extends TileNode implements IStorageProvider, ISto
|
||||
|
||||
private NBTTagCompound storageTag = StorageFluidNBT.createNBT();
|
||||
|
||||
private FluidStorage storage;
|
||||
private StorageFluid storage;
|
||||
|
||||
private EnumFluidStorageType type;
|
||||
|
||||
@@ -109,7 +109,7 @@ public class TileFluidStorage extends TileNode implements IStorageProvider, ISto
|
||||
super.update();
|
||||
|
||||
if (storage == null && storageTag != null) {
|
||||
storage = new FluidStorage();
|
||||
storage = new StorageFluid();
|
||||
|
||||
if (network != null) {
|
||||
network.getFluidStorageCache().invalidate();
|
||||
|
||||
@@ -37,8 +37,8 @@ public class TileStorage extends TileNode implements IStorageProvider, IStorageG
|
||||
});
|
||||
public static final TileDataParameter<Boolean> VOID_EXCESS = IExcessVoidable.createParameter();
|
||||
|
||||
class ItemStorage extends StorageItemNBT {
|
||||
public ItemStorage() {
|
||||
class StorageItem extends StorageItemNBT {
|
||||
public StorageItem() {
|
||||
super(TileStorage.this.getStorageTag(), TileStorage.this.getCapacity(), TileStorage.this);
|
||||
}
|
||||
|
||||
@@ -78,7 +78,7 @@ public class TileStorage extends TileNode implements IStorageProvider, IStorageG
|
||||
|
||||
private NBTTagCompound storageTag = StorageItemNBT.createNBT();
|
||||
|
||||
private ItemStorage storage;
|
||||
private StorageItem storage;
|
||||
|
||||
private EnumItemStorageType type;
|
||||
|
||||
@@ -111,7 +111,7 @@ public class TileStorage extends TileNode implements IStorageProvider, IStorageG
|
||||
super.update();
|
||||
|
||||
if (storage == null && storageTag != null) {
|
||||
storage = new ItemStorage();
|
||||
storage = new StorageItem();
|
||||
|
||||
if (network != null) {
|
||||
network.getItemStorageCache().invalidate();
|
||||
|
||||
@@ -14,13 +14,13 @@ import net.minecraftforge.fluids.capability.IFluidTankProperties;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class FluidStorageExternal implements IStorage<FluidStack> {
|
||||
public class StorageFluidExternal implements IStorage<FluidStack> {
|
||||
private FluidStack cache;
|
||||
|
||||
private TileExternalStorage externalStorage;
|
||||
private IFluidHandler handler;
|
||||
|
||||
public FluidStorageExternal(TileExternalStorage externalStorage, IFluidHandler handler, IFluidTankProperties properties) {
|
||||
public StorageFluidExternal(TileExternalStorage externalStorage, IFluidHandler handler, IFluidTankProperties properties) {
|
||||
this.externalStorage = externalStorage;
|
||||
this.handler = handler;
|
||||
}
|
||||
@@ -11,11 +11,11 @@ import powercrystals.minefactoryreloaded.api.IDeepStorageUnit;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class ItemStorageDSU extends ItemStorageExternal {
|
||||
public class StorageItemDSU extends StorageItemExternal {
|
||||
private TileExternalStorage externalStorage;
|
||||
private IDeepStorageUnit unit;
|
||||
|
||||
public ItemStorageDSU(TileExternalStorage externalStorage, IDeepStorageUnit unit) {
|
||||
public StorageItemDSU(TileExternalStorage externalStorage, IDeepStorageUnit unit) {
|
||||
this.externalStorage = externalStorage;
|
||||
this.unit = unit;
|
||||
}
|
||||
@@ -12,11 +12,11 @@ import net.minecraftforge.items.ItemHandlerHelper;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class ItemStorageDrawer extends ItemStorageExternal {
|
||||
public class StorageItemDrawer extends StorageItemExternal {
|
||||
private TileExternalStorage externalStorage;
|
||||
private IDrawer drawer;
|
||||
|
||||
public ItemStorageDrawer(TileExternalStorage externalStorage, IDrawer drawer) {
|
||||
public StorageItemDrawer(TileExternalStorage externalStorage, IDrawer drawer) {
|
||||
this.externalStorage = externalStorage;
|
||||
this.drawer = drawer;
|
||||
}
|
||||
@@ -7,11 +7,11 @@ import net.minecraft.util.NonNullList;
|
||||
import javax.annotation.Nonnull;
|
||||
import javax.annotation.Nullable;
|
||||
|
||||
public class ItemStorageDrawerGroup extends ItemStorageExternal {
|
||||
public class StorageItemDrawerGroup extends StorageItemExternal {
|
||||
private TileExternalStorage externalStorage;
|
||||
private IDrawerGroup drawers;
|
||||
|
||||
public ItemStorageDrawerGroup(TileExternalStorage externalStorage, IDrawerGroup drawers) {
|
||||
public StorageItemDrawerGroup(TileExternalStorage externalStorage, IDrawerGroup drawers) {
|
||||
this.externalStorage = externalStorage;
|
||||
this.drawers = drawers;
|
||||
}
|
||||
@@ -22,7 +22,7 @@ public class ItemStorageDrawerGroup extends ItemStorageExternal {
|
||||
|
||||
for (int i = 0; i < drawers.getDrawerCount(); ++i) {
|
||||
if (drawers.isDrawerEnabled(i)) {
|
||||
stacks.addAll(ItemStorageDrawer.getStacks(drawers.getDrawer(i)));
|
||||
stacks.addAll(StorageItemDrawer.getStacks(drawers.getDrawer(i)));
|
||||
}
|
||||
}
|
||||
|
||||
@@ -67,7 +67,7 @@ public class ItemStorageDrawerGroup extends ItemStorageExternal {
|
||||
|
||||
for (int i = 0; i < drawers.getDrawerCount(); ++i) {
|
||||
if (drawers.isDrawerEnabled(i)) {
|
||||
remainder = ItemStorageDrawer.insert(externalStorage, drawers.getDrawer(i), stack, size, simulate);
|
||||
remainder = StorageItemDrawer.insert(externalStorage, drawers.getDrawer(i), stack, size, simulate);
|
||||
|
||||
if (remainder == null || remainder.getCount() <= 0) {
|
||||
break;
|
||||
@@ -89,7 +89,7 @@ public class ItemStorageDrawerGroup extends ItemStorageExternal {
|
||||
|
||||
for (int i = 0; i < drawers.getDrawerCount(); ++i) {
|
||||
if (drawers.isDrawerEnabled(i)) {
|
||||
ItemStack extracted = ItemStorageDrawer.extract(drawers.getDrawer(i), stack, toExtract, flags, simulate);
|
||||
ItemStack extracted = StorageItemDrawer.extract(drawers.getDrawer(i), stack, toExtract, flags, simulate);
|
||||
|
||||
if (extracted != null) {
|
||||
if (result == null) {
|
||||
@@ -9,7 +9,7 @@ import net.minecraft.item.ItemStack;
|
||||
import javax.annotation.Nullable;
|
||||
import java.util.List;
|
||||
|
||||
public abstract class ItemStorageExternal implements IStorage<ItemStack> {
|
||||
public abstract class StorageItemExternal implements IStorage<ItemStack> {
|
||||
private List<ItemStack> cache;
|
||||
|
||||
public abstract int getCapacity();
|
||||
@@ -10,12 +10,12 @@ import net.minecraftforge.items.ItemHandlerHelper;
|
||||
|
||||
import javax.annotation.Nonnull;
|
||||
|
||||
public class ItemStorageItemHandler extends ItemStorageExternal {
|
||||
public class StorageItemItemHandler extends StorageItemExternal {
|
||||
private TileExternalStorage externalStorage;
|
||||
private IItemHandler handler;
|
||||
private AccessType lockedAccessType = AccessType.INSERT_EXTRACT;
|
||||
|
||||
public ItemStorageItemHandler(TileExternalStorage externalStorage, IItemHandler handler) {
|
||||
public StorageItemItemHandler(TileExternalStorage externalStorage, IItemHandler handler) {
|
||||
this.externalStorage = externalStorage;
|
||||
this.handler = handler;
|
||||
|
||||
@@ -41,11 +41,11 @@ public class TileExternalStorage extends TileNode implements IStorageProvider, I
|
||||
public Integer getValue(TileExternalStorage tile) {
|
||||
int stored = 0;
|
||||
|
||||
for (ItemStorageExternal storage : tile.itemStorages) {
|
||||
for (StorageItemExternal storage : tile.itemStorages) {
|
||||
stored += storage.getStored();
|
||||
}
|
||||
|
||||
for (FluidStorageExternal storage : tile.fluidStorages) {
|
||||
for (StorageFluidExternal storage : tile.fluidStorages) {
|
||||
stored += storage.getStored();
|
||||
}
|
||||
|
||||
@@ -58,11 +58,11 @@ public class TileExternalStorage extends TileNode implements IStorageProvider, I
|
||||
public Integer getValue(TileExternalStorage tile) {
|
||||
int capacity = 0;
|
||||
|
||||
for (ItemStorageExternal storage : tile.itemStorages) {
|
||||
for (StorageItemExternal storage : tile.itemStorages) {
|
||||
capacity += storage.getCapacity();
|
||||
}
|
||||
|
||||
for (FluidStorageExternal storage : tile.fluidStorages) {
|
||||
for (StorageFluidExternal storage : tile.fluidStorages) {
|
||||
capacity += storage.getCapacity();
|
||||
}
|
||||
|
||||
@@ -84,8 +84,8 @@ public class TileExternalStorage extends TileNode implements IStorageProvider, I
|
||||
private int type = IType.ITEMS;
|
||||
private AccessType accessType = AccessType.INSERT_EXTRACT;
|
||||
|
||||
private List<ItemStorageExternal> itemStorages = new ArrayList<>();
|
||||
private List<FluidStorageExternal> fluidStorages = new ArrayList<>();
|
||||
private List<StorageItemExternal> itemStorages = new ArrayList<>();
|
||||
private List<StorageFluidExternal> fluidStorages = new ArrayList<>();
|
||||
|
||||
public TileExternalStorage() {
|
||||
dataManager.addWatchedParameter(PRIORITY);
|
||||
@@ -127,13 +127,13 @@ public class TileExternalStorage extends TileNode implements IStorageProvider, I
|
||||
return;
|
||||
}
|
||||
|
||||
for (ItemStorageExternal storage : itemStorages) {
|
||||
for (StorageItemExternal storage : itemStorages) {
|
||||
storage.detectChanges(network);
|
||||
}
|
||||
|
||||
boolean fluidChangeDetected = false;
|
||||
|
||||
for (FluidStorageExternal storage : fluidStorages) {
|
||||
for (StorageFluidExternal storage : fluidStorages) {
|
||||
if (storage.updateCache()) {
|
||||
fluidChangeDetected = true;
|
||||
}
|
||||
@@ -234,16 +234,16 @@ public class TileExternalStorage extends TileNode implements IStorageProvider, I
|
||||
|
||||
if (type == IType.ITEMS) {
|
||||
if (facing instanceof IDrawerGroup) {
|
||||
itemStorages.add(new ItemStorageDrawerGroup(this, (IDrawerGroup) facing));
|
||||
itemStorages.add(new StorageItemDrawerGroup(this, (IDrawerGroup) facing));
|
||||
} else if (facing instanceof IDrawer) {
|
||||
itemStorages.add(new ItemStorageDrawer(this, (IDrawer) facing));
|
||||
itemStorages.add(new StorageItemDrawer(this, (IDrawer) facing));
|
||||
} else if (facing instanceof IDeepStorageUnit) {
|
||||
itemStorages.add(new ItemStorageDSU(this, (IDeepStorageUnit) facing));
|
||||
itemStorages.add(new StorageItemDSU(this, (IDeepStorageUnit) facing));
|
||||
} else if (!(facing instanceof TileNode)) {
|
||||
IItemHandler itemHandler = RSUtils.getItemHandler(facing, getDirection().getOpposite());
|
||||
|
||||
if (itemHandler != null) {
|
||||
itemStorages.add(new ItemStorageItemHandler(this, itemHandler));
|
||||
itemStorages.add(new StorageItemItemHandler(this, itemHandler));
|
||||
}
|
||||
}
|
||||
} else if (type == IType.FLUIDS) {
|
||||
@@ -251,7 +251,7 @@ public class TileExternalStorage extends TileNode implements IStorageProvider, I
|
||||
|
||||
if (fluidHandler != null) {
|
||||
for (IFluidTankProperties property : fluidHandler.getTankProperties()) {
|
||||
fluidStorages.add(new FluidStorageExternal(this, fluidHandler, property));
|
||||
fluidStorages.add(new StorageFluidExternal(this, fluidHandler, property));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user