Some renames

This commit is contained in:
Raoul Van den Berge
2016-11-30 17:14:38 +01:00
parent aa27de7618
commit fd008dc2ca
12 changed files with 72 additions and 72 deletions

View File

@@ -47,8 +47,8 @@ import com.raoulvdberge.refinedstorage.tile.config.RedstoneMode;
import com.raoulvdberge.refinedstorage.tile.data.ITileDataProducer; import com.raoulvdberge.refinedstorage.tile.data.ITileDataProducer;
import com.raoulvdberge.refinedstorage.tile.data.RSSerializers; import com.raoulvdberge.refinedstorage.tile.data.RSSerializers;
import com.raoulvdberge.refinedstorage.tile.data.TileDataParameter; import com.raoulvdberge.refinedstorage.tile.data.TileDataParameter;
import com.raoulvdberge.refinedstorage.tile.externalstorage.FluidStorageExternal; import com.raoulvdberge.refinedstorage.tile.externalstorage.StorageFluidExternal;
import com.raoulvdberge.refinedstorage.tile.externalstorage.ItemStorageExternal; import com.raoulvdberge.refinedstorage.tile.externalstorage.StorageItemExternal;
import com.raoulvdberge.refinedstorage.tile.grid.IGrid; import com.raoulvdberge.refinedstorage.tile.grid.IGrid;
import net.darkhax.tesla.capability.TeslaCapabilities; import net.darkhax.tesla.capability.TeslaCapabilities;
import net.minecraft.block.state.IBlockState; import net.minecraft.block.state.IBlockState;
@@ -596,8 +596,8 @@ public class TileController extends TileBase implements INetworkMaster, IRedston
if (remainder == null) { if (remainder == null) {
// The external storage is responsible for sending changes, we don't need to anymore // The external storage is responsible for sending changes, we don't need to anymore
if (storage instanceof ItemStorageExternal && !simulate) { if (storage instanceof StorageItemExternal && !simulate) {
((ItemStorageExternal) storage).detectChanges(this); ((StorageItemExternal) storage).detectChanges(this);
insertedExternally += size; insertedExternally += size;
} }
@@ -605,8 +605,8 @@ public class TileController extends TileBase implements INetworkMaster, IRedston
break; break;
} else { } else {
// The external storage is responsible for sending changes, we don't need to anymore // The external storage is responsible for sending changes, we don't need to anymore
if (size != remainder.getCount() && storage instanceof ItemStorageExternal && !simulate) { if (size != remainder.getCount() && storage instanceof StorageItemExternal && !simulate) {
((ItemStorageExternal) storage).detectChanges(this); ((StorageItemExternal) storage).detectChanges(this);
insertedExternally += size - remainder.getCount(); insertedExternally += size - remainder.getCount();
} }
@@ -654,8 +654,8 @@ public class TileController extends TileBase implements INetworkMaster, IRedston
if (took != null) { if (took != null) {
// The external storage is responsible for sending changes, we don't need to anymore // The external storage is responsible for sending changes, we don't need to anymore
if (storage instanceof ItemStorageExternal && !simulate) { if (storage instanceof StorageItemExternal && !simulate) {
((ItemStorageExternal) storage).detectChanges(this); ((StorageItemExternal) storage).detectChanges(this);
extractedExternally += took.getCount(); extractedExternally += took.getCount();
} }
@@ -701,8 +701,8 @@ public class TileController extends TileBase implements INetworkMaster, IRedston
inserted += storage.getCacheDelta(storedPre, size, remainder); inserted += storage.getCacheDelta(storedPre, size, remainder);
} }
if (storage instanceof FluidStorageExternal && !simulate) { if (storage instanceof StorageFluidExternal && !simulate) {
((FluidStorageExternal) storage).updateCacheForcefully(); ((StorageFluidExternal) storage).updateCacheForcefully();
} }
if (remainder == null) { if (remainder == null) {
@@ -735,8 +735,8 @@ public class TileController extends TileBase implements INetworkMaster, IRedston
} }
if (took != null) { if (took != null) {
if (storage instanceof FluidStorageExternal && !simulate) { if (storage instanceof StorageFluidExternal && !simulate) {
((FluidStorageExternal) storage).updateCacheForcefully(); ((StorageFluidExternal) storage).updateCacheForcefully();
} }
if (newStack == null) { if (newStack == null) {

View File

@@ -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<Boolean> VOID_EXCESS = IExcessVoidable.createParameter();
public static final TileDataParameter<AccessType> ACCESS_TYPE = IAccessType.createParameter(); public static final TileDataParameter<AccessType> ACCESS_TYPE = IAccessType.createParameter();
public class ItemStorage extends StorageItemNBT { public class StorageItem extends StorageItemNBT {
private int lastState; private int lastState;
public ItemStorage(ItemStack disk) { public StorageItem(ItemStack disk) {
super(disk.getTagCompound(), EnumItemStorageType.getById(disk.getItemDamage()).getCapacity(), TileDiskDrive.this); super(disk.getTagCompound(), EnumItemStorageType.getById(disk.getItemDamage()).getCapacity(), TileDiskDrive.this);
lastState = getDiskState(getStored(), getCapacity()); 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; private int lastState;
public FluidStorage(ItemStack disk) { public StorageFluid(ItemStack disk) {
super(disk.getTagCompound(), EnumFluidStorageType.getById(disk.getItemDamage()).getCapacity(), TileDiskDrive.this); super(disk.getTagCompound(), EnumFluidStorageType.getById(disk.getItemDamage()).getCapacity(), TileDiskDrive.this);
lastState = getDiskState(getStored(), getCapacity()); lastState = getDiskState(getStored(), getCapacity());
@@ -153,7 +153,7 @@ public class TileDiskDrive extends TileNode implements IStorageProvider, IStorag
super.onContentsChanged(slot); super.onContentsChanged(slot);
if (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER) { 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) { if (network != null) {
network.getItemStorageCache().invalidate(); network.getItemStorageCache().invalidate();
@@ -181,8 +181,8 @@ public class TileDiskDrive extends TileNode implements IStorageProvider, IStorag
private ItemHandlerBasic itemFilters = new ItemHandlerBasic(9, this); private ItemHandlerBasic itemFilters = new ItemHandlerBasic(9, this);
private ItemHandlerFluid fluidFilters = new ItemHandlerFluid(9, this); private ItemHandlerFluid fluidFilters = new ItemHandlerFluid(9, this);
private ItemStorage itemStorages[] = new ItemStorage[8]; private StorageItem itemStorages[] = new StorageItem[8];
private FluidStorage fluidStorages[] = new FluidStorage[8]; private StorageFluid fluidStorages[] = new StorageFluid[8];
private AccessType accessType = AccessType.INSERT_EXTRACT; private AccessType accessType = AccessType.INSERT_EXTRACT;
private int priority = 0; private int priority = 0;
@@ -222,13 +222,13 @@ public class TileDiskDrive extends TileNode implements IStorageProvider, IStorag
} }
public void onBreak() { public void onBreak() {
for (ItemStorage storage : this.itemStorages) { for (StorageItem storage : this.itemStorages) {
if (storage != null) { if (storage != null) {
storage.writeToNBT(); storage.writeToNBT();
} }
} }
for (FluidStorage storage : this.fluidStorages) { for (StorageFluid storage : this.fluidStorages) {
if (storage != null) { if (storage != null) {
storage.writeToNBT(); storage.writeToNBT();
} }

View File

@@ -66,8 +66,8 @@ public class TileDiskManipulator extends TileNode implements IComparable, IFilte
private int type = IType.ITEMS; private int type = IType.ITEMS;
private int ioMode = IO_MODE_INSERT; private int ioMode = IO_MODE_INSERT;
private ItemStorage[] itemStorages = new ItemStorage[6]; private StorageItem[] itemStorages = new StorageItem[6];
private FluidStorage[] fluidStorages = new FluidStorage[6]; private StorageFluid[] fluidStorages = new StorageFluid[6];
private Integer[] diskState = new Integer[6]; private Integer[] diskState = new Integer[6];
@@ -79,7 +79,7 @@ public class TileDiskManipulator extends TileNode implements IComparable, IFilte
super.onContentsChanged(slot); super.onContentsChanged(slot);
if (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER) { 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(); updateBlock();
} }
@@ -106,17 +106,17 @@ public class TileDiskManipulator extends TileNode implements IComparable, IFilte
super.onContentsChanged(slot); super.onContentsChanged(slot);
if (FMLCommonHandler.instance().getEffectiveSide() == Side.SERVER) { 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(); updateBlock();
} }
} }
}; };
public class ItemStorage extends StorageItemNBT { public class StorageItem extends StorageItemNBT {
private int lastState; private int lastState;
public ItemStorage(ItemStack disk) { public StorageItem(ItemStack disk) {
super(disk.getTagCompound(), EnumItemStorageType.getById(disk.getItemDamage()).getCapacity(), TileDiskManipulator.this); super(disk.getTagCompound(), EnumItemStorageType.getById(disk.getItemDamage()).getCapacity(), TileDiskManipulator.this);
lastState = TileDiskDrive.getDiskState(getStored(), getCapacity()); 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; private int lastState;
public FluidStorage(ItemStack disk) { public StorageFluid(ItemStack disk) {
super(disk.getTagCompound(), EnumFluidStorageType.getById(disk.getItemDamage()).getCapacity(), TileDiskManipulator.this); super(disk.getTagCompound(), EnumFluidStorageType.getById(disk.getItemDamage()).getCapacity(), TileDiskManipulator.this);
lastState = TileDiskDrive.getDiskState(getStored(), getCapacity()); lastState = TileDiskDrive.getDiskState(getStored(), getCapacity());
@@ -252,7 +252,7 @@ public class TileDiskManipulator extends TileNode implements IComparable, IFilte
return; return;
} }
ItemStorage storage = itemStorages[slot]; StorageItem storage = itemStorages[slot];
if (ioMode == IO_MODE_INSERT) { if (ioMode == IO_MODE_INSERT) {
insertIntoNetwork(storage, slot); insertIntoNetwork(storage, slot);
@@ -268,7 +268,7 @@ public class TileDiskManipulator extends TileNode implements IComparable, IFilte
return; return;
} }
FluidStorage storage = fluidStorages[slot]; StorageFluid storage = fluidStorages[slot];
if (ioMode == IO_MODE_INSERT) { if (ioMode == IO_MODE_INSERT) {
insertIntoNetwork(storage, slot); 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) { if (storage.getStored() == 0) {
moveDriveToOutput(slot); moveDriveToOutput(slot);
return; 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()) { if (storage.getStored() == storage.getCapacity()) {
moveDriveToOutput(slot); moveDriveToOutput(slot);
return; 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) { if (storage.getStored() == 0) {
moveDriveToOutput(slot); moveDriveToOutput(slot);
return; 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()) { if (storage.getStored() == storage.getCapacity()) {
moveDriveToOutput(slot); moveDriveToOutput(slot);
return; return;
@@ -614,13 +614,13 @@ public class TileDiskManipulator extends TileNode implements IComparable, IFilte
} }
public void onBreak() { public void onBreak() {
for (ItemStorage storage : itemStorages) { for (StorageItem storage : itemStorages) {
if (storage != null) { if (storage != null) {
storage.writeToNBT(); storage.writeToNBT();
} }
} }
for (FluidStorage storage : fluidStorages) { for (StorageFluid storage : fluidStorages) {
if (storage != null) { if (storage != null) {
storage.writeToNBT(); storage.writeToNBT();
} }

View File

@@ -35,8 +35,8 @@ public class TileFluidStorage extends TileNode implements IStorageProvider, ISto
} }
}); });
class FluidStorage extends StorageFluidNBT { class StorageFluid extends StorageFluidNBT {
public FluidStorage() { public StorageFluid() {
super(TileFluidStorage.this.getStorageTag(), TileFluidStorage.this.getCapacity(), TileFluidStorage.this); 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 NBTTagCompound storageTag = StorageFluidNBT.createNBT();
private FluidStorage storage; private StorageFluid storage;
private EnumFluidStorageType type; private EnumFluidStorageType type;
@@ -109,7 +109,7 @@ public class TileFluidStorage extends TileNode implements IStorageProvider, ISto
super.update(); super.update();
if (storage == null && storageTag != null) { if (storage == null && storageTag != null) {
storage = new FluidStorage(); storage = new StorageFluid();
if (network != null) { if (network != null) {
network.getFluidStorageCache().invalidate(); network.getFluidStorageCache().invalidate();

View File

@@ -37,8 +37,8 @@ public class TileStorage extends TileNode implements IStorageProvider, IStorageG
}); });
public static final TileDataParameter<Boolean> VOID_EXCESS = IExcessVoidable.createParameter(); public static final TileDataParameter<Boolean> VOID_EXCESS = IExcessVoidable.createParameter();
class ItemStorage extends StorageItemNBT { class StorageItem extends StorageItemNBT {
public ItemStorage() { public StorageItem() {
super(TileStorage.this.getStorageTag(), TileStorage.this.getCapacity(), TileStorage.this); 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 NBTTagCompound storageTag = StorageItemNBT.createNBT();
private ItemStorage storage; private StorageItem storage;
private EnumItemStorageType type; private EnumItemStorageType type;
@@ -111,7 +111,7 @@ public class TileStorage extends TileNode implements IStorageProvider, IStorageG
super.update(); super.update();
if (storage == null && storageTag != null) { if (storage == null && storageTag != null) {
storage = new ItemStorage(); storage = new StorageItem();
if (network != null) { if (network != null) {
network.getItemStorageCache().invalidate(); network.getItemStorageCache().invalidate();

View File

@@ -14,13 +14,13 @@ import net.minecraftforge.fluids.capability.IFluidTankProperties;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
public class FluidStorageExternal implements IStorage<FluidStack> { public class StorageFluidExternal implements IStorage<FluidStack> {
private FluidStack cache; private FluidStack cache;
private TileExternalStorage externalStorage; private TileExternalStorage externalStorage;
private IFluidHandler handler; private IFluidHandler handler;
public FluidStorageExternal(TileExternalStorage externalStorage, IFluidHandler handler, IFluidTankProperties properties) { public StorageFluidExternal(TileExternalStorage externalStorage, IFluidHandler handler, IFluidTankProperties properties) {
this.externalStorage = externalStorage; this.externalStorage = externalStorage;
this.handler = handler; this.handler = handler;
} }

View File

@@ -11,11 +11,11 @@ import powercrystals.minefactoryreloaded.api.IDeepStorageUnit;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
public class ItemStorageDSU extends ItemStorageExternal { public class StorageItemDSU extends StorageItemExternal {
private TileExternalStorage externalStorage; private TileExternalStorage externalStorage;
private IDeepStorageUnit unit; private IDeepStorageUnit unit;
public ItemStorageDSU(TileExternalStorage externalStorage, IDeepStorageUnit unit) { public StorageItemDSU(TileExternalStorage externalStorage, IDeepStorageUnit unit) {
this.externalStorage = externalStorage; this.externalStorage = externalStorage;
this.unit = unit; this.unit = unit;
} }

View File

@@ -12,11 +12,11 @@ import net.minecraftforge.items.ItemHandlerHelper;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
public class ItemStorageDrawer extends ItemStorageExternal { public class StorageItemDrawer extends StorageItemExternal {
private TileExternalStorage externalStorage; private TileExternalStorage externalStorage;
private IDrawer drawer; private IDrawer drawer;
public ItemStorageDrawer(TileExternalStorage externalStorage, IDrawer drawer) { public StorageItemDrawer(TileExternalStorage externalStorage, IDrawer drawer) {
this.externalStorage = externalStorage; this.externalStorage = externalStorage;
this.drawer = drawer; this.drawer = drawer;
} }

View File

@@ -7,11 +7,11 @@ import net.minecraft.util.NonNullList;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
import javax.annotation.Nullable; import javax.annotation.Nullable;
public class ItemStorageDrawerGroup extends ItemStorageExternal { public class StorageItemDrawerGroup extends StorageItemExternal {
private TileExternalStorage externalStorage; private TileExternalStorage externalStorage;
private IDrawerGroup drawers; private IDrawerGroup drawers;
public ItemStorageDrawerGroup(TileExternalStorage externalStorage, IDrawerGroup drawers) { public StorageItemDrawerGroup(TileExternalStorage externalStorage, IDrawerGroup drawers) {
this.externalStorage = externalStorage; this.externalStorage = externalStorage;
this.drawers = drawers; this.drawers = drawers;
} }
@@ -22,7 +22,7 @@ public class ItemStorageDrawerGroup extends ItemStorageExternal {
for (int i = 0; i < drawers.getDrawerCount(); ++i) { for (int i = 0; i < drawers.getDrawerCount(); ++i) {
if (drawers.isDrawerEnabled(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) { for (int i = 0; i < drawers.getDrawerCount(); ++i) {
if (drawers.isDrawerEnabled(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) { if (remainder == null || remainder.getCount() <= 0) {
break; break;
@@ -89,7 +89,7 @@ public class ItemStorageDrawerGroup extends ItemStorageExternal {
for (int i = 0; i < drawers.getDrawerCount(); ++i) { for (int i = 0; i < drawers.getDrawerCount(); ++i) {
if (drawers.isDrawerEnabled(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 (extracted != null) {
if (result == null) { if (result == null) {

View File

@@ -9,7 +9,7 @@ import net.minecraft.item.ItemStack;
import javax.annotation.Nullable; import javax.annotation.Nullable;
import java.util.List; import java.util.List;
public abstract class ItemStorageExternal implements IStorage<ItemStack> { public abstract class StorageItemExternal implements IStorage<ItemStack> {
private List<ItemStack> cache; private List<ItemStack> cache;
public abstract int getCapacity(); public abstract int getCapacity();

View File

@@ -10,12 +10,12 @@ import net.minecraftforge.items.ItemHandlerHelper;
import javax.annotation.Nonnull; import javax.annotation.Nonnull;
public class ItemStorageItemHandler extends ItemStorageExternal { public class StorageItemItemHandler extends StorageItemExternal {
private TileExternalStorage externalStorage; private TileExternalStorage externalStorage;
private IItemHandler handler; private IItemHandler handler;
private AccessType lockedAccessType = AccessType.INSERT_EXTRACT; private AccessType lockedAccessType = AccessType.INSERT_EXTRACT;
public ItemStorageItemHandler(TileExternalStorage externalStorage, IItemHandler handler) { public StorageItemItemHandler(TileExternalStorage externalStorage, IItemHandler handler) {
this.externalStorage = externalStorage; this.externalStorage = externalStorage;
this.handler = handler; this.handler = handler;

View File

@@ -41,11 +41,11 @@ public class TileExternalStorage extends TileNode implements IStorageProvider, I
public Integer getValue(TileExternalStorage tile) { public Integer getValue(TileExternalStorage tile) {
int stored = 0; int stored = 0;
for (ItemStorageExternal storage : tile.itemStorages) { for (StorageItemExternal storage : tile.itemStorages) {
stored += storage.getStored(); stored += storage.getStored();
} }
for (FluidStorageExternal storage : tile.fluidStorages) { for (StorageFluidExternal storage : tile.fluidStorages) {
stored += storage.getStored(); stored += storage.getStored();
} }
@@ -58,11 +58,11 @@ public class TileExternalStorage extends TileNode implements IStorageProvider, I
public Integer getValue(TileExternalStorage tile) { public Integer getValue(TileExternalStorage tile) {
int capacity = 0; int capacity = 0;
for (ItemStorageExternal storage : tile.itemStorages) { for (StorageItemExternal storage : tile.itemStorages) {
capacity += storage.getCapacity(); capacity += storage.getCapacity();
} }
for (FluidStorageExternal storage : tile.fluidStorages) { for (StorageFluidExternal storage : tile.fluidStorages) {
capacity += storage.getCapacity(); capacity += storage.getCapacity();
} }
@@ -84,8 +84,8 @@ public class TileExternalStorage extends TileNode implements IStorageProvider, I
private int type = IType.ITEMS; private int type = IType.ITEMS;
private AccessType accessType = AccessType.INSERT_EXTRACT; private AccessType accessType = AccessType.INSERT_EXTRACT;
private List<ItemStorageExternal> itemStorages = new ArrayList<>(); private List<StorageItemExternal> itemStorages = new ArrayList<>();
private List<FluidStorageExternal> fluidStorages = new ArrayList<>(); private List<StorageFluidExternal> fluidStorages = new ArrayList<>();
public TileExternalStorage() { public TileExternalStorage() {
dataManager.addWatchedParameter(PRIORITY); dataManager.addWatchedParameter(PRIORITY);
@@ -127,13 +127,13 @@ public class TileExternalStorage extends TileNode implements IStorageProvider, I
return; return;
} }
for (ItemStorageExternal storage : itemStorages) { for (StorageItemExternal storage : itemStorages) {
storage.detectChanges(network); storage.detectChanges(network);
} }
boolean fluidChangeDetected = false; boolean fluidChangeDetected = false;
for (FluidStorageExternal storage : fluidStorages) { for (StorageFluidExternal storage : fluidStorages) {
if (storage.updateCache()) { if (storage.updateCache()) {
fluidChangeDetected = true; fluidChangeDetected = true;
} }
@@ -234,16 +234,16 @@ public class TileExternalStorage extends TileNode implements IStorageProvider, I
if (type == IType.ITEMS) { if (type == IType.ITEMS) {
if (facing instanceof IDrawerGroup) { if (facing instanceof IDrawerGroup) {
itemStorages.add(new ItemStorageDrawerGroup(this, (IDrawerGroup) facing)); itemStorages.add(new StorageItemDrawerGroup(this, (IDrawerGroup) facing));
} else if (facing instanceof IDrawer) { } else if (facing instanceof IDrawer) {
itemStorages.add(new ItemStorageDrawer(this, (IDrawer) facing)); itemStorages.add(new StorageItemDrawer(this, (IDrawer) facing));
} else if (facing instanceof IDeepStorageUnit) { } else if (facing instanceof IDeepStorageUnit) {
itemStorages.add(new ItemStorageDSU(this, (IDeepStorageUnit) facing)); itemStorages.add(new StorageItemDSU(this, (IDeepStorageUnit) facing));
} else if (!(facing instanceof TileNode)) { } else if (!(facing instanceof TileNode)) {
IItemHandler itemHandler = RSUtils.getItemHandler(facing, getDirection().getOpposite()); IItemHandler itemHandler = RSUtils.getItemHandler(facing, getDirection().getOpposite());
if (itemHandler != null) { if (itemHandler != null) {
itemStorages.add(new ItemStorageItemHandler(this, itemHandler)); itemStorages.add(new StorageItemItemHandler(this, itemHandler));
} }
} }
} else if (type == IType.FLUIDS) { } else if (type == IType.FLUIDS) {
@@ -251,7 +251,7 @@ public class TileExternalStorage extends TileNode implements IStorageProvider, I
if (fluidHandler != null) { if (fluidHandler != null) {
for (IFluidTankProperties property : fluidHandler.getTankProperties()) { for (IFluidTankProperties property : fluidHandler.getTankProperties()) {
fluidStorages.add(new FluidStorageExternal(this, fluidHandler, property)); fluidStorages.add(new StorageFluidExternal(this, fluidHandler, property));
} }
} }
} }