diff --git a/Client/src/main/java/de/com/baseband/client/feature/modules/client/Client.java b/Client/src/main/java/de/com/baseband/client/feature/modules/client/Client.java index 9f0ff98..49112bc 100644 --- a/Client/src/main/java/de/com/baseband/client/feature/modules/client/Client.java +++ b/Client/src/main/java/de/com/baseband/client/feature/modules/client/Client.java @@ -58,6 +58,10 @@ public class Client extends Feature { @Config("Theme") public GuiTheme.Theme theme = GuiTheme.Theme.TTC; + @Config("Conservative tick time") + @Description("Assume server ticks to be more inconsistent. (Makes some features slightly slower.)") + public boolean tickTimeConservative = false; + private static final String C_CONFIG = "Config"; @Section(C_CONFIG) diff --git a/Client/src/main/java/de/com/baseband/client/util/interact/ServerDataManager.java b/Client/src/main/java/de/com/baseband/client/util/interact/ServerDataManager.java index 7ddf434..95cc449 100644 --- a/Client/src/main/java/de/com/baseband/client/util/interact/ServerDataManager.java +++ b/Client/src/main/java/de/com/baseband/client/util/interact/ServerDataManager.java @@ -2,6 +2,8 @@ package de.com.baseband.client.util.interact; import de.com.baseband.client.BaseBand; import de.com.baseband.client.Setup; +import de.com.baseband.client.feature.Features; +import de.com.baseband.client.feature.modules.client.Client; import de.com.baseband.client.util.adapt.ServerPing; import de.tudbut.tools.Lock; import net.minecraft.client.network.NetworkPlayerInfo; @@ -85,6 +87,6 @@ public class ServerDataManager { } public static int timeToSurelyTicked() { - return (int) Math.ceil((20f / tps) * 3f); // 20 => 3, 10 => 6, etc + return (int) Math.ceil(((20f / tps) + (ping / 100f)) * (Features.getFeature(Client.class).tickTimeConservative ? 3f : 2f)); } }