Archive 3kh0-eaglercraft-1-8 (source, 1.8.8, clean-with-notes)

This commit is contained in:
2026-11-27 22:05:47 -06:00
parent f285ff13f6
commit b063698b16
3104 changed files with 340792 additions and 0 deletions
@@ -0,0 +1,12 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 4 : 5 @ 4 : 5
~ return "eagler";
> EOF
@@ -0,0 +1,63 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 4 @ 2 : 3
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
~ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
> DELETE 2 @ 2 : 4
> DELETE 1 @ 1 : 2
> CHANGE 1 : 2 @ 1 : 2
~ import net.minecraft.client.resources.I18n;
> DELETE 10 @ 10 : 11
> DELETE 4 @ 4 : 6
> CHANGE 22 : 25 @ 22 : 32
~ ScaledResolution scaledresolution = new ScaledResolution(this.mc);
~ GlStateManager.ortho(0.0D, scaledresolution.getScaledWidth_double(),
~ scaledresolution.getScaledHeight_double(), 0.0D, 100.0D, 300.0D);
> INSERT 19 : 37 @ 19
+ public void eaglerShow(String line1, String line2) {
+ if (!this.mc.running) {
+ if (!this.field_73724_e) {
+ throw new MinecraftError();
+ }
+ } else {
+ this.systemTime = 0L;
+ this.currentlyDisplayedText = line1;
+ this.message = line2;
+ this.setLoadingProgress(-1);
+ this.systemTime = 0L;
+ }
+ }
+
+ public void eaglerShowRefreshResources() {
+ eaglerShow(I18n.format("resourcePack.load.refreshing"), I18n.format("resourcePack.load.pleaseWait"));
+ }
+
> CHANGE 13 : 14 @ 13 : 20
~ GlStateManager.clear(256);
> CHANGE 7 : 9 @ 7 : 10
~ GlStateManager.clear(16640);
~ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
> DELETE 44 @ 44 : 49
> EOF
@@ -0,0 +1,911 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 4 @ 2 : 17
~ import static net.lax1dude.eaglercraft.v1_8.internal.PlatformOpenGL._wglBindFramebuffer;
~
> DELETE 2 @ 2 : 6
> DELETE 1 @ 1 : 2
> CHANGE 2 : 3 @ 2 : 6
~ import java.util.LinkedList;
> DELETE 1 @ 1 : 4
> CHANGE 1 : 56 @ 1 : 4
~
~ import net.lax1dude.eaglercraft.v1_8.internal.PlatformInput;
~
~ import org.apache.commons.lang3.Validate;
~
~ import com.google.common.collect.Lists;
~
~ import net.lax1dude.eaglercraft.v1_8.Display;
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
~ import net.lax1dude.eaglercraft.v1_8.EagUtils;
~ import net.lax1dude.eaglercraft.v1_8.EaglerXBungeeVersion;
~ import net.lax1dude.eaglercraft.v1_8.HString;
~ import net.lax1dude.eaglercraft.v1_8.IOUtils;
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
~ import net.lax1dude.eaglercraft.v1_8.Mouse;
~ import net.lax1dude.eaglercraft.v1_8.futures.Executors;
~ import net.lax1dude.eaglercraft.v1_8.futures.FutureTask;
~ import net.lax1dude.eaglercraft.v1_8.futures.ListenableFuture;
~ import net.lax1dude.eaglercraft.v1_8.futures.ListenableFutureTask;
~ import net.lax1dude.eaglercraft.v1_8.internal.EnumPlatformType;
~ import net.lax1dude.eaglercraft.v1_8.internal.PlatformRuntime;
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerFolderResourcePack;
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerFontRenderer;
~ import net.lax1dude.eaglercraft.v1_8.opengl.EaglerMeshLoader;
~ import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
~ import net.lax1dude.eaglercraft.v1_8.opengl.ImageData;
~ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.BlockVertexIDs;
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.DebugFramebufferView;
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.EaglerDeferredPipeline;
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.ShaderPackInfoReloadListener;
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.program.ShaderSource;
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture.EmissiveItems;
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture.MetalsLUT;
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture.PBRTextureMapUtils;
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.texture.TemperaturesLUT;
~ import net.lax1dude.eaglercraft.v1_8.profile.EaglerProfile;
~ import net.lax1dude.eaglercraft.v1_8.profile.GuiScreenEditProfile;
~ import net.lax1dude.eaglercraft.v1_8.profile.SkinPreviewRenderer;
~ import net.lax1dude.eaglercraft.v1_8.socket.AddressResolver;
~ import net.lax1dude.eaglercraft.v1_8.socket.EaglercraftNetworkManager;
~ import net.lax1dude.eaglercraft.v1_8.socket.RateLimitTracker;
~ import net.lax1dude.eaglercraft.v1_8.sp.IntegratedServerState;
~ import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController;
~ import net.lax1dude.eaglercraft.v1_8.sp.SkullCommand;
~ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenDemoIntegratedServerStartup;
~ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenIntegratedServerBusy;
~ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenSingleplayerConnecting;
~ import net.lax1dude.eaglercraft.v1_8.sp.lan.LANServerController;
~ import net.lax1dude.eaglercraft.v1_8.update.RelayUpdateChecker;
~ import net.lax1dude.eaglercraft.v1_8.voice.GuiVoiceOverlay;
~ import net.lax1dude.eaglercraft.v1_8.voice.VoiceClientController;
> DELETE 2 @ 2 : 4
> DELETE 10 @ 10 : 11
> DELETE 2 @ 2 : 4
> DELETE 3 @ 3 : 4
> INSERT 3 : 4 @ 3
+ import net.minecraft.client.multiplayer.ServerAddress;
> INSERT 1 : 2 @ 1
+ import net.minecraft.client.multiplayer.ServerList;
> DELETE 1 @ 1 : 2
> DELETE 4 @ 4 : 5
> DELETE 1 @ 1 : 2
> DELETE 2 @ 2 : 3
> DELETE 15 @ 15 : 16
> DELETE 2 @ 2 : 3
> DELETE 14 @ 14 : 18
> INSERT 13 : 14 @ 13
+ import net.minecraft.event.ClickEvent;
> DELETE 8 @ 8 : 12
> DELETE 1 @ 1 : 3
> DELETE 1 @ 1 : 3
> INSERT 6 : 9 @ 6
+ import net.minecraft.util.ChatComponentTranslation;
+ import net.minecraft.util.ChatStyle;
+ import net.minecraft.util.EnumChatFormatting;
> INSERT 11 : 12 @ 11
+ import net.minecraft.util.StringTranslate;
> DELETE 6 @ 6 : 7
> DELETE 1 @ 1 : 19
> CHANGE 1 : 2 @ 1 : 2
~ public class Minecraft implements IThreadListener {
> CHANGE 2 : 3 @ 2 : 9
~ public static final boolean isRunningOnMac = false;
> DELETE 12 @ 12 : 14
> INSERT 11 : 12 @ 11
+ private boolean wasPaused;
> DELETE 8 @ 8 : 9
> DELETE 6 @ 6 : 8
> DELETE 1 @ 1 : 3
> CHANGE 10 : 11 @ 10 : 12
~ private EaglercraftNetworkManager myNetworkManager;
> DELETE 9 @ 9 : 11
> CHANGE 4 : 5 @ 4 : 7
~ private final List<FutureTask<?>> scheduledTasks = new LinkedList();
> INSERT 14 : 18 @ 14
+ public int joinWorldTickCounter = 0;
+ private int dontPauseTimer = 0;
+ public int bungeeOutdatedMsgTimer = 0;
+ private boolean isLANOpen = false;
> INSERT 1 : 9 @ 1
+ public SkullCommand eagskullCommand;
+
+ public GuiVoiceOverlay voiceOverlay;
+
+ public float startZoomValue = 18.0f;
+ public float adjustedZoomValue = 18.0f;
+ public boolean isZoomKey = false;
+
> CHANGE 2 : 3 @ 2 : 5
~ StringTranslate.initClient();
> CHANGE 1 : 2 @ 1 : 9
~ this.mcDefaultResourcePack = new DefaultResourcePack();
> CHANGE 1 : 2 @ 1 : 4
~ logger.info("Setting user: " + this.session.getProfile().getName());
> CHANGE 6 : 11 @ 6 : 10
~ String serverToJoin = EagRuntime.getConfiguration().getServerToJoin();
~ if (serverToJoin != null) {
~ ServerAddress addr = AddressResolver.resolveAddressFromURI(serverToJoin);
~ this.serverName = addr.getIP();
~ this.serverPort = addr.getPort();
> DELETE 2 @ 2 : 3
> CHANGE 15 : 17 @ 15 : 17
~ try {
~ while (true) {
> CHANGE 5 : 6 @ 5 : 12
~ this.runGameLoop();
> DELETE 4 @ 4 : 21
> CHANGE 1 : 14 @ 1 : 3
~ } catch (MinecraftError var12) {
~ // ??
~ } catch (ReportedException reportedexception) {
~ this.addGraphicsAndWorldToCrashReport(reportedexception.getCrashReport());
~ logger.fatal("Reported exception thrown!", reportedexception);
~ this.displayCrashReport(reportedexception.getCrashReport());
~ } catch (Throwable throwable1) {
~ CrashReport crashreport1 = this
~ .addGraphicsAndWorldToCrashReport(new CrashReport("Unexpected error", throwable1));
~ logger.fatal("Unreported exception thrown!", throwable1);
~ this.displayCrashReport(crashreport1);
~ } finally {
~ this.shutdownMinecraftApplet();
> CHANGE 4 : 6 @ 4 : 6
~ private void startGame() throws IOException {
~ this.gameSettings = new GameSettings(this);
> DELETE 1 @ 1 : 2
> CHANGE 5 : 6 @ 5 : 8
~ logger.info("EagRuntime Version: " + EagRuntime.getVersion());
> DELETE 1 @ 1 : 4
> CHANGE 1 : 3 @ 1 : 3
~ EaglerFolderResourcePack.deleteOldResourcePacks(EaglerFolderResourcePack.SERVER_RESOURCE_PACKS, 604800000L);
~ this.mcResourcePackRepository = new ResourcePackRepository(this.mcDefaultResourcePack, this.metadataSerializer_,
> DELETE 8 @ 8 : 11
> CHANGE 3 : 5 @ 3 : 5
~ this.fontRendererObj = new EaglerFontRenderer(this.gameSettings,
~ new ResourceLocation("textures/font/ascii.png"), this.renderEngine, false);
> CHANGE 5 : 6 @ 5 : 6
~ this.standardGalacticFontRenderer = new EaglerFontRenderer(this.gameSettings,
> INSERT 5 : 12 @ 5
+ this.mcResourceManager.registerReloadListener(new ShaderPackInfoReloadListener());
+ this.mcResourceManager.registerReloadListener(PBRTextureMapUtils.blockMaterialConstants);
+ this.mcResourceManager.registerReloadListener(new TemperaturesLUT());
+ this.mcResourceManager.registerReloadListener(new MetalsLUT());
+ this.mcResourceManager.registerReloadListener(new EmissiveItems());
+ this.mcResourceManager.registerReloadListener(new BlockVertexIDs());
+ this.mcResourceManager.registerReloadListener(new EaglerMeshLoader());
> CHANGE 3 : 4 @ 3 : 4
~ return HString.format(parString1, new Object[] { GameSettings
> CHANGE 10 : 11 @ 10 : 11
~ GlStateManager.clearDepth(1.0f);
> INSERT 10 : 11 @ 10
+ this.textureMapBlocks.setEnablePBREagler(gameSettings.shaders);
> INSERT 20 : 21 @ 20
+ SkinPreviewRenderer.initialize();
> INSERT 2 : 14 @ 2
+ this.eagskullCommand = new SkullCommand(this);
+ this.voiceOverlay = new GuiVoiceOverlay(this);
+ ScaledResolution voiceRes = new ScaledResolution(this);
+ this.voiceOverlay.setResolution(voiceRes.getScaledWidth(), voiceRes.getScaledHeight());
+
+ ServerList.initServerList(this);
+ EaglerProfile.read();
+
+ GuiScreen mainMenu = new GuiMainMenu();
+ if (isDemo()) {
+ mainMenu = new GuiScreenDemoIntegratedServerStartup(mainMenu);
+ }
> CHANGE 1 : 2 @ 1 : 4
~ mainMenu = new GuiConnecting(mainMenu, this, this.serverName, this.serverPort);
> INSERT 2 : 4 @ 2
+ this.displayGuiScreen(new GuiScreenEditProfile(mainMenu));
+
> DELETE 3 @ 3 : 15
> CHANGE 16 : 17 @ 16 : 24
~ throw new UnsupportedOperationException("wtf u trying to twitch stream in a browser game?");
> CHANGE 2 : 5 @ 2 : 24
~ private void createDisplay() {
~ Display.create();
~ Display.setTitle("Eaglercraft 1.8.8");
> DELETE 2 @ 2 : 39
> CHANGE 1 : 2 @ 1 : 11
~ return true;
> DELETE 2 @ 2 : 6
> DELETE 4 @ 4 : 21
> CHANGE 6 : 18 @ 6 : 19
~ String report = crashReportIn.getCompleteReport();
~ Bootstrap.printToSYSOUT(report);
~ PlatformRuntime.writeCrashReport(report);
~ if (PlatformRuntime.getPlatformType() == EnumPlatformType.JAVASCRIPT) {
~ System.err.println(
~ "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
~ System.err.println("NATIVE BROWSER EXCEPTION:");
~ if (!PlatformRuntime.printJSExceptionIfBrowser(crashReportIn.getCrashCause())) {
~ System.err.println("<undefined>");
~ }
~ System.err.println(
~ "%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%");
> DELETE 1 @ 1 : 2
> INSERT 7 : 9 @ 7
+ GlStateManager.recompileShaders();
+
> CHANGE 14 : 16 @ 14 : 15
~ logger.info("Caught error stitching, removing all assigned resourcepacks");
~ logger.info(runtimeexception);
> INSERT 9 : 12 @ 9
+ ShaderSource.clearCache();
+ GuiMainMenu.doResourceReloadHack();
+
> CHANGE 7 : 10 @ 7 : 19
~ private void updateDisplayMode() {
~ this.displayWidth = Display.getWidth();
~ this.displayHeight = Display.getHeight();
> CHANGE 2 : 6 @ 2 : 46
~ private void drawSplashScreen(TextureManager textureManagerInstance) {
~ Display.update();
~ updateDisplayMode();
~ GlStateManager.viewport(0, 0, displayWidth, displayHeight);
> DELETE 2 @ 2 : 5
> CHANGE 16 : 17 @ 16 : 17
~ new DynamicTexture(ImageData.loadImageFile(inputstream)));
> DELETE 24 @ 24 : 26
> DELETE 26 @ 26 : 30
> CHANGE 31 : 42 @ 31 : 32
~ public void shutdownIntegratedServer(GuiScreen cont) {
~ if (SingleplayerServerController.shutdownEaglercraftServer()
~ || SingleplayerServerController.getStatusState() == IntegratedServerState.WORLD_UNLOADING) {
~ displayGuiScreen(new GuiScreenIntegratedServerBusy(cont, "singleplayer.busy.stoppingIntegratedServer",
~ "singleplayer.failed.stoppingIntegratedServer", SingleplayerServerController::isReady));
~ } else {
~ displayGuiScreen(cont);
~ }
~ }
~
~ public void checkGLError(String message) {
> CHANGE 1 : 2 @ 1 : 2
~ int i = EaglercraftGPU.glGetError();
> CHANGE 1 : 2 @ 1 : 2
~ String s = EaglercraftGPU.gluErrorString(i);
> DELETE 10 @ 10 : 11
> INSERT 9 : 21 @ 9
+ if (SingleplayerServerController.isWorldRunning()) {
+ SingleplayerServerController.shutdownEaglercraftServer();
+ while (SingleplayerServerController.getStatusState() == IntegratedServerState.WORLD_UNLOADING) {
+ EagUtils.sleep(50l);
+ SingleplayerServerController.runTick();
+ }
+ }
+ if (SingleplayerServerController.isIntegratedServerWorkerAlive()
+ && SingleplayerServerController.canKillWorker()) {
+ SingleplayerServerController.killWorker();
+ EagUtils.sleep(50l);
+ }
> CHANGE 1 : 2 @ 1 : 2
~ EagRuntime.destroy();
> CHANGE 1 : 2 @ 1 : 2
~ EagRuntime.exit();
> DELETE 3 @ 3 : 5
> CHANGE 5 : 6 @ 5 : 6
~ if (Display.isCloseRequested()) {
> CHANGE 14 : 15 @ 14 : 15
~ Util.func_181617_a((FutureTask) this.scheduledTasks.remove(0), logger);
> CHANGE 7 : 18 @ 7 : 8
~ if (this.timer.elapsedTicks > 1) {
~ long watchdog = System.currentTimeMillis();
~ for (int j = 0; j < this.timer.elapsedTicks; ++j) {
~ this.runTick();
~ long millis = System.currentTimeMillis();
~ if (millis - watchdog > 50l) {
~ watchdog = millis;
~ EagUtils.sleep(0l);
~ }
~ }
~ } else if (this.timer.elapsedTicks == 1) {
> DELETE 10 @ 10 : 18
> CHANGE 1 : 4 @ 1 : 5
~ if (!Display.contextLost()) {
~ this.mcProfiler.startSection("EaglercraftGPU_optimize");
~ EaglercraftGPU.optimize();
> CHANGE 1 : 11 @ 1 : 2
~ _wglBindFramebuffer(0x8D40, null);
~ GlStateManager.viewport(0, 0, this.displayWidth, this.displayHeight);
~ GlStateManager.clearColor(0.0f, 0.0f, 0.0f, 1.0f);
~ GlStateManager.pushMatrix();
~ GlStateManager.clear(16640);
~ this.mcProfiler.startSection("display");
~ GlStateManager.enableTexture2D();
~ if (this.thePlayer != null && this.thePlayer.isEntityInsideOpaqueBlock()) {
~ this.gameSettings.thirdPersonView = 0;
~ }
> CHANGE 1 : 6 @ 1 : 5
~ this.mcProfiler.endSection();
~ if (!this.skipRenderWorld) {
~ this.mcProfiler.endStartSection("gameRenderer");
~ this.entityRenderer.func_181560_a(this.timer.renderPartialTicks, i);
~ this.mcProfiler.endSection();
> CHANGE 2 : 18 @ 2 : 7
~ this.mcProfiler.endSection();
~ if (this.gameSettings.showDebugInfo && this.gameSettings.showDebugProfilerChart
~ && !this.gameSettings.hideGUI) {
~ if (!this.mcProfiler.profilingEnabled) {
~ this.mcProfiler.clearProfiling();
~ }
~
~ this.mcProfiler.profilingEnabled = true;
~ this.displayDebugInfo(i1);
~ } else {
~ this.mcProfiler.profilingEnabled = false;
~ this.prevFrameTime = System.nanoTime();
~ }
~
~ this.guiAchievement.updateAchievementWindow();
~ GlStateManager.popMatrix();
> DELETE 2 @ 2 : 11
> DELETE 2 @ 2 : 10
> INSERT 1 : 2 @ 1
+
> DELETE 1 @ 1 : 3
> CHANGE 6 : 7 @ 6 : 7
~ this.debug = HString.format("%d fps (%d chunk update%s) T: %s%s%s%s",
> CHANGE 5 : 7 @ 5 : 9
~ this.gameSettings.fancyGraphics ? "" : " fast", this.gameSettings.clouds == 0 ? ""
~ : (this.gameSettings.clouds == 1 ? " fast-clouds" : " fancy-clouds") });
> DELETE 3 @ 3 : 7
> INSERT 8 : 9 @ 8
+ Mouse.tickCursorShape();
> INSERT 5 : 10 @ 5
+ if (Display.isVSyncSupported()) {
+ Display.setVSync(this.gameSettings.enableVsync);
+ } else {
+ this.gameSettings.enableVsync = false;
+ }
> DELETE 34 @ 34 : 52
> CHANGE 39 : 40 @ 39 : 40
~ EaglercraftGPU.glLineWidth(1.0F);
> CHANGE 9 : 10 @ 9 : 10
~ (double) ((float) j - (float) short1 * 0.6F - 16.0F), 0.0D).color(0, 0, 0, 100).endVertex();
> CHANGE 1 : 2 @ 1 : 2
~ .color(0, 0, 0, 100).endVertex();
> CHANGE 1 : 2 @ 1 : 2
~ .color(0, 0, 0, 100).endVertex();
> CHANGE 1 : 2 @ 1 : 2
~ (double) ((float) j - (float) short1 * 0.6F - 16.0F), 0.0D).color(0, 0, 0, 100).endVertex();
> DELETE 110 @ 110 : 114
> CHANGE 108 : 109 @ 108 : 148
~ Display.toggleFullscreen();
> INSERT 5 : 6 @ 5
+ ScaledResolution scaledresolution = new ScaledResolution(this);
> DELETE 1 @ 1 : 2
> DELETE 4 @ 4 : 6
> CHANGE 1 : 2 @ 1 : 7
~ this.voiceOverlay.setResolution(scaledresolution.getScaledWidth(), scaledresolution.getScaledHeight());
> INSERT 11 : 30 @ 11
+ RateLimitTracker.tick();
+
+ boolean isHostingLAN = LANServerController.isHostingLAN();
+ this.isGamePaused = !isHostingLAN && this.isSingleplayer() && this.theWorld != null && this.thePlayer != null
+ && this.currentScreen != null && this.currentScreen.doesGuiPauseGame();
+
+ if (isLANOpen && !isHostingLAN) {
+ ingameGUI.getChatGUI().printChatMessage(new ChatComponentTranslation("lanServer.relayDisconnected"));
+ }
+ isLANOpen = isHostingLAN;
+
+ if (wasPaused != isGamePaused) {
+ SingleplayerServerController.setPaused(this.isGamePaused);
+ wasPaused = isGamePaused;
+ }
+
+ SingleplayerServerController.runTick();
+ RelayUpdateChecker.runTick();
+
> INSERT 5 : 8 @ 5
+ this.mcProfiler.endStartSection("eaglerVoice");
+ VoiceClientController.tickVoiceClient(this);
+
> INSERT 10 : 11 @ 10
+ GlStateManager.viewport(0, 0, displayWidth, displayHeight); // to be safe
> INSERT 8 : 14 @ 8
+ if (this.currentScreen == null && this.dontPauseTimer <= 0) {
+ if (!Mouse.isMouseGrabbed()) {
+ this.setIngameNotInFocus();
+ this.displayInGameMenu();
+ }
+ }
> INSERT 7 : 12 @ 7
+ this.dontPauseTimer = 6;
+ } else {
+ if (this.dontPauseTimer > 0) {
+ --this.dontPauseTimer;
+ }
> CHANGE 10 : 11 @ 10 : 11
~ return Minecraft.this.currentScreen.getClass().getName();
> CHANGE 13 : 14 @ 13 : 14
~ return Minecraft.this.currentScreen.getClass().getName();
> CHANGE 25 : 28 @ 25 : 26
~ if (this.isZoomKey) {
~ this.adjustedZoomValue = MathHelper.clamp_float(adjustedZoomValue - j * 4.0f, 5.0f, 32.0f);
~ } else if (this.thePlayer.isSpectator()) {
> CHANGE 14 : 16 @ 14 : 15
~ if ((!this.inGameHasFocus || !Mouse.isActuallyGrabbed()) && Mouse.getEventButtonState()) {
~ this.inGameHasFocus = false;
> INSERT 16 : 19 @ 16
+ if (k == 0x1D && (areKeysLocked() || isFullScreen())) {
+ KeyBinding.setKeyBindState(gameSettings.keyBindSprint.getKeyCode(), Keyboard.getEventKeyState());
+ }
> CHANGE 19 : 27 @ 19 : 21
~ if (EaglerDeferredPipeline.instance != null) {
~ if (k == 62) {
~ DebugFramebufferView.toggleDebugView();
~ } else if (k == 0xCB || k == 0xC8) {
~ DebugFramebufferView.switchView(-1);
~ } else if (k == 0xCD || k == 0xD0) {
~ DebugFramebufferView.switchView(1);
~ }
> CHANGE 5 : 6 @ 5 : 6
~ if (k == 1 || (k > -1 && k == this.gameSettings.keyBindClose.getKeyCode())) {
> INSERT 11 : 18 @ 11
+ if (k == 19 && Keyboard.isKeyDown(61)) { // F3+R
+ if (gameSettings.shaders) {
+ ShaderSource.clearCache();
+ this.renderGlobal.loadRenderers();
+ }
+ }
+
> INSERT 30 : 31 @ 30
+ GlStateManager.recompileShaders();
> INSERT 71 : 77 @ 71
+ boolean zoomKey = this.gameSettings.keyBindZoomCamera.isKeyDown();
+ if (zoomKey != isZoomKey) {
+ adjustedZoomValue = startZoomValue;
+ isZoomKey = zoomKey;
+ }
+
> INSERT 92 : 93 @ 92
+ this.eagskullCommand.tick();
> INSERT 43 : 87 @ 43
+ if (this.theWorld != null) {
+ ++joinWorldTickCounter;
+ if (bungeeOutdatedMsgTimer > 0) {
+ if (--bungeeOutdatedMsgTimer == 0 && this.thePlayer.sendQueue != null) {
+ String pluginBrand = this.thePlayer.sendQueue.getNetworkManager().getPluginBrand();
+ String pluginVersion = this.thePlayer.sendQueue.getNetworkManager().getPluginVersion();
+ if (pluginBrand != null && pluginVersion != null
+ && EaglerXBungeeVersion.isUpdateToPluginAvailable(pluginBrand, pluginVersion)) {
+ String pfx = EnumChatFormatting.GOLD + "[EagX]" + EnumChatFormatting.AQUA;
+ ingameGUI.getChatGUI().printChatMessage(
+ new ChatComponentText(pfx + " ---------------------------------------"));
+ ingameGUI.getChatGUI().printChatMessage(
+ new ChatComponentText(pfx + " This server appears to be using version "
+ + EnumChatFormatting.YELLOW + pluginVersion));
+ ingameGUI.getChatGUI().printChatMessage(
+ new ChatComponentText(pfx + " of the EaglerXBungee plugin which is outdated"));
+ ingameGUI.getChatGUI().printChatMessage(new ChatComponentText(pfx));
+ ingameGUI.getChatGUI()
+ .printChatMessage(new ChatComponentText(pfx + " If you are the admin update to "
+ + EnumChatFormatting.YELLOW + EaglerXBungeeVersion.getPluginVersion()
+ + EnumChatFormatting.AQUA + " or newer"));
+ ingameGUI.getChatGUI().printChatMessage(new ChatComponentText(pfx));
+ ingameGUI.getChatGUI().printChatMessage((new ChatComponentText(pfx + " Click: "))
+ .appendSibling((new ChatComponentText("" + EnumChatFormatting.GREEN
+ + EnumChatFormatting.UNDERLINE + EaglerXBungeeVersion.getPluginButton()))
+ .setChatStyle((new ChatStyle()).setChatClickEvent(
+ new ClickEvent(ClickEvent.Action.EAGLER_PLUGIN_DOWNLOAD,
+ "plugin_download.zip")))));
+ ingameGUI.getChatGUI().printChatMessage(
+ new ChatComponentText(pfx + " ---------------------------------------"));
+ }
+ }
+ }
+ } else {
+ joinWorldTickCounter = 0;
+ if (currentScreen != null && currentScreen.shouldHangupIntegratedServer()) {
+ if (SingleplayerServerController.hangupEaglercraftServer()) {
+ this.displayGuiScreen(new GuiScreenIntegratedServerBusy(currentScreen,
+ "singleplayer.busy.stoppingIntegratedServer",
+ "singleplayer.failed.stoppingIntegratedServer", SingleplayerServerController::isReady));
+ }
+ }
+ }
+
> CHANGE 6 : 17 @ 6 : 54
~ Minecraft.getMinecraft().getRenderManager().setEnableFNAWSkins(this.gameSettings.enableFNAWSkins);
~ session.reset();
~ SingleplayerServerController.launchEaglercraftServer(folderName, gameSettings.difficulty.getDifficultyId(),
~ Math.max(gameSettings.renderDistanceChunks, 2), worldSettingsIn);
~ this.displayGuiScreen(new GuiScreenIntegratedServerBusy(
~ new GuiScreenSingleplayerConnecting(new GuiMainMenu(), "Connecting to " + folderName),
~ "singleplayer.busy.startingIntegratedServer", "singleplayer.failed.startingIntegratedServer",
~ () -> SingleplayerServerController.isWorldReady(), (t, u) -> {
~ Minecraft.this.displayGuiScreen(GuiScreenIntegratedServerBusy.createException(new GuiMainMenu(),
~ ((GuiScreenIntegratedServerBusy) t).failMessage, u));
~ }));
> INSERT 12 : 13 @ 12
+ session.reset();
> DELETE 1 @ 1 : 7
> DELETE 40 @ 40 : 41
> CHANGE 20 : 21 @ 20 : 22
~ this.thePlayer = this.playerController.func_178892_a(this.theWorld, new StatFileWriter());
> CHANGE 18 : 19 @ 18 : 19
~ return EagRuntime.getConfiguration().isDemo();
> CHANGE 15 : 19 @ 15 : 16
~ if (theMinecraft == null)
~ return false;
~ GameSettings g = theMinecraft.gameSettings;
~ return g.ambientOcclusion != 0 && !g.shadersAODisable;
> CHANGE 130 : 131 @ 130 : 131
~ return EagRuntime.getVersion();
> CHANGE 4 : 6 @ 4 : 5
~ return EaglercraftGPU.glGetString(7937) + " GL version " + EaglercraftGPU.glGetString(7938) + ", "
~ + EaglercraftGPU.glGetString(7936);
> DELETE 2 @ 2 : 12
> CHANGE 2 : 3 @ 2 : 6
~ return "Definitely Not; You're an eagler";
> DELETE 36 @ 36 : 41
> CHANGE 12 : 13 @ 12 : 13
~ return this.addScheduledTaskFuture(new Runnable() {
> INSERT 1 : 3 @ 1
+ Minecraft.this.loadingScreen.eaglerShow(I18n.format("resourcePack.load.refreshing"),
+ I18n.format("resourcePack.load.pleaseWait"));
> DELETE 5 @ 5 : 32
> CHANGE 1 : 2 @ 1 : 6
~ return this.currentServerData != null ? "multiplayer" : "out_of_game";
> DELETE 2 @ 2 : 219
> CHANGE 13 : 14 @ 13 : 14
~ return SingleplayerServerController.isWorldRunning();
> CHANGE 3 : 4 @ 3 : 4
~ return SingleplayerServerController.isWorldRunning();
> DELETE 2 @ 2 : 6
> DELETE 1 @ 1 : 6
> DELETE 1 @ 1 : 2
> DELETE 2 @ 2 : 6
> CHANGE 1 : 2 @ 1 : 2
~ return System.currentTimeMillis();
> CHANGE 3 : 4 @ 3 : 4
~ return Display.isFullscreen();
> DELETE 6 @ 6 : 23
> DELETE 44 @ 44 : 48
> CHANGE 6 : 8 @ 6 : 46
~ if (i == this.gameSettings.keyBindScreenshot.getKeyCode()) {
~ this.ingameGUI.getChatGUI().printChatMessage(ScreenShotHelper.saveScreenshot());
> DELETE 1 @ 1 : 3
> DELETE 1 @ 1 : 2
> DELETE 4 @ 4 : 12
> CHANGE 9 : 10 @ 9 : 10
~ public <V> ListenableFuture<V> addScheduledTaskFuture(Callable<V> callableToSchedule) {
> CHANGE 1 : 5 @ 1 : 13
~ ListenableFutureTask listenablefuturetask = ListenableFutureTask.create(callableToSchedule);
~ synchronized (this.scheduledTasks) {
~ this.scheduledTasks.add(listenablefuturetask);
~ return listenablefuturetask;
> CHANGE 3 : 4 @ 3 : 4
~ public ListenableFuture<Object> addScheduledTaskFuture(Runnable runnableToSchedule) {
> CHANGE 1 : 2 @ 1 : 2
~ return this.addScheduledTaskFuture(Executors.callable(runnableToSchedule));
> CHANGE 2 : 4 @ 2 : 4
~ public void addScheduledTask(Runnable runnableToSchedule) {
~ this.addScheduledTaskFuture(Executors.callable(runnableToSchedule));
> DELETE 26 @ 26 : 34
> INSERT 7 : 35 @ 7
+
+ public static int getGLMaximumTextureSize() {
+ return EaglercraftGPU.glGetInteger(GL_MAX_TEXTURE_SIZE);
+ }
+
+ public boolean areKeysLocked() {
+ return PlatformInput.lockKeys;
+ }
+
+ public ModelManager getModelManager() {
+ return modelManager;
+ }
+
+ public ISaveFormat getSaveLoader() {
+ return SingleplayerServerController.instance;
+ }
+
+ public void clearTitles() {
+ ingameGUI.displayTitle(null, null, -1, -1, -1);
+ }
+
+ public boolean getEnableFNAWSkins() {
+ boolean ret = this.gameSettings.enableFNAWSkins;
+ if (this.thePlayer != null) {
+ ret &= this.thePlayer.sendQueue.currentFNAWSkinAllowedState;
+ }
+ return ret;
+ }
> EOF
@@ -0,0 +1,10 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 4
> EOF
@@ -0,0 +1,10 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 3
> EOF
@@ -0,0 +1,10 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 4
> EOF
@@ -0,0 +1,10 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 3
> EOF
@@ -0,0 +1,10 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 4
> EOF
@@ -0,0 +1,19 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 4 @ 2 : 3
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
~
> DELETE 1 @ 1 : 3
> CHANGE 5 : 6 @ 5 : 6
~ private final EaglercraftRandom rand = new EaglercraftRandom();
> EOF
@@ -0,0 +1,10 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 3
> EOF
@@ -0,0 +1,10 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 4
> EOF
@@ -0,0 +1,30 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 3
> INSERT 2 : 4 @ 2
+ import com.google.common.collect.Maps;
+
> CHANGE 2 : 3 @ 2 : 3
~ MOBS("hostile", 5), ANIMALS("neutral", 6), PLAYERS("player", 7), AMBIENT("ambient", 8), VOICE("voice", 9);
> INSERT 1 : 3 @ 1
+ public static final SoundCategory[] _VALUES = values();
+
> CHANGE 23 : 26 @ 23 : 24
~ SoundCategory[] categories = _VALUES;
~ for (int i = 0; i < categories.length; ++i) {
~ SoundCategory soundcategory = categories[i];
> EOF
@@ -0,0 +1,10 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 5
> EOF
@@ -0,0 +1,31 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 3
> CHANGE 1 : 5 @ 1 : 6
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
~
~ import com.google.common.collect.Lists;
~
> CHANGE 4 : 5 @ 4 : 5
~ private final EaglercraftRandom rnd = new EaglercraftRandom();
> CHANGE 16 : 18 @ 16 : 18
~ for (int j = 0, l = this.soundPool.size(); j < l; ++j) {
~ i += this.soundPool.get(j).getWeight();
> CHANGE 10 : 12 @ 10 : 11
~ for (int k = 0, l = this.soundPool.size(); k < l; ++k) {
~ ISoundEventAccessor isoundeventaccessor = this.soundPool.get(k);
> EOF
@@ -0,0 +1,100 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 5
> CHANGE 3 : 4 @ 3 : 6
~ import java.nio.charset.StandardCharsets;
> DELETE 2 @ 2 : 3
> CHANGE 1 : 13 @ 1 : 11
~ import java.util.Set;
~
~ import net.lax1dude.eaglercraft.v1_8.internal.PlatformAudio;
~
~ import com.google.common.collect.Lists;
~
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftSoundManager;
~ import net.lax1dude.eaglercraft.v1_8.IOUtils;
~ import net.lax1dude.eaglercraft.v1_8.ThreadLocalRandom;
~ import net.lax1dude.eaglercraft.v1_8.json.JSONTypeProvider;
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
> DELETE 7 @ 7 : 11
> CHANGE 3 : 4 @ 3 : 18
~ private static final Logger tipLogger = LogManager.getLogger("EaglercraftX");
> CHANGE 3 : 4 @ 3 : 4
~ private final EaglercraftSoundManager sndManager;
> CHANGE 4 : 5 @ 4 : 5
~ this.sndManager = new EaglercraftSoundManager(gameSettingsIn, this);
> CHANGE 12 : 13 @ 12 : 13
~ for (Entry entry : (Set<Entry>) map.entrySet()) {
> INSERT 12 : 16 @ 12
+ if (this.sndRegistry.getObject(new ResourceLocation("minecraft:sounds/music/game/calm1.ogg")) == null) {
+ tipLogger.info(
+ "Download this resource pack if you want music: https://bafybeiayojww5jfyzvlmtuk7l5ufkt7nlfto7mhwmzf2vs4bvsjd5ouiuq.ipfs.nftstorage.link/?filename=Music_For_Eaglercraft.zip");
+ }
> INSERT 2 : 12 @ 2
+ public static class SoundMap {
+
+ protected final Map<String, SoundList> soundMap;
+
+ public SoundMap(Map<String, SoundList> soundMap) {
+ this.soundMap = soundMap;
+ }
+
+ }
+
> CHANGE 1 : 2 @ 1 : 2
~ Map<String, SoundList> map = null;
> CHANGE 1 : 5 @ 1 : 2
~ map = JSONTypeProvider.deserialize(IOUtils.inputStreamToString(stream, StandardCharsets.UTF_8),
~ SoundMap.class).soundMap;
~ } catch (IOException e) {
~ throw new RuntimeException("Exception caught reading JSON", e);
> INSERT 122 : 126 @ 122
+ if (category == SoundCategory.VOICE) {
+ PlatformAudio.setMicVol(volume);
+ }
+
> CHANGE 13 : 19 @ 13 : 15
~ SoundCategory cat = soundeventaccessorcomposite.getSoundCategory();
~ for (int i = 0; i < categories.length; ++i) {
~ if (cat == categories[i]) {
~ arraylist.add(soundeventaccessorcomposite);
~ break;
~ }
> CHANGE 6 : 7 @ 6 : 7
~ return (SoundEventAccessorComposite) arraylist.get(ThreadLocalRandom.current().nextInt(arraylist.size()));
> EOF
@@ -0,0 +1,24 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 3
> DELETE 1 @ 1 : 2
> INSERT 1 : 3 @ 1
+ import com.google.common.collect.Lists;
+
> CHANGE 91 : 95 @ 91 : 94
~ SoundList.SoundEntry.Type[] types = values();
~ for (int i = 0; i < types.length; ++i) {
~ if (types[i].field_148583_c.equals(parString1)) {
~ return types[i];
> EOF
@@ -0,0 +1,68 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 12
> INSERT 1 : 4 @ 1
+ import org.json.JSONArray;
+ import org.json.JSONException;
+ import org.json.JSONObject;
> CHANGE 1 : 5 @ 1 : 5
~ import net.lax1dude.eaglercraft.v1_8.json.JSONTypeDeserializer;
~
~ public class SoundListSerializer implements JSONTypeDeserializer<JSONObject, SoundList> {
~ public SoundList deserialize(JSONObject jsonobject) throws JSONException {
> CHANGE 1 : 2 @ 1 : 2
~ soundlist.setReplaceExisting(jsonobject.optBoolean("replace", false));
> CHANGE 1 : 2 @ 1 : 2
~ .getCategory(jsonobject.optString("category", SoundCategory.MASTER.getCategoryName()));
> CHANGE 3 : 4 @ 3 : 4
~ JSONArray jsonarray = jsonobject.getJSONArray("sounds");
> CHANGE 1 : 3 @ 1 : 3
~ for (int i = 0; i < jsonarray.length(); ++i) {
~ Object jsonelement = jsonarray.get(i);
> CHANGE 1 : 6 @ 1 : 6
~ if (jsonelement instanceof String) {
~ soundlist$soundentry.setSoundEntryName((String) jsonelement);
~ } else if (jsonelement instanceof JSONObject) {
~ JSONObject jsonobject1 = (JSONObject) jsonelement;
~ soundlist$soundentry.setSoundEntryName(jsonobject1.getString("name"));
> CHANGE 2 : 3 @ 2 : 3
~ .getType(jsonobject1.getString("type"));
> CHANGE 5 : 6 @ 5 : 6
~ float f = jsonobject1.getFloat("volume");
> CHANGE 5 : 6 @ 5 : 6
~ float f1 = jsonobject1.getFloat("pitch");
> CHANGE 5 : 6 @ 5 : 6
~ int j = jsonobject1.getInt("weight");
> CHANGE 5 : 6 @ 5 : 6
~ soundlist$soundentry.setStreaming(jsonobject1.getBoolean("stream"));
> EOF
@@ -0,0 +1,16 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 3
> CHANGE 1 : 4 @ 1 : 2
~
~ import com.google.common.collect.Maps;
~
> EOF
@@ -0,0 +1,38 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 4 @ 2 : 4
~ import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile;
~ import net.lax1dude.eaglercraft.v1_8.profile.SkinModel;
> DELETE 2 @ 2 : 6
> DELETE 6 @ 6 : 7
> INSERT 6 : 14 @ 6
+ public long eaglerHighPolyAnimationTick = System.currentTimeMillis();
+ public float eaglerHighPolyAnimationFloat1 = 0.0f;
+ public float eaglerHighPolyAnimationFloat2 = 0.0f;
+ public float eaglerHighPolyAnimationFloat3 = 0.0f;
+ public float eaglerHighPolyAnimationFloat4 = 0.0f;
+ public float eaglerHighPolyAnimationFloat5 = 0.0f;
+ public float eaglerHighPolyAnimationFloat6 = 0.0f;
+
> DELETE 38 @ 38 : 56
> INSERT 6 : 11 @ 6
+ public SkinModel getEaglerSkinModel() {
+ NetworkPlayerInfo networkplayerinfo = this.getPlayerInfo();
+ return networkplayerinfo == null ? SkinModel.STEVE : networkplayerinfo.getEaglerSkinModel();
+ }
+
> EOF
@@ -0,0 +1,14 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 3 @ 2 : 3
~ import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile;
> DELETE 1 @ 1 : 2
> EOF
@@ -0,0 +1,41 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 2 : 4 @ 2
+ import net.lax1dude.eaglercraft.v1_8.sp.lan.LANClientNetworkManager;
+ import net.lax1dude.eaglercraft.v1_8.sp.socket.ClientIntegratedServerNetworkManager;
> DELETE 3 @ 3 : 4
> DELETE 51 @ 51 : 52
> INSERT 22 : 23 @ 22
+ private StatFileWriter statWriter;
> CHANGE 1 : 2 @ 1 : 2
~ public EntityPlayerSP(Minecraft mcIn, World worldIn, NetHandlerPlayClient netHandler, StatFileWriter statWriter) {
> DELETE 2 @ 2 : 3
> INSERT 2 : 3 @ 2
+ this.statWriter = statWriter;
> CHANGE 116 : 123 @ 116 : 117
~ if (((sendQueue.getNetworkManager() instanceof ClientIntegratedServerNetworkManager)
~ || (sendQueue.getNetworkManager() instanceof LANClientNetworkManager))
~ && message.startsWith("/eagskull")) {
~ this.mc.eagskullCommand.openFileChooser();
~ } else {
~ this.sendQueue.addToSendQueue(new C01PacketChatMessage(message));
~ }
> EOF
@@ -0,0 +1,183 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 6
> CHANGE 4 : 11 @ 4 : 6
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
~
~ import net.lax1dude.eaglercraft.v1_8.HString;
~ import net.lax1dude.eaglercraft.v1_8.IOUtils;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
~ import net.lax1dude.eaglercraft.v1_8.opengl.ImageData;
~ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
> DELETE 1 @ 1 : 2
> DELETE 1 @ 1 : 2
> DELETE 7 @ 7 : 9
> CHANGE 2 : 4 @ 2 : 4
~ protected static final ResourceLocation[] unicodePageLocations = new ResourceLocation[256];
~ protected int[] charWidth = new int[256];
> CHANGE 1 : 20 @ 1 : 20
~ public EaglercraftRandom fontRandom = new EaglercraftRandom();
~ protected byte[] glyphWidth = new byte[65536];
~ protected int[] colorCode = new int[32];
~ protected final ResourceLocation locationFontTexture;
~ protected final TextureManager renderEngine;
~ protected float posX;
~ protected float posY;
~ protected boolean unicodeFlag;
~ protected boolean bidiFlag;
~ protected float red;
~ protected float blue;
~ protected float green;
~ protected float alpha;
~ protected int textColor;
~ protected boolean randomStyle;
~ protected boolean boldStyle;
~ protected boolean italicStyle;
~ protected boolean underlineStyle;
~ protected boolean strikethroughStyle;
> CHANGE 43 : 44 @ 43 : 44
~ ImageData bufferedimage;
> CHANGE 7 : 10 @ 7 : 11
~ int i = bufferedimage.width;
~ int j = bufferedimage.height;
~ int[] aint = bufferedimage.pixels;
> CHANGE 68 : 87 @ 68 : 78
~ Tessellator tessellator = Tessellator.getInstance();
~ WorldRenderer worldrenderer = tessellator.getWorldRenderer();
~
~ worldrenderer.begin(Tessellator.GL_TRIANGLE_STRIP, DefaultVertexFormats.POSITION_TEX);
~
~ worldrenderer.pos(this.posX + (float) k, this.posY, 0.0F).tex((float) i / 128.0F, (float) j / 128.0F)
~ .endVertex();
~
~ worldrenderer.pos(this.posX - (float) k, this.posY + 7.99F, 0.0F)
~ .tex((float) i / 128.0F, ((float) j + 7.99F) / 128.0F).endVertex();
~
~ worldrenderer.pos(this.posX + f - 1.0F + (float) k, this.posY, 0.0F)
~ .tex(((float) i + f - 1.0F) / 128.0F, (float) j / 128.0F).endVertex();
~
~ worldrenderer.pos(this.posX + f - 1.0F - (float) k, this.posY + 7.99F, 0.0F)
~ .tex(((float) i + f - 1.0F) / 128.0F, ((float) j + 7.99F) / 128.0F).endVertex();
~
~ tessellator.draw();
~
> CHANGE 6 : 7 @ 6 : 7
~ HString.format("textures/font/unicode_page_%02x.png", new Object[] { Integer.valueOf(parInt1) }));
> CHANGE 23 : 41 @ 23 : 33
~ Tessellator tessellator = Tessellator.getInstance();
~ WorldRenderer worldrenderer = tessellator.getWorldRenderer();
~
~ worldrenderer.begin(Tessellator.GL_TRIANGLE_STRIP, DefaultVertexFormats.POSITION_TEX);
~
~ worldrenderer.pos(this.posX + f5, this.posY, 0.0F).tex(f2 / 256.0F, f3 / 256.0F).endVertex();
~
~ worldrenderer.pos(this.posX - f5, this.posY + 7.99F, 0.0F).tex(f2 / 256.0F, (f3 + 15.98F) / 256.0F)
~ .endVertex();
~
~ worldrenderer.pos(this.posX + f4 / 2.0F + f5, this.posY, 0.0F).tex((f2 + f4) / 256.0F, f3 / 256.0F)
~ .endVertex();
~
~ worldrenderer.pos(this.posX + f4 / 2.0F - f5, this.posY + 7.99F, 0.0F)
~ .tex((f2 + f4) / 256.0F, (f3 + 15.98F) / 256.0F).endVertex();
~
~ tessellator.draw();
~
> CHANGE 27 : 35 @ 27 : 34
~ // try {
~ // Bidi bidi = new Bidi((new ArabicShaping(8)).shape(parString1), 127);
~ // bidi.setReorderingMode(0);
~ // return bidi.writeReordered(2);
~ // } catch (ArabicShapingException var3) {
~ // return parString1;
~ // }
~ return parString1;
> CHANGE 2 : 3 @ 2 : 3
~ protected void resetStyles() {
> CHANGE 7 : 8 @ 7 : 8
~ protected void renderStringAtPos(String parString1, boolean parFlag) {
> CHANGE 3 : 4 @ 3 : 4
~ int i1 = "0123456789abcdefklmnor".indexOf(Character.toLowerCase(parString1.charAt(i + 1)));
> CHANGE 133 : 134 @ 133 : 134
~ private int renderStringAligned(String text, int x, int y, int wrapWidth, int color, boolean parFlag) {
> CHANGE 2 : 3 @ 2 : 3
~ x = x + wrapWidth - i;
> CHANGE 2 : 3 @ 2 : 3
~ return this.renderString(text, (float) x, (float) y, color, parFlag);
> CHANGE 4 : 6 @ 4 : 5
~ this.posX = x;
~ this.posY = y;
> DELETE 21 @ 21 : 22
> INSERT 1 : 2 @ 1
+ return (int) this.posX;
> INSERT 119 : 122 @ 119
+ if ((textColor & -67108864) == 0) {
+ textColor |= -16777216;
+ }
> CHANGE 6 : 9 @ 6 : 8
~ List<String> lst = this.listFormattedStringToWidth(str, wrapWidth);
~ for (int i = 0, l = lst.size(); i < l; ++i) {
~ this.renderStringAligned(lst.get(i), x, y, wrapWidth, this.textColor, addShadow);
> CHANGE 22 : 23 @ 22 : 23
~ return Arrays.asList(this.wrapFormattedStringToWidth(str, wrapWidth, 0).split("\n"));
> CHANGE 2 : 6 @ 2 : 3
~ String wrapFormattedStringToWidth(String str, int wrapWidth, int depthCheck) { // TODO: fix recursive
~ if (depthCheck > 20) {
~ return str;
~ }
> CHANGE 8 : 9 @ 8 : 9
~ return s + "\n" + this.wrapFormattedStringToWidth(s1, wrapWidth, ++depthCheck);
> EOF
@@ -0,0 +1,20 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 5 @ 2 : 4
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
~ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
> DELETE 1 @ 1 : 3
> CHANGE 135 : 136 @ 135 : 136
~ public void drawTexturedModalRect(int xCoord, int yCoord, EaglerTextureAtlasSprite textureSprite, int widthIn,
> EOF
@@ -0,0 +1,49 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 2 : 5 @ 2
+ import net.lax1dude.eaglercraft.v1_8.Mouse;
+ import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType;
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 3 @ 3 : 6
> CHANGE 4 : 6 @ 4 : 6
~ public int width;
~ public int height;
> INSERT 7 : 8 @ 7
+ public float fontScale = 1.0f;
> INSERT 36 : 39 @ 36
+ if (this.enabled && this.hovered) {
+ Mouse.showCursor(EnumCursorType.HAND);
+ }
> CHANGE 15 : 30 @ 15 : 17
~ if (fontScale == 1.0f) {
~ this.drawCenteredString(fontrenderer, this.displayString, this.xPosition + this.width / 2,
~ this.yPosition + (this.height - 8) / 2, j);
~ } else {
~ float xScale = fontScale;
~ float yScale = 1.0f + (fontScale - 1.0f) * 0.7f;
~ float strWidth = fontrenderer.getStringWidth(displayString) / xScale;
~ GlStateManager.pushMatrix();
~ GlStateManager.translate(this.xPosition + this.width / 2,
~ this.yPosition + (this.height - 8 * yScale) / 2, 1.0f);
~ GlStateManager.scale(xScale, yScale, 1.0f);
~ GlStateManager.translate(-strWidth * 0.5f * xScale, 0.0f, 0.0f);
~ fontrenderer.drawStringWithShadow(displayString, 0, 0, j);
~ GlStateManager.popMatrix();
~ }
> EOF
@@ -0,0 +1,20 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 2 : 5 @ 2
+ import net.lax1dude.eaglercraft.v1_8.Mouse;
+ import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType;
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 1 @ 1 : 3
> INSERT 15 : 16 @ 15
+ Mouse.showCursor(EnumCursorType.HAND);
> EOF
@@ -0,0 +1,127 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 3
> CHANGE 2 : 13 @ 2 : 4
~
~ import org.apache.commons.lang3.StringUtils;
~
~ import com.google.common.collect.Lists;
~
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
~ import net.lax1dude.eaglercraft.v1_8.Mouse;
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
~ import net.minecraft.client.resources.I18n;
> DELETE 6 @ 6 : 11
> INSERT 12 : 14 @ 12
+ private GuiButton exitButton;
+
> INSERT 9 : 12 @ 9
+ if (!(this instanceof GuiSleepMP)) {
+ this.buttonList.add(exitButton = new GuiButton(69, this.width - 100, 3, 97, 20, I18n.format("chat.exit")));
+ }
> CHANGE 18 : 20 @ 18 : 27
~ protected void keyTyped(char parChar1, int parInt1) {
~ if (parInt1 == 1 && (this.mc.gameSettings.keyBindClose.getKeyCode() == 0 || this.mc.areKeysLocked())) {
> CHANGE 1 : 5 @ 1 : 10
~ } else {
~ this.waitingOnAutocomplete = false;
~ if (parInt1 == 15) {
~ this.autocompletePlayerNames();
> CHANGE 1 : 2 @ 1 : 2
~ this.playerNamesFound = false;
> DELETE 1 @ 1 : 6
> CHANGE 1 : 21 @ 1 : 2
~ if (parInt1 != 28 && parInt1 != 156) {
~ if (parInt1 == 200) {
~ this.getSentHistory(-1);
~ } else if (parInt1 == 208) {
~ this.getSentHistory(1);
~ } else if (parInt1 == 201) {
~ this.mc.ingameGUI.getChatGUI().scroll(this.mc.ingameGUI.getChatGUI().getLineCount() - 1);
~ } else if (parInt1 == 209) {
~ this.mc.ingameGUI.getChatGUI().scroll(-this.mc.ingameGUI.getChatGUI().getLineCount() + 1);
~ } else {
~ this.inputField.textboxKeyTyped(parChar1, parInt1);
~ }
~ } else {
~ String s = this.inputField.getText().trim();
~ if (s.length() > 0) {
~ this.sendChatMessage(s);
~ }
~
~ this.mc.displayGuiScreen((GuiScreen) null);
~ }
> CHANGE 25 : 26 @ 25 : 26
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
> INSERT 11 : 17 @ 11
+ protected void actionPerformed(GuiButton par1GuiButton) {
+ if (par1GuiButton.id == 69) {
+ this.mc.displayGuiScreen(null);
+ }
+ }
+
> CHANGE 32 : 34 @ 32 : 33
~ int l = this.foundPlayerNames.size();
~ if (l > 1) {
> CHANGE 2 : 3 @ 2 : 3
~ for (int i = 0; i < l; ++i) {
> CHANGE 4 : 5 @ 4 : 5
~ stringbuilder.append(this.foundPlayerNames.get(i));
> INSERT 44 : 45 @ 44
+ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
> INSERT 5 : 9 @ 5
+ if (exitButton != null) {
+ exitButton.yPosition = 3 + mc.guiAchievement.getHeight();
+ }
+
> CHANGE 8 : 10 @ 8 : 9
~ for (int i = 0; i < parArrayOfString.length; ++i) {
~ String s = parArrayOfString[i];
> INSERT 24 : 28 @ 24
+
+ public boolean blockPTTKey() {
+ return true;
+ }
> EOF
@@ -0,0 +1,36 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 6 @ 2 : 7
~ import net.lax1dude.eaglercraft.v1_8.netty.Unpooled;
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
> DELETE 5 @ 5 : 8
> CHANGE 44 : 45 @ 44 : 45
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 24 : 25 @ 24 : 25
~ protected void keyTyped(char parChar1, int parInt1) {
> CHANGE 13 : 14 @ 13 : 14
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
> INSERT 46 : 50 @ 46
+
+ public boolean blockPTTKey() {
+ return commandTextField.isFocused();
+ }
> EOF
@@ -0,0 +1,14 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 6
> CHANGE 30 : 31 @ 30 : 31
~ protected void actionPerformed(GuiButton parGuiButton) {
> EOF
@@ -0,0 +1,38 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 3 : 4 @ 3
+
> DELETE 1 @ 1 : 6
> CHANGE 49 : 50 @ 49 : 50
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 3 : 6 @ 3 : 5
~ KeyBinding[] arr = this.mc.gameSettings.keyBindings;
~ for (int i = 0; i < arr.length; ++i) {
~ arr[i].setKeyCode(arr[i].getKeyCodeDefault());
> CHANGE 11 : 12 @ 11 : 12
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
> CHANGE 17 : 18 @ 17 : 18
~ protected void keyTyped(char parChar1, int parInt1) {
> CHANGE 24 : 27 @ 24 : 26
~ KeyBinding[] arr = this.options.keyBindings;
~ for (int k = 0; k < arr.length; ++k) {
~ if (arr[k].getKeyCode() != arr[k].getKeyCodeDefault()) {
> EOF
@@ -0,0 +1,22 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 3 : 6 @ 3
+
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
+ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
> DELETE 2 @ 2 : 9
> DELETE 2 @ 2 : 3
> CHANGE 61 : 62 @ 61 : 62
~ protected void actionPerformed(GuiButton parGuiButton) {
> EOF
@@ -0,0 +1,45 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 3
> CHANGE 1 : 3 @ 1 : 6
~
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
> DELETE 7 @ 7 : 8
> CHANGE 82 : 84 @ 82 : 84
~ for (int i = 0; i < ChatAllowedCharacters.allowedCharactersArray.length; ++i) {
~ this.field_146336_i = this.field_146336_i.replace(ChatAllowedCharacters.allowedCharactersArray[i], '_');
> CHANGE 48 : 50 @ 48 : 50
~ for (int i = 0; i < disallowedFilenames.length; ++i) {
~ if (parString1.equalsIgnoreCase(disallowedFilenames[i])) {
> CHANGE 15 : 16 @ 15 : 16
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 165 : 166 @ 165 : 166
~ protected void keyTyped(char parChar1, int parInt1) {
> CHANGE 16 : 17 @ 16 : 17
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
> CHANGE 16 : 19 @ 16 : 18
~ this.drawString(this.fontRendererObj, I18n.format(
~ StringUtils.isNotEmpty(field_146335_h.text) ? "createWorld.seedNote" : "selectWorld.seedInfo",
~ new Object[0]), this.width / 2 - 100, 85, -6250336);
> EOF
@@ -0,0 +1,48 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 5
> INSERT 7 : 9 @ 7
+ private GuiButton enableFNAWSkinsButton;
+
> CHANGE 8 : 11 @ 8 : 9
~ EnumPlayerModelParts[] parts = EnumPlayerModelParts._VALUES;
~ for (int k = 0; k < parts.length; ++k) {
~ EnumPlayerModelParts enumplayermodelparts = parts[k];
> CHANGE 10 : 14 @ 10 : 11
~ this.buttonList.add(enableFNAWSkinsButton = new GuiButton(201, this.width / 2 - 100,
~ this.height / 6 + 10 + 24 * (i >> 1), I18n.format("options.skinCustomisation.enableFNAWSkins") + ": "
~ + I18n.format(mc.gameSettings.enableFNAWSkins ? "options.on" : "options.off")));
~ this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 40 + 24 * (i >> 1),
> CHANGE 3 : 4 @ 3 : 4
~ protected void actionPerformed(GuiButton parGuiButton) {
> INSERT 4 : 9 @ 4
+ } else if (parGuiButton.id == 201) {
+ mc.gameSettings.enableFNAWSkins = !mc.gameSettings.enableFNAWSkins;
+ mc.getRenderManager().setEnableFNAWSkins(mc.getEnableFNAWSkins());
+ enableFNAWSkinsButton.displayString = I18n.format("options.skinCustomisation.enableFNAWSkins") + ": "
+ + I18n.format(mc.gameSettings.enableFNAWSkins ? "options.on" : "options.off");
> CHANGE 23 : 28 @ 23 : 24
~ /*
~ * TODO: I changed this to getUnformattedText() from getFormattedText() because
~ * the latter was returning a pink formatting code at the end for no reason
~ */
~ return playerModelParts.func_179326_d().getUnformattedText() + ": " + s;
> EOF
@@ -0,0 +1,109 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 6 : 10 @ 6 : 16
~
~ import net.lax1dude.eaglercraft.v1_8.HString;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
~ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
> DELETE 1 @ 1 : 2
> CHANGE 347 : 348 @ 347 : 348
~ HString.format("%5.3f", new Object[] { Float.valueOf(this.field_175336_F.mainNoiseScaleX) }),
> CHANGE 4 : 5 @ 4 : 5
~ HString.format("%5.3f", new Object[] { Float.valueOf(this.field_175336_F.mainNoiseScaleY) }),
> CHANGE 4 : 5 @ 4 : 5
~ HString.format("%5.3f", new Object[] { Float.valueOf(this.field_175336_F.mainNoiseScaleZ) }),
> CHANGE 4 : 5 @ 4 : 5
~ HString.format("%5.3f", new Object[] { Float.valueOf(this.field_175336_F.depthNoiseScaleX) }),
> CHANGE 4 : 5 @ 4 : 5
~ HString.format("%5.3f", new Object[] { Float.valueOf(this.field_175336_F.depthNoiseScaleZ) }),
> CHANGE 5 : 6 @ 5 : 6
~ HString.format("%2.3f",
> CHANGE 5 : 6 @ 5 : 6
~ HString.format("%2.3f", new Object[] { Float.valueOf(this.field_175336_F.baseSize) }), false,
> CHANGE 4 : 5 @ 4 : 5
~ HString.format("%5.3f", new Object[] { Float.valueOf(this.field_175336_F.coordinateScale) }),
> CHANGE 4 : 5 @ 4 : 5
~ HString.format("%5.3f", new Object[] { Float.valueOf(this.field_175336_F.heightScale) }), false,
> CHANGE 4 : 5 @ 4 : 5
~ HString.format("%2.3f", new Object[] { Float.valueOf(this.field_175336_F.stretchY) }), false,
> CHANGE 4 : 5 @ 4 : 5
~ HString.format("%5.3f", new Object[] { Float.valueOf(this.field_175336_F.upperLimitScale) }),
> CHANGE 4 : 5 @ 4 : 5
~ HString.format("%5.3f", new Object[] { Float.valueOf(this.field_175336_F.lowerLimitScale) }),
> CHANGE 4 : 5 @ 4 : 5
~ HString.format("%2.3f", new Object[] { Float.valueOf(this.field_175336_F.biomeDepthWeight) }),
> CHANGE 4 : 5 @ 4 : 5
~ HString.format("%2.3f", new Object[] { Float.valueOf(this.field_175336_F.biomeDepthOffset) }),
> CHANGE 4 : 5 @ 4 : 5
~ HString.format("%2.3f", new Object[] { Float.valueOf(this.field_175336_F.biomeScaleWeight) }),
> CHANGE 4 : 5 @ 4 : 5
~ HString.format("%2.3f", new Object[] { Float.valueOf(this.field_175336_F.biomeScaleOffset) }),
> CHANGE 126 : 127 @ 126 : 127
~ return HString.format("%5.3f", new Object[] { Float.valueOf(parFloat1) });
> CHANGE 14 : 15 @ 14 : 15
~ return HString.format("%2.3f", new Object[] { Float.valueOf(parFloat1) });
> CHANGE 31 : 32 @ 31 : 32
~ return HString.format("%d", new Object[] { Integer.valueOf((int) parFloat1) });
> CHANGE 316 : 317 @ 316 : 317
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 74 : 75 @ 74 : 75
~ private void func_175331_h() {
> CHANGE 35 : 36 @ 35 : 36
~ protected void keyTyped(char parChar1, int parInt1) {
> CHANGE 44 : 45 @ 44 : 45
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
> EOF
@@ -0,0 +1,50 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 3
> CHANGE 1 : 5 @ 1 : 3
~
~ import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController;
~ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenIntegratedServerBusy;
~ import net.lax1dude.eaglercraft.v1_8.sp.ipc.IPCPacket15Crashed;
> INSERT 1 : 2 @ 1
+ import net.minecraft.util.ChatComponentTranslation;
> CHANGE 15 : 16 @ 15 : 16
~ protected void keyTyped(char parChar1, int parInt1) {
> CHANGE 12 : 13 @ 12 : 13
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 12 : 15 @ 12 : 14
~ for (int l = 0, m = this.multilineMessage.size(); l < m; ++l) {
~ this.drawCenteredString(this.fontRendererObj, this.multilineMessage.get(l), this.width / 2, k,
~ 16777215);
> INSERT 6 : 18 @ 6
+
+ public void updateScreen() {
+ IPCPacket15Crashed[] pkt = SingleplayerServerController.worldStatusErrors();
+ if (pkt != null && pkt.length > 0) {
+ mc.displayGuiScreen(
+ GuiScreenIntegratedServerBusy.createException(this, "singleplayer.failed.serverCrash", pkt));
+ }
+ }
+
+ public static GuiScreen createRateLimitKick(GuiScreen prev) {
+ return new GuiDisconnected(prev, "connect.failed", new ChatComponentTranslation("disconnect.tooManyRequests"));
+ }
> EOF
@@ -0,0 +1,21 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 4
> CHANGE 12 : 13 @ 12 : 13
~ protected void keyTyped(char parChar1, int parInt1) {
> INSERT 24 : 28 @ 24
+
+ public boolean shouldHangupIntegratedServer() {
+ return false;
+ }
> EOF
@@ -0,0 +1,54 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 4
> CHANGE 1 : 8 @ 1 : 4
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
~ import net.lax1dude.eaglercraft.v1_8.Mouse;
~ import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType;
~
~ import com.google.common.collect.Lists;
~
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 2 @ 2 : 3
> DELETE 13 @ 13 : 14
> CHANGE 8 : 9 @ 8 : 9
~ private EaglercraftRandom random = new EaglercraftRandom();
> CHANGE 29 : 30 @ 29 : 30
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
> CHANGE 25 : 28 @ 25 : 28
~ GlStateManager.viewport((scaledresolution.getScaledWidth() - 290 - 12) / 2 * scaledresolution.getScaleFactor(),
~ (scaledresolution.getScaledHeight() - 220 + 10) / 2 * scaledresolution.getScaleFactor(),
~ 290 * scaledresolution.getScaleFactor(), 220 * scaledresolution.getScaleFactor());
> CHANGE 1 : 2 @ 1 : 2
~ GlStateManager.gluPerspective(90.0F, 1.3333334F, 9.0F, 80.0F);
> INSERT 36 : 37 @ 36
+ GlStateManager.enableDepth();
> INSERT 1 : 2 @ 1
+ GlStateManager.disableDepth();
> INSERT 105 : 106 @ 105
+ Mouse.showCursor(EnumCursorType.HAND);
> EOF
@@ -0,0 +1,18 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 5
> CHANGE 23 : 24 @ 23 : 24
~ protected void keyTyped(char parChar1, int parInt1) {
> CHANGE 2 : 3 @ 2 : 3
~ protected void actionPerformed(GuiButton parGuiButton) {
> EOF
@@ -0,0 +1,38 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 7 : 11 @ 7
+
+ import net.lax1dude.eaglercraft.v1_8.Keyboard;
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
+ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
> DELETE 1 @ 1 : 8
> DELETE 2 @ 2 : 3
> DELETE 9 @ 9 : 10
> CHANGE 41 : 42 @ 41 : 42
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
> CHANGE 4 : 5 @ 4 : 5
~ protected void keyTyped(char parChar1, int parInt1) {
> CHANGE 6 : 7 @ 6 : 7
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 55 : 57 @ 55 : 57
~ for (int i = 0, l = parList.size(); i < l; ++i) {
~ flatgeneratorinfo.getWorldFeatures().put(parList.get(i), Maps.newHashMap());
> EOF
@@ -0,0 +1,47 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 3 @ 2 : 8
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 1 @ 1 : 2
> CHANGE 27 : 29 @ 27 : 29
~ for (int i = 0, l = this.buttonList.size(); i < l; ++i) {
~ this.buttonList.get(i).enabled = false;
> CHANGE 4 : 5 @ 4 : 5
~ protected void keyTyped(char parChar1, int parInt1) {
> CHANGE 2 : 3 @ 2 : 3
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 7 : 15 @ 7 : 8
~ if (this.mc.isIntegratedServerRunning()) {
~ this.mc.thePlayer.respawnPlayer();
~ this.mc.displayGuiScreen((GuiScreen) null);
~ } else {
~ this.mc.theWorld.sendQuittingDisconnectingPacket();
~ this.mc.loadWorld((WorldClient) null);
~ this.mc.shutdownIntegratedServer(new GuiMainMenu());
~ }
> CHANGE 15 : 16 @ 15 : 16
~ this.mc.shutdownIntegratedServer(new GuiMainMenu());
> CHANGE 34 : 36 @ 34 : 36
~ for (int i = 0, l = this.buttonList.size(); i < l; ++i) {
~ this.buttonList.get(i).enabled = true;
> EOF
@@ -0,0 +1,14 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 2 : 3 @ 2
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 2 @ 2 : 3
> EOF
@@ -0,0 +1,182 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 2 : 7 @ 2
+ import java.util.ArrayList;
+ import java.util.Collection;
+ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
+
> CHANGE 3 : 7 @ 3 : 6
~
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
~ import net.lax1dude.eaglercraft.v1_8.opengl.OpenGlHelper;
~ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
> DELETE 2 @ 2 : 11
> DELETE 2 @ 2 : 3
> CHANGE 1 : 2 @ 1 : 2
~ import net.minecraft.client.renderer.entity.RenderManager;
> CHANGE 32 : 33 @ 32 : 33
~ private final EaglercraftRandom rand = new EaglercraftRandom();
> DELETE 3 @ 3 : 4
> CHANGE 7 : 8 @ 7 : 8
~ public final GuiOverlayDebug overlayDebug;
> DELETE 19 @ 19 : 20
> CHANGE 16 : 19 @ 16 : 21
~ GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
~ GlStateManager.enableDepth();
~ GlStateManager.disableLighting();
> DELETE 21 @ 21 : 22
> DELETE 1 @ 1 : 8
> CHANGE 44 : 45 @ 44 : 47
~ this.overlayDebug.renderDebugInfo(scaledresolution);
> INSERT 83 : 87 @ 83
+ if (this.mc.currentScreen == null) {
+ this.mc.voiceOverlay.drawOverlay();
+ }
+
> INSERT 4 : 7 @ 4
+ if (this.mc.gameSettings.hudWorld && (mc.currentScreen == null || !(mc.currentScreen instanceof GuiChat))) {
+ j -= 10;
+ }
> INSERT 19 : 30 @ 19
+ public void renderGameOverlayCrosshairs(int scaledResWidth, int scaledResHeight) {
+ if (this.showCrosshair()) {
+ GlStateManager.color(1.0F, 1.0F, 1.0F, 1.0F);
+ this.mc.getTextureManager().bindTexture(icons);
+ GlStateManager.enableBlend();
+ GlStateManager.tryBlendFuncSeparate(775, 769, 1, 0);
+ GlStateManager.enableAlpha();
+ this.drawTexturedModalRect(scaledResWidth / 2 - 7, scaledResHeight / 2 - 7, 0, 0, 16, 16);
+ }
+ }
+
> DELETE 147 @ 147 : 151
> CHANGE 17 : 19 @ 17 : 18
~ for (int m = 0, n = arraylist1.size(); m < n; ++m) {
~ Score score = (Score) arraylist1.get(m);
> CHANGE 12 : 14 @ 12 : 13
~ for (int m = 0, n = arraylist1.size(); m < n; ++m) {
~ Score score1 = (Score) arraylist1.get(m);
> CHANGE 7 : 9 @ 7 : 9
~ this.getFontRenderer().drawString(s1, k1, k, 0xFFFFFFFF);
~ this.getFontRenderer().drawString(s2, l - this.getFontRenderer().getStringWidth(s2), k, 0xFFFFFFFF);
> CHANGE 5 : 6 @ 5 : 6
~ k - this.getFontRenderer().FONT_HEIGHT, 0xFFFFFFFF);
> INSERT 25 : 27 @ 25
+ GlStateManager.enableBlend();
+ GlStateManager.tryBlendFuncSeparate(770, 771, 1, 0);
> CHANGE 248 : 249 @ 248 : 249
~ public void renderVignette(float parFloat1, int scaledWidth, int scaledHeight) {
> CHANGE 29 : 32 @ 29 : 33
~ worldrenderer.pos(0.0D, (double) scaledHeight, -90.0D).tex(0.0D, 1.0D).endVertex();
~ worldrenderer.pos((double) scaledWidth, scaledHeight, -90.0D).tex(1.0D, 1.0D).endVertex();
~ worldrenderer.pos((double) scaledWidth, 0.0D, -90.0D).tex(1.0D, 0.0D).endVertex();
> CHANGE 21 : 22 @ 21 : 22
~ EaglerTextureAtlasSprite textureatlassprite = this.mc.getBlockRendererDispatcher().getBlockModelShapes()
> DELETE 57 @ 57 : 58
> INSERT 60 : 113 @ 60
+ public void drawEaglerPlayerOverlay(int x, int y, float partialTicks) {
+ Entity e = mc.getRenderViewEntity();
+ if (e != null && e instanceof EntityLivingBase) {
+ EntityLivingBase ent = (EntityLivingBase) e;
+ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
+ GlStateManager.enableDepth();
+ GlStateManager.enableColorMaterial();
+ GlStateManager.pushMatrix();
+ GlStateManager.translate((float) x - 10, (float) y + 36, 50.0F);
+ GlStateManager.scale(-17.0F, 17.0F, 17.0F);
+ GlStateManager.rotate(180.0F, 0.0F, 0.0F, 1.0F);
+ float f = ent.renderYawOffset;
+ float f1 = ent.rotationYaw;
+ float f2 = ent.prevRotationYaw;
+ float f3 = ent.prevRotationYawHead;
+ float f4 = ent.rotationYawHead;
+ float f5 = ent.prevRenderYawOffset;
+ GlStateManager.rotate(115.0F, 0.0F, 1.0F, 0.0F);
+ RenderHelper.enableStandardItemLighting();
+ float f6 = ent.prevRenderYawOffset + (ent.renderYawOffset - ent.prevRenderYawOffset) * partialTicks;
+ ent.rotationYawHead -= f6;
+ ent.prevRotationYawHead -= f6;
+ ent.rotationYawHead *= 0.5f;
+ ent.prevRotationYawHead *= 0.5f;
+ ent.renderYawOffset = 0.0f;
+ ent.prevRenderYawOffset = 0.0f;
+ ent.prevRotationYaw = 0.0f;
+ ent.rotationYaw = 0.0f;
+ GlStateManager.rotate(-135.0F
+ - (ent.prevRotationYawHead + (ent.rotationYawHead - ent.prevRotationYawHead) * partialTicks) * 0.5F,
+ 0.0F, 1.0F, 0.0F);
+ GlStateManager.rotate(ent.rotationPitch * 0.2f, 1.0F, 0.0F, 0.0F);
+ RenderManager rendermanager = Minecraft.getMinecraft().getRenderManager();
+ rendermanager.setPlayerViewY(180.0F);
+ rendermanager.setRenderShadow(false);
+ rendermanager.renderEntityWithPosYaw(ent, 0.0D, 0.0D, 0.0D, 0.0F, partialTicks);
+ rendermanager.setRenderShadow(true);
+ ent.renderYawOffset = f;
+ ent.rotationYaw = f1;
+ ent.prevRotationYaw = f2;
+ ent.prevRotationYawHead = f3;
+ ent.rotationYawHead = f4;
+ ent.prevRenderYawOffset = f5;
+ GlStateManager.popMatrix();
+ RenderHelper.disableStandardItemLighting();
+ GlStateManager.disableDepth();
+ GlStateManager.disableRescaleNormal();
+ GlStateManager.setActiveTexture(OpenGlHelper.lightmapTexUnit);
+ GlStateManager.disableTexture2D();
+ GlStateManager.setActiveTexture(OpenGlHelper.defaultTexUnit);
+ }
+ }
+
> EOF
@@ -0,0 +1,253 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 14 @ 2 : 9
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
~ import net.lax1dude.eaglercraft.v1_8.Mouse;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
~ import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController;
~ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenLANInfo;
~ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenLANNotSupported;
~ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiShareToLan;
~ import net.lax1dude.eaglercraft.v1_8.sp.lan.LANServerController;
~ import net.lax1dude.eaglercraft.v1_8.update.GuiUpdateCheckerOverlay;
~ import net.lax1dude.eaglercraft.v1_8.voice.GuiVoiceMenu;
~ import net.minecraft.client.Minecraft;
~ import net.minecraft.client.audio.PositionedSoundRecord;
> CHANGE 4 : 7 @ 4 : 5
~ import net.minecraft.util.ChatComponentText;
~ import net.minecraft.util.EnumChatFormatting;
~ import net.minecraft.util.ResourceLocation;
> DELETE 2 @ 2 : 4
> INSERT 1 : 15 @ 1
+ private GuiButton lanButton;
+
+ boolean hasSentAutoSave = !SingleplayerServerController.isWorldRunning();
+
+ private GuiUpdateCheckerOverlay updateCheckerOverlay;
+ private GuiVoiceMenu voiceMenu;
+
+ public GuiIngameMenu() {
+ updateCheckerOverlay = new GuiUpdateCheckerOverlay(true, this);
+ if (EagRuntime.getConfiguration().isAllowVoiceClient()) {
+ voiceMenu = new GuiVoiceMenu(this);
+ }
+ }
+
> DELETE 1 @ 1 : 2
> INSERT 1 : 2 @ 1
+ this.updateCheckerOverlay.setResolution(mc, width, height);
> CHANGE 12 : 14 @ 12 : 15
~ this.buttonList.add(lanButton = new GuiButton(7, this.width / 2 + 2, this.height / 4 + 96 + b0, 98, 20,
~ I18n.format(LANServerController.isLANOpen() ? "menu.closeLan" : "menu.openToLan", new Object[0])));
> CHANGE 4 : 9 @ 4 : 5
~ lanButton.enabled = SingleplayerServerController.isWorldRunning();
~ if (!hasSentAutoSave) {
~ hasSentAutoSave = true;
~ SingleplayerServerController.autoSave();
~ }
> CHANGE 2 : 3 @ 2 : 3
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 5 : 6 @ 5 : 7
~ boolean flag = this.mc.isIntegratedServerRunning() || this.mc.isDemo();
> CHANGE 4 : 5 @ 4 : 8
~ this.mc.shutdownIntegratedServer(new GuiMainMenu());
> CHANGE 1 : 2 @ 1 : 2
~ this.mc.shutdownIntegratedServer(new GuiMultiplayer(new GuiMainMenu()));
> CHANGE 16 : 30 @ 16 : 17
~ if (!LANServerController.supported()) {
~ mc.displayGuiScreen(new GuiScreenLANNotSupported(this));
~ } else if (LANServerController.isLANOpen()) {
~ if (LANServerController.hasPeers()) {
~ mc.displayGuiScreen(new GuiYesNo(this, I18n.format("networkSettings.delete"),
~ I18n.format("lanServer.wouldYouLikeToKick"), 0));
~ } else {
~ confirmClicked(false, 0);
~ }
~ } else {
~ this.mc.displayGuiScreen(GuiScreenLANInfo.showLANInfoScreen(
~ new GuiShareToLan(this, this.mc.playerController.getCurrentGameType().getName())));
~ }
~ break;
> CHANGE 6 : 13 @ 6 : 7
~ if (EagRuntime.getConfiguration().isAllowVoiceClient()
~ && (!mc.isSingleplayer() || LANServerController.isHostingLAN())) {
~ voiceMenu.updateScreen();
~ }
~ if (Mouse.isActuallyGrabbed()) {
~ Mouse.setGrabbed(false);
~ }
> CHANGE 4 : 5 @ 4 : 5
~ this.drawCenteredString(this.fontRendererObj, I18n.format("menu.game", new Object[0]), this.width / 2, 20,
> CHANGE 1 : 55 @ 1 : 2
~
~ this.updateCheckerOverlay.drawScreen(i, j, f);
~
~ if (LANServerController.isLANOpen()) {
~ int offset = this.updateCheckerOverlay.getSharedWorldInfoYOffset();
~ String str = I18n.format("lanServer.pauseMenu0");
~ drawString(fontRendererObj, str, 6, 10 + offset, 0xFFFF55);
~
~ if (mc.gameSettings.hideJoinCode) {
~ GlStateManager.pushMatrix();
~ GlStateManager.translate(7.0f, 25.0f + offset, 0.0f);
~ GlStateManager.scale(0.75f, 0.75f, 0.75f);
~ str = I18n.format("lanServer.showCode");
~ int w = fontRendererObj.getStringWidth(str);
~ boolean hover = i > 4 && i < 8 + w * 3 / 4 && j > 24 + offset && j < 25 + offset + 8;
~ drawString(fontRendererObj, EnumChatFormatting.UNDERLINE + str, 0, 0, hover ? 0xEEEEAA : 0xCCCC55);
~ GlStateManager.popMatrix();
~ } else {
~ int w = fontRendererObj.getStringWidth(str);
~ GlStateManager.pushMatrix();
~ GlStateManager.translate(6 + w + 3, 11 + offset, 0.0f);
~ GlStateManager.scale(0.75f, 0.75f, 0.75f);
~ str = I18n.format("lanServer.hideCode");
~ int w2 = fontRendererObj.getStringWidth(str);
~ boolean hover = i > 6 + w + 2 && i < 6 + w + 3 + w2 * 3 / 4 && j > 11 + offset - 1
~ && j < 11 + offset + 6;
~ drawString(fontRendererObj, EnumChatFormatting.UNDERLINE + str, 0, 0, hover ? 0xEEEEAA : 0xCCCC55);
~ GlStateManager.popMatrix();
~
~ drawString(
~ fontRendererObj, EnumChatFormatting.GRAY + I18n.format("lanServer.pauseMenu1") + " "
~ + EnumChatFormatting.RESET + LANServerController.getCurrentURI(),
~ 6, 25 + offset, 0xFFFFFF);
~ drawString(
~ fontRendererObj, EnumChatFormatting.GRAY + I18n.format("lanServer.pauseMenu2") + " "
~ + EnumChatFormatting.RESET + LANServerController.getCurrentCode(),
~ 6, 35 + offset, 0xFFFFFF);
~ }
~ }
~
~ try {
~ if (EagRuntime.getConfiguration().isAllowVoiceClient()
~ && (!mc.isSingleplayer() || LANServerController.isHostingLAN())) {
~ if (voiceMenu.isBlockingInput()) {
~ super.drawScreen(0, 0, f);
~ } else {
~ super.drawScreen(i, j, f);
~ }
~ voiceMenu.drawScreen(i, j, f);
~ } else {
~ super.drawScreen(i, j, f);
~ }
~ } catch (GuiVoiceMenu.AbortedException ex) {
~ }
> INSERT 1 : 80 @ 1
+
+ protected void keyTyped(char par1, int par2) {
+ try {
+ if (EagRuntime.getConfiguration().isAllowVoiceClient()
+ && (!mc.isSingleplayer() || LANServerController.isHostingLAN())) {
+ voiceMenu.keyTyped(par1, par2);
+ }
+ super.keyTyped(par1, par2);
+ } catch (GuiVoiceMenu.AbortedException ex) {
+ }
+ }
+
+ public void confirmClicked(boolean par1, int par2) {
+ mc.displayGuiScreen(this);
+ LANServerController.closeLANNoKick();
+ if (par1) {
+ LANServerController.cleanupLAN();
+ SingleplayerServerController.configureLAN(this.mc.theWorld.getWorldInfo().getGameType(), false);
+ }
+ this.mc.ingameGUI.getChatGUI().printChatMessage(new ChatComponentText(I18n.format("lanServer.closed")));
+ this.lanButton.displayString = I18n.format("menu.openToLan");
+ }
+
+ protected void mouseClicked(int par1, int par2, int par3) {
+ try {
+ if (EagRuntime.getConfiguration().isAllowVoiceClient()
+ && (!mc.isSingleplayer() || LANServerController.isHostingLAN())) {
+ voiceMenu.mouseClicked(par1, par2, par3);
+ }
+ } catch (GuiVoiceMenu.AbortedException ex) {
+ return;
+ }
+ if (par3 == 0) {
+ int offset = this.updateCheckerOverlay.getSharedWorldInfoYOffset();
+ if (mc.gameSettings.hideJoinCode) {
+ String str = I18n.format("lanServer.showCode");
+ int w = fontRendererObj.getStringWidth(str);
+ if (par1 > 4 && par1 < 8 + w * 3 / 4 && par2 > 24 + offset && par2 < 25 + offset + 8) {
+ mc.gameSettings.hideJoinCode = false;
+ this.mc.getSoundHandler()
+ .playSound(PositionedSoundRecord.create(new ResourceLocation("gui.button.press"), 1.0F));
+ mc.gameSettings.saveOptions();
+ }
+ } else {
+ String str = I18n.format("lanServer.pauseMenu0");
+ int w = fontRendererObj.getStringWidth(str);
+ str = I18n.format("lanServer.hideCode");
+ int w2 = fontRendererObj.getStringWidth(str);
+ if (par1 > 6 + w + 2 && par1 < 6 + w + 3 + w2 * 3 / 4 && par2 > 11 + offset - 1
+ && par2 < 11 + offset + 6) {
+ mc.gameSettings.hideJoinCode = true;
+ this.mc.getSoundHandler()
+ .playSound(PositionedSoundRecord.create(new ResourceLocation("gui.button.press"), 1.0F));
+ mc.gameSettings.saveOptions();
+ }
+ }
+
+ }
+ this.updateCheckerOverlay.mouseClicked(par1, par2, par3);
+ super.mouseClicked(par1, par2, par3);
+ }
+
+ public void setWorldAndResolution(Minecraft par1Minecraft, int par2, int par3) {
+ super.setWorldAndResolution(par1Minecraft, par2, par3);
+ if (EagRuntime.getConfiguration().isAllowVoiceClient()) {
+ voiceMenu.setResolution(par1Minecraft, par2, par3);
+ }
+ }
+
+ protected void mouseReleased(int par1, int par2, int par3) {
+ try {
+ if (EagRuntime.getConfiguration().isAllowVoiceClient()
+ && (!mc.isSingleplayer() || LANServerController.isHostingLAN())) {
+ voiceMenu.mouseReleased(par1, par2, par3);
+ }
+ super.mouseReleased(par1, par2, par3);
+ } catch (GuiVoiceMenu.AbortedException ex) {
+ }
+ }
> EOF
@@ -0,0 +1,28 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 3 : 5 @ 3
+
+ import net.lax1dude.eaglercraft.v1_8.ArrayUtils;
> DELETE 1 @ 1 : 4
> DELETE 4 @ 4 : 5
> CHANGE 17 : 19 @ 17 : 18
~ for (int l = 0; l < akeybinding.length; ++l) {
~ KeyBinding keybinding = akeybinding[l];
> CHANGE 86 : 89 @ 86 : 87
~ KeyBinding[] kb = GuiKeyBindingList.this.mc.gameSettings.keyBindings;
~ for (int m = 0; m < kb.length; ++m) {
~ KeyBinding keybindingx = kb[m];
> EOF
@@ -0,0 +1,19 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 3
> INSERT 1 : 5 @ 1
+
+ import com.google.common.collect.Lists;
+
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 1 @ 1 : 4
> EOF
@@ -0,0 +1,31 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 4
> INSERT 2 : 6 @ 2
+
+ import com.google.common.collect.Lists;
+ import com.google.common.collect.Maps;
+
> DELETE 1 @ 1 : 6
> CHANGE 34 : 35 @ 34 : 35
~ protected void actionPerformed(GuiButton parGuiButton) {
> INSERT 56 : 57 @ 56
+ this.mc.loadingScreen.eaglerShowRefreshResources();
> INSERT 9 : 10 @ 9
+ GuiLanguage.this.mc.displayGuiScreen(GuiLanguage.this);
> EOF
@@ -0,0 +1,10 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 3 @ 3 : 5
> EOF
@@ -0,0 +1,10 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 3 @ 3 : 4
> EOF
@@ -0,0 +1,14 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 2 : 3 @ 2
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 1 @ 1 : 3
> EOF
@@ -0,0 +1,505 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 3
> CHANGE 3 : 4 @ 3 : 4
~ import java.nio.charset.StandardCharsets;
> INSERT 1 : 2 @ 1
+ import java.util.Arrays;
> CHANGE 2 : 29 @ 2 : 4
~
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
~ import net.lax1dude.eaglercraft.v1_8.EagUtils;
~ import net.lax1dude.eaglercraft.v1_8.EaglerInputStream;
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftVersion;
~ import net.lax1dude.eaglercraft.v1_8.Mouse;
~
~ import com.google.common.base.Charsets;
~ import com.google.common.collect.Lists;
~
~ import net.lax1dude.eaglercraft.v1_8.crypto.SHA1Digest;
~ import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType;
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
~ import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
~ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
~ import net.lax1dude.eaglercraft.v1_8.profile.GuiScreenEditProfile;
~ import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController;
~ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenDemoPlayWorldSelection;
~ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenIntegratedServerBusy;
~ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenIntegratedServerStartup;
~ import net.lax1dude.eaglercraft.v1_8.update.GuiUpdateCheckerOverlay;
~ import net.lax1dude.eaglercraft.v1_8.update.GuiUpdateVersionSlot;
~ import net.lax1dude.eaglercraft.v1_8.update.UpdateCertificate;
~ import net.lax1dude.eaglercraft.v1_8.update.UpdateService;
> CHANGE 1 : 2 @ 1 : 13
~ import net.minecraft.client.audio.PositionedSoundRecord;
> DELETE 1 @ 1 : 2
> DELETE 3 @ 3 : 5
> DELETE 2 @ 2 : 3
> DELETE 1 @ 1 : 8
> DELETE 2 @ 2 : 3
> CHANGE 1 : 2 @ 1 : 2
~ private static final EaglercraftRandom RANDOM = new EaglercraftRandom();
> INSERT 1 : 5 @ 1
+ private boolean isDefault;
+ private static final int lendef = 5987;
+ private static final byte[] sha1def = new byte[] { -107, 77, 108, 49, 11, -100, -8, -119, -1, -100, -85, -55, 18,
+ -69, -107, 113, -93, -101, -79, 32 };
> CHANGE 3 : 4 @ 3 : 4
~ private static DynamicTexture viewportTexture = null;
> DELETE 1 @ 1 : 2
> DELETE 2 @ 2 : 3
> INSERT 3 : 6 @ 3
+ private static final ResourceLocation minecraftTitleBlurFlag = new ResourceLocation(
+ "textures/gui/title/background/enable_blur.txt");
+ private static final ResourceLocation eaglerGuiTextures = new ResourceLocation("eagler:gui/eagler_gui.png");
> DELETE 7 @ 7 : 9
> CHANGE 6 : 11 @ 6 : 8
~ private static ResourceLocation backgroundTexture = null;
~ private GuiUpdateCheckerOverlay updateCheckerOverlay;
~ private GuiButton downloadOfflineButton;
~ private boolean enableBlur = true;
~ private boolean shouldReload = false;
> INSERT 1 : 3 @ 1
+ private static GuiMainMenu instance = null;
+
> CHANGE 1 : 2 @ 1 : 2
~ instance = this;
> INSERT 1 : 2 @ 1
+ updateCheckerOverlay = new GuiUpdateCheckerOverlay(false, this);
> CHANGE 38 : 65 @ 38 : 43
~
~ reloadResourceFlags();
~ }
~
~ private void reloadResourceFlags() {
~ if (Minecraft.getMinecraft().isDemo()) {
~ this.isDefault = false;
~ } else {
~ if (!EagRuntime.getConfiguration().isEnableMinceraft()) {
~ this.isDefault = false;
~ } else {
~ try {
~ byte[] bytes = EaglerInputStream.inputStreamToBytesQuiet(Minecraft.getMinecraft()
~ .getResourceManager().getResource(minecraftTitleTextures).getInputStream());
~ if (bytes != null && bytes.length == lendef) {
~ SHA1Digest sha1 = new SHA1Digest();
~ byte[] sha1out = new byte[20];
~ sha1.update(bytes, 0, bytes.length);
~ sha1.doFinal(sha1out, 0);
~ this.isDefault = Arrays.equals(sha1out, sha1def);
~ } else {
~ this.isDefault = false;
~ }
~ } catch (IOException e) {
~ this.isDefault = false;
~ }
~ }
> INSERT 2 : 21 @ 2
+ this.enableBlur = true;
+
+ try {
+ byte[] bytes = EaglerInputStream.inputStreamToBytesQuiet(
+ Minecraft.getMinecraft().getResourceManager().getResource(minecraftTitleBlurFlag).getInputStream());
+ if (bytes != null) {
+ String[] blurCfg = EagUtils.linesArray(new String(bytes, StandardCharsets.UTF_8));
+ for (int i = 0; i < blurCfg.length; ++i) {
+ String s = blurCfg[i];
+ if (s.startsWith("enable_blur=")) {
+ s = s.substring(12).trim();
+ this.enableBlur = s.equals("1") || s.equals("true");
+ break;
+ }
+ }
+ }
+ } catch (IOException e) {
+ ;
+ }
> INSERT 2 : 8 @ 2
+ public static void doResourceReloadHack() {
+ if (instance != null) {
+ instance.shouldReload = true;
+ }
+ }
+
> INSERT 2 : 9 @ 2
+ if (downloadOfflineButton != null) {
+ downloadOfflineButton.enabled = !UpdateService.shouldDisableDownloadButton();
+ }
+ if (shouldReload) {
+ reloadResourceFlags();
+ shouldReload = false;
+ }
> CHANGE 6 : 7 @ 6 : 7
~ protected void keyTyped(char parChar1, int parInt1) {
> CHANGE 3 : 9 @ 3 : 7
~ if (viewportTexture == null) {
~ viewportTexture = new DynamicTexture(256, 256);
~ backgroundTexture = this.mc.getTextureManager().getDynamicTextureLocation("background", viewportTexture);
~ }
~ this.updateCheckerOverlay.setResolution(mc, width, height);
~ Calendar calendar = EagRuntime.getLocaleCalendar();
> DELETE 9 @ 9 : 10
> INSERT 1 : 8 @ 1
+
+ boolean isFork = !EaglercraftVersion.projectOriginAuthor.equalsIgnoreCase(EaglercraftVersion.projectForkVendor);
+
+ if (isFork && EaglercraftVersion.mainMenuStringF != null && EaglercraftVersion.mainMenuStringF.length() > 0) {
+ i += 11;
+ }
+
> CHANGE 8 : 11 @ 8 : 10
~ this.buttonList.add(new GuiButton(4, this.width / 2 + 2, i + 72 + 12, 98, 20,
~ I18n.format("menu.editProfile", new Object[0])));
~
> CHANGE 1 : 6 @ 1 : 2
~
~ if (isFork) {
~ this.openGLWarning1 = EaglercraftVersion.mainMenuStringE;
~ this.openGLWarning2 = EaglercraftVersion.mainMenuStringF;
~ boolean line2 = this.openGLWarning2 != null && this.openGLWarning2.length() > 0;
> CHANGE 4 : 5 @ 4 : 5
~ this.field_92021_u = ((GuiButton) this.buttonList.get(0)).yPosition - (line2 ? 32 : 21);
> CHANGE 1 : 2 @ 1 : 2
~ this.field_92019_w = this.field_92021_u + (line2 ? 24 : 11);
> CHANGE 10 : 23 @ 10 : 12
~ if (EaglercraftVersion.mainMenuEnableGithubButton) {
~ this.buttonList.add(
~ new GuiButton(14, this.width / 2 - 100, parInt1 + parInt2 * 2, I18n.format("menu.forkOnGitlab")));
~ } else {
~ if (EagRuntime.getConfiguration().isEnableDownloadOfflineButton()
~ && (EagRuntime.getConfiguration().getDownloadOfflineButtonLink() != null
~ || (!EagRuntime.isOfflineDownloadURL() && UpdateService.supported()
~ && UpdateService.getClientSignatureData() != null))) {
~ this.buttonList.add(downloadOfflineButton = new GuiButton(15, this.width / 2 - 100,
~ parInt1 + parInt2 * 2, I18n.format("update.downloadOffline")));
~ downloadOfflineButton.enabled = !UpdateService.shouldDisableDownloadButton();
~ }
~ }
> CHANGE 7 : 8 @ 7 : 13
~ this.buttonResetDemo.enabled = this.mc.gameSettings.hasCreatedDemoWorld;
> CHANGE 2 : 3 @ 2 : 3
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 9 : 10 @ 9 : 10
~ this.mc.displayGuiScreen(new GuiScreenIntegratedServerStartup(this));
> CHANGE 6 : 8 @ 6 : 8
~ if (parGuiButton.id == 4) {
~ this.mc.displayGuiScreen(new GuiScreenEditProfile(this));
> CHANGE 2 : 4 @ 2 : 4
~ if (parGuiButton.id == 14) {
~ EagRuntime.openLink(EaglercraftVersion.projectForkURL);
> CHANGE 3 : 4 @ 3 : 4
~ this.mc.displayGuiScreen(new GuiScreenDemoPlayWorldSelection(this));
> CHANGE 3 : 5 @ 3 : 9
~ GuiYesNo guiyesno = GuiSelectWorld.func_152129_a(this, "Demo World", 12);
~ this.mc.displayGuiScreen(guiyesno);
> INSERT 2 : 12 @ 2
+ if (parGuiButton.id == 15) {
+ if (EagRuntime.getConfiguration().isEnableDownloadOfflineButton()) {
+ String link = EagRuntime.getConfiguration().getDownloadOfflineButtonLink();
+ if (link != null) {
+ EagRuntime.openLink(link);
+ } else {
+ UpdateService.quine();
+ }
+ }
+ }
> DELETE 2 @ 2 : 7
> INSERT 2 : 4 @ 2
+ this.mc.gameSettings.hasCreatedDemoWorld = false;
+ this.mc.gameSettings.saveOptions();
> CHANGE 1 : 5 @ 1 : 3
~ isaveformat.deleteWorldDirectory("Demo World");
~ this.mc.displayGuiScreen(new GuiScreenIntegratedServerBusy(this, "singleplayer.busy.deleting",
~ "singleplayer.failed.deleting", SingleplayerServerController::isReady));
~ } else {
> DELETE 1 @ 1 : 14
> DELETE 1 @ 1 : 2
> CHANGE 8 : 13 @ 8 : 9
~ if (enableBlur) {
~ GlStateManager.gluPerspective(120.0F, 1.0F, 0.05F, 10.0F);
~ } else {
~ GlStateManager.gluPerspective(85.0F, (float) width / (float) height, 0.05F, 10.0F);
~ }
> CHANGE 5 : 8 @ 5 : 6
~ if (enableBlur) {
~ GlStateManager.rotate(90.0F, 0.0F, 0.0F, 1.0F);
~ }
> CHANGE 5 : 6 @ 5 : 6
~ byte b0 = enableBlur ? (byte) 8 : (byte) 1;
> CHANGE 61 : 65 @ 61 : 65
~ this.mc.getTextureManager().bindTexture(backgroundTexture);
~ EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
~ EaglercraftGPU.glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
~ EaglercraftGPU.glCopyTexSubImage2D(GL_TEXTURE_2D, 0, 0, 0, 0, 0, 256, 256);
> DELETE 30 @ 30 : 31
> DELETE 9 @ 9 : 10
> CHANGE 22 : 27 @ 22 : 23
~ if (enableBlur) {
~ this.renderSkybox(i, j, f);
~ } else {
~ this.drawPanorama(i, j, f);
~ }
> DELETE 1 @ 1 : 3
> CHANGE 7 : 12 @ 7 : 8
~ boolean minc = (double) this.updateCounter < 1.0E-4D;
~ if (this.isDefault) {
~ minc = !minc;
~ }
~ if (minc) {
> CHANGE 4 : 5 @ 4 : 5
~ this.drawTexturedModalRect(k + 154, b0 + 0, 0, 45, 155, 44);
> INSERT 5 : 18 @ 5
+ boolean isForkLabel = ((this.openGLWarning1 != null && this.openGLWarning1.length() > 0)
+ || (this.openGLWarning2 != null && this.openGLWarning2.length() > 0));
+
+ if (isForkLabel) {
+ drawRect(this.field_92022_t - 3, this.field_92021_u - 3, this.field_92020_v + 3, this.field_92019_w,
+ 1428160512);
+ if (this.openGLWarning1 != null)
+ this.drawString(this.fontRendererObj, this.openGLWarning1, this.field_92022_t, this.field_92021_u, -1);
+ if (this.openGLWarning2 != null)
+ this.drawString(this.fontRendererObj, this.openGLWarning2, (this.width - this.field_92024_r) / 2,
+ this.field_92021_u + 12, -1);
+ }
+
> CHANGE 2 : 3 @ 2 : 3
~ GlStateManager.rotate(isForkLabel ? -12.0F : -20.0F, 0.0F, 0.0F, 1.0F);
> INSERT 3 : 6 @ 3
+ if (isForkLabel) {
+ f1 *= 0.8f;
+ }
> CHANGE 3 : 5 @ 3 : 4
~
~ String s = EaglercraftVersion.mainMenuStringA;
> CHANGE 1 : 2 @ 1 : 2
~ s += " Demo";
> CHANGE 1 : 3 @ 1 : 2
~ this.drawString(this.fontRendererObj, s, 2, this.height - 20, -1);
~ s = EaglercraftVersion.mainMenuStringB;
> CHANGE 1 : 3 @ 1 : 2
~
~ String s1 = EaglercraftVersion.mainMenuStringC;
> INSERT 1 : 7 @ 1
+ this.height - 20, -1);
+ s1 = EaglercraftVersion.mainMenuStringD;
+ if (this.mc.isDemo()) {
+ s1 = "Copyright Mojang AB. Do not distribute!";
+ }
+ this.drawString(this.fontRendererObj, s1, this.width - this.fontRendererObj.getStringWidth(s1) - 2,
> CHANGE 1 : 50 @ 1 : 7
~
~ if (!this.mc.isDemo()) {
~ GlStateManager.pushMatrix();
~ GlStateManager.scale(0.75f, 0.75f, 0.75f);
~ int www = 0;
~ int hhh = 0;
~ s1 = EaglercraftVersion.mainMenuStringG;
~ if (s1 != null) {
~ www = this.fontRendererObj.getStringWidth(s1);
~ hhh += 10;
~ }
~ s1 = EaglercraftVersion.mainMenuStringH;
~ if (s1 != null) {
~ www = Math.max(www, this.fontRendererObj.getStringWidth(s1));
~ hhh += 10;
~ }
~ if (www > 0) {
~ drawRect(0, 0, www + 6, hhh + 4, 0x55200000);
~ s1 = EaglercraftVersion.mainMenuStringG;
~ if (s1 != null) {
~ www = this.fontRendererObj.getStringWidth(s1);
~ this.drawString(this.fontRendererObj, s1, 3, 3, 0xFFFFFF99);
~ }
~ s1 = EaglercraftVersion.mainMenuStringH;
~ if (s1 != null) {
~ www = Math.max(www, this.fontRendererObj.getStringWidth(s1));
~ this.drawString(this.fontRendererObj, s1, 3, 13, 0xFFFFFF99);
~ }
~ }
~ if (EagRuntime.getConfiguration().isEnableSignatureBadge()) {
~ UpdateCertificate cert = UpdateService.getClientCertificate();
~ GlStateManager.scale(0.66667f, 0.66667f, 0.66667f);
~ if (cert != null) {
~ s1 = I18n.format("update.digitallySigned",
~ GuiUpdateVersionSlot.dateFmt.format(new Date(cert.sigTimestamp)));
~ } else {
~ s1 = I18n.format("update.signatureInvalid");
~ }
~ www = this.fontRendererObj.getStringWidth(s1) + 14;
~ drawRect((this.width * 2 - www) / 2, 0, (this.width * 2 - www) / 2 + www, 12, 0x33000000);
~ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
~ this.drawString(this.fontRendererObj, s1, (this.width * 2 - www) / 2 + 12, 2,
~ cert != null ? 0xFFFFFF99 : 0xFFFF5555);
~ GlStateManager.scale(0.6f, 0.6f, 0.6f);
~ mc.getTextureManager().bindTexture(eaglerGuiTextures);
~ drawTexturedModalRect((int) ((this.width * 2 - www) / 2 / 0.6f) + 2, 1, cert != null ? 32 : 16, 0, 16,
~ 16);
~ }
~ GlStateManager.popMatrix();
> INSERT 2 : 19 @ 2
+ String lbl = "CREDITS.txt";
+ int w = fontRendererObj.getStringWidth(lbl) * 3 / 4;
+
+ if (i >= (this.width - w - 4) && i <= this.width && j >= 0 && j <= 9) {
+ Mouse.showCursor(EnumCursorType.HAND);
+ drawRect((this.width - w - 4), 0, this.width, 10, 0x55000099);
+ } else {
+ drawRect((this.width - w - 4), 0, this.width, 10, 0x55200000);
+ }
+
+ GlStateManager.pushMatrix();
+ GlStateManager.translate((this.width - w - 2), 2.0f, 0.0f);
+ GlStateManager.scale(0.75f, 0.75f, 0.75f);
+ drawString(fontRendererObj, lbl, 0, 0, 16777215);
+ GlStateManager.popMatrix();
+
+ this.updateCheckerOverlay.drawScreen(i, j, f);
> CHANGE 3 : 15 @ 3 : 11
~ protected void mouseClicked(int par1, int par2, int par3) {
~ if (par3 == 0) {
~ String lbl = "CREDITS.txt";
~ int w = fontRendererObj.getStringWidth(lbl) * 3 / 4;
~ if (par1 >= (this.width - w - 4) && par1 <= this.width && par2 >= 0 && par2 <= 10) {
~ String resStr = EagRuntime.getResourceString("/assets/eagler/CREDITS.txt");
~ if (resStr != null) {
~ EagRuntime.openCreditsPopup(resStr);
~ }
~ mc.getSoundHandler()
~ .playSound(PositionedSoundRecord.create(new ResourceLocation("gui.button.press"), 1.0F));
~ return;
> DELETE 1 @ 1 : 2
> INSERT 1 : 3 @ 1
+ this.updateCheckerOverlay.mouseClicked(par1, par2, par3);
+ super.mouseClicked(par1, par2, par3);
> EOF
@@ -0,0 +1,18 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 7
> CHANGE 11 : 12 @ 11 : 12
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 8 : 9 @ 8 : 9
~ protected void keyTyped(char parChar1, int parInt1) {
> EOF
@@ -0,0 +1,33 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 8 @ 2 : 4
~ import net.lax1dude.eaglercraft.v1_8.netty.Unpooled;
~ import net.lax1dude.eaglercraft.v1_8.Mouse;
~ import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType;
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 1 @ 1 : 2
> DELETE 1 @ 1 : 2
> DELETE 13 @ 13 : 15
> CHANGE 44 : 45 @ 44 : 45
~ protected void actionPerformed(GuiButton parGuiButton) {
> INSERT 118 : 121 @ 118
+ if (flag && this.enabled) {
+ Mouse.showCursor(EnumCursorType.HAND);
+ }
> EOF
@@ -0,0 +1,265 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 2 : 4 @ 2
+ import java.io.IOException;
+
> CHANGE 2 : 16 @ 2 : 15
~
~ import net.lax1dude.eaglercraft.v1_8.EaglerXBungeeVersion;
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
~ import net.lax1dude.eaglercraft.v1_8.Mouse;
~ import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType;
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
~ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiNetworkSettingsButton;
~ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenConnectOption;
~ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenLANConnecting;
~ import net.lax1dude.eaglercraft.v1_8.sp.lan.LANServerList;
~ import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayServer;
~ import net.minecraft.client.audio.PositionedSoundRecord;
> DELETE 3 @ 3 : 5
> CHANGE 1 : 3 @ 1 : 4
~ import net.minecraft.util.EnumChatFormatting;
~ import net.minecraft.util.ResourceLocation;
> DELETE 3 @ 3 : 4
> INSERT 11 : 16 @ 11
+
+ public ServerData getSelectedServer() {
+ return selectedServer;
+ }
+
> DELETE 1 @ 1 : 3
> INSERT 1 : 2 @ 1
+ private static long lastRefreshCommit = 0l;
> INSERT 1 : 7 @ 1
+ private static LANServerList lanServerList = null;
+
+ public int ticksOpened;
+
+ private final GuiNetworkSettingsButton relaysButton;
+
> INSERT 2 : 6 @ 2
+ this.relaysButton = new GuiNetworkSettingsButton(this);
+ if (lanServerList != null) {
+ lanServerList.forceRefresh();
+ }
> CHANGE 7 : 8 @ 7 : 8
~ this.savedServerList = ServerList.getServerList();
> DELETE 1 @ 1 : 10
> INSERT 3 : 8 @ 3
+ if (lanServerList == null) {
+ lanServerList = new LANServerList();
+ } else {
+ lanServerList.forceRefresh();
+ }
> CHANGE 32 : 35 @ 32 : 36
~ this.savedServerList.updateServerPing();
~ if (lanServerList.update()) {
~ this.selectServer(-1);
> CHANGE 1 : 2 @ 1 : 3
~ ++ticksOpened;
> DELETE 4 @ 4 : 10
> CHANGE 2 : 3 @ 2 : 3
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 19 : 21 @ 19 : 22
~ this.selectedServer = new ServerData(I18n.format("selectServer.defaultName", new Object[0]), "", false);
~ this.mc.displayGuiScreen(new GuiScreenConnectOption(this));
> CHANGE 8 : 13 @ 8 : 11
~ if (serverdata != null) {
~ this.selectedServer = new ServerData(serverdata.serverName, serverdata.serverIP, false);
~ this.selectedServer.copyFrom(serverdata);
~ this.mc.displayGuiScreen(new GuiScreenAddServer(this, this.selectedServer));
~ }
> CHANGE 3 : 8 @ 3 : 4
~ long millis = System.currentTimeMillis();
~ if (millis - lastRefreshCommit > 700l) {
~ lastRefreshCommit = millis;
~ this.refreshServerList();
~ }
> CHANGE 5 : 6 @ 5 : 6
~ public void refreshServerList() {
> CHANGE 14 : 19 @ 14 : 16
~ long millis = System.currentTimeMillis();
~ if (millis - lastRefreshCommit > 700l) {
~ lastRefreshCommit = millis;
~ this.refreshServerList();
~ }
> CHANGE 15 : 20 @ 15 : 17
~ long millis = System.currentTimeMillis();
~ if (millis - lastRefreshCommit > 700l) {
~ lastRefreshCommit = millis;
~ this.refreshServerList();
~ }
> CHANGE 10 : 15 @ 10 : 12
~ long millis = System.currentTimeMillis();
~ if (millis - lastRefreshCommit > 700l) {
~ lastRefreshCommit = millis;
~ this.refreshServerList();
~ }
> INSERT 1 : 2 @ 1
+ }
> INSERT 1 : 3 @ 1
+ public void cancelDirectConnect() {
+ this.directConnect = false;
> CHANGE 2 : 3 @ 2 : 3
~ protected void keyTyped(char parChar1, int parInt1) {
> DELETE 18 @ 18 : 27
> CHANGE 11 : 12 @ 11 : 12
~ } else if (i < this.serverListSelector.getSize() - 1) {
> DELETE 2 @ 2 : 11
> INSERT 22 : 24 @ 22
+ relaysButton.drawScreen(i, j);
+ drawPluginDownloadLink(i, j);
> INSERT 3 : 4 @ 3
+ }
> INSERT 1 : 17 @ 1
+ private void drawPluginDownloadLink(int xx, int yy) {
+ GlStateManager.pushMatrix();
+ GlStateManager.scale(0.75f, 0.75f, 0.75f);
+ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
+
+ String text = EaglerXBungeeVersion.getPluginButton();
+ int w = mc.fontRendererObj.getStringWidth(text);
+ boolean hover = xx > width - 5 - (w + 5) * 3 / 4 && yy > 1 && xx < width - 2 && yy < 12;
+ if (hover) {
+ Mouse.showCursor(EnumCursorType.HAND);
+ }
+
+ drawString(mc.fontRendererObj, EnumChatFormatting.UNDERLINE + text, (width - 1) * 4 / 3 - w - 5, 5,
+ hover ? 0xFFEEEE22 : 0xFFCCCCCC);
+
+ GlStateManager.popMatrix();
> CHANGE 3 : 12 @ 3 : 13
~ if (this.serverListSelector.func_148193_k() < this.serverListSelector.getOrigSize()) {
~ GuiListExtended.IGuiListEntry guilistextended$iguilistentry = this.serverListSelector.func_148193_k() < 0
~ ? null
~ : this.serverListSelector.getListEntry(this.serverListSelector.func_148193_k());
~ if (guilistextended$iguilistentry instanceof ServerListEntryNormal) {
~ this.connectToServer(((ServerListEntryNormal) guilistextended$iguilistentry).getServerData());
~ }
~ } else {
~ int par1 = this.serverListSelector.func_148193_k() - this.serverListSelector.getOrigSize();
> INSERT 1 : 7 @ 1
+ if (par1 < lanServerList.countServers()) {
+ LANServerList.LanServer var2 = lanServerList.getServer(par1);
+ connectToLAN("Connecting to '" + var2.getLanServerMotd() + "'...", var2.getLanServerCode(),
+ var2.getLanServerRelay());
+ }
+ }
> INSERT 6 : 11 @ 6
+ private void connectToLAN(String text, String code, RelayServer uri) {
+ this.mc.loadingScreen.resetProgressAndMessage(text);
+ this.mc.displayGuiScreen(new GuiScreenLANConnecting(this, code, uri));
+ }
+
> CHANGE 7 : 8 @ 7 : 9
~ if (guilistextended$iguilistentry != null) {
> CHANGE 1 : 3 @ 1 : 2
~ if (guilistextended$iguilistentry instanceof ServerListEntryNormal
~ && ((ServerListEntryNormal) guilistextended$iguilistentry).getServerData() != null) {
> DELETE 4 @ 4 : 5
> DELETE 2 @ 2 : 6
> CHANGE 4 : 6 @ 4 : 5
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
~ relaysButton.mouseClicked(parInt1, parInt2, parInt3);
> INSERT 2 : 9 @ 2
+ String text = EaglerXBungeeVersion.getPluginButton();
+ int w = mc.fontRendererObj.getStringWidth(text);
+ if (parInt1 > width - 5 - (w + 5) * 3 / 4 && parInt2 > 1 && parInt1 < width - 2 && parInt2 < 12) {
+ this.mc.getSoundHandler()
+ .playSound(PositionedSoundRecord.create(new ResourceLocation("gui.button.press"), 1.0F));
+ EaglerXBungeeVersion.startPluginDownload();
+ }
> INSERT 11 : 15 @ 11
+ static LANServerList getLanServerList() {
+ return lanServerList;
+ }
+
> CHANGE 5 : 6 @ 5 : 6
~ return parInt1 < this.savedServerList.countServers();
> EOF
@@ -0,0 +1,31 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 3
> INSERT 2 : 8 @ 2
+
+ import com.google.common.collect.Lists;
+
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
+ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 1 @ 1 : 7
> DELETE 4 @ 4 : 6
> CHANGE 108 : 109 @ 108 : 109
~ for (int j = 0, l = list.size(); j < l; ++j) {
> CHANGE 5 : 6 @ 5 : 6
~ this.field_146253_i.add(0, new ChatLine(parInt2, (IChatComponent) list.get(j), parInt1));
> EOF
@@ -0,0 +1,10 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 3
> EOF
@@ -0,0 +1,14 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 2 : 3 @ 2
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 1 @ 1 : 3
> EOF
@@ -0,0 +1,137 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 13 @ 2 : 3
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
~ import net.lax1dude.eaglercraft.v1_8.Mouse;
~ import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType;
~ import net.lax1dude.eaglercraft.v1_8.internal.EnumPlatformType;
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerFolderResourcePack;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.EaglerDeferredPipeline;
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.gui.GuiShaderConfig;
~ import net.lax1dude.eaglercraft.v1_8.opengl.ext.deferred.gui.GuiShadersNotSupported;
~ import net.lax1dude.eaglercraft.v1_8.profile.GuiScreenImportExportProfile;
~ import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController;
> DELETE 1 @ 1 : 21
> DELETE 2 @ 2 : 3
> INSERT 2 : 4 @ 2
+ import net.minecraft.util.EnumChatFormatting;
+ import net.minecraft.util.ResourceLocation;
> INSERT 10 : 11 @ 10
+ private GuiButton broadcastSettings;
> CHANGE 10 : 12 @ 10 : 11
~ for (int j = 0; j < field_146440_f.length; ++j) {
~ GameSettings.Options gamesettings$options = field_146440_f[j];
> CHANGE 36 : 37 @ 36 : 48
~ I18n.format("shaders.gui.optionsButton")));
> CHANGE 2 : 5 @ 2 : 4
~ this.buttonList.add(broadcastSettings = new GuiButton(107, this.width / 2 + 5, this.height / 6 + 72 - 6, 150,
~ 20, I18n.format(EagRuntime.getRecText(), new Object[0])));
~ broadcastSettings.enabled = EagRuntime.recSupported();
> CHANGE 8 : 10 @ 8 : 9
~ GuiButton btn;
~ this.buttonList.add(btn = new GuiButton(105, this.width / 2 - 155, this.height / 6 + 144 - 6, 150, 20,
> CHANGE 1 : 5 @ 1 : 3
~ btn.enabled = EaglerFolderResourcePack.isSupported();
~ this.buttonList.add(btn = new GuiButton(104, this.width / 2 + 5, this.height / 6 + 144 - 6, 150, 20,
~ I18n.format("options.debugConsoleButton", new Object[0])));
~ btn.enabled = EagRuntime.getPlatformType() != EnumPlatformType.DESKTOP;
> CHANGE 10 : 11 @ 10 : 11
~ return chatcomponenttext.getUnformattedText();
> INSERT 6 : 7 @ 6
+ SingleplayerServerController.setDifficulty(-1);
> CHANGE 7 : 8 @ 7 : 8
~ protected void actionPerformed(GuiButton parGuiButton) {
> INSERT 11 : 13 @ 11
+ SingleplayerServerController
+ .setDifficulty(this.mc.theWorld.getWorldInfo().getDifficulty().getDifficultyId());
> CHANGE 21 : 27 @ 21 : 22
~ if (EaglerDeferredPipeline.isSupported()) {
~ this.mc.displayGuiScreen(new GuiShaderConfig(this));
~ } else {
~ this.mc.displayGuiScreen(new GuiShadersNotSupported(this,
~ I18n.format(EaglerDeferredPipeline.getReasonUnsupported())));
~ }
> DELETE 22 @ 22 : 27
> CHANGE 16 : 18 @ 16 : 23
~ EagRuntime.toggleRec();
~ broadcastSettings.displayString = I18n.format(EagRuntime.getRecText(), new Object[0]);
> INSERT 2 : 5 @ 2
+ if (parGuiButton.id == 104) {
+ EagRuntime.showDebugConsole();
+ }
> INSERT 6 : 24 @ 6
+
+ if (mc.theWorld == null && !EagRuntime.getConfiguration().isDemo()) {
+ GlStateManager.pushMatrix();
+ GlStateManager.scale(0.75f, 0.75f, 0.75f);
+ GlStateManager.color(1.0f, 1.0f, 1.0f, 1.0f);
+ String text = I18n.format("editProfile.importExport");
+
+ int w = mc.fontRendererObj.getStringWidth(text);
+ boolean hover = i > 1 && j > 1 && i < (w * 3 / 4) + 7 && j < 12;
+ if (hover) {
+ Mouse.showCursor(EnumCursorType.HAND);
+ }
+
+ drawString(mc.fontRendererObj, EnumChatFormatting.UNDERLINE + text, 5, 5, hover ? 0xFFEEEE22 : 0xFFCCCCCC);
+
+ GlStateManager.popMatrix();
+ }
+
> INSERT 2 : 14 @ 2
+
+ protected void mouseClicked(int mx, int my, int button) {
+ super.mouseClicked(mx, my, button);
+ if (mc.theWorld == null && !EagRuntime.getConfiguration().isDemo()) {
+ int w = mc.fontRendererObj.getStringWidth(I18n.format("editProfile.importExport"));
+ if (mx > 1 && my > 1 && mx < (w * 3 / 4) + 7 && my < 12) {
+ mc.displayGuiScreen(new GuiScreenImportExportProfile(this));
+ mc.getSoundHandler()
+ .playSound(PositionedSoundRecord.create(new ResourceLocation("gui.button.press"), 1.0F));
+ }
+ }
+ }
> EOF
@@ -0,0 +1,18 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 3
> INSERT 1 : 4 @ 1
+
+ import com.google.common.collect.Lists;
+
> DELETE 1 @ 1 : 5
> EOF
@@ -0,0 +1,373 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 3 @ 2 : 4
~ import java.text.SimpleDateFormat;
> INSERT 1 : 3 @ 1
+ import java.util.Calendar;
+ import java.util.Iterator;
> INSERT 1 : 2 @ 1
+ import java.util.Locale;
> INSERT 1 : 14 @ 1
+ import java.util.TimeZone;
+
+ import com.google.common.base.Strings;
+ import com.google.common.collect.Lists;
+
+ import net.lax1dude.eaglercraft.v1_8.Display;
+ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
+ import net.lax1dude.eaglercraft.v1_8.HString;
+ import net.lax1dude.eaglercraft.v1_8.internal.EnumPlatformType;
+ import net.lax1dude.eaglercraft.v1_8.opengl.EaglercraftGPU;
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
+ import net.lax1dude.eaglercraft.v1_8.opengl.ext.dynamiclights.DynamicLightsStateManager;
+ import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController;
> CHANGE 5 : 6 @ 5 : 10
~ import net.minecraft.client.resources.I18n;
> CHANGE 1 : 2 @ 1 : 2
~ import net.minecraft.potion.PotionEffect;
> CHANGE 8 : 9 @ 8 : 9
~ import net.minecraft.world.biome.BiomeGenBase;
> DELETE 1 @ 1 : 3
> INSERT 4 : 5 @ 4
+ public int playerOffset = 0;
> INSERT 7 : 10 @ 7
+ playerOffset = 0;
+ int ww = scaledResolutionIn.getScaledWidth();
+ int hh = scaledResolutionIn.getScaledHeight();
> CHANGE 1 : 22 @ 1 : 7
~ if (this.mc.gameSettings.showDebugInfo) {
~ GlStateManager.pushMatrix();
~ this.renderDebugInfoLeft();
~ this.renderDebugInfoRight(scaledResolutionIn);
~ GlStateManager.popMatrix();
~ if (this.mc.gameSettings.field_181657_aC) {
~ this.func_181554_e();
~ }
~ } else {
~ int i = 2;
~
~ if (this.mc.gameSettings.hudFps) {
~ drawFPS(2, i);
~ playerOffset = drawSingleplayerStats(scaledResolutionIn);
~ i += 9;
~ }
~
~ if (this.mc.gameSettings.hudCoords) {
~ drawXYZ(2, i);
~ }
~
> INSERT 2 : 26 @ 2
+ if (this.mc.currentScreen == null || !(this.mc.currentScreen instanceof GuiChat)) {
+ if (this.mc.gameSettings.hudStats) {
+ drawStatsHUD(ww - 2, hh - 2);
+ }
+
+ if (this.mc.gameSettings.hudWorld) {
+ drawWorldHUD(2, hh - 2);
+ }
+ }
+
+ if (this.mc.gameSettings.hudCoords && this.mc.joinWorldTickCounter < 80) {
+ if (this.mc.joinWorldTickCounter > 70) {
+ GlStateManager.enableBlend();
+ GlStateManager.blendFunc(770, 771);
+ }
+ int i = this.mc.joinWorldTickCounter - 70;
+ if (i < 0)
+ i = 0;
+ drawHideHUD(ww / 2, hh - 70, (10 - i) * 0xFF / 10);
+ if (this.mc.joinWorldTickCounter > 70) {
+ GlStateManager.disableBlend();
+ }
+ }
+
> INSERT 3 : 142 @ 3
+ private void drawFPS(int x, int y) {
+ this.fontRenderer.drawStringWithShadow(this.mc.renderGlobal.getDebugInfoShort(), x, y, 0xFFFFFF);
+ }
+
+ private void drawXYZ(int x, int y) {
+ Entity e = mc.getRenderViewEntity();
+ BlockPos blockpos = new BlockPos(e.posX, e.getEntityBoundingBox().minY, e.posZ);
+ this.fontRenderer.drawStringWithShadow(
+ "x: " + blockpos.getX() + ", y: " + blockpos.getY() + ", z: " + blockpos.getZ(), x, y, 0xFFFFFF);
+ }
+
+ private void drawStatsHUD(int x, int y) {
+ int i = 9;
+
+ String line = "Walk: " + EnumChatFormatting.YELLOW + HString.format("%.2f", mc.thePlayer.getAIMoveSpeed())
+ + EnumChatFormatting.WHITE + " Flight: "
+ + (mc.thePlayer.capabilities.allowFlying
+ ? ("" + EnumChatFormatting.YELLOW + mc.thePlayer.capabilities.getFlySpeed())
+ : EnumChatFormatting.RED + "No");
+ int lw = fontRenderer.getStringWidth(line);
+ this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
+ i += 11;
+
+ line = "Food: " + EnumChatFormatting.YELLOW + mc.thePlayer.getFoodStats().getFoodLevel()
+ + EnumChatFormatting.WHITE + ", Sat: " + EnumChatFormatting.YELLOW
+ + HString.format("%.1f", mc.thePlayer.getFoodStats().getSaturationLevel());
+ lw = fontRenderer.getStringWidth(line);
+ this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
+ i += 11;
+
+ line = "Amr: " + EnumChatFormatting.YELLOW + mc.thePlayer.getTotalArmorValue() + EnumChatFormatting.WHITE
+ + ", Health: " + EnumChatFormatting.RED + HString.format("%.1f", mc.thePlayer.getHealth());
+ lw = fontRenderer.getStringWidth(line);
+ this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
+ i += 11;
+
+ int xpc = mc.thePlayer.xpBarCap();
+ line = "XP: " + EnumChatFormatting.GREEN + MathHelper.floor_float(mc.thePlayer.experience * xpc)
+ + EnumChatFormatting.WHITE + " / " + EnumChatFormatting.GREEN + xpc;
+ lw = fontRenderer.getStringWidth(line);
+ this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
+ i += 11;
+
+ Iterator<PotionEffect> potions = mc.thePlayer.getActivePotionEffects().iterator();
+ if (potions.hasNext()) {
+ while (potions.hasNext()) {
+ i += 11;
+ PotionEffect e = potions.next();
+ int t = e.getDuration() / 20;
+ int m = t / 60;
+ int s = t % 60;
+ int j = e.getAmplifier();
+ if (j > 0) {
+ line = I18n.format(e.getEffectName())
+ + (j > 0 ? (" " + EnumChatFormatting.YELLOW + EnumChatFormatting.BOLD
+ + I18n.format("potion.potency." + j) + EnumChatFormatting.RESET) : "")
+ + " [" + EnumChatFormatting.YELLOW + HString.format("%02d:%02d", m, s)
+ + EnumChatFormatting.RESET + "]";
+ } else {
+ line = I18n.format(e.getEffectName()) + " [" + EnumChatFormatting.YELLOW
+ + HString.format("%02d:%02d", m, s) + EnumChatFormatting.RESET + "]";
+ }
+ lw = fontRenderer.getStringWidth(line);
+ this.fontRenderer.drawStringWithShadow(line, x - lw, y - i, 0xFFFFFF);
+ }
+ }
+
+ }
+
+ public static final int ticksAtMidnight = 18000;
+ public static final int ticksPerDay = 24000;
+ public static final int ticksPerHour = 1000;
+ public static final double ticksPerMinute = 1000d / 60d;
+ public static final double ticksPerSecond = 1000d / 60d / 60d;
+ private static final SimpleDateFormat SDFTwentyFour = new SimpleDateFormat("HH:mm", Locale.ENGLISH);
+ private static final SimpleDateFormat SDFTwelve = new SimpleDateFormat("h:mm aa", Locale.ENGLISH);
+
+ private void drawWorldHUD(int x, int y) {
+ /*
+ * Math was taken from: https://github.com/EssentialsX/Essentials/blob/
+ * dc7fb919391d62de45e17b51ae1e6fe3e66d7ac6/Essentials/src/main/java/com/
+ * earth2me/essentials/utils/DescParseTickFormat.java
+ */
+ long totalTicks = mc.theWorld.getWorldTime();
+ long ticks = totalTicks;
+ ticks = ticks - ticksAtMidnight + ticksPerDay;
+ final long days = ticks / ticksPerDay;
+ ticks -= days * ticksPerDay;
+ final long hours = ticks / ticksPerHour;
+ ticks -= hours * ticksPerHour;
+ final long minutes = (long) Math.floor(ticks / ticksPerMinute);
+ final double dticks = ticks - minutes * ticksPerMinute;
+ final long seconds = (long) Math.floor(dticks / ticksPerSecond);
+
+ // TODO: why does desktop JRE not apply "GMT" correctly?
+ final Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT"), Locale.ENGLISH);
+
+ cal.setLenient(true);
+ cal.set(0, Calendar.JANUARY, 1, 0, 0, 0);
+ cal.add(Calendar.DAY_OF_YEAR, (int) days);
+ cal.add(Calendar.HOUR_OF_DAY, (int) hours);
+ cal.add(Calendar.MINUTE, (int) minutes);
+ cal.add(Calendar.SECOND, (int) seconds + 1);
+
+ String timeString = EnumChatFormatting.WHITE + "Day " + ((totalTicks + 30000l) / 24000l) + " ("
+ + EnumChatFormatting.YELLOW
+ + (this.mc.gameSettings.hud24h ? SDFTwentyFour : SDFTwelve).format(cal.getTime())
+ + EnumChatFormatting.WHITE + ")";
+
+ Entity e = mc.getRenderViewEntity();
+ BlockPos blockpos = new BlockPos(e.posX, MathHelper.clamp_double(e.getEntityBoundingBox().minY, 0.0D, 254.0D),
+ e.posZ);
+ BiomeGenBase biome = mc.theWorld.getBiomeGenForCoords(blockpos);
+
+ Chunk c = mc.theWorld.getChunkFromBlockCoords(blockpos);
+ int blockLight = c.getLightFor(EnumSkyBlock.BLOCK, blockpos);
+ int skyLight = c.getLightFor(EnumSkyBlock.SKY, blockpos) - mc.theWorld.calculateSkylightSubtracted(1.0f);
+ int totalLight = Math.max(blockLight, skyLight);
+ EnumChatFormatting lightColor = blockLight < 8
+ ? ((skyLight < 8 || !mc.theWorld.isDaytime()) ? EnumChatFormatting.RED : EnumChatFormatting.YELLOW)
+ : EnumChatFormatting.GREEN;
+ String lightString = "Light: " + lightColor + totalLight + EnumChatFormatting.WHITE;
+
+ float temp = biome.getFloatTemperature(blockpos);
+
+ String tempString = "Temp: "
+ + ((blockLight > 11 || temp > 0.15f) ? EnumChatFormatting.YELLOW : EnumChatFormatting.AQUA)
+ + HString.format("%.2f", temp) + EnumChatFormatting.WHITE;
+
+ this.fontRenderer.drawStringWithShadow(timeString, x, y - 30, 0xFFFFFF);
+ this.fontRenderer.drawStringWithShadow("Biome: " + EnumChatFormatting.AQUA + biome.biomeName, x, y - 19,
+ 0xFFFFFF);
+ this.fontRenderer.drawStringWithShadow(lightString + " " + tempString, x, y - 8, 0xFFFFFF);
+ }
+
+ private void drawHideHUD(int x, int y, int fade) {
+ drawCenteredString(fontRenderer, I18n.format("options.hud.note"), x, y, 0xEECC00 | (fade << 24));
+ }
+
> INSERT 4 : 37 @ 4
+ private int drawSingleplayerStats(ScaledResolution parScaledResolution) {
+ if (mc.isDemo()) {
+ return 13;
+ }
+ int i = 0;
+ if (SingleplayerServerController.isWorldRunning()) {
+ long tpsAge = SingleplayerServerController.getTPSAge();
+ if (tpsAge < 20000l) {
+ int color = tpsAge > 2000l ? 0x777777 : 0xFFFFFF;
+ List<String> strs = SingleplayerServerController.getTPS();
+ int l;
+ boolean first = true;
+ for (int j = 0, m = strs.size(); j < m; ++j) {
+ String str = strs.get(j);
+ l = (int) (this.fontRenderer.getStringWidth(str) * (!first ? 0.5f : 1.0f));
+ GlStateManager.pushMatrix();
+ GlStateManager.translate(parScaledResolution.getScaledWidth() - 2 - l, i + 2, 0.0f);
+ if (!first) {
+ GlStateManager.scale(0.5f, 0.5f, 0.5f);
+ }
+ this.fontRenderer.drawStringWithShadow(str, 0, 0, color);
+ GlStateManager.popMatrix();
+ i += (int) (this.fontRenderer.FONT_HEIGHT * (!first ? 0.5f : 1.0f));
+ first = false;
+ if (color == 0xFFFFFF) {
+ color = 14737632;
+ }
+ }
+ }
+ }
+ return i > 0 ? i + 2 : i;
+ }
+
> INSERT 35 : 42 @ 35
+ if (!this.mc.gameSettings.showDebugInfo) {
+ BlockPos blockpos = new BlockPos(this.mc.getRenderViewEntity().posX,
+ this.mc.getRenderViewEntity().getEntityBoundingBox().minY, this.mc.getRenderViewEntity().posZ);
+ return Lists.newArrayList(new String[] { this.mc.renderGlobal.getDebugInfoShort(),
+ "x: " + blockpos.getX() + ", y: " + blockpos.getY() + ", z: " + blockpos.getZ() });
+ }
+
> CHANGE 10 : 11 @ 10 : 11
~ HString.format("Chunk-relative: %d %d %d", new Object[] { Integer.valueOf(blockpos.getX() & 15),
> CHANGE 25 : 26 @ 25 : 26
~ HString.format("XYZ: %.3f / %.5f / %.3f",
> CHANGE 3 : 4 @ 3 : 4
~ HString.format("Block: %d %d %d",
> CHANGE 2 : 3 @ 2 : 3
~ HString.format("Chunk: %d %d %d in %d %d %d",
> CHANGE 3 : 4 @ 3 : 4
~ HString.format("Facing: %s (%s) (%.1f / %.1f)",
> INSERT 3 : 6 @ 3
+ if (DynamicLightsStateManager.isDynamicLightsRender()) {
+ arraylist.add(6, DynamicLightsStateManager.getF3String());
+ }
> CHANGE 2 : 3 @ 2 : 3
~ arraylist.add("Biome: " + chunk.getBiome(blockpos, null).biomeName);
> CHANGE 4 : 5 @ 4 : 14
~ arraylist.add(HString.format("Local Difficulty: %.2f (Day %d)",
> DELETE 4 @ 4 : 8
> CHANGE 4 : 5 @ 4 : 5
~ arraylist.add(HString.format("Looking at: %d %d %d", new Object[] { Integer.valueOf(blockpos1.getX()),
> CHANGE 8 : 36 @ 8 : 25
~ ArrayList arraylist;
~ if (EagRuntime.getPlatformType() != EnumPlatformType.JAVASCRIPT) {
~ long i = EagRuntime.maxMemory();
~ long j = EagRuntime.totalMemory();
~ long k = EagRuntime.freeMemory();
~ long l = j - k;
~ arraylist = Lists.newArrayList(new String[] {
~ HString.format("Java: %s %dbit",
~ new Object[] { System.getProperty("java.version"),
~ Integer.valueOf(this.mc.isJava64bit() ? 64 : 32) }),
~ HString.format("Mem: % 2d%% %03d/%03dMB",
~ new Object[] { Long.valueOf(l * 100L / i), Long.valueOf(bytesToMb(l)),
~ Long.valueOf(bytesToMb(i)) }),
~ HString.format("Allocated: % 2d%% %03dMB",
~ new Object[] { Long.valueOf(j * 100L / i), Long.valueOf(bytesToMb(j)) }),
~ "", HString.format("CPU: %s", new Object[] { "eaglercraft" }), "",
~ HString.format("Display: %dx%d (%s)",
~ new Object[] { Integer.valueOf(Display.getWidth()), Integer.valueOf(Display.getHeight()),
~ EaglercraftGPU.glGetString(7936) }),
~ EaglercraftGPU.glGetString(7937), EaglercraftGPU.glGetString(7938) });
~ } else {
~ arraylist = Lists.newArrayList(
~ new String[] { "Java: TeaVM", "", HString.format("CPU: %s", new Object[] { "eaglercraft" }), "",
~ HString.format("Display: %dx%d (%s)",
~ new Object[] { Integer.valueOf(Display.getWidth()),
~ Integer.valueOf(Display.getHeight()), EaglercraftGPU.glGetString(7936) }),
~ EaglercraftGPU.glGetString(7937), EaglercraftGPU.glGetString(7938) });
~ }
> DELETE 8 @ 8 : 12
> EOF
@@ -0,0 +1,49 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 2 : 4 @ 2
+ import java.util.List;
+
> CHANGE 4 : 5 @ 4 : 5
~
> DELETE 1 @ 1 : 9
> CHANGE 22 : 24 @ 22 : 23
~ for (int n = 0; n < this.field_178078_x.length; ++n) {
~ GuiPageButtonList.GuiListEntry[] aguipagebuttonlist$guilistentry = this.field_178078_x[n];
> CHANGE 86 : 91 @ 86 : 90
~
~ GuiListEntry[] etr = this.field_178078_x[parInt1];
~ for (int i = 0; i < etr.length; ++i) {
~ if (etr[i] != null) {
~ this.func_178066_a((Gui) this.field_178073_v.lookup(etr[i].func_178935_b()), false);
> CHANGE 3 : 7 @ 3 : 7
~ etr = this.field_178078_x[parInt2];
~ for (int i = 0; i < etr.length; ++i) {
~ if (etr[i] != null) {
~ this.func_178066_a((Gui) this.field_178073_v.lookup(etr[i].func_178935_b()), true);
> CHANGE 33 : 35 @ 33 : 34
~ for (int i = 0, l = this.field_178074_u.size(); i < l; ++i) {
~ GuiPageButtonList.GuiEntry guipagebuttonlist$guientry = this.field_178074_u.get(i);
> CHANGE 108 : 110 @ 108 : 110
~ for (int k = 0; k < astring.length; ++k) {
~ ((GuiTextField) this.field_178072_w.get(j)).setText(astring[k]);
> EOF
@@ -0,0 +1,61 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 5
> INSERT 2 : 8 @ 2
+
+ import com.google.common.collect.ComparisonChain;
+ import com.google.common.collect.Ordering;
+
+ import net.lax1dude.eaglercraft.v1_8.mojang.authlib.GameProfile;
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 1 @ 1 : 3
> DELETE 2 @ 2 : 3
> CHANGE 46 : 48 @ 46 : 47
~ for (int m = 0, n = list.size(); m < n; ++m) {
~ NetworkPlayerInfo networkplayerinfo = (NetworkPlayerInfo) list.get(m);
> CHANGE 20 : 21 @ 20 : 22
~ boolean flag = true;
> CHANGE 15 : 17 @ 15 : 17
~ List<String> list1 = null;
~ List<String> list2 = null;
> CHANGE 3 : 5 @ 3 : 5
~ for (int m = 0, n = list1.size(); m < n; ++m) {
~ l1 = Math.max(l1, this.mc.fontRendererObj.getStringWidth(list1.get(m)));
> CHANGE 6 : 8 @ 6 : 8
~ for (int m = 0, n = list2.size(); m < n; ++m) {
~ l1 = Math.max(l1, this.mc.fontRendererObj.getStringWidth(list2.get(m)));
> CHANGE 7 : 9 @ 7 : 8
~ for (int m = 0, n = list1.size(); m < n; ++m) {
~ String s3 = list1.get(m);
> CHANGE 32 : 33 @ 32 : 33
~ if (entityplayer == null || entityplayer.isWearing(EnumPlayerModelParts.HAT)) {
> CHANGE 33 : 35 @ 33 : 34
~ for (int m = 0, n = list2.size(); m < n; ++m) {
~ String s4 = list2.get(m);
> EOF
@@ -0,0 +1,77 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 5 @ 2 : 6
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
~ import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController;
~ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenIntegratedServerBusy;
> DELETE 3 @ 3 : 4
> INSERT 5 : 6 @ 5
+ private final boolean duplicate;
> INSERT 4 : 5 @ 4
+ this.duplicate = false;
> INSERT 2 : 8 @ 2
+ public GuiRenameWorld(GuiScreen parentScreenIn, String saveNameIn, boolean duplicate) {
+ this.parentScreen = parentScreenIn;
+ this.saveName = saveNameIn;
+ this.duplicate = duplicate;
+ }
+
> CHANGE 8 : 9 @ 8 : 9
~ I18n.format(duplicate ? "selectWorld.duplicateButton" : "selectWorld.renameButton", new Object[0])));
> INSERT 5 : 8 @ 5
+ if (duplicate) {
+ s += " copy";
+ }
> CHANGE 9 : 10 @ 9 : 10
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 4 : 16 @ 4 : 7
~ if (duplicate) {
~ SingleplayerServerController.duplicateWorld(this.saveName, this.field_146583_f.getText().trim());
~ this.mc.displayGuiScreen(
~ new GuiScreenIntegratedServerBusy(this.parentScreen, "singleplayer.busy.duplicating",
~ "singleplayer.failed.duplicating", SingleplayerServerController::isReady));
~ } else {
~ ISaveFormat isaveformat = this.mc.getSaveLoader();
~ isaveformat.renameWorld(this.saveName, this.field_146583_f.getText().trim());
~ this.mc.displayGuiScreen(
~ new GuiScreenIntegratedServerBusy(this.parentScreen, "singleplayer.busy.renaming",
~ "singleplayer.failed.renaming", SingleplayerServerController::isReady));
~ }
> DELETE 1 @ 1 : 2
> CHANGE 3 : 4 @ 3 : 4
~ protected void keyTyped(char parChar1, int parInt1) {
> CHANGE 8 : 9 @ 8 : 9
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
> CHANGE 6 : 8 @ 6 : 7
~ this.drawCenteredString(this.fontRendererObj,
~ I18n.format(duplicate ? "selectWorld.duplicate" : "selectWorld.renameTitle", new Object[0]),
> EOF
@@ -0,0 +1,38 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 4
> INSERT 1 : 5 @ 1
+
+ import net.lax1dude.eaglercraft.v1_8.netty.Unpooled;
+ import net.lax1dude.eaglercraft.v1_8.Keyboard;
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 1 @ 1 : 2
> DELETE 1 @ 1 : 2
> DELETE 12 @ 12 : 13
> CHANGE 70 : 71 @ 70 : 71
~ protected void keyTyped(char parChar1, int parInt1) {
> CHANGE 21 : 22 @ 21 : 22
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
> INSERT 46 : 50 @ 46
+
+ public boolean blockPTTKey() {
+ return nameField.isFocused();
+ }
> EOF
@@ -0,0 +1,14 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 3 : 4 @ 3
+
> DELETE 1 @ 1 : 2
> EOF
@@ -0,0 +1,14 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 3 : 4 @ 3
+
> DELETE 1 @ 1 : 2
> EOF
@@ -0,0 +1,14 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 3 : 4 @ 3
+
> DELETE 1 @ 1 : 2
> EOF
@@ -0,0 +1,192 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 11
> DELETE 1 @ 1 : 3
> INSERT 4 : 20 @ 4
+
+ import org.apache.commons.lang3.StringUtils;
+
+ import com.google.common.base.Splitter;
+ import com.google.common.collect.Lists;
+ import com.google.common.collect.Sets;
+
+ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
+ import net.lax1dude.eaglercraft.v1_8.EaglerXBungeeVersion;
+ import net.lax1dude.eaglercraft.v1_8.Keyboard;
+ import net.lax1dude.eaglercraft.v1_8.Mouse;
+ import net.lax1dude.eaglercraft.v1_8.internal.KeyboardConstants;
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
+ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
+ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
> CHANGE 1 : 2 @ 1 : 9
~ import net.minecraft.client.gui.inventory.GuiContainer;
> DELETE 2 @ 2 : 3
> INSERT 2 : 3 @ 2
+ import net.minecraft.client.resources.I18n;
> DELETE 13 @ 13 : 19
> CHANGE 17 : 19 @ 17 : 18
~ private String clickedLinkURI;
~ protected long showingCloseKey = 0;
> CHANGE 2 : 3 @ 2 : 3
~ for (int k = 0, l = this.buttonList.size(); k < l; ++k) {
> CHANGE 3 : 4 @ 3 : 4
~ for (int l = 0, m = this.labelList.size(); l < m; ++l) {
> INSERT 3 : 33 @ 3
+ long millis = System.currentTimeMillis();
+ long closeKeyTimeout = millis - showingCloseKey;
+ if (closeKeyTimeout < 3000l) {
+ int alpha1 = 0xC0000000;
+ int alpha2 = 0xFF000000;
+ if (closeKeyTimeout > 2500l) {
+ float f = (float) (3000l - closeKeyTimeout) * 0.002f;
+ if (f < 0.03f)
+ f = 0.03f;
+ alpha1 = (int) (f * 192.0f) << 24;
+ alpha2 = (int) (f * 255.0f) << 24;
+ }
+ String str;
+ int k = getCloseKey();
+ if (k == KeyboardConstants.KEY_GRAVE) {
+ str = I18n.format("gui.exitKeyRetarded");
+ } else {
+ str = I18n.format("gui.exitKey", Keyboard.getKeyName(k));
+ }
+ int w = fontRendererObj.getStringWidth(str);
+ int x = (width - w - 4) / 2;
+ int y = 10;
+ drawRect(x, y, x + w + 4, y + 12, alpha1);
+ if (closeKeyTimeout > 2500l)
+ GlStateManager.enableBlend();
+ fontRendererObj.drawStringWithShadow(str, x + 2, y + 2, 0xFFAAAA | alpha2);
+ if (closeKeyTimeout > 2500l)
+ GlStateManager.disableBlend();
+ }
+
> CHANGE 2 : 14 @ 2 : 4
~ protected int getCloseKey() {
~ if (this instanceof GuiContainer) {
~ return this.mc.gameSettings.keyBindInventory.getKeyCode();
~ } else {
~ return this.mc.gameSettings.keyBindClose.getKeyCode();
~ }
~ }
~
~ protected void keyTyped(char parChar1, int parInt1) {
~ if (((this.mc.theWorld == null || this.mc.thePlayer.getHealth() <= 0.0F) && parInt1 == 1)
~ || parInt1 == this.mc.gameSettings.keyBindClose.getKeyCode()
~ || (parInt1 == 1 && (this.mc.gameSettings.keyBindClose.getKeyCode() == 0 || this.mc.areKeysLocked()))) {
> INSERT 4 : 6 @ 4
+ } else if (parInt1 == 1) {
+ showingCloseKey = System.currentTimeMillis();
> DELETE 1 @ 1 : 2
> CHANGE 3 : 4 @ 3 : 13
~ return EagRuntime.getClipboard();
> CHANGE 4 : 5 @ 4 : 11
~ EagRuntime.setClipboard(copyText);
> CHANGE 6 : 7 @ 6 : 7
~ for (int k = 0, l = list.size(); k < l; ++k) {
> CHANGE 22 : 24 @ 22 : 24
~ for (int m = 0, n = list.size(); m < n; ++m) {
~ int l = this.fontRendererObj.getStringWidth(list.get(m));
> CHANGE 37 : 40 @ 37 : 38
~ if (s1.length() > 0) {
~ this.fontRendererObj.drawStringWithShadow(s1, (float) j2, (float) k2, -1);
~ }
> INSERT 107 : 108 @ 107
+ String uri = clickevent.getValue();
> CHANGE 1 : 6 @ 1 : 22
~ if (this.mc.gameSettings.chatLinksPrompt) {
~ this.clickedLinkURI = uri;
~ this.mc.displayGuiScreen(new GuiConfirmOpenLink(this, clickevent.getValue(), 31102009, false));
~ } else {
~ this.openWebLink(uri);
> CHANGE 2 : 3 @ 2 : 4
~ // rip
> CHANGE 5 : 15 @ 5 : 8
~ /*
~ * ChatUserInfo chatuserinfo =
~ * this.mc.getTwitchStream().func_152926_a(clickevent.getValue()); if
~ * (chatuserinfo != null) { this.mc.displayGuiScreen(new
~ * GuiTwitchUserMode(this.mc.getTwitchStream(), chatuserinfo)); } else { }
~ */
~ LOGGER.error("Tried to handle twitch user but couldn\'t find them!");
~ } else if (clickevent.getAction() == ClickEvent.Action.EAGLER_PLUGIN_DOWNLOAD) {
~ if (EaglerXBungeeVersion.pluginFileEPK.equals(clickevent.getValue())) {
~ EaglerXBungeeVersion.startPluginDownload();
> CHANGE 1 : 3 @ 1 : 2
~ LOGGER.error("Invalid plugin download from EPK was blocked: {}",
~ EaglerXBungeeVersion.pluginFileEPK);
> CHANGE 24 : 25 @ 24 : 25
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
> CHANGE 24 : 25 @ 24 : 25
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 119 : 121 @ 119 : 128
~ private void openWebLink(String parURI) {
~ EagRuntime.openLink(parURI);
> INSERT 34 : 42 @ 34
+
+ public boolean shouldHangupIntegratedServer() {
+ return true;
+ }
+
+ public boolean blockPTTKey() {
+ return false;
+ }
> EOF
@@ -0,0 +1,96 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 4 @ 2 : 8
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
> DELETE 2 @ 2 : 3
> CHANGE 7 : 8 @ 7 : 26
~ private GuiButton hideAddress;
> INSERT 13 : 14 @ 13
+ int i = 80;
> CHANGE 1 : 4 @ 1 : 2
~ GuiButton done;
~ GuiButton cancel;
~ this.buttonList.add(done = new GuiButton(0, this.width / 2 - 100, i + 96 + 12,
> CHANGE 1 : 2 @ 1 : 2
~ this.buttonList.add(cancel = new GuiButton(1, this.width / 2 - 100, i + 120 + 12,
> CHANGE 1 : 8 @ 1 : 2
~ if (EagRuntime.requireSSL()) {
~ done.yPosition = cancel.yPosition;
~ done.width = (done.width / 2) - 2;
~ cancel.width = (cancel.width / 2) - 2;
~ done.xPosition += cancel.width + 4;
~ }
~ this.buttonList.add(this.serverResourcePacks = new GuiButton(2, this.width / 2 - 100, i + 54,
> INSERT 2 : 5 @ 2
+ this.buttonList.add(this.hideAddress = new GuiButton(3, this.width / 2 - 100, i + 78,
+ I18n.format("addServer.hideAddress", new Object[0]) + ": "
+ + I18n.format(this.serverData.hideAddress ? "gui.yes" : "gui.no", new Object[0])));
> CHANGE 6 : 7 @ 6 : 9
~ ((GuiButton) this.buttonList.get(0)).enabled = this.serverIPField.getText().trim().length() > 0;
> CHANGE 6 : 7 @ 6 : 7
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 1 : 6 @ 1 : 2
~ if (parGuiButton.id == 3) {
~ this.serverData.hideAddress = !this.serverData.hideAddress;
~ this.hideAddress.displayString = I18n.format("addServer.hideAddress", new Object[0]) + ": "
~ + I18n.format(this.serverData.hideAddress ? "gui.yes" : "gui.no", new Object[0]);
~ } else if (parGuiButton.id == 2) {
> CHANGE 1 : 3 @ 1 : 3
~ ServerData.ServerResourceMode._VALUES[(this.serverData.getResourceMode().ordinal() + 1)
~ % ServerData.ServerResourceMode._VALUES.length]);
> CHANGE 5 : 7 @ 5 : 7
~ this.serverData.serverName = this.serverNameField.getText().trim();
~ this.serverData.serverIP = this.serverIPField.getText().trim();
> CHANGE 6 : 7 @ 6 : 7
~ protected void keyTyped(char parChar1, int parInt1) {
> CHANGE 11 : 12 @ 11 : 13
~ ((GuiButton) this.buttonList.get(0)).enabled = this.serverIPField.getText().trim().length() > 0;
> CHANGE 2 : 3 @ 2 : 3
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
> INSERT 13 : 19 @ 13
+ if (EagRuntime.requireSSL()) {
+ this.drawCenteredString(this.fontRendererObj, I18n.format("addServer.SSLWarn1"), this.width / 2, 184,
+ 0xccccff);
+ this.drawCenteredString(this.fontRendererObj, I18n.format("addServer.SSLWarn2"), this.width / 2, 196,
+ 0xccccff);
+ }
> EOF
@@ -0,0 +1,52 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 6
> INSERT 1 : 11 @ 1
+
+ import org.json.JSONException;
+
+ import com.google.common.collect.Lists;
+
+ import net.lax1dude.eaglercraft.v1_8.netty.Unpooled;
+ import net.lax1dude.eaglercraft.v1_8.Keyboard;
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
+ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 1 @ 1 : 5
> DELETE 16 @ 16 : 19
> CHANGE 139 : 140 @ 139 : 140
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 38 : 39 @ 38 : 40
~ protected void keyTyped(char parChar1, int parInt1) {
> DELETE 6 @ 6 : 7
> CHANGE 129 : 130 @ 129 : 130
~ } catch (JSONException var13) {
> CHANGE 34 : 35 @ 34 : 35
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
> INSERT 102 : 106 @ 102
+
+ public boolean blockPTTKey() {
+ return this.bookIsUnsigned;
+ }
> EOF
@@ -0,0 +1,31 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 5 : 9 @ 5 : 11
~
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
~ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
> DELETE 1 @ 1 : 2
> DELETE 4 @ 4 : 5
> CHANGE 41 : 42 @ 41 : 42
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
> CHANGE 4 : 5 @ 4 : 5
~ protected void keyTyped(char parChar1, int parInt1) {
> CHANGE 6 : 7 @ 6 : 7
~ protected void actionPerformed(GuiButton parGuiButton) {
> EOF
@@ -0,0 +1,24 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 3 @ 2 : 3
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 4 @ 4 : 7
> CHANGE 24 : 27 @ 24 : 25
~ SoundCategory[] cats = SoundCategory._VALUES;
~ for (int j = 0; j < cats.length; ++j) {
~ SoundCategory soundcategory = cats[j];
> CHANGE 12 : 13 @ 12 : 13
~ protected void actionPerformed(GuiButton parGuiButton) {
> EOF
@@ -0,0 +1,126 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 4
> DELETE 1 @ 1 : 2
> CHANGE 3 : 12 @ 3 : 8
~
~ import com.google.common.collect.Lists;
~
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
~ import net.lax1dude.eaglercraft.v1_8.internal.FileChooserResult;
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerFolderResourcePack;
~ import net.lax1dude.eaglercraft.v1_8.minecraft.GuiScreenGenericErrorMessage;
> DELETE 5 @ 5 : 9
> CHANGE 24 : 25 @ 24 : 25
~ List arraylist = Lists.newArrayList(resourcepackrepository.getRepositoryEntriesAll());
> CHANGE 2 : 5 @ 2 : 4
~ for (int i = 0, l = arraylist.size(); i < l; ++i) {
~ this.availableResourcePacks
~ .add(new ResourcePackListEntryFound(this, (ResourcePackRepository.Entry) arraylist.get(i)));
> CHANGE 2 : 6 @ 2 : 5
~ arraylist = Lists.reverse(resourcepackrepository.getRepositoryEntries());
~ for (int i = 0, l = arraylist.size(); i < l; ++i) {
~ this.selectedResourcePacks
~ .add(new ResourcePackListEntryFound(this, (ResourcePackRepository.Entry) arraylist.get(i)));
> CHANGE 38 : 39 @ 38 : 39
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 2 : 3 @ 2 : 39
~ EagRuntime.displayFileChooser("application/zip", "zip");
> CHANGE 2 : 3 @ 2 : 3
~ ArrayList<ResourcePackRepository.Entry> arraylist = Lists.newArrayList();
> CHANGE 1 : 3 @ 1 : 2
~ for (int i = 0, l = this.selectedResourcePacks.size(); i < l; ++i) {
~ ResourcePackListEntry resourcepacklistentry = this.selectedResourcePacks.get(i);
> CHANGE 10 : 12 @ 10 : 11
~ for (int i = 0, l = arraylist.size(); i < l; ++i) {
~ ResourcePackRepository.Entry resourcepackrepository$entry = arraylist.get(i);
> INSERT 6 : 8 @ 6
+ this.mc.loadingScreen.eaglerShow(I18n.format("resourcePack.load.refreshing"),
+ I18n.format("resourcePack.load.pleaseWait"));
> DELETE 3 @ 3 : 4
> CHANGE 6 : 57 @ 6 : 7
~ public void updateScreen() {
~ FileChooserResult packFile = null;
~ if (EagRuntime.fileChooserHasResult()) {
~ packFile = EagRuntime.getFileChooserResult();
~ }
~ if (packFile == null) {
~ return;
~ }
~ mc.loadingScreen.eaglerShow(I18n.format("resourcePack.load.loading"), packFile.fileName);
~ try {
~ EaglerFolderResourcePack.importResourcePack(packFile.fileName, EaglerFolderResourcePack.RESOURCE_PACKS,
~ packFile.fileData);
~ } catch (IOException e) {
~ logger.error("Could not load resource pack: {}", packFile.fileName);
~ logger.error(e);
~ mc.displayGuiScreen(new GuiScreenGenericErrorMessage("resourcePack.importFailed.1",
~ "resourcePack.importFailed.2", parentScreen));
~ return;
~ }
~
~ ArrayList<ResourcePackRepository.Entry> arraylist = Lists.newArrayList();
~
~ for (int i = 0, l = this.selectedResourcePacks.size(); i < l; ++i) {
~ ResourcePackListEntry resourcepacklistentry = this.selectedResourcePacks.get(i);
~ if (resourcepacklistentry instanceof ResourcePackListEntryFound) {
~ arraylist.add(((ResourcePackListEntryFound) resourcepacklistentry).func_148318_i());
~ }
~ }
~
~ Collections.reverse(arraylist);
~ this.mc.getResourcePackRepository().setRepositories(arraylist);
~ this.mc.gameSettings.resourcePacks.clear();
~ this.mc.gameSettings.field_183018_l.clear();
~
~ for (int i = 0, l = arraylist.size(); i < l; ++i) {
~ ResourcePackRepository.Entry resourcepackrepository$entry = arraylist.get(i);
~ this.mc.gameSettings.resourcePacks.add(resourcepackrepository$entry.getResourcePackName());
~ if (resourcepackrepository$entry.func_183027_f() != 1) {
~ this.mc.gameSettings.field_183018_l.add(resourcepackrepository$entry.getResourcePackName());
~ }
~ }
~
~ this.mc.gameSettings.saveOptions();
~
~ boolean wasChanged = this.changed;
~ this.changed = false;
~ this.initGui();
~ this.changed = wasChanged;
~ }
~
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
> EOF
@@ -0,0 +1,62 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 4 @ 2 : 6
~ import net.lax1dude.eaglercraft.v1_8.EagRuntime;
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
> DELETE 2 @ 2 : 3
> CHANGE 22 : 28 @ 22 : 23
~ if (EagRuntime.requireSSL()) {
~ this.field_146302_g = new GuiTextField(2, this.fontRendererObj, this.width / 2 - 100, this.height / 4 + 35,
~ 200, 20);
~ } else {
~ this.field_146302_g = new GuiTextField(2, this.fontRendererObj, this.width / 2 - 100, 116, 200, 20);
~ }
> CHANGE 3 : 4 @ 3 : 5
~ ((GuiButton) this.buttonList.get(0)).enabled = this.field_146302_g.getText().trim().length() > 0;
> CHANGE 8 : 9 @ 8 : 9
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 4 : 5 @ 4 : 5
~ this.field_146301_f.serverIP = this.field_146302_g.getText().trim();
> CHANGE 6 : 7 @ 6 : 7
~ protected void keyTyped(char parChar1, int parInt1) {
> CHANGE 1 : 2 @ 1 : 3
~ ((GuiButton) this.buttonList.get(0)).enabled = this.field_146302_g.getText().trim().length() > 0;
> CHANGE 6 : 7 @ 6 : 7
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
> CHANGE 8 : 19 @ 8 : 10
~ if (EagRuntime.requireSSL()) {
~ this.drawString(this.fontRendererObj, I18n.format("addServer.enterIp", new Object[0]), this.width / 2 - 100,
~ this.height / 4 + 19, 10526880);
~ this.drawCenteredString(this.fontRendererObj, I18n.format("addServer.SSLWarn1"), this.width / 2,
~ this.height / 4 + 30 + 37, 0xccccff);
~ this.drawCenteredString(this.fontRendererObj, I18n.format("addServer.SSLWarn2"), this.width / 2,
~ this.height / 4 + 30 + 49, 0xccccff);
~ } else {
~ this.drawString(this.fontRendererObj, I18n.format("addServer.enterIp", new Object[0]), this.width / 2 - 100,
~ 100, 10526880);
~ }
> EOF
@@ -0,0 +1,10 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 3
> EOF
@@ -0,0 +1,158 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 5 : 6 @ 5
+ import java.util.ArrayList;
> CHANGE 2 : 7 @ 2 : 3
~
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
~ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenLANConnect;
~ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenLANNotSupported;
~ import net.lax1dude.eaglercraft.v1_8.sp.lan.LANServerController;
> CHANGE 1 : 2 @ 1 : 9
~ import net.minecraft.client.audio.PositionedSoundRecord;
> INSERT 2 : 3 @ 2
+ import net.minecraft.util.ResourceLocation;
> DELETE 2 @ 2 : 3
> DELETE 1 @ 1 : 2
> DELETE 1 @ 1 : 3
> INSERT 1 : 11 @ 1
+ import net.lax1dude.eaglercraft.v1_8.Mouse;
+ import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType;
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
+ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
+ import net.lax1dude.eaglercraft.v1_8.sp.SingleplayerServerController;
+ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenBackupWorldSelection;
+ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenCreateWorldSelection;
+ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenIntegratedServerBusy;
+ import net.lax1dude.eaglercraft.v1_8.sp.gui.GuiScreenLANInfo;
+
> INSERT 17 : 19 @ 17
+ private boolean hasRequestedWorlds = false;
+ private boolean waitingForWorlds = false;
> INSERT 3 : 4 @ 3
+ this.field_146639_s = new ArrayList();
> DELETE 4 @ 4 : 13
> INSERT 13 : 30 @ 13
+ public void updateScreen() {
+ if (!hasRequestedWorlds && SingleplayerServerController.isReady()) {
+ hasRequestedWorlds = true;
+ waitingForWorlds = true;
+ this.mc.getSaveLoader().flushCache();
+ this.mc.displayGuiScreen(new GuiScreenIntegratedServerBusy(this, "singleplayer.busy.listingworlds",
+ "singleplayer.failed.listingworlds", SingleplayerServerController::isReady, (t, u) -> {
+ GuiScreenIntegratedServerBusy tt = (GuiScreenIntegratedServerBusy) t;
+ Minecraft.getMinecraft().displayGuiScreen(
+ GuiScreenIntegratedServerBusy.createException(parentScreen, tt.failMessage, u));
+ }));
+ } else if (waitingForWorlds && SingleplayerServerController.isReady()) {
+ waitingForWorlds = false;
+ this.func_146627_h();
+ }
+ }
+
> CHANGE 5 : 6 @ 5 : 6
~ private void func_146627_h() {
> CHANGE 29 : 30 @ 29 : 30
~ I18n.format("selectWorld.backup", new Object[0])));
> CHANGE 8 : 9 @ 8 : 9
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 11 : 13 @ 11 : 12
~ hasRequestedWorlds = false; // force refresh
~ this.mc.displayGuiScreen(new GuiScreenCreateWorldSelection(this));
> INSERT 1 : 2 @ 1
+ hasRequestedWorlds = false; // force refresh
> CHANGE 4 : 8 @ 4 : 11
~ hasRequestedWorlds = false; // force refresh
~ this.mc.displayGuiScreen(
~ new GuiScreenBackupWorldSelection(this, this.func_146621_a(this.field_146640_r),
~ ((SaveFormatComparator) field_146639_s.get(this.field_146640_r)).levelDat));
> INSERT 32 : 33 @ 32
+ hasRequestedWorlds = false; // force refresh
> DELETE 1 @ 1 : 2
> CHANGE 1 : 5 @ 1 : 7
~ this.mc.displayGuiScreen(new GuiScreenIntegratedServerBusy(this, "singleplayer.busy.deleting",
~ "singleplayer.failed.deleting", SingleplayerServerController::isReady));
~ } else {
~ this.mc.displayGuiScreen(this);
> DELETE 1 @ 1 : 3
> INSERT 7 : 22 @ 7
+
+ GlStateManager.pushMatrix();
+ GlStateManager.scale(0.75f, 0.75f, 0.75f);
+
+ String text = I18n.format("directConnect.lanWorld");
+ int w = mc.fontRendererObj.getStringWidth(text);
+ boolean hover = i > 1 && j > 1 && i < (w * 3 / 4) + 7 && j < 12;
+ if (hover) {
+ Mouse.showCursor(EnumCursorType.HAND);
+ }
+
+ drawString(mc.fontRendererObj, EnumChatFormatting.UNDERLINE + text, 5, 5, hover ? 0xFFEEEE22 : 0xFFCCCCCC);
+
+ GlStateManager.popMatrix();
+
> INSERT 3 : 19 @ 3
+ @Override
+ public void mouseClicked(int xx, int yy, int btn) {
+ String text = I18n.format("directConnect.lanWorld");
+ int w = mc.fontRendererObj.getStringWidth(text);
+ if (xx > 2 && yy > 2 && xx < (w * 3 / 4) + 5 && yy < 12) {
+ if (LANServerController.supported()) {
+ mc.displayGuiScreen(GuiScreenLANInfo.showLANInfoScreen(new GuiScreenLANConnect(this)));
+ } else {
+ mc.displayGuiScreen(new GuiScreenLANNotSupported(this));
+ }
+ mc.getSoundHandler()
+ .playSound(PositionedSoundRecord.create(new ResourceLocation("gui.button.press"), 1.0F));
+ }
+ super.mouseClicked(xx, yy, btn);
+ }
+
> EOF
@@ -0,0 +1,18 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 5
> CHANGE 11 : 12 @ 11 : 12
~ protected void keyTyped(char parChar1, int parInt1) {
> CHANGE 16 : 17 @ 16 : 17
~ protected void actionPerformed(GuiButton parGuiButton) {
> EOF
@@ -0,0 +1,14 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 2 : 3 @ 2
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 1 @ 1 : 4
> EOF
@@ -0,0 +1,63 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 2 : 8 @ 2
+ import net.lax1dude.eaglercraft.v1_8.Mouse;
+ import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType;
+ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
+ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
+ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
> DELETE 1 @ 1 : 4
> DELETE 1 @ 1 : 2
> DELETE 2 @ 2 : 3
> INSERT 2 : 5 @ 2
+
+ private static final Logger excLogger = LogManager.getLogger("GuiSlotRenderer");
+
> CHANGE 64 : 65 @ 64 : 65
~ return (this.getSize() + 1) * this.slotHeight + this.headerPadding;
> CHANGE 109 : 110 @ 109 : 110
~ this.drawSelectionBox(k, l, mouseXIn, mouseYIn, this.getSize());
> CHANGE 168 : 169 @ 168 : 170
~ protected void drawSelectionBox(int mouseXIn, int mouseYIn, int parInt3, int parInt4, int i) {
> INSERT 3 : 6 @ 3
+ int mx = Mouse.getX();
+ int my = Mouse.getY();
+
> INSERT 31 : 34 @ 31
+ if (parInt3 >= i1 && parInt3 <= j1 && parInt4 >= k - 2 && parInt4 <= k + l + 1) {
+ Mouse.showCursor(EnumCursorType.HAND);
+ }
> CHANGE 2 : 9 @ 2 : 3
~ try {
~ this.drawSlot(j, mouseXIn, k, l, parInt3, parInt4);
~ } catch (Throwable t) {
~ excLogger.error(
~ "Exception caught rendering a slot of a list on the screen! Game will continue running due to the suspicion that this could be an intentional crash attempt, and therefore it would be inconvenient if the user were to be locked out of this gui due to repeatedly triggering a full crash report");
~ excLogger.error(t);
~ }
> EOF
@@ -0,0 +1,16 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 2 : 3 @ 2
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 1 @ 1 : 3
> DELETE 4 @ 4 : 5
> EOF
@@ -0,0 +1,47 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 4 : 7 @ 4 : 9
~
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
~ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
> DELETE 1 @ 1 : 2
> CHANGE 11 : 12 @ 11 : 12
~ protected String text = "";
> INSERT 44 : 56 @ 44
+ public void updateText(String parString1) {
+ if (this.field_175209_y.apply(parString1)) {
+ if (parString1.length() > this.maxStringLength) {
+ this.text = parString1.substring(0, this.maxStringLength);
+ } else {
+ this.text = parString1;
+ }
+
+ this.setCursorPosition(cursorPosition);
+ }
+ }
+
> CHANGE 353 : 356 @ 353 : 354
~ GlStateManager.color(0.2F, 0.2F, 1.0F, 1.0F);
~ GlStateManager.enableBlend();
~ GlStateManager.blendFunc(775, 770);
> DELETE 1 @ 1 : 3
> CHANGE 6 : 7 @ 6 : 7
~ GlStateManager.disableBlend();
> EOF
@@ -0,0 +1,18 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 3
> INSERT 2 : 5 @ 2
+
+ import com.google.common.collect.Lists;
+
> DELETE 1 @ 1 : 2
> EOF
@@ -0,0 +1,46 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 3 : 4 @ 3 : 9
~
> INSERT 8 : 11 @ 8
+ /**
+ * + An array of all of GameSettings.Options's video options.
+ */
> CHANGE 2 : 10 @ 2 : 7
~ GameSettings.Options.FRAMERATE_LIMIT, GameSettings.Options.EAGLER_VSYNC, GameSettings.Options.ANAGLYPH,
~ GameSettings.Options.VIEW_BOBBING, GameSettings.Options.GUI_SCALE, GameSettings.Options.GAMMA,
~ GameSettings.Options.RENDER_CLOUDS, GameSettings.Options.PARTICLES, GameSettings.Options.FXAA,
~ GameSettings.Options.MIPMAP_LEVELS, GameSettings.Options.BLOCK_ALTERNATIVES,
~ GameSettings.Options.ENTITY_SHADOWS, GameSettings.Options.FOG, GameSettings.Options.EAGLER_DYNAMIC_LIGHTS,
~ GameSettings.Options.FULLSCREEN, GameSettings.Options.FNAW_SKINS, GameSettings.Options.HUD_FPS,
~ GameSettings.Options.HUD_COORDS, GameSettings.Options.HUD_PLAYER, GameSettings.Options.HUD_STATS,
~ GameSettings.Options.HUD_WORLD, GameSettings.Options.HUD_24H, GameSettings.Options.CHUNK_FIX };
> CHANGE 11 : 13 @ 11 : 31
~ this.optionsRowList = new GuiOptionsRowList(this.mc, this.width, this.height, 32, this.height - 32, 25,
~ videoOptions);
> CHANGE 7 : 8 @ 7 : 8
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 9 : 10 @ 9 : 10
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
> INSERT 8 : 9 @ 8
+ this.mc.voiceOverlay.setResolution(j, k);
> EOF
@@ -0,0 +1,47 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 3
> DELETE 1 @ 1 : 2
> CHANGE 3 : 13 @ 3 : 4
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
~
~ import com.google.common.base.Charsets;
~ import com.google.common.collect.Lists;
~
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
~ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
~ import net.lax1dude.eaglercraft.v1_8.profile.EaglerProfile;
> DELETE 2 @ 2 : 5
> DELETE 1 @ 1 : 2
> DELETE 4 @ 4 : 7
> CHANGE 28 : 29 @ 28 : 29
~ protected void keyTyped(char parChar1, int parInt1) {
> CHANGE 28 : 29 @ 28 : 29
~ EaglercraftRandom random = new EaglercraftRandom(8124371L);
> CHANGE 4 : 5 @ 4 : 5
~ for (s = s.replaceAll("PLAYERNAME", EaglerProfile.getName()); s
> CHANGE 22 : 23 @ 22 : 23
~ s = s.replaceAll("PLAYERNAME", EaglerProfile.getName());
> EOF
@@ -0,0 +1,55 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 4
> CHANGE 1 : 4 @ 1 : 5
~
~ import com.google.common.collect.Lists;
~
> INSERT 11 : 12 @ 11
+ private boolean opaqueBackground = false;
> CHANGE 28 : 29 @ 28 : 29
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 4 : 9 @ 4 : 5
~ if (opaqueBackground) {
~ this.drawBackground(0);
~ } else {
~ this.drawDefaultBackground();
~ }
> CHANGE 3 : 5 @ 3 : 5
~ for (int l = 0, m = this.field_175298_s.size(); l < m; ++l) {
~ this.drawCenteredString(this.fontRendererObj, this.field_175298_s.get(l), this.width / 2, k, 16777215);
> CHANGE 9 : 11 @ 9 : 11
~ for (int l = 0, m = this.buttonList.size(); l < m; ++l) {
~ this.buttonList.get(l).enabled = false;
> CHANGE 7 : 9 @ 7 : 9
~ for (int l = 0, m = this.buttonList.size(); l < m; ++l) {
~ this.buttonList.get(l).enabled = true;
> INSERT 4 : 9 @ 4
+
+ public GuiYesNo withOpaqueBackground() {
+ opaqueBackground = true;
+ return this;
+ }
> EOF
@@ -0,0 +1,38 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 3
> INSERT 1 : 6 @ 1
+
+ import com.google.common.collect.Maps;
+
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
+ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
> DELETE 1 @ 1 : 2
> DELETE 1 @ 1 : 2
> INSERT 65 : 66 @ 65
+ int c;
> CHANGE 1 : 2 @ 1 : 2
~ c = (i + i / 128 & 1) * 8 + 16 << 24;
> CHANGE 1 : 2 @ 1 : 2
~ c = MapColor.mapColorArray[j / 4].func_151643_b(j & 3);
> INSERT 1 : 2 @ 1
+ this.mapTextureData[i] = (c & 0xFF00FF00) | ((c & 0x00FF0000) >> 16) | ((c & 0x000000FF) << 16);
> EOF
@@ -0,0 +1,19 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 7
> CHANGE 22 : 24 @ 22 : 23
~ for (int j = 0; j < field_146399_a.length; ++j) {
~ GameSettings.Options gamesettings$options = field_146399_a[j];
> CHANGE 16 : 17 @ 16 : 17
~ protected void actionPerformed(GuiButton parGuiButton) {
> EOF
@@ -0,0 +1,78 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 10
> CHANGE 1 : 5 @ 1 : 3
~
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 1 @ 1 : 5
> CHANGE 1 : 2 @ 1 : 4
~ import net.minecraft.client.resources.I18n;
> DELETE 2 @ 2 : 5
> DELETE 3 @ 3 : 5
> DELETE 6 @ 6 : 7
> CHANGE 1 : 2 @ 1 : 3
~ long field_148298_f;
> DELETE 5 @ 5 : 7
> DELETE 8 @ 8 : 25
> CHANGE 8 : 18 @ 8 : 11
~ for (int k1 = 0; k1 < 2; ++k1) {
~ if (k1 < list.size()) {
~ this.mc.fontRendererObj.drawString((String) list.get(k1), j + 32 + 3,
~ k + 12 + this.mc.fontRendererObj.FONT_HEIGHT * k1, 8421504);
~ } else if (k1 == 1) {
~ this.mc.fontRendererObj.drawString(
~ this.field_148301_e.hideAddress ? I18n.format("selectServer.hiddenAddress", new Object[0])
~ : this.field_148301_e.serverIP,
~ j + 32 + 3, k + 12 + this.mc.fontRendererObj.FONT_HEIGHT * k1 + k1, 0x444444);
~ }
> CHANGE 49 : 53 @ 49 : 54
~ if (this.mc.gameSettings.touchscreen || flag) {
~ GlStateManager.enableShaderBlendAdd();
~ GlStateManager.setShaderBlendSrc(0.6f, 0.6f, 0.6f, 1.0f);
~ GlStateManager.setShaderBlendAdd(0.3f, 0.3f, 0.3f, 0.0f);
> CHANGE 1 : 3 @ 1 : 4
~ if (field_148301_e.iconTextureObject != null) {
~ this.func_178012_a(j, k, field_148301_e.iconResourceLocation);
> INSERT 3 : 6 @ 3
+ if (this.mc.gameSettings.touchscreen || flag) {
+ GlStateManager.disableShaderBlendAdd();
+ }
> CHANGE 11 : 12 @ 11 : 12
~ // Gui.drawRect(j, k, j + 32, k + 32, -1601138544);
> INSERT 33 : 34 @ 33
+ GlStateManager.blendFunc(770, 771);
> DELETE 8 @ 8 : 47
> EOF
@@ -0,0 +1,137 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 3
> INSERT 1 : 7 @ 1
+
+ import com.google.common.collect.Lists;
+
+ import net.lax1dude.eaglercraft.v1_8.sp.lan.LANServerController;
+ import net.lax1dude.eaglercraft.v1_8.sp.lan.LANServerList;
+ import net.lax1dude.eaglercraft.v1_8.sp.relay.RelayManager;
> DELETE 1 @ 1 : 6
> CHANGE 1 : 2 @ 1 : 2
~ import net.minecraft.client.resources.I18n;
> DELETE 4 @ 4 : 6
> INSERT 2 : 4 @ 2
+ private final ServerListEntryNormal serverListEntryLAN;
+
> INSERT 4 : 18 @ 4
+ this.serverListEntryLAN = new ServerListEntryNormal(owner, null) {
+ @Override
+ public void drawEntry(int i, int j, int k, int l, int var5, int i1, int j1, boolean flag) {
+ //
+ }
+
+ @Override
+ public boolean mousePressed(int i, int var2, int var3, int var4, int j, int k) {
+ if (ServerSelectionList.this.selectedSlotIndex != i) {
+ super.field_148298_f = 0;
+ }
+ return super.mousePressed(i, var2, var3, var4, Math.max(j, 32), k);
+ }
+ };
> CHANGE 3 : 4 @ 3 : 4
~ if (i < getOrigSize()) {
> DELETE 1 @ 1 : 9
> INSERT 1 : 2 @ 1
+ return serverListEntryLAN;
> INSERT 2 : 6 @ 2
+ protected int getOrigSize() {
+ return this.field_148198_l.size();
+ }
+
> CHANGE 1 : 2 @ 1 : 2
~ return this.field_148198_l.size() + GuiMultiplayer.getLanServerList().countServers();
> DELETE 23 @ 23 : 32
> INSERT 7 : 69 @ 7
+
+ @Override
+ protected void drawSelectionBox(int mouseXIn, int mouseYIn, int parInt3, int parInt4, int i) {
+ super.drawSelectionBox(mouseXIn, mouseYIn, parInt3, parInt4, i + 1);
+ }
+
+ @Override
+ protected void drawSlot(int entryID, int mouseXIn, int mouseYIn, int parInt4, int parInt5, int parInt6) {
+ if (entryID < getOrigSize()) {
+ super.drawSlot(entryID, mouseXIn, mouseYIn, parInt4, parInt5, parInt6);
+ } else if (entryID < getSize()) {
+ this.func_77248_b(entryID, mouseXIn, mouseYIn, parInt4);
+ } else {
+ this.func_77249_c(entryID, mouseXIn, mouseYIn, parInt4);
+ }
+ }
+
+ private void func_77248_b(int par1, int par2, int par3, int par4) {
+ LANServerList.LanServer var6 = GuiMultiplayer.getLanServerList().getServer(par1 - getOrigSize());
+ this.owner.drawString(this.owner.fontRendererObj, I18n.format("lanServer.title"), par2 + 2, par3 + 1, 16777215);
+ this.owner.drawString(this.owner.fontRendererObj, var6.getLanServerMotd(), par2 + 2, par3 + 12, 8421504);
+
+ if (this.owner.mc.gameSettings.hideServerAddress) {
+ this.owner.drawString(this.owner.fontRendererObj, I18n.format("selectServer.hiddenAddress"), par2 + 2,
+ par3 + 12 + 11, 3158064);
+ } else {
+ this.owner.drawString(this.owner.fontRendererObj, var6.getLanServerCode(), par2 + 2, par3 + 12 + 11,
+ 0x558822);
+ }
+ }
+
+ private void func_77249_c(int par1, int par2, int par3, int par4) {
+ if (!LANServerController.supported())
+ return;
+ if (RelayManager.relayManager.count() == 0) {
+ this.owner.drawCenteredString(this.owner.fontRendererObj, I18n.format("noRelay.noRelay1"),
+ this.owner.width / 2, par3 + 6, 16777215);
+ this.owner.drawCenteredString(this.owner.fontRendererObj, I18n.format("noRelay.noRelay2"),
+ this.owner.width / 2, par3 + 18, 0xFFAAAAAA);
+ } else {
+ this.owner.drawCenteredString(this.owner.fontRendererObj, I18n.format("lanServer.scanning"),
+ this.owner.width / 2, par3 + 6, 16777215);
+ String var6;
+
+ switch (this.owner.ticksOpened / 3 % 4) {
+ case 0:
+ default:
+ var6 = "O o o";
+ break;
+
+ case 1:
+ case 3:
+ var6 = "o O o";
+ break;
+
+ case 2:
+ var6 = "o o O";
+ }
+
+ this.owner.drawCenteredString(this.owner.fontRendererObj, var6, this.owner.width / 2, par3 + 18, 8421504);
+ }
+ }
> EOF
@@ -0,0 +1,49 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 2 : 3 @ 2
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 3 @ 3 : 4
> INSERT 114 : 146 @ 114
+ public int getHeight() {
+ if (this.theAchievement != null && this.notificationTime != 0L && Minecraft.getMinecraft().thePlayer != null) {
+ double d0 = (double) (Minecraft.getSystemTime() - this.notificationTime) / 3000.0D;
+ if (!this.permanentNotification) {
+ if (d0 < 0.0D || d0 > 1.0D) {
+ this.notificationTime = 0L;
+ return 0;
+ }
+ } else if (d0 > 0.5D) {
+ d0 = 0.5D;
+ }
+
+ double d1 = d0 * 2.0D;
+ if (d1 > 1.0D) {
+ d1 = 2.0D - d1;
+ }
+
+ d1 = d1 * 4.0D;
+ d1 = 1.0D - d1;
+ if (d1 < 0.0D) {
+ d1 = 0.0D;
+ }
+
+ d1 = d1 * d1;
+ d1 = d1 * d1;
+
+ return 32 - (int) (d1 * 32.0D);
+ } else {
+ return 0;
+ }
+ }
+
> EOF
@@ -0,0 +1,65 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 7 @ 2 : 4
~ import net.lax1dude.eaglercraft.v1_8.EaglercraftRandom;
~
~ import net.lax1dude.eaglercraft.v1_8.Mouse;
~ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 6 @ 6 : 7
> DELETE 1 @ 1 : 2
> DELETE 10 @ 10 : 11
> CHANGE 43 : 44 @ 43 : 44
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 8 : 10 @ 8 : 16
~ protected int getCloseKey() {
~ return this.mc.gameSettings.keyBindInventory.getKeyCode();
> CHANGE 76 : 77 @ 76 : 77
~ GlStateManager.disableLighting();
> INSERT 61 : 65 @ 61
+ GlStateManager.enableDepth();
+ GlStateManager.clearDepth(0.0f);
+ GlStateManager.clear(256);
+ GlStateManager.clearDepth(1.0f);
> CHANGE 17 : 18 @ 17 : 18
~ EaglercraftRandom random = new EaglercraftRandom();
> CHANGE 8 : 10 @ 8 : 9
~ random.setSeed(
~ (long) (this.mc.getSession().getProfile().getId().hashCode() + k1 + l2 + (l1 + k2) * 16));
> CHANGE 1 : 2 @ 1 : 2
~ EaglerTextureAtlasSprite textureatlassprite = this.func_175371_a(Blocks.sand);
> DELETE 26 @ 26 : 27
> CHANGE 158 : 159 @ 158 : 159
~ GlStateManager.disableBlend();
> CHANGE 3 : 4 @ 3 : 4
~ private EaglerTextureAtlasSprite func_175371_a(Block parBlock) {
> EOF
@@ -0,0 +1,39 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 3
> INSERT 4 : 10 @ 4
+
+ import com.google.common.collect.Lists;
+
+ import net.lax1dude.eaglercraft.v1_8.Mouse;
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
+ import net.lax1dude.eaglercraft.v1_8.opengl.WorldRenderer;
> DELETE 6 @ 6 : 7
> DELETE 2 @ 2 : 3
> DELETE 11 @ 11 : 12
> CHANGE 71 : 72 @ 71 : 72
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 270 : 272 @ 270 : 271
~ for (int m = 0, l = StatList.objectMineStats.size(); m < l; ++m) {
~ StatCrafting statcrafting = StatList.objectMineStats.get(m);
> CHANGE 133 : 135 @ 133 : 134
~ for (int m = 0, l = StatList.itemStats.size(); m < l; ++m) {
~ StatCrafting statcrafting = StatList.itemStats.get(m);
> EOF
@@ -0,0 +1,12 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 3 : 4 @ 3
+
> EOF
@@ -0,0 +1,45 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 8 @ 2 : 4
~ import net.lax1dude.eaglercraft.v1_8.netty.Unpooled;
~ import net.lax1dude.eaglercraft.v1_8.Mouse;
~ import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType;
~ import net.lax1dude.eaglercraft.v1_8.log4j.LogManager;
~ import net.lax1dude.eaglercraft.v1_8.log4j.Logger;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 3 @ 3 : 5
> DELETE 12 @ 12 : 14
> CHANGE 80 : 81 @ 80 : 81
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 37 : 39 @ 37 : 38
~ for (int k = 0, l = this.buttonList.size(); k < l; ++k) {
~ GuiButton guibutton = this.buttonList.get(k);
> INSERT 78 : 80 @ 78
+ if (this.enabled)
+ Mouse.showCursor(EnumCursorType.HAND);
> INSERT 10 : 12 @ 10
+ if (this.enabled)
+ Mouse.showCursor(EnumCursorType.HAND);
> INSERT 17 : 19 @ 17
+ if (this.enabled)
+ Mouse.showCursor(EnumCursorType.HAND);
> EOF
@@ -0,0 +1,12 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 3 @ 2 : 4
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> EOF
@@ -0,0 +1,14 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> INSERT 2 : 3 @ 2
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 1 @ 1 : 3
> EOF
@@ -0,0 +1,74 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 3 @ 2 : 4
~ import java.util.List;
> INSERT 1 : 8 @ 1
+
+ import com.google.common.collect.Sets;
+
+ import net.lax1dude.eaglercraft.v1_8.Keyboard;
+ import net.lax1dude.eaglercraft.v1_8.minecraft.EaglerTextureAtlasSprite;
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
+ import net.lax1dude.eaglercraft.v1_8.opengl.OpenGlHelper;
> DELETE 2 @ 2 : 4
> DELETE 1 @ 1 : 2
> DELETE 8 @ 8 : 9
> INSERT 81 : 82 @ 81
+ GlStateManager.enableAlpha();
> CHANGE 107 : 108 @ 107 : 108
~ EaglerTextureAtlasSprite textureatlassprite = this.mc.getTextureMapBlocks().getAtlasSprite(s1);
> CHANGE 56 : 57 @ 56 : 57
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
> CHANGE 126 : 129 @ 126 : 127
~ List<Slot> lst = this.inventorySlots.inventorySlots;
~ for (int n = 0, m = lst.size(); n < m; ++n) {
~ Slot slot2 = lst.get(n);
> CHANGE 108 : 112 @ 108 : 110
~ protected void keyTyped(char parChar1, int parInt1) {
~ if (parInt1 == this.mc.gameSettings.keyBindClose.getKeyCode()
~ || parInt1 == this.mc.gameSettings.keyBindInventory.getKeyCode()
~ || (parInt1 == 1 && (this.mc.gameSettings.keyBindClose.getKeyCode() == 0 || this.mc.areKeysLocked()))) {
> CHANGE 1 : 3 @ 1 : 9
~ if (this.mc.currentScreen == null) {
~ this.mc.setIngameFocus();
> INSERT 1 : 12 @ 1
+ } else if (parInt1 == 1) {
+ showingCloseKey = System.currentTimeMillis();
+ } else {
+ this.checkHotbarKeys(parInt1);
+ if (this.theSlot != null && this.theSlot.getHasStack()) {
+ if (parInt1 == this.mc.gameSettings.keyBindPickBlock.getKeyCode()) {
+ this.handleMouseClick(this.theSlot, this.theSlot.slotNumber, 0, 3);
+ } else if (parInt1 == this.mc.gameSettings.keyBindDrop.getKeyCode()) {
+ this.handleMouseClick(this.theSlot, this.theSlot.slotNumber, isCtrlKeyDown() ? 1 : 0, 4);
+ }
+ }
> DELETE 1 @ 1 : 2
> EOF
@@ -0,0 +1,94 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> DELETE 2 @ 2 : 3
> INSERT 4 : 11 @ 4
+
+ import com.google.common.collect.Lists;
+
+ import net.lax1dude.eaglercraft.v1_8.Keyboard;
+ import net.lax1dude.eaglercraft.v1_8.Mouse;
+ import net.lax1dude.eaglercraft.v1_8.internal.EnumCursorType;
+ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 4 @ 4 : 7
> DELETE 19 @ 19 : 21
> CHANGE 186 : 187 @ 186 : 187
~ protected void keyTyped(char parChar1, int parInt1) {
> CHANGE 13 : 16 @ 13 : 14
~ if (parInt1 == getCloseKey() || (parInt1 == 1 && this.mc.areKeysLocked())) {
~ mc.displayGuiScreen(null);
~ } else if (!this.checkHotbarKeys(parInt1)) {
> INSERT 10 : 15 @ 10
+ protected int getCloseKey() {
+ return selectedTabIndex != CreativeTabs.tabAllSearch.getTabIndex() ? super.getCloseKey()
+ : mc.gameSettings.keyBindClose.getKeyCode();
+ }
+
> CHANGE 10 : 12 @ 10 : 11
~ for (int i = 0; i < Enchantment.enchantmentsBookList.length; ++i) {
~ Enchantment enchantment = Enchantment.enchantmentsBookList[i];
> CHANGE 12 : 15 @ 12 : 14
~ List<String> lst = itemstack.getTooltip(this.mc.thePlayer, this.mc.gameSettings.advancedItemTooltips);
~ for (int i = 0, l = lst.size(); i < l; ++i) {
~ if (EnumChatFormatting.getTextWithoutFormattingCodes(lst.get(i)).toLowerCase().contains(s1)) {
> CHANGE 24 : 25 @ 24 : 25
~ protected void mouseClicked(int parInt1, int parInt2, int parInt3) {
> CHANGE 4 : 6 @ 4 : 6
~ for (int k = 0; k < CreativeTabs.creativeTabArray.length; ++k) {
~ if (this.func_147049_a(CreativeTabs.creativeTabArray[k], i, j)) {
> CHANGE 13 : 15 @ 13 : 14
~ for (int m = 0; m < CreativeTabs.creativeTabArray.length; ++m) {
~ CreativeTabs creativetabs = CreativeTabs.creativeTabArray[m];
> CHANGE 127 : 130 @ 127 : 129
~ for (int m = 0; m < CreativeTabs.creativeTabArray.length; ++m) {
~ if (this.renderCreativeInventoryHoveringText(CreativeTabs.creativeTabArray[m], i, j)) {
~ Mouse.showCursor(EnumCursorType.HAND);
> CHANGE 24 : 26 @ 24 : 25
~ for (int m = 0; m < CreativeTabs.creativeTabArray.length; ++m) {
~ CreativeTabs creativetabs1 = CreativeTabs.creativeTabArray[m];
> CHANGE 33 : 35 @ 33 : 34
~ for (int m = 0; m < CreativeTabs.creativeTabArray.length; ++m) {
~ CreativeTabs creativetabs1 = CreativeTabs.creativeTabArray[m];
> CHANGE 114 : 115 @ 114 : 115
~ protected void actionPerformed(GuiButton parGuiButton) {
> INSERT 139 : 143 @ 139
+
+ public boolean blockPTTKey() {
+ return searchField.isFocused();
+ }
> EOF
@@ -0,0 +1,12 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 3 @ 2 : 4
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> EOF
@@ -0,0 +1,12 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 3 @ 2 : 4
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> EOF
@@ -0,0 +1,32 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 4 @ 2 : 3
~ import net.lax1dude.eaglercraft.v1_8.Keyboard;
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> DELETE 4 @ 4 : 5
> DELETE 7 @ 7 : 8
> CHANGE 34 : 35 @ 34 : 35
~ protected void actionPerformed(GuiButton parGuiButton) {
> CHANGE 9 : 10 @ 9 : 10
~ protected void keyTyped(char parChar1, int parInt1) {
> INSERT 68 : 72 @ 68
+
+ public boolean blockPTTKey() {
+ return true;
+ }
> EOF
@@ -0,0 +1,12 @@
# Eagler Context Redacted Diff
# Copyright (c) 2024 lax1dude. All rights reserved.
# Version: 1.0
# Author: lax1dude
> CHANGE 2 : 3 @ 2 : 4
~ import net.lax1dude.eaglercraft.v1_8.opengl.GlStateManager;
> EOF

Some files were not shown because too many files have changed in this diff Show More