24w46a
This commit is contained in:
1 parent
24ab04019b
commit
e7d30ccf7c
3 files changed
+8
-11
No files matched your search
@@ -37,6 +37,7 @@ import java.util.EnumMap;
|
||||
import java.util.List;
|
||||
import java.util.Locale;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static java.util.Map.entry;
|
||||
@@ -420,13 +421,10 @@ public class HopperCounter
|
||||
{
|
||||
for (Ingredient ingredient : r.placementInfo().ingredients())
|
||||
{
|
||||
for (Holder<Item> stack : ingredient.items())
|
||||
Optional<Holder<Item>> match = ingredient.items().filter(stack -> fromItem(stack.value(), registryAccess) != null).findFirst();
|
||||
if (match.isPresent())
|
||||
{
|
||||
TextColor cand = fromItem(stack.value(), registryAccess);
|
||||
if (cand != null)
|
||||
{
|
||||
return cand;
|
||||
}
|
||||
return fromItem(match.get().value(), registryAccess);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -132,15 +132,14 @@ public class Inventories
|
||||
|
||||
|
||||
List<Value> ingredientValue = new ArrayList<>();
|
||||
for (Optional<PlacementInfo.SlotInfo> info : recipe.placementInfo().slotInfo())
|
||||
for (int info : recipe.placementInfo().slotsToIngredientIndex())
|
||||
{
|
||||
if (info.isEmpty())
|
||||
if (info == PlacementInfo.EMPTY_SLOT)
|
||||
{
|
||||
ingredientValue.add(Value.NULL);
|
||||
continue;
|
||||
}
|
||||
PlacementInfo.SlotInfo value = info.get();
|
||||
int ingredientIndex = value.placerOutputPosition();
|
||||
int ingredientIndex = info;
|
||||
|
||||
List<Value> alternatives = new ArrayList<>();
|
||||
recipe.placementInfo().ingredients().get(ingredientIndex).items().forEach(item -> alternatives.add(ValueConversions.of(item.value(), regs)));
|
||||
|
||||
Reference in new issue
Block a user