Package extrabiomes.module.summa.worldgen

Examples of extrabiomes.module.summa.worldgen.FlowerGenerator


      return;

    final boolean enableds[] = { BlockSettings.FLOWER.getEnabled(), BlockSettings.FLOWER2.getEnabled(), BlockSettings.FLOWER3.getEnabled() };

    final CommonProxy proxy = Extrabiomes.proxy;
    final FlowerGenerator generator = FlowerGenerator.getInstance();

    for (int group = 0; group < enableds.length; ++group) {
      if (!enableds[group])
        continue;

      final BlockCustomFlower block = new BlockCustomFlower(group, Material.plants);
      block.setBlockName("extrabiomes.flower").setTickRandomly(true).setHardness(0.0F).setStepSound(Block.soundTypeGrass).setCreativeTab(Extrabiomes.tabsEBXL);
      proxy.registerBlock(block, extrabiomes.items.ItemFlower.class, "flower" + (group + 1));

      Collection<BlockType> types = block.getGroupTypes();
      for (BlockType type : types) {
        final Element element;
        try {
          element = Element.valueOf(type.name());
        } catch (Exception e) {
          LogHelper.warning("No element found for flower " + type);
          continue;
        }
        type.setBlock(block);
        ItemStack item = new ItemStack(block, 1, type.metadata());
        element.set(item);
        ForestryModHelper.registerBasicFlower(item);
      }

      generator.registerBlock(block, types);
      ForestryModHelper.addToForesterBackpack(new ItemStack(block, 1, Short.MAX_VALUE));
    }

    proxy.registerWorldGenerator(generator);
  }
View Full Code Here


    }
   
  private static void registerWildCrops() {
    Element[] crops = { Element.PLANT_STRAWBERRY };

    final FlowerGenerator generator = FlowerGenerator.getInstance();
    for (Element crop : crops) {
      generator.registerCrop(crop);
    }
  }
View Full Code Here

TOP

Related Classes of extrabiomes.module.summa.worldgen.FlowerGenerator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.