CompactNPCLib
CompactNPCLib copied to clipboard
Ride entity
Is it possible to ride entity and controll via WASD? I'm trying to do this, but i need method overriding in minecraft entity class.(EntityPig, method "g")
I don't think the API has direct methods to allow entity riding yet.
However, you could just create your own entity class as described here and override the g method: https://github.com/InventivetalentDev/CompactNPCLib/wiki/Creating-custom-NPC-classes
TODO: Add NPC Control Event -> https://github.com/InventivetalentDev/CompactNPCLib/blob/master/API/src/main/java/org/inventivetalent/npclib/npc/living/NPCLivingAbstract.java#L54
It's easy to ride entity using addPassenger method from bukkit Entity interface, but if you wan't to control entity, you need to overwrite some methods, like "g" and remove "tame" system. It will be really good, to make annotation for this.