|
1 | | -package club.chachy.lazylanguageloader.client.mixin.optimizations.loading; |
| 1 | +package dev.chachy.lazylanguageloader.client.mixin.optimizations.loading; |
2 | 2 |
|
3 | | -import club.chachy.lazylanguageloader.client.impl.state.StateManager; |
| 3 | +import dev.chachy.lazylanguageloader.client.impl.state.StateManager; |
4 | 4 | import net.minecraft.client.gui.screen.option.LanguageOptionsScreen; |
5 | | -import net.minecraft.client.gui.widget.ButtonWidget; |
6 | 5 | import org.spongepowered.asm.mixin.Mixin; |
7 | 6 | import org.spongepowered.asm.mixin.injection.At; |
8 | 7 | import org.spongepowered.asm.mixin.injection.Inject; |
|
11 | 10 | @Mixin(LanguageOptionsScreen.class) |
12 | 11 | public class MixinLanguageOptionsScreen { |
13 | 12 | @Inject( |
14 | | - method = "method_19820", |
| 13 | + method = "onDone", |
15 | 14 | at = @At( |
16 | 15 | value = "INVOKE", |
17 | 16 | target = "Lnet/minecraft/client/MinecraftClient;reloadResources()Ljava/util/concurrent/CompletableFuture;", |
18 | 17 | ordinal = 0 |
19 | 18 | ) |
20 | 19 | ) |
21 | | - private void lazyLanguageLoader$$preResourceLoad(ButtonWidget widget, CallbackInfo info) { |
| 20 | + private void lazyLanguageLoader$$preResourceLoad(CallbackInfo info) { |
22 | 21 | StateManager.setResourceLoadViaLanguage(true); |
23 | 22 | } |
24 | 23 |
|
25 | 24 | @Inject( |
26 | | - method = "method_19820", |
| 25 | + method = "onDone", |
27 | 26 | at = @At( |
28 | 27 | value = "INVOKE", |
29 | 28 | target = "Lnet/minecraft/client/MinecraftClient;reloadResources()Ljava/util/concurrent/CompletableFuture;", |
30 | 29 | ordinal = 0, |
31 | 30 | shift = At.Shift.AFTER |
32 | 31 | ) |
33 | 32 | ) |
34 | | - private void lazyLanguageLoader$$postResourceLoad(ButtonWidget widget, CallbackInfo info) { |
| 33 | + private void lazyLanguageLoader$$postResourceLoad(CallbackInfo info) { |
35 | 34 | StateManager.setResourceLoadViaLanguage(false); |
36 | 35 | } |
37 | 36 | } |
0 commit comments