25w14c remove vsync

This commit is contained in:
Catfoolyou
2025-04-05 15:15:54 -04:00
parent 2a263f8941
commit 1f1add8840
17 changed files with 42333 additions and 42519 deletions

View File

@@ -5,7 +5,7 @@ import java.util.List;
public class ConfigConstants {
public static final String version = "25w14b";
public static final String version = "25w14c";
public static final String mainMenuString = "Eaglercraft " + version;
public static final String forkMe = "https://git.zelz.net/catfoolyou/Project164";

View File

@@ -6,10 +6,9 @@ public enum EnumOptions {
/*ADVANCED_OPENGL("options.advancedOpengl", false, true),*/ FRAMERATE_LIMIT("options.framerateLimit", false, false), DIFFICULTY("options.difficulty", false, false), GRAPHICS("options.graphics", false, false),
AMBIENT_OCCLUSION("options.ao", false, false), GUI_SCALE("options.guiScale", false, false), RENDER_CLOUDS("options.renderClouds", false, true), PARTICLES("options.particles", false, false),
CHAT_VISIBILITY("options.chat.visibility", false, false), CHAT_COLOR("options.chat.color", false, true), CHAT_LINKS("options.chat.links", false, true), CHAT_OPACITY("options.chat.opacity", true, false),
CHAT_LINKS_PROMPT("options.chat.links.prompt", false, true), USE_SERVER_TEXTURES("options.serverTextures", false, true), SNOOPER_ENABLED("options.snooper", false, true), ENABLE_FOG("options.fog", false, true),
CHAT_LINKS_PROMPT("options.chat.links.prompt", false, true), USE_SERVER_TEXTURES("options.serverTextures", false, true), ENABLE_FOG("options.fog", false, true),
SHOW_CAPE("options.showCape", false, true), ANTIALIASING("options.framebufferAntialias", false, false), CHAT_SCALE("options.chat.scale", true, false), CHAT_WIDTH("options.chat.width", true, false),
CHAT_HEIGHT_FOCUSED("options.chat.height.focused", true, false), CHAT_HEIGHT_UNFOCUSED("options.chat.height.unfocused", true, false), CHUNK_UPDATES("options.chunkUpdates", false, false), ADDERALL("options.adderall", false, true),
VSYNC("options.vsync", false, true);
CHAT_HEIGHT_FOCUSED("options.chat.height.focused", true, false), CHAT_HEIGHT_UNFOCUSED("options.chat.height.unfocused", true, false), CHUNK_UPDATES("options.chunkUpdates", false, false), ADDERALL("options.adderall", false, true);
private final boolean enumFloat;
private final boolean enumBoolean;

View File

@@ -78,15 +78,6 @@ class EnumOptionsHelper
;
}
try
{
enumOptionsMappingHelperArray[EnumOptions.VSYNC.ordinal()] = 12;
}
catch (NoSuchFieldError var3)
{
;
}
try
{
enumOptionsMappingHelperArray[EnumOptions.SHOW_CAPE.ordinal()] = 13;

View File

@@ -348,10 +348,6 @@ public class GameSettings {
this.mc.sndManager.stopAllSounds();
}
if (par1EnumOptions == EnumOptions.VSYNC) {
this.enableVsync = !this.enableVsync;
}
this.saveOptions();
}

View File

@@ -4,9 +4,6 @@ import net.lax1dude.eaglercraft.ConfigConstants;
import net.lax1dude.eaglercraft.EaglerAdapter;
import net.lax1dude.eaglercraft.GuiNetworkSettingsButton;
import net.lax1dude.eaglercraft.GuiScreenConnectOption;
import net.lax1dude.eaglercraft.GuiScreenLANConnecting;
import net.lax1dude.eaglercraft.LANServerList;
import net.lax1dude.eaglercraft.LANServerList.LanServer;
import net.lax1dude.eaglercraft.RelayServer;
public class GuiMultiplayer extends GuiScreen {
@@ -58,7 +55,6 @@ public class GuiMultiplayer extends GuiScreen {
/** How many ticks this Gui is already opened */
private int ticksOpened;
private static LANServerList lanServerList = null;
private static long lastCooldown = 0l;
private static long lastRefresh = 0l;
@@ -71,9 +67,6 @@ public class GuiMultiplayer extends GuiScreen {
this.parentScreen = par1GuiScreen;
this.relaysButton = new GuiNetworkSettingsButton(this);
isLockedOut = false;
if(lanServerList != null) {
lanServerList.forceRefresh();
}
}
public static void tickRefreshCooldown() {
@@ -119,13 +112,6 @@ public class GuiMultiplayer extends GuiScreen {
internetServerList.loadServerList();
}
}
if(lanServerList == null) {
lanServerList = new LANServerList();
}else {
if(testIfCanRefresh()) {
lanServerList.forceRefresh();
}
}
this.serverSlotContainer = new GuiSlotServer(this);
} else {
this.serverSlotContainer.func_77207_a(this.width, this.height, 32, this.height - 64);
@@ -158,7 +144,6 @@ public class GuiMultiplayer extends GuiScreen {
public void updateScreen() {
super.updateScreen();
internetServerList.updateServerPing();
lanServerList.update();
++this.ticksOpened;
}
@@ -367,11 +352,6 @@ public class GuiMultiplayer extends GuiScreen {
this.connectToServer(this.internetServerList.getServerData(par1));
} else {
par1 -= internetServerList.countServers();
if (par1 < lanServerList.countServers()) {
LanServer var2 = lanServerList.getServer(par1);
connectToLAN("Connecting to '" + var2.getLanServerMotd() + "'...", var2.getLanServerCode(), var2.getLanServerRelay());
}
}
}
@@ -379,11 +359,6 @@ public class GuiMultiplayer extends GuiScreen {
this.mc.displayGuiScreen(new GuiConnecting(this, this.mc, par1ServerData));
}
private void connectToLAN(String text, String code, RelayServer uri) {
this.mc.loadingScreen.resetProgresAndWorkingMessage(text);
this.mc.displayGuiScreen(new GuiScreenLANConnecting(this, code, uri));
}
protected void func_74007_a(String par1Str, int par2, int par3) {
if (par1Str != null) {
if(par1Str.indexOf('\n') >= 0) {
@@ -423,12 +398,8 @@ public class GuiMultiplayer extends GuiScreen {
return internetServerList;
}
static LANServerList getListOfLanServers(GuiMultiplayer par0GuiMultiplayer) {
return lanServerList;
}
static int getSelectedServer(GuiMultiplayer par0GuiMultiplayer) {
int i = internetServerList.countServers() + lanServerList.countServers();
int i = internetServerList.countServers();
if(par0GuiMultiplayer.selectedServer >= i && par0GuiMultiplayer.selectedServer > 0) {
par0GuiMultiplayer.selectedServer = i - 1;
}

View File

@@ -2,10 +2,8 @@ package net.minecraft.src;
import net.lax1dude.eaglercraft.EaglerAdapter;
import net.lax1dude.eaglercraft.IntegratedServer;
import net.lax1dude.eaglercraft.LANServerList.LanServer;
import net.lax1dude.eaglercraft.TextureLocation;
import net.lax1dude.eaglercraft.adapter.Tessellator;
import net.minecraft.src.Minecraft;
class GuiSlotServer extends GuiSlot {
/** Instance to the GUI this list is on. */
@@ -23,7 +21,7 @@ class GuiSlotServer extends GuiSlot {
* Gets the size of the current slot list.
*/
protected int getSize() {
return GuiMultiplayer.getInternetServerList(this.parentGui).countServers() + GuiMultiplayer.getListOfLanServers(this.parentGui).countServers() + 1;
return GuiMultiplayer.getInternetServerList(this.parentGui).countServers() + 1;
}
/**
@@ -31,7 +29,7 @@ class GuiSlotServer extends GuiSlot {
* clicked or not
*/
protected void elementClicked(int par1, boolean par2) {
if (par1 < GuiMultiplayer.getInternetServerList(this.parentGui).countServers() + GuiMultiplayer.getListOfLanServers(this.parentGui).countServers()) {
if (par1 < GuiMultiplayer.getInternetServerList(this.parentGui).countServers()) {
int var3 = GuiMultiplayer.getSelectedServer(this.parentGui);
GuiMultiplayer.getAndSetSelectedServer(this.parentGui, par1);
ServerData var4 = GuiMultiplayer.getInternetServerList(this.parentGui).countServers() > par1 ? GuiMultiplayer.getInternetServerList(this.parentGui).getServerData(par1) : null;
@@ -73,32 +71,24 @@ class GuiSlotServer extends GuiSlot {
this.func_77247_d(par1, par2 - 28, par3, par4, par5Tessellator);
}catch(Throwable t) {
}
} else if (par1 < GuiMultiplayer.getInternetServerList(this.parentGui).countServers()
+ GuiMultiplayer.getListOfLanServers(this.parentGui).countServers()) {
try {
this.func_77248_b(par1, par2, par3, par4, par5Tessellator);
}catch(Throwable t) {
}
} else {
}
else {
this.func_77249_c(par1, par2, par3, par4, par5Tessellator);
}
}
private void func_77248_b(int par1, int par2, int par3, int par4, Tessellator par5Tessellator) {
LanServer var6 = (LanServer) GuiMultiplayer.getListOfLanServers(this.parentGui)
.getServer(par1 - GuiMultiplayer.getInternetServerList(this.parentGui).countServers());
this.parentGui.drawString(this.parentGui.fontRenderer, StatCollector.translateToLocal("lanServer.title"),
par2 + 2, par3 + 1, 16777215);
this.parentGui.drawString(this.parentGui.fontRenderer, var6.getLanServerMotd(), par2 + 2, par3 + 12, 8421504);
if (this.parentGui.mc.gameSettings.hideServerAddress) {
this.parentGui.drawString(this.parentGui.fontRenderer,
StatCollector.translateToLocal("selectServer.hiddenAddress"), par2 + 2, par3 + 12 + 11, 3158064);
} else {
this.parentGui.drawString(this.parentGui.fontRenderer, var6.getLanServerCode(), par2 + 2, par3 + 12 + 11,
0x558822);
}
}
// private void func_77248_b(int par1, int par2, int par3, int par4, Tessellator par5Tessellator) {
// LanServer var6 = (LanServer) GuiMultiplayer.getListOfLanServers(this.parentGui).getServer(par1 - GuiMultiplayer.getInternetServerList(this.parentGui).countServers());
// this.parentGui.drawString(this.parentGui.fontRenderer, StatCollector.translateToLocal("lanServer.title"), par2 + 2, par3 + 1, 16777215);
// this.parentGui.drawString(this.parentGui.fontRenderer, var6.getLanServerMotd(), par2 + 2, par3 + 12, 8421504);
//
// if (this.parentGui.mc.gameSettings.hideServerAddress) {
// this.parentGui.drawString(this.parentGui.fontRenderer, StatCollector.translateToLocal("selectServer.hiddenAddress"), par2 + 2, par3 + 12 + 11, 3158064);
// } else {
// this.parentGui.drawString(this.parentGui.fontRenderer, var6.getLanServerCode(), par2 + 2, par3 + 12 + 11,
// 0x558822);
// }
// }
private void func_77249_c(int par1, int par2, int par3, int par4, Tessellator par5Tessellator) {
if(IntegratedServer.relayManager.count() == 0) {

View File

@@ -16,7 +16,7 @@ public class GuiVideoSettings extends GuiScreen
private boolean is64bit;
/** An array of all of EnumOption's video options. */
private static EnumOptions[] videoOptions = new EnumOptions[] {EnumOptions.GRAPHICS, EnumOptions.RENDER_DISTANCE, EnumOptions.AMBIENT_OCCLUSION, EnumOptions.FRAMERATE_LIMIT, EnumOptions.ANAGLYPH, EnumOptions.VIEW_BOBBING, EnumOptions.GUI_SCALE, EnumOptions.GAMMA, EnumOptions.RENDER_CLOUDS, EnumOptions.PARTICLES, EnumOptions.USE_SERVER_TEXTURES, EnumOptions.VSYNC};
private static EnumOptions[] videoOptions = new EnumOptions[] {EnumOptions.GRAPHICS, EnumOptions.RENDER_DISTANCE, EnumOptions.AMBIENT_OCCLUSION, EnumOptions.FRAMERATE_LIMIT, EnumOptions.ANAGLYPH, EnumOptions.VIEW_BOBBING, EnumOptions.GUI_SCALE, EnumOptions.GAMMA, EnumOptions.RENDER_CLOUDS, EnumOptions.PARTICLES, EnumOptions.USE_SERVER_TEXTURES};
public GuiVideoSettings(GuiScreen par1GuiScreen, GameSettings par2GameSettings)
{
@@ -33,21 +33,6 @@ public class GuiVideoSettings extends GuiScreen
this.buttonList.clear();
this.buttonList.add(new GuiButton(200, this.width / 2 - 100, this.height / 6 + 168, StatCollector.translateToLocal("gui.done")));
this.is64bit = true;
/*String[] var1 = new String[] {"sun.arch.data.model", "com.ibm.vm.bitmode", "os.arch"};
String[] var2 = var1;
int var3 = var1.length;
for (int var4 = 0; var4 < var3; ++var4)
{
String var5 = var2[var4];
String var6 = System.getProperty(var5);
if (var6 != null && var6.contains("64"))
{
this.is64bit = true;
break;
}
}*/
int var8 = 0;
EnumOptions[] var9 = videoOptions;

View File

@@ -798,18 +798,7 @@ public class Minecraft
}
public void updateDisplay() {
if(gameSettings.enableVsync) {
EaglerAdapter.updateDisplay(0, true);
}else {
if(EnumBrowser.getBrowser() == EnumBrowser.DESKTOP){
int i = this.func_90020_K();
EaglerAdapter.updateDisplay(i > 0 ? EntityRenderer.performanceToFps(i) : 0, false);
}
}
}
private int func_90020_K() {
return this.currentScreen != null && this.currentScreen instanceof GuiMainMenu ? 2 : this.gameSettings.limitFramerate;
EaglerAdapter.updateDisplay(0, true);
}
private void forceReload() {
@@ -1559,9 +1548,6 @@ public class Minecraft
return theMinecraft;
}
/**
* Used in the usage snooper.
*/
public static int getGLMaximumTextureSize()
{
return 8192;