From 7ddf5f9349c0be5d0b2a5ed61044c2049394c2b6 Mon Sep 17 00:00:00 2001 From: TudbuT Date: Thu, 13 Jun 2024 15:33:57 +0200 Subject: [PATCH] fix nametags and remove unnecessary class --- .../src/main/java/de/com/baseband/client/feature/Feature.java | 4 ---- .../java/de/com/baseband/client/feature/render/Nametags.java | 2 +- .../src/main/java/de/com/baseband/server/ClientHandler.java | 2 +- 3 files changed, 2 insertions(+), 6 deletions(-) diff --git a/Client/src/main/java/de/com/baseband/client/feature/Feature.java b/Client/src/main/java/de/com/baseband/client/feature/Feature.java index ecfbd32..4764f84 100644 --- a/Client/src/main/java/de/com/baseband/client/feature/Feature.java +++ b/Client/src/main/java/de/com/baseband/client/feature/Feature.java @@ -284,8 +284,4 @@ public abstract class Feature extends ToggleButton implements SetCommand { public boolean renderInHUD() { return true; } - - public static class TriggerHandler { - - } } diff --git a/Client/src/main/java/de/com/baseband/client/feature/render/Nametags.java b/Client/src/main/java/de/com/baseband/client/feature/render/Nametags.java index 936da91..ee1683a 100644 --- a/Client/src/main/java/de/com/baseband/client/feature/render/Nametags.java +++ b/Client/src/main/java/de/com/baseband/client/feature/render/Nametags.java @@ -125,7 +125,7 @@ public class Nametags extends Feature { ScaledResolution scaledRes = new ScaledResolution(mc); double twoDscale = scaledRes.getScaleFactor() / Math.pow(scaledRes.getScaleFactor(), 2.0D); - return (float) twoDscale + (mc.player.getDistance(player) / (0.7f * 10)); + return (float) twoDscale + (mc.getRenderViewEntity().getDistance(player) / (0.7f * 10)); } diff --git a/Server/src/main/java/de/com/baseband/server/ClientHandler.java b/Server/src/main/java/de/com/baseband/server/ClientHandler.java index baa54e3..e8f7c95 100644 --- a/Server/src/main/java/de/com/baseband/server/ClientHandler.java +++ b/Server/src/main/java/de/com/baseband/server/ClientHandler.java @@ -14,7 +14,7 @@ public class ClientHandler { public TypedOutputStream outputStream; public void handle(Socket socket) throws IOException { - socket.setSoTimeout(15000); + socket.setSoTimeout(5000); inputStream = new TypedInputStream(socket.getInputStream()); outputStream = new TypedOutputStream(socket.getOutputStream());