Actually that might not work.. You need to cancel the packet somehow
Same thing, cancelling BlockPlaceEvent on the client side does nothing. I wonder if this is a bug with forge, or if it's intended. Regardless, you're correct, I will have to find a way to intercept the packet before it's sent to the server
The only way I have found to do this is to replace Minecraft.playercontroller with my own instance of PlayerControllerMP, and alter processRightClickBlock so it doesn't send the packet when my mod specifically cancels the event.
Rollback Post to RevisionRollBack
My Github ด้้้้้็็็็็้้้้้็็็็็้้้้้็็็็็้้้้้็็็็็้้้้้็็็็็้้้้้็็็็็้้้้้็็็็็้้้้้дด็็็็็้้้้้็็็็้้้้้็็็็็้้้้้็็็็็้้้้้็็็็็้้้้้
I am also looking to solve the same problem. How did you replace the object and only omit the packet when you cancel the event?
It seems that replacing the object will mean doing a new on PlayerController and overriding the method with some special content. But the new instance will not have the same data as the old one. Do you have to use reflection to load the new instance with the old data?