Carpenter's Blocks

Carpenter's Blocks

24M Downloads

Server side PlayerInteract event bypassed

krwminer opened this issue ยท 7 comments

commented

The server side shift-right-click PlayerInteract event for Carpenter's Blocks is bypassed by being canceled on the client side execution of PlayerInteract in EventHandler.java. This causes issues with mods like MyTown2 which catch the server side PlayerInteract event and cancels it if the player does not have permission to do that action.

I hoped to open up dialog such that we may find a solution that will work for everyone.

commented

Absolutely open to resolving this if you have an idea how to proceed. I remember click events being one of the busier areas of Minecraft's code, which makes things difficult.

commented

OK. I got your latest and set it up for testing with MT2 in eclipse. I will be glad to look into this and come up with a PR, but I need to know the background of why you did this in the first place. Could you describe the problem you are trying to overcome?

Normally you just segment out pieces that want to be run only on the server side by checking isRemote right in PlayerInteract.

commented

Submitted a PR to fix this for your review: #322

commented

I noticed during development that I can no longer apply overlays to blocks. This may have been the edge case I had forgotten with the discarded code.

Let me know your thoughts, and if you're able to reproduce this.

commented

I will check into that.

commented

I through up another PR. Let me know if you have anymore problems.

commented

Will test sometime this weekend, thanks.