Package extrabiomes.proxy

Examples of extrabiomes.proxy.CommonProxy


      return;

    final BlockCustomSapling block = new BlockCustomSapling(16);
    block.setBlockName("extrabiomes.sapling").setHardness(0.0F).setStepSound(Block.soundTypeGrass).setCreativeTab(Extrabiomes.tabsEBXL);

    final CommonProxy proxy = Extrabiomes.proxy;
    proxy.registerBlock(block, extrabiomes.items.ItemSapling.class, "saplings_1");
    proxy.registerOreInAllSubblocks("treeSapling", block);

    Element.SAPLING_ACACIA.set(new ItemStack(block, 1, BlockCustomSapling.BlockType.ACACIA.metadata()));
    Element.SAPLING_AUTUMN_BROWN.set(new ItemStack(block, 1, BlockCustomSapling.BlockType.UMBER.metadata()));
    Element.SAPLING_AUTUMN_ORANGE.set(new ItemStack(block, 1, BlockCustomSapling.BlockType.GOLDENROD.metadata()));
    Element.SAPLING_AUTUMN_PURPLE.set(new ItemStack(block, 1, BlockCustomSapling.BlockType.VERMILLION.metadata()));
    Element.SAPLING_AUTUMN_YELLOW.set(new ItemStack(block, 1, BlockCustomSapling.BlockType.CITRINE.metadata()));
    Element.SAPLING_FIR.set(new ItemStack(block, 1, BlockCustomSapling.BlockType.FIR.metadata()));
    Element.SAPLING_REDWOOD.set(new ItemStack(block, 1, BlockCustomSapling.BlockType.REDWOOD.metadata()));
    Element.SAPLING_CYPRESS.set(new ItemStack(block, 1, BlockCustomSapling.BlockType.CYPRESS.metadata()));

    final ItemStack stack = new ItemStack(block, 1, Short.MAX_VALUE);

    // Temp fix so that NEI shows the fermenter recipies when you try to view
    // uses of saplings.
    // ForestryModHelper.registerSapling(stack);
    ForestryModHelper.registerSapling(Element.SAPLING_ACACIA.get());
    ForestryModHelper.registerSapling(Element.SAPLING_AUTUMN_BROWN.get());
    ForestryModHelper.registerSapling(Element.SAPLING_AUTUMN_ORANGE.get());
    ForestryModHelper.registerSapling(Element.SAPLING_AUTUMN_PURPLE.get());
    ForestryModHelper.registerSapling(Element.SAPLING_AUTUMN_YELLOW.get());
    ForestryModHelper.registerSapling(Element.SAPLING_FIR.get());
    ForestryModHelper.registerSapling(Element.SAPLING_REDWOOD.get());
    ForestryModHelper.registerSapling(Element.SAPLING_CYPRESS.get());
    ForestryModHelper.addToForesterBackpack(stack);

    // all but redwood
    final Element[] forestrySaplings = { Element.SAPLING_ACACIA, Element.SAPLING_AUTUMN_BROWN, Element.SAPLING_AUTUMN_ORANGE, Element.SAPLING_AUTUMN_PURPLE,
        Element.SAPLING_AUTUMN_YELLOW, Element.SAPLING_FIR, Element.SAPLING_CYPRESS };
    for (final Element sapling : forestrySaplings) {
      ForestryModHelper.registerGermling(sapling.get());
    }

    proxy.registerEventHandler(new SaplingBonemealEventHandler(block));
    proxy.registerFuelHandler(new SaplingFuelHandler(block));
  }
View Full Code Here


      return;

    final BlockNewSapling block = new BlockNewSapling();
    block.setBlockName("extrabiomes.sapling").setHardness(0.0F).setStepSound(Block.soundTypeGrass).setCreativeTab(Extrabiomes.tabsEBXL);

    final CommonProxy proxy = Extrabiomes.proxy;
    proxy.registerBlock(block, extrabiomes.items.ItemNewSapling.class, "saplings_2");
    proxy.registerOreInAllSubblocks("treeSapling", block);

    Element.SAPLING_BALD_CYPRESS.set(new ItemStack(block, 1, BlockNewSapling.BlockType.BALD_CYPRESS.metadata()));
    Element.SAPLING_JAPANESE_MAPLE.set(new ItemStack(block, 1, BlockNewSapling.BlockType.JAPANESE_MAPLE.metadata()));
    Element.SAPLING_JAPANESE_MAPLE_SHRUB.set(new ItemStack(block, 1, BlockNewSapling.BlockType.JAPANESE_MAPLE_SHRUB.metadata()));
    Element.SAPLING_RAINBOW_EUCALYPTUS.set(new ItemStack(block, 1, BlockNewSapling.BlockType.RAINBOW_EUCALYPTUS.metadata()));
    Element.SAPLING_SAKURA_BLOSSOM.set(new ItemStack(block, 1, BlockNewSapling.BlockType.SAKURA_BLOSSOM.metadata()));

    final ItemStack stack = new ItemStack(block, 1, Short.MAX_VALUE);

    // Temp fix so that NEI shows the fermenter recipies when you try to view
    // uses of saplings.
    // ForestryModHelper.registerSapling(stack);
    ForestryModHelper.registerSapling(Element.SAPLING_BALD_CYPRESS.get());
    ForestryModHelper.registerSapling(Element.SAPLING_JAPANESE_MAPLE.get());
    ForestryModHelper.registerSapling(Element.SAPLING_JAPANESE_MAPLE_SHRUB.get());
    ForestryModHelper.registerSapling(Element.SAPLING_RAINBOW_EUCALYPTUS.get());
    ForestryModHelper.registerSapling(Element.SAPLING_SAKURA_BLOSSOM.get());
    ForestryModHelper.addToForesterBackpack(stack);

    // all but redwood
    final Element[] forestrySaplings = { Element.SAPLING_JAPANESE_MAPLE, Element.SAPLING_JAPANESE_MAPLE_SHRUB, Element.SAPLING_SAKURA_BLOSSOM };
    for (final Element sapling : forestrySaplings) {
      ForestryModHelper.registerGermling(sapling.get());
    }

    proxy.registerEventHandler(new SaplingBonemealNewEventHandler(block));
    proxy.registerFuelHandler(new SaplingFuelHandler(block));
  }
View Full Code Here

    final BlockCustomLog block = new BlockCustomLog();
    block.setBlockName("extrabiomes.log").setStepSound(Block.soundTypeWood).setHardness(2.0F).setResistance(Blocks.log.getExplosionResistance(null) * 5.0F)
        .setCreativeTab(Extrabiomes.tabsEBXL);

    final CommonProxy proxy = Extrabiomes.proxy;
    proxy.setBlockHarvestLevel(block, "axe", 0);
    proxy.registerBlock(block, extrabiomes.utility.MultiItemBlock.class, "log1");
    proxy.registerOreInAllSubblocks("logWood", block);
    proxy.registerEventHandler(block);
    Blocks.fire.setFireInfo(block, 5, 5);

    Element.LOG_ACACIA.set(new ItemStack(block, 1, BlockCustomLog.BlockType.ACACIA.metadata()));
    Element.LOG_FIR.set(new ItemStack(block, 1, BlockCustomLog.BlockType.FIR.metadata()));
    Element.LOG_CYPRESS.set(new ItemStack(block, 1, BlockCustomLog.BlockType.CYPRESS.metadata()));
    Element.LOG_JAPANESE_MAPLE.set(new ItemStack(block, 1, BlockCustomLog.BlockType.JAPANESE_MAPLE.metadata()));

    ForestryModHelper.addToForesterBackpack(new ItemStack(block, 1, Short.MAX_VALUE));
    for (final BlockCustomLog.BlockType type : BlockCustomLog.BlockType.values()) {
      //FacadeHelper.addBuildcraftFacade(block, type.metadata());
    }

    if (!ModuleControlSettings.SUMMA.isEnabled() || !BlockSettings.NEWLOG.getEnabled())
      return;

    final BlockNewLog block2 = new BlockNewLog(BlockSettings.NEWLOG);
    block2.setBlockName("extrabiomes.newlog").setStepSound(Block.soundTypeWood).setHardness(2.0F).setResistance(Blocks.log.getExplosionResistance(null) * 5.0F).setCreativeTab(Extrabiomes.tabsEBXL);

    proxy.setBlockHarvestLevel(block2, "axe", 0);
    proxy.registerBlock(block2, extrabiomes.utility.MultiItemBlock.class, "log2");
    proxy.registerOreInAllSubblocks("logWood", block2);
    proxy.registerEventHandler(block2);
    Blocks.fire.setFireInfo(block2, 5, 5);

    Element.LOG_RAINBOW_EUCALYPTUS.set(new ItemStack(block2, 1, BlockNewLog.BlockType.RAINBOW_EUCALYPTUS.metadata()));
    Element.LOG_AUTUMN.set(new ItemStack(block2, 1, BlockNewLog.BlockType.AUTUMN.metadata()));
    Element.LOG_BALD_CYPRESS.set(new ItemStack(block2, 1, BlockNewLog.BlockType.BALD_CYPRESS.metadata()));
View Full Code Here

      for( BlockCropBasic.CropType type : BlockCropBasic.CropType.values() ) {
      }
    }
   
    private static void createRegrowCrops() {
    final CommonProxy proxy = Extrabiomes.proxy;

      for( BlockCropRegrow.CropType type : BlockCropRegrow.CropType.values() ) {
      final String name = type.name();

        final BlockSettings plant_settings;
        final Element plant_element;
        final Element crop_element;

        try {
          plant_settings = BlockSettings.valueOf(name);
         
            if(!plant_settings.getEnabled()) continue;
         
        plant_element = Element.valueOf("PLANT_" + name);
        crop_element = Element.valueOf("CROP_" + name);
        } catch( Exception e ) {
        LogHelper.warning("Missing settings or elements for plant " + type);
          continue;
        }
       
        final BlockCropRegrow block = new BlockCropRegrow(type);
            block.setCropItem(crop_element.get().getItem());
            block.setBlockName("extrabiomes.crop." + name.toLowerCase());
            proxy.registerEventHandler(new CropBonemealEventHandler(block));
            proxy.registerBlock(block, block.getUnlocalizedName());

            final ItemStack plant_stack = new ItemStack(block);
      plant_element.set(plant_stack);
      }
    }
View Full Code Here

    }
   
    @SubscribeEvent
    public void redRockRecipeHandler(RedRockActiveEvent event)
    {
        final CommonProxy proxy = Extrabiomes.proxy;
       
        redRockItem = Optional.of(new ItemStack(event.block, 1, BlockRedRock.BlockType.RED_ROCK.metadata()));
        redCobbleItem = Optional.of(new ItemStack(event.block, 1, BlockRedRock.BlockType.RED_COBBLE.metadata()));
        redRockBrickItem = Optional.of(new ItemStack(event.block, 1, BlockRedRock.BlockType.RED_ROCK_BRICK.metadata()));
       
        IRecipe recipe = new ShapelessOreRecipe(new ItemStack(Items.clay_ball, 4), redCobbleItem.get(), Items.water_bucket, Items.water_bucket, Items.water_bucket);
        proxy.addRecipe(recipe);
       
        recipe = new ShapedOreRecipe(new ItemStack(event.block, 4, BlockRedRock.BlockType.RED_ROCK_BRICK.metadata()), new String[] { "rr", "rr" }, 'r', redRockItem.get());
        proxy.addRecipe(recipe);
       
        proxy.addSmelting(Item.getItemFromBlock(event.block), BlockRedRock.BlockType.RED_COBBLE.metadata(), redRockItem.get(), 0.1F);
    }
View Full Code Here

    }
   
    @SubscribeEvent
    public void redRockSlabRecipeHandler(RedRockSlabActiveEvent event)
    {
        final CommonProxy proxy = Extrabiomes.proxy;
       
        if (redRockItem.isPresent())
        {
            final IRecipe recipe = new ShapedOreRecipe(new ItemStack(event.block, 6,
                    BlockRedRockSlab.BlockType.REDROCK.metadata()), new String[] { "rrr" }, 'r', redRockItem.get());
            proxy.addRecipe(recipe);
        }
       
        if (redCobbleItem.isPresent())
        {
            final IRecipe recipe = new ShapedOreRecipe(new ItemStack(event.block, 6, BlockRedRockSlab.BlockType.REDCOBBLE.metadata()), new String[] { "rrr" }, 'r', redCobbleItem.get());
            proxy.addRecipe(recipe);
        }
       
        if (redRockBrickItem.isPresent())
        {
            final IRecipe recipe = new ShapedOreRecipe(new ItemStack(event.block, 6, BlockRedRockSlab.BlockType.REDROCKBRICK.metadata()), new String[] { "rrr" }, 'r', redRockBrickItem.get());
            proxy.addRecipe(recipe);
        }
    }
View Full Code Here

  protected void registerFlower(BiomeSettings settings, BlockType type) {
    if (!settings.getBiome().isPresent()) return;

        BiomeGenBase biome = settings.getBiome().get();
        final CommonProxy proxy = Extrabiomes.proxy;
        proxy.addGrassPlant(type.block(), type.metadata(), type.weight(), biome);

    final List<BlockType> list;
    if (flowerMaps.containsKey(settings)) {
      list = flowerMaps.get(settings);
    } else {
View Full Code Here

        setBlockBounds(0.5F - offset, 0.0F, 0.5F - offset, 0.5F + offset, offset * 3.0F, 0.5F + offset);
       
        this.group = group;
    this.groupMap = Maps.newHashMap();

        final CommonProxy proxy = Extrabiomes.proxy;
        for( BlockType type : BlockType.values() ) {
      if (type.group == this.group) {
        //LogHelper.info(this+": "+group+":"+type.metadata+" = "+type);
        groupMap.put(type.metadata, type);
        if (type.weight > 0) {
          proxy.addGrassPlant(this, type.metadata, type.weight);
        }
          }
        }
    //LogHelper.fine(this.toString() + ": initialized group " + group + ", " + groupMap.size() + " flowers");
    }
View Full Code Here

TOP

Related Classes of extrabiomes.proxy.CommonProxy

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.