2020-04-12 00:39:21 +00:00
|
|
|
From 52bcf883ebaa9220d2c61e926d828aba017a3ce7 Mon Sep 17 00:00:00 2001
|
2019-09-16 03:12:17 +00:00
|
|
|
From: Michael Himing <mhiming@gmail.com>
|
|
|
|
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
|
2020-04-02 21:07:06 +00:00
|
|
|
index 60330f753f..c22dbbfbe8 100644
|
2019-09-16 03:12:17 +00:00
|
|
|
--- a/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java
|
|
|
|
+++ b/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java
|
|
|
|
@@ -38,6 +38,11 @@ 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);
|
|
|
|
--
|
2020-03-15 20:03:36 +00:00
|
|
|
2.25.1
|
2019-09-16 03:12:17 +00:00
|
|
|
|