From 1ef7c8e8dbc3a3d348b4a45bf641876bf41fe0de Mon Sep 17 00:00:00 2001 From: SquidDev Date: Tue, 12 Sep 2017 22:44:49 +0100 Subject: [PATCH] Only send the packet to people within 64 blocks This is equivalent to what vanilla Minecraft does --- .../computercraft/shared/proxy/ComputerCraftProxyCommon.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/java/dan200/computercraft/shared/proxy/ComputerCraftProxyCommon.java b/src/main/java/dan200/computercraft/shared/proxy/ComputerCraftProxyCommon.java index c26507702..d6a0b1f10 100644 --- a/src/main/java/dan200/computercraft/shared/proxy/ComputerCraftProxyCommon.java +++ b/src/main/java/dan200/computercraft/shared/proxy/ComputerCraftProxyCommon.java @@ -159,7 +159,8 @@ public abstract class ComputerCraftProxyCommon implements IComputerCraftProxy packet.m_dataInt = new int[] { pos.getX(), pos.getY(), pos.getZ() }; } - ComputerCraft.sendToAllPlayers( packet ); + NetworkRegistry.TargetPoint point = new NetworkRegistry.TargetPoint( world.provider.getDimension(), pos.getX(), pos.getY(), pos.getZ(), 64 ); + ComputerCraft.sendToAllAround( packet, point ); } @Override