TheGreyGhost / MinecraftByExample

Working sample code for the basic concepts in Minecraft and Forge.
Other
1.24k stars 187 forks source link

[Error] Unexpected error 1.16.4 #62

Closed chrisvgt closed 3 years ago

chrisvgt commented 3 years ago

I build your project and tested it with this1.16.4-forge-35.1.0 Forge Version. After a while i run in that Error net.minecraftforge.fml.common.ObfuscationReflectionHelper$UnableToFindFieldException caused by java.lang.NoSuchFieldException: world.

Does I miss something? Or is this version still in development?

The full crash-log.

TheGreyGhost commented 3 years ago

Thanks for that, I'll have a look.

TheGreyGhost commented 3 years ago

It works fine for me, however I notice that your crash log has the obfuscated method names in it. I think what is probably happening is related to obfuscation of the field name, i.e. the code is looking for "world" and it finds it fine when I'm running it but in your environment world is called something else such as field_200_a . I'm not yet sure of the reason that it works fine for me but not for you; I'll try a couple of troubleshooting steps and will ask some other experts for advice.

TheGreyGhost commented 3 years ago

FYI: https://forums.minecraftforge.net/topic/94222-problems-with-inconsistent-deobfuscation-for-reflection-helper/

TheGreyGhost commented 3 years ago

Fixed now. I should have used the srg name instead of mcp name. I don't know why it worked for me but not for you, ("universal environment"?) but it appears to be ok now. I also added some extra exception handling to make it more robust.