コード例 #1
0
  public void load() {
    if (!DatabaseHelper.has()) {
      ModLoader.throwException(
          "Can not start Pixelmon without SQLite jar or database!!! Please reinstall!!",
          new java.lang.Error(
              "Can not start Pixelmon without SQLite jar or database!!! Please reinstall!!"));
    }
    if (!(ModLoader.isModLoaded("mod_MinecraftForge")))
      ModLoader.throwException(
          "Can not start Pixelmon without Minecraft Forge!!! Please download it!!!",
          new java.lang.Error(
              "Can not start Pixelmon without Minecraft Forge!!! Please download it!!!"));
    if (ModLoader.isModLoaded("mod_pokemobs")) System.exit(1);
    instance = this;

    MinecraftForge.setGuiHandler(this, new GuiHandler());

    ModLoader.setInGUIHook(this, true, true);
    ModLoader.setInGameHook(this, true, true);
    starterList.add(EntityBulbasaur.class);
    starterList.add(EntitySquirtle.class);
    starterList.add(EntityCharmander.class);
    starterList.add(EntityEevee.class);
    addNames();
    registerEntities();
    addSpawns();
    addRecipes();
    MinecraftForge.registerSaveHandler(pokeballManager);
    MinecraftForge.registerSaveHandler(computerManager);
    MinecraftForge.registerConnectionHandler(new PacketHandler());

    alreadySet = true;
  }
コード例 #2
0
ファイル: MTDCore.java プロジェクト: ali4z/Eury-s-Mods
 public static void initialize() {
   MultiTexturedDoors.initialize();
   MinecraftForge.registerConnectionHandler(new NetworkConnection());
 }