升级依赖版本
This commit is contained in:
@ -22,7 +22,7 @@
|
||||
import java.awt.GraphicsEnvironment;
|
||||
import java.awt.image.BufferedImage;
|
||||
import java.io.File;
|
||||
@@ -33,10 +17,45 @@
|
||||
@@ -33,10 +17,46 @@
|
||||
import java.util.Random;
|
||||
import java.util.UUID;
|
||||
import java.util.concurrent.Callable;
|
||||
@ -42,6 +42,7 @@
|
||||
+import org.bukkit.craftbukkit.util.Waitable;
|
||||
+import org.bukkit.event.server.RemoteServerCommandEvent;
|
||||
+import org.bukkit.event.world.WorldSaveEvent;
|
||||
+import org.fusesource.jansi.AnsiConsole;
|
||||
+
|
||||
+import com.google.common.base.Charsets;
|
||||
+import com.mojang.authlib.GameProfile;
|
||||
@ -69,7 +70,7 @@
|
||||
import net.minecraft.command.ServerCommandManager;
|
||||
import net.minecraft.crash.CrashReport;
|
||||
import net.minecraft.entity.player.EntityPlayer;
|
||||
@@ -50,9 +69,11 @@
|
||||
@@ -50,9 +70,11 @@
|
||||
import net.minecraft.profiler.PlayerUsageSnooper;
|
||||
import net.minecraft.profiler.Profiler;
|
||||
import net.minecraft.server.dedicated.DedicatedServer;
|
||||
@ -81,7 +82,7 @@
|
||||
import net.minecraft.util.ChatComponentText;
|
||||
import net.minecraft.util.ChunkCoordinates;
|
||||
import net.minecraft.util.IChatComponent;
|
||||
@@ -63,19 +84,20 @@
|
||||
@@ -63,19 +85,20 @@
|
||||
import net.minecraft.world.MinecraftException;
|
||||
import net.minecraft.world.World;
|
||||
import net.minecraft.world.WorldManager;
|
||||
@ -107,7 +108,7 @@
|
||||
import net.minecraftforge.common.DimensionManager;
|
||||
import net.minecraftforge.common.MinecraftForge;
|
||||
import net.minecraftforge.event.world.WorldEvent;
|
||||
@@ -85,13 +107,13 @@
|
||||
@@ -85,13 +108,13 @@
|
||||
private static final Logger logger = LogManager.getLogger();
|
||||
public static final File field_152367_a = new File("usercache.json");
|
||||
private static MinecraftServer mcServer;
|
||||
@ -124,7 +125,7 @@
|
||||
private final ServerStatusResponse field_147147_p = new ServerStatusResponse();
|
||||
private final Random field_147146_q = new Random();
|
||||
@SideOnly(Side.SERVER)
|
||||
@@ -135,8 +157,42 @@
|
||||
@@ -135,8 +158,42 @@
|
||||
private long field_147142_T = 0L;
|
||||
private final GameProfileRepository field_152365_W;
|
||||
private final PlayerProfileCache field_152366_X;
|
||||
@ -167,7 +168,7 @@
|
||||
public MinecraftServer(File p_i45281_1_, Proxy p_i45281_2_)
|
||||
{
|
||||
this.field_152366_X = new PlayerProfileCache(this, field_152367_a);
|
||||
@@ -149,10 +205,72 @@
|
||||
@@ -149,10 +206,72 @@
|
||||
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();
|
||||
@ -241,7 +242,7 @@
|
||||
protected void convertMapIfNeeded(String p_71237_1_)
|
||||
{
|
||||
if (this.getActiveAnvilConverter().isOldMapFormat(p_71237_1_))
|
||||
@@ -172,6 +290,7 @@
|
||||
@@ -172,6 +291,7 @@
|
||||
MinecraftServer.logger.info("Converting... " + p_73718_1_ + "%");
|
||||
}
|
||||
}
|
||||
@ -249,7 +250,7 @@
|
||||
@SideOnly(Side.CLIENT)
|
||||
public void resetProgressAndMessage(String p_73721_1_) {}
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -195,10 +314,17 @@
|
||||
@@ -195,10 +315,17 @@
|
||||
|
||||
protected void loadAllWorlds(String p_71247_1_, String p_71247_2_, long p_71247_3_, WorldType p_71247_5_, String p_71247_6_)
|
||||
{
|
||||
@ -269,7 +270,7 @@
|
||||
WorldSettings worldsettings;
|
||||
|
||||
if (worldinfo == null)
|
||||
@@ -215,11 +341,79 @@
|
||||
@@ -215,11 +342,79 @@
|
||||
{
|
||||
worldsettings.enableBonusChest();
|
||||
}
|
||||
@ -352,7 +353,7 @@
|
||||
world.addWorldAccess(new WorldManager(this, world));
|
||||
|
||||
if (!this.isSinglePlayer())
|
||||
@@ -227,12 +421,14 @@
|
||||
@@ -227,12 +422,14 @@
|
||||
world.getWorldInfo().setGameType(this.getGameType());
|
||||
}
|
||||
|
||||
@ -370,7 +371,7 @@
|
||||
}
|
||||
|
||||
protected void initialWorldChunkLoad()
|
||||
@@ -244,9 +440,12 @@
|
||||
@@ -244,9 +441,12 @@
|
||||
int i = 0;
|
||||
this.setUserMessage("menu.generatingTerrain");
|
||||
byte b0 = 0;
|
||||
@ -383,7 +384,7 @@
|
||||
long j = getSystemTimeMillis();
|
||||
|
||||
for (int k = -192; k <= 192 && this.isServerRunning(); k += 16)
|
||||
@@ -265,7 +464,8 @@
|
||||
@@ -265,7 +465,8 @@
|
||||
worldserver.theChunkProviderServer.loadChunk(chunkcoordinates.posX + k >> 4, chunkcoordinates.posZ + l >> 4);
|
||||
}
|
||||
}
|
||||
@ -393,7 +394,7 @@
|
||||
this.clearCurrentTask();
|
||||
}
|
||||
|
||||
@@ -292,19 +492,17 @@
|
||||
@@ -292,19 +493,17 @@
|
||||
{
|
||||
this.currentTask = null;
|
||||
this.percentDone = 0;
|
||||
@ -418,7 +419,7 @@
|
||||
|
||||
if (worldserver != null)
|
||||
{
|
||||
@@ -313,25 +511,41 @@
|
||||
@@ -313,25 +512,41 @@
|
||||
logger.info("Saving chunks for level \'" + worldserver.getWorldInfo().getWorldName() + "\'/" + worldserver.provider.getDimensionName());
|
||||
}
|
||||
|
||||
@ -465,7 +466,7 @@
|
||||
if (this.func_147137_ag() != null)
|
||||
{
|
||||
this.func_147137_ag().terminateEndpoints();
|
||||
@@ -347,7 +561,14 @@
|
||||
@@ -347,7 +562,14 @@
|
||||
if (this.worldServers != null)
|
||||
{
|
||||
logger.info("Saving worlds");
|
||||
@ -481,7 +482,7 @@
|
||||
|
||||
for (int i = 0; i < this.worldServers.length; ++i)
|
||||
{
|
||||
@@ -380,6 +601,13 @@
|
||||
@@ -380,6 +602,13 @@
|
||||
this.serverRunning = false;
|
||||
}
|
||||
|
||||
@ -495,7 +496,7 @@
|
||||
public void run()
|
||||
{
|
||||
try
|
||||
@@ -392,45 +620,41 @@
|
||||
@@ -392,45 +621,41 @@
|
||||
this.field_147147_p.func_151315_a(new ChatComponentText(this.motd));
|
||||
this.field_147147_p.func_151321_a(new ServerStatusResponse.MinecraftProtocolVersionIdentifier("1.7.10", 5));
|
||||
this.func_147138_a(this.field_147147_p);
|
||||
@ -562,7 +563,7 @@
|
||||
FMLCommonHandler.instance().handleServerStopping();
|
||||
FMLCommonHandler.instance().expectServerStopped(); // has to come before finalTick to avoid race conditions
|
||||
}
|
||||
@@ -448,6 +672,14 @@
|
||||
@@ -448,6 +673,14 @@
|
||||
catch (Throwable throwable1)
|
||||
{
|
||||
logger.error("Encountered an unexpected exception", throwable1);
|
||||
@ -577,7 +578,7 @@
|
||||
CrashReport crashreport = null;
|
||||
|
||||
if (throwable1 instanceof ReportedException)
|
||||
@@ -477,6 +709,7 @@
|
||||
@@ -477,6 +710,7 @@
|
||||
{
|
||||
try
|
||||
{
|
||||
@ -585,7 +586,7 @@
|
||||
this.stopServer();
|
||||
this.serverStopped = true;
|
||||
}
|
||||
@@ -486,6 +719,16 @@
|
||||
@@ -486,6 +720,16 @@
|
||||
}
|
||||
finally
|
||||
{
|
||||
@ -602,7 +603,7 @@
|
||||
FMLCommonHandler.instance().handleServerStopped();
|
||||
this.serverStopped = true;
|
||||
this.systemExitNow();
|
||||
@@ -532,8 +775,11 @@
|
||||
@@ -532,8 +776,11 @@
|
||||
|
||||
public void tick()
|
||||
{
|
||||
@ -614,7 +615,7 @@
|
||||
++this.tickCounter;
|
||||
|
||||
if (this.startProfiling)
|
||||
@@ -562,12 +808,21 @@
|
||||
@@ -562,12 +809,21 @@
|
||||
this.field_147147_p.func_151318_b().func_151330_a(agameprofile);
|
||||
}
|
||||
|
||||
@ -638,7 +639,7 @@
|
||||
}
|
||||
|
||||
this.theProfiler.startSection("tallying");
|
||||
@@ -575,25 +830,57 @@
|
||||
@@ -575,25 +831,57 @@
|
||||
this.theProfiler.endSection();
|
||||
this.theProfiler.startSection("snooper");
|
||||
|
||||
@ -698,7 +699,7 @@
|
||||
int i;
|
||||
|
||||
Integer[] ids = DimensionManager.getIDs(this.tickCounter % 200 == 0);
|
||||
@@ -602,19 +889,21 @@
|
||||
@@ -602,19 +890,21 @@
|
||||
int id = ids[x];
|
||||
long j = System.nanoTime();
|
||||
|
||||
@ -723,7 +724,7 @@
|
||||
|
||||
this.theProfiler.startSection("tick");
|
||||
FMLCommonHandler.instance().onPreWorldTick(worldserver);
|
||||
@@ -622,22 +911,46 @@
|
||||
@@ -622,22 +912,46 @@
|
||||
|
||||
try
|
||||
{
|
||||
@ -772,7 +773,7 @@
|
||||
worldserver.addWorldInfoToCrashReport(crashreport);
|
||||
throw new ReportedException(crashreport);
|
||||
}
|
||||
@@ -645,10 +958,13 @@
|
||||
@@ -645,10 +959,13 @@
|
||||
FMLCommonHandler.instance().onPostWorldTick(worldserver);
|
||||
this.theProfiler.endSection();
|
||||
this.theProfiler.startSection("tracker");
|
||||
@ -787,7 +788,7 @@
|
||||
|
||||
worldTickTimes.get(id)[this.tickCounter % 100] = System.nanoTime() - j;
|
||||
}
|
||||
@@ -656,15 +972,21 @@
|
||||
@@ -656,15 +973,21 @@
|
||||
this.theProfiler.endStartSection("dim_unloading");
|
||||
DimensionManager.unloadWorlds(worldTickTimes);
|
||||
this.theProfiler.endStartSection("connection");
|
||||
@ -809,7 +810,7 @@
|
||||
|
||||
this.theProfiler.endSection();
|
||||
}
|
||||
@@ -699,6 +1021,13 @@
|
||||
@@ -699,6 +1022,13 @@
|
||||
|
||||
public WorldServer worldServerForDimension(int p_71218_1_)
|
||||
{
|
||||
@ -823,7 +824,7 @@
|
||||
WorldServer ret = DimensionManager.getWorld(p_71218_1_);
|
||||
if (ret == null)
|
||||
{
|
||||
@@ -784,13 +1113,14 @@
|
||||
@@ -784,13 +1114,14 @@
|
||||
|
||||
public List getPossibleCompletions(ICommandSender p_71248_1_, String p_71248_2_)
|
||||
{
|
||||
@ -842,7 +843,7 @@
|
||||
|
||||
if (list != null)
|
||||
{
|
||||
@@ -798,40 +1128,25 @@
|
||||
@@ -798,40 +1129,25 @@
|
||||
|
||||
while (iterator.hasNext())
|
||||
{
|
||||
@ -891,7 +892,7 @@
|
||||
}
|
||||
|
||||
public static MinecraftServer getServer()
|
||||
@@ -1034,7 +1349,7 @@
|
||||
@@ -1034,7 +1350,7 @@
|
||||
|
||||
public boolean isServerInOnlineMode()
|
||||
{
|
||||
@ -900,7 +901,7 @@
|
||||
}
|
||||
|
||||
public void setOnlineMode(boolean p_71229_1_)
|
||||
@@ -1124,7 +1439,7 @@
|
||||
@@ -1124,7 +1440,7 @@
|
||||
|
||||
public NetworkSystem func_147137_ag()
|
||||
{
|
||||
@ -909,7 +910,7 @@
|
||||
}
|
||||
|
||||
@SideOnly(Side.CLIENT)
|
||||
@@ -1259,8 +1574,11 @@
|
||||
@@ -1259,8 +1575,11 @@
|
||||
{
|
||||
Bootstrap.func_151354_b();
|
||||
|
||||
@ -921,7 +922,7 @@
|
||||
boolean flag = true;
|
||||
String s = null;
|
||||
String s1 = ".";
|
||||
@@ -1356,16 +1674,34 @@
|
||||
@@ -1356,16 +1675,34 @@
|
||||
{
|
||||
dedicatedserver.setGuiEnabled();
|
||||
}
|
||||
@ -962,7 +963,7 @@
|
||||
}
|
||||
catch (Exception exception)
|
||||
{
|
||||
@@ -1400,15 +1736,70 @@
|
||||
@@ -1400,15 +1737,70 @@
|
||||
@SideOnly(Side.SERVER)
|
||||
public String getPlugins()
|
||||
{
|
||||
@ -1038,7 +1039,7 @@
|
||||
}
|
||||
|
||||
@SideOnly(Side.SERVER)
|
||||
@@ -1455,9 +1846,220 @@
|
||||
@@ -1455,9 +1847,222 @@
|
||||
return this.serverStopped;
|
||||
}
|
||||
|
||||
@ -1178,6 +1179,8 @@
|
||||
+ if (!useJline) {
|
||||
+ // This ensures the terminal literal will always match the jline implementation
|
||||
+ System.setProperty(jline.TerminalFactory.JLINE_TERMINAL, jline.UnsupportedTerminal.class.getName());
|
||||
+ }else{
|
||||
+ AnsiConsole.systemInstall(); // install Windows JNI library
|
||||
+ }
|
||||
+
|
||||
+
|
||||
|
Reference in New Issue
Block a user