diff options
| author | Aizistral | 2026-01-27 16:22:45 +0100 |
|---|---|---|
| committer | Aizistral | 2026-01-27 16:22:45 +0100 |
| commit | 52dd4db7d99297031e4f2a073e5d62d93da35d56 (patch) | |
| tree | 412a9ca495d43b804163a3e689a1aea4623cec27 /Fabric/src/main/java/com/aizistral/nochatrestrictions/mixins | |
| parent | 5ce84e68d7788ba437ebd2c484b649c8b1b059eb (diff) | |
Update mixins and code for 1.18.2
Diffstat (limited to 'Fabric/src/main/java/com/aizistral/nochatrestrictions/mixins')
| -rw-r--r-- | Fabric/src/main/java/com/aizistral/nochatrestrictions/mixins/MixinMinecraft.java | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/Fabric/src/main/java/com/aizistral/nochatrestrictions/mixins/MixinMinecraft.java b/Fabric/src/main/java/com/aizistral/nochatrestrictions/mixins/MixinMinecraft.java index 86c35d4..4b2b473 100644 --- a/Fabric/src/main/java/com/aizistral/nochatrestrictions/mixins/MixinMinecraft.java +++ b/Fabric/src/main/java/com/aizistral/nochatrestrictions/mixins/MixinMinecraft.java @@ -6,8 +6,8 @@ import org.spongepowered.asm.mixin.injection.Inject; import org.spongepowered.asm.mixin.injection.callback.CallbackInfoReturnable; import com.aizistral.nochatrestrictions.core.NCRCore; -import com.aizistral.nochatrestrictions.core.WrappedSocialInteractionsService; -import com.mojang.authlib.minecraft.SocialInteractionsService; +import com.aizistral.nochatrestrictions.core.WrappedUserApiService; +import com.mojang.authlib.minecraft.UserApiService; import com.mojang.authlib.yggdrasil.YggdrasilAuthenticationService; import net.minecraft.client.Minecraft; @@ -16,14 +16,14 @@ import net.minecraft.client.main.GameConfig; @Mixin(Minecraft.class) public class MixinMinecraft { - @Inject(method = { "func_244735_a", "createSocialInteractions" }, at = @At("RETURN"), cancellable = true) - public void onCreateSocialInteractions(YggdrasilAuthenticationService authService, GameConfig gameConfig, - CallbackInfoReturnable<SocialInteractionsService> info) { - SocialInteractionsService returnedService = info.getReturnValue(); + @Inject(method = { "m_193585_", "createUserApiService" }, at = @At("RETURN"), cancellable = true) + public void onCreateUserApi(YggdrasilAuthenticationService authService, GameConfig gameConfig, + CallbackInfoReturnable<UserApiService> info) { + UserApiService returnedService = info.getReturnValue(); assert returnedService != null; - info.setReturnValue(new WrappedSocialInteractionsService(returnedService)); + info.setReturnValue(new WrappedUserApiService(returnedService)); - NCRCore.LOGGER.info("Successfully supplanted SocialInteractionsService with a wrapped version."); + NCRCore.LOGGER.info("Successfully supplanted UserApiService with a wrapped version."); } } |
