GTNewHorizons / ServerUtilities

GNU Lesser General Public License v3.0
27 stars 12 forks source link

Fix some items uses being blocked if 0, 0 is claimed. #54

Closed Lyfts closed 5 months ago

Lyfts commented 5 months ago

Big thanks to Alp for reporting this and context here: https://discord.com/channels/181078474394566657/603348502637969419/1219677017989972010

Apparently the RIGHT_CLICK_AIR action during PlayerInteractEvent uses the coordinates 0, 0, 0 for vanilla blocks which causes the grief protection to go nuts when the 0, 0 chunk is claimed. Instead of using the unreliable event coords I've changed it to raytrace the block that the player is looking at. A couple events have also got a round of spring cleaning to cut down on duplicated code.