MineInAbyss / Mobzy

Config-driven custom mobs for Spigot using ECS
https://mineinabyss.com/Mobzy/
MIT License
41 stars 8 forks source link

Prevent clientside hitbox packets #38

Closed 0ffz closed 2 years ago

0ffz commented 3 years ago

Hitboxes are calculated clientside, so for larger mobs I've had to add a left click listener which will raytrace out and see if any server side hitboxes were intersected (idk why Minecraft doesnt already do this but whatever).

Issue is for smalelr entities, the clients will still think the zombie hitbox counts and hit the entity even when it shouldnt be hit. This information must be contained within a packet, I would hope a serverbound packet saying an entity was hit exists.

It may be possible to just cancel it without cancelling the actual hit event firing, so we could super easily only use our own system.