diff --git a/src/main/java/refinedstorage/api/solderer/ISoldererRecipe.java b/src/main/java/refinedstorage/api/solderer/ISoldererRecipe.java index a16225ed6..1ccc01bcf 100755 --- a/src/main/java/refinedstorage/api/solderer/ISoldererRecipe.java +++ b/src/main/java/refinedstorage/api/solderer/ISoldererRecipe.java @@ -2,19 +2,24 @@ package refinedstorage.api.solderer; import net.minecraft.item.ItemStack; +import javax.annotation.Nonnull; +import javax.annotation.Nullable; + /** * Represents a recipe in the solderer. */ public interface ISoldererRecipe { /** * @param row The solderer row (between 0 - 2) - * @return A stack for the given row, can be null for an empty row + * @return A stack for the given row */ + @Nullable ItemStack getRow(int row); /** * @return The stack that this recipe gives back */ + @Nonnull ItemStack getResult(); /** diff --git a/src/main/java/refinedstorage/api/solderer/SoldererRegistry.java b/src/main/java/refinedstorage/api/solderer/SoldererRegistry.java index f0cdd71ee..bd8a3d1c8 100755 --- a/src/main/java/refinedstorage/api/solderer/SoldererRegistry.java +++ b/src/main/java/refinedstorage/api/solderer/SoldererRegistry.java @@ -4,6 +4,7 @@ import com.google.common.collect.ImmutableList; import net.minecraftforge.items.IItemHandler; import refinedstorage.RefinedStorageUtils; +import javax.annotation.Nonnull; import java.util.ArrayList; import java.util.List; @@ -18,7 +19,7 @@ public class SoldererRegistry { * * @param recipe */ - public static void addRecipe(ISoldererRecipe recipe) { + public static void addRecipe(@Nonnull ISoldererRecipe recipe) { recipes.add(recipe); } @@ -33,7 +34,7 @@ public class SoldererRegistry { * @param items An item handler, where slots 0 - 2 are the row slots * @return The recipe */ - public static ISoldererRecipe getRecipe(IItemHandler items) { + public static ISoldererRecipe getRecipe(@Nonnull IItemHandler items) { for (ISoldererRecipe recipe : recipes) { boolean found = true; diff --git a/src/main/java/refinedstorage/api/storage/IStorage.java b/src/main/java/refinedstorage/api/storage/IStorage.java index 7cd710d99..be7b6ff28 100755 --- a/src/main/java/refinedstorage/api/storage/IStorage.java +++ b/src/main/java/refinedstorage/api/storage/IStorage.java @@ -2,6 +2,7 @@ package refinedstorage.api.storage; import net.minecraft.item.ItemStack; +import javax.annotation.Nonnull; import java.util.List; /** @@ -23,9 +24,9 @@ public interface IStorage { * @param stack The stack prototype to push, do NOT modify * @param size The amount of that prototype that has to be pushed * @param simulate If we are simulating - * @return null if the push was successful, or an ItemStack with the remainder + * @return null if the push was successful, or a {@link ItemStack} with the remainder */ - ItemStack push(ItemStack stack, int size, boolean simulate); + ItemStack push(@Nonnull ItemStack stack, int size, boolean simulate); /** * Takes an item from storage. @@ -35,9 +36,9 @@ public interface IStorage { * @param stack A prototype of the stack to take, do NOT modify * @param size The amount of that prototype that has to be taken * @param flags On what we are comparing to take the item, see {@link CompareFlags} - * @return null if we didn't take anything, or an ItemStack with the take result + * @return null if we didn't take anything, or a {@link ItemStack} with the result */ - ItemStack take(ItemStack stack, int size, int flags); + ItemStack take(@Nonnull ItemStack stack, int size, int flags); /** * @return The amount of items stored in this storage