Search in sources :

Example 1 with Materials

use of com.mcmoddev.basemetals.init.Materials in project BaseMetals by MinecraftModDevelopmentMods.

the class ThermalExpansion method regShit.

/**
 * @param event
 */
@SubscribeEvent
public void regShit(final RegistryEvent.Register<IRecipe> event) {
    final List<String> materials = Arrays.asList(MaterialNames.ADAMANTINE, MaterialNames.ANTIMONY, MaterialNames.AQUARIUM, MaterialNames.BISMUTH, MaterialNames.BRASS, MaterialNames.COLDIRON, MaterialNames.CUPRONICKEL, MaterialNames.PEWTER, MaterialNames.STARSTEEL, MaterialNames.ZINC, MaterialNames.MERCURY);
    materials.stream().filter(Materials::hasMaterial).filter(materialName -> !Materials.getMaterialByName(materialName).isEmpty()).forEach(materialName -> {
        addFurnace(materialName);
        addCrucible(materialName);
        addPlatePress(materialName);
        addPressStorage(materialName);
        addPulverizer(materialName);
    });
    final MMDMaterial brass = Materials.getMaterialByName(MaterialNames.BRASS);
    final MMDMaterial copper = Materials.getMaterialByName(MaterialNames.COPPER);
    final MMDMaterial cupronickel = Materials.getMaterialByName(MaterialNames.CUPRONICKEL);
    final MMDMaterial nickel = Materials.getMaterialByName(MaterialNames.NICKEL);
    final MMDMaterial zinc = Materials.getMaterialByName(MaterialNames.ZINC);
    final MMDMaterial tin = Materials.getMaterialByName(MaterialNames.TIN);
    final MMDMaterial bronze = Materials.getMaterialByName(MaterialNames.BRONZE);
    if (hasMaterials(MaterialNames.COPPER, MaterialNames.ZINC, MaterialNames.BRASS) && materialsHaveItems(Arrays.asList(MaterialNames.COPPER, MaterialNames.ZINC, MaterialNames.BRASS), Names.INGOT.toString())) {
        ThermalExpansionHelper.addSmelterRecipe(4000, copper.getItemStack(Names.INGOT, 2), zinc.getItemStack(Names.INGOT, 1), brass.getItemStack(Names.INGOT, 3));
    }
    if (hasMaterials(MaterialNames.COPPER, MaterialNames.NICKEL, MaterialNames.CUPRONICKEL) && materialsHaveItems(Arrays.asList(MaterialNames.COPPER, MaterialNames.NICKEL, MaterialNames.CUPRONICKEL), Names.INGOT.toString())) {
        ThermalExpansionHelper.addSmelterRecipe(4000, copper.getItemStack(Names.INGOT, 3), nickel.getItemStack(Names.INGOT, 1), cupronickel.getItemStack(Names.INGOT, 4));
    }
    if (hasMaterials(MaterialNames.COPPER, MaterialNames.TIN, MaterialNames.BRONZE) && materialsHaveItems(Arrays.asList(MaterialNames.COPPER, MaterialNames.TIN, MaterialNames.BRONZE), Names.INGOT.toString())) {
        ThermalExpansionHelper.addSmelterRecipe(4000, copper.getItemStack(Names.INGOT, 3), tin.getItemStack(Names.INGOT, 1), bronze.getItemStack(Names.INGOT, 3));
    }
}
Also used : Arrays(java.util.Arrays) IRecipe(net.minecraft.item.crafting.IRecipe) MMDMaterial(com.mcmoddev.lib.material.MMDMaterial) ThermalExpansionHelper(cofh.api.util.ThermalExpansionHelper) MaterialNames(com.mcmoddev.basemetals.data.MaterialNames) Names(com.mcmoddev.lib.data.Names) IIntegration(com.mcmoddev.lib.integration.IIntegration) List(java.util.List) MMDPlugin(com.mcmoddev.lib.integration.MMDPlugin) MinecraftForge(net.minecraftforge.common.MinecraftForge) BaseMetals(com.mcmoddev.basemetals.BaseMetals) Materials(com.mcmoddev.basemetals.init.Materials) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent) RegistryEvent(net.minecraftforge.event.RegistryEvent) Options(com.mcmoddev.lib.util.ConfigBase.Options) Materials(com.mcmoddev.basemetals.init.Materials) MMDMaterial(com.mcmoddev.lib.material.MMDMaterial) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent)

Aggregations

ThermalExpansionHelper (cofh.api.util.ThermalExpansionHelper)1 BaseMetals (com.mcmoddev.basemetals.BaseMetals)1 MaterialNames (com.mcmoddev.basemetals.data.MaterialNames)1 Materials (com.mcmoddev.basemetals.init.Materials)1 Names (com.mcmoddev.lib.data.Names)1 IIntegration (com.mcmoddev.lib.integration.IIntegration)1 MMDPlugin (com.mcmoddev.lib.integration.MMDPlugin)1 MMDMaterial (com.mcmoddev.lib.material.MMDMaterial)1 Options (com.mcmoddev.lib.util.ConfigBase.Options)1 Arrays (java.util.Arrays)1 List (java.util.List)1 IRecipe (net.minecraft.item.crafting.IRecipe)1 MinecraftForge (net.minecraftforge.common.MinecraftForge)1 RegistryEvent (net.minecraftforge.event.RegistryEvent)1 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)1