public static void registerAll() { for (ModBlocks block : ModBlocks.values()) { Block b = block.get(); b.setLightLevel(1.0f); GameRegistry.registerBlock(b, block.getName()); } }
public static void registerAllRenderers() { for (ModBlocks block : ModBlocks.values()) { Minecraft.getMinecraft() .getRenderItem() .getItemModelMesher() .register(Item.getItemFromBlock(block.get()), 0, block.getResource()); } }
public static void registerAllCrafting() { for (ModBlocks block : ModBlocks.values()) { if (!(block.get() instanceof Craftable)) continue; Craftable craftable = (Craftable) block.get(); craftable.initCrafting(); craftable.registerShapedRecipies(); craftable.registerShapelessRecipies(); craftable.registerSmeltingRecipies(); } }
public static void registerAllWorldGen() { for (ModBlocks block : ModBlocks.values()) { if (!(block.get() instanceof IWorldGenerator)) continue; GameRegistry.registerWorldGenerator((IWorldGenerator) block.get(), 0); } }