Java 类net.minecraft.world.chunk.storage.AnvilSaveConverter 实例源码

项目:paintedbiomes    文件:Configs.java   
private static void setWorldDir()
{
    MinecraftServer server = FMLCommonHandler.instance().getMinecraftServerInstance();

    if (server != null)
    {
        File worldDir = new File(((AnvilSaveConverter) server.getActiveAnvilConverter()).savesDirectory, server.getFolderName());
        worldConfigDir = new File(worldDir, Reference.MOD_ID);
        worldConfigFile = new File(worldConfigDir, Reference.MOD_ID + ".cfg");
    }
    else
    {
        worldConfigDir = null;
        worldConfigFile = null;
    }
}
项目:Cauldron    文件:MinecraftServer.java   
public MinecraftServer(File p_i45281_1_, Proxy p_i45281_2_)
{
    this.field_152366_X = new PlayerProfileCache(this, field_152367_a);
    mcServer = this;
    this.serverProxy = p_i45281_2_;
    this.anvilFile = p_i45281_1_;
    this.field_147144_o = new NetworkSystem(this);
    this.commandManager = new ServerCommandManager();
    this.anvilConverterForAnvilFile = new AnvilSaveConverter(p_i45281_1_);
    this.field_152364_T = new YggdrasilAuthenticationService(p_i45281_2_, UUID.randomUUID().toString());
    this.field_147143_S = this.field_152364_T.createMinecraftSessionService();
    this.field_152365_W = this.field_152364_T.createProfileRepository();
    this.primaryThread = new Thread(this, "Server thread"); // CraftBukkit
    this.cauldronConfig = new CauldronConfig("cauldron.yml", "cauldron");
    this.tileEntityConfig = new TileEntityConfig("tileentities.yml", "cauldron_te");
}
项目:RuneCraftery    文件:MinecraftServer.java   
public MinecraftServer(File par1File)
{
    this.serverProxy = Proxy.NO_PROXY;
    this.field_143008_E = 0;
    this.sentPacketCountArray = new long[100];
    this.sentPacketSizeArray = new long[100];
    this.receivedPacketCountArray = new long[100];
    this.receivedPacketSizeArray = new long[100];
    this.tickTimeArray = new long[100];
    this.texturePack = "";
    mcServer = this;
    this.anvilFile = par1File;
    this.commandManager = new ServerCommandManager();
    this.anvilConverterForAnvilFile = new AnvilSaveConverter(par1File);
    this.registerDispenseBehaviors();
}
项目:BetterNutritionMod    文件:MinecraftServer.java   
public MinecraftServer(File par1File)
{
    this.serverProxy = Proxy.NO_PROXY;
    this.field_143008_E = 0;
    this.sentPacketCountArray = new long[100];
    this.sentPacketSizeArray = new long[100];
    this.receivedPacketCountArray = new long[100];
    this.receivedPacketSizeArray = new long[100];
    this.tickTimeArray = new long[100];
    this.texturePack = "";
    mcServer = this;
    this.anvilFile = par1File;
    this.commandManager = new ServerCommandManager();
    this.anvilConverterForAnvilFile = new AnvilSaveConverter(par1File);
    this.registerDispenseBehaviors();
}
项目:DecompiledMinecraft    文件:MinecraftServer.java   
public MinecraftServer(File workDir, Proxy proxy, File profileCacheDir)
{
    this.serverProxy = proxy;
    mcServer = this;
    this.anvilFile = workDir;
    this.networkSystem = new NetworkSystem(this);
    this.profileCache = new PlayerProfileCache(this, profileCacheDir);
    this.commandManager = this.createNewCommandManager();
    this.anvilConverterForAnvilFile = new AnvilSaveConverter(workDir);
    this.authService = new YggdrasilAuthenticationService(proxy, UUID.randomUUID().toString());
    this.sessionService = this.authService.createMinecraftSessionService();
    this.profileRepo = this.authService.createProfileRepository();
}
项目:DecompiledMinecraft    文件:MinecraftServer.java   
public MinecraftServer(File workDir, Proxy proxy, File profileCacheDir)
{
    this.serverProxy = proxy;
    mcServer = this;
    this.anvilFile = workDir;
    this.networkSystem = new NetworkSystem(this);
    this.profileCache = new PlayerProfileCache(this, profileCacheDir);
    this.commandManager = this.createNewCommandManager();
    this.anvilConverterForAnvilFile = new AnvilSaveConverter(workDir);
    this.authService = new YggdrasilAuthenticationService(proxy, UUID.randomUUID().toString());
    this.sessionService = this.authService.createMinecraftSessionService();
    this.profileRepo = this.authService.createProfileRepository();
}
项目:BaseClient    文件:MinecraftServer.java   
public MinecraftServer(File workDir, Proxy proxy, File profileCacheDir)
{
    this.serverProxy = proxy;
    mcServer = this;
    this.anvilFile = workDir;
    this.networkSystem = new NetworkSystem(this);
    this.profileCache = new PlayerProfileCache(this, profileCacheDir);
    this.commandManager = this.createNewCommandManager();
    this.anvilConverterForAnvilFile = new AnvilSaveConverter(workDir);
    this.authService = new YggdrasilAuthenticationService(proxy, UUID.randomUUID().toString());
    this.sessionService = this.authService.createMinecraftSessionService();
    this.profileRepo = this.authService.createProfileRepository();
}
项目:BaseClient    文件:MinecraftServer.java   
public MinecraftServer(File workDir, Proxy proxy, File profileCacheDir)
{
    this.serverProxy = proxy;
    mcServer = this;
    this.anvilFile = workDir;
    this.networkSystem = new NetworkSystem(this);
    this.profileCache = new PlayerProfileCache(this, profileCacheDir);
    this.commandManager = this.createNewCommandManager();
    this.anvilConverterForAnvilFile = new AnvilSaveConverter(workDir);
    this.authService = new YggdrasilAuthenticationService(proxy, UUID.randomUUID().toString());
    this.sessionService = this.authService.createMinecraftSessionService();
    this.profileRepo = this.authService.createProfileRepository();
}
项目:Backmemed    文件:MinecraftServer.java   
public MinecraftServer(File anvilFileIn, Proxy proxyIn, DataFixer dataFixerIn, YggdrasilAuthenticationService authServiceIn, MinecraftSessionService sessionServiceIn, GameProfileRepository profileRepoIn, PlayerProfileCache profileCacheIn)
{
    this.serverProxy = proxyIn;
    this.authService = authServiceIn;
    this.sessionService = sessionServiceIn;
    this.profileRepo = profileRepoIn;
    this.profileCache = profileCacheIn;
    this.anvilFile = anvilFileIn;
    this.networkSystem = new NetworkSystem(this);
    this.commandManager = this.createNewCommandManager();
    this.anvilConverterForAnvilFile = new AnvilSaveConverter(anvilFileIn, dataFixerIn);
    this.dataFixer = dataFixerIn;
}
项目:Mods    文件:TF2weapons.java   
@Mod.EventHandler
public void serverStop(FMLServerStoppingEvent event) {
    //MapList.nameToData.clear();
    //MapList.buildInAttributes.clear();

    File output = new File(((AnvilSaveConverter) server.getActiveAnvilConverter()).savesDirectory, server.getFolderName() + "/teleports.dat");
    NBTTagCompound tagRoot = new NBTTagCompound();
    NBTTagCompound tag = new NBTTagCompound();
    tagRoot.setTag("Teleporters", tag);

    for (Entry<UUID, TeleporterData[]> entry : EntityTeleporter.teleporters.entrySet()) {
        NBTTagCompound exitTag = new NBTTagCompound();
        for (int i = 0; i < EntityTeleporter.TP_PER_PLAYER; i++) {
            TeleporterData blockPos = entry.getValue()[i];
            if (blockPos != null)
                exitTag.setIntArray(Integer.toString(i), new int[] { blockPos.getX(), blockPos.getY(), blockPos.getZ(), blockPos.id, blockPos.dimension});
        }
        tag.setTag(entry.getKey().toString(), exitTag);
    }
    tagRoot.setInteger("TPCount", EntityTeleporter.tpCount);

    try {
        CompressedStreamTools.writeCompressed(tagRoot, new FileOutputStream(output));
    } catch (IOException e) {
        e.printStackTrace();
    }

    EntityTeleporter.teleporters.clear();
    EntityTeleporter.tpCount = 0;
    if(udpServer != null) {
        udpServer.stopServer();
        udpServer = null;
    }
}
项目:CustomWorldGen    文件:MinecraftServer.java   
public MinecraftServer(File anvilFileIn, Proxy proxyIn, DataFixer dataFixerIn, YggdrasilAuthenticationService authServiceIn, MinecraftSessionService sessionServiceIn, GameProfileRepository profileRepoIn, PlayerProfileCache profileCacheIn)
{
    this.serverProxy = proxyIn;
    this.authService = authServiceIn;
    this.sessionService = sessionServiceIn;
    this.profileRepo = profileRepoIn;
    this.profileCache = profileCacheIn;
    this.anvilFile = anvilFileIn;
    this.networkSystem = new NetworkSystem(this);
    this.commandManager = this.createNewCommandManager();
    this.anvilConverterForAnvilFile = new AnvilSaveConverter(anvilFileIn, dataFixerIn);
    this.dataFixer = dataFixerIn;
}
项目:justenoughdimensions    文件:JustEnoughDimensions.java   
@Mod.EventHandler
public void onServerAboutToStart(FMLServerAboutToStartEvent event)
{
    File worldDir = new File(((AnvilSaveConverter) event.getServer().getActiveAnvilConverter()).savesDirectory, event.getServer().getFolderName());
    DimensionConfig.instance().readDimensionConfig(worldDir);

    // This needs to be here so that we are able to override existing dimensions before
    // they get loaded during server start.
    // But on the other hand we don't want to register the rest of the dimensions yet,
    // otherwise they would be considered 'static dimensions' and get loaded on server start.
    DimensionConfig.instance().registerOverriddenDimensions();
}
项目:morecommands    文件:CommandWorld.java   
private void loadWorld(DedicatedServer server, AnvilSaveConverter saveLoader, String world, long seed, WorldType type, String genSettings) {
    if (this.loadWorlds != null) {
        try {
            server.getPlayerList().saveAllPlayerData();
            this.loadWorlds.invoke(server, world, world, seed, type == null ? WorldType.DEFAULT : type, genSettings);
            server.setFolderName(world);

            for (EntityPlayerMP player : server.getPlayerList().getPlayers()) {
                transferPlayer(server, player);
            }
        }
        catch (Exception ex) {ex.printStackTrace(); return;}
    }
}
项目:Resilience-Client-Source    文件:MinecraftServer.java   
public MinecraftServer(File p_i45281_1_, Proxy p_i45281_2_)
{
    mcServer = this;
    this.serverProxy = p_i45281_2_;
    this.anvilFile = p_i45281_1_;
    this.field_147144_o = new NetworkSystem(this);
    this.commandManager = new ServerCommandManager();
    this.anvilConverterForAnvilFile = new AnvilSaveConverter(p_i45281_1_);
    this.field_147143_S = (new YggdrasilAuthenticationService(p_i45281_2_, UUID.randomUUID().toString())).createMinecraftSessionService();
}
项目:Cauldron    文件:MinecraftServer.java   
public MinecraftServer(File p_i45281_1_, Proxy p_i45281_2_)
{
    this.field_152366_X = new PlayerProfileCache(this, field_152367_a);
    mcServer = this;
    this.serverProxy = p_i45281_2_;
    this.anvilFile = p_i45281_1_;
    this.field_147144_o = new NetworkSystem(this);
    this.commandManager = new ServerCommandManager();
    this.anvilConverterForAnvilFile = new AnvilSaveConverter(p_i45281_1_);
    this.field_152364_T = new YggdrasilAuthenticationService(p_i45281_2_, UUID.randomUUID().toString());
    this.field_147143_S = this.field_152364_T.createMinecraftSessionService();
    this.field_152365_W = this.field_152364_T.createProfileRepository();
}
项目:RuneCraftery    文件:MinecraftServer.java   
public MinecraftServer(File p_i1498_1_) {
   this.field_110456_c = Proxy.NO_PROXY;
   this.field_143008_E = 0;
   this.field_71300_f = new long[100];
   this.field_71301_g = new long[100];
   this.field_71313_h = new long[100];
   this.field_71314_i = new long[100];
   this.field_71311_j = new long[100];
   this.field_71297_P = "";
   field_71309_l = this;
   this.field_71308_o = p_i1498_1_;
   this.field_71321_q = new ServerCommandManager();
   this.field_71310_m = new AnvilSaveConverter(p_i1498_1_);
   this.func_82355_al();
}
项目:NeptuneMod    文件:MixinMinecraftServer.java   
@Redirect(method = "<init>", at = @At(value = "NEW", args = "class=net/minecraft/world/chunk/storage/AnvilSaveConverter"))
public AnvilSaveConverter createSaveConverter(File dir) {
    return new AnvilSaveConverter(NeptuneWorldManager.WORLDS_DIR);
}
项目:RuneCraftery    文件:AnvilSaveConverterFileFilter.java   
AnvilSaveConverterFileFilter(AnvilSaveConverter p_i2143_1_) {
   this.field_76172_a = p_i2143_1_;
}