Example #1
0
 public static void registerAll() {
   for (ModBlocks block : ModBlocks.values()) {
     Block b = block.get();
     b.setLightLevel(1.0f);
     GameRegistry.registerBlock(b, block.getName());
   }
 }
Example #2
0
 public static void registerAllRenderers() {
   for (ModBlocks block : ModBlocks.values()) {
     Minecraft.getMinecraft()
         .getRenderItem()
         .getItemModelMesher()
         .register(Item.getItemFromBlock(block.get()), 0, block.getResource());
   }
 }
Example #3
0
 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();
   }
 }
Example #4
0
 public static void registerAllWorldGen() {
   for (ModBlocks block : ModBlocks.values()) {
     if (!(block.get() instanceof IWorldGenerator)) continue;
     GameRegistry.registerWorldGenerator((IWorldGenerator) block.get(), 0);
   }
 }