54 errors

This commit is contained in:
catfoolyou 2025-01-29 18:26:58 -05:00
parent 2783405c58
commit 2df8e7ba5d
25 changed files with 110 additions and 170 deletions

Binary file not shown.

View File

@ -18,7 +18,7 @@ public class MinecraftMain {
byte[] b = EaglerAdapter.loadLocalStorage("forced"); byte[] b = EaglerAdapter.loadLocalStorage("forced");
if(b != null) { if(b != null) {
ServerList.loadDefaultServers(Base64.encodeBase64String(b)); //ServerList.loadDefaultServers(Base64.encodeBase64String(b)); // FIX THIS
} }
if(par0ArrayOfStr.length > 0) { if(par0ArrayOfStr.length > 0) {
EaglerAdapter.setServerToJoinOnLaunch(par0ArrayOfStr[0]); EaglerAdapter.setServerToJoinOnLaunch(par0ArrayOfStr[0]);

View File

@ -81,12 +81,10 @@ public class TextureTerrainMap implements IconRegister {
} }
} }
@Override
public int getOriginX() { public int getOriginX() {
return originX_center; return originX_center;
} }
@Override
public int getOriginY() { public int getOriginY() {
return originY_center; return originY_center;
} }
@ -128,12 +126,10 @@ public class TextureTerrainMap implements IconRegister {
return name == null ? "missingno" : name; return name == null ? "missingno" : name;
} }
@Override
public int getSheetWidth() { public int getSheetWidth() {
return map.width; return map.width;
} }
@Override
public int getSheetHeight() { public int getSheetHeight() {
return map.height; return map.height;
} }
@ -242,6 +238,18 @@ public class TextureTerrainMap implements IconRegister {
} }
} }
@Override
public int getIconWidth() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getIconWidth'");
}
@Override
public int getIconHeight() {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'getIconHeight'");
}
} }
private final String basePath; private final String basePath;
@ -556,4 +564,10 @@ public class TextureTerrainMap implements IconRegister {
public Icon getMissingIcon() { public Icon getMissingIcon() {
return missingImage; return missingImage;
} }
@Override
public Icon registerIcon(String var1) {
// TODO Auto-generated method stub
throw new UnsupportedOperationException("Unimplemented method 'registerIcon'");
}
} }

View File

@ -113,7 +113,6 @@ public class WorkerNetworkManager implements INetworkManager {
} }
} }
@Override
public String getServerURI() { public String getServerURI() {
return "[integrated]"; return "[integrated]";
} }

View File

@ -177,7 +177,7 @@ public class EffectPipeline {
float bb = 3.0f * intensity; float bb = 3.0f * intensity;
float intensityModifier = 0.0f; float intensityModifier = 0.0f;
EntityLiving lv = Minecraft.getMinecraft().renderViewEntity; EntityLiving lv = (EntityLiving) Minecraft.getMinecraft().renderViewEntity;
if(lv != null) { if(lv != null) {
int j = lv.getBrightnessForRender(0.0f); int j = lv.getBrightnessForRender(0.0f);
intensityModifier = Math.min(1.0f - ((j / 65536) / 256.0f), 1.0f - ((j % 65536) / 256.0f)) * 3.0f; intensityModifier = Math.min(1.0f - ((j / 65536) / 256.0f), 1.0f - ((j % 65536) / 256.0f)) * 3.0f;

View File

@ -89,6 +89,32 @@ public class CompressedStreamTools
return var1.toByteArray(); return var1.toByteArray();
} }
public static NBTTagCompound readUncompressed(byte[] par0ArrayOfByte) throws IOException {
DataInputStream var1 = new DataInputStream(new BufferedInputStream(new ByteArrayInputStream(par0ArrayOfByte)));
NBTTagCompound var2;
try {
var2 = read(var1);
} finally {
var1.close();
}
return var2;
}
public static byte[] writeUncompressed(NBTTagCompound par0NBTTagCompound) throws IOException {
ByteArrayOutputStream var1 = new ByteArrayOutputStream();
DataOutputStream var2 = new DataOutputStream(var1);
try {
write(par0NBTTagCompound, var2);
} finally {
var2.close();
}
return var1.toByteArray();
}
public static void safeWrite(NBTTagCompound par0NBTTagCompound, File par1File) throws IOException public static void safeWrite(NBTTagCompound par0NBTTagCompound, File par1File) throws IOException
{ {
File var2 = new File(par1File.getAbsolutePath() + "_tmp"); File var2 = new File(par1File.getAbsolutePath() + "_tmp");

View File

@ -53,6 +53,7 @@ public class GameSettings
public boolean snooperEnabled = true; public boolean snooperEnabled = true;
public boolean fullScreen; public boolean fullScreen;
public boolean enableVsync = true; public boolean enableVsync = true;
public boolean hideVsyncWarning = false;
public boolean hideServerAddress; public boolean hideServerAddress;
/** /**
@ -66,6 +67,7 @@ public class GameSettings
/** Whether to show your cape */ /** Whether to show your cape */
public boolean showCape = true; public boolean showCape = true;
public boolean touchscreen; public boolean touchscreen;
public int antialiasMode = 1;
public int overrideWidth; public int overrideWidth;
public int overrideHeight; public int overrideHeight;
public boolean heldItemTooltips = true; public boolean heldItemTooltips = true;

View File

@ -56,7 +56,7 @@ public class GuiScreenBackup extends GuiScreen
{ {
String var2 = I18n.getString("mco.configure.world.restore.question.line1"); String var2 = I18n.getString("mco.configure.world.restore.question.line1");
String var3 = I18n.getString("mco.configure.world.restore.question.line2"); String var3 = I18n.getString("mco.configure.world.restore.question.line2");
this.mc.displayGuiScreen(new GuiScreenConfirmation(this, GuiScreenConfirmationType.Warning, var2, var3, 1)); this.mc.displayGuiScreen(new GuiScreenConfirmation(this, "Warning!", var2, var3, 1));
} }
else if (par1GuiButton.id == 0) else if (par1GuiButton.id == 0)
{ {

View File

@ -108,7 +108,7 @@ public class GuiScreenConfigureWorld extends GuiScreen
{ {
String var2 = I18n.getString("mco.configure.world.close.question.line1"); String var2 = I18n.getString("mco.configure.world.close.question.line1");
String var3 = I18n.getString("mco.configure.world.close.question.line2"); String var3 = I18n.getString("mco.configure.world.close.question.line2");
this.mc.displayGuiScreen(new GuiScreenConfirmation(this, GuiScreenConfirmationType.Info, var2, var3, 1)); this.mc.displayGuiScreen(new GuiScreenConfirmation(this, "Warning!", var2, var3, 1));
} }
else if (par1GuiButton.id == 0) else if (par1GuiButton.id == 0)
{ {

View File

@ -1,52 +1,26 @@
package net.minecraft.src; package net.minecraft.src;
public class GuiScreenConfirmation extends GuiScreen public class GuiScreenConfirmation extends GuiYesNo {
{ private String field_96288_n;
private final GuiScreenConfirmationType field_140045_e;
private final String field_140049_p;
private final String field_96288_n;
protected final GuiScreen field_140048_a;
protected final String field_140046_b;
protected final String field_140047_c;
protected final int field_140044_d;
public GuiScreenConfirmation(GuiScreen par1GuiScreen, GuiScreenConfirmationType par2GuiScreenConfirmationType, String par3Str, String par4Str, int par5) public GuiScreenConfirmation(GuiScreen par1GuiScreen, String par2Str, String par3Str, String par4Str, int par5) {
{ super(par1GuiScreen, par2Str, par3Str, par5);
this.field_140048_a = par1GuiScreen;
this.field_140044_d = par5;
this.field_140045_e = par2GuiScreenConfirmationType;
this.field_140049_p = par3Str;
this.field_96288_n = par4Str; this.field_96288_n = par4Str;
this.field_140046_b = I18n.getString("gui.yes");
this.field_140047_c = I18n.getString("gui.no");
} }
/** /**
* Adds the buttons (and other controls) to the screen in question. * Adds the buttons (and other controls) to the screen in question.
*/ */
public void initGui() public void initGui() {
{ this.buttonList.add(new GuiSmallButton(0, this.width / 2 - 155, this.height / 6 + 112, this.buttonText1));
this.buttonList.add(new GuiSmallButton(0, this.width / 2 - 155, this.height / 6 + 112, this.field_140046_b)); this.buttonList.add(new GuiSmallButton(1, this.width / 2 - 155 + 160, this.height / 6 + 112, this.buttonText2));
this.buttonList.add(new GuiSmallButton(1, this.width / 2 - 155 + 160, this.height / 6 + 112, this.field_140047_c));
}
/**
* Fired when a control is clicked. This is the equivalent of ActionListener.actionPerformed(ActionEvent e).
*/
protected void actionPerformed(GuiButton par1GuiButton)
{
this.field_140048_a.confirmClicked(par1GuiButton.id == 0, this.field_140044_d);
} }
/** /**
* Draws the screen and all the components in it. * Draws the screen and all the components in it.
*/ */
public void drawScreen(int par1, int par2, float par3) public void drawScreen(int par1, int par2, float par3) {
{
this.drawDefaultBackground();
this.drawCenteredString(this.fontRenderer, this.field_140045_e.field_140072_d, this.width / 2, 70, this.field_140045_e.field_140075_c);
this.drawCenteredString(this.fontRenderer, this.field_140049_p, this.width / 2, 90, 16777215);
this.drawCenteredString(this.fontRenderer, this.field_96288_n, this.width / 2, 110, 16777215);
super.drawScreen(par1, par2, par3); super.drawScreen(par1, par2, par3);
this.drawCenteredString(this.fontRenderer, this.field_96288_n, this.width / 2, 110, 16777215);
} }
} }

View File

@ -184,7 +184,7 @@ public class GuiScreenOnlineServers extends GuiScreen
{ {
String var4 = I18n.getString("mco.configure.world.leave.question.line1"); String var4 = I18n.getString("mco.configure.world.leave.question.line1");
String var3 = I18n.getString("mco.configure.world.leave.question.line2"); String var3 = I18n.getString("mco.configure.world.leave.question.line2");
this.mc.displayGuiScreen(new GuiScreenConfirmation(this, GuiScreenConfirmationType.Info, var4, var3, 3)); this.mc.displayGuiScreen(new GuiScreenConfirmation(this, "Warning!", var4, var3, 3));
} }
} }
} }

View File

@ -90,7 +90,7 @@ public class GuiScreenResetWorld extends ScreenWithCallback
{ {
String var2 = I18n.getString("mco.configure.world.reset.question.line1"); String var2 = I18n.getString("mco.configure.world.reset.question.line1");
String var3 = I18n.getString("mco.configure.world.reset.question.line2"); String var3 = I18n.getString("mco.configure.world.reset.question.line2");
this.mc.displayGuiScreen(new GuiScreenConfirmation(this, GuiScreenConfirmationType.Warning, var2, var3, 1)); this.mc.displayGuiScreen(new GuiScreenConfirmation(this, "Warning!", var2, var3, 1));
} }
else if (par1GuiButton.id == field_110360_p) else if (par1GuiButton.id == field_110360_p)
{ {

View File

@ -44,7 +44,7 @@ public class GuiTexturePacks extends GuiScreen {
this.mc.texturePackList.updateAvaliableTexturePacks(); this.mc.texturePackList.updateAvaliableTexturePacks();
this.fileLocation = "texturepacks"; this.fileLocation = "texturepacks";
this.guiTexturePackSlot = new GuiTexturePackSlot(this); this.guiTexturePackSlot = new GuiTexturePackSlot(this);
this.guiTexturePackSlot.registerScrollButtons(this.buttonList, 7, 8); this.guiTexturePackSlot.registerScrollButtons(7, 8);
} }
/** /**

View File

@ -126,6 +126,7 @@ public class Minecraft implements IPlayerUsage
/** Mouse helper instance. */ /** Mouse helper instance. */
public MouseHelper mouseHelper; public MouseHelper mouseHelper;
public TexturePackList texturePackList;
public final File mcDataDir; public final File mcDataDir;
private final File fileAssets; private final File fileAssets;
private final String launchedVersion; private final String launchedVersion;
@ -1963,6 +1964,10 @@ public class Minecraft implements IPlayerUsage
this.systemTime = 0L; this.systemTime = 0L;
} }
public void setNetManager(INetworkManager nm) {
this.myNetworkManager = nm;
}
/** /**
* A String of renderGlobal.getDebugInfoRenders * A String of renderGlobal.getDebugInfoRenders
*/ */

View File

@ -451,7 +451,7 @@ public class NBTTagCompound extends NBTBase
/** /**
* Return the tag map for this compound. * Return the tag map for this compound.
*/ */
static Map getTagMap(NBTTagCompound par0NBTTagCompound) public static Map getTagMap(NBTTagCompound par0NBTTagCompound)
{ {
return par0NBTTagCompound.tagMap; return par0NBTTagCompound.tagMap;
} }

View File

@ -1,25 +1,19 @@
package net.minecraft.src; package net.minecraft.src;
import com.google.common.base.Charsets; import com.google.common.base.Charsets;
import java.io.BufferedReader;
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.io.InputStream;
import java.io.InputStreamReader;
import java.math.BigInteger;
import java.net.InetAddress; import java.net.InetAddress;
import java.net.Socket; import java.net.Socket;
import java.net.URL;
import java.net.URLEncoder;
import java.security.PublicKey;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.Iterator; import java.util.Iterator;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.Random; import java.util.Random;
import javax.crypto.SecretKey;
import net.lax1dude.eaglercraft.WebsocketNetworkManager;
import net.minecraft.client.ClientBrandRetriever; import net.minecraft.client.ClientBrandRetriever;
import org.lwjgl.input.Keyboard; import org.lwjgl.input.Keyboard;
@ -78,6 +72,17 @@ public class NetClientHandler extends NetHandler
par2IntegratedServer.getServerListeningThread().func_71754_a((MemoryConnection)this.netManager, par1Minecraft.getSession().getUsername()); par2IntegratedServer.getServerListeningThread().func_71754_a((MemoryConnection)this.netManager, par1Minecraft.getSession().getUsername());
} }
public NetClientHandler(Minecraft par1Minecraft, INetworkManager mgr) throws IOException {
this.mc = par1Minecraft;
this.netManager = mgr;
}
public NetClientHandler(Minecraft par1Minecraft, String channel) throws IOException {
this.mc = par1Minecraft;
this.netManager = IntegratedServer.openConnection(channel, this);
}
/** /**
* sets netManager and worldClient to null * sets netManager and worldClient to null
*/ */
@ -110,52 +115,9 @@ public class NetClientHandler extends NetHandler
public void handleServerAuthData(Packet253ServerAuthData par1Packet253ServerAuthData) public void handleServerAuthData(Packet253ServerAuthData par1Packet253ServerAuthData)
{ {
String var2 = par1Packet253ServerAuthData.getServerId().trim(); this.addToSendQueue(new Packet252SharedKey());
PublicKey var3 = par1Packet253ServerAuthData.getPublicKey();
SecretKey var4 = CryptManager.createNewSharedKey();
if (!"-".equals(var2))
{
String var5 = (new BigInteger(CryptManager.getServerIdHash(var2, var3, var4))).toString(16);
String var6 = this.sendSessionRequest(this.mc.getSession().getUsername(), this.mc.getSession().getSessionID(), var5);
if (!"ok".equalsIgnoreCase(var6))
{
this.netManager.networkShutdown("disconnect.loginFailedInfo", new Object[] {var6});
return;
}
} }
this.addToSendQueue(new Packet252SharedKey(var4, var3, par1Packet253ServerAuthData.getVerifyToken()));
}
/**
* Send request to http://session.minecraft.net with user's sessionId and serverId hash
*/
private String sendSessionRequest(String par1Str, String par2Str, String par3Str)
{
try
{
URL var4 = new URL("http://session.minecraft.net/game/joinserver.jsp?user=" + urlEncode(par1Str) + "&sessionId=" + urlEncode(par2Str) + "&serverId=" + urlEncode(par3Str));
InputStream var5 = var4.openConnection(this.mc.getProxy()).getInputStream();
BufferedReader var6 = new BufferedReader(new InputStreamReader(var5));
String var7 = var6.readLine();
var6.close();
return var7;
}
catch (IOException var8)
{
return var8.toString();
}
}
/**
* Encode the given string for insertion into a URL
*/
private static String urlEncode(String par0Str) throws IOException
{
return URLEncoder.encode(par0Str, "UTF-8");
}
public void handleSharedKey(Packet252SharedKey par1Packet252SharedKey) public void handleSharedKey(Packet252SharedKey par1Packet252SharedKey)
{ {

View File

@ -13,31 +13,12 @@ public abstract class Request
public Request(String par1Str, int par2, int par3) public Request(String par1Str, int par2, int par3)
{ {
try
{
this.field_96365_b = par1Str;
this.field_96367_a = (HttpURLConnection)(new URL(par1Str)).openConnection(Minecraft.getMinecraft().getProxy());
this.field_96367_a.setConnectTimeout(par2);
this.field_96367_a.setReadTimeout(par3);
}
catch (Exception var5)
{
throw new ExceptionMcoHttp("Failed URL: " + par1Str, var5);
}
} }
public void func_100006_a(String par1Str, String par2Str) public void func_100006_a(String par1Str, String par2Str)
{ {
String var3 = this.field_96367_a.getRequestProperty("Cookie");
if (var3 == null)
{
this.field_96367_a.setRequestProperty("Cookie", par1Str + "=" + par2Str);
}
else
{
this.field_96367_a.setRequestProperty("Cookie", var3 + ";" + par1Str + "=" + par2Str);
}
} }
public int func_96362_a() public int func_96362_a()

View File

@ -10,6 +10,8 @@ import java.util.Map.Entry;
public class TextureManager implements Tickable, ResourceManagerReloadListener public class TextureManager implements Tickable, ResourceManagerReloadListener
{ {
private static TextureManager instance;
private int nextTextureID = 0;
private final Map mapTextureObjects = Maps.newHashMap(); private final Map mapTextureObjects = Maps.newHashMap();
private final Map mapResourceLocations = Maps.newHashMap(); private final Map mapResourceLocations = Maps.newHashMap();
private final List listTickables = Lists.newArrayList(); private final List listTickables = Lists.newArrayList();
@ -21,6 +23,14 @@ public class TextureManager implements Tickable, ResourceManagerReloadListener
this.theResourceManager = par1ResourceManager; this.theResourceManager = par1ResourceManager;
} }
public static TextureManager instance() {
return instance;
}
public int getNextTextureId() {
return this.nextTextureID++;
}
public void bindTexture(ResourceLocation par1ResourceLocation) public void bindTexture(ResourceLocation par1ResourceLocation)
{ {
Object var2 = (TextureObject)this.mapTextureObjects.get(par1ResourceLocation); Object var2 = (TextureObject)this.mapTextureObjects.get(par1ResourceLocation);

View File

@ -1,9 +1,5 @@
package net.minecraft.src; package net.minecraft.src;
import java.awt.image.BufferedImage;
import java.net.HttpURLConnection;
import java.net.URL;
import javax.imageio.ImageIO;
class ThreadDownloadImageDataINNER1 extends Thread class ThreadDownloadImageDataINNER1 extends Thread
{ {
@ -16,39 +12,6 @@ class ThreadDownloadImageDataINNER1 extends Thread
public void run() public void run()
{ {
HttpURLConnection var1 = null;
try
{
var1 = (HttpURLConnection)(new URL(ThreadDownloadImageData.getImageUrl(this.theThreadDownloadImageData))).openConnection(Minecraft.getMinecraft().getProxy());
var1.setDoInput(true);
var1.setDoOutput(false);
var1.connect();
if (var1.getResponseCode() / 100 != 2)
{
return;
}
BufferedImage var2 = ImageIO.read(var1.getInputStream());
if (ThreadDownloadImageData.getImageBuffer(this.theThreadDownloadImageData) != null)
{
var2 = ThreadDownloadImageData.getImageBuffer(this.theThreadDownloadImageData).parseUserSkin(var2);
}
this.theThreadDownloadImageData.getBufferedImage(var2);
}
catch (Exception var6)
{
var6.printStackTrace();
}
finally
{
if (var1 != null)
{
var1.disconnect();
}
}
} }
} }

View File

@ -128,4 +128,8 @@ public final class WorldSettings
{ {
return this.field_82751_h; return this.field_82751_h;
} }
public int getIPCGamemode() {
return this.hardcoreEnabled ? 2 : (this.getGameType().isCreative() ? 1 : 0);
}
} }