This repository was archived by the owner on Jun 3, 2024. It is now read-only.
Commit 63da775
authored
Fix LanguageOptionsScreen again...
If this does not work for someone, try this:
```java
package net.patchworkmc.mixin.resource;
import java.util.concurrent.CompletableFuture;
import org.spongepowered.asm.mixin.Mixin;
import org.spongepowered.asm.mixin.Unique;
import org.spongepowered.asm.mixin.injection.At;
import org.spongepowered.asm.mixin.injection.Redirect;
import net.minecraftforge.resource.VanillaResourceType;
import net.minecraft.client.MinecraftClient;
import net.minecraft.client.gui.screen.options.LanguageOptionsScreen;
import net.patchworkmc.impl.resource.TypedResourceLoader;
@mixin(LanguageOptionsScreen.class)
public abstract class MixinLanguageOptionsScreen {
@unique
private static final String MinecraftClient_reloadResources = "net/minecraft/client/MinecraftClient.reloadResources()Ljava/util/concurrent/CompletableFuture;";
// Dev
@SuppressWarnings("rawtypes")
@reDIrect(require = 0, method = "method_19820(Lnet/minecraft/client/gui/widget/ButtonWidget/ButtonWidget;)V", at = @at(value = "INVOKE", target = MinecraftClient_reloadResources))
protected CompletableFuture patchwork_dev_init_reloadResources(MinecraftClient mc) {
return TypedResourceLoader.patchwork$refreshResources(mc, VanillaResourceType.LANGUAGES);
}
// Reobf
@SuppressWarnings("rawtypes")
@reDIrect(require = 0, method = "method_19820(Lnet/minecraft/class_4185;)V", at = @at(value = "INVOKE", target = MinecraftClient_reloadResources))
protected CompletableFuture patchwork_reobf_init_reloadResources(MinecraftClient mc) {
return TypedResourceLoader.patchwork$refreshResources(mc, VanillaResourceType.LANGUAGES);
}
}
```1 parent c123bf2 commit 63da775
File tree
1 file changed
+1
-1
lines changed- patchwork-resource/src/main/java/net/patchworkmc/mixin/resource
1 file changed
+1
-1
lines changedLines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
34 | 34 | | |
35 | 35 | | |
36 | 36 | | |
37 | | - | |
| 37 | + | |
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
| |||
0 commit comments