Skip to content

Commit

Permalink
🐛 修复进入游戏后需要重新载入资源包才会使箱子优化生效的问题
Browse files Browse the repository at this point in the history
  • Loading branch information
1024-byteeeee committed May 13, 2024
1 parent a32497b commit affd900
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
import org.apache.logging.log4j.Logger;

import top.byteeeee.AnimatedFreeze.commands.RegisterCommands;
import top.byteeeee.AnimatedFreeze.event.ClientStartEvent;
import top.byteeeee.AnimatedFreeze.event.ClientEvent;
import top.byteeeee.AnimatedFreeze.utils.BuiltinResourcesPackAdder;

@Environment(EnvType.CLIENT)
Expand All @@ -47,6 +47,6 @@ public void onInitializeClient() {
LOGGER.info(modName + " " + "loaded!");
RegisterCommands.register();
BuiltinResourcesPackAdder.register();
ClientStartEvent.register();
ClientEvent.register();
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,11 +24,13 @@
import net.fabricmc.api.Environment;
import net.fabricmc.fabric.api.client.event.lifecycle.v1.ClientLifecycleEvents;

import top.byteeeee.AnimatedFreeze.AnimatedFreezeSetting;
import top.byteeeee.AnimatedFreeze.config.AnimatedFreezeConfig;

@Environment(EnvType.CLIENT)
public class ClientStartEvent {
public class ClientEvent {
public static void register() {
ClientLifecycleEvents.CLIENT_STARTED.register(client -> AnimatedFreezeConfig.loadListFromConfig());
ClientLifecycleEvents.CLIENT_STARTED.register(client -> AnimatedFreezeSetting.changeValue());
}
}

0 comments on commit affd900

Please sign in to comment.