1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-09-28 15:08:47 +00:00

Only send the packet to people within 64 blocks

This is equivalent to what vanilla Minecraft does
This commit is contained in:
SquidDev 2017-09-12 22:44:49 +01:00
parent afec3743f3
commit 1ef7c8e8db

View File

@ -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