aboutsummaryrefslogtreecommitdiff
path: root/src/client/java/dev/isxander/yacl/api/OptionFlag.java
diff options
context:
space:
mode:
authorisXander <xandersmith2008@gmail.com>2023-01-19 21:15:26 +0000
committerisXander <xandersmith2008@gmail.com>2023-01-19 21:15:26 +0000
commitee53b51a1e8d88085c75f227f4710b68c03b19c8 (patch)
tree77a942242a982757da040a6120950bad30e49f77 /src/client/java/dev/isxander/yacl/api/OptionFlag.java
parentffdd6e5ceacd71c76c55a8716702d4d6da17c7ab (diff)
downloadYetAnotherConfigLib-ee53b51a1e8d88085c75f227f4710b68c03b19c8.tar.gz
YetAnotherConfigLib-ee53b51a1e8d88085c75f227f4710b68c03b19c8.tar.bz2
YetAnotherConfigLib-ee53b51a1e8d88085c75f227f4710b68c03b19c8.zip
mojmap
Diffstat (limited to 'src/client/java/dev/isxander/yacl/api/OptionFlag.java')
-rw-r--r--src/client/java/dev/isxander/yacl/api/OptionFlag.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/client/java/dev/isxander/yacl/api/OptionFlag.java b/src/client/java/dev/isxander/yacl/api/OptionFlag.java
index 7a5c23f..51d57e4 100644
--- a/src/client/java/dev/isxander/yacl/api/OptionFlag.java
+++ b/src/client/java/dev/isxander/yacl/api/OptionFlag.java
@@ -1,7 +1,7 @@
package dev.isxander.yacl.api;
import dev.isxander.yacl.gui.RequireRestartScreen;
-import net.minecraft.client.MinecraftClient;
+import net.minecraft.client.Minecraft;
import java.util.function.Consumer;
@@ -10,14 +10,14 @@ import java.util.function.Consumer;
* Each flag is executed only once per save, no matter the amount of options with the flag.
*/
@FunctionalInterface
-public interface OptionFlag extends Consumer<MinecraftClient> {
+public interface OptionFlag extends Consumer<Minecraft> {
/** Warns the user that a game restart is required for the changes to take effect */
- OptionFlag GAME_RESTART = client -> client.setScreen(new RequireRestartScreen(client.currentScreen));
+ OptionFlag GAME_RESTART = client -> client.setScreen(new RequireRestartScreen(client.screen));
/** Reloads chunks upon applying (F3+A) */
- OptionFlag RELOAD_CHUNKS = client -> client.worldRenderer.reload();
+ OptionFlag RELOAD_CHUNKS = client -> client.levelRenderer.allChanged();
- OptionFlag WORLD_RENDER_UPDATE = client -> client.worldRenderer.scheduleTerrainUpdate();
+ OptionFlag WORLD_RENDER_UPDATE = client -> client.levelRenderer.needsUpdate();
- OptionFlag ASSET_RELOAD = MinecraftClient::reloadResourcesConcurrently;
+ OptionFlag ASSET_RELOAD = Minecraft::delayTextureReload;
}