use of muramasa.antimatter.pipe.PipeSize 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)));
}
use of muramasa.antimatter.pipe.PipeSize in project GT-4-Reimagined by Trinsdar.
the class AssemblyLoader method init.
public static void init() {
AntimatterAPI.all(Wire.class, t -> {
Cable<?> cable = AntimatterAPI.get(Cable.class, "cable" + "_" + t.getMaterial().getId());
if (cable == null)
return;
ImmutableSet<PipeSize> sizes = t.getSizes();
sizes.forEach(size -> {
Item wireItem = t.getBlockItem(size);
Item cableItem = cable.getBlockItem(size);
ASSEMBLING.RB().ii(of(wireItem, 1), of(INGOT.get(Rubber, size.getCableThickness()))).io(new ItemStack(cableItem, 1)).add(size.getCableThickness() * 20L, 8);
});
});
ASSEMBLING.RB().ii(of(getTag("forge", "rods/wooden"), 1), of(getTag("minecraft", "coals"), 1)).io(new ItemStack(Items.TORCH, 4)).add(400, 1);
ASSEMBLING.RB().ii(of(getTag("forge", "string"), 1), of(getTag("forge", "slimeballs"), 1)).io(new ItemStack(Items.LEAD, 2)).add(200, 2);
ASSEMBLING.RB().ii(of(CircuitBoardAdv, 1), of(AdvCircuitParts, 2)).io(new ItemStack(CircuitAdv, 1)).add(1600, 2);
ASSEMBLING.RB().ii(of(CircuitBoardProcessor, 1), of(CircuitDataStorage, 1)).io(new ItemStack(CircuitDataControl, 2)).add(3200, 4);
}
Aggregations