Posted August 23, 20214 yr In previous versions one could change the x and y positions, these positions seem to be final now and can't be changed. Any idea how to change them?
August 23, 20214 yr 42 minutes ago, BeardlessBrady said: In previous versions one could change the x and y positions, these positions seem to be final now and can't be changed. Any idea how to change them? As Luis_ST mentioned you could use an accesstransformer to make those fields public and non-final by adding a -f after the public modifier. Edit: Just in case you don't know how to get the SRG names for your at. Join the Forge Discord Server and message the forge-bot with !mcp <field name|method name> (for MCP Mappings) or !moj <field name|method name> (for Official Mappings). Edited August 23, 20214 yr by Skyriis
August 23, 20214 yr 38 minutes ago, Luis_ST said: use an AT an make them public the doc explains how to use an AT
August 23, 20214 yr Author I have added the file yet Intellij will not allow me to build as it still thinks the variable is final.
August 23, 20214 yr Author Yes. Ill attach the files here incase I did something wrong Build.Gradle: https://github.com/Beardlessbrady/Currency-Mod/blob/44372f478306780136a2e572064419841a89c40e/build.gradle#L24 AccessTransfomer: https://github.com/Beardlessbrady/Currency-Mod/blob/44372f478306780136a2e572064419841a89c40e/src/main/resources/META-INF/accesstransformer.cfg Edited August 23, 20214 yr by BeardlessBrady
August 23, 20214 yr you need to use the SRG names of the fields, it should be: public-f net.minecraft.inventory.container.Slot field_75223_e #xPos public-f net.minecraft.inventory.container.Slot field_75221_f # yPos you can use the forge bot on discord to get the SRG names (only work for 1.16.x, 1.17 is currently broken)
August 23, 20214 yr Author Oh I see, I wasn't sure what you meant by that, thank you that has made it work!
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.