JitseB / NPCLib

(Minecraft) NPCLib – Basic non-player character library.
MIT License
197 stars 49 forks source link

NPC setLocation does not mouve the NPC #146

Open NicolasWent opened 3 years ago

NicolasWent commented 3 years ago

I have tried to optimize the way the npc is shown to player in my minigame, so I have tried to pre-create all npcs then tp them to the location I wanted.

The thing is that npc.setLocation(newLoc), does not "teleport" the npc.

Can you please add a way to teleport the npc in an optimized way? Like npc.teleport(location). So we can move an npc very fast without need to create new packets

Mooselk commented 3 years ago

This should be pretty easy to implement, the hard part is teleporting the hologram.

JitseB commented 3 years ago

Why would you want to do it this way? Do you have an NPC that remains the same across different worlds?

NicolasWent commented 3 years ago

Because I think that it is more optimize this way that creating a new one.

Currently on my plugin, there is one tick delay before being able to teleport