Posted October 13, 20169 yr I've made an ASM transformer to transform a method in the CommandBase class when I used it in the dev environment it worked fine but when I compiled it, it crashed. I tested both on MultiMC and the normal minecraft client both end up with the same result. Right now I have it stripped down to a minimal transformation, so I could see where the fault lies, but I can't find it. crash: https://paste.ee/p/nP0is log: https://paste.ee/p/BEpYD Transformer: https://gist.github.com/karelmikie3/f26a6ccc1495678f7c897d359e2961b7 Loader: https://gist.github.com/karelmikie3/e1f5fe78e49f3dbbfecc64c9bc9d4a57 jar: http://puu.sh/rHPtD.jar
October 13, 20169 yr Don't make a coremod. What are you trying to do? Don't PM me with questions. They will be ignored! Make a thread on the appropriate board for support. 1.12 -> 1.13 primer by williewillus. 1.7.10 and older versions of Minecraft are no longer supported due to it's age! Update to the latest version for support. http://www.howoldisminecraft1710.today/
October 13, 20169 yr Author I am Transforming the CommandBase.checkPermission method so I can run the permission check through custom checks of my mod that includes setting custom permission requirements for the commands themselves. I first had one of methods injected into it but it crashed so to eliminate any possible coding error I removed it and made it simply return true. PS. I know about the CommandEvent in CommandHandler.executeCommand but that doesn't reach every call to the method such as the /help command checks if the player can use the command and so does auto tab completion.
October 13, 20169 yr Can't you override ALL the commans with custom command? I mean, you copy list of all registered commands and then clear the orginal one. Now for each of those commands, you register your command "handler" instantiated with the command. In your command "handler", you implement command and redirect all method calls to original command, except for the method you want to change... This will work in 97% of the cases. If you want to get additional 3%, you can go for dynamic class generation of subclass of command with overriden methods. Though if you're not experienced enough with ASM, this is not recommended. Check out my mods: BTAM Armor sets Avoid Exploding Creepers Tools compressor Anti Id Conflict Key bindings overhaul Colourfull blocks Invisi Zones
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.