CompactNPCLib icon indicating copy to clipboard operation
CompactNPCLib copied to clipboard

Ride entity

Open XakepSDK opened this issue 8 years ago • 3 comments

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

XakepSDK avatar Apr 02 '17 16:04 XakepSDK

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 avatar Apr 02 '17 19:04 InventivetalentDev

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

InventivetalentDev avatar Apr 02 '17 19:04 InventivetalentDev

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.

XakepSDK avatar Apr 03 '17 07:04 XakepSDK