Giter Site home page Giter Site logo

[Bug]: Mixin apply failed curios.mixins.json:AccessorEntity -> net.minecraft.world.entity.Entity: No candidates were found matching f_19803_ about curios HOT 9 CLOSED

ADDSynth avatar ADDSynth commented on August 19, 2024
[Bug]: Mixin apply failed curios.mixins.json:AccessorEntity -> net.minecraft.world.entity.Entity: No candidates were found matching f_19803_

from curios.

Comments (9)

TheIllusiveC4 avatar TheIllusiveC4 commented on August 19, 2024

Have you made sure to add these properties to your run configurations in the build.gradle to make sure mixins are mapped properly?

property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg"

from curios.

Vladdem1332 avatar Vladdem1332 commented on August 19, 2024

Have you made sure to add these properties to your run configurations in the build.gradle to make sure mixins are mapped properly?

property 'mixin.env.remapRefMap', 'true'
property 'mixin.env.refMapRemappingFile', "${buildDir}/createSrgToMcp/output.srg"

I have the same error, it still happens even with these properties (I am using Curios 5.3.1 - 1.20.1 Forge)

from curios.

TheIllusiveC4 avatar TheIllusiveC4 commented on August 19, 2024

Did you make sure to regenerate the run configurations when those properties were added?

from curios.

Vladdem1332 avatar Vladdem1332 commented on August 19, 2024

Did you make sure to regenerate the run configurations when those properties were added?

Don’t know about this guy, but I am sure I did, many times

from curios.

TheIllusiveC4 avatar TheIllusiveC4 commented on August 19, 2024

Can you share your build.gradle and the resulting crash log?

from curios.

Vladdem1332 avatar Vladdem1332 commented on August 19, 2024

Can you share your build.gradle and the resulting crash log?

Oh, it solved already, all I needed is to recreate the project from scratch πŸ˜…

from curios.

ADDSynth avatar ADDSynth commented on August 19, 2024

Sorry! I have no experience working with Mixins. Also, my computer used to give me notifications when I get emails, but it hasn't been doing that ever since I switched to New Outlook for Windows 11 / Windows 11. I have to open the app every few days to check my mail.

I added the lines you suggested and it works! Thank you!

Though it sounds like I was on the right track. Forge / MCP automatically deobfuscates the code, but you have a configuration file for Mixins that looks for SRG names. Those Mixin configuration files aren't being translated! Is that the case? I'm hoping you can explain something to me. If your mod uses Mixins, why should I have to add anything to my build.gradle file?

To avoid confusions like this in the future, I think it would be a good idea to add a note to developers who want to add this to their dev environment that the build.gradle file should add these properties to translate your Mixins configuration file. You already have a section for developers on your Readme.md, so that looks like a good place.

I apologize for mine and everyone's lack of Mixin experience.
I know it's not your responsibility to explain anything to me but...
If you don't mind me asking, how did you figure out you were supposed to add those properties? If Mixins is built into Forge, (and they half expect some developers to use Mixins), why aren't these properties already added to the MDK by default?

Anyway I think I get it. You have to write the Mixin config file to look for SRG names because in a deployed environment, that's what it will find. But that file isn't being deobfuscated in a dev environment, so I have to add those properties so Forge knows to translate that file.

I'm sure there's Mixins documentation somewhere (I hope). I did try to do Mixins in the past. I was going to make items randomly appear above Sand, but sand doesn't randomly tick. Designing the sprites for the items was taking too long so I just saved the sprites I did so far and deleted all the Mixin work to try again another time.

from curios.

TheIllusiveC4 avatar TheIllusiveC4 commented on August 19, 2024

I added the lines you suggested and it works! Thank you!

You're welcome, happy to have helped.

To avoid confusions like this in the future, I think it would be a good idea to add a note to developers who want to add this to their dev environment that the build.gradle file should add these properties to translate your Mixins configuration file. You already have a section for developers on your Readme.md, so that looks like a good place.

There is already documentation about the mixin properties you need to add, at the bottom of the README.md:
https://github.com/TheIllusiveC4/Curios/blob/1.20.x/docs/README.md

This has always been present on the main branch until very recently. It is not currently present because NeoForge for 1.20.2+ does not need it and I wasn't sure, until recently, whether it would change on Forge as well. It seems to still be required as of Forge 1.20.4 so I will add it back to avoid any further confusion.

Forge / MCP automatically deobfuscates the code, but you have a configuration file for Mixins that looks for SRG names. Those Mixin configuration files aren't being translated! Is that the case? I'm hoping you can explain something to me. If your mod uses Mixins, why should I have to add anything to my build.gradle file?

It's not a configuration file technically, it's a refmap that is generated by a mixin plugin to translate the obfuscated names. It's not anything that I'm doing in particular, you would need to do this for any other mod you depend on that uses mixins. But you have the basic gist of it in that the file is not being applied in your development environment and thus cannot find the correct methods/fields.

Unfortunately, I don't know why this is required as I do not have a high-level understanding of how or why mixins work the way they do. Although I should note that this step is optional if your project itself also uses mixins.

If you don't mind me asking, how did you figure out you were supposed to add those properties? If Mixins is built into Forge, (and they half expect some developers to use Mixins), why aren't these properties already added to the MDK by default?

I was made aware of these properties when I personally needed to depend on another mod that used mixins as well. As for why they are not in the MDK, that's a question for the Forge team as I am unaware of their particular reasons for not including it.

from curios.

ADDSynth avatar ADDSynth commented on August 19, 2024

I can't read apparently. I don't know which version of the Readme I was looking at before. A thousand apologies for missing this and thank you for having the patience to help us with this.

Maybe I never looked at the Readme. Because I started my current project by copying all my source files from the previous version of Minecraft (1.18.2), then as part of updating to the next version, all the dependencies are still there so I just update their versions.

I did check it briefly for the developer's section to talk about it in this bug report, but still missed the part about adding properties. Anyway, thanks for helping. You are amazing.

from curios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.