mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-28 13:45:36 +01:00
Fix error when visualizing outside view distance
This commit is contained in:
parent
cba04dc208
commit
c474917ec2
@ -406,11 +406,11 @@ public class BukkitQueue_1_10 extends BukkitQueue_0<net.minecraft.server.v1_10_R
|
||||
try {
|
||||
PlayerChunkMap playerManager = ((CraftWorld) getWorld()).getHandle().getPlayerChunkMap();
|
||||
boolean watching = false;
|
||||
boolean[] watchingArr = new boolean[players.length];
|
||||
for (int i = 0; i < players.length; i++) {
|
||||
EntityPlayer player = ((CraftPlayer) ((BukkitPlayer) players[i]).parent).getHandle();
|
||||
if (!playerManager.a(player, chunk.getX(), chunk.getZ())) {
|
||||
players[i] = null;
|
||||
} else {
|
||||
if (playerManager.a(player, chunk.getX(), chunk.getZ())) {
|
||||
watchingArr[i] = true;
|
||||
watching = true;
|
||||
}
|
||||
}
|
||||
@ -445,8 +445,8 @@ public class BukkitQueue_1_10 extends BukkitQueue_0<net.minecraft.server.v1_10_R
|
||||
}
|
||||
});
|
||||
packet.a(buffer);
|
||||
for (FawePlayer player : players) {
|
||||
if (player != null) ((CraftPlayer) ((BukkitPlayer) player).parent).getHandle().playerConnection.sendPacket(packet);
|
||||
for (int i = 0; i < players.length; i++) {
|
||||
if (watchingArr[i]) ((CraftPlayer) ((BukkitPlayer) players[i]).parent).getHandle().playerConnection.sendPacket(packet);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -406,11 +406,11 @@ public class BukkitQueue_1_11 extends BukkitQueue_0<net.minecraft.server.v1_11_R
|
||||
try {
|
||||
PlayerChunkMap playerManager = ((CraftWorld) getWorld()).getHandle().getPlayerChunkMap();
|
||||
boolean watching = false;
|
||||
boolean[] watchingArr = new boolean[players.length];
|
||||
for (int i = 0; i < players.length; i++) {
|
||||
EntityPlayer player = ((CraftPlayer) ((BukkitPlayer) players[i]).parent).getHandle();
|
||||
if (!playerManager.a(player, chunk.getX(), chunk.getZ())) {
|
||||
players[i] = null;
|
||||
} else {
|
||||
if (playerManager.a(player, chunk.getX(), chunk.getZ())) {
|
||||
watchingArr[i] = true;
|
||||
watching = true;
|
||||
}
|
||||
}
|
||||
@ -445,8 +445,8 @@ public class BukkitQueue_1_11 extends BukkitQueue_0<net.minecraft.server.v1_11_R
|
||||
}
|
||||
});
|
||||
packet.a(buffer);
|
||||
for (FawePlayer player : players) {
|
||||
if (player != null) ((CraftPlayer) ((BukkitPlayer) player).parent).getHandle().playerConnection.sendPacket(packet);
|
||||
for (int i = 0; i < players.length; i++) {
|
||||
if (watchingArr[i]) ((CraftPlayer) ((BukkitPlayer) players[i]).parent).getHandle().playerConnection.sendPacket(packet);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -267,11 +267,11 @@ public class BukkitQueue_1_9_R1 extends BukkitQueue_0<net.minecraft.server.v1_9_
|
||||
try {
|
||||
PlayerChunkMap playerManager = ((CraftWorld) getWorld()).getHandle().getPlayerChunkMap();
|
||||
boolean watching = false;
|
||||
boolean[] watchingArr = new boolean[players.length];
|
||||
for (int i = 0; i < players.length; i++) {
|
||||
EntityPlayer player = ((CraftPlayer) ((BukkitPlayer) players[i]).parent).getHandle();
|
||||
if (!playerManager.a(player, chunk.getX(), chunk.getZ())) {
|
||||
players[i] = null;
|
||||
} else {
|
||||
if (playerManager.a(player, chunk.getX(), chunk.getZ())) {
|
||||
watchingArr[i] = true;
|
||||
watching = true;
|
||||
}
|
||||
}
|
||||
@ -306,8 +306,8 @@ public class BukkitQueue_1_9_R1 extends BukkitQueue_0<net.minecraft.server.v1_9_
|
||||
}
|
||||
});
|
||||
packet.a(buffer);
|
||||
for (FawePlayer player : players) {
|
||||
if (player != null) ((CraftPlayer) ((BukkitPlayer) player).parent).getHandle().playerConnection.sendPacket(packet);
|
||||
for (int i = 0; i < players.length; i++) {
|
||||
if (watchingArr[i]) ((CraftPlayer) ((BukkitPlayer) players[i]).parent).getHandle().playerConnection.sendPacket(packet);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -154,11 +154,11 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
|
||||
try {
|
||||
PlayerChunkMap playerManager = ((WorldServer) getWorld()).getPlayerChunkMap();
|
||||
boolean watching = false;
|
||||
boolean[] watchingArr = new boolean[players.length];
|
||||
for (int i = 0; i < players.length; i++) {
|
||||
EntityPlayerMP player = (EntityPlayerMP) ((ForgePlayer) players[i]).parent;
|
||||
if (!playerManager.isPlayerWatchingChunk(player, chunk.getX(), chunk.getZ())) {
|
||||
players[i] = null;
|
||||
} else {
|
||||
if (playerManager.isPlayerWatchingChunk(player, chunk.getX(), chunk.getZ())) {
|
||||
watchingArr[i] = true;
|
||||
watching = true;
|
||||
}
|
||||
}
|
||||
@ -192,8 +192,8 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
|
||||
}
|
||||
});
|
||||
packet.readPacketData(buffer);
|
||||
for (FawePlayer player : players) {
|
||||
if (player != null) ((EntityPlayerMP) ((ForgePlayer) player).parent).connection.sendPacket(packet);
|
||||
for (int i = 0; i < players.length; i++) {
|
||||
if (watchingArr[i]) ((EntityPlayerMP) ((ForgePlayer) players[i]).parent).connection.sendPacket(packet);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -169,11 +169,11 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
|
||||
try {
|
||||
PlayerChunkMap playerManager = ((WorldServer) getWorld()).getPlayerChunkMap();
|
||||
boolean watching = false;
|
||||
boolean[] watchingArr = new boolean[players.length];
|
||||
for (int i = 0; i < players.length; i++) {
|
||||
EntityPlayerMP player = (EntityPlayerMP) ((ForgePlayer) players[i]).parent;
|
||||
if (!playerManager.isPlayerWatchingChunk(player, chunk.getX(), chunk.getZ())) {
|
||||
players[i] = null;
|
||||
} else {
|
||||
if (playerManager.isPlayerWatchingChunk(player, chunk.getX(), chunk.getZ())) {
|
||||
watchingArr[i] = true;
|
||||
watching = true;
|
||||
}
|
||||
}
|
||||
@ -207,8 +207,8 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
|
||||
}
|
||||
});
|
||||
packet.readPacketData(buffer);
|
||||
for (FawePlayer player : players) {
|
||||
if (player != null) ((EntityPlayerMP) ((ForgePlayer) player).parent).connection.sendPacket(packet);
|
||||
for (int i = 0; i < players.length; i++) {
|
||||
if (watchingArr[i]) ((EntityPlayerMP) ((ForgePlayer) players[i]).parent).connection.sendPacket(packet);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -330,11 +330,11 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
|
||||
try {
|
||||
PlayerManager playerManager = ((WorldServer) getWorld()).getPlayerManager();
|
||||
boolean watching = false;
|
||||
boolean[] watchingArr = new boolean[players.length];
|
||||
for (int i = 0; i < players.length; i++) {
|
||||
EntityPlayerMP player = (EntityPlayerMP) ((ForgePlayer) players[i]).parent;
|
||||
if (!playerManager.isPlayerWatchingChunk(player, chunk.getX(), chunk.getZ())) {
|
||||
players[i] = null;
|
||||
} else {
|
||||
if (playerManager.isPlayerWatchingChunk(player, chunk.getX(), chunk.getZ())) {
|
||||
watchingArr[i] = true;
|
||||
watching = true;
|
||||
}
|
||||
}
|
||||
@ -368,8 +368,8 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
|
||||
}
|
||||
});
|
||||
packet.readPacketData(buffer);
|
||||
for (FawePlayer player : players) {
|
||||
if (player != null) ((EntityPlayerMP) ((ForgePlayer) player).parent).playerNetServerHandler.sendPacket(packet);
|
||||
for (int i = 0; i < players.length; i++) {
|
||||
if (watchingArr[i]) ((EntityPlayerMP) ((ForgePlayer) players[i]).parent).playerNetServerHandler.sendPacket(packet);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -211,11 +211,11 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
|
||||
try {
|
||||
PlayerManager playerManager = ((WorldServer) getWorld()).getPlayerManager();
|
||||
boolean watching = false;
|
||||
boolean[] watchingArr = new boolean[players.length];
|
||||
for (int i = 0; i < players.length; i++) {
|
||||
EntityPlayerMP player = (EntityPlayerMP) ((ForgePlayer) players[i]).parent;
|
||||
if (!playerManager.isPlayerWatchingChunk(player, chunk.getX(), chunk.getZ())) {
|
||||
players[i] = null;
|
||||
} else {
|
||||
if (playerManager.isPlayerWatchingChunk(player, chunk.getX(), chunk.getZ())) {
|
||||
watchingArr[i] = true;
|
||||
watching = true;
|
||||
}
|
||||
}
|
||||
@ -249,8 +249,8 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
|
||||
}
|
||||
});
|
||||
packet.readPacketData(buffer);
|
||||
for (FawePlayer player : players) {
|
||||
if (player != null) ((EntityPlayerMP) ((ForgePlayer) player).parent).playerNetServerHandler.sendPacket(packet);
|
||||
for (int i = 0; i < players.length; i++) {
|
||||
if (watchingArr[i]) ((EntityPlayerMP) ((ForgePlayer) players[i]).parent).playerNetServerHandler.sendPacket(packet);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
@ -252,11 +252,11 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
|
||||
try {
|
||||
PlayerChunkMap playerManager = ((WorldServer) getWorld()).getPlayerChunkMap();
|
||||
boolean watching = false;
|
||||
boolean[] watchingArr = new boolean[players.length];
|
||||
for (int i = 0; i < players.length; i++) {
|
||||
EntityPlayerMP player = (EntityPlayerMP) ((ForgePlayer) players[i]).parent;
|
||||
if (!playerManager.isPlayerWatchingChunk(player, chunk.getX(), chunk.getZ())) {
|
||||
players[i] = null;
|
||||
} else {
|
||||
if (playerManager.isPlayerWatchingChunk(player, chunk.getX(), chunk.getZ())) {
|
||||
watchingArr[i] = true;
|
||||
watching = true;
|
||||
}
|
||||
}
|
||||
@ -290,8 +290,8 @@ public class ForgeQueue_All extends NMSMappedFaweQueue<World, Chunk, ExtendedBlo
|
||||
}
|
||||
});
|
||||
packet.readPacketData(buffer);
|
||||
for (FawePlayer player : players) {
|
||||
if (player != null) ((EntityPlayerMP) ((ForgePlayer) player).parent).connection.sendPacket(packet);
|
||||
for (int i = 0; i < players.length; i++) {
|
||||
if (watchingArr[i]) ((EntityPlayerMP) ((ForgePlayer) players[i]).parent).connection.sendPacket(packet);
|
||||
}
|
||||
} catch (IOException e) {
|
||||
e.printStackTrace();
|
||||
|
Loading…
Reference in New Issue
Block a user