diff --git a/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_7/BukkitQueue17.java b/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_7/BukkitQueue17.java index 0386a7c4..ff3c007c 100644 --- a/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_7/BukkitQueue17.java +++ b/bukkit/src/main/java/com/boydti/fawe/bukkit/v1_7/BukkitQueue17.java @@ -20,7 +20,6 @@ import java.lang.reflect.Field; import java.util.Arrays; import java.util.Collection; import java.util.Collections; -import java.util.HashMap; import java.util.HashSet; import java.util.Iterator; import java.util.List; @@ -515,47 +514,14 @@ public class BukkitQueue17 extends BukkitQueue_0 packets = null; - if (mask == 0 || mask == 65535 && hasEntities(nmsChunk)) { - for (EntityPlayer player : players) { - int currentVersion = player.playerConnection.networkManager.getVersion(); - if (currentVersion != version) { - if (packet != null) { - if (packets == null) { - packets = new HashMap<>(); - } - packets.put(version, packet); - packet = packets.get(currentVersion); - } - version = currentVersion; - if (packet == null) { - packet = new PacketPlayOutMapChunk(nmsChunk, false, 65280, version); - } - } - player.playerConnection.sendPacket(packet); - } - mask = 255; - version = -1; - packet = null; - packets = null; - } for (EntityPlayer player : players) { int currentVersion = player.playerConnection.networkManager.getVersion(); - if (currentVersion != version) { - if (packet != null) { - if (packets == null) { - packets = new HashMap<>(); - } - packets.put(version, packet); - packet = packets.get(currentVersion); - } - version = currentVersion; - if (packet == null) { - packet = new PacketPlayOutMapChunk(nmsChunk, false, mask, version); - } + if (mask == 0 || mask == 65535 && hasEntities(nmsChunk)) { + PacketPlayOutMapChunk packet = new PacketPlayOutMapChunk(nmsChunk, true, 65280, currentVersion); + player.playerConnection.sendPacket(packet); + mask = 255; } + PacketPlayOutMapChunk packet = new PacketPlayOutMapChunk(nmsChunk, true, mask, currentVersion); player.playerConnection.sendPacket(packet); } if (empty) { diff --git a/forge110/src/main/java/com/boydti/fawe/forge/v110/ForgeChunk_All.java b/forge110/src/main/java/com/boydti/fawe/forge/v110/ForgeChunk_All.java index 7667fa8a..951af7d2 100644 --- a/forge110/src/main/java/com/boydti/fawe/forge/v110/ForgeChunk_All.java +++ b/forge110/src/main/java/com/boydti/fawe/forge/v110/ForgeChunk_All.java @@ -5,6 +5,7 @@ import com.boydti.fawe.FaweCache; import com.boydti.fawe.example.CharFaweChunk; import com.boydti.fawe.object.FaweQueue; import com.boydti.fawe.util.MainUtil; +import com.boydti.fawe.util.MathMan; import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.ListTag; import com.sk89q.jnbt.StringTag; diff --git a/forge111/src/main/java/com/boydti/fawe/forge/v111/ForgeChunk_All.java b/forge111/src/main/java/com/boydti/fawe/forge/v111/ForgeChunk_All.java index 7eeb27a9..c605bfff 100644 --- a/forge111/src/main/java/com/boydti/fawe/forge/v111/ForgeChunk_All.java +++ b/forge111/src/main/java/com/boydti/fawe/forge/v111/ForgeChunk_All.java @@ -5,6 +5,7 @@ import com.boydti.fawe.FaweCache; import com.boydti.fawe.example.CharFaweChunk; import com.boydti.fawe.object.FaweQueue; import com.boydti.fawe.util.MainUtil; +import com.boydti.fawe.util.MathMan; import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.ListTag; import com.sk89q.jnbt.StringTag; diff --git a/forge112/src/main/java/com/boydti/fawe/forge/v112/ForgeChunk_All.java b/forge112/src/main/java/com/boydti/fawe/forge/v112/ForgeChunk_All.java index 8bbe73c0..984897f7 100644 --- a/forge112/src/main/java/com/boydti/fawe/forge/v112/ForgeChunk_All.java +++ b/forge112/src/main/java/com/boydti/fawe/forge/v112/ForgeChunk_All.java @@ -5,6 +5,7 @@ import com.boydti.fawe.FaweCache; import com.boydti.fawe.example.CharFaweChunk; import com.boydti.fawe.object.FaweQueue; import com.boydti.fawe.util.MainUtil; +import com.boydti.fawe.util.MathMan; import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.ListTag; import com.sk89q.jnbt.StringTag; diff --git a/forge1710/src/main/java/com/boydti/fawe/forge/v1710/ForgeChunk_All.java b/forge1710/src/main/java/com/boydti/fawe/forge/v1710/ForgeChunk_All.java index 50513166..6ac81892 100644 --- a/forge1710/src/main/java/com/boydti/fawe/forge/v1710/ForgeChunk_All.java +++ b/forge1710/src/main/java/com/boydti/fawe/forge/v1710/ForgeChunk_All.java @@ -5,6 +5,7 @@ import com.boydti.fawe.FaweCache; import com.boydti.fawe.example.CharFaweChunk; import com.boydti.fawe.object.FaweQueue; import com.boydti.fawe.util.MainUtil; +import com.boydti.fawe.util.MathMan; import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.ListTag; import com.sk89q.jnbt.StringTag; diff --git a/forge189/src/main/java/com/boydti/fawe/forge/v189/ForgeChunk_All.java b/forge189/src/main/java/com/boydti/fawe/forge/v189/ForgeChunk_All.java index 9322cd37..b1e23f55 100644 --- a/forge189/src/main/java/com/boydti/fawe/forge/v189/ForgeChunk_All.java +++ b/forge189/src/main/java/com/boydti/fawe/forge/v189/ForgeChunk_All.java @@ -5,6 +5,7 @@ import com.boydti.fawe.FaweCache; import com.boydti.fawe.example.CharFaweChunk; import com.boydti.fawe.object.FaweQueue; import com.boydti.fawe.util.MainUtil; +import com.boydti.fawe.util.MathMan; import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.ListTag; import com.sk89q.jnbt.StringTag; diff --git a/forge194/src/main/java/com/boydti/fawe/forge/v194/ForgeChunk_All.java b/forge194/src/main/java/com/boydti/fawe/forge/v194/ForgeChunk_All.java index 8ed778f2..413d20b6 100644 --- a/forge194/src/main/java/com/boydti/fawe/forge/v194/ForgeChunk_All.java +++ b/forge194/src/main/java/com/boydti/fawe/forge/v194/ForgeChunk_All.java @@ -5,6 +5,7 @@ import com.boydti.fawe.FaweCache; import com.boydti.fawe.example.CharFaweChunk; import com.boydti.fawe.object.FaweQueue; import com.boydti.fawe.util.MainUtil; +import com.boydti.fawe.util.MathMan; import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.ListTag; import com.sk89q.jnbt.StringTag; diff --git a/sponge/src/main/java/com/boydti/fawe/sponge/v1_12/SpongeChunk_1_12.java b/sponge/src/main/java/com/boydti/fawe/sponge/v1_12/SpongeChunk_1_12.java index 1951608c..a86755ef 100644 --- a/sponge/src/main/java/com/boydti/fawe/sponge/v1_12/SpongeChunk_1_12.java +++ b/sponge/src/main/java/com/boydti/fawe/sponge/v1_12/SpongeChunk_1_12.java @@ -5,6 +5,7 @@ import com.boydti.fawe.FaweCache; import com.boydti.fawe.example.CharFaweChunk; import com.boydti.fawe.object.FaweQueue; import com.boydti.fawe.util.MainUtil; +import com.boydti.fawe.util.MathMan; import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.DoubleTag; import com.sk89q.jnbt.FloatTag; diff --git a/sponge111/src/main/java/com/boydti/fawe/sponge/v1_11/SpongeChunk_1_11.java b/sponge111/src/main/java/com/boydti/fawe/sponge/v1_11/SpongeChunk_1_11.java index 979976bf..e2dc5646 100644 --- a/sponge111/src/main/java/com/boydti/fawe/sponge/v1_11/SpongeChunk_1_11.java +++ b/sponge111/src/main/java/com/boydti/fawe/sponge/v1_11/SpongeChunk_1_11.java @@ -5,6 +5,7 @@ import com.boydti.fawe.FaweCache; import com.boydti.fawe.example.CharFaweChunk; import com.boydti.fawe.object.FaweQueue; import com.boydti.fawe.util.MainUtil; +import com.boydti.fawe.util.MathMan; import com.sk89q.jnbt.CompoundTag; import com.sk89q.jnbt.DoubleTag; import com.sk89q.jnbt.FloatTag;