Mixins silently fail to apply to libraries such as Brigadier and DFU
See original GitHub issueMixins which target libraries such as Authlib, Brigadier and DataFixerUpper do not apply.
A simple example of how to reproduce this is below:
private int testCmd(CommandContext<ServerCommandSource> ctx) throws CommandSyntaxException {
ServerPlayerEntity spe = ctx.getSource().getPlayer();
ctx.getSource().sendFeedback(new LiteralText(((GameProfileTest) spe.getGameProfile()).getUuid().toString()), false);
return 1;
}
public interface GameProfileTest {
UUID getUuid();
Optional<String> getName();
}
@Mixin(GameProfile.class)
public abstract class GameProfileMixin implements GameProfileTest {
@Shadow public abstract UUID shadow$getId();
@Shadow public abstract String shadow$getName();
@Override
public UUID getUuid() {
return this.shadow$getId();
}
@Override
public Optional<String> getName() {
return Optional.ofNullable(this.shadow$getName());
}
}
When the example command is executed, it will fail because of a ClassCastException which means the mixin into GameProfile failed.
My testing has shown this occurs on both the client and server environment.
Main on the client seems to refer to Authlib before MinecraftClient is started in Main.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Mprovement Era Vol. XXI July, 1918 No. 9 A Plucky Pioneer Motherau
about ten years old, I un dertook such an obligation from sheer n ece ssity. The he adof our hou seholdwas , a...
Read more >MIT was we will home can us about if page my has no
... amendment strength despite guaranteed libraries turkey distributed proper ... mit stability pride boss applying southwest expectations institutional ...
Read more >11958297 files 8600432 settings 8347444 us
... application 1257525 i 1236769 ad 1181626 bf 1168756 lproj 1167285 library ... play 19248 vox 19218 how 19169 px 19167 with 19117...
Read more >Click here to download - Computer Science
... what which their news out use any there see only so his when contact here ... register however june october november market...
Read more >glove_vocab.250k.txt - Bar Ilan NLP Lab
... really information through want # 5 him right take views such made those ... agriculture starter libraries laura asks receiver applying conventional...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Indeed - #630 completely fixed all issues mixing into game libraries. In fact, https://github.com/LoganDark/fabric-command-hider was developed on a draft version of the PR.
I guess I’m just lucky as heck.
This issue is now as good as resolved 😃
@LoganDark Is this fixed now?