Remove unused jars
This commit is contained in:
parent
5e4df34706
commit
a8c62a3984
|
@ -1,5 +1,5 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
<component name="ExternalStorageConfigurationManager" enabled="true" />
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" default="true" project-jdk-name="corretto-18" project-jdk-type="JavaSDK" />
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_18" default="true" project-jdk-name="corretto-18" project-jdk-type="JavaSDK" />
|
||||||
</project>
|
</project>
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -12,18 +12,11 @@ import java.nio.charset.StandardCharsets;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.util.*;
|
import java.util.*;
|
||||||
import javax.imageio.ImageIO;
|
import javax.imageio.ImageIO;
|
||||||
import org.lwjgl.LWJGLException;
|
|
||||||
import org.lwjgl.Sys;
|
|
||||||
import org.lwjgl.opengl.Display;
|
|
||||||
import org.lwjgl.opengl.DisplayMode;
|
|
||||||
import net.lax1dude.eaglercraft.EaglerAdapter;
|
|
||||||
import org.lwjgl.util.glu.GLU;
|
|
||||||
|
|
||||||
public class Minecraft
|
public class Minecraft
|
||||||
{
|
{
|
||||||
/** A 10MiB preallocation to ensure the heap is reasonably sized. */
|
/** A 10MiB preallocation to ensure the heap is reasonably sized. */
|
||||||
public static byte[] memoryReserve = new byte[10485760];
|
public static byte[] memoryReserve = new byte[10485760];
|
||||||
private static final List macDisplayModes = new ArrayList<>(List.of(new DisplayMode[]{new DisplayMode(2560, 1600), new DisplayMode(2880, 1800)}));
|
|
||||||
private ServerData currentServerData;
|
private ServerData currentServerData;
|
||||||
|
|
||||||
/** The RenderEngine instance used by Minecraft */
|
/** The RenderEngine instance used by Minecraft */
|
||||||
|
@ -496,55 +489,9 @@ public class Minecraft
|
||||||
return var4;
|
return var4;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void updateDisplayMode() throws LWJGLException
|
private void updateDisplayMode()
|
||||||
{
|
{
|
||||||
HashSet var1 = new HashSet();
|
this.updateDisplay();
|
||||||
Collections.addAll(var1, Display.getAvailableDisplayModes());
|
|
||||||
DisplayMode var2 = Display.getDesktopDisplayMode();
|
|
||||||
|
|
||||||
if (!var1.contains(var2) && Util.getOSType() == EnumOS.MACOS)
|
|
||||||
{
|
|
||||||
Iterator var3 = macDisplayModes.iterator();
|
|
||||||
|
|
||||||
while (var3.hasNext())
|
|
||||||
{
|
|
||||||
DisplayMode var4 = (DisplayMode)var3.next();
|
|
||||||
boolean var5 = true;
|
|
||||||
Iterator var6 = var1.iterator();
|
|
||||||
DisplayMode var7;
|
|
||||||
|
|
||||||
while (var6.hasNext())
|
|
||||||
{
|
|
||||||
var7 = (DisplayMode)var6.next();
|
|
||||||
|
|
||||||
if (var7.getBitsPerPixel() == 32 && var7.getWidth() == var4.getWidth() && var7.getHeight() == var4.getHeight())
|
|
||||||
{
|
|
||||||
var5 = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!var5)
|
|
||||||
{
|
|
||||||
var6 = var1.iterator();
|
|
||||||
|
|
||||||
while (var6.hasNext())
|
|
||||||
{
|
|
||||||
var7 = (DisplayMode)var6.next();
|
|
||||||
|
|
||||||
if (var7.getBitsPerPixel() == 32 && var7.getWidth() == var4.getWidth() / 2 && var7.getHeight() == var4.getHeight() / 2)
|
|
||||||
{
|
|
||||||
var2 = var7;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
Display.setDisplayMode(var2);
|
|
||||||
this.displayWidth = var2.getWidth();
|
|
||||||
this.displayHeight = var2.getHeight();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public static EnumOS getOs() {
|
public static EnumOS getOs() {
|
||||||
|
@ -1001,30 +948,24 @@ public class Minecraft
|
||||||
* currently displayed
|
* currently displayed
|
||||||
*/
|
*/
|
||||||
public void setIngameFocus()
|
public void setIngameFocus()
|
||||||
{
|
|
||||||
if (Display.isActive())
|
|
||||||
{
|
|
||||||
if (!this.inGameHasFocus)
|
|
||||||
{
|
{
|
||||||
this.inGameHasFocus = true;
|
this.inGameHasFocus = true;
|
||||||
this.mouseHelper.grabMouseCursor();
|
this.mouseHelper.grabMouseCursor();
|
||||||
this.displayGuiScreen((GuiScreen)null);
|
this.displayGuiScreen((GuiScreen)null);
|
||||||
this.leftClickCounter = 10000;
|
this.leftClickCounter = 10000;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Resets the player keystate, disables the ingame focus, and ungrabs the mouse cursor.
|
* Resets the player keystate, disables the ingame focus, and ungrabs the mouse cursor.
|
||||||
*/
|
*/
|
||||||
public void setIngameNotInFocus()
|
public void setIngameNotInFocus()
|
||||||
{
|
{
|
||||||
if (this.inGameHasFocus)
|
//if (this.inGameHasFocus)
|
||||||
{
|
//{
|
||||||
KeyBinding.unPressAllKeys();
|
KeyBinding.unPressAllKeys();
|
||||||
this.inGameHasFocus = false;
|
this.inGameHasFocus = false;
|
||||||
this.mouseHelper.ungrabMouseCursor();
|
this.mouseHelper.ungrabMouseCursor();
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -1162,56 +1103,7 @@ public class Minecraft
|
||||||
*/
|
*/
|
||||||
public void toggleFullscreen()
|
public void toggleFullscreen()
|
||||||
{
|
{
|
||||||
try
|
|
||||||
{
|
|
||||||
this.fullscreen = !this.fullscreen;
|
|
||||||
|
|
||||||
if (this.fullscreen)
|
|
||||||
{
|
|
||||||
this.updateDisplayMode();
|
|
||||||
this.displayWidth = Display.getDisplayMode().getWidth();
|
|
||||||
this.displayHeight = Display.getDisplayMode().getHeight();
|
|
||||||
|
|
||||||
if (this.displayWidth <= 0)
|
|
||||||
{
|
|
||||||
this.displayWidth = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.displayHeight <= 0)
|
|
||||||
{
|
|
||||||
this.displayHeight = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
Display.setDisplayMode(new DisplayMode(this.tempDisplayWidth, this.tempDisplayHeight));
|
|
||||||
this.displayWidth = this.tempDisplayWidth;
|
|
||||||
this.displayHeight = this.tempDisplayHeight;
|
|
||||||
|
|
||||||
if (this.displayWidth <= 0)
|
|
||||||
{
|
|
||||||
this.displayWidth = 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.displayHeight <= 0)
|
|
||||||
{
|
|
||||||
this.displayHeight = 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (this.currentScreen != null)
|
|
||||||
{
|
|
||||||
this.resize(this.displayWidth, this.displayHeight);
|
|
||||||
}
|
|
||||||
|
|
||||||
Display.setFullscreen(this.fullscreen);
|
|
||||||
Display.setVSyncEnabled(this.gameSettings.enableVsync);
|
|
||||||
Display.update();
|
|
||||||
}
|
|
||||||
catch (Exception var2)
|
|
||||||
{
|
|
||||||
var2.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Loading…
Reference in New Issue