Пример #1
0
  @Override
  public void registerTileEntities() {
    super.registerTileEntities();

    IReloadableResourceManager IRRM =
        (IReloadableResourceManager) Minecraft.getMinecraft().getResourceManager();
    IRRM.registerReloadListener(this);

    RenderManager rm = Minecraft.getMinecraft().getRenderManager();

    RenderingRegistry.registerEntityRenderingHandler(EntityStone.class, new RenderEntityStone());
    RenderingRegistry.registerEntityRenderingHandler(
        EntityMobHorse.class, new RenderHorse(rm, new ModelHorse(), 0.75f));
    RenderingRegistry.registerEntityRenderingHandler(
        EntityForestSpider.class, new RenderForestSpider(rm));
    RenderingRegistry.registerEntityRenderingHandler(
        EntityCoalPoweredMinecartVC.class, new RenderMinecart(rm));
    RenderingRegistry.registerEntityRenderingHandler(
        EntityEmptyMinecartVC.class, new RenderMinecart(rm));

    RenderingRegistry.registerEntityRenderingHandler(
        EntityCowVC.class, new RenderCow(rm, new ModelCowVC(), 0.7F));
    RenderingRegistry.registerEntityRenderingHandler(
        EntitySheepVC.class, new RenderSheep(rm, new ModelSheep2(), 0.7F));
  }
Пример #2
0
  @Override
  public void init(FMLInitializationEvent event) {
    super.init(event);

    ClientCommandHandler.instance.registerCommand(new ClientCommandsVC());

    MinecraftForge.EVENT_BUS.register(this);
    FMLCommonHandler.instance().bus().register(this);
    MinecraftForge.EVENT_BUS.register(new RenderFog());

    if (VintageCraftConfig.rearrangeCreativeTabs) {
      int i = 0;

      CreativeTabs[] tabs = new CreativeTabs[CreativeTabs.creativeTabArray.length];

      for (CreativeTabs tab : CreativeTabs.creativeTabArray) {
        if (tab instanceof CreativeTabsVC) {
          if (i == 5 || i == 11) i++; // don't touch search tab or inventory tab
          tab.tabIndex = i;
          tabs[i++] = tab;
        }
      }

      tabs[5] = CreativeTabs.tabAllSearch;
      tabs[11] = CreativeTabs.tabInventory;
      i = 7;

      for (CreativeTabs tab : CreativeTabs.creativeTabArray) {
        if (!(tab instanceof CreativeTabsVC)
            && !tab.getTabLabel().equals("search")
            && !tab.getTabLabel().equals("inventory")) {
          if (i == 11) i++;
          tab.tabIndex = i;
          tabs[i++] = tab;
        }
      }

      CreativeTabs.creativeTabArray = tabs;

      /*for (CreativeTabs tab : CreativeTabs.creativeTabArray) {
      	System.out.println(tab.getTabLabel() + ": " + tab.tabIndex);
      }*/
    }
  }
Пример #3
0
  @Override
  public void postInit(FMLPostInitializationEvent event) {
    super.postInit(event);

    registerModelLocation(Item.getItemFromBlock(BlocksVC.woodenrail), "woodenrail", "inventory");

    registerModelLocation(Item.getItemFromBlock(BlocksVC.saltlamp), "saltlamp", "inventory");

    registerModelLocation(
        Item.getItemFromBlock(BlocksVC.tallmetalmolds), "tallmetalmolds", "inventory");

    registerModelLocation(
        Item.getItemFromBlock(BlocksVC.blastpowdersack), "blastpowdersack", "inventory");

    addVariantNamesFromEnum(
        Item.getItemFromBlock(BlocksVC.stonepot), "vintagecraft:stonepot/", EnumRockType.values());
    registerModelLocation(Item.getItemFromBlock(BlocksVC.stonepot), "stonepot", "inventory");

    registerModelLocation(Item.getItemFromBlock(BlocksVC.toolrack), "toolrack", "inventory");

    addVariantNamesFromEnum(
        Item.getItemFromBlock(BlocksVC.axle), "vintagecraft:axle/", EnumTree.values());
    registerModelLocation(Item.getItemFromBlock(BlocksVC.axle), "axle", "inventory");

    addVariantNamesFromEnum(
        Item.getItemFromBlock(BlocksVC.angledgears),
        "vintagecraft:angledgearbox/",
        EnumTree.values());
    registerModelLocation(
        Item.getItemFromBlock(BlocksVC.angledgears), "angledgearbox", "inventory");

    addVariantNamesFromEnum(
        Item.getItemFromBlock(BlocksVC.windmillrotor),
        "vintagecraft:windmillrotor/",
        EnumTree.values());
    registerModelLocation(
        Item.getItemFromBlock(BlocksVC.windmillrotor), "windmillrotor", "inventory");

    addVariantNamesFromEnum(
        Item.getItemFromBlock(BlocksVC.bellows), "vintagecraft:bellows/", EnumTree.values());
    registerModelLocation(Item.getItemFromBlock(BlocksVC.bellows), "bellows", "inventory");

    addVariantNamesFromEnum(
        Item.getItemFromBlock(BlocksVC.grindstone),
        "vintagecraft:grindstone/",
        EnumRockType.values());
    registerModelLocation(Item.getItemFromBlock(BlocksVC.grindstone), "grindstone", "inventory");

    for (EnumTree treetype : EnumTree.values()) {
      if (treetype.jankahardness > 800) {
        ModelBakery.addVariantName(
            Item.getItemFromBlock(BlocksVC.carpenterTable),
            "vintagecraft:carpentertable/" + treetype.getName());

        for (EnumBucketContents cnt : EnumBucketContents.values()) {
          ModelBakery.addVariantName(
              Item.getItemFromBlock(BlocksVC.woodbucket),
              "vintagecraft:woodbucket/" + treetype.getName() + "-" + cnt.getName());
        }
      }
    }
    registerModelLocation(Item.getItemFromBlock(BlocksVC.woodbucket), "woodbucket", "inventory");
    registerModelLocation(
        Item.getItemFromBlock(BlocksVC.carpenterTable), "carpentertable", "inventory");

    registerModelLocation(ItemsVC.stone, "stone", "inventory");
    registerModelLocation(ItemsVC.seeds, "seeds", "inventory");

    registerModelLocation(ItemsVC.fireclay_ball, "fireclay_ball", "inventory");
    registerModelLocation(ItemsVC.fireclay_brick_raw, "fireclay_brick_raw", "inventory");
    registerModelLocation(ItemsVC.fireclay_brick, "fireclay_brick", "inventory");

    registerModelLocation(ItemsVC.ore, "ore", "inventory");
    registerModelLocation(ItemsVC.metalingot, "ingot", "inventory");

    registerModelLocation(ItemsVC.seeds, "seeds", "inventory");
    registerModelLocation(ItemsVC.dryGrass, "drygrass", "inventory");

    registerModelLocation(ItemsVC.coalpoweredMinecart, "minecart/coalpowered", "inventory");
    registerModelLocation(ItemsVC.emptyMinecart, "minecart/empty", "inventory");

    registerModelLocation(ItemsVC.blastingPowder, "blastingpowder", "inventory");
    registerModelLocation(ItemsVC.flaxFibers, "flaxfibers", "inventory");

    registerModelLocation(ItemsVC.linenCloth, "linencloth", "inventory");
    registerModelLocation(ItemsVC.firestarter, "firestarter", "inventory");
    registerModelLocation(ItemsVC.ironTuyere, "irontuyere", "inventory");
    registerModelLocation(ItemsVC.flaxTwine, "flaxtwine", "inventory");
    registerModelLocation(ItemsVC.stitchedleather, "stitchedleather", "inventory");
    registerModelLocation(ItemsVC.sail, "sail", "inventory");
    registerModelLocation(ItemsVC.peatbrick, "peatbrick", "inventory");

    registerModelLocation(ItemsVC.tools.values().toArray(new Item[0]), "tool", "inventory");
    registerModelLocation(ItemsVC.toolheads.values().toArray(new Item[0]), "toolhead", "inventory");

    registerModelLocation(ItemsVC.anvilbase, "anvilbase", "inventory");
    registerModelLocation(ItemsVC.anvilsurface, "anvilsurface", "inventory");

    registerModelLocation(ItemsVC.armor.values().toArray(new Item[0]), "armor", "inventory");

    registerModelLocation(
        new Item[] {
          ItemsVC.bread,
          ItemsVC.porkchopRaw,
          ItemsVC.porkchopCooked,
          ItemsVC.beefRaw,
          ItemsVC.beefCooked,
          ItemsVC.chickenRaw,
          ItemsVC.chickenCooked
        },
        "food",
        "inventory");

    ClientRegistry.registerTileEntity(TEIngotPile.class, "ingotpile", new TESRIngotPile());
    ClientRegistry.registerTileEntity(TEToolRack.class, "toolrack", new TESRToolRack());
    ClientRegistry.registerTileEntity(TEVessel.class, "ceramicvessel2", new TESRCeramicVessel());
    ClientRegistry.registerTileEntity(TEStonePot.class, "stonepot", new TESRStonePot());
    ClientRegistry.registerTileEntity(TEAxle.class, "axle", new TESRAxle());
    ClientRegistry.registerTileEntity(
        TEAngledGears.class, "angledgearbox", new TESRAngledGearBox());
    ClientRegistry.registerTileEntity(
        TEWindmillRotor.class, "windmillrotor", new TESRWindmillRotor());
    ClientRegistry.registerTileEntity(TEGrindStone.class, "grindstone", new TESRGrindstone());
    ClientRegistry.registerTileEntity(TEBellows.class, "bellows", new TESRBellows());
    ClientRegistry.registerTileEntity(
        TETallMetalMold.class, "tallmetalmold", new TESRTallMetalMold());
    ClientRegistry.registerTileEntity(TEWoodBucket.class, "woodbucket", new TESRWoodBucket());
  }