From 8c06dd087215a03ab2218c56168fbbabcdbe9753 Mon Sep 17 00:00:00 2001 From: prplz Date: Mon, 16 Sep 2019 13:12:17 +1000 Subject: [PATCH] Fix nether portal frame creation (#2546) --- .../Fix-nether-portal-creation.patch | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 Spigot-Server-Patches/Fix-nether-portal-creation.patch diff --git a/Spigot-Server-Patches/Fix-nether-portal-creation.patch b/Spigot-Server-Patches/Fix-nether-portal-creation.patch new file mode 100644 index 0000000000..4ed1a93015 --- /dev/null +++ b/Spigot-Server-Patches/Fix-nether-portal-creation.patch @@ -0,0 +1,23 @@ +From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 +From: Michael Himing +Date: Mon, 9 Sep 2019 13:21:17 +1000 +Subject: [PATCH] Fix nether portal creation + + +diff --git a/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java b/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java +index 88fbfc01b..f66f8b323 100644 +--- a/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java ++++ b/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java +@@ -0,0 +0,0 @@ public class BlockStateListPopulator extends DummyGeneratorAccess { + + @Override + public boolean setTypeAndData(BlockPosition position, IBlockData data, int flag) { ++ // Paper start ++ // When a LinkedHashMap entry is overwritten, it keeps its old position. Removing the entry here before adding ++ // a new one ensures that the nether portal blocks are placed last and are not destroyed by physics. ++ list.remove(position); ++ // Paper end + CraftBlockState state = CraftBlockState.getBlockState(world, position, flag); + state.setData(data); + list.put(position, state); +-- \ No newline at end of file