Commit c9b4172fcfc8572f1558a3c0db0bf6ec635109d5
1 parent
aa2b1973
Fix realms screen mixin for realms 1.9.8 and make it optional, fixes #15
Showing
4 changed files
with
21 additions
and
5 deletions
src/client/java/com/mumfrey/liteloader/client/api/LiteLoaderCoreAPIClient.java
... | ... | @@ -46,14 +46,18 @@ public class LiteLoaderCoreAPIClient extends LiteLoaderCoreAPI |
46 | 46 | LiteLoaderCoreAPI.PKG_LITELOADER + ".transformers.event.json.ModEventInjectionTransformer" |
47 | 47 | }; |
48 | 48 | |
49 | + private static final String[] clientMixinConfigs = new String[] { | |
50 | + "mixins.liteloader.client.json", | |
51 | + "mixins.liteloader.client.optional.json", | |
52 | + }; | |
53 | + | |
49 | 54 | private ObjectFactory<Minecraft, IntegratedServer> objectFactory; |
50 | 55 | |
51 | 56 | @Override |
52 | 57 | public String[] getMixinConfigs() |
53 | 58 | { |
54 | 59 | String[] commonConfigs = super.getMixinConfigs(); |
55 | - String[] clientConfigs = new String[] { "mixins.liteloader.client.json" }; | |
56 | - return ObjectArrays.concat(commonConfigs, clientConfigs, String.class); | |
60 | + return ObjectArrays.concat(commonConfigs, LiteLoaderCoreAPIClient.clientMixinConfigs, String.class); | |
57 | 61 | } |
58 | 62 | |
59 | 63 | /* (non-Javadoc) | ... | ... |
src/client/java/com/mumfrey/liteloader/client/mixin/MixinRealmsMainScreen.java
... | ... | @@ -19,8 +19,11 @@ import net.minecraft.realms.RealmsScreen; |
19 | 19 | @Mixin(value = RealmsMainScreen.class, remap = false) |
20 | 20 | public abstract class MixinRealmsMainScreen extends RealmsScreen |
21 | 21 | { |
22 | - @Inject(method = "play(Lcom/mojang/realmsclient/dto/RealmsServer;)V", at = @At("HEAD")) | |
23 | - private void onJoinRealm(RealmsServer server, CallbackInfo ci) | |
22 | + @Inject( | |
23 | + method = "play(Lcom/mojang/realmsclient/dto/RealmsServer;Lnet/minecraft/realms/RealmsScreen;)V", | |
24 | + at = @At("HEAD") | |
25 | + ) | |
26 | + private void onJoinRealm(RealmsServer server, RealmsScreen screen, CallbackInfo ci) | |
24 | 27 | { |
25 | 28 | PacketEventsClient.onJoinRealm(server); |
26 | 29 | } | ... | ... |
src/client/resources/mixins.liteloader.client.json
src/client/resources/mixins.liteloader.client.optional.json
0 → 100644