use of net.minecraft.server.level.ChunkMap.TrackedEntity in project Citizens2 by CitizensDev.
the class NMSImpl method replaceTrackerEntry.
@Override
public void replaceTrackerEntry(Player player) {
ServerLevel server = (ServerLevel) NMSImpl.getHandle(player).level;
TrackedEntity entry = server.getChunkProvider().chunkMap.G.get(player.getEntityId());
if (entry == null)
return;
PlayerlistTracker replace = new PlayerlistTracker(server.getChunkProvider().chunkMap, entry);
server.getChunkProvider().chunkMap.G.put(player.getEntityId(), replace);
if (getHandle(player) instanceof EntityHumanNPC) {
((EntityHumanNPC) getHandle(player)).setTracked(replace);
}
}
use of net.minecraft.server.level.ChunkMap.TrackedEntity in project Citizens2 by CitizensDev.
the class NMSImpl method replaceTrackerEntry.
@Override
public void replaceTrackerEntry(Player player) {
ServerLevel server = (ServerLevel) NMSImpl.getHandle(player).level;
TrackedEntity entry = server.getChunkSource().chunkMap.entityMap.get(player.getEntityId());
if (entry == null)
return;
PlayerlistTracker replace = new PlayerlistTracker(server.getChunkSource().chunkMap, entry);
server.getChunkSource().chunkMap.entityMap.put(player.getEntityId(), replace);
if (getHandle(player) instanceof EntityHumanNPC) {
((EntityHumanNPC) getHandle(player)).setTracked(replace);
}
}
Aggregations