cleanups, add some vanilla tags

This commit is contained in:
Vincent Lee committed 2019-08-04 10:45:33 -07:00
1 parent f671faf20a
commit fb2cac4bf0
9 files changed
+50 -80

No files matched your search

@@ -44,13 +44,9 @@ public final class PacketHandler {
if(world instanceof ServerWorld) {
ServerWorld ws = (ServerWorld) world;
// todo 1.14 this sends duplicates
for (ServerPlayerEntity playerMP : ws.getPlayers()) {
if (playerMP.getDistanceSq(pos.getX(), pos.getY(), pos.getZ()) < 64 * 64) {
HANDLER.send(PacketDistributor.TRACKING_CHUNK.with(() -> world.getChunkAt(pos)), toSend);
}
}
ws.getChunkProvider().chunkManager.getTrackingPlayers(new ChunkPos(pos), false)
.filter(p -> p.getDistanceSq(pos.getX(), pos.getY(), pos.getZ()) < 64 * 64)
.forEach(p -> HANDLER.send(PacketDistributor.PLAYER.with(() -> p), toSend));
}
}