diff --git a/src/main/java/refinedstorage/api/autocrafting/task/IProcessable.java b/src/main/java/refinedstorage/api/autocrafting/task/IProcessable.java index a17a95d65..b19eace17 100755 --- a/src/main/java/refinedstorage/api/autocrafting/task/IProcessable.java +++ b/src/main/java/refinedstorage/api/autocrafting/task/IProcessable.java @@ -18,20 +18,24 @@ public interface IProcessable { ItemStack getStackToInsert(); /** - * Goes to the next stack to insert. + * Moves to the next stack to insert. */ void nextStack(); /** - * @return whether this processable item has received its items + * @return true if we received all outputs, false otherwise */ boolean hasReceivedOutputs(); + /** + * @param i the output to check + * @return true if we received the given output, false otherwise + */ boolean hasReceivedOutput(int i); /** * @param stack the stack that was inserted in the storage system - * @return whether this item belonged to the processable item + * @return true if this item belonged to the processable item, false otherwise */ boolean onReceiveOutput(ItemStack stack); } diff --git a/src/main/java/refinedstorage/api/network/INetworkMaster.java b/src/main/java/refinedstorage/api/network/INetworkMaster.java index 201d245a8..42f7cc095 100755 --- a/src/main/java/refinedstorage/api/network/INetworkMaster.java +++ b/src/main/java/refinedstorage/api/network/INetworkMaster.java @@ -106,7 +106,7 @@ public interface INetworkMaster { * Returns crafting patterns from an item stack. * * @param pattern the stack to get a pattern for - * @param flags the flags to compare on, see {@link CompareUtils} + * @param flags the flags to compare on, see {@link IComparer} * @return a list of crafting patterns where the given pattern is one of the outputs */ List getPatterns(ItemStack pattern, int flags); @@ -118,7 +118,7 @@ public interface INetworkMaster { * It makes this selection based on the item count of the pattern outputs in the system. * * @param pattern the stack to get a pattern for - * @param flags the flags to compare on, see {@link CompareUtils} + * @param flags the flags to compare on, see {@link IComparer} * @return the pattern, or null if the pattern is not found */ @Nullable @@ -238,7 +238,7 @@ public interface INetworkMaster { * * @param stack the prototype of the stack to extract, do NOT modify * @param size the amount of that prototype that has to be extracted - * @param flags the flags to compare on, see {@link CompareUtils} + * @param flags the flags to compare on, see {@link IComparer} * @return null if we didn't extract anything, or a stack with the result */ @Nullable @@ -271,7 +271,7 @@ public interface INetworkMaster { * * @param stack the prototype of the stack to extract, do NOT modify * @param size the amount of that prototype that has to be extracted - * @param flags the flags to compare on, see {@link CompareUtils} + * @param flags the flags to compare on, see {@link IComparer} * @return null if we didn't extract anything, or a stack with the result */ @Nullable diff --git a/src/main/java/refinedstorage/api/network/grid/IFluidGridHandler.java b/src/main/java/refinedstorage/api/network/grid/IFluidGridHandler.java index 7de7a207f..b5668c84e 100755 --- a/src/main/java/refinedstorage/api/network/grid/IFluidGridHandler.java +++ b/src/main/java/refinedstorage/api/network/grid/IFluidGridHandler.java @@ -2,6 +2,7 @@ package refinedstorage.api.network.grid; import net.minecraft.entity.player.EntityPlayerMP; import net.minecraft.item.ItemStack; +import net.minecraftforge.fluids.FluidStack; import javax.annotation.Nullable; @@ -12,7 +13,7 @@ public interface IFluidGridHandler { /** * Called when a player tries to extract a fluid from the grid. * - * @param hash the hash of the fluid we're trying to extract, see {@link refinedstorage.api.network.NetworkUtils#getFluidStackHashCode(net.minecraftforge.fluids.FluidStack)} + * @param hash the hash of the fluid we're trying to extract, see {@link refinedstorage.api.IRSAPI#getFluidStackHashCode(FluidStack)} * @param shift true if shift click was used, false otherwise * @param player the player that is attempting the extraction */ diff --git a/src/main/java/refinedstorage/api/network/grid/IItemGridHandler.java b/src/main/java/refinedstorage/api/network/grid/IItemGridHandler.java index d44c2e71f..7e62e951d 100755 --- a/src/main/java/refinedstorage/api/network/grid/IItemGridHandler.java +++ b/src/main/java/refinedstorage/api/network/grid/IItemGridHandler.java @@ -16,7 +16,7 @@ public interface IItemGridHandler { /** * Called when a player tries to extract an item from the grid. * - * @param hash the hash of the item we're trying to extract, see {@link refinedstorage.api.network.NetworkUtils#getItemStackHashCode(ItemStack)} + * @param hash the hash of the item we're trying to extract, see {@link refinedstorage.api.IRSAPI#getItemStackHashCode(ItemStack)} * @param flags how we are extracting * @param player the player that is attempting the extraction */ @@ -43,7 +43,7 @@ public interface IItemGridHandler { /** * Called when a player requests the crafting preview window to be opened. * - * @param hash the hash of the item we want a preview for, see {@link refinedstorage.api.network.NetworkUtils#getItemStackHashCode(ItemStack)} + * @param hash the hash of the item we want a preview for, see {@link refinedstorage.api.IRSAPI#getItemStackHashCode(ItemStack)} * @param quantity the amount of that item that we need a preview for */ void onCraftingPreviewRequested(EntityPlayerMP player, int hash, int quantity); @@ -51,7 +51,7 @@ public interface IItemGridHandler { /** * Called when a player requested crafting for an item. * - * @param hash the hash of the item we're requesting crafting for, see {@link refinedstorage.api.network.NetworkUtils#getItemStackHashCode(ItemStack)} + * @param hash the hash of the item we're requesting crafting for, see {@link refinedstorage.api.IRSAPI#getItemStackHashCode(ItemStack)} * @param quantity the amount of that item that has to be crafted */ void onCraftingRequested(int hash, int quantity); diff --git a/src/main/java/refinedstorage/api/storage/fluid/IFluidStorage.java b/src/main/java/refinedstorage/api/storage/fluid/IFluidStorage.java index edeed4e90..a44998642 100755 --- a/src/main/java/refinedstorage/api/storage/fluid/IFluidStorage.java +++ b/src/main/java/refinedstorage/api/storage/fluid/IFluidStorage.java @@ -34,7 +34,7 @@ public interface IFluidStorage { * * @param stack a prototype of the fluid to extract, do NOT modify * @param size the amount of that fluid that has to be extracted - * @param flags the flags to compare on, see {@link CompareUtils} + * @param flags the flags to compare on, see {@link refinedstorage.api.util.IComparer} * @return null if we didn't extract anything, or a stack with the result */ @Nullable diff --git a/src/main/java/refinedstorage/api/storage/fluid/IFluidStorageProvider.java b/src/main/java/refinedstorage/api/storage/fluid/IFluidStorageProvider.java index a0c3bcc6a..646e88480 100755 --- a/src/main/java/refinedstorage/api/storage/fluid/IFluidStorageProvider.java +++ b/src/main/java/refinedstorage/api/storage/fluid/IFluidStorageProvider.java @@ -9,7 +9,7 @@ public interface IFluidStorageProvider { /** * Adds the fluid storages that this storage provider provides. * - * @param storages the previously added fluid storages + * @param storages the list to insert new storages to */ void addFluidStorages(List storages); } diff --git a/src/main/java/refinedstorage/api/storage/item/IItemStorage.java b/src/main/java/refinedstorage/api/storage/item/IItemStorage.java index f6d1ee2b9..51a5a82b8 100755 --- a/src/main/java/refinedstorage/api/storage/item/IItemStorage.java +++ b/src/main/java/refinedstorage/api/storage/item/IItemStorage.java @@ -34,7 +34,7 @@ public interface IItemStorage { * * @param stack a prototype of the stack to extract, do NOT modify * @param size the amount of that prototype that has to be extracted - * @param flags the flags to compare on, see {@link CompareUtils} + * @param flags the flags to compare on, see {@link refinedstorage.api.util.IComparer} * @return null if we didn't extract anything, or a stack with the result */ @Nullable diff --git a/src/main/java/refinedstorage/api/storage/item/IItemStorageProvider.java b/src/main/java/refinedstorage/api/storage/item/IItemStorageProvider.java index 3b6e8342f..bc5a60d1e 100755 --- a/src/main/java/refinedstorage/api/storage/item/IItemStorageProvider.java +++ b/src/main/java/refinedstorage/api/storage/item/IItemStorageProvider.java @@ -9,7 +9,7 @@ public interface IItemStorageProvider { /** * Adds the item storages that this storage provider provides. * - * @param storages the previously added item storages + * @param storages the list to insert new storages to */ void addItemStorages(List storages); } diff --git a/src/main/java/refinedstorage/api/util/IComparer.java b/src/main/java/refinedstorage/api/util/IComparer.java index a589cc39a..3d3fd8420 100755 --- a/src/main/java/refinedstorage/api/util/IComparer.java +++ b/src/main/java/refinedstorage/api/util/IComparer.java @@ -11,6 +11,16 @@ public interface IComparer { int COMPARE_NBT = 2; int COMPARE_QUANTITY = 4; + /** + * Compares two stacks by the given flags. + * + * @param left the left stack + * @param right the right stack + * @param flags the flags to compare with + * @return true if the left and right stack are the same, false otherwise + */ + boolean isEqual(ItemStack left, ItemStack right, int flags); + /** * Compares two stacks by NBT, damage and quantity. * @@ -32,17 +42,7 @@ public interface IComparer { default boolean isEqualNoQuantity(ItemStack left, ItemStack right) { return isEqual(left, right, COMPARE_NBT | COMPARE_DAMAGE); } - - /** - * Compares two stacks by the given flags. - * - * @param left the left stack - * @param right the right stack - * @param flags the flags to compare with - * @return true if the left and right stack are the same, false otherwise - */ - boolean isEqual(ItemStack left, ItemStack right, int flags); - + /** * Compares two stacks by the given flags. * diff --git a/src/main/java/refinedstorage/api/util/IFluidStackList.java b/src/main/java/refinedstorage/api/util/IFluidStackList.java index ea6f4e933..73301ddf7 100755 --- a/src/main/java/refinedstorage/api/util/IFluidStackList.java +++ b/src/main/java/refinedstorage/api/util/IFluidStackList.java @@ -1,6 +1,5 @@ package refinedstorage.api.util; -import net.minecraft.item.ItemStack; import net.minecraftforge.fluids.FluidStack; import javax.annotation.Nonnull; @@ -54,7 +53,7 @@ public interface IFluidStackList { * Returns a stack. * * @param stack the stack to search for - * @param flags the flags to compare on, see {@link refinedstorage.api.storage.CompareUtils} + * @param flags the flags to compare on, see {@link IComparer} * @return the stack, or null if no stack was found */ @Nullable @@ -63,7 +62,7 @@ public interface IFluidStackList { /** * Returns a stack. * - * @param hash the hash of the stack to search for, see {@link refinedstorage.api.network.NetworkUtils#getItemStackHashCode(ItemStack)} + * @param hash the hash of the stack to search for, see {@link refinedstorage.api.IRSAPI#getFluidStackHashCode(FluidStack)} * @return the stack, or null if no stack was found */ @Nullable diff --git a/src/main/java/refinedstorage/api/util/IItemStackList.java b/src/main/java/refinedstorage/api/util/IItemStackList.java index 5f8c7e08b..541ba93b1 100755 --- a/src/main/java/refinedstorage/api/util/IItemStackList.java +++ b/src/main/java/refinedstorage/api/util/IItemStackList.java @@ -53,7 +53,7 @@ public interface IItemStackList { * Returns a stack. * * @param stack the stack to search for - * @param flags the flags to compare on, see {@link refinedstorage.api.storage.CompareUtils} + * @param flags the flags to compare on, see {@link IComparer} * @return the stack, or null if no stack was found */ @Nullable @@ -62,7 +62,7 @@ public interface IItemStackList { /** * Returns a stack. * - * @param hash the hash of the stack to search for, see {@link refinedstorage.api.network.NetworkUtils#getItemStackHashCode(ItemStack)} + * @param hash the hash of the stack to search for, see {@link refinedstorage.api.IRSAPI#getItemStackHashCode(ItemStack)} * @return the stack, or null if no stack was found */ @Nullable diff --git a/src/main/java/refinedstorage/tile/TileDiskDrive.java b/src/main/java/refinedstorage/tile/TileDiskDrive.java index 1930ca02f..fe1646f61 100755 --- a/src/main/java/refinedstorage/tile/TileDiskDrive.java +++ b/src/main/java/refinedstorage/tile/TileDiskDrive.java @@ -84,7 +84,7 @@ public class TileDiskDrive extends TileNode implements IItemStorageProvider, IFl FluidStack result = super.insertFluid(stack, size, simulate); if (voidExcess && result != null) { - // Simulate should not matter as the items are voided anyway + // Simulate should not matter as the fluids are voided anyway result.amount = -result.amount; }