Posted March 9, 201411 yr Hiya, I'm starting to feel my way around ASM and bytecode manipulation, and decided to create a fix for one my most annoying bugs of all time, https://bugs.mojang.com/browse/MC-29475. I know what base edit I need to do, I need to change Line ~382 of EntityArrow, in its onUpdate() method, from this.field_145790_g = var16; to this.field_145790_g = this.worldObj.getBlock(this.field_145791_d, this.field_145791_e, this.field_145791_f); In a MCP environment, this fixes the bug completely with no side effects observed. Here is my effort so far using ASM coremodding: https://github.com/williewillus/ArrowFix I know for sure that my instructions are injected into the correct place in the method successfully; the game starts and runs. However, the game crashes when I fire an arrow, with this error: http://pastebin.com/5sZFV44f Which tells me that I may have formatted my instruction injections wrongly or used the incorrect instruction altogether. Any pointers on where I went wrong, how I can improve?
March 9, 201411 yr I beleave its because it to be somehow passing ()V to what it expects to be a int or it seems to be a problem with how it was added. I have not messed with ASM but I want too so yeah it ecpexting an int on the stack.
March 9, 201411 yr Author It's just telling me that onUpdate()'s descriptor is ()V My gut says that the ints it can't find refer to the invocation of getBlock() that I added, which means that I may have retrieved them from the fields the incorrect way. Can someone more experienced verify?
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.