mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-19 03:39:17 +00:00
cleanups, add some vanilla tags
This commit is contained in:
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));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user