Search in sources :

Example 1 with BlockHumanDetector

use of com.mcmoddev.lib.block.BlockHumanDetector 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));
}
Also used : MMDMaterial(com.mcmoddev.lib.material.MMDMaterial) BlockHumanDetector(com.mcmoddev.lib.block.BlockHumanDetector)

Example 2 with BlockHumanDetector

use of com.mcmoddev.lib.block.BlockHumanDetector 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);
}
Also used : MMDMaterial(com.mcmoddev.lib.material.MMDMaterial) BlockHumanDetector(com.mcmoddev.lib.block.BlockHumanDetector) SubscribeEvent(net.minecraftforge.fml.common.eventhandler.SubscribeEvent)

Aggregations

BlockHumanDetector (com.mcmoddev.lib.block.BlockHumanDetector)2 MMDMaterial (com.mcmoddev.lib.material.MMDMaterial)2 SubscribeEvent (net.minecraftforge.fml.common.eventhandler.SubscribeEvent)1