use of com.mcmoddev.lib.material.MMDMaterial in project BaseMetals by MinecraftModDevelopmentMods.
the class Recipes method initGeneralRecipes.
protected static void initGeneralRecipes() {
for (final MMDMaterial material : Materials.getAllMaterials()) {
if (material.isEmpty()) {
continue;
}
// first we handle any recipes possibly involving transformations of an
// ore-block
// this also handles ingot->powder, block->powder, etc..
makePowderRecipes(material);
// nugget->ingot, ore->ingot, powder->ingot
makeIngotRecipes(material);
// nugget based recipes
makeNuggetRecipes(material);
// then the rest of the basic stuff
// slab, wall, small-powder, rod, lever, crackhammer, trapdoor, etc...
makeSimpleRecipes(material);
// rod, gear, etc...
makeModRecipes(material);
// ranged weapons all use the 'ROD' of a material
if (material.hasItem(Names.ROD)) {
makeCrossbowRecipes(material);
makeBowRecipes(material);
}
// for now this can live here
if (material.hasItem(Names.INGOT)) {
// Vanilla has all the base tools & armors where they currently matter.
generateBaseTools(material);
}
furnaceSpecial(material);
}
}
use of com.mcmoddev.lib.material.MMDMaterial 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));
}
}
use of com.mcmoddev.lib.material.MMDMaterial in project BaseMetals by MinecraftModDevelopmentMods.
the class TinkersConstruct method registerMaterial.
private void registerMaterial(final String name, final boolean castable, final boolean craftable, final String... traits) {
if (!Materials.hasMaterial(name)) {
return;
}
final MMDMaterial mmdMat = Materials.getMaterialByName(name);
final TCMaterial mat = registry.newMaterial(name, mmdMat.getTintColor());
if (mmdMat.isEmpty()) {
return;
}
if (castable) {
mat.setCastable();
}
if (craftable) {
mat.setCraftable();
}
mat.setSourceMaterial(mmdMat);
mat.genStatsFromSource();
if (traits.length > 0) {
addTraits(mat, traits);
}
mat.settle();
}
use of com.mcmoddev.lib.material.MMDMaterial in project BaseMetals by MinecraftModDevelopmentMods.
the class Blocks method registerVanilla.
private static void registerVanilla() {
// Vanilla Materials get their Ore and Block always
final MMDMaterial charcoal = Materials.getMaterialByName(MaterialNames.CHARCOAL);
final MMDMaterial coal = Materials.getMaterialByName(MaterialNames.COAL);
final MMDMaterial diamond = Materials.getMaterialByName(MaterialNames.DIAMOND);
final MMDMaterial emerald = Materials.getMaterialByName(MaterialNames.EMERALD);
final MMDMaterial gold = Materials.getMaterialByName(MaterialNames.GOLD);
final MMDMaterial iron = Materials.getMaterialByName(MaterialNames.IRON);
final MMDMaterial lapis = Materials.getMaterialByName(MaterialNames.LAPIS);
final MMDMaterial obsidian = Materials.getMaterialByName(MaterialNames.OBSIDIAN);
final MMDMaterial quartz = Materials.getMaterialByName(MaterialNames.QUARTZ);
final MMDMaterial redstone = Materials.getMaterialByName(MaterialNames.REDSTONE);
coal.addNewBlock(Names.BLOCK, net.minecraft.init.Blocks.COAL_BLOCK);
coal.addNewBlock(Names.ORE, net.minecraft.init.Blocks.COAL_ORE);
diamond.addNewBlock(Names.BLOCK, net.minecraft.init.Blocks.DIAMOND_BLOCK);
diamond.addNewBlock(Names.ORE, net.minecraft.init.Blocks.DIAMOND_ORE);
emerald.addNewBlock(Names.BLOCK, net.minecraft.init.Blocks.EMERALD_BLOCK);
emerald.addNewBlock(Names.ORE, net.minecraft.init.Blocks.EMERALD_ORE);
gold.addNewBlock(Names.BLOCK, net.minecraft.init.Blocks.GOLD_BLOCK);
gold.addNewBlock(Names.ORE, net.minecraft.init.Blocks.GOLD_ORE);
gold.addNewBlock(Names.PRESSURE_PLATE, net.minecraft.init.Blocks.LIGHT_WEIGHTED_PRESSURE_PLATE);
iron.addNewBlock(Names.BLOCK, net.minecraft.init.Blocks.IRON_BLOCK);
iron.addNewBlock(Names.ORE, net.minecraft.init.Blocks.IRON_ORE);
iron.addNewBlock(Names.BARS, net.minecraft.init.Blocks.IRON_BARS);
iron.addNewBlock(Names.DOOR, net.minecraft.init.Blocks.IRON_DOOR);
iron.addNewBlock(Names.TRAPDOOR, net.minecraft.init.Blocks.IRON_TRAPDOOR);
iron.addNewBlock(Names.PRESSURE_PLATE, net.minecraft.init.Blocks.HEAVY_WEIGHTED_PRESSURE_PLATE);
lapis.addNewBlock(Names.BLOCK, net.minecraft.init.Blocks.LAPIS_BLOCK);
lapis.addNewBlock(Names.ORE, net.minecraft.init.Blocks.LAPIS_ORE);
obsidian.addNewBlock(Names.BLOCK, net.minecraft.init.Blocks.OBSIDIAN);
quartz.addNewBlock(Names.BLOCK, net.minecraft.init.Blocks.QUARTZ_BLOCK);
quartz.addNewBlock(Names.ORE, net.minecraft.init.Blocks.QUARTZ_ORE);
quartz.addNewBlock(Names.STAIRS, net.minecraft.init.Blocks.QUARTZ_STAIRS);
redstone.addNewBlock(Names.BLOCK, net.minecraft.init.Blocks.REDSTONE_BLOCK);
redstone.addNewBlock(Names.ORE, net.minecraft.init.Blocks.REDSTONE_ORE);
if (Materials.hasMaterial(MaterialNames.CHARCOAL)) {
create(Names.BLOCK, charcoal);
}
if (Materials.hasMaterial(MaterialNames.DIAMOND)) {
create(Names.BARS, diamond);
create(Names.DOOR, diamond);
create(Names.TRAPDOOR, diamond);
create(Names.BUTTON, diamond);
create(Names.SLAB, diamond);
create(Names.DOUBLE_SLAB, diamond);
create(Names.LEVER, diamond);
create(Names.PRESSURE_PLATE, diamond);
create(Names.STAIRS, diamond);
create(Names.WALL, diamond);
}
if (Materials.hasMaterial(MaterialNames.EMERALD)) {
create(Names.BARS, emerald);
create(Names.DOOR, emerald);
create(Names.TRAPDOOR, emerald);
create(Names.BUTTON, emerald);
create(Names.SLAB, emerald);
create(Names.DOUBLE_SLAB, emerald);
create(Names.LEVER, emerald);
create(Names.PRESSURE_PLATE, emerald);
create(Names.STAIRS, emerald);
create(Names.WALL, emerald);
}
if (Materials.hasMaterial(MaterialNames.GOLD)) {
create(Names.PLATE, gold);
create(Names.BARS, gold);
create(Names.DOOR, gold);
create(Names.TRAPDOOR, gold);
create(Names.BUTTON, gold);
create(Names.SLAB, gold);
create(Names.DOUBLE_SLAB, gold);
create(Names.LEVER, gold);
create(Names.PRESSURE_PLATE, gold);
create(Names.STAIRS, gold);
create(Names.WALL, gold);
}
if (Materials.hasMaterial(MaterialNames.IRON)) {
create(Names.PLATE, iron);
create(Names.BUTTON, iron);
create(Names.SLAB, iron);
create(Names.DOUBLE_SLAB, iron);
create(Names.LEVER, iron);
create(Names.PRESSURE_PLATE, iron);
create(Names.STAIRS, iron);
create(Names.WALL, iron);
}
if (Materials.hasMaterial(MaterialNames.OBSIDIAN)) {
create(Names.BARS, obsidian);
create(Names.DOOR, obsidian);
create(Names.TRAPDOOR, obsidian);
create(Names.BUTTON, obsidian);
create(Names.SLAB, obsidian);
create(Names.DOUBLE_SLAB, obsidian);
create(Names.LEVER, obsidian);
create(Names.PRESSURE_PLATE, obsidian);
create(Names.STAIRS, obsidian);
create(Names.WALL, obsidian);
}
if (Materials.hasMaterial(MaterialNames.QUARTZ)) {
create(Names.BARS, quartz);
create(Names.DOOR, quartz);
create(Names.TRAPDOOR, quartz);
create(Names.BUTTON, quartz);
create(Names.LEVER, quartz);
create(Names.PRESSURE_PLATE, quartz);
create(Names.WALL, quartz);
}
if (Materials.hasMaterial(MaterialNames.STONE)) {
// Stub
}
if (Materials.hasMaterial(MaterialNames.WOOD)) {
// Stub
}
}
use of com.mcmoddev.lib.material.MMDMaterial in project BaseMetals by MinecraftModDevelopmentMods.
the class Items method addDiamondBits.
private static void addDiamondBits() {
final MMDMaterial diamond = Materials.getMaterialByName(MaterialNames.DIAMOND);
diamond.addNewItem(Names.AXE, net.minecraft.init.Items.DIAMOND_AXE);
diamond.addNewItem(Names.HOE, net.minecraft.init.Items.DIAMOND_HOE);
diamond.addNewItem(Names.HORSE_ARMOR, net.minecraft.init.Items.DIAMOND_HORSE_ARMOR);
diamond.addNewItem(Names.PICKAXE, net.minecraft.init.Items.DIAMOND_PICKAXE);
diamond.addNewItem(Names.SHOVEL, net.minecraft.init.Items.DIAMOND_SHOVEL);
diamond.addNewItem(Names.SWORD, net.minecraft.init.Items.DIAMOND_SWORD);
diamond.addNewItem(Names.BOOTS, net.minecraft.init.Items.DIAMOND_BOOTS);
diamond.addNewItem(Names.CHESTPLATE, net.minecraft.init.Items.DIAMOND_CHESTPLATE);
diamond.addNewItem(Names.HELMET, net.minecraft.init.Items.DIAMOND_HELMET);
diamond.addNewItem(Names.LEGGINGS, net.minecraft.init.Items.DIAMOND_LEGGINGS);
diamond.addNewItem(Names.INGOT, net.minecraft.init.Items.DIAMOND);
if (Materials.hasMaterial(MaterialNames.DIAMOND)) {
create(Names.BLEND, diamond);
create(Names.NUGGET, diamond);
create(Names.POWDER, diamond);
create(Names.SMALLBLEND, diamond);
create(Names.SMALLPOWDER, diamond);
create(Names.ARROW, diamond);
create(Names.BOLT, diamond);
create(Names.BOW, diamond);
create(Names.CRACKHAMMER, diamond);
create(Names.CROSSBOW, diamond);
create(Names.DOOR, diamond);
create(Names.FISHING_ROD, diamond);
create(Names.SHEARS, diamond);
create(Names.SHIELD, diamond);
create(Names.SLAB, diamond);
create(Names.ROD, diamond);
create(Names.GEAR, diamond);
create(Names.SCYTHE, diamond);
}
}
Aggregations