MineInAbyss / Mobzy

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

prevent entities w/ PreventRiding component from riding vehicles #37

Closed pixelfac closed 3 years ago

pixelfac commented 3 years ago

Added PreventRiding component and VehicleEnterEvent function to cancel that vehicle enter event if the entity entering the vehicle has PreventRiding component.

pixelfac commented 3 years ago

I haven't actually tested this. I don't know how. The PreventRiding component is added to the NPC configs in https://github.com/MineInAbyss/server-config/pull/14 so you need that code as well in order to test

0ffz commented 3 years ago

You should add it in the init block inside the NPC class, we can also add it to other mobs if we wish but it makes sense for all NPCs to have.

0ffz commented 3 years ago

Oh sorry didnt see you made 2 PRs. I'll merge these in now, but just for future reference you can still make commits to your branch after a PR has been made, they'll just keep getting added.