Search in sources :

Example 36 with UnificationEntry

use of gregtech.api.unification.stack.UnificationEntry in project GregTech by GregTechCE.

the class OreDictUnifier method onItemRegistration.

@SubscribeEvent
public static void onItemRegistration(OreDictionary.OreRegisterEvent event) {
    SimpleItemStack simpleItemStack = new SimpleItemStack(event.getOre());
    String oreName = event.getName();
    // cache this registration by name
    stackOreDictName.computeIfAbsent(simpleItemStack, k -> new HashSet<>()).add(oreName);
    // and try to transform registration name into OrePrefix + Material pair
    OrePrefix orePrefix = OrePrefix.getPrefix(oreName);
    Material material = null;
    if (orePrefix == null) {
        // split ore dict name to parts
        // oreBasalticMineralSand -> ore, Basaltic, Mineral, Sand
        ArrayList<String> splits = new ArrayList<>();
        StringBuilder builder = new StringBuilder();
        for (char character : oreName.toCharArray()) {
            if (Character.isUpperCase(character)) {
                if (builder.length() > 0) {
                    splits.add(builder.toString());
                    builder = new StringBuilder().append(character);
                } else
                    splits.add(Character.toString(character));
            } else
                builder.append(character);
        }
        if (builder.length() > 0) {
            splits.add(builder.toString());
        }
        // try to combine in different manners
        // oreBasaltic MineralSand , ore BasalticMineralSand
        StringBuilder buffer = new StringBuilder();
        for (int i = 0; i < splits.size(); i++) {
            buffer.append(splits.get(i));
            // ore -> OrePrefix.ore
            OrePrefix maybePrefix = OrePrefix.getPrefix(buffer.toString());
            // BasalticMineralSand
            String possibleMaterialName = Joiner.on("").join(splits.subList(i + 1, splits.size()));
            // basaltic_mineral_sand
            String underscoreName = CaseFormat.UPPER_CAMEL.to(CaseFormat.LOWER_UNDERSCORE, possibleMaterialName);
            // Materials.BasalticSand
            Material possibleMaterial = Material.MATERIAL_REGISTRY.getObject(underscoreName);
            if (maybePrefix != null && possibleMaterial != null) {
                orePrefix = maybePrefix;
                material = possibleMaterial;
                break;
            }
        }
    }
    // finally register item
    if (orePrefix != null && (material != null || orePrefix.isSelfReferencing)) {
        UnificationEntry unificationEntry = new UnificationEntry(orePrefix, material);
        stackUnificationInfo.put(simpleItemStack, unificationEntry);
        stackUnificationItems.computeIfAbsent(unificationEntry, p -> new ArrayList<>()).add(simpleItemStack);
        orePrefix.processOreRegistration(material);
    }
}
Also used : java.util(java.util) CaseFormat(com.google.common.base.CaseFormat) SimpleItemStack(gregtech.api.unification.stack.SimpleItemStack) M(gregtech.api.GTValues.M) GemMaterial(gregtech.api.unification.material.type.GemMaterial) UnificationEntry(gregtech.api.unification.stack.UnificationEntry) Material(gregtech.api.unification.material.type.Material) MetalMaterial(gregtech.api.unification.material.type.MetalMaterial) ItemMaterialInfo(gregtech.api.unification.stack.ItemMaterialInfo) ItemStack(net.minecraft.item.ItemStack) MaterialStack(gregtech.api.unification.stack.MaterialStack) MinecraftForge(net.minecraftforge.common.MinecraftForge) ImmutableList(com.google.common.collect.ImmutableList) OreDictionary(net.minecraftforge.oredict.OreDictionary) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent) OrePrefix(gregtech.api.unification.ore.OrePrefix) DustMaterial(gregtech.api.unification.material.type.DustMaterial) Nullable(javax.annotation.Nullable) Joiner(com.google.common.base.Joiner) OrePrefix(gregtech.api.unification.ore.OrePrefix) UnificationEntry(gregtech.api.unification.stack.UnificationEntry) SimpleItemStack(gregtech.api.unification.stack.SimpleItemStack) GemMaterial(gregtech.api.unification.material.type.GemMaterial) Material(gregtech.api.unification.material.type.Material) MetalMaterial(gregtech.api.unification.material.type.MetalMaterial) DustMaterial(gregtech.api.unification.material.type.DustMaterial) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent)

Example 37 with UnificationEntry

use of gregtech.api.unification.stack.UnificationEntry in project GregTech by GregTechCE.

the class OreDictUnifier method getByProducts.

@Nullable
public static ImmutableList<MaterialStack> getByProducts(ItemStack itemStack) {
    if (itemStack.isEmpty())
        return null;
    SimpleItemStack simpleItemStack = new SimpleItemStack(itemStack);
    UnificationEntry entry = stackUnificationInfo.get(simpleItemStack);
    if (entry != null && entry.material != null)
        return ImmutableList.of(new MaterialStack(entry.material, entry.orePrefix.materialAmount), entry.orePrefix.secondaryMaterial);
    ItemMaterialInfo info = materialUnificationInfo.get(simpleItemStack);
    return info == null ? null : info.byProducts;
}
Also used : ItemMaterialInfo(gregtech.api.unification.stack.ItemMaterialInfo) MaterialStack(gregtech.api.unification.stack.MaterialStack) UnificationEntry(gregtech.api.unification.stack.UnificationEntry) SimpleItemStack(gregtech.api.unification.stack.SimpleItemStack) Nullable(javax.annotation.Nullable)

Example 38 with UnificationEntry

use of gregtech.api.unification.stack.UnificationEntry in project GregTech by GregTechCE.

the class OreDictUnifier method get.

public static ItemStack get(OrePrefix orePrefix, Material material, int stackSize) {
    UnificationEntry unificationEntry = new UnificationEntry(orePrefix, material);
    if (!stackUnificationItems.containsKey(unificationEntry) || !unificationEntry.orePrefix.isUnificationEnabled)
        return ItemStack.EMPTY;
    ArrayList<SimpleItemStack> keys = stackUnificationItems.get(unificationEntry);
    keys.sort(Comparator.comparing(a -> a.item.delegate.name().getResourceDomain()));
    return keys.size() > 0 ? keys.get(0).asItemStack(stackSize) : ItemStack.EMPTY;
}
Also used : java.util(java.util) CaseFormat(com.google.common.base.CaseFormat) SimpleItemStack(gregtech.api.unification.stack.SimpleItemStack) M(gregtech.api.GTValues.M) GemMaterial(gregtech.api.unification.material.type.GemMaterial) UnificationEntry(gregtech.api.unification.stack.UnificationEntry) Material(gregtech.api.unification.material.type.Material) MetalMaterial(gregtech.api.unification.material.type.MetalMaterial) ItemMaterialInfo(gregtech.api.unification.stack.ItemMaterialInfo) ItemStack(net.minecraft.item.ItemStack) MaterialStack(gregtech.api.unification.stack.MaterialStack) MinecraftForge(net.minecraftforge.common.MinecraftForge) ImmutableList(com.google.common.collect.ImmutableList) OreDictionary(net.minecraftforge.oredict.OreDictionary) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent) OrePrefix(gregtech.api.unification.ore.OrePrefix) DustMaterial(gregtech.api.unification.material.type.DustMaterial) Nullable(javax.annotation.Nullable) Joiner(com.google.common.base.Joiner) UnificationEntry(gregtech.api.unification.stack.UnificationEntry) SimpleItemStack(gregtech.api.unification.stack.SimpleItemStack)

Example 39 with UnificationEntry

use of gregtech.api.unification.stack.UnificationEntry in project GregTech by GregTechCE.

the class OreDictUnifier method getPrefix.

@Nullable
public static OrePrefix getPrefix(ItemStack itemStack) {
    if (itemStack.isEmpty())
        return null;
    SimpleItemStack simpleItemStack = new SimpleItemStack(itemStack);
    UnificationEntry entry = stackUnificationInfo.get(simpleItemStack);
    if (entry != null)
        return entry.orePrefix;
    return null;
}
Also used : UnificationEntry(gregtech.api.unification.stack.UnificationEntry) SimpleItemStack(gregtech.api.unification.stack.SimpleItemStack) Nullable(javax.annotation.Nullable)

Example 40 with UnificationEntry

use of gregtech.api.unification.stack.UnificationEntry in project GregTech by GregTechCE.

the class ProcessingShaping method registerOre.

public void registerOre(UnificationEntry entry, String modName, SimpleItemStack simpleStack) {
    ItemStack stack = simpleStack.asItemStack();
    long materialMass = entry.material.getMass();
    int amount = (int) (entry.orePrefix.materialAmount / M);
    int voltageMultiplier;
    if ((entry.material instanceof MetalMaterial) && ((MetalMaterial) entry.material).blastFurnaceTemperature >= 2800) {
        voltageMultiplier = 64;
    } else {
        voltageMultiplier = 16;
    }
    if (!(amount > 0 && amount <= 64 && entry.orePrefix.materialAmount % M == 0L)) {
        return;
    }
    if (entry.material instanceof MetalMaterial && !entry.material.hasFlag(NO_SMELTING)) {
        if (entry.material.hasFlag(NO_SMASHING)) {
            voltageMultiplier /= 4;
        } else if (entry.orePrefix.name().startsWith(OrePrefix.dust.name())) {
            return;
        }
        MetalMaterial smeltInto = ((MetalMaterial) entry.material).smeltInto;
        if (!OrePrefix.block.isIgnored(smeltInto)) {
            RecipeMap.EXTRUDER_RECIPES.recipeBuilder().inputs(GTUtility.copyAmount(9, stack)).notConsumable(MetaItems.SHAPE_EXTRUDER_BLOCK).outputs(OreDictUnifier.get(OrePrefix.block, smeltInto, amount)).duration(10 * amount).EUt(8 * voltageMultiplier).buildAndRegister();
            RecipeMap.ALLOY_SMELTER_RECIPES.recipeBuilder().inputs(GTUtility.copyAmount(9, stack)).notConsumable(MetaItems.SHAPE_MOLD_BLOCK).outputs(OreDictUnifier.get(OrePrefix.block, smeltInto, amount)).duration(5 * amount).EUt(4 * voltageMultiplier).buildAndRegister();
        }
        if (entry.material != smeltInto) {
            RecipeMap.EXTRUDER_RECIPES.recipeBuilder().inputs(GTUtility.copyAmount(1, stack)).notConsumable(MetaItems.SHAPE_EXTRUDER_INGOT).outputs(OreDictUnifier.get(OrePrefix.ingot, smeltInto, amount)).duration(10).EUt(4 * voltageMultiplier).buildAndRegister();
        }
        RecipeMap.EXTRUDER_RECIPES.recipeBuilder().inputs(GTUtility.copyAmount(1, stack)).notConsumable(MetaItems.SHAPE_EXTRUDER_PLATE).outputs(OreDictUnifier.get(OrePrefix.plate, smeltInto, amount)).duration((int) Math.max(materialMass * amount, amount)).EUt(8 * voltageMultiplier).buildAndRegister();
        if (amount * 2 <= 64) {
            RecipeMap.EXTRUDER_RECIPES.recipeBuilder().inputs(GTUtility.copyAmount(1, stack)).notConsumable(MetaItems.SHAPE_EXTRUDER_ROD).outputs(OreDictUnifier.get(OrePrefix.stick, smeltInto, amount * 2)).duration((int) Math.max(materialMass * 2L * amount, amount)).EUt(6 * voltageMultiplier).buildAndRegister();
        }
        if (amount * 2 <= 64) {
            RecipeMap.EXTRUDER_RECIPES.recipeBuilder().inputs(GTUtility.copyAmount(1, stack)).notConsumable(MetaItems.SHAPE_EXTRUDER_WIRE).outputs(OreDictUnifier.get(OrePrefix.wireGt01, smeltInto, amount * 2)).duration((int) Math.max(materialMass * 2L * amount, amount)).EUt(6 * voltageMultiplier).buildAndRegister();
        }
        if (amount * 8 <= 64) {
            RecipeMap.EXTRUDER_RECIPES.recipeBuilder().inputs(GTUtility.copyAmount(1, stack)).notConsumable(MetaItems.SHAPE_EXTRUDER_BOLT).outputs(OreDictUnifier.get(OrePrefix.bolt, smeltInto, amount * 8)).duration((int) Math.max(materialMass * 2L * amount, amount)).EUt(8 * voltageMultiplier).buildAndRegister();
        }
        if (amount * 4 <= 64) {
            RecipeMap.EXTRUDER_RECIPES.recipeBuilder().inputs(GTUtility.copyAmount(1, stack)).notConsumable(MetaItems.SHAPE_EXTRUDER_RING).outputs(OreDictUnifier.get(OrePrefix.ring, smeltInto, amount * 4)).duration((int) Math.max(materialMass * 2L * amount, amount)).EUt(6 * voltageMultiplier).buildAndRegister();
            if (!entry.material.hasFlag(NO_SMASHING)) {
                ModHandler.addShapedRecipe("ring_" + entry.material, OreDictUnifier.get(OrePrefix.ring, entry.material), "h ", " X", 'X', new UnificationEntry(OrePrefix.stick, entry.material));
            }
        }
        RecipeMap.EXTRUDER_RECIPES.recipeBuilder().inputs(GTUtility.copyAmount(2, stack)).notConsumable(MetaItems.SHAPE_EXTRUDER_SWORD).outputs(OreDictUnifier.get(OrePrefix.toolHeadSword, smeltInto, amount)).duration((int) Math.max(materialMass * 2L * amount, amount)).EUt(8 * voltageMultiplier).buildAndRegister();
        RecipeMap.EXTRUDER_RECIPES.recipeBuilder().inputs(GTUtility.copyAmount(3, stack)).notConsumable(MetaItems.SHAPE_EXTRUDER_PICKAXE).outputs(OreDictUnifier.get(OrePrefix.toolHeadPickaxe, smeltInto, amount)).duration((int) Math.max(materialMass * 3L * amount, amount)).EUt(8 * voltageMultiplier).buildAndRegister();
        RecipeMap.EXTRUDER_RECIPES.recipeBuilder().inputs(GTUtility.copyAmount(1, stack)).notConsumable(MetaItems.SHAPE_EXTRUDER_SHOVEL).outputs(OreDictUnifier.get(OrePrefix.toolHeadShovel, smeltInto, amount)).duration((int) Math.max(materialMass * amount, amount)).EUt(8 * voltageMultiplier).buildAndRegister();
        RecipeMap.EXTRUDER_RECIPES.recipeBuilder().inputs(GTUtility.copyAmount(3, stack)).notConsumable(MetaItems.SHAPE_EXTRUDER_AXE).outputs(OreDictUnifier.get(OrePrefix.toolHeadAxe, smeltInto, amount)).duration((int) Math.max(materialMass * 3L * amount, amount)).EUt(8 * voltageMultiplier).buildAndRegister();
        RecipeMap.EXTRUDER_RECIPES.recipeBuilder().inputs(GTUtility.copyAmount(2, stack)).notConsumable(MetaItems.SHAPE_EXTRUDER_HOE).outputs(OreDictUnifier.get(OrePrefix.toolHeadHoe, smeltInto, amount)).duration((int) Math.max(materialMass * 2L * amount, amount)).EUt(8 * voltageMultiplier).buildAndRegister();
        RecipeMap.EXTRUDER_RECIPES.recipeBuilder().inputs(GTUtility.copyAmount(6, stack)).notConsumable(MetaItems.SHAPE_EXTRUDER_HAMMER).outputs(OreDictUnifier.get(OrePrefix.toolHeadHammer, smeltInto, amount)).duration((int) Math.max(materialMass * 6L * amount, amount)).EUt(8 * voltageMultiplier).buildAndRegister();
        RecipeMap.EXTRUDER_RECIPES.recipeBuilder().inputs(GTUtility.copyAmount(2, stack)).notConsumable(MetaItems.SHAPE_EXTRUDER_FILE).outputs(OreDictUnifier.get(OrePrefix.toolHeadFile, smeltInto, amount)).duration((int) Math.max(materialMass * 2L * amount, amount)).EUt(8 * voltageMultiplier).buildAndRegister();
        RecipeMap.EXTRUDER_RECIPES.recipeBuilder().inputs(GTUtility.copyAmount(2, stack)).notConsumable(MetaItems.SHAPE_EXTRUDER_SAW).outputs(OreDictUnifier.get(OrePrefix.toolHeadSaw, smeltInto, amount)).duration((int) Math.max(materialMass * 2L * amount, amount)).EUt(8 * voltageMultiplier).buildAndRegister();
        RecipeMap.EXTRUDER_RECIPES.recipeBuilder().inputs(GTUtility.copyAmount(4, stack)).notConsumable(MetaItems.SHAPE_EXTRUDER_GEAR).outputs(OreDictUnifier.get(OrePrefix.gear, smeltInto, amount)).duration((int) Math.max(materialMass * 5L * amount, amount)).EUt(8 * voltageMultiplier).buildAndRegister();
        RecipeMap.ALLOY_SMELTER_RECIPES.recipeBuilder().inputs(GTUtility.copyAmount(2, stack)).notConsumable(MetaItems.SHAPE_MOLD_PLATE).outputs(OreDictUnifier.get(OrePrefix.plate, smeltInto, amount)).duration((int) Math.max(materialMass * 2L * amount, amount)).EUt(2 * voltageMultiplier).buildAndRegister();
        RecipeMap.ALLOY_SMELTER_RECIPES.recipeBuilder().inputs(GTUtility.copyAmount(8, stack)).notConsumable(MetaItems.SHAPE_MOLD_GEAR).outputs(OreDictUnifier.get(OrePrefix.gear, smeltInto, amount)).duration((int) Math.max(materialMass * 10L * amount, amount)).EUt(2 * voltageMultiplier).buildAndRegister();
        if (entry.material == Materials.Steel) {
        // if (amount * 2 <= 64) {
        // RecipeMap.EXTRUDER_RECIPES.recipeBuilder()
        // .inputs(GTUtility.copyAmount(1, stack))
        // .notConsumable(MetaItems.SHAPE_EXTRUDER_CASING)
        // .outputs(ModHandler.IC2.getIC2Item(ItemName.casing, CasingResourceType.steel, amount * 2))
        // .duration(amount * 32)
        // .EUt(3 * voltageMultiplier)
        // .buildAndRegister();
        // }
        // if (amount * 2 <= 64) {
        // RecipeMap.ALLOY_SMELTER_RECIPES.recipeBuilder()
        // .inputs(GTUtility.copyAmount(2, stack))
        // .notConsumable(MetaItems.SHAPE_MOLD_CASING)
        // .outputs(ModHandler.IC2.getIC2Item(ItemName.casing, CasingResourceType.steel, amount * 3))
        // .duration(amount * 128)
        // .EUt(voltageMultiplier)
        // .buildAndRegister();
        // }
        } else if (entry.material == Materials.Iron || entry.material == Materials.WroughtIron) {
            // }
            if (amount * 31 <= 64) {
                RecipeMap.ALLOY_SMELTER_RECIPES.recipeBuilder().inputs(GTUtility.copyAmount(31, stack)).notConsumable(MetaItems.SHAPE_MOLD_ANVIL).outputs(new ItemStack(Blocks.ANVIL, 1, 0)).duration(amount * 512).EUt(4 * voltageMultiplier).buildAndRegister();
            }
        } else if (entry.material == Materials.Tin) {
        // RecipeMap.EXTRUDER_RECIPES.recipeBuilder()
        // .inputs(GTUtility.copyAmount(2, stack))
        // .notConsumable(MetaItems.SHAPE_EXTRUDER_CELL)
        // .outputs(ModHandler.IC2.getIC2Item(ItemName.fluid_cell, amount))
        // .duration(amount * 128)
        // .EUt(32)
        // .buildAndRegister();
        // 
        // if (amount * 2 <= 64) {
        // RecipeMap.EXTRUDER_RECIPES.recipeBuilder()
        // .inputs(GTUtility.copyAmount(1, stack))
        // .notConsumable(MetaItems.SHAPE_EXTRUDER_CASING)
        // .outputs(ModHandler.IC2.getIC2Item(ItemName.casing, CasingResourceType.tin, amount * 2))
        // .duration(amount * 32)
        // .EUt(3 * voltageMultiplier)
        // .buildAndRegister();
        // 
        // }
        // if (amount * 2 <= 64) {
        // RecipeMap.ALLOY_SMELTER_RECIPES.recipeBuilder()
        // .inputs(GTUtility.copyAmount(2, stack))
        // .notConsumable(MetaItems.SHAPE_MOLD_CASING)
        // .outputs(ModHandler.IC2.getIC2Item(ItemName.casing, CasingResourceType.tin, amount * 3))
        // .duration(amount * 128)
        // .EUt(voltageMultiplier)
        // .buildAndRegister();
        // }
        } else if (entry.material == Materials.Lead) {
        // if (amount * 2 <= 64) {
        // RecipeMap.EXTRUDER_RECIPES.recipeBuilder()
        // .inputs(GTUtility.copyAmount(1, stack))
        // .notConsumable(MetaItems.SHAPE_EXTRUDER_CASING)
        // .outputs(ModHandler.IC2.getIC2Item(ItemName.casing, CasingResourceType.lead, amount * 2))
        // .duration(amount * 32)
        // .EUt(3 * voltageMultiplier)
        // .buildAndRegister();
        // }
        // if (amount * 2 <= 64) {
        // RecipeMap.ALLOY_SMELTER_RECIPES.recipeBuilder()
        // .inputs(GTUtility.copyAmount(2, stack))
        // .notConsumable(MetaItems.SHAPE_MOLD_CASING)
        // .outputs(ModHandler.IC2.getIC2Item(ItemName.casing, CasingResourceType.lead, amount * 3))
        // .duration(amount * 128)
        // .EUt(voltageMultiplier)
        // .buildAndRegister();
        // }
        } else if (entry.material == Materials.Copper || entry.material == Materials.AnnealedCopper) {
        // if (amount * 2 <= 64) {
        // RecipeMap.EXTRUDER_RECIPES.recipeBuilder()
        // .inputs(GTUtility.copyAmount(1, stack))
        // .notConsumable(MetaItems.SHAPE_EXTRUDER_CASING)
        // .outputs(ModHandler.IC2.getIC2Item(ItemName.casing, CasingResourceType.copper, amount * 2))
        // .duration(amount * 32)
        // .EUt(3 * voltageMultiplier)
        // .buildAndRegister();
        // }
        // if (amount * 2 <= 64) {
        // RecipeMap.ALLOY_SMELTER_RECIPES.recipeBuilder()
        // .inputs(GTUtility.copyAmount(2, stack))
        // .notConsumable(MetaItems.SHAPE_MOLD_CASING)
        // .outputs(ModHandler.IC2.getIC2Item(ItemName.casing, CasingResourceType.copper, amount * 3))
        // .duration(amount * 128)
        // .EUt(voltageMultiplier)
        // .buildAndRegister();
        // }
        } else if (entry.material == Materials.Bronze) {
        // if (amount * 2 <= 64) {
        // RecipeMap.EXTRUDER_RECIPES.recipeBuilder()
        // .inputs(GTUtility.copyAmount(1, stack))
        // .notConsumable(MetaItems.SHAPE_EXTRUDER_CASING)
        // .outputs(ModHandler.IC2.getIC2Item(ItemName.casing, CasingResourceType.bronze, amount * 2))
        // .duration(amount * 32)
        // .EUt(3 * voltageMultiplier)
        // .buildAndRegister();
        // }
        // if (amount * 2 <= 64) {
        // RecipeMap.ALLOY_SMELTER_RECIPES.recipeBuilder()
        // .inputs(GTUtility.copyAmount(2, stack))
        // .notConsumable(MetaItems.SHAPE_MOLD_CASING)
        // .outputs(ModHandler.IC2.getIC2Item(ItemName.casing, CasingResourceType.bronze, amount * 3))
        // .duration(amount * 128)
        // .EUt(voltageMultiplier)
        // .buildAndRegister();
        // }
        } else if (entry.material == Materials.Gold) {
        // if (amount * 2 <= 64) {
        // RecipeMap.EXTRUDER_RECIPES.recipeBuilder()
        // .inputs(GTUtility.copyAmount(1, stack))
        // .notConsumable(MetaItems.SHAPE_EXTRUDER_CASING)
        // .outputs(ModHandler.IC2.getIC2Item(ItemName.casing, CasingResourceType.gold, amount * 2))
        // .duration(amount * 32)
        // .EUt(3 * voltageMultiplier)
        // .buildAndRegister();
        // }
        // if (amount * 2 <= 64) {
        // RecipeMap.ALLOY_SMELTER_RECIPES.recipeBuilder()
        // .inputs(GTUtility.copyAmount(2, stack))
        // .notConsumable(MetaItems.SHAPE_MOLD_CASING)
        // .outputs(ModHandler.IC2.getIC2Item(ItemName.casing, CasingResourceType.gold, amount * 3))
        // .duration(amount * 128)
        // .EUt(voltageMultiplier)
        // .buildAndRegister();
        // }
        }
    } else if (entry.material == Materials.Glass) {
        RecipeMap.EXTRUDER_RECIPES.recipeBuilder().inputs(GTUtility.copyAmount(1, stack)).notConsumable(MetaItems.SHAPE_EXTRUDER_PLATE).outputs(OreDictUnifier.get(OrePrefix.plate, entry.material, amount)).duration((int) Math.max(materialMass * amount, amount)).EUt(8 * voltageMultiplier).buildAndRegister();
        RecipeMap.EXTRUDER_RECIPES.recipeBuilder().inputs(GTUtility.copyAmount(1, stack)).notConsumable(MetaItems.SHAPE_EXTRUDER_BOTTLE).outputs(new ItemStack(Items.GLASS_BOTTLE, 1)).duration(amount * 32).EUt(16).buildAndRegister();
        RecipeMap.ALLOY_SMELTER_RECIPES.recipeBuilder().inputs(GTUtility.copyAmount(1, stack)).notConsumable(MetaItems.SHAPE_MOLD_BOTTLE).outputs(new ItemStack(Items.GLASS_BOTTLE, 1)).duration(amount * 64).EUt(4).buildAndRegister();
    }
}
Also used : UnificationEntry(gregtech.api.unification.stack.UnificationEntry) SimpleItemStack(gregtech.api.unification.stack.SimpleItemStack) ItemStack(net.minecraft.item.ItemStack) MetalMaterial(gregtech.api.unification.material.type.MetalMaterial)

Aggregations

UnificationEntry (gregtech.api.unification.stack.UnificationEntry)65 ItemStack (net.minecraft.item.ItemStack)50 OrePrefix (gregtech.api.unification.ore.OrePrefix)11 Material (gregtech.api.unification.material.type.Material)10 SimpleItemStack (gregtech.api.unification.stack.SimpleItemStack)10 MaterialStack (gregtech.api.unification.stack.MaterialStack)8 IntCircuitIngredient (gregtech.api.recipes.ingredients.IntCircuitIngredient)6 SolidMaterial (gregtech.api.unification.material.type.SolidMaterial)6 MetaValueItem (gregtech.api.items.metaitem.MetaItem.MetaValueItem)5 CountableIngredient (gregtech.api.recipes.CountableIngredient)5 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)5 ItemMaterialInfo (gregtech.api.unification.stack.ItemMaterialInfo)4 Nullable (javax.annotation.Nullable)4 CaseFormat (com.google.common.base.CaseFormat)3 Joiner (com.google.common.base.Joiner)3 ImmutableList (com.google.common.collect.ImmutableList)3 GTValues (gregtech.api.GTValues)3 M (gregtech.api.GTValues.M)3 ToolMetaItem (gregtech.api.items.toolitem.ToolMetaItem)3 ModHandler (gregtech.api.recipes.ModHandler)3