Esempio 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());
   }
 }
Esempio n. 2
0
 public static void registerAllRenderers() {
   for (ModBlocks block : ModBlocks.values()) {
     Minecraft.getMinecraft()
         .getRenderItem()
         .getItemModelMesher()
         .register(Item.getItemFromBlock(block.get()), 0, block.getResource());
   }
 }
Esempio 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();
   }
 }
Esempio n. 4
0
 public static void registerAllWorldGen() {
   for (ModBlocks block : ModBlocks.values()) {
     if (!(block.get() instanceof IWorldGenerator)) continue;
     GameRegistry.registerWorldGenerator((IWorldGenerator) block.get(), 0);
   }
 }