コード例 #1
0
  public static void init() {
    MicroMaterialRegistry.registerMaterial(
        new BlockMicroMaterial(RemIMPluginsCommon.getFrameBlock(), 0), "tile.hollowCarriage.open");
    MicroMaterialRegistry.registerMaterial(
        new BlockMicroMaterial(RemIMPluginsCommon.getFrameBlock(), 1),
        "tile.hollowCarriage.closed");
    MicroMaterialRegistry.registerMaterial(
        new BlockMicroMaterial(RemIMPluginsCommon.getFrameBlock(), 2),
        "tile.hollowCarriage.corners");

    MultiPartRegistry.registerParts(
        new IPartFactory() {
          @Override
          public TMultiPart createPart(String arg0, boolean arg1) {
            if (arg0.equals("FMPCarriage")) {
              return new PartCarriageFMP();
            }
            return null;
          }
        },
        new String[] {"FMPCarriage"});

    RiMRegistry.registerFrameCarriageMatcher(new FMPCarriageMatcher());
    RiMRegistry.registerCloseableFactory(new FMPCloseableRetriever());

    RiMRegistry.registerFrameCarriageMatcher(new MicroblockCarriageMatcher());
    RiMRegistry.registerCloseableFactory(new MicroblockCloseableFactory());
  }
コード例 #2
0
  public static void postInit() {
    hollowCarriage.setCreativeTab(CreativeTab.Instance);
    GameRegistry.addRecipe(
        new ItemStack(FMPCarriagePlugin.hollowCarriage, 8),
        "ccc",
        "c c",
        "ccc",
        Character.valueOf('c'),
        new ItemStack(RemIMPluginsCommon.getFrameBlock(), 1, 0));

    GameRegistry.addShapelessRecipe(
        new ItemStack(RemIMPluginsCommon.getFrameBlock()),
        new ItemStack(FMPCarriagePlugin.hollowCarriage));
  }
コード例 #3
0
  public static void tryLoad() {
    Debug.dbg("FMP carriage: loading");
    hollowCarriage = new ItemCarriageFMP();

    hollowCarriage.setUnlocalizedName("hollowCarriage");
    GameRegistry.registerItem(hollowCarriage, "Hollow Carriage");

    FMLInterModComms.sendMessage(
        "ForgeMicroblock", "microMaterial", new ItemStack(RemIMPluginsCommon.getFrameBlock()));
    // Attempting to fix FMP crashing when trying to set creative tab
  }