Replies: 8 comments 4 replies
-
Do you want a fake player that is static only or one that can have pathfinding and mobgoals? |
Beta Was this translation helpful? Give feedback.
-
One that can have mobgoals and such |
Beta Was this translation helpful? Give feedback.
-
That would be awesome |
Beta Was this translation helpful? Give feedback.
-
Is this really a papermc scope? |
Beta Was this translation helpful? Give feedback.
-
I just have no idea if theres a desire for us to maintain something as internal as this, especially when plugins with libraries already exist which achieve this and much more, and wouldn't rely on us having to maintain what are essentially a hack for a niche number of users |
Beta Was this translation helpful? Give feedback.
-
Probably a good start #10478 need to address Javadoc and other todos. |
Beta Was this translation helpful? Give feedback.
-
I wouldn't name it Bot that would be to vage and out of scope. "Human" inherited by HumanEntity makes more sense here. It can't extend Player. That would be a break with the inheritance. |
Beta Was this translation helpful? Give feedback.
-
If you want packet players we should have packet entities aswell, but imo its out of paper scope. |
Beta Was this translation helpful? Give feedback.
-
Is your feature request related to a problem?
The issue right now, is that there's no acknowledgement in the Spigot or Paper API, of the fact that player entities can be actually created, in NMS (direct server code).
As of now, the only way to create a player entity is to make a new EntityPlayer, either directly or through super() in an extending class. Afterwards, an efficient way to display said entity to other players on the server is to use packets, including ClientboundPlayerInfoUpdatePacket, PacketPlayOutNamedEntitySpawn, PacketPlayOutRelEntity..., and PacketPlayOutEntityEquipment.
However, if you want to make it move, interact with other entities, etc..... This is where the fun begins.... since EntityPlayer does not and cannot have pathfinder goals, as the entity is meant to be controlled by a player.
Describe the solution you'd like.
There are several ways to go about this. First of all, It would be nice if you could World.spawn(Location, EntityHuman.class), which would create said EntityPlayer and return it's CraftBukkit copy.
However, I think it would be worth to think about making a new entity class that implements Mob and HumanEntity. If there would be a way to assign pathfinder goals (as Paper already has an API for that) to this new entity, the fun part of the problem would be solved.
I haven't dug too deep into Craft(Entity) stuff, so im not sure which option would be more viable.
Describe alternatives you've considered.
The alternative I am using right now is pretty interesting. To get a player entity, that "looks to be" moving, have a custom ai, etc, I would:
If you have any questions, pls ask, I can share code or elaborate further if needed!
Other
Beta Was this translation helpful? Give feedback.
All reactions