diff options
Diffstat (limited to 'patches/server')
49 files changed, 142 insertions, 167 deletions
diff --git a/patches/server/0009-MC-Utils.patch b/patches/server/0009-MC-Utils.patch index 9958d9735c..7ce631316f 100644 --- a/patches/server/0009-MC-Utils.patch +++ b/patches/server/0009-MC-Utils.patch @@ -6339,10 +6339,10 @@ index d5451cb1976ca3675dd19b07bd8a2d363f82db86..e5054699f2f7555455b4da20249e253d + } } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 799444e4101283c972a160742a9e2548e604173f..fb8c641604473a3853b2f8b9cd5c8a65fd2482be 100644 +index 36a847cf1560c0c188209998d7b92b73ccca35d5..5461f12bc71da1da44711660cd035067e499ec10 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -256,8 +256,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -257,8 +257,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public Chunk[] getLoadedChunks() { @@ -6353,7 +6353,7 @@ index 799444e4101283c972a160742a9e2548e604173f..fb8c641604473a3853b2f8b9cd5c8a65 } @Override -@@ -334,7 +334,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -335,7 +335,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean refreshChunk(int x, int z) { @@ -6362,7 +6362,7 @@ index 799444e4101283c972a160742a9e2548e604173f..fb8c641604473a3853b2f8b9cd5c8a65 if (playerChunk == null) return false; playerChunk.getTickingChunkFuture().thenAccept(either -> { -@@ -2110,4 +2110,51 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2111,4 +2111,51 @@ public class CraftWorld extends CraftRegionAccessor implements World { return this.spigot; } // Spigot end diff --git a/patches/server/0010-Adventure.patch b/patches/server/0010-Adventure.patch index 07b2834d8e..911e15e6a4 100644 --- a/patches/server/0010-Adventure.patch +++ b/patches/server/0010-Adventure.patch @@ -2637,7 +2637,7 @@ index bb97fdb9aa6167083442a928276ebe4225a586ef..eeaa40e8121643c6c1d951e76e7361e2 @Override diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 709330ca9caa82a6de71767b3d5c32f97ea1d68b..daf20aa9a83a2583c0c61a4123cc2e528d19801d 100644 +index 1b6cf839450cc69bd3cda6d874656c5345b0ac51..2e6259e1d07892cb4fbcc81de069b75144d6f533 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -208,6 +208,7 @@ import org.bukkit.craftbukkit.SpigotTimings; // Spigot @@ -2730,7 +2730,7 @@ index 709330ca9caa82a6de71767b3d5c32f97ea1d68b..daf20aa9a83a2583c0c61a4123cc2e52 public boolean logIPs() { diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 785c7e11f92610be58b624d252d1858658496af7..99607edee9fba8df87f0525bf0eadee865ab38a4 100644 +index c60e7f27ea4060e455a18feb6f6a7919e80a8fc8..e941b2f989333932e81cf7d04f70d0e7aad89432 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java @@ -190,6 +190,7 @@ import net.minecraft.world.item.trading.MerchantOffers; @@ -3584,10 +3584,10 @@ index cbdb1a56a97150c164515a4ce6d3ba06428bf321..b214e7b302abbfe1641485a05f1371ac public URI getUrl() { return this.handle.link(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index fb8c641604473a3853b2f8b9cd5c8a65fd2482be..0ced83dba344ec55df0a0c992437dbb162426518 100644 +index 5461f12bc71da1da44711660cd035067e499ec10..67f9a3ff28014235754121363e7a622787092bfb 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -166,6 +166,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -167,6 +167,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { private final BlockMetadataStore blockMetadata = new BlockMetadataStore(this); private final Object2IntOpenHashMap<SpawnCategory> spawnCategoryLimit = new Object2IntOpenHashMap<>(); private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftWorld.DATA_TYPE_REGISTRY); @@ -3595,7 +3595,7 @@ index fb8c641604473a3853b2f8b9cd5c8a65fd2482be..0ced83dba344ec55df0a0c992437dbb1 private static final Random rand = new Random(); -@@ -1705,6 +1706,15 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1706,6 +1707,15 @@ public class CraftWorld extends CraftRegionAccessor implements World { entityTracker.broadcastAndSend(packet); } } @@ -3611,7 +3611,7 @@ index fb8c641604473a3853b2f8b9cd5c8a65fd2482be..0ced83dba344ec55df0a0c992437dbb1 @Override public void playSound(Entity entity, String sound, org.bukkit.SoundCategory category, float volume, float pitch, long seed) { -@@ -1717,6 +1727,33 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1718,6 +1728,33 @@ public class CraftWorld extends CraftRegionAccessor implements World { } } @@ -3645,7 +3645,7 @@ index fb8c641604473a3853b2f8b9cd5c8a65fd2482be..0ced83dba344ec55df0a0c992437dbb1 private Map<String, GameRules.Key<?>> gamerules; public synchronized Map<String, GameRules.Key<?>> getGameRulesNMS() { if (this.gamerules != null) { -@@ -2156,5 +2193,18 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2157,5 +2194,18 @@ public class CraftWorld extends CraftRegionAccessor implements World { public void setSendViewDistance(final int viewDistance) { throw new UnsupportedOperationException("Not implemented yet"); } @@ -4185,7 +4185,7 @@ index 55945b83a5426b352bad9507cc9e94afb1278032..9ea1537408ff2d790747b6e5a681d917 public boolean isOp() { return true; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index a3550d84c273c9720491484382a4bc50dc3246a6..24631135f90bb74bf829160ed079e152573666a2 100644 +index 2e4e6fee48d0f6be3b23a109a7c661b27179ccaa..361d138f36e6eb25c225b1278fc73f045f0fc72f 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -395,14 +395,40 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @@ -5228,7 +5228,7 @@ index c71a4971f127fdfc753306019313ce1a31201120..fd3b12477c30d1eabdbe57ea77902793 + // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java -index 2d68086ef09b5f2d6b3d3e6200e621c23747b25a..f3789ea732b17a311d8203a58a97d11370ec7863 100644 +index 4054deb8ba4eb26c712d76311a250b6b80ff8455..bae8b6486d8adb9be035e2f6f697d2d35ec0e67e 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java @@ -1097,6 +1097,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta { diff --git a/patches/server/0122-Provide-E-TE-Chunk-count-stat-methods.patch b/patches/server/0122-Provide-E-TE-Chunk-count-stat-methods.patch index 7e5e8a1054..1c9bd827bd 100644 --- a/patches/server/0122-Provide-E-TE-Chunk-count-stat-methods.patch +++ b/patches/server/0122-Provide-E-TE-Chunk-count-stat-methods.patch @@ -20,10 +20,10 @@ index 943c14b26cf5b1c9f9ea1acec058cecac3b93bf7..e5eac1977f77b7ce1112bfe7ac1b77d9 private final List<TickingBlockEntity> pendingBlockEntityTickers = Lists.newArrayList(); private boolean tickingBlockEntities; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 0ced83dba344ec55df0a0c992437dbb162426518..ea90a64810e2f0669d862b5b6deba0905380051f 100644 +index 67f9a3ff28014235754121363e7a622787092bfb..ecdfe2d1e9ddc16034523619aa304a451269763b 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -168,6 +168,48 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -169,6 +169,48 @@ public class CraftWorld extends CraftRegionAccessor implements World { private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftWorld.DATA_TYPE_REGISTRY); private net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers diff --git a/patches/server/0126-Remove-CraftScheduler-Async-Task-Debugger.patch b/patches/server/0126-Remove-CraftScheduler-Async-Task-Debugger.patch index 15ad3dc3e2..08692be694 100644 --- a/patches/server/0126-Remove-CraftScheduler-Async-Task-Debugger.patch +++ b/patches/server/0126-Remove-CraftScheduler-Async-Task-Debugger.patch @@ -9,7 +9,7 @@ One report of a suspected memory leak with the system. This adds additional overhead to asynchronous task dispatching diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index 0c0115ccd8541ac62975f4759b4e2083ac560332..300d31e31a55dbee3489320e21e42f14ac429478 100644 +index 152c816efbd633210ff308ef56f5d0cda6edb1b5..22a5eff6c82df46e528c980afa33be78536b1b93 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -432,7 +432,7 @@ public class CraftScheduler implements BukkitScheduler { @@ -30,7 +30,7 @@ index 0c0115ccd8541ac62975f4759b4e2083ac560332..300d31e31a55dbee3489320e21e42f14 } private void addTask(final CraftTask task) { -@@ -509,10 +509,15 @@ public class CraftScheduler implements BukkitScheduler { +@@ -505,10 +505,15 @@ public class CraftScheduler implements BukkitScheduler { @Override public String toString() { diff --git a/patches/server/0177-Improved-Async-Task-Scheduler.patch b/patches/server/0177-Improved-Async-Task-Scheduler.patch index d53657768c..82d5ebd660 100644 --- a/patches/server/0177-Improved-Async-Task-Scheduler.patch +++ b/patches/server/0177-Improved-Async-Task-Scheduler.patch @@ -159,7 +159,7 @@ index 0000000000000000000000000000000000000000..0ca279fb71d39c81b1f608e0ee9ba3e4 + } +} diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index 300d31e31a55dbee3489320e21e42f14ac429478..7de4db0099b380c81d6a809a298d580f0f6e4acc 100644 +index 22a5eff6c82df46e528c980afa33be78536b1b93..4f2eafbc012b7f9bdbe409d266fdb467ec788de6 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java @@ -75,7 +75,7 @@ public class CraftScheduler implements BukkitScheduler { @@ -324,16 +324,13 @@ index 300d31e31a55dbee3489320e21e42f14ac429478..7de4db0099b380c81d6a809a298d580f // We don't need to parse pending // (async tasks must live with race-conditions if they attempt to cancel between these few lines of code) } -@@ -450,7 +508,7 @@ public class CraftScheduler implements BukkitScheduler { +@@ -450,12 +508,18 @@ public class CraftScheduler implements BukkitScheduler { //this.debugHead = this.debugHead.getNextHead(this.currentTick); // Paper } - private void addTask(final CraftTask task) { + protected void addTask(final CraftTask task) { - final AtomicReference<CraftTask> tail = this.tail; - CraftTask tailTask = tail.get(); - while (!tail.compareAndSet(tailTask, task)) { -@@ -459,7 +517,13 @@ public class CraftScheduler implements BukkitScheduler { + final CraftTask tailTask = this.tail.getAndSet(task); tailTask.setNext(task); } @@ -348,7 +345,7 @@ index 300d31e31a55dbee3489320e21e42f14ac429478..7de4db0099b380c81d6a809a298d580f task.setNextRun(this.currentTick + delay); this.addTask(task); return task; -@@ -482,7 +546,7 @@ public class CraftScheduler implements BukkitScheduler { +@@ -478,7 +542,7 @@ public class CraftScheduler implements BukkitScheduler { return id; } diff --git a/patches/server/0185-Expand-World.spawnParticle-API-and-add-Builder.patch b/patches/server/0185-Expand-World.spawnParticle-API-and-add-Builder.patch index 978cde4c95..e1dd655850 100644 --- a/patches/server/0185-Expand-World.spawnParticle-API-and-add-Builder.patch +++ b/patches/server/0185-Expand-World.spawnParticle-API-and-add-Builder.patch @@ -34,10 +34,10 @@ index 3d54f52ed43ceef368804f7dce1dd95de3acc045..03161ef12960cab3b9c81c190dd808a9 if (this.sendParticles(entityplayer, force, d0, d1, d2, packetplayoutworldparticles)) { // CraftBukkit diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index ea90a64810e2f0669d862b5b6deba0905380051f..807b912a0d24ded99dc487e55c9b1812ffd86c3f 100644 +index ecdfe2d1e9ddc16034523619aa304a451269763b..bb407fe2a2f65d8bb73024b3c33025808a50f6e3 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1984,8 +1984,19 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1985,8 +1985,19 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) { diff --git a/patches/server/0201-Expand-Explosions-API.patch b/patches/server/0201-Expand-Explosions-API.patch index 7bf62df21c..c005daa850 100644 --- a/patches/server/0201-Expand-Explosions-API.patch +++ b/patches/server/0201-Expand-Explosions-API.patch @@ -54,10 +54,10 @@ index 9f37d7284c81d529551107e2836627977efabd65..d1878f597c3d8119e9b248f4fe8af435 while (iterator.hasNext()) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 807b912a0d24ded99dc487e55c9b1812ffd86c3f..195e698eadc7ce916b4bcfe04849501ee4a39aad 100644 +index bb407fe2a2f65d8bb73024b3c33025808a50f6e3..ec32a4c6d55784c27390ccdf3f90362eacd15eb2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -776,6 +776,11 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -777,6 +777,11 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source) { @@ -69,7 +69,7 @@ index 807b912a0d24ded99dc487e55c9b1812ffd86c3f..195e698eadc7ce916b4bcfe04849501e net.minecraft.world.level.Level.ExplosionInteraction explosionType; if (!breakBlocks) { explosionType = net.minecraft.world.level.Level.ExplosionInteraction.NONE; // Don't break blocks -@@ -786,8 +791,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -787,8 +792,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { } net.minecraft.world.entity.Entity entity = (source == null) ? null : ((CraftEntity) source).getHandle(); diff --git a/patches/server/0205-Implement-World.getEntity-UUID-API.patch b/patches/server/0205-Implement-World.getEntity-UUID-API.patch index ad1944ffb4..3e3ff89c36 100644 --- a/patches/server/0205-Implement-World.getEntity-UUID-API.patch +++ b/patches/server/0205-Implement-World.getEntity-UUID-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Implement World.getEntity(UUID) API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 195e698eadc7ce916b4bcfe04849501ee4a39aad..5cc7cb42bd6c456ca0f3d62666083c9fd0516ffa 100644 +index ec32a4c6d55784c27390ccdf3f90362eacd15eb2..4ca004c9f94fdcfa56a3c151a45a534271b20909 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1129,6 +1129,15 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1130,6 +1130,15 @@ public class CraftWorld extends CraftRegionAccessor implements World { return list; } diff --git a/patches/server/0232-Optimize-CraftBlockData-Creation.patch b/patches/server/0232-Optimize-CraftBlockData-Creation.patch index 03c51206ce..d66c9bf468 100644 --- a/patches/server/0232-Optimize-CraftBlockData-Creation.patch +++ b/patches/server/0232-Optimize-CraftBlockData-Creation.patch @@ -26,10 +26,10 @@ index 0bae4e8d1e9fcc4608b3ef1c981c65f3b03de22b..83a3c877f2969549ea154ad86687e96f private boolean calculateSolid() { if (((Block) this.owner).properties.forceSolidOn) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -index da39a252be9b77c81c07d6b67da9f2380f9445a8..c53dbcfde62ae8e2f019e854c336ce4a60346dc9 100644 +index e3987a1947548f152daaa9c7ad1d894a13eacbd8..b472cd2d8ca0885ca5f2c42787d796f3e27ec413 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -@@ -574,7 +574,17 @@ public class CraftBlockData implements BlockData { +@@ -578,7 +578,17 @@ public class CraftBlockData implements BlockData { return craft; } diff --git a/patches/server/0236-Inventory-removeItemAnySlot.patch b/patches/server/0236-Inventory-removeItemAnySlot.patch index 1316343a0a..f1cf07d2eb 100644 --- a/patches/server/0236-Inventory-removeItemAnySlot.patch +++ b/patches/server/0236-Inventory-removeItemAnySlot.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Inventory#removeItemAnySlot diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java -index 88d5590aa07de09e56ac0bd8d23caa588e36807b..6a47c6adb721f0c6737150d8b0ee18ab70f5f281 100644 +index 35651063e7fc48d8f2bea3d6a2b06a36cca59930..54ce9218c1759d641b2c780d79f1da1e0981c474 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java @@ -224,10 +224,16 @@ public class CraftInventory implements Inventory { @@ -26,7 +26,7 @@ index 88d5590aa07de09e56ac0bd8d23caa588e36807b..6a47c6adb721f0c6737150d8b0ee18ab for (int i = 0; i < inventory.length; i++) { if (inventory[i] == null) continue; -@@ -351,6 +357,17 @@ public class CraftInventory implements Inventory { +@@ -339,6 +345,17 @@ public class CraftInventory implements Inventory { @Override public HashMap<Integer, ItemStack> removeItem(ItemStack... items) { @@ -44,7 +44,7 @@ index 88d5590aa07de09e56ac0bd8d23caa588e36807b..6a47c6adb721f0c6737150d8b0ee18ab Preconditions.checkArgument(items != null, "items cannot be null"); HashMap<Integer, ItemStack> leftover = new HashMap<Integer, ItemStack>(); -@@ -362,7 +379,10 @@ public class CraftInventory implements Inventory { +@@ -350,7 +367,10 @@ public class CraftInventory implements Inventory { int toDelete = item.getAmount(); while (true) { diff --git a/patches/server/0237-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch b/patches/server/0237-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch index 658a8370ad..ab6a007442 100644 --- a/patches/server/0237-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch +++ b/patches/server/0237-Make-CraftWorld-loadChunk-int-int-false-load-unconve.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Make CraftWorld#loadChunk(int, int, false) load unconverted diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 5cc7cb42bd6c456ca0f3d62666083c9fd0516ffa..c3874468dc5bcdbe08e473760b028223b3ed8bb1 100644 +index 4ca004c9f94fdcfa56a3c151a45a534271b20909..55f2305ceebe2307796fe22d62d51ec2215b98b0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -430,7 +430,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -431,7 +431,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean loadChunk(int x, int z, boolean generate) { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot diff --git a/patches/server/0251-Add-sun-related-API.patch b/patches/server/0251-Add-sun-related-API.patch index d8ad64f351..65a25e657d 100644 --- a/patches/server/0251-Add-sun-related-API.patch +++ b/patches/server/0251-Add-sun-related-API.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Add sun related API public net.minecraft.world.entity.Mob isSunBurnTick()Z diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index c3874468dc5bcdbe08e473760b028223b3ed8bb1..0e074cabe81a7135773c59dbdd5607247fa8bf16 100644 +index 55f2305ceebe2307796fe22d62d51ec2215b98b0..a526c27ab0b4ea8ed70d338accce63d028901fd2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -754,6 +754,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -755,6 +755,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { } } diff --git a/patches/server/0261-Restore-custom-InventoryHolder-support.patch b/patches/server/0261-Restore-custom-InventoryHolder-support.patch index f86f8995c6..2830a3ac08 100644 --- a/patches/server/0261-Restore-custom-InventoryHolder-support.patch +++ b/patches/server/0261-Restore-custom-InventoryHolder-support.patch @@ -194,10 +194,10 @@ index 1a2329021a6b29777c637ee4dc8cd69ed18001c9..674e3a827f8fb64e5c0beefb3c1874d6 // SPIGOT-4598 - we should still delegate the shift click handler diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java -index 6a47c6adb721f0c6737150d8b0ee18ab70f5f281..75eb794f796b31c0c5ef80a6d27a56711a522f5e 100644 +index 54ce9218c1759d641b2c780d79f1da1e0981c474..628e0cffa6cac6da137a25b85e86a50aec59c4b4 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java -@@ -497,6 +497,10 @@ public class CraftInventory implements Inventory { +@@ -485,6 +485,10 @@ public class CraftInventory implements Inventory { return InventoryType.BREWING; } else if (this.inventory instanceof CraftInventoryCustom.MinecraftInventory) { return ((CraftInventoryCustom.MinecraftInventory) this.inventory).getType(); diff --git a/patches/server/0364-Inventory-getHolder-method-without-block-snapshot.patch b/patches/server/0364-Inventory-getHolder-method-without-block-snapshot.patch index b30d42bf56..e5f25132df 100644 --- a/patches/server/0364-Inventory-getHolder-method-without-block-snapshot.patch +++ b/patches/server/0364-Inventory-getHolder-method-without-block-snapshot.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Inventory getHolder method without block snapshot diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java -index 75eb794f796b31c0c5ef80a6d27a56711a522f5e..e824fe361286a5f41b137be92d799eef54ae4b87 100644 +index 628e0cffa6cac6da137a25b85e86a50aec59c4b4..f3a1859a1c2adb0448186c322793585dafefe7e0 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java -@@ -543,6 +543,13 @@ public class CraftInventory implements Inventory { +@@ -531,6 +531,13 @@ public class CraftInventory implements Inventory { return this.inventory.getOwner(); } diff --git a/patches/server/0369-Fix-Per-World-Difficulty-Remembering-Difficulty.patch b/patches/server/0369-Fix-Per-World-Difficulty-Remembering-Difficulty.patch index a0949c9fb2..ec9498320e 100644 --- a/patches/server/0369-Fix-Per-World-Difficulty-Remembering-Difficulty.patch +++ b/patches/server/0369-Fix-Per-World-Difficulty-Remembering-Difficulty.patch @@ -8,7 +8,7 @@ makes it so that the server keeps the last difficulty used instead of restoring the server.properties every single load. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 3d2c70ab9938555c976588b0a98901d57876e51e..99b5877fc2f568929b35aa10638173bbef27503b 100644 +index c2ba34f6d5765fd8574a61825a6aab8fdd98a0f2..74515a58cd698ebca3ee98bd89a8f9de477736e7 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -850,7 +850,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -104,10 +104,10 @@ index ca8eb3216c4331a95ab44f923f6b49641662505f..9905555f249db72649bde8401835dd81 for (SpawnCategory spawnCategory : SpawnCategory.values()) { if (CraftSpawnCategory.isValidForLimits(spawnCategory)) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 0e074cabe81a7135773c59dbdd5607247fa8bf16..f3ebea4d228d53057e2480a59eda5774eba03bb4 100644 +index a526c27ab0b4ea8ed70d338accce63d028901fd2..d4d893d6472c5e46da83203be7cdaecf22376f1a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1169,7 +1169,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1170,7 +1170,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void setDifficulty(Difficulty difficulty) { diff --git a/patches/server/0390-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch b/patches/server/0390-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch index 42aa6ace69..4d44f56cd4 100644 --- a/patches/server/0390-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch +++ b/patches/server/0390-Fix-SpawnChangeEvent-not-firing-for-all-use-cases.patch @@ -19,10 +19,10 @@ index 161b556e5c5f3719b5623e71876a2250abc7f391..9a6a9508673edcb2eda8b3e4802fd950 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index f3ebea4d228d53057e2480a59eda5774eba03bb4..2ad9c104c7a99882417f9662d657841636751223 100644 +index d4d893d6472c5e46da83203be7cdaecf22376f1a..4667115d0dbb7b170187b108586bdbb9d5bdb4d5 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -242,12 +242,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -243,12 +243,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean setSpawnLocation(int x, int y, int z, float angle) { try { diff --git a/patches/server/0401-Cache-block-data-strings.patch b/patches/server/0401-Cache-block-data-strings.patch index 3871c96541..2e9678dd02 100644 --- a/patches/server/0401-Cache-block-data-strings.patch +++ b/patches/server/0401-Cache-block-data-strings.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Cache block data strings diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 99b5877fc2f568929b35aa10638173bbef27503b..356b3b7649edf9289c5736638bca50e5d9670782 100644 +index 74515a58cd698ebca3ee98bd89a8f9de477736e7..19708fe528c2c2794bc26f4c789dd32dbb3ba32b 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -2184,6 +2184,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -17,7 +17,7 @@ index 99b5877fc2f568929b35aa10638173bbef27503b..356b3b7649edf9289c5736638bca50e5 if (this.isSameThread()) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -index c53dbcfde62ae8e2f019e854c336ce4a60346dc9..f73858663162cb594db382d584b6500bb03e74b1 100644 +index b472cd2d8ca0885ca5f2c42787d796f3e27ec413..628f26e98449bf508306265d569376cae6279284 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java @@ -156,7 +156,7 @@ public class CraftBlockData implements BlockData { @@ -29,7 +29,7 @@ index c53dbcfde62ae8e2f019e854c336ce4a60346dc9..f73858663162cb594db382d584b6500b /** * Convert an NMS Enum (usually a BlockStateEnum) to its appropriate Bukkit -@@ -543,7 +543,38 @@ public class CraftBlockData implements BlockData { +@@ -547,7 +547,38 @@ public class CraftBlockData implements BlockData { Preconditions.checkState(CraftBlockData.MAP.put(nms, bukkit) == null, "Duplicate mapping %s->%s", nms, bukkit); } diff --git a/patches/server/0427-Add-Destroy-Speed-API.patch b/patches/server/0427-Add-Destroy-Speed-API.patch index 2274f8a5d4..d7c93744a0 100644 --- a/patches/server/0427-Add-Destroy-Speed-API.patch +++ b/patches/server/0427-Add-Destroy-Speed-API.patch @@ -35,10 +35,10 @@ index a2fe7149a837040cf9f23eb426d398a5f90be394..27a7852a5d3f8c8960f098646ff5587c private Collection<AttributeModifier> getModifiersOrEmpty(AttributeModifier.Operation operation) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -index 7f0d87bd43a54885fc521068116888083327f37e..a17c1d1651d4d36c40ef97c1cf0b1e0d61f53418 100644 +index cabf3146b0dd5790536cb9995de6a876d7ab3f50..0cf033e1b559506bd902a2159adef2b279c18798 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -@@ -725,4 +725,35 @@ public class CraftBlockData implements BlockData { +@@ -729,4 +729,35 @@ public class CraftBlockData implements BlockData { public BlockState createBlockState() { return CraftBlockStates.getBlockState(this.state, null); } diff --git a/patches/server/0454-Add-WorldGameRuleChangeEvent.patch b/patches/server/0454-Add-WorldGameRuleChangeEvent.patch index 5e011c5b51..7a4dad089b 100644 --- a/patches/server/0454-Add-WorldGameRuleChangeEvent.patch +++ b/patches/server/0454-Add-WorldGameRuleChangeEvent.patch @@ -64,10 +64,10 @@ index 7ea92a0b0f5d4eb6bd873e61c42bc0499d5d2028..09299e45552eb998fd02123c3921c065 public int get() { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 2ad9c104c7a99882417f9662d657841636751223..5304fb017b6ecda3ff96e1e44be444260fd8d715 100644 +index 4667115d0dbb7b170187b108586bdbb9d5bdb4d5..9f70f42c0f7d9b86836b26fd4712ec07029d9698 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1879,9 +1879,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1880,9 +1880,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { if (rule == null || value == null) return false; if (!this.isGameRule(rule)) return false; @@ -83,7 +83,7 @@ index 2ad9c104c7a99882417f9662d657841636751223..5304fb017b6ecda3ff96e1e44be44426 handle.onChanged(this.getHandle()); return true; } -@@ -1916,9 +1921,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1917,9 +1922,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { Preconditions.checkArgument(newValue != null, "GameRule value cannot be null"); if (!this.isGameRule(rule.getName())) return false; diff --git a/patches/server/0482-Add-getMainThreadExecutor-to-BukkitScheduler.patch b/patches/server/0482-Add-getMainThreadExecutor-to-BukkitScheduler.patch index ead28f59cb..2f143cc0b4 100644 --- a/patches/server/0482-Add-getMainThreadExecutor-to-BukkitScheduler.patch +++ b/patches/server/0482-Add-getMainThreadExecutor-to-BukkitScheduler.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add getMainThreadExecutor to BukkitScheduler diff --git a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -index a700dac93499650fdaa0af06ff77607ffa4dbbb2..6fef86e47e37eab6721cfd67d494afb25a2ded68 100644 +index 20760e08b3d9aba86969b886b46deec5b125bf1f..1354ccfbf525e5e64483ac5f443cc2325ba63850 100644 --- a/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java +++ b/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java -@@ -637,4 +637,15 @@ public class CraftScheduler implements BukkitScheduler { +@@ -633,4 +633,15 @@ public class CraftScheduler implements BukkitScheduler { public BukkitTask runTaskTimerAsynchronously(Plugin plugin, BukkitRunnable task, long delay, long period) throws IllegalArgumentException { throw new UnsupportedOperationException("Use BukkitRunnable#runTaskTimerAsynchronously(Plugin, long, long)"); } diff --git a/patches/server/0510-More-World-API.patch b/patches/server/0510-More-World-API.patch index c9ff78a94a..d23c38e08d 100644 --- a/patches/server/0510-More-World-API.patch +++ b/patches/server/0510-More-World-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] More World API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 5304fb017b6ecda3ff96e1e44be444260fd8d715..75554719891cfeccfde1b6b58bf9861db1268adc 100644 +index 9f70f42c0f7d9b86836b26fd4712ec07029d9698..72e547073782c657d8a500c3a40046208dde7201 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2125,6 +2125,28 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2126,6 +2126,28 @@ public class CraftWorld extends CraftRegionAccessor implements World { return new CraftStructureSearchResult(CraftStructure.minecraftToBukkit(found.getSecond().value()), CraftLocation.toBukkit(found.getFirst(), this)); } diff --git a/patches/server/0521-Inventory-close.patch b/patches/server/0521-Inventory-close.patch index 9ca8b717ab..9dcad3d0b1 100644 --- a/patches/server/0521-Inventory-close.patch +++ b/patches/server/0521-Inventory-close.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Inventory#close diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java -index e824fe361286a5f41b137be92d799eef54ae4b87..3b0d3e9a067fccb10122c273aaf658ba240aa716 100644 +index f3a1859a1c2adb0448186c322793585dafefe7e0..bc5ec42a54401a2275c05f0f506ba89f00c19ec9 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java -@@ -451,6 +451,14 @@ public class CraftInventory implements Inventory { +@@ -439,6 +439,14 @@ public class CraftInventory implements Inventory { this.clear(i); } } diff --git a/patches/server/0534-Add-cause-to-Weather-ThunderChangeEvents.patch b/patches/server/0534-Add-cause-to-Weather-ThunderChangeEvents.patch index ef52ee655c..a95ce30f68 100644 --- a/patches/server/0534-Add-cause-to-Weather-ThunderChangeEvents.patch +++ b/patches/server/0534-Add-cause-to-Weather-ThunderChangeEvents.patch @@ -95,10 +95,10 @@ index 6a3959095e57f76b3a092b32d26ff91cf1c5e068..0fa16ff37f09ecfda104b751e48bf246 if (weather.isCancelled()) { return; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 75554719891cfeccfde1b6b58bf9861db1268adc..b2455a03d92187b35bb0efeb4b041bbf7936851e 100644 +index 72e547073782c657d8a500c3a40046208dde7201..8603f52c40e5e604dbc704097289ab072bd6a950 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1200,7 +1200,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1201,7 +1201,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void setStorm(boolean hasStorm) { @@ -107,7 +107,7 @@ index 75554719891cfeccfde1b6b58bf9861db1268adc..b2455a03d92187b35bb0efeb4b041bbf this.setWeatherDuration(0); // Reset weather duration (legacy behaviour) this.setClearWeatherDuration(0); // Reset clear weather duration (reset "/weather clear" commands) } -@@ -1222,7 +1222,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1223,7 +1223,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void setThundering(boolean thundering) { diff --git a/patches/server/0547-add-per-world-spawn-limits.patch b/patches/server/0547-add-per-world-spawn-limits.patch index 430c3bbabc..17abe63582 100644 --- a/patches/server/0547-add-per-world-spawn-limits.patch +++ b/patches/server/0547-add-per-world-spawn-limits.patch @@ -5,10 +5,10 @@ Subject: [PATCH] add per world spawn limits diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index b2455a03d92187b35bb0efeb4b041bbf7936851e..6596af8332ca6abbcaa68cae60ba994c39767938 100644 +index 8603f52c40e5e604dbc704097289ab072bd6a950..9221be1aef355a488745ca44e4cd5dd84060a2f9 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -218,6 +218,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -219,6 +219,13 @@ public class CraftWorld extends CraftRegionAccessor implements World { this.biomeProvider = biomeProvider; this.environment = env; diff --git a/patches/server/0577-Add-methods-to-find-targets-for-lightning-strikes.patch b/patches/server/0577-Add-methods-to-find-targets-for-lightning-strikes.patch index 01813e49c7..792cc392d0 100644 --- a/patches/server/0577-Add-methods-to-find-targets-for-lightning-strikes.patch +++ b/patches/server/0577-Add-methods-to-find-targets-for-lightning-strikes.patch @@ -31,10 +31,10 @@ index 57b82b90ab55922e57ccf79c57296d1d2e34d6a2..50d4bd6223eb92c640a61ee61af862e7 blockposition1 = blockposition1.above(2); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 6596af8332ca6abbcaa68cae60ba994c39767938..1812dcd6e21d6de834ce6c39b5b69cee31a5fa06 100644 +index 9221be1aef355a488745ca44e4cd5dd84060a2f9..55b8b25dfece08ecc82fa2f15c81bd6a03a5de90 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -675,6 +675,23 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -676,6 +676,23 @@ public class CraftWorld extends CraftRegionAccessor implements World { return (LightningStrike) lightning.getBukkitEntity(); } diff --git a/patches/server/0580-Add-more-advancement-API.patch b/patches/server/0580-Add-more-advancement-API.patch index 1875c743c1..70ac177106 100644 --- a/patches/server/0580-Add-more-advancement-API.patch +++ b/patches/server/0580-Add-more-advancement-API.patch @@ -96,11 +96,11 @@ index 05de12414a3ad1c8f0f02f7973898dda84b89b82..6581cdbec730d5d184566e7b611369b3 public DisplayInfo( ItemStack icon, diff --git a/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java b/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java -index 52baf818579a6841b77ff80e42f4f1b9f635ea08..8dfaca2efa0b0bdc97b75aaa83158a2e46361e4e 100644 +index d119093d3a68c5a378fcd20860e36dbd2ba5024f..d12d9913f15c274df9c23f68e4e0304d41fccbdb 100644 --- a/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java +++ b/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java -@@ -29,12 +29,47 @@ public class CraftAdvancement implements org.bukkit.advancement.Advancement { - return Collections.unmodifiableCollection(this.handle.value().criteria().keySet()); +@@ -35,12 +35,47 @@ public class CraftAdvancement implements org.bukkit.advancement.Advancement { + return new CraftAdvancementRequirements(this.handle.value().requirements()); } + // Paper start - Add more advancement API diff --git a/patches/server/0583-Fix-issues-with-mob-conversion.patch b/patches/server/0583-Fix-issues-with-mob-conversion.patch index 281a6e42c5..c286b73b30 100644 --- a/patches/server/0583-Fix-issues-with-mob-conversion.patch +++ b/patches/server/0583-Fix-issues-with-mob-conversion.patch @@ -31,17 +31,17 @@ index 6f6454bcec7e0d1cefbf818fc2fc6eb90adeec83..3972e2ed0554e2550519e994888e068d @Override diff --git a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java -index d51acb788803048c0eacd762a2fd311115ac0970..6ea90e54759dbeab025e0a1896ee834ea9986427 100644 +index 34fff71edbdcefe87985f31cbf1ef282435ace06..92270912ef26924f611a1df7cb3d5b485b0a262d 100644 --- a/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/hoglin/Hoglin.java -@@ -260,9 +260,15 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { +@@ -241,9 +241,15 @@ public class Hoglin extends Animal implements Enemy, HoglinBase { } private void finishConversion() { -- this.convertTo( -+ net.minecraft.world.entity.Entity converted = this.convertTo( // Paper - Fix issues with mob conversion; reset to prevent event spam - EntityType.ZOGLIN, ConversionParams.single(this, true, false), zoglin -> zoglin.addEffect(new MobEffectInstance(MobEffects.CONFUSION, 200, 0)) - ); +- this.convertTo(EntityType.ZOGLIN, ConversionParams.single(this, true, false), (entityzoglin) -> { ++ net.minecraft.world.entity.Entity converted = this.convertTo(EntityType.ZOGLIN, ConversionParams.single(this, true, false), (entityzoglin) -> { + entityzoglin.addEffect(new MobEffectInstance(MobEffects.CONFUSION, 200, 0)); + }, org.bukkit.event.entity.EntityTransformEvent.TransformReason.PIGLIN_ZOMBIFIED, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.PIGLIN_ZOMBIFIED); // CraftBukkit - add spawn and transform reasons + + // Paper start - Fix issues with mob conversion; reset to prevent event spam + if (converted == null) { diff --git a/patches/server/0591-Improve-and-expand-AsyncCatcher.patch b/patches/server/0591-Improve-and-expand-AsyncCatcher.patch index f2bb9da75a..ad5379393a 100644 --- a/patches/server/0591-Improve-and-expand-AsyncCatcher.patch +++ b/patches/server/0591-Improve-and-expand-AsyncCatcher.patch @@ -166,10 +166,10 @@ index 4eb0b0969325f39a7ae65492cccd482515a50142..5aa74c00a61282830d82359eae2b114e PersistentEntitySectionManager.LOGGER.warn("Entity {} wasn't found in section {} (destroying due to {})", new Object[]{this.entity, SectionPos.of(this.currentSectionKey), reason}); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 1812dcd6e21d6de834ce6c39b5b69cee31a5fa06..8fdae6c7d37d2403d95d37fe0dc35f168ce0f256 100644 +index 55b8b25dfece08ecc82fa2f15c81bd6a03a5de90..ec95c29b27613b9671ddaa304f26d8e3130a9390 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1750,6 +1750,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1751,6 +1751,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void playSound(Location loc, Sound sound, org.bukkit.SoundCategory category, float volume, float pitch, long seed) { @@ -177,7 +177,7 @@ index 1812dcd6e21d6de834ce6c39b5b69cee31a5fa06..8fdae6c7d37d2403d95d37fe0dc35f16 if (loc == null || sound == null || category == null) return; double x = loc.getX(); -@@ -1761,6 +1762,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1762,6 +1763,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void playSound(Location loc, String sound, org.bukkit.SoundCategory category, float volume, float pitch, long seed) { @@ -185,7 +185,7 @@ index 1812dcd6e21d6de834ce6c39b5b69cee31a5fa06..8fdae6c7d37d2403d95d37fe0dc35f16 if (loc == null || sound == null || category == null) return; double x = loc.getX(); -@@ -1793,6 +1795,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1794,6 +1796,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void playSound(Entity entity, Sound sound, org.bukkit.SoundCategory category, float volume, float pitch, long seed) { @@ -193,7 +193,7 @@ index 1812dcd6e21d6de834ce6c39b5b69cee31a5fa06..8fdae6c7d37d2403d95d37fe0dc35f16 if (!(entity instanceof CraftEntity craftEntity) || entity.getWorld() != this || sound == null || category == null) return; ClientboundSoundEntityPacket packet = new ClientboundSoundEntityPacket(CraftSound.bukkitToMinecraftHolder(sound), net.minecraft.sounds.SoundSource.valueOf(category.name()), craftEntity.getHandle(), volume, pitch, seed); -@@ -1813,6 +1816,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1814,6 +1817,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void playSound(Entity entity, String sound, org.bukkit.SoundCategory category, float volume, float pitch, long seed) { diff --git a/patches/server/0592-Add-paper-mobcaps-and-paper-playermobcaps.patch b/patches/server/0592-Add-paper-mobcaps-and-paper-playermobcaps.patch index 4f2526463b..016591f1bf 100644 --- a/patches/server/0592-Add-paper-mobcaps-and-paper-playermobcaps.patch +++ b/patches/server/0592-Add-paper-mobcaps-and-paper-playermobcaps.patch @@ -294,10 +294,10 @@ index 45d887f4143444321f563cdd7d084b2b9ccf911e..33d9f3778996eedc83064332a2fbbdc7 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 8fdae6c7d37d2403d95d37fe0dc35f168ce0f256..a6cb8225338a6450f13116aaec587d97ecbd5197 100644 +index ec95c29b27613b9671ddaa304f26d8e3130a9390..7424f8c16441d65e03e641e5052b5c96bd42137e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1708,9 +1708,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1709,9 +1709,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { Preconditions.checkArgument(spawnCategory != null, "SpawnCategory cannot be null"); Preconditions.checkArgument(CraftSpawnCategory.isValidForLimits(spawnCategory), "SpawnCategory.%s are not supported", spawnCategory); diff --git a/patches/server/0600-Add-missing-InventoryType.patch b/patches/server/0600-Add-missing-InventoryType.patch index a49bdf073d..768c150fc1 100644 --- a/patches/server/0600-Add-missing-InventoryType.patch +++ b/patches/server/0600-Add-missing-InventoryType.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add missing InventoryType Upstream did not add a DECORATED_POT inventory type diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java -index 3b0d3e9a067fccb10122c273aaf658ba240aa716..af1ae3dacb628da23f7d2988c6e76d3fb2d64103 100644 +index bc5ec42a54401a2275c05f0f506ba89f00c19ec9..c6159c70f7a37b9bffe268b91905ce848d1d2927 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java -@@ -541,6 +541,10 @@ public class CraftInventory implements Inventory { +@@ -529,6 +529,10 @@ public class CraftInventory implements Inventory { return InventoryType.COMPOSTER; } else if (this.inventory instanceof JukeboxBlockEntity) { return InventoryType.JUKEBOX; diff --git a/patches/server/0638-Expose-vanilla-BiomeProvider-from-WorldInfo.patch b/patches/server/0638-Expose-vanilla-BiomeProvider-from-WorldInfo.patch index 64fb16f6c5..735eff701a 100644 --- a/patches/server/0638-Expose-vanilla-BiomeProvider-from-WorldInfo.patch +++ b/patches/server/0638-Expose-vanilla-BiomeProvider-from-WorldInfo.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Expose vanilla BiomeProvider from WorldInfo diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 8e0bc6559aad75a713e1760ea17e5004686d7e7a..0db44e8205d795cbeca1d6411aca0da5edf40d21 100644 +index 8f7b68cda090e038b5b6a7928e872debca4e011d..a63621fa5e15cf74a6c2e5a3d4e7c2d390ff4845 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -625,7 +625,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa @@ -44,10 +44,10 @@ index 33d9f3778996eedc83064332a2fbbdc7c6a8ba90..62ab88e022230d25ffb359981ce7da4e biomeProvider = generator.getDefaultBiomeProvider(worldInfo); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index a6cb8225338a6450f13116aaec587d97ecbd5197..83771925dc7009d56fc3c8283d75880c7e61296a 100644 +index 7424f8c16441d65e03e641e5052b5c96bd42137e..085b5a185a8470600e88d68f4fedfee8bae2b28a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -208,6 +208,39 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -209,6 +209,39 @@ public class CraftWorld extends CraftRegionAccessor implements World { public int getPlayerCount() { return world.players().size(); } diff --git a/patches/server/0663-Fix-falling-block-spawn-methods.patch b/patches/server/0663-Fix-falling-block-spawn-methods.patch index 577c742f03..bf697e1042 100644 --- a/patches/server/0663-Fix-falling-block-spawn-methods.patch +++ b/patches/server/0663-Fix-falling-block-spawn-methods.patch @@ -11,10 +11,10 @@ Restores the API behavior from previous versions of the server public net.minecraft.world.entity.item.FallingBlockEntity <init>(Lnet/minecraft/world/level/Level;DDDLnet/minecraft/world/level/block/state/BlockState;)V diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 83771925dc7009d56fc3c8283d75880c7e61296a..9b7304ea9a4f226872d13e64722adb267f727806 100644 +index 085b5a185a8470600e88d68f4fedfee8bae2b28a..d5675c1aec7d4b1a426cff55c8cac2decac6ec0a 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1385,7 +1385,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1386,7 +1386,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { Preconditions.checkArgument(material != null, "Material cannot be null"); Preconditions.checkArgument(material.isBlock(), "Material.%s must be a block", material); @@ -28,7 +28,7 @@ index 83771925dc7009d56fc3c8283d75880c7e61296a..9b7304ea9a4f226872d13e64722adb26 return (FallingBlock) entity.getBukkitEntity(); } -@@ -1394,7 +1399,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1395,7 +1400,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { Preconditions.checkArgument(location != null, "Location cannot be null"); Preconditions.checkArgument(data != null, "BlockData cannot be null"); diff --git a/patches/server/0703-Add-missing-important-BlockStateListPopulator-method.patch b/patches/server/0703-Add-missing-important-BlockStateListPopulator-method.patch index e0b94dc4ac..94a1b50995 100644 --- a/patches/server/0703-Add-missing-important-BlockStateListPopulator-method.patch +++ b/patches/server/0703-Add-missing-important-BlockStateListPopulator-method.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add missing important BlockStateListPopulator methods Without these methods it causes exceptions due to these being used by certain feature generators. diff --git a/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java b/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java -index 072d105f05f3b535d53cfbf8538d1716f9cfcd0e..4d6d637188ef4010a71ea2eb6ea0310aea820511 100644 +index e32321f46625a3f08a9b6adb8f35895d0ee1b14e..514084aff8412251432dfe174a445ddb43361aed 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java +++ b/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java -@@ -129,7 +129,7 @@ public class BlockStateListPopulator extends DummyGeneratorAccess { +@@ -130,7 +130,7 @@ public class BlockStateListPopulator extends DummyGeneratorAccess { @Override public boolean isFluidAtPosition(BlockPos pos, Predicate<FluidState> state) { @@ -18,9 +18,9 @@ index 072d105f05f3b535d53cfbf8538d1716f9cfcd0e..4d6d637188ef4010a71ea2eb6ea0310a } @Override -@@ -152,4 +152,33 @@ public class BlockStateListPopulator extends DummyGeneratorAccess { - public long nextSubTickCount() { - return this.world.nextSubTickCount(); +@@ -159,4 +159,33 @@ public class BlockStateListPopulator extends DummyGeneratorAccess { + public RandomSource getRandom() { + return this.world.getRandom(); } + + // Paper start diff --git a/patches/server/0716-Warn-on-plugins-accessing-faraway-chunks.patch b/patches/server/0716-Warn-on-plugins-accessing-faraway-chunks.patch index 504e0b4859..883f1fb37c 100644 --- a/patches/server/0716-Warn-on-plugins-accessing-faraway-chunks.patch +++ b/patches/server/0716-Warn-on-plugins-accessing-faraway-chunks.patch @@ -18,10 +18,10 @@ index 9afc0eaaca5ab7b6445d90ce53e31a6ae76f8848..f0c2187a92de633a1d4cc7e71ff62cbe private static boolean isOutsideSpawnableHeight(int y) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 9b7304ea9a4f226872d13e64722adb267f727806..431bd698e28b7731bf781e29de6c6a3fd936c71c 100644 +index d5675c1aec7d4b1a426cff55c8cac2decac6ec0a..5ac5f5a1963a89dace45d61e0ca0588c1c0fd05c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -301,9 +301,24 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -302,9 +302,24 @@ public class CraftWorld extends CraftRegionAccessor implements World { public boolean setSpawnLocation(int x, int y, int z) { return this.setSpawnLocation(x, y, z, 0.0F); } @@ -46,7 +46,7 @@ index 9b7304ea9a4f226872d13e64722adb267f727806..431bd698e28b7731bf781e29de6c6a3f net.minecraft.world.level.chunk.LevelChunk chunk = (net.minecraft.world.level.chunk.LevelChunk) this.world.getChunk(x, z, ChunkStatus.FULL, true); return new CraftChunk(chunk); } -@@ -399,6 +414,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -400,6 +415,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { if (!unloadChunk0(x, z, false)) { return false; } @@ -54,7 +54,7 @@ index 9b7304ea9a4f226872d13e64722adb267f727806..431bd698e28b7731bf781e29de6c6a3f final long chunkKey = ChunkCoordIntPair.pair(x, z); world.getChunkProvider().unloadQueue.remove(chunkKey); -@@ -472,6 +488,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -473,6 +489,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean loadChunk(int x, int z, boolean generate) { org.spigotmc.AsyncCatcher.catchOp("chunk load"); // Spigot @@ -62,7 +62,7 @@ index 9b7304ea9a4f226872d13e64722adb267f727806..431bd698e28b7731bf781e29de6c6a3f ChunkAccess chunk = this.world.getChunkSource().getChunk(x, z, generate || isChunkGenerated(x, z) ? ChunkStatus.FULL : ChunkStatus.EMPTY, true); // Paper // If generate = false, but the chunk already exists, we will get this back. -@@ -504,6 +521,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -505,6 +522,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean addPluginChunkTicket(int x, int z, Plugin plugin) { @@ -70,7 +70,7 @@ index 9b7304ea9a4f226872d13e64722adb267f727806..431bd698e28b7731bf781e29de6c6a3f Preconditions.checkArgument(plugin != null, "null plugin"); Preconditions.checkArgument(plugin.isEnabled(), "plugin is not enabled"); -@@ -604,6 +622,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -605,6 +623,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void setChunkForceLoaded(int x, int z, boolean forced) { @@ -78,7 +78,7 @@ index 9b7304ea9a4f226872d13e64722adb267f727806..431bd698e28b7731bf781e29de6c6a3f this.getHandle().setChunkForced(x, z, forced); } -@@ -938,6 +957,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -939,6 +958,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public int getHighestBlockYAt(int x, int z, org.bukkit.HeightMap heightMap) { @@ -86,7 +86,7 @@ index 9b7304ea9a4f226872d13e64722adb267f727806..431bd698e28b7731bf781e29de6c6a3f // Transient load for this tick return this.world.getChunk(x >> 4, z >> 4).getHeight(CraftHeightMap.toNMS(heightMap), x, z); } -@@ -2339,6 +2359,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2340,6 +2360,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { // Paper start @Override public void getChunkAtAsync(int x, int z, boolean gen, boolean urgent, @NotNull Consumer<? super Chunk> cb) { @@ -94,7 +94,7 @@ index 9b7304ea9a4f226872d13e64722adb267f727806..431bd698e28b7731bf781e29de6c6a3f ca.spottedleaf.moonrise.common.util.ChunkSystem.scheduleChunkLoad( this.getHandle(), x, z, gen, ChunkStatus.FULL, true, urgent ? ca.spottedleaf.concurrentutil.util.Priority.HIGHER : ca.spottedleaf.concurrentutil.util.Priority.NORMAL, -@@ -2351,6 +2372,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2352,6 +2373,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void getChunksAtAsync(int minX, int minZ, int maxX, int maxZ, boolean urgent, Runnable cb) { diff --git a/patches/server/0721-Block-Ticking-API.patch b/patches/server/0721-Block-Ticking-API.patch index c2a5c23d6c..b490077b4f 100644 --- a/patches/server/0721-Block-Ticking-API.patch +++ b/patches/server/0721-Block-Ticking-API.patch @@ -46,10 +46,10 @@ index 68fcec085334383808b2117a49220f4d8239220b..7afb933782cac7e1ad621e80211c1306 // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -index a17c1d1651d4d36c40ef97c1cf0b1e0d61f53418..3ec64c995dcb59a758741e32b886925983a8be56 100644 +index 0cf033e1b559506bd902a2159adef2b279c18798..d66cab6adc3f76a3863fed5d0d9a6abf765af5c6 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -@@ -756,4 +756,11 @@ public class CraftBlockData implements BlockData { +@@ -760,4 +760,11 @@ public class CraftBlockData implements BlockData { return speed; } // Paper end - destroy speed API diff --git a/patches/server/0843-Bandaid-fix-for-Effect.patch b/patches/server/0843-Bandaid-fix-for-Effect.patch index c6a0aab0ab..fd2b0030e9 100644 --- a/patches/server/0843-Bandaid-fix-for-Effect.patch +++ b/patches/server/0843-Bandaid-fix-for-Effect.patch @@ -68,10 +68,10 @@ index 71733f918ed84b9879ac1b142ef6205c5e768a9c..c856384019eff2f2d0bb831ebe1ccb0f break; case BONE_MEAL_USE: diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 431bd698e28b7731bf781e29de6c6a3fd936c71c..bca9e4908c7949a6f0b24fed2aa7332dd8f23e92 100644 +index 5ac5f5a1963a89dace45d61e0ca0588c1c0fd05c..01c06c0287e8c6538adac33f9e3755d062545a01 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1362,7 +1362,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1363,7 +1363,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { public <T> void playEffect(Location loc, Effect effect, T data, int radius) { if (data != null) { Preconditions.checkArgument(effect.getData() != null, "Effect.%s does not have a valid Data", effect); @@ -81,7 +81,7 @@ index 431bd698e28b7731bf781e29de6c6a3fd936c71c..bca9e4908c7949a6f0b24fed2aa7332d // Special case: the axis is optional for ELECTRIC_SPARK Preconditions.checkArgument(effect.getData() == null || effect == Effect.ELECTRIC_SPARK, "Wrong kind of data for the %s effect", effect); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index e00a0eef7166793849f1caca285a51b922d422fa..e98d9d0c7a04d168cf8de42d575e07d55065bd09 100644 +index f4401ae5d4f9ceb963b582db63d65524f9a653fb..3c9aff1848d902a566e0dc252a88528ea471c72e 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java @@ -924,7 +924,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { diff --git a/patches/server/0886-Add-API-to-get-the-collision-shape-of-a-block-before.patch b/patches/server/0886-Add-API-to-get-the-collision-shape-of-a-block-before.patch index 50464e50cb..f8c8435473 100644 --- a/patches/server/0886-Add-API-to-get-the-collision-shape-of-a-block-before.patch +++ b/patches/server/0886-Add-API-to-get-the-collision-shape-of-a-block-before.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add API to get the collision shape of a block before it's diff --git a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -index 3ec64c995dcb59a758741e32b886925983a8be56..50fb7edd25c1b38f5c463b78d21d4583bdc89229 100644 +index d66cab6adc3f76a3863fed5d0d9a6abf765af5c6..21764b9d723e5c37a5d21d57d24d8631205ecbf2 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -@@ -683,6 +683,20 @@ public class CraftBlockData implements BlockData { +@@ -687,6 +687,20 @@ public class CraftBlockData implements BlockData { return this.state.isFaceSturdy(EmptyBlockGetter.INSTANCE, BlockPos.ZERO, CraftBlock.blockFaceToNotch(face), CraftBlockSupport.toNMS(support)); } diff --git a/patches/server/0887-Add-predicate-for-blocks-when-raytracing.patch b/patches/server/0887-Add-predicate-for-blocks-when-raytracing.patch index 1be78144b4..a85d20a914 100644 --- a/patches/server/0887-Add-predicate-for-blocks-when-raytracing.patch +++ b/patches/server/0887-Add-predicate-for-blocks-when-raytracing.patch @@ -47,10 +47,10 @@ index 7e1a332168357b9af14dbe3299549c2c93903fa6..93738c7dea1ea3d19013a47380391274 Vec3 vec3d = raytrace1.getFrom().subtract(raytrace1.getTo()); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index bca9e4908c7949a6f0b24fed2aa7332dd8f23e92..d72ce4b4cd5bec76eb45d6f0027643740f9907fd 100644 +index 01c06c0287e8c6538adac33f9e3755d062545a01..e3db170099b674c46248509daba332c771c3f750 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1096,9 +1096,15 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1097,9 +1097,15 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public RayTraceResult rayTraceEntities(Location start, Vector direction, double maxDistance, double raySize, Predicate<? super Entity> filter) { @@ -68,7 +68,7 @@ index bca9e4908c7949a6f0b24fed2aa7332dd8f23e92..d72ce4b4cd5bec76eb45d6f002764374 Preconditions.checkArgument(direction != null, "Vector direction cannot be null"); direction.checkFinite(); -@@ -1148,9 +1154,16 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1149,9 +1155,16 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public RayTraceResult rayTraceBlocks(Location start, Vector direction, double maxDistance, FluidCollisionMode fluidCollisionMode, boolean ignorePassableBlocks) { @@ -87,7 +87,7 @@ index bca9e4908c7949a6f0b24fed2aa7332dd8f23e92..d72ce4b4cd5bec76eb45d6f002764374 Preconditions.checkArgument(direction != null, "Vector direction cannot be null"); direction.checkFinite(); -@@ -1163,16 +1176,23 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1164,16 +1177,23 @@ public class CraftWorld extends CraftRegionAccessor implements World { } Vector dir = direction.clone().normalize().multiply(maxDistance); diff --git a/patches/server/0890-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch b/patches/server/0890-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch index 1efd2d32b1..d70f73f92e 100644 --- a/patches/server/0890-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch +++ b/patches/server/0890-Fix-strikeLightningEffect-powers-lightning-rods-and-.patch @@ -45,10 +45,10 @@ index 152ecd38814089333b8d61538297ce720756d2c3..12127b14babf646711d3a118416453c4 if (world instanceof ServerLevel) { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index d72ce4b4cd5bec76eb45d6f0027643740f9907fd..b5b21852b4c3dc15e548afd81bdefbb83b9e7e9c 100644 +index e3db170099b674c46248509daba332c771c3f750..7f9c39649c9e11e34b043e914bbfb52a813ef6db 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -722,7 +722,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -723,7 +723,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { LightningBolt lightning = EntityType.LIGHTNING_BOLT.create(this.world, EntitySpawnReason.COMMAND); lightning.moveTo(loc.getX(), loc.getY(), loc.getZ()); diff --git a/patches/server/0897-Add-Structure-check-API.patch b/patches/server/0897-Add-Structure-check-API.patch index a7d968138a..ea82ad83a2 100644 --- a/patches/server/0897-Add-Structure-check-API.patch +++ b/patches/server/0897-Add-Structure-check-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add Structure check API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index b5b21852b4c3dc15e548afd81bdefbb83b9e7e9c..77faa873b22f59d27d5a99f4fef0d86a977875d0 100644 +index 7f9c39649c9e11e34b043e914bbfb52a813ef6db..725c25beef960feb567b9a0304f74cd53c450175 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -242,6 +242,15 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -243,6 +243,15 @@ public class CraftWorld extends CraftRegionAccessor implements World { }; } // Paper end diff --git a/patches/server/0925-More-Raid-API.patch b/patches/server/0925-More-Raid-API.patch index c9f33a2368..5cc9e82c19 100644 --- a/patches/server/0925-More-Raid-API.patch +++ b/patches/server/0925-More-Raid-API.patch @@ -86,10 +86,10 @@ index b8ce1c1c2447f9cff1717bfcfd6eb911ade0d4b3..51f21af9d75769abdcba713b9aa33392 + // Paper end - more Raid API } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 77faa873b22f59d27d5a99f4fef0d86a977875d0..06b73ace3ae89e8a9de592bb4b8439b4e0cac9f2 100644 +index 725c25beef960feb567b9a0304f74cd53c450175..6c51f0a66236c6a64f4ed18bf4fb0ba6ad822d94 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2306,6 +2306,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2307,6 +2307,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { return (raid == null) ? null : new CraftRaid(raid); } diff --git a/patches/server/0968-Properly-remove-the-experimental-smithing-inventory-.patch b/patches/server/0968-Properly-remove-the-experimental-smithing-inventory-.patch index 9ede88caa7..aa554450a4 100644 --- a/patches/server/0968-Properly-remove-the-experimental-smithing-inventory-.patch +++ b/patches/server/0968-Properly-remove-the-experimental-smithing-inventory-.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Properly remove the experimental smithing inventory type diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftAbstractInventoryView.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftAbstractInventoryView.java -index 149825642976124e852be9aef54a3cb4a8ac193d..71d3a5e5dc5630007cf46f4be3d39da4145dd431 100644 +index 1b93774c35ca9d476e054bdef7d4971511231881..6331be47814d7116861ac6a87d3e97dc92993150 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftAbstractInventoryView.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftAbstractInventoryView.java -@@ -160,7 +160,6 @@ public abstract class CraftAbstractInventoryView implements InventoryView { +@@ -164,7 +164,6 @@ public abstract class CraftAbstractInventoryView implements InventoryView { type = InventoryType.SlotType.CRAFTING; break; case ANVIL: @@ -16,7 +16,7 @@ index 149825642976124e852be9aef54a3cb4a8ac193d..71d3a5e5dc5630007cf46f4be3d39da4 case CARTOGRAPHY: case GRINDSTONE: case MERCHANT: -@@ -178,6 +177,7 @@ public abstract class CraftAbstractInventoryView implements InventoryView { +@@ -182,6 +181,7 @@ public abstract class CraftAbstractInventoryView implements InventoryView { } break; case LOOM: diff --git a/patches/server/0976-Anti-Xray.patch b/patches/server/0976-Anti-Xray.patch index e2439a6f77..126f7a294c 100644 --- a/patches/server/0976-Anti-Xray.patch +++ b/patches/server/0976-Anti-Xray.patch @@ -1612,10 +1612,10 @@ index 338b60f0254d55ac4a0645ca351d0ce736ce0681..87477ad186b5f692a39f323a618d016b @Override diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 06b73ace3ae89e8a9de592bb4b8439b4e0cac9f2..5ce8d2a57fd2f29d227d223f1f5742540f1701bd 100644 +index 6c51f0a66236c6a64f4ed18bf4fb0ba6ad822d94..cec56346e6832603dab3eb0f67426d4de571438e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -452,11 +452,16 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -453,11 +453,16 @@ public class CraftWorld extends CraftRegionAccessor implements World { List<ServerPlayer> playersInRange = playerChunk.playerProvider.getPlayers(playerChunk.getPos(), false); if (playersInRange.isEmpty()) return; diff --git a/patches/server/1017-Add-FeatureFlag-API.patch b/patches/server/1017-Add-FeatureFlag-API.patch index 15ab16d841..b97cd07bd9 100644 --- a/patches/server/1017-Add-FeatureFlag-API.patch +++ b/patches/server/1017-Add-FeatureFlag-API.patch @@ -162,10 +162,10 @@ index f0bd7d01f56bb792886354ca4f199e46c2cf7503..adc6741e0e017660fbd39a62b69be1e6 + // Paper end - feature flag API } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 5ce8d2a57fd2f29d227d223f1f5742540f1701bd..61271ef3741656e81f30f9276ee48630ce97b3d3 100644 +index cec56346e6832603dab3eb0f67426d4de571438e..c79c4db56fc4f43498d7886dcb3248798a4c509e 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -2359,10 +2359,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2360,10 +2360,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { return this.persistentDataContainer; } diff --git a/patches/server/1029-Void-damage-configuration-API.patch b/patches/server/1029-Void-damage-configuration-API.patch index e1006ef695..49dc8ef853 100644 --- a/patches/server/1029-Void-damage-configuration-API.patch +++ b/patches/server/1029-Void-damage-configuration-API.patch @@ -33,10 +33,10 @@ index f2708479ccf994278ad1ab4665edc46672001e8a..59c992173fda6153c58722caae061b0e protected void updateSwingTime() { diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 61271ef3741656e81f30f9276ee48630ce97b3d3..4a5a0e33af16369f665bf39e70238e4e5a5486da 100644 +index c79c4db56fc4f43498d7886dcb3248798a4c509e..cd2e74ebadc1aa8282b3d5b89696ddbc053b2708 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -167,6 +167,41 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -168,6 +168,41 @@ public class CraftWorld extends CraftRegionAccessor implements World { private final Object2IntOpenHashMap<SpawnCategory> spawnCategoryLimit = new Object2IntOpenHashMap<>(); private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftWorld.DATA_TYPE_REGISTRY); private net.kyori.adventure.pointer.Pointers adventure$pointers; // Paper - implement pointers @@ -78,7 +78,7 @@ index 61271ef3741656e81f30f9276ee48630ce97b3d3..4a5a0e33af16369f665bf39e70238e4e // Paper start - Provide fast information methods @Override -@@ -267,6 +302,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -268,6 +303,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { } } // Paper end - per world spawn limits diff --git a/patches/server/1037-Moonrise-optimisation-patches.patch b/patches/server/1037-Moonrise-optimisation-patches.patch index c2bbb5a373..b5ede9fb6a 100644 --- a/patches/server/1037-Moonrise-optimisation-patches.patch +++ b/patches/server/1037-Moonrise-optimisation-patches.patch @@ -36177,10 +36177,10 @@ index 87477ad186b5f692a39f323a618d016b669d8051..1df118625aeb57f3353c40f9552f00d2 // Paper start - Adventure diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 4a5a0e33af16369f665bf39e70238e4e5a5486da..696152286a4d16fa51a23ff6e15fb297f3476007 100644 +index cd2e74ebadc1aa8282b3d5b89696ddbc053b2708..2abe37bfbe69c039433b11fcc3a1d4f4e7481ec8 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -488,10 +488,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -489,10 +489,14 @@ public class CraftWorld extends CraftRegionAccessor implements World { ChunkHolder playerChunk = this.world.getChunkSource().chunkMap.getVisibleChunkIfPresent(ChunkPos.asLong(x, z)); if (playerChunk == null) return false; @@ -36198,7 +36198,7 @@ index 4a5a0e33af16369f665bf39e70238e4e5a5486da..696152286a4d16fa51a23ff6e15fb297 // Paper start - Anti-Xray bypass final Map<Object, ClientboundLevelChunkWithLightPacket> refreshPackets = new HashMap<>(); -@@ -504,8 +508,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -505,8 +509,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { })); // Paper end - Anti-Xray bypass } @@ -36208,7 +36208,7 @@ index 4a5a0e33af16369f665bf39e70238e4e5a5486da..696152286a4d16fa51a23ff6e15fb297 return true; } -@@ -609,20 +612,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -610,20 +613,8 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public Collection<Plugin> getPluginChunkTickets(int x, int z) { DistanceManager chunkDistanceManager = this.world.getChunkSource().chunkMap.distanceManager; @@ -36230,7 +36230,7 @@ index 4a5a0e33af16369f665bf39e70238e4e5a5486da..696152286a4d16fa51a23ff6e15fb297 } @Override -@@ -630,7 +621,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -631,7 +622,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { Map<Plugin, ImmutableList.Builder<Chunk>> ret = new HashMap<>(); DistanceManager chunkDistanceManager = this.world.getChunkSource().chunkMap.distanceManager; @@ -36239,7 +36239,7 @@ index 4a5a0e33af16369f665bf39e70238e4e5a5486da..696152286a4d16fa51a23ff6e15fb297 long chunkKey = chunkTickets.getLongKey(); SortedArraySet<Ticket<?>> tickets = chunkTickets.getValue(); -@@ -1333,12 +1324,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1334,12 +1325,12 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public int getViewDistance() { @@ -36254,7 +36254,7 @@ index 4a5a0e33af16369f665bf39e70238e4e5a5486da..696152286a4d16fa51a23ff6e15fb297 } public BlockMetadataStore getBlockMetadata() { -@@ -2473,17 +2464,20 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2474,17 +2465,20 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void setSimulationDistance(final int simulationDistance) { diff --git a/patches/server/1040-Fix-CraftWorld-isChunkGenerated.patch b/patches/server/1040-Fix-CraftWorld-isChunkGenerated.patch index 2aa2a06b03..8724b88715 100644 --- a/patches/server/1040-Fix-CraftWorld-isChunkGenerated.patch +++ b/patches/server/1040-Fix-CraftWorld-isChunkGenerated.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix CraftWorld#isChunkGenerated The upstream implementation is returning true for non-full chunks. diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 696152286a4d16fa51a23ff6e15fb297f3476007..8f234b46c24a0ae08aa5f8190c5b27e1f62dfbab 100644 +index 2abe37bfbe69c039433b11fcc3a1d4f4e7481ec8..2e4dc3ce88e8fe7db47908fc6d335bd74c0614d0 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -397,11 +397,28 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -398,11 +398,28 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean isChunkGenerated(int x, int z) { diff --git a/patches/server/1072-Call-ProjectileHitEvent-for-entity-hits.patch b/patches/server/1072-Call-ProjectileHitEvent-for-entity-hits.patch deleted file mode 100644 index 7d6bd931cb..0000000000 --- a/patches/server/1072-Call-ProjectileHitEvent-for-entity-hits.patch +++ /dev/null @@ -1,22 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Bjarne Koll <[email protected]> -Date: Sat, 23 Nov 2024 22:48:26 +0100 -Subject: [PATCH] Call ProjectileHitEvent for entity hits - -A simple bugfix replacing a new vanilla call to -Projectile#hitTargetOrDeflectSelf with the bukkit replacement to call -the event. - -diff --git a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -index accc246f441c8bf5e1a755cfc0db8f97c0c01c6b..571f0699772eecbe02d71845da82a142321f2142 100644 ---- a/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -+++ b/src/main/java/net/minecraft/world/entity/projectile/AbstractArrow.java -@@ -309,7 +309,7 @@ public abstract class AbstractArrow extends Projectile { - continue; - } - -- ProjectileDeflection projectiledeflection = this.hitTargetOrDeflectSelf(movingobjectpositionentity); -+ ProjectileDeflection projectiledeflection = this.preHitTargetOrDeflectSelf(movingobjectpositionentity); // Paper - also call projectile hit event - - this.hasImpulse = true; - if (this.getPierceLevel() > 0 && projectiledeflection == ProjectileDeflection.NONE) { diff --git a/patches/server/1073-Only-attempt-to-find-spawn-position-if-there-isn-t-a.patch b/patches/server/1072-Only-attempt-to-find-spawn-position-if-there-isn-t-a.patch index ef9c2a3088..43aea85654 100644 --- a/patches/server/1073-Only-attempt-to-find-spawn-position-if-there-isn-t-a.patch +++ b/patches/server/1072-Only-attempt-to-find-spawn-position-if-there-isn-t-a.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Only attempt to find spawn position if there isn't a fixed diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index c26e3a239441376f2694782d4f07943538677c71..4acdef7a20b0625fc348e5592edd64868b73dd82 100644 +index 780582ebaa8deb0c0b0c8de17de5abcebafa4bd3..4158473fd553a16fec23bcbcf9a278d413120600 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -816,7 +816,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTa |