use of com.mcmoddev.lib.material.MMDMaterial in project BaseMetals by MinecraftModDevelopmentMods.
the class AquariumProperty method hasEffect.
@Override
public boolean hasEffect(ItemStack stack, EntityPlayer player) {
MMDMaterial mat = Materials.getMaterialByName(MaterialNames.AQUARIUM);
boolean rv = (stackIsArmorMaterial(stack, mat) && ((stack.getItem() instanceof IMMDObject) && (((IMMDObject) stack.getItem()).getMMDMaterial() == mat))) && (countArmorPieces(Materials.getMaterialByName(MaterialNames.AQUARIUM), player) > 0);
return rv;
}
use of com.mcmoddev.lib.material.MMDMaterial in project BaseMetals by MinecraftModDevelopmentMods.
the class Blocks method createMercury.
private static void createMercury() {
if (Materials.hasMaterial(MaterialNames.MERCURY)) {
final MMDMaterial mercury = Materials.getMaterialByName(MaterialNames.MERCURY);
create(Names.ORE, mercury);
if (mercury.hasBlock(Names.ORE)) {
mercury.getBlock(Names.ORE).setHardness(3.0f).setResistance(5.0f);
}
}
}
use of com.mcmoddev.lib.material.MMDMaterial in project BaseMetals by MinecraftModDevelopmentMods.
the class Blocks method init.
/**
*/
@SubscribeEvent
public static void init(final MMDLibRegisterBlocks event) {
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));
MinecraftForge.EVENT_BUS.register(Blocks.class);
}
use of com.mcmoddev.lib.material.MMDMaterial in project BaseMetals by MinecraftModDevelopmentMods.
the class BMeEnderIO method init.
/**
*/
@Override
public void init() {
if (!Options.isModEnabled(PLUGIN_MODID)) {
return;
}
final List<String> materials = Arrays.asList(MaterialNames.ADAMANTINE, MaterialNames.ANTIMONY, MaterialNames.AQUARIUM, MaterialNames.BISMUTH, MaterialNames.BRASS, MaterialNames.BRONZE, MaterialNames.COLDIRON, MaterialNames.CUPRONICKEL, MaterialNames.ELECTRUM, MaterialNames.INVAR, MaterialNames.MITHRIL, MaterialNames.PEWTER, MaterialNames.PLATINUM, MaterialNames.STARSTEEL, MaterialNames.STEEL, MaterialNames.TIN, MaterialNames.ZINC);
materials.stream().filter(Materials::hasMaterial).filter(materialName -> !Materials.getMaterialByName(materialName).isEmpty()).forEach(materialName -> addSagMillRecipe(materialName, 3600));
addSagMillRecipe(MaterialNames.COPPER, 2, MaterialNames.GOLD, 1, 3600);
addSagMillRecipe(MaterialNames.LEAD, 2, MaterialNames.SILVER, 1, 3600);
addSagMillRecipe(MaterialNames.NICKEL, 2, MaterialNames.PLATINUM, 1, 3600);
addSagMillRecipe(MaterialNames.SILVER, 2, MaterialNames.LEAD, 1, 3600);
addSagMillRecipe(MaterialNames.IRON, 2, MaterialNames.NICKEL, 1, 3600);
final String COPPER = "Copper";
final String IRON = "Iron";
final String NICKEL = "Nickel";
final String SILVER = "Silver";
final String TIN = "Tin";
final String ZINC = "Zinc";
final List<Pair<Integer, Triple<String, Integer, Object[]>>> alloys = Arrays.asList(Pair.of(3, Triple.of(MaterialNames.AQUARIUM, 20000, new Object[] { Oredicts.INGOT + COPPER, 2, Oredicts.INGOT + ZINC, 1, Oredicts.DUST + "Prismarine", 1 })), Pair.of(3, Triple.of(MaterialNames.BRASS, 2000, new Object[] { Oredicts.INGOT + COPPER, 2, Oredicts.INGOT + ZINC, 1 })), Pair.of(4, Triple.of(MaterialNames.BRONZE, 2000, new Object[] { Oredicts.INGOT + COPPER, 3, Oredicts.INGOT + TIN, 1 })), Pair.of(4, Triple.of(MaterialNames.CUPRONICKEL, 3000, new Object[] { Oredicts.INGOT + COPPER, 3, Oredicts.INGOT + NICKEL, 1 })), Pair.of(3, Triple.of(MaterialNames.INVAR, 3000, new Object[] { Oredicts.INGOT + IRON, 2, Oredicts.INGOT + NICKEL, 1 })), Pair.of(2, Triple.of(MaterialNames.ELECTRUM, 2000, new Object[] { Oredicts.INGOT + "Gold", 1, Oredicts.INGOT + SILVER, 1 })), Pair.of(2, Triple.of(MaterialNames.MITHRIL, 10000, new Object[] { Oredicts.INGOT + SILVER, 2, Oredicts.INGOT + "Coldiron", 1, Oredicts.INGOT + "Mercury", 1 })), Pair.of(3, Triple.of(MaterialNames.PEWTER, 2000, new Object[] { Oredicts.INGOT + TIN, 1, Oredicts.INGOT + COPPER, 1, Oredicts.INGOT + "Lead", 1 })), Pair.of(8, Triple.of(MaterialNames.STEEL, 5000, new Object[] { Oredicts.INGOT + IRON, 8, "itemCoal", 1 })));
alloys.stream().filter(p -> Materials.hasMaterial(p.getRight().getLeft())).forEach(p -> {
final String name = p.getRight().getLeft();
final int count = p.getLeft();
final int cost = p.getRight().getMiddle();
final Object[] recipe = p.getRight().getRight();
final MMDMaterial material = Materials.getMaterialByName(name);
addAlloySmelterAlloy(material, cost, Oredicts.INGOT + material.getCapitalizedName(), count, recipe);
});
}
use of com.mcmoddev.lib.material.MMDMaterial in project BaseMetals by MinecraftModDevelopmentMods.
the class Recipes method initModSpecificOredicts.
private static void initModSpecificOredicts() {
if (Materials.hasMaterial(MaterialNames.ADAMANTINE)) {
final MMDMaterial adamantine = Materials.getMaterialByName(MaterialNames.ADAMANTINE);
addAdditionalOredicts(adamantine, "Adamantite");
addAdditionalOredicts(adamantine, "Adamantium");
addAdditionalOredicts(adamantine, "Adamant");
}
if (Materials.hasMaterial(MaterialNames.MERCURY)) {
final MMDMaterial mercury = Materials.getMaterialByName(MaterialNames.MERCURY);
addAdditionalOredicts(mercury, "Quicksilver");
}
if (Materials.hasMaterial(MaterialNames.STEEL)) {
final MMDMaterial steel = Materials.getMaterialByName(MaterialNames.STEEL);
if (steel.hasItem(Names.GEAR)) {
OreDictionary.registerOre(Oredicts.SPROCKET, steel.getItemStack(Names.GEAR));
}
}
}
Aggregations