use of muramasa.antimatter.datagen.providers.AntimatterRecipeProvider in project GT-4-Reimagined by Trinsdar.
the class WireCablesPlates method loadRecipes.
@SuppressWarnings("unchecked")
public static void loadRecipes(Consumer<IFinishedRecipe> output, AntimatterRecipeProvider provider) {
AntimatterAPI.all(Wire.class, wire -> {
ImmutableSet<PipeSize> sizes = wire.getSizes();
Map<PipeSize, Item> wires = sizes.stream().map(s -> new Pair<>(s, wire.getBlockItem(s))).collect(Collectors.toMap(Pair::getFirst, Pair::getSecond));
PipeSize[] val = values();
for (int i = 1; i < val.length; i += 2) {
twoToOne(wires, val[i - 1], val[i], output, provider);
oneToTwo(wires, val[i], val[i - 1], output, provider);
if (i > 1) {
fourToOne(wires, val[i - 2], val[i], output, provider);
}
}
if (wire.getMaterial().has(PLATE)) {
provider.shapeless(output, "platewire", "wire", "has_cutter", criterion(WIRE_CUTTER.getTag(), provider), new ItemStack(wires.get(VTINY)), WIRE_CUTTER.getTag(), PLATE.get(wire.getMaterial(), 1));
}
});
INGOT.all().stream().filter(p -> p.has(PLATE)).forEach(p -> provider.shapeless(output, "ingothammer", "plate", "has_hammer", criterion(HAMMER.getTag(), provider), new ItemStack(PLATE.get(p), 1), HAMMER.getTag(), INGOT.get(p)));
}
Aggregations