use of com.mcmoddev.lib.init.Materials in project BaseMetals by MinecraftModDevelopmentMods.
the class IC2 method mainInteraction.
/**
* @param event
*/
@SubscribeEvent
public void mainInteraction(final RegistryEvent.Register<IRecipe> event) {
final List<String> materials = Arrays.asList(MaterialNames.ADAMANTINE, MaterialNames.ANTIMONY, MaterialNames.BISMUTH, MaterialNames.COLDIRON, MaterialNames.PLATINUM, MaterialNames.NICKEL, MaterialNames.STARSTEEL, MaterialNames.ZINC);
materials.stream().filter(Materials::hasMaterial).filter(materialName -> !Materials.getMaterialByName(materialName).isEmpty()).forEach(materialName -> {
registerVanillaRecipes(materialName);
addMaceratorRecipes(materialName);
addOreWashingPlantRecipes(materialName);
addThermalCentrifugeRecipes(materialName);
addMetalFormerRecipes(materialName);
addCompressorRecipes(materialName);
});
if (Materials.hasMaterial(MaterialNames.DIAMOND)) {
final MMDMaterial diamond = Materials.getMaterialByName(MaterialNames.DIAMOND);
final String oreDictName = diamond.getCapitalizedName();
if (diamond.hasItem(Names.POWDER)) {
addMaceratorRecipe(Oredicts.ORE + oreDictName, diamond.getItemStack(Names.POWDER, 2));
}
}
if (Materials.hasMaterial(MaterialNames.EMERALD)) {
final MMDMaterial emerald = Materials.getMaterialByName(MaterialNames.EMERALD);
final String oreDictName = emerald.getCapitalizedName();
if (emerald.hasItem(Names.POWDER)) {
addMaceratorRecipe(Oredicts.ORE + oreDictName, emerald.getItemStack(Names.POWDER, 2));
}
}
MinecraftForge.EVENT_BUS.register(this);
}
use of com.mcmoddev.lib.init.Materials in project BaseMetals by MinecraftModDevelopmentMods.
the class Items method init.
/**
*/
public static void init() {
Materials.getMaterialByName(MaterialNames.CHARCOAL).addNewItemFromItemStack(Names.INGOT, new ItemStack(net.minecraft.init.Items.COAL, 1, 1));
Materials.getMaterialByName(MaterialNames.COAL).addNewItemFromItemStack(Names.INGOT, new ItemStack(net.minecraft.init.Items.COAL, 1, 0));
addDiamondBits();
addGoldBits();
addIronBits();
addStoneBits();
addWoodBits();
Materials.getMaterialByName(MaterialNames.EMERALD).addNewItem(Names.INGOT, net.minecraft.init.Items.EMERALD);
Materials.getMaterialByName(MaterialNames.QUARTZ).addNewItem(Names.INGOT, net.minecraft.init.Items.QUARTZ);
Materials.getMaterialByName(MaterialNames.REDSTONE).addNewItem(Names.POWDER, net.minecraft.init.Items.REDSTONE);
Materials.getMaterialByName(MaterialNames.LAPIS).addNewItemFromItemStack(Names.INGOT, new ItemStack(net.minecraft.init.Items.DYE, 1, 4));
doSpecialMats();
final List<String> materials = Arrays.asList(MaterialNames.ADAMANTINE, MaterialNames.ANTIMONY, MaterialNames.AQUARIUM, MaterialNames.BISMUTH, MaterialNames.BRASS, MaterialNames.BRONZE, MaterialNames.COLDIRON, MaterialNames.COPPER, MaterialNames.CUPRONICKEL, MaterialNames.EMERALD, MaterialNames.ELECTRUM, MaterialNames.INVAR, MaterialNames.LEAD, MaterialNames.OBSIDIAN, MaterialNames.MITHRIL, MaterialNames.NICKEL, MaterialNames.PEWTER, MaterialNames.PLATINUM, MaterialNames.QUARTZ, MaterialNames.SILVER, MaterialNames.STARSTEEL, MaterialNames.STEEL, MaterialNames.TIN, MaterialNames.ZINC);
// create and register modded stuffs
final List<String> materialsModSupport = Arrays.asList(MaterialNames.ADAMANTINE, MaterialNames.ANTIMONY, MaterialNames.BISMUTH, MaterialNames.COLDIRON, MaterialNames.PLATINUM, MaterialNames.NICKEL, MaterialNames.STARSTEEL, MaterialNames.ZINC);
materials.stream().filter(Materials::hasMaterial).filter(materialName -> !Materials.getMaterialByName(materialName).isEmpty()).forEach(materialName -> {
final MMDMaterial material = Materials.getMaterialByName(materialName);
create(Names.BLEND, material);
create(Names.INGOT, material);
create(Names.NUGGET, material);
create(Names.POWDER, material);
create(Names.SMALLBLEND, material);
create(Names.SMALLPOWDER, material);
create(Names.ARROW, material);
create(Names.AXE, material);
create(Names.BOLT, material);
create(Names.BOOTS, material);
create(Names.BOW, material);
create(Names.CHESTPLATE, material);
create(Names.CRACKHAMMER, material);
create(Names.CROSSBOW, material);
create(Names.DOOR, material);
create(Names.FISHING_ROD, material);
create(Names.HELMET, material);
create(Names.HOE, material);
create(Names.HORSE_ARMOR, material);
create(Names.LEGGINGS, material);
create(Names.PICKAXE, material);
create(Names.SHEARS, material);
create(Names.SHIELD, material);
create(Names.SHOVEL, material);
create(Names.SCYTHE, material);
create(Names.SLAB, material);
create(Names.SWORD, material);
create(Names.ROD, material);
create(Names.GEAR, material);
});
materialsModSupport.stream().filter(Materials::hasMaterial).filter(materialName -> !Materials.getMaterialByName(materialName).isEmpty()).forEach(materialName -> {
final MMDMaterial material = Materials.getMaterialByName(materialName);
create(Names.CASING, material);
create(Names.DENSE_PLATE, material);
if (material.hasOre()) {
create(Names.CRUSHED, material);
create(Names.CRUSHED_PURIFIED, material);
createMekCrystal(material, ItemGroups.getTab(SharedStrings.TAB_ITEMS));
create(Names.SHARD, material);
create(Names.CLUMP, material);
create(Names.POWDER_DIRTY, material);
create(Names.CRYSTAL, material);
}
});
if (Materials.hasMaterial(MaterialNames.MERCURY)) {
final MMDMaterial mercury = Materials.getMaterialByName(MaterialNames.MERCURY);
create(Names.INGOT, mercury);
create(Names.NUGGET, mercury);
create(Names.POWDER, mercury);
create(Names.SMALLPOWDER, mercury);
}
Arrays.asList(MaterialNames.STONE, MaterialNames.STEEL, MaterialNames.ADAMANTINE).stream().filter(Materials::hasMaterial).forEach(materialName -> create(Names.ANVIL, Materials.getMaterialByName(materialName)));
addToMetList();
}
use of com.mcmoddev.lib.init.Materials in project BaseMetals by MinecraftModDevelopmentMods.
the class BMeThermalExpansion method regShit.
/**
* @param event The 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, MaterialNames.REDSTONE);
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));
}
}
use of com.mcmoddev.lib.init.Materials in project BaseMetals by MinecraftModDevelopmentMods.
the class BMeIC2 method mainInteraction.
/**
* @param event The Event.
*/
@SubscribeEvent
public void mainInteraction(final RegistryEvent.Register<IRecipe> event) {
materials.stream().filter(Materials::hasMaterial).filter(materialName -> !Materials.getMaterialByName(materialName).isEmpty()).forEach(materialName -> {
this.registerVanillaRecipes(materialName);
this.addMaceratorRecipes(materialName);
this.addOreWashingPlantRecipes(materialName);
this.addThermalCentrifugeRecipes(materialName);
this.addMetalFormerRecipes(materialName);
this.addCompressorRecipes(materialName);
});
if (Materials.hasMaterial(MaterialNames.DIAMOND)) {
final MMDMaterial diamond = Materials.getMaterialByName(MaterialNames.DIAMOND);
final String oreDictName = diamond.getCapitalizedName();
if (diamond.hasItem(Names.POWDER)) {
this.addMaceratorRecipe(Oredicts.ORE + oreDictName, diamond.getItemStack(Names.POWDER, 2));
}
}
if (Materials.hasMaterial(MaterialNames.EMERALD)) {
final MMDMaterial emerald = Materials.getMaterialByName(MaterialNames.EMERALD);
final String oreDictName = emerald.getCapitalizedName();
if (emerald.hasItem(Names.POWDER)) {
this.addMaceratorRecipe(Oredicts.ORE + oreDictName, emerald.getItemStack(Names.POWDER, 2));
}
}
MinecraftForge.EVENT_BUS.register(this);
}
use of com.mcmoddev.lib.init.Materials in project BaseMetals by MinecraftModDevelopmentMods.
the class Items method registerItems.
/**
*/
@SubscribeEvent
public static void registerItems(MMDLibRegisterItems ev) {
final List<String> materials = Arrays.asList(MaterialNames.ADAMANTINE, MaterialNames.ANTIMONY, MaterialNames.AQUARIUM, MaterialNames.BISMUTH, MaterialNames.BRASS, MaterialNames.BRONZE, MaterialNames.COLDIRON, MaterialNames.COPPER, MaterialNames.CUPRONICKEL, MaterialNames.ELECTRUM, MaterialNames.INVAR, MaterialNames.LEAD, MaterialNames.MITHRIL, MaterialNames.NICKEL, MaterialNames.PEWTER, MaterialNames.PLATINUM, MaterialNames.SILVER, MaterialNames.STARSTEEL, MaterialNames.STEEL, MaterialNames.TIN, MaterialNames.ZINC);
// create and register modded stuffs
final List<String> materialsModSupport = Arrays.asList(MaterialNames.ADAMANTINE, MaterialNames.ANTIMONY, MaterialNames.BISMUTH, MaterialNames.COLDIRON, MaterialNames.PLATINUM, MaterialNames.NICKEL, MaterialNames.STARSTEEL, MaterialNames.ZINC);
materials.stream().filter(Materials::hasMaterial).filter(materialName -> !Materials.getMaterialByName(materialName).isEmpty()).forEach(materialName -> {
final MMDMaterial material = Materials.getMaterialByName(materialName);
create(Names.BLEND, material);
create(Names.INGOT, material);
create(Names.NUGGET, material);
create(Names.POWDER, material);
create(Names.SMALLBLEND, material);
create(Names.SMALLPOWDER, material);
create(Names.ARROW, material);
create(Names.AXE, material);
create(Names.BOLT, material);
create(Names.BOOTS, material);
create(Names.BOW, material);
create(Names.CHESTPLATE, material);
create(Names.CRACKHAMMER, material);
create(Names.CROSSBOW, material);
create(Names.DOOR, material);
create(Names.FISHING_ROD, material);
create(Names.HELMET, material);
create(Names.HOE, material);
create(Names.HORSE_ARMOR, material);
create(Names.LEGGINGS, material);
create(Names.PICKAXE, material);
create(Names.SHEARS, material);
create(Names.SHIELD, material);
create(Names.SHOVEL, material);
create(Names.SCYTHE, material);
create(Names.SLAB, material);
create(Names.SWORD, material);
create(Names.ROD, material);
create(Names.GEAR, material);
});
materials.stream().filter(Materials::hasMaterial).map(Materials::getMaterialByName).forEach(com.mcmoddev.basemetals.init.Items::setBurnTimes);
materialsModSupport.stream().filter(Materials::hasMaterial).filter(materialName -> !Materials.getMaterialByName(materialName).isEmpty()).forEach(materialName -> {
final MMDMaterial material = Materials.getMaterialByName(materialName);
create(Names.CASING, material);
create(Names.DENSE_PLATE, material);
if (material.hasOre()) {
create(Names.CRUSHED, material);
create(Names.CRUSHED_PURIFIED, material);
createMekCrystal(material, ItemGroups.getTab(SharedStrings.TAB_ITEMS));
create(Names.SHARD, material);
create(Names.CLUMP, material);
create(Names.POWDER_DIRTY, material);
create(Names.CRYSTAL, material);
}
});
if (Materials.hasMaterial(MaterialNames.MERCURY)) {
final MMDMaterial mercury = Materials.getMaterialByName(MaterialNames.MERCURY);
create(Names.INGOT, mercury);
create(Names.NUGGET, mercury);
create(Names.POWDER, mercury);
create(Names.SMALLPOWDER, mercury);
}
Arrays.asList(MaterialNames.STONE, MaterialNames.STEEL, MaterialNames.ADAMANTINE).stream().filter(Materials::hasMaterial).forEach(materialName -> create(Names.ANVIL, Materials.getMaterialByName(materialName)));
addToMetList();
MinecraftForge.EVENT_BUS.register(Items.class);
}
Aggregations