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