From 867eb9054ba78e2f02f32e7ea6e4cfb9c7835f7e Mon Sep 17 00:00:00 2001 From: Jason Penilla <11360596+jpenilla@users.noreply.github.com> Date: Thu, 25 Apr 2024 20:15:07 -0700 Subject: [PATCH] compile fixes --- patches/server/0009-MC-Utils.patch | 2 +- ...nfigurable-Disabling-Cat-Chest-Detection.patch | 2 +- .../0242-Optimize-CraftBlockData-Creation.patch | 2 +- ...rtalCreateEvent-needs-to-know-its-entity.patch | 2 +- ...tional-open-container-api-to-HumanEntity.patch | 15 ++------------- .../0445-Beacon-API-custom-effect-ranges.patch | 4 ++-- .../0496-Add-PlayerChangeBeaconEffectEvent.patch | 4 ++-- ...ce-beacon-activation-deactivation-events.patch | 2 +- ...re-EntityChangeBlockEvent-in-more-places.patch | 8 ++++---- .../server/0771-Fix-a-bunch-of-vanilla-bugs.patch | 8 ++++---- ...ning-for-some-hot-BlockBehavior-and-Flui.patch | 2 +- patches/server/0807-Add-BlockLockCheckEvent.patch | 2 +- ...-block-state-to-BlockExplodeEvent-and-En.patch | 4 ++-- ...postItemEvent-and-EntityCompostItemEvent.patch | 2 +- ...Fix-inventories-returning-null-Locations.patch | 2 +- ...0863-Optimize-player-lookups-for-beacons.patch | 2 +- ...10-Call-BlockRedstoneEvents-for-lecterns.patch | 2 +- ...-missing-InventoryHolders-to-inventories.patch | 2 +- ...andle-experience-dropping-on-block-break.patch | 2 +- ...ck-the-changed-item-from-dispense-events.patch | 4 ++-- patches/server/0984-Starlight.patch | 2 +- patches/server/0985-Rewrite-chunk-system.patch | 10 ++++------ ...ock-and-End-Portal-Frames-from-being-des.patch | 2 +- .../1008-Eigencraft-redstone-implementation.patch | 4 ++-- patches/server/1018-Collision-optimisations.patch | 2 +- 25 files changed, 40 insertions(+), 53 deletions(-) diff --git a/patches/server/0009-MC-Utils.patch b/patches/server/0009-MC-Utils.patch index 66287eef8c..5b912bd4e7 100644 --- a/patches/server/0009-MC-Utils.patch +++ b/patches/server/0009-MC-Utils.patch @@ -7408,7 +7408,7 @@ index 497792978bdf0e6a53d772304770e8df3e7416ea..c5454b92ca2565461c799d7340160f9f public WorldBorder getWorldBorder() { return this.level.getWorldBorder(); diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index 054921c9a58adf90e81448274972d43aaf5175bf..08eb369f8cb4c35be17cef816a0d33295a1ae3e0 100644 +index 295f5d34fbc39016807274d7f5b841f3e1f9919f..e8815210405152696a9f7ddae64f87ff456fa9bd 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java @@ -828,12 +828,20 @@ public abstract class BlockBehaviour implements FeatureElement { diff --git a/patches/server/0060-Configurable-Disabling-Cat-Chest-Detection.patch b/patches/server/0060-Configurable-Disabling-Cat-Chest-Detection.patch index a42f95d79a..684534ebbe 100644 --- a/patches/server/0060-Configurable-Disabling-Cat-Chest-Detection.patch +++ b/patches/server/0060-Configurable-Disabling-Cat-Chest-Detection.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Configurable Disabling Cat Chest Detection Offers a gameplay feature to stop cats from blocking chests diff --git a/src/main/java/net/minecraft/world/level/block/ChestBlock.java b/src/main/java/net/minecraft/world/level/block/ChestBlock.java -index e0033b6a3beafa52f18f3aa3cbc87daa0af681ad..abd33cdfcf7c8851f7191612bcdb377bcdfb922f 100644 +index 0b7b447aeb0e592b51e4ae205df09e1b8ef4d0bb..491474b66856fccb038ee436968c9a5d3e4bf75c 100644 --- a/src/main/java/net/minecraft/world/level/block/ChestBlock.java +++ b/src/main/java/net/minecraft/world/level/block/ChestBlock.java @@ -349,6 +349,11 @@ public class ChestBlock extends AbstractChestBlock implements diff --git a/patches/server/0242-Optimize-CraftBlockData-Creation.patch b/patches/server/0242-Optimize-CraftBlockData-Creation.patch index 022cecee9a..127bebc309 100644 --- a/patches/server/0242-Optimize-CraftBlockData-Creation.patch +++ b/patches/server/0242-Optimize-CraftBlockData-Creation.patch @@ -7,7 +7,7 @@ Avoids a hashmap lookup by cacheing a reference to the CraftBlockData and cloning it when one is needed. diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index 08eb369f8cb4c35be17cef816a0d33295a1ae3e0..da8b97c590fb38f65dee2e8a881a2f7ad658b5e7 100644 +index e8815210405152696a9f7ddae64f87ff456fa9bd..3e76f1baa321f1c2551a027a705bbeed48936e2b 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java @@ -807,6 +807,14 @@ public abstract class BlockBehaviour implements FeatureElement { diff --git a/patches/server/0418-PortalCreateEvent-needs-to-know-its-entity.patch b/patches/server/0418-PortalCreateEvent-needs-to-know-its-entity.patch index d4f1e75eb4..c9c75bf52d 100644 --- a/patches/server/0418-PortalCreateEvent-needs-to-know-its-entity.patch +++ b/patches/server/0418-PortalCreateEvent-needs-to-know-its-entity.patch @@ -60,7 +60,7 @@ index ceaa2a7048afc4955d3695af5291e83a79d83c5d..5dad1aa26a8908cba6a08398a4bad27f } diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index da8b97c590fb38f65dee2e8a881a2f7ad658b5e7..939d116ea940d52b319e08a11f08d1ccc406cb76 100644 +index 3e76f1baa321f1c2551a027a705bbeed48936e2b..24c2ec8e637373876a00bf292ac9318f79da7aef 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java @@ -155,6 +155,12 @@ public abstract class BlockBehaviour implements FeatureElement { diff --git a/patches/server/0424-Add-additional-open-container-api-to-HumanEntity.patch b/patches/server/0424-Add-additional-open-container-api-to-HumanEntity.patch index 12f6de0a05..47aa453acf 100644 --- a/patches/server/0424-Add-additional-open-container-api-to-HumanEntity.patch +++ b/patches/server/0424-Add-additional-open-container-api-to-HumanEntity.patch @@ -3,20 +3,9 @@ From: JRoy Date: Wed, 26 Aug 2020 02:12:31 -0400 Subject: [PATCH] Add additional open container api to HumanEntity +== AT == +public net/minecraft/world/level/block/state/BlockBehaviour getMenuProvider(Lnet/minecraft/world/level/block/state/BlockState;Lnet/minecraft/world/level/Level;Lnet/minecraft/core/BlockPos;)Lnet/minecraft/world/MenuProvider; -diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index 939d116ea940d52b319e08a11f08d1ccc406cb76..20f8dc59d0687d27331c06a202362e6370abc65c 100644 ---- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -+++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -@@ -296,7 +296,7 @@ public abstract class BlockBehaviour implements FeatureElement { - } - - @Nullable -- protected MenuProvider getMenuProvider(BlockState state, Level world, BlockPos pos) { -+ public MenuProvider getMenuProvider(BlockState state, Level world, BlockPos pos) { // Paper - public - return null; - } - diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java index bbd3f0981eb95348ef12c9af8fa1712c022ed869..9393e9d21fcc41cb0f20b98d9f28c95b0e523f62 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java diff --git a/patches/server/0445-Beacon-API-custom-effect-ranges.patch b/patches/server/0445-Beacon-API-custom-effect-ranges.patch index 3420eaaa03..5ab714aeef 100644 --- a/patches/server/0445-Beacon-API-custom-effect-ranges.patch +++ b/patches/server/0445-Beacon-API-custom-effect-ranges.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Beacon API - custom effect ranges diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -index 18450017bc3df2f0b1a5715e6021e8e5defa24a1..32a242d4b67b4edbc1996fa64a151dc60e7e996e 100644 +index 18450017bc3df2f0b1a5715e6021e8e5defa24a1..cdb6b89ad4c34be419f66f4f6e6a11068273765d 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java @@ -86,6 +86,26 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name @@ -66,7 +66,7 @@ index 18450017bc3df2f0b1a5715e6021e8e5defa24a1..32a242d4b67b4edbc1996fa64a151dc6 + // Paper start - Custom beacon ranges + BeaconBlockEntity.applyEffects(world, pos, beaconLevel, primaryEffect, secondaryEffect, null); + } -+ private static void applyEffects(Level world, BlockPos pos, int beaconLevel, @Nullable MobEffect primaryEffect, @Nullable MobEffect secondaryEffect, @Nullable BeaconBlockEntity blockEntity) { ++ private static void applyEffects(Level world, BlockPos pos, int beaconLevel, @Nullable Holder primaryEffect, @Nullable Holder secondaryEffect, @Nullable BeaconBlockEntity blockEntity) { + // Paper end - Custom beacon ranges if (!world.isClientSide && primaryEffect != null) { double d0 = (double) (beaconLevel * 10 + 10); diff --git a/patches/server/0496-Add-PlayerChangeBeaconEffectEvent.patch b/patches/server/0496-Add-PlayerChangeBeaconEffectEvent.patch index e8fbab2ef1..b3444419ee 100644 --- a/patches/server/0496-Add-PlayerChangeBeaconEffectEvent.patch +++ b/patches/server/0496-Add-PlayerChangeBeaconEffectEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add PlayerChangeBeaconEffectEvent diff --git a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java -index c2fa423e14fc08c10483415baa2148af269c3758..866dd476829bd59501021a8c24bde6d8e8778963 100644 +index c2fa423e14fc08c10483415baa2148af269c3758..5b6133f6758d322713321b7e918db0c3e0d4be51 100644 --- a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java +++ b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java @@ -171,12 +171,25 @@ public class BeaconMenu extends AbstractContainerMenu { @@ -14,7 +14,7 @@ index c2fa423e14fc08c10483415baa2148af269c3758..866dd476829bd59501021a8c24bde6d8 + // Paper start - Add PlayerChangeBeaconEffectEvent + private static @Nullable org.bukkit.potion.PotionEffectType convert(Optional> optionalEffect) { -+ return optionalEffect.map(org.bukkit.craftbukkit.potion.CraftPotionEffectType::minecraftToBukkit).orElse(null); ++ return optionalEffect.map(org.bukkit.craftbukkit.potion.CraftPotionEffectType::minecraftHolderToBukkit).orElse(null); + } + // Paper end - Add PlayerChangeBeaconEffectEvent + diff --git a/patches/server/0539-Introduce-beacon-activation-deactivation-events.patch b/patches/server/0539-Introduce-beacon-activation-deactivation-events.patch index e230faa779..de6741ca2b 100644 --- a/patches/server/0539-Introduce-beacon-activation-deactivation-events.patch +++ b/patches/server/0539-Introduce-beacon-activation-deactivation-events.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Introduce beacon activation/deactivation events diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -index 32a242d4b67b4edbc1996fa64a151dc60e7e996e..7cec5aeee93e4fb14d403559293ec3c9be7955a6 100644 +index cdb6b89ad4c34be419f66f4f6e6a11068273765d..00ce8c45d906d8a468d93f464638f367d77e40fb 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java @@ -225,6 +225,15 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name diff --git a/patches/server/0760-Fire-EntityChangeBlockEvent-in-more-places.patch b/patches/server/0760-Fire-EntityChangeBlockEvent-in-more-places.patch index 16cb128e55..d21cfe9e22 100644 --- a/patches/server/0760-Fire-EntityChangeBlockEvent-in-more-places.patch +++ b/patches/server/0760-Fire-EntityChangeBlockEvent-in-more-places.patch @@ -183,7 +183,7 @@ index c0e96284bb470353c0e54ad4e0c2205017913e61..24f6a158e4759aac3be8da4cf5e0d40b level.gameEvent(GameEvent.BLOCK_CHANGE, blockPos, GameEvent.Context.of(player, blockState3)); if (player != null) { diff --git a/src/main/java/net/minecraft/world/level/block/CakeBlock.java b/src/main/java/net/minecraft/world/level/block/CakeBlock.java -index 430312f4e67a253465c54e3fe5e5cfad365cfa22..e1d853e5cb97046dd481cd14b4199be27c593d3b 100644 +index 430312f4e67a253465c54e3fe5e5cfad365cfa22..ac40246f0bb4903b6623c02d7a3512b5208b264f 100644 --- a/src/main/java/net/minecraft/world/level/block/CakeBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CakeBlock.java @@ -64,7 +64,12 @@ public class CakeBlock extends Block { @@ -192,7 +192,7 @@ index 430312f4e67a253465c54e3fe5e5cfad365cfa22..e1d853e5cb97046dd481cd14b4199be2 CandleBlock candleblock = (CandleBlock) block; - + // Paper start - call change block event -+ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, pos, CandleCakeBlock.byCandle(block))) { ++ if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(player, pos, CandleCakeBlock.byCandle(candleblock))) { + player.containerMenu.sendAllDataToRemote(); // update inv because candle could decrease + return ItemInteractionResult.PASS_TO_DEFAULT_BLOCK_INTERACTION; + } @@ -225,7 +225,7 @@ index 430312f4e67a253465c54e3fe5e5cfad365cfa22..e1d853e5cb97046dd481cd14b4199be2 world.gameEvent((Entity) player, (Holder) GameEvent.EAT, pos); if (i < 6) { diff --git a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java -index 804adb5ed92dfcf4c29c756dd95d7164150a9666..fcd8a977eaa52cd478507c3b44fa72b194df9540 100644 +index 804adb5ed92dfcf4c29c756dd95d7164150a9666..19fa8a9f935e9063497f8c0bd7909036fa0af2b7 100644 --- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java +++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java @@ -239,6 +239,11 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { @@ -234,7 +234,7 @@ index 804adb5ed92dfcf4c29c756dd95d7164150a9666..fcd8a977eaa52cd478507c3b44fa72b1 BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, stack); + // Paper start - handle cancelled events + if (iblockdata1 == null) { -+ return InteractionResult.PASS; ++ return ItemInteractionResult.SKIP_DEFAULT_BLOCK_INTERACTION; + } + // Paper end diff --git a/patches/server/0771-Fix-a-bunch-of-vanilla-bugs.patch b/patches/server/0771-Fix-a-bunch-of-vanilla-bugs.patch index 40b4c26866..f847c09279 100644 --- a/patches/server/0771-Fix-a-bunch-of-vanilla-bugs.patch +++ b/patches/server/0771-Fix-a-bunch-of-vanilla-bugs.patch @@ -328,7 +328,7 @@ index 08dcc94c9eca9a5fd61055f05b7737ba5840b5bf..e0e5046c84941a8d17e18c177f3daea9 return 1; } diff --git a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java -index 866dd476829bd59501021a8c24bde6d8e8778963..580e5714c62aef5a5fdd16606712b96f3d41c938 100644 +index 5b6133f6758d322713321b7e918db0c3e0d4be51..7098bd97a30131dd7180ec2a4d4b485e3c6f9405 100644 --- a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java +++ b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java @@ -178,6 +178,11 @@ public class BeaconMenu extends AbstractContainerMenu { @@ -357,7 +357,7 @@ index a569b404ece21fa9571e73947334f5aa57a8080c..51d350add4ca1756cb9e364e066bbee7 stack.shrink(1); } diff --git a/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java b/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java -index cd90129be2cf8095abd80528e5de3bbe05022a9d..65dfad03a9f82d2ce65d0ec7d5bd22bd6fed15a2 100644 +index cd90129be2cf8095abd80528e5de3bbe05022a9d..fad69dfc20574ab23634b14252b50929cca75b21 100644 --- a/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java +++ b/src/main/java/net/minecraft/world/level/block/AzaleaBlock.java @@ -51,4 +51,11 @@ public class AzaleaBlock extends BushBlock implements BonemealableBlock { @@ -367,7 +367,7 @@ index cd90129be2cf8095abd80528e5de3bbe05022a9d..65dfad03a9f82d2ce65d0ec7d5bd22bd + + // Paper start - Fix MC-224454 + @Override -+ public boolean isPathfindable(BlockState state, BlockGetter world, BlockPos pos, net.minecraft.world.level.pathfinder.PathComputationType type) { ++ public boolean isPathfindable(BlockState state, net.minecraft.world.level.pathfinder.PathComputationType type) { + return false; + } + // Paper end @@ -408,7 +408,7 @@ index 614ddebb92aba91694951fc22900fed362b3426d..d19e799491f790ca967a0731ef95a069 } } diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -index 7cec5aeee93e4fb14d403559293ec3c9be7955a6..35c7d05b1898adf6b193d0b0b53f3c3be186d4ce 100644 +index 00ce8c45d906d8a468d93f464638f367d77e40fb..ac1547d4f45aa676ae174c6c80716db3437f2914 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java @@ -295,7 +295,11 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name diff --git a/patches/server/0805-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch b/patches/server/0805-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch index 74cf8aa4a4..2f86713e06 100644 --- a/patches/server/0805-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch +++ b/patches/server/0805-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Improve inlining for some hot BlockBehavior and FluidState diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index 20f8dc59d0687d27331c06a202362e6370abc65c..64fe89f4e70440a1af1d98a521a41ab048f7c3d9 100644 +index 24c2ec8e637373876a00bf292ac9318f79da7aef..c762a006b3f586b32209c20e85f6b8bf169dbd06 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java @@ -906,15 +906,15 @@ public abstract class BlockBehaviour implements FeatureElement { diff --git a/patches/server/0807-Add-BlockLockCheckEvent.patch b/patches/server/0807-Add-BlockLockCheckEvent.patch index 9d9e7c4dd6..91be1b9825 100644 --- a/patches/server/0807-Add-BlockLockCheckEvent.patch +++ b/patches/server/0807-Add-BlockLockCheckEvent.patch @@ -56,7 +56,7 @@ index ff3f26c31bd11b48f48e354ea6b33aa55dcbff5d..02675f15e157ce68506c813b19cf5472 protected abstract NonNullList getItems(); diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -index 35c7d05b1898adf6b193d0b0b53f3c3be186d4ce..2e3d89ca35b513340cd1ebefa875280b32e1756e 100644 +index ac1547d4f45aa676ae174c6c80716db3437f2914..d575294924df6b970c5773a5cdd8b2a1a9cbce19 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java @@ -472,7 +472,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name diff --git a/patches/server/0815-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch b/patches/server/0815-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch index 0842bf9fa8..c966db60a9 100644 --- a/patches/server/0815-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch +++ b/patches/server/0815-Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch @@ -100,14 +100,14 @@ index 03035ed3df2f32e14a8eb9bc3d536ef64b5d87ba..872bec4c366c86177334452315cc4a80 } } diff --git a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java -index a4a90df0b500fb440226b07462faaa87594b12a5..c389e2f891655bd8c9f307057dc1ad62dfcbc79e 100644 +index a4a90df0b500fb440226b07462faaa87594b12a5..4e2fad1f234356ada6f29445038e43b9a8406cf9 100644 --- a/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java +++ b/src/main/java/net/minecraft/world/level/block/RespawnAnchorBlock.java @@ -133,6 +133,7 @@ public class RespawnAnchorBlock extends Block { } private void explode(BlockState state, Level world, final BlockPos explodedPos) { -+ final org.bukkit.block.BlockState explodedBlockState = org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(explodedPos, state, null); // Paper - add exploded state ++ final org.bukkit.block.BlockState explodedBlockState = org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(world, explodedPos, state, null); // Paper - add exploded state world.removeBlock(explodedPos, false); Stream stream = Direction.Plane.HORIZONTAL.stream(); // CraftBukkit - decompile error diff --git a/patches/server/0827-Add-CompostItemEvent-and-EntityCompostItemEvent.patch b/patches/server/0827-Add-CompostItemEvent-and-EntityCompostItemEvent.patch index e909caa123..85321a4a5b 100644 --- a/patches/server/0827-Add-CompostItemEvent-and-EntityCompostItemEvent.patch +++ b/patches/server/0827-Add-CompostItemEvent-and-EntityCompostItemEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add CompostItemEvent and EntityCompostItemEvent diff --git a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java -index fcd8a977eaa52cd478507c3b44fa72b194df9540..0af05d6f046368af5a5a600288b8329c17f278c7 100644 +index 19fa8a9f935e9063497f8c0bd7909036fa0af2b7..d3d12f9114173f4971f95d7ef895a4374705bd3f 100644 --- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java +++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java @@ -336,7 +336,21 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { diff --git a/patches/server/0831-Fix-inventories-returning-null-Locations.patch b/patches/server/0831-Fix-inventories-returning-null-Locations.patch index 8c992b49d3..2a3e133d8d 100644 --- a/patches/server/0831-Fix-inventories-returning-null-Locations.patch +++ b/patches/server/0831-Fix-inventories-returning-null-Locations.patch @@ -30,7 +30,7 @@ index c26161784359ea167e11de8aa58eda3b4851059c..6632cf24ebe6d147950a1fdb87666093 } diff --git a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java -index 580e5714c62aef5a5fdd16606712b96f3d41c938..37735417e2a3df96eea88aa0a3f2d7faeb823a2e 100644 +index 7098bd97a30131dd7180ec2a4d4b485e3c6f9405..d0f55f0eb3208a072f205232b023c5f923dbcf3f 100644 --- a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java +++ b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java @@ -52,6 +52,12 @@ public class BeaconMenu extends AbstractContainerMenu { diff --git a/patches/server/0863-Optimize-player-lookups-for-beacons.patch b/patches/server/0863-Optimize-player-lookups-for-beacons.patch index 7ffe90e869..e5daf82675 100644 --- a/patches/server/0863-Optimize-player-lookups-for-beacons.patch +++ b/patches/server/0863-Optimize-player-lookups-for-beacons.patch @@ -7,7 +7,7 @@ For larger ranges, it's better to iterate over the player list than the entity slices. diff --git a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java -index 2e3d89ca35b513340cd1ebefa875280b32e1756e..8a89ba2f50b0032b9db854d2c8cb6493f58dbe34 100644 +index d575294924df6b970c5773a5cdd8b2a1a9cbce19..dd1fe8357ccf084880a7f3d4d9e499bde672c787 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BeaconBlockEntity.java @@ -333,7 +333,22 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name diff --git a/patches/server/0910-Call-BlockRedstoneEvents-for-lecterns.patch b/patches/server/0910-Call-BlockRedstoneEvents-for-lecterns.patch index 57df928cb0..bafd87afad 100644 --- a/patches/server/0910-Call-BlockRedstoneEvents-for-lecterns.patch +++ b/patches/server/0910-Call-BlockRedstoneEvents-for-lecterns.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Call BlockRedstoneEvents for lecterns diff --git a/src/main/java/net/minecraft/world/level/block/LecternBlock.java b/src/main/java/net/minecraft/world/level/block/LecternBlock.java -index 76ec78b5e28a29cb83b24dec02aacb0f022dcc1a..a6b4d483f94663315abcfcea7f54be2ecebb28c2 100644 +index e2d411fe3f8b00c18c2cfb8d11cd9b46e461fb1a..203f4dd2255cffdab468fe1ec869ce9b989cace1 100644 --- a/src/main/java/net/minecraft/world/level/block/LecternBlock.java +++ b/src/main/java/net/minecraft/world/level/block/LecternBlock.java @@ -178,6 +178,16 @@ public class LecternBlock extends BaseEntityBlock { diff --git a/patches/server/0914-Add-missing-InventoryHolders-to-inventories.patch b/patches/server/0914-Add-missing-InventoryHolders-to-inventories.patch index 152d57f68a..e8362fb24a 100644 --- a/patches/server/0914-Add-missing-InventoryHolders-to-inventories.patch +++ b/patches/server/0914-Add-missing-InventoryHolders-to-inventories.patch @@ -77,7 +77,7 @@ index 428e454116804c27496cfbf796edd44780890d33..4c7e91977fa590abfe7eb3704d8008ed + // Paper end - Add missing InventoryHolders } diff --git a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java -index 37735417e2a3df96eea88aa0a3f2d7faeb823a2e..5031155b72f9a7b6b65cc6d72a5bdf963ac19e22 100644 +index d0f55f0eb3208a072f205232b023c5f923dbcf3f..d11b2a26cbb031d18bfb9c54ac1c7932c5295dc6 100644 --- a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java +++ b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java @@ -42,7 +42,7 @@ public class BeaconMenu extends AbstractContainerMenu { diff --git a/patches/server/0951-Properly-handle-experience-dropping-on-block-break.patch b/patches/server/0951-Properly-handle-experience-dropping-on-block-break.patch index 5b96822b23..3ee724786e 100644 --- a/patches/server/0951-Properly-handle-experience-dropping-on-block-break.patch +++ b/patches/server/0951-Properly-handle-experience-dropping-on-block-break.patch @@ -68,7 +68,7 @@ index a757a45d423e1729c9374391df4186ae0522e1ac..7f0c0ca49e7575c18935b71e3180d112 } diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index 64fe89f4e70440a1af1d98a521a41ab048f7c3d9..0b7e5aef0089d92754d883f5e517b322f26efaaf 100644 +index c762a006b3f586b32209c20e85f6b8bf169dbd06..f87d9cb38caf3bf92fd32f2118f76799ede418db 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java @@ -1118,6 +1118,7 @@ public abstract class BlockBehaviour implements FeatureElement { diff --git a/patches/server/0979-Properly-track-the-changed-item-from-dispense-events.patch b/patches/server/0979-Properly-track-the-changed-item-from-dispense-events.patch index 03deeffec8..9957c97ca3 100644 --- a/patches/server/0979-Properly-track-the-changed-item-from-dispense-events.patch +++ b/patches/server/0979-Properly-track-the-changed-item-from-dispense-events.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Properly track the changed item from dispense events diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java -index 32084df594649d8da04052bbfa111896d8ea1f91..d194c08a50493da39f2457dc55fed953f78c6199 100644 +index 32084df594649d8da04052bbfa111896d8ea1f91..5dab1e10303177e5a4d97a91ee46ede66f30ae35 100644 --- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java @@ -133,10 +133,14 @@ public interface DispenseItemBehavior { @@ -14,7 +14,7 @@ index 32084df594649d8da04052bbfa111896d8ea1f91..d194c08a50493da39f2457dc55fed953 } + // Paper start - track changed items in the dispense event + itemstack1 = CraftItemStack.unwrap(event.getItem()); // unwrap is safe because the stack won't be modified -+ entitytypes = ((SpawnEggItem) itemstack1.getItem()).getType(itemstack1.getTag()); ++ entitytypes = ((SpawnEggItem) itemstack1.getItem()).getType(itemstack1); + // Paper end - track changed item from dispense event } diff --git a/patches/server/0984-Starlight.patch b/patches/server/0984-Starlight.patch index ab183ba00a..72b56b3d53 100644 --- a/patches/server/0984-Starlight.patch +++ b/patches/server/0984-Starlight.patch @@ -4890,7 +4890,7 @@ index 333a02e08cccf5cb0efa2076582cbd69e95ff0c0..ca4c8e256047a4af45811c3e772b5a95 return this.level.getChunkSource().chunkMap.isOldChunkAround(chunkPos, checkRadius); } diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index 0b7e5aef0089d92754d883f5e517b322f26efaaf..58129852b4caaa272401cdadb2e0ba4690c60e88 100644 +index f87d9cb38caf3bf92fd32f2118f76799ede418db..c7da359c525522b55763e594a1db0c26a026b73f 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java @@ -812,6 +812,7 @@ public abstract class BlockBehaviour implements FeatureElement { diff --git a/patches/server/0985-Rewrite-chunk-system.patch b/patches/server/0985-Rewrite-chunk-system.patch index 91d5ea248f..9439bedf74 100644 --- a/patches/server/0985-Rewrite-chunk-system.patch +++ b/patches/server/0985-Rewrite-chunk-system.patch @@ -8861,10 +8861,10 @@ index 0000000000000000000000000000000000000000..049e20407033073b06fcdeb46c38485f +} diff --git a/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkUpgradeGenericStatusTask.java b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkUpgradeGenericStatusTask.java new file mode 100644 -index 0000000000000000000000000000000000000000..259fd6024fb2a4fae1a5751324311f19fed47862 +index 0000000000000000000000000000000000000000..bd0d0c4436f357392e13d9efd4412886385a6924 --- /dev/null +++ b/src/main/java/io/papermc/paper/chunk/system/scheduling/ChunkUpgradeGenericStatusTask.java -@@ -0,0 +1,216 @@ +@@ -0,0 +1,214 @@ +package io.papermc.paper.chunk.system.scheduling; + +import ca.spottedleaf.concurrentutil.executor.standard.PrioritisedExecutor; @@ -9000,12 +9000,10 @@ index 0000000000000000000000000000000000000000..259fd6024fb2a4fae1a5751324311f19 + LOGGER.warn("Future status not complete after scheduling: " + this.toStatus.toString() + ", generate: " + generation); + } + -+ final ChunkResult either; + final ChunkAccess newChunk; + + try { -+ either = completeFuture.join(); -+ newChunk = (either == null) ? null : either.orElse(null); ++ newChunk = completeFuture.join(); + } catch (final Throwable throwable) { + this.complete(null, throwable); + // ensure the chunk system can respond, then die @@ -9016,7 +9014,7 @@ index 0000000000000000000000000000000000000000..259fd6024fb2a4fae1a5751324311f19 + } + + if (newChunk == null) { -+ this.complete(null, new IllegalStateException("Chunk for status: " + ChunkUpgradeGenericStatusTask.this.toStatus.toString() + ", generation: " + generation + " should not be null! Either: " + either).fillInStackTrace()); ++ this.complete(null, new IllegalStateException("Chunk for status: " + ChunkUpgradeGenericStatusTask.this.toStatus.toString() + ", generation: " + generation + " should not be null! Future: " + completeFuture).fillInStackTrace()); + return; + } + diff --git a/patches/server/1004-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch b/patches/server/1004-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch index a399285479..9d41c60b80 100644 --- a/patches/server/1004-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch +++ b/patches/server/1004-Protect-Bedrock-and-End-Portal-Frames-from-being-des.patch @@ -106,7 +106,7 @@ index e6bfbe2588e0c2a1be14e38d654e889d392ad4db..e0c62227b279a5fe0f3868fbf9ce8c78 world.playSound((Player) null, pos, SoundEvents.PISTON_CONTRACT, SoundSource.BLOCKS, 0.5F, world.random.nextFloat() * 0.15F + 0.6F); diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index 58129852b4caaa272401cdadb2e0ba4690c60e88..a28cb5e2e6a813ea8fddd26f34cd681b6bae6305 100644 +index c7da359c525522b55763e594a1db0c26a026b73f..55efd0d379bac79935f62446cd3479d1e59361a4 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java @@ -174,7 +174,7 @@ public abstract class BlockBehaviour implements FeatureElement { diff --git a/patches/server/1008-Eigencraft-redstone-implementation.patch b/patches/server/1008-Eigencraft-redstone-implementation.patch index 19e7cb8731..4f22c7fce9 100644 --- a/patches/server/1008-Eigencraft-redstone-implementation.patch +++ b/patches/server/1008-Eigencraft-redstone-implementation.patch @@ -24,7 +24,7 @@ Co-authored-by: egg82 diff --git a/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java new file mode 100644 -index 0000000000000000000000000000000000000000..fa062e6543e8a0377e3d4715996955dba005ee80 +index 0000000000000000000000000000000000000000..9f17170179cc99d84ad25a1e838aff3d8cc66f93 --- /dev/null +++ b/src/main/java/com/destroystokyo/paper/util/RedstoneWireTurbo.java @@ -0,0 +1,958 @@ @@ -691,7 +691,7 @@ index 0000000000000000000000000000000000000000..fa062e6543e8a0377e3d4715996955db + // call BlockStateBase#neighborChanged directly. This change mostly + // restores old behavior, at the cost of bypassing the + // max-chained-neighbor-updates server property. -+ worldIn.getBlockState(upd.self).neighborChanged(worldIn, upd.self, wire, upd.parent, false); ++ worldIn.getBlockState(upd.self).handleNeighborChanged(worldIn, upd.self, wire, upd.parent, false); + } + } + diff --git a/patches/server/1018-Collision-optimisations.patch b/patches/server/1018-Collision-optimisations.patch index c8b02ec099..a6179487ff 100644 --- a/patches/server/1018-Collision-optimisations.patch +++ b/patches/server/1018-Collision-optimisations.patch @@ -3030,7 +3030,7 @@ index 054593fc0b8d13f6bf449cc20a1f7ddfd5f1d1f0..cf8b8c8efd1c9c81eb5f02d75bd75875 public void animateTick(BlockState state, Level world, BlockPos pos, RandomSource random) {} diff --git a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java -index a28cb5e2e6a813ea8fddd26f34cd681b6bae6305..4f434df33f1a84a13c7c7a2a9efb4ab5d152129c 100644 +index 55efd0d379bac79935f62446cd3479d1e59361a4..2034ca2edd3aff61d94416266e75402babd3e741 100644 --- a/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java +++ b/src/main/java/net/minecraft/world/level/block/state/BlockBehaviour.java @@ -813,6 +813,10 @@ public abstract class BlockBehaviour implements FeatureElement {