diff --git a/patches/unapplied/server/0878-Workaround-for-client-lag-spikes-MC-162253.patch b/patches/removed/1.20/0878-Workaround-for-client-lag-spikes-MC-162253.patch similarity index 100% rename from patches/unapplied/server/0878-Workaround-for-client-lag-spikes-MC-162253.patch rename to patches/removed/1.20/0878-Workaround-for-client-lag-spikes-MC-162253.patch diff --git a/patches/unapplied/server/0880-Fix-EndDragonFight-killed-statuses-should-be-false-f.patch b/patches/removed/1.20/0880-Fix-EndDragonFight-killed-statuses-should-be-false-f.patch similarity index 98% rename from patches/unapplied/server/0880-Fix-EndDragonFight-killed-statuses-should-be-false-f.patch rename to patches/removed/1.20/0880-Fix-EndDragonFight-killed-statuses-should-be-false-f.patch index 7a4404512c..f4866400bc 100644 --- a/patches/unapplied/server/0880-Fix-EndDragonFight-killed-statuses-should-be-false-f.patch +++ b/patches/removed/1.20/0880-Fix-EndDragonFight-killed-statuses-should-be-false-f.patch @@ -4,6 +4,7 @@ Date: Fri, 16 Sep 2022 17:44:34 +0200 Subject: [PATCH] Fix: EndDragonFight killed statuses should be false for newly created worlds +Do we need this diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java index 230de1c71b0a6d6370df2fedb337cf0e332a7596..8cf4ae35eb66e69de32295d707db6845b4b02962 100644 diff --git a/patches/unapplied/server/0889-Set-position-before-player-sending-on-dimension-chan.patch b/patches/removed/1.20/0889-Set-position-before-player-sending-on-dimension-chan.patch similarity index 97% rename from patches/unapplied/server/0889-Set-position-before-player-sending-on-dimension-chan.patch rename to patches/removed/1.20/0889-Set-position-before-player-sending-on-dimension-chan.patch index 3c700c1411..4761614a2b 100644 --- a/patches/unapplied/server/0889-Set-position-before-player-sending-on-dimension-chan.patch +++ b/patches/removed/1.20/0889-Set-position-before-player-sending-on-dimension-chan.patch @@ -6,6 +6,8 @@ Subject: [PATCH] Set position before player sending on dimension change This causes a moment where the player entity is sent with the previous location, and the teleport packet which is sent shortly after is meant to correct that. +This was fixed in 1.19.4 iirc + diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java index b30972c3ab19795e26589cd0cdd54c43414fe368..c5dc769d13fbc2a88a731d42669d0906ee306e4b 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java diff --git a/patches/unapplied/server/0972-Fix-block-place-logic.patch b/patches/removed/1.20/0972-Fix-block-place-logic.patch similarity index 99% rename from patches/unapplied/server/0972-Fix-block-place-logic.patch rename to patches/removed/1.20/0972-Fix-block-place-logic.patch index 6d40e97afc..7b4537bb0a 100644 --- a/patches/unapplied/server/0972-Fix-block-place-logic.patch +++ b/patches/removed/1.20/0972-Fix-block-place-logic.patch @@ -3,6 +3,8 @@ From: Lulu13022002 <41980282+Lulu13022002@users.noreply.github.com> Date: Mon, 3 Apr 2023 18:46:49 +0200 Subject: [PATCH] Fix block place logic +TODO: what to do about dropped sign diff + diff --git a/src/main/java/net/minecraft/world/item/BlockItem.java b/src/main/java/net/minecraft/world/item/BlockItem.java index b0204af850ee182773ad458208cccd946ad148d5..ebee8de2ed831755b6fd154f6cc77ac993839bb9 100644 diff --git a/patches/unapplied/server/0975-Disable-allowListing-before-received-from-client.patch b/patches/removed/1.20/0975-Disable-allowListing-before-received-from-client.patch similarity index 100% rename from patches/unapplied/server/0975-Disable-allowListing-before-received-from-client.patch rename to patches/removed/1.20/0975-Disable-allowListing-before-received-from-client.patch diff --git a/patches/unapplied/server/0821-cache-resource-keys.patch b/patches/server/0800-cache-resource-keys.patch similarity index 96% rename from patches/unapplied/server/0821-cache-resource-keys.patch rename to patches/server/0800-cache-resource-keys.patch index c9b22e5902..18bd2f0eaf 100644 --- a/patches/unapplied/server/0821-cache-resource-keys.patch +++ b/patches/server/0800-cache-resource-keys.patch @@ -5,7 +5,7 @@ Subject: [PATCH] cache resource keys diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index e4f2e1371e481201e4d8b471a8f6f87ba0604028..e4e4a282a10bde462af1e60aa6be992c636b9726 100644 +index 84d1351c423965acf79c1413d00eff9eaa3927a2..e0c2ad107847227987080491e94b264930fc80e2 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -370,12 +370,13 @@ public class CraftBlock implements Block { diff --git a/patches/unapplied/server/0822-Allow-to-change-the-podium-for-the-EnderDragon.patch b/patches/server/0801-Allow-to-change-the-podium-for-the-EnderDragon.patch similarity index 67% rename from patches/unapplied/server/0822-Allow-to-change-the-podium-for-the-EnderDragon.patch rename to patches/server/0801-Allow-to-change-the-podium-for-the-EnderDragon.patch index b046117a30..89168564a0 100644 --- a/patches/unapplied/server/0822-Allow-to-change-the-podium-for-the-EnderDragon.patch +++ b/patches/server/0801-Allow-to-change-the-podium-for-the-EnderDragon.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Allow to change the podium for the EnderDragon diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java -index da1e60206f300d64f68f5aedeba52a164829676e..3f66986948d0b43a75454389b7ec8517e2d50899 100644 +index fada988941c33e09bce5e71bcb2bb733185f6c12..35681b380d22cb0ddeef2aec3553b9835c122aca 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java -@@ -100,6 +100,10 @@ public class EnderDragon extends Mob implements Enemy { - private final int[] nodeAdjacency = new int[24]; - private final BinaryHeap openSet = new BinaryHeap(); +@@ -101,6 +101,10 @@ public class EnderDragon extends Mob implements Enemy { + private final int[] nodeAdjacency; + private final BinaryHeap openSet; private final Explosion explosionSource; // CraftBukkit - reusable source for CraftTNTPrimed.getSource() + // Paper start - add var for save custom podium + @Nullable @@ -19,7 +19,7 @@ index da1e60206f300d64f68f5aedeba52a164829676e..3f66986948d0b43a75454389b7ec8517 public EnderDragon(EntityType entitytypes, Level world) { super(EntityType.ENDER_DRAGON, world); -@@ -121,6 +125,19 @@ public class EnderDragon extends Mob implements Enemy { +@@ -141,6 +145,19 @@ public class EnderDragon extends Mob implements Enemy { return Mob.createMobAttributes().add(Attributes.MAX_HEALTH, 200.0D); } @@ -39,86 +39,86 @@ index da1e60206f300d64f68f5aedeba52a164829676e..3f66986948d0b43a75454389b7ec8517 @Override public boolean isFlapping() { float f = Mth.cos(this.flapTime * 6.2831855F); -@@ -969,7 +986,7 @@ public class EnderDragon extends Mob implements Enemy { +@@ -1002,7 +1019,7 @@ public class EnderDragon extends Mob implements Enemy { d0 = segment2[1] - segment1[1]; } } else { -- BlockPos blockposition = this.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.END_PODIUM_LOCATION); -+ BlockPos blockposition = this.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.getPodium()); // Paper - use custom podium +- BlockPos blockposition = this.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.fightOrigin)); ++ BlockPos blockposition = this.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.getPodium()); // Paper - use custom podium double d1 = Math.max(Math.sqrt(blockposition.distToCenterSqr(this.position())) / 4.0D, 1.0D); d0 = (double) segmentOffset / d1; -@@ -996,7 +1013,7 @@ public class EnderDragon extends Mob implements Enemy { +@@ -1029,7 +1046,7 @@ public class EnderDragon extends Mob implements Enemy { vec3d = this.getViewVector(tickDelta); } } else { -- BlockPos blockposition = this.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.END_PODIUM_LOCATION); -+ BlockPos blockposition = this.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.getPodium()); // Paper - use custom podium +- BlockPos blockposition = this.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.fightOrigin)); ++ BlockPos blockposition = this.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.getPodium()); // Paper - use custom podium f1 = Math.max((float) Math.sqrt(blockposition.distToCenterSqr(this.position())) / 4.0F, 1.0F); float f3 = 6.0F / f1; diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonDeathPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonDeathPhase.java -index a64ee433e34538ce2b52207b6183999ae611e5dd..0f78e1ab090bb1df7b863c90b3c7465a3ce28c8c 100644 +index f4028b6890fd094360a33403728588380111204d..0fddefff4a6ab46920fbc6f86c17c6c51027dc02 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonDeathPhase.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonDeathPhase.java @@ -32,7 +32,7 @@ public class DragonDeathPhase extends AbstractDragonPhaseInstance { public void doServerTick() { ++this.time; if (this.targetLocation == null) { -- BlockPos blockPos = this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, EndPodiumFeature.END_PODIUM_LOCATION); -+ BlockPos blockPos = this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, this.dragon.getPodium()); // Paper - use custom podium +- BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, EndPodiumFeature.getLocation(this.dragon.getFightOrigin())); ++ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING, this.dragon.getPodium()); // Paper - use custom podium this.targetLocation = Vec3.atBottomCenterOf(blockPos); } diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java -index adec9aec93d545941a3d592b54c5fe064cdb1437..77206aba171d063691b8f32afcebd570784d7da2 100644 +index 00228e49c07eeed13b726192d5f9b8f2fc55bb75..b8c928b8fd30ebe923785d7b03b2cab3b44e488f 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonHoldingPatternPhase.java @@ -54,7 +54,7 @@ public class DragonHoldingPatternPhase extends AbstractDragonPhaseInstance { private void findNewTarget() { if (this.currentPath != null && this.currentPath.isDone()) { -- BlockPos blockPos = this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, new BlockPos(EndPodiumFeature.END_PODIUM_LOCATION)); -+ BlockPos blockPos = this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - use custom podium +- BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, new BlockPos(EndPodiumFeature.getLocation(this.dragon.getFightOrigin()))); ++ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - use custom podium int i = this.dragon.getDragonFight() == null ? 0 : this.dragon.getDragonFight().getCrystalsAlive(); if (this.dragon.getRandom().nextInt(i + 3) == 0) { this.dragon.getPhaseManager().setPhase(EnderDragonPhase.LANDING_APPROACH); diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingApproachPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingApproachPhase.java -index fdfdd42a30d752b11d18f2cefe84c1e9ddec41a2..5fca7c4e1d1d9da6f29ad70f1b5703c7f092d851 100644 +index 80647b1f5192e6f2b660a31413db1fa45fb92f2c..a9f184cbed518561b1534f4fe9bc731a134d9152 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingApproachPhase.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingApproachPhase.java @@ -52,7 +52,7 @@ public class DragonLandingApproachPhase extends AbstractDragonPhaseInstance { private void findNewTarget() { if (this.currentPath == null || this.currentPath.isDone()) { int i = this.dragon.findClosestNode(); -- BlockPos blockPos = this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.END_PODIUM_LOCATION); -+ BlockPos blockPos = this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - use custom podium - Player player = this.dragon.level.getNearestPlayer(NEAR_EGG_TARGETING, this.dragon, (double)blockPos.getX(), (double)blockPos.getY(), (double)blockPos.getZ()); +- BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.dragon.getFightOrigin())); ++ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - use custom podium + Player player = this.dragon.level().getNearestPlayer(NEAR_EGG_TARGETING, this.dragon, (double)blockPos.getX(), (double)blockPos.getY(), (double)blockPos.getZ()); int j; if (player != null) { diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java -index ed29ba6c5c4f1380847564f07b5523cce77ab865..2948d58f9f90b353b86eb43f932ab0574b3415f7 100644 +index 48ebc2ab8ebbdc2292af10b955384bf7d722ade2..c1c71ff254ecb4a0cef3b8d7cc12f6cb34cad6d7 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonLandingPhase.java @@ -39,7 +39,7 @@ public class DragonLandingPhase extends AbstractDragonPhaseInstance { @Override public void doServerTick() { if (this.targetLocation == null) { -- this.targetLocation = Vec3.atBottomCenterOf(this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.END_PODIUM_LOCATION)); -+ this.targetLocation = Vec3.atBottomCenterOf(this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium())); // Paper - use custom podium +- this.targetLocation = Vec3.atBottomCenterOf(this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.dragon.getFightOrigin()))); ++ this.targetLocation = Vec3.atBottomCenterOf(this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium())); // Paper - use custom podium } if (this.targetLocation.distanceToSqr(this.dragon.getX(), this.dragon.getY(), this.dragon.getZ()) < 1.0D) { diff --git a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonTakeoffPhase.java b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonTakeoffPhase.java -index 0ae65d0fa03d12486f48b0274b6e2d4eea169caf..ffe89d8c1f22f672d145fedb3bb102589dc31656 100644 +index 1290090f855840bf64bf3a7ba93e3cb036630dcc..98fb6422df0ceadff5aaf4b2965eb1b095a3370b 100644 --- a/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonTakeoffPhase.java +++ b/src/main/java/net/minecraft/world/entity/boss/enderdragon/phases/DragonTakeoffPhase.java @@ -24,7 +24,7 @@ public class DragonTakeoffPhase extends AbstractDragonPhaseInstance { @Override public void doServerTick() { if (!this.firstTick && this.currentPath != null) { -- BlockPos blockPos = this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.END_PODIUM_LOCATION); -+ BlockPos blockPos = this.dragon.level.getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - use custom podium +- BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, EndPodiumFeature.getLocation(this.dragon.getFightOrigin())); ++ BlockPos blockPos = this.dragon.level().getHeightmapPos(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES, this.dragon.getPodium()); // Paper - use custom podium if (!blockPos.closerToCenterThan(this.dragon.position(), 10.0D)) { this.dragon.getPhaseManager().setPhase(EnderDragonPhase.HOLDING_PATTERN); } diff --git a/patches/unapplied/server/0823-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch b/patches/server/0802-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch similarity index 91% rename from patches/unapplied/server/0823-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch rename to patches/server/0802-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch index 989e0ce392..5fb11187b2 100644 --- a/patches/unapplied/server/0823-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch +++ b/patches/server/0802-Fix-NBT-pieces-overriding-a-block-entity-during-worl.patch @@ -9,10 +9,10 @@ is not a WorldGenRegion, we can bypass the deadlock entirely. See https://bugs.mojang.com/browse/MC-246262 diff --git a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java -index 53ef0991be65d18c3f80030992726b462a7bd8a8..2e1e6ed5345ba4cb44f4b4a9b1d53398d69607e2 100644 +index 020e436f77f9f2de631727c00ccd41e9293b1f47..25872fc1e827ee1f736c121282585cacec532fb8 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java +++ b/src/main/java/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java -@@ -265,7 +265,11 @@ public class StructureTemplate { +@@ -266,7 +266,11 @@ public class StructureTemplate { if (definedstructure_blockinfo.nbt != null) { tileentity = world.getBlockEntity(blockposition2); @@ -25,7 +25,7 @@ index 53ef0991be65d18c3f80030992726b462a7bd8a8..2e1e6ed5345ba4cb44f4b4a9b1d53398 world.setBlock(blockposition2, Blocks.BARRIER.defaultBlockState(), 20); } -@@ -380,7 +384,11 @@ public class StructureTemplate { +@@ -379,7 +383,11 @@ public class StructureTemplate { if (pair1.getSecond() != null) { tileentity = world.getBlockEntity(blockposition6); if (tileentity != null) { diff --git a/patches/unapplied/server/0824-Fix-StructureGrowEvent-species-for-RED_MUSHROOM.patch b/patches/server/0803-Fix-StructureGrowEvent-species-for-RED_MUSHROOM.patch similarity index 100% rename from patches/unapplied/server/0824-Fix-StructureGrowEvent-species-for-RED_MUSHROOM.patch rename to patches/server/0803-Fix-StructureGrowEvent-species-for-RED_MUSHROOM.patch diff --git a/patches/unapplied/server/0825-Prevent-tile-entity-copies-loading-chunks.patch b/patches/server/0804-Prevent-tile-entity-copies-loading-chunks.patch similarity index 78% rename from patches/unapplied/server/0825-Prevent-tile-entity-copies-loading-chunks.patch rename to patches/server/0804-Prevent-tile-entity-copies-loading-chunks.patch index 80458627bf..eab8144f86 100644 --- a/patches/unapplied/server/0825-Prevent-tile-entity-copies-loading-chunks.patch +++ b/patches/server/0804-Prevent-tile-entity-copies-loading-chunks.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Prevent tile entity copies loading chunks diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 2339f46f6a3d5c50179c78515d2bafba588f3aa0..0150f1935bfc7b97f72683699dc265ac8508a8fb 100644 +index 912c831ca4c52810ff16d4c8f4659d71347ddfa5..12f6305e15a4339d581c502586cd1ddfdd80c7c5 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3309,7 +3309,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3307,7 +3307,12 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic BlockPos blockposition = BlockEntity.getPosFromTag(nbttagcompound); - if (this.player.level.isLoaded(blockposition)) { -- BlockEntity tileentity = this.player.level.getBlockEntity(blockposition); + if (this.player.level().isLoaded(blockposition)) { +- BlockEntity tileentity = this.player.level().getBlockEntity(blockposition); + // Paper start + BlockEntity tileentity = null; + if (this.player.distanceToSqr(blockposition.getX(), blockposition.getY(), blockposition.getZ()) < 32 * 32 && this.player.getLevel().isLoadedAndInBounds(blockposition)) { diff --git a/patches/unapplied/server/0826-Use-username-instead-of-display-name-in-PlayerList-g.patch b/patches/server/0805-Use-username-instead-of-display-name-in-PlayerList-g.patch similarity index 87% rename from patches/unapplied/server/0826-Use-username-instead-of-display-name-in-PlayerList-g.patch rename to patches/server/0805-Use-username-instead-of-display-name-in-PlayerList-g.patch index 72ef000460..4f1fbc4dbd 100644 --- a/patches/unapplied/server/0826-Use-username-instead-of-display-name-in-PlayerList-g.patch +++ b/patches/server/0805-Use-username-instead-of-display-name-in-PlayerList-g.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Use username instead of display name in diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index e64f806326a5400eab14e6ebe59901aa1ebea110..168c53eee5bbf84c11a0b0f654e4540e4d082c2a 100644 +index 833cd284175ed3a874f82b03698dcfd5c0a62ac1..f937dbd6a19b595e3660e598e52bf37f8cc72d13 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -1423,7 +1423,7 @@ public abstract class PlayerList { +@@ -1430,7 +1430,7 @@ public abstract class PlayerList { // CraftBukkit start public ServerStatsCounter getPlayerStats(ServerPlayer entityhuman) { ServerStatsCounter serverstatisticmanager = entityhuman.getStats(); diff --git a/patches/unapplied/server/0827-Fix-slime-spawners-not-spawning-outside-slime-chunks.patch b/patches/server/0806-Fix-slime-spawners-not-spawning-outside-slime-chunks.patch similarity index 93% rename from patches/unapplied/server/0827-Fix-slime-spawners-not-spawning-outside-slime-chunks.patch rename to patches/server/0806-Fix-slime-spawners-not-spawning-outside-slime-chunks.patch index 46478d6f76..e809e65ba8 100644 --- a/patches/unapplied/server/0827-Fix-slime-spawners-not-spawning-outside-slime-chunks.patch +++ b/patches/server/0806-Fix-slime-spawners-not-spawning-outside-slime-chunks.patch @@ -7,7 +7,7 @@ Fixes MC-50647 by just checking if the spawn type is a SPAWNER and then bypassing the spawn check logic if on slimes if it is. diff --git a/src/main/java/net/minecraft/world/entity/monster/Slime.java b/src/main/java/net/minecraft/world/entity/monster/Slime.java -index 3f367fb0b2f633024d27dc598738d6651a36f21b..c41c1c2712920c6b7d822cd0f37a5d8d725e4054 100644 +index 5aa702d68096af180340feb65a07856301b4f258..343433158507451152e5b2fc5e5fd0b0e6b229db 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Slime.java +++ b/src/main/java/net/minecraft/world/entity/monster/Slime.java @@ -322,6 +322,11 @@ public class Slime extends Mob implements Enemy { diff --git a/patches/unapplied/server/0828-Pass-ServerLevel-for-gamerule-callbacks.patch b/patches/server/0807-Pass-ServerLevel-for-gamerule-callbacks.patch similarity index 92% rename from patches/unapplied/server/0828-Pass-ServerLevel-for-gamerule-callbacks.patch rename to patches/server/0807-Pass-ServerLevel-for-gamerule-callbacks.patch index 062de97dd5..a9dbe04353 100644 --- a/patches/unapplied/server/0828-Pass-ServerLevel-for-gamerule-callbacks.patch +++ b/patches/server/0807-Pass-ServerLevel-for-gamerule-callbacks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Pass ServerLevel for gamerule callbacks diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index 5b46cabf4f2e2a1f7feaad378dd98d64aeef8671..51b3db0b6c2cede95b584268e035c0fb36d38094 100644 +index 9951e999b1440ef623f14bdd46b5e42a90387f1e..91e6161449dc5625331e467d9e8375759686709e 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java @@ -304,7 +304,7 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -18,15 +18,15 @@ index 5b46cabf4f2e2a1f7feaad378dd98d64aeef8671..51b3db0b6c2cede95b584268e035c0fb if (dedicatedserverproperties.enableQuery) { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 0150f1935bfc7b97f72683699dc265ac8508a8fb..aed804e2d146f608587efa31deefe65f84241bbe 100644 +index 12f6305e15a4339d581c502586cd1ddfdd80c7c5..4be069e435b63ad2ae4627235977915f7a5ca463 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2900,7 +2900,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2897,7 +2897,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.player = this.server.getPlayerList().respawn(this.player, false, RespawnReason.DEATH); if (this.server.isHardcore()) { this.player.setGameMode(GameType.SPECTATOR, org.bukkit.event.player.PlayerGameModeChangeEvent.Cause.HARDCORE_DEATH, null); // Paper -- ((GameRules.BooleanValue) this.player.getLevel().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.server); -+ ((GameRules.BooleanValue) this.player.getLevel().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.player.getLevel()); // Paper +- ((GameRules.BooleanValue) this.player.level().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.server); ++ ((GameRules.BooleanValue) this.player.level().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.player.getLevel()); // Paper } } break; @@ -158,10 +158,10 @@ index de713f1ca1d61a6b1fca2b66de9162556d102449..edd2c9d0cf5a81c779011cb4215d496a this.onChanged(server); } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -index 9a0542c06ae30361ac6139bdf02d0464c8a53e7b..c13e5b79c0599a9809b6150cfe660fb11bd44cea 100644 +index 9cb7163a5a59c804de5ac4e9003f401ef058c86a..1ef6091e9e5b204a714d53a98c1e05bee5569e5c 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java -@@ -1945,7 +1945,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1940,7 +1940,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { // Paper end GameRules.Value handle = this.getHandle().getGameRules().getRule(CraftWorld.getGameRulesNMS().get(rule)); handle.deserialize(event.getValue()); // Paper @@ -170,7 +170,7 @@ index 9a0542c06ae30361ac6139bdf02d0464c8a53e7b..c13e5b79c0599a9809b6150cfe660fb1 return true; } -@@ -1985,7 +1985,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -1980,7 +1980,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { // Paper end GameRules.Value handle = this.getHandle().getGameRules().getRule(CraftWorld.getGameRulesNMS().get(rule.getName())); handle.deserialize(event.getValue()); // Paper diff --git a/patches/unapplied/server/0829-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch b/patches/server/0808-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch similarity index 89% rename from patches/unapplied/server/0829-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch rename to patches/server/0808-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch index ed94088018..995f125894 100644 --- a/patches/unapplied/server/0829-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch +++ b/patches/server/0808-Add-pre-unbreaking-amount-to-PlayerItemDamageEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add pre-unbreaking amount to PlayerItemDamageEvent diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 8778b35890b36ff4c13704968f73934e53d7bd6b..ce51f1768275fab434d46b5aa349dfdd2b631977 100644 +index 3bd5338e66ee52d2ba5b89d050dd996dfc82ba7e..7c1f33082f84049544f958bfaa6552012b8cacd7 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -599,10 +599,11 @@ public final class ItemStack { +@@ -607,10 +607,11 @@ public final class ItemStack { } } diff --git a/patches/unapplied/server/0830-WorldCreator-keepSpawnLoaded.patch b/patches/server/0809-WorldCreator-keepSpawnLoaded.patch similarity index 91% rename from patches/unapplied/server/0830-WorldCreator-keepSpawnLoaded.patch rename to patches/server/0809-WorldCreator-keepSpawnLoaded.patch index 729d58a6b0..8c016a67b6 100644 --- a/patches/unapplied/server/0830-WorldCreator-keepSpawnLoaded.patch +++ b/patches/server/0809-WorldCreator-keepSpawnLoaded.patch @@ -5,7 +5,7 @@ Subject: [PATCH] WorldCreator#keepSpawnLoaded diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 2af02829a4b0096c2ef8b7b54a5dd9c37ad0f9a2..cc74d84ba7053163e4910ccac4b6763afa18c218 100644 +index c020acc1bcfe3471728c143862625463d7c82dd8..cabb66678afdad83341dd3b1a662cadeef4a4196 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -1272,6 +1272,7 @@ public final class CraftServer implements Server { diff --git a/patches/unapplied/server/0831-Fix-NPE-for-BlockDataMeta-getBlockData.patch b/patches/server/0810-Fix-NPE-for-BlockDataMeta-getBlockData.patch similarity index 100% rename from patches/unapplied/server/0831-Fix-NPE-for-BlockDataMeta-getBlockData.patch rename to patches/server/0810-Fix-NPE-for-BlockDataMeta-getBlockData.patch diff --git a/patches/unapplied/server/0832-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch b/patches/server/0811-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch similarity index 90% rename from patches/unapplied/server/0832-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch rename to patches/server/0811-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch index fe4c9bae8c..b23da16299 100644 --- a/patches/unapplied/server/0832-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch +++ b/patches/server/0811-Trigger-bee_nest_destroyed-trigger-in-the-correct-pl.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Trigger bee_nest_destroyed trigger in the correct place diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index 5461e6ff769be93054b3d8369a7aa286d1244875..161a810a8c4bd4c916c54df49c44c504130cb28e 100644 +index 34def52e9380a4587c5008f1d133a07e72621f56..0f0cf4fdfcbf8537696f15f98f3fb7e68baeb27c 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -@@ -427,12 +427,16 @@ public class ServerPlayerGameMode { +@@ -426,12 +426,16 @@ public class ServerPlayerGameMode { block.destroy(this.level, pos, iblockdata); } @@ -25,7 +25,7 @@ index 5461e6ff769be93054b3d8369a7aa286d1244875..161a810a8c4bd4c916c54df49c44c504 itemstack.mineBlock(this.level, iblockdata, pos, this.player); if (flag && flag1 && event.isDropItems()) { // CraftBukkit - Check if block should drop items -@@ -453,6 +457,13 @@ public class ServerPlayerGameMode { +@@ -452,6 +456,13 @@ public class ServerPlayerGameMode { if (flag && event != null) { iblockdata.getBlock().popExperience(this.level, pos, event.getExpToDrop(), this.player); // Paper } @@ -40,7 +40,7 @@ index 5461e6ff769be93054b3d8369a7aa286d1244875..161a810a8c4bd4c916c54df49c44c504 return true; // CraftBukkit end diff --git a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java -index bd58ae8bb1fcafa2c618f2b0b7825731188a3d65..ca6cf92b96d68ba8b34e90edda2a93e11214c91b 100644 +index 26f928ad94aed7f1078a31d8a0af2dc377a48d0f..01c8394c6e6b65f40db04280458d0191c116b845 100644 --- a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java @@ -88,7 +88,7 @@ public class BeehiveBlock extends BaseEntityBlock { diff --git a/patches/unapplied/server/0833-Add-EntityDyeEvent-and-CollarColorable-interface.patch b/patches/server/0812-Add-EntityDyeEvent-and-CollarColorable-interface.patch similarity index 59% rename from patches/unapplied/server/0833-Add-EntityDyeEvent-and-CollarColorable-interface.patch rename to patches/server/0812-Add-EntityDyeEvent-and-CollarColorable-interface.patch index ed62b6e307..83deaddd5f 100644 --- a/patches/unapplied/server/0833-Add-EntityDyeEvent-and-CollarColorable-interface.patch +++ b/patches/server/0812-Add-EntityDyeEvent-and-CollarColorable-interface.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityDyeEvent and CollarColorable interface diff --git a/src/main/java/net/minecraft/world/entity/animal/Cat.java b/src/main/java/net/minecraft/world/entity/animal/Cat.java -index 9bcc1f4b60eebe77ffc2afaabd46629cb37cc8a0..51ca7668ebc0edf4254b7511bb0df0c2197bf859 100644 +index 770b15f5413eb38890587aa6af2a56f15bf5934f..438d7c26cc3a4a3b5a1affffbbe26e4d272b0c00 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Cat.java +++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java @@ -401,6 +401,13 @@ public class Cat extends TamableAnimal implements VariantHolder { @@ -23,20 +23,21 @@ index 9bcc1f4b60eebe77ffc2afaabd46629cb37cc8a0..51ca7668ebc0edf4254b7511bb0df0c2 if (!player.getAbilities().instabuild) { itemstack.shrink(1); diff --git a/src/main/java/net/minecraft/world/entity/animal/Wolf.java b/src/main/java/net/minecraft/world/entity/animal/Wolf.java -index b6c4f67c870831b8667c88f0c523714b5fdadad2..612601b2536dc522356d4dd2c2ea1192f6435f72 100644 +index 948978306db3bffd07d0c5d91cd4853102411061..27c4dd3605373f08078048fe923a8f6f4d3ccf3b 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Wolf.java +++ b/src/main/java/net/minecraft/world/entity/animal/Wolf.java -@@ -392,6 +392,13 @@ public class Wolf extends TamableAnimal implements NeutralMob { - DyeColor enumcolor = ((DyeItem) item).getDyeColor(); +@@ -380,6 +380,14 @@ public class Wolf extends TamableAnimal implements NeutralMob { + DyeColor enumcolor = itemdye.getDyeColor(); - if (enumcolor != this.getCollarColor()) { -+ // Paper start -+ final io.papermc.paper.event.entity.EntityDyeEvent event = new io.papermc.paper.event.entity.EntityDyeEvent(this.getBukkitEntity(), org.bukkit.DyeColor.getByWoolData((byte) enumcolor.getId()), ((net.minecraft.server.level.ServerPlayer) player).getBukkitEntity()); -+ if (!event.callEvent()) { -+ return InteractionResult.FAIL; -+ } -+ enumcolor = DyeColor.byId(event.getColor().getWoolData()); -+ // Paper end - this.setCollarColor(enumcolor); - if (!player.getAbilities().instabuild) { - itemstack.shrink(1); + if (enumcolor != this.getCollarColor()) { ++ // Paper start ++ final io.papermc.paper.event.entity.EntityDyeEvent event = new io.papermc.paper.event.entity.EntityDyeEvent(this.getBukkitEntity(), org.bukkit.DyeColor.getByWoolData((byte) enumcolor.getId()), ((net.minecraft.server.level.ServerPlayer) player).getBukkitEntity()); ++ if (!event.callEvent()) { ++ return InteractionResult.FAIL; ++ } ++ enumcolor = DyeColor.byId(event.getColor().getWoolData()); ++ // Paper end ++ + this.setCollarColor(enumcolor); + if (!player.getAbilities().instabuild) { + itemstack.shrink(1); diff --git a/patches/unapplied/server/0834-Fire-CauldronLevelChange-on-initial-fill.patch b/patches/server/0813-Fire-CauldronLevelChange-on-initial-fill.patch similarity index 100% rename from patches/unapplied/server/0834-Fire-CauldronLevelChange-on-initial-fill.patch rename to patches/server/0813-Fire-CauldronLevelChange-on-initial-fill.patch diff --git a/patches/unapplied/server/0835-fix-powder-snow-cauldrons-not-turning-to-water.patch b/patches/server/0814-fix-powder-snow-cauldrons-not-turning-to-water.patch similarity index 100% rename from patches/unapplied/server/0835-fix-powder-snow-cauldrons-not-turning-to-water.patch rename to patches/server/0814-fix-powder-snow-cauldrons-not-turning-to-water.patch diff --git a/patches/unapplied/server/0836-Add-PlayerStopUsingItemEvent.patch b/patches/server/0815-Add-PlayerStopUsingItemEvent.patch similarity index 77% rename from patches/unapplied/server/0836-Add-PlayerStopUsingItemEvent.patch rename to patches/server/0815-Add-PlayerStopUsingItemEvent.patch index 2b87b8fe29..c3a25d6c76 100644 --- a/patches/unapplied/server/0836-Add-PlayerStopUsingItemEvent.patch +++ b/patches/server/0815-Add-PlayerStopUsingItemEvent.patch @@ -5,14 +5,14 @@ Subject: [PATCH] Add PlayerStopUsingItemEvent diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index b30e52730a7dec78e425365975ba57aa4f371cfd..34ef66a6f0cfb2bb1435c7342b6261d31dd011ef 100644 +index c629e03d5281e566050ca22d2c3a16626f7a57cc..9ee16dc1f425e4f0795eec3dcc18affc70e85a31 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3934,6 +3934,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3967,6 +3967,7 @@ public abstract class LivingEntity extends Entity implements Attackable { public void releaseUsingItem() { if (!this.useItem.isEmpty()) { + if (this instanceof ServerPlayer) new io.papermc.paper.event.player.PlayerStopUsingItemEvent((Player) getBukkitEntity(), useItem.asBukkitMirror(), getTicksUsingItem()).callEvent(); // Paper - this.useItem.releaseUsing(this.level, this, this.getUseItemRemainingTicks()); + this.useItem.releaseUsing(this.level(), this, this.getUseItemRemainingTicks()); if (this.useItem.useOnRelease()) { this.updatingUsingItem(); diff --git a/patches/unapplied/server/0837-FallingBlock-auto-expire-setting.patch b/patches/server/0816-FallingBlock-auto-expire-setting.patch similarity index 61% rename from patches/unapplied/server/0837-FallingBlock-auto-expire-setting.patch rename to patches/server/0816-FallingBlock-auto-expire-setting.patch index 2f60231560..ed07517265 100644 --- a/patches/unapplied/server/0837-FallingBlock-auto-expire-setting.patch +++ b/patches/server/0816-FallingBlock-auto-expire-setting.patch @@ -5,7 +5,7 @@ Subject: [PATCH] FallingBlock auto expire setting diff --git a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java -index 02ea0298c6dc6ed3d4350e562c255e748ca141ae..536856300da929c101f50da5827677bada5feb50 100644 +index 4a44109df0aece6661567dac5ebf6355de5d58c7..eff81e846f696349b3bd3d26c02442f157b169f0 100644 --- a/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/FallingBlockEntity.java @@ -64,6 +64,7 @@ public class FallingBlockEntity extends Entity { @@ -19,38 +19,39 @@ index 02ea0298c6dc6ed3d4350e562c255e748ca141ae..536856300da929c101f50da5827677ba @@ -178,7 +179,7 @@ public class FallingBlockEntity extends Entity { } - if (!this.onGround && !flag1) { -- if (!this.level.isClientSide && (this.time > 100 && (blockposition.getY() <= this.level.getMinBuildHeight() || blockposition.getY() > this.level.getMaxBuildHeight()) || this.time > 600)) { -+ if (!this.level.isClientSide && ((this.time > 100 && autoExpire) && (blockposition.getY() <= this.level.getMinBuildHeight() || blockposition.getY() > this.level.getMaxBuildHeight()) || (this.time > 600 && autoExpire))) { // Paper - Auto expire setting - if (this.dropItem && this.level.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) { + if (!this.onGround() && !flag1) { +- if (!this.level().isClientSide && (this.time > 100 && (blockposition.getY() <= this.level().getMinBuildHeight() || blockposition.getY() > this.level().getMaxBuildHeight()) || this.time > 600)) { ++ if (!this.level().isClientSide && ((this.time > 100 && autoExpire) && (blockposition.getY() <= this.level().getMinBuildHeight() || blockposition.getY() > this.level().getMaxBuildHeight()) || (this.time > 600 && autoExpire))) { // Paper - Auto expire setting + if (this.dropItem && this.level().getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) { this.spawnAtLocation((ItemLike) block); } -@@ -324,6 +325,7 @@ public class FallingBlockEntity extends Entity { - if (this.blockData != null) { - nbt.put("TileEntityData", this.blockData); +@@ -326,6 +327,7 @@ public class FallingBlockEntity extends Entity { } -+ if (!autoExpire) {nbt.putBoolean("Paper.AutoExpire", false);} // Paper - AutoExpire setting + nbt.putBoolean("CancelDrop", this.cancelDrop); ++ if (!autoExpire) {nbt.putBoolean("Paper.AutoExpire", false);} // Paper - AutoExpire setting } -@@ -358,6 +360,10 @@ public class FallingBlockEntity extends Entity { - int srcZ = nbt.getInt("SourceLoc_z"); + @Override +@@ -361,6 +363,11 @@ public class FallingBlockEntity extends Entity { this.setOrigin(new org.bukkit.Location(this.level().getWorld(), srcX, srcY, srcZ)); } -+ -+ if (nbt.contains("Paper.AutoExpire")) { -+ this.autoExpire = nbt.getBoolean("Paper.AutoExpire"); -+ } // Paper end ++ // Paper start ++ if (nbt.contains("Paper.AutoExpire")) { ++ this.autoExpire = nbt.getBoolean("Paper.AutoExpire"); ++ } ++ // Paper end } + public void setHurtsEntities(float fallHurtAmount, int fallHurtMax) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java -index 4a4fe85abb4ddd62e04f348e5be8b98ca4d4fbdc..05778023c3b2809c52c148efdfc8677dcc087a7b 100644 +index 4a4fe85abb4ddd62e04f348e5be8b98ca4d4fbdc..e99314b905a7ed54ceeb156ed92ff1a5793df99a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java -@@ -59,6 +59,17 @@ public class CraftFallingBlock extends CraftEntity implements FallingBlock { - public void setHurtEntities(boolean hurtEntities) { - this.getHandle().hurtEntities = hurtEntities; +@@ -97,4 +97,15 @@ public class CraftFallingBlock extends CraftEntity implements FallingBlock { + this.setHurtEntities(true); + } } + // Paper Start - Auto expire setting + @Override @@ -63,6 +64,4 @@ index 4a4fe85abb4ddd62e04f348e5be8b98ca4d4fbdc..05778023c3b2809c52c148efdfc8677d + this.getHandle().autoExpire = autoExpires; + } + // Paper End - Auto expire setting - - @Override - public void setTicksLived(int value) { + } diff --git a/patches/unapplied/server/0838-Don-t-tick-markers.patch b/patches/server/0817-Don-t-tick-markers.patch similarity index 92% rename from patches/unapplied/server/0838-Don-t-tick-markers.patch rename to patches/server/0817-Don-t-tick-markers.patch index b485fadd53..a9efa9917b 100644 --- a/patches/unapplied/server/0838-Don-t-tick-markers.patch +++ b/patches/server/0817-Don-t-tick-markers.patch @@ -23,10 +23,10 @@ index ff99336e0b8131ae161cfa5c4fc83c6905e3dbc8..5f43aedc6596e2b1ac7af97115157147 } }); diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 66b1ef69fe48340b5ccebd845b39f898515ff117..5180516d53030602c4516248703144b3f4047614 100644 +index b89544fdfceee67fb452c37294131efca007e2fe..2737bd5f1915466a73dd4e093e35301c4353ddea 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2497,6 +2497,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2566,6 +2566,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } public void onTickingStart(Entity entity) { @@ -35,7 +35,7 @@ index 66b1ef69fe48340b5ccebd845b39f898515ff117..5180516d53030602c4516248703144b3 } diff --git a/src/main/java/org/spigotmc/ActivationRange.java b/src/main/java/org/spigotmc/ActivationRange.java -index f158fc8a151272428a33dc5f6e1742876edc80d5..52780192d6417f8085566e4cdf3a895a83638520 100644 +index d0092fa0595bcf3876dec4ef58516089ac99bb26..d4da9ec6e00bb92b70598ee9a0d0ca5816562378 100644 --- a/src/main/java/org/spigotmc/ActivationRange.java +++ b/src/main/java/org/spigotmc/ActivationRange.java @@ -212,7 +212,8 @@ public class ActivationRange diff --git a/patches/unapplied/server/0839-Do-not-accept-invalid-client-settings.patch b/patches/server/0818-Do-not-accept-invalid-client-settings.patch similarity index 86% rename from patches/unapplied/server/0839-Do-not-accept-invalid-client-settings.patch rename to patches/server/0818-Do-not-accept-invalid-client-settings.patch index 92e9dc90a5..4f328fa013 100644 --- a/patches/unapplied/server/0839-Do-not-accept-invalid-client-settings.patch +++ b/patches/server/0818-Do-not-accept-invalid-client-settings.patch @@ -5,13 +5,13 @@ Subject: [PATCH] Do not accept invalid client settings diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index aed804e2d146f608587efa31deefe65f84241bbe..37ad18b6d2a1c537b1cb3d622b6bae2f8100445c 100644 +index 4be069e435b63ad2ae4627235977915f7a5ca463..d73563cf84a4d6d7a369dde56b670b9010edfac2 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3488,6 +3488,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3449,6 +3449,13 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @Override public void handleClientInformation(ServerboundClientInformationPacket packet) { - PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); + PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); + // Paper start - do not accept invalid information + if (packet.viewDistance() < 0) { + LOGGER.warn("Disconnecting " + this.player.getScoreboardName() + " for invalid view distance: " + packet.viewDistance()); diff --git a/patches/unapplied/server/0840-Add-support-for-Proxy-Protocol.patch b/patches/server/0819-Add-support-for-Proxy-Protocol.patch similarity index 92% rename from patches/unapplied/server/0840-Add-support-for-Proxy-Protocol.patch rename to patches/server/0819-Add-support-for-Proxy-Protocol.patch index f03e3af0c7..a99dc9a0d5 100644 --- a/patches/unapplied/server/0840-Add-support-for-Proxy-Protocol.patch +++ b/patches/server/0819-Add-support-for-Proxy-Protocol.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add support for Proxy Protocol diff --git a/build.gradle.kts b/build.gradle.kts -index 1cd32d28475b3130b02ad39b9f53aa7074792556..9cf389defdaeb887e9cad4f0fed3f3b95667b238 100644 +index e1e8f7c42f5e68da25b11c4cfadd67425395e558..7a17e05b630517a6861c34a4561198db62acf82a 100644 --- a/build.gradle.kts +++ b/build.gradle.kts @@ -20,6 +20,7 @@ dependencies { @@ -17,10 +17,10 @@ index 1cd32d28475b3130b02ad39b9f53aa7074792556..9cf389defdaeb887e9cad4f0fed3f3b9 implementation("org.apache.logging.log4j:log4j-iostreams:2.19.0") // Paper - remove exclusion implementation("org.ow2.asm:asm:9.4") diff --git a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java -index 2beddfc0532c3835d50724551e3d46cb0d7d2290..44d99e89226adb6234b9405f25ac9dab9bd84297 100644 +index 17f42a4097d9c91bae2ccb02365498a0f7c7f8f8..0f578e870f2bed207a8650a31e89b3672ae8a57b 100644 --- a/src/main/java/net/minecraft/server/network/ServerConnectionListener.java +++ b/src/main/java/net/minecraft/server/network/ServerConnectionListener.java -@@ -108,6 +108,12 @@ public class ServerConnectionListener { +@@ -106,6 +106,12 @@ public class ServerConnectionListener { ServerConnectionListener.LOGGER.info("Paper: Using " + com.velocitypowered.natives.util.Natives.cipher.getLoadedVariant() + " cipher from Velocity."); // Paper end @@ -33,7 +33,7 @@ index 2beddfc0532c3835d50724551e3d46cb0d7d2290..44d99e89226adb6234b9405f25ac9dab this.channels.add(((ServerBootstrap) ((ServerBootstrap) (new ServerBootstrap()).channel(oclass)).childHandler(new ChannelInitializer() { protected void initChannel(Channel channel) { try { -@@ -123,6 +129,30 @@ public class ServerConnectionListener { +@@ -120,6 +126,30 @@ public class ServerConnectionListener { int j = ServerConnectionListener.this.server.getRateLimitPacketsPerSecond(); Connection object = j > 0 ? new RateKickingConnection(j) : new Connection(PacketFlow.SERVERBOUND); // CraftBukkit - decompile error diff --git a/patches/unapplied/server/0841-Fix-OfflinePlayer-getBedSpawnLocation.patch b/patches/server/0820-Fix-OfflinePlayer-getBedSpawnLocation.patch similarity index 100% rename from patches/unapplied/server/0841-Fix-OfflinePlayer-getBedSpawnLocation.patch rename to patches/server/0820-Fix-OfflinePlayer-getBedSpawnLocation.patch diff --git a/patches/unapplied/server/0842-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch b/patches/server/0821-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch similarity index 100% rename from patches/unapplied/server/0842-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch rename to patches/server/0821-Fix-FurnaceInventory-for-smokers-and-blast-furnaces.patch diff --git a/patches/unapplied/server/0843-Sanitize-Sent-BlockEntity-NBT.patch b/patches/server/0822-Sanitize-Sent-BlockEntity-NBT.patch similarity index 89% rename from patches/unapplied/server/0843-Sanitize-Sent-BlockEntity-NBT.patch rename to patches/server/0822-Sanitize-Sent-BlockEntity-NBT.patch index 3aa08abdb0..0fb24ebfc0 100644 --- a/patches/unapplied/server/0843-Sanitize-Sent-BlockEntity-NBT.patch +++ b/patches/server/0822-Sanitize-Sent-BlockEntity-NBT.patch @@ -18,10 +18,10 @@ index d79284a790569141c2ac8178d6ecc20b17cdd0d3..3944852921335c78a04a9dc301882ab5 public static ClientboundBlockEntityDataPacket create(BlockEntity blockEntity) { diff --git a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java -index 40a42a632540d497c1393b112731c41c6e448228..f3fa2678796c33f3a408a02a1995ad117eac9169 100644 +index 0ef3e9b472e35bd2572b04722781abf7d4a1094b..bd439aef96aeecb9c72b5f50d748d231cccbc970 100644 --- a/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java +++ b/src/main/java/net/minecraft/network/protocol/game/ClientboundLevelChunkPacketData.java -@@ -183,6 +183,7 @@ public class ClientboundLevelChunkPacketData { +@@ -170,6 +170,7 @@ public class ClientboundLevelChunkPacketData { CompoundTag compoundTag = blockEntity.getUpdateTag(); BlockPos blockPos = blockEntity.getBlockPos(); int i = SectionPos.sectionRelative(blockPos.getX()) << 4 | SectionPos.sectionRelative(blockPos.getZ()); @@ -30,10 +30,10 @@ index 40a42a632540d497c1393b112731c41c6e448228..f3fa2678796c33f3a408a02a1995ad11 } } diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index 52a5b7c20dda9ad18cdeb70952e7385b0966b161..585d1d1f4b1b212295da36e31ae2670b0d2b06c3 100644 +index e3557f4c8cee7c88b3e352cd246078da7762effc..5bdad1866386908b9fef74d15862eb107fabe68f 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -@@ -254,4 +254,12 @@ public abstract class BlockEntity { +@@ -253,4 +253,12 @@ public abstract class BlockEntity { return null; } // CraftBukkit end diff --git a/patches/unapplied/server/0844-Disable-component-selector-resolving-in-books-by-def.patch b/patches/server/0823-Disable-component-selector-resolving-in-books-by-def.patch similarity index 100% rename from patches/unapplied/server/0844-Disable-component-selector-resolving-in-books-by-def.patch rename to patches/server/0823-Disable-component-selector-resolving-in-books-by-def.patch diff --git a/patches/unapplied/server/0845-Prevent-entity-loading-causing-async-lookups.patch b/patches/server/0824-Prevent-entity-loading-causing-async-lookups.patch similarity index 90% rename from patches/unapplied/server/0845-Prevent-entity-loading-causing-async-lookups.patch rename to patches/server/0824-Prevent-entity-loading-causing-async-lookups.patch index 29b61b8947..bd020740aa 100644 --- a/patches/unapplied/server/0845-Prevent-entity-loading-causing-async-lookups.patch +++ b/patches/server/0824-Prevent-entity-loading-causing-async-lookups.patch @@ -5,19 +5,19 @@ Subject: [PATCH] Prevent entity loading causing async lookups diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 507db20f8622d8f26063150ded79e767e61be553..51176c3fbb00854ffd85ebf5f4fd4e439afa0ad8 100644 +index 4deb28538dafced0241c3f8031668b5cc6f24c8d..af3cdef67ca516cfe85dea7580b3e93554350115 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -790,6 +790,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -763,6 +763,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { public void baseTick() { - this.level.getProfiler().push("entityBaseTick"); + this.level().getProfiler().push("entityBaseTick"); + if (firstTick && this instanceof net.minecraft.world.entity.NeutralMob neutralMob) neutralMob.tickInitialPersistentAnger(level); // Paper - Update last hurt when ticking this.feetBlockState = null; if (this.isPassenger() && this.getVehicle().isRemoved()) { this.stopRiding(); diff --git a/src/main/java/net/minecraft/world/entity/NeutralMob.java b/src/main/java/net/minecraft/world/entity/NeutralMob.java -index dedf76de5d6f46b9626ca4a98cfffe125b90dd0c..7dac62b6370dae3ad6d098857c3136d5acf2bd74 100644 +index fa64c7baa7587f2cfe80b78ed83be011239618cf..55defe4f42bea4600a4e2b93c88e90231e61f6ef 100644 --- a/src/main/java/net/minecraft/world/entity/NeutralMob.java +++ b/src/main/java/net/minecraft/world/entity/NeutralMob.java @@ -42,18 +42,11 @@ public interface NeutralMob { diff --git a/patches/unapplied/server/0846-Throw-exception-on-world-create-while-being-ticked.patch b/patches/server/0825-Throw-exception-on-world-create-while-being-ticked.patch similarity index 90% rename from patches/unapplied/server/0846-Throw-exception-on-world-create-while-being-ticked.patch rename to patches/server/0825-Throw-exception-on-world-create-while-being-ticked.patch index 61d320df25..b4807cde5b 100644 --- a/patches/unapplied/server/0846-Throw-exception-on-world-create-while-being-ticked.patch +++ b/patches/server/0825-Throw-exception-on-world-create-while-being-ticked.patch @@ -7,7 +7,7 @@ There are no plans to support creating worlds while worlds are being ticked themselvess. diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 3e59620c84b3aa93d8ce41b0e9901a1621bb48df..682005e4b19ba3959d4e3a66475487daf534a003 100644 +index d373a5f20b017efdb9c339541b124009e07616c8..37441421a50867eeecf5cf3aed3e7096c526d7ef 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java @@ -312,6 +312,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop S spin(Function serverFactory) { AtomicReference atomicreference = new AtomicReference(); -@@ -1486,7 +1487,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper -@@ -1564,6 +1567,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop maindimensionkey = CraftDimensionUtil.getMainDimensionKey(origin); - ResourceKey maindimensionkey1 = CraftDimensionUtil.getMainDimensionKey(this.level); + ResourceKey maindimensionkey1 = CraftDimensionUtil.getMainDimensionKey(this.level()); +- + // Paper start - config for strict advancement checks for dimensions + if (io.papermc.paper.configuration.GlobalConfiguration.get().misc.strictAdvancementDimensionCheck) { + maindimensionkey = resourcekey; + maindimensionkey1 = resourcekey1; + } + // Paper end - CriteriaTriggers.CHANGED_DIMENSION.trigger(this, maindimensionkey, maindimensionkey1); if (maindimensionkey != resourcekey || maindimensionkey1 != resourcekey1) { + CriteriaTriggers.CHANGED_DIMENSION.trigger(this, resourcekey, resourcekey1); diff --git a/patches/unapplied/server/0851-Add-missing-important-BlockStateListPopulator-method.patch b/patches/server/0830-Add-missing-important-BlockStateListPopulator-method.patch similarity index 100% rename from patches/unapplied/server/0851-Add-missing-important-BlockStateListPopulator-method.patch rename to patches/server/0830-Add-missing-important-BlockStateListPopulator-method.patch diff --git a/patches/unapplied/server/0852-Nameable-Banner-API.patch b/patches/server/0831-Nameable-Banner-API.patch similarity index 100% rename from patches/unapplied/server/0852-Nameable-Banner-API.patch rename to patches/server/0831-Nameable-Banner-API.patch diff --git a/patches/unapplied/server/0853-Don-t-broadcast-messages-to-command-blocks.patch b/patches/server/0832-Don-t-broadcast-messages-to-command-blocks.patch similarity index 88% rename from patches/unapplied/server/0853-Don-t-broadcast-messages-to-command-blocks.patch rename to patches/server/0832-Don-t-broadcast-messages-to-command-blocks.patch index e8ab4ec5b7..f7d8a33059 100644 --- a/patches/unapplied/server/0853-Don-t-broadcast-messages-to-command-blocks.patch +++ b/patches/server/0832-Don-t-broadcast-messages-to-command-blocks.patch @@ -8,7 +8,7 @@ in command blocks, and if called asynchronously, would throw an error diff --git a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java -index 7c7e5f3c0f9cd1f16192a8fc8163da9b2d9519d5..888936385196a178ab8b730fd5e4fff4a5466428 100644 +index c138678fe82e6c1dd7ce634f90bcbfcad6159276..fdf1ee8504afc820df96eed0941eb3f1cd9ba392 100644 --- a/src/main/java/net/minecraft/world/level/BaseCommandBlock.java +++ b/src/main/java/net/minecraft/world/level/BaseCommandBlock.java @@ -172,6 +172,7 @@ public abstract class BaseCommandBlock implements CommandSource { @@ -20,10 +20,10 @@ index 7c7e5f3c0f9cd1f16192a8fc8163da9b2d9519d5..888936385196a178ab8b730fd5e4fff4 Date date = new Date(); diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 03084affd2f7cadb06d038569374e16c2d13686f..06cd518e7ca037ed6f347c2666b3a252306368a9 100644 +index dcf7fac3a5619afde34aa22cbc6077579b60eb09..a28da8addf6c06d6c80d9a6a8bd9617808ba7de6 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -@@ -1791,7 +1791,7 @@ public final class CraftServer implements Server { +@@ -1789,7 +1789,7 @@ public final class CraftServer implements Server { // Paper end Set recipients = new HashSet<>(); for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) { diff --git a/patches/unapplied/server/0854-Prevent-empty-items-from-being-added-to-world.patch b/patches/server/0833-Prevent-empty-items-from-being-added-to-world.patch similarity index 77% rename from patches/unapplied/server/0854-Prevent-empty-items-from-being-added-to-world.patch rename to patches/server/0833-Prevent-empty-items-from-being-added-to-world.patch index 728b81e026..d1aa944dad 100644 --- a/patches/unapplied/server/0854-Prevent-empty-items-from-being-added-to-world.patch +++ b/patches/server/0833-Prevent-empty-items-from-being-added-to-world.patch @@ -7,10 +7,10 @@ The previous solution caused a bunch of bandaid fixes inorder to resolve edge ca Just simply prevent them from being added to the world instead. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 08d3d6d5f21326f1b94f2990de702b638e4759cc..131a7ff0847272b2f9fecf62d0d28ca014689f5b 100644 +index 4e2b2223c90f1e994dcd584dfa570953caf37a55..6369fba72d7bf2db00f7df064242561681f35a41 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1503,6 +1503,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1564,6 +1564,7 @@ public class ServerLevel extends Level implements WorldGenLevel { // WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit return false; } else { @@ -19,10 +19,10 @@ index 08d3d6d5f21326f1b94f2990de702b638e4759cc..131a7ff0847272b2f9fecf62d0d28ca0 if (captureDrops != null && entity instanceof net.minecraft.world.entity.item.ItemEntity) { captureDrops.add((net.minecraft.world.entity.item.ItemEntity) entity); diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index d9d50c2658aa3db77948e051d068876d2f5042e6..8a757e6682fb7a58bfd76290bd79ee3cc3dc27b9 100644 +index 998fe14ef28aaaf9246a05d8670c4caa8306c4d1..310a24c1d79541311cfad43fa2bb14867128e7b9 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -@@ -511,7 +511,7 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -515,7 +515,7 @@ public class ItemEntity extends Entity implements TraceableEntity { } public void setItem(ItemStack stack) { @@ -30,4 +30,4 @@ index d9d50c2658aa3db77948e051d068876d2f5042e6..8a757e6682fb7a58bfd76290bd79ee3c + // com.google.common.base.Preconditions.checkArgument(!stack.isEmpty(), "Cannot drop air"); // CraftBukkit // Paper - Remove check this.getEntityData().set(ItemEntity.DATA_ITEM, stack); this.getEntityData().markDirty(ItemEntity.DATA_ITEM); // CraftBukkit - SPIGOT-4591, must mark dirty - this.despawnRate = level.paperConfig().entities.spawning.altItemDespawnRate.enabled ? level.paperConfig().entities.spawning.altItemDespawnRate.items.getOrDefault(stack.getItem(), level.spigotConfig.itemDespawnRate) : level.spigotConfig.itemDespawnRate; // Paper + this.despawnRate = this.level().paperConfig().entities.spawning.altItemDespawnRate.enabled ? this.level().paperConfig().entities.spawning.altItemDespawnRate.items.getOrDefault(stack.getItem(), this.level().spigotConfig.itemDespawnRate) : this.level().spigotConfig.itemDespawnRate; // Paper diff --git a/patches/unapplied/server/0855-Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch b/patches/server/0834-Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch similarity index 100% rename from patches/unapplied/server/0855-Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch rename to patches/server/0834-Fix-CCE-for-SplashPotion-and-LingeringPotion-spawnin.patch diff --git a/patches/unapplied/server/0856-Don-t-print-component-in-resource-pack-rejection-mes.patch b/patches/server/0835-Don-t-print-component-in-resource-pack-rejection-mes.patch similarity index 88% rename from patches/unapplied/server/0856-Don-t-print-component-in-resource-pack-rejection-mes.patch rename to patches/server/0835-Don-t-print-component-in-resource-pack-rejection-mes.patch index c1293f4258..2eb5794354 100644 --- a/patches/unapplied/server/0856-Don-t-print-component-in-resource-pack-rejection-mes.patch +++ b/patches/server/0835-Don-t-print-component-in-resource-pack-rejection-mes.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Don't print component in resource pack rejection message diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 2a4c4180a8ac2f3b2cbb75dc2095ff62bfb3289e..735e16fc2ad7a17accde96c51231dd4bbce109ed 100644 +index d73563cf84a4d6d7a369dde56b670b9010edfac2..fdc03edbdc404d2e6836a5df498f9ebb709675b0 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2034,7 +2034,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2031,7 +2031,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public void handleResourcePackResponse(ServerboundResourcePackPacket packet) { - PacketUtils.ensureRunningOnSameThread(packet, this, this.player.getLevel()); + PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); if (packet.getAction() == ServerboundResourcePackPacket.Action.DECLINED && this.server.isResourcePackRequired()) { - ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getName()); + ServerGamePacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack rejection", this.player.getGameProfile().getName()); // Paper - Don't print component in resource pack rejection message diff --git a/patches/unapplied/server/0857-Add-Player-getFishHook.patch b/patches/server/0836-Add-Player-getFishHook.patch similarity index 92% rename from patches/unapplied/server/0857-Add-Player-getFishHook.patch rename to patches/server/0836-Add-Player-getFishHook.patch index 29b7b33f1c..0adf493a3c 100644 --- a/patches/unapplied/server/0857-Add-Player-getFishHook.patch +++ b/patches/server/0836-Add-Player-getFishHook.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add Player#getFishHook diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 86b5532b3be5484c68152a777b976bc44008b0df..7a2a73edc13930f34eb11d9d0802ae9ec5cd8d40 100644 +index 48efd9277d9010df1206ccfac9623d66d8046825..640c76717ebf97a286edd1da0a785e8f3a0b8b3b 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -161,6 +161,15 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { diff --git a/patches/unapplied/server/0858-Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch b/patches/server/0837-Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch similarity index 91% rename from patches/unapplied/server/0858-Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch rename to patches/server/0837-Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch index 7ff6d28d74..3956916b04 100644 --- a/patches/unapplied/server/0858-Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch +++ b/patches/server/0837-Do-not-sync-load-chunk-for-dynamic-game-event-listen.patch @@ -15,10 +15,10 @@ to account for the case where the chunk is _not_ currently loaded and then later loaded. diff --git a/src/main/java/net/minecraft/world/level/gameevent/DynamicGameEventListener.java b/src/main/java/net/minecraft/world/level/gameevent/DynamicGameEventListener.java -index 1977fde5e9b18406389dfb7374ecf4784f362233..7ee6e2dfb3441c992f4206f5bb8389733cea9dfc 100644 +index e64435c1dfbaf182d2292a1123701033f817ec38..d368ba29fec49a989be1cacd2422599d6d613c29 100644 --- a/src/main/java/net/minecraft/world/level/gameevent/DynamicGameEventListener.java +++ b/src/main/java/net/minecraft/world/level/gameevent/DynamicGameEventListener.java -@@ -66,7 +66,7 @@ public class DynamicGameEventListener { +@@ -48,7 +48,7 @@ public class DynamicGameEventListener { private static void ifChunkExists(LevelReader world, @Nullable SectionPos sectionPos, Consumer dispatcherConsumer) { if (sectionPos != null) { diff --git a/patches/unapplied/server/0859-Add-various-missing-EntityDropItemEvent-calls.patch b/patches/server/0838-Add-various-missing-EntityDropItemEvent-calls.patch similarity index 78% rename from patches/unapplied/server/0859-Add-various-missing-EntityDropItemEvent-calls.patch rename to patches/server/0838-Add-various-missing-EntityDropItemEvent-calls.patch index c2bbb2f736..992dd9d644 100644 --- a/patches/unapplied/server/0859-Add-various-missing-EntityDropItemEvent-calls.patch +++ b/patches/server/0838-Add-various-missing-EntityDropItemEvent-calls.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add various missing EntityDropItemEvent calls diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 51176c3fbb00854ffd85ebf5f4fd4e439afa0ad8..95ff9415fea96e1525c97a185e7890b5f3c70fad 100644 +index af3cdef67ca516cfe85dea7580b3e93554350115..8fef49ba8a46e4490356efdc9dd4ae8ca255421a 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2558,6 +2558,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -2644,6 +2644,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { stack.setCount(0); // Paper - destroy this item - if this ever leaks due to game bugs, ensure it doesn't dupe entityitem.setDefaultPickUpDelay(); @@ -24,48 +24,48 @@ index 51176c3fbb00854ffd85ebf5f4fd4e439afa0ad8..95ff9415fea96e1525c97a185e7890b5 EntityDropItemEvent event = new EntityDropItemEvent(this.getBukkitEntity(), (org.bukkit.entity.Item) entityitem.getBukkitEntity()); Bukkit.getPluginManager().callEvent(event); diff --git a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java -index 40ed36e2dca56d196ee3a78df762f35b41b2f5dc..e93abb02744b5cd8db88e01b6ccf145498903b11 100644 +index 5c260a56b1df66069aec59726d61ef382ae29faa..501e6cb4aa83f81c1f657e41f4e7f11d19d46831 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Dolphin.java +++ b/src/main/java/net/minecraft/world/entity/animal/Dolphin.java @@ -593,7 +593,7 @@ public class Dolphin extends WaterAnimal { float f2 = 0.02F * Dolphin.this.random.nextFloat(); entityitem.setDeltaMovement((double) (0.3F * -Mth.sin(Dolphin.this.getYRot() * 0.017453292F) * Mth.cos(Dolphin.this.getXRot() * 0.017453292F) + Mth.cos(f1) * f2), (double) (0.3F * Mth.sin(Dolphin.this.getXRot() * 0.017453292F) * 1.5F), (double) (0.3F * Mth.cos(Dolphin.this.getYRot() * 0.017453292F) * Mth.cos(Dolphin.this.getXRot() * 0.017453292F) + Mth.sin(f1) * f2)); -- Dolphin.this.level.addFreshEntity(entityitem); +- Dolphin.this.level().addFreshEntity(entityitem); + Dolphin.this.spawnAtLocation(entityitem); // Paper - call EntityDropItemEvent } } } diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java -index 73510697455d891af6858b9a8ad8ca0c9b74880f..3f9b8873afb22fcf4f741297e77b197899c088f5 100644 +index 1526ca0063da0962ae781b7aa877d8cf5e1ffd73..167f142d6960867320b90d61db312ebf23e24a48 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Fox.java +++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java @@ -503,14 +503,14 @@ public class Fox extends Animal implements VariantHolder { entityitem.setPickUpDelay(40); entityitem.setThrower(this.getUUID()); this.playSound(SoundEvents.FOX_SPIT, 1.0F, 1.0F); -- this.level.addFreshEntity(entityitem); +- this.level().addFreshEntity(entityitem); + this.spawnAtLocation(entityitem); // Paper - call EntityDropItemEvent } } private void dropItemStack(ItemStack stack) { - ItemEntity entityitem = new ItemEntity(this.level, this.getX(), this.getY(), this.getZ(), stack); + ItemEntity entityitem = new ItemEntity(this.level(), this.getX(), this.getY(), this.getZ(), stack); -- this.level.addFreshEntity(entityitem); +- this.level().addFreshEntity(entityitem); + this.spawnAtLocation(entityitem); // Paper - call EntityDropItemEvent } @Override diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java -index a0a34f5db4260d77325cfbba9c736726a8f5a5db..db533f458357683b8f3925d628ff1197144f67eb 100644 +index 316823ea978b9c9b6656a01254c201fdd8c11797..c2111491642dfa29bb85027e137b1a19e3d2d9e6 100644 --- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java +++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java @@ -354,8 +354,7 @@ public class Goat extends Animal { double d2 = (double) Mth.randomBetween(this.random, -0.2F, 0.2F); - ItemEntity entityitem = new ItemEntity(this.level, vec3d.x(), vec3d.y(), vec3d.z(), itemstack, d0, d1, d2); + ItemEntity entityitem = new ItemEntity(this.level(), vec3d.x(), vec3d.y(), vec3d.z(), itemstack, d0, d1, d2); -- this.level.addFreshEntity(entityitem); +- this.level().addFreshEntity(entityitem); - return true; + return this.spawnAtLocation(entityitem) != null; // Paper - call EntityDropItemEvent by calling spawnAtLocation. } diff --git a/patches/unapplied/server/0860-Add-some-minimal-debug-information-to-chat-packet-er.patch b/patches/server/0839-Add-some-minimal-debug-information-to-chat-packet-er.patch similarity index 90% rename from patches/unapplied/server/0860-Add-some-minimal-debug-information-to-chat-packet-er.patch rename to patches/server/0839-Add-some-minimal-debug-information-to-chat-packet-er.patch index ef123472fb..2efe21c631 100644 --- a/patches/unapplied/server/0860-Add-some-minimal-debug-information-to-chat-packet-er.patch +++ b/patches/server/0839-Add-some-minimal-debug-information-to-chat-packet-er.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Add some minimal debug information to chat packet errors TODO: potentially add some kick leeway diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 27adfbd9c8333cd87b7a38fbbfa31e50ae3f105c..a522600f96e696561dc26d8154dd5072963935db 100644 +index fdc03edbdc404d2e6836a5df498f9ebb709675b0..aa0b2dd0b3be942d1d2ffed08228afb98b7c91f4 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2292,7 +2292,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2289,7 +2289,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private Optional tryHandleChat(String message, Instant timestamp, LastSeenMessages.Update acknowledgment) { if (!this.updateChatOrder(timestamp)) { diff --git a/patches/unapplied/server/0861-Fix-Bee-flower-NPE.patch b/patches/server/0840-Fix-Bee-flower-NPE.patch similarity index 85% rename from patches/unapplied/server/0861-Fix-Bee-flower-NPE.patch rename to patches/server/0840-Fix-Bee-flower-NPE.patch index 478f69a912..8e5627e598 100644 --- a/patches/unapplied/server/0861-Fix-Bee-flower-NPE.patch +++ b/patches/server/0840-Fix-Bee-flower-NPE.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix Bee flower NPE diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java -index 728ddf4399faafd68e9dcc3a14850a039d1a3e4f..a7ccbe4d32e9ea481447b6813efb8a56a529b6bd 100644 +index c2f56c44e824e3d4f169691b557483a4f0f5b3c6..ea4ca82388f1526fc5af01f6cc406306d79b7499 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Bee.java +++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java -@@ -800,7 +800,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -799,7 +799,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { ++this.pollinatingTicks; if (this.pollinatingTicks > 600) { Bee.this.savedFlowerPos = null; diff --git a/patches/unapplied/server/0862-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch b/patches/server/0841-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch similarity index 87% rename from patches/unapplied/server/0862-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch rename to patches/server/0841-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch index d27aea2a84..bc81b838f0 100644 --- a/patches/unapplied/server/0862-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch +++ b/patches/server/0841-Fix-Spigot-Config-not-using-commands.spam-exclusions.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix Spigot Config not using commands.spam-exclusions diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index a522600f96e696561dc26d8154dd5072963935db..99fe650529e267f8026c5019eab0295b2cddfc53 100644 +index aa0b2dd0b3be942d1d2ffed08228afb98b7c91f4..791f04d75f4d942bc0ef8d04ef4a401161acdc1c 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2539,7 +2539,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2536,7 +2536,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic } // Spigot end // this.chatSpamTickCount += 20; diff --git a/patches/unapplied/server/0863-More-Teleport-API.patch b/patches/server/0842-More-Teleport-API.patch similarity index 94% rename from patches/unapplied/server/0863-More-Teleport-API.patch rename to patches/server/0842-More-Teleport-API.patch index 0980af0e90..9ec1252fe0 100644 --- a/patches/unapplied/server/0863-More-Teleport-API.patch +++ b/patches/server/0842-More-Teleport-API.patch @@ -7,10 +7,10 @@ Subject: [PATCH] More Teleport API public net.minecraft.server.network.ServerGamePacketListenerImpl internalTeleport(DDDFFLjava/util/Set;Z)V diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 99fe650529e267f8026c5019eab0295b2cddfc53..f67ce080d9d9e3786009ec86eb9dda658c7b6a30 100644 +index 791f04d75f4d942bc0ef8d04ef4a401161acdc1c..d74d9493bb6fd4677aa3244b4b1b26d02f6b5b86 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1710,11 +1710,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1707,11 +1707,17 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return false; // CraftBukkit - Return event status } @@ -31,7 +31,7 @@ index 99fe650529e267f8026c5019eab0295b2cddfc53..f67ce080d9d9e3786009ec86eb9dda65 d0 = to.getX(); d1 = to.getY(); diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 6478faa20adea00349600620c2ab7d559e2fc3b7..52f8a76832b05061dc80381220c866316d4a089d 100644 +index c6fc526db6943f6466d6504feff63715e35a0eb2..f04c50a76f3589181dd4502d630a93c4dff3a95a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -561,15 +561,36 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { @@ -74,10 +74,10 @@ index 6478faa20adea00349600620c2ab7d559e2fc3b7..52f8a76832b05061dc80381220c86631 // Let the server handle cross world teleports if (location.getWorld() != null && !location.getWorld().equals(this.getWorld())) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 5a51b19345670ab9590f9ee2a9668d5f9fd010fe..5098dc4f380dca3d4a32cbd201e4c925d2504d9a 100644 +index 6b61a80407cc5ba580d7c95e5bf2146d177b1b4a..ce83330c4ebd81247f2b4c4f2693265810237d7a 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1260,13 +1260,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1233,13 +1233,100 @@ public class CraftPlayer extends CraftHumanEntity implements Player { @Override public void setRotation(float yaw, float pitch) { @@ -179,7 +179,7 @@ index 5a51b19345670ab9590f9ee2a9668d5f9fd010fe..5098dc4f380dca3d4a32cbd201e4c925 location.checkFinite(); ServerPlayer entity = this.getHandle(); -@@ -1279,7 +1366,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1252,7 +1339,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { return false; } @@ -188,7 +188,7 @@ index 5a51b19345670ab9590f9ee2a9668d5f9fd010fe..5098dc4f380dca3d4a32cbd201e4c925 return false; } -@@ -1297,7 +1384,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1270,7 +1357,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } // If this player is riding another entity, we must dismount before teleporting. @@ -197,7 +197,7 @@ index 5a51b19345670ab9590f9ee2a9668d5f9fd010fe..5098dc4f380dca3d4a32cbd201e4c925 // SPIGOT-5509: Wakeup, similar to riding if (this.isSleeping()) { -@@ -1313,13 +1400,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1286,13 +1373,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { ServerLevel toWorld = ((CraftWorld) to.getWorld()).getHandle(); // Close any foreign inventory diff --git a/patches/unapplied/server/0864-Add-EntityPortalReadyEvent.patch b/patches/server/0843-Add-EntityPortalReadyEvent.patch similarity index 82% rename from patches/unapplied/server/0864-Add-EntityPortalReadyEvent.patch rename to patches/server/0843-Add-EntityPortalReadyEvent.patch index 7f95e0ef54..11c2dac81d 100644 --- a/patches/unapplied/server/0864-Add-EntityPortalReadyEvent.patch +++ b/patches/server/0843-Add-EntityPortalReadyEvent.patch @@ -5,12 +5,12 @@ Subject: [PATCH] Add EntityPortalReadyEvent diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 95ff9415fea96e1525c97a185e7890b5f3c70fad..239ace465b2911c0026649e6dd8d9168d9e39845 100644 +index 8fef49ba8a46e4490356efdc9dd4ae8ca255421a..9ed5882c09e241eaeae258ae15d013d5da98376f 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -2913,6 +2913,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3000,6 +3000,13 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { if (true && !this.isPassenger() && this.portalTime++ >= i) { // CraftBukkit - this.level.getProfiler().push("portal"); + this.level().getProfiler().push("portal"); this.portalTime = i; + // Paper start + io.papermc.paper.event.entity.EntityPortalReadyEvent event = new io.papermc.paper.event.entity.EntityPortalReadyEvent(this.getBukkitEntity(), worldserver1 == null ? null : worldserver1.getWorld(), org.bukkit.PortalType.NETHER); @@ -22,11 +22,11 @@ index 95ff9415fea96e1525c97a185e7890b5f3c70fad..239ace465b2911c0026649e6dd8d9168 this.setPortalCooldown(); // CraftBukkit start if (this instanceof ServerPlayer) { -@@ -2920,6 +2927,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3007,6 +3014,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } else { this.changeDimension(worldserver1); } + } // Paper // CraftBukkit end - this.level.getProfiler().pop(); + this.level().getProfiler().pop(); } diff --git a/patches/unapplied/server/0865-Don-t-use-level-random-in-entity-constructors.patch b/patches/server/0844-Don-t-use-level-random-in-entity-constructors.patch similarity index 78% rename from patches/unapplied/server/0865-Don-t-use-level-random-in-entity-constructors.patch rename to patches/server/0844-Don-t-use-level-random-in-entity-constructors.patch index 342c4ce11a..532ce1e010 100644 --- a/patches/unapplied/server/0865-Don-t-use-level-random-in-entity-constructors.patch +++ b/patches/server/0844-Don-t-use-level-random-in-entity-constructors.patch @@ -9,29 +9,29 @@ should be supported. Some entities (for whatever reason) use the level's random in some places. diff --git a/src/main/java/net/minecraft/world/entity/animal/Bee.java b/src/main/java/net/minecraft/world/entity/animal/Bee.java -index a7ccbe4d32e9ea481447b6813efb8a56a529b6bd..c33e5c51839c8e6ec04c1b302127d2bf0f48664c 100644 +index ea4ca82388f1526fc5af01f6cc406306d79b7499..f6062bf8c888baeb7b421150a2c64bf1af1a312b 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Bee.java +++ b/src/main/java/net/minecraft/world/entity/animal/Bee.java -@@ -1026,7 +1026,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -1025,7 +1025,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { BeeGoToHiveGoal() { super(); -- this.travellingTicks = Bee.this.level.random.nextInt(10); -+ this.travellingTicks = Bee.this./* level. */random.nextInt(10); // Paper - use entity random +- this.travellingTicks = Bee.this.level().random.nextInt(10); ++ this.travellingTicks = Bee.this./* level(). */random.nextInt(10); // Paper - use entity random this.blacklistedTargets = Lists.newArrayList(); this.setFlags(EnumSet.of(Goal.Flag.MOVE)); } -@@ -1143,7 +1143,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { +@@ -1142,7 +1142,7 @@ public class Bee extends Animal implements NeutralMob, FlyingAnimal { BeeGoToKnownFlowerGoal() { super(); -- this.travellingTicks = Bee.this.level.random.nextInt(10); -+ this.travellingTicks = Bee.this./* level. */random.nextInt(10); // Paper - use entity random +- this.travellingTicks = Bee.this.level().random.nextInt(10); ++ this.travellingTicks = Bee.this./* level(). */random.nextInt(10); // Paper - use entity random this.setFlags(EnumSet.of(Goal.Flag.MOVE)); } diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index 8a757e6682fb7a58bfd76290bd79ee3cc3dc27b9..2be70d950be48014c4e9792adfc1d05da5aa6a59 100644 +index 310a24c1d79541311cfad43fa2bb14867128e7b9..6ee24fbe6528f91306a0eb38b766f77b2228b4aa 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java @@ -63,7 +63,12 @@ public class ItemEntity extends Entity implements TraceableEntity { @@ -49,7 +49,7 @@ index 8a757e6682fb7a58bfd76290bd79ee3cc3dc27b9..2be70d950be48014c4e9792adfc1d05d public ItemEntity(Level world, double x, double y, double z, ItemStack stack, double velocityX, double velocityY, double velocityZ) { diff --git a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java -index 94e3ce40da0401a94a24a6c0f9e7ffa3d0ef850d..dfdf7e7fc1070975ec18fd215c724f4fc84d3705 100644 +index 1251c704e3b83888133b83757e7773c3e3664e6e..bf3301eb1341ba9d482e10873447c42bd670f5ed 100644 --- a/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java +++ b/src/main/java/net/minecraft/world/entity/item/PrimedTnt.java @@ -33,7 +33,7 @@ public class PrimedTnt extends Entity implements TraceableEntity { diff --git a/patches/unapplied/server/0866-Send-block-entities-after-destroy-prediction.patch b/patches/server/0845-Send-block-entities-after-destroy-prediction.patch similarity index 89% rename from patches/unapplied/server/0866-Send-block-entities-after-destroy-prediction.patch rename to patches/server/0845-Send-block-entities-after-destroy-prediction.patch index 0e11a088c0..68a7d2b85f 100644 --- a/patches/unapplied/server/0866-Send-block-entities-after-destroy-prediction.patch +++ b/patches/server/0845-Send-block-entities-after-destroy-prediction.patch @@ -7,7 +7,7 @@ Minecraft's prediction system does not handle block entities, so if we are manua block breaking we need to set it after the prediction is finished. This fixes block entities not showing when cancelling the BlockBreakEvent. diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index 161a810a8c4bd4c916c54df49c44c504130cb28e..45b48da09eafa8482836e49768426069b0a73cca 100644 +index 0f0cf4fdfcbf8537696f15f98f3fb7e68baeb27c..c38268b11dd5a76d5b3c2013c241063cade30909 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java @@ -62,6 +62,8 @@ public class ServerPlayerGameMode { @@ -19,7 +19,7 @@ index 161a810a8c4bd4c916c54df49c44c504130cb28e..45b48da09eafa8482836e49768426069 public ServerPlayerGameMode(ServerPlayer player) { this.gameModeForPlayer = GameType.DEFAULT_MODE; -@@ -187,10 +189,7 @@ public class ServerPlayerGameMode { +@@ -188,10 +190,7 @@ public class ServerPlayerGameMode { this.player.connection.send(new ClientboundBlockUpdatePacket(pos, this.level.getBlockState(pos))); this.debugLogging(pos, false, sequence, "may not interact"); // Update any tile entity data for this block @@ -31,7 +31,7 @@ index 161a810a8c4bd4c916c54df49c44c504130cb28e..45b48da09eafa8482836e49768426069 // CraftBukkit end return; } -@@ -206,10 +205,7 @@ public class ServerPlayerGameMode { +@@ -207,10 +206,7 @@ public class ServerPlayerGameMode { // Paper end this.player.connection.send(new ClientboundBlockUpdatePacket(this.level, pos)); // Update any tile entity data for this block @@ -43,7 +43,7 @@ index 161a810a8c4bd4c916c54df49c44c504130cb28e..45b48da09eafa8482836e49768426069 return; } // CraftBukkit end -@@ -393,10 +389,12 @@ public class ServerPlayerGameMode { +@@ -392,10 +388,12 @@ public class ServerPlayerGameMode { } // Update any tile entity data for this block @@ -57,10 +57,10 @@ index 161a810a8c4bd4c916c54df49c44c504130cb28e..45b48da09eafa8482836e49768426069 } } diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 014a94c5b2f7c900f33a8e29a64d61690c94b150..385e7648dd2e9e812833010ed90bd8e6011082d8 100644 +index d74d9493bb6fd4677aa3244b4b1b26d02f6b5b86..eb3e0bf223d1d2bb5be8c47e79489abda8607d1d 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -1856,8 +1856,28 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -1853,8 +1853,28 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic return; } // Paper end - Don't allow digging in unloaded chunks @@ -68,7 +68,7 @@ index 014a94c5b2f7c900f33a8e29a64d61690c94b150..385e7648dd2e9e812833010ed90bd8e6 + this.player.gameMode.capturedBlockEntity = false; + this.player.gameMode.captureSentBlockEntities = true; + // Paper end - send block entities after prediction - this.player.gameMode.handleBlockBreakAction(blockposition, packetplayinblockdig_enumplayerdigtype, packet.getDirection(), this.player.level.getMaxBuildHeight(), packet.getSequence()); + this.player.gameMode.handleBlockBreakAction(blockposition, packetplayinblockdig_enumplayerdigtype, packet.getDirection(), this.player.level().getMaxBuildHeight(), packet.getSequence()); this.player.connection.ackBlockChangesUpTo(packet.getSequence()); + // Paper start - send block entities after prediction + this.player.gameMode.captureSentBlockEntities = false; @@ -80,7 +80,7 @@ index 014a94c5b2f7c900f33a8e29a64d61690c94b150..385e7648dd2e9e812833010ed90bd8e6 + this.player.connection.ackBlockChangesUpTo = -1; + + this.player.gameMode.capturedBlockEntity = false; -+ BlockEntity tileentity = this.player.level.getBlockEntity(blockposition); ++ BlockEntity tileentity = this.player.level().getBlockEntity(blockposition); + if (tileentity != null) { + this.player.connection.send(tileentity.getUpdatePacket()); + } diff --git a/patches/unapplied/server/0867-Warn-on-plugins-accessing-faraway-chunks.patch b/patches/server/0846-Warn-on-plugins-accessing-faraway-chunks.patch similarity index 89% rename from patches/unapplied/server/0867-Warn-on-plugins-accessing-faraway-chunks.patch rename to patches/server/0846-Warn-on-plugins-accessing-faraway-chunks.patch index 83817c9ee8..1d9610a4f7 100644 --- a/patches/unapplied/server/0867-Warn-on-plugins-accessing-faraway-chunks.patch +++ b/patches/server/0846-Warn-on-plugins-accessing-faraway-chunks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Warn on plugins accessing faraway chunks diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 4ace5a32e8d17303a4b5d9e8935a803d7c0df409..174f5ff8f827dab2d85cee525429d46bbeae7183 100644 +index 01e420715d47b5531ede82139133a9bb59c25955..090771dce76f4e8037b6b2df9fc0dad7fe73411d 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -422,7 +422,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -419,7 +419,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { } private static boolean isInWorldBoundsHorizontal(BlockPos pos) { @@ -18,7 +18,7 @@ index 4ace5a32e8d17303a4b5d9e8935a803d7c0df409..174f5ff8f827dab2d85cee525429d46b 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 c13e5b79c0599a9809b6150cfe660fb11bd44cea..8f0234296397ca2d4a607dcea6093c6c606dc7d2 100644 +index 1ef6091e9e5b204a714d53a98c1e05bee5569e5c..c02df2ad5366e678d69e432b54706eb96269e285 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftWorld.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftWorld.java @@ -311,9 +311,24 @@ public class CraftWorld extends CraftRegionAccessor implements World { @@ -54,7 +54,7 @@ index c13e5b79c0599a9809b6150cfe660fb11bd44cea..8f0234296397ca2d4a607dcea6093c6c // Paper start - implement regenerateChunk method final ServerLevel serverLevel = this.world; final net.minecraft.server.level.ServerChunkCache serverChunkCache = serverLevel.getChunkSource(); -@@ -524,6 +540,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -519,6 +535,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 c13e5b79c0599a9809b6150cfe660fb11bd44cea..8f0234296397ca2d4a607dcea6093c6c // Paper start - Optimize this method ChunkPos chunkPos = new ChunkPos(x, z); ChunkAccess immediate = world.getChunkSource().getChunkAtIfLoadedImmediately(x, z); // Paper -@@ -587,6 +604,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -582,6 +599,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public boolean addPluginChunkTicket(int x, int z, Plugin plugin) { @@ -70,7 +70,7 @@ index c13e5b79c0599a9809b6150cfe660fb11bd44cea..8f0234296397ca2d4a607dcea6093c6c Preconditions.checkArgument(plugin != null, "null plugin"); Preconditions.checkArgument(plugin.isEnabled(), "plugin is not enabled"); -@@ -655,6 +673,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -650,6 +668,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { @Override public void setChunkForceLoaded(int x, int z, boolean forced) { @@ -78,7 +78,7 @@ index c13e5b79c0599a9809b6150cfe660fb11bd44cea..8f0234296397ca2d4a607dcea6093c6c this.getHandle().setChunkForced(x, z, forced); } -@@ -961,6 +980,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -956,6 +975,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 c13e5b79c0599a9809b6150cfe660fb11bd44cea..8f0234296397ca2d4a607dcea6093c6c // Transient load for this tick return this.world.getChunk(x >> 4, z >> 4).getHeight(CraftHeightMap.toNMS(heightMap), x, z); } -@@ -2370,6 +2390,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { +@@ -2365,6 +2385,7 @@ public class CraftWorld extends CraftRegionAccessor implements World { // Spigot end // Paper start public java.util.concurrent.CompletableFuture getChunkAtAsync(int x, int z, boolean gen, boolean urgent) { diff --git a/patches/unapplied/server/0868-Custom-Chat-Completion-Suggestions-API.patch b/patches/server/0847-Custom-Chat-Completion-Suggestions-API.patch similarity index 90% rename from patches/unapplied/server/0868-Custom-Chat-Completion-Suggestions-API.patch rename to patches/server/0847-Custom-Chat-Completion-Suggestions-API.patch index 254af7f763..8d90427836 100644 --- a/patches/unapplied/server/0868-Custom-Chat-Completion-Suggestions-API.patch +++ b/patches/server/0847-Custom-Chat-Completion-Suggestions-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Custom Chat Completion Suggestions API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 5098dc4f380dca3d4a32cbd201e4c925d2504d9a..ec5b1a1434a732ffd99113b301088865e5e34400 100644 +index ce83330c4ebd81247f2b4c4f2693265810237d7a..328a59ef54e0e0eca0c5c42cf59227834da6cd86 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -675,6 +675,22 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -642,6 +642,22 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().getServer().getPlayerList().sendPlayerPermissionLevel(this.getHandle(), level, false); } diff --git a/patches/unapplied/server/0869-Add-missing-BlockFadeEvents.patch b/patches/server/0848-Add-missing-BlockFadeEvents.patch similarity index 100% rename from patches/unapplied/server/0869-Add-missing-BlockFadeEvents.patch rename to patches/server/0848-Add-missing-BlockFadeEvents.patch diff --git a/patches/unapplied/server/0870-Collision-API.patch b/patches/server/0849-Collision-API.patch similarity index 93% rename from patches/unapplied/server/0870-Collision-API.patch rename to patches/server/0849-Collision-API.patch index 36e708c8de..1eb58e47cc 100644 --- a/patches/unapplied/server/0870-Collision-API.patch +++ b/patches/server/0849-Collision-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Collision API diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -index f4f1150e6be2bff0b8561451594691977a5f1d56..3742e0b32e29d7dde0c2bd3d80348f8fb7b8aaf0 100644 +index 5bab5c75a2ce945b43434d2240c9d1124a20aee2..94f21c6acaee5a632b6adb4e77488bb2e385fbea 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java @@ -1019,5 +1019,12 @@ public abstract class CraftRegionAccessor implements RegionAccessor { @@ -22,7 +22,7 @@ index f4f1150e6be2bff0b8561451594691977a5f1d56..3742e0b32e29d7dde0c2bd3d80348f8f // Paper end } diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index 52f8a76832b05061dc80381220c866316d4a089d..73bd76b7bfcffc1d9dac926d7a781d048f4f2350 100644 +index f04c50a76f3589181dd4502d630a93c4dff3a95a..b8550052bfde2b2b97fa4497e6e5d055e6161529 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -1415,4 +1415,19 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { diff --git a/patches/unapplied/server/0871-Fix-suggest-command-message-for-brigadier-syntax-exc.patch b/patches/server/0850-Fix-suggest-command-message-for-brigadier-syntax-exc.patch similarity index 89% rename from patches/unapplied/server/0871-Fix-suggest-command-message-for-brigadier-syntax-exc.patch rename to patches/server/0850-Fix-suggest-command-message-for-brigadier-syntax-exc.patch index 868ea3a3e6..aa73cbbddf 100644 --- a/patches/unapplied/server/0871-Fix-suggest-command-message-for-brigadier-syntax-exc.patch +++ b/patches/server/0850-Fix-suggest-command-message-for-brigadier-syntax-exc.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix suggest command message for brigadier syntax exceptions This is a bug accidentally introduced in upstream CB diff --git a/src/main/java/net/minecraft/commands/Commands.java b/src/main/java/net/minecraft/commands/Commands.java -index 933d6e67cbcc1bf121005f57b13dd976020985c3..87cc7562e4a166d078fe11b7f6980497fc0bd33e 100644 +index f967e9039c87ec458da3f133743df834437b3e02..80c2c8d565f03ae0ea24fbdecdbe2bc5b9aa4b82 100644 --- a/src/main/java/net/minecraft/commands/Commands.java +++ b/src/main/java/net/minecraft/commands/Commands.java -@@ -340,7 +340,7 @@ public class Commands { +@@ -342,7 +342,7 @@ public class Commands { if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) { int j = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor()); MutableComponent ichatmutablecomponent = Component.empty().withStyle(ChatFormatting.GRAY).withStyle((chatmodifier) -> { diff --git a/patches/unapplied/server/0872-Remove-invalid-signature-login-stacktrace.patch b/patches/server/0851-Remove-invalid-signature-login-stacktrace.patch similarity index 88% rename from patches/unapplied/server/0872-Remove-invalid-signature-login-stacktrace.patch rename to patches/server/0851-Remove-invalid-signature-login-stacktrace.patch index f7887653d9..e355f3ccca 100644 --- a/patches/unapplied/server/0872-Remove-invalid-signature-login-stacktrace.patch +++ b/patches/server/0851-Remove-invalid-signature-login-stacktrace.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove invalid signature login stacktrace diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 6614b6ee463f6f68d14894addcbc79a6a5be5b10..7810ab5bd1791ff5323b7302a6351a987b93bae3 100644 +index eb3e0bf223d1d2bb5be8c47e79489abda8607d1d..f52b01bca1b4221b389b2e980f2f75b0f1eca077 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3618,7 +3618,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3584,7 +3584,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.resetPlayerChatState(remotechatsession_a.validate(this.player.getGameProfile(), signaturevalidator, Duration.ZERO)); } catch (ProfilePublicKey.ValidationException profilepublickey_b) { diff --git a/patches/unapplied/server/0873-Block-Ticking-API.patch b/patches/server/0852-Block-Ticking-API.patch similarity index 88% rename from patches/unapplied/server/0873-Block-Ticking-API.patch rename to patches/server/0852-Block-Ticking-API.patch index 4137528899..a6c8ba9019 100644 --- a/patches/unapplied/server/0873-Block-Ticking-API.patch +++ b/patches/server/0852-Block-Ticking-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Block Ticking API diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java -index e4e4a282a10bde462af1e60aa6be992c636b9726..3a201bb68ef34d53aee75ca248248c11c4a77c2c 100644 +index e0c2ad107847227987080491e94b264930fc80e2..01b401f7d691ef451266bbc3a94980d613b96f21 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java @@ -758,5 +758,21 @@ public class CraftBlock implements Block { @@ -31,10 +31,10 @@ index e4e4a282a10bde462af1e60aa6be992c636b9726..3a201bb68ef34d53aee75ca248248c11 // 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 9d09b3064fc0474170e6d584dd3ccb9899cfbd42..c061f76ff6ccf64d9eb53045e9bfabe2021e91ec 100644 +index 58d10e8909fea652810e30bbd4b24aaa5e038277..85c2e7f8399788caa4c7dfed4f8b1104a546fc21 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java +++ b/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java -@@ -676,4 +676,11 @@ public class CraftBlockData implements BlockData { +@@ -680,4 +680,11 @@ public class CraftBlockData implements BlockData { public void mirror(Mirror mirror) { this.state = this.state.mirror(net.minecraft.world.level.block.Mirror.valueOf(mirror.name())); } diff --git a/patches/unapplied/server/0874-Add-Velocity-IP-Forwarding-Support.patch b/patches/server/0853-Add-Velocity-IP-Forwarding-Support.patch similarity index 98% rename from patches/unapplied/server/0874-Add-Velocity-IP-Forwarding-Support.patch rename to patches/server/0853-Add-Velocity-IP-Forwarding-Support.patch index 4c81a074dd..44e2810137 100644 --- a/patches/unapplied/server/0874-Add-Velocity-IP-Forwarding-Support.patch +++ b/patches/server/0853-Add-Velocity-IP-Forwarding-Support.patch @@ -95,7 +95,7 @@ index 0000000000000000000000000000000000000000..c4934979b1ed85bfc4f8d9e6f8848b2b + } +} diff --git a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java -index 51b3db0b6c2cede95b584268e035c0fb36d38094..a7e133f3495e9132a5fdae2c24f225e7b026295a 100644 +index 91e6161449dc5625331e467d9e8375759686709e..7f0b8cdae07e7e4745a099242a4f0c5914be8667 100644 --- a/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java +++ b/src/main/java/net/minecraft/server/dedicated/DedicatedServer.java @@ -274,13 +274,20 @@ public class DedicatedServer extends MinecraftServer implements ServerInterface @@ -213,7 +213,7 @@ index 3fcd7bfdb8945b276c94a263e9da6b85ce470366..3431b1132e55c53cda7cf47f021f2306 } diff --git a/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/src/main/java/org/bukkit/craftbukkit/CraftServer.java -index 06cd518e7ca037ed6f347c2666b3a252306368a9..9f2536d9a73bdb15b5b3004d4da79ca32cee205b 100644 +index a28da8addf6c06d6c80d9a6a8bd9617808ba7de6..f87433133fa6a68dac33895f91770f453e0678d2 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftServer.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftServer.java @@ -797,7 +797,7 @@ public final class CraftServer implements Server { diff --git a/patches/unapplied/server/0875-Use-thread-safe-random-in-ServerLoginPacketListenerI.patch b/patches/server/0854-Use-thread-safe-random-in-ServerLoginPacketListenerI.patch similarity index 100% rename from patches/unapplied/server/0875-Use-thread-safe-random-in-ServerLoginPacketListenerI.patch rename to patches/server/0854-Use-thread-safe-random-in-ServerLoginPacketListenerI.patch diff --git a/patches/unapplied/server/0876-Add-NamespacedKey-biome-methods.patch b/patches/server/0855-Add-NamespacedKey-biome-methods.patch similarity index 95% rename from patches/unapplied/server/0876-Add-NamespacedKey-biome-methods.patch rename to patches/server/0855-Add-NamespacedKey-biome-methods.patch index 80d9f65e0b..4f53bd9282 100644 --- a/patches/unapplied/server/0876-Add-NamespacedKey-biome-methods.patch +++ b/patches/server/0855-Add-NamespacedKey-biome-methods.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Add NamespacedKey biome methods Co-authored-by: Thonk <30448663+ExcessiveAmountsOfZombies@users.noreply.github.com> diff --git a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java -index 707f50536a3915a68ee8ac09a74ecfebbd5a94dd..1179e9fbff93ec8ff82aa3aae477f6bf4ce9b885 100644 +index a6564c7d69999c55abc4292cab9182390a52e749..b059bb46b649cbf82debdb8d58fe4ba77d040276 100644 --- a/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java +++ b/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java @@ -611,6 +611,19 @@ public final class CraftMagicNumbers implements UnsafeValues { diff --git a/patches/unapplied/server/0877-Fix-plugin-loggers-on-server-shutdown.patch b/patches/server/0856-Fix-plugin-loggers-on-server-shutdown.patch similarity index 90% rename from patches/unapplied/server/0877-Fix-plugin-loggers-on-server-shutdown.patch rename to patches/server/0856-Fix-plugin-loggers-on-server-shutdown.patch index 9a7c82b944..0c9f365e19 100644 --- a/patches/unapplied/server/0877-Fix-plugin-loggers-on-server-shutdown.patch +++ b/patches/server/0856-Fix-plugin-loggers-on-server-shutdown.patch @@ -37,10 +37,10 @@ index 0000000000000000000000000000000000000000..c1d3bac79bb8b4796c013ff4472f75dc + } +} diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index 682005e4b19ba3959d4e3a66475487daf534a003..fbc06f45926e9073c95c97423f92a213898fcd48 100644 +index 37441421a50867eeecf5cf3aed3e7096c526d7ef..2c3577c6f59e482d68c80d3d414ed43942dfcfbb 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1001,6 +1001,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index 34ef66a6f0cfb2bb1435c7342b6261d31dd011ef..f1dc127a92fe13e92f9af660f98afcdd78f6cbd5 100644 +index 9ee16dc1f425e4f0795eec3dcc18affc70e85a31..de67999120b52daafa4fb40dd32a348f39ce8df3 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -2996,37 +2996,15 @@ public abstract class LivingEntity extends Entity implements Attackable { - this.level.getProfiler().pop(); - this.level.getProfiler().push("rangeChecks"); +@@ -3034,37 +3034,15 @@ public abstract class LivingEntity extends Entity implements Attackable { + this.level().getProfiler().pop(); + this.level().getProfiler().push("rangeChecks"); - while (this.getYRot() - this.yRotO < -180.0F) { - this.yRotO -= 360.0F; @@ -51,13 +51,13 @@ index 34ef66a6f0cfb2bb1435c7342b6261d31dd011ef..f1dc127a92fe13e92f9af660f98afcdd + this.yHeadRotO += Math.round((this.yHeadRot - this.yHeadRotO) / 360.0F) * 360.0F; + // Paper end - this.level.getProfiler().pop(); + this.level().getProfiler().pop(); this.animStep += f2; diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -index ae0e422ee7e1dcf01b4c7b64b23afdbbbe19819e..8b2a3a8482018b7db7de81bc295862f783e17ce5 100644 +index 24b549cb21926a02d736f0bbb991006b9453068d..6d7ac0c8c171834fa8da94f158258a4774d80ec4 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -@@ -250,13 +250,7 @@ public abstract class Projectile extends Entity implements TraceableEntity { +@@ -251,13 +251,7 @@ public abstract class Projectile extends Entity implements TraceableEntity { } protected static float lerpRotation(float prevRot, float newRot) { diff --git a/patches/unapplied/server/0881-Fire-EntityChangeBlockEvent-in-more-places.patch b/patches/server/0858-Fire-EntityChangeBlockEvent-in-more-places.patch similarity index 93% rename from patches/unapplied/server/0881-Fire-EntityChangeBlockEvent-in-more-places.patch rename to patches/server/0858-Fire-EntityChangeBlockEvent-in-more-places.patch index a41505c2ea..c7fbbaaa64 100644 --- a/patches/unapplied/server/0881-Fire-EntityChangeBlockEvent-in-more-places.patch +++ b/patches/server/0858-Fire-EntityChangeBlockEvent-in-more-places.patch @@ -6,15 +6,15 @@ Subject: [PATCH] Fire EntityChangeBlockEvent in more places Co-authored-by: ChristopheG <61288881+chrisgdt@users.noreply.github.com> diff --git a/src/main/java/net/minecraft/world/entity/LightningBolt.java b/src/main/java/net/minecraft/world/entity/LightningBolt.java -index 534ff7d4844448eaddb2778f81dfd66d1ee375db..558c14af6415681909f9e3a15f303ce4d0ec1395 100644 +index 611028d65925053c47510185abc526201e5df6bb..cdf1899f1e9978fcf58f05b1efb3165e55445f93 100644 --- a/src/main/java/net/minecraft/world/entity/LightningBolt.java +++ b/src/main/java/net/minecraft/world/entity/LightningBolt.java @@ -98,7 +98,7 @@ public class LightningBolt extends Entity { } this.powerLightningRod(); -- LightningBolt.clearCopperOnLightningStrike(this.level, this.getStrikePosition()); -+ LightningBolt.clearCopperOnLightningStrike(this.level, this.getStrikePosition(), this); // Paper - transmit LightningBolt instance to call EntityChangeBlockEvent +- LightningBolt.clearCopperOnLightningStrike(this.level(), this.getStrikePosition()); ++ LightningBolt.clearCopperOnLightningStrike(this.level(), this.getStrikePosition(), this); // Paper - transmit LightningBolt instance to call EntityChangeBlockEvent this.gameEvent(GameEvent.LIGHTNING_STRIKE); } } @@ -79,7 +79,7 @@ index 534ff7d4844448eaddb2778f81dfd66d1ee375db..558c14af6415681909f9e3a15f303ce4 }); world.levelEvent(3002, blockposition1, -1); diff --git a/src/main/java/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java b/src/main/java/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java -index 04fe142984760a1162703b46e08bf172b7277258..578f98981d3fa50630f8b25ecd69a11e523f7d8d 100644 +index 2c443b421e342ebfbdf941a431ba20560521920b..72cab38ab1f16f7ccc85258266d4c58cf3287d7d 100644 --- a/src/main/java/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java +++ b/src/main/java/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java @@ -27,6 +27,12 @@ public class TryLaySpawnOnWaterNearLand { @@ -112,7 +112,7 @@ index 2f8ae1786a4c4438515c59fa56acaefdff60703d..9c7d0b9cc2fa98d5785c914c0183f7d4 CriteriaTriggers.ITEM_USED_ON_BLOCK.trigger((ServerPlayer)player, blockPos, itemStack); } diff --git a/src/main/java/net/minecraft/world/item/EnderEyeItem.java b/src/main/java/net/minecraft/world/item/EnderEyeItem.java -index e0c3aa1285709a40ff0ea8c1d74d43d2b341aecc..f4fc8ff3981555e4b560289248a9b02afc04b42f 100644 +index 1fddc9025a9e5079f05dd6c86f6ca43c5d51d9c3..2735e139fd2b5ab11e4311848e9676ee203b1a6b 100644 --- a/src/main/java/net/minecraft/world/item/EnderEyeItem.java +++ b/src/main/java/net/minecraft/world/item/EnderEyeItem.java @@ -43,6 +43,11 @@ public class EnderEyeItem extends Item { @@ -128,10 +128,10 @@ index e0c3aa1285709a40ff0ea8c1d74d43d2b341aecc..f4fc8ff3981555e4b560289248a9b02a Block.pushEntitiesUp(iblockdata, iblockdata1, world, blockposition); world.setBlock(blockposition, iblockdata1, 2); diff --git a/src/main/java/net/minecraft/world/item/HoneycombItem.java b/src/main/java/net/minecraft/world/item/HoneycombItem.java -index 68a8d3b16d49c10fc9834f32009095d35c9c55a8..f0b720eafc538f97d788f89bd2f2e9da0ff84a19 100644 +index 5ab115834cddb9ab3209c11bd0fe657b06a02eb2..744ee7633e10c68a830e7513993e4c307c8984d2 100644 --- a/src/main/java/net/minecraft/world/item/HoneycombItem.java +++ b/src/main/java/net/minecraft/world/item/HoneycombItem.java -@@ -37,6 +37,14 @@ public class HoneycombItem extends Item { +@@ -39,6 +39,14 @@ public class HoneycombItem extends Item implements SignApplicator { return getWaxed(blockState).map((state) -> { Player player = context.getPlayer(); ItemStack itemStack = context.getItemInHand(); @@ -147,7 +147,7 @@ index 68a8d3b16d49c10fc9834f32009095d35c9c55a8..f0b720eafc538f97d788f89bd2f2e9da CriteriaTriggers.ITEM_USED_ON_BLOCK.trigger((ServerPlayer)player, blockPos, itemStack); } diff --git a/src/main/java/net/minecraft/world/item/PotionItem.java b/src/main/java/net/minecraft/world/item/PotionItem.java -index 93bb2cbd397fef4db9d903d2b41a35b6d67bf4a9..3a6601ede6fd7caa48cdbf9856c2e72fd4e73ca8 100644 +index 8c79ca75089e739d4899421106833e42e4e57280..f8b201f8a8019bc9b85ed013cbe7f20b4f07ec85 100644 --- a/src/main/java/net/minecraft/world/item/PotionItem.java +++ b/src/main/java/net/minecraft/world/item/PotionItem.java @@ -107,6 +107,12 @@ public class PotionItem extends Item { @@ -199,10 +199,10 @@ index 32995cb5efdad0bc34ecacacb78cccd21220ba8d..c7195f2e12bbd6545f7bffcc2b4ba5cc 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/ComposterBlock.java b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java -index 53f4a000079f4c056500d03eca71991ae14483a9..50fd52905d8f69c693cb1b406b681a6af02787e2 100644 +index f1a0304a92abbb58aa8a22f8e470a0f5e4189d02..113083f1b909e3e279789d67e24af36dc0f151bf 100644 --- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java +++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java -@@ -230,6 +230,11 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { +@@ -232,6 +232,11 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { if (i < 8 && ComposterBlock.COMPOSTABLES.containsKey(itemstack.getItem())) { if (i < 7 && !world.isClientSide) { BlockState iblockdata1 = ComposterBlock.addItem(player, state, world, pos, itemstack); @@ -214,7 +214,7 @@ index 53f4a000079f4c056500d03eca71991ae14483a9..50fd52905d8f69c693cb1b406b681a6a world.levelEvent(1500, pos, state != iblockdata1 ? 1 : 0); player.awardStat(Stats.ITEM_USED.get(itemstack.getItem())); -@@ -253,11 +258,16 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { +@@ -255,11 +260,16 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { if (i < 7 && ComposterBlock.COMPOSTABLES.containsKey(stack.getItem())) { // CraftBukkit start double rand = world.getRandom().nextDouble(); @@ -233,7 +233,7 @@ index 53f4a000079f4c056500d03eca71991ae14483a9..50fd52905d8f69c693cb1b406b681a6a // CraftBukkit end stack.shrink(1); -@@ -298,11 +308,13 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { +@@ -300,11 +310,13 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { return iblockdata1; } @@ -247,7 +247,7 @@ index 53f4a000079f4c056500d03eca71991ae14483a9..50fd52905d8f69c693cb1b406b681a6a static BlockState addItem(@Nullable Entity entity, BlockState iblockdata, LevelAccessor generatoraccess, BlockPos blockposition, ItemStack itemstack, double rand) { // CraftBukkit end int i = (Integer) iblockdata.getValue(ComposterBlock.LEVEL); -@@ -313,6 +325,11 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { +@@ -315,6 +327,11 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { } else { int j = i + 1; BlockState iblockdata1 = (BlockState) iblockdata.setValue(ComposterBlock.LEVEL, j); diff --git a/patches/unapplied/server/0882-Missing-eating-regain-reason.patch b/patches/server/0859-Missing-eating-regain-reason.patch similarity index 87% rename from patches/unapplied/server/0882-Missing-eating-regain-reason.patch rename to patches/server/0859-Missing-eating-regain-reason.patch index 8a23bd4de4..b5a99bc0ef 100644 --- a/patches/unapplied/server/0882-Missing-eating-regain-reason.patch +++ b/patches/server/0859-Missing-eating-regain-reason.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Missing eating regain reason diff --git a/src/main/java/net/minecraft/world/entity/animal/Cat.java b/src/main/java/net/minecraft/world/entity/animal/Cat.java -index 51ca7668ebc0edf4254b7511bb0df0c2197bf859..72b30a5cdeb8a43702d9ab5f198311929761fad1 100644 +index 438d7c26cc3a4a3b5a1affffbbe26e4d272b0c00..90ce201bc7c47cef9bc59d7b535a7453854bac75 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Cat.java +++ b/src/main/java/net/minecraft/world/entity/animal/Cat.java @@ -386,7 +386,7 @@ public class Cat extends TamableAnimal implements VariantHolder { @@ -18,10 +18,10 @@ index 51ca7668ebc0edf4254b7511bb0df0c2197bf859..72b30a5cdeb8a43702d9ab5f19831192 } diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java -index 9d4a3041ecae2adda40134710eb1edb8571228aa..37882a393d7c17a9437145ab5fe1f74370681146 100644 +index c853123c451c41beb42209c7edc14a5dcffa2a50..2030fdb3124f793d7b545135b1db32fe9be27050 100644 --- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java +++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java -@@ -381,7 +381,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider +@@ -386,7 +386,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider } else { boolean bl = this.getHealth() < this.getMaxHealth(); if (bl) { @@ -31,7 +31,7 @@ index 9d4a3041ecae2adda40134710eb1edb8571228aa..37882a393d7c17a9437145ab5fe1f743 boolean bl2 = this.isTamed() && this.getAge() == 0 && this.canFallInLove(); diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java -index 39c6b9b74e072953abe6398ecfcdd444e6d8f194..7ae0e4b3aa8e861500ddc7b38aa671258b532fcd 100644 +index 4033945cb992e2c9bf42b8a7eda581319a6c6917..3bbb1455773570e3f7f6b8b144d3c589e2705b81 100644 --- a/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/Llama.java @@ -217,7 +217,7 @@ public class Llama extends AbstractChestedHorse implements VariantHolder diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java -index 9b56f742443ad98994acc34630f1cef75a00ca8a..618ad17e4f10f58994db55b82b70fbb141e3579e 100644 +index f651d866355557d10d4bb8730e0aceac483d3ba7..f2500cbe0aecf4959921a56c88a8947839a9b0e4 100644 --- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java -@@ -352,7 +352,7 @@ public interface DispenseItemBehavior { +@@ -351,7 +351,7 @@ public interface DispenseItemBehavior { } } // CraftBukkit end @@ -57,36 +57,36 @@ index 9b56f742443ad98994acc34630f1cef75a00ca8a..618ad17e4f10f58994db55b82b70fbb1 this.setSuccess(true); return stack; diff --git a/src/main/java/net/minecraft/server/commands/DeOpCommands.java b/src/main/java/net/minecraft/server/commands/DeOpCommands.java -index cca2618d90306eed9894c5fa7b6ed96b68210688..10769c60bd53438d44fbc6192667acdf4cc95594 100644 +index 40490d10649e92cf622849f1bb87538102b130c7..797efca662dcc0fe7f4cf0b4b7baa235ea044f1f 100644 --- a/src/main/java/net/minecraft/server/commands/DeOpCommands.java +++ b/src/main/java/net/minecraft/server/commands/DeOpCommands.java -@@ -33,7 +33,7 @@ public class DeOpCommands { - if (playerList.isOp(gameProfile)) { +@@ -34,7 +34,7 @@ public class DeOpCommands { playerList.deop(gameProfile); ++i; -- source.sendSuccess(Component.translatable("commands.deop.success", targets.iterator().next().getName()), true); -+ source.sendSuccess(Component.translatable("commands.deop.success", gameProfile.getName()), true); // Paper - fixes MC-253721 + source.sendSuccess(() -> { +- return Component.translatable("commands.deop.success", targets.iterator().next().getName()); ++ return Component.translatable("commands.deop.success", gameProfile.getName()); // Paper - fixes MC-253721 + }, true); } } - diff --git a/src/main/java/net/minecraft/server/commands/OpCommand.java b/src/main/java/net/minecraft/server/commands/OpCommand.java -index 43e77cef0fce75f59aeb05e161668bebb8fca229..ef50fbf8cb3f008827850b5ed33422007be09bd2 100644 +index 6cd6d69a20e95e344fc18ab67dc300824537a59b..2e2a7c2cf3081187da817479a9da3eb10f662a6d 100644 --- a/src/main/java/net/minecraft/server/commands/OpCommand.java +++ b/src/main/java/net/minecraft/server/commands/OpCommand.java -@@ -38,7 +38,7 @@ public class OpCommand { - if (!playerList.isOp(gameProfile)) { +@@ -39,7 +39,7 @@ public class OpCommand { playerList.op(gameProfile); ++i; -- source.sendSuccess(Component.translatable("commands.op.success", targets.iterator().next().getName()), true); -+ source.sendSuccess(Component.translatable("commands.op.success", gameProfile.getName()), true); // Paper - fixes MC-253721 + source.sendSuccess(() -> { +- return Component.translatable("commands.op.success", targets.iterator().next().getName()); ++ return Component.translatable("commands.op.success", gameProfile.getName()); // Paper - fixes MC-253721 + }, true); } } - diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 131a7ff0847272b2f9fecf62d0d28ca014689f5b..ed91515947ee049bdb82aa014fe439753f2b7620 100644 +index 6369fba72d7bf2db00f7df064242561681f35a41..3a5686086e113eed8b80bb65f5b05d4b81138b00 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -949,7 +949,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1010,7 +1010,7 @@ public class ServerLevel extends Level implements WorldGenLevel { } else { AABB axisalignedbb = (new AABB(blockposition1, new BlockPos(blockposition1.getX(), this.getMaxBuildHeight(), blockposition1.getZ()))).inflate(3.0D); List list = this.getEntitiesOfClass(LivingEntity.class, axisalignedbb, (entityliving) -> { @@ -96,10 +96,10 @@ index 131a7ff0847272b2f9fecf62d0d28ca014689f5b..ed91515947ee049bdb82aa014fe43975 if (!list.isEmpty()) { diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index 45b48da09eafa8482836e49768426069b0a73cca..16a1416cb2ce01071a033c5049edfb60b614d56a 100644 +index c38268b11dd5a76d5b3c2013c241063cade30909..25c289b737f6cd7ede94725d86fbbf8d9ae1d70d 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -@@ -91,7 +91,7 @@ public class ServerPlayerGameMode { +@@ -92,7 +92,7 @@ public class ServerPlayerGameMode { return event; // Paper } // CraftBukkit end @@ -143,23 +143,23 @@ index 19540fd4a7f992888fadb6501d0c8a5a7e71fcf6..e241ae250f4f04a17ef2c583d00b065a public void start() { this.creeper.getNavigation().stop(); diff --git a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java -index db533f458357683b8f3925d628ff1197144f67eb..cfa904d42734d0fb0c1ed8b18f4d8bc131027962 100644 +index c2111491642dfa29bb85027e137b1a19e3d2d9e6..528e7ba29dcd38726b2c1bbc1d8ac208c64ba9df 100644 --- a/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java +++ b/src/main/java/net/minecraft/world/entity/animal/goat/Goat.java @@ -236,9 +236,10 @@ public class Goat extends Animal { player.setItemInHand(hand, itemstack1); - return InteractionResult.sidedSuccess(this.level.isClientSide); + return InteractionResult.sidedSuccess(this.level().isClientSide); } else { + boolean isFood = this.isFood(itemstack); // Paper - track before stack is possibly decreased to 0 (Fixes MC-244739) InteractionResult enuminteractionresult = super.mobInteract(player, hand); - if (enuminteractionresult.consumesAction() && this.isFood(itemstack)) { + if (enuminteractionresult.consumesAction() && isFood) { // Paper - this.level.playSound((Player) null, (Entity) this, this.getEatingSound(itemstack), SoundSource.NEUTRAL, 1.0F, Mth.randomBetween(this.level.random, 0.8F, 1.2F)); + this.level().playSound((Player) null, (Entity) this, this.getEatingSound(itemstack), SoundSource.NEUTRAL, 1.0F, Mth.randomBetween(this.level().random, 0.8F, 1.2F)); } diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java -index d38ac1f3ef105474df1294541041c2607ca53244..f9496f757bcf7000fab1f16386e775d54d96e47a 100644 +index 64b1668856bb2afda3707f7ccc11764fab33ae9f..7f238a9d98095806132c0d22ed7b0dfd25c45262 100644 --- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java @@ -247,7 +247,13 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, @@ -174,34 +174,9 @@ index d38ac1f3ef105474df1294541041c2607ca53244..f9496f757bcf7000fab1f16386e775d5 + public void equipSaddle(@Nullable SoundSource sound, @Nullable ItemStack stack) { + this.inventory.setItem(0, stack != null ? stack : new ItemStack(Items.SADDLE)); + // Paper end - if (sound != null) { - this.level.playSound((Player) null, (Entity) this, this.getSaddleSoundEvent(), sound, 0.5F, 1.0F); - } -@@ -256,7 +262,7 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, + } public void equipArmor(Player player, ItemStack stack) { - if (this.isArmor(stack)) { -- this.inventory.setItem(1, new ItemStack(stack.getItem())); -+ this.inventory.setItem(1, stack.copyWithCount(1)); // Paper - fix equipping items with nbt - MC-258360, MC-191591 - if (!player.getAbilities().instabuild) { - stack.shrink(1); - } -diff --git a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java -index 89f761871a84f8ab95f2a16aba8340bb8726da30..f6e2348b280eaefc0eb05bf5d962593caa654357 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java -+++ b/src/main/java/net/minecraft/world/entity/animal/sniffer/Sniffer.java -@@ -347,9 +347,10 @@ public class Sniffer extends Animal { - @Override - public InteractionResult mobInteract(Player player, InteractionHand hand) { - ItemStack itemstack = player.getItemInHand(hand); -+ boolean wasFood = this.isFood(itemstack); // Paper - Fix MC-260219 - InteractionResult enuminteractionresult = super.mobInteract(player, hand); - -- if (enuminteractionresult.consumesAction() && this.isFood(itemstack)) { -+ if (enuminteractionresult.consumesAction() && wasFood) { // Paper - Fix MC-260219 - this.level.playSound((Player) null, (Entity) this, this.getEatingSound(itemstack), SoundSource.NEUTRAL, 1.0F, Mth.randomBetween(this.level.random, 0.8F, 1.2F)); - } - diff --git a/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java b/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java index f174094febfdfdc309f1b50877be60bae8a98156..5f407535298a31a34cfe114dd863fd6a9b977707 100644 --- a/src/main/java/net/minecraft/world/entity/npc/CatSpawner.java @@ -217,7 +192,7 @@ index f174094febfdfdc309f1b50877be60bae8a98156..5f407535298a31a34cfe114dd863fd6a return 1; } diff --git a/src/main/java/net/minecraft/world/entity/raid/Raids.java b/src/main/java/net/minecraft/world/entity/raid/Raids.java -index 7985beb01059a9e4394920bcf3335d842bd20f4e..fabce3bc592b1b172b227395a07febdbb66ec3c9 100644 +index 380afb885e85e4cf80e746d217033345a7514443..41457c9f27b18fa2734a6cca297ec5186470e82f 100644 --- a/src/main/java/net/minecraft/world/entity/raid/Raids.java +++ b/src/main/java/net/minecraft/world/entity/raid/Raids.java @@ -125,7 +125,7 @@ public class Raids extends SavedData { @@ -239,16 +214,16 @@ index 7985beb01059a9e4394920bcf3335d842bd20f4e..fabce3bc592b1b172b227395a07febdb player.awardStat(Stats.RAID_TRIGGER); CriteriaTriggers.BAD_OMEN.trigger(player); diff --git a/src/main/java/net/minecraft/world/item/SaddleItem.java b/src/main/java/net/minecraft/world/item/SaddleItem.java -index c35375e15c0368fec12d37a4b82668b51d9fe9ff..0c975875f1f2d0236d42a291486a7e78e1702802 100644 +index 11e8f2bf261abcb75d4dd011702c8f396e9f5be4..7234010d81078d357ab9bca422e44864a9e269bb 100644 --- a/src/main/java/net/minecraft/world/item/SaddleItem.java +++ b/src/main/java/net/minecraft/world/item/SaddleItem.java @@ -18,7 +18,7 @@ public class SaddleItem extends Item { if (entity instanceof Saddleable saddleable && entity.isAlive()) { if (!saddleable.isSaddled() && saddleable.isSaddleable()) { - if (!user.level.isClientSide) { + if (!user.level().isClientSide) { - saddleable.equipSaddle(SoundSource.NEUTRAL); + saddleable.equipSaddle(SoundSource.NEUTRAL, stack.copyWithCount(1)); // Paper - Fix saddles losing nbt data - MC-191591 - entity.level.gameEvent(entity, GameEvent.EQUIP, entity.position()); + entity.level().gameEvent(entity, GameEvent.EQUIP, entity.position()); 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 @@ -281,10 +256,10 @@ index 2932419b7ca3f066b1db329829af36ba31e17c65..e11eced0bf15dfecaf64f5e1c28e973c return; } diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java -index 5e70b5f643faabfc05989de9592d8c5c787102e3..2a786c9fd29dc2139cf487fa645cd43345d60167 100644 +index 436290eaa0dab05a642b67b265117dbe5eceb8b7..5ccc419b904aec590c5624438da61ca6724b20d6 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java -@@ -664,13 +664,10 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit +@@ -674,13 +674,10 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit @Override public void fillStackedContents(StackedContents finder) { diff --git a/patches/unapplied/server/0894-Remove-unnecessary-onTrackingStart-during-navigation.patch b/patches/server/0870-Remove-unnecessary-onTrackingStart-during-navigation.patch similarity index 87% rename from patches/unapplied/server/0894-Remove-unnecessary-onTrackingStart-during-navigation.patch rename to patches/server/0870-Remove-unnecessary-onTrackingStart-during-navigation.patch index d44526fff6..53d6383999 100644 --- a/patches/unapplied/server/0894-Remove-unnecessary-onTrackingStart-during-navigation.patch +++ b/patches/server/0870-Remove-unnecessary-onTrackingStart-during-navigation.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Remove unnecessary onTrackingStart during navigation warning diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 131a7ff0847272b2f9fecf62d0d28ca014689f5b..066744d37670e0ee4254a34743887416412b0065 100644 +index 3a5686086e113eed8b80bb65f5b05d4b81138b00..83267ae18c606116cf0c0b55549dc732f269a5d7 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2533,7 +2533,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2602,7 +2602,7 @@ public class ServerLevel extends Level implements WorldGenLevel { if (entity instanceof Mob) { Mob entityinsentient = (Mob) entity; @@ -17,7 +17,7 @@ index 131a7ff0847272b2f9fecf62d0d28ca014689f5b..066744d37670e0ee4254a34743887416 String s = "onTrackingStart called during navigation iteration"; Util.logAndPauseIfInIde("onTrackingStart called during navigation iteration", new IllegalStateException("onTrackingStart called during navigation iteration")); -@@ -2618,7 +2618,7 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2687,7 +2687,7 @@ public class ServerLevel extends Level implements WorldGenLevel { if (entity instanceof Mob) { Mob entityinsentient = (Mob) entity; diff --git a/patches/unapplied/server/0895-Fix-custom-piglin-loved-items.patch b/patches/server/0871-Fix-custom-piglin-loved-items.patch similarity index 93% rename from patches/unapplied/server/0895-Fix-custom-piglin-loved-items.patch rename to patches/server/0871-Fix-custom-piglin-loved-items.patch index 66144b5596..e768ba98b8 100644 --- a/patches/unapplied/server/0895-Fix-custom-piglin-loved-items.patch +++ b/patches/server/0871-Fix-custom-piglin-loved-items.patch @@ -7,7 +7,7 @@ Upstream didn't modify the isLovedItem check in wantsToPickup so piglins never actually tried to pickup interestItems diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java -index c3a2b83794c612340edf0bc67f58917f1f96db45..d552deba0a4f20d011defb464d31d8638d37c646 100644 +index c8e6893a7d2be08d6b0d111aa6e58e72f3376edc..5f2bb0160c49d404a06551880e08c589a5b2a0a7 100644 --- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java +++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java @@ -402,7 +402,7 @@ public class PiglinAi { diff --git a/patches/unapplied/server/0896-EntityPickupItemEvent-fixes.patch b/patches/server/0872-EntityPickupItemEvent-fixes.patch similarity index 90% rename from patches/unapplied/server/0896-EntityPickupItemEvent-fixes.patch rename to patches/server/0872-EntityPickupItemEvent-fixes.patch index b8ba8cba65..8c7fe9dd48 100644 --- a/patches/unapplied/server/0896-EntityPickupItemEvent-fixes.patch +++ b/patches/server/0872-EntityPickupItemEvent-fixes.patch @@ -12,10 +12,10 @@ Fires the event when a Raider tries to pick up a raid banner to become raid leader. diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java -index 7b42f7bd100808cb2367d0d7c7361e8f2e597502..afa7ecfa8453da510ec5ccecb1ceeb1d9893d259 100644 +index 7ef04ef7995b093eef022b397cda8c27c8faede0..27d9145693a772cd1b5d171da303c934101f3be8 100644 --- a/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java +++ b/src/main/java/net/minecraft/world/entity/monster/piglin/Piglin.java -@@ -432,7 +432,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento +@@ -429,7 +429,7 @@ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, Invento @Override protected void pickUpItem(ItemEntity item) { @@ -25,7 +25,7 @@ index 7b42f7bd100808cb2367d0d7c7361e8f2e597502..afa7ecfa8453da510ec5ccecb1ceeb1d } diff --git a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java -index d552deba0a4f20d011defb464d31d8638d37c646..2e107f10d497a5696c7bc90ae3c5ecea98edb3e1 100644 +index 5f2bb0160c49d404a06551880e08c589a5b2a0a7..d98c526676202741e628d5e317b8cdd3f4d3be0a 100644 --- a/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java +++ b/src/main/java/net/minecraft/world/entity/monster/piglin/PiglinAi.java @@ -241,7 +241,10 @@ public class PiglinAi { @@ -49,7 +49,7 @@ index d552deba0a4f20d011defb464d31d8638d37c646..2e107f10d497a5696c7bc90ae3c5ecea if (PiglinAi.isLovedItem(itemstack, piglin)) { // CraftBukkit - Changes to allow for custom payment in bartering diff --git a/src/main/java/net/minecraft/world/entity/raid/Raider.java b/src/main/java/net/minecraft/world/entity/raid/Raider.java -index da37c51ee443c2f1191a32671912a967a13003cf..99e9d46d42ddd0b451c6aeb847f1b295ebe5c697 100644 +index 9948085f51659f9b896622251739343d658dd0b2..57fdcdaf54fd1c92a6e51a3a81789029096e5abe 100644 --- a/src/main/java/net/minecraft/world/entity/raid/Raider.java +++ b/src/main/java/net/minecraft/world/entity/raid/Raider.java @@ -245,6 +245,11 @@ public abstract class Raider extends PatrollingMonster { diff --git a/patches/unapplied/server/0897-Correctly-handle-interactions-with-items-on-cooldown.patch b/patches/server/0873-Correctly-handle-interactions-with-items-on-cooldown.patch similarity index 91% rename from patches/unapplied/server/0897-Correctly-handle-interactions-with-items-on-cooldown.patch rename to patches/server/0873-Correctly-handle-interactions-with-items-on-cooldown.patch index 3c87b5be58..127f2818f3 100644 --- a/patches/unapplied/server/0897-Correctly-handle-interactions-with-items-on-cooldown.patch +++ b/patches/server/0873-Correctly-handle-interactions-with-items-on-cooldown.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Correctly handle interactions with items on cooldown diff --git a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -index 16a1416cb2ce01071a033c5049edfb60b614d56a..1d33c02088c150189d7f4b0aa27f6a1de96b11cf 100644 +index 25c289b737f6cd7ede94725d86fbbf8d9ae1d70d..bb7ad618fad7f11a02d7e088e2c05bfffaf0b41d 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayerGameMode.java -@@ -520,6 +520,7 @@ public class ServerPlayerGameMode { +@@ -519,6 +519,7 @@ public class ServerPlayerGameMode { BlockState iblockdata = world.getBlockState(blockposition); InteractionResult enuminteractionresult = InteractionResult.PASS; boolean cancelledBlock = false; @@ -16,7 +16,7 @@ index 16a1416cb2ce01071a033c5049edfb60b614d56a..1d33c02088c150189d7f4b0aa27f6a1d if (!iblockdata.getBlock().isEnabled(world.enabledFeatures())) { return InteractionResult.FAIL; -@@ -529,10 +530,10 @@ public class ServerPlayerGameMode { +@@ -528,10 +529,10 @@ public class ServerPlayerGameMode { } if (player.getCooldowns().isOnCooldown(stack.getItem())) { @@ -30,7 +30,7 @@ index 16a1416cb2ce01071a033c5049edfb60b614d56a..1d33c02088c150189d7f4b0aa27f6a1d this.interactResult = event.useItemInHand() == Event.Result.DENY; this.interactPosition = blockposition.immutable(); diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 4c957ccae26fcad437234051481e2a1824d17f76..0f4154560047735562b583081a9edb314f3a8a74 100644 +index 20e1efcadd4a11bab8a0db48410229e4a4d5ce57..86b0fe7b6feeef0e085e577954f869e020cc0f04 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -517,6 +517,12 @@ public class CraftEventFactory { diff --git a/patches/unapplied/server/0898-Add-PlayerInventorySlotChangeEvent.patch b/patches/server/0874-Add-PlayerInventorySlotChangeEvent.patch similarity index 93% rename from patches/unapplied/server/0898-Add-PlayerInventorySlotChangeEvent.patch rename to patches/server/0874-Add-PlayerInventorySlotChangeEvent.patch index d9b7732756..3a00f8c7bf 100644 --- a/patches/unapplied/server/0898-Add-PlayerInventorySlotChangeEvent.patch +++ b/patches/server/0874-Add-PlayerInventorySlotChangeEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add PlayerInventorySlotChangeEvent diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index c5dc769d13fbc2a88a731d42669d0906ee306e4b..6fdb22809195fc2ba95ee22a5523eeabc2f2c4da 100644 +index 0e8e1f74a041dc500bb07d3e5e97ff134882fb59..4eb2679bddf89cc1c72ab561fd7e1be8423d746b 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -330,6 +330,25 @@ public class ServerPlayer extends Player { +@@ -371,6 +371,25 @@ public class ServerPlayer extends Player { } } @@ -35,7 +35,7 @@ index c5dc769d13fbc2a88a731d42669d0906ee306e4b..6fdb22809195fc2ba95ee22a5523eeab @Override public void dataChanged(AbstractContainerMenu handler, int property, int value) {} diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java -index ec1da07fdfc86c2905766886f6f922320c73fb6a..0954e834ca4c777de61f5d45812008cc7c2ac733 100644 +index 19b0ae77e99c972159cb236403f420baa0cc46e0..b9e8d8b91b307e37900d0d2e8c823e63faed7cea 100644 --- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java @@ -302,7 +302,7 @@ public abstract class AbstractContainerMenu { diff --git a/patches/unapplied/server/0899-Elder-Guardian-appearance-API.patch b/patches/server/0875-Elder-Guardian-appearance-API.patch similarity index 84% rename from patches/unapplied/server/0899-Elder-Guardian-appearance-API.patch rename to patches/server/0875-Elder-Guardian-appearance-API.patch index 841e9c0e64..be1b6b521c 100644 --- a/patches/unapplied/server/0899-Elder-Guardian-appearance-API.patch +++ b/patches/server/0875-Elder-Guardian-appearance-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Elder Guardian appearance API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index ec5b1a1434a732ffd99113b301088865e5e34400..405634ea82f48ccaa170b9de27140573cb647608 100644 +index 328a59ef54e0e0eca0c5c42cf59227834da6cd86..4b8299c14518fbc658fc30c833e8a870d5e97021 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3145,6 +3145,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3118,6 +3118,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player { } // Paper end diff --git a/patches/unapplied/server/0900-Allow-changing-bed-s-occupied-property.patch b/patches/server/0876-Allow-changing-bed-s-occupied-property.patch similarity index 100% rename from patches/unapplied/server/0900-Allow-changing-bed-s-occupied-property.patch rename to patches/server/0876-Allow-changing-bed-s-occupied-property.patch diff --git a/patches/unapplied/server/0901-Add-entity-knockback-API.patch b/patches/server/0877-Add-entity-knockback-API.patch similarity index 91% rename from patches/unapplied/server/0901-Add-entity-knockback-API.patch rename to patches/server/0877-Add-entity-knockback-API.patch index 9accc7491c..8fb1163c50 100644 --- a/patches/unapplied/server/0901-Add-entity-knockback-API.patch +++ b/patches/server/0877-Add-entity-knockback-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add entity knockback API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index 5f20251a7d9c3cfa48775d825e557b75930d7923..f6e5de14a674a2dd7841c1e03f136cc48e2352cf 100644 +index d15a252285e10ce062319b0f1051f59ba46701a0..351869735644c984090e1ac571b5ff118ecae9bc 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -995,5 +995,11 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/patches/unapplied/server/0902-Detect-headless-JREs.patch b/patches/server/0878-Detect-headless-JREs.patch similarity index 96% rename from patches/unapplied/server/0902-Detect-headless-JREs.patch rename to patches/server/0878-Detect-headless-JREs.patch index 2af5fb20b5..9d49be7a76 100644 --- a/patches/unapplied/server/0902-Detect-headless-JREs.patch +++ b/patches/server/0878-Detect-headless-JREs.patch @@ -27,7 +27,7 @@ index 6bd0afddbcc461149dfe9a5c7a86fff6ea13a5f1..148d233f4f5278ff39eacdaa0f4f0e7d + } } diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index 1619da8a904785e0cc00ddbcfba1c3fa2b8d9b93..c6fa6bcd66d61359124a8426b919493c6ec43f06 100644 +index 1147044f2c4c2e9510cb6e5c38b6abe85ec994e1..a3c400bb4ee5d8f2985f4bc7e3e35be548177cc6 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java @@ -170,6 +170,18 @@ public class Main { diff --git a/patches/unapplied/server/0903-fixed-entity-vehicle-collision-event-not-called.patch b/patches/server/0879-fixed-entity-vehicle-collision-event-not-called.patch similarity index 88% rename from patches/unapplied/server/0903-fixed-entity-vehicle-collision-event-not-called.patch rename to patches/server/0879-fixed-entity-vehicle-collision-event-not-called.patch index 8e79007256..d1250a8fbf 100644 --- a/patches/unapplied/server/0903-fixed-entity-vehicle-collision-event-not-called.patch +++ b/patches/server/0879-fixed-entity-vehicle-collision-event-not-called.patch @@ -5,10 +5,10 @@ Subject: [PATCH] fixed entity vehicle collision event not called diff --git a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java -index 33dd6f9b3fde5bd19cfc6386dd9454df4a887489..ee4f924afe15c9a4d96af7a55b357076c7b28501 100644 +index b9ca93026797874c8fa2d68e7177ca1fc0724da7..f0bd07570399aa126b524cd31b819881e2d96cf1 100644 --- a/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java +++ b/src/main/java/net/minecraft/world/entity/vehicle/AbstractMinecart.java -@@ -143,7 +143,15 @@ public abstract class AbstractMinecart extends Entity { +@@ -144,7 +144,15 @@ public abstract class AbstractMinecart extends Entity { @Override public boolean canCollideWith(Entity other) { diff --git a/patches/unapplied/server/0904-optimized-dirt-and-snow-spreading.patch b/patches/server/0880-optimized-dirt-and-snow-spreading.patch similarity index 98% rename from patches/unapplied/server/0904-optimized-dirt-and-snow-spreading.patch rename to patches/server/0880-optimized-dirt-and-snow-spreading.patch index a146caa330..08a3761309 100644 --- a/patches/unapplied/server/0904-optimized-dirt-and-snow-spreading.patch +++ b/patches/server/0880-optimized-dirt-and-snow-spreading.patch @@ -5,7 +5,7 @@ Subject: [PATCH] optimized dirt and snow spreading diff --git a/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java b/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java -index 61783f17b655cbb6430d22fb3a81931ab3ea130c..af46c05a34292d271fd4a809398e6b299e10b12b 100644 +index 1fe07f8f9b28faf076209f7ad235fd5dc948b294..9bbb9f8e917288bb0d11661a1399a05631ebcce0 100644 --- a/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java +++ b/src/main/java/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java @@ -18,8 +18,13 @@ public abstract class SpreadingSnowyDirtBlock extends SnowyDirtBlock { diff --git a/patches/unapplied/server/0905-Added-EntityToggleSitEvent.patch b/patches/server/0881-Added-EntityToggleSitEvent.patch similarity index 83% rename from patches/unapplied/server/0905-Added-EntityToggleSitEvent.patch rename to patches/server/0881-Added-EntityToggleSitEvent.patch index bcf83ec157..3545a2f37d 100644 --- a/patches/unapplied/server/0905-Added-EntityToggleSitEvent.patch +++ b/patches/server/0881-Added-EntityToggleSitEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Added EntityToggleSitEvent diff --git a/src/main/java/net/minecraft/world/entity/TamableAnimal.java b/src/main/java/net/minecraft/world/entity/TamableAnimal.java -index dcb4a886a1ade6dfabd9e5fc20d9db433438b959..0fc4a3e196ecdf16250d8b62136b2a4fe1ab6f84 100644 +index 9fb11df7131f400e6e631146c32efccea83adf56..1282911b97292cde30dff83de756bc91bf319cb2 100644 --- a/src/main/java/net/minecraft/world/entity/TamableAnimal.java +++ b/src/main/java/net/minecraft/world/entity/TamableAnimal.java @@ -67,7 +67,7 @@ public abstract class TamableAnimal extends Animal implements OwnableEntity { @@ -31,7 +31,7 @@ index dcb4a886a1ade6dfabd9e5fc20d9db433438b959..0fc4a3e196ecdf16250d8b62136b2a4f if (inSittingPose) { this.entityData.set(DATA_FLAGS_ID, (byte)(b | 1)); diff --git a/src/main/java/net/minecraft/world/entity/animal/Fox.java b/src/main/java/net/minecraft/world/entity/animal/Fox.java -index 3f9b8873afb22fcf4f741297e77b197899c088f5..89894bc6a55bc7e456a9d49ac48f6a8192b890ae 100644 +index 167f142d6960867320b90d61db312ebf23e24a48..844083101e9763330af0175388f6cdda27a97ecc 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Fox.java +++ b/src/main/java/net/minecraft/world/entity/animal/Fox.java @@ -427,7 +427,7 @@ public class Fox extends Animal implements VariantHolder { @@ -41,7 +41,7 @@ index 3f9b8873afb22fcf4f741297e77b197899c088f5..89894bc6a55bc7e456a9d49ac48f6a81 - this.setSitting(nbt.getBoolean("Sitting")); + this.setSitting(nbt.getBoolean("Sitting"), false); // Paper this.setIsCrouching(nbt.getBoolean("Crouching")); - if (this.level instanceof ServerLevel) { + if (this.level() instanceof ServerLevel) { this.setTargetGoals(); @@ -440,6 +440,12 @@ public class Fox extends Animal implements VariantHolder { } @@ -57,7 +57,7 @@ index 3f9b8873afb22fcf4f741297e77b197899c088f5..89894bc6a55bc7e456a9d49ac48f6a81 } diff --git a/src/main/java/net/minecraft/world/entity/animal/Panda.java b/src/main/java/net/minecraft/world/entity/animal/Panda.java -index 0a18108fda778af5b600f77533770bd98584d60e..9c1e02c3a990cd0f8bba1c84c170b438278c02a7 100644 +index a0933b8467bf81333dc103055e73bb75069dcb36..9b807b318a2843810c3963277d464439a865cfb6 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Panda.java +++ b/src/main/java/net/minecraft/world/entity/animal/Panda.java @@ -132,6 +132,7 @@ public class Panda extends Animal { @@ -69,10 +69,10 @@ index 0a18108fda778af5b600f77533770bd98584d60e..9c1e02c3a990cd0f8bba1c84c170b438 } diff --git a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java -index 37882a393d7c17a9437145ab5fe1f74370681146..05c7680569346bb863b896bcc9515f3e7cfb8114 100644 +index 2030fdb3124f793d7b545135b1db32fe9be27050..4efa7e331cc974008c653a04687a336e97626445 100644 --- a/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java +++ b/src/main/java/net/minecraft/world/entity/animal/camel/Camel.java -@@ -586,7 +586,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider +@@ -591,7 +591,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider } public void sitDown() { @@ -80,8 +80,8 @@ index 37882a393d7c17a9437145ab5fe1f74370681146..05c7680569346bb863b896bcc9515f3e + if (!this.isCamelSitting() && new io.papermc.paper.event.entity.EntityToggleSitEvent(this.getBukkitEntity(), true).callEvent()) { // Paper this.playSound(SoundEvents.CAMEL_SIT, 1.0F, 1.0F); this.setPose(Pose.SITTING); - this.resetLastPoseChangeTick(-this.level.getGameTime()); -@@ -594,7 +594,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider + this.resetLastPoseChangeTick(-this.level().getGameTime()); +@@ -599,7 +599,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider } public void standUp() { @@ -89,12 +89,12 @@ index 37882a393d7c17a9437145ab5fe1f74370681146..05c7680569346bb863b896bcc9515f3e + if (this.isCamelSitting() && new io.papermc.paper.event.entity.EntityToggleSitEvent(this.getBukkitEntity(), false).callEvent()) { // Paper this.playSound(SoundEvents.CAMEL_STAND, 1.0F, 1.0F); this.setPose(Pose.STANDING); - this.resetLastPoseChangeTick(this.level.getGameTime()); -@@ -602,6 +602,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider + this.resetLastPoseChangeTick(this.level().getGameTime()); +@@ -607,6 +607,7 @@ public class Camel extends AbstractHorse implements PlayerRideableJumping, Rider } - public void standUpPanic() { + public void standUpInstantly() { + if (this.isCamelSitting() && !new io.papermc.paper.event.entity.EntityToggleSitEvent(this.getBukkitEntity(), false).callEvent()) return; // Paper this.setPose(Pose.STANDING); - this.resetLastPoseChangeTickToFullStand(this.level.getGameTime()); + this.resetLastPoseChangeTickToFullStand(this.level().getGameTime()); } diff --git a/patches/unapplied/server/0906-Add-fire-tick-delay-option.patch b/patches/server/0882-Add-fire-tick-delay-option.patch similarity index 95% rename from patches/unapplied/server/0906-Add-fire-tick-delay-option.patch rename to patches/server/0882-Add-fire-tick-delay-option.patch index d8e916dcdb..e9a876ed2b 100644 --- a/patches/unapplied/server/0906-Add-fire-tick-delay-option.patch +++ b/patches/server/0882-Add-fire-tick-delay-option.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add fire-tick-delay option diff --git a/src/main/java/net/minecraft/world/level/block/FireBlock.java b/src/main/java/net/minecraft/world/level/block/FireBlock.java -index 69ec4de4d065481496f5363c8985d2f39cd0191d..c33dab52dc73da5f510ea5eed7785bf68e06605e 100644 +index 7f88b910dfd0303f69b4fd1c7918a401c1f369f2..4002e0fffb60556e7af1aeff71b4be244f02b0f5 100644 --- a/src/main/java/net/minecraft/world/level/block/FireBlock.java +++ b/src/main/java/net/minecraft/world/level/block/FireBlock.java @@ -165,7 +165,7 @@ public class FireBlock extends BaseFireBlock { diff --git a/patches/unapplied/server/0907-Add-Moving-Piston-API.patch b/patches/server/0883-Add-Moving-Piston-API.patch similarity index 100% rename from patches/unapplied/server/0907-Add-Moving-Piston-API.patch rename to patches/server/0883-Add-Moving-Piston-API.patch diff --git a/patches/unapplied/server/0908-Ignore-impossible-spawn-tick.patch b/patches/server/0884-Ignore-impossible-spawn-tick.patch similarity index 90% rename from patches/unapplied/server/0908-Ignore-impossible-spawn-tick.patch rename to patches/server/0884-Ignore-impossible-spawn-tick.patch index 6c8f1c65d1..a5ecb9692b 100644 --- a/patches/unapplied/server/0908-Ignore-impossible-spawn-tick.patch +++ b/patches/server/0884-Ignore-impossible-spawn-tick.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Ignore impossible spawn tick diff --git a/src/main/java/net/minecraft/world/level/BaseSpawner.java b/src/main/java/net/minecraft/world/level/BaseSpawner.java -index 9bf1a37ea8436f3314b28914ae8b1516378eb465..31ac0e5ca26c7bdfa9b710d0bb78d846ddf6863e 100644 +index c63d5df91726839471c1eaaf7fafab3fa1be153b..8fdbc603486ff8a902b6327bc2acfb86a806626e 100644 --- a/src/main/java/net/minecraft/world/level/BaseSpawner.java +++ b/src/main/java/net/minecraft/world/level/BaseSpawner.java @@ -80,6 +80,7 @@ public abstract class BaseSpawner { diff --git a/patches/unapplied/server/0909-Track-projectile-source-for-fireworks-from-dispenser.patch b/patches/server/0885-Track-projectile-source-for-fireworks-from-dispenser.patch similarity index 89% rename from patches/unapplied/server/0909-Track-projectile-source-for-fireworks-from-dispenser.patch rename to patches/server/0885-Track-projectile-source-for-fireworks-from-dispenser.patch index b74d96a4fe..389dfc4431 100644 --- a/patches/unapplied/server/0909-Track-projectile-source-for-fireworks-from-dispenser.patch +++ b/patches/server/0885-Track-projectile-source-for-fireworks-from-dispenser.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Track projectile source for fireworks from dispensers diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java -index 618ad17e4f10f58994db55b82b70fbb141e3579e..46accf082b5e440ec743583bb0609c013234cb06 100644 +index f2500cbe0aecf4959921a56c88a8947839a9b0e4..876f44845a02b02c93233b302c7306eff40f1468 100644 --- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java -@@ -517,6 +517,7 @@ public interface DispenseItemBehavior { +@@ -516,6 +516,7 @@ public interface DispenseItemBehavior { itemstack1 = CraftItemStack.asNMSCopy(event.getItem()); FireworkRocketEntity entityfireworks = new FireworkRocketEntity(pointer.getLevel(), itemstack1, pointer.x(), pointer.y(), pointer.x(), true); // Paper - GH-2871 - fix last firework in stack having no effects when dispensed diff --git a/patches/unapplied/server/0910-Fix-EntityArgument-suggestion-permissions-to-align-w.patch b/patches/server/0886-Fix-EntityArgument-suggestion-permissions-to-align-w.patch similarity index 100% rename from patches/unapplied/server/0910-Fix-EntityArgument-suggestion-permissions-to-align-w.patch rename to patches/server/0886-Fix-EntityArgument-suggestion-permissions-to-align-w.patch diff --git a/patches/unapplied/server/0911-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch b/patches/server/0887-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch similarity index 91% rename from patches/unapplied/server/0911-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch rename to patches/server/0887-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch index afa98f920a..3e8f8ffefe 100644 --- a/patches/unapplied/server/0911-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch +++ b/patches/server/0887-Fix-EntityCombustEvent-cancellation-cant-fully-preve.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix EntityCombustEvent cancellation cant fully prevent diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 239ace465b2911c0026649e6dd8d9168d9e39845..06c22d56357d215922195b3ba9149427e61e412d 100644 +index 9ed5882c09e241eaeae258ae15d013d5da98376f..c588460cb26c4d723428a11fe3d360d81ae39433 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3184,6 +3184,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3275,6 +3275,10 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { pluginManager.callEvent(entityCombustEvent); if (!entityCombustEvent.isCancelled()) { this.setSecondsOnFire(entityCombustEvent.getDuration(), false); diff --git a/patches/unapplied/server/0912-Prevent-compass-from-loading-chunks.patch b/patches/server/0888-Prevent-compass-from-loading-chunks.patch similarity index 100% rename from patches/unapplied/server/0912-Prevent-compass-from-loading-chunks.patch rename to patches/server/0888-Prevent-compass-from-loading-chunks.patch diff --git a/patches/unapplied/server/0913-Add-PrePlayerAttackEntityEvent.patch b/patches/server/0889-Add-PrePlayerAttackEntityEvent.patch similarity index 89% rename from patches/unapplied/server/0913-Add-PrePlayerAttackEntityEvent.patch rename to patches/server/0889-Add-PrePlayerAttackEntityEvent.patch index 666945e26b..01fbd77bb2 100644 --- a/patches/unapplied/server/0913-Add-PrePlayerAttackEntityEvent.patch +++ b/patches/server/0889-Add-PrePlayerAttackEntityEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add PrePlayerAttackEntityEvent diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 4f9931ecdea8742db9e1db78143168d69ee635fb..5b772b3caeafe98aa45a01bffe215a5dd33323b6 100644 +index b69e0cd17467752707a33540cd6113dc21554ca1..53487f0a4fe672298c3b83d24a2a603641afcde8 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -1238,8 +1238,17 @@ public abstract class Player extends LivingEntity { +@@ -1239,8 +1239,17 @@ public abstract class Player extends LivingEntity { } public void attack(Entity target) { diff --git a/patches/unapplied/server/0914-ensure-reset-EnderDragon-boss-event-name.patch b/patches/server/0890-ensure-reset-EnderDragon-boss-event-name.patch similarity index 81% rename from patches/unapplied/server/0914-ensure-reset-EnderDragon-boss-event-name.patch rename to patches/server/0890-ensure-reset-EnderDragon-boss-event-name.patch index 369164484e..0f1fd322ef 100644 --- a/patches/unapplied/server/0914-ensure-reset-EnderDragon-boss-event-name.patch +++ b/patches/server/0890-ensure-reset-EnderDragon-boss-event-name.patch @@ -6,20 +6,20 @@ Subject: [PATCH] ensure reset EnderDragon boss event name Fix MC-257487 diff --git a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java -index 8cf4ae35eb66e69de32295d707db6845b4b02962..e9eb32469a5c03f7a3677ef50fd4541c1ed662ad 100644 +index 17b5386d147dc007c487da3561ea5a5d3cd6db22..e2cd77d9de9709aa50f4b6febabe21bfcf94dc5d 100644 --- a/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java +++ b/src/main/java/net/minecraft/world/level/dimension/end/EndDragonFight.java -@@ -68,7 +68,8 @@ public class EndDragonFight { +@@ -69,7 +69,8 @@ public class EndDragonFight { private static final int GATEWAY_DISTANCE = 96; public static final int DRAGON_SPAWN_Y = 128; - private static final Predicate VALID_PLAYER = EntitySelector.ENTITY_STILL_ALIVE.and(EntitySelector.withinDistance(0.0D, 128.0D, 0.0D, 192.0D)); + private final Predicate validPlayer; - public final ServerBossEvent dragonEvent = (ServerBossEvent)(new ServerBossEvent(Component.translatable("entity.minecraft.ender_dragon"), BossEvent.BossBarColor.PINK, BossEvent.BossBarOverlay.PROGRESS)).setPlayBossMusic(true).setCreateWorldFog(true); + private static final Component DEFAULT_BOSS_EVENT_NAME = Component.translatable("entity.minecraft.ender_dragon"); // Paper + public final ServerBossEvent dragonEvent = (ServerBossEvent)(new ServerBossEvent(DEFAULT_BOSS_EVENT_NAME, BossEvent.BossBarColor.PINK, BossEvent.BossBarOverlay.PROGRESS)).setPlayBossMusic(true).setCreateWorldFog(true); // Paper public final ServerLevel level; + private final BlockPos origin; private final ObjectArrayList gateways = new ObjectArrayList<>(); - private final BlockPattern exitPortalPattern; -@@ -450,6 +451,10 @@ public class EndDragonFight { +@@ -443,6 +444,10 @@ public class EndDragonFight { this.ticksSinceDragonSeen = 0; if (dragon.hasCustomName()) { this.dragonEvent.setName(dragon.getDisplayName()); diff --git a/patches/unapplied/server/0915-fix-MC-252817-green-map-markers-do-not-disappear.patch b/patches/server/0891-fix-MC-252817-green-map-markers-do-not-disappear.patch similarity index 93% rename from patches/unapplied/server/0915-fix-MC-252817-green-map-markers-do-not-disappear.patch rename to patches/server/0891-fix-MC-252817-green-map-markers-do-not-disappear.patch index 0f696efd4d..e5593afbc6 100644 --- a/patches/unapplied/server/0915-fix-MC-252817-green-map-markers-do-not-disappear.patch +++ b/patches/server/0891-fix-MC-252817-green-map-markers-do-not-disappear.patch @@ -6,7 +6,7 @@ Subject: [PATCH] fix MC-252817 (green map markers do not disappear). this bug is caused by the fact that the itemframe's item is set to empty before the green marker is requested to be removed. this is fixed by getting the mapid from this method's parameter, rather than the air block now stored by the item frame. diff --git a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java -index bfe94f6607e35db4df75d6061a88bce2a80b86c8..30aec9dff249ae629b22318e52902361a9fa4099 100644 +index a86472cce8e8fcde16d761842fe443a619f6e305..955316687e2e29ad75a0052317a7b0f89034c82a 100644 --- a/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java +++ b/src/main/java/net/minecraft/world/entity/decoration/ItemFrame.java @@ -288,7 +288,9 @@ public class ItemFrame extends HangingEntity { @@ -17,7 +17,7 @@ index bfe94f6607e35db4df75d6061a88bce2a80b86c8..30aec9dff249ae629b22318e52902361 + // Paper start - fix MC-252817 (green map markers do not disappear) + this.getFramedMapIdFromItem(itemstack).ifPresent((i) -> { + // Paper end - MapItemSavedData worldmap = MapItem.getSavedData(i, this.level); + MapItemSavedData worldmap = MapItem.getSavedData(i, this.level()); if (worldmap != null) { @@ -306,7 +308,12 @@ public class ItemFrame extends HangingEntity { diff --git a/patches/unapplied/server/0916-Add-Player-Warden-Warning-API.patch b/patches/server/0892-Add-Player-Warden-Warning-API.patch similarity index 93% rename from patches/unapplied/server/0916-Add-Player-Warden-Warning-API.patch rename to patches/server/0892-Add-Player-Warden-Warning-API.patch index 42d71b377d..bf6a08293c 100644 --- a/patches/unapplied/server/0916-Add-Player-Warden-Warning-API.patch +++ b/patches/server/0892-Add-Player-Warden-Warning-API.patch @@ -10,10 +10,10 @@ public net.minecraft.world.entity.monster.warden.WardenSpawnTracker cooldownTick public net.minecraft.world.entity.monster.warden.WardenSpawnTracker increaseWarningLevel()V diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 405634ea82f48ccaa170b9de27140573cb647608..ff223f33c3fa712ed2c775836412cfed3624137a 100644 +index 4b8299c14518fbc658fc30c833e8a870d5e97021..c0ecdf15124e1694a8fa65164a82bf56a18917a8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -3150,6 +3150,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -3123,6 +3123,41 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void showElderGuardian(boolean silent) { if (getHandle().connection != null) getHandle().connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.GUARDIAN_ELDER_EFFECT, silent ? 0F : 1F)); } diff --git a/patches/unapplied/server/0917-More-vanilla-friendly-methods-to-update-trades.patch b/patches/server/0893-More-vanilla-friendly-methods-to-update-trades.patch similarity index 91% rename from patches/unapplied/server/0917-More-vanilla-friendly-methods-to-update-trades.patch rename to patches/server/0893-More-vanilla-friendly-methods-to-update-trades.patch index 03775bc1a0..54dfe176f7 100644 --- a/patches/unapplied/server/0917-More-vanilla-friendly-methods-to-update-trades.patch +++ b/patches/server/0893-More-vanilla-friendly-methods-to-update-trades.patch @@ -5,10 +5,10 @@ Subject: [PATCH] More vanilla friendly methods to update trades diff --git a/src/main/java/net/minecraft/world/entity/npc/Villager.java b/src/main/java/net/minecraft/world/entity/npc/Villager.java -index 235e41ddd77e126648df81d9d187a1bd178e19fe..6023b9eb3001e1a98ab8b970d853c4e7c7603f4d 100644 +index 4bef7abbed6b64c2f126c81af5484eff200e620f..e30d5ae3e2900f43d7cafde71b8196f26e872841 100644 --- a/src/main/java/net/minecraft/world/entity/npc/Villager.java +++ b/src/main/java/net/minecraft/world/entity/npc/Villager.java -@@ -935,6 +935,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -943,6 +943,12 @@ public class Villager extends AbstractVillager implements ReputationEventHandler @Override protected void updateTrades() { @@ -21,7 +21,7 @@ index 235e41ddd77e126648df81d9d187a1bd178e19fe..6023b9eb3001e1a98ab8b970d853c4e7 VillagerData villagerdata = this.getVillagerData(); Int2ObjectMap int2objectmap = (Int2ObjectMap) VillagerTrades.TRADES.get(villagerdata.getProfession()); -@@ -944,9 +950,11 @@ public class Villager extends AbstractVillager implements ReputationEventHandler +@@ -952,9 +958,11 @@ public class Villager extends AbstractVillager implements ReputationEventHandler if (avillagertrades_imerchantrecipeoption != null) { MerchantOffers merchantrecipelist = this.getOffers(); @@ -35,7 +35,7 @@ index 235e41ddd77e126648df81d9d187a1bd178e19fe..6023b9eb3001e1a98ab8b970d853c4e7 public void gossip(ServerLevel world, Villager villager, long time) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java -index a1705b0fae9574d4ce2bb815ea57a35f8551c3a6..4e880409b06086568627f3e930159f1abb979984 100644 +index e6fcdbabde66f4707627fc8c3012aa20de8e34e3..e986767316a717bdbdff7a9ccaaeba068ab2a6d8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java @@ -100,6 +100,34 @@ public class CraftVillager extends CraftAbstractVillager implements Villager { diff --git a/patches/unapplied/server/0918-Add-paper-dumplisteners-command.patch b/patches/server/0894-Add-paper-dumplisteners-command.patch similarity index 100% rename from patches/unapplied/server/0918-Add-paper-dumplisteners-command.patch rename to patches/server/0894-Add-paper-dumplisteners-command.patch diff --git a/patches/unapplied/server/0919-check-global-player-list-where-appropriate.patch b/patches/server/0895-check-global-player-list-where-appropriate.patch similarity index 74% rename from patches/unapplied/server/0919-check-global-player-list-where-appropriate.patch rename to patches/server/0895-check-global-player-list-where-appropriate.patch index 9cf8b0a7ed..35d7c35b5c 100644 --- a/patches/unapplied/server/0919-check-global-player-list-where-appropriate.patch +++ b/patches/server/0895-check-global-player-list-where-appropriate.patch @@ -7,10 +7,10 @@ Makes certain entities check all players when searching for a player instead of just checking players in their world. diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 066744d37670e0ee4254a34743887416412b0065..309ef1b2181eae609737212a50d037a1565daf86 100644 +index 83267ae18c606116cf0c0b55549dc732f269a5d7..a97926b5d36c92d5696c6b7a547ada30d652afbd 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -2655,4 +2655,12 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -2724,4 +2724,12 @@ public class ServerLevel extends Level implements WorldGenLevel { entity.updateDynamicGameEventListener(DynamicGameEventListener::move); } } @@ -24,10 +24,10 @@ index 066744d37670e0ee4254a34743887416412b0065..309ef1b2181eae609737212a50d037a1 + // Paper end } diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index f1dc127a92fe13e92f9af660f98afcdd78f6cbd5..a7559d76d0ad4b5fe08a071567a195d19d47163b 100644 +index de67999120b52daafa4fb40dd32a348f39ce8df3..cbe672e213b53b1939ba0dcb2e9640ec16d83807 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -3571,7 +3571,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -3620,7 +3620,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } public void onItemPickup(ItemEntity item) { @@ -36,21 +36,8 @@ index f1dc127a92fe13e92f9af660f98afcdd78f6cbd5..a7559d76d0ad4b5fe08a071567a195d1 if (entity instanceof ServerPlayer) { CriteriaTriggers.THROWN_ITEM_PICKED_UP_BY_ENTITY.trigger((ServerPlayer) entity, item.getItem(), this); -diff --git a/src/main/java/net/minecraft/world/entity/animal/Animal.java b/src/main/java/net/minecraft/world/entity/animal/Animal.java -index 6216513805add7c8f52e1ed6c77e2d26786b3ab5..3c4d142e982c34a23bdb5da1f51c8dcacc0532c1 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/Animal.java -+++ b/src/main/java/net/minecraft/world/entity/animal/Animal.java -@@ -210,7 +210,7 @@ public abstract class Animal extends AgeableMob { - if (this.loveCause == null) { - return null; - } else { -- Player entityhuman = this.level.getPlayerByUUID(this.loveCause); -+ Player entityhuman = this.level.getGlobalPlayerByUUID(this.loveCause); // Paper - check all players - - return entityhuman instanceof ServerPlayer ? (ServerPlayer) entityhuman : null; - } diff --git a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java -index aabedf25fa40ffa0d7b378c6006928f806ef0fa6..71a36cf9b976443cca9ab63cd0eb23253f638562 100644 +index 59ed51907fc21784b37a55ee01207d8a730ae29a..25ed5571b24e590bc95056020d84496492b53298 100644 --- a/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java +++ b/src/main/java/net/minecraft/world/entity/monster/ZombieVillager.java @@ -269,7 +269,7 @@ public class ZombieVillager extends Zombie implements VillagerDataHolder { @@ -79,10 +66,10 @@ index d860ddae508f53d06f74d8ae0efdfc500c1ddf07..3b959f42d958bf0f426853aee56753d6 + // Paper end } diff --git a/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java -index 38b825cab15e19e1fe11afad0b8e325597f2f457..25791572eab50de9b9a1fc6b8b3b3ca7df7493e2 100644 +index faad948f089575e4988d989790cc1dd13f8a79cd..8a4c51204c591b420b25684d680ac1acb0cf4e12 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/SculkShriekerBlockEntity.java -@@ -101,6 +101,13 @@ public class SculkShriekerBlockEntity extends BlockEntity implements VibrationLi +@@ -100,6 +100,13 @@ public class SculkShriekerBlockEntity extends BlockEntity implements GameEventLi @Nullable public static ServerPlayer tryGetPlayer(@Nullable Entity entity) { diff --git a/patches/unapplied/server/0920-Fix-async-entity-add-due-to-fungus-trees.patch b/patches/server/0896-Fix-async-entity-add-due-to-fungus-trees.patch similarity index 95% rename from patches/unapplied/server/0920-Fix-async-entity-add-due-to-fungus-trees.patch rename to patches/server/0896-Fix-async-entity-add-due-to-fungus-trees.patch index 5209787a11..fab31f58d5 100644 --- a/patches/unapplied/server/0920-Fix-async-entity-add-due-to-fungus-trees.patch +++ b/patches/server/0896-Fix-async-entity-add-due-to-fungus-trees.patch @@ -17,7 +17,7 @@ index 52fd12c474c01f3b53d0f6596b7a6fafee52bd0d..877498729c66de9aa6a27c9148f7494d BlockEntity tileentity = iblockdata.hasBlockEntity() ? this.getBlockEntity(pos) : null; diff --git a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java -index 3742e0b32e29d7dde0c2bd3d80348f8fb7b8aaf0..9868c1e58a41126b2b0f1014c74329015152ded6 100644 +index 94f21c6acaee5a632b6adb4e77488bb2e385fbea..cf6e22889437aa18fed66dc6a1b8394e6f21dcbc 100644 --- a/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java +++ b/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java @@ -401,10 +401,10 @@ public abstract class CraftRegionAccessor implements RegionAccessor { diff --git a/patches/unapplied/server/0921-ItemStack-damage-API.patch b/patches/server/0897-ItemStack-damage-API.patch similarity index 97% rename from patches/unapplied/server/0921-ItemStack-damage-API.patch rename to patches/server/0897-ItemStack-damage-API.patch index 1bab672181..3d5c08cf7b 100644 --- a/patches/unapplied/server/0921-ItemStack-damage-API.patch +++ b/patches/server/0897-ItemStack-damage-API.patch @@ -11,7 +11,7 @@ the logic associated with damaging them public net.minecraft.world.entity.LivingEntity entityEventForEquipmentBreak(Lnet/minecraft/world/entity/EquipmentSlot;)B diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index f6e5de14a674a2dd7841c1e03f136cc48e2352cf..b5d4efe6fc177622fcf03c458c33bf770af87ff2 100644 +index 351869735644c984090e1ac571b5ff118ecae9bc..56b55e9217c514fbdf44a7e2f44769ff4e8ccee1 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -996,6 +996,53 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/patches/unapplied/server/0922-Friction-API.patch b/patches/server/0898-Friction-API.patch similarity index 86% rename from patches/unapplied/server/0922-Friction-API.patch rename to patches/server/0898-Friction-API.patch index 78de584ef6..60a8da9ebb 100644 --- a/patches/unapplied/server/0922-Friction-API.patch +++ b/patches/server/0898-Friction-API.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Friction API diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index a7559d76d0ad4b5fe08a071567a195d19d47163b..bc108e721cf6a7713449caf821635be736b7a98c 100644 +index cbe672e213b53b1939ba0dcb2e9640ec16d83807..7a6caded7f5c711e96fa0d6b177923c2a49004e4 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -260,6 +260,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -263,6 +263,7 @@ public abstract class LivingEntity extends Entity implements Attackable { public boolean bukkitPickUpLoot; public org.bukkit.craftbukkit.entity.CraftLivingEntity getBukkitLivingEntity() { return (org.bukkit.craftbukkit.entity.CraftLivingEntity) super.getBukkitEntity(); } // Paper public boolean silentDeath = false; // Paper - mark entity as dying silently for cancellable death event @@ -16,7 +16,7 @@ index a7559d76d0ad4b5fe08a071567a195d19d47163b..bc108e721cf6a7713449caf821635be7 @Override public float getBukkitYaw() { -@@ -700,7 +701,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -718,7 +719,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } public boolean shouldDiscardFriction() { @@ -25,7 +25,7 @@ index a7559d76d0ad4b5fe08a071567a195d19d47163b..bc108e721cf6a7713449caf821635be7 } public void setDiscardFriction(boolean noDrag) { -@@ -744,6 +745,11 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -762,6 +763,11 @@ public abstract class LivingEntity extends Entity implements Attackable { @Override public void addAdditionalSaveData(CompoundTag nbt) { @@ -37,7 +37,7 @@ index a7559d76d0ad4b5fe08a071567a195d19d47163b..bc108e721cf6a7713449caf821635be7 nbt.putFloat("Health", this.getHealth()); nbt.putShort("HurtTime", (short) this.hurtTime); nbt.putInt("HurtByTimestamp", this.lastHurtByMobTimestamp); -@@ -786,6 +792,15 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -804,6 +810,15 @@ public abstract class LivingEntity extends Entity implements Attackable { absorptionAmount = 0; } this.setAbsorptionAmount(absorptionAmount); @@ -51,10 +51,10 @@ index a7559d76d0ad4b5fe08a071567a195d19d47163b..bc108e721cf6a7713449caf821635be7 + } + } // Paper end - if (nbt.contains("Attributes", 9) && this.level != null && !this.level.isClientSide) { + if (nbt.contains("Attributes", 9) && this.level() != null && !this.level().isClientSide) { this.getAttributes().load(nbt.getList("Attributes", 10)); diff --git a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java -index 2be70d950be48014c4e9792adfc1d05da5aa6a59..d47b3ac633e7936d30abfda6fc46c2c7412d76fe 100644 +index 6ee24fbe6528f91306a0eb38b766f77b2228b4aa..d59841d65c76abd740e391cfdba09a0e167ec591 100644 --- a/src/main/java/net/minecraft/world/entity/item/ItemEntity.java +++ b/src/main/java/net/minecraft/world/entity/item/ItemEntity.java @@ -54,6 +54,7 @@ public class ItemEntity extends Entity implements TraceableEntity { @@ -69,16 +69,16 @@ index 2be70d950be48014c4e9792adfc1d05da5aa6a59..d47b3ac633e7936d30abfda6fc46c2c7 this.move(MoverType.SELF, this.getDeltaMovement()); float f1 = 0.98F; -- if (this.onGround) { +- if (this.onGround()) { + // Paper start + if (frictionState == net.kyori.adventure.util.TriState.FALSE) { + f1 = 1F; -+ } else if (this.onGround) { ++ } else if (this.onGround()) { + // Paper end - f1 = this.level.getBlockState(BlockPos.containing(this.getX(), this.getY() - 1.0D, this.getZ())).getBlock().getFriction() * 0.98F; + f1 = this.level().getBlockState(this.getBlockPosBelowThatAffectsMyMovement()).getBlock().getFriction() * 0.98F; } -@@ -360,6 +365,11 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -364,6 +369,11 @@ public class ItemEntity extends Entity implements TraceableEntity { @Override public void addAdditionalSaveData(CompoundTag nbt) { @@ -90,7 +90,7 @@ index 2be70d950be48014c4e9792adfc1d05da5aa6a59..d47b3ac633e7936d30abfda6fc46c2c7 nbt.putShort("Health", (short) this.health); nbt.putShort("Age", (short) this.age); nbt.putShort("PickupDelay", (short) this.pickupDelay); -@@ -393,6 +403,17 @@ public class ItemEntity extends Entity implements TraceableEntity { +@@ -397,6 +407,17 @@ public class ItemEntity extends Entity implements TraceableEntity { this.thrower = nbt.getUUID("Thrower"); } @@ -132,7 +132,7 @@ index e9946edf568db010e4ccb9fe7755709ed7b8310f..a925b5c490e7129b27370aa57b5fad1c public int getHealth() { return item.health; diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index b5d4efe6fc177622fcf03c458c33bf770af87ff2..daf6653f30337ef88bad9decb7d73c45f951b270 100644 +index 56b55e9217c514fbdf44a7e2f44769ff4e8ccee1..2d5f407b6979f39e5b611f37578d681a49eaea03 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -1043,6 +1043,18 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/patches/unapplied/server/0923-Ability-to-control-player-s-insomnia-and-phantoms.patch b/patches/server/0899-Ability-to-control-player-s-insomnia-and-phantoms.patch similarity index 92% rename from patches/unapplied/server/0923-Ability-to-control-player-s-insomnia-and-phantoms.patch rename to patches/server/0899-Ability-to-control-player-s-insomnia-and-phantoms.patch index a2a1265494..736015494c 100644 --- a/patches/unapplied/server/0923-Ability-to-control-player-s-insomnia-and-phantoms.patch +++ b/patches/server/0899-Ability-to-control-player-s-insomnia-and-phantoms.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Ability to control player's insomnia and phantoms diff --git a/src/main/java/net/minecraft/world/entity/EntitySelector.java b/src/main/java/net/minecraft/world/entity/EntitySelector.java -index a00c3d96f2fc7131d1f4afa7af4e41ace3cfce89..72abebff2018cde2922e97ad6478f93da9aed3ec 100644 +index f6e5406f84410ab9c177213157106739a2074cf8..f6ab024266e4fd36566a23db0c9af740dd7fa8fc 100644 --- a/src/main/java/net/minecraft/world/entity/EntitySelector.java +++ b/src/main/java/net/minecraft/world/entity/EntitySelector.java @@ -27,7 +27,18 @@ public final class EntitySelector { @@ -29,10 +29,10 @@ index a00c3d96f2fc7131d1f4afa7af4e41ace3cfce89..72abebff2018cde2922e97ad6478f93d private EntitySelector() {} // Paper start diff --git a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java -index 66ac41d8fce4176feecf9a7e89e15244f47d261d..e8ae4449696d73c8c9b8b27d4d2e20db933a72cc 100644 +index 8c767aba1e800c41412e92afe9cb09cfab1c6ffc..bc7648dbc132551dc6591ab49a1919a623c30f60 100644 --- a/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java +++ b/src/main/java/net/minecraft/world/level/levelgen/PhantomSpawner.java -@@ -35,13 +35,22 @@ public class PhantomSpawner implements CustomSpawner { +@@ -33,13 +33,22 @@ public class PhantomSpawner implements CustomSpawner { } else if (!world.getGameRules().getBoolean(GameRules.RULE_DOINSOMNIA)) { return 0; } else { @@ -56,7 +56,7 @@ index 66ac41d8fce4176feecf9a7e89e15244f47d261d..e8ae4449696d73c8c9b8b27d4d2e20db if (world.getSkyDarken() < 5 && world.dimensionType().hasSkyLight()) { return 0; } else { -@@ -62,7 +71,7 @@ public class PhantomSpawner implements CustomSpawner { +@@ -60,7 +69,7 @@ public class PhantomSpawner implements CustomSpawner { int j = Mth.clamp(serverstatisticmanager.getValue(Stats.CUSTOM.get(Stats.TIME_SINCE_REST)), 1, Integer.MAX_VALUE); boolean flag2 = true; diff --git a/patches/unapplied/server/0924-Fix-player-kick-on-shutdown.patch b/patches/server/0900-Fix-player-kick-on-shutdown.patch similarity index 100% rename from patches/unapplied/server/0924-Fix-player-kick-on-shutdown.patch rename to patches/server/0900-Fix-player-kick-on-shutdown.patch diff --git a/patches/unapplied/server/0925-Sync-offhand-slot-in-menus.patch b/patches/server/0901-Sync-offhand-slot-in-menus.patch similarity index 92% rename from patches/unapplied/server/0925-Sync-offhand-slot-in-menus.patch rename to patches/server/0901-Sync-offhand-slot-in-menus.patch index 35bcdf17eb..51357fa9d0 100644 --- a/patches/unapplied/server/0925-Sync-offhand-slot-in-menus.patch +++ b/patches/server/0901-Sync-offhand-slot-in-menus.patch @@ -8,10 +8,10 @@ offhand slot isn't sent. This is not correct because you *can* put stuff into th by pressing the offhand swap item diff --git a/src/main/java/net/minecraft/server/level/ServerPlayer.java b/src/main/java/net/minecraft/server/level/ServerPlayer.java -index 6fdb22809195fc2ba95ee22a5523eeabc2f2c4da..c4a070d445a0d834152eb53864eb08f4f90947ca 100644 +index 4eb2679bddf89cc1c72ab561fd7e1be8423d746b..bf512f73b6c4f318b514fa998cfe142130ea53a1 100644 --- a/src/main/java/net/minecraft/server/level/ServerPlayer.java +++ b/src/main/java/net/minecraft/server/level/ServerPlayer.java -@@ -299,6 +299,13 @@ public class ServerPlayer extends Player { +@@ -340,6 +340,13 @@ public class ServerPlayer extends Player { } @@ -26,7 +26,7 @@ index 6fdb22809195fc2ba95ee22a5523eeabc2f2c4da..c4a070d445a0d834152eb53864eb08f4 public void sendSlotChange(AbstractContainerMenu handler, int slot, ItemStack stack) { ServerPlayer.this.connection.send(new ClientboundContainerSetSlotPacket(handler.containerId, handler.incrementStateId(), slot, stack)); diff --git a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java -index 0954e834ca4c777de61f5d45812008cc7c2ac733..c84908095a93d42826b21bf5f3490410fb0a5708 100644 +index b9e8d8b91b307e37900d0d2e8c823e63faed7cea..706b354ac9a1a6a4a1e61b2a109180d1dd22bbbd 100644 --- a/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java +++ b/src/main/java/net/minecraft/world/inventory/AbstractContainerMenu.java @@ -200,6 +200,7 @@ public abstract class AbstractContainerMenu { diff --git a/patches/unapplied/server/0926-Player-Entity-Tracking-Events.patch b/patches/server/0902-Player-Entity-Tracking-Events.patch similarity index 90% rename from patches/unapplied/server/0926-Player-Entity-Tracking-Events.patch rename to patches/server/0902-Player-Entity-Tracking-Events.patch index 1e82fc3864..c7e603e107 100644 --- a/patches/unapplied/server/0926-Player-Entity-Tracking-Events.patch +++ b/patches/server/0902-Player-Entity-Tracking-Events.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Player Entity Tracking Events diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 06c22d56357d215922195b3ba9149427e61e412d..b93603dd0198719c6e6dca363328016ee824b8c8 100644 +index c588460cb26c4d723428a11fe3d360d81ae39433..fc31b564eacfac185434222883fe89e48de59288 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3901,9 +3901,21 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3997,9 +3997,21 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { EnchantmentHelper.doPostDamageEffects(attacker, target); } diff --git a/patches/unapplied/server/0927-Limit-pet-look-distance.patch b/patches/server/0903-Limit-pet-look-distance.patch similarity index 91% rename from patches/unapplied/server/0927-Limit-pet-look-distance.patch rename to patches/server/0903-Limit-pet-look-distance.patch index 8309939ccb..724bcbffa1 100644 --- a/patches/unapplied/server/0927-Limit-pet-look-distance.patch +++ b/patches/server/0903-Limit-pet-look-distance.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Limit pet look distance diff --git a/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java b/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java -index e4ecad5cca182ead780b1b4d78ea1e7be62bd1ca..4fe177c950c769f5c6e76b522019b5d5b78259a5 100644 +index 26cf3592ff8cb8d2429882fbd10cb3251481292a..13f96d7c1f2d920172f49fcd82d719f0416ffcee 100644 --- a/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java +++ b/src/main/java/net/minecraft/world/entity/ai/goal/FollowOwnerGoal.java @@ -93,7 +93,7 @@ public class FollowOwnerGoal extends Goal { diff --git a/patches/unapplied/server/0928-Properly-resend-entities.patch b/patches/server/0904-Properly-resend-entities.patch similarity index 89% rename from patches/unapplied/server/0928-Properly-resend-entities.patch rename to patches/server/0904-Properly-resend-entities.patch index 750e60cab6..a394b38e9d 100644 --- a/patches/unapplied/server/0928-Properly-resend-entities.patch +++ b/patches/server/0904-Properly-resend-entities.patch @@ -14,10 +14,10 @@ See: https://github.com/PaperMC/Paper/pull/1896 public net.minecraft.server.level.ChunkMap$TrackedEntity serverEntity diff --git a/src/main/java/net/minecraft/network/syncher/SynchedEntityData.java b/src/main/java/net/minecraft/network/syncher/SynchedEntityData.java -index a276aed4821eb992e0f20e2d2c6229e0b96eef73..ff7ba7a161cfed7521354bc6e3f21ba0f17f3760 100644 +index d088479d160dbd2fc90b48a30553be141db8eef2..9e7a9e2fc19a0ac7a80a07efacf9cd2366826fa3 100644 --- a/src/main/java/net/minecraft/network/syncher/SynchedEntityData.java +++ b/src/main/java/net/minecraft/network/syncher/SynchedEntityData.java -@@ -249,14 +249,46 @@ public class SynchedEntityData { +@@ -253,14 +253,46 @@ public class SynchedEntityData { // CraftBukkit start public void refresh(ServerPlayer to) { if (!this.isEmpty()) { @@ -66,10 +66,10 @@ index a276aed4821eb992e0f20e2d2c6229e0b96eef73..ff7ba7a161cfed7521354bc6e3f21ba0 public static class DataItem { diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 7810ab5bd1791ff5323b7302a6351a987b93bae3..734a973ec4e5a6f24b430941b5c3ba6bcc296be5 100644 +index f52b01bca1b4221b389b2e980f2f75b0f1eca077..9b00b18e5c80c69b0c44299b48cef1937168f38a 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2798,7 +2798,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2795,7 +2795,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic // Entity in bucket - SPIGOT-4048 and SPIGOT-6859a if ((entity instanceof Bucketable && entity instanceof LivingEntity && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) { @@ -79,11 +79,11 @@ index 7810ab5bd1791ff5323b7302a6351a987b93bae3..734a973ec4e5a6f24b430941b5c3ba6b } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 168c53eee5bbf84c11a0b0f654e4540e4d082c2a..0011e18963b12512464be10798006c641595988d 100644 +index f937dbd6a19b595e3660e598e52bf37f8cc72d13..d3e259eb22202133d54c4be58c5121735fe412ed 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -364,7 +364,7 @@ public abstract class PlayerList { - ((ServerLevel)player.level).getChunkSource().chunkMap.addEntity(player); // Paper - track entity now +@@ -371,7 +371,7 @@ public abstract class PlayerList { + ((ServerLevel)player.level()).getChunkSource().chunkMap.addEntity(player); // Paper - track entity now // CraftBukkit end - player.getEntityData().refresh(player); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn @@ -92,7 +92,7 @@ index 168c53eee5bbf84c11a0b0f654e4540e4d082c2a..0011e18963b12512464be10798006c64 this.sendLevelInfo(player, worldserver1); diff --git a/src/main/java/net/minecraft/world/entity/animal/Bucketable.java b/src/main/java/net/minecraft/world/entity/animal/Bucketable.java -index 09654dd8895669109246f9bff36ab5ff5f533f65..9695a80c45b36c84f5fdef651b26a2c09d7f1f9b 100644 +index 37596c7b65f280be00e8e59ae18bd1aceae21080..eca18540aeb0b0d4098477d73b14c78a7bf9f455 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Bucketable.java +++ b/src/main/java/net/minecraft/world/entity/animal/Bucketable.java @@ -109,8 +109,7 @@ public interface Bucketable { diff --git a/patches/unapplied/server/0929-Fixes-and-additions-to-the-SpawnReason-API.patch b/patches/server/0905-Fixes-and-additions-to-the-SpawnReason-API.patch similarity index 86% rename from patches/unapplied/server/0929-Fixes-and-additions-to-the-SpawnReason-API.patch rename to patches/server/0905-Fixes-and-additions-to-the-SpawnReason-API.patch index 8a818be552..36555fd820 100644 --- a/patches/unapplied/server/0929-Fixes-and-additions-to-the-SpawnReason-API.patch +++ b/patches/server/0905-Fixes-and-additions-to-the-SpawnReason-API.patch @@ -8,7 +8,7 @@ Fixes some wrong reasons, and adds missing spawn reasons for entities. Co-authored-by: Doc diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java -index 51274302ad0d500b9291c000d457be24caf52a74..fa10d60cf7f80c429690f20c3bccdd8bbe7752e8 100644 +index c2aafe4e1afec2793735bf7b0bbd6af94ad393f8..ab20be593e25a1fd32463bf5f26534595b49a4ec 100644 --- a/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java @@ -348,7 +348,7 @@ public class EntityType implements FeatureElement, EntityTypeT @@ -21,23 +21,23 @@ index 51274302ad0d500b9291c000d457be24caf52a74..fa10d60cf7f80c429690f20c3bccdd8b @Nullable diff --git a/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java b/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java -index 6afe37e42d88701af38df5793a9ea9d7d2cda5c5..c72ab3c9f7cb20f22b051981fe1fc41965d2b2af 100644 +index 9652e3385ad10e5d825dd141f6be3522c596916d..6256ce68d6ecada66745fb09360cba2bf991360c 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java +++ b/src/main/java/net/minecraft/world/entity/projectile/DragonFireball.java @@ -54,7 +54,7 @@ public class DragonFireball extends AbstractHurtingProjectile { if (new com.destroystokyo.paper.event.entity.EnderDragonFireballHitEvent((org.bukkit.entity.DragonFireball) this.getBukkitEntity(), list.stream().map(LivingEntity::getBukkitLivingEntity).collect(java.util.stream.Collectors.toList()), (org.bukkit.entity.AreaEffectCloud) areaEffectCloud.getBukkitEntity()).callEvent()) { // Paper - this.level.levelEvent(2006, this.blockPosition(), this.isSilent() ? -1 : 1); -- this.level.addFreshEntity(areaEffectCloud); -+ this.level.addFreshEntity(areaEffectCloud, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.EXPLOSION); // Paper + this.level().levelEvent(2006, this.blockPosition(), this.isSilent() ? -1 : 1); +- this.level().addFreshEntity(areaEffectCloud); ++ this.level().addFreshEntity(areaEffectCloud, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.EXPLOSION); // Paper } else areaEffectCloud.discard(); // Paper this.discard(); } diff --git a/src/main/java/net/minecraft/world/level/block/CarvedPumpkinBlock.java b/src/main/java/net/minecraft/world/level/block/CarvedPumpkinBlock.java -index 86365234d6c0ff5f0d5545a6ecc0bb08e6609108..05112bc416019daba885a3de1b7f96177665135f 100644 +index 41a74780ce9edc8442732b04785396c245ee5c32..23c487e295b3b736d8800f0c884324c9b18a5373 100644 --- a/src/main/java/net/minecraft/world/level/block/CarvedPumpkinBlock.java +++ b/src/main/java/net/minecraft/world/level/block/CarvedPumpkinBlock.java -@@ -90,7 +90,17 @@ public class CarvedPumpkinBlock extends HorizontalDirectionalBlock implements Eq +@@ -85,7 +85,17 @@ public class CarvedPumpkinBlock extends HorizontalDirectionalBlock { // clearPatternBlocks(world, shapedetector_shapedetectorcollection); // CraftBukkit - moved down entity.moveTo((double) pos.getX() + 0.5D, (double) pos.getY() + 0.05D, (double) pos.getZ() + 0.5D, 0.0F, 0.0F); // CraftBukkit start diff --git a/patches/unapplied/server/0930-fix-Instruments.patch b/patches/server/0906-fix-Instruments.patch similarity index 95% rename from patches/unapplied/server/0930-fix-Instruments.patch rename to patches/server/0906-fix-Instruments.patch index fe391bb96c..452cf079c4 100644 --- a/patches/unapplied/server/0930-fix-Instruments.patch +++ b/patches/server/0906-fix-Instruments.patch @@ -6,10 +6,10 @@ Subject: [PATCH] fix Instruments properly handle Player#playNote diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index ff223f33c3fa712ed2c775836412cfed3624137a..53f2c187d6a16ba5566d74619bfaf058c684c0b7 100644 +index c0ecdf15124e1694a8fa65164a82bf56a18917a8..f734089dde9321387a9fd5bdc43341624c680872 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -777,62 +777,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -744,62 +744,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player { public void playNote(Location loc, Instrument instrument, Note note) { if (this.getHandle().connection == null) return; diff --git a/patches/unapplied/server/0931-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch b/patches/server/0907-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch similarity index 90% rename from patches/unapplied/server/0931-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch rename to patches/server/0907-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch index cef783939a..f4f36a8f11 100644 --- a/patches/unapplied/server/0931-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch +++ b/patches/server/0907-Improve-inlining-for-some-hot-BlockBehavior-and-Flui.patch @@ -6,10 +6,10 @@ 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 cd939384f022609c96b055c25db7e098e4256336..505503a3f59d4b747649275c6f6faa504b7c7b64 100644 +index 27680befd64967ef3c2ae0f35c9e7bd68d474314..de4c1e4701236e7d5ec77339c51ad6a9d8288bb6 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 -@@ -876,15 +876,15 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -963,15 +963,15 @@ public abstract class BlockBehaviour implements FeatureElement { return this.shapeExceedsCube; // Paper - moved into shape cache init } @@ -28,7 +28,7 @@ index cd939384f022609c96b055c25db7e098e4256336..505503a3f59d4b747649275c6f6faa50 return this.isAir; } -@@ -958,7 +958,7 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -1055,7 +1055,7 @@ public abstract class BlockBehaviour implements FeatureElement { } } @@ -37,7 +37,7 @@ index cd939384f022609c96b055c25db7e098e4256336..505503a3f59d4b747649275c6f6faa50 return this.canOcclude; } -@@ -1155,11 +1155,11 @@ public abstract class BlockBehaviour implements FeatureElement { +@@ -1251,11 +1251,11 @@ public abstract class BlockBehaviour implements FeatureElement { return this.getBlock() == block; } diff --git a/patches/unapplied/server/0933-Fix-inconsistencies-in-dispense-events-regarding-sta.patch b/patches/server/0908-Fix-inconsistencies-in-dispense-events-regarding-sta.patch similarity index 91% rename from patches/unapplied/server/0933-Fix-inconsistencies-in-dispense-events-regarding-sta.patch rename to patches/server/0908-Fix-inconsistencies-in-dispense-events-regarding-sta.patch index 01f0b970d7..923b2ffa50 100644 --- a/patches/unapplied/server/0933-Fix-inconsistencies-in-dispense-events-regarding-sta.patch +++ b/patches/server/0908-Fix-inconsistencies-in-dispense-events-regarding-sta.patch @@ -47,19 +47,19 @@ index 2542cf94ac76871f4ff02c3524e8606c96f50cc7..309ad5a1da6b3a297d5526cd9247359a } diff --git a/src/main/java/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java -index eb55015f4c867fbf08430288744f58a3b9d86e89..958134519befadc27a5b647caf64acf272ee2db4 100644 +index 03baafa6884bba08c2d7646706a5480baf009d87..573244877f096c4ff4c68f7fcfd21f7423da1104 100644 --- a/src/main/java/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java -@@ -53,7 +53,7 @@ public class BoatDispenseItemBehavior extends DefaultDispenseItemBehavior { +@@ -55,7 +55,7 @@ public class BoatDispenseItemBehavior extends DefaultDispenseItemBehavior { - // EntityBoat entityboat = new EntityBoat(worldserver, d0, d1 + d3, d2); + // Object object = this.isChestBoat ? new ChestBoat(worldserver, d1, d2 + d4, d3) : new EntityBoat(worldserver, d1, d2 + d4, d3); // CraftBukkit start - ItemStack itemstack1 = stack.split(1); + ItemStack itemstack1 = stack.copyWithCount(1); // Paper - shrink at end and single item in event org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ()); CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1); -@@ -63,12 +63,13 @@ public class BoatDispenseItemBehavior extends DefaultDispenseItemBehavior { +@@ -65,12 +65,13 @@ public class BoatDispenseItemBehavior extends DefaultDispenseItemBehavior { } if (event.isCancelled()) { @@ -75,7 +75,7 @@ index eb55015f4c867fbf08430288744f58a3b9d86e89..958134519befadc27a5b647caf64acf2 // Chain to handler for new item ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem()); DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem()); -@@ -83,8 +84,7 @@ public class BoatDispenseItemBehavior extends DefaultDispenseItemBehavior { +@@ -85,8 +86,7 @@ public class BoatDispenseItemBehavior extends DefaultDispenseItemBehavior { ((Boat) object).setVariant(this.type); ((Boat) object).setYRot(enumdirection.toYRot()); @@ -86,10 +86,10 @@ index eb55015f4c867fbf08430288744f58a3b9d86e89..958134519befadc27a5b647caf64acf2 } diff --git a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java -index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca9448d55d 100644 +index 876f44845a02b02c93233b302c7306eff40f1468..b4f5dbe9022dd20437c15c4f6fbe2ac06dacbadb 100644 --- a/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/DispenseItemBehavior.java -@@ -218,7 +218,7 @@ public interface DispenseItemBehavior { +@@ -217,7 +217,7 @@ public interface DispenseItemBehavior { // CraftBukkit start ServerLevel worldserver = pointer.getLevel(); @@ -98,7 +98,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ()); CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1); -@@ -228,12 +228,13 @@ public interface DispenseItemBehavior { +@@ -227,12 +227,13 @@ public interface DispenseItemBehavior { } if (event.isCancelled()) { @@ -114,7 +114,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca // Chain to handler for new item ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem()); DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem()); -@@ -250,7 +251,7 @@ public interface DispenseItemBehavior { +@@ -249,7 +250,7 @@ public interface DispenseItemBehavior { return ItemStack.EMPTY; } @@ -123,7 +123,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca // CraftBukkit end pointer.getLevel().gameEvent((Entity) null, GameEvent.ENTITY_PLACE, pointer.getPos()); return stack; -@@ -272,7 +273,7 @@ public interface DispenseItemBehavior { +@@ -271,7 +272,7 @@ public interface DispenseItemBehavior { ServerLevel worldserver = pointer.getLevel(); // CraftBukkit start @@ -132,7 +132,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ()); CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1); -@@ -282,12 +283,13 @@ public interface DispenseItemBehavior { +@@ -281,12 +282,13 @@ public interface DispenseItemBehavior { } if (event.isCancelled()) { @@ -148,7 +148,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca // Chain to handler for new item ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem()); DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem()); -@@ -304,7 +306,7 @@ public interface DispenseItemBehavior { +@@ -303,7 +305,7 @@ public interface DispenseItemBehavior { ArmorStand entityarmorstand = (ArmorStand) EntityType.ARMOR_STAND.spawn(worldserver, stack.getTag(), consumer, blockposition, MobSpawnType.DISPENSER, false, false); if (entityarmorstand != null) { @@ -157,7 +157,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca } return stack; -@@ -326,7 +328,7 @@ public interface DispenseItemBehavior { +@@ -325,7 +327,7 @@ public interface DispenseItemBehavior { if (!list.isEmpty()) { // CraftBukkit start @@ -166,7 +166,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca Level world = pointer.getLevel(); org.bukkit.block.Block block = world.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ()); CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1); -@@ -337,12 +339,13 @@ public interface DispenseItemBehavior { +@@ -336,12 +338,13 @@ public interface DispenseItemBehavior { } if (event.isCancelled()) { @@ -182,7 +182,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca // Chain to handler for new item ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem()); DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem()); -@@ -353,7 +356,7 @@ public interface DispenseItemBehavior { +@@ -352,7 +355,7 @@ public interface DispenseItemBehavior { } // CraftBukkit end ((Saddleable) list.get(0)).equipSaddle(SoundSource.BLOCKS, CraftItemStack.asNMSCopy(event.getItem())); // Paper - Fix saddles losing nbt data - MC-191591 @@ -191,7 +191,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca this.setSuccess(true); return stack; } else { -@@ -381,7 +384,7 @@ public interface DispenseItemBehavior { +@@ -380,7 +383,7 @@ public interface DispenseItemBehavior { } while (!entityhorseabstract.isArmor(stack) || entityhorseabstract.isWearingArmor() || !entityhorseabstract.isTamed()); // CraftBukkit start @@ -200,7 +200,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca Level world = pointer.getLevel(); org.bukkit.block.Block block = world.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ()); CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1); -@@ -392,12 +395,13 @@ public interface DispenseItemBehavior { +@@ -391,12 +394,13 @@ public interface DispenseItemBehavior { } if (event.isCancelled()) { @@ -216,7 +216,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca // Chain to handler for new item ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem()); DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem()); -@@ -407,6 +411,7 @@ public interface DispenseItemBehavior { +@@ -406,6 +410,7 @@ public interface DispenseItemBehavior { } } @@ -224,7 +224,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca entityhorseabstract.getSlot(401).set(CraftItemStack.asNMSCopy(event.getItem())); // CraftBukkit end this.setSuccess(true); -@@ -453,7 +458,7 @@ public interface DispenseItemBehavior { +@@ -452,7 +457,7 @@ public interface DispenseItemBehavior { entityhorsechestedabstract = (AbstractChestedHorse) iterator1.next(); // CraftBukkit start } while (!entityhorsechestedabstract.isTamed()); @@ -233,7 +233,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca Level world = pointer.getLevel(); org.bukkit.block.Block block = world.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ()); CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1); -@@ -464,10 +469,13 @@ public interface DispenseItemBehavior { +@@ -463,10 +468,13 @@ public interface DispenseItemBehavior { } if (event.isCancelled()) { @@ -247,7 +247,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca // Chain to handler for new item ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem()); DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem()); -@@ -479,7 +487,7 @@ public interface DispenseItemBehavior { +@@ -478,7 +486,7 @@ public interface DispenseItemBehavior { entityhorsechestedabstract.getSlot(499).set(CraftItemStack.asNMSCopy(event.getItem())); // CraftBukkit end @@ -256,7 +256,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca this.setSuccess(true); return stack; } -@@ -490,7 +498,7 @@ public interface DispenseItemBehavior { +@@ -489,7 +497,7 @@ public interface DispenseItemBehavior { Direction enumdirection = (Direction) pointer.getBlockState().getValue(DispenserBlock.FACING); // CraftBukkit start ServerLevel worldserver = pointer.getLevel(); @@ -265,7 +265,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ()); CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1); -@@ -500,12 +508,13 @@ public interface DispenseItemBehavior { +@@ -499,12 +507,13 @@ public interface DispenseItemBehavior { } if (event.isCancelled()) { @@ -281,7 +281,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca // Chain to handler for new item ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem()); DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem()); -@@ -522,7 +531,7 @@ public interface DispenseItemBehavior { +@@ -521,7 +530,7 @@ public interface DispenseItemBehavior { DispenseItemBehavior.setEntityPokingOutOfBlock(pointer, entityfireworks, enumdirection); entityfireworks.shoot((double) enumdirection.getStepX(), (double) enumdirection.getStepY(), (double) enumdirection.getStepZ(), 0.5F, 1.0F); pointer.getLevel().addFreshEntity(entityfireworks); @@ -290,7 +290,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca // CraftBukkit end return stack; } -@@ -547,7 +556,7 @@ public interface DispenseItemBehavior { +@@ -546,7 +555,7 @@ public interface DispenseItemBehavior { double d5 = randomsource.triangle((double) enumdirection.getStepZ(), 0.11485000000000001D); // CraftBukkit start @@ -299,7 +299,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ()); CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1); -@@ -557,12 +566,13 @@ public interface DispenseItemBehavior { +@@ -556,12 +565,13 @@ public interface DispenseItemBehavior { } if (event.isCancelled()) { @@ -315,7 +315,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca // Chain to handler for new item ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem()); DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem()); -@@ -577,7 +587,7 @@ public interface DispenseItemBehavior { +@@ -576,7 +586,7 @@ public interface DispenseItemBehavior { entitysmallfireball.projectileSource = new org.bukkit.craftbukkit.projectiles.CraftBlockProjectileSource((DispenserBlockEntity) pointer.getEntity()); worldserver.addFreshEntity(entitysmallfireball); @@ -324,16 +324,16 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca // CraftBukkit end return stack; } -@@ -622,7 +632,7 @@ public interface DispenseItemBehavior { - Material material = iblockdata.getMaterial(); - if (worldserver.isEmptyBlock(blockposition) || !material.isSolid() || material.isReplaceable() || (dispensiblecontaineritem instanceof BucketItem && iblockdata.getBlock() instanceof LiquidBlockContainer && ((LiquidBlockContainer) iblockdata.getBlock()).canPlaceLiquid(worldserver, blockposition, iblockdata, ((BucketItem) dispensiblecontaineritem).content))) { +@@ -620,7 +630,7 @@ public interface DispenseItemBehavior { + BlockState iblockdata = worldserver.getBlockState(blockposition); + if (iblockdata.isAir() || iblockdata.canBeReplaced() || (dispensiblecontaineritem instanceof BucketItem && iblockdata.getBlock() instanceof LiquidBlockContainer && ((LiquidBlockContainer) iblockdata.getBlock()).canPlaceLiquid(worldserver, blockposition, iblockdata, ((BucketItem) dispensiblecontaineritem).content))) { org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ()); - CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack); + CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack.copyWithCount(1)); // Paper - single item in event BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(x, y, z)); if (!DispenserBlock.eventFired) { -@@ -695,7 +705,7 @@ public interface DispenseItemBehavior { +@@ -693,7 +703,7 @@ public interface DispenseItemBehavior { // CraftBukkit start org.bukkit.block.Block bukkitBlock = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ()); @@ -342,7 +342,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ())); if (!DispenserBlock.eventFired) { -@@ -742,7 +752,7 @@ public interface DispenseItemBehavior { +@@ -740,7 +750,7 @@ public interface DispenseItemBehavior { // CraftBukkit start org.bukkit.block.Block bukkitBlock = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ()); @@ -351,7 +351,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0)); if (!DispenserBlock.eventFired) { -@@ -803,7 +813,7 @@ public interface DispenseItemBehavior { +@@ -801,7 +811,7 @@ public interface DispenseItemBehavior { BlockPos blockposition = pointer.getPos().relative((Direction) pointer.getBlockState().getValue(DispenserBlock.FACING)); // CraftBukkit start org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ()); @@ -360,7 +360,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0)); if (!DispenserBlock.eventFired) { -@@ -869,7 +879,7 @@ public interface DispenseItemBehavior { +@@ -867,7 +877,7 @@ public interface DispenseItemBehavior { // CraftBukkit start // EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(worldserver, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, (EntityLiving) null); @@ -369,7 +369,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ()); CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1); -@@ -879,12 +889,13 @@ public interface DispenseItemBehavior { +@@ -877,12 +887,13 @@ public interface DispenseItemBehavior { } if (event.isCancelled()) { @@ -385,7 +385,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca // Chain to handler for new item ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem()); DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem()); -@@ -900,7 +911,7 @@ public interface DispenseItemBehavior { +@@ -898,7 +909,7 @@ public interface DispenseItemBehavior { worldserver.addFreshEntity(entitytntprimed); worldserver.playSound((Player) null, entitytntprimed.getX(), entitytntprimed.getY(), entitytntprimed.getZ(), SoundEvents.TNT_PRIMED, SoundSource.BLOCKS, 1.0F, 1.0F); worldserver.gameEvent((Entity) null, GameEvent.ENTITY_PLACE, blockposition); @@ -394,7 +394,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca return stack; } }); -@@ -927,7 +938,7 @@ public interface DispenseItemBehavior { +@@ -925,7 +936,7 @@ public interface DispenseItemBehavior { // CraftBukkit start org.bukkit.block.Block bukkitBlock = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ()); @@ -403,7 +403,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ())); if (!DispenserBlock.eventFired) { -@@ -976,7 +987,7 @@ public interface DispenseItemBehavior { +@@ -974,7 +985,7 @@ public interface DispenseItemBehavior { // CraftBukkit start org.bukkit.block.Block bukkitBlock = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ()); @@ -412,7 +412,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ())); if (!DispenserBlock.eventFired) { -@@ -1049,7 +1060,7 @@ public interface DispenseItemBehavior { +@@ -1047,7 +1058,7 @@ public interface DispenseItemBehavior { // CraftBukkit start org.bukkit.block.Block bukkitBlock = worldserver.getWorld().getBlockAt(pointer.getPos().getX(), pointer.getPos().getY(), pointer.getPos().getZ()); @@ -422,7 +422,7 @@ index 46accf082b5e440ec743583bb0609c013234cb06..88d18d18d69876c98e199acb647c6cca BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ())); if (!DispenserBlock.eventFired) { diff --git a/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java b/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java -index 2366d411bf64f88c7296e888cd3bf584825ae4a9..d1127d93a85a837933d0d73c24cacac4adc3a5b9 100644 +index 8b2e9d11f61276f53e7d15af7a119569c0b661fc..9b0049dfeaec9b688bf276f2ac2b18943b5696b2 100644 --- a/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java +++ b/src/main/java/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java @@ -37,7 +37,7 @@ public class ShearsDispenseItemBehavior extends OptionalDispenseItemBehavior { diff --git a/patches/unapplied/server/0934-Improve-logging-and-errors.patch b/patches/server/0909-Improve-logging-and-errors.patch similarity index 100% rename from patches/unapplied/server/0934-Improve-logging-and-errors.patch rename to patches/server/0909-Improve-logging-and-errors.patch diff --git a/patches/unapplied/server/0935-Add-BlockLockCheckEvent.patch b/patches/server/0910-Add-BlockLockCheckEvent.patch similarity index 96% rename from patches/unapplied/server/0935-Add-BlockLockCheckEvent.patch rename to patches/server/0910-Add-BlockLockCheckEvent.patch index 418beed161..135e39e235 100644 --- a/patches/unapplied/server/0935-Add-BlockLockCheckEvent.patch +++ b/patches/server/0910-Add-BlockLockCheckEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add BlockLockCheckEvent diff --git a/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java -index f1acd19432877a833f0d4339f9de4830a0f7b890..8d38ebfdc976b9695ed367591e58de8ca18f00f3 100644 +index e85022b31f2bc2783e88f5ba4c5173ac8a096c96..61deb384d54596465acfe1451cc142c60fcc36d8 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java @@ -69,17 +69,44 @@ public abstract class BaseContainerBlockEntity extends BlockEntity implements Co @@ -56,7 +56,7 @@ index f1acd19432877a833f0d4339f9de4830a0f7b890..8d38ebfdc976b9695ed367591e58de8c @Nullable 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 79a7178ff474c516eada83f2be3e1bb0eacb368c..ef740d1ad6352ca4af299001a081b720bc472d2e 100644 +index da9e6b799923642e5ccb250affde386c6b3bd7f2..29fc9e1b83487f8ebb15d7ae0f7fdd246f23efd9 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 @@ -444,7 +444,7 @@ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Name diff --git a/patches/unapplied/server/0936-Add-Sneaking-API-for-Entities.patch b/patches/server/0911-Add-Sneaking-API-for-Entities.patch similarity index 91% rename from patches/unapplied/server/0936-Add-Sneaking-API-for-Entities.patch rename to patches/server/0911-Add-Sneaking-API-for-Entities.patch index e96f4985cd..442a06b32c 100644 --- a/patches/unapplied/server/0936-Add-Sneaking-API-for-Entities.patch +++ b/patches/server/0911-Add-Sneaking-API-for-Entities.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add Sneaking API for Entities diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java -index b6fc36af0fccf1a4ab0262b36da79d5eb63e73e3..57a0dbb23a32123d30c3b3572f4d129be9d97847 100644 +index b8550052bfde2b2b97fa4497e6e5d055e6161529..e7d311e94d637cabfd906f7021c4218f445915fe 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java @@ -1198,6 +1198,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity { diff --git a/patches/unapplied/server/0937-Improve-PortalEvents.patch b/patches/server/0912-Improve-PortalEvents.patch similarity index 89% rename from patches/unapplied/server/0937-Improve-PortalEvents.patch rename to patches/server/0912-Improve-PortalEvents.patch index 29dcd0269f..c944167ec2 100644 --- a/patches/unapplied/server/0937-Improve-PortalEvents.patch +++ b/patches/server/0912-Improve-PortalEvents.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Improve PortalEvents diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index b93603dd0198719c6e6dca363328016ee824b8c8..4392a9a2ab90acc48c36c91ef11e82644ba30d1c 100644 +index fc31b564eacfac185434222883fe89e48de59288..f200a50d09e50fec0005fa7db77c5777e4384504 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -3562,7 +3562,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -3653,7 +3653,14 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { Location enter = bukkitEntity.getLocation(); Location exit = CraftLocation.toBukkit(exitPosition, exitWorldServer.getWorld()); diff --git a/patches/unapplied/server/0938-Add-config-option-for-spider-worldborder-climbing.patch b/patches/server/0913-Add-config-option-for-spider-worldborder-climbing.patch similarity index 81% rename from patches/unapplied/server/0938-Add-config-option-for-spider-worldborder-climbing.patch rename to patches/server/0913-Add-config-option-for-spider-worldborder-climbing.patch index a084e68488..76f698efd9 100644 --- a/patches/unapplied/server/0938-Add-config-option-for-spider-worldborder-climbing.patch +++ b/patches/server/0913-Add-config-option-for-spider-worldborder-climbing.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add config option for spider worldborder climbing diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index 4392a9a2ab90acc48c36c91ef11e82644ba30d1c..c0d8cc9cb6a11e44644c411aa296440f29a41bdf 100644 +index f200a50d09e50fec0005fa7db77c5777e4384504..84c7564c1357cf413c5d3f8b2195265606d94f38 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -399,6 +399,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -402,6 +402,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { @javax.annotation.Nullable private UUID originWorld; public boolean freezeLocked = false; // Paper - Freeze Tick Lock API @@ -16,7 +16,7 @@ index 4392a9a2ab90acc48c36c91ef11e82644ba30d1c..c0d8cc9cb6a11e44644c411aa296440f public void setOrigin(@javax.annotation.Nonnull Location location) { this.origin = location.toVector(); -@@ -1393,7 +1394,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1436,7 +1437,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { io.papermc.paper.util.CollisionUtil.getCollisions(world, this, collisionBox, potentialCollisions, false, this.level.paperConfig().chunks.preventMovingIntoUnloadedChunks, false, false, null, null); @@ -26,15 +26,15 @@ index 4392a9a2ab90acc48c36c91ef11e82644ba30d1c..c0d8cc9cb6a11e44644c411aa296440f } diff --git a/src/main/java/net/minecraft/world/entity/monster/Spider.java b/src/main/java/net/minecraft/world/entity/monster/Spider.java -index 61fd27992516e1238195f8e60766428f01719ba7..0c36bb47bd7040f1544817810e1c87157cdaff96 100644 +index dd7c7fb6ed3086b1439499df806cdb84ce7d6eb2..4e291c4a06d2c9a6c54e91cebc0570fd566fb7d5 100644 --- a/src/main/java/net/minecraft/world/entity/monster/Spider.java +++ b/src/main/java/net/minecraft/world/entity/monster/Spider.java @@ -84,7 +84,7 @@ public class Spider extends Monster { public void tick() { super.tick(); - if (!this.level.isClientSide) { + if (!this.level().isClientSide) { - this.setClimbing(this.horizontalCollision); -+ this.setClimbing(this.horizontalCollision && (this.level.paperConfig().entities.behavior.allowSpiderWorldBorderClimbing || !collidingWithWorldBorder)); // Paper ++ this.setClimbing(this.horizontalCollision && (this.level().paperConfig().entities.behavior.allowSpiderWorldBorderClimbing || !collidingWithWorldBorder)); // Paper } } diff --git a/patches/unapplied/server/0939-Add-missing-SpigotConfig-logCommands-check.patch b/patches/server/0914-Add-missing-SpigotConfig-logCommands-check.patch similarity index 88% rename from patches/unapplied/server/0939-Add-missing-SpigotConfig-logCommands-check.patch rename to patches/server/0914-Add-missing-SpigotConfig-logCommands-check.patch index 6937ab476d..b2c84903bb 100644 --- a/patches/unapplied/server/0939-Add-missing-SpigotConfig-logCommands-check.patch +++ b/patches/server/0914-Add-missing-SpigotConfig-logCommands-check.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Add missing SpigotConfig logCommands check diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 734a973ec4e5a6f24b430941b5c3ba6bcc296be5..1d621ee5a93251c962956b4a46d937352c92f0ee 100644 +index 9b00b18e5c80c69b0c44299b48cef1937168f38a..da358acebe3286b32af0ea251d9f8297453e3416 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2256,7 +2256,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2253,7 +2253,9 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private void performChatCommand(ServerboundChatCommandPacket packet, LastSeenMessages lastSeenMessages) { // CraftBukkit start String command = "/" + packet.command(); diff --git a/patches/unapplied/server/0940-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch b/patches/server/0915-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch similarity index 100% rename from patches/unapplied/server/0940-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch rename to patches/server/0915-Fix-NPE-on-Allay-stopDancing-while-not-dancing.patch diff --git a/patches/unapplied/server/0941-Flying-Fall-Damage.patch b/patches/server/0916-Flying-Fall-Damage.patch similarity index 83% rename from patches/unapplied/server/0941-Flying-Fall-Damage.patch rename to patches/server/0916-Flying-Fall-Damage.patch index 6d43a33074..aa62883423 100644 --- a/patches/unapplied/server/0941-Flying-Fall-Damage.patch +++ b/patches/server/0916-Flying-Fall-Damage.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Flying Fall Damage diff --git a/src/main/java/net/minecraft/world/entity/player/Player.java b/src/main/java/net/minecraft/world/entity/player/Player.java -index 5b772b3caeafe98aa45a01bffe215a5dd33323b6..0629c471d38a77c44fc1c86ccdfcb0690f61ca17 100644 +index 53487f0a4fe672298c3b83d24a2a603641afcde8..58152160d609d0e9d105153aeb166a56a7955603 100644 --- a/src/main/java/net/minecraft/world/entity/player/Player.java +++ b/src/main/java/net/minecraft/world/entity/player/Player.java -@@ -184,6 +184,7 @@ public abstract class Player extends LivingEntity { +@@ -185,6 +185,7 @@ public abstract class Player extends LivingEntity { public float hurtDir; // Paper - protected -> public // Paper start public boolean affectsSpawning = true; @@ -16,7 +16,7 @@ index 5b772b3caeafe98aa45a01bffe215a5dd33323b6..0629c471d38a77c44fc1c86ccdfcb069 // Paper end // CraftBukkit start -@@ -1754,7 +1755,7 @@ public abstract class Player extends LivingEntity { +@@ -1758,7 +1759,7 @@ public abstract class Player extends LivingEntity { @Override public boolean causeFallDamage(float fallDistance, float damageMultiplier, DamageSource damageSource) { @@ -26,10 +26,10 @@ index 5b772b3caeafe98aa45a01bffe215a5dd33323b6..0629c471d38a77c44fc1c86ccdfcb069 } else { if (fallDistance >= 2.0F) { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 53f2c187d6a16ba5566d74619bfaf058c684c0b7..e167872b279a59b348218a535555e563a9faaf3f 100644 +index f734089dde9321387a9fd5bdc43341624c680872..edb5777a6b69d2947708d6799f0054b438078628 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -2330,6 +2330,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -2303,6 +2303,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().onUpdateAbilities(); } diff --git a/patches/unapplied/server/0942-Add-exploded-block-state-to-BlockExplodeEvent.patch b/patches/server/0917-Add-exploded-block-state-to-BlockExplodeEvent.patch similarity index 90% rename from patches/unapplied/server/0942-Add-exploded-block-state-to-BlockExplodeEvent.patch rename to patches/server/0917-Add-exploded-block-state-to-BlockExplodeEvent.patch index df81323db0..89d44e574e 100644 --- a/patches/unapplied/server/0942-Add-exploded-block-state-to-BlockExplodeEvent.patch +++ b/patches/server/0917-Add-exploded-block-state-to-BlockExplodeEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add exploded block state to BlockExplodeEvent diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSource.java b/src/main/java/net/minecraft/world/damagesource/DamageSource.java -index 72d62387bfdcbf8e69fe433145be81fbe3bb051a..93a1e990b0a6caae4143c2f9d09bfb368fa1d6db 100644 +index 1a0f86b5a632469942e33c237c247d2d1dee4a3d..25a5a3b949a0eb632611355e74ccd4865be108ca 100644 --- a/src/main/java/net/minecraft/world/damagesource/DamageSource.java +++ b/src/main/java/net/minecraft/world/damagesource/DamageSource.java @@ -52,6 +52,7 @@ public class DamageSource { @@ -17,10 +17,10 @@ index 72d62387bfdcbf8e69fe433145be81fbe3bb051a..93a1e990b0a6caae4143c2f9d09bfb36 public String toString() { return "DamageSource (" + this.type().msgId() + ")"; diff --git a/src/main/java/net/minecraft/world/damagesource/DamageSources.java b/src/main/java/net/minecraft/world/damagesource/DamageSources.java -index 6d46908692637ace5d81a9948f5ed42e142f549a..d3d9bb2cdcaa3d671370ee3014341fe741275743 100644 +index 8bde8c581796ed11809b80b9a30a33df86116745..4604f8b38460e9113e966889a679d4547f24aff6 100644 --- a/src/main/java/net/minecraft/world/damagesource/DamageSources.java +++ b/src/main/java/net/minecraft/world/damagesource/DamageSources.java -@@ -243,7 +243,16 @@ public class DamageSources { +@@ -247,8 +247,17 @@ public class DamageSources { return this.source(DamageTypes.SONIC_BOOM, attacker); } @@ -37,9 +37,10 @@ index 6d46908692637ace5d81a9948f5ed42e142f549a..d3d9bb2cdcaa3d671370ee3014341fe7 + return source; + // Paper end } - } + + public DamageSource outOfBorder() { diff --git a/src/main/java/net/minecraft/world/level/Explosion.java b/src/main/java/net/minecraft/world/level/Explosion.java -index f9cd27d6526188604aba67285f5f8fa7d6303481..185f7b1d4df59f5db7b85b529a2de6402630bf35 100644 +index 316df76570a7a6843b5a8ed2c44467a0cdf2a6cd..8f97c9df726ac20cfce7bdddd5dd4f8c5aa76c35 100644 --- a/src/main/java/net/minecraft/world/level/Explosion.java +++ b/src/main/java/net/minecraft/world/level/Explosion.java @@ -343,7 +343,7 @@ public class Explosion { @@ -52,10 +53,10 @@ index f9cd27d6526188604aba67285f5f8fa7d6303481..185f7b1d4df59f5db7b85b529a2de640 cancelled = event.isCancelled(); bukkitBlocks = event.blockList(); diff --git a/src/main/java/net/minecraft/world/level/block/BedBlock.java b/src/main/java/net/minecraft/world/level/block/BedBlock.java -index 7c22fc7a384c61670ec9db0c69178d29eba51f51..33e4d832f00f0f563931bed77722a2b62923e4c0 100644 +index a605c9739ebc8e60bd668ff67c760cca9bd210dc..69839965926c511b6396a0041b6e7295ebf5209b 100644 --- a/src/main/java/net/minecraft/world/level/block/BedBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BedBlock.java -@@ -87,6 +87,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock +@@ -86,6 +86,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock // CraftBukkit - moved world and biome check into EntityHuman if (false && !BedBlock.canSetSpawn(world)) { @@ -63,7 +64,7 @@ index 7c22fc7a384c61670ec9db0c69178d29eba51f51..33e4d832f00f0f563931bed77722a2b6 world.removeBlock(pos, false); BlockPos blockposition1 = pos.relative(((Direction) state.getValue(BedBlock.FACING)).getOpposite()); -@@ -96,7 +97,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock +@@ -95,7 +96,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock Vec3 vec3d = pos.getCenter(); @@ -72,7 +73,7 @@ index 7c22fc7a384c61670ec9db0c69178d29eba51f51..33e4d832f00f0f563931bed77722a2b6 return InteractionResult.SUCCESS; } else if ((Boolean) state.getValue(BedBlock.OCCUPIED)) { if (!this.kickVillagerOutOfBed(world, pos)) { -@@ -138,6 +139,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock +@@ -137,6 +138,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock private InteractionResult explodeBed(BlockState iblockdata, Level world, BlockPos blockposition) { { { @@ -80,7 +81,7 @@ index 7c22fc7a384c61670ec9db0c69178d29eba51f51..33e4d832f00f0f563931bed77722a2b6 world.removeBlock(blockposition, false); BlockPos blockposition1 = blockposition.relative(((Direction) iblockdata.getValue(BedBlock.FACING)).getOpposite()); -@@ -147,7 +149,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock +@@ -146,7 +148,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock Vec3 vec3d = blockposition.getCenter(); @@ -111,10 +112,10 @@ index b9903c29bdea8d1e3b6fce0e97be6bd9493cfdf4..2ed78cf83c0ae66a6ddba1ff307da89a public static boolean canSetSpawn(Level world) { diff --git a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java -index 1caa329567b50a962c54bb00c79cc98e4f2724c8..9215297d5f7856ef3f03ebcbf866c5b59048ba30 100644 +index d7663b902b768030008b28f9a8f6dd324a30e38f..8666628a7e22e1f9ee9c2a9a56aa075087f24c88 100644 --- a/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java +++ b/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java -@@ -271,6 +271,12 @@ public final class CraftBlockStates { +@@ -272,6 +272,12 @@ public final class CraftBlockStates { BlockEntity tileEntity = (blockEntityTag == null) ? null : BlockEntity.loadStatic(blockPosition, blockData, blockEntityTag); return CraftBlockStates.getBlockState(null, blockPosition, blockData, tileEntity); } diff --git a/patches/unapplied/server/0943-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch b/patches/server/0918-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch similarity index 86% rename from patches/unapplied/server/0943-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch rename to patches/server/0918-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch index bcd8b80d4e..4d54af0815 100644 --- a/patches/unapplied/server/0943-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch +++ b/patches/server/0918-Expose-pre-collision-moving-velocity-to-VehicleBlock.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Expose pre-collision moving velocity to diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index c0d8cc9cb6a11e44644c411aa296440f29a41bdf..df316ca580a0a3b4ba6b658f7d7bdf542f4ad85b 100644 +index 84c7564c1357cf413c5d3f8b2195265606d94f38..13e22235eccb2456112eb6a5f0e7ccd788379f89 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -1105,7 +1105,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -1123,7 +1123,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { } if (!bl.getType().isAir()) { diff --git a/patches/unapplied/server/0944-config-for-disabling-entity-tag-tags.patch b/patches/server/0919-config-for-disabling-entity-tag-tags.patch similarity index 93% rename from patches/unapplied/server/0944-config-for-disabling-entity-tag-tags.patch rename to patches/server/0919-config-for-disabling-entity-tag-tags.patch index 9cbe2afe45..72aabc88bb 100644 --- a/patches/unapplied/server/0944-config-for-disabling-entity-tag-tags.patch +++ b/patches/server/0919-config-for-disabling-entity-tag-tags.patch @@ -5,7 +5,7 @@ Subject: [PATCH] config for disabling entity tag tags diff --git a/src/main/java/net/minecraft/world/entity/EntityType.java b/src/main/java/net/minecraft/world/entity/EntityType.java -index fa10d60cf7f80c429690f20c3bccdd8bbe7752e8..ceacc0d383e2ee674783d3c0a7df0a951595faca 100644 +index ab20be593e25a1fd32463bf5f26534595b49a4ec..1eae10b9ddb10e6de941c03d54b57c815105feba 100644 --- a/src/main/java/net/minecraft/world/entity/EntityType.java +++ b/src/main/java/net/minecraft/world/entity/EntityType.java @@ -492,6 +492,13 @@ public class EntityType implements FeatureElement, EntityTypeT diff --git a/patches/unapplied/server/0945-Use-single-player-info-update-packet-on-join.patch b/patches/server/0920-Use-single-player-info-update-packet-on-join.patch similarity index 86% rename from patches/unapplied/server/0945-Use-single-player-info-update-packet-on-join.patch rename to patches/server/0920-Use-single-player-info-update-packet-on-join.patch index 7a256909c7..a2d8b27188 100644 --- a/patches/unapplied/server/0945-Use-single-player-info-update-packet-on-join.patch +++ b/patches/server/0920-Use-single-player-info-update-packet-on-join.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Use single player info update packet on join diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 1d621ee5a93251c962956b4a46d937352c92f0ee..571cb21812b9927246950992505c1db730a5b868 100644 +index da358acebe3286b32af0ea251d9f8297453e3416..94f9dc6074b93c3c53f46f966763ecfb4cb9f3de 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -3633,7 +3633,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3599,7 +3599,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic this.signedMessageDecoder = session.createMessageDecoder(this.player.getUUID()); this.chatMessageChain.append((executor) -> { this.player.setChatSession(session); @@ -18,10 +18,10 @@ index 1d621ee5a93251c962956b4a46d937352c92f0ee..571cb21812b9927246950992505c1db7 }); } diff --git a/src/main/java/net/minecraft/server/players/PlayerList.java b/src/main/java/net/minecraft/server/players/PlayerList.java -index 0011e18963b12512464be10798006c641595988d..5c21de0d48fba88c3164b72e0eb624706b683fab 100644 +index d3e259eb22202133d54c4be58c5121735fe412ed..731459d80748cdcc7cb9c6c9ede3c56f3f5a0060 100644 --- a/src/main/java/net/minecraft/server/players/PlayerList.java +++ b/src/main/java/net/minecraft/server/players/PlayerList.java -@@ -310,7 +310,7 @@ public abstract class PlayerList { +@@ -317,7 +317,7 @@ public abstract class PlayerList { player.sendServerStatus(serverping); } @@ -30,7 +30,7 @@ index 0011e18963b12512464be10798006c641595988d..5c21de0d48fba88c3164b72e0eb62470 this.players.add(player); this.playersByName.put(player.getScoreboardName().toLowerCase(java.util.Locale.ROOT), player); // Spigot this.playersByUUID.put(player.getUUID(), player); -@@ -346,6 +346,7 @@ public abstract class PlayerList { +@@ -353,6 +353,7 @@ public abstract class PlayerList { // CraftBukkit start - sendAll above replaced with this loop ClientboundPlayerInfoUpdatePacket packet = ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(player)); @@ -38,7 +38,7 @@ index 0011e18963b12512464be10798006c641595988d..5c21de0d48fba88c3164b72e0eb62470 for (int i = 0; i < this.players.size(); ++i) { ServerPlayer entityplayer1 = (ServerPlayer) this.players.get(i); -@@ -353,12 +354,17 @@ public abstract class PlayerList { +@@ -360,12 +361,17 @@ public abstract class PlayerList { entityplayer1.connection.send(packet); } @@ -57,4 +57,4 @@ index 0011e18963b12512464be10798006c641595988d..5c21de0d48fba88c3164b72e0eb62470 + // Paper end player.sentListPacket = true; player.supressTrackerForLogin = false; // Paper - ((ServerLevel)player.level).getChunkSource().chunkMap.addEntity(player); // Paper - track entity now + ((ServerLevel)player.level()).getChunkSource().chunkMap.addEntity(player); // Paper - track entity now diff --git a/patches/unapplied/server/0946-Correctly-shrink-items-during-EntityResurrectEvent.patch b/patches/server/0921-Correctly-shrink-items-during-EntityResurrectEvent.patch similarity index 88% rename from patches/unapplied/server/0946-Correctly-shrink-items-during-EntityResurrectEvent.patch rename to patches/server/0921-Correctly-shrink-items-during-EntityResurrectEvent.patch index 4f235fdee4..6de3ec1964 100644 --- a/patches/unapplied/server/0946-Correctly-shrink-items-during-EntityResurrectEvent.patch +++ b/patches/server/0921-Correctly-shrink-items-during-EntityResurrectEvent.patch @@ -22,11 +22,11 @@ This patch corrects this behaviour by only shrinking the item if a totem of undying was found and the event was called uncancelled. diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index bc108e721cf6a7713449caf821635be736b7a98c..d13fd686ce449f32d4916a86ee66fcc3df648b80 100644 +index 7a6caded7f5c711e96fa0d6b177923c2a49004e4..16e98ca278c9005d7695a73582de2123abb68ac4 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -1543,7 +1543,7 @@ public abstract class LivingEntity extends Entity implements Attackable { - this.level.getCraftServer().getPluginManager().callEvent(event); +@@ -1592,7 +1592,7 @@ public abstract class LivingEntity extends Entity implements Attackable { + this.level().getCraftServer().getPluginManager().callEvent(event); if (!event.isCancelled()) { - if (!itemstack1.isEmpty()) { diff --git a/patches/unapplied/server/0947-Win-Screen-API.patch b/patches/server/0922-Win-Screen-API.patch similarity index 88% rename from patches/unapplied/server/0947-Win-Screen-API.patch rename to patches/server/0922-Win-Screen-API.patch index 6a489994f1..ebdc6441ab 100644 --- a/patches/unapplied/server/0947-Win-Screen-API.patch +++ b/patches/server/0922-Win-Screen-API.patch @@ -7,10 +7,10 @@ Subject: [PATCH] Win Screen API public net.minecraft.server.level.ServerPlayer seenCredits diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index e167872b279a59b348218a535555e563a9faaf3f..5f0146255b050dfc873789e7dd4bc1dc4a929f02 100644 +index edb5777a6b69d2947708d6799f0054b438078628..fc71dfcf4387c355a69a8bbfaec17aafb6d98d2d 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1230,6 +1230,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1203,6 +1203,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player { this.getHandle().connection.send(packet); } diff --git a/patches/unapplied/server/0948-Remove-CraftItemStack-setAmount-null-assignment.patch b/patches/server/0923-Remove-CraftItemStack-setAmount-null-assignment.patch similarity index 93% rename from patches/unapplied/server/0948-Remove-CraftItemStack-setAmount-null-assignment.patch rename to patches/server/0923-Remove-CraftItemStack-setAmount-null-assignment.patch index e07a332e83..6e71a44d88 100644 --- a/patches/unapplied/server/0948-Remove-CraftItemStack-setAmount-null-assignment.patch +++ b/patches/server/0923-Remove-CraftItemStack-setAmount-null-assignment.patch @@ -16,7 +16,7 @@ with less than zero amounts, so this code doesn't create a problem with operations on the vanilla ItemStack. diff --git a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java -index 8147b45892015be602fe14adafd84f84c9685516..0e7a6a5a83b4630f53e6dba1b5b29f67d91c7240 100644 +index 8683bb08c2d9a7514ee6b16690b61240fb807d15..24fac69bc63f949001252811f792b21955a13e9d 100644 --- a/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java +++ b/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java @@ -146,7 +146,7 @@ public final class CraftItemStack extends ItemStack { diff --git a/patches/unapplied/server/0949-Fix-force-opening-enchantment-tables.patch b/patches/server/0924-Fix-force-opening-enchantment-tables.patch similarity index 93% rename from patches/unapplied/server/0949-Fix-force-opening-enchantment-tables.patch rename to patches/server/0924-Fix-force-opening-enchantment-tables.patch index eb92847f0e..166066bc74 100644 --- a/patches/unapplied/server/0949-Fix-force-opening-enchantment-tables.patch +++ b/patches/server/0924-Fix-force-opening-enchantment-tables.patch @@ -5,16 +5,16 @@ Subject: [PATCH] Fix force-opening enchantment tables diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index 7a2a73edc13930f34eb11d9d0802ae9ec5cd8d40..ffef4593e87c42bcd87fd5de9de9a78b95a96c3b 100644 +index 640c76717ebf97a286edd1da0a785e8f3a0b8b3b..cc766ec31fe3965b889d2fea92012f3fe6d8b5d8 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -404,7 +404,18 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { // If there isn't an enchant table we can force create one, won't be very useful though. BlockPos pos = CraftLocation.toBlockPosition(location); -- this.getHandle().openMenu(((EnchantmentTableBlock) Blocks.ENCHANTING_TABLE).getMenuProvider(null, this.getHandle().level, pos)); +- this.getHandle().openMenu(((EnchantmentTableBlock) Blocks.ENCHANTING_TABLE).getMenuProvider(null, this.getHandle().level(), pos)); + // Paper start -+ MenuProvider menuProvider = ((EnchantmentTableBlock) Blocks.ENCHANTING_TABLE).getMenuProvider(null, this.getHandle().level, pos); ++ MenuProvider menuProvider = ((EnchantmentTableBlock) Blocks.ENCHANTING_TABLE).getMenuProvider(null, this.getHandle().level(), pos); + if (menuProvider == null) { + if (!force) { + return null; diff --git a/patches/unapplied/server/0950-Add-Entity-Body-Yaw-API.patch b/patches/server/0925-Add-Entity-Body-Yaw-API.patch similarity index 92% rename from patches/unapplied/server/0950-Add-Entity-Body-Yaw-API.patch rename to patches/server/0925-Add-Entity-Body-Yaw-API.patch index 44d216b486..1d612ad759 100644 --- a/patches/unapplied/server/0950-Add-Entity-Body-Yaw-API.patch +++ b/patches/server/0925-Add-Entity-Body-Yaw-API.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add Entity Body Yaw API diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java -index daf6653f30337ef88bad9decb7d73c45f951b270..d43859f8aa7beed82dd3a146bb1086982cd0cda7 100644 +index 2d5f407b6979f39e5b611f37578d681a49eaea03..42a4a45ece562d543cc4fab9d9e7c70573705f10 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java @@ -1035,6 +1035,16 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity { diff --git a/patches/unapplied/server/0951-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch b/patches/server/0926-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch similarity index 100% rename from patches/unapplied/server/0951-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch rename to patches/server/0926-Fix-MC-157464-Prevent-sleeping-villagers-moving-towa.patch diff --git a/patches/unapplied/server/0952-Update-the-flag-when-a-captured-block-state-is-outda.patch b/patches/server/0927-Update-the-flag-when-a-captured-block-state-is-outda.patch similarity index 83% rename from patches/unapplied/server/0952-Update-the-flag-when-a-captured-block-state-is-outda.patch rename to patches/server/0927-Update-the-flag-when-a-captured-block-state-is-outda.patch index b2d97d5308..8c83ad304e 100644 --- a/patches/unapplied/server/0952-Update-the-flag-when-a-captured-block-state-is-outda.patch +++ b/patches/server/0927-Update-the-flag-when-a-captured-block-state-is-outda.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Update the flag when a captured block state is outdated diff --git a/src/main/java/net/minecraft/world/level/Level.java b/src/main/java/net/minecraft/world/level/Level.java -index 174f5ff8f827dab2d85cee525429d46bbeae7183..973ecd50f9cb6b86c353586e84d15dcb118ccb60 100644 +index 090771dce76f4e8037b6b2df9fc0dad7fe73411d..7771748a15c153352ce4874495f5fa7437aaf9a7 100644 --- a/src/main/java/net/minecraft/world/level/Level.java +++ b/src/main/java/net/minecraft/world/level/Level.java -@@ -532,6 +532,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { +@@ -529,6 +529,7 @@ public abstract class Level implements LevelAccessor, AutoCloseable { blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags); this.capturedBlockStates.put(pos.immutable(), blockstate); } diff --git a/patches/unapplied/server/0953-Add-EntityFertilizeEggEvent.patch b/patches/server/0928-Add-EntityFertilizeEggEvent.patch similarity index 51% rename from patches/unapplied/server/0953-Add-EntityFertilizeEggEvent.patch rename to patches/server/0928-Add-EntityFertilizeEggEvent.patch index 6adba33ca2..03b367d551 100644 --- a/patches/unapplied/server/0953-Add-EntityFertilizeEggEvent.patch +++ b/patches/server/0928-Add-EntityFertilizeEggEvent.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Add EntityFertilizeEggEvent diff --git a/src/main/java/net/minecraft/world/entity/animal/Turtle.java b/src/main/java/net/minecraft/world/entity/animal/Turtle.java -index 1c2f927974aab4d9751088449edbc777677d6cd0..81dab77f525ae667614f940c4ff5ec308a9579a2 100644 +index c48bf4ca76f70d878378fc43c8270de5c3332824..9f7fa132997829e9a34aaae7aac7a6f7d529eee2 100644 --- a/src/main/java/net/minecraft/world/entity/animal/Turtle.java +++ b/src/main/java/net/minecraft/world/entity/animal/Turtle.java @@ -441,6 +441,17 @@ public class Turtle extends Animal { @@ -39,36 +39,3 @@ index 1c2f927974aab4d9751088449edbc777677d6cd0..81dab77f525ae667614f940c4ff5ec30 } } -diff --git a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java -index 1b3d462e1e229970c53f763b5cdce7d21f1b1703..a65cec3c9837882df5b61de58f03d276d4db6bfc 100644 ---- a/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java -+++ b/src/main/java/net/minecraft/world/entity/animal/frog/Frog.java -@@ -252,6 +252,17 @@ public class Frog extends Animal implements VariantHolder { - serverPlayer = other.getLoveCause(); - } - -+ // Paper start -+ int experience = this.getRandom().nextInt(7) + 1; -+ io.papermc.paper.event.entity.EntityFertilizeEggEvent event = new io.papermc.paper.event.entity.EntityFertilizeEggEvent((org.bukkit.entity.LivingEntity) this.getBukkitEntity(), (org.bukkit.entity.LivingEntity) other.getBukkitEntity(), serverPlayer == null ? null : serverPlayer.getBukkitEntity(), this.breedItem == null ? null : org.bukkit.craftbukkit.inventory.CraftItemStack.asCraftMirror(this.breedItem).clone(), experience); -+ if (!event.callEvent()) { -+ resetLove(); -+ other.resetLove(); // stop the pathfinding to avoid infinite loop -+ return; -+ } -+ experience = event.getExperience(); -+ // Paper end -+ - if (serverPlayer != null) { - serverPlayer.awardStat(Stats.ANIMALS_BRED); - CriteriaTriggers.BRED_ANIMALS.trigger(serverPlayer, this, other, (AgeableMob)null); -@@ -263,8 +274,8 @@ public class Frog extends Animal implements VariantHolder { - other.resetLove(); - this.getBrain().setMemory(MemoryModuleType.IS_PREGNANT, Unit.INSTANCE); - world.broadcastEntityEvent(this, (byte)18); -- if (world.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { -- world.addFreshEntity(new ExperienceOrb(world, this.getX(), this.getY(), this.getZ(), this.getRandom().nextInt(7) + 1, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, serverPlayer)); // Paper -+ if (experience > 0 && world.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) { // Paper -+ world.addFreshEntity(new ExperienceOrb(world, this.getX(), this.getY(), this.getZ(), experience, org.bukkit.entity.ExperienceOrb.SpawnReason.BREED, serverPlayer)); // Paper - } - - } diff --git a/patches/unapplied/server/0954-Fix-HumanEntity-drop-not-updating-the-client-inv.patch b/patches/server/0929-Fix-HumanEntity-drop-not-updating-the-client-inv.patch similarity index 94% rename from patches/unapplied/server/0954-Fix-HumanEntity-drop-not-updating-the-client-inv.patch rename to patches/server/0929-Fix-HumanEntity-drop-not-updating-the-client-inv.patch index c73b1fa213..3b70ef3781 100644 --- a/patches/unapplied/server/0954-Fix-HumanEntity-drop-not-updating-the-client-inv.patch +++ b/patches/server/0929-Fix-HumanEntity-drop-not-updating-the-client-inv.patch @@ -7,7 +7,7 @@ Subject: [PATCH] Fix HumanEntity#drop not updating the client inv public net.minecraft.server.level.ServerPlayer containerSynchronizer diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java -index ffef4593e87c42bcd87fd5de9de9a78b95a96c3b..1b008e5217c5bbf566a213abb92e1c7c43a3a7c2 100644 +index cc766ec31fe3965b889d2fea92012f3fe6d8b5d8..50d81b130fa88b42b173a166c66fe94adc9f9be3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java @@ -757,8 +757,15 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity { diff --git a/patches/unapplied/server/0955-Add-CompostItemEvent-and-EntityCompostItemEvent.patch b/patches/server/0930-Add-CompostItemEvent-and-EntityCompostItemEvent.patch similarity index 90% rename from patches/unapplied/server/0955-Add-CompostItemEvent-and-EntityCompostItemEvent.patch rename to patches/server/0930-Add-CompostItemEvent-and-EntityCompostItemEvent.patch index 32a904e5df..c09b36b849 100644 --- a/patches/unapplied/server/0955-Add-CompostItemEvent-and-EntityCompostItemEvent.patch +++ b/patches/server/0930-Add-CompostItemEvent-and-EntityCompostItemEvent.patch @@ -5,10 +5,10 @@ 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 50fd52905d8f69c693cb1b406b681a6af02787e2..6fab2b69a0af298bd00b309efcd6aa8399e23d1f 100644 +index 113083f1b909e3e279789d67e24af36dc0f151bf..87153b5576fed05103183a9860d804c2c8cfbe1c 100644 --- a/src/main/java/net/minecraft/world/level/block/ComposterBlock.java +++ b/src/main/java/net/minecraft/world/level/block/ComposterBlock.java -@@ -320,7 +320,21 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { +@@ -322,7 +322,21 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { int i = (Integer) iblockdata.getValue(ComposterBlock.LEVEL); float f = ComposterBlock.COMPOSTABLES.getFloat(itemstack.getItem()); @@ -31,7 +31,7 @@ index 50fd52905d8f69c693cb1b406b681a6af02787e2..6fab2b69a0af298bd00b309efcd6aa83 return iblockdata; } else { int j = i + 1; -@@ -470,6 +484,11 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { +@@ -472,6 +486,11 @@ public class ComposterBlock extends Block implements WorldlyContainerHolder { this.changed = true; BlockState iblockdata = ComposterBlock.addItem((Entity) null, this.state, this.level, this.pos, itemstack); diff --git a/patches/unapplied/server/0956-Correctly-handle-ArmorStand-invisibility.patch b/patches/server/0931-Correctly-handle-ArmorStand-invisibility.patch similarity index 100% rename from patches/unapplied/server/0956-Correctly-handle-ArmorStand-invisibility.patch rename to patches/server/0931-Correctly-handle-ArmorStand-invisibility.patch diff --git a/patches/unapplied/server/0957-Fix-advancement-triggers-for-entity-damage.patch b/patches/server/0932-Fix-advancement-triggers-for-entity-damage.patch similarity index 88% rename from patches/unapplied/server/0957-Fix-advancement-triggers-for-entity-damage.patch rename to patches/server/0932-Fix-advancement-triggers-for-entity-damage.patch index e5025e0d38..5e6a4c35aa 100644 --- a/patches/unapplied/server/0957-Fix-advancement-triggers-for-entity-damage.patch +++ b/patches/server/0932-Fix-advancement-triggers-for-entity-damage.patch @@ -10,10 +10,10 @@ Fixes a couple places where the original damage and modified damage were passed in the reverse order to the advancement triggers diff --git a/src/main/java/net/minecraft/world/entity/Interaction.java b/src/main/java/net/minecraft/world/entity/Interaction.java -index ee9222406bcaef1a1ac09b60a142044c70d31fce..7016ef3f6d56980f36b9f2fb382526363f8ed62b 100644 +index f054d67a637b204de604fadc0d321f5c9816d808..fc5f1e1b445f0a55a35a31d58a90920a80275662 100644 --- a/src/main/java/net/minecraft/world/entity/Interaction.java +++ b/src/main/java/net/minecraft/world/entity/Interaction.java -@@ -155,7 +155,7 @@ public class Interaction extends Entity implements Attackable, Targeting { +@@ -160,7 +160,7 @@ public class Interaction extends Entity implements Attackable, Targeting { if (entityhuman instanceof ServerPlayer) { ServerPlayer entityplayer = (ServerPlayer) entityhuman; @@ -23,10 +23,10 @@ index ee9222406bcaef1a1ac09b60a142044c70d31fce..7016ef3f6d56980f36b9f2fb38252636 return !this.getResponse(); diff --git a/src/main/java/net/minecraft/world/entity/LivingEntity.java b/src/main/java/net/minecraft/world/entity/LivingEntity.java -index d13fd686ce449f32d4916a86ee66fcc3df648b80..95a27d28f73039693ca64601954af62028413634 100644 +index 16e98ca278c9005d7695a73582de2123abb68ac4..b9ce657ebe12e17a718f83d3575071e1f44e0995 100644 --- a/src/main/java/net/minecraft/world/entity/LivingEntity.java +++ b/src/main/java/net/minecraft/world/entity/LivingEntity.java -@@ -2239,7 +2239,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -2280,7 +2280,7 @@ public abstract class LivingEntity extends Entity implements Attackable { // Duplicate triggers if blocking if (event.getDamage(DamageModifier.BLOCKING) < 0) { if (this instanceof ServerPlayer) { @@ -35,7 +35,7 @@ index d13fd686ce449f32d4916a86ee66fcc3df648b80..95a27d28f73039693ca64601954af620 f2 = (float) -event.getDamage(DamageModifier.BLOCKING); if (f2 > 0.0F && f2 < 3.4028235E37F) { ((ServerPlayer) this).awardStat(Stats.DAMAGE_BLOCKED_BY_SHIELD, Math.round(originalDamage * 10.0F)); -@@ -2247,7 +2247,7 @@ public abstract class LivingEntity extends Entity implements Attackable { +@@ -2288,7 +2288,7 @@ public abstract class LivingEntity extends Entity implements Attackable { } if (damagesource.getEntity() instanceof ServerPlayer) { diff --git a/patches/unapplied/server/0958-Fix-text-display-error-on-spawn.patch b/patches/server/0933-Fix-text-display-error-on-spawn.patch similarity index 88% rename from patches/unapplied/server/0958-Fix-text-display-error-on-spawn.patch rename to patches/server/0933-Fix-text-display-error-on-spawn.patch index a486841821..f8962d532b 100644 --- a/patches/unapplied/server/0958-Fix-text-display-error-on-spawn.patch +++ b/patches/server/0933-Fix-text-display-error-on-spawn.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix text display error on spawn diff --git a/src/main/java/net/minecraft/world/entity/Display.java b/src/main/java/net/minecraft/world/entity/Display.java -index 78c73e5d2d62998518f43bf0e7eaedebd65bab01..a0b556ea2dd6365ad497825fd9c090001a047099 100644 +index cafecbdaa00984c6e0db83f39d4d4908756dd2c3..c9fb211412f936cde32b66b92dddfa04dd6de77f 100644 --- a/src/main/java/net/minecraft/world/entity/Display.java +++ b/src/main/java/net/minecraft/world/entity/Display.java -@@ -827,7 +827,7 @@ public abstract class Display extends Entity { +@@ -800,7 +800,7 @@ public abstract class Display extends Entity { byte b = loadFlag((byte)0, nbt, "shadow", (byte)1); b = loadFlag(b, nbt, "see_through", (byte)2); b = loadFlag(b, nbt, "default_background", (byte)4); diff --git a/patches/unapplied/server/0959-Fix-certain-inventories-returning-null-Locations.patch b/patches/server/0934-Fix-certain-inventories-returning-null-Locations.patch similarity index 92% rename from patches/unapplied/server/0959-Fix-certain-inventories-returning-null-Locations.patch rename to patches/server/0934-Fix-certain-inventories-returning-null-Locations.patch index 3cd182f806..e69fe4eb74 100644 --- a/patches/unapplied/server/0959-Fix-certain-inventories-returning-null-Locations.patch +++ b/patches/server/0934-Fix-certain-inventories-returning-null-Locations.patch @@ -7,10 +7,10 @@ Wandering Trader, AbstractHorse, and Beacon inventories returned null locations when a block or entity location is readily available diff --git a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java -index f9496f757bcf7000fab1f16386e775d54d96e47a..47cd69f91bbc2e2be9ec970674adc522e21593c8 100644 +index 7f238a9d98095806132c0d22ed7b0dfd25c45262..79b6e241f425622fdc575b77d8dce7061c0ab783 100644 --- a/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java +++ b/src/main/java/net/minecraft/world/entity/animal/horse/AbstractHorse.java -@@ -346,7 +346,15 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, +@@ -342,7 +342,15 @@ public abstract class AbstractHorse extends Animal implements ContainerListener, public void createInventory() { SimpleContainer inventorysubcontainer = this.inventory; @@ -28,7 +28,7 @@ index f9496f757bcf7000fab1f16386e775d54d96e47a..47cd69f91bbc2e2be9ec970674adc522 inventorysubcontainer.removeListener(this); int i = Math.min(inventorysubcontainer.getContainerSize(), this.inventory.getContainerSize()); diff --git a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java -index 1ffbb43bfdb173689fdd9d2398b021846e0246fa..e56ddc7983f58f5b7634b8a6efbb67fa64703ab7 100644 +index 335d0a85378c04dd466fafd42048b2474c815cb9..fb1d71143a0344432af9dc5c3085e217a2778f10 100644 --- a/src/main/java/net/minecraft/world/inventory/BeaconMenu.java +++ b/src/main/java/net/minecraft/world/inventory/BeaconMenu.java @@ -49,6 +49,12 @@ public class BeaconMenu extends AbstractContainerMenu { diff --git a/patches/unapplied/server/0960-Add-Shearable-API.patch b/patches/server/0935-Add-Shearable-API.patch similarity index 100% rename from patches/unapplied/server/0960-Add-Shearable-API.patch rename to patches/server/0935-Add-Shearable-API.patch diff --git a/patches/unapplied/server/0961-Fix-SpawnEggMeta-get-setSpawnedType.patch b/patches/server/0936-Fix-SpawnEggMeta-get-setSpawnedType.patch similarity index 100% rename from patches/unapplied/server/0961-Fix-SpawnEggMeta-get-setSpawnedType.patch rename to patches/server/0936-Fix-SpawnEggMeta-get-setSpawnedType.patch diff --git a/patches/unapplied/server/0962-Fix-chiseled-bookshelf-and-jukebox-setItem-with-air.patch b/patches/server/0937-Fix-chiseled-bookshelf-and-jukebox-setItem-with-air.patch similarity index 95% rename from patches/unapplied/server/0962-Fix-chiseled-bookshelf-and-jukebox-setItem-with-air.patch rename to patches/server/0937-Fix-chiseled-bookshelf-and-jukebox-setItem-with-air.patch index 7d6b194d1b..75e0c90780 100644 --- a/patches/unapplied/server/0962-Fix-chiseled-bookshelf-and-jukebox-setItem-with-air.patch +++ b/patches/server/0937-Fix-chiseled-bookshelf-and-jukebox-setItem-with-air.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix chiseled bookshelf and jukebox setItem with air diff --git a/src/main/java/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java -index 6986b2a5df34bfe078c902594f6409ad0ea847ef..ed12a23448dc9ada423ebd79a131eab2de3d6e48 100644 +index 1b4a6e68fc81072591278de1e2ec3f921823811b..429381c4efbfdf48b489cc25936466c193c2f452 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java @@ -146,7 +146,7 @@ public class ChiseledBookShelfBlockEntity extends BlockEntity implements Contain diff --git a/patches/unapplied/server/0963-Optimize-Hoppers.patch b/patches/server/0938-Optimize-Hoppers.patch similarity index 96% rename from patches/unapplied/server/0963-Optimize-Hoppers.patch rename to patches/server/0938-Optimize-Hoppers.patch index b78a4f581e..a938fbc3e6 100644 --- a/patches/unapplied/server/0963-Optimize-Hoppers.patch +++ b/patches/server/0938-Optimize-Hoppers.patch @@ -13,10 +13,10 @@ Subject: [PATCH] Optimize Hoppers * Remove Streams from Item Suck In and restore restore 1.12 AABB checks which is simpler and no voxel allocations (was doing TWO Item Suck ins) diff --git a/src/main/java/net/minecraft/server/MinecraftServer.java b/src/main/java/net/minecraft/server/MinecraftServer.java -index fbc06f45926e9073c95c97423f92a213898fcd48..9f15d9dbdfa74a0640b1a2b4ff695609d4758a4c 100644 +index 2c3577c6f59e482d68c80d3d414ed43942dfcfbb..fb82bb52f219e7683fe1d3c0fb3acbe2251de8d4 100644 --- a/src/main/java/net/minecraft/server/MinecraftServer.java +++ b/src/main/java/net/minecraft/server/MinecraftServer.java -@@ -1525,6 +1525,7 @@ public abstract class MinecraftServer extends ReentrantBlockableEventLoop 0; // Paper @@ -25,10 +25,10 @@ index fbc06f45926e9073c95c97423f92a213898fcd48..9f15d9dbdfa74a0640b1a2b4ff695609 this.profiler.push(() -> { diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index ce51f1768275fab434d46b5aa349dfdd2b631977..1aac66a8ef170f172b7cf4045d77800f93e26d3a 100644 +index 7c1f33082f84049544f958bfaa6552012b8cacd7..5424a3d83cb0705f6966bd607911280c92c75a14 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -710,10 +710,16 @@ public final class ItemStack { +@@ -718,10 +718,16 @@ public final class ItemStack { } public ItemStack copy() { @@ -48,7 +48,7 @@ index ce51f1768275fab434d46b5aa349dfdd2b631977..1aac66a8ef170f172b7cf4045d77800f itemstack.setPopTime(this.getPopTime()); if (this.tag != null) { diff --git a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java -index 585d1d1f4b1b212295da36e31ae2670b0d2b06c3..1b248db497500aa6bd346b306dcb908af77626f3 100644 +index 5bdad1866386908b9fef74d15862eb107fabe68f..370a25d2deb54f10a35ee24d9e7e92fbfde60edf 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/BlockEntity.java @@ -26,6 +26,7 @@ import co.aikar.timings.MinecraftTimings; // Paper @@ -59,7 +59,7 @@ index 585d1d1f4b1b212295da36e31ae2670b0d2b06c3..1b248db497500aa6bd346b306dcb908a public Timing tickTimer = MinecraftTimings.getTileEntityTimings(this); // Paper // CraftBukkit start - data containers -@@ -162,6 +163,7 @@ public abstract class BlockEntity { +@@ -161,6 +162,7 @@ public abstract class BlockEntity { public void setChanged() { if (this.level != null) { @@ -68,7 +68,7 @@ index 585d1d1f4b1b212295da36e31ae2670b0d2b06c3..1b248db497500aa6bd346b306dcb908a } diff --git a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java -index 789e5458f4a137694563a22612455506807de51b..aac5572c1d40a10cd1d17f89c9eb836718837577 100644 +index 6907e647ef4d3f5c9c46edb4cf0905844dd1cea9..93c13cb36024370f6ec71137cebca254af2b3b61 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/HopperBlockEntity.java @@ -193,6 +193,201 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen @@ -496,7 +496,7 @@ index 789e5458f4a137694563a22612455506807de51b..aac5572c1d40a10cd1d17f89c9eb8367 // CraftBukkit start - InventoryPickupItemEvent event = new InventoryPickupItemEvent(inventory.getOwner().getInventory(), (org.bukkit.entity.Item) itemEntity.getBukkitEntity()); + InventoryPickupItemEvent event = new InventoryPickupItemEvent(getInventory(inventory), (org.bukkit.entity.Item) itemEntity.getBukkitEntity()); // Paper - use getInventory() to avoid snapshot creation - itemEntity.level.getCraftServer().getPluginManager().callEvent(event); + itemEntity.level().getCraftServer().getPluginManager().callEvent(event); if (event.isCancelled()) { return false; @@ -442,7 +646,9 @@ public class HopperBlockEntity extends RandomizableContainerBlockEntity implemen @@ -555,16 +555,16 @@ index 789e5458f4a137694563a22612455506807de51b..aac5572c1d40a10cd1d17f89c9eb8367 } private static boolean canMergeItems(ItemStack first, ItemStack second) { -- return !first.is(second.getItem()) ? false : (first.getDamageValue() != second.getDamageValue() ? false : (first.getCount() > first.getMaxStackSize() ? false : ItemStack.tagMatches(first, second))); -+ return first.is(second.getItem()) && first.getDamageValue() == second.getDamageValue() && first.getCount() < first.getMaxStackSize() && ItemStack.tagMatches(first, second); // Paper - used to return true for full itemstacks?! +- return first.getCount() <= first.getMaxStackSize() && ItemStack.isSameItemSameTags(first, second); ++ return first.is(second.getItem()) && first.getDamageValue() == second.getDamageValue() && first.getCount() < first.getMaxStackSize() && ItemStack.isSameItemSameTags(first, second); // Paper - used to return true for full itemstacks?! } @Override diff --git a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java -index b9f0dae1ec96194fe78c086b63d8a18b1d0cfcf7..79b01e32f89defb6b78f4764600d33d4945af592 100644 +index e11618247ad889fa8fadbb2c7addd0de94caf249..081691f9710ff1115e4308f79ed49fbc38941193 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/RandomizableContainerBlockEntity.java -@@ -96,12 +96,19 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc +@@ -95,12 +95,19 @@ public abstract class RandomizableContainerBlockEntity extends BaseContainerBloc @Override public boolean isEmpty() { this.unpackLootTable((Player)null); diff --git a/patches/unapplied/server/0964-Fix-beehives-generating-from-using-bonemeal.patch b/patches/server/0939-Fix-beehives-generating-from-using-bonemeal.patch similarity index 94% rename from patches/unapplied/server/0964-Fix-beehives-generating-from-using-bonemeal.patch rename to patches/server/0939-Fix-beehives-generating-from-using-bonemeal.patch index f48130ef67..4784cf8470 100644 --- a/patches/unapplied/server/0964-Fix-beehives-generating-from-using-bonemeal.patch +++ b/patches/server/0939-Fix-beehives-generating-from-using-bonemeal.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Fix beehives generating from using bonemeal diff --git a/src/main/java/net/minecraft/world/item/ItemStack.java b/src/main/java/net/minecraft/world/item/ItemStack.java -index 1aac66a8ef170f172b7cf4045d77800f93e26d3a..fd6c80d6cb83ab2dc0fca913655eea8cc68dd5a6 100644 +index 5424a3d83cb0705f6966bd607911280c92c75a14..dd799019cc1fce709f8160fbd37c6ac11475593b 100644 --- a/src/main/java/net/minecraft/world/item/ItemStack.java +++ b/src/main/java/net/minecraft/world/item/ItemStack.java -@@ -388,6 +388,7 @@ public final class ItemStack { +@@ -392,6 +392,7 @@ public final class ItemStack { } for (CraftBlockState blockstate : blocks) { world.setBlock(blockstate.getPosition(),blockstate.getHandle(), blockstate.getFlag()); // SPIGOT-7248 - manual update to avoid physics where appropriate diff --git a/patches/unapplied/server/0965-Fix-api-checking-banned-ips.patch b/patches/server/0940-Fix-api-checking-banned-ips.patch similarity index 100% rename from patches/unapplied/server/0965-Fix-api-checking-banned-ips.patch rename to patches/server/0940-Fix-api-checking-banned-ips.patch diff --git a/patches/unapplied/server/0966-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch b/patches/server/0941-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch similarity index 88% rename from patches/unapplied/server/0966-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch rename to patches/server/0941-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch index 59f3bf134a..f4282269d8 100644 --- a/patches/unapplied/server/0966-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch +++ b/patches/server/0941-Fix-crash-relating-to-bad-recipes-in-furnace-like-ti.patch @@ -6,10 +6,10 @@ Subject: [PATCH] Fix crash relating to bad recipes in furnace-like tile diff --git a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java -index 2a786c9fd29dc2139cf487fa645cd43345d60167..a3f073066f6e2eea8964461ad2b0409ade202f35 100644 +index 5ccc419b904aec590c5624438da61ca6724b20d6..448fa4f4f200430d6ce3051763c7ceb697696146 100644 --- a/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java +++ b/src/main/java/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java -@@ -632,6 +632,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit +@@ -642,6 +642,7 @@ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntit Entry entry = (Entry) objectiterator.next(); worldserver.getRecipeManager().byKey((ResourceLocation) entry.getKey()).ifPresent((irecipe) -> { diff --git a/patches/unapplied/server/0967-Treat-sequence-violations-like-they-should-be.patch b/patches/server/0942-Treat-sequence-violations-like-they-should-be.patch similarity index 86% rename from patches/unapplied/server/0967-Treat-sequence-violations-like-they-should-be.patch rename to patches/server/0942-Treat-sequence-violations-like-they-should-be.patch index 91b302ad20..2ffef6455c 100644 --- a/patches/unapplied/server/0967-Treat-sequence-violations-like-they-should-be.patch +++ b/patches/server/0942-Treat-sequence-violations-like-they-should-be.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Treat sequence violations like they should be diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index ea91fe6ad0c52c94e99c7988c10879ed70f4062c..6c4cc7e74a67f63d3c9b0e9865f25c45512d244b 100644 +index 94f9dc6074b93c3c53f46f966763ecfb4cb9f3de..250709d0770b1f2b23eb53f497489631c78a72e4 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -@@ -2126,6 +2126,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -2123,6 +2123,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic public void ackBlockChangesUpTo(int sequence) { if (sequence < 0) { diff --git a/patches/unapplied/server/0968-remove-duplicate-animate-packet-for-records.patch b/patches/server/0943-remove-duplicate-animate-packet-for-records.patch similarity index 100% rename from patches/unapplied/server/0968-remove-duplicate-animate-packet-for-records.patch rename to patches/server/0943-remove-duplicate-animate-packet-for-records.patch diff --git a/patches/unapplied/server/0969-Prevent-causing-expired-keys-from-impacting-new-join.patch b/patches/server/0944-Prevent-causing-expired-keys-from-impacting-new-join.patch similarity index 95% rename from patches/unapplied/server/0969-Prevent-causing-expired-keys-from-impacting-new-join.patch rename to patches/server/0944-Prevent-causing-expired-keys-from-impacting-new-join.patch index db2a91cc88..770aa67aba 100644 --- a/patches/unapplied/server/0969-Prevent-causing-expired-keys-from-impacting-new-join.patch +++ b/patches/server/0944-Prevent-causing-expired-keys-from-impacting-new-join.patch @@ -24,7 +24,7 @@ index 23e0e6937e28f09271a4ec7c35e0076a576cf3d3..4aa8b483841028fbcc43f9ed47730881 UPDATE_GAME_MODE((serialized, buf) -> { serialized.gameMode = GameType.byId(buf.readVarInt()); diff --git a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java -index 5308d2996e807e1efba545fd293a4186dbfab3bf..aa287d7f37f38d938d195114408cb6dbda59063d 100644 +index 250709d0770b1f2b23eb53f497489631c78a72e4..4862d8911d0dc3facaf02fdbb4f17d8c948ec0ca 100644 --- a/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java +++ b/src/main/java/net/minecraft/server/network/ServerGamePacketListenerImpl.java @@ -296,6 +296,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic @@ -49,7 +49,7 @@ index 5308d2996e807e1efba545fd293a4186dbfab3bf..aa287d7f37f38d938d195114408cb6db } public void resetPosition() { -@@ -3631,6 +3639,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic +@@ -3597,6 +3605,7 @@ public class ServerGamePacketListenerImpl implements ServerPlayerConnection, Tic private void resetPlayerChatState(RemoteChatSession session) { this.chatSession = session; diff --git a/patches/unapplied/server/0970-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch b/patches/server/0945-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch similarity index 84% rename from patches/unapplied/server/0970-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch rename to patches/server/0945-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch index 73b980dd13..97b6952f55 100644 --- a/patches/unapplied/server/0970-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch +++ b/patches/server/0945-Prevent-GameEvents-being-fired-from-unloaded-chunks.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Prevent GameEvents being fired from unloaded chunks diff --git a/src/main/java/net/minecraft/server/level/ServerLevel.java b/src/main/java/net/minecraft/server/level/ServerLevel.java -index 309ef1b2181eae609737212a50d037a1565daf86..3bb63a652aca3c23f5f1bbf9cb70fce6540f2e33 100644 +index a97926b5d36c92d5696c6b7a547ada30d652afbd..42d5b4ffc51da90a8f3bbec84e44ac2b0cb7b5ee 100644 --- a/src/main/java/net/minecraft/server/level/ServerLevel.java +++ b/src/main/java/net/minecraft/server/level/ServerLevel.java -@@ -1640,6 +1640,11 @@ public class ServerLevel extends Level implements WorldGenLevel { +@@ -1701,6 +1701,11 @@ public class ServerLevel extends Level implements WorldGenLevel { @Override public void gameEvent(GameEvent event, Vec3 emitterPos, GameEvent.Context emitter) { diff --git a/patches/unapplied/server/0971-Use-array-for-gamerule-storage.patch b/patches/server/0946-Use-array-for-gamerule-storage.patch similarity index 100% rename from patches/unapplied/server/0971-Use-array-for-gamerule-storage.patch rename to patches/server/0946-Use-array-for-gamerule-storage.patch diff --git a/patches/unapplied/server/0973-Fix-a-couple-of-upstream-bed-issues.patch b/patches/server/0947-Fix-a-couple-of-upstream-bed-issues.patch similarity index 87% rename from patches/unapplied/server/0973-Fix-a-couple-of-upstream-bed-issues.patch rename to patches/server/0947-Fix-a-couple-of-upstream-bed-issues.patch index ebc52cbeb3..f4a4393fa2 100644 --- a/patches/unapplied/server/0973-Fix-a-couple-of-upstream-bed-issues.patch +++ b/patches/server/0947-Fix-a-couple-of-upstream-bed-issues.patch @@ -10,10 +10,10 @@ but then replaced it with a bed, you could respawn at the bed in that world. diff --git a/src/main/java/net/minecraft/world/level/block/BedBlock.java b/src/main/java/net/minecraft/world/level/block/BedBlock.java -index 33e4d832f00f0f563931bed77722a2b62923e4c0..d1d5363ab1742add8ff45507a303106f4d65f52f 100644 +index 69839965926c511b6396a0041b6e7295ebf5209b..d40500f9a807cab0b2fb6fa9032f33f4fb74c895 100644 --- a/src/main/java/net/minecraft/world/level/block/BedBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BedBlock.java -@@ -100,6 +100,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock +@@ -99,6 +99,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d, explodedBlockState), (ExplosionDamageCalculator) null, vec3d, 5.0F, true, Level.ExplosionInteraction.BLOCK); return InteractionResult.SUCCESS; } else if ((Boolean) state.getValue(BedBlock.OCCUPIED)) { @@ -21,7 +21,7 @@ index 33e4d832f00f0f563931bed77722a2b62923e4c0..d1d5363ab1742add8ff45507a303106f if (!this.kickVillagerOutOfBed(world, pos)) { player.displayClientMessage(Component.translatable("block.minecraft.bed.occupied"), true); } -@@ -157,8 +158,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock +@@ -156,8 +157,7 @@ public class BedBlock extends HorizontalDirectionalBlock implements EntityBlock // CraftBukkit end public static boolean canSetSpawn(Level world) { diff --git a/patches/unapplied/server/0974-Fix-demo-flag-not-enabling-demo-mode.patch b/patches/server/0948-Fix-demo-flag-not-enabling-demo-mode.patch similarity index 92% rename from patches/unapplied/server/0974-Fix-demo-flag-not-enabling-demo-mode.patch rename to patches/server/0948-Fix-demo-flag-not-enabling-demo-mode.patch index 7f2f6820eb..195413f40e 100644 --- a/patches/unapplied/server/0974-Fix-demo-flag-not-enabling-demo-mode.patch +++ b/patches/server/0948-Fix-demo-flag-not-enabling-demo-mode.patch @@ -6,7 +6,7 @@ Subject: [PATCH] Fix demo flag not enabling demo mode https://github.com/PaperMC/Paper/issues/9046 diff --git a/src/main/java/net/minecraft/server/Main.java b/src/main/java/net/minecraft/server/Main.java -index c6fa6bcd66d61359124a8426b919493c6ec43f06..cdbf10339a8e8846a8c364de483a0ccd95cd225a 100644 +index a3c400bb4ee5d8f2985f4bc7e3e35be548177cc6..dae36c6452ccd57a436dd918547b64d59957ab0a 100644 --- a/src/main/java/net/minecraft/server/Main.java +++ b/src/main/java/net/minecraft/server/Main.java @@ -301,7 +301,7 @@ public class Main { diff --git a/patches/unapplied/server/0976-Add-Mob-Experience-reward-API.patch b/patches/server/0949-Add-Mob-Experience-reward-API.patch similarity index 100% rename from patches/unapplied/server/0976-Add-Mob-Experience-reward-API.patch rename to patches/server/0949-Add-Mob-Experience-reward-API.patch diff --git a/patches/unapplied/server/0977-Break-redstone-on-top-of-trap-doors-early.patch b/patches/server/0950-Break-redstone-on-top-of-trap-doors-early.patch similarity index 94% rename from patches/unapplied/server/0977-Break-redstone-on-top-of-trap-doors-early.patch rename to patches/server/0950-Break-redstone-on-top-of-trap-doors-early.patch index 5142b3f57d..461e4c40ca 100644 --- a/patches/unapplied/server/0977-Break-redstone-on-top-of-trap-doors-early.patch +++ b/patches/server/0950-Break-redstone-on-top-of-trap-doors-early.patch @@ -7,10 +7,10 @@ This logic hooks into the neighbour update which should be invoked as a result of redstone powering the trap door. diff --git a/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java b/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java -index 89ae0fa000b5950f4c0d23b7e9f959989b9e9a84..29e43313ff6bd9b10cf6409e3519c0b2603b431e 100644 +index aa3fdadd1cc2200adb6e0cf523c38833dc01b71b..b9e3c9cd709d42bced85436720ccc7b9c7e49552 100644 --- a/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java +++ b/src/main/java/net/minecraft/world/level/block/TrapDoorBlock.java -@@ -125,7 +125,26 @@ public class TrapDoorBlock extends HorizontalDirectionalBlock implements SimpleW +@@ -124,7 +124,26 @@ public class TrapDoorBlock extends HorizontalDirectionalBlock implements SimpleW flag1 = eventRedstone.getNewCurrent() > 0; } // CraftBukkit end diff --git a/patches/unapplied/server/0978-Fix-DamageCause-for-Falling-Blocks.patch b/patches/server/0951-Fix-DamageCause-for-Falling-Blocks.patch similarity index 87% rename from patches/unapplied/server/0978-Fix-DamageCause-for-Falling-Blocks.patch rename to patches/server/0951-Fix-DamageCause-for-Falling-Blocks.patch index 430a94b984..6b5a933727 100644 --- a/patches/unapplied/server/0978-Fix-DamageCause-for-Falling-Blocks.patch +++ b/patches/server/0951-Fix-DamageCause-for-Falling-Blocks.patch @@ -5,7 +5,7 @@ Subject: [PATCH] Fix DamageCause for Falling Blocks diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 0f4154560047735562b583081a9edb314f3a8a74..221f5088953b3452966d07eabd4ea8b38c465fd9 100644 +index 86b0fe7b6feeef0e085e577954f869e020cc0f04..cc1a7ac6e2123758a8d74b14363265a9040b5ad4 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1030,6 +1030,11 @@ public class CraftEventFactory { @@ -19,4 +19,4 @@ index 0f4154560047735562b583081a9edb314f3a8a74..221f5088953b3452966d07eabd4ea8b3 + // Paper end return CraftEventFactory.callEntityDamageEvent(damager, entity, cause, modifiers, modifierFunctions, cancelled, source.isCritical()); // Paper - add critical damage API - } else if (source.is(DamageTypes.OUT_OF_WORLD)) { + } else if (source.is(DamageTypes.FELL_OUT_OF_WORLD)) { diff --git a/patches/unapplied/server/0979-Avoid-Lazy-Initialization-for-Enum-Fields.patch b/patches/server/0952-Avoid-Lazy-Initialization-for-Enum-Fields.patch similarity index 100% rename from patches/unapplied/server/0979-Avoid-Lazy-Initialization-for-Enum-Fields.patch rename to patches/server/0952-Avoid-Lazy-Initialization-for-Enum-Fields.patch diff --git a/patches/unapplied/server/0980-More-accurate-isInOpenWater-impl.patch b/patches/server/0953-More-accurate-isInOpenWater-impl.patch similarity index 93% rename from patches/unapplied/server/0980-More-accurate-isInOpenWater-impl.patch rename to patches/server/0953-More-accurate-isInOpenWater-impl.patch index eaedd4c5e5..39f99272f6 100644 --- a/patches/unapplied/server/0980-More-accurate-isInOpenWater-impl.patch +++ b/patches/server/0953-More-accurate-isInOpenWater-impl.patch @@ -13,7 +13,7 @@ public net.minecraft.world.entity.projectile.FishingHook calculateOpenWater(Lnet public net.minecraft.world.entity.projectile.FishingHook outOfWaterTime diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java -index 7e34d6a986a98f0b9d5c2a66000ea94e2d1f46b0..f4591dfe799538ba8aea104793ceb9995dad0bb6 100644 +index 4d12c33b9a360129ffaefb551010b354bba0c69f..bac5c30d3aae1b3a7dbfb78f6fd37c11038fc735 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java @@ -171,7 +171,7 @@ public class CraftFishHook extends CraftProjectile implements FishHook { diff --git a/patches/unapplied/server/0981-Fix-concurrenct-access-to-lookups-field-in-RegistryO.patch b/patches/server/0954-Fix-concurrenct-access-to-lookups-field-in-RegistryO.patch similarity index 95% rename from patches/unapplied/server/0981-Fix-concurrenct-access-to-lookups-field-in-RegistryO.patch rename to patches/server/0954-Fix-concurrenct-access-to-lookups-field-in-RegistryO.patch index 4879c51f2a..2127f28b00 100644 --- a/patches/unapplied/server/0981-Fix-concurrenct-access-to-lookups-field-in-RegistryO.patch +++ b/patches/server/0954-Fix-concurrenct-access-to-lookups-field-in-RegistryO.patch @@ -11,7 +11,7 @@ more than one Netty IO thread. Fixes https://github.com/PaperMC/Folia/issues/11 diff --git a/src/main/java/net/minecraft/resources/RegistryOps.java b/src/main/java/net/minecraft/resources/RegistryOps.java -index 7709eeac907c4895a264cec0a3d453aa8b194c18..4495802efec958095bcfd41487b30c3c799d7b36 100644 +index 7709eeac907c4895a264cec0a3d453aa8b194c18..29182c49b30110809f786ae99b47fcc67976562f 100644 --- a/src/main/java/net/minecraft/resources/RegistryOps.java +++ b/src/main/java/net/minecraft/resources/RegistryOps.java @@ -19,11 +19,11 @@ public class RegistryOps extends DelegatingOps { diff --git a/patches/unapplied/server/0982-Optimise-recalcBlockCounts-for-empty-sections.patch b/patches/server/0955-Optimise-recalcBlockCounts-for-empty-sections.patch similarity index 89% rename from patches/unapplied/server/0982-Optimise-recalcBlockCounts-for-empty-sections.patch rename to patches/server/0955-Optimise-recalcBlockCounts-for-empty-sections.patch index 7380d66f2b..143efbfdfe 100644 --- a/patches/unapplied/server/0982-Optimise-recalcBlockCounts-for-empty-sections.patch +++ b/patches/server/0955-Optimise-recalcBlockCounts-for-empty-sections.patch @@ -16,10 +16,10 @@ sections with a ZeroBitStorage data to to take ~20% of the process, now it takes <1%. diff --git a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java -index 1b80a91fa36c59a31b57ef7ef4a68eacbb0f17f5..cf2c053a0e82928c7a7cf99abe1bbd1eb7824507 100644 +index f150a16fbf888455301d8b9043f0b45fb1fa1d84..fd4c4122e3811c8f5d8c02f8faaf3579bcb8ad79 100644 --- a/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java +++ b/src/main/java/net/minecraft/world/level/chunk/LevelChunkSection.java -@@ -244,6 +244,7 @@ public class LevelChunkSection { +@@ -229,6 +229,7 @@ public class LevelChunkSection { this.nonEmptyBlockCount = 0; this.tickingBlockCount = 0; this.tickingFluidCount = 0; @@ -27,7 +27,7 @@ index 1b80a91fa36c59a31b57ef7ef4a68eacbb0f17f5..cf2c053a0e82928c7a7cf99abe1bbd1e this.states.forEachLocation((BlockState iblockdata, int i) -> { FluidState fluid = iblockdata.getFluidState(); -@@ -263,6 +264,7 @@ public class LevelChunkSection { +@@ -248,6 +249,7 @@ public class LevelChunkSection { } }); diff --git a/patches/unapplied/server/0983-Fix-destroying-beehive-without-any-players-nearby-th.patch b/patches/server/0956-Fix-destroying-beehive-without-any-players-nearby-th.patch similarity index 92% rename from patches/unapplied/server/0983-Fix-destroying-beehive-without-any-players-nearby-th.patch rename to patches/server/0956-Fix-destroying-beehive-without-any-players-nearby-th.patch index 0a231f55e6..b166366059 100644 --- a/patches/unapplied/server/0983-Fix-destroying-beehive-without-any-players-nearby-th.patch +++ b/patches/server/0956-Fix-destroying-beehive-without-any-players-nearby-th.patch @@ -8,7 +8,7 @@ If the player moves out of range by the time the block is destroyed, then the exception would throw and remove the player from the world diff --git a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java -index ca6cf92b96d68ba8b34e90edda2a93e11214c91b..d5dd280fbbd87438c72d439a73ea827b9fbe20b0 100644 +index 01c8394c6e6b65f40db04280458d0191c116b845..8b715a750a0406d1d7b25c2f023dc2fb4d8b70fa 100644 --- a/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java +++ b/src/main/java/net/minecraft/world/level/block/BeehiveBlock.java @@ -98,6 +98,11 @@ public class BeehiveBlock extends BaseEntityBlock { diff --git a/patches/unapplied/server/0984-Expand-PlayerItemMendEvent.patch b/patches/server/0957-Expand-PlayerItemMendEvent.patch similarity index 90% rename from patches/unapplied/server/0984-Expand-PlayerItemMendEvent.patch rename to patches/server/0957-Expand-PlayerItemMendEvent.patch index f85a71b43c..d94d6d8ea5 100644 --- a/patches/unapplied/server/0984-Expand-PlayerItemMendEvent.patch +++ b/patches/server/0957-Expand-PlayerItemMendEvent.patch @@ -5,10 +5,10 @@ Subject: [PATCH] Expand PlayerItemMendEvent diff --git a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java -index a9f20e6a73e2e1875abd1e122a5d08c4ef44f9d8..89699aaccd45a5a928a97d1b3ad06f5de5b9fad1 100644 +index 000c13afc6bb3acb68b9adcaeefb7bb1cb703702..673327af0f77aeac0d704b0fb6bebebc76a3c966 100644 --- a/src/main/java/net/minecraft/world/entity/ExperienceOrb.java +++ b/src/main/java/net/minecraft/world/entity/ExperienceOrb.java -@@ -330,7 +330,7 @@ public class ExperienceOrb extends Entity { +@@ -335,7 +335,7 @@ public class ExperienceOrb extends Entity { ItemStack itemstack = (ItemStack) entry.getValue(); int j = Math.min(this.xpToDurability(this.value), itemstack.getDamageValue()); // CraftBukkit start @@ -17,7 +17,7 @@ index a9f20e6a73e2e1875abd1e122a5d08c4ef44f9d8..89699aaccd45a5a928a97d1b3ad06f5d j = event.getRepairAmount(); if (event.isCancelled()) { return amount; -@@ -338,8 +338,13 @@ public class ExperienceOrb extends Entity { +@@ -343,8 +343,13 @@ public class ExperienceOrb extends Entity { // CraftBukkit end itemstack.setDamageValue(itemstack.getDamageValue() - j); @@ -33,10 +33,10 @@ index a9f20e6a73e2e1875abd1e122a5d08c4ef44f9d8..89699aaccd45a5a928a97d1b3ad06f5d return k > 0 ? this.repairPlayerItems(player, k) : 0; } else { diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -index 5f0146255b050dfc873789e7dd4bc1dc4a929f02..be64633c8bcee96f2ad5247525cac965b7b031b1 100644 +index fc71dfcf4387c355a69a8bbfaec17aafb6d98d2d..c911e86abaa1293e8948e37cb197f64b8ee35844 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java -@@ -1700,11 +1700,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { +@@ -1673,11 +1673,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player { orb.setPosRaw(handle.getX(), handle.getY(), handle.getZ()); int i = Math.min(orb.xpToDurability(amount), itemstack.getDamageValue()); @@ -51,7 +51,7 @@ index 5f0146255b050dfc873789e7dd4bc1dc4a929f02..be64633c8bcee96f2ad5247525cac965 } } diff --git a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java -index 221f5088953b3452966d07eabd4ea8b38c465fd9..a153c134cf26e86d49ef419eca35994539af0db3 100644 +index cc1a7ac6e2123758a8d74b14363265a9040b5ad4..1ced79cf92fe0b01a42f097794dacc3ce74518f3 100644 --- a/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java +++ b/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java @@ -1262,10 +1262,10 @@ public class CraftEventFactory { diff --git a/patches/unapplied/server/0985-Refresh-ProjectileSource-for-projectiles.patch b/patches/server/0958-Refresh-ProjectileSource-for-projectiles.patch similarity index 89% rename from patches/unapplied/server/0985-Refresh-ProjectileSource-for-projectiles.patch rename to patches/server/0958-Refresh-ProjectileSource-for-projectiles.patch index bce07f367f..d7ff74fa14 100644 --- a/patches/unapplied/server/0985-Refresh-ProjectileSource-for-projectiles.patch +++ b/patches/server/0958-Refresh-ProjectileSource-for-projectiles.patch @@ -9,10 +9,10 @@ Previously, after the entity reloaded, Projectile#getShooter would return null, while the entity still had an owner. diff --git a/src/main/java/net/minecraft/world/entity/Entity.java b/src/main/java/net/minecraft/world/entity/Entity.java -index df316ca580a0a3b4ba6b658f7d7bdf542f4ad85b..280ee1838106201f5e3ba7753caced6d030f7e55 100644 +index 13e22235eccb2456112eb6a5f0e7ccd788379f89..aacd6b18c3cbd49e569496b186a7235857ebeafc 100644 --- a/src/main/java/net/minecraft/world/entity/Entity.java +++ b/src/main/java/net/minecraft/world/entity/Entity.java -@@ -378,6 +378,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { +@@ -381,6 +381,7 @@ public abstract class Entity implements Nameable, EntityAccess, CommandSource { public boolean valid; public boolean generation; public int maxAirTicks = this.getDefaultMaxAirSupply(); // CraftBukkit - SPIGOT-6907: re-implement LivingEntity#setMaximumAir() @@ -21,7 +21,7 @@ index df316ca580a0a3b4ba6b658f7d7bdf542f4ad85b..280ee1838106201f5e3ba7753caced6d public boolean lastDamageCancelled; // SPIGOT-5339, SPIGOT-6252, SPIGOT-6777: Keep track if the event was canceled public boolean persistentInvisibility = false; diff --git a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java -index 8b2a3a8482018b7db7de81bc295862f783e17ce5..a211ca048dddc75afce1f83ee1700bad66e457fc 100644 +index 6d7ac0c8c171834fa8da94f158258a4774d80ec4..1b7cf6d06bdf36f146656727511a461f2520762e 100644 --- a/src/main/java/net/minecraft/world/entity/projectile/Projectile.java +++ b/src/main/java/net/minecraft/world/entity/projectile/Projectile.java @@ -49,14 +49,24 @@ public abstract class Projectile extends Entity implements TraceableEntity { @@ -49,8 +49,8 @@ index 8b2a3a8482018b7db7de81bc295862f783e17ce5..a211ca048dddc75afce1f83ee1700bad if (this.cachedOwner != null && !this.cachedOwner.isRemoved()) { + this.refreshProjectileSource(false); // Paper return this.cachedOwner; - } else if (this.ownerUUID != null && this.level instanceof ServerLevel) { - this.cachedOwner = ((ServerLevel) this.level).getEntity(this.ownerUUID); + } else if (this.ownerUUID != null && this.level() instanceof ServerLevel) { + this.cachedOwner = ((ServerLevel) this.level()).getEntity(this.ownerUUID); @@ -72,6 +82,7 @@ public abstract class Projectile extends Entity implements TraceableEntity { } } diff --git a/patches/unapplied/server/0986-Add-transient-modifier-API.patch b/patches/server/0959-Add-transient-modifier-API.patch similarity index 100% rename from patches/unapplied/server/0986-Add-transient-modifier-API.patch rename to patches/server/0959-Add-transient-modifier-API.patch diff --git a/patches/unapplied/server/0932-Fix-MapLike-Codec-missing-key-selector.patch b/patches/unapplied/server/0932-Fix-MapLike-Codec-missing-key-selector.patch deleted file mode 100644 index 4902873c14..0000000000 --- a/patches/unapplied/server/0932-Fix-MapLike-Codec-missing-key-selector.patch +++ /dev/null @@ -1,19 +0,0 @@ -From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001 -From: Jake Potrebic -Date: Fri, 9 Dec 2022 12:11:39 -0800 -Subject: [PATCH] Fix MapLike Codec missing key 'selector' - - -diff --git a/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationListener.java b/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationListener.java -index 586d0a40cc4f36e80236e87232bb58f81ec089a5..103e12ec589dcbe6dbad7432b50e0644c3a37b1b 100644 ---- a/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationListener.java -+++ b/src/main/java/net/minecraft/world/level/gameevent/vibrations/VibrationListener.java -@@ -99,7 +99,7 @@ public class VibrationListener implements GameEventListener { - return vibrationlistener.listenerRange; - }), VibrationInfo.CODEC.optionalFieldOf("event").forGetter((vibrationlistener) -> { - return Optional.ofNullable(vibrationlistener.currentVibration); -- }), VibrationSelector.CODEC.fieldOf("selector").forGetter((vibrationlistener) -> { -+ }), Codec.optionalField("selector", VibrationSelector.CODEC).xmap(o -> o.orElseGet(VibrationSelector::new), Optional::of).forGetter((vibrationlistener) -> { // Paper - fix MapLike spam for missing "selector" in 1.19.2 - return vibrationlistener.selectionStrategy; - }), ExtraCodecs.NON_NEGATIVE_INT.fieldOf("event_delay").orElse(0).forGetter((vibrationlistener) -> { - return vibrationlistener.travelTimeInTicks;