Player Lookup
public final class PlayerLookup
Content copied to clipboard
For example, a block entity may use the methods in this class to send a packet to all clients which can see the block entity in order notify clients about a change.
The word "tracking" means that an entity/chunk on the server is known to a player's client (within in view distance) and the (block) entity should notify tracking clients of changes.
These methods should only be called on the server thread and only be used on logical a server.
Functions
all
Link copied to clipboard
around
Link copied to clipboard
static Collection<ServerPlayerEntity> around(ServerWorld world, Vec3d pos, double radius)
Content copied to clipboard
static Collection<ServerPlayerEntity> around(ServerWorld world, Vec3i pos, double radius)
Content copied to clipboard
tracking
Link copied to clipboard
static Collection<ServerPlayerEntity> tracking(ServerWorld world, BlockPos pos)
Content copied to clipboard
static Collection<ServerPlayerEntity> tracking(ServerWorld world, ChunkPos pos)
Content copied to clipboard
world
Link copied to clipboard
Sources
jvm source
Link copied to clipboard