InventivetalentDev / CompactNPCLib

Library to create NPCs
MIT License
22 stars 9 forks source link

Ride entity #36

Open XakepSDK opened 7 years ago

XakepSDK commented 7 years ago

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")

InventivetalentDev commented 7 years ago

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

InventivetalentDev commented 7 years ago

TODO: Add NPC Control Event -> https://github.com/InventivetalentDev/CompactNPCLib/blob/master/API/src/main/java/org/inventivetalent/npclib/npc/living/NPCLivingAbstract.java#L54

XakepSDK commented 7 years ago

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.