Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interface injection of GameProfile fails (with Switchy Proxy) #214

Closed
sisby-folk opened this issue Sep 8, 2023 · 1 comment · Fixed by #550
Closed

Interface injection of GameProfile fails (with Switchy Proxy) #214

sisby-folk opened this issue Sep 8, 2023 · 1 comment · Fixed by #550
Assignees
Labels
bug Something isn't working

Comments

@sisby-folk
Copy link

Describe the bug

When running switchy proxy 1.5.7, chat fails because instanceof SwitchyProxyProfile (an injected interface) returns false for player gameprofiles.

Steps to reproduce

  1. Inject an interface into GameProfile (this will of course be remap = false) - here's GameProfileMixin from switchy proxy.
  2. Test that interface is being implemented by a gameprofile instance using instanceof with a logger.
  3. Logger returns false.

Logs

https://mclo.gs/tcFdskf

Additional context

In the log, i'm printing the following:

SwitchyProxy.LOGGER.info("Interfaces: {} {}", player instanceof SwitchyPlayer, player.getGameProfile() instanceof SwitchyProxyProfile);

The connector compatible version of styled chat is 2.2.3, which isn't released yet - if this can't be reproduced with a different gameprofile interface injection, let me know and i can provide copies.

@sisby-folk sisby-folk added the bug Something isn't working label Sep 8, 2023
@Su5eD
Copy link
Member

Su5eD commented Sep 8, 2023

Right, authlib, this is gonna be a bit of a problem. The issue here is that only GAME layer libraries can be mixed into on Forge. I suspect authlib is placed on the BOOT layer, which means mixins targetting its classes will never run. I ran into the same problem in FFAPI, where one of Fabric's mixins was targetting a codec class, and could not be ported over to Forge.

The best solution I can think of would be moving these libraries to the GAME layer, but that is outside of Connector's control. I suppose I could talk to Neo about it though.

@Su5eD Su5eD added the blocked Requires changes from third parties label Sep 17, 2023
@Su5eD Su5eD moved this to 📋 Backlog in Connector Triage Nov 22, 2023
Su5eD added a commit that referenced this issue Nov 30, 2023
Truly, what could go wrong?

Fixes #562
Relates to #214
@Su5eD Su5eD moved this from 📋 Backlog to 👀 In review in Connector Triage Dec 1, 2023
@Su5eD Su5eD removed the blocked Requires changes from third parties label Dec 1, 2023
@Su5eD Su5eD linked a pull request Dec 1, 2023 that will close this issue
@Su5eD Su5eD self-assigned this Dec 1, 2023
@Su5eD Su5eD closed this as completed in #550 Dec 2, 2023
@github-project-automation github-project-automation bot moved this from 👀 In review to ✅ Done in Connector Triage Dec 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: ✅ Done
Development

Successfully merging a pull request may close this issue.

2 participants