Mirror von
https://github.com/PaperMC/Paper.git
synchronisiert 2024-11-15 04:20:04 +01:00
36f34f01c0
Upstream has released updates that appears to apply and compile correctly. This update has not been tested by PaperMC and as with ANY update, please do your own testing Bukkit Changes: da9ef3c5 #496: Add methods to get/set ItemStacks in EquipmentSlots 3abebc9f #492: Let Tameable extend Animals rather than Entity 941111a0 #495: Expose ItemStack and hand used in PlayerShearEntityEvent 4fe19cae #494: InventoryView - Add missing Brewing FUEL_TIME CraftBukkit Changes:933e9094
#664: Add methods to get/set ItemStacks in EquipmentSlots18722312
#662: Expose ItemStack and hand used in PlayerShearEntityEvent
23 Zeilen
1.2 KiB
Diff
23 Zeilen
1.2 KiB
Diff
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
|
|
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
|
|
index 60330f753fcbdef679a9444c3888f1656b2fa344..c22dbbfbe8b16d4c2f1df1f9efd3b06e330ac909 100644
|
|
--- 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);
|