mirror of
https://git.zelz.net/catfoolyou/Project164.git
synced 2025-12-15 22:47:41 +00:00
Remove garbage, fix imports
This commit is contained in:
@@ -13,7 +13,6 @@ import net.minecraft.src.AxisAlignedBB;
|
||||
import net.minecraft.src.ChunkCoordinates;
|
||||
import net.minecraft.src.CommandBase;
|
||||
import net.minecraft.src.ConvertingProgressUpdate;
|
||||
import net.minecraft.src.CrashReport;
|
||||
import net.minecraft.src.DispenserBehaviors;
|
||||
import net.minecraft.src.EntityPlayer;
|
||||
import net.minecraft.src.EnumGameType;
|
||||
@@ -24,13 +23,10 @@ import net.minecraft.src.IProgressUpdate;
|
||||
import net.minecraft.src.ISaveFormat;
|
||||
import net.minecraft.src.ISaveHandler;
|
||||
import net.minecraft.src.IUpdatePlayerListBox;
|
||||
import net.minecraft.src.MathHelper;
|
||||
import net.minecraft.src.MinecraftException;
|
||||
import net.minecraft.src.Packet;
|
||||
import net.minecraft.src.Packet4UpdateTime;
|
||||
import net.minecraft.src.Profiler;
|
||||
import net.minecraft.src.RConConsoleSource;
|
||||
import net.minecraft.src.ReportedException;
|
||||
import net.minecraft.src.ServerCommandManager;
|
||||
import net.minecraft.src.ServerConfigurationManager;
|
||||
import net.minecraft.src.World;
|
||||
@@ -462,38 +458,13 @@ public abstract class MinecraftServer implements ICommandSender, Runnable
|
||||
Thread.sleep(1L);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
this.finalTick((CrashReport)null);
|
||||
}
|
||||
}
|
||||
catch (Throwable var48)
|
||||
{
|
||||
var48.printStackTrace();
|
||||
this.getLogAgent().logSevereException("Encountered an unexpected exception " + var48.getClass().getSimpleName(), var48);
|
||||
CrashReport var2 = null;
|
||||
|
||||
if (var48 instanceof ReportedException)
|
||||
{
|
||||
var2 = this.addServerInfoToCrashReport(((ReportedException)var48).getCrashReport());
|
||||
}
|
||||
else
|
||||
{
|
||||
var2 = this.addServerInfoToCrashReport(new CrashReport("Exception in server tick loop", var48));
|
||||
}
|
||||
|
||||
File var3 = new File(new File(this.getDataDirectory(), "crash-reports"), "crash-" + (new SimpleDateFormat("yyyy-MM-dd_HH.mm.ss")).format(new Date()) + "-server.txt");
|
||||
|
||||
if (var2.saveToFile(var3, this.getLogAgent()))
|
||||
{
|
||||
this.getLogAgent().logSevere("This crash report has been saved to: " + var3.getAbsolutePath());
|
||||
}
|
||||
else
|
||||
{
|
||||
this.getLogAgent().logSevere("We were unable to save this crash report to disk.");
|
||||
}
|
||||
|
||||
this.finalTick(var2);
|
||||
}
|
||||
finally
|
||||
{
|
||||
@@ -518,11 +489,6 @@ public abstract class MinecraftServer implements ICommandSender, Runnable
|
||||
return new File(".");
|
||||
}
|
||||
|
||||
/**
|
||||
* Called on exit from the main run() loop.
|
||||
*/
|
||||
protected void finalTick(CrashReport par1CrashReport) {}
|
||||
|
||||
/**
|
||||
* Directly calls System.exit(0), instantly killing the program.
|
||||
*/
|
||||
@@ -594,29 +560,10 @@ public abstract class MinecraftServer implements ICommandSender, Runnable
|
||||
}
|
||||
|
||||
this.theProfiler.startSection("tick");
|
||||
CrashReport var6;
|
||||
|
||||
try
|
||||
{
|
||||
var4.tick();
|
||||
}
|
||||
catch (Throwable var8)
|
||||
{
|
||||
var6 = CrashReport.makeCrashReport(var8, "Exception ticking world");
|
||||
var4.addWorldInfoToCrashReport(var6);
|
||||
throw new ReportedException(var6);
|
||||
}
|
||||
var4.tick();
|
||||
|
||||
try
|
||||
{
|
||||
var4.updateEntities();
|
||||
}
|
||||
catch (Throwable var7)
|
||||
{
|
||||
var6 = CrashReport.makeCrashReport(var7, "Exception ticking world entities");
|
||||
var4.addWorldInfoToCrashReport(var6);
|
||||
throw new ReportedException(var6);
|
||||
}
|
||||
var4.updateEntities();
|
||||
|
||||
this.theProfiler.endSection();
|
||||
this.theProfiler.startSection("tracker");
|
||||
@@ -742,13 +689,6 @@ public abstract class MinecraftServer implements ICommandSender, Runnable
|
||||
return "";
|
||||
}
|
||||
|
||||
public String executeCommand(String par1Str)
|
||||
{
|
||||
RConConsoleSource.consoleBuffer.resetLog();
|
||||
this.commandManager.executeCommand(RConConsoleSource.consoleBuffer, par1Str);
|
||||
return RConConsoleSource.consoleBuffer.getChatBuffer();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns true if debugging is enabled, false otherwise.
|
||||
*/
|
||||
@@ -781,14 +721,6 @@ public abstract class MinecraftServer implements ICommandSender, Runnable
|
||||
return "vanilla";
|
||||
}
|
||||
|
||||
/**
|
||||
* Adds the server info, including from theWorldServer, to the crash report.
|
||||
*/
|
||||
public CrashReport addServerInfoToCrashReport(CrashReport par1CrashReport)
|
||||
{
|
||||
return par1CrashReport;
|
||||
}
|
||||
|
||||
/**
|
||||
* If par2Str begins with /, then it searches for commands, otherwise it returns players.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user