mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-20 12:20:11 +00:00
Add forceSystemNanoTime config option to the client.
Normally glfwGetTime is used, but in some cases it may have performance issues.
This commit is contained in:
1 parent
2f43f9910d
commit
06804675be
4 files changed
+19
-8
No files matched your search
@@ -28,10 +28,8 @@ import org.apache.logging.log4j.LogManager;
|
||||
|
||||
import net.minecraftforge.common.ForgeConfigSpec.BooleanValue;
|
||||
import net.minecraftforge.common.ForgeConfigSpec.DoubleValue;
|
||||
import net.minecraftforge.common.ForgeConfigSpec.IntValue;
|
||||
|
||||
public class ForgeConfig
|
||||
{
|
||||
public class ForgeConfig {
|
||||
public static class Server {
|
||||
public final BooleanValue removeErroringBlockEntities;
|
||||
|
||||
@@ -92,8 +90,7 @@ public class ForgeConfig
|
||||
public static class Common {
|
||||
public final ForgeConfigSpec.ConfigValue<? extends String> defaultWorldType;
|
||||
|
||||
Common(ForgeConfigSpec.Builder builder)
|
||||
{
|
||||
Common(ForgeConfigSpec.Builder builder) {
|
||||
builder.comment("General configuration settings")
|
||||
.push("general");
|
||||
|
||||
@@ -122,6 +119,8 @@ public class ForgeConfig
|
||||
|
||||
public final BooleanValue useCombinedDepthStencilAttachment;
|
||||
|
||||
public final BooleanValue forceSystemNanoTime;
|
||||
|
||||
Client(ForgeConfigSpec.Builder builder) {
|
||||
builder.comment("Client only settings, mostly things related to rendering")
|
||||
.push("client");
|
||||
@@ -153,6 +152,11 @@ public class ForgeConfig
|
||||
.translation("forge.configgui.useCombinedDepthStencilAttachment")
|
||||
.define("useCombinedDepthStencilAttachment", false);
|
||||
|
||||
forceSystemNanoTime = builder
|
||||
.comment("Forces the use of System.nanoTime instead of glfwGetTime, as the main Util time provider")
|
||||
.translation("forge.configgui.forceSystemNanoTime")
|
||||
.define("forceSystemNanoTime", false);
|
||||
|
||||
builder.pop();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user