diff --git a/patches/server/Add-PlayerChangeBeaconEffectEvent.patch b/patches/server/Add-PlayerChangeBeaconEffectEvent.patch index 2d7e66385b..3840468519 100644 --- a/patches/server/Add-PlayerChangeBeaconEffectEvent.patch +++ b/patches/server/Add-PlayerChangeBeaconEffectEvent.patch @@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // 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/Add-additional-open-container-api-to-HumanEntity.patch b/patches/server/Add-additional-open-container-api-to-HumanEntity.patch index 00f9871b6a..de357ff171 100644 --- a/patches/server/Add-additional-open-container-api-to-HumanEntity.patch +++ b/patches/server/Add-additional-open-container-api-to-HumanEntity.patch @@ -3,20 +3,9 @@ From: Josh Roy <10731363+JRoy@users.noreply.github.com> 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 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 -@@ -0,0 +0,0 @@ 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 0000000000000000000000000000000000000000..0000000000000000000000000000000000000000 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java diff --git a/patches/server/Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch b/patches/server/Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch index 96eff03c2d..34577fc50a 100644 --- a/patches/server/Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch +++ b/patches/server/Add-exploded-block-state-to-BlockExplodeEvent-and-En.patch @@ -107,7 +107,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } 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/Beacon-API-custom-effect-ranges.patch b/patches/server/Beacon-API-custom-effect-ranges.patch index 32c638c431..8e9c8df86d 100644 --- a/patches/server/Beacon-API-custom-effect-ranges.patch +++ b/patches/server/Beacon-API-custom-effect-ranges.patch @@ -66,7 +66,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // 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/Eigencraft-redstone-implementation.patch b/patches/server/Eigencraft-redstone-implementation.patch index 2551e39666..201f70ba2f 100644 --- a/patches/server/Eigencraft-redstone-implementation.patch +++ b/patches/server/Eigencraft-redstone-implementation.patch @@ -691,7 +691,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + // 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/Fire-EntityChangeBlockEvent-in-more-places.patch b/patches/server/Fire-EntityChangeBlockEvent-in-more-places.patch index fe6736da0e..f7ea814a45 100644 --- a/patches/server/Fire-EntityChangeBlockEvent-in-more-places.patch +++ b/patches/server/Fire-EntityChangeBlockEvent-in-more-places.patch @@ -192,7 +192,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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; + } @@ -234,7 +234,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 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/Fix-a-bunch-of-vanilla-bugs.patch b/patches/server/Fix-a-bunch-of-vanilla-bugs.patch index 774afc85cd..cbce7c205c 100644 --- a/patches/server/Fix-a-bunch-of-vanilla-bugs.patch +++ b/patches/server/Fix-a-bunch-of-vanilla-bugs.patch @@ -367,7 +367,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + + // 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 diff --git a/patches/server/Properly-track-the-changed-item-from-dispense-events.patch b/patches/server/Properly-track-the-changed-item-from-dispense-events.patch index 23580b9633..95758b0e4a 100644 --- a/patches/server/Properly-track-the-changed-item-from-dispense-events.patch +++ b/patches/server/Properly-track-the-changed-item-from-dispense-events.patch @@ -14,7 +14,7 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 } + // 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/Rewrite-chunk-system.patch b/patches/server/Rewrite-chunk-system.patch index 2fd02c1c58..0cae52d77b 100644 --- a/patches/server/Rewrite-chunk-system.patch +++ b/patches/server/Rewrite-chunk-system.patch @@ -9000,12 +9000,10 @@ index 0000000000000000000000000000000000000000..00000000000000000000000000000000 + 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..00000000000000000000000000000000 + } + + 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; + } +