diff --git a/src/main/java/refinedstorage/api/network/INetworkMaster.java b/src/main/java/refinedstorage/api/network/INetworkMaster.java index 42f7cc095..8297b4699 100755 --- a/src/main/java/refinedstorage/api/network/INetworkMaster.java +++ b/src/main/java/refinedstorage/api/network/INetworkMaster.java @@ -10,8 +10,8 @@ import refinedstorage.api.autocrafting.ICraftingPattern; import refinedstorage.api.autocrafting.task.ICraftingTask; import refinedstorage.api.network.grid.IFluidGridHandler; import refinedstorage.api.network.grid.IItemGridHandler; -import refinedstorage.api.storage.fluid.IGroupedFluidStorage; -import refinedstorage.api.storage.item.IGroupedItemStorage; +import refinedstorage.api.storage.fluid.IFluidStorageCache; +import refinedstorage.api.storage.item.IItemStorageCache; import refinedstorage.api.util.IComparer; import refinedstorage.apiimpl.API; @@ -64,14 +64,14 @@ public interface INetworkMaster { IWirelessGridHandler getWirelessGridHandler(); /** - * @return the {@link IGroupedItemStorage} of this network + * @return the {@link IItemStorageCache} of this network */ - IGroupedItemStorage getItemStorage(); + IItemStorageCache getItemStorageCache(); /** - * @return the {@link IGroupedFluidStorage} of this network + * @return the {@link IFluidStorageCache} of this network */ - IGroupedFluidStorage getFluidStorage(); + IFluidStorageCache getFluidStorageCache(); /** * @return the crafting tasks in this network, do NOT modify this list diff --git a/src/main/java/refinedstorage/api/storage/fluid/IGroupedFluidStorage.java b/src/main/java/refinedstorage/api/storage/fluid/IFluidStorageCache.java similarity index 79% rename from src/main/java/refinedstorage/api/storage/fluid/IGroupedFluidStorage.java rename to src/main/java/refinedstorage/api/storage/fluid/IFluidStorageCache.java index d5c4aac16..df0c8fa6d 100755 --- a/src/main/java/refinedstorage/api/storage/fluid/IGroupedFluidStorage.java +++ b/src/main/java/refinedstorage/api/storage/fluid/IFluidStorageCache.java @@ -14,30 +14,30 @@ import java.util.List; * individual {@link IFluidStorage} constantly (performance impact) and to send and detect storage changes * more efficiently. */ -public interface IGroupedFluidStorage { +public interface IFluidStorageCache { /** - * Rebuilds the global fluid list. + * Rebuilds the cache. * Typically called when a {@link IFluidStorageProvider} is added or removed from the network. */ void rebuild(); /** - * Adds an item to the global fluid list. + * Adds an item to the cache. *
- * Note that this doesn't modify any of the connected storages, but just modifies the global fluid list. + * Note that this doesn't modify any of the connected storages, but just modifies the cache. * Use {@link INetworkMaster#insertFluid(FluidStack, int, boolean)} to add a fluid to an actual storage. *
* Will merge it with another fluid if it already exists. * * @param stack the stack to add, do NOT modify - * @param rebuilding whether this method is called while the storage is rebuilding + * @param rebuilding true if this method is called while rebuilding, false otherwise */ void add(@Nonnull FluidStack stack, boolean rebuilding); /** - * Removes a fluid from the global fluid list. + * Removes a fluid from the cache. *
- * Note that this doesn't modify any of the connected storages, but just modifies the global fluid list. + * Note that this doesn't modify any of the connected storages, but just modifies the cache. * Use {@link INetworkMaster#extractFluid(FluidStack, int, int)} to remove an fluid from an actual storage. * * @param stack the fluid to remove, do NOT modify @@ -45,7 +45,7 @@ public interface IGroupedFluidStorage { void remove(@Nonnull FluidStack stack); /** - * @return the list behind this grouped storage + * @return the list behind this cache */ IFluidStackList getList(); diff --git a/src/main/java/refinedstorage/api/storage/item/IGroupedItemStorage.java b/src/main/java/refinedstorage/api/storage/item/IItemStorageCache.java similarity index 79% rename from src/main/java/refinedstorage/api/storage/item/IGroupedItemStorage.java rename to src/main/java/refinedstorage/api/storage/item/IItemStorageCache.java index 0ae4bf23a..87e60b9d7 100755 --- a/src/main/java/refinedstorage/api/storage/item/IGroupedItemStorage.java +++ b/src/main/java/refinedstorage/api/storage/item/IItemStorageCache.java @@ -14,30 +14,30 @@ import java.util.List; * individual {@link IItemStorage} constantly (performance impact) and to send and detect storage changes * more efficiently. */ -public interface IGroupedItemStorage { +public interface IItemStorageCache { /** - * Rebuilds the global item list. + * Rebuilds the cache. * Typically called when a {@link IItemStorageProvider} is added or removed from the network. */ void rebuild(); /** - * Adds an item to the global item list. + * Adds an item to the cache. *
- * Note that this doesn't modify any of the connected storages, but just modifies the global item list. + * Note that this doesn't modify any of the connected storages, but just modifies the cache. * Use {@link INetworkMaster#insertItem(ItemStack, int, boolean)} to add an item to an actual storage. *
* Will merge it with another item if it already exists. * * @param stack the stack to add, do NOT modify - * @param rebuilding whether this method is called while the storage is rebuilding + * @param rebuilding true if this method is called while rebuilding, false otherwise */ void add(@Nonnull ItemStack stack, boolean rebuilding); /** - * Removes a item from global item list. + * Removes an item from the cache. *
- * Note that this doesn't modify any of the connected storages, but just modifies the global item list.
+ * Note that this doesn't modify any of the connected storages, but just modifies the cache.
* Use {@link INetworkMaster#extractItem(ItemStack, int, int)} to remove an item from an actual storage.
*
* @param stack the item to remove, do NOT modify
@@ -45,7 +45,7 @@ public interface IGroupedItemStorage {
void remove(@Nonnull ItemStack stack);
/**
- * @return the list behind this grouped storage
+ * @return the list behind this cope
*/
IItemStackList getList();
diff --git a/src/main/java/refinedstorage/apiimpl/autocrafting/task/CraftingTask.java b/src/main/java/refinedstorage/apiimpl/autocrafting/task/CraftingTask.java
index 37555e6e5..642dbf0ef 100755
--- a/src/main/java/refinedstorage/apiimpl/autocrafting/task/CraftingTask.java
+++ b/src/main/java/refinedstorage/apiimpl/autocrafting/task/CraftingTask.java
@@ -50,7 +50,7 @@ public class CraftingTask implements ICraftingTask {
}
public void calculate() {
- IItemStackList list = network.getItemStorage().getList().copy();
+ IItemStackList list = network.getItemStorageCache().getList().copy();
int newQuantity = quantity;
@@ -99,12 +99,12 @@ public class CraftingTask implements ICraftingTask {
FluidStack fluidInItem = RSUtils.getFluidFromStack(input, true);
if (fluidInItem != null && RSUtils.hasFluidBucket(fluidInItem)) {
- FluidStack fluidInStorage = network.getFluidStorage().getList().get(fluidInItem);
+ FluidStack fluidInStorage = network.getFluidStorageCache().getList().get(fluidInItem);
if (fluidInStorage == null || fluidInStorage.amount < fluidInItem.amount) {
missing.add(input);
} else {
- boolean hasBucket = network.getItemStorage().getList().get(RSUtils.EMPTY_BUCKET) != null;
+ boolean hasBucket = network.getItemStorageCache().getList().get(RSUtils.EMPTY_BUCKET) != null;
ICraftingPattern bucketPattern = network.getPattern(RSUtils.EMPTY_BUCKET);
if (!hasBucket) {
diff --git a/src/main/java/refinedstorage/apiimpl/network/NetworkNodeGraph.java b/src/main/java/refinedstorage/apiimpl/network/NetworkNodeGraph.java
index c42ffa4cc..01a47a53c 100755
--- a/src/main/java/refinedstorage/apiimpl/network/NetworkNodeGraph.java
+++ b/src/main/java/refinedstorage/apiimpl/network/NetworkNodeGraph.java
@@ -155,11 +155,11 @@ public class NetworkNodeGraph implements INetworkNodeGraph {
}
if (node instanceof IItemStorageProvider) {
- controller.getItemStorage().rebuild();
+ controller.getItemStorageCache().rebuild();
}
if (node instanceof IFluidStorageProvider) {
- controller.getFluidStorage().rebuild();
+ controller.getFluidStorageCache().rebuild();
}
controller.getDataManager().sendParameterToWatchers(TileController.NODES);
diff --git a/src/main/java/refinedstorage/apiimpl/network/grid/FluidGridHandler.java b/src/main/java/refinedstorage/apiimpl/network/grid/FluidGridHandler.java
index c84d6ccbb..fa60cae70 100755
--- a/src/main/java/refinedstorage/apiimpl/network/grid/FluidGridHandler.java
+++ b/src/main/java/refinedstorage/apiimpl/network/grid/FluidGridHandler.java
@@ -22,7 +22,7 @@ public class FluidGridHandler implements IFluidGridHandler {
@Override
public void onExtract(int hash, boolean shift, EntityPlayerMP player) {
- FluidStack stack = network.getFluidStorage().getList().get(hash);
+ FluidStack stack = network.getFluidStorageCache().getList().get(hash);
if (stack != null && RSUtils.hasFluidBucket(stack)) {
ItemStack bucket = network.extractItem(RSUtils.EMPTY_BUCKET, 1);
diff --git a/src/main/java/refinedstorage/apiimpl/network/grid/ItemGridHandler.java b/src/main/java/refinedstorage/apiimpl/network/grid/ItemGridHandler.java
index a36226826..b60693f48 100755
--- a/src/main/java/refinedstorage/apiimpl/network/grid/ItemGridHandler.java
+++ b/src/main/java/refinedstorage/apiimpl/network/grid/ItemGridHandler.java
@@ -21,7 +21,7 @@ public class ItemGridHandler implements IItemGridHandler {
@Override
public void onExtract(int hash, int flags, EntityPlayerMP player) {
- ItemStack item = network.getItemStorage().getList().get(hash);
+ ItemStack item = network.getItemStorageCache().getList().get(hash);
if (item == null) {
return;
@@ -119,7 +119,7 @@ public class ItemGridHandler implements IItemGridHandler {
@Override
public void onCraftingPreviewRequested(EntityPlayerMP player, int hash, int quantity) {
- ItemStack stack = network.getItemStorage().getList().get(hash);
+ ItemStack stack = network.getItemStorageCache().getList().get(hash);
if (stack != null) {
CraftingTask task = new CraftingTask(network, stack, network.getPattern(stack), quantity);
diff --git a/src/main/java/refinedstorage/apiimpl/storage/fluid/GroupedFluidStorage.java b/src/main/java/refinedstorage/apiimpl/storage/fluid/FluidStorageCache.java
similarity index 91%
rename from src/main/java/refinedstorage/apiimpl/storage/fluid/GroupedFluidStorage.java
rename to src/main/java/refinedstorage/apiimpl/storage/fluid/FluidStorageCache.java
index fba9e4a55..b90638aa8 100755
--- a/src/main/java/refinedstorage/apiimpl/storage/fluid/GroupedFluidStorage.java
+++ b/src/main/java/refinedstorage/apiimpl/storage/fluid/FluidStorageCache.java
@@ -3,8 +3,8 @@ package refinedstorage.apiimpl.storage.fluid;
import net.minecraftforge.fluids.FluidStack;
import refinedstorage.api.network.INetworkMaster;
import refinedstorage.api.storage.fluid.IFluidStorage;
+import refinedstorage.api.storage.fluid.IFluidStorageCache;
import refinedstorage.api.storage.fluid.IFluidStorageProvider;
-import refinedstorage.api.storage.fluid.IGroupedFluidStorage;
import refinedstorage.api.util.IFluidStackList;
import refinedstorage.apiimpl.API;
import refinedstorage.tile.config.IAccessType;
@@ -13,12 +13,12 @@ import javax.annotation.Nonnull;
import java.util.ArrayList;
import java.util.List;
-public class GroupedFluidStorage implements IGroupedFluidStorage {
+public class FluidStorageCache implements IFluidStorageCache {
private INetworkMaster network;
private List