Package buildcraft.transport

Examples of buildcraft.transport.ItemPipe


      prop.set(id);
    } catch (NoSuchMethodError e) {
      // e.printStackTrace();
    }

    ItemPipe pipe = BlockGenericPipe.registerPipe(id, clazz);
    pipe.setUnlocalizedName(clazz.getSimpleName());
    LanguageRegistry.addName(pipe, descr);
    GameRegistry.registerItem(pipe, pipe.getUnlocalizedName().replace("item.", ""));

    return pipe;
  }
View Full Code Here


    return pipe;
  }

  private static Item createPipe(int defaultID, Class<? extends Pipe> clazz, String descr, int count, boolean isShapeless, Object[] ingredients) {
    ItemPipe pipe = createPipe(defaultID, clazz, descr);

    addReceipe(pipe, count, isShapeless, ingredients);

    return pipe;
  }
View Full Code Here

    return pipe;
  }

  private static Item createPipe(int defaultID, Class<? extends Pipe> clazz, String descr, int count, Object ingredient1, Object ingredient2, Object ingredient3) {
    ItemPipe pipe = createPipe(defaultID, clazz, descr);

    addReceipe(pipe, count, ingredient1, ingredient2, ingredient3);

    return pipe;
  }
View Full Code Here

  /**
   * Overriding the method in BlockGenericPipe to fix localizations.
   */
  @SuppressWarnings("rawtypes")
  public static ItemPipe registerPipe(Class<? extends Pipe> clas, CreativeTabBuildCraft creativeTab) {
    ItemPipe item = null;
    try {
      Constructor<ItemPipe> ctor = ItemPipe.class.getDeclaredConstructor(CreativeTabBuildCraft.class);
      ctor.setAccessible(true);
      item = ctor.newInstance(creativeTab);
    } catch (Exception e) {
      e.printStackTrace();
    }
    assert item != null : "The ItemPipe instance must not be null";
    item.setUnlocalizedName(clas.getSimpleName());
    GameRegistry.registerItem(item, item.getUnlocalizedName());

    BlockGenericPipe.pipes.put(item, clas);

    Pipe dummyPipe = BlockGenericPipe.createPipe(item);
    if (dummyPipe != null) {
      item.setPipeIconIndex(dummyPipe.getIconIndexForItem());
      TransportProxy.proxy.setIconProviderFromPipe(item, dummyPipe);
    }

    return item;
  }
View Full Code Here

  }

  public static Item buildPipe(Class<? extends Pipe> clas,
      String descr, CreativeTabBuildCraft creativeTab,
      Object... ingredients) {
    ItemPipe res = BlockGenericPipe.registerPipe(clas, creativeTab);
    res.setUnlocalizedName(clas.getSimpleName());
   
    // Add appropriate recipes to temporary list
    if (ingredients.length == 3) {
      for (int i = 0; i < 17; i++) {
        PipeRecipe recipe = new PipeRecipe();
View Full Code Here

TOP

Related Classes of buildcraft.transport.ItemPipe

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.