Remove garbage, fix imports
This commit is contained in:
parent
d645e4d8f8
commit
8264769a5f
File diff suppressed because it is too large
Load Diff
57488
javascript/classes.js
57488
javascript/classes.js
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -367,10 +367,6 @@ options.chat.height.focused=Focused Height
|
||||||
options.chat.height.unfocused=Unfocused Height
|
options.chat.height.unfocused=Unfocused Height
|
||||||
options.showCape=Show Cape
|
options.showCape=Show Cape
|
||||||
options.serverTextures=Server Textures
|
options.serverTextures=Server Textures
|
||||||
options.snooper=Allow Snooper
|
|
||||||
options.snooper.view=Snooper Settings...
|
|
||||||
options.snooper.title=Machine Specs Collection
|
|
||||||
options.snooper.desc=We want to collect information about your machine to help improve Minecraft by knowing what we can support and where the biggest problems are. All of this information is completely anonymous and viewable below. We promise we won't do anything bad with this data, but if you want to opt out then feel free to toggle it off!
|
|
||||||
options.resourcepack=Resource Packs
|
options.resourcepack=Resource Packs
|
||||||
options.fullscreen=Fullscreen
|
options.fullscreen=Fullscreen
|
||||||
options.vsync=Use VSync
|
options.vsync=Use VSync
|
||||||
|
|
|
@ -13,7 +13,6 @@ import net.minecraft.src.AxisAlignedBB;
|
||||||
import net.minecraft.src.ChunkCoordinates;
|
import net.minecraft.src.ChunkCoordinates;
|
||||||
import net.minecraft.src.CommandBase;
|
import net.minecraft.src.CommandBase;
|
||||||
import net.minecraft.src.ConvertingProgressUpdate;
|
import net.minecraft.src.ConvertingProgressUpdate;
|
||||||
import net.minecraft.src.CrashReport;
|
|
||||||
import net.minecraft.src.DispenserBehaviors;
|
import net.minecraft.src.DispenserBehaviors;
|
||||||
import net.minecraft.src.EntityPlayer;
|
import net.minecraft.src.EntityPlayer;
|
||||||
import net.minecraft.src.EnumGameType;
|
import net.minecraft.src.EnumGameType;
|
||||||
|
@ -24,13 +23,10 @@ import net.minecraft.src.IProgressUpdate;
|
||||||
import net.minecraft.src.ISaveFormat;
|
import net.minecraft.src.ISaveFormat;
|
||||||
import net.minecraft.src.ISaveHandler;
|
import net.minecraft.src.ISaveHandler;
|
||||||
import net.minecraft.src.IUpdatePlayerListBox;
|
import net.minecraft.src.IUpdatePlayerListBox;
|
||||||
import net.minecraft.src.MathHelper;
|
|
||||||
import net.minecraft.src.MinecraftException;
|
import net.minecraft.src.MinecraftException;
|
||||||
import net.minecraft.src.Packet;
|
import net.minecraft.src.Packet;
|
||||||
import net.minecraft.src.Packet4UpdateTime;
|
import net.minecraft.src.Packet4UpdateTime;
|
||||||
import net.minecraft.src.Profiler;
|
import net.minecraft.src.Profiler;
|
||||||
import net.minecraft.src.RConConsoleSource;
|
|
||||||
import net.minecraft.src.ReportedException;
|
|
||||||
import net.minecraft.src.ServerCommandManager;
|
import net.minecraft.src.ServerCommandManager;
|
||||||
import net.minecraft.src.ServerConfigurationManager;
|
import net.minecraft.src.ServerConfigurationManager;
|
||||||
import net.minecraft.src.World;
|
import net.minecraft.src.World;
|
||||||
|
@ -462,38 +458,13 @@ public abstract class MinecraftServer implements ICommandSender, Runnable
|
||||||
Thread.sleep(1L);
|
Thread.sleep(1L);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
{
|
|
||||||
this.finalTick((CrashReport)null);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (Throwable var48)
|
catch (Throwable var48)
|
||||||
{
|
{
|
||||||
var48.printStackTrace();
|
var48.printStackTrace();
|
||||||
this.getLogAgent().logSevereException("Encountered an unexpected exception " + var48.getClass().getSimpleName(), var48);
|
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");
|
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
|
finally
|
||||||
{
|
{
|
||||||
|
@ -518,11 +489,6 @@ public abstract class MinecraftServer implements ICommandSender, Runnable
|
||||||
return new File(".");
|
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.
|
* Directly calls System.exit(0), instantly killing the program.
|
||||||
*/
|
*/
|
||||||
|
@ -594,29 +560,10 @@ public abstract class MinecraftServer implements ICommandSender, Runnable
|
||||||
}
|
}
|
||||||
|
|
||||||
this.theProfiler.startSection("tick");
|
this.theProfiler.startSection("tick");
|
||||||
CrashReport var6;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var4.tick();
|
var4.tick();
|
||||||
}
|
|
||||||
catch (Throwable var8)
|
|
||||||
{
|
|
||||||
var6 = CrashReport.makeCrashReport(var8, "Exception ticking world");
|
|
||||||
var4.addWorldInfoToCrashReport(var6);
|
|
||||||
throw new ReportedException(var6);
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var4.updateEntities();
|
var4.updateEntities();
|
||||||
}
|
|
||||||
catch (Throwable var7)
|
|
||||||
{
|
|
||||||
var6 = CrashReport.makeCrashReport(var7, "Exception ticking world entities");
|
|
||||||
var4.addWorldInfoToCrashReport(var6);
|
|
||||||
throw new ReportedException(var6);
|
|
||||||
}
|
|
||||||
|
|
||||||
this.theProfiler.endSection();
|
this.theProfiler.endSection();
|
||||||
this.theProfiler.startSection("tracker");
|
this.theProfiler.startSection("tracker");
|
||||||
|
@ -742,13 +689,6 @@ public abstract class MinecraftServer implements ICommandSender, Runnable
|
||||||
return "";
|
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.
|
* Returns true if debugging is enabled, false otherwise.
|
||||||
*/
|
*/
|
||||||
|
@ -781,14 +721,6 @@ public abstract class MinecraftServer implements ICommandSender, Runnable
|
||||||
return "vanilla";
|
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.
|
* If par2Str begins with /, then it searches for commands, otherwise it returns players.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
|
||||||
import java.text.ParseException;
|
import java.text.ParseException;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
import net.minecraft.server.MinecraftServer;
|
|
||||||
|
|
||||||
public class BanEntry
|
public class BanEntry
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,17 +1,12 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import net.minecraft.server.MinecraftServer;
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileNotFoundException;
|
import java.io.*;
|
||||||
import java.io.FileReader;
|
|
||||||
import java.io.FileWriter;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.PrintWriter;
|
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import net.minecraft.server.MinecraftServer;
|
|
||||||
|
|
||||||
public class BanList
|
public class BanList
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import net.minecraft.server.MinecraftServer;
|
|
||||||
|
|
||||||
public class BiomeCache
|
public class BiomeCache
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
|
||||||
|
|
||||||
public abstract class BiomeGenBase
|
public abstract class BiomeGenBase
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class Block
|
public class Block
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Iterator;
|
|
||||||
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||||
|
|
||||||
|
import java.util.Iterator;
|
||||||
|
|
||||||
public class BlockBed extends BlockDirectional
|
public class BlockBed extends BlockDirectional
|
||||||
{
|
{
|
||||||
/** Maps the foot-of-bed block to the head-of-bed block. */
|
/** Maps the foot-of-bed block to the head-of-bed block. */
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public abstract class BlockButton extends Block
|
public abstract class BlockButton extends Block
|
||||||
{
|
{
|
||||||
/** Whether this button is sensible to arrows, used by wooden buttons. */
|
/** Whether this button is sensible to arrows, used by wooden buttons. */
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Iterator;
|
|
||||||
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||||
|
|
||||||
|
import java.util.Iterator;
|
||||||
|
|
||||||
public class BlockChest extends BlockContainer
|
public class BlockChest extends BlockContainer
|
||||||
{
|
{
|
||||||
private final EaglercraftRandom random = new EaglercraftRandom();
|
private final EaglercraftRandom random = new EaglercraftRandom();
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class BlockHopper extends BlockContainer
|
public class BlockHopper extends BlockContainer
|
||||||
{
|
{
|
||||||
private final EaglercraftRandom field_94457_a = new EaglercraftRandom();
|
private final EaglercraftRandom field_94457_a = new EaglercraftRandom();
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class BlockLeaves extends BlockLeavesBase
|
public class BlockLeaves extends BlockLeavesBase
|
||||||
{
|
{
|
||||||
public static final String[] LEAF_TYPES = new String[] {"oak", "spruce", "birch", "jungle"};
|
public static final String[] LEAF_TYPES = new String[] {"oak", "spruce", "birch", "jungle"};
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class BlockLog extends BlockRotatedPillar
|
public class BlockLog extends BlockRotatedPillar
|
||||||
{
|
{
|
||||||
/** The type of tree this log came from. */
|
/** The type of tree this log came from. */
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class BlockPane extends Block
|
public class BlockPane extends Block
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class BlockSapling extends BlockFlower
|
public class BlockSapling extends BlockFlower
|
||||||
{
|
{
|
||||||
public static final String[] WOOD_TYPES = new String[] {"oak", "spruce", "birch", "jungle"};
|
public static final String[] WOOD_TYPES = new String[] {"oak", "spruce", "birch", "jungle"};
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class BlockStairs extends Block
|
public class BlockStairs extends Block
|
||||||
{
|
{
|
||||||
private static final int[][] field_72159_a = new int[][] {{2, 6}, {3, 7}, {2, 3}, {6, 7}, {0, 4}, {1, 5}, {0, 1}, {4, 5}};
|
private static final int[][] field_72159_a = new int[][] {{2, 6}, {3, 7}, {2, 3}, {6, 7}, {0, 4}, {1, 5}, {0, 1}, {4, 5}};
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class BlockStep extends BlockHalfSlab
|
public class BlockStep extends BlockHalfSlab
|
||||||
{
|
{
|
||||||
/** The list of the types of step blocks. */
|
/** The list of the types of step blocks. */
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
public class Chunk
|
public class Chunk
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -100,21 +100,9 @@ public class ChunkProviderServer implements IChunkProvider
|
||||||
var5 = this.defaultEmptyChunk;
|
var5 = this.defaultEmptyChunk;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
var5 = this.currentChunkProvider.provideChunk(par1, par2);
|
var5 = this.currentChunkProvider.provideChunk(par1, par2);
|
||||||
}
|
}
|
||||||
catch (Throwable var9)
|
|
||||||
{
|
|
||||||
CrashReport var7 = CrashReport.makeCrashReport(var9, "Exception generating new chunk");
|
|
||||||
CrashReportCategory var8 = var7.makeCategory("Chunk to be generated");
|
|
||||||
var8.addCrashSection("Location", String.format("%d,%d", new Object[] {Integer.valueOf(par1), Integer.valueOf(par2)}));
|
|
||||||
var8.addCrashSection("Position hash", Long.valueOf(var3));
|
|
||||||
var8.addCrashSection("Generator", this.currentChunkProvider.makeString());
|
|
||||||
throw new ReportedException(var7);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
this.loadedChunkHashMap.add(var3, var5);
|
this.loadedChunkHashMap.add(var3, var5);
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import net.minecraft.server.MinecraftServer;
|
|
||||||
|
|
||||||
public abstract class CommandBase implements ICommand
|
public abstract class CommandBase implements ICommand
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
|
||||||
import java.io.File;
|
import java.io.File;
|
||||||
import java.io.FileWriter;
|
import java.io.FileWriter;
|
||||||
import java.text.SimpleDateFormat;
|
import java.text.SimpleDateFormat;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import net.minecraft.server.MinecraftServer;
|
|
||||||
|
|
||||||
public class CommandDebug extends CommandBase
|
public class CommandDebug extends CommandBase
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class CommandGive extends CommandBase
|
public class CommandGive extends CommandBase
|
||||||
{
|
{
|
||||||
public String getCommandName()
|
public String getCommandName()
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import net.minecraft.server.MinecraftServer;
|
|
||||||
|
|
||||||
public class CommandHelp extends CommandBase
|
public class CommandHelp extends CommandBase
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class CommandTime extends CommandBase
|
public class CommandTime extends CommandBase
|
||||||
{
|
{
|
||||||
public String getCommandName()
|
public String getCommandName()
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class CommandXP extends CommandBase
|
public class CommandXP extends CommandBase
|
||||||
{
|
{
|
||||||
public String getCommandName()
|
public String getCommandName()
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
public abstract class Container
|
public abstract class Container
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,299 +0,0 @@
|
||||||
package net.minecraft.src;
|
|
||||||
|
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileWriter;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.io.PrintWriter;
|
|
||||||
import java.io.StringWriter;
|
|
||||||
import java.text.SimpleDateFormat;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Date;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public class CrashReport
|
|
||||||
{
|
|
||||||
/** Description of the crash report. */
|
|
||||||
private final String description;
|
|
||||||
|
|
||||||
/** The Throwable that is the "cause" for this crash and Crash Report. */
|
|
||||||
private final Throwable cause;
|
|
||||||
private final CrashReportCategory field_85061_c = new CrashReportCategory(this, "System Details");
|
|
||||||
|
|
||||||
/** Holds the keys and values of all crash report sections. */
|
|
||||||
private final List crashReportSections = new ArrayList();
|
|
||||||
|
|
||||||
/** File of crash report. */
|
|
||||||
private File crashReportFile;
|
|
||||||
private boolean field_85059_f = true;
|
|
||||||
private StackTraceElement[] field_85060_g = new StackTraceElement[0];
|
|
||||||
|
|
||||||
public CrashReport(String par1Str, Throwable par2Throwable)
|
|
||||||
{
|
|
||||||
this.description = par1Str;
|
|
||||||
this.cause = par2Throwable;
|
|
||||||
this.populateEnvironment();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Populates this crash report with initial information about the running server and operating system / java
|
|
||||||
* environment
|
|
||||||
*/
|
|
||||||
private void populateEnvironment()
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the description of the Crash Report.
|
|
||||||
*/
|
|
||||||
public String getDescription()
|
|
||||||
{
|
|
||||||
return this.description;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the Throwable object that is the cause for the crash and Crash Report.
|
|
||||||
*/
|
|
||||||
public Throwable getCrashCause()
|
|
||||||
{
|
|
||||||
return this.cause;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the various sections of the crash report into the given StringBuilder
|
|
||||||
*/
|
|
||||||
public void getSectionsInStringBuilder(StringBuilder par1StringBuilder)
|
|
||||||
{
|
|
||||||
if (this.field_85060_g != null && this.field_85060_g.length > 0)
|
|
||||||
{
|
|
||||||
par1StringBuilder.append("-- Head --\n");
|
|
||||||
par1StringBuilder.append("Stacktrace:\n");
|
|
||||||
StackTraceElement[] var2 = this.field_85060_g;
|
|
||||||
int var3 = var2.length;
|
|
||||||
|
|
||||||
for (int var4 = 0; var4 < var3; ++var4)
|
|
||||||
{
|
|
||||||
StackTraceElement var5 = var2[var4];
|
|
||||||
par1StringBuilder.append("\t").append("at ").append(var5.toString());
|
|
||||||
par1StringBuilder.append("\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
par1StringBuilder.append("\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
Iterator var6 = this.crashReportSections.iterator();
|
|
||||||
|
|
||||||
while (var6.hasNext())
|
|
||||||
{
|
|
||||||
CrashReportCategory var7 = (CrashReportCategory)var6.next();
|
|
||||||
var7.func_85072_a(par1StringBuilder);
|
|
||||||
par1StringBuilder.append("\n\n");
|
|
||||||
}
|
|
||||||
|
|
||||||
this.field_85061_c.func_85072_a(par1StringBuilder);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the stack trace of the Throwable that caused this crash report, or if that fails, the cause .toString().
|
|
||||||
*/
|
|
||||||
public String getCauseStackTraceOrString()
|
|
||||||
{
|
|
||||||
StringWriter var1 = null;
|
|
||||||
PrintWriter var2 = null;
|
|
||||||
String var3 = this.cause.toString();
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var1 = new StringWriter();
|
|
||||||
var2 = new PrintWriter(var1);
|
|
||||||
this.cause.printStackTrace(var2);
|
|
||||||
var3 = var1.toString();
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (var1 != null)
|
|
||||||
{
|
|
||||||
var1.close();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (var2 != null)
|
|
||||||
{
|
|
||||||
var2.close();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (IOException var10)
|
|
||||||
{
|
|
||||||
;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return var3;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the complete report with headers, stack trace, and different sections as a string.
|
|
||||||
*/
|
|
||||||
public String getCompleteReport()
|
|
||||||
{
|
|
||||||
StringBuilder var1 = new StringBuilder();
|
|
||||||
var1.append("---- Minecraft Crash Report ----\n");
|
|
||||||
var1.append("// ");
|
|
||||||
var1.append(getWittyComment());
|
|
||||||
var1.append("\n\n");
|
|
||||||
var1.append("Time: ");
|
|
||||||
var1.append((new SimpleDateFormat()).format(new Date()));
|
|
||||||
var1.append("\n");
|
|
||||||
var1.append("Description: ");
|
|
||||||
var1.append(this.description);
|
|
||||||
var1.append("\n\n");
|
|
||||||
var1.append(this.getCauseStackTraceOrString());
|
|
||||||
var1.append("\n\nA detailed walkthrough of the error, its code path and all known details is as follows:\n");
|
|
||||||
|
|
||||||
for (int var2 = 0; var2 < 87; ++var2)
|
|
||||||
{
|
|
||||||
var1.append("-");
|
|
||||||
}
|
|
||||||
|
|
||||||
var1.append("\n\n");
|
|
||||||
this.getSectionsInStringBuilder(var1);
|
|
||||||
return var1.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the file this crash report is saved into.
|
|
||||||
*/
|
|
||||||
public File getFile()
|
|
||||||
{
|
|
||||||
return this.crashReportFile;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Saves the complete crash report to the given File.
|
|
||||||
*/
|
|
||||||
public boolean saveToFile(File par1File, ILogAgent par2ILogAgent)
|
|
||||||
{
|
|
||||||
if (this.crashReportFile != null)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (par1File.getParentFile() != null)
|
|
||||||
{
|
|
||||||
par1File.getParentFile().mkdirs();
|
|
||||||
}
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
FileWriter var3 = new FileWriter(par1File);
|
|
||||||
var3.write(this.getCompleteReport());
|
|
||||||
var3.close();
|
|
||||||
this.crashReportFile = par1File;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
catch (Throwable var4)
|
|
||||||
{
|
|
||||||
par2ILogAgent.logSevereException("Could not save crash report to " + par1File, var4);
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public CrashReportCategory getCategory()
|
|
||||||
{
|
|
||||||
return this.field_85061_c;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a CrashReportCategory
|
|
||||||
*/
|
|
||||||
public CrashReportCategory makeCategory(String par1Str)
|
|
||||||
{
|
|
||||||
return this.makeCategoryDepth(par1Str, 1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a CrashReportCategory for the given stack trace depth
|
|
||||||
*/
|
|
||||||
public CrashReportCategory makeCategoryDepth(String par1Str, int par2)
|
|
||||||
{
|
|
||||||
CrashReportCategory var3 = new CrashReportCategory(this, par1Str);
|
|
||||||
|
|
||||||
if (this.field_85059_f)
|
|
||||||
{
|
|
||||||
int var4 = var3.func_85073_a(par2);
|
|
||||||
StackTraceElement[] var5 = this.cause.getStackTrace();
|
|
||||||
StackTraceElement var6 = null;
|
|
||||||
StackTraceElement var7 = null;
|
|
||||||
|
|
||||||
if (var5 != null && var5.length - var4 < var5.length)
|
|
||||||
{
|
|
||||||
var6 = var5[var5.length - var4];
|
|
||||||
|
|
||||||
if (var5.length + 1 - var4 < var5.length)
|
|
||||||
{
|
|
||||||
var7 = var5[var5.length + 1 - var4];
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.field_85059_f = var3.func_85069_a(var6, var7);
|
|
||||||
|
|
||||||
if (var4 > 0 && !this.crashReportSections.isEmpty())
|
|
||||||
{
|
|
||||||
CrashReportCategory var8 = (CrashReportCategory)this.crashReportSections.get(this.crashReportSections.size() - 1);
|
|
||||||
var8.func_85070_b(var4);
|
|
||||||
}
|
|
||||||
else if (var5 != null && var5.length >= var4)
|
|
||||||
{
|
|
||||||
this.field_85060_g = new StackTraceElement[var5.length - var4];
|
|
||||||
System.arraycopy(var5, 0, this.field_85060_g, 0, this.field_85060_g.length);
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.field_85059_f = false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.crashReportSections.add(var3);
|
|
||||||
return var3;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets a random witty comment for inclusion in this CrashReport
|
|
||||||
*/
|
|
||||||
private static String getWittyComment()
|
|
||||||
{
|
|
||||||
String[] var0 = new String[] {"Who set us up the TNT?", "Everything\'s going to plan. No, really, that was supposed to happen.", "Uh... Did I do that?", "Oops.", "Why did you do that?", "I feel sad now :(", "My bad.", "I\'m sorry, Dave.", "I let you down. Sorry :(", "On the bright side, I bought you a teddy bear!", "Daisy, daisy...", "Oh - I know what I did wrong!", "Hey, that tickles! Hehehe!", "I blame Dinnerbone.", "You should try our sister game, Minceraft!", "Don\'t be sad. I\'ll do better next time, I promise!", "Don\'t be sad, have a hug! <3", "I just don\'t know what went wrong :(", "Shall we play a game?", "Quite honestly, I wouldn\'t worry myself about that.", "I bet Cylons wouldn\'t have this problem.", "Sorry :(", "Surprise! Haha. Well, this is awkward.", "Would you like a cupcake?", "Hi. I\'m Minecraft, and I\'m a crashaholic.", "Ooh. Shiny.", "This doesn\'t make any sense!", "Why is it breaking :(", "Don\'t do that.", "Ouch. That hurt :(", "You\'re mean.", "This is a token for 1 free hug. Redeem at your nearest Mojangsta: [~~HUG~~]", "There are four lights!"};
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
return var0[(int)(System.nanoTime() % (long)var0.length)];
|
|
||||||
}
|
|
||||||
catch (Throwable var2)
|
|
||||||
{
|
|
||||||
return "Witty comment unavailable :(";
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a crash report for the exception
|
|
||||||
*/
|
|
||||||
public static CrashReport makeCrashReport(Throwable par0Throwable, String par1Str)
|
|
||||||
{
|
|
||||||
CrashReport var2;
|
|
||||||
|
|
||||||
if (par0Throwable instanceof ReportedException)
|
|
||||||
{
|
|
||||||
var2 = ((ReportedException)par0Throwable).getCrashReport();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
var2 = new CrashReport(par1Str, par0Throwable);
|
|
||||||
}
|
|
||||||
|
|
||||||
return var2;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,208 +0,0 @@
|
||||||
package net.minecraft.src;
|
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.concurrent.Callable;
|
|
||||||
|
|
||||||
public class CrashReportCategory
|
|
||||||
{
|
|
||||||
private final CrashReport theCrashReport;
|
|
||||||
private final String field_85076_b;
|
|
||||||
private final List field_85077_c = new ArrayList();
|
|
||||||
private StackTraceElement[] stackTrace = new StackTraceElement[0];
|
|
||||||
|
|
||||||
public CrashReportCategory(CrashReport par1CrashReport, String par2Str)
|
|
||||||
{
|
|
||||||
this.theCrashReport = par1CrashReport;
|
|
||||||
this.field_85076_b = par2Str;
|
|
||||||
}
|
|
||||||
|
|
||||||
public static String func_85074_a(double par0, double par2, double par4)
|
|
||||||
{
|
|
||||||
return String.format("%.2f,%.2f,%.2f - %s", new Object[] {Double.valueOf(par0), Double.valueOf(par2), Double.valueOf(par4), getLocationInfo(MathHelper.floor_double(par0), MathHelper.floor_double(par2), MathHelper.floor_double(par4))});
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns a string with world information on location.Args:x,y,z
|
|
||||||
*/
|
|
||||||
public static String getLocationInfo(int par0, int par1, int par2)
|
|
||||||
{
|
|
||||||
StringBuilder var3 = new StringBuilder();
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var3.append(String.format("World: (%d,%d,%d)", new Object[] {Integer.valueOf(par0), Integer.valueOf(par1), Integer.valueOf(par2)}));
|
|
||||||
}
|
|
||||||
catch (Throwable var16)
|
|
||||||
{
|
|
||||||
var3.append("(Error finding world loc)");
|
|
||||||
}
|
|
||||||
|
|
||||||
var3.append(", ");
|
|
||||||
int var4;
|
|
||||||
int var5;
|
|
||||||
int var6;
|
|
||||||
int var7;
|
|
||||||
int var8;
|
|
||||||
int var9;
|
|
||||||
int var10;
|
|
||||||
int var11;
|
|
||||||
int var12;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var4 = par0 >> 4;
|
|
||||||
var5 = par2 >> 4;
|
|
||||||
var6 = par0 & 15;
|
|
||||||
var7 = par1 >> 4;
|
|
||||||
var8 = par2 & 15;
|
|
||||||
var9 = var4 << 4;
|
|
||||||
var10 = var5 << 4;
|
|
||||||
var11 = (var4 + 1 << 4) - 1;
|
|
||||||
var12 = (var5 + 1 << 4) - 1;
|
|
||||||
var3.append(String.format("Chunk: (at %d,%d,%d in %d,%d; contains blocks %d,0,%d to %d,255,%d)", new Object[] {Integer.valueOf(var6), Integer.valueOf(var7), Integer.valueOf(var8), Integer.valueOf(var4), Integer.valueOf(var5), Integer.valueOf(var9), Integer.valueOf(var10), Integer.valueOf(var11), Integer.valueOf(var12)}));
|
|
||||||
}
|
|
||||||
catch (Throwable var15)
|
|
||||||
{
|
|
||||||
var3.append("(Error finding chunk loc)");
|
|
||||||
}
|
|
||||||
|
|
||||||
var3.append(", ");
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var4 = par0 >> 9;
|
|
||||||
var5 = par2 >> 9;
|
|
||||||
var6 = var4 << 5;
|
|
||||||
var7 = var5 << 5;
|
|
||||||
var8 = (var4 + 1 << 5) - 1;
|
|
||||||
var9 = (var5 + 1 << 5) - 1;
|
|
||||||
var10 = var4 << 9;
|
|
||||||
var11 = var5 << 9;
|
|
||||||
var12 = (var4 + 1 << 9) - 1;
|
|
||||||
int var13 = (var5 + 1 << 9) - 1;
|
|
||||||
var3.append(String.format("Region: (%d,%d; contains chunks %d,%d to %d,%d, blocks %d,0,%d to %d,255,%d)", new Object[] {Integer.valueOf(var4), Integer.valueOf(var5), Integer.valueOf(var6), Integer.valueOf(var7), Integer.valueOf(var8), Integer.valueOf(var9), Integer.valueOf(var10), Integer.valueOf(var11), Integer.valueOf(var12), Integer.valueOf(var13)}));
|
|
||||||
}
|
|
||||||
catch (Throwable var14)
|
|
||||||
{
|
|
||||||
var3.append("(Error finding world loc)");
|
|
||||||
}
|
|
||||||
|
|
||||||
return var3.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a Crashreport section with the given name with the value set to the result of the given Callable;
|
|
||||||
*/
|
|
||||||
public void addCrashSectionCallable(String par1Str, Callable par2Callable)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
this.addCrashSection(par1Str, par2Callable.call());
|
|
||||||
}
|
|
||||||
catch (Throwable var4)
|
|
||||||
{
|
|
||||||
this.addCrashSectionThrowable(par1Str, var4);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a Crashreport section with the given name with the given value (convered .toString())
|
|
||||||
*/
|
|
||||||
public void addCrashSection(String par1Str, Object par2Obj)
|
|
||||||
{
|
|
||||||
this.field_85077_c.add(new CrashReportCategoryEntry(par1Str, par2Obj));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Adds a Crashreport section with the given name with the given Throwable
|
|
||||||
*/
|
|
||||||
public void addCrashSectionThrowable(String par1Str, Throwable par2Throwable)
|
|
||||||
{
|
|
||||||
this.addCrashSection(par1Str, par2Throwable);
|
|
||||||
}
|
|
||||||
|
|
||||||
public int func_85073_a(int par1)
|
|
||||||
{
|
|
||||||
StackTraceElement[] var2 = Thread.currentThread().getStackTrace();
|
|
||||||
this.stackTrace = new StackTraceElement[var2.length - 3 - par1];
|
|
||||||
System.arraycopy(var2, 3 + par1, this.stackTrace, 0, this.stackTrace.length);
|
|
||||||
return this.stackTrace.length;
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean func_85069_a(StackTraceElement par1StackTraceElement, StackTraceElement par2StackTraceElement)
|
|
||||||
{
|
|
||||||
if (this.stackTrace.length != 0 && par1StackTraceElement != null)
|
|
||||||
{
|
|
||||||
StackTraceElement var3 = this.stackTrace[0];
|
|
||||||
|
|
||||||
if (var3.isNativeMethod() == par1StackTraceElement.isNativeMethod() && var3.getClassName().equals(par1StackTraceElement.getClassName()) && var3.getFileName().equals(par1StackTraceElement.getFileName()) && var3.getMethodName().equals(par1StackTraceElement.getMethodName()))
|
|
||||||
{
|
|
||||||
if (par2StackTraceElement != null != this.stackTrace.length > 1)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else if (par2StackTraceElement != null && !this.stackTrace[1].equals(par2StackTraceElement))
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.stackTrace[0] = par1StackTraceElement;
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void func_85070_b(int par1)
|
|
||||||
{
|
|
||||||
StackTraceElement[] var2 = new StackTraceElement[this.stackTrace.length - par1];
|
|
||||||
System.arraycopy(this.stackTrace, 0, var2, 0, var2.length);
|
|
||||||
this.stackTrace = var2;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void func_85072_a(StringBuilder par1StringBuilder)
|
|
||||||
{
|
|
||||||
par1StringBuilder.append("-- ").append(this.field_85076_b).append(" --\n");
|
|
||||||
par1StringBuilder.append("Details:");
|
|
||||||
Iterator var2 = this.field_85077_c.iterator();
|
|
||||||
|
|
||||||
while (var2.hasNext())
|
|
||||||
{
|
|
||||||
CrashReportCategoryEntry var3 = (CrashReportCategoryEntry)var2.next();
|
|
||||||
par1StringBuilder.append("\n\t");
|
|
||||||
par1StringBuilder.append(var3.func_85089_a());
|
|
||||||
par1StringBuilder.append(": ");
|
|
||||||
par1StringBuilder.append(var3.func_85090_b());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.stackTrace != null && this.stackTrace.length > 0)
|
|
||||||
{
|
|
||||||
par1StringBuilder.append("\nStacktrace:");
|
|
||||||
StackTraceElement[] var6 = this.stackTrace;
|
|
||||||
int var7 = var6.length;
|
|
||||||
|
|
||||||
for (int var4 = 0; var4 < var7; ++var4)
|
|
||||||
{
|
|
||||||
StackTraceElement var5 = var6[var4];
|
|
||||||
par1StringBuilder.append("\n\tat ");
|
|
||||||
par1StringBuilder.append(var5.toString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public static void addBlockCrashInfo(CrashReportCategory par0CrashReportCategory, int par1, int par2, int par3, int par4, int par5)
|
|
||||||
{
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,36 +0,0 @@
|
||||||
package net.minecraft.src;
|
|
||||||
|
|
||||||
class CrashReportCategoryEntry
|
|
||||||
{
|
|
||||||
private final String field_85092_a;
|
|
||||||
private final String field_85091_b;
|
|
||||||
|
|
||||||
public CrashReportCategoryEntry(String par1Str, Object par2Obj)
|
|
||||||
{
|
|
||||||
this.field_85092_a = par1Str;
|
|
||||||
|
|
||||||
if (par2Obj == null)
|
|
||||||
{
|
|
||||||
this.field_85091_b = "~~NULL~~";
|
|
||||||
}
|
|
||||||
else if (par2Obj instanceof Throwable)
|
|
||||||
{
|
|
||||||
Throwable var3 = (Throwable)par2Obj;
|
|
||||||
this.field_85091_b = "~~ERROR~~ " + var3.getClass().getSimpleName() + ": " + var3.getMessage();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.field_85091_b = par2Obj.toString();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public String func_85089_a()
|
|
||||||
{
|
|
||||||
return this.field_85092_a;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String func_85090_b()
|
|
||||||
{
|
|
||||||
return this.field_85091_b;
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -3,11 +3,7 @@ package net.minecraft.src;
|
||||||
import java.io.DataInput;
|
import java.io.DataInput;
|
||||||
import java.io.DataOutput;
|
import java.io.DataOutput;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class DataWatcher
|
public class DataWatcher
|
||||||
{
|
{
|
||||||
|
@ -111,17 +107,7 @@ public class DataWatcher
|
||||||
//this.lock.readLock().lock();
|
//this.lock.readLock().lock();
|
||||||
WatchableObject var2;
|
WatchableObject var2;
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var2 = (WatchableObject)this.watchedObjects.get(Integer.valueOf(par1));
|
var2 = (WatchableObject)this.watchedObjects.get(Integer.valueOf(par1));
|
||||||
}
|
|
||||||
catch (Throwable var6)
|
|
||||||
{
|
|
||||||
CrashReport var4 = CrashReport.makeCrashReport(var6, "Getting synched entity data");
|
|
||||||
CrashReportCategory var5 = var4.makeCategory("Synched entity data");
|
|
||||||
var5.addCrashSection("Data ID", Integer.valueOf(par1));
|
|
||||||
throw new ReportedException(var4);
|
|
||||||
}
|
|
||||||
|
|
||||||
//this.lock.readLock().unlock();
|
//this.lock.readLock().unlock();
|
||||||
return var2;
|
return var2;
|
||||||
|
|
|
@ -1,5 +0,0 @@
|
||||||
package net.minecraft.src;
|
|
||||||
|
|
||||||
class Empty3
|
|
||||||
{
|
|
||||||
}
|
|
|
@ -1,8 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class EmptyChunk extends Chunk
|
public class EmptyChunk extends Chunk
|
||||||
{
|
{
|
||||||
public EmptyChunk(World par1World, int par2, int par3)
|
public EmptyChunk(World par1World, int par2, int par3)
|
||||||
|
|
|
@ -16,12 +16,12 @@ public class EnchantmentHelper
|
||||||
/**
|
/**
|
||||||
* Used to calculate the extra armor of enchantments on armors equipped on player.
|
* Used to calculate the extra armor of enchantments on armors equipped on player.
|
||||||
*/
|
*/
|
||||||
private static final EnchantmentModifierDamage enchantmentModifierDamage = new EnchantmentModifierDamage((Empty3)null);
|
private static final EnchantmentModifierDamage enchantmentModifierDamage = new EnchantmentModifierDamage(null);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Used to calculate the (magic) extra damage done by enchantments on current equipped item of player.
|
* Used to calculate the (magic) extra damage done by enchantments on current equipped item of player.
|
||||||
*/
|
*/
|
||||||
private static final EnchantmentModifierLiving enchantmentModifierLiving = new EnchantmentModifierLiving((Empty3)null);
|
private static final EnchantmentModifierLiving enchantmentModifierLiving = new EnchantmentModifierLiving(null);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Returns the level of enchantment on the ItemStack passed.
|
* Returns the level of enchantment on the ItemStack passed.
|
||||||
|
|
|
@ -23,7 +23,7 @@ final class EnchantmentModifierDamage implements IEnchantmentModifier
|
||||||
this.damageModifier += par1Enchantment.calcModifierDamage(par2, this.source);
|
this.damageModifier += par1Enchantment.calcModifierDamage(par2, this.source);
|
||||||
}
|
}
|
||||||
|
|
||||||
EnchantmentModifierDamage(Empty3 par1Empty3)
|
EnchantmentModifierDamage(Object par1Empty3)
|
||||||
{
|
{
|
||||||
this();
|
this();
|
||||||
}
|
}
|
||||||
|
|
|
@ -22,7 +22,7 @@ final class EnchantmentModifierLiving implements IEnchantmentModifier
|
||||||
this.livingModifier += par1Enchantment.calcModifierLiving(par2, this.entityLiving);
|
this.livingModifier += par1Enchantment.calcModifierLiving(par2, this.entityLiving);
|
||||||
}
|
}
|
||||||
|
|
||||||
EnchantmentModifierLiving(Empty3 par1Empty3)
|
EnchantmentModifierLiving(Object par1Empty3)
|
||||||
{
|
{
|
||||||
this();
|
this();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||||
import net.lax1dude.eaglercraft.ProfileUUID;
|
import net.lax1dude.eaglercraft.ProfileUUID;
|
||||||
import net.minecraft.server.MinecraftServer;
|
import net.minecraft.server.MinecraftServer;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public abstract class Entity
|
public abstract class Entity
|
||||||
{
|
{
|
||||||
private static int nextEntityID;
|
private static int nextEntityID;
|
||||||
|
@ -878,10 +879,7 @@ public abstract class Entity
|
||||||
}
|
}
|
||||||
catch (Throwable var34)
|
catch (Throwable var34)
|
||||||
{
|
{
|
||||||
CrashReport var41 = CrashReport.makeCrashReport(var34, "Checking entity tile collision");
|
|
||||||
CrashReportCategory var40 = var41.makeCategory("Entity being checked for collision");
|
|
||||||
this.addEntityCrashInfo(var40);
|
|
||||||
throw new ReportedException(var41);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
boolean var39 = this.isWet();
|
boolean var39 = this.isWet();
|
||||||
|
@ -937,19 +935,9 @@ public abstract class Entity
|
||||||
int var10 = this.worldObj.getBlockId(var7, var8, var9);
|
int var10 = this.worldObj.getBlockId(var7, var8, var9);
|
||||||
|
|
||||||
if (var10 > 0)
|
if (var10 > 0)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
Block.blocksList[var10].onEntityCollidedWithBlock(this.worldObj, var7, var8, var9, this);
|
Block.blocksList[var10].onEntityCollidedWithBlock(this.worldObj, var7, var8, var9, this);
|
||||||
}
|
}
|
||||||
catch (Throwable var14)
|
|
||||||
{
|
|
||||||
CrashReport var12 = CrashReport.makeCrashReport(var14, "Colliding entity with tile");
|
|
||||||
CrashReportCategory var13 = var12.makeCategory("Tile being collided with");
|
|
||||||
CrashReportCategory.addBlockCrashInfo(var13, var7, var8, var9, var10, this.worldObj.getBlockMetadata(var7, var8, var9));
|
|
||||||
throw new ReportedException(var12);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1495,10 +1483,6 @@ public abstract class Entity
|
||||||
}
|
}
|
||||||
catch (Throwable var5)
|
catch (Throwable var5)
|
||||||
{
|
{
|
||||||
CrashReport var3 = CrashReport.makeCrashReport(var5, "Saving entity NBT");
|
|
||||||
CrashReportCategory var4 = var3.makeCategory("Entity being saved");
|
|
||||||
this.addEntityCrashInfo(var4);
|
|
||||||
throw new ReportedException(var3);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1560,10 +1544,7 @@ public abstract class Entity
|
||||||
}
|
}
|
||||||
catch (Throwable var5)
|
catch (Throwable var5)
|
||||||
{
|
{
|
||||||
CrashReport var3 = CrashReport.makeCrashReport(var5, "Loading entity NBT");
|
|
||||||
CrashReportCategory var4 = var3.makeCategory("Entity being loaded");
|
|
||||||
this.addEntityCrashInfo(var4);
|
|
||||||
throw new ReportedException(var3);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2349,14 +2330,6 @@ public abstract class Entity
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addEntityCrashInfo(CrashReportCategory par1CrashReportCategory)
|
|
||||||
{
|
|
||||||
par1CrashReportCategory.addCrashSection("Entity ID", Integer.valueOf(this.entityId));
|
|
||||||
par1CrashReportCategory.addCrashSection("Entity\'s Exact location", String.format("%.2f, %.2f, %.2f", new Object[] {Double.valueOf(this.posX), Double.valueOf(this.posY), Double.valueOf(this.posZ)}));
|
|
||||||
par1CrashReportCategory.addCrashSection("Entity\'s Block location", CrashReportCategory.getLocationInfo(MathHelper.floor_double(this.posX), MathHelper.floor_double(this.posY), MathHelper.floor_double(this.posZ)));
|
|
||||||
par1CrashReportCategory.addCrashSection("Entity\'s Momentum", String.format("%.2f, %.2f, %.2f", new Object[] {Double.valueOf(this.motionX), Double.valueOf(this.motionY), Double.valueOf(this.motionZ)}));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return whether this entity should be rendered as on fire.
|
* Return whether this entity should be rendered as on fire.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
|
||||||
|
|
||||||
public class EntityAIMate extends EntityAIBase
|
public class EntityAIMate extends EntityAIBase
|
||||||
{
|
{
|
||||||
|
|
|
@ -299,10 +299,4 @@ public class EntityFallingSand extends Entity
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void addEntityCrashInfo(CrashReportCategory par1CrashReportCategory)
|
|
||||||
{
|
|
||||||
super.addEntityCrashInfo(par1CrashReportCategory);
|
|
||||||
par1CrashReportCategory.addCrashSection("Immitating block ID", Integer.valueOf(this.blockID));
|
|
||||||
par1CrashReportCategory.addCrashSection("Immitating block data", Integer.valueOf(this.metadata));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.lax1dude.eaglercraft.ProfileUUID;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import net.lax1dude.eaglercraft.ProfileUUID;
|
|
||||||
|
|
||||||
public abstract class EntityLiving extends EntityLivingBase
|
public abstract class EntityLiving extends EntityLivingBase
|
||||||
{
|
{
|
||||||
|
|
|
@ -241,8 +241,6 @@ public class EntityPlayerMP extends EntityPlayer implements ICrafting
|
||||||
}
|
}
|
||||||
|
|
||||||
public void onUpdateEntity()
|
public void onUpdateEntity()
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
super.onUpdate();
|
super.onUpdate();
|
||||||
|
|
||||||
|
@ -288,14 +286,6 @@ public class EntityPlayerMP extends EntityPlayer implements ICrafting
|
||||||
this.playerNetServerHandler.sendPacketToPlayer(new Packet43Experience(this.experience, this.experienceTotal, this.experienceLevel));
|
this.playerNetServerHandler.sendPacketToPlayer(new Packet43Experience(this.experience, this.experienceTotal, this.experienceLevel));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Throwable var4)
|
|
||||||
{
|
|
||||||
CrashReport var2 = CrashReport.makeCrashReport(var4, "Ticking player");
|
|
||||||
CrashReportCategory var3 = var2.makeCategory("Player being ticked");
|
|
||||||
this.addEntityCrashInfo(var3);
|
|
||||||
throw new ReportedException(var2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the mob's health reaches 0.
|
* Called when the mob's health reaches 0.
|
||||||
|
|
|
@ -1034,17 +1034,8 @@ public class EntityRenderer
|
||||||
{
|
{
|
||||||
EaglerAdapter.glClear(EaglerAdapter.GL_DEPTH_BUFFER_BIT);
|
EaglerAdapter.glClear(EaglerAdapter.GL_DEPTH_BUFFER_BIT);
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
this.mc.currentScreen.drawScreen(var16, var17, par1);
|
this.mc.currentScreen.drawScreen(var16, var17, par1);
|
||||||
}
|
}
|
||||||
catch (Throwable var12)
|
|
||||||
{
|
|
||||||
CrashReport var10 = CrashReport.makeCrashReport(var12, "Rendering screen");
|
|
||||||
CrashReportCategory var11 = var10.makeCategory("Screen render details");
|
|
||||||
throw new ReportedException(var10);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.lax1dude.eaglercraft.ProfileUUID;
|
||||||
|
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import net.lax1dude.eaglercraft.ProfileUUID;
|
|
||||||
|
|
||||||
public class EntityWitch extends EntityMob implements IRangedAttackMob
|
public class EntityWitch extends EntityMob implements IRangedAttackMob
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Calendar;
|
|
||||||
import net.lax1dude.eaglercraft.ProfileUUID;
|
import net.lax1dude.eaglercraft.ProfileUUID;
|
||||||
|
|
||||||
|
import java.util.Calendar;
|
||||||
|
|
||||||
public class EntityZombie extends EntityMob
|
public class EntityZombie extends EntityMob
|
||||||
{
|
{
|
||||||
protected static final Attribute field_110186_bp = (new RangedAttribute("zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).func_111117_a("Spawn Reinforcements Chance");
|
protected static final Attribute field_110186_bp = (new RangedAttribute("zombie.spawnReinforcements", 0.0D, 0.0D, 1.0D)).func_111117_a("Spawn Reinforcements Chance");
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
public class Explosion
|
public class Explosion
|
||||||
{
|
{
|
||||||
/** whether or not the explosion sets fire to blocks around it */
|
/** whether or not the explosion sets fire to blocks around it */
|
||||||
|
|
|
@ -1,15 +1,14 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
import net.lax1dude.eaglercraft.EaglerImage;
|
import net.lax1dude.eaglercraft.EaglerImage;
|
||||||
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||||
import net.lax1dude.eaglercraft.TextureLocation;
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||||
import net.minecraft.src.Minecraft;
|
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.Iterator;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class FontRenderer {
|
public class FontRenderer {
|
||||||
/** Array of width of all the characters in default.png */
|
/** Array of width of all the characters in default.png */
|
||||||
|
|
|
@ -1,18 +1,14 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
|
|
||||||
import java.nio.ByteBuffer;
|
import java.nio.ByteBuffer;
|
||||||
import java.nio.ByteOrder;
|
import java.nio.ByteOrder;
|
||||||
import java.nio.FloatBuffer;
|
import java.nio.FloatBuffer;
|
||||||
import java.nio.IntBuffer;
|
import java.nio.IntBuffer;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
|
||||||
|
|
||||||
public class GLAllocation {
|
public class GLAllocation {
|
||||||
private static final Map field_74531_a = new HashMap();
|
private static final Map field_74531_a = new HashMap();
|
||||||
private static final List field_74530_b = new ArrayList();
|
private static final List field_74530_b = new ArrayList();
|
||||||
|
|
|
@ -3,7 +3,6 @@ package net.minecraft.src;
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
import net.lax1dude.eaglercraft.IntegratedServer;
|
import net.lax1dude.eaglercraft.IntegratedServer;
|
||||||
import net.lax1dude.eaglercraft.LocalStorageManager;
|
import net.lax1dude.eaglercraft.LocalStorageManager;
|
||||||
import net.minecraft.src.Minecraft;
|
|
||||||
|
|
||||||
public class GameSettings {
|
public class GameSettings {
|
||||||
private static final String[] RENDER_DISTANCES = new String[] { "options.renderDistance.far", "options.renderDistance.normal", "options.renderDistance.short", "options.renderDistance.tiny" };
|
private static final String[] RENDER_DISTANCES = new String[] { "options.renderDistance.far", "options.renderDistance.normal", "options.renderDistance.short", "options.renderDistance.tiny" };
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
import net.lax1dude.eaglercraft.TextureLocation;
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
|
||||||
|
|
||||||
public class Gui
|
public class Gui
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.DataOutputStream;
|
import java.io.DataOutputStream;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.TextureLocation;
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
|
||||||
|
|
||||||
public class GuiBeacon extends GuiContainer
|
public class GuiBeacon extends GuiContainer
|
||||||
{
|
{
|
||||||
private static final TextureLocation beaconGuiTextures = new TextureLocation("textures/gui/container/beacon.png");
|
private static final TextureLocation beaconGuiTextures = new TextureLocation("textures/gui/container/beacon.png");
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.TextureLocation;
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
|
|
||||||
public class GuiButton extends Gui
|
public class GuiButton extends Gui
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
|
||||||
|
|
||||||
public class GuiChat extends GuiScreen {
|
public class GuiChat extends GuiScreen {
|
||||||
private String field_73898_b = "";
|
private String field_73898_b = "";
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.TextureLocation;
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
|
|
||||||
public class GuiChest extends GuiContainer
|
public class GuiChest extends GuiContainer
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,13 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Arrays;
|
|
||||||
import java.util.HashSet;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Set;
|
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.TextureLocation;
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
|
|
||||||
|
import java.util.*;
|
||||||
|
|
||||||
public abstract class GuiContainer extends GuiScreen
|
public abstract class GuiContainer extends GuiScreen
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.TextureLocation;
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
|
|
||||||
public class GuiCrafting extends GuiContainer
|
public class GuiCrafting extends GuiContainer
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.TextureLocation;
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
|
|
||||||
public class GuiDispenser extends GuiContainer
|
public class GuiDispenser extends GuiContainer
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.TextureLocation;
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
|
|
||||||
public class GuiFurnace extends GuiContainer
|
public class GuiFurnace extends GuiContainer
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Iterator;
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
|
|
||||||
|
import java.util.Iterator;
|
||||||
|
|
||||||
public class GuiGameOver extends GuiScreen
|
public class GuiGameOver extends GuiScreen
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.TextureLocation;
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
|
|
||||||
public class GuiHopper extends GuiContainer
|
public class GuiHopper extends GuiContainer
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,13 +1,12 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.lax1dude.eaglercraft.*;
|
||||||
|
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||||
|
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.*;
|
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
|
||||||
|
|
||||||
public class GuiIngame extends Gui
|
public class GuiIngame extends Gui
|
||||||
{
|
{
|
||||||
private static final TextureLocation vignetteTexPath = new TextureLocation("textures/misc/vignette.png");
|
private static final TextureLocation vignetteTexPath = new TextureLocation("textures/misc/vignette.png");
|
||||||
|
|
|
@ -1,15 +1,13 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.lax1dude.eaglercraft.*;
|
||||||
|
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Calendar;
|
import java.util.Calendar;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.*;
|
|
||||||
import net.lax1dude.eaglercraft.IntegratedServer;
|
|
||||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
|
||||||
import net.minecraft.src.Minecraft;
|
|
||||||
|
|
||||||
public class GuiMainMenu extends GuiScreen {
|
public class GuiMainMenu extends GuiScreen {
|
||||||
|
|
||||||
/** The RNG used by the Main Menu Screen. */
|
/** The RNG used by the Main Menu Screen. */
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
import java.io.ByteArrayOutputStream;
|
||||||
import java.io.DataOutputStream;
|
import java.io.DataOutputStream;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.TextureLocation;
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
|
||||||
|
|
||||||
public class GuiMerchant extends GuiContainer
|
public class GuiMerchant extends GuiContainer
|
||||||
{
|
{
|
||||||
private static final TextureLocation merchantGuiTextures = new TextureLocation("textures/gui/container/villager.png");
|
private static final TextureLocation merchantGuiTextures = new TextureLocation("textures/gui/container/villager.png");
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
|
||||||
|
|
||||||
public class GuiNewChat extends Gui
|
public class GuiNewChat extends Gui
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
import net.lax1dude.eaglercraft.TextureLocation;
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
import net.minecraft.src.Minecraft;
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class GuiParticle extends Gui {
|
public class GuiParticle extends Gui {
|
||||||
private List particles = new ArrayList();
|
private List particles = new ArrayList();
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.TextureLocation;
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class GuiRepair extends GuiContainer implements ICrafting
|
public class GuiRepair extends GuiContainer implements ICrafting
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,12 +1,11 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
import net.lax1dude.eaglercraft.TextureLocation;
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||||
import net.minecraft.src.Minecraft;
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class GuiScreen extends Gui {
|
public class GuiScreen extends Gui {
|
||||||
public static final boolean isMacOs = Minecraft.getOs() == EnumOS.MACOS;
|
public static final boolean isMacOs = Minecraft.getOs() == EnumOS.MACOS;
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
import net.minecraft.src.Minecraft;
|
|
||||||
|
|
||||||
public class GuiSlider2 extends GuiButton {
|
public class GuiSlider2 extends GuiButton {
|
||||||
/** The value of this slider control. */
|
/** The value of this slider control. */
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
import net.lax1dude.eaglercraft.TextureLocation;
|
import net.lax1dude.eaglercraft.TextureLocation;
|
||||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||||
import net.minecraft.src.Minecraft;
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public abstract class GuiSlot {
|
public abstract class GuiSlot {
|
||||||
protected final Minecraft mc;
|
protected final Minecraft mc;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
|
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.Comparator;
|
import java.util.Comparator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
|
||||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
|
||||||
|
|
||||||
abstract class GuiSlotStats extends GuiSlot
|
abstract class GuiSlotStats extends GuiSlot
|
||||||
{
|
{
|
||||||
protected int field_77262_g;
|
protected int field_77262_g;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
|
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||||
|
|
||||||
public class GuiStats extends GuiScreen
|
public class GuiStats extends GuiScreen
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
|
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||||
|
|
||||||
public class GuiTextField extends Gui
|
public class GuiTextField extends Gui
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,14 +1,11 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.io.BufferedReader;
|
import net.lax1dude.eaglercraft.*;
|
||||||
import java.io.InputStreamReader;
|
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.*;
|
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
|
||||||
|
|
||||||
public class GuiWinGame extends GuiScreen
|
public class GuiWinGame extends GuiScreen
|
||||||
{
|
{
|
||||||
private static final TextureLocation minecraftLogoTexture = new TextureLocation("textures/gui/title/minecraft.png");
|
private static final TextureLocation minecraftLogoTexture = new TextureLocation("textures/gui/title/minecraft.png");
|
||||||
|
|
|
@ -1,8 +1,9 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.Date;
|
|
||||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
class GuiWorldSlot extends GuiSlot
|
class GuiWorldSlot extends GuiSlot
|
||||||
{
|
{
|
||||||
final GuiSelectWorld parentWorldGui;
|
final GuiSelectWorld parentWorldGui;
|
||||||
|
|
|
@ -386,8 +386,6 @@ public class InventoryPlayer implements IInventory
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
int var2;
|
int var2;
|
||||||
|
|
||||||
|
@ -432,15 +430,6 @@ public class InventoryPlayer implements IInventory
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Throwable var5)
|
|
||||||
{
|
|
||||||
CrashReport var3 = CrashReport.makeCrashReport(var5, "Adding item to inventory");
|
|
||||||
CrashReportCategory var4 = var3.makeCategory("Item being added");
|
|
||||||
var4.addCrashSection("Item ID", Integer.valueOf(par1ItemStack.itemID));
|
|
||||||
var4.addCrashSection("Item data", Integer.valueOf(par1ItemStack.getItemDamage()));
|
|
||||||
throw new ReportedException(var3);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||||
import net.lax1dude.eaglercraft.ProfileUUID;
|
import net.lax1dude.eaglercraft.ProfileUUID;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class Item
|
public class Item
|
||||||
{
|
{
|
||||||
protected static final ProfileUUID field_111210_e = ProfileUUID.fromString("CB3F55D3-645C-4F38-A497-9C13A33DB5CF");
|
protected static final ProfileUUID field_111210_e = ProfileUUID.fromString("CB3F55D3-645C-4F38-A497-9C13A33DB5CF");
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class ItemPotion extends Item
|
public class ItemPotion extends Item
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,11 +1,10 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||||
|
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
|
||||||
import java.util.Map.Entry;
|
|
||||||
|
|
||||||
public final class ItemStack
|
public final class ItemStack
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.logging.ConsoleHandler;
|
import java.util.logging.*;
|
||||||
import java.util.logging.FileHandler;
|
|
||||||
import java.util.logging.Handler;
|
|
||||||
import java.util.logging.Level;
|
|
||||||
import java.util.logging.Logger;
|
|
||||||
|
|
||||||
public class LogAgent implements ILogAgent
|
public class LogAgent implements ILogAgent
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,10 +1,6 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.LinkedHashMap;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class MapData extends WorldSavedData
|
public class MapData extends WorldSavedData
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,15 +1,7 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.io.DataInputStream;
|
import java.io.*;
|
||||||
import java.io.DataOutputStream;
|
import java.util.*;
|
||||||
import java.io.File;
|
|
||||||
import java.io.FileInputStream;
|
|
||||||
import java.io.FileOutputStream;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
public class MapStorage
|
public class MapStorage
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,16 +1,13 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.*;
|
import net.lax1dude.eaglercraft.*;
|
||||||
import net.lax1dude.eaglercraft.IntegratedServer;
|
|
||||||
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
import net.lax1dude.eaglercraft.adapter.Tessellator;
|
||||||
import net.lax1dude.eaglercraft.glemu.FixedFunctionShader;
|
import net.lax1dude.eaglercraft.glemu.FixedFunctionShader;
|
||||||
import java.io.File;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.nio.ByteBuffer;
|
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.text.DecimalFormat;
|
import java.util.ArrayList;
|
||||||
import java.util.*;
|
import java.util.HashSet;
|
||||||
import javax.imageio.ImageIO;
|
import java.util.List;
|
||||||
|
|
||||||
public class Minecraft
|
public class Minecraft
|
||||||
{
|
{
|
||||||
|
@ -30,8 +27,6 @@ public class Minecraft
|
||||||
private boolean hasCrashed;
|
private boolean hasCrashed;
|
||||||
private boolean isGonnaTakeDatScreenShot = false;
|
private boolean isGonnaTakeDatScreenShot = false;
|
||||||
|
|
||||||
/** Instance of CrashReport. */
|
|
||||||
private CrashReport crashReporter;
|
|
||||||
public int displayWidth;
|
public int displayWidth;
|
||||||
public int displayHeight;
|
public int displayHeight;
|
||||||
private Timer timer = new Timer(20.0F);
|
private Timer timer = new Timer(20.0F);
|
||||||
|
@ -93,8 +88,7 @@ public class Minecraft
|
||||||
private ISaveFormat saveLoader;
|
private ISaveFormat saveLoader;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* This is set to fpsCounter every debug screen update, and is shown on the debug screen. It's also sent as part of
|
* This is set to fpsCounter every debug screen update, and is shown on the debug screen.
|
||||||
* the usage snooping.
|
|
||||||
*/
|
*/
|
||||||
public static int debugFPS;
|
public static int debugFPS;
|
||||||
|
|
||||||
|
@ -108,16 +102,6 @@ public class Minecraft
|
||||||
*/
|
*/
|
||||||
private boolean refreshTexturePacksScheduled;
|
private boolean refreshTexturePacksScheduled;
|
||||||
|
|
||||||
/** Stat file writer */
|
|
||||||
//public StatFileWriter statFileWriter;
|
|
||||||
private String serverName;
|
|
||||||
private int serverPort;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Makes sure it doesn't keep taking screenshots when both buttons are down.
|
|
||||||
*/
|
|
||||||
boolean isTakingScreenshot;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Does the actual gameplay have focus. If so then mouse and keys will effect the player instead of menus.
|
* Does the actual gameplay have focus. If so then mouse and keys will effect the player instead of menus.
|
||||||
*/
|
*/
|
||||||
|
@ -172,43 +156,12 @@ public class Minecraft
|
||||||
this.tempDisplayHeight = 480;
|
this.tempDisplayHeight = 480;
|
||||||
this.fullscreen = false;
|
this.fullscreen = false;
|
||||||
Packet3Chat.maxChatLength = 32767;
|
Packet3Chat.maxChatLength = 32767;
|
||||||
this.startTimerHackThread();
|
|
||||||
this.displayWidth = 854;
|
this.displayWidth = 854;
|
||||||
this.displayHeight = 480;
|
this.displayHeight = 480;
|
||||||
this.fullscreen = false;
|
this.fullscreen = false;
|
||||||
theMinecraft = this;
|
theMinecraft = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void startTimerHackThread()
|
|
||||||
{
|
|
||||||
ThreadClientSleep var1 = new ThreadClientSleep(this, "Timer hack thread");
|
|
||||||
var1.setDaemon(true);
|
|
||||||
var1.start();
|
|
||||||
}
|
|
||||||
|
|
||||||
public void crashed(CrashReport par1CrashReport)
|
|
||||||
{
|
|
||||||
this.hasCrashed = true;
|
|
||||||
this.crashReporter = par1CrashReport;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Wrapper around displayCrashReportInternal
|
|
||||||
*/
|
|
||||||
public void displayCrashReport(CrashReport par1CrashReport)
|
|
||||||
{
|
|
||||||
System.out.println(par1CrashReport.getCompleteReport());
|
|
||||||
|
|
||||||
System.out.println("#@?@# Game crashed! Crash report could not be saved. #@?@#");
|
|
||||||
System.exit(-2);
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setServer(String par1Str, int par2)
|
|
||||||
{
|
|
||||||
this.serverName = par1Str;
|
|
||||||
this.serverPort = par2;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Starts the game: initializes the canvas, the title, the settings, etcetera.
|
* Starts the game: initializes the canvas, the title, the settings, etcetera.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -1,10 +1,11 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
|
||||||
|
|
||||||
public abstract class ModelBase
|
public abstract class ModelBase
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
import net.lax1dude.eaglercraft.EaglerAdapter;
|
||||||
|
import net.lax1dude.eaglercraft.EaglercraftRandom;
|
||||||
|
|
||||||
public class ModelGhast extends ModelBase
|
public class ModelGhast extends ModelBase
|
||||||
{
|
{
|
||||||
|
|
|
@ -84,20 +84,9 @@ public abstract class NBTBase
|
||||||
String var3 = par0DataInput.readUTF();
|
String var3 = par0DataInput.readUTF();
|
||||||
NBTBase var4 = newTag(var2, var3);
|
NBTBase var4 = newTag(var2, var3);
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
var4.load(par0DataInput, par1);
|
var4.load(par0DataInput, par1);
|
||||||
return var4;
|
return var4;
|
||||||
}
|
}
|
||||||
catch (IOException var8)
|
|
||||||
{
|
|
||||||
CrashReport var6 = CrashReport.makeCrashReport(var8, "Loading NBT data");
|
|
||||||
CrashReportCategory var7 = var6.makeCategory("NBT Tag");
|
|
||||||
var7.addCrashSection("Tag name", var3);
|
|
||||||
var7.addCrashSection("Tag type", Byte.valueOf(var2));
|
|
||||||
throw new ReportedException(var6);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -194,167 +194,90 @@ public class NBTTagCompound extends NBTBase
|
||||||
* Retrieves a byte value using the specified key, or 0 if no such key was stored.
|
* Retrieves a byte value using the specified key, or 0 if no such key was stored.
|
||||||
*/
|
*/
|
||||||
public byte getByte(String par1Str)
|
public byte getByte(String par1Str)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
return !this.tagMap.containsKey(par1Str) ? 0 : ((NBTTagByte)this.tagMap.get(par1Str)).data;
|
return !this.tagMap.containsKey(par1Str) ? 0 : ((NBTTagByte)this.tagMap.get(par1Str)).data;
|
||||||
}
|
}
|
||||||
catch (ClassCastException var3)
|
|
||||||
{
|
|
||||||
throw new ReportedException(this.createCrashReport(par1Str, 1, var3));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves a short value using the specified key, or 0 if no such key was stored.
|
* Retrieves a short value using the specified key, or 0 if no such key was stored.
|
||||||
*/
|
*/
|
||||||
public short getShort(String par1Str)
|
public short getShort(String par1Str)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
return !this.tagMap.containsKey(par1Str) ? 0 : ((NBTTagShort)this.tagMap.get(par1Str)).data;
|
return !this.tagMap.containsKey(par1Str) ? 0 : ((NBTTagShort)this.tagMap.get(par1Str)).data;
|
||||||
}
|
}
|
||||||
catch (ClassCastException var3)
|
|
||||||
{
|
|
||||||
throw new ReportedException(this.createCrashReport(par1Str, 2, var3));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves an integer value using the specified key, or 0 if no such key was stored.
|
* Retrieves an integer value using the specified key, or 0 if no such key was stored.
|
||||||
*/
|
*/
|
||||||
public int getInteger(String par1Str)
|
public int getInteger(String par1Str)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
return !this.tagMap.containsKey(par1Str) ? 0 : ((NBTTagInt)this.tagMap.get(par1Str)).data;
|
return !this.tagMap.containsKey(par1Str) ? 0 : ((NBTTagInt)this.tagMap.get(par1Str)).data;
|
||||||
}
|
}
|
||||||
catch (ClassCastException var3)
|
|
||||||
{
|
|
||||||
throw new ReportedException(this.createCrashReport(par1Str, 3, var3));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves a long value using the specified key, or 0 if no such key was stored.
|
* Retrieves a long value using the specified key, or 0 if no such key was stored.
|
||||||
*/
|
*/
|
||||||
public long getLong(String par1Str)
|
public long getLong(String par1Str)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
return !this.tagMap.containsKey(par1Str) ? 0L : ((NBTTagLong)this.tagMap.get(par1Str)).data;
|
return !this.tagMap.containsKey(par1Str) ? 0L : ((NBTTagLong)this.tagMap.get(par1Str)).data;
|
||||||
}
|
}
|
||||||
catch (ClassCastException var3)
|
|
||||||
{
|
|
||||||
throw new ReportedException(this.createCrashReport(par1Str, 4, var3));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves a float value using the specified key, or 0 if no such key was stored.
|
* Retrieves a float value using the specified key, or 0 if no such key was stored.
|
||||||
*/
|
*/
|
||||||
public float getFloat(String par1Str)
|
public float getFloat(String par1Str)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
return !this.tagMap.containsKey(par1Str) ? 0.0F : ((NBTTagFloat)this.tagMap.get(par1Str)).data;
|
return !this.tagMap.containsKey(par1Str) ? 0.0F : ((NBTTagFloat)this.tagMap.get(par1Str)).data;
|
||||||
}
|
}
|
||||||
catch (ClassCastException var3)
|
|
||||||
{
|
|
||||||
throw new ReportedException(this.createCrashReport(par1Str, 5, var3));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves a double value using the specified key, or 0 if no such key was stored.
|
* Retrieves a double value using the specified key, or 0 if no such key was stored.
|
||||||
*/
|
*/
|
||||||
public double getDouble(String par1Str)
|
public double getDouble(String par1Str)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
return !this.tagMap.containsKey(par1Str) ? 0.0D : ((NBTTagDouble)this.tagMap.get(par1Str)).data;
|
return !this.tagMap.containsKey(par1Str) ? 0.0D : ((NBTTagDouble)this.tagMap.get(par1Str)).data;
|
||||||
}
|
}
|
||||||
catch (ClassCastException var3)
|
|
||||||
{
|
|
||||||
throw new ReportedException(this.createCrashReport(par1Str, 6, var3));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves a string value using the specified key, or an empty string if no such key was stored.
|
* Retrieves a string value using the specified key, or an empty string if no such key was stored.
|
||||||
*/
|
*/
|
||||||
public String getString(String par1Str)
|
public String getString(String par1Str)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
return !this.tagMap.containsKey(par1Str) ? "" : ((NBTTagString)this.tagMap.get(par1Str)).data;
|
return !this.tagMap.containsKey(par1Str) ? "" : ((NBTTagString)this.tagMap.get(par1Str)).data;
|
||||||
}
|
}
|
||||||
catch (ClassCastException var3)
|
|
||||||
{
|
|
||||||
throw new ReportedException(this.createCrashReport(par1Str, 8, var3));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves a byte array using the specified key, or a zero-length array if no such key was stored.
|
* Retrieves a byte array using the specified key, or a zero-length array if no such key was stored.
|
||||||
*/
|
*/
|
||||||
public byte[] getByteArray(String par1Str)
|
public byte[] getByteArray(String par1Str)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
return !this.tagMap.containsKey(par1Str) ? new byte[0] : ((NBTTagByteArray)this.tagMap.get(par1Str)).byteArray;
|
return !this.tagMap.containsKey(par1Str) ? new byte[0] : ((NBTTagByteArray)this.tagMap.get(par1Str)).byteArray;
|
||||||
}
|
}
|
||||||
catch (ClassCastException var3)
|
|
||||||
{
|
|
||||||
throw new ReportedException(this.createCrashReport(par1Str, 7, var3));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves an int array using the specified key, or a zero-length array if no such key was stored.
|
* Retrieves an int array using the specified key, or a zero-length array if no such key was stored.
|
||||||
*/
|
*/
|
||||||
public int[] getIntArray(String par1Str)
|
public int[] getIntArray(String par1Str)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
return !this.tagMap.containsKey(par1Str) ? new int[0] : ((NBTTagIntArray)this.tagMap.get(par1Str)).intArray;
|
return !this.tagMap.containsKey(par1Str) ? new int[0] : ((NBTTagIntArray)this.tagMap.get(par1Str)).intArray;
|
||||||
}
|
}
|
||||||
catch (ClassCastException var3)
|
|
||||||
{
|
|
||||||
throw new ReportedException(this.createCrashReport(par1Str, 11, var3));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves a NBTTagCompound subtag matching the specified key, or a new empty NBTTagCompound if no such key was
|
* Retrieves a NBTTagCompound subtag matching the specified key, or a new empty NBTTagCompound if no such key was
|
||||||
* stored.
|
* stored.
|
||||||
*/
|
*/
|
||||||
public NBTTagCompound getCompoundTag(String par1Str)
|
public NBTTagCompound getCompoundTag(String par1Str)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
return !this.tagMap.containsKey(par1Str) ? new NBTTagCompound(par1Str) : (NBTTagCompound)this.tagMap.get(par1Str);
|
return !this.tagMap.containsKey(par1Str) ? new NBTTagCompound(par1Str) : (NBTTagCompound)this.tagMap.get(par1Str);
|
||||||
}
|
}
|
||||||
catch (ClassCastException var3)
|
|
||||||
{
|
|
||||||
throw new ReportedException(this.createCrashReport(par1Str, 10, var3));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves a NBTTagList subtag matching the specified key, or a new empty NBTTagList if no such key was stored.
|
* Retrieves a NBTTagList subtag matching the specified key, or a new empty NBTTagList if no such key was stored.
|
||||||
*/
|
*/
|
||||||
public NBTTagList getTagList(String par1Str)
|
public NBTTagList getTagList(String par1Str)
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
{
|
||||||
return !this.tagMap.containsKey(par1Str) ? new NBTTagList(par1Str) : (NBTTagList)this.tagMap.get(par1Str);
|
return !this.tagMap.containsKey(par1Str) ? new NBTTagList(par1Str) : (NBTTagList)this.tagMap.get(par1Str);
|
||||||
}
|
}
|
||||||
catch (ClassCastException var3)
|
|
||||||
{
|
|
||||||
throw new ReportedException(this.createCrashReport(par1Str, 9, var3));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Retrieves a boolean value using the specified key, or false if no such key was stored. This uses the getByte
|
* Retrieves a boolean value using the specified key, or false if no such key was stored. This uses the getByte
|
||||||
|
@ -394,22 +317,6 @@ public class NBTTagCompound extends NBTBase
|
||||||
return this.tagMap.isEmpty();
|
return this.tagMap.isEmpty();
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
* Create a crash report which indicates a NBT read error.
|
|
||||||
*/
|
|
||||||
private CrashReport createCrashReport(String par1Str, int par2, ClassCastException par3ClassCastException)
|
|
||||||
{
|
|
||||||
CrashReport var4 = CrashReport.makeCrashReport(par3ClassCastException, "Reading NBT data");
|
|
||||||
CrashReportCategory var5 = var4.makeCategoryDepth("Corrupt NBT tag", 1);
|
|
||||||
var5.addCrashSection("Tag name", par1Str);
|
|
||||||
|
|
||||||
if (this.getName() != null && this.getName().length() > 0)
|
|
||||||
{
|
|
||||||
var5.addCrashSection("Tag parent", this.getName());
|
|
||||||
}
|
|
||||||
|
|
||||||
return var4;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Creates a clone of the tag.
|
* Creates a clone of the tag.
|
||||||
|
|
|
@ -1,18 +1,14 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.lax1dude.eaglercraft.*;
|
||||||
|
import net.lax1dude.eaglercraft.adapter.EaglerAdapterImpl2.RateLimit;
|
||||||
|
import org.json.JSONObject;
|
||||||
|
|
||||||
import java.io.ByteArrayInputStream;
|
import java.io.ByteArrayInputStream;
|
||||||
import java.io.DataInputStream;
|
import java.io.DataInputStream;
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.nio.charset.StandardCharsets;
|
import java.nio.charset.StandardCharsets;
|
||||||
import java.util.ArrayList;
|
import java.util.*;
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
|
|
||||||
import net.lax1dude.eaglercraft.*;
|
|
||||||
import net.lax1dude.eaglercraft.adapter.EaglerAdapterImpl2.RateLimit;
|
|
||||||
import org.json.JSONObject;
|
|
||||||
|
|
||||||
public class NetClientHandler extends NetHandler {
|
public class NetClientHandler extends NetHandler {
|
||||||
/** True if kicked or disconnected from the server. */
|
/** True if kicked or disconnected from the server. */
|
||||||
|
|
|
@ -1,17 +1,13 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.io.DataInput;
|
import net.minecraft.server.MinecraftServer;
|
||||||
import java.io.DataOutput;
|
|
||||||
import java.io.EOFException;
|
import java.io.*;
|
||||||
import java.io.IOException;
|
|
||||||
import java.net.Socket;
|
import java.net.Socket;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.HashSet;
|
import java.util.HashSet;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.io.DataInputStream;
|
|
||||||
import java.io.DataOutputStream;
|
|
||||||
import net.minecraft.server.MinecraftServer;
|
|
||||||
|
|
||||||
public abstract class Packet
|
public abstract class Packet
|
||||||
{
|
{
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
|
import net.lax1dude.eaglercraft.ProfileUUID;
|
||||||
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import net.lax1dude.eaglercraft.ProfileUUID;
|
|
||||||
import java.util.Map.Entry;
|
import java.util.Map.Entry;
|
||||||
|
|
||||||
public class Potion
|
public class Potion
|
||||||
|
|
|
@ -1,9 +1,7 @@
|
||||||
package net.minecraft.src;
|
package net.minecraft.src;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
|
@ -1,59 +0,0 @@
|
||||||
package net.minecraft.src;
|
|
||||||
|
|
||||||
import net.minecraft.server.MinecraftServer;
|
|
||||||
|
|
||||||
public class RConConsoleSource implements ICommandSender
|
|
||||||
{
|
|
||||||
/** only ever used by MinecraftServer.executeCommand */
|
|
||||||
public static final RConConsoleSource consoleBuffer = new RConConsoleSource();
|
|
||||||
|
|
||||||
/** RCon string buffer for log. */
|
|
||||||
private StringBuffer buffer = new StringBuffer();
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Clears the RCon log
|
|
||||||
*/
|
|
||||||
public void resetLog()
|
|
||||||
{
|
|
||||||
this.buffer.setLength(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getChatBuffer()
|
|
||||||
{
|
|
||||||
return this.buffer.toString();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Gets the name of this command sender (usually username, but possibly "Rcon")
|
|
||||||
*/
|
|
||||||
public String getCommandSenderName()
|
|
||||||
{
|
|
||||||
return "Rcon";
|
|
||||||
}
|
|
||||||
|
|
||||||
public void sendChatToPlayer(String par1ChatMessageComponent)
|
|
||||||
{
|
|
||||||
this.buffer.append(par1ChatMessageComponent);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if the command sender is allowed to use the given command.
|
|
||||||
*/
|
|
||||||
public boolean canCommandSenderUseCommand(int par1, String par2Str)
|
|
||||||
{
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Return the position for this command sender.
|
|
||||||
*/
|
|
||||||
public ChunkCoordinates getPlayerCoordinates()
|
|
||||||
{
|
|
||||||
return new ChunkCoordinates(0, 0, 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
public World getEntityWorld()
|
|
||||||
{
|
|
||||||
return MinecraftServer.getServer().getEntityWorld();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,69 +0,0 @@
|
||||||
package net.minecraft.src;
|
|
||||||
|
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.io.DataOutputStream;
|
|
||||||
import java.io.IOException;
|
|
||||||
|
|
||||||
public class RConOutputStream
|
|
||||||
{
|
|
||||||
/** Output stream */
|
|
||||||
private ByteArrayOutputStream byteArrayOutput;
|
|
||||||
|
|
||||||
/** ByteArrayOutputStream wrapper */
|
|
||||||
private DataOutputStream output;
|
|
||||||
|
|
||||||
public RConOutputStream(int par1)
|
|
||||||
{
|
|
||||||
this.byteArrayOutput = new ByteArrayOutputStream(par1);
|
|
||||||
this.output = new DataOutputStream(this.byteArrayOutput);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Writes the given byte array to the output stream
|
|
||||||
*/
|
|
||||||
public void writeByteArray(byte[] par1ArrayOfByte) throws IOException
|
|
||||||
{
|
|
||||||
this.output.write(par1ArrayOfByte, 0, par1ArrayOfByte.length);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Writes the given String to the output stream
|
|
||||||
*/
|
|
||||||
public void writeString(String par1Str) throws IOException
|
|
||||||
{
|
|
||||||
this.output.writeBytes(par1Str);
|
|
||||||
this.output.write(0);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Writes the given int to the output stream
|
|
||||||
*/
|
|
||||||
public void writeInt(int par1) throws IOException
|
|
||||||
{
|
|
||||||
this.output.write(par1);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Writes the given short to the output stream
|
|
||||||
*/
|
|
||||||
public void writeShort(short par1) throws IOException
|
|
||||||
{
|
|
||||||
this.output.writeShort(Short.reverseBytes(par1));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the contents of the output stream as a byte array
|
|
||||||
*/
|
|
||||||
public byte[] toByteArray()
|
|
||||||
{
|
|
||||||
return this.byteArrayOutput.toByteArray();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Resets the byte array output.
|
|
||||||
*/
|
|
||||||
public void reset()
|
|
||||||
{
|
|
||||||
this.byteArrayOutput.reset();
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,226 +0,0 @@
|
||||||
package net.minecraft.src;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.net.DatagramSocket;
|
|
||||||
import java.net.ServerSocket;
|
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
public abstract class RConThreadBase implements Runnable
|
|
||||||
{
|
|
||||||
/** True if the Thread is running, false otherwise */
|
|
||||||
protected boolean running;
|
|
||||||
|
|
||||||
/** Reference to the IServer object. */
|
|
||||||
protected IServer server;
|
|
||||||
|
|
||||||
/** Thread for this runnable class */
|
|
||||||
protected Thread rconThread;
|
|
||||||
protected int field_72615_d = 5;
|
|
||||||
|
|
||||||
/** A list of registered DatagramSockets */
|
|
||||||
protected List socketList = new ArrayList();
|
|
||||||
|
|
||||||
/** A list of registered ServerSockets */
|
|
||||||
protected List serverSocketList = new ArrayList();
|
|
||||||
|
|
||||||
RConThreadBase(IServer par1IServer)
|
|
||||||
{
|
|
||||||
this.server = par1IServer;
|
|
||||||
|
|
||||||
if (this.server.isDebuggingEnabled())
|
|
||||||
{
|
|
||||||
this.logWarning("Debugging is enabled, performance maybe reduced!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new Thread object from this class and starts running
|
|
||||||
*/
|
|
||||||
public synchronized void startThread()
|
|
||||||
{
|
|
||||||
this.rconThread = new Thread(this);
|
|
||||||
this.rconThread.start();
|
|
||||||
this.running = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns true if the Thread is running, false otherwise
|
|
||||||
*/
|
|
||||||
public boolean isRunning()
|
|
||||||
{
|
|
||||||
return this.running;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Log debug message
|
|
||||||
*/
|
|
||||||
protected void logDebug(String par1Str)
|
|
||||||
{
|
|
||||||
this.server.logDebug(par1Str);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Log information message
|
|
||||||
*/
|
|
||||||
protected void logInfo(String par1Str)
|
|
||||||
{
|
|
||||||
this.server.logInfo(par1Str);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Log warning message
|
|
||||||
*/
|
|
||||||
protected void logWarning(String par1Str)
|
|
||||||
{
|
|
||||||
this.server.logWarning(par1Str);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Log severe error message
|
|
||||||
*/
|
|
||||||
protected void logSevere(String par1Str)
|
|
||||||
{
|
|
||||||
this.server.logSevere(par1Str);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Returns the number of players on the server
|
|
||||||
*/
|
|
||||||
protected int getNumberOfPlayers()
|
|
||||||
{
|
|
||||||
return this.server.getCurrentPlayerCount();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Registers a DatagramSocket with this thread
|
|
||||||
*/
|
|
||||||
protected void registerSocket(DatagramSocket par1DatagramSocket)
|
|
||||||
{
|
|
||||||
this.logDebug("registerSocket: " + par1DatagramSocket);
|
|
||||||
this.socketList.add(par1DatagramSocket);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Closes the specified DatagramSocket
|
|
||||||
*/
|
|
||||||
protected boolean closeSocket(DatagramSocket par1DatagramSocket, boolean par2)
|
|
||||||
{
|
|
||||||
this.logDebug("closeSocket: " + par1DatagramSocket);
|
|
||||||
|
|
||||||
if (null == par1DatagramSocket)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
boolean var3 = false;
|
|
||||||
|
|
||||||
if (!par1DatagramSocket.isClosed())
|
|
||||||
{
|
|
||||||
par1DatagramSocket.close();
|
|
||||||
var3 = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (par2)
|
|
||||||
{
|
|
||||||
this.socketList.remove(par1DatagramSocket);
|
|
||||||
}
|
|
||||||
|
|
||||||
return var3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Closes the specified ServerSocket
|
|
||||||
*/
|
|
||||||
protected boolean closeServerSocket(ServerSocket par1ServerSocket)
|
|
||||||
{
|
|
||||||
return this.closeServerSocket_do(par1ServerSocket, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Closes the specified ServerSocket
|
|
||||||
*/
|
|
||||||
protected boolean closeServerSocket_do(ServerSocket par1ServerSocket, boolean par2)
|
|
||||||
{
|
|
||||||
this.logDebug("closeSocket: " + par1ServerSocket);
|
|
||||||
|
|
||||||
if (null == par1ServerSocket)
|
|
||||||
{
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
boolean var3 = false;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
if (!par1ServerSocket.isClosed())
|
|
||||||
{
|
|
||||||
par1ServerSocket.close();
|
|
||||||
var3 = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (IOException var5)
|
|
||||||
{
|
|
||||||
this.logWarning("IO: " + var5.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
if (par2)
|
|
||||||
{
|
|
||||||
this.serverSocketList.remove(par1ServerSocket);
|
|
||||||
}
|
|
||||||
|
|
||||||
return var3;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Closes all of the opened sockets
|
|
||||||
*/
|
|
||||||
protected void closeAllSockets()
|
|
||||||
{
|
|
||||||
this.closeAllSockets_do(false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Closes all of the opened sockets
|
|
||||||
*/
|
|
||||||
protected void closeAllSockets_do(boolean par1)
|
|
||||||
{
|
|
||||||
int var2 = 0;
|
|
||||||
Iterator var3 = this.socketList.iterator();
|
|
||||||
|
|
||||||
while (var3.hasNext())
|
|
||||||
{
|
|
||||||
DatagramSocket var4 = (DatagramSocket)var3.next();
|
|
||||||
|
|
||||||
if (this.closeSocket(var4, false))
|
|
||||||
{
|
|
||||||
++var2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.socketList.clear();
|
|
||||||
var3 = this.serverSocketList.iterator();
|
|
||||||
|
|
||||||
while (var3.hasNext())
|
|
||||||
{
|
|
||||||
ServerSocket var5 = (ServerSocket)var3.next();
|
|
||||||
|
|
||||||
if (this.closeServerSocket_do(var5, false))
|
|
||||||
{
|
|
||||||
++var2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
this.serverSocketList.clear();
|
|
||||||
|
|
||||||
if (par1 && 0 < var2)
|
|
||||||
{
|
|
||||||
this.logWarning("Force closed " + var2 + " sockets");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,195 +0,0 @@
|
||||||
package net.minecraft.src;
|
|
||||||
|
|
||||||
import java.io.BufferedInputStream;
|
|
||||||
import java.io.ByteArrayOutputStream;
|
|
||||||
import java.io.DataOutputStream;
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.net.Socket;
|
|
||||||
import java.net.SocketTimeoutException;
|
|
||||||
|
|
||||||
public class RConThreadClient extends RConThreadBase
|
|
||||||
{
|
|
||||||
/**
|
|
||||||
* True if the client has succefssfully logged into the RCon, otherwise false
|
|
||||||
*/
|
|
||||||
private boolean loggedIn;
|
|
||||||
|
|
||||||
/** The client's Socket connection */
|
|
||||||
private Socket clientSocket;
|
|
||||||
|
|
||||||
/** A buffer for incoming Socket data */
|
|
||||||
private byte[] buffer = new byte[1460];
|
|
||||||
|
|
||||||
/** The RCon password */
|
|
||||||
private String rconPassword;
|
|
||||||
|
|
||||||
RConThreadClient(IServer par1IServer, Socket par2Socket)
|
|
||||||
{
|
|
||||||
super(par1IServer);
|
|
||||||
this.clientSocket = par2Socket;
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
this.clientSocket.setSoTimeout(0);
|
|
||||||
}
|
|
||||||
catch (Exception var4)
|
|
||||||
{
|
|
||||||
this.running = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.rconPassword = par1IServer.getStringProperty("rcon.password", "");
|
|
||||||
this.logInfo("Rcon connection from: " + par2Socket.getInetAddress());
|
|
||||||
}
|
|
||||||
|
|
||||||
public void run()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
while (true)
|
|
||||||
{
|
|
||||||
if (!this.running)
|
|
||||||
{
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
|
|
||||||
BufferedInputStream var1 = new BufferedInputStream(this.clientSocket.getInputStream());
|
|
||||||
int var2 = var1.read(this.buffer, 0, 1460);
|
|
||||||
|
|
||||||
if (10 <= var2)
|
|
||||||
{
|
|
||||||
byte var3 = 0;
|
|
||||||
int var4 = RConUtils.getBytesAsLEInt(this.buffer, 0, var2);
|
|
||||||
|
|
||||||
if (var4 != var2 - 4)
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
int var21 = var3 + 4;
|
|
||||||
int var5 = RConUtils.getBytesAsLEInt(this.buffer, var21, var2);
|
|
||||||
var21 += 4;
|
|
||||||
int var6 = RConUtils.getRemainingBytesAsLEInt(this.buffer, var21);
|
|
||||||
var21 += 4;
|
|
||||||
|
|
||||||
switch (var6)
|
|
||||||
{
|
|
||||||
case 2:
|
|
||||||
if (this.loggedIn)
|
|
||||||
{
|
|
||||||
String var8 = RConUtils.getBytesAsString(this.buffer, var21, var2);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
this.sendMultipacketResponse(var5, this.server.executeCommand(var8));
|
|
||||||
}
|
|
||||||
catch (Exception var16)
|
|
||||||
{
|
|
||||||
this.sendMultipacketResponse(var5, "Error executing: " + var8 + " (" + var16.getMessage() + ")");
|
|
||||||
}
|
|
||||||
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.sendLoginFailedResponse();
|
|
||||||
continue;
|
|
||||||
|
|
||||||
case 3:
|
|
||||||
String var7 = RConUtils.getBytesAsString(this.buffer, var21, var2);
|
|
||||||
int var10000 = var21 + var7.length();
|
|
||||||
|
|
||||||
if (0 != var7.length() && var7.equals(this.rconPassword))
|
|
||||||
{
|
|
||||||
this.loggedIn = true;
|
|
||||||
this.sendResponse(var5, 2, "");
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
|
|
||||||
this.loggedIn = false;
|
|
||||||
this.sendLoginFailedResponse();
|
|
||||||
continue;
|
|
||||||
|
|
||||||
default:
|
|
||||||
this.sendMultipacketResponse(var5, String.format("Unknown request %s", new Object[] {Integer.toHexString(var6)}));
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
catch (SocketTimeoutException var17)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
catch (IOException var18)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
catch (Exception var19)
|
|
||||||
{
|
|
||||||
System.out.println(var19);
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
this.closeSocket();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sends the given response message to the client
|
|
||||||
*/
|
|
||||||
private void sendResponse(int par1, int par2, String par3Str) throws IOException
|
|
||||||
{
|
|
||||||
ByteArrayOutputStream var4 = new ByteArrayOutputStream(1248);
|
|
||||||
DataOutputStream var5 = new DataOutputStream(var4);
|
|
||||||
byte[] var6 = par3Str.getBytes("UTF-8");
|
|
||||||
var5.writeInt(Integer.reverseBytes(var6.length + 10));
|
|
||||||
var5.writeInt(Integer.reverseBytes(par1));
|
|
||||||
var5.writeInt(Integer.reverseBytes(par2));
|
|
||||||
var5.write(var6);
|
|
||||||
var5.write(0);
|
|
||||||
var5.write(0);
|
|
||||||
this.clientSocket.getOutputStream().write(var4.toByteArray());
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Sends the standard RCon 'authorization failed' response packet
|
|
||||||
*/
|
|
||||||
private void sendLoginFailedResponse() throws IOException
|
|
||||||
{
|
|
||||||
this.sendResponse(-1, 2, "");
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Splits the response message into individual packets and sends each one
|
|
||||||
*/
|
|
||||||
private void sendMultipacketResponse(int par1, String par2Str) throws IOException
|
|
||||||
{
|
|
||||||
int var3 = par2Str.length();
|
|
||||||
|
|
||||||
do
|
|
||||||
{
|
|
||||||
int var4 = 4096 <= var3 ? 4096 : var3;
|
|
||||||
this.sendResponse(par1, 0, par2Str.substring(0, var4));
|
|
||||||
par2Str = par2Str.substring(var4);
|
|
||||||
var3 = par2Str.length();
|
|
||||||
}
|
|
||||||
while (0 != var3);
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Closes the client socket
|
|
||||||
*/
|
|
||||||
private void closeSocket()
|
|
||||||
{
|
|
||||||
if (null != this.clientSocket)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
this.clientSocket.close();
|
|
||||||
}
|
|
||||||
catch (IOException var2)
|
|
||||||
{
|
|
||||||
this.logWarning("IO: " + var2.getMessage());
|
|
||||||
}
|
|
||||||
|
|
||||||
this.clientSocket = null;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,153 +0,0 @@
|
||||||
package net.minecraft.src;
|
|
||||||
|
|
||||||
import java.io.IOException;
|
|
||||||
import java.net.InetAddress;
|
|
||||||
import java.net.ServerSocket;
|
|
||||||
import java.net.Socket;
|
|
||||||
import java.net.SocketTimeoutException;
|
|
||||||
import java.util.HashMap;
|
|
||||||
import java.util.Iterator;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Map.Entry;
|
|
||||||
|
|
||||||
public class RConThreadMain extends RConThreadBase
|
|
||||||
{
|
|
||||||
/** Port RCon is running on */
|
|
||||||
private int rconPort;
|
|
||||||
|
|
||||||
/** Port the server is running on */
|
|
||||||
private int serverPort;
|
|
||||||
|
|
||||||
/** Hostname RCon is running on */
|
|
||||||
private String hostname;
|
|
||||||
|
|
||||||
/** The RCon ServerSocket. */
|
|
||||||
private ServerSocket serverSocket;
|
|
||||||
|
|
||||||
/** The RCon password */
|
|
||||||
private String rconPassword;
|
|
||||||
|
|
||||||
/** A map of client addresses to their running Threads */
|
|
||||||
private Map clientThreads;
|
|
||||||
|
|
||||||
public RConThreadMain(IServer par1IServer)
|
|
||||||
{
|
|
||||||
super(par1IServer);
|
|
||||||
this.rconPort = par1IServer.getIntProperty("rcon.port", 0);
|
|
||||||
this.rconPassword = par1IServer.getStringProperty("rcon.password", "");
|
|
||||||
this.hostname = par1IServer.getHostname();
|
|
||||||
this.serverPort = par1IServer.getPort();
|
|
||||||
|
|
||||||
if (0 == this.rconPort)
|
|
||||||
{
|
|
||||||
this.rconPort = this.serverPort + 10;
|
|
||||||
this.logInfo("Setting default rcon port to " + this.rconPort);
|
|
||||||
par1IServer.setProperty("rcon.port", Integer.valueOf(this.rconPort));
|
|
||||||
|
|
||||||
if (0 == this.rconPassword.length())
|
|
||||||
{
|
|
||||||
par1IServer.setProperty("rcon.password", "");
|
|
||||||
}
|
|
||||||
|
|
||||||
par1IServer.saveProperties();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (0 == this.hostname.length())
|
|
||||||
{
|
|
||||||
this.hostname = "0.0.0.0";
|
|
||||||
}
|
|
||||||
|
|
||||||
this.initClientThreadList();
|
|
||||||
this.serverSocket = null;
|
|
||||||
}
|
|
||||||
|
|
||||||
private void initClientThreadList()
|
|
||||||
{
|
|
||||||
this.clientThreads = new HashMap();
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Cleans up the clientThreads map by removing client Threads that are not running
|
|
||||||
*/
|
|
||||||
private void cleanClientThreadsMap()
|
|
||||||
{
|
|
||||||
Iterator var1 = this.clientThreads.entrySet().iterator();
|
|
||||||
|
|
||||||
while (var1.hasNext())
|
|
||||||
{
|
|
||||||
Entry var2 = (Entry)var1.next();
|
|
||||||
|
|
||||||
if (!((RConThreadClient)var2.getValue()).isRunning())
|
|
||||||
{
|
|
||||||
var1.remove();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public void run()
|
|
||||||
{
|
|
||||||
this.logInfo("RCON running on " + this.hostname + ":" + this.rconPort);
|
|
||||||
|
|
||||||
try
|
|
||||||
{
|
|
||||||
while (this.running)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
Socket var1 = this.serverSocket.accept();
|
|
||||||
var1.setSoTimeout(500);
|
|
||||||
RConThreadClient var2 = new RConThreadClient(this.server, var1);
|
|
||||||
var2.startThread();
|
|
||||||
this.clientThreads.put(var1.getRemoteSocketAddress(), var2);
|
|
||||||
this.cleanClientThreadsMap();
|
|
||||||
}
|
|
||||||
catch (SocketTimeoutException var7)
|
|
||||||
{
|
|
||||||
this.cleanClientThreadsMap();
|
|
||||||
}
|
|
||||||
catch (IOException var8)
|
|
||||||
{
|
|
||||||
if (this.running)
|
|
||||||
{
|
|
||||||
this.logInfo("IO: " + var8.getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
finally
|
|
||||||
{
|
|
||||||
this.closeServerSocket(this.serverSocket);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Creates a new Thread object from this class and starts running
|
|
||||||
*/
|
|
||||||
public void startThread()
|
|
||||||
{
|
|
||||||
if (0 == this.rconPassword.length())
|
|
||||||
{
|
|
||||||
this.logWarning("No rcon password set in \'" + this.server.getSettingsFilename() + "\', rcon disabled!");
|
|
||||||
}
|
|
||||||
else if (0 < this.rconPort && 65535 >= this.rconPort)
|
|
||||||
{
|
|
||||||
if (!this.running)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
this.serverSocket = new ServerSocket(this.rconPort, 0, InetAddress.getByName(this.hostname));
|
|
||||||
this.serverSocket.setSoTimeout(500);
|
|
||||||
super.startThread();
|
|
||||||
}
|
|
||||||
catch (IOException var2)
|
|
||||||
{
|
|
||||||
this.logWarning("Unable to initialise rcon on " + this.hostname + ":" + this.rconPort + " : " + var2.getMessage());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
this.logWarning("Invalid rcon port " + this.rconPort + " found in \'" + this.server.getSettingsFilename() + "\', rcon disabled!");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue