Suggestion (World) Get Entity by ID (integer one)

marlester__

New member
Aug 4, 2023
4
0
1
I see you implemented get entity by UUID already, good job, however I need to get entity by ID because I do not have UUID,
there is already a getEntity(int id) in ServerLevel class so it won't be hard.
Would be good to get the official method, thanks in advance.
 

Machine Maker

Paper Developer
Staff member
Dec 17, 2021
132
6
19
18
California
If this is some packet-related thing, protocol lib has helper methods for doing that.

Not sure if we want to add more API surrounding the numerical entity ID. It really isn't a good way of identifying an entity.
 

marlester__

New member
Aug 4, 2023
4
0
1
If this is some packet-related thing, protocol lib has helper methods for doing that.

Not sure if we want to add more API surrounding the numerical entity ID. It really isn't a good way of identifying an entity.
Hello, I am trying to get entity only knowing entity id due to the limitations of my code case, I tried to get entity uuid or other methods of achieving my goal, but hopeless, I do not think you need more details.
Currently I am getting it with an NMS-reflection way, but I would like an official API way, thanks for understanding.