예제 #1
0
  @EventHandler
  public void init(FMLInitializationEvent event) {
    PacketDispatcher.registerPackets();
    proxy.init(event);

    GameRegistry.addShapelessRecipe(new ItemStack(itemEmptyAtlas), Items.book, Items.compass);

    RecipeSorter.register(
        "antiqueatlas:atlascloning",
        RecipeAtlasCloning.class,
        SHAPELESS,
        "after:minecraft:shapeless");
    GameRegistry.addRecipe(new RecipeAtlasCloning());

    RecipeSorter.register(
        "antiqueatlas:atlascombining",
        RecipeAtlasCombining.class,
        SHAPELESS,
        "after:minecraft:shapeless");
    RecipeAtlasCombining recipeCombining = new RecipeAtlasCombining();
    GameRegistry.addRecipe(recipeCombining);
    FMLCommonHandler.instance().bus().register(recipeCombining);

    MinecraftForge.EVENT_BUS.register(extBiomeData);
    FMLCommonHandler.instance().bus().register(extBiomeData);

    MinecraftForge.EVENT_BUS.register(globalMarkersData);
    FMLCommonHandler.instance().bus().register(globalMarkersData);

    MinecraftForge.EVENT_BUS.register(new DeathWatcher());

    MinecraftForge.EVENT_BUS.register(new VillageWatcher());
    MinecraftForge.EVENT_BUS.register(new NetherFortressWatcher());
    MinecraftForge.EVENT_BUS.register(new NetherPortalWatcher());
  }
예제 #2
0
 @Override
 public void onGuiClosed() {
   super.onGuiClosed();
   removeChild(markerFinalizer);
   removeChild(blinkingIcon);
   Keyboard.enableRepeatEvents(false);
   biomeData.setBrowsingPosition(mapOffsetX, mapOffsetY, mapScale);
   PacketDispatcher.sendToServer(
       new BrowsingPositionPacket(
           stack.getItemDamage(), player.dimension, mapOffsetX, mapOffsetY, mapScale));
 }