Jump to content

[Solved][ASM][1.7.2] How did I go wrong?


Recommended Posts


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;




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?

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

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.

Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Terms of Use.