Fix logger

This commit is contained in:
catfoolyou 2025-02-04 09:53:47 -05:00
parent 792838ac19
commit c8acff384a
27 changed files with 107 additions and 75 deletions

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="CompilerConfiguration"> <component name="CompilerConfiguration">
<bytecodeTargetLevel target="18" /> <bytecodeTargetLevel target="17" />
</component> </component>
</project> </project>

View File

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<project version="4"> <project version="4">
<component name="ExternalStorageConfigurationManager" enabled="true" /> <component name="ExternalStorageConfigurationManager" enabled="true" />
<component name="ProjectRootManager" version="2" languageLevel="JDK_18" default="true" project-jdk-name="corretto-18" project-jdk-type="JavaSDK" /> <component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="corretto-18" project-jdk-type="JavaSDK" />
</project> </project>

Binary file not shown.

View File

@ -151,6 +151,7 @@ selectServer.direct=Direct Connect
selectServer.edit=Edit selectServer.edit=Edit
selectServer.delete=Delete selectServer.delete=Delete
selectServer.add=Add server selectServer.add=Add server
selectServer.lan=§3LAN
selectServer.defaultName=Minecraft Server selectServer.defaultName=Minecraft Server
selectServer.deleteQuestion=Are you sure you want to remove this server? selectServer.deleteQuestion=Are you sure you want to remove this server?
selectServer.deleteWarning=will be lost forever! (A long time!) selectServer.deleteWarning=will be lost forever! (A long time!)
@ -162,11 +163,64 @@ addServer.enterName=Server Name
addServer.enterIp=Server Address addServer.enterIp=Server Address
addServer.add=Done addServer.add=Done
addServer.hideAddress=Hide Address addServer.hideAddress=Hide Address
lanServer.title=LAN World lanServer.title=Shared World
lanServer.scanning=Scanning for games on your local network lanServer.scanning=Scanning for games on your local network
lanServer.start=Start LAN World lanServer.start=Start Shared World
lanServer.otherPlayers=Settings for Other Players lanServer.otherPlayers=Settings for Other Players
mcoServer.title=Minecraft Online World mcoServer.title=yeeeeeee
addServer.SSLWarn1=you are on an https: page!
addServer.SSLWarn2=html5 will only allow wss://
directConnect.prompt=What would you like to do?
directConnect.lanWorld=Join Shared World
directConnect.lanWorldCode=Enter Join Code:
directConnect.networkSettingsNote=Click 'Network Settings' to add a relay URL
directConnect.ipGrabNote=Note: The world's owner can get your IP address
directConnect.serverJoin=Connect to Server
directConnect.lanWorldJoin=Join World
directConnect.lanWorldRelay=Network Settings
lanServer.pauseMenu0=Sharing World
lanServer.pauseMenu1=Relay URL:
lanServer.pauseMenu2=Join Code:
lanServer.wouldYouLikeToKick=Would you like to kick all players?
lanServer.worldName=World Name:
lanServer.hidden=Hidden:
lanServer.hideCode=hide details
lanServer.showCode=show details
lanServer.opened=Shared world opened on $relay$, join code is §a$code$
lanServer.closed=Shared world closed
lanServer.pleaseWait=Please Wait...
lanServer.relayDisconnected=Error: connection to shared world relay was lost, you must re-share the world to invide more people
lanServer.ipGrabNote=Note: Players joining your world can get your IP address
networkSettings.title=Shared World Relay Servers
networkSettings.add=Add Relay
networkSettings.delete=Delete Relay
networkSettings.default=Set Primary
networkSettings.refresh=Refresh
networkSettings.loadDefaults=Load Defaults
networkSettings.relayTimeout=Connection Timeout:
networkSettings.relayTimeoutChange=change
networkSettings.relayTimeoutTitle=Change Connection Timeout
networkSettings.downloadRelay=Download JAR
addRelay.title=Add New Relay
addRelay.name=Relay Comment
addRelay.address=Relay Address
addRelay.add=Add Relay
addRelay.primary=Set Primary
addRelay.removeText1=Do you want to remove this relay?
noRelay.title=No Relays are Configured!
noRelay.titleFail=No Working Relays Available!
noRelay.noRelay1=LAN Unavailable: No Relays Configured!
noRelay.noRelay2=Click '§nNetwork Settings§r' to fix
noRelay.worldNotFound1=Could not locate '§c$code$§r'!
noRelay.worldNotFound2=Make sure to add the '§f$code$§r' world's relay URL
noRelay.worldNotFound3=to the relay list 'Network Settings' to connect
noRelay.worldFail=Failed to connect to '$code$'!
multiplayer.title=Play Multiplayer multiplayer.title=Play Multiplayer
multiplayer.connect=Connect multiplayer.connect=Connect

View File

@ -4,8 +4,8 @@ import java.util.List;
public class ConfigConstants { public class ConfigConstants {
public static final String version = "1.6.4 (25w05a)"; public static final String version = "25w05a";
public static final String mainMenuString = "eaglercraft " + version; public static final String mainMenuString = "Eaglercraft " + version;
public static final String forkMe = null; public static final String forkMe = null;

View File

@ -15,7 +15,6 @@ import org.apache.commons.io.IOUtils;
public abstract class AbstractResourcePack implements ResourcePack public abstract class AbstractResourcePack implements ResourcePack
{ {
protected static final ILogAgent resourceLog = Minecraft.getMinecraft().getLogAgent();
protected final File resourcePackFile; protected final File resourcePackFile;
public AbstractResourcePack(File par1File) public AbstractResourcePack(File par1File)
@ -49,7 +48,7 @@ public abstract class AbstractResourcePack implements ResourcePack
protected void logNameNotLowercase(String par1Str) protected void logNameNotLowercase(String par1Str)
{ {
resourceLog.logWarningFormatted("ResourcePack: ignored non-lowercase namespace: %s in %s", new Object[] {par1Str, this.resourcePackFile}); System.err.printf("ResourcePack: ignored non-lowercase namespace: %s in %s", new Object[] {par1Str, this.resourcePackFile});
} }
public MetadataSection getPackMetadata(MetadataSerializer par1MetadataSerializer, String par2Str) throws IOException public MetadataSection getPackMetadata(MetadataSerializer par1MetadataSerializer, String par2Str) throws IOException

View File

@ -70,12 +70,12 @@ public class AnvilChunkLoader implements IChunkLoader, IThreadedFileIO
{ {
if (!par4NBTTagCompound.hasKey("Level")) if (!par4NBTTagCompound.hasKey("Level"))
{ {
par1World.getWorldLogAgent().logSevere("Chunk file at " + par2 + "," + par3 + " is missing level data, skipping"); System.err.println("Chunk file at " + par2 + "," + par3 + " is missing level data, skipping");
return null; return null;
} }
else if (!par4NBTTagCompound.getCompoundTag("Level").hasKey("Sections")) else if (!par4NBTTagCompound.getCompoundTag("Level").hasKey("Sections"))
{ {
par1World.getWorldLogAgent().logSevere("Chunk file at " + par2 + "," + par3 + " is missing block data, skipping"); System.err.println("Chunk file at " + par2 + "," + par3 + " is missing block data, skipping");
return null; return null;
} }
else else
@ -84,7 +84,7 @@ public class AnvilChunkLoader implements IChunkLoader, IThreadedFileIO
if (!var5.isAtLocation(par2, par3)) if (!var5.isAtLocation(par2, par3))
{ {
par1World.getWorldLogAgent().logSevere("Chunk file at " + par2 + "," + par3 + " is in the wrong location; relocating. (Expected " + par2 + ", " + par3 + ", got " + var5.xPosition + ", " + var5.zPosition + ")"); System.err.println("Chunk file at " + par2 + "," + par3 + " is in the wrong location; relocating. (Expected " + par2 + ", " + par3 + ", got " + var5.xPosition + ", " + var5.zPosition + ")");
par4NBTTagCompound.setInteger("xPos", par2); par4NBTTagCompound.setInteger("xPos", par2);
par4NBTTagCompound.setInteger("zPos", par3); par4NBTTagCompound.setInteger("zPos", par3);
var5 = this.readChunkFromNBT(par1World, par4NBTTagCompound.getCompoundTag("Level")); var5 = this.readChunkFromNBT(par1World, par4NBTTagCompound.getCompoundTag("Level"));

View File

@ -65,7 +65,7 @@ public class ChatClickData
} }
catch (URISyntaxException var4) catch (URISyntaxException var4)
{ {
Minecraft.getMinecraft().getLogAgent().logSevereException("Couldn\'t create URI from chat", var4); System.err.printf("Couldn\'t create URI from chat", var4);
} }
} }

View File

@ -794,7 +794,7 @@ public class Chunk
if (var2 != this.xPosition || var3 != this.zPosition) if (var2 != this.xPosition || var3 != this.zPosition)
{ {
this.worldObj.getWorldLogAgent().logSevere("Wrong location! " + par1Entity); System.err.println("Wrong location! " + par1Entity);
Thread.dumpStack(); Thread.dumpStack();
} }

View File

@ -361,7 +361,7 @@ public class EntityItem extends Entity
{ {
if (this.worldObj != null) if (this.worldObj != null)
{ {
this.worldObj.getWorldLogAgent().logSevere("Item entity " + this.entityId + " has no item?!"); System.err.println("Item entity " + this.entityId + " has no item?!");
} }
return new ItemStack(Block.stone); return new ItemStack(Block.stone);

View File

@ -115,7 +115,7 @@ public class EntityList
} }
else else
{ {
par1World.getWorldLogAgent().logWarning("Skipping Entity with id " + par0NBTTagCompound.getString("id")); System.out.println("Skipping Entity with id " + par0NBTTagCompound.getString("id"));
} }
return var2; return var2;
@ -144,7 +144,7 @@ public class EntityList
if (var2 == null) if (var2 == null)
{ {
par1World.getWorldLogAgent().logWarning("Skipping Entity with id " + par0); System.out.println("Skipping Entity with id " + par0);
} }
return var2; return var2;

View File

@ -503,7 +503,7 @@ public abstract class EntityLivingBase extends Entity
if (par1NBTTagCompound.hasKey("Attributes") && this.worldObj != null && !this.worldObj.isRemote) if (par1NBTTagCompound.hasKey("Attributes") && this.worldObj != null && !this.worldObj.isRemote)
{ {
SharedMonsterAttributes.func_111260_a(this.getAttributeMap(), par1NBTTagCompound.getTagList("Attributes"), this.worldObj == null ? null : this.worldObj.getWorldLogAgent()); SharedMonsterAttributes.func_111260_a(this.getAttributeMap(), par1NBTTagCompound.getTagList("Attributes"));
} }
if (par1NBTTagCompound.hasKey("ActiveEffects")) if (par1NBTTagCompound.hasKey("ActiveEffects"))

View File

@ -429,7 +429,7 @@ public class EntityTrackerEntry
{ {
if (this.myEntity.isDead) if (this.myEntity.isDead)
{ {
this.myEntity.worldObj.getWorldLogAgent().logWarning("Fetching addPacket for removed entity"); System.out.println("Fetching addPacket for removed entity");
} }
if (this.myEntity instanceof EntityItem) if (this.myEntity instanceof EntityItem)

View File

@ -29,7 +29,7 @@ public class GuiConnecting extends GuiScreen
private void spawnNewServerThread(String par1Str, int par2) private void spawnNewServerThread(String par1Str, int par2)
{ {
this.mc.getLogAgent().logInfo("Connecting to " + par1Str + ", " + par2); System.out.println("Connecting to " + par1Str + ", " + par2);
(new ThreadConnectToServer(this, par1Str, par2)).start(); (new ThreadConnectToServer(this, par1Str, par2)).start();
} }

View File

@ -503,7 +503,7 @@ public class GuiMainMenu extends GuiScreen {
this.drawTexturedModalRect(var6 + 155, var7 + 0, 0, 45, 155, 44); this.drawTexturedModalRect(var6 + 155, var7 + 0, 0, 45, 155, 44);
this.drawString(this.fontRenderer, "Minecraft 1.6.4", 2, this.height - 20, 16777215); this.drawString(this.fontRenderer, "Minecraft 1.6.4", 2, this.height - 20, 16777215);
this.drawString(this.fontRenderer, ConfigConstants.mainMenuString + " official", 2, this.height - 10, 16777215); this.drawString(this.fontRenderer, ConfigConstants.mainMenuString + EnumChatFormatting.GRAY + " (cracked)", 2, this.height - 10, 16777215);
//String var10 = "Copyright " + Calendar.getInstance().get(Calendar.YEAR) + " Mojang AB."; //String var10 = "Copyright " + Calendar.getInstance().get(Calendar.YEAR) + " Mojang AB.";
String var10 = "copyright 2013 Mojang AB"; String var10 = "copyright 2013 Mojang AB";

View File

@ -151,7 +151,7 @@ public class GuiNewChat extends Gui
public void printChatMessageWithOptionalDeletion(String par1Str, int par2) public void printChatMessageWithOptionalDeletion(String par1Str, int par2)
{ {
this.func_96129_a(par1Str, par2, this.mc.ingameGUI.getUpdateCounter(), false); this.func_96129_a(par1Str, par2, this.mc.ingameGUI.getUpdateCounter(), false);
this.mc.getLogAgent().logInfo("[CHAT] " + EnumChatFormatting.func_110646_a(par1Str)); System.out.println("[CHAT] " + EnumChatFormatting.func_110646_a(par1Str));
} }
private void func_96129_a(String par1Str, int par2, int par3, boolean par4) private void func_96129_a(String par1Str, int par2, int par3, boolean par4)

View File

@ -63,7 +63,6 @@ public class GuiOptions extends GuiScreen
this.buttonList.add(new GuiButton(102, this.width / 2 - 152, this.height / 6 + 120 - 6, 150, 20, StatCollector.translateToLocal("options.language"))); this.buttonList.add(new GuiButton(102, this.width / 2 - 152, this.height / 6 + 120 - 6, 150, 20, StatCollector.translateToLocal("options.language")));
this.buttonList.add(new GuiButton(103, this.width / 2 + 2, this.height / 6 + 120 - 6, 150, 20, StatCollector.translateToLocal("options.multiplayer.title"))); this.buttonList.add(new GuiButton(103, this.width / 2 + 2, this.height / 6 + 120 - 6, 150, 20, StatCollector.translateToLocal("options.multiplayer.title")));
this.buttonList.add(new GuiButton(105, this.width / 2 - 152, this.height / 6 + 144 - 6, 150, 20, StatCollector.translateToLocal("options.resourcepack"))); this.buttonList.add(new GuiButton(105, this.width / 2 - 152, this.height / 6 + 144 - 6, 150, 20, StatCollector.translateToLocal("options.resourcepack")));
this.buttonList.add(new GuiButton(104, this.width / 2 + 2, this.height / 6 + 144 - 6, 150, 20, StatCollector.translateToLocal("options.snooper.view")));
this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, StatCollector.translateToLocal("gui.done"))); this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, StatCollector.translateToLocal("gui.done")));
} }
@ -104,12 +103,6 @@ public class GuiOptions extends GuiScreen
this.mc.displayGuiScreen(new ScreenChatOptions(this, this.options)); this.mc.displayGuiScreen(new ScreenChatOptions(this, this.options));
} }
if (par1GuiButton.id == 104)
{
this.mc.gameSettings.saveOptions();
//this.mc.displayGuiScreen(new GuiSnooper(this, this.options));
}
if (par1GuiButton.id == 200) if (par1GuiButton.id == 200)
{ {
this.mc.gameSettings.saveOptions(); this.mc.gameSettings.saveOptions();

View File

@ -47,7 +47,7 @@ public class MapGenStructureIO
} }
catch (Exception var4) catch (Exception var4)
{ {
par1World.getWorldLogAgent().logWarning("Failed Start with id " + par0NBTTagCompound.getString("id")); System.out.println("Failed Start with id " + par0NBTTagCompound.getString("id"));
var4.printStackTrace(); var4.printStackTrace();
} }
@ -57,7 +57,7 @@ public class MapGenStructureIO
} }
else else
{ {
par1World.getWorldLogAgent().logWarning("Skipping Structure with id " + par0NBTTagCompound.getString("id")); System.out.println("Skipping Structure with id " + par0NBTTagCompound.getString("id"));
} }
return var2; return var2;
@ -78,7 +78,7 @@ public class MapGenStructureIO
} }
catch (Exception var4) catch (Exception var4)
{ {
par1World.getWorldLogAgent().logWarning("Failed Piece with id " + par0NBTTagCompound.getString("id")); System.out.println("Failed Piece with id " + par0NBTTagCompound.getString("id"));
var4.printStackTrace(); var4.printStackTrace();
} }
@ -88,7 +88,7 @@ public class MapGenStructureIO
} }
else else
{ {
par1World.getWorldLogAgent().logWarning("Skipping Piece with id " + par0NBTTagCompound.getString("id")); System.out.println("Skipping Piece with id " + par0NBTTagCompound.getString("id"));
} }
return var2; return var2;

View File

@ -629,16 +629,16 @@ public class Minecraft
/** /**
* Checks for an OpenGL error. If there is one, prints the error ID and error string. * Checks for an OpenGL error. If there is one, prints the error ID and error string.
*/ */
private void checkGLError(String par1Str) public void checkGLError(String par1Str) {
{ if(!checkGLErrors) return;
int var2 = EaglerAdapter.glGetError(); int var2;
if (var2 != 0)
{ while ((var2 = EaglerAdapter.glGetError()) != 0) {
String var3 = GLU.gluErrorString(var2); String var3 = EaglerAdapter.gluErrorString(var2);
this.getLogAgent().logSevere("########## GL ERROR ##########"); System.err.println("########## GL ERROR ##########");
this.getLogAgent().logSevere("@ " + par1Str); System.err.println("@ " + par1Str);
this.getLogAgent().logSevere(var2 + ": " + var3); System.err.println(var2 + ": " + var3);
} }
} }
@ -2141,11 +2141,6 @@ public class Minecraft
return this.fullscreen; return this.fullscreen;
} }
public ILogAgent getLogAgent()
{
return null;
}
public Session getSession() public Session getSession()
{ {
return null; return null;

View File

@ -15,6 +15,7 @@ import net.lax1dude.eaglercraft.EaglercraftRandom;
import net.lax1dude.eaglercraft.WebsocketNetworkManager; import net.lax1dude.eaglercraft.WebsocketNetworkManager;
import net.minecraft.client.ClientBrandRetriever; import net.minecraft.client.ClientBrandRetriever;
//import net.lax1dude.eaglercraft.IntegratedServer; //import net.lax1dude.eaglercraft.IntegratedServer;
import org.lwjgl.Sys;
import org.lwjgl.input.Keyboard; import org.lwjgl.input.Keyboard;
public class NetClientHandler extends NetHandler public class NetClientHandler extends NetHandler
@ -54,7 +55,7 @@ public class NetClientHandler extends NetHandler
{ {
this.mc = par1Minecraft; this.mc = par1Minecraft;
Socket var4 = new Socket(InetAddress.getByName(par2Str), par3); Socket var4 = new Socket(InetAddress.getByName(par2Str), par3);
this.netManager = new TcpConnection(par1Minecraft.getLogAgent(), var4, "Client", this); //this.netManager = new TcpConnection(par1Minecraft.getLogAgent(), var4, "Client", this); // FIX THIS SHIT
} }
public NetClientHandler(Minecraft par1Minecraft, String par2Str, int par3, GuiScreen par4GuiScreen) throws IOException public NetClientHandler(Minecraft par1Minecraft, String par2Str, int par3, GuiScreen par4GuiScreen) throws IOException
@ -62,13 +63,13 @@ public class NetClientHandler extends NetHandler
this.mc = par1Minecraft; this.mc = par1Minecraft;
this.field_98183_l = par4GuiScreen; this.field_98183_l = par4GuiScreen;
Socket var5 = new Socket(InetAddress.getByName(par2Str), par3); Socket var5 = new Socket(InetAddress.getByName(par2Str), par3);
this.netManager = new TcpConnection(par1Minecraft.getLogAgent(), var5, "Client", this); //this.netManager = new TcpConnection(par1Minecraft.getLogAgent(), var5, "Client", this);
} }
public NetClientHandler(Minecraft par1Minecraft, IntegratedServer par2IntegratedServer) throws IOException public NetClientHandler(Minecraft par1Minecraft, IntegratedServer par2IntegratedServer) throws IOException
{ {
this.mc = par1Minecraft; this.mc = par1Minecraft;
this.netManager = new MemoryConnection(par1Minecraft.getLogAgent(), this); //this.netManager = new MemoryConnection(par1Minecraft.getLogAgent(), this);
par2IntegratedServer.getServerListeningThread().func_71754_a((MemoryConnection)this.netManager, par1Minecraft.getSession().getUsername()); par2IntegratedServer.getServerListeningThread().func_71754_a((MemoryConnection)this.netManager, par1Minecraft.getSession().getUsername());
} }
@ -128,7 +129,7 @@ public class NetClientHandler extends NetHandler
{ {
this.mc.playerController = new PlayerControllerMP(this.mc, this); this.mc.playerController = new PlayerControllerMP(this.mc, this);
this.mc.statFileWriter.readStat(StatList.joinMultiplayerStat, 1); this.mc.statFileWriter.readStat(StatList.joinMultiplayerStat, 1);
this.worldClient = new WorldClient(this, new WorldSettings(0L, par1Packet1Login.gameType, false, par1Packet1Login.hardcoreMode, par1Packet1Login.terrainType), par1Packet1Login.dimension, par1Packet1Login.difficultySetting, this.mc.mcProfiler, this.mc.getLogAgent()); this.worldClient = new WorldClient(this, new WorldSettings(0L, par1Packet1Login.gameType, false, par1Packet1Login.hardcoreMode, par1Packet1Login.terrainType), par1Packet1Login.dimension, par1Packet1Login.difficultySetting, this.mc.mcProfiler);
this.worldClient.isRemote = true; this.worldClient.isRemote = true;
this.mc.loadWorld(this.worldClient); this.mc.loadWorld(this.worldClient);
this.mc.thePlayer.dimension = par1Packet1Login.dimension; this.mc.thePlayer.dimension = par1Packet1Login.dimension;
@ -851,7 +852,7 @@ public class NetClientHandler extends NetHandler
{ {
this.doneLoadingTerrain = false; this.doneLoadingTerrain = false;
Scoreboard var2 = this.worldClient.getScoreboard(); Scoreboard var2 = this.worldClient.getScoreboard();
this.worldClient = new WorldClient(this, new WorldSettings(0L, par1Packet9Respawn.gameType, false, this.mc.theWorld.getWorldInfo().isHardcoreModeEnabled(), par1Packet9Respawn.terrainType), par1Packet9Respawn.respawnDimension, par1Packet9Respawn.difficulty, this.mc.mcProfiler, this.mc.getLogAgent()); this.worldClient = new WorldClient(this, new WorldSettings(0L, par1Packet9Respawn.gameType, false, this.mc.theWorld.getWorldInfo().isHardcoreModeEnabled(), par1Packet9Respawn.terrainType), par1Packet9Respawn.respawnDimension, par1Packet9Respawn.difficulty, this.mc.mcProfiler);
this.worldClient.func_96443_a(var2); this.worldClient.func_96443_a(var2);
this.worldClient.isRemote = true; this.worldClient.isRemote = true;
this.mc.loadWorld(this.worldClient); this.mc.loadWorld(this.worldClient);
@ -1280,7 +1281,7 @@ public class NetClientHandler extends NetHandler
} }
else else
{ {
this.mc.getLogAgent().logWarning("Unknown itemid: " + par1Packet131MapData.uniqueID); System.err.println("Unknown itemid: " + par1Packet131MapData.uniqueID);
} }
} }

View File

@ -66,7 +66,7 @@ public class SharedMonsterAttributes
return var1; return var1;
} }
public static void func_111260_a(BaseAttributeMap par0BaseAttributeMap, NBTTagList par1NBTTagList, ILogAgent par2ILogAgent) public static void func_111260_a(BaseAttributeMap par0BaseAttributeMap, NBTTagList par1NBTTagList)
{ {
for (int var3 = 0; var3 < par1NBTTagList.tagCount(); ++var3) for (int var3 = 0; var3 < par1NBTTagList.tagCount(); ++var3)
{ {
@ -77,9 +77,8 @@ public class SharedMonsterAttributes
{ {
func_111258_a(var5, var4); func_111258_a(var5, var4);
} }
else if (par2ILogAgent != null) else {
{ System.out.println("Ignoring unknown attribute \'" + var4.getString("Name") + "\'");
par2ILogAgent.logWarning("Ignoring unknown attribute \'" + var4.getString("Name") + "\'");
} }
} }
} }

View File

@ -42,7 +42,7 @@ public class SimpleTexture extends AbstractTexture
} }
catch (RuntimeException var11) catch (RuntimeException var11)
{ {
Minecraft.getMinecraft().getLogAgent().logWarningException("Failed reading metadata of: " + this.textureLocation, var11); System.out.printf("Failed reading metadata of: " + this.textureLocation, var11);
} }
} }

View File

@ -51,7 +51,7 @@ public class ThreadLanServerFind extends Thread
} }
String var3 = new String(var1.getData(), var1.getOffset(), var1.getLength()); String var3 = new String(var1.getData(), var1.getOffset(), var1.getLength());
Minecraft.getMinecraft().getLogAgent().logFine(var1.getAddress() + ": " + var3); System.out.println(var1.getAddress() + ": " + var3);
this.localServerList.func_77551_a(var3, var1.getAddress()); this.localServerList.func_77551_a(var3, var1.getAddress());
} }

View File

@ -38,7 +38,7 @@ public class ThreadLanServerPing extends Thread
} }
catch (IOException var6) catch (IOException var6)
{ {
Minecraft.getMinecraft().getLogAgent().logWarning("LanServerPinger: " + var6.getMessage()); System.out.println("LanServerPinger: " + var6.getMessage());
break; break;
} }

View File

@ -91,8 +91,6 @@ public abstract class World implements IBlockAccess
private final Calendar theCalendar = Calendar.getInstance(); private final Calendar theCalendar = Calendar.getInstance();
protected Scoreboard worldScoreboard = new Scoreboard(); protected Scoreboard worldScoreboard = new Scoreboard();
/** The log agent for this world. */
private final ILogAgent worldLogAgent;
private ArrayList collidingBoundingBoxes = new ArrayList(); private ArrayList collidingBoundingBoxes = new ArrayList();
private boolean scanningTileEntities; private boolean scanningTileEntities;
@ -142,7 +140,7 @@ public abstract class World implements IBlockAccess
return this.provider.worldChunkMgr; return this.provider.worldChunkMgr;
} }
public World(ISaveHandler par1ISaveHandler, String par2Str, WorldProvider par3WorldProvider, WorldSettings par4WorldSettings, Profiler par5Profiler, ILogAgent par6ILogAgent) public World(ISaveHandler par1ISaveHandler, String par2Str, WorldProvider par3WorldProvider, WorldSettings par4WorldSettings, Profiler par5Profiler)
{ {
this.ambientTickCountdown = this.rand.nextInt(12000); this.ambientTickCountdown = this.rand.nextInt(12000);
this.lightUpdateBlockList = new int[32768]; this.lightUpdateBlockList = new int[32768];
@ -151,7 +149,6 @@ public abstract class World implements IBlockAccess
this.worldInfo = new WorldInfo(par4WorldSettings, par2Str); this.worldInfo = new WorldInfo(par4WorldSettings, par2Str);
this.provider = par3WorldProvider; this.provider = par3WorldProvider;
this.mapStorage = new MapStorage(par1ISaveHandler); this.mapStorage = new MapStorage(par1ISaveHandler);
this.worldLogAgent = par6ILogAgent;
VillageCollection var7 = (VillageCollection)this.mapStorage.loadData(VillageCollection.class, "villages"); VillageCollection var7 = (VillageCollection)this.mapStorage.loadData(VillageCollection.class, "villages");
if (var7 == null) if (var7 == null)
@ -171,14 +168,13 @@ public abstract class World implements IBlockAccess
this.calculateInitialWeather(); this.calculateInitialWeather();
} }
public World(ISaveHandler par1ISaveHandler, String par2Str, WorldSettings par3WorldSettings, WorldProvider par4WorldProvider, Profiler par5Profiler, ILogAgent par6ILogAgent) public World(ISaveHandler par1ISaveHandler, String par2Str, WorldSettings par3WorldSettings, WorldProvider par4WorldProvider, Profiler par5Profiler)
{ {
this.ambientTickCountdown = this.rand.nextInt(12000); this.ambientTickCountdown = this.rand.nextInt(12000);
this.lightUpdateBlockList = new int[32768]; this.lightUpdateBlockList = new int[32768];
this.saveHandler = par1ISaveHandler; this.saveHandler = par1ISaveHandler;
this.theProfiler = par5Profiler; this.theProfiler = par5Profiler;
this.mapStorage = new MapStorage(par1ISaveHandler); this.mapStorage = new MapStorage(par1ISaveHandler);
this.worldLogAgent = par6ILogAgent;
this.worldInfo = par1ISaveHandler.loadWorldInfo(); this.worldInfo = par1ISaveHandler.loadWorldInfo();
if (par4WorldProvider != null) if (par4WorldProvider != null)
@ -4242,11 +4238,6 @@ public abstract class World implements IBlockAccess
} }
} }
public ILogAgent getWorldLogAgent()
{
return this.worldLogAgent;
}
/** /**
* returns a float value that can be used to determine how likely something is to go awry in the area. It increases * returns a float value that can be used to determine how likely something is to go awry in the area. It increases
* based on how long the player is within the vicinity, the lunar phase, and game difficulty. The value can be up to * based on how long the player is within the vicinity, the lunar phase, and game difficulty. The value can be up to

View File

@ -29,9 +29,9 @@ public class WorldClient extends World
private final Minecraft mc = Minecraft.getMinecraft(); private final Minecraft mc = Minecraft.getMinecraft();
private final Set previousActiveChunkSet = new HashSet(); private final Set previousActiveChunkSet = new HashSet();
public WorldClient(NetClientHandler par1NetClientHandler, WorldSettings par2WorldSettings, int par3, int par4, Profiler par5Profiler, ILogAgent par6ILogAgent) public WorldClient(NetClientHandler par1NetClientHandler, WorldSettings par2WorldSettings, int par3, int par4, Profiler par5Profiler)
{ {
super(new SaveHandlerMP(), "MpServer", WorldProvider.getProviderForDimension(par3), par2WorldSettings, par5Profiler, par6ILogAgent); super(new SaveHandlerMP(), "MpServer", WorldProvider.getProviderForDimension(par3), par2WorldSettings, par5Profiler);
this.sendQueue = par1NetClientHandler; this.sendQueue = par1NetClientHandler;
this.difficultySetting = par4; this.difficultySetting = par4;
this.setSpawnLocation(8, 64, 8); this.setSpawnLocation(8, 64, 8);

View File

@ -51,7 +51,7 @@ public class WorldServer extends World
public WorldServer(MinecraftServer par1MinecraftServer, ISaveHandler par2ISaveHandler, String par3Str, int par4, WorldSettings par5WorldSettings, Profiler par6Profiler, ILogAgent par7ILogAgent) public WorldServer(MinecraftServer par1MinecraftServer, ISaveHandler par2ISaveHandler, String par3Str, int par4, WorldSettings par5WorldSettings, Profiler par6Profiler, ILogAgent par7ILogAgent)
{ {
super(par2ISaveHandler, par3Str, par5WorldSettings, WorldProvider.getProviderForDimension(par4), par6Profiler, par7ILogAgent); super(par2ISaveHandler, par3Str, par5WorldSettings, WorldProvider.getProviderForDimension(par4), par6Profiler);
this.mcServer = par1MinecraftServer; this.mcServer = par1MinecraftServer;
this.theEntityTracker = new EntityTracker(this); this.theEntityTracker = new EntityTracker(this);
this.thePlayerManager = new PlayerManager(this, par1MinecraftServer.getConfigurationManager().getViewDistance()); this.thePlayerManager = new PlayerManager(this, par1MinecraftServer.getConfigurationManager().getViewDistance());
@ -723,7 +723,7 @@ public class WorldServer extends World
} }
else else
{ {
this.getWorldLogAgent().logWarning("Unable to find spawn biome"); System.out.println("Unable to find spawn biome");
} }
int var9 = 0; int var9 = 0;