diff options
| author | shedaniel <daniel@shedaniel.me> | 2020-08-27 19:47:47 +0800 |
|---|---|---|
| committer | shedaniel <daniel@shedaniel.me> | 2020-08-27 19:47:47 +0800 |
| commit | 5bf10e476366e9aff291d55c050a324734bae911 (patch) | |
| tree | b056d52c273c55d6e4e6d86da3abd971e6cdbf1e /RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/RecipeDisplay.java | |
| parent | 6104964f60bac00a4ac1359bd244d361e50786bd (diff) | |
| download | RoughlyEnoughItems-5bf10e476366e9aff291d55c050a324734bae911.tar.gz RoughlyEnoughItems-5bf10e476366e9aff291d55c050a324734bae911.tar.bz2 RoughlyEnoughItems-5bf10e476366e9aff291d55c050a324734bae911.zip | |
Some Nullable and NotNull annotations
Signed-off-by: shedaniel <daniel@shedaniel.me>
Diffstat (limited to 'RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/RecipeDisplay.java')
| -rw-r--r-- | RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/RecipeDisplay.java | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/RecipeDisplay.java b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/RecipeDisplay.java index a22dea125..44e655da4 100644 --- a/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/RecipeDisplay.java +++ b/RoughlyEnoughItems-api/src/main/java/me/shedaniel/rei/api/RecipeDisplay.java @@ -26,6 +26,7 @@ package me.shedaniel.rei.api; import me.shedaniel.rei.utils.CollectionUtils; import net.minecraft.resources.ResourceLocation; import org.jetbrains.annotations.ApiStatus; +import org.jetbrains.annotations.NotNull; import java.util.Collections; import java.util.List; @@ -36,6 +37,7 @@ public interface RecipeDisplay { /** * @return a list of inputs */ + @NotNull List<List<EntryStack>> getInputEntries(); /** @@ -43,6 +45,7 @@ public interface RecipeDisplay { */ @Deprecated @ApiStatus.ScheduledForRemoval + @NotNull default List<EntryStack> getOutputEntries() { return Collections.emptyList(); } @@ -50,6 +53,7 @@ public interface RecipeDisplay { /** * @return a list of outputs */ + @NotNull default List<List<EntryStack>> getResultingEntries() { return CollectionUtils.map(getOutputEntries(), Collections::singletonList); } @@ -59,6 +63,7 @@ public interface RecipeDisplay { * * @return the list of required items */ + @NotNull default List<List<EntryStack>> getRequiredEntries() { return Collections.emptyList(); } @@ -68,6 +73,7 @@ public interface RecipeDisplay { * * @return the identifier of the category */ + @NotNull ResourceLocation getRecipeCategory(); /** @@ -75,6 +81,7 @@ public interface RecipeDisplay { * * @return the recipe location */ + @NotNull default Optional<ResourceLocation> getRecipeLocation() { return Optional.empty(); } |
