use of com.mcmoddev.lib.material.MMDMaterial 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.material.MMDMaterial in project BaseMetals by MinecraftModDevelopmentMods.
the class TinkersConstruct method registerMelting.
private void registerMelting() {
if (Materials.hasMaterial(MaterialNames.COAL)) {
registry.registerMelting(net.minecraft.init.Items.COAL, FluidRegistry.getFluidStack(MaterialNames.COAL, 144));
}
if (Materials.hasMaterial(MaterialNames.MERCURY)) {
final MMDMaterial mercury = Materials.getMaterialByName(MaterialNames.MERCURY);
registry.registerMelting(mercury.getItem(Names.INGOT), FluidRegistry.getFluidStack(mercury.getName(), 144));
}
if (Materials.hasMaterial(MaterialNames.PRISMARINE)) {
final MMDMaterial prismarine = Materials.getMaterialByName(MaterialNames.PRISMARINE);
registry.registerMelting(net.minecraft.init.Items.PRISMARINE_SHARD, FluidRegistry.getFluidStack(prismarine.getName(), 666));
}
}
use of com.mcmoddev.lib.material.MMDMaterial in project BaseMetals by MinecraftModDevelopmentMods.
the class Blocks method init.
/**
*/
public static void init() {
registerVanilla();
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);
materials.stream().filter(Materials::hasMaterial).forEach(materialName -> {
final MMDMaterial material = Materials.getMaterialByName(materialName);
create(Names.BLOCK, material);
create(Names.PLATE, material);
create(Names.ORE, material);
create(Names.BARS, material);
create(Names.DOOR, material);
create(Names.TRAPDOOR, material);
create(Names.BUTTON, material);
create(Names.SLAB, material);
create(Names.DOUBLE_SLAB, material);
create(Names.LEVER, material);
create(Names.PRESSURE_PLATE, material);
create(Names.STAIRS, material);
create(Names.WALL, material);
});
createMercury();
createAnvils();
addBlock(new BlockHumanDetector(), "human_detector", ItemGroups.getTab(SharedStrings.TAB_BLOCKS));
}
use of com.mcmoddev.lib.material.MMDMaterial 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.material.MMDMaterial in project BaseMetals by MinecraftModDevelopmentMods.
the class Items method addIronBits.
private static void addIronBits() {
final MMDMaterial iron = Materials.getMaterialByName(MaterialNames.IRON);
iron.addNewItem(Names.AXE, net.minecraft.init.Items.IRON_AXE);
iron.addNewItem(Names.DOOR, net.minecraft.init.Items.IRON_DOOR);
iron.addNewItem(Names.HOE, net.minecraft.init.Items.IRON_HOE);
iron.addNewItem(Names.HORSE_ARMOR, net.minecraft.init.Items.IRON_HORSE_ARMOR);
iron.addNewItem(Names.PICKAXE, net.minecraft.init.Items.IRON_PICKAXE);
iron.addNewItem(Names.SHOVEL, net.minecraft.init.Items.IRON_SHOVEL);
iron.addNewItem(Names.SWORD, net.minecraft.init.Items.IRON_SWORD);
iron.addNewItem(Names.BOOTS, net.minecraft.init.Items.IRON_BOOTS);
iron.addNewItem(Names.CHESTPLATE, net.minecraft.init.Items.IRON_CHESTPLATE);
iron.addNewItem(Names.HELMET, net.minecraft.init.Items.IRON_HELMET);
iron.addNewItem(Names.LEGGINGS, net.minecraft.init.Items.IRON_LEGGINGS);
iron.addNewItem(Names.INGOT, net.minecraft.init.Items.IRON_INGOT);
iron.addNewItem(Names.NUGGET, net.minecraft.init.Items.IRON_NUGGET);
iron.addNewItem(Names.SHEARS, net.minecraft.init.Items.SHEARS);
if (Materials.hasMaterial(MaterialNames.IRON)) {
create(Names.BLEND, iron);
create(Names.INGOT, iron);
create(Names.NUGGET, iron);
create(Names.POWDER, iron);
create(Names.SMALLBLEND, iron);
create(Names.SMALLPOWDER, iron);
create(Names.ARROW, iron);
create(Names.AXE, iron);
create(Names.BOLT, iron);
create(Names.BOOTS, iron);
create(Names.BOW, iron);
create(Names.CHESTPLATE, iron);
create(Names.CRACKHAMMER, iron);
create(Names.CROSSBOW, iron);
create(Names.FISHING_ROD, iron);
create(Names.HELMET, iron);
create(Names.HOE, iron);
create(Names.HORSE_ARMOR, iron);
create(Names.LEGGINGS, iron);
create(Names.PICKAXE, iron);
create(Names.SHEARS, iron);
create(Names.SHIELD, iron);
create(Names.SHOVEL, iron);
create(Names.SLAB, iron);
create(Names.SWORD, iron);
create(Names.ROD, iron);
create(Names.GEAR, iron);
create(Names.SCYTHE, iron);
}
}
Aggregations