upgrade to java 21, remove netty unsafe, remove deprecated features

This commit is contained in:
Sen 2025-05-30 12:49:37 +02:00
parent b14e539464
commit 18be47866c
Signed by: sen
GPG key ID: 3AC50A6F47D1B722
58 changed files with 120 additions and 2887 deletions

View file

@ -31,7 +31,7 @@ dependencies {
java {
toolchain {
languageVersion = JavaLanguageVersion.of(8)
languageVersion = JavaLanguageVersion.of(21)
}
}

View file

@ -2214,7 +2214,7 @@ public class Client implements IThreadListener {
}
}
public void run() {
public void run(long time) {
Log.SYSTEM.info("Java " + System.getProperty("java.version"));
Log.SYSTEM.info(VERSION + " (Protokoll #" + Util.PROTOCOL + ")");
if(!Window.createWindow(VERSION, System.getProperty("opengl.debug") != null))
@ -2240,6 +2240,7 @@ public class Client implements IThreadListener {
// this.startSound(true);
this.getVar("tic_target").setDefault();
this.displayGuiScreen(GuiMenu.INSTANCE);
Log.SYSTEM.info("Client gestartet in " + String.format("%.1f", (double)(System.currentTimeMillis() - time) / 1000.0) + " Sekunden");
while(!this.interrupted) {
PerfSection.swap();
@ -2733,13 +2734,15 @@ public class Client implements IThreadListener {
public static void main(String[] args) {
Util.checkOs();
Log.init(CLIENT);
long time = System.currentTimeMillis();
Util.checkPlatform();
Log.init();
Log.setSync(CLIENT);
Window.init();
ModelBlock.setAsProvider();
Registry.setup("Render thread");
UniverseRegistry.register();
CLIENT.run();
CLIENT.run(time);
Window.end();
}

View file

@ -3,6 +3,8 @@ package client.gui.element;
import common.util.Util;
public class PasswordField extends Field {
private byte[] passwordHash;
public PasswordField(int x, int y, int w, int h, int cap, FieldCallback callback, String text) {
super(x, y, w, h, cap, callback, text);
}
@ -24,4 +26,9 @@ public class PasswordField extends Field {
protected boolean canCopy() {
return false;
}
public void updateText() {
super.updateText();
}
}