amadornes / MCMultiPart

A universal multipart API for Modern Minecraft
Other
67 stars 23 forks source link

[MCMP2] Item with Stack Wrapper prioritizes placing over block's onActivated() method #73

Closed 2xsaiko closed 4 years ago

2xsaiko commented 7 years ago

Even if you don't hold sneak, it places the multipart before calling onActivated on the block you've clicked on. (Related to #72)

amadornes commented 7 years ago

I don't think that's possible since MCMP uses PlayerInteractEvent.RightClickBlock and that gets fired before the block gets the event. If you can find a way to do it that doesn't involve ASM, I may look into implementing it (as long as it's a sensible option and not something like calling the block's onActivated() method from the event handler, because that's just asking for trouble).
You also have the option of making a PR to Forge with a new event that's fired after the player controller calls onActivated() and provides the value it returned to check if it's been activated or not. That could work.

amadornes commented 4 years ago

Closing since it was fixed with #126