mirror of
https://github.com/GTNewHorizons/Botania.git
synced 2026-11-28 15:56:14 +00:00
Cleanup...
This commit is contained in:
1 parent
6c45975558
commit
861f40e64c
78 files changed
+367
-397
No files matched your search
@@ -23,7 +23,7 @@ public final class VanillaPacketDispatcher {
|
||||
List players = world.playerEntities;
|
||||
for(Object player : players)
|
||||
if(player instanceof EntityPlayerMP) {
|
||||
EntityPlayerMP mp = (EntityPlayerMP) player;
|
||||
EntityPlayerMP mp = (EntityPlayerMP) player;
|
||||
if(pointDistancePlane(mp.posX, mp.posZ, tile.xCoord + 0.5, tile.zCoord + 0.5) < 64)
|
||||
((EntityPlayerMP) player).playerNetServerHandler.sendPacket(tile.getDescriptionPacket());
|
||||
}
|
||||
@@ -34,7 +34,7 @@ public final class VanillaPacketDispatcher {
|
||||
if(tile != null)
|
||||
dispatchTEToNearbyPlayers(tile);
|
||||
}
|
||||
|
||||
|
||||
public static float pointDistancePlane(double x1, double y1, double x2, double y2) {
|
||||
return (float) Math.hypot(x1 - x2, y1 - y2);
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user