use of gregtech.api.unification.stack.UnificationEntry in project GregTech by GregTechCE.
the class PartsRecipeHandler method processBolt.
public static void processBolt(OrePrefix boltPrefix, IngotMaterial material) {
ItemStack boltStack = OreDictUnifier.get(boltPrefix, material);
ItemStack ingotStack = OreDictUnifier.get(OrePrefix.ingot, material);
ModHandler.addShapedRecipe(String.format("bolt_file_%s", material.toString()), boltStack, "fS", "S ", 'S', new UnificationEntry(OrePrefix.screw, material));
RecipeMaps.CUTTER_RECIPES.recipeBuilder().input(OrePrefix.screw, material).outputs(boltStack).duration(20).EUt(24).buildAndRegister();
if (!boltStack.isEmpty() && !ingotStack.isEmpty()) {
RecipeMaps.EXTRUDER_RECIPES.recipeBuilder().notConsumable(MetaItems.SHAPE_EXTRUDER_BOLT).input(OrePrefix.ingot, material).outputs(GTUtility.copyAmount(8, boltStack)).duration(15).EUt(120).buildAndRegister();
}
}
use of gregtech.api.unification.stack.UnificationEntry in project GregTech by GregTechCE.
the class PartsRecipeHandler method processScrew.
public static void processScrew(OrePrefix screwPrefix, IngotMaterial material) {
ItemStack screwStack = OreDictUnifier.get(screwPrefix, material);
RecipeMaps.LATHE_RECIPES.recipeBuilder().input(OrePrefix.bolt, material).outputs(screwStack).duration((int) Math.max(1, material.getAverageMass() / 8L)).EUt(4).buildAndRegister();
ModHandler.addShapedRecipe(String.format("screw_%s", material.toString()), screwStack, "fX", "X ", 'X', new UnificationEntry(OrePrefix.bolt, material));
}
use of gregtech.api.unification.stack.UnificationEntry in project GregTech by GregTechCE.
the class PartsRecipeHandler method processGear.
public static void processGear(OrePrefix gearPrefix, SolidMaterial material) {
ItemStack stack = OreDictUnifier.get(gearPrefix, material);
if (gearPrefix == OrePrefix.gear && material instanceof IngotMaterial) {
int voltageMultiplier = getVoltageMultiplier(material);
RecipeMaps.EXTRUDER_RECIPES.recipeBuilder().input(OrePrefix.ingot, material, 4).notConsumable(MetaItems.SHAPE_EXTRUDER_GEAR).outputs(OreDictUnifier.get(gearPrefix, material)).duration((int) material.getAverageMass() * 5).EUt(8 * voltageMultiplier).buildAndRegister();
RecipeMaps.ALLOY_SMELTER_RECIPES.recipeBuilder().input(OrePrefix.ingot, material, 8).notConsumable(MetaItems.SHAPE_MOLD_GEAR).outputs(OreDictUnifier.get(gearPrefix, material)).duration((int) material.getAverageMass() * 10).EUt(2 * voltageMultiplier).buildAndRegister();
}
if (material.shouldGenerateFluid()) {
boolean isSmall = gearPrefix == OrePrefix.gearSmall;
RecipeMaps.FLUID_SOLIDFICATION_RECIPES.recipeBuilder().notConsumable(isSmall ? MetaItems.SHAPE_MOLD_GEAR_SMALL : MetaItems.SHAPE_MOLD_GEAR).fluidInputs(material.getFluid(L * (isSmall ? 1 : 4))).outputs(stack).duration(isSmall ? 20 : 100).EUt(8).buildAndRegister();
}
if (material.hasFlag(GENERATE_PLATE | GENERATE_ROD)) {
if (gearPrefix == OrePrefix.gearSmall) {
ModHandler.addShapedRecipe(String.format("small_gear_%s", material), stack, "h ", " P", 'P', new UnificationEntry(OrePrefix.plate, material));
RecipeMaps.FORGE_HAMMER_RECIPES.recipeBuilder().input(OrePrefix.plate, material).outputs(stack).duration(60).EUt(6).buildAndRegister();
} else {
ModHandler.addShapedRecipe(String.format("gear_%s", material), stack, "RPR", "PdP", "RPR", 'P', new UnificationEntry(OrePrefix.plate, material), 'R', new UnificationEntry(OrePrefix.stick, material));
}
}
}
use of gregtech.api.unification.stack.UnificationEntry in project GregTech by GregTechCE.
the class OreDictionaryLoader method init.
public static void init() {
GTLog.logger.info("Registering OreDict entries.");
OreDictionary.registerOre("fuelCoke", OreDictUnifier.get(OrePrefix.gem, Materials.Coke));
OreDictionary.registerOre("blockFuelCoke", OreDictUnifier.get(OrePrefix.block, Materials.Coke));
OreDictUnifier.registerOre(new ItemStack(Blocks.CLAY), OrePrefix.block, Materials.Clay);
OreDictUnifier.registerOre(new ItemStack(Blocks.BRICK_BLOCK), OrePrefix.block, Materials.Brick);
OreDictUnifier.registerOre(new ItemStack(Items.CLAY_BALL), OrePrefix.ingot, Materials.Clay);
OreDictUnifier.registerOre(new ItemStack(Items.FLINT), OrePrefix.gem, Materials.Flint);
OreDictUnifier.registerOre(new ItemStack(Blocks.HARDENED_CLAY, 1, W), new ItemMaterialInfo(new MaterialStack(Materials.Clay, M * 4)));
OreDictUnifier.registerOre(new ItemStack(Blocks.STAINED_HARDENED_CLAY, 1, W), new ItemMaterialInfo(new MaterialStack(Materials.Clay, M * 4)));
for (ItemStack woodPlateStack : OreDictUnifier.getAll(new UnificationEntry(OrePrefix.plate, Materials.Wood))) {
OreDictUnifier.registerOre(woodPlateStack, OrePrefix.plank, Materials.Wood);
}
for (Material material : new Material[] { Materials.Lapis, Materials.Lazurite, Materials.Sodalite }) {
OreDictUnifier.registerOre(OreDictUnifier.get(OrePrefix.gem, material), OrePrefix.dye, Color.Blue);
OreDictUnifier.registerOre(OreDictUnifier.get(OrePrefix.dust, material), OrePrefix.dye, Color.Blue);
}
OreDictUnifier.registerOre(new ItemStack(Blocks.COAL_ORE), OrePrefix.ore, Materials.Coal);
OreDictUnifier.registerOre(new ItemStack(Blocks.IRON_ORE), OrePrefix.ore, Materials.Iron);
OreDictUnifier.registerOre(new ItemStack(Blocks.LAPIS_ORE), OrePrefix.ore, Materials.Lapis);
OreDictUnifier.registerOre(new ItemStack(Blocks.REDSTONE_ORE), OrePrefix.ore, Materials.Redstone);
OreDictUnifier.registerOre(new ItemStack(Blocks.GOLD_ORE), OrePrefix.ore, Materials.Gold);
OreDictUnifier.registerOre(new ItemStack(Blocks.DIAMOND_ORE), OrePrefix.ore, Materials.Diamond);
OreDictUnifier.registerOre(new ItemStack(Blocks.EMERALD_ORE), OrePrefix.ore, Materials.Emerald);
OreDictUnifier.registerOre(new ItemStack(Blocks.QUARTZ_ORE), OrePrefix.ore, Materials.NetherQuartz);
OreDictUnifier.registerOre(new ItemStack(Items.DYE, 1, 4), OrePrefix.gem, Materials.Lapis);
OreDictUnifier.registerOre(new ItemStack(Items.ENDER_EYE), OrePrefix.gem, Materials.EnderEye);
OreDictUnifier.registerOre(new ItemStack(Items.ENDER_PEARL), OrePrefix.gem, Materials.EnderPearl);
OreDictUnifier.registerOre(new ItemStack(Items.DIAMOND), OrePrefix.gem, Materials.Diamond);
OreDictUnifier.registerOre(new ItemStack(Items.EMERALD), OrePrefix.gem, Materials.Emerald);
OreDictUnifier.registerOre(new ItemStack(Items.COAL), OrePrefix.gem, Materials.Coal);
OreDictUnifier.registerOre(new ItemStack(Items.COAL, 1, 1), OrePrefix.gem, Materials.Charcoal);
OreDictUnifier.registerOre(new ItemStack(Items.QUARTZ), OrePrefix.gem, Materials.NetherQuartz);
OreDictUnifier.registerOre(new ItemStack(Items.NETHER_STAR), OrePrefix.gem, Materials.NetherStar);
OreDictUnifier.registerOre(new ItemStack(Items.GOLD_NUGGET), OrePrefix.nugget, Materials.Gold);
OreDictUnifier.registerOre(new ItemStack(Items.GOLD_INGOT), OrePrefix.ingot, Materials.Gold);
OreDictUnifier.registerOre(new ItemStack(Items.IRON_INGOT), OrePrefix.ingot, Materials.Iron);
OreDictUnifier.registerOre(new ItemStack(Items.PAPER), OrePrefix.plate, Materials.Paper);
OreDictUnifier.registerOre(new ItemStack(Items.SUGAR), OrePrefix.dust, Materials.Sugar);
OreDictUnifier.registerOre(new ItemStack(Items.SUGAR), OrePrefix.DUST_REGULAR, Materials.Sugar);
OreDictUnifier.registerOre(new ItemStack(Items.STICK), OrePrefix.stick, Materials.Wood);
OreDictUnifier.registerOre(new ItemStack(Items.REDSTONE), OrePrefix.dust, Materials.Redstone);
OreDictUnifier.registerOre(new ItemStack(Items.REDSTONE), OrePrefix.DUST_REGULAR, Materials.Redstone);
OreDictUnifier.registerOre(new ItemStack(Items.GUNPOWDER), OrePrefix.dust, Materials.Gunpowder);
OreDictUnifier.registerOre(new ItemStack(Items.GUNPOWDER), OrePrefix.DUST_REGULAR, Materials.Gunpowder);
OreDictUnifier.registerOre(new ItemStack(Items.GLOWSTONE_DUST), OrePrefix.dust, Materials.Glowstone);
OreDictUnifier.registerOre(new ItemStack(Items.GLOWSTONE_DUST), OrePrefix.DUST_REGULAR, Materials.Glowstone);
OreDictUnifier.registerOre(new ItemStack(Items.DYE, 1, 15), OrePrefix.dust, Materials.Bone);
OreDictUnifier.registerOre(new ItemStack(Items.DYE, 1, 15), OrePrefix.DUST_REGULAR, Materials.Bone);
OreDictUnifier.registerOre(new ItemStack(Items.BONE), OrePrefix.stick, Materials.Bone);
OreDictUnifier.registerOre(new ItemStack(Items.BLAZE_POWDER), OrePrefix.dust, Materials.Blaze);
OreDictUnifier.registerOre(new ItemStack(Items.BLAZE_POWDER), OrePrefix.DUST_REGULAR, Materials.Blaze);
OreDictUnifier.registerOre(new ItemStack(Items.BLAZE_ROD), OrePrefix.stick, Materials.Blaze);
OreDictUnifier.registerOre(new ItemStack(Blocks.IRON_BLOCK), OrePrefix.block, Materials.Iron);
OreDictUnifier.registerOre(new ItemStack(Blocks.GOLD_BLOCK), OrePrefix.block, Materials.Gold);
OreDictUnifier.registerOre(new ItemStack(Blocks.DIAMOND_BLOCK), OrePrefix.block, Materials.Diamond);
OreDictUnifier.registerOre(new ItemStack(Blocks.EMERALD_BLOCK), OrePrefix.block, Materials.Emerald);
OreDictUnifier.registerOre(new ItemStack(Blocks.LAPIS_BLOCK), OrePrefix.block, Materials.Lapis);
OreDictUnifier.registerOre(new ItemStack(Blocks.COAL_BLOCK), OrePrefix.block, Materials.Coal);
OreDictUnifier.registerOre(new ItemStack(Blocks.REDSTONE_BLOCK), OrePrefix.block, Materials.Redstone);
OreDictUnifier.registerOre(new ItemStack(Blocks.QUARTZ_BLOCK), OrePrefix.block, Materials.NetherQuartz);
OreDictUnifier.registerOre(new ItemStack(Blocks.BONE_BLOCK), OrePrefix.block, Materials.Bone);
OreDictUnifier.registerOre(new ItemStack(Blocks.ICE), OrePrefix.block, Materials.Ice);
OreDictUnifier.registerOre(new ItemStack(Blocks.OBSIDIAN), OrePrefix.block, Materials.Obsidian);
OreDictUnifier.registerOre(new ItemStack(Blocks.GLASS), OrePrefix.block, Materials.Glass);
OreDictUnifier.registerOre(MetaBlocks.CONCRETE.getItemVariant(BlockConcrete.ConcreteVariant.LIGHT_CONCRETE, StoneBlock.ChiselingVariant.NORMAL), OrePrefix.block, Materials.Concrete);
OreDictUnifier.registerOre(new ItemStack(Blocks.STONE, 1, 1), OrePrefix.stone, Materials.Granite);
OreDictUnifier.registerOre(new ItemStack(Blocks.STONE, 1, 2), OrePrefix.stone, Materials.Granite);
OreDictUnifier.registerOre(new ItemStack(Blocks.STONE, 1, 5), OrePrefix.stone, Materials.Andesite);
OreDictUnifier.registerOre(new ItemStack(Blocks.STONE, 1, 6), OrePrefix.stone, Materials.Andesite);
OreDictUnifier.registerOre(new ItemStack(Blocks.STONE, 1, 3), OrePrefix.stone, Materials.Diorite);
OreDictUnifier.registerOre(new ItemStack(Blocks.STONE, 1, 4), OrePrefix.stone, Materials.Diorite);
OreDictUnifier.registerOre(new ItemStack(MetaBlocks.GRANITE, 1, 0), OrePrefix.stone, Materials.GraniteBlack);
OreDictUnifier.registerOre(new ItemStack(MetaBlocks.GRANITE, 1, 1), OrePrefix.stone, Materials.GraniteRed);
OreDictUnifier.registerOre(MetaBlocks.MINERAL.getItemVariant(BlockMineral.MineralVariant.MARBLE, StoneBlock.ChiselingVariant.NORMAL), OrePrefix.stone, Materials.Marble);
OreDictUnifier.registerOre(MetaBlocks.MINERAL.getItemVariant(BlockMineral.MineralVariant.BASALT, StoneBlock.ChiselingVariant.NORMAL), OrePrefix.stone, Materials.Basalt);
OreDictUnifier.registerOre(new ItemStack(Blocks.ANVIL), "craftingAnvil");
OreDictUnifier.registerOre(new ItemStack(Blocks.OBSIDIAN, 1, W), OrePrefix.stone, Materials.Obsidian);
OreDictUnifier.registerOre(new ItemStack(Blocks.MOSSY_COBBLESTONE, 1, W), "stoneMossy");
OreDictUnifier.registerOre(new ItemStack(Blocks.MOSSY_COBBLESTONE, 1, W), "stoneCobble");
OreDictUnifier.registerOre(new ItemStack(Blocks.COBBLESTONE, 1, W), "stoneCobble");
OreDictUnifier.registerOre(new ItemStack(Blocks.STONE, 1, W), "stoneSmooth");
OreDictUnifier.registerOre(new ItemStack(Blocks.STONEBRICK, 1, W), "stoneBricks");
OreDictUnifier.registerOre(new ItemStack(Blocks.STONEBRICK, 1, 1), "stoneMossy");
OreDictUnifier.registerOre(new ItemStack(Blocks.STONEBRICK, 1, 2), "stoneCracked");
OreDictUnifier.registerOre(new ItemStack(Blocks.STONEBRICK, 1, 3), "stoneChiseled");
OreDictUnifier.registerOre(new ItemStack(Blocks.NETHERRACK, 1, W), OrePrefix.stone, Materials.Netherrack);
OreDictUnifier.registerOre(new ItemStack(Blocks.END_STONE, 1, W), OrePrefix.stone, Materials.Endstone);
OreDictUnifier.registerOre(new ItemStack(Blocks.REDSTONE_TORCH, 1, W), "craftingRedstoneTorch");
OreDictUnifier.registerOre(new ItemStack(Blocks.PISTON, 1, W), "craftingPiston");
OreDictUnifier.registerOre(new ItemStack(Blocks.STICKY_PISTON, 1, W), "craftingPiston");
OreDictUnifier.registerOre(new ItemStack(Blocks.CHEST, 1, W), "chestWood");
OreDictUnifier.registerOre(new ItemStack(Blocks.TRAPPED_CHEST, 1, W), "chestWood");
OreDictUnifier.registerOre(new ItemStack(Blocks.FURNACE, 1, W), "craftingFurnace");
OreDictUnifier.registerOre(new ItemStack(Items.FEATHER, 1, W), "craftingFeather");
OreDictUnifier.registerOre(new ItemStack(Items.WHEAT, 1, W), "itemWheat");
OreDictUnifier.registerOre(new ItemStack(Items.PAPER, 1, W), "paperEmpty");
OreDictUnifier.registerOre(new ItemStack(Items.MAP, 1, W), "paperMap");
OreDictUnifier.registerOre(new ItemStack(Items.FILLED_MAP, 1, W), "paperMap");
OreDictUnifier.registerOre(new ItemStack(Items.BOOK, 1, W), "bookEmpty");
OreDictUnifier.registerOre(new ItemStack(Items.WRITABLE_BOOK, 1, W), "bookWritable");
OreDictUnifier.registerOre(new ItemStack(Items.WRITTEN_BOOK, 1, W), "bookWritten");
OreDictUnifier.registerOre(new ItemStack(Items.ENCHANTED_BOOK, 1, W), "bookEnchanted");
OreDictUnifier.registerOre(new ItemStack(Items.BOOK, 1, W), "craftingBook");
OreDictUnifier.registerOre(new ItemStack(Items.WRITABLE_BOOK, 1, W), "craftingBook");
OreDictUnifier.registerOre(new ItemStack(Items.WRITTEN_BOOK, 1, W), "craftingBook");
OreDictUnifier.registerOre(new ItemStack(Items.ENCHANTED_BOOK, 1, W), "craftingBook");
}
use of gregtech.api.unification.stack.UnificationEntry in project GregTech by GregTechCE.
the class MaterialRecipeHandler method processSmallDust.
public static void processSmallDust(OrePrefix orePrefix, DustMaterial material) {
ItemStack smallDustStack = OreDictUnifier.get(orePrefix, material);
ItemStack dustStack = OreDictUnifier.get(OrePrefix.dust, material);
ModHandler.addShapedRecipe(String.format("small_dust_disassembling_%s", material.toString()), GTUtility.copyAmount(4, smallDustStack), " X", " ", 'X', new UnificationEntry(OrePrefix.dust, material));
ModHandler.addShapedRecipe(String.format("small_dust_assembling_%s", material.toString()), dustStack, "XX", "XX", 'X', new UnificationEntry(orePrefix, material));
RecipeMaps.PACKER_RECIPES.recipeBuilder().input(orePrefix, material, 4).inputs(new CountableIngredient(new IntCircuitIngredient(2), 0)).outputs(dustStack).buildAndRegister();
RecipeMaps.UNPACKER_RECIPES.recipeBuilder().input(OrePrefix.dust, material).inputs(new CountableIngredient(new IntCircuitIngredient(2), 0)).outputs(GTUtility.copyAmount(4, smallDustStack)).buildAndRegister();
}
Aggregations