toadie-odie Posted May 16, 2024 Posted May 16, 2024 (edited) The mod I'm working on is in 1.19.2. The portal works correctly in Intellij but when I publish the jar, put it in the mods folder of the game it crashes with the following error whenever any entity collides with it: java.lang.IllegalAccessError: class com.github.warrentode.turtleblockacademy.blocks.TBAMiningPortalBlock tried to access protected field net.minecraft.world.entity.Entity.f_19819_ (com.github.warrentode.turtleblockacademy.blocks.TBAMiningPortalBlock is in module turtleblockacademy@2024.2025-1.0.0 of loader 'TRANSFORMER' @16c5b50a; net.minecraft.world.entity.Entity is in module minecraft@1.19.2 of loader 'TRANSFORMER' @16c5b50a) at com.github.warrentode.turtleblockacademy.blocks.TBAMiningPortalBlock.m_7892_(TBAMiningPortalBlock.java:124) ~[turtleblockacademy-2024.2025-1.0.0.jar%23572!/:2024.2025-1.0.0] {re:classloading} The thing is, I have Entity.f_19819_ in my accessTransformer.cfg file in this line: public net.minecraft.world.entity.Entity f_19819_ # portalEntrancePos So what do I need to do to fix this error? Edited May 25, 2024 by toadie-odie problem solved Quote
toadie-odie Posted May 17, 2024 Author Posted May 17, 2024 It is the field that accesses the portal entrance position relative to the entity. So very much needed to make a portal work. What I don't understand is why the access widener works when running the client in Intellij but doesn't after I publish the jar and try to play with game with it. Quote
Paint_Ninja Posted May 22, 2024 Posted May 22, 2024 It sounds like a build setup issue. Are you reobfuscating the built jar like the MDK does? Have you made sure the access transformer file is named exactly as the MDK has it, in the exact place it expects (case sensitive as well)? Quote Official Forge Discord server | Support FAQ for players
toadie-odie Posted May 24, 2024 Author Posted May 24, 2024 Sorry, just seeing this now. The compiled jar was working just fine prior to me adding the custom portal, but here is the link to the entire project at the time the portal was in there: https://github.com/warrentode/TurtleBlockAcademy/tree/1.0.1 Direct link to the build.gradle: https://github.com/warrentode/TurtleBlockAcademy/blob/1.0.1/build.gradle Direct link to the access transformer file: https://github.com/warrentode/TurtleBlockAcademy/blob/1.0.1/src/main/resources/META-INF/accessTransformer.cfg And if you need to take a look at the teleporter class: https://github.com/warrentode/TurtleBlockAcademy/blob/1.0.1/src/main/java/com/github/warrentode/turtleblockacademy/world/dimension/portal/TBAMiningTeleporter.java The portal block: https://github.com/warrentode/TurtleBlockAcademy/blob/1.0.1/src/main/java/com/github/warrentode/turtleblockacademy/blocks/TBAMiningPortalBlock.java Currently, I've removed the portal block until I can figure this out and we just access the dimension via a clickable sign in the homeschooling LAN server we have here at home, but I'd really like to be able to solve and fix the problem. Quote
toadie-odie Posted May 25, 2024 Author Posted May 25, 2024 I don't know how I missed it, but I did. The access transformer file had a capital T in it. Fixed that and the problem has been solved. I feel really stupid, but thank you for asking about that, because it had me rechecking until I finally saw it. I'm marking this solved. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.