From 662bae45b7502df9dde0811af3cfa8b507b394fd Mon Sep 17 00:00:00 2001 From: KennyTV <28825609+KennyTV@users.noreply.github.com> Date: Sat, 22 Jun 2019 16:07:38 +0200 Subject: [PATCH 1/2] Fix 1.13 clients unable to break infested blocks (#1370) --- .../protocol1_13to1_12_2/data/MappingData.java | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/data/MappingData.java b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/data/MappingData.java index 45c1efd1f..9e5cfb34e 100644 --- a/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/data/MappingData.java +++ b/common/src/main/java/us/myles/ViaVersion/protocols/protocol1_13to1_12_2/data/MappingData.java @@ -55,7 +55,8 @@ public class MappingData { MappingData.class.getClassLoader() .getResourceAsStream("assets/viaversion/data/mapping-lang-1.12-1.13.json") ), - (new TypeToken>(){}).getType()); + (new TypeToken>() { + }).getType()); try { String[] lines; try (Reader reader = new InputStreamReader(MappingData.class.getClassLoader() @@ -199,6 +200,14 @@ public class MappingData { if (Via.getConfig().isSnowCollisionFix()) { oldToNew[1248] = 3416; } + + // Remap infested blocks, as they are instantly breakabale in 1.13+ and can't be broken by those clients on older servers + oldToNew[1552] = 1; // stone + oldToNew[1553] = 14; // cobblestone + oldToNew[1554] = 3983; // stone bricks + oldToNew[1555] = 3984; // mossy stone bricks + oldToNew[1556] = 3985; // cracked stone bricks + oldToNew[1557] = 3986; // chiseled stone bricks } @Override From d6973a301b20ca89e4b324afdc904a4880e87ddf Mon Sep 17 00:00:00 2001 From: Myles Date: Fri, 28 Jun 2019 22:01:46 +0100 Subject: [PATCH 2/2] Fix #1382 --- .../bukkit/listeners/protocol1_9to1_8/PaperPatch.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bukkit/src/main/java/us/myles/ViaVersion/bukkit/listeners/protocol1_9to1_8/PaperPatch.java b/bukkit/src/main/java/us/myles/ViaVersion/bukkit/listeners/protocol1_9to1_8/PaperPatch.java index 51a1f9c22..e4a3eb9bc 100644 --- a/bukkit/src/main/java/us/myles/ViaVersion/bukkit/listeners/protocol1_9to1_8/PaperPatch.java +++ b/bukkit/src/main/java/us/myles/ViaVersion/bukkit/listeners/protocol1_9to1_8/PaperPatch.java @@ -4,6 +4,7 @@ import org.bukkit.Location; import org.bukkit.Material; import org.bukkit.block.BlockFace; import org.bukkit.event.EventHandler; +import org.bukkit.event.EventPriority; import org.bukkit.event.block.BlockPlaceEvent; import us.myles.ViaVersion.ViaVersionPlugin; import us.myles.ViaVersion.bukkit.listeners.ViaBukkitListener; @@ -22,7 +23,7 @@ public class PaperPatch extends ViaBukkitListener { If there is a better fix then we'll replace this. */ - @EventHandler(ignoreCancelled = true) + @EventHandler(ignoreCancelled = true, priority = EventPriority.HIGHEST) public void onPlace(BlockPlaceEvent e) { if (isOnPipe(e.getPlayer())) { Location location = e.getPlayer().getLocation();