Jump to content

Top-Set98

Members
  • Posts

    5
  • Joined

  • Last visited

Top-Set98's Achievements

Tree Puncher

Tree Puncher (2/8)

0

Reputation

  1. Thank you very much! After adding MixinConfigs to the attributes array, it works now. Does the development environment load the MixinConfigs automatically or why is it only needed for normal Minecraft?
  2. My sample mod has the refmap in the mixin json file as well as "add sourceSets.main" in the "mixin" block. It is like in the documentation. mixin json: { "required": true, "minVersion": "0.8", "package": "com.example.examplemod.mixin", "compatibilityLevel": "JAVA_17", "refmap": "mixins.ExampleMod.refmap.json", "mixins": [ "MinecraftMixin" ], "injectors": { "defaultRequire": 1 } } mixin block in build.gradle mixin { // MixinGradle Settings add sourceSets.main, 'mixins.ExampleMod.refmap.json' config 'mixins.ExampleMod.json' } I tried it on another Minecraft version (1.19.2 and 1.20.1) and it works. As soon as I try Minecraft version 1.20.6 or higher it does not work anymore.
  3. Still not working on Forge 1.21 - 51.0.6
  4. If I find something, of course. I have tried a bit but I can't get mixin to run on 1.20.6 even with the latest version: 1.20.6 - 50.1.1.
  5. Hi, I'm trying to get into Mixin. My test code accesses the private attribute fps in the Minecraft class. In the development environment (IntelliJ), it outputs the FPS, as I expected it would. But when I try it in the normal Minecraft, it crashes, and I'm not sure why. The Mixin Code: @Mixin(Minecraft.class) public interface MinecraftMixin { @Accessor("fps") int getFps(); } How I call the mixin code: @SubscribeEvent public void onTick(ClientTickEvent event) { if (Minecraft.getInstance().player == null) { return; } if (Minecraft.getInstance().player.isCrouching()) { int test = ((MinecraftMixin)Minecraft.getInstance()).getFps(); LOGGER.info(String.valueOf(test)); } } Crashlog: https://paste.ee/p/PtO7B
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.