aboutsummaryrefslogtreecommitdiff
path: root/src/main/java/me/shedaniel/rei/client/RecipeHelperImpl.java
diff options
context:
space:
mode:
authorUnknown <shekwancheung0528@gmail.com>2019-06-06 18:36:51 +0800
committerUnknown <shekwancheung0528@gmail.com>2019-06-06 18:36:51 +0800
commit98c2c0f1af8b264cfce5c005f4694318cce001b2 (patch)
tree5a7aaa389ddbf86ae2e4fed06fa40e8d427c8bae /src/main/java/me/shedaniel/rei/client/RecipeHelperImpl.java
parent36609262e4014e976523130bf26879eac2e90e19 (diff)
downloadRoughlyEnoughItems-98c2c0f1af8b264cfce5c005f4694318cce001b2.tar.gz
RoughlyEnoughItems-98c2c0f1af8b264cfce5c005f4694318cce001b2.tar.bz2
RoughlyEnoughItems-98c2c0f1af8b264cfce5c005f4694318cce001b2.zip
alterative solution to the working stations
Diffstat (limited to 'src/main/java/me/shedaniel/rei/client/RecipeHelperImpl.java')
-rw-r--r--src/main/java/me/shedaniel/rei/client/RecipeHelperImpl.java11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/main/java/me/shedaniel/rei/client/RecipeHelperImpl.java b/src/main/java/me/shedaniel/rei/client/RecipeHelperImpl.java
index 45f15d18b..00155ba65 100644
--- a/src/main/java/me/shedaniel/rei/client/RecipeHelperImpl.java
+++ b/src/main/java/me/shedaniel/rei/client/RecipeHelperImpl.java
@@ -43,7 +43,7 @@ public class RecipeHelperImpl implements RecipeHelper {
private final List<RecipeCategory> categories = Lists.newArrayList();
private final Map<Identifier, ButtonAreaSupplier> speedCraftAreaSupplierMap = Maps.newHashMap();
private final Map<Identifier, List<SpeedCraftFunctional>> speedCraftFunctionalMap = Maps.newHashMap();
- private final Map<Identifier, List<ItemStack>> categoryWorkingStations = Maps.newHashMap();
+ private final Map<Identifier, List<List<ItemStack>>> categoryWorkingStations = Maps.newHashMap();
private final List<DisplayVisibilityHandler> displayVisibilityHandlers = Lists.newArrayList();
private final List<LiveRecipeGenerator> liveRecipeGenerators = Lists.newArrayList();
private RecipeManager recipeManager;
@@ -87,12 +87,17 @@ public class RecipeHelperImpl implements RecipeHelper {
}
@Override
- public void registerWorkingStations(Identifier category, ItemStack... workingStations) {
+ public void registerWorkingStations(Identifier category, List<ItemStack>... workingStations) {
categoryWorkingStations.get(category).addAll(Arrays.asList(workingStations));
}
@Override
- public List<ItemStack> getWorkingStations(Identifier category) {
+ public void registerWorkingStations(Identifier category, ItemStack... workingStations) {
+ categoryWorkingStations.get(category).addAll(Arrays.asList(workingStations).stream().map(Collections::singletonList).collect(Collectors.toList()));
+ }
+
+ @Override
+ public List<List<ItemStack>> getWorkingStations(Identifier category) {
return categoryWorkingStations.get(category);
}