From 30e4583dbe2a79acc5170b59260010e8f138ec1a Mon Sep 17 00:00:00 2001
From: CraftBukkit/Spigot <noreply+git-craftbukkit@papermc.io>
Date: Wed, 11 Dec 2024 22:26:55 +0100
Subject: [PATCH] Remap CraftBukkit to Mojang+Yarn Mappings

By: Initial Source <noreply+automated@papermc.io>
---
 .../brigadier/tree/CommandNode.java.patch     |   29 +-
 ...ashReport.patch => CrashReport.java.patch} |    6 +-
 ...der.patch => AdvancementHolder.java.patch} |   13 +-
 ...tTree.patch => AdvancementTree.java.patch} |    2 +-
 .../commands/CommandDispatcher.patch          |  197 ---
 .../commands/CommandListenerWrapper.patch     |   63 -
 ...istener.patch => CommandSource.java.patch} |   10 +-
 .../commands/CommandSourceStack.java.patch    |   61 +
 .../minecraft/commands/Commands.java.patch    |  240 +++
 .../commands/arguments/ArgumentEntity.patch   |   19 -
 .../arguments/EntityArgument.java.patch       |   38 +
 .../arguments/blocks/ArgumentBlock.patch      |   38 -
 .../blocks/BlockStateParser.java.patch        |   38 +
 .../selector/EntitySelector.java.patch        |   11 +
 .../arguments/selector/EntitySelector.patch   |   11 -
 ....patch => EntitySelectorParser.java.patch} |   10 +-
 .../cauldron/CauldronInteraction.java.patch   |  195 +++
 .../core/cauldron/CauldronInteraction.patch   |  192 ---
 ...ch.patch => DataComponentPatch.java.patch} |   23 +-
 ...ch => BoatDispenseItemBehavior.java.patch} |   47 +-
 .../DefaultDispenseItemBehavior.java.patch    |  113 ++
 .../core/dispenser/DispenseBehaviorItem.patch |  100 --
 .../DispenseBehaviorProjectile.patch          |   58 -
 .../dispenser/DispenseBehaviorShears.patch    |   73 -
 .../DispenseBehaviorShulkerBox.patch          |   46 -
 ....patch => DispenseItemBehavior.java.patch} |  460 +++---
 ... EquipmentDispenseItemBehavior.java.patch} |   44 +-
 ...> MinecartDispenseItemBehavior.java.patch} |   51 +-
 .../ProjectileDispenseBehavior.java.patch     |   57 +
 .../ShearsDispenseItemBehavior.java.patch     |   78 +
 .../ShulkerBoxDispenseBehavior.java.patch     |   46 +
 ...IntArray.patch => ByteArrayTag.java.patch} |    4 +-
 ...ByteArray.patch => IntArrayTag.java.patch} |    4 +-
 .../nbt/NBTCompressedStreamTools.patch        |    7 -
 .../net/minecraft/nbt/NbtIo.java.patch        |    7 +
 .../minecraft/network/Connection.java.patch   |   37 +
 .../network/FriendlyByteBuf.java.patch        |   71 +
 .../minecraft/network/NetworkManager.patch    |   37 -
 .../network/PacketDataSerializer.patch        |   71 -
 .../minecraft/network/chat/ChatHexColor.patch |   35 -
 .../network/chat/Component.java.patch         |   27 +
 .../network/chat/IChatBaseComponent.patch     |   26 -
 .../network/chat/TextColor.java.patch         |   37 +
 .../network/protocol/PacketUtils.java.patch   |   27 +
 .../protocol/PlayerConnectionUtils.patch      |   22 -
 ...ServerboundCustomPayloadPacket.java.patch} |   14 +-
 ...load.patch => DiscardedPayload.java.patch} |   16 +-
 ...ientboundInitializeBorderPacket.java.patch |   15 +
 .../ClientboundInitializeBorderPacket.patch   |   15 -
 ...tboundSectionBlocksUpdatePacket.java.patch |   23 +
 ...lientboundSetBorderCenterPacket.java.patch |   15 +
 .../ClientboundSetBorderCenterPacket.patch    |   15 -
 ...=> ClientboundSystemChatPacket.java.patch} |    0
 .../game/PacketPlayInBlockPlace.patch         |    7 -
 .../protocol/game/PacketPlayInUseItem.patch   |    7 -
 .../game/PacketPlayOutMultiBlockChange.patch  |   23 -
 .../ServerboundUseItemOnPacket.java.patch     |    7 +
 .../game/ServerboundUseItemPacket.java.patch  |    7 +
 .../ClientIntentionPacket.java.patch          |    7 +
 .../PacketHandshakingInSetProtocol.patch      |    7 -
 .../network/syncher/DataWatcher.patch         |   46 -
 .../syncher/SynchedEntityData.java.patch      |   34 +
 .../server/AdvancementDataPlayer.patch        |   18 -
 .../net/minecraft/server/Bootstrap.java.patch |  116 ++
 .../minecraft/server/DispenserRegistry.patch  |  111 --
 .../server/{Main.patch => Main.java.patch}    |  109 +-
 ...erver.patch => MinecraftServer.java.patch} |  568 ++++---
 .../server/PlayerAdvancements.java.patch      |   18 +
 .../minecraft/server/ScoreboardServer.patch   |  132 --
 ...ch => ServerAdvancementManager.java.patch} |   14 +-
 ...patch => ServerFunctionManager.java.patch} |    6 +-
 .../server/ServerScoreboard.java.patch        |  132 ++
 ...patch => ServerTickRateManager.java.patch} |   10 +-
 .../server/bossevents/BossBattleCustom.patch  |   30 -
 .../bossevents/CustomBossEvent.java.patch     |   31 +
 .../server/commands/CommandDifficulty.patch   |   17 -
 .../server/commands/CommandEffect.patch       |   29 -
 .../server/commands/CommandGamerule.patch     |   20 -
 .../server/commands/CommandList.patch         |   18 -
 .../server/commands/CommandLoot.patch         |   19 -
 .../server/commands/CommandReload.patch       |   19 -
 .../server/commands/CommandSchedule.patch     |   11 -
 .../commands/CommandSetWorldSpawn.patch       |   11 -
 .../server/commands/CommandSpawnpoint.patch   |   11 -
 .../commands/CommandSpreadPlayers.patch       |   20 -
 .../server/commands/CommandSummon.patch       |   11 -
 .../server/commands/CommandTeleport.patch     |   49 -
 .../server/commands/CommandTime.patch         |   56 -
 .../server/commands/CommandWeather.patch      |   34 -
 .../server/commands/CommandWorldBorder.patch  |   65 -
 .../commands/DifficultyCommand.java.patch     |   17 +
 .../server/commands/EffectCommands.java.patch |   29 +
 .../commands/GameRuleCommand.java.patch       |   20 +
 ...mmandGive.patch => GiveCommand.java.patch} |    6 +-
 .../commands/ListPlayersCommand.java.patch    |   18 +
 .../server/commands/LootCommand.java.patch    |   19 +
 .../server/commands/PlaceCommand.java.patch   |   10 +
 .../server/commands/PlaceCommand.patch        |   10 -
 .../server/commands/ReloadCommand.java.patch  |   19 +
 .../commands/ScheduleCommand.java.patch       |   11 +
 .../commands/SetSpawnCommand.java.patch       |   11 +
 .../commands/SetWorldSpawnCommand.java.patch  |   11 +
 .../commands/SpreadPlayersCommand.java.patch  |   20 +
 .../server/commands/SummonCommand.java.patch  |   11 +
 .../commands/TeleportCommand.java.patch       |   54 +
 .../server/commands/TimeCommand.java.patch    |   55 +
 .../server/commands/WeatherCommand.java.patch |   34 +
 .../commands/WorldBorderCommand.java.patch    |   65 +
 ...erver.patch => DedicatedServer.java.patch} |  145 +-
 ...h => DedicatedServerProperties.java.patch} |   24 +-
 ...tch => DedicatedServerSettings.java.patch} |    2 +-
 .../server/dedicated/PropertyManager.patch    |  124 --
 .../server/dedicated/Settings.java.patch      |  135 ++
 ...UI.patch => MinecraftServerGui.java.patch} |   12 +-
 ...ayerChunk.patch => ChunkHolder.java.patch} |   84 +-
 .../server/level/ChunkMap.java.patch          |  123 ++
 .../server/level/ChunkMapDistance.patch       |  124 --
 .../server/level/DistanceManager.java.patch   |  137 ++
 .../server/level/PlayerChunkMap.patch         |  123 --
 .../server/level/PlayerInteractManager.patch  |  333 ----
 .../level/RegionLimitedWorldAccess.patch      |   25 -
 ...rver.patch => ServerChunkCache.java.patch} |  113 +-
 ...kerEntry.patch => ServerEntity.java.patch} |   92 +-
 .../server/level/ServerLevel.java.patch       |  725 +++++++++
 ...tyPlayer.patch => ServerPlayer.java.patch} |  949 +++++++-----
 .../level/ServerPlayerGameMode.java.patch     |  345 +++++
 .../server/level/TicketType.java.patch        |   11 +
 .../minecraft/server/level/TicketType.patch   |   11 -
 .../server/level/WorldGenRegion.java.patch    |   25 +
 .../minecraft/server/level/WorldServer.patch  |  619 --------
 .../server/network/HandshakeListener.patch    |   69 -
 ...er.patch => LegacyQueryHandler.java.patch} |   32 +-
 ...ServerCommonPacketListenerImpl.java.patch} |  174 ++-
 ...onfigurationPacketListenerImpl.java.patch} |   28 +-
 .../server/network/ServerConnection.patch     |   30 -
 .../ServerConnectionListener.java.patch       |   31 +
 ...> ServerGamePacketListenerImpl.java.patch} | 1002 ++++++------
 ...rverHandshakePacketListenerImpl.java.patch |   69 +
 ... ServerLoginPacketListenerImpl.java.patch} |  169 +-
 ...ServerStatusPacketListenerImpl.java.patch} |   50 +-
 .../server/players/BanListEntry.java.patch    |   34 +
 .../server/players/ExpirableListEntry.patch   |   34 -
 .../server/players/GameProfileBanEntry.patch  |    7 -
 ...ache.patch => GameProfileCache.java.patch} |   16 +-
 .../NameReferencingFileConverter.patch        |   82 -
 .../players/OldUsersConverter.java.patch      |   79 +
 .../server/players/PlayerList.java.patch      |  911 +++++++++++
 .../minecraft/server/players/PlayerList.patch |  798 ----------
 ...eepStatus.patch => SleepStatus.java.patch} |   18 +-
 ...onList.patch => StoredUserList.java.patch} |   16 +-
 .../players/UserBanListEntry.java.patch       |    7 +
 .../server/rcon/RconConsoleSource.java.patch  |   49 +
 .../rcon/RemoteControlCommandListener.patch   |   45 -
 ...rolSession.patch => RconClient.java.patch} |   49 +-
 ...rver.patch => ServerRecipeBook.java.patch} |   18 +-
 .../stats/ServerStatisticManager.patch        |   26 -
 .../stats/ServerStatsCounter.java.patch       |   26 +
 .../minecraft/stats/StatisticManager.patch    |   15 -
 .../minecraft/stats/StatsCounter.java.patch   |   15 +
 .../net/minecraft/util/SpawnUtil.java.patch   |   44 +
 .../net/minecraft/util/SpawnUtil.patch        |   36 -
 ...rottler.patch => TickThrottler.java.patch} |   12 +-
 ...erRegistry.patch => DataFixers.java.patch} |   88 +-
 ...Map.patch => ItemStackMapIdFix.java.patch} |    4 +-
 ...h => ItemStackTheFlatteningFix.java.patch} |    4 +-
 .../util/worldupdate/WorldUpgrader.java.patch |   32 +
 .../util/worldupdate/WorldUpgrader.patch      |   32 -
 ...est.patch => CompoundContainer.java.patch} |   26 +-
 ...{IInventory.patch => Container.java.patch} |   31 +-
 ...ainer.patch => SimpleContainer.java.patch} |   44 +-
 ...geSource.patch => DamageSource.java.patch} |   13 +-
 ...Sources.patch => DamageSources.java.patch} |   54 +-
 .../effect/HealOrHarmMobEffect.java.patch     |   20 +
 .../world/effect/HealOrHarmMobEffect.patch    |   20 -
 .../world/effect/HungerMobEffect.java.patch   |   11 +
 .../world/effect/HungerMobEffect.patch        |   11 -
 .../world/effect/InfestedMobEffect.java.patch |   15 +
 .../world/effect/InfestedMobEffect.patch      |   15 -
 .../world/effect/MobEffectUtil.java.patch     |   26 +
 .../world/effect/MobEffectUtil.patch          |   23 -
 ...ffect.patch => OozingMobEffect.java.patch} |    2 +-
 .../world/effect/PoisonMobEffect.java.patch   |   11 +
 .../world/effect/PoisonMobEffect.patch        |   11 -
 .../effect/RegenerationMobEffect.java.patch   |   11 +
 .../world/effect/RegenerationMobEffect.patch  |   11 -
 ...t.patch => SaturationMobEffect.java.patch} |   23 +-
 .../world/entity/AgeableMob.java.patch        |   35 +
 ...Cloud.patch => AreaEffectCloud.java.patch} |   73 +-
 .../world/entity/ConversionType.java.patch    |   46 +
 .../world/entity/ConversionType.patch         |   41 -
 .../minecraft/world/entity/Entity.java.patch  | 1267 +++++++++++++++
 .../net/minecraft/world/entity/Entity.patch   | 1002 ------------
 .../world/entity/EntityAgeable.patch          |   35 -
 .../world/entity/EntityCreature.patch         |   13 -
 .../world/entity/EntityExperienceOrb.patch    |  143 --
 .../world/entity/EntityInsentient.patch       |  314 ----
 .../minecraft/world/entity/EntityLiving.patch | 1130 --------------
 .../world/entity/EntitySelector.java.patch    |   11 +
 .../world/entity/EntityTameableAnimal.patch   |   31 -
 .../world/entity/EntityType.java.patch        |  128 ++
 .../minecraft/world/entity/EntityTypes.patch  |  124 --
 .../world/entity/ExperienceOrb.java.patch     |  142 ++
 .../world/entity/IEntitySelector.patch        |   11 -
 ...teraction.patch => Interaction.java.patch} |   18 +-
 ...age.patch => ItemBasedSteering.java.patch} |    8 +-
 .../world/entity/Leashable.java.patch         |  125 ++
 .../minecraft/world/entity/Leashable.patch    |  126 --
 ...ghtning.patch => LightningBolt.java.patch} |   41 +-
 .../world/entity/LivingEntity.java.patch      | 1373 +++++++++++++++++
 .../net/minecraft/world/entity/Mob.java.patch |  333 ++++
 ...yAngerable.patch => NeutralMob.java.patch} |   41 +-
 .../world/entity/PathfinderMob.java.patch     |   12 +
 .../world/entity/TamableAnimal.java.patch     |   30 +
 .../ai/attributes/Attributes.java.patch       |    7 +
 .../ai/attributes/GenericAttributes.patch     |    7 -
 ...=> AssignProfessionFromJobSite.java.patch} |   10 +-
 ...Adult.patch => BabyFollowAdult.java.patch} |   27 +-
 .../entity/ai/behavior/BehaviorFarm.patch     |   58 -
 .../entity/ai/behavior/BehaviorMakeLove.patch |   43 -
 .../entity/ai/behavior/BehaviorUtil.patch     |   51 -
 .../ai/behavior/BehaviorUtils.java.patch      |   51 +
 ...leItem.patch => GoToWantedItem.java.patch} |   16 +-
 .../ai/behavior/HarvestFarmland.java.patch    |   63 +
 ...Door.patch => InteractWithDoor.java.patch} |   20 +-
 .../PrepareRamNearestTarget.java.patch        |   73 +
 .../ai/behavior/PrepareRamNearestTarget.patch |   68 -
 ...ssion.patch => ResetProfession.java.patch} |    8 +-
 ...getSet.patch => StartAttacking.java.patch} |   24 +-
 ...> StopAttackingIfTargetInvalid.java.patch} |   12 +-
 ... => TryLaySpawnOnWaterNearLand.java.patch} |    6 +-
 .../ai/behavior/VillagerMakeLove.java.patch   |   42 +
 .../{Digging.patch => Digging.java.patch}     |    4 +-
 ...eakDoor.patch => BreakDoorGoal.java.patch} |    4 +-
 ...lEatTile.patch => EatBlockGoal.java.patch} |   14 +-
 ...Block.patch => RemoveBlockGoal.java.patch} |   17 +-
 ...atch => RunAroundLikeCrazyGoal.java.patch} |   19 +-
 ....patch => SitWhenOrderedToGoal.java.patch} |    4 +-
 ...erGoalTempt.patch => TemptGoal.java.patch} |   25 +-
 ...tch => DefendVillageTargetGoal.java.patch} |    4 +-
 ...rget.patch => HurtByTargetGoal.java.patch} |   10 +-
 .../NearestAttackableTargetGoal.java.patch    |   11 +
 ...patch => OwnerHurtByTargetGoal.java.patch} |    6 +-
 ...t.patch => OwnerHurtTargetGoal.java.patch} |    6 +-
 ...athfinderGoalNearestAttackableTarget.patch |   11 -
 .../ai/goal/target/PathfinderGoalTarget.patch |   31 -
 .../ai/goal/target/TargetGoal.java.patch      |   30 +
 ...Sensor.patch => TemptingSensor.java.patch} |   24 +-
 .../entity/ai/village/VillageSiege.java.patch |   11 +
 .../entity/ai/village/VillageSiege.patch      |   11 -
 .../world/entity/ambient/Bat.java.patch       |   46 +
 .../world/entity/ambient/EntityBat.patch      |   47 -
 .../world/entity/animal/Animal.java.patch     |  116 ++
 .../world/entity/animal/Bee.java.patch        |  144 ++
 .../world/entity/animal/Bucketable.java.patch |   47 +
 .../world/entity/animal/Bucketable.patch      |   50 -
 .../world/entity/animal/Cat.java.patch        |   64 +
 .../world/entity/animal/Chicken.java.patch    |   15 +
 .../world/entity/animal/Cow.java.patch        |   32 +
 .../world/entity/animal/Dolphin.java.patch    |   69 +
 .../world/entity/animal/EntityAnimal.patch    |  105 --
 .../world/entity/animal/EntityBee.patch       |  127 --
 .../world/entity/animal/EntityCat.patch       |   64 -
 .../world/entity/animal/EntityChicken.patch   |   15 -
 .../world/entity/animal/EntityCow.patch       |   33 -
 .../world/entity/animal/EntityDolphin.patch   |   69 -
 .../world/entity/animal/EntityIronGolem.patch |   11 -
 .../entity/animal/EntityMushroomCow.patch     |   59 -
 .../world/entity/animal/EntityOcelot.patch    |   25 -
 .../world/entity/animal/EntityPanda.patch     |   64 -
 .../world/entity/animal/EntityParrot.patch    |   45 -
 .../world/entity/animal/EntityPerchable.patch |   22 -
 .../world/entity/animal/EntityPig.patch       |   30 -
 .../entity/animal/EntityPufferFish.patch      |   20 -
 .../world/entity/animal/EntitySheep.patch     |   50 -
 .../world/entity/animal/EntityTurtle.patch    |   36 -
 .../world/entity/animal/EntityWolf.patch      |  105 --
 .../{EntityFox.patch => Fox.java.patch}       |   76 +-
 .../world/entity/animal/IronGolem.java.patch  |   11 +
 .../entity/animal/MushroomCow.java.patch      |   58 +
 .../world/entity/animal/Ocelot.java.patch     |   25 +
 .../world/entity/animal/Panda.java.patch      |   63 +
 .../world/entity/animal/Parrot.java.patch     |   45 +
 .../world/entity/animal/Pig.java.patch        |   29 +
 .../world/entity/animal/Pufferfish.java.patch |   20 +
 .../{EntityRabbit.patch => Rabbit.java.patch} |   35 +-
 .../world/entity/animal/Sheep.java.patch      |   58 +
 .../animal/ShoulderRidingEntity.java.patch    |   21 +
 ...titySnowman.patch => SnowGolem.java.patch} |   49 +-
 .../world/entity/animal/Turtle.java.patch     |   36 +
 .../world/entity/animal/Wolf.java.patch       |  111 ++
 .../allay/{Allay.patch => Allay.java.patch}   |   50 +-
 .../animal/armadillo/Armadillo.java.patch     |   81 +
 .../entity/animal/armadillo/Armadillo.patch   |   76 -
 .../{Axolotl.patch => Axolotl.java.patch}     |   22 +-
 .../entity/animal/camel/Camel.java.patch      |   39 +
 .../world/entity/animal/camel/Camel.patch     |   40 -
 ...ootTongue.patch => ShootTongue.java.patch} |   33 +-
 .../{Tadpole.patch => Tadpole.java.patch}     |   16 +-
 .../world/entity/animal/goat/Goat.java.patch  |   40 +
 .../world/entity/animal/goat/Goat.patch       |   41 -
 ...bstract.patch => AbstractHorse.java.patch} |   82 +-
 .../animal/horse/EntityHorseSkeleton.patch    |   22 -
 .../entity/animal/horse/EntityLlama.patch     |   14 -
 .../entity/animal/horse/Llama.java.patch      |   14 +
 .../animal/horse/SkeletonHorse.java.patch     |   21 +
 ...Trap.patch => SkeletonTrapGoal.java.patch} |    8 +-
 ...amaTrader.patch => TraderLlama.java.patch} |   25 +-
 .../{Sniffer.patch => Sniffer.java.patch}     |   10 +-
 ...derCrystal.patch => EndCrystal.java.patch} |   41 +-
 ...derDragon.patch => EnderDragon.java.patch} |  181 ++-
 .../phases/DragonControllerLandedFlame.patch  |   22 -
 .../DragonSittingFlamingPhase.java.patch      |   21 +
 ...tch => EnderDragonPhaseManager.java.patch} |   18 +-
 ...tityWither.patch => WitherBoss.java.patch} |   79 +-
 .../entity/decoration/ArmorStand.java.patch   |  348 +++++
 ...y.patch => BlockAttachedEntity.java.patch} |   73 +-
 .../entity/decoration/EntityArmorStand.patch  |  207 ---
 .../entity/decoration/EntityItemFrame.patch   |   48 -
 .../entity/decoration/EntityPainting.patch    |   51 -
 .../entity/decoration/ItemFrame.java.patch    |   62 +
 ....patch => LeashFenceKnotEntity.java.patch} |   50 +-
 .../entity/decoration/Painting.java.patch     |   54 +
 ...ck.patch => FallingBlockEntity.java.patch} |   38 +-
 ...EntityItem.patch => ItemEntity.java.patch} |  113 +-
 ...tyTNTPrimed.patch => PrimedTnt.java.patch} |   20 +-
 .../monster/AbstractSkeleton.java.patch       |   21 +
 .../world/entity/monster/Bogged.java.patch    |   15 +
 .../world/entity/monster/Bogged.patch         |   15 -
 .../entity/monster/CaveSpider.java.patch      |   11 +
 ...EntityCreeper.patch => Creeper.java.patch} |   51 +-
 .../entity/monster/ElderGuardian.java.patch   |   11 +
 ...tityEnderman.patch => EnderMan.java.patch} |   53 +-
 .../world/entity/monster/Endermite.java.patch |   21 +
 .../entity/monster/EntityCaveSpider.patch     |   11 -
 .../entity/monster/EntityEndermite.patch      |   22 -
 .../world/entity/monster/EntityGuardian.patch |   19 -
 .../entity/monster/EntityGuardianElder.patch  |   11 -
 .../monster/EntityIllagerIllusioner.patch     |   20 -
 .../entity/monster/EntityIllagerWizard.patch  |   25 -
 .../world/entity/monster/EntityPhantom.patch  |   19 -
 .../world/entity/monster/EntityPillager.patch |   22 -
 .../monster/EntitySkeletonAbstract.patch      |   21 -
 .../entity/monster/EntitySkeletonWither.patch |   11 -
 .../world/entity/monster/EntitySpider.patch   |   11 -
 .../world/entity/monster/EntityVex.patch      |   11 -
 .../world/entity/monster/EntityZombie.patch   |  146 --
 .../entity/monster/EntityZombieHusk.patch     |   11 -
 .../entity/monster/EntityZombieVillager.patch |  108 --
 .../{EntityEvoker.patch => Evoker.java.patch} |    6 +-
 .../{EntityGhast.patch => Ghast.java.patch}   |    6 +-
 .../world/entity/monster/Guardian.java.patch  |   19 +
 .../world/entity/monster/Husk.java.patch      |   11 +
 .../entity/monster/Illusioner.java.patch      |   20 +
 .../world/entity/monster/Phantom.java.patch   |   19 +
 .../world/entity/monster/Pillager.java.patch  |   21 +
 ...EntityRavager.patch => Ravager.java.patch} |   21 +-
 ...EntityShulker.patch => Shulker.java.patch} |   20 +-
 ...Silverfish.patch => Silverfish.java.patch} |   31 +-
 ...titySkeleton.patch => Skeleton.java.patch} |    6 +-
 .../{EntitySlime.patch => Slime.java.patch}   |   48 +-
 .../monster/SpellcasterIllager.java.patch     |   24 +
 .../world/entity/monster/Spider.java.patch    |   11 +
 ...EntityStrider.patch => Strider.java.patch} |    4 +-
 .../world/entity/monster/Vex.java.patch       |   11 +
 .../{EntityWitch.patch => Witch.java.patch}   |    4 +-
 .../entity/monster/WitherSkeleton.java.patch  |   11 +
 .../world/entity/monster/Zombie.java.patch    |  183 +++
 .../entity/monster/ZombieVillager.java.patch  |  129 ++
 ...ombie.patch => ZombifiedPiglin.java.patch} |   35 +-
 .../entity/monster/breeze/Breeze.java.patch   |   19 +
 .../world/entity/monster/breeze/Breeze.patch  |   19 -
 .../{Creaking.patch => Creaking.java.patch}   |   20 +-
 .../{EntityHoglin.patch => Hoglin.java.patch} |   24 +-
 .../monster/piglin/AbstractPiglin.java.patch  |   11 +
 .../entity/monster/piglin/EntityPiglin.patch  |   96 --
 .../monster/piglin/EntityPiglinAbstract.patch |   11 -
 .../entity/monster/piglin/Piglin.java.patch   |  119 ++
 .../entity/monster/piglin/PiglinAI.patch      |  174 ---
 .../entity/monster/piglin/PiglinAi.java.patch |  174 +++
 .../entity/monster/warden/Warden.java.patch   |   43 +
 .../world/entity/monster/warden/Warden.patch  |   43 -
 .../entity/npc/AbstractVillager.java.patch    |   60 +
 .../world/entity/npc/EntityVillager.patch     |  120 --
 .../entity/npc/EntityVillagerAbstract.patch   |   61 -
 ...rier.patch => InventoryCarrier.java.patch} |   14 +-
 .../world/entity/npc/MobSpawnerTrader.patch   |   29 -
 .../world/entity/npc/Villager.java.patch      |  119 ++
 ...rader.patch => WanderingTrader.java.patch} |   23 +-
 .../npc/WanderingTraderSpawner.java.patch     |   29 +
 .../world/entity/player/EntityHuman.patch     |  435 ------
 ...erInventory.patch => Inventory.java.patch} |   44 +-
 .../world/entity/player/Player.java.patch     |  462 ++++++
 ...tyArrow.patch => AbstractArrow.java.patch} |  126 +-
 ...h => AbstractHurtingProjectile.java.patch} |   30 +-
 .../world/entity/projectile/Arrow.java.patch  |   20 +
 ...reball.patch => DragonFireball.java.patch} |   19 +-
 .../entity/projectile/EntityEvokerFangs.patch |   31 -
 .../projectile/EntityFireballFireball.patch   |   16 -
 .../projectile/EntityLargeFireball.patch      |   56 -
 .../entity/projectile/EntityPotion.patch      |  178 ---
 .../EntityProjectileThrowable.patch           |   15 -
 .../projectile/EntityShulkerBullet.patch      |  101 --
 .../entity/projectile/EntitySnowball.patch    |   22 -
 .../projectile/EntitySpectralArrow.patch      |   11 -
 .../projectile/EntityThrownTrident.patch      |   35 -
 .../entity/projectile/EntityTippedArrow.patch |   20 -
 .../entity/projectile/EvokerFangs.java.patch  |   30 +
 ...nderSignal.patch => EyeOfEnder.java.patch} |   33 +-
 .../entity/projectile/Fireball.java.patch     |   16 +
 ....patch => FireworkRocketEntity.java.patch} |   43 +-
 ...shingHook.patch => FishingHook.java.patch} |  160 +-
 .../world/entity/projectile/IProjectile.patch |   71 -
 .../projectile/LargeFireball.java.patch       |   56 +
 ...tyLlamaSpit.patch => LlamaSpit.java.patch} |   33 +-
 .../entity/projectile/Projectile.java.patch   |   71 +
 .../projectile/ShulkerBullet.java.patch       |  100 ++
 ...ireball.patch => SmallFireball.java.patch} |   49 +-
 .../entity/projectile/Snowball.java.patch     |   21 +
 .../projectile/SpectralArrow.java.patch       |   11 +
 .../ThrowableItemProjectile.java.patch        |   15 +
 ...e.patch => ThrowableProjectile.java.patch} |    6 +-
 .../{EntityEgg.patch => ThrownEgg.java.patch} |   63 +-
 ...earl.patch => ThrownEnderpearl.java.patch} |   52 +-
 ...atch => ThrownExperienceBottle.java.patch} |   29 +-
 .../entity/projectile/ThrownPotion.java.patch |  250 +++
 .../projectile/ThrownTrident.java.patch       |   34 +
 ...therSkull.patch => WitherSkull.java.patch} |   37 +-
 ...ge.patch => AbstractWindCharge.java.patch} |   25 +-
 .../world/entity/raid/EntityRaider.patch      |   49 -
 .../raid/{Raid.patch => Raid.java.patch}      |   57 +-
 .../world/entity/raid/Raider.java.patch       |   57 +
 ...{PersistentRaid.patch => Raids.java.patch} |   12 +-
 ...ractBoat.patch => AbstractBoat.java.patch} |   44 +-
 ...oat.patch => AbstractChestBoat.java.patch} |   29 +-
 ...ract.patch => AbstractMinecart.java.patch} |   69 +-
 ...h => AbstractMinecartContainer.java.patch} |   48 +-
 .../vehicle/EntityMinecartCommandBlock.patch  |   15 -
 .../vehicle/MinecartCommandBlock.java.patch   |   15 +
 ...necartTNT.patch => MinecartTNT.java.patch} |   35 +-
 ...r.patch => NewMinecartBehavior.java.patch} |   31 +-
 ...r.patch => OldMinecartBehavior.java.patch} |   23 +-
 ...eEntity.patch => VehicleEntity.java.patch} |   14 +-
 .../minecraft/world/food/FoodData.java.patch  |  101 ++
 .../net/minecraft/world/food/FoodInfo.patch   |   22 -
 .../minecraft/world/food/FoodMetaData.patch   |   96 --
 .../world/food/FoodProperties.java.patch      |   19 +
 ...patch => AbstractContainerMenu.java.patch} |   69 +-
 .../inventory/AbstractCraftingMenu.java.patch |   44 +
 .../inventory/AbstractCraftingMenu.patch      |   41 -
 .../inventory/AbstractFurnaceMenu.java.patch  |   60 +
 ...tainerAnvil.patch => AnvilMenu.java.patch} |   64 +-
 .../world/inventory/BeaconMenu.java.patch     |   74 +
 .../inventory/BrewingStandMenu.java.patch     |   58 +
 .../inventory/CartographyTableMenu.java.patch |  129 ++
 .../world/inventory/ChestMenu.java.patch      |   64 +
 .../world/inventory/ContainerAccess.patch     |   42 -
 .../world/inventory/ContainerBeacon.patch     |   72 -
 .../inventory/ContainerBrewingStand.patch     |   59 -
 .../inventory/ContainerCartography.patch      |   85 -
 .../world/inventory/ContainerChest.patch      |   60 -
 .../world/inventory/ContainerDispenser.patch  |   62 -
 .../world/inventory/ContainerFurnace.patch    |   62 -
 .../world/inventory/ContainerGrindstone.patch |   84 -
 .../world/inventory/ContainerHopper.patch     |   51 -
 .../world/inventory/ContainerHorse.patch      |   53 -
 .../world/inventory/ContainerLectern.patch    |   84 -
 .../inventory/ContainerLevelAccess.java.patch |   43 +
 .../world/inventory/ContainerLoom.patch       |  104 --
 .../world/inventory/ContainerMerchant.patch   |   48 -
 .../world/inventory/ContainerPlayer.patch     |   59 -
 .../world/inventory/ContainerShulkerBox.patch |   48 -
 .../inventory/ContainerStonecutter.patch      |   77 -
 .../world/inventory/ContainerWorkbench.patch  |   75 -
 .../world/inventory/Containers.patch          |   22 -
 ...afterMenu.patch => CrafterMenu.java.patch} |   16 +-
 ...ing.patch => CraftingContainer.java.patch} |    6 +-
 .../world/inventory/CraftingMenu.java.patch   |   74 +
 .../world/inventory/DispenserMenu.java.patch  |   62 +
 ...Table.patch => EnchantmentMenu.java.patch} |  152 +-
 .../inventory/FurnaceResultSlot.java.patch    |   11 +
 .../world/inventory/GrindstoneMenu.java.patch |  119 ++
 .../world/inventory/HopperMenu.java.patch     |   51 +
 .../inventory/HorseInventoryMenu.java.patch   |   53 +
 .../world/inventory/InventoryEnderChest.patch |   36 -
 .../world/inventory/InventoryMenu.java.patch  |   64 +
 .../world/inventory/InventoryMerchant.patch   |   66 -
 ...ract.patch => ItemCombinerMenu.java.patch} |   14 +-
 .../world/inventory/LecternMenu.java.patch    |  114 ++
 .../world/inventory/LoomMenu.java.patch       |  155 ++
 .../world/inventory/MenuType.java.patch       |   11 +
 .../inventory/MerchantContainer.java.patch    |   70 +
 .../world/inventory/MerchantMenu.java.patch   |   47 +
 .../PlayerEnderChestContainer.java.patch      |   36 +
 ...esult.patch => ResultContainer.java.patch} |   12 +-
 .../world/inventory/ShulkerBoxMenu.java.patch |   49 +
 .../world/inventory/SlotFurnaceResult.patch   |   11 -
 ...Smithing.patch => SmithingMenu.java.patch} |   47 +-
 .../inventory/StonecutterMenu.java.patch      |  129 ++
 ... => TransientCraftingContainer.java.patch} |   43 +-
 .../world/item/ArmorStandItem.java.patch      |   14 +
 .../minecraft/world/item/BlockItem.java.patch |   83 +
 .../minecraft/world/item/BoatItem.java.patch  |   33 +
 .../world/item/BoneMealItem.java.patch        |   41 +
 .../world/item/BucketItem.java.patch          |  148 ++
 .../world/item/DebugStickItem.java.patch      |   16 +
 .../minecraft/world/item/DyeItem.java.patch   |   29 +
 .../minecraft/world/item/EggItem.java.patch   |   23 +
 .../world/item/EndCrystalItem.java.patch      |   14 +
 ...EnderEye.patch => EnderEyeItem.java.patch} |   12 +-
 .../world/item/EnderpearlItem.java.patch      |   22 +
 .../world/item/FireChargeItem.java.patch      |   31 +
 .../world/item/FishingRodItem.java.patch      |   41 +
 .../world/item/FlintAndSteelItem.java.patch   |   28 +
 .../world/item/HangingEntityItem.java.patch   |   67 +
 .../minecraft/world/item/ItemArmorStand.patch |   14 -
 .../net/minecraft/world/item/ItemBlock.patch  |   75 -
 .../world/item/ItemBlockWallable.patch        |   36 -
 .../net/minecraft/world/item/ItemBoat.patch   |   33 -
 .../minecraft/world/item/ItemBoneMeal.patch   |   32 -
 .../net/minecraft/world/item/ItemBucket.patch |   88 --
 .../minecraft/world/item/ItemDebugStick.patch |   16 -
 .../net/minecraft/world/item/ItemDye.patch    |   30 -
 .../net/minecraft/world/item/ItemEgg.patch    |   23 -
 .../minecraft/world/item/ItemEndCrystal.patch |   14 -
 .../minecraft/world/item/ItemEnderPearl.patch |   22 -
 .../minecraft/world/item/ItemFireball.patch   |   31 -
 .../minecraft/world/item/ItemFishingRod.patch |   41 -
 .../world/item/ItemFlintAndSteel.patch        |   28 -
 .../minecraft/world/item/ItemHanging.patch    |   43 -
 .../minecraft/world/item/ItemMinecart.patch   |   16 -
 .../minecraft/world/item/ItemMonsterEgg.patch |   15 -
 .../world/item/ItemProjectileWeapon.patch     |   31 -
 .../net/minecraft/world/item/ItemSign.patch   |   23 -
 .../minecraft/world/item/ItemSnowball.patch   |   27 -
 .../minecraft/world/item/ItemStack.java.patch |  510 ++++++
 .../net/minecraft/world/item/ItemStack.patch  |  362 -----
 .../{ItemLeash.patch => LeadItem.java.patch}  |   59 +-
 .../world/item/MinecartItem.java.patch        |   16 +
 .../item/ProjectileWeaponItem.java.patch      |   31 +
 .../minecraft/world/item/SignItem.java.patch  |   23 +
 .../world/item/SnowballItem.java.patch        |   27 +
 .../world/item/SpawnEggItem.java.patch        |   15 +
 .../item/StandingAndWallBlockItem.java.patch  |   41 +
 ...emTrident.patch => TridentItem.java.patch} |   30 +-
 .../item/alchemy/PotionContents.java.patch    |   20 +
 .../world/item/alchemy/PotionContents.patch   |   20 -
 ...Consumable.patch => Consumable.java.patch} |   22 +-
 .../component/ConsumableListener.java.patch   |    9 +
 .../item/component/ConsumableListener.patch   |    9 -
 ...ction.patch => DeathProtection.java.patch} |    4 +-
 .../SuspiciousStewEffects.java.patch          |   28 +
 .../component/SuspiciousStewEffects.patch     |   27 -
 ...ApplyStatusEffectsConsumeEffect.java.patch |   32 +
 .../ApplyStatusEffectsConsumeEffect.patch     |   31 -
 ...rAllStatusEffectsConsumeEffect.java.patch} |   17 +-
 .../consume_effects/ConsumeEffect.java.patch  |   30 +
 .../item/consume_effects/ConsumeEffect.patch  |   30 -
 ...moveStatusEffectsConsumeEffect.java.patch} |   21 +-
 ... TeleportRandomlyConsumeEffect.java.patch} |   12 +-
 ...asting.patch => BlastingRecipe.java.patch} |    8 +-
 ...patch => CampfireCookingRecipe.java.patch} |    8 +-
 .../world/item/crafting/CraftingManager.patch |   93 --
 ...eComplex.patch => CustomRecipe.java.patch} |   28 +-
 ...eItemStack.patch => Ingredient.java.patch} |   36 +-
 .../{IRecipe.patch => Recipe.java.patch}      |    4 +-
 .../item/crafting/RecipeHolder.java.patch     |   26 +
 .../world/item/crafting/RecipeHolder.patch    |   22 -
 .../item/crafting/RecipeManager.java.patch    |  112 ++
 .../{RecipeMap.patch => RecipeMap.java.patch} |   35 +-
 ...dRecipes.patch => ShapedRecipe.java.patch} |   28 +-
 ...cipes.patch => ShapelessRecipe.java.patch} |   28 +-
 ...Recipe.patch => SmeltingRecipe.java.patch} |    8 +-
 ...tch => SmithingTransformRecipe.java.patch} |    6 +-
 ...pe.patch => SmithingTrimRecipe.java.patch} |    6 +-
 ...Smoking.patch => SmokingRecipe.java.patch} |    8 +-
 ...ing.patch => StonecutterRecipe.java.patch} |    8 +-
 ...ecipe.patch => TransmuteRecipe.java.patch} |   22 +-
 .../effects/ApplyMobEffect.java.patch         |   11 +
 .../enchantment/effects/ApplyMobEffect.patch  |   11 -
 .../{Ignite.patch => Ignite.java.patch}       |   23 +-
 .../effects/ReplaceBlock.java.patch           |   11 +
 .../enchantment/effects/ReplaceBlock.patch    |   11 -
 .../effects/ReplaceDisk.java.patch            |   11 +
 .../enchantment/effects/ReplaceDisk.patch     |   11 -
 .../effects/SummonEntityEffect.java.patch     |   35 +
 .../effects/SummonEntityEffect.patch          |   36 -
 .../world/item/trading/IMerchant.patch        |    9 -
 .../world/item/trading/Merchant.java.patch    |    9 +
 .../item/trading/MerchantOffer.java.patch     |   44 +
 .../world/item/trading/MerchantRecipe.patch   |   43 -
 ...ract.patch => BaseCommandBlock.java.patch} |   12 +-
 .../world/level/BaseSpawner.java.patch        |   31 +
 .../world/level/BlockGetter.java.patch        |   44 +
 .../world/level/ClipContext.java.patch        |   20 +
 .../world/level/GameRules.java.patch          |  237 +++
 .../net/minecraft/world/level/GameRules.patch |  212 ---
 .../world/level/GeneratorAccess.patch         |    9 -
 .../minecraft/world/level/IBlockAccess.patch  |   44 -
 .../minecraft/world/level/Level.java.patch    |  395 +++++
 .../world/level/LevelAccessor.java.patch      |    9 +
 ...rldWriter.patch => LevelWriter.java.patch} |    4 +-
 .../world/level/MobSpawnerAbstract.patch      |   31 -
 .../world/level/NaturalSpawner.java.patch     |   95 ++
 .../net/minecraft/world/level/RayTrace.patch  |   20 -
 ...osion.patch => ServerExplosion.java.patch} |  133 +-
 ...s.patch => ServerLevelAccessor.java.patch} |   14 +-
 .../world/level/SpawnerCreature.patch         |   92 --
 .../net/minecraft/world/level/World.patch     |  320 ----
 .../block/AbstractCandleBlock.java.patch      |   14 +
 .../level/block/AbstractCandleBlock.patch     |   14 -
 .../level/block/BambooSaplingBlock.java.patch |   10 +
 .../level/block/BambooStalkBlock.java.patch   |   48 +
 .../level/block/BaseFireBlock.java.patch      |   73 +
 .../block/BasePressurePlateBlock.java.patch   |   48 +
 .../{BlockBed.patch => BedBlock.java.patch}   |   44 +-
 ...kBeehive.patch => BeehiveBlock.java.patch} |   20 +-
 .../world/level/block/BellBlock.java.patch    |   14 +
 .../level/block/BigDripleafBlock.java.patch   |  113 ++
 .../world/level/block/BigDripleafBlock.patch  |  102 --
 .../world/level/block/Block.java.patch        |   53 +
 .../minecraft/world/level/block/Block.patch   |   52 -
 .../world/level/block/BlockBamboo.patch       |   48 -
 .../level/block/BlockBambooSapling.patch      |   10 -
 .../world/level/block/BlockBell.patch         |   14 -
 .../level/block/BlockButtonAbstract.patch     |   72 -
 .../world/level/block/BlockCactus.patch       |   29 -
 .../world/level/block/BlockCake.patch         |   22 -
 .../world/level/block/BlockCampfire.patch     |   23 -
 .../world/level/block/BlockCauldron.patch     |   29 -
 .../world/level/block/BlockChest.patch        |   92 --
 .../world/level/block/BlockChorusFlower.patch |   73 -
 .../world/level/block/BlockCocoa.patch        |   29 -
 .../world/level/block/BlockCommand.patch      |   27 -
 .../world/level/block/BlockComposter.patch    |  116 --
 .../level/block/BlockConcretePowder.patch     |   77 -
 .../world/level/block/BlockCoral.patch        |   14 -
 .../world/level/block/BlockCoralFan.patch     |   14 -
 .../world/level/block/BlockCoralFanWall.patch |   14 -
 .../world/level/block/BlockCoralPlant.patch   |   14 -
 .../world/level/block/BlockCrops.patch        |   38 -
 .../level/block/BlockDaylightDetector.patch   |   10 -
 .../level/block/BlockDiodeAbstract.patch      |   30 -
 .../level/block/BlockDirtSnowSpreadable.patch |   23 -
 .../world/level/block/BlockDispenser.patch    |   27 -
 .../world/level/block/BlockDoor.patch         |   38 -
 .../world/level/block/BlockDropper.patch      |   58 -
 .../world/level/block/BlockEndGateway.patch   |   22 -
 .../world/level/block/BlockFenceGate.patch    |   20 -
 .../world/level/block/BlockFire.patch         |  160 --
 .../world/level/block/BlockFireAbstract.patch |   73 -
 .../world/level/block/BlockFluids.patch       |   36 -
 .../world/level/block/BlockFungi.patch        |   16 -
 .../world/level/block/BlockGrassPath.patch    |   14 -
 .../world/level/block/BlockGrowingTop.patch   |   11 -
 .../world/level/block/BlockIce.patch          |   14 -
 .../world/level/block/BlockLeaves.patch       |   26 -
 .../world/level/block/BlockLectern.patch      |   16 -
 .../world/level/block/BlockLever.patch        |   32 -
 .../world/level/block/BlockMagma.patch        |   11 -
 .../world/level/block/BlockMobSpawner.patch   |   24 -
 .../world/level/block/BlockMonsterEggs.patch  |   20 -
 .../world/level/block/BlockMushroom.patch     |   30 -
 .../world/level/block/BlockNetherWart.patch   |   11 -
 .../world/level/block/BlockNote.patch         |   23 -
 .../world/level/block/BlockNylium.patch       |   14 -
 .../world/level/block/BlockObserver.patch     |   30 -
 .../world/level/block/BlockPlant.patch        |   30 -
 .../world/level/block/BlockPortal.patch       |  115 --
 .../world/level/block/BlockPoweredRail.patch  |   25 -
 .../block/BlockPressurePlateAbstract.patch    |   48 -
 .../block/BlockPressurePlateWeighted.patch    |   43 -
 .../level/block/BlockPumpkinCarved.patch      |   30 -
 .../level/block/BlockRedstoneComparator.patch |   40 -
 .../world/level/block/BlockRedstoneLamp.patch |   35 -
 .../world/level/block/BlockRedstoneOre.patch  |   98 --
 .../level/block/BlockRedstoneTorch.patch      |   52 -
 .../world/level/block/BlockReed.patch         |   11 -
 .../level/block/BlockRespawnAnchor.patch      |   39 -
 .../world/level/block/BlockSapling.patch      |   60 -
 .../world/level/block/BlockScaffolding.patch  |   11 -
 .../world/level/block/BlockSign.patch         |   35 -
 .../world/level/block/BlockSnow.patch         |   14 -
 .../world/level/block/BlockSoil.patch         |   69 -
 .../world/level/block/BlockStem.patch         |   42 -
 .../level/block/BlockSweetBerryBush.patch     |   51 -
 .../world/level/block/BlockTNT.patch          |   65 -
 .../world/level/block/BlockTallPlant.patch    |   14 -
 .../world/level/block/BlockTrapdoor.patch     |   31 -
 .../world/level/block/BlockTripwireHook.patch |   30 -
 .../world/level/block/BlockTurtleEgg.patch    |   66 -
 .../world/level/block/BlockVine.patch         |   71 -
 .../world/level/block/BlockWaterLily.patch    |   25 -
 .../block/BuddingAmethystBlock.java.patch     |   11 +
 .../level/block/BuddingAmethystBlock.patch    |   11 -
 .../world/level/block/BushBlock.java.patch    |   27 +
 .../world/level/block/ButtonBlock.java.patch  |   71 +
 .../world/level/block/CactusBlock.java.patch  |   28 +
 .../world/level/block/CakeBlock.java.patch    |   22 +
 .../level/block/CampfireBlock.java.patch      |   23 +
 .../level/block/CarvedPumpkinBlock.java.patch |   29 +
 .../level/block/CauldronBlock.java.patch      |   28 +
 .../world/level/block/CaveVines.java.patch    |   42 +
 .../world/level/block/CaveVines.patch         |   42 -
 ...tch => CeilingHangingSignBlock.java.patch} |    4 +-
 .../block/ChangeOverTimeBlock.java.patch      |   11 +
 .../level/block/ChangeOverTimeBlock.patch     |   11 -
 .../world/level/block/ChestBlock.java.patch   |   96 ++
 .../level/block/ChorusFlowerBlock.java.patch  |   73 +
 .../world/level/block/CocoaBlock.java.patch   |   28 +
 .../world/level/block/CommandBlock.java.patch |   28 +
 .../level/block/ComparatorBlock.java.patch    |   39 +
 .../level/block/ComposterBlock.java.patch     |  131 ++
 .../block/ConcretePowderBlock.java.patch      |   76 +
 .../world/level/block/CoralBlock.java.patch   |   14 +
 .../level/block/CoralFanBlock.java.patch      |   14 +
 .../level/block/CoralPlantBlock.java.patch    |   14 +
 .../level/block/CoralWallFanBlock.java.patch  |   14 +
 ...terBlock.patch => CrafterBlock.java.patch} |   61 +-
 .../world/level/block/CropBlock.java.patch    |   37 +
 .../block/DaylightDetectorBlock.java.patch    |   10 +
 .../level/block/DecoratedPotBlock.java.patch  |   14 +
 .../world/level/block/DecoratedPotBlock.patch |   14 -
 ...tor.patch => DetectorRailBlock.java.patch} |   28 +-
 .../world/level/block/DiodeBlock.java.patch   |   29 +
 .../level/block/DirtPathBlock.java.patch      |   14 +
 .../level/block/DispenserBlock.java.patch     |   27 +
 .../world/level/block/DoorBlock.java.patch    |   37 +
 .../level/block/DoublePlantBlock.java.patch   |   14 +
 ...gonEgg.patch => DragonEggBlock.java.patch} |   23 +-
 .../block/DropExperienceBlock.java.patch      |   21 +
 .../level/block/DropExperienceBlock.patch     |   20 -
 .../world/level/block/DropperBlock.java.patch |   64 +
 .../level/block/EndGatewayBlock.java.patch    |   21 +
 ...Portal.patch => EndPortalBlock.java.patch} |   66 +-
 .../world/level/block/FarmBlock.java.patch    |   68 +
 .../level/block/FenceGateBlock.java.patch     |   20 +
 .../world/level/block/FireBlock.java.patch    |  187 +++
 .../world/level/block/FungusBlock.java.patch  |   16 +
 .../block/GrowingPlantHeadBlock.java.patch    |   11 +
 .../world/level/block/IceBlock.java.patch     |   14 +
 .../level/block/InfestedBlock.java.patch      |   19 +
 .../block/LayeredCauldronBlock.java.patch     |  107 ++
 .../level/block/LayeredCauldronBlock.patch    |  106 --
 .../world/level/block/LeavesBlock.java.patch  |   25 +
 .../world/level/block/LecternBlock.java.patch |   16 +
 .../world/level/block/LeverBlock.java.patch   |   31 +
 ...ock.patch => LightningRodBlock.java.patch} |   16 +-
 .../world/level/block/LiquidBlock.java.patch  |   36 +
 .../world/level/block/MagmaBlock.java.patch   |   11 +
 .../level/block/MultifaceSpreader.java.patch  |   43 +
 .../world/level/block/MultifaceSpreader.patch |   43 -
 .../level/block/MushroomBlock.java.patch      |   29 +
 .../level/block/NetherPortalBlock.java.patch  |  132 ++
 .../level/block/NetherWartBlock.java.patch    |   11 +
 .../world/level/block/NoteBlock.java.patch    |   23 +
 .../world/level/block/NyliumBlock.java.patch  |   14 +
 .../level/block/ObserverBlock.java.patch      |   30 +
 .../block/PointedDripstoneBlock.java.patch    |   81 +
 .../level/block/PointedDripstoneBlock.patch   |   80 -
 ...Block.patch => PowderSnowBlock.java.patch} |   10 +-
 .../level/block/PoweredRailBlock.java.patch   |   24 +
 ...ry.patch => PressurePlateBlock.java.patch} |   43 +-
 .../level/block/RedStoneOreBlock.java.patch   |  102 ++
 .../level/block/RedstoneLampBlock.java.patch  |   35 +
 .../level/block/RedstoneTorchBlock.java.patch |   52 +
 .../level/block/RespawnAnchorBlock.java.patch |   39 +
 .../level/block/RootedDirtBlock.java.patch    |   11 +
 .../world/level/block/RootedDirtBlock.patch   |   11 -
 .../world/level/block/SaplingBlock.java.patch |  115 ++
 .../level/block/ScaffoldingBlock.java.patch   |   11 +
 .../world/level/block/SculkBlock.java.patch   |   16 +
 .../world/level/block/SculkBlock.patch        |   16 -
 .../level/block/SculkCatalystBlock.java.patch |   21 +
 .../level/block/SculkCatalystBlock.patch      |   20 -
 .../level/block/SculkSensorBlock.java.patch   |   83 +
 .../world/level/block/SculkSensorBlock.patch  |   83 -
 .../level/block/SculkShriekerBlock.java.patch |   30 +
 .../level/block/SculkShriekerBlock.patch      |   29 -
 .../level/block/SculkSpreader.java.patch      |   80 +
 .../world/level/block/SculkSpreader.patch     |   72 -
 .../level/block/SculkVeinBlock.java.patch     |   60 +
 .../world/level/block/SculkVeinBlock.patch    |   29 -
 .../world/level/block/SignBlock.java.patch    |   41 +
 .../level/block/SnowLayerBlock.java.patch     |   14 +
 .../world/level/block/SpawnerBlock.java.patch |   26 +
 ...ockSponge.patch => SpongeBlock.java.patch} |   68 +-
 .../block/SpreadingSnowyDirtBlock.java.patch  |   23 +
 .../world/level/block/StemBlock.java.patch    |   41 +
 .../level/block/SugarCaneBlock.java.patch     |   11 +
 .../block/SweetBerryBushBlock.java.patch      |   50 +
 .../world/level/block/TntBlock.java.patch     |   64 +
 .../level/block/TrapDoorBlock.java.patch      |   30 +
 ...ripwire.patch => TripWireBlock.java.patch} |   31 +-
 .../level/block/TripWireHookBlock.java.patch  |   29 +
 .../level/block/TurtleEggBlock.java.patch     |   65 +
 .../world/level/block/VineBlock.java.patch    |   71 +
 ....patch => WallHangingSignBlock.java.patch} |    4 +-
 .../level/block/WaterlilyBlock.java.patch     |   24 +
 .../WeightedPressurePlateBlock.java.patch     |   49 +
 ...rRose.patch => WitherRoseBlock.java.patch} |    8 +-
 ...kull.patch => WitherSkullBlock.java.patch} |   32 +-
 .../AbstractFurnaceBlockEntity.java.patch     |  272 ++++
 .../block/entity/BannerBlockEntity.java.patch |   45 +
 ...rel.patch => BarrelBlockEntity.java.patch} |   26 +-
 .../BaseContainerBlockEntity.java.patch       |   15 +
 .../block/entity/BeaconBlockEntity.java.patch |  139 ++
 .../entity/BeehiveBlockEntity.java.patch      |  253 +++
 ...yBell.patch => BellBlockEntity.java.patch} |   18 +-
 ...ileEntity.patch => BlockEntity.java.patch} |   64 +-
 .../block/entity/BlockEntityType.java.patch   |   20 +
 .../entity/BrewingStandBlockEntity.java.patch |  181 +++
 ....patch => BrushableBlockEntity.java.patch} |   12 +-
 ...e.patch => CampfireBlockEntity.java.patch} |   28 +-
 ...hest.patch => ChestBlockEntity.java.patch} |   33 +-
 ...> ChiseledBookShelfBlockEntity.java.patch} |   47 +-
 .../entity/CommandBlockEntity.java.patch      |   17 +
 .../entity/ConduitBlockEntity.java.patch      |  108 ++
 .../entity/ContainerOpenersCounter.java.patch |   75 +
 .../entity/ContainerOpenersCounter.patch      |   75 -
 ...ty.patch => CrafterBlockEntity.java.patch} |   41 +-
 ...tch => DecoratedPotBlockEntity.java.patch} |   16 +-
 ....patch => DispenserBlockEntity.java.patch} |   28 +-
 .../block/entity/HopperBlockEntity.java.patch |  214 +++
 ...ox.patch => JukeboxBlockEntity.java.patch} |   49 +-
 .../entity/LecternBlockEntity.java.patch      |  164 ++
 .../SculkCatalystBlockEntity.java.patch       |   30 +
 .../entity/SculkCatalystBlockEntity.patch     |   30 -
 .../entity/ShulkerBoxBlockEntity.java.patch   |   67 +
 .../block/entity/SignBlockEntity.java.patch   |  230 +++
 .../TheEndGatewayBlockEntity.java.patch       |   19 +
 .../level/block/entity/TileEntityBanner.patch |   45 -
 .../level/block/entity/TileEntityBeacon.patch |  135 --
 .../block/entity/TileEntityBeehive.patch      |  209 ---
 .../block/entity/TileEntityBrewingStand.patch |  153 --
 .../block/entity/TileEntityCommand.patch      |   16 -
 .../block/entity/TileEntityConduit.patch      |   72 -
 .../block/entity/TileEntityContainer.patch    |   15 -
 .../block/entity/TileEntityEndGateway.patch   |   22 -
 .../block/entity/TileEntityFurnace.patch      |  237 ---
 .../level/block/entity/TileEntityHopper.patch |  192 ---
 .../block/entity/TileEntityLectern.patch      |  163 --
 .../block/entity/TileEntityShulkerBox.patch   |   68 -
 .../level/block/entity/TileEntitySign.patch   |  154 --
 .../level/block/entity/TileEntityTypes.patch  |   20 -
 ...lSpawner.patch => TrialSpawner.java.patch} |   32 +-
 ...Data.patch => TrialSpawnerData.java.patch} |   10 +-
 ...tity.patch => VaultBlockEntity.java.patch} |   39 +-
 .../level/block/grower/TreeGrower.java.patch  |  126 ++
 .../block/grower/WorldGenTreeProvider.patch   |  124 --
 ...iston.patch => PistonBaseBlock.java.patch} |   52 +-
 .../world/level/block/state/BlockBase.patch   |   55 -
 .../block/state/BlockBehaviour.java.patch     |   62 +
 .../world/level/border/WorldBorder.java.patch |   18 +
 .../world/level/border/WorldBorder.patch      |   18 -
 .../minecraft/world/level/chunk/Chunk.patch   |  181 ---
 ...unkAccess.patch => ChunkAccess.java.patch} |   36 +-
 .../level/chunk/ChunkGenerator.java.patch     |  139 ++
 .../world/level/chunk/ChunkGenerator.patch    |   69 -
 ...> ChunkGeneratorStructureState.java.patch} |    0
 .../world/level/chunk/ChunkSection.patch      |   33 -
 .../world/level/chunk/DataLayer.java.patch    |    7 +
 .../world/level/chunk/LevelChunk.java.patch   |  266 ++++
 .../level/chunk/LevelChunkSection.java.patch  |   37 +
 .../world/level/chunk/NibbleArray.patch       |    7 -
 .../chunk/status/ChunkStatusTasks.java.patch  |   30 +
 .../level/chunk/status/ChunkStatusTasks.patch |   30 -
 .../chunk/storage/ChunkStorage.java.patch     |  122 ++
 .../level/chunk/storage/IChunkLoader.patch    |   95 --
 ...RegionFile.patch => RegionFile.java.patch} |   12 +-
 .../level/chunk/storage/RegionFileCache.patch |   56 -
 .../storage/RegionFileStorage.java.patch      |   62 +
 .../storage/SerializableChunkData.java.patch  |  147 ++
 .../chunk/storage/SerializableChunkData.patch |  146 --
 .../end/DragonRespawnAnimation.java.patch     |   57 +
 .../dimension/end/EndDragonFight.java.patch   |   74 +
 .../dimension/end/EnderDragonBattle.patch     |   72 -
 .../dimension/end/EnumDragonRespawn.patch     |   58 -
 ...tyAccess.patch => EntityAccess.java.patch} |   15 +-
 ...PersistentEntitySectionManager.java.patch} |  111 +-
 .../gameevent/GameEventDispatcher.java.patch  |   30 +
 .../level/gameevent/GameEventDispatcher.patch |   31 -
 .../vibrations/VibrationSystem.java.patch     |   50 +
 .../vibrations/VibrationSystem.patch          |   51 -
 .../levelgen/ChunkGeneratorAbstract.patch     |    7 -
 .../level/levelgen/ChunkProviderFlat.patch    |   22 -
 .../level/levelgen/FlatLevelSource.java.patch |   26 +
 .../level/levelgen/MobSpawnerPatrol.patch     |   11 -
 .../level/levelgen/MobSpawnerPhantom.patch    |   11 -
 .../NoiseBasedChunkGenerator.java.patch       |    7 +
 .../level/levelgen/PatrolSpawner.java.patch   |   11 +
 .../level/levelgen/PhantomSpawner.java.patch  |   11 +
 ...re.patch => EndPlatformFeature.java.patch} |   45 +-
 .../LegacyStructureDataHandler.java.patch     |   32 +
 .../structure/PersistentStructureLegacy.patch |   34 -
 .../structure/StructurePiece.java.patch       |  164 ++
 .../levelgen/structure/StructurePiece.patch   |  142 --
 .../structure/StructureStart.java.patch       |   59 +
 .../levelgen/structure/StructureStart.patch   |   55 -
 .../DesertPyramidStructure.java.patch         |   18 +
 .../structures/DesertPyramidStructure.patch   |   18 -
 .../structures/EndCityPieces.java.patch       |   16 +
 .../structure/structures/EndCityPieces.patch  |   15 -
 .../structures/IglooPieces.java.patch         |   31 +
 .../structure/structures/IglooPieces.patch    |   19 -
 .../structures/MineshaftPieces.java.patch     |   68 +
 .../structures/MineshaftPieces.patch          |   55 -
 .../NetherFortressPieces.java.patch           |   45 +
 .../structures/NetherFortressPieces.patch     |   21 -
 .../structures/OceanRuinPieces.java.patch     |   37 +
 .../structures/OceanRuinPieces.patch          |   23 -
 ...ieces.patch => ShipwreckPieces.java.patch} |    7 +-
 .../structures/StrongholdPieces.java.patch    |   55 +
 .../structures/StrongholdPieces.patch         |   30 -
 ...utPiece.patch => SwampHutPiece.java.patch} |   12 +-
 .../templatesystem/DefinedStructure.patch     |  147 --
 ...atch => StructurePlaceSettings.java.patch} |   10 +-
 .../StructureTemplate.java.patch              |  152 ++
 .../level/material/FlowingFluid.java.patch    |   75 +
 .../level/material/FluidTypeFlowing.patch     |   75 -
 .../world/level/material/FluidTypeLava.patch  |   44 -
 .../world/level/material/LavaFluid.java.patch |   44 +
 .../world/level/portal/BlockPortalShape.patch |  173 ---
 .../level/portal/PortalForcer.java.patch      |  128 ++
 .../world/level/portal/PortalShape.java.patch |  226 +++
 .../level/portal/PortalTravelAgent.patch      |   98 --
 .../portal/TeleportTransition.java.patch      |   62 +
 .../level/portal/TeleportTransition.patch     |   60 -
 .../DefaultRedstoneWireEvaluator.java.patch   |   31 +
 .../DefaultRedstoneWireEvaluator.patch        |   32 -
 ...erimentalRedstoneWireEvaluator.java.patch} |   23 +-
 ...dater.patch => NeighborUpdater.java.patch} |   24 +-
 ...dMap.patch => MapItemSavedData.java.patch} |  123 +-
 .../world/level/storage/Convertable.patch     |  108 --
 .../storage/LevelStorageSource.java.patch     |  106 ++
 .../storage/PlayerDataStorage.java.patch      |  109 ++
 .../level/storage/PrimaryLevelData.java.patch |  192 +++
 .../world/level/storage/WorldDataServer.patch |  164 --
 .../world/level/storage/WorldNBTStorage.patch |  106 --
 ...DataType.patch => LootDataType.java.patch} |    4 +-
 .../level/storage/loot/LootTable.java.patch   |   62 +
 .../world/level/storage/loot/LootTable.patch  |   47 -
 ...on.patch => ExplosionCondition.java.patch} |    4 +-
 .../java/org/bukkit/craftbukkit/CraftArt.java |   31 +-
 .../org/bukkit/craftbukkit/CraftChunk.java    |  216 ++-
 .../craftbukkit/CraftChunkSnapshot.java       |   87 +-
 .../craftbukkit/CraftEquipmentSlot.java       |   45 +-
 .../craftbukkit/CraftExplosionResult.java     |    2 +-
 .../bukkit/craftbukkit/CraftFeatureFlag.java  |    4 +-
 .../org/bukkit/craftbukkit/CraftFluid.java    |   31 +-
 .../craftbukkit/CraftFluidCollisionMode.java  |   10 +-
 .../bukkit/craftbukkit/CraftGameEvent.java    |   10 +-
 .../bukkit/craftbukkit/CraftHeightMap.java    |   18 +-
 .../org/bukkit/craftbukkit/CraftInput.java    |   18 +-
 .../bukkit/craftbukkit/CraftJukeboxSong.java  |   13 +-
 .../bukkit/craftbukkit/CraftLootTable.java    |   87 +-
 .../craftbukkit/CraftMusicInstrument.java     |   17 +-
 .../craftbukkit/CraftOfflinePlayer.java       |  228 +--
 .../org/bukkit/craftbukkit/CraftParticle.java |   97 +-
 .../org/bukkit/craftbukkit/CraftRaid.java     |   41 +-
 .../craftbukkit/CraftRegionAccessor.java      |  147 +-
 .../org/bukkit/craftbukkit/CraftRegistry.java |   59 +-
 .../org/bukkit/craftbukkit/CraftServer.java   |  800 +++++-----
 .../bukkit/craftbukkit/CraftServerLinks.java  |   38 +-
 .../craftbukkit/CraftServerTickManager.java   |   34 +-
 .../org/bukkit/craftbukkit/CraftSound.java    |   39 +-
 .../bukkit/craftbukkit/CraftSoundGroup.java   |   30 +-
 .../bukkit/craftbukkit/CraftStatistic.java    |  271 ++--
 .../org/bukkit/craftbukkit/CraftWorld.java    |  781 +++++-----
 .../bukkit/craftbukkit/CraftWorldBorder.java  |   12 +-
 .../java/org/bukkit/craftbukkit/Main.java     |   66 +-
 .../advancement/CraftAdvancement.java         |   12 +-
 .../advancement/CraftAdvancementDisplay.java  |   28 +-
 .../advancement/CraftAdvancementProgress.java |   20 +-
 .../CraftAdvancementRequirement.java          |    4 +-
 .../CraftAdvancementRequirements.java         |    2 +-
 .../craftbukkit/attribute/CraftAttribute.java |   44 +-
 .../attribute/CraftAttributeInstance.java     |   22 +-
 .../attribute/CraftAttributeMap.java          |    8 +-
 .../craftbukkit/ban/CraftIpBanEntry.java      |   10 +-
 .../craftbukkit/ban/CraftIpBanList.java       |   30 +-
 .../craftbukkit/ban/CraftProfileBanEntry.java |   12 +-
 .../craftbukkit/ban/CraftProfileBanList.java  |   44 +-
 .../craftbukkit/block/CapturedBlockState.java |   34 +-
 .../bukkit/craftbukkit/block/CraftBanner.java |   33 +-
 .../bukkit/craftbukkit/block/CraftBarrel.java |   42 +-
 .../bukkit/craftbukkit/block/CraftBeacon.java |   44 +-
 .../bukkit/craftbukkit/block/CraftBed.java    |   10 +-
 .../craftbukkit/block/CraftBeehive.java       |   36 +-
 .../bukkit/craftbukkit/block/CraftBell.java   |   32 +-
 .../bukkit/craftbukkit/block/CraftBiome.java  |   42 +-
 .../craftbukkit/block/CraftBlastFurnace.java  |    6 +-
 .../bukkit/craftbukkit/block/CraftBlock.java  |  267 ++--
 .../block/CraftBlockEntityState.java          |  104 +-
 .../craftbukkit/block/CraftBlockState.java    |  135 +-
 .../craftbukkit/block/CraftBlockStates.java   |  235 ++-
 .../craftbukkit/block/CraftBlockSupport.java  |   12 +-
 .../craftbukkit/block/CraftBlockType.java     |   68 +-
 .../craftbukkit/block/CraftBrewingStand.java  |    6 +-
 .../block/CraftBrushableBlock.java            |   14 +-
 .../craftbukkit/block/CraftCampfire.java      |   20 +-
 .../bukkit/craftbukkit/block/CraftChest.java  |   50 +-
 .../block/CraftChiseledBookshelf.java         |   20 +-
 .../craftbukkit/block/CraftCommandBlock.java  |   14 +-
 .../craftbukkit/block/CraftComparator.java    |    6 +-
 .../craftbukkit/block/CraftConduit.java       |   51 +-
 .../craftbukkit/block/CraftContainer.java     |   24 +-
 .../craftbukkit/block/CraftCrafter.java       |   12 +-
 .../block/CraftCreatureSpawner.java           |   83 +-
 .../block/CraftDaylightDetector.java          |    6 +-
 .../craftbukkit/block/CraftDecoratedPot.java  |   16 +-
 .../craftbukkit/block/CraftDispenser.java     |   18 +-
 .../craftbukkit/block/CraftDropper.java       |   14 +-
 .../block/CraftEnchantingTable.java           |   10 +-
 .../craftbukkit/block/CraftEndGateway.java    |   12 +-
 .../craftbukkit/block/CraftEndPortal.java     |    6 +-
 .../craftbukkit/block/CraftEnderChest.java    |   36 +-
 .../craftbukkit/block/CraftFurnace.java       |    8 +-
 .../block/CraftFurnaceFurnace.java            |    6 +-
 .../bukkit/craftbukkit/block/CraftHopper.java |    6 +-
 .../bukkit/craftbukkit/block/CraftJigsaw.java |    6 +-
 .../craftbukkit/block/CraftJukebox.java       |   54 +-
 .../craftbukkit/block/CraftLectern.java       |   16 +-
 .../craftbukkit/block/CraftLootable.java      |   16 +-
 .../craftbukkit/block/CraftMovingPiston.java  |    6 +-
 .../craftbukkit/block/CraftSculkCatalyst.java |    8 +-
 .../craftbukkit/block/CraftSculkSensor.java   |    4 +-
 .../craftbukkit/block/CraftSculkShrieker.java |   12 +-
 .../craftbukkit/block/CraftShulkerBox.java    |   39 +-
 .../bukkit/craftbukkit/block/CraftSign.java   |   60 +-
 .../bukkit/craftbukkit/block/CraftSkull.java  |   52 +-
 .../bukkit/craftbukkit/block/CraftSmoker.java |    6 +-
 .../block/CraftStructureBlock.java            |   91 +-
 .../craftbukkit/block/CraftTrialSpawner.java  |   46 +-
 .../block/CraftTrialSpawnerConfiguration.java |  115 +-
 .../block/banner/CraftPatternType.java        |   43 +-
 .../craftbukkit/block/data/CraftAgeable.java  |    8 +-
 .../block/data/CraftAnaloguePowerable.java    |    8 +-
 .../block/data/CraftAttachable.java           |    6 +-
 .../craftbukkit/block/data/CraftBisected.java |    6 +-
 .../block/data/CraftBlockData.java            |  432 +++---
 .../block/data/CraftBrushable.java            |    8 +-
 .../block/data/CraftDirectional.java          |    8 +-
 .../block/data/CraftFaceAttachable.java       |    6 +-
 .../craftbukkit/block/data/CraftHangable.java |    6 +-
 .../block/data/CraftHatchable.java            |    8 +-
 .../craftbukkit/block/data/CraftLevelled.java |    8 +-
 .../block/data/CraftLightable.java            |    6 +-
 .../block/data/CraftMultipleFacing.java       |   18 +-
 .../craftbukkit/block/data/CraftOpenable.java |    6 +-
 .../block/data/CraftOrientable.java           |    8 +-
 .../block/data/CraftPowerable.java            |    6 +-
 .../craftbukkit/block/data/CraftRail.java     |    8 +-
 .../block/data/CraftRotatable.java            |    6 +-
 .../craftbukkit/block/data/CraftSnowable.java |    6 +-
 .../block/data/CraftWaterlogged.java          |    6 +-
 .../block/data/type/CraftBamboo.java          |    6 +-
 .../craftbukkit/block/data/type/CraftBed.java |   10 +-
 .../block/data/type/CraftBeehive.java         |    8 +-
 .../block/data/type/CraftBell.java            |    6 +-
 .../block/data/type/CraftBigDripleaf.java     |    6 +-
 .../block/data/type/CraftBrewingStand.java    |   12 +-
 .../block/data/type/CraftBrushable.java       |    8 +-
 .../block/data/type/CraftBubbleColumn.java    |    6 +-
 .../block/data/type/CraftCake.java            |    8 +-
 .../block/data/type/CraftCampfire.java        |    6 +-
 .../block/data/type/CraftCandle.java          |    8 +-
 .../block/data/type/CraftCaveVinesPlant.java  |    6 +-
 .../block/data/type/CraftChest.java           |    6 +-
 .../data/type/CraftChiseledBookshelf.java     |   12 +-
 .../block/data/type/CraftCommandBlock.java    |    6 +-
 .../block/data/type/CraftComparator.java      |    6 +-
 .../block/data/type/CraftCrafter.java         |   18 +-
 .../block/data/type/CraftCreakingHeart.java   |   12 +-
 .../data/type/CraftDaylightDetector.java      |    6 +-
 .../block/data/type/CraftDispenser.java       |    6 +-
 .../block/data/type/CraftDoor.java            |    6 +-
 .../block/data/type/CraftEndPortalFrame.java  |    6 +-
 .../block/data/type/CraftFarmland.java        |    8 +-
 .../block/data/type/CraftGate.java            |    6 +-
 .../block/data/type/CraftHangingMoss.java     |    6 +-
 .../block/data/type/CraftHopper.java          |    6 +-
 .../block/data/type/CraftJigsaw.java          |    6 +-
 .../block/data/type/CraftJukebox.java         |    4 +-
 .../block/data/type/CraftLeaves.java          |   12 +-
 .../block/data/type/CraftLectern.java         |    4 +-
 .../block/data/type/CraftMossyCarpet.java     |   12 +-
 .../block/data/type/CraftNoteBlock.java       |   12 +-
 .../block/data/type/CraftPinkPetals.java      |    8 +-
 .../block/data/type/CraftPiston.java          |    6 +-
 .../block/data/type/CraftPistonHead.java      |    6 +-
 .../data/type/CraftPointedDripstone.java      |   14 +-
 .../block/data/type/CraftRedstoneWire.java    |   24 +-
 .../block/data/type/CraftRepeater.java        |   16 +-
 .../block/data/type/CraftRespawnAnchor.java   |    8 +-
 .../block/data/type/CraftSapling.java         |    8 +-
 .../block/data/type/CraftScaffolding.java     |   14 +-
 .../block/data/type/CraftSculkCatalyst.java   |    6 +-
 .../block/data/type/CraftSculkSensor.java     |    6 +-
 .../block/data/type/CraftSculkShrieker.java   |   12 +-
 .../block/data/type/CraftSeaPickle.java       |   10 +-
 .../block/data/type/CraftSlab.java            |    6 +-
 .../block/data/type/CraftSnow.java            |   10 +-
 .../block/data/type/CraftStairs.java          |    6 +-
 .../block/data/type/CraftStructureBlock.java  |    6 +-
 .../block/data/type/CraftSwitch.java          |    6 +-
 .../craftbukkit/block/data/type/CraftTNT.java |    6 +-
 .../block/data/type/CraftTechnicalPiston.java |    6 +-
 .../block/data/type/CraftTrialSpawner.java    |   12 +-
 .../block/data/type/CraftTripwire.java        |    6 +-
 .../block/data/type/CraftTurtleEgg.java       |   10 +-
 .../block/data/type/CraftVault.java           |   16 +-
 .../block/data/type/CraftWall.java            |   12 +-
 .../block/impl/CraftAmethystCluster.java      |   16 +-
 .../craftbukkit/block/impl/CraftAnvil.java    |   10 +-
 .../craftbukkit/block/impl/CraftBamboo.java   |   24 +-
 .../craftbukkit/block/impl/CraftBanner.java   |    8 +-
 .../block/impl/CraftBannerWall.java           |   10 +-
 .../craftbukkit/block/impl/CraftBarrel.java   |   16 +-
 .../craftbukkit/block/impl/CraftBarrier.java  |    8 +-
 .../craftbukkit/block/impl/CraftBed.java      |   20 +-
 .../craftbukkit/block/impl/CraftBeehive.java  |   18 +-
 .../craftbukkit/block/impl/CraftBeetroot.java |   10 +-
 .../craftbukkit/block/impl/CraftBell.java     |   22 +-
 .../block/impl/CraftBigDripleaf.java          |   22 +-
 .../block/impl/CraftBigDripleafStem.java      |   16 +-
 .../block/impl/CraftBlastFurnace.java         |   16 +-
 .../block/impl/CraftBrewingStand.java         |   16 +-
 .../block/impl/CraftBrushable.java            |   10 +-
 .../block/impl/CraftBubbleColumn.java         |    8 +-
 .../block/impl/CraftButtonAbstract.java       |   28 +-
 .../craftbukkit/block/impl/CraftCactus.java   |   10 +-
 .../craftbukkit/block/impl/CraftCake.java     |   10 +-
 .../impl/CraftCalibratedSculkSensor.java      |   30 +-
 .../craftbukkit/block/impl/CraftCampfire.java |   28 +-
 .../craftbukkit/block/impl/CraftCandle.java   |   22 +-
 .../block/impl/CraftCandleCake.java           |    8 +-
 .../craftbukkit/block/impl/CraftCarrots.java  |   10 +-
 .../block/impl/CraftCaveVines.java            |   16 +-
 .../block/impl/CraftCaveVinesPlant.java       |    8 +-
 .../block/impl/CraftCeilingHangingSign.java   |   20 +-
 .../craftbukkit/block/impl/CraftChain.java    |   16 +-
 .../craftbukkit/block/impl/CraftChest.java    |   22 +-
 .../block/impl/CraftChestTrapped.java         |   22 +-
 .../block/impl/CraftChiseledBookShelf.java    |   22 +-
 .../block/impl/CraftChorusFlower.java         |   10 +-
 .../block/impl/CraftChorusFruit.java          |   22 +-
 .../block/impl/CraftCobbleWall.java           |   22 +-
 .../craftbukkit/block/impl/CraftCocoa.java    |   18 +-
 .../craftbukkit/block/impl/CraftCommand.java  |   16 +-
 .../block/impl/CraftComposter.java            |   10 +-
 .../craftbukkit/block/impl/CraftConduit.java  |    8 +-
 .../block/impl/CraftCopperBulb.java           |   14 +-
 .../block/impl/CraftCoralDead.java            |    8 +-
 .../craftbukkit/block/impl/CraftCoralFan.java |    8 +-
 .../block/impl/CraftCoralFanAbstract.java     |    8 +-
 .../block/impl/CraftCoralFanWall.java         |   16 +-
 .../block/impl/CraftCoralFanWallAbstract.java |   16 +-
 .../block/impl/CraftCoralPlant.java           |    8 +-
 .../craftbukkit/block/impl/CraftCrafter.java  |   20 +-
 .../block/impl/CraftCreakingHeart.java        |   22 +-
 .../craftbukkit/block/impl/CraftCrops.java    |   10 +-
 .../block/impl/CraftDaylightDetector.java     |   16 +-
 .../block/impl/CraftDecoratedPot.java         |   16 +-
 .../craftbukkit/block/impl/CraftDirtSnow.java |    8 +-
 .../block/impl/CraftDispenser.java            |   16 +-
 .../craftbukkit/block/impl/CraftDoor.java     |   34 +-
 .../craftbukkit/block/impl/CraftDropper.java  |   16 +-
 .../craftbukkit/block/impl/CraftEndRod.java   |   10 +-
 .../block/impl/CraftEnderChest.java           |   16 +-
 .../block/impl/CraftEnderPortalFrame.java     |   16 +-
 .../craftbukkit/block/impl/CraftFence.java    |   28 +-
 .../block/impl/CraftFenceGate.java            |   28 +-
 .../craftbukkit/block/impl/CraftFire.java     |   30 +-
 .../block/impl/CraftFloorSign.java            |   14 +-
 .../craftbukkit/block/impl/CraftFluids.java   |   10 +-
 .../block/impl/CraftFurnaceFurace.java        |   16 +-
 .../block/impl/CraftGlazedTerracotta.java     |   10 +-
 .../block/impl/CraftGlowLichen.java           |   26 +-
 .../craftbukkit/block/impl/CraftGrass.java    |    8 +-
 .../block/impl/CraftGrindstone.java           |   16 +-
 .../block/impl/CraftHangingMoss.java          |    8 +-
 .../block/impl/CraftHangingRoots.java         |    8 +-
 .../craftbukkit/block/impl/CraftHay.java      |   10 +-
 .../block/impl/CraftHeavyCore.java            |    8 +-
 .../craftbukkit/block/impl/CraftHopper.java   |   16 +-
 .../block/impl/CraftHugeMushroom.java         |   22 +-
 .../craftbukkit/block/impl/CraftIceFrost.java |   10 +-
 .../impl/CraftInfestedRotatedPillar.java      |   10 +-
 .../craftbukkit/block/impl/CraftIronBars.java |   28 +-
 .../craftbukkit/block/impl/CraftJigsaw.java   |    8 +-
 .../craftbukkit/block/impl/CraftJukeBox.java  |    6 +-
 .../craftbukkit/block/impl/CraftKelp.java     |   10 +-
 .../craftbukkit/block/impl/CraftLadder.java   |   16 +-
 .../craftbukkit/block/impl/CraftLantern.java  |   14 +-
 .../block/impl/CraftLayeredCauldron.java      |   10 +-
 .../craftbukkit/block/impl/CraftLeaves.java   |   20 +-
 .../craftbukkit/block/impl/CraftLectern.java  |   20 +-
 .../craftbukkit/block/impl/CraftLever.java    |   28 +-
 .../craftbukkit/block/impl/CraftLight.java    |   16 +-
 .../block/impl/CraftLightningRod.java         |   22 +-
 .../craftbukkit/block/impl/CraftLoom.java     |   10 +-
 .../block/impl/CraftMangroveLeaves.java       |   20 +-
 .../block/impl/CraftMangrovePropagule.java    |   30 +-
 .../block/impl/CraftMangroveRoots.java        |    8 +-
 .../block/impl/CraftMinecartDetector.java     |   22 +-
 .../block/impl/CraftMinecartTrack.java        |   16 +-
 .../block/impl/CraftMossyCarpet.java          |   14 +-
 .../block/impl/CraftMultiface.java            |   26 +-
 .../craftbukkit/block/impl/CraftMycel.java    |    8 +-
 .../block/impl/CraftNetherWart.java           |   10 +-
 .../craftbukkit/block/impl/CraftNote.java     |   20 +-
 .../craftbukkit/block/impl/CraftObserver.java |   16 +-
 .../block/impl/CraftParticleLeaves.java       |   20 +-
 .../block/impl/CraftPiglinWallSkull.java      |   16 +-
 .../block/impl/CraftPinkPetals.java           |   18 +-
 .../craftbukkit/block/impl/CraftPiston.java   |   16 +-
 .../block/impl/CraftPistonExtension.java      |   22 +-
 .../block/impl/CraftPistonMoving.java         |   16 +-
 .../block/impl/CraftPitcherCrop.java          |   16 +-
 .../block/impl/CraftPointedDripstone.java     |   22 +-
 .../craftbukkit/block/impl/CraftPortal.java   |   10 +-
 .../craftbukkit/block/impl/CraftPotatoes.java |   10 +-
 .../block/impl/CraftPoweredRail.java          |   22 +-
 .../block/impl/CraftPressurePlateBinary.java  |    8 +-
 .../impl/CraftPressurePlateWeighted.java      |   10 +-
 .../block/impl/CraftPumpkinCarved.java        |   10 +-
 .../block/impl/CraftRedstoneComparator.java   |   22 +-
 .../block/impl/CraftRedstoneLamp.java         |    8 +-
 .../block/impl/CraftRedstoneOre.java          |    8 +-
 .../block/impl/CraftRedstoneTorch.java        |    8 +-
 .../block/impl/CraftRedstoneTorchWall.java    |   16 +-
 .../block/impl/CraftRedstoneWire.java         |   34 +-
 .../craftbukkit/block/impl/CraftReed.java     |   10 +-
 .../craftbukkit/block/impl/CraftRepeater.java |   32 +-
 .../block/impl/CraftRespawnAnchor.java        |   10 +-
 .../block/impl/CraftRotatable.java            |   10 +-
 .../craftbukkit/block/impl/CraftSapling.java  |   10 +-
 .../block/impl/CraftScaffolding.java          |   22 +-
 .../block/impl/CraftSculkCatalyst.java        |    8 +-
 .../block/impl/CraftSculkSensor.java          |   22 +-
 .../block/impl/CraftSculkShrieker.java        |   20 +-
 .../block/impl/CraftSculkVein.java            |   26 +-
 .../block/impl/CraftSeaPickle.java            |   18 +-
 .../block/impl/CraftShulkerBox.java           |   10 +-
 .../craftbukkit/block/impl/CraftSkull.java    |   14 +-
 .../block/impl/CraftSkullPlayer.java          |   14 +-
 .../block/impl/CraftSkullPlayerWall.java      |   16 +-
 .../block/impl/CraftSkullWall.java            |   16 +-
 .../block/impl/CraftSmallDripleaf.java        |   22 +-
 .../craftbukkit/block/impl/CraftSmoker.java   |   16 +-
 .../block/impl/CraftSnifferEgg.java           |   10 +-
 .../craftbukkit/block/impl/CraftSnow.java     |   12 +-
 .../craftbukkit/block/impl/CraftSoil.java     |   10 +-
 .../block/impl/CraftStainedGlassPane.java     |   28 +-
 .../craftbukkit/block/impl/CraftStairs.java   |   28 +-
 .../craftbukkit/block/impl/CraftStem.java     |   10 +-
 .../block/impl/CraftStemAttached.java         |   10 +-
 .../block/impl/CraftStepAbstract.java         |   14 +-
 .../block/impl/CraftStonecutter.java          |   10 +-
 .../block/impl/CraftStructure.java            |    8 +-
 .../block/impl/CraftSweetBerryBush.java       |   10 +-
 .../craftbukkit/block/impl/CraftTNT.java      |    8 +-
 .../block/impl/CraftTallPlant.java            |    8 +-
 .../block/impl/CraftTallPlantFlower.java      |    8 +-
 .../block/impl/CraftTallSeagrass.java         |    8 +-
 .../craftbukkit/block/impl/CraftTarget.java   |   10 +-
 .../block/impl/CraftTorchWall.java            |   10 +-
 .../block/impl/CraftTorchflowerCrop.java      |   10 +-
 .../craftbukkit/block/impl/CraftTrapdoor.java |   34 +-
 .../block/impl/CraftTrialSpawner.java         |   14 +-
 .../craftbukkit/block/impl/CraftTripwire.java |   40 +-
 .../block/impl/CraftTripwireHook.java         |   22 +-
 .../block/impl/CraftTurtleEgg.java            |   20 +-
 .../block/impl/CraftTwistingVines.java        |   10 +-
 .../craftbukkit/block/impl/CraftVault.java    |   26 +-
 .../craftbukkit/block/impl/CraftVine.java     |   22 +-
 .../block/impl/CraftWallHangingSign.java      |   16 +-
 .../craftbukkit/block/impl/CraftWallSign.java |   16 +-
 .../impl/CraftWaterloggedTransparent.java     |    8 +-
 .../block/impl/CraftWeatheringCopperBulb.java |   14 +-
 .../block/impl/CraftWeatheringCopperDoor.java |   34 +-
 .../impl/CraftWeatheringCopperGrate.java      |    8 +-
 .../block/impl/CraftWeatheringCopperSlab.java |   14 +-
 .../impl/CraftWeatheringCopperStair.java      |   28 +-
 .../impl/CraftWeatheringCopperTrapDoor.java   |   34 +-
 .../block/impl/CraftWeepingVines.java         |   10 +-
 .../block/impl/CraftWitherSkull.java          |   14 +-
 .../block/impl/CraftWitherSkullWall.java      |   16 +-
 .../craftbukkit/block/sign/CraftSignSide.java |   41 +-
 .../bukkit/craftbukkit/bootstrap/Main.java    |   20 +-
 .../bukkit/craftbukkit/boss/CraftBossBar.java |   90 +-
 .../craftbukkit/boss/CraftDragonBattle.java   |   42 +-
 .../craftbukkit/boss/CraftKeyedBossbar.java   |   10 +-
 .../command/BukkitCommandWrapper.java         |   24 +-
 .../command/ColouredConsoleSender.java        |   64 +-
 .../command/ConsoleCommandCompleter.java      |    6 +-
 .../command/CraftBlockCommandSender.java      |   32 +-
 .../craftbukkit/command/CraftCommandMap.java  |    2 +-
 .../command/CraftConsoleCommandSender.java    |   14 +-
 .../CraftRemoteConsoleCommandSender.java      |   18 +-
 .../command/ProxiedNativeCommandSender.java   |   52 +-
 .../command/ServerCommandSender.java          |   18 +-
 .../command/VanillaCommandWrapper.java        |   36 +-
 .../ConfigSerializationUtil.java              |    2 +-
 .../conversations/ConversationTracker.java    |   30 +-
 .../craftbukkit/damage/CraftDamageEffect.java |    2 +-
 .../craftbukkit/damage/CraftDamageSource.java |   10 +-
 .../damage/CraftDamageSourceBuilder.java      |    2 +-
 .../craftbukkit/damage/CraftDamageType.java   |   11 +-
 .../enchantments/CraftEnchantment.java        |   34 +-
 .../entity/CraftAbstractArrow.java            |   53 +-
 .../entity/CraftAbstractHorse.java            |   49 +-
 .../entity/CraftAbstractSkeleton.java         |    3 +-
 .../entity/CraftAbstractVillager.java         |   17 +-
 .../craftbukkit/entity/CraftAgeable.java      |   34 +-
 .../bukkit/craftbukkit/entity/CraftAllay.java |   36 +-
 .../craftbukkit/entity/CraftAmbient.java      |    8 +-
 .../craftbukkit/entity/CraftAnimals.java      |   22 +-
 .../entity/CraftAreaEffectCloud.java          |   96 +-
 .../craftbukkit/entity/CraftArmorStand.java   |   87 +-
 .../bukkit/craftbukkit/entity/CraftArrow.java |   57 +-
 .../craftbukkit/entity/CraftAxolotl.java      |    8 +-
 .../bukkit/craftbukkit/entity/CraftBat.java   |   11 +-
 .../bukkit/craftbukkit/entity/CraftBee.java   |   37 +-
 .../bukkit/craftbukkit/entity/CraftBlaze.java |    7 +-
 .../entity/CraftBlockAttachedEntity.java      |    2 +-
 .../craftbukkit/entity/CraftBlockDisplay.java |    4 +-
 .../bukkit/craftbukkit/entity/CraftBoat.java  |   63 +-
 .../craftbukkit/entity/CraftBogged.java       |    6 +-
 .../craftbukkit/entity/CraftBreeze.java       |    5 +-
 .../bukkit/craftbukkit/entity/CraftCamel.java |   12 +-
 .../bukkit/craftbukkit/entity/CraftCat.java   |   36 +-
 .../craftbukkit/entity/CraftCaveSpider.java   |    7 +-
 .../craftbukkit/entity/CraftChestBoat.java    |   18 +-
 .../craftbukkit/entity/CraftChestedHorse.java |   16 +-
 .../craftbukkit/entity/CraftChicken.java      |    7 +-
 .../bukkit/craftbukkit/entity/CraftCod.java   |    7 +-
 .../craftbukkit/entity/CraftComplexPart.java  |   18 +-
 .../bukkit/craftbukkit/entity/CraftCow.java   |    7 +-
 .../craftbukkit/entity/CraftCreaking.java     |    2 +-
 .../craftbukkit/entity/CraftCreature.java     |    8 +-
 .../craftbukkit/entity/CraftCreeper.java      |   41 +-
 .../craftbukkit/entity/CraftDisplay.java      |   50 +-
 .../craftbukkit/entity/CraftDolphin.java      |    7 +-
 .../craftbukkit/entity/CraftDonkey.java       |    3 +-
 .../entity/CraftDragonFireball.java           |    3 +-
 .../craftbukkit/entity/CraftDrowned.java      |    7 +-
 .../bukkit/craftbukkit/entity/CraftEgg.java   |    8 +-
 .../entity/CraftElderGuardian.java            |    3 +-
 .../craftbukkit/entity/CraftEnderCrystal.java |   24 +-
 .../craftbukkit/entity/CraftEnderDragon.java  |   29 +-
 .../entity/CraftEnderDragonPart.java          |   27 +-
 .../craftbukkit/entity/CraftEnderPearl.java   |    8 +-
 .../craftbukkit/entity/CraftEnderSignal.java  |   26 +-
 .../craftbukkit/entity/CraftEnderman.java     |   22 +-
 .../craftbukkit/entity/CraftEndermite.java    |    7 +-
 .../bukkit/craftbukkit/entity/CraftEnemy.java |    3 +-
 .../craftbukkit/entity/CraftEntity.java       |  354 +++--
 .../entity/CraftEntityFactory.java            |   14 +-
 .../entity/CraftEntitySnapshot.java           |   37 +-
 .../craftbukkit/entity/CraftEntityType.java   |   14 +-
 .../craftbukkit/entity/CraftEntityTypes.java  |  417 +++--
 .../craftbukkit/entity/CraftEvoker.java       |   13 +-
 .../craftbukkit/entity/CraftEvokerFangs.java  |   16 +-
 .../entity/CraftExperienceOrb.java            |   11 +-
 .../craftbukkit/entity/CraftFallingBlock.java |   34 +-
 .../craftbukkit/entity/CraftFireball.java     |   42 +-
 .../craftbukkit/entity/CraftFirework.java     |   47 +-
 .../bukkit/craftbukkit/entity/CraftFish.java  |    8 +-
 .../craftbukkit/entity/CraftFishHook.java     |   74 +-
 .../craftbukkit/entity/CraftFlying.java       |    8 +-
 .../bukkit/craftbukkit/entity/CraftFox.java   |   43 +-
 .../bukkit/craftbukkit/entity/CraftFrog.java  |   32 +-
 .../bukkit/craftbukkit/entity/CraftGhast.java |   11 +-
 .../bukkit/craftbukkit/entity/CraftGiant.java |    7 +-
 .../entity/CraftGlowItemFrame.java            |    2 +-
 .../craftbukkit/entity/CraftGlowSquid.java    |    4 +-
 .../bukkit/craftbukkit/entity/CraftGoat.java  |   12 +-
 .../bukkit/craftbukkit/entity/CraftGolem.java |    8 +-
 .../craftbukkit/entity/CraftGuardian.java     |   29 +-
 .../craftbukkit/entity/CraftHanging.java      |   30 +-
 .../craftbukkit/entity/CraftHoglin.java       |   27 +-
 .../bukkit/craftbukkit/entity/CraftHorse.java |   22 +-
 .../craftbukkit/entity/CraftHumanEntity.java  |  297 ++--
 .../bukkit/craftbukkit/entity/CraftHusk.java  |    3 +-
 .../craftbukkit/entity/CraftIllager.java      |    8 +-
 .../craftbukkit/entity/CraftIllusioner.java   |    7 +-
 .../craftbukkit/entity/CraftInteraction.java  |   20 +-
 .../craftbukkit/entity/CraftIronGolem.java    |   11 +-
 .../bukkit/craftbukkit/entity/CraftItem.java  |   34 +-
 .../craftbukkit/entity/CraftItemDisplay.java  |    8 +-
 .../craftbukkit/entity/CraftItemFrame.java    |   57 +-
 .../entity/CraftLargeFireball.java            |    9 +-
 .../bukkit/craftbukkit/entity/CraftLeash.java |   10 +-
 .../entity/CraftLightningStrike.java          |   24 +-
 .../craftbukkit/entity/CraftLivingEntity.java |  390 +++--
 .../bukkit/craftbukkit/entity/CraftLlama.java |   21 +-
 .../craftbukkit/entity/CraftLlamaSpit.java    |   11 +-
 .../craftbukkit/entity/CraftMagmaCube.java    |    7 +-
 .../craftbukkit/entity/CraftMinecart.java     |   44 +-
 .../entity/CraftMinecartChest.java            |   10 +-
 .../entity/CraftMinecartCommand.java          |   36 +-
 .../entity/CraftMinecartContainer.java        |   22 +-
 .../entity/CraftMinecartFurnace.java          |   12 +-
 .../entity/CraftMinecartHopper.java           |   14 +-
 .../entity/CraftMinecartMobSpawner.java       |   69 +-
 .../entity/CraftMinecartRideable.java         |    4 +-
 .../craftbukkit/entity/CraftMinecartTNT.java  |   32 +-
 .../bukkit/craftbukkit/entity/CraftMob.java   |   31 +-
 .../craftbukkit/entity/CraftMonster.java      |    7 +-
 .../bukkit/craftbukkit/entity/CraftMule.java  |    3 +-
 .../craftbukkit/entity/CraftMushroomCow.java  |   27 +-
 .../craftbukkit/entity/CraftOcelot.java       |   11 +-
 .../entity/CraftOminousItemSpawner.java       |   10 +-
 .../craftbukkit/entity/CraftPainting.java     |   19 +-
 .../bukkit/craftbukkit/entity/CraftPanda.java |   45 +-
 .../craftbukkit/entity/CraftParrot.java       |   13 +-
 .../craftbukkit/entity/CraftPhantom.java      |   11 +-
 .../bukkit/craftbukkit/entity/CraftPig.java   |   21 +-
 .../craftbukkit/entity/CraftPigZombie.java    |   16 +-
 .../craftbukkit/entity/CraftPiglin.java       |   25 +-
 .../entity/CraftPiglinAbstract.java           |   38 +-
 .../craftbukkit/entity/CraftPiglinBrute.java  |    7 +-
 .../craftbukkit/entity/CraftPillager.java     |    9 +-
 .../craftbukkit/entity/CraftPlayer.java       | 1014 ++++++------
 .../craftbukkit/entity/CraftPolarBear.java    |    7 +-
 .../craftbukkit/entity/CraftProjectile.java   |   17 +-
 .../craftbukkit/entity/CraftPufferFish.java   |   12 +-
 .../craftbukkit/entity/CraftRabbit.java       |   13 +-
 .../craftbukkit/entity/CraftRaider.java       |   39 +-
 .../craftbukkit/entity/CraftRavager.java      |    7 +-
 .../craftbukkit/entity/CraftSalmon.java       |   11 +-
 .../bukkit/craftbukkit/entity/CraftSheep.java |   16 +-
 .../craftbukkit/entity/CraftShulker.java      |   19 +-
 .../entity/CraftShulkerBullet.java            |   21 +-
 .../craftbukkit/entity/CraftSilverfish.java   |    7 +-
 .../entity/CraftSizedFireball.java            |   14 +-
 .../craftbukkit/entity/CraftSkeleton.java     |    9 +-
 .../entity/CraftSkeletonHorse.java            |   15 +-
 .../bukkit/craftbukkit/entity/CraftSlime.java |   11 +-
 .../entity/CraftSmallFireball.java            |    7 +-
 .../craftbukkit/entity/CraftSniffer.java      |    8 +-
 .../craftbukkit/entity/CraftSnowball.java     |    7 +-
 .../craftbukkit/entity/CraftSnowman.java      |   12 +-
 .../entity/CraftSpectralArrow.java            |   11 +-
 .../craftbukkit/entity/CraftSpellcaster.java  |   18 +-
 .../craftbukkit/entity/CraftSpider.java       |    7 +-
 .../bukkit/craftbukkit/entity/CraftSquid.java |    7 +-
 .../bukkit/craftbukkit/entity/CraftStray.java |    3 +-
 .../craftbukkit/entity/CraftStrider.java      |   23 +-
 .../craftbukkit/entity/CraftTNTPrimed.java    |   27 +-
 .../craftbukkit/entity/CraftTadpole.java      |    6 +-
 .../entity/CraftTameableAnimal.java           |   42 +-
 .../craftbukkit/entity/CraftTextDisplay.java  |   50 +-
 .../entity/CraftThrowableProjectile.java      |   16 +-
 .../entity/CraftThrownExpBottle.java          |    8 +-
 .../craftbukkit/entity/CraftThrownPotion.java |   15 +-
 .../craftbukkit/entity/CraftTraderLlama.java  |    7 +-
 .../craftbukkit/entity/CraftTrident.java      |   12 +-
 .../craftbukkit/entity/CraftTropicalFish.java |   21 +-
 .../craftbukkit/entity/CraftTurtle.java       |   11 +-
 .../craftbukkit/entity/CraftVehicle.java      |    2 +-
 .../bukkit/craftbukkit/entity/CraftVex.java   |   31 +-
 .../craftbukkit/entity/CraftVillager.java     |   92 +-
 .../entity/CraftVillagerZombie.java           |   35 +-
 .../craftbukkit/entity/CraftVindicator.java   |   11 +-
 .../entity/CraftWanderingTrader.java          |   11 +-
 .../craftbukkit/entity/CraftWarden.java       |   22 +-
 .../craftbukkit/entity/CraftWaterMob.java     |    8 +-
 .../bukkit/craftbukkit/entity/CraftWitch.java |    9 +-
 .../craftbukkit/entity/CraftWither.java       |   20 +-
 .../entity/CraftWitherSkeleton.java           |    3 +-
 .../craftbukkit/entity/CraftWitherSkull.java  |   11 +-
 .../bukkit/craftbukkit/entity/CraftWolf.java  |   47 +-
 .../craftbukkit/entity/CraftZoglin.java       |   21 +-
 .../craftbukkit/entity/CraftZombie.java       |   41 +-
 .../craftbukkit/entity/CraftZombieHorse.java  |    3 +-
 .../entity/memory/CraftMemoryKey.java         |    3 +-
 .../entity/memory/CraftMemoryMapper.java      |    8 +-
 .../craftbukkit/event/CraftEventFactory.java  |  498 +++---
 .../craftbukkit/event/CraftPortalEvent.java   |   30 +-
 .../generator/CraftBiomeParameterPoint.java   |    2 +-
 .../craftbukkit/generator/CraftChunkData.java |   82 +-
 .../generator/CraftLimitedRegion.java         |  131 +-
 .../craftbukkit/generator/CraftWorldInfo.java |   24 +-
 .../generator/CustomChunkGenerator.java       |  237 ++-
 .../generator/CustomWorldChunkManager.java    |   25 +-
 .../generator/InternalChunkGenerator.java     |   10 +-
 .../generator/OldCraftChunkData.java          |  101 +-
 .../structure/CraftGeneratedStructure.java    |   13 +-
 .../generator/structure/CraftStructure.java   |    6 +-
 .../structure/CraftStructurePiece.java        |    3 +-
 .../structure/CraftStructureType.java         |    4 +-
 .../help/CommandAliasHelpTopic.java           |   10 +-
 .../craftbukkit/help/CustomHelpTopic.java     |    4 +-
 .../help/CustomIndexHelpTopic.java            |   10 +-
 .../craftbukkit/help/HelpTopicAmendment.java  |    8 +-
 .../craftbukkit/help/HelpYamlReader.java      |   38 +-
 .../help/MultipleCommandAliasHelpTopic.java   |   12 +-
 .../craftbukkit/help/SimpleHelpMap.java       |   82 +-
 .../inventory/CraftAbstractInventoryView.java |   38 +-
 .../inventory/CraftBlastingRecipe.java        |    2 +-
 .../inventory/CraftBlockInventoryHolder.java  |   12 +-
 .../inventory/CraftCampfireRecipe.java        |    2 +-
 .../inventory/CraftComplexRecipe.java         |    8 +-
 .../craftbukkit/inventory/CraftContainer.java |  164 +-
 .../inventory/CraftEntityEquipment.java       |  117 +-
 .../inventory/CraftFurnaceRecipe.java         |    2 +-
 .../craftbukkit/inventory/CraftInventory.java |  187 ++-
 .../CraftInventoryAbstractHorse.java          |    8 +-
 .../inventory/CraftInventoryAnvil.java        |   38 +-
 .../inventory/CraftInventoryBeacon.java       |    8 +-
 .../inventory/CraftInventoryBrewer.java       |   14 +-
 .../inventory/CraftInventoryCartography.java  |    4 +-
 .../CraftInventoryChiseledBookshelf.java      |    2 +-
 .../inventory/CraftInventoryCrafter.java      |    4 +-
 .../inventory/CraftInventoryCrafting.java     |   62 +-
 .../inventory/CraftInventoryCustom.java       |   66 +-
 .../inventory/CraftInventoryDecoratedPot.java |   10 +-
 .../inventory/CraftInventoryDoubleChest.java  |   44 +-
 .../inventory/CraftInventoryEnchanting.java   |   12 +-
 .../inventory/CraftInventoryFurnace.java      |   18 +-
 .../inventory/CraftInventoryGrindstone.java   |    4 +-
 .../inventory/CraftInventoryHorse.java        |   10 +-
 .../inventory/CraftInventoryJukebox.java      |   12 +-
 .../inventory/CraftInventoryLectern.java      |   16 +-
 .../inventory/CraftInventoryLlama.java        |   10 +-
 .../inventory/CraftInventoryLoom.java         |    4 +-
 .../inventory/CraftInventoryMerchant.java     |   17 +-
 .../inventory/CraftInventoryPlayer.java       |  104 +-
 .../inventory/CraftInventorySmithing.java     |   18 +-
 .../inventory/CraftInventoryStonecutter.java  |    4 +-
 .../inventory/CraftInventoryView.java         |   46 +-
 .../inventory/CraftItemCraftResult.java       |   12 +-
 .../inventory/CraftItemFactory.java           |   39 +-
 .../craftbukkit/inventory/CraftItemMetas.java |   76 +-
 .../craftbukkit/inventory/CraftItemStack.java |  118 +-
 .../craftbukkit/inventory/CraftItemType.java  |   46 +-
 .../craftbukkit/inventory/CraftMenuType.java  |   31 +-
 .../craftbukkit/inventory/CraftMerchant.java  |   23 +-
 .../inventory/CraftMerchantCustom.java        |   56 +-
 .../inventory/CraftMerchantRecipe.java        |   50 +-
 .../craftbukkit/inventory/CraftMetaArmor.java |   38 +-
 .../inventory/CraftMetaArmorStand.java        |   42 +-
 .../inventory/CraftMetaAxolotlBucket.java     |  100 +-
 .../inventory/CraftMetaBanner.java            |   49 +-
 .../inventory/CraftMetaBlockState.java        |  119 +-
 .../craftbukkit/inventory/CraftMetaBook.java  |   64 +-
 .../inventory/CraftMetaBookSigned.java        |  130 +-
 .../inventory/CraftMetaBundle.java            |   42 +-
 .../inventory/CraftMetaCharge.java            |   32 +-
 .../inventory/CraftMetaColorableArmor.java    |   14 +-
 .../inventory/CraftMetaCompass.java           |  102 +-
 .../inventory/CraftMetaCrossbow.java          |   50 +-
 .../inventory/CraftMetaEnchantedBook.java     |   42 +-
 .../inventory/CraftMetaEntityTag.java         |   44 +-
 .../inventory/CraftMetaFirework.java          |   76 +-
 .../craftbukkit/inventory/CraftMetaItem.java  |  951 ++++++------
 .../inventory/CraftMetaKnowledgeBook.java     |   48 +-
 .../inventory/CraftMetaLeatherArmor.java      |   38 +-
 .../craftbukkit/inventory/CraftMetaMap.java   |   90 +-
 .../inventory/CraftMetaMusicInstrument.java   |   26 +-
 .../inventory/CraftMetaOminousBottle.java     |   34 +-
 .../inventory/CraftMetaPotion.java            |  154 +-
 .../inventory/CraftMetaShield.java            |  103 +-
 .../craftbukkit/inventory/CraftMetaSkull.java |  110 +-
 .../inventory/CraftMetaSpawnEgg.java          |   44 +-
 .../inventory/CraftMetaSuspiciousStew.java    |   76 +-
 .../CraftMetaTropicalFishBucket.java          |  122 +-
 .../craftbukkit/inventory/CraftRecipe.java    |   23 +-
 .../inventory/CraftResultInventory.java       |   28 +-
 .../inventory/CraftShapedRecipe.java          |   13 +-
 .../inventory/CraftShapelessRecipe.java       |   13 +-
 .../CraftSmithingTransformRecipe.java         |    2 +-
 .../inventory/CraftSmithingTrimRecipe.java    |    2 +-
 .../inventory/CraftSmokingRecipe.java         |    2 +-
 .../inventory/CraftStonecuttingRecipe.java    |    2 +-
 .../inventory/CraftTransmuteRecipe.java       |    4 +-
 .../inventory/InventoryIterator.java          |   22 +-
 .../craftbukkit/inventory/RecipeIterator.java |   10 +-
 .../inventory/SerializableMeta.java           |   12 +-
 .../CraftCustomModelDataComponent.java        |   32 +-
 .../components/CraftEquippableComponent.java  |   80 +-
 .../components/CraftFoodComponent.java        |   34 +-
 .../inventory/components/CraftHolderUtil.java |   12 +-
 .../components/CraftJukeboxComponent.java     |   26 +-
 .../components/CraftToolComponent.java        |   86 +-
 .../components/CraftUseCooldownComponent.java |   24 +-
 .../tags/DeprecatedContainerTagType.java      |    2 +-
 .../tags/DeprecatedCustomTagContainer.java    |   18 +-
 .../tags/DeprecatedItemAdapterContext.java    |    2 +-
 .../inventory/tags/DeprecatedItemTagType.java |    4 +-
 .../inventory/trim/CraftTrimMaterial.java     |   13 +-
 .../inventory/trim/CraftTrimPattern.java      |   13 +-
 .../inventory/util/CraftInventoryCreator.java |   58 +-
 .../inventory/util/CraftMenuBuilder.java      |   28 +-
 .../inventory/util/CraftMenus.java            |   79 +-
 .../util/CraftTileInventoryConverter.java     |   94 +-
 .../inventory/view/CraftAnvilView.java        |   26 +-
 .../inventory/view/CraftBeaconView.java       |   18 +-
 .../inventory/view/CraftBrewingStandView.java |   16 +-
 .../inventory/view/CraftCrafterView.java      |    6 +-
 .../inventory/view/CraftEnchantmentView.java  |   30 +-
 .../inventory/view/CraftFurnaceView.java      |   22 +-
 .../inventory/view/CraftLecternView.java      |   12 +-
 .../inventory/view/CraftLoomView.java         |   14 +-
 .../inventory/view/CraftMerchantView.java     |    9 +-
 .../inventory/view/CraftStonecutterView.java  |   14 +-
 .../bukkit/craftbukkit/legacy/CraftEvil.java  |   24 +-
 .../craftbukkit/legacy/CraftLegacy.java       |  110 +-
 .../craftbukkit/legacy/FieldRename.java       |   72 +-
 .../craftbukkit/legacy/MaterialRerouting.java |  200 +--
 .../craftbukkit/legacy/enums/EnumEvil.java    |   26 +-
 .../legacy/enums/ImposterEnumMap.java         |   44 +-
 .../legacy/enums/ImposterEnumSet.java         |   66 +-
 .../legacy/fieldrename/FieldRenameData.java   |   24 +-
 .../reroute/RequirePluginVersionData.java     |    4 +-
 .../craftbukkit/legacy/reroute/Reroute.java   |   10 +-
 .../legacy/reroute/RerouteArgument.java       |    4 +-
 .../legacy/reroute/RerouteBuilder.java        |   14 +-
 .../legacy/reroute/RerouteReturn.java         |    2 +-
 .../craftbukkit/map/CraftMapCanvas.java       |   28 +-
 .../craftbukkit/map/CraftMapColorCache.java   |   64 +-
 .../craftbukkit/map/CraftMapCursor.java       |   22 +-
 .../craftbukkit/map/CraftMapRenderer.java     |   14 +-
 .../bukkit/craftbukkit/map/CraftMapView.java  |   84 +-
 .../metadata/BlockMetadataStore.java          |    8 +-
 .../craftbukkit/packs/CraftDataPack.java      |   28 +-
 .../packs/CraftDataPackManager.java           |   19 +-
 .../CraftPersistentDataContainer.java         |   40 +-
 .../CraftPersistentDataTypeRegistry.java      |  150 +-
 .../DirtyCraftPersistentDataContainer.java    |   12 +-
 .../potion/CraftPotionEffectType.java         |   46 +-
 .../potion/CraftPotionEffectTypeCategory.java |    8 +-
 .../craftbukkit/potion/CraftPotionType.java   |   37 +-
 .../craftbukkit/potion/CraftPotionUtil.java   |   20 +-
 .../profile/CraftPlayerProfile.java           |   68 +-
 .../profile/CraftPlayerTextures.java          |  158 +-
 .../profile/CraftProfileProperty.java         |    8 +-
 .../CraftBlockProjectileSource.java           |   58 +-
 .../craftbukkit/scheduler/CraftAsyncTask.java |   32 +-
 .../craftbukkit/scheduler/CraftFuture.java    |   28 +-
 .../craftbukkit/scheduler/CraftScheduler.java |  138 +-
 .../craftbukkit/scheduler/CraftTask.java      |   26 +-
 .../craftbukkit/scoreboard/CraftCriteria.java |   28 +-
 .../scoreboard/CraftObjective.java            |   61 +-
 .../craftbukkit/scoreboard/CraftScore.java    |   18 +-
 .../scoreboard/CraftScoreboard.java           |   61 +-
 .../scoreboard/CraftScoreboardComponent.java  |    2 +-
 .../scoreboard/CraftScoreboardManager.java    |   58 +-
 .../CraftScoreboardTranslations.java          |   18 +-
 .../craftbukkit/scoreboard/CraftTeam.java     |  139 +-
 .../craftbukkit/structure/CraftPalette.java   |   16 +-
 .../craftbukkit/structure/CraftStructure.java |   69 +-
 .../structure/CraftStructureManager.java      |   88 +-
 .../bukkit/craftbukkit/tag/CraftBlockTag.java |    8 +-
 .../craftbukkit/tag/CraftDamageTag.java       |    8 +-
 .../craftbukkit/tag/CraftEntityTag.java       |   11 +-
 .../bukkit/craftbukkit/tag/CraftFluidTag.java |   11 +-
 .../bukkit/craftbukkit/tag/CraftItemTag.java  |    8 +-
 .../org/bukkit/craftbukkit/tag/CraftTag.java  |   10 +-
 .../bukkit/craftbukkit/util/ApiVersion.java   |   34 +-
 .../util/BlockStateListPopulator.java         |  119 +-
 .../craftbukkit/util/ClassTraverser.java      |   18 +-
 .../bukkit/craftbukkit/util/Commodore.java    |   88 +-
 .../util/CraftBiomeSearchResult.java          |    4 +-
 .../craftbukkit/util/CraftBlockVector.java    |   10 +-
 .../craftbukkit/util/CraftChatMessage.java    |  252 +--
 .../craftbukkit/util/CraftDimensionUtil.java  |   20 +-
 .../craftbukkit/util/CraftLocation.java       |   36 +-
 .../craftbukkit/util/CraftMagicNumbers.java   |   85 +-
 .../util/CraftNBTTagConfigSerializer.java     |   58 +-
 .../craftbukkit/util/CraftNamespacedKey.java  |   14 +-
 .../craftbukkit/util/CraftRayTraceResult.java |   28 +-
 .../craftbukkit/util/CraftSpawnCategory.java  |   22 +-
 .../util/CraftStructureSearchResult.java      |    4 +-
 .../util/CraftStructureTransformer.java       |   44 +-
 .../bukkit/craftbukkit/util/CraftVector.java  |    6 +-
 .../craftbukkit/util/CraftVoxelShape.java     |    8 +-
 .../util/DelegatedGeneratorAccess.java        |  596 +++----
 .../util/DummyGeneratorAccess.java            |  110 +-
 .../craftbukkit/util/ForwardLogHandler.java   |    8 +-
 .../bukkit/craftbukkit/util/JsonHelper.java   |    4 +-
 .../bukkit/craftbukkit/util/LazyHashSet.java  |   34 +-
 .../craftbukkit/util/LazyPlayerSet.java       |    8 +-
 .../util/LimitedClassRemapper.java            |    6 +-
 .../craftbukkit/util/RandomSourceWrapper.java |   36 +-
 .../util/ServerShutdownThread.java            |    4 +-
 .../util/TerminalCompletionHandler.java       |   10 +-
 .../util/TerminalConsoleWriterThread.java     |   22 +-
 .../util/TransformerGeneratorAccess.java      |   58 +-
 .../bukkit/craftbukkit/util/UnsafeList.java   |  176 +--
 .../org/bukkit/craftbukkit/util/Waitable.java |   16 +-
 .../craftbukkit/util/WeakCollection.java      |   28 +-
 .../bukkit/craftbukkit/util/WorldUUID.java    |    4 +-
 .../util/permissions/CommandPermissions.java  |   40 +-
 .../permissions/CraftDefaultPermissions.java  |    2 +-
 .../src/test/java/org/bukkit/BiomeTest.java   |    3 +-
 .../org/bukkit/BlockDataConversionTest.java   |    4 +-
 .../test/java/org/bukkit/BlockDataTest.java   |   17 +-
 .../src/test/java/org/bukkit/ChatTest.java    |    9 +-
 .../test/java/org/bukkit/DyeColorsTest.java   |   11 +-
 .../test/java/org/bukkit/EnchantmentTest.java |    4 +-
 .../java/org/bukkit/ExplosionResultTest.java  |    4 +-
 .../test/java/org/bukkit/GameRuleTest.java    |    4 +-
 .../test/java/org/bukkit/LootTablesTest.java  |    2 +-
 .../test/java/org/bukkit/MaterialTest.java    |    6 +-
 .../test/java/org/bukkit/ParticleTest.java    |  100 +-
 .../test/java/org/bukkit/PerMaterialTest.java |   35 +-
 .../java/org/bukkit/PotionEffectTypeTest.java |    8 +-
 .../src/test/java/org/bukkit/SoundTest.java   |    8 +-
 .../bukkit/StatisticsAndAchievementsTest.java |    9 +-
 .../bukkit/block/banner/PatternTypeTest.java  |   12 +-
 .../org/bukkit/craftbukkit/HeightMapTest.java |    2 +-
 .../craftbukkit/block/BlockStateTest.java     |   13 +-
 .../craftbukkit/entity/EntityTypesTest.java   |   12 +-
 .../craftbukkit/generator/ChunkDataTest.java  |   68 +-
 .../inventory/CompositeSerialization.java     |    2 +-
 .../DeprecatedItemMetaCustomValueTest.java    |  102 +-
 .../inventory/FactoryItemMaterialTest.java    |   52 +-
 .../ItemMetaImplementationOverrideTest.java   |    6 +-
 .../craftbukkit/inventory/ItemMetaTest.java   |   40 +-
 .../inventory/ItemStackBookTest.java          |    2 +-
 .../ItemStackEnchantStorageTest.java          |    2 +-
 .../ItemStackFireworkChargeTest.java          |    2 +-
 .../inventory/ItemStackFireworkTest.java      |    2 +-
 .../inventory/ItemStackLeatherTest.java       |    2 +-
 .../ItemStackLoreEnchantmentTest.java         |    2 +-
 .../inventory/ItemStackMapTest.java           |    2 +-
 .../inventory/ItemStackPotionsTest.java       |    2 +-
 .../inventory/ItemStackSkullTest.java         |    2 +-
 .../craftbukkit/inventory/ItemStackTest.java  |   66 +-
 .../PersistentDataContainerTest.java          |  170 +-
 .../inventory/PlayerInventoryTest.java        |    5 +-
 .../bukkit/craftbukkit/legacy/LegacyTest.java |   10 +-
 .../legacy/MaterialReroutingTest.java         |   12 +-
 .../PersistentDataContainerLegacyTest.java    |   28 +-
 .../legacy/reroute/AbstractRerouteTest.java   |    6 +-
 .../legacy/reroute/DoNotRerouteTest.java      |    2 +-
 .../reroute/InjectCompatibilityTest.java      |   10 +-
 .../legacy/reroute/InjectPluginNameTest.java  |   10 +-
 .../reroute/InjectPluginVersionTest.java      |   10 +-
 .../legacy/reroute/NotInBukkitTest.java       |    8 +-
 .../reroute/RequireCompatibilityTest.java     |   10 +-
 .../reroute/RequirePluginVersionTest.java     |    8 +-
 .../reroute/RerouteArgumentTypeTest.java      |   18 +-
 .../legacy/reroute/RerouteBuilderTest.java    |   52 +-
 .../legacy/reroute/RerouteMethodNameTest.java |    8 +-
 .../legacy/reroute/RerouteReturnTypeTest.java |    8 +-
 .../legacy/reroute/RerouteStaticTest.java     |    8 +-
 .../legacy/reroute/RerouteValidationTest.java |   12 +-
 .../profile/PlayerProfileTest.java            |   92 +-
 .../util/CraftChatMessageTest.java            |   81 +-
 .../bukkit/entity/EnderDragonPhaseTest.java   |   49 +-
 .../org/bukkit/entity/EntityPoseTest.java     |    9 +-
 .../org/bukkit/entity/EntityTypesTest.java    |   12 +-
 .../java/org/bukkit/entity/PandaGeneTest.java |    9 +-
 .../org/bukkit/entity/SpawnCategoryTest.java  |    6 +-
 .../org/bukkit/entity/TropicalFishTest.java   |   44 +-
 .../bukkit/event/EntityRemoveEventTest.java   |    8 +-
 .../generator/structure/StructureTest.java    |    7 +-
 .../structure/StructureTypeTest.java          |    4 +-
 .../src/test/java/org/bukkit/map/MapTest.java |   16 +-
 .../java/org/bukkit/potion/PotionTest.java    |   14 +-
 .../org/bukkit/registry/PerRegistryTest.java  |   16 +-
 .../bukkit/registry/RegistryClassTest.java    |   65 +-
 .../registry/RegistryConstantsTest.java       |   11 +-
 .../registry/RegistryConversionTest.java      |   83 +-
 .../registry/RegistryLoadOrderTest.java       |   53 +-
 .../org/bukkit/support/DummyServerHelper.java |    3 -
 .../java/org/bukkit/support/LegacyHelper.java |    2 +-
 .../java/org/bukkit/support/Matchers.java     |    6 +-
 .../org/bukkit/support/RegistryHelper.java    |   92 +-
 .../extension/AllFeaturesExtension.java       |    4 +-
 .../support/extension/BaseExtension.java      |   36 +-
 .../support/extension/NormalExtension.java    |    6 +-
 .../provider/ClassNodeArgumentProvider.java   |   10 +-
 .../provider/ClassReaderArgumentProvider.java |   48 +-
 .../provider/RegistriesArgumentProvider.java  |   32 +-
 .../provider/RegistryArgumentProvider.java    |    4 +-
 1780 files changed, 44628 insertions(+), 41274 deletions(-)
 rename paper-server/patches/sources/net/minecraft/{CrashReport.patch => CrashReport.java.patch} (67%)
 rename paper-server/patches/sources/net/minecraft/advancements/{AdvancementHolder.patch => AdvancementHolder.java.patch} (58%)
 rename paper-server/patches/sources/net/minecraft/advancements/{AdvancementTree.patch => AdvancementTree.java.patch} (84%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/commands/CommandDispatcher.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/commands/CommandListenerWrapper.patch
 rename paper-server/patches/sources/net/minecraft/commands/{ICommandListener.patch => CommandSource.java.patch} (58%)
 create mode 100644 paper-server/patches/sources/net/minecraft/commands/CommandSourceStack.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/commands/Commands.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/commands/arguments/ArgumentEntity.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/commands/arguments/EntityArgument.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/commands/arguments/blocks/ArgumentBlock.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/commands/arguments/blocks/BlockStateParser.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/commands/arguments/selector/EntitySelector.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/commands/arguments/selector/EntitySelector.patch
 rename paper-server/patches/sources/net/minecraft/commands/arguments/selector/{ArgumentParserSelector.patch => EntitySelectorParser.java.patch} (80%)
 create mode 100644 paper-server/patches/sources/net/minecraft/core/cauldron/CauldronInteraction.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/core/cauldron/CauldronInteraction.patch
 rename paper-server/patches/sources/net/minecraft/core/component/{DataComponentPatch.patch => DataComponentPatch.java.patch} (71%)
 rename paper-server/patches/sources/net/minecraft/core/dispenser/{DispenseBehaviorBoat.patch => BoatDispenseItemBehavior.java.patch} (54%)
 create mode 100644 paper-server/patches/sources/net/minecraft/core/dispenser/DefaultDispenseItemBehavior.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/core/dispenser/DispenseBehaviorItem.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/core/dispenser/DispenseBehaviorProjectile.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/core/dispenser/DispenseBehaviorShears.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/core/dispenser/DispenseBehaviorShulkerBox.patch
 rename paper-server/patches/sources/net/minecraft/core/dispenser/{IDispenseBehavior.patch => DispenseItemBehavior.java.patch} (51%)
 rename paper-server/patches/sources/net/minecraft/core/dispenser/{EquipmentDispenseItemBehavior.patch => EquipmentDispenseItemBehavior.java.patch} (52%)
 rename paper-server/patches/sources/net/minecraft/core/dispenser/{MinecartDispenseItemBehavior.patch => MinecartDispenseItemBehavior.java.patch} (51%)
 create mode 100644 paper-server/patches/sources/net/minecraft/core/dispenser/ProjectileDispenseBehavior.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/core/dispenser/ShulkerBoxDispenseBehavior.java.patch
 rename paper-server/patches/sources/net/minecraft/nbt/{NBTTagIntArray.patch => ByteArrayTag.java.patch} (50%)
 rename paper-server/patches/sources/net/minecraft/nbt/{NBTTagByteArray.patch => IntArrayTag.java.patch} (50%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/nbt/NBTCompressedStreamTools.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/nbt/NbtIo.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/network/Connection.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/network/FriendlyByteBuf.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/network/NetworkManager.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/network/PacketDataSerializer.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/network/chat/ChatHexColor.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/network/chat/Component.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/network/chat/IChatBaseComponent.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/network/chat/TextColor.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/network/protocol/PacketUtils.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/network/protocol/PlayerConnectionUtils.patch
 rename paper-server/patches/sources/net/minecraft/network/protocol/common/{ServerboundCustomPayloadPacket.patch => ServerboundCustomPayloadPacket.java.patch} (50%)
 rename paper-server/patches/sources/net/minecraft/network/protocol/common/custom/{DiscardedPayload.patch => DiscardedPayload.java.patch} (53%)
 create mode 100644 paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundInitializeBorderPacket.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundInitializeBorderPacket.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundSetBorderCenterPacket.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundSetBorderCenterPacket.patch
 rename paper-server/patches/sources/net/minecraft/network/protocol/game/{ClientboundSystemChatPacket.patch => ClientboundSystemChatPacket.java.patch} (100%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/network/protocol/game/PacketPlayInBlockPlace.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/network/protocol/game/PacketPlayInUseItem.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/network/protocol/game/PacketPlayOutMultiBlockChange.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/network/protocol/game/ServerboundUseItemOnPacket.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/network/protocol/game/ServerboundUseItemPacket.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/network/protocol/handshake/PacketHandshakingInSetProtocol.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/network/syncher/DataWatcher.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/network/syncher/SynchedEntityData.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/AdvancementDataPlayer.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/Bootstrap.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/DispenserRegistry.patch
 rename paper-server/patches/sources/net/minecraft/server/{Main.patch => Main.java.patch} (69%)
 rename paper-server/patches/sources/net/minecraft/server/{MinecraftServer.patch => MinecraftServer.java.patch} (55%)
 create mode 100644 paper-server/patches/sources/net/minecraft/server/PlayerAdvancements.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/ScoreboardServer.patch
 rename paper-server/patches/sources/net/minecraft/server/{AdvancementDataWorld.patch => ServerAdvancementManager.java.patch} (57%)
 rename paper-server/patches/sources/net/minecraft/server/{CustomFunctionData.patch => ServerFunctionManager.java.patch} (53%)
 create mode 100644 paper-server/patches/sources/net/minecraft/server/ServerScoreboard.java.patch
 rename paper-server/patches/sources/net/minecraft/server/{ServerTickRateManager.patch => ServerTickRateManager.java.patch} (82%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/bossevents/BossBattleCustom.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/bossevents/CustomBossEvent.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/commands/CommandDifficulty.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/commands/CommandEffect.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/commands/CommandGamerule.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/commands/CommandList.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/commands/CommandLoot.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/commands/CommandReload.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/commands/CommandSchedule.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/commands/CommandSetWorldSpawn.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/commands/CommandSpawnpoint.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/commands/CommandSpreadPlayers.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/commands/CommandSummon.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/commands/CommandTeleport.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/commands/CommandTime.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/commands/CommandWeather.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/commands/CommandWorldBorder.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/commands/DifficultyCommand.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/commands/EffectCommands.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/commands/GameRuleCommand.java.patch
 rename paper-server/patches/sources/net/minecraft/server/commands/{CommandGive.patch => GiveCommand.java.patch} (74%)
 create mode 100644 paper-server/patches/sources/net/minecraft/server/commands/ListPlayersCommand.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/commands/LootCommand.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/commands/PlaceCommand.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/commands/PlaceCommand.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/commands/ReloadCommand.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/commands/ScheduleCommand.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/commands/SetSpawnCommand.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/commands/SetWorldSpawnCommand.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/commands/SpreadPlayersCommand.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/commands/SummonCommand.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/commands/TeleportCommand.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/commands/TimeCommand.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/commands/WeatherCommand.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/commands/WorldBorderCommand.java.patch
 rename paper-server/patches/sources/net/minecraft/server/dedicated/{DedicatedServer.patch => DedicatedServer.java.patch} (64%)
 rename paper-server/patches/sources/net/minecraft/server/dedicated/{DedicatedServerProperties.patch => DedicatedServerProperties.java.patch} (63%)
 rename paper-server/patches/sources/net/minecraft/server/dedicated/{DedicatedServerSettings.patch => DedicatedServerSettings.java.patch} (90%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/dedicated/PropertyManager.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/dedicated/Settings.java.patch
 rename paper-server/patches/sources/net/minecraft/server/gui/{ServerGUI.patch => MinecraftServerGui.java.patch} (69%)
 rename paper-server/patches/sources/net/minecraft/server/level/{PlayerChunk.patch => ChunkHolder.java.patch} (70%)
 create mode 100644 paper-server/patches/sources/net/minecraft/server/level/ChunkMap.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/level/ChunkMapDistance.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/level/DistanceManager.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/level/PlayerChunkMap.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/level/PlayerInteractManager.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/level/RegionLimitedWorldAccess.patch
 rename paper-server/patches/sources/net/minecraft/server/level/{ChunkProviderServer.patch => ServerChunkCache.java.patch} (58%)
 rename paper-server/patches/sources/net/minecraft/server/level/{EntityTrackerEntry.patch => ServerEntity.java.patch} (51%)
 create mode 100644 paper-server/patches/sources/net/minecraft/server/level/ServerLevel.java.patch
 rename paper-server/patches/sources/net/minecraft/server/level/{EntityPlayer.patch => ServerPlayer.java.patch} (53%)
 create mode 100644 paper-server/patches/sources/net/minecraft/server/level/ServerPlayerGameMode.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/level/TicketType.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/level/TicketType.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/level/WorldGenRegion.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/level/WorldServer.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/network/HandshakeListener.patch
 rename paper-server/patches/sources/net/minecraft/server/network/{LegacyPingHandler.patch => LegacyQueryHandler.java.patch} (53%)
 rename paper-server/patches/sources/net/minecraft/server/network/{ServerCommonPacketListenerImpl.patch => ServerCommonPacketListenerImpl.java.patch} (54%)
 rename paper-server/patches/sources/net/minecraft/server/network/{ServerConfigurationPacketListenerImpl.patch => ServerConfigurationPacketListenerImpl.java.patch} (65%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/network/ServerConnection.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/network/ServerConnectionListener.java.patch
 rename paper-server/patches/sources/net/minecraft/server/network/{PlayerConnection.patch => ServerGamePacketListenerImpl.java.patch} (61%)
 create mode 100644 paper-server/patches/sources/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java.patch
 rename paper-server/patches/sources/net/minecraft/server/network/{LoginListener.patch => ServerLoginPacketListenerImpl.java.patch} (53%)
 rename paper-server/patches/sources/net/minecraft/server/network/{PacketStatusListener.patch => ServerStatusPacketListenerImpl.java.patch} (69%)
 create mode 100644 paper-server/patches/sources/net/minecraft/server/players/BanListEntry.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/players/ExpirableListEntry.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/players/GameProfileBanEntry.patch
 rename paper-server/patches/sources/net/minecraft/server/players/{UserCache.patch => GameProfileCache.java.patch} (56%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/players/NameReferencingFileConverter.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/players/OldUsersConverter.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/players/PlayerList.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/players/PlayerList.patch
 rename paper-server/patches/sources/net/minecraft/server/players/{SleepStatus.patch => SleepStatus.java.patch} (63%)
 rename paper-server/patches/sources/net/minecraft/server/players/{JsonList.patch => StoredUserList.java.patch} (78%)
 create mode 100644 paper-server/patches/sources/net/minecraft/server/players/UserBanListEntry.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/server/rcon/RconConsoleSource.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/server/rcon/RemoteControlCommandListener.patch
 rename paper-server/patches/sources/net/minecraft/server/rcon/thread/{RemoteControlSession.patch => RconClient.java.patch} (61%)
 rename paper-server/patches/sources/net/minecraft/stats/{RecipeBookServer.patch => ServerRecipeBook.java.patch} (57%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/stats/ServerStatisticManager.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/stats/ServerStatsCounter.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/stats/StatisticManager.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/stats/StatsCounter.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/util/SpawnUtil.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/util/SpawnUtil.patch
 rename paper-server/patches/sources/net/minecraft/util/{TickThrottler.patch => TickThrottler.java.patch} (82%)
 rename paper-server/patches/sources/net/minecraft/util/datafix/{DataConverterRegistry.patch => DataFixers.java.patch} (52%)
 rename paper-server/patches/sources/net/minecraft/util/datafix/fixes/{DataConverterMap.patch => ItemStackMapIdFix.java.patch} (82%)
 rename paper-server/patches/sources/net/minecraft/util/datafix/fixes/{DataConverterFlatten.patch => ItemStackTheFlatteningFix.java.patch} (77%)
 create mode 100644 paper-server/patches/sources/net/minecraft/util/worldupdate/WorldUpgrader.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/util/worldupdate/WorldUpgrader.patch
 rename paper-server/patches/sources/net/minecraft/world/{InventoryLargeChest.patch => CompoundContainer.java.patch} (73%)
 rename paper-server/patches/sources/net/minecraft/world/{IInventory.patch => Container.java.patch} (52%)
 rename paper-server/patches/sources/net/minecraft/world/{InventorySubcontainer.patch => SimpleContainer.java.patch} (58%)
 rename paper-server/patches/sources/net/minecraft/world/damagesource/{DamageSource.patch => DamageSource.java.patch} (93%)
 rename paper-server/patches/sources/net/minecraft/world/damagesource/{DamageSources.patch => DamageSources.java.patch} (58%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/effect/HealOrHarmMobEffect.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/effect/HealOrHarmMobEffect.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/effect/HungerMobEffect.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/effect/HungerMobEffect.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/effect/InfestedMobEffect.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/effect/InfestedMobEffect.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/effect/MobEffectUtil.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/effect/MobEffectUtil.patch
 rename paper-server/patches/sources/net/minecraft/world/effect/{OozingMobEffect.patch => OozingMobEffect.java.patch} (81%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/effect/PoisonMobEffect.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/effect/PoisonMobEffect.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/effect/RegenerationMobEffect.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/effect/RegenerationMobEffect.patch
 rename paper-server/patches/sources/net/minecraft/world/effect/{SaturationMobEffect.patch => SaturationMobEffect.java.patch} (56%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/AgeableMob.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/{EntityAreaEffectCloud.patch => AreaEffectCloud.java.patch} (58%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/ConversionType.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/ConversionType.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/Entity.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/Entity.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/EntityAgeable.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/EntityCreature.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/EntityExperienceOrb.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/EntityInsentient.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/EntityLiving.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/EntitySelector.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/EntityTameableAnimal.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/EntityType.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/EntityTypes.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/ExperienceOrb.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/IEntitySelector.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/{Interaction.patch => Interaction.java.patch} (62%)
 rename paper-server/patches/sources/net/minecraft/world/entity/{SaddleStorage.patch => ItemBasedSteering.java.patch} (59%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/Leashable.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/Leashable.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/{EntityLightning.patch => LightningBolt.java.patch} (69%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/LivingEntity.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/Mob.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/{IEntityAngerable.patch => NeutralMob.java.patch} (52%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/PathfinderMob.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/TamableAnimal.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/ai/attributes/Attributes.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/ai/attributes/GenericAttributes.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/{BehaviorCareer.patch => AssignProfessionFromJobSite.java.patch} (84%)
 rename paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/{BehaviorFollowAdult.patch => BabyFollowAdult.java.patch} (55%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorFarm.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorMakeLove.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorUtil.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/{BehaviorFindAdmirableItem.patch => GoToWantedItem.java.patch} (56%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/HarvestFarmland.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/{BehaviorInteractDoor.patch => InteractWithDoor.java.patch} (66%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/PrepareRamNearestTarget.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/PrepareRamNearestTarget.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/{BehaviorProfession.patch => ResetProfession.java.patch} (88%)
 rename paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/{BehaviorAttackTargetSet.patch => StartAttacking.java.patch} (75%)
 rename paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/{BehaviorAttackTargetForget.patch => StopAttackingIfTargetInvalid.java.patch} (69%)
 rename paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/{TryLaySpawnOnWaterNearLand.patch => TryLaySpawnOnWaterNearLand.java.patch} (71%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/VillagerMakeLove.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/warden/{Digging.patch => Digging.java.patch} (87%)
 rename paper-server/patches/sources/net/minecraft/world/entity/ai/goal/{PathfinderGoalBreakDoor.patch => BreakDoorGoal.java.patch} (82%)
 rename paper-server/patches/sources/net/minecraft/world/entity/ai/goal/{PathfinderGoalEatTile.patch => EatBlockGoal.java.patch} (73%)
 rename paper-server/patches/sources/net/minecraft/world/entity/ai/goal/{PathfinderGoalRemoveBlock.patch => RemoveBlockGoal.java.patch} (67%)
 rename paper-server/patches/sources/net/minecraft/world/entity/ai/goal/{PathfinderGoalTame.patch => RunAroundLikeCrazyGoal.java.patch} (64%)
 rename paper-server/patches/sources/net/minecraft/world/entity/ai/goal/{PathfinderGoalSit.patch => SitWhenOrderedToGoal.java.patch} (73%)
 rename paper-server/patches/sources/net/minecraft/world/entity/ai/goal/{PathfinderGoalTempt.patch => TemptGoal.java.patch} (64%)
 rename paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/{PathfinderGoalDefendVillage.patch => DefendVillageTargetGoal.java.patch} (65%)
 rename paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/{PathfinderGoalHurtByTarget.patch => HurtByTargetGoal.java.patch} (50%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/{PathfinderGoalOwnerHurtByTarget.patch => OwnerHurtByTargetGoal.java.patch} (57%)
 rename paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/{PathfinderGoalOwnerHurtTarget.patch => OwnerHurtTargetGoal.java.patch} (57%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/PathfinderGoalNearestAttackableTarget.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/PathfinderGoalTarget.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/TargetGoal.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/ai/sensing/{TemptingSensor.patch => TemptingSensor.java.patch} (52%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/ai/village/VillageSiege.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/ai/village/VillageSiege.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/ambient/Bat.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/ambient/EntityBat.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/Animal.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/Bee.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/Bucketable.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/Bucketable.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/Cat.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/Chicken.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/Cow.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/Dolphin.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/EntityAnimal.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/EntityBee.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/EntityCat.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/EntityChicken.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/EntityCow.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/EntityDolphin.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/EntityIronGolem.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/EntityMushroomCow.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/EntityOcelot.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/EntityPanda.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/EntityParrot.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/EntityPerchable.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/EntityPig.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/EntityPufferFish.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/EntitySheep.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/EntityTurtle.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/EntityWolf.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/animal/{EntityFox.patch => Fox.java.patch} (51%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/IronGolem.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/MushroomCow.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/Ocelot.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/Panda.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/Parrot.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/Pig.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/Pufferfish.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/animal/{EntityRabbit.patch => Rabbit.java.patch} (52%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/Sheep.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/ShoulderRidingEntity.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/animal/{EntitySnowman.patch => SnowGolem.java.patch} (51%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/Turtle.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/Wolf.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/animal/allay/{Allay.patch => Allay.java.patch} (60%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/armadillo/Armadillo.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/armadillo/Armadillo.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/animal/axolotl/{Axolotl.patch => Axolotl.java.patch} (71%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/camel/Camel.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/camel/Camel.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/animal/frog/{ShootTongue.patch => ShootTongue.java.patch} (60%)
 rename paper-server/patches/sources/net/minecraft/world/entity/animal/frog/{Tadpole.patch => Tadpole.java.patch} (60%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/goat/Goat.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/goat/Goat.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/animal/horse/{EntityHorseAbstract.patch => AbstractHorse.java.patch} (58%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/horse/EntityHorseSkeleton.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/horse/EntityLlama.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/horse/Llama.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/animal/horse/SkeletonHorse.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/animal/horse/{PathfinderGoalHorseTrap.patch => SkeletonTrapGoal.java.patch} (79%)
 rename paper-server/patches/sources/net/minecraft/world/entity/animal/horse/{EntityLlamaTrader.patch => TraderLlama.java.patch} (57%)
 rename paper-server/patches/sources/net/minecraft/world/entity/animal/sniffer/{Sniffer.patch => Sniffer.java.patch} (77%)
 rename paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/{EntityEnderCrystal.patch => EndCrystal.java.patch} (52%)
 rename paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/{EntityEnderDragon.patch => EnderDragon.java.patch} (56%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/phases/DragonControllerLandedFlame.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/phases/{DragonControllerManager.patch => EnderDragonPhaseManager.java.patch} (60%)
 rename paper-server/patches/sources/net/minecraft/world/entity/boss/wither/{EntityWither.patch => WitherBoss.java.patch} (54%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/decoration/ArmorStand.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/decoration/{BlockAttachedEntity.patch => BlockAttachedEntity.java.patch} (61%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/decoration/EntityArmorStand.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/decoration/EntityItemFrame.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/decoration/EntityPainting.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/decoration/ItemFrame.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/decoration/{EntityLeash.patch => LeashFenceKnotEntity.java.patch} (59%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/decoration/Painting.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/item/{EntityFallingBlock.patch => FallingBlockEntity.java.patch} (69%)
 rename paper-server/patches/sources/net/minecraft/world/entity/item/{EntityItem.patch => ItemEntity.java.patch} (58%)
 rename paper-server/patches/sources/net/minecraft/world/entity/item/{EntityTNTPrimed.patch => PrimedTnt.java.patch} (62%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/AbstractSkeleton.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/Bogged.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/Bogged.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/CaveSpider.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/monster/{EntityCreeper.patch => Creeper.java.patch} (58%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/ElderGuardian.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/monster/{EntityEnderman.patch => EnderMan.java.patch} (54%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/Endermite.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/EntityCaveSpider.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/EntityEndermite.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/EntityGuardian.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/EntityGuardianElder.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/EntityIllagerIllusioner.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/EntityIllagerWizard.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/EntityPhantom.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/EntityPillager.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/EntitySkeletonAbstract.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/EntitySkeletonWither.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/EntitySpider.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/EntityVex.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/EntityZombie.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/EntityZombieHusk.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/EntityZombieVillager.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/monster/{EntityEvoker.patch => Evoker.java.patch} (73%)
 rename paper-server/patches/sources/net/minecraft/world/entity/monster/{EntityGhast.patch => Ghast.java.patch} (64%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/Guardian.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/Husk.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/Illusioner.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/Phantom.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/Pillager.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/monster/{EntityRavager.patch => Ravager.java.patch} (59%)
 rename paper-server/patches/sources/net/minecraft/world/entity/monster/{EntityShulker.patch => Shulker.java.patch} (70%)
 rename paper-server/patches/sources/net/minecraft/world/entity/monster/{EntitySilverfish.patch => Silverfish.java.patch} (62%)
 rename paper-server/patches/sources/net/minecraft/world/entity/monster/{EntitySkeleton.patch => Skeleton.java.patch} (55%)
 rename paper-server/patches/sources/net/minecraft/world/entity/monster/{EntitySlime.patch => Slime.java.patch} (69%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/SpellcasterIllager.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/Spider.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/monster/{EntityStrider.patch => Strider.java.patch} (81%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/Vex.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/monster/{EntityWitch.patch => Witch.java.patch} (82%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/WitherSkeleton.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/Zombie.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/ZombieVillager.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/monster/{EntityPigZombie.patch => ZombifiedPiglin.java.patch} (56%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/breeze/Breeze.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/breeze/Breeze.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/monster/creaking/{Creaking.patch => Creaking.java.patch} (55%)
 rename paper-server/patches/sources/net/minecraft/world/entity/monster/hoglin/{EntityHoglin.patch => Hoglin.java.patch} (68%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/EntityPiglin.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/EntityPiglinAbstract.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/Piglin.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/PiglinAI.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/PiglinAi.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/warden/Warden.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/monster/warden/Warden.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/npc/AbstractVillager.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/npc/EntityVillager.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/npc/EntityVillagerAbstract.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/npc/{InventoryCarrier.patch => InventoryCarrier.java.patch} (61%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/npc/MobSpawnerTrader.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/npc/Villager.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/npc/{EntityVillagerTrader.patch => WanderingTrader.java.patch} (65%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/npc/WanderingTraderSpawner.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/player/EntityHuman.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/player/{PlayerInventory.patch => Inventory.java.patch} (73%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/player/Player.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/projectile/{EntityArrow.patch => AbstractArrow.java.patch} (57%)
 rename paper-server/patches/sources/net/minecraft/world/entity/projectile/{EntityFireball.patch => AbstractHurtingProjectile.java.patch} (54%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/projectile/Arrow.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/projectile/{EntityDragonFireball.patch => DragonFireball.java.patch} (52%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityEvokerFangs.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityFireballFireball.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityLargeFireball.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityPotion.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityProjectileThrowable.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityShulkerBullet.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/projectile/EntitySnowball.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/projectile/EntitySpectralArrow.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityThrownTrident.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityTippedArrow.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/projectile/EvokerFangs.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/projectile/{EntityEnderSignal.patch => EyeOfEnder.java.patch} (52%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/projectile/Fireball.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/projectile/{EntityFireworks.patch => FireworkRocketEntity.java.patch} (60%)
 rename paper-server/patches/sources/net/minecraft/world/entity/projectile/{EntityFishingHook.patch => FishingHook.java.patch} (57%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/projectile/IProjectile.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/projectile/LargeFireball.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/projectile/{EntityLlamaSpit.patch => LlamaSpit.java.patch} (57%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/projectile/Projectile.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/projectile/ShulkerBullet.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/projectile/{EntitySmallFireball.patch => SmallFireball.java.patch} (53%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/projectile/Snowball.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/projectile/SpectralArrow.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrowableItemProjectile.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/projectile/{EntityProjectile.patch => ThrowableProjectile.java.patch} (52%)
 rename paper-server/patches/sources/net/minecraft/world/entity/projectile/{EntityEgg.patch => ThrownEgg.java.patch} (57%)
 rename paper-server/patches/sources/net/minecraft/world/entity/projectile/{EntityEnderPearl.patch => ThrownEnderpearl.java.patch} (63%)
 rename paper-server/patches/sources/net/minecraft/world/entity/projectile/{EntityThrownExpBottle.patch => ThrownExperienceBottle.java.patch} (55%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownPotion.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownTrident.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/projectile/{EntityWitherSkull.patch => WitherSkull.java.patch} (52%)
 rename paper-server/patches/sources/net/minecraft/world/entity/projectile/windcharge/{AbstractWindCharge.patch => AbstractWindCharge.java.patch} (57%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/raid/EntityRaider.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/raid/{Raid.patch => Raid.java.patch} (74%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/raid/Raider.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/raid/{PersistentRaid.patch => Raids.java.patch} (70%)
 rename paper-server/patches/sources/net/minecraft/world/entity/vehicle/{AbstractBoat.patch => AbstractBoat.java.patch} (79%)
 rename paper-server/patches/sources/net/minecraft/world/entity/vehicle/{AbstractChestBoat.patch => AbstractChestBoat.java.patch} (73%)
 rename paper-server/patches/sources/net/minecraft/world/entity/vehicle/{EntityMinecartAbstract.patch => AbstractMinecart.java.patch} (63%)
 rename paper-server/patches/sources/net/minecraft/world/entity/vehicle/{EntityMinecartContainer.patch => AbstractMinecartContainer.java.patch} (61%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/entity/vehicle/EntityMinecartCommandBlock.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/entity/vehicle/MinecartCommandBlock.java.patch
 rename paper-server/patches/sources/net/minecraft/world/entity/vehicle/{EntityMinecartTNT.patch => MinecartTNT.java.patch} (54%)
 rename paper-server/patches/sources/net/minecraft/world/entity/vehicle/{NewMinecartBehavior.patch => NewMinecartBehavior.java.patch} (76%)
 rename paper-server/patches/sources/net/minecraft/world/entity/vehicle/{OldMinecartBehavior.patch => OldMinecartBehavior.java.patch} (83%)
 rename paper-server/patches/sources/net/minecraft/world/entity/vehicle/{VehicleEntity.patch => VehicleEntity.java.patch} (82%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/food/FoodData.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/food/FoodInfo.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/food/FoodMetaData.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/food/FoodProperties.java.patch
 rename paper-server/patches/sources/net/minecraft/world/inventory/{Container.patch => AbstractContainerMenu.java.patch} (75%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/AbstractCraftingMenu.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/AbstractCraftingMenu.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/AbstractFurnaceMenu.java.patch
 rename paper-server/patches/sources/net/minecraft/world/inventory/{ContainerAnvil.patch => AnvilMenu.java.patch} (54%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/BeaconMenu.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/BrewingStandMenu.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/CartographyTableMenu.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/ChestMenu.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/ContainerAccess.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/ContainerBeacon.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/ContainerBrewingStand.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/ContainerCartography.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/ContainerChest.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/ContainerDispenser.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/ContainerFurnace.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/ContainerGrindstone.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/ContainerHopper.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/ContainerHorse.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/ContainerLectern.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/ContainerLevelAccess.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/ContainerLoom.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/ContainerMerchant.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/ContainerPlayer.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/ContainerShulkerBox.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/ContainerStonecutter.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/ContainerWorkbench.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/Containers.patch
 rename paper-server/patches/sources/net/minecraft/world/inventory/{CrafterMenu.patch => CrafterMenu.java.patch} (66%)
 rename paper-server/patches/sources/net/minecraft/world/inventory/{InventoryCrafting.patch => CraftingContainer.java.patch} (75%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/CraftingMenu.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/DispenserMenu.java.patch
 rename paper-server/patches/sources/net/minecraft/world/inventory/{ContainerEnchantTable.patch => EnchantmentMenu.java.patch} (56%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/FurnaceResultSlot.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/GrindstoneMenu.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/HopperMenu.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/HorseInventoryMenu.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/InventoryEnderChest.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/InventoryMenu.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/InventoryMerchant.patch
 rename paper-server/patches/sources/net/minecraft/world/inventory/{ContainerAnvilAbstract.patch => ItemCombinerMenu.java.patch} (61%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/LecternMenu.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/LoomMenu.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/MenuType.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/MerchantContainer.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/MerchantMenu.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/PlayerEnderChestContainer.java.patch
 rename paper-server/patches/sources/net/minecraft/world/inventory/{InventoryCraftResult.patch => ResultContainer.java.patch} (81%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/ShulkerBoxMenu.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/SlotFurnaceResult.patch
 rename paper-server/patches/sources/net/minecraft/world/inventory/{ContainerSmithing.patch => SmithingMenu.java.patch} (59%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/inventory/StonecutterMenu.java.patch
 rename paper-server/patches/sources/net/minecraft/world/inventory/{TransientCraftingContainer.patch => TransientCraftingContainer.java.patch} (56%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/ArmorStandItem.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/BlockItem.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/BoatItem.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/BoneMealItem.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/BucketItem.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/DebugStickItem.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/DyeItem.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/EggItem.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/EndCrystalItem.java.patch
 rename paper-server/patches/sources/net/minecraft/world/item/{ItemEnderEye.patch => EnderEyeItem.java.patch} (53%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/EnderpearlItem.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/FireChargeItem.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/FishingRodItem.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/FlintAndSteelItem.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/HangingEntityItem.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/ItemArmorStand.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/ItemBlock.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/ItemBlockWallable.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/ItemBoat.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/ItemBoneMeal.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/ItemBucket.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/ItemDebugStick.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/ItemDye.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/ItemEgg.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/ItemEndCrystal.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/ItemEnderPearl.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/ItemFireball.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/ItemFishingRod.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/ItemFlintAndSteel.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/ItemHanging.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/ItemMinecart.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/ItemMonsterEgg.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/ItemProjectileWeapon.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/ItemSign.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/ItemSnowball.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/ItemStack.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/ItemStack.patch
 rename paper-server/patches/sources/net/minecraft/world/item/{ItemLeash.patch => LeadItem.java.patch} (52%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/MinecartItem.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/ProjectileWeaponItem.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/SignItem.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/SnowballItem.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/SpawnEggItem.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/StandingAndWallBlockItem.java.patch
 rename paper-server/patches/sources/net/minecraft/world/item/{ItemTrident.patch => TridentItem.java.patch} (54%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/alchemy/PotionContents.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/alchemy/PotionContents.patch
 rename paper-server/patches/sources/net/minecraft/world/item/component/{Consumable.patch => Consumable.java.patch} (63%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/component/ConsumableListener.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/component/ConsumableListener.patch
 rename paper-server/patches/sources/net/minecraft/world/item/component/{DeathProtection.patch => DeathProtection.java.patch} (76%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/component/SuspiciousStewEffects.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/component/SuspiciousStewEffects.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/consume_effects/ApplyStatusEffectsConsumeEffect.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/consume_effects/ApplyStatusEffectsConsumeEffect.patch
 rename paper-server/patches/sources/net/minecraft/world/item/consume_effects/{ClearAllStatusEffectsConsumeEffect.patch => ClearAllStatusEffectsConsumeEffect.java.patch} (54%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/consume_effects/ConsumeEffect.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/consume_effects/ConsumeEffect.patch
 rename paper-server/patches/sources/net/minecraft/world/item/consume_effects/{RemoveStatusEffectsConsumeEffect.patch => RemoveStatusEffectsConsumeEffect.java.patch} (53%)
 rename paper-server/patches/sources/net/minecraft/world/item/consume_effects/{TeleportRandomlyConsumeEffect.patch => TeleportRandomlyConsumeEffect.java.patch} (56%)
 rename paper-server/patches/sources/net/minecraft/world/item/crafting/{RecipeBlasting.patch => BlastingRecipe.java.patch} (74%)
 rename paper-server/patches/sources/net/minecraft/world/item/crafting/{RecipeCampfire.patch => CampfireCookingRecipe.java.patch} (73%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/crafting/CraftingManager.patch
 rename paper-server/patches/sources/net/minecraft/world/item/crafting/{IRecipeComplex.patch => CustomRecipe.java.patch} (59%)
 rename paper-server/patches/sources/net/minecraft/world/item/crafting/{RecipeItemStack.patch => Ingredient.java.patch} (61%)
 rename paper-server/patches/sources/net/minecraft/world/item/crafting/{IRecipe.patch => Recipe.java.patch} (61%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeHolder.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeHolder.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeManager.java.patch
 rename paper-server/patches/sources/net/minecraft/world/item/crafting/{RecipeMap.patch => RecipeMap.java.patch} (66%)
 rename paper-server/patches/sources/net/minecraft/world/item/crafting/{ShapedRecipes.patch => ShapedRecipe.java.patch} (80%)
 rename paper-server/patches/sources/net/minecraft/world/item/crafting/{ShapelessRecipes.patch => ShapelessRecipe.java.patch} (65%)
 rename paper-server/patches/sources/net/minecraft/world/item/crafting/{FurnaceRecipe.patch => SmeltingRecipe.java.patch} (74%)
 rename paper-server/patches/sources/net/minecraft/world/item/crafting/{SmithingTransformRecipe.patch => SmithingTransformRecipe.java.patch} (73%)
 rename paper-server/patches/sources/net/minecraft/world/item/crafting/{SmithingTrimRecipe.patch => SmithingTrimRecipe.java.patch} (78%)
 rename paper-server/patches/sources/net/minecraft/world/item/crafting/{RecipeSmoking.patch => SmokingRecipe.java.patch} (75%)
 rename paper-server/patches/sources/net/minecraft/world/item/crafting/{RecipeStonecutting.patch => StonecutterRecipe.java.patch} (77%)
 rename paper-server/patches/sources/net/minecraft/world/item/crafting/{TransmuteRecipe.patch => TransmuteRecipe.java.patch} (74%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/ApplyMobEffect.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/ApplyMobEffect.patch
 rename paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/{Ignite.patch => Ignite.java.patch} (56%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/ReplaceBlock.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/ReplaceBlock.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/ReplaceDisk.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/ReplaceDisk.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/trading/IMerchant.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/trading/Merchant.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/item/trading/MerchantOffer.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/item/trading/MerchantRecipe.patch
 rename paper-server/patches/sources/net/minecraft/world/level/{CommandBlockListenerAbstract.patch => BaseCommandBlock.java.patch} (63%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/BaseSpawner.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/BlockGetter.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/ClipContext.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/GameRules.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/GameRules.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/GeneratorAccess.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/IBlockAccess.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/Level.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/LevelAccessor.java.patch
 rename paper-server/patches/sources/net/minecraft/world/level/{IWorldWriter.patch => LevelWriter.java.patch} (75%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/MobSpawnerAbstract.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/NaturalSpawner.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/RayTrace.patch
 rename paper-server/patches/sources/net/minecraft/world/level/{ServerExplosion.patch => ServerExplosion.java.patch} (58%)
 rename paper-server/patches/sources/net/minecraft/world/level/{WorldAccess.patch => ServerLevelAccessor.java.patch} (72%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/SpawnerCreature.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/World.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/AbstractCandleBlock.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/AbstractCandleBlock.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BambooSaplingBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BambooStalkBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BaseFireBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BasePressurePlateBlock.java.patch
 rename paper-server/patches/sources/net/minecraft/world/level/block/{BlockBed.patch => BedBlock.java.patch} (50%)
 rename paper-server/patches/sources/net/minecraft/world/level/block/{BlockBeehive.patch => BeehiveBlock.java.patch} (50%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BellBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BigDripleafBlock.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BigDripleafBlock.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/Block.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/Block.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockBamboo.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockBambooSapling.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockBell.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockButtonAbstract.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockCactus.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockCake.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockCampfire.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockCauldron.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockChest.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockChorusFlower.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockCocoa.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockCommand.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockComposter.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockConcretePowder.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockCoral.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockCoralFan.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockCoralFanWall.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockCoralPlant.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockCrops.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockDaylightDetector.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockDiodeAbstract.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockDirtSnowSpreadable.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockDispenser.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockDoor.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockDropper.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockEndGateway.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockFenceGate.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockFire.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockFireAbstract.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockFluids.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockFungi.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockGrassPath.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockGrowingTop.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockIce.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockLeaves.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockLectern.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockLever.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockMagma.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockMobSpawner.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockMonsterEggs.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockMushroom.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockNetherWart.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockNote.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockNylium.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockObserver.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockPlant.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockPortal.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockPoweredRail.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockPressurePlateAbstract.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockPressurePlateWeighted.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockPumpkinCarved.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockRedstoneComparator.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockRedstoneLamp.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockRedstoneOre.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockRedstoneTorch.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockReed.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockRespawnAnchor.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockSapling.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockScaffolding.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockSign.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockSnow.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockSoil.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockStem.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockSweetBerryBush.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockTNT.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockTallPlant.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockTrapdoor.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockTripwireHook.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockTurtleEgg.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockVine.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BlockWaterLily.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BuddingAmethystBlock.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BuddingAmethystBlock.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/BushBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/ButtonBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/CactusBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/CakeBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/CampfireBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/CauldronBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/CaveVines.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/CaveVines.patch
 rename paper-server/patches/sources/net/minecraft/world/level/block/{CeilingHangingSignBlock.patch => CeilingHangingSignBlock.java.patch} (51%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/ChangeOverTimeBlock.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/ChangeOverTimeBlock.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/ChestBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/ChorusFlowerBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/CocoaBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/CommandBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/ComparatorBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/ComposterBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/ConcretePowderBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/CoralBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/CoralFanBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/CoralPlantBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/CoralWallFanBlock.java.patch
 rename paper-server/patches/sources/net/minecraft/world/level/block/{CrafterBlock.patch => CrafterBlock.java.patch} (57%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/CropBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/DaylightDetectorBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/DecoratedPotBlock.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/DecoratedPotBlock.patch
 rename paper-server/patches/sources/net/minecraft/world/level/block/{BlockMinecartDetector.patch => DetectorRailBlock.java.patch} (50%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/DiodeBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/DirtPathBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/DispenserBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/DoorBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/DoublePlantBlock.java.patch
 rename paper-server/patches/sources/net/minecraft/world/level/block/{BlockDragonEgg.patch => DragonEggBlock.java.patch} (53%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/DropExperienceBlock.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/DropExperienceBlock.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/DropperBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/EndGatewayBlock.java.patch
 rename paper-server/patches/sources/net/minecraft/world/level/block/{BlockEnderPortal.patch => EndPortalBlock.java.patch} (53%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/FarmBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/FenceGateBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/FireBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/FungusBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/GrowingPlantHeadBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/IceBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/InfestedBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/LayeredCauldronBlock.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/LayeredCauldronBlock.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/LeavesBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/LecternBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/LeverBlock.java.patch
 rename paper-server/patches/sources/net/minecraft/world/level/block/{LightningRodBlock.patch => LightningRodBlock.java.patch} (58%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/LiquidBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/MagmaBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/MultifaceSpreader.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/MultifaceSpreader.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/MushroomBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/NetherPortalBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/NetherWartBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/NoteBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/NyliumBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/ObserverBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/PointedDripstoneBlock.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/PointedDripstoneBlock.patch
 rename paper-server/patches/sources/net/minecraft/world/level/block/{PowderSnowBlock.patch => PowderSnowBlock.java.patch} (52%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/PoweredRailBlock.java.patch
 rename paper-server/patches/sources/net/minecraft/world/level/block/{BlockPressurePlateBinary.patch => PressurePlateBlock.java.patch} (50%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/RedStoneOreBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/RedstoneLampBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/RedstoneTorchBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/RespawnAnchorBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/RootedDirtBlock.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/RootedDirtBlock.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/SaplingBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/ScaffoldingBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/SculkBlock.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/SculkBlock.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/SculkCatalystBlock.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/SculkCatalystBlock.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/SculkSensorBlock.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/SculkSensorBlock.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/SculkShriekerBlock.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/SculkShriekerBlock.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/SculkSpreader.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/SculkSpreader.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/SculkVeinBlock.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/SculkVeinBlock.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/SignBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/SnowLayerBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/SpawnerBlock.java.patch
 rename paper-server/patches/sources/net/minecraft/world/level/block/{BlockSponge.patch => SpongeBlock.java.patch} (54%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/StemBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/SugarCaneBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/SweetBerryBushBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/TntBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/TrapDoorBlock.java.patch
 rename paper-server/patches/sources/net/minecraft/world/level/block/{BlockTripwire.patch => TripWireBlock.java.patch} (61%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/TripWireHookBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/TurtleEggBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/VineBlock.java.patch
 rename paper-server/patches/sources/net/minecraft/world/level/block/{WallHangingSignBlock.patch => WallHangingSignBlock.java.patch} (51%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/WaterlilyBlock.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/WeightedPressurePlateBlock.java.patch
 rename paper-server/patches/sources/net/minecraft/world/level/block/{BlockWitherRose.patch => WitherRoseBlock.java.patch} (57%)
 rename paper-server/patches/sources/net/minecraft/world/level/block/{BlockWitherSkull.patch => WitherSkullBlock.java.patch} (57%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/BannerBlockEntity.java.patch
 rename paper-server/patches/sources/net/minecraft/world/level/block/entity/{TileEntityBarrel.patch => BarrelBlockEntity.java.patch} (62%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/BeaconBlockEntity.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java.patch
 rename paper-server/patches/sources/net/minecraft/world/level/block/entity/{TileEntityBell.patch => BellBlockEntity.java.patch} (57%)
 rename paper-server/patches/sources/net/minecraft/world/level/block/entity/{TileEntity.patch => BlockEntity.java.patch} (51%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/BlockEntityType.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java.patch
 rename paper-server/patches/sources/net/minecraft/world/level/block/entity/{BrushableBlockEntity.patch => BrushableBlockEntity.java.patch} (64%)
 rename paper-server/patches/sources/net/minecraft/world/level/block/entity/{TileEntityCampfire.patch => CampfireBlockEntity.java.patch} (55%)
 rename paper-server/patches/sources/net/minecraft/world/level/block/entity/{TileEntityChest.patch => ChestBlockEntity.java.patch} (53%)
 rename paper-server/patches/sources/net/minecraft/world/level/block/entity/{ChiseledBookShelfBlockEntity.patch => ChiseledBookShelfBlockEntity.java.patch} (54%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/CommandBlockEntity.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/ConduitBlockEntity.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/ContainerOpenersCounter.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/ContainerOpenersCounter.patch
 rename paper-server/patches/sources/net/minecraft/world/level/block/entity/{CrafterBlockEntity.patch => CrafterBlockEntity.java.patch} (59%)
 rename paper-server/patches/sources/net/minecraft/world/level/block/entity/{DecoratedPotBlockEntity.patch => DecoratedPotBlockEntity.java.patch} (76%)
 rename paper-server/patches/sources/net/minecraft/world/level/block/entity/{TileEntityDispenser.patch => DispenserBlockEntity.java.patch} (58%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/HopperBlockEntity.java.patch
 rename paper-server/patches/sources/net/minecraft/world/level/block/entity/{TileEntityJukeBox.patch => JukeboxBlockEntity.java.patch} (63%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/LecternBlockEntity.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/SignBlockEntity.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityBanner.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityBeacon.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityBeehive.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityBrewingStand.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityCommand.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityConduit.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityContainer.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityEndGateway.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityFurnace.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityHopper.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityLectern.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityShulkerBox.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntitySign.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityTypes.patch
 rename paper-server/patches/sources/net/minecraft/world/level/block/entity/trialspawner/{TrialSpawner.patch => TrialSpawner.java.patch} (71%)
 rename paper-server/patches/sources/net/minecraft/world/level/block/entity/trialspawner/{TrialSpawnerData.patch => TrialSpawnerData.java.patch} (69%)
 rename paper-server/patches/sources/net/minecraft/world/level/block/entity/vault/{VaultBlockEntity.patch => VaultBlockEntity.java.patch} (70%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/grower/TreeGrower.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/grower/WorldGenTreeProvider.patch
 rename paper-server/patches/sources/net/minecraft/world/level/block/piston/{BlockPiston.patch => PistonBaseBlock.java.patch} (65%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/state/BlockBase.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/block/state/BlockBehaviour.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/border/WorldBorder.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/border/WorldBorder.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/chunk/Chunk.patch
 rename paper-server/patches/sources/net/minecraft/world/level/chunk/{IChunkAccess.patch => ChunkAccess.java.patch} (59%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/chunk/ChunkGenerator.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/chunk/ChunkGenerator.patch
 rename paper-server/patches/sources/net/minecraft/world/level/chunk/{ChunkGeneratorStructureState.patch => ChunkGeneratorStructureState.java.patch} (100%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/chunk/ChunkSection.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/chunk/DataLayer.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/chunk/LevelChunk.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/chunk/LevelChunkSection.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/chunk/NibbleArray.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/chunk/status/ChunkStatusTasks.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/chunk/storage/ChunkStorage.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/chunk/storage/IChunkLoader.patch
 rename paper-server/patches/sources/net/minecraft/world/level/chunk/storage/{RegionFile.patch => RegionFile.java.patch} (89%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/chunk/storage/RegionFileCache.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/chunk/storage/RegionFileStorage.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/chunk/storage/SerializableChunkData.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/chunk/storage/SerializableChunkData.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/dimension/end/DragonRespawnAnimation.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/dimension/end/EndDragonFight.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/dimension/end/EnderDragonBattle.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/dimension/end/EnumDragonRespawn.patch
 rename paper-server/patches/sources/net/minecraft/world/level/entity/{EntityAccess.patch => EntityAccess.java.patch} (71%)
 rename paper-server/patches/sources/net/minecraft/world/level/entity/{PersistentEntitySectionManager.patch => PersistentEntitySectionManager.java.patch} (52%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/gameevent/GameEventDispatcher.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/gameevent/GameEventDispatcher.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/ChunkGeneratorAbstract.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/ChunkProviderFlat.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/FlatLevelSource.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/MobSpawnerPatrol.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/MobSpawnerPhantom.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/PatrolSpawner.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/PhantomSpawner.java.patch
 rename paper-server/patches/sources/net/minecraft/world/level/levelgen/feature/{EndPlatformFeature.patch => EndPlatformFeature.java.patch} (60%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/LegacyStructureDataHandler.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/PersistentStructureLegacy.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/StructurePiece.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/StructurePiece.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/StructureStart.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/StructureStart.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/DesertPyramidStructure.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/DesertPyramidStructure.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/EndCityPieces.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/EndCityPieces.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/IglooPieces.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/IglooPieces.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/MineshaftPieces.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/MineshaftPieces.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/NetherFortressPieces.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/NetherFortressPieces.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/OceanRuinPieces.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/OceanRuinPieces.patch
 rename paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/{ShipwreckPieces.patch => ShipwreckPieces.java.patch} (63%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/StrongholdPieces.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/StrongholdPieces.patch
 rename paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/{SwampHutPiece.patch => SwampHutPiece.java.patch} (51%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructure.patch
 rename paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/templatesystem/{DefinedStructureInfo.patch => StructurePlaceSettings.java.patch} (77%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/material/FlowingFluid.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/material/FluidTypeFlowing.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/material/FluidTypeLava.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/material/LavaFluid.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/portal/BlockPortalShape.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/portal/PortalForcer.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/portal/PortalShape.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/portal/PortalTravelAgent.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/portal/TeleportTransition.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/portal/TeleportTransition.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/redstone/DefaultRedstoneWireEvaluator.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/redstone/DefaultRedstoneWireEvaluator.patch
 rename paper-server/patches/sources/net/minecraft/world/level/redstone/{ExperimentalRedstoneWireEvaluator.patch => ExperimentalRedstoneWireEvaluator.java.patch} (62%)
 rename paper-server/patches/sources/net/minecraft/world/level/redstone/{NeighborUpdater.patch => NeighborUpdater.java.patch} (54%)
 rename paper-server/patches/sources/net/minecraft/world/level/saveddata/maps/{WorldMap.patch => MapItemSavedData.java.patch} (50%)
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/storage/Convertable.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/storage/LevelStorageSource.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/storage/PlayerDataStorage.java.patch
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/storage/PrimaryLevelData.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/storage/WorldDataServer.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/storage/WorldNBTStorage.patch
 rename paper-server/patches/sources/net/minecraft/world/level/storage/loot/{LootDataType.patch => LootDataType.java.patch} (83%)
 create mode 100644 paper-server/patches/sources/net/minecraft/world/level/storage/loot/LootTable.java.patch
 delete mode 100644 paper-server/patches/sources/net/minecraft/world/level/storage/loot/LootTable.patch
 rename paper-server/patches/sources/net/minecraft/world/level/storage/loot/predicates/{LootItemConditionSurvivesExplosion.patch => ExplosionCondition.java.patch} (67%)

diff --git a/paper-server/patches/sources/com/mojang/brigadier/tree/CommandNode.java.patch b/paper-server/patches/sources/com/mojang/brigadier/tree/CommandNode.java.patch
index bb35aa4fcd..b32b0b0672 100644
--- a/paper-server/patches/sources/com/mojang/brigadier/tree/CommandNode.java.patch
+++ b/paper-server/patches/sources/com/mojang/brigadier/tree/CommandNode.java.patch
@@ -8,45 +8,44 @@
  import com.mojang.brigadier.AmbiguityConsumer;
  import com.mojang.brigadier.Command;
  import com.mojang.brigadier.RedirectModifier;
-@@ -23,6 +24,8 @@
+@@ -22,6 +23,7 @@
+ import java.util.Set;
  import java.util.concurrent.CompletableFuture;
  import java.util.function.Predicate;
++import net.minecraft.commands.CommandSourceStack;
  
-+import net.minecraft.commands.CommandListenerWrapper; // CraftBukkit
-+
  public abstract class CommandNode<S> implements Comparable<CommandNode<S>> {
      private final Map<String, CommandNode<S>> children = new LinkedHashMap<>();
-     private final Map<String, LiteralCommandNode<S>> literals = new LinkedHashMap<>();
-@@ -32,6 +35,13 @@
+@@ -32,6 +34,13 @@
      private final RedirectModifier<S> modifier;
      private final boolean forks;
      private Command<S> command;
 +    // CraftBukkit start
 +    public void removeCommand(String name) {
-+        children.remove(name);
-+        literals.remove(name);
-+        arguments.remove(name);
++        this.children.remove(name);
++        this.literals.remove(name);
++        this.arguments.remove(name);
 +    }
 +    // CraftBukkit end
  
      protected CommandNode(final Command<S> command, final Predicate<S> requirement, final CommandNode<S> redirect, final RedirectModifier<S> modifier, final boolean forks) {
          this.command = command;
-@@ -61,7 +71,17 @@
-         return modifier;
+@@ -61,7 +70,17 @@
+         return this.modifier;
      }
  
 -    public boolean canUse(final S source) {
 +    // CraftBukkit start
 +    public synchronized boolean canUse(final S source) {
-+        if (source instanceof CommandListenerWrapper) {
++        if (source instanceof CommandSourceStack) {
 +            try {
-+                ((CommandListenerWrapper) source).currentCommand = this;
-+                return requirement.test(source);
++                ((CommandSourceStack) source).currentCommand = this;
++                return this.requirement.test(source);
 +            } finally {
-+                ((CommandListenerWrapper) source).currentCommand = null;
++                ((CommandSourceStack) source).currentCommand = null;
 +            }
 +        }
 +        // CraftBukkit end
-         return requirement.test(source);
+         return this.requirement.test(source);
      }
  
diff --git a/paper-server/patches/sources/net/minecraft/CrashReport.patch b/paper-server/patches/sources/net/minecraft/CrashReport.java.patch
similarity index 67%
rename from paper-server/patches/sources/net/minecraft/CrashReport.patch
rename to paper-server/patches/sources/net/minecraft/CrashReport.java.patch
index 0c5cb0b08e..3c5566c233 100644
--- a/paper-server/patches/sources/net/minecraft/CrashReport.patch
+++ b/paper-server/patches/sources/net/minecraft/CrashReport.java.patch
@@ -1,9 +1,9 @@
 --- a/net/minecraft/CrashReport.java
 +++ b/net/minecraft/CrashReport.java
 @@ -36,6 +36,7 @@
-     public CrashReport(String s, Throwable throwable) {
-         this.title = s;
-         this.exception = throwable;
+     public CrashReport(String message, Throwable cause) {
+         this.title = message;
+         this.exception = cause;
 +        this.systemReport.setDetail("CraftBukkit Information", new org.bukkit.craftbukkit.CraftCrashReport()); // CraftBukkit
      }
  
diff --git a/paper-server/patches/sources/net/minecraft/advancements/AdvancementHolder.patch b/paper-server/patches/sources/net/minecraft/advancements/AdvancementHolder.java.patch
similarity index 58%
rename from paper-server/patches/sources/net/minecraft/advancements/AdvancementHolder.patch
rename to paper-server/patches/sources/net/minecraft/advancements/AdvancementHolder.java.patch
index 1b57fcdb4a..d41639df88 100644
--- a/paper-server/patches/sources/net/minecraft/advancements/AdvancementHolder.patch
+++ b/paper-server/patches/sources/net/minecraft/advancements/AdvancementHolder.java.patch
@@ -1,18 +1,17 @@
 --- a/net/minecraft/advancements/AdvancementHolder.java
 +++ b/net/minecraft/advancements/AdvancementHolder.java
-@@ -6,6 +6,11 @@
+@@ -5,6 +5,10 @@
+ import net.minecraft.network.codec.ByteBufCodecs;
  import net.minecraft.network.codec.StreamCodec;
- import net.minecraft.resources.MinecraftKey;
- 
+ import net.minecraft.resources.ResourceLocation;
 +// CraftBukkit start
 +import org.bukkit.craftbukkit.advancement.CraftAdvancement;
 +import org.bukkit.craftbukkit.util.CraftNamespacedKey;
 +// CraftBukkit end
-+
- public record AdvancementHolder(MinecraftKey id, Advancement value) {
  
-     public static final StreamCodec<RegistryFriendlyByteBuf, AdvancementHolder> STREAM_CODEC = StreamCodec.composite(MinecraftKey.STREAM_CODEC, AdvancementHolder::id, Advancement.STREAM_CODEC, AdvancementHolder::value, AdvancementHolder::new);
-@@ -38,4 +43,10 @@
+ public record AdvancementHolder(ResourceLocation id, Advancement value) {
+ 
+@@ -38,4 +42,10 @@
      public String toString() {
          return this.id.toString();
      }
diff --git a/paper-server/patches/sources/net/minecraft/advancements/AdvancementTree.patch b/paper-server/patches/sources/net/minecraft/advancements/AdvancementTree.java.patch
similarity index 84%
rename from paper-server/patches/sources/net/minecraft/advancements/AdvancementTree.patch
rename to paper-server/patches/sources/net/minecraft/advancements/AdvancementTree.java.patch
index a09551dbaa..0dbb25d0a6 100644
--- a/paper-server/patches/sources/net/minecraft/advancements/AdvancementTree.patch
+++ b/paper-server/patches/sources/net/minecraft/advancements/AdvancementTree.java.patch
@@ -8,4 +8,4 @@
 +        // AdvancementTree.LOGGER.info("Loaded {} advancements", this.nodes.size()); // CraftBukkit - moved to AdvancementDataWorld#reload
      }
  
-     private boolean tryInsert(AdvancementHolder advancementholder) {
+     private boolean tryInsert(AdvancementHolder advancement) {
diff --git a/paper-server/patches/sources/net/minecraft/commands/CommandDispatcher.patch b/paper-server/patches/sources/net/minecraft/commands/CommandDispatcher.patch
deleted file mode 100644
index 8f5612fb5d..0000000000
--- a/paper-server/patches/sources/net/minecraft/commands/CommandDispatcher.patch
+++ /dev/null
@@ -1,197 +0,0 @@
---- a/net/minecraft/commands/CommandDispatcher.java
-+++ b/net/minecraft/commands/CommandDispatcher.java
-@@ -139,6 +139,14 @@
- import net.minecraft.world.level.GameRules;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import com.google.common.base.Joiner;
-+import java.util.Collection;
-+import java.util.LinkedHashSet;
-+import org.bukkit.event.player.PlayerCommandSendEvent;
-+import org.bukkit.event.server.ServerCommandEvent;
-+// CraftBukkit end
-+
- public class CommandDispatcher {
- 
-     private static final ThreadLocal<ExecutionContext<CommandListenerWrapper>> CURRENT_EXECUTION_CONTEXT = new ThreadLocal();
-@@ -151,6 +159,7 @@
-     private final com.mojang.brigadier.CommandDispatcher<CommandListenerWrapper> dispatcher = new com.mojang.brigadier.CommandDispatcher();
- 
-     public CommandDispatcher(CommandDispatcher.ServerType commanddispatcher_servertype, CommandBuildContext commandbuildcontext) {
-+        this(); // CraftBukkit
-         CommandAdvancement.register(this.dispatcher);
-         CommandAttribute.register(this.dispatcher, commandbuildcontext);
-         CommandExecute.register(this.dispatcher, commandbuildcontext);
-@@ -252,6 +261,11 @@
-             CommandPublish.register(this.dispatcher);
-         }
- 
-+        // CraftBukkit start
-+    }
-+
-+    public CommandDispatcher() {
-+        // CraftBukkkit end
-         this.dispatcher.setConsumer(ExecutionCommandSource.resultConsumer());
-     }
- 
-@@ -262,18 +276,65 @@
-         return new ParseResults(commandcontextbuilder1, parseresults.getReader(), parseresults.getExceptions());
-     }
- 
-+    // CraftBukkit start
-+    public void dispatchServerCommand(CommandListenerWrapper sender, String command) {
-+        Joiner joiner = Joiner.on(" ");
-+        if (command.startsWith("/")) {
-+            command = command.substring(1);
-+        }
-+
-+        ServerCommandEvent event = new ServerCommandEvent(sender.getBukkitSender(), command);
-+        org.bukkit.Bukkit.getPluginManager().callEvent(event);
-+        if (event.isCancelled()) {
-+            return;
-+        }
-+        command = event.getCommand();
-+
-+        String[] args = command.split(" ");
-+
-+        String cmd = args[0];
-+        if (cmd.startsWith("minecraft:")) cmd = cmd.substring("minecraft:".length());
-+        if (cmd.startsWith("bukkit:")) cmd = cmd.substring("bukkit:".length());
-+
-+        // Block disallowed commands
-+        if (cmd.equalsIgnoreCase("stop") || cmd.equalsIgnoreCase("kick") || cmd.equalsIgnoreCase("op")
-+                || cmd.equalsIgnoreCase("deop") || cmd.equalsIgnoreCase("ban") || cmd.equalsIgnoreCase("ban-ip")
-+                || cmd.equalsIgnoreCase("pardon") || cmd.equalsIgnoreCase("pardon-ip") || cmd.equalsIgnoreCase("reload")) {
-+            return;
-+        }
-+
-+        // Handle vanilla commands;
-+        if (sender.getLevel().getCraftServer().getCommandBlockOverride(args[0])) {
-+            args[0] = "minecraft:" + args[0];
-+        }
-+
-+        String newCommand = joiner.join(args);
-+        this.performPrefixedCommand(sender, newCommand, newCommand);
-+    }
-+    // CraftBukkit end
-+
-     public void performPrefixedCommand(CommandListenerWrapper commandlistenerwrapper, String s) {
-+        // CraftBukkit start
-+        this.performPrefixedCommand(commandlistenerwrapper, s, s);
-+    }
-+
-+    public void performPrefixedCommand(CommandListenerWrapper commandlistenerwrapper, String s, String label) {
-         s = s.startsWith("/") ? s.substring(1) : s;
--        this.performCommand(this.dispatcher.parse(s, commandlistenerwrapper), s);
-+        this.performCommand(this.dispatcher.parse(s, commandlistenerwrapper), s, label);
-+        // CraftBukkit end
-     }
- 
-     public void performCommand(ParseResults<CommandListenerWrapper> parseresults, String s) {
-+        this.performCommand(parseresults, s, s);
-+    }
-+
-+    public void performCommand(ParseResults<CommandListenerWrapper> parseresults, String s, String label) { // CraftBukkit
-         CommandListenerWrapper commandlistenerwrapper = (CommandListenerWrapper) parseresults.getContext().getSource();
- 
-         Profiler.get().push(() -> {
-             return "/" + s;
-         });
--        ContextChain<CommandListenerWrapper> contextchain = finishParsing(parseresults, s, commandlistenerwrapper);
-+        ContextChain<CommandListenerWrapper> contextchain = finishParsing(parseresults, s, commandlistenerwrapper, label); // CraftBukkit
- 
-         try {
-             if (contextchain != null) {
-@@ -307,7 +368,7 @@
-     }
- 
-     @Nullable
--    private static ContextChain<CommandListenerWrapper> finishParsing(ParseResults<CommandListenerWrapper> parseresults, String s, CommandListenerWrapper commandlistenerwrapper) {
-+    private static ContextChain<CommandListenerWrapper> finishParsing(ParseResults<CommandListenerWrapper> parseresults, String s, CommandListenerWrapper commandlistenerwrapper, String label) { // CraftBukkit
-         try {
-             validateParseResults(parseresults);
-             return (ContextChain) ContextChain.tryFlatten(parseresults.getContext().build(s)).orElseThrow(() -> {
-@@ -318,7 +379,7 @@
-             if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) {
-                 int i = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor());
-                 IChatMutableComponent ichatmutablecomponent = IChatBaseComponent.empty().withStyle(EnumChatFormat.GRAY).withStyle((chatmodifier) -> {
--                    return chatmodifier.withClickEvent(new ChatClickable(ChatClickable.EnumClickAction.SUGGEST_COMMAND, "/" + s));
-+                    return chatmodifier.withClickEvent(new ChatClickable(ChatClickable.EnumClickAction.SUGGEST_COMMAND, label)); // CraftBukkit
-                 });
- 
-                 if (i > 10) {
-@@ -368,7 +429,7 @@
- 
-                 executioncontext1.close();
-             } finally {
--                CommandDispatcher.CURRENT_EXECUTION_CONTEXT.set((Object) null);
-+                CommandDispatcher.CURRENT_EXECUTION_CONTEXT.set(null); // CraftBukkit - decompile error
-             }
-         } else {
-             consumer.accept(executioncontext);
-@@ -377,11 +438,36 @@
-     }
- 
-     public void sendCommands(EntityPlayer entityplayer) {
--        Map<CommandNode<CommandListenerWrapper>, CommandNode<ICompletionProvider>> map = Maps.newHashMap();
-+        // CraftBukkit start
-+        // Register Vanilla commands into builtRoot as before
-+        Map<CommandNode<CommandListenerWrapper>, CommandNode<ICompletionProvider>> map = Maps.newIdentityHashMap(); // Use identity to prevent aliasing issues
-+        RootCommandNode vanillaRoot = new RootCommandNode();
-+
-+        RootCommandNode<CommandListenerWrapper> vanilla = entityplayer.server.vanillaCommandDispatcher.getDispatcher().getRoot();
-+        map.put(vanilla, vanillaRoot);
-+        this.fillUsableCommands(vanilla, vanillaRoot, entityplayer.createCommandSourceStack(), (Map) map);
-+
-+        // Now build the global commands in a second pass
-         RootCommandNode<ICompletionProvider> rootcommandnode = new RootCommandNode();
- 
-         map.put(this.dispatcher.getRoot(), rootcommandnode);
-         this.fillUsableCommands(this.dispatcher.getRoot(), rootcommandnode, entityplayer.createCommandSourceStack(), map);
-+
-+        Collection<String> bukkit = new LinkedHashSet<>();
-+        for (CommandNode node : rootcommandnode.getChildren()) {
-+            bukkit.add(node.getName());
-+        }
-+
-+        PlayerCommandSendEvent event = new PlayerCommandSendEvent(entityplayer.getBukkitEntity(), new LinkedHashSet<>(bukkit));
-+        event.getPlayer().getServer().getPluginManager().callEvent(event);
-+
-+        // Remove labels that were removed during the event
-+        for (String orig : bukkit) {
-+            if (!event.getCommands().contains(orig)) {
-+                rootcommandnode.removeCommand(orig);
-+            }
-+        }
-+        // CraftBukkit end
-         entityplayer.connection.send(new PacketPlayOutCommands(rootcommandnode));
-     }
- 
-@@ -392,7 +478,7 @@
-             CommandNode<CommandListenerWrapper> commandnode2 = (CommandNode) iterator.next();
- 
-             if (commandnode2.canUse(commandlistenerwrapper)) {
--                ArgumentBuilder<ICompletionProvider, ?> argumentbuilder = commandnode2.createBuilder();
-+                ArgumentBuilder argumentbuilder = commandnode2.createBuilder(); // CraftBukkit - decompile error
- 
-                 argumentbuilder.requires((icompletionprovider) -> {
-                     return true;
-@@ -415,7 +501,7 @@
-                     argumentbuilder.redirect((CommandNode) map.get(argumentbuilder.getRedirect()));
-                 }
- 
--                CommandNode<ICompletionProvider> commandnode3 = argumentbuilder.build();
-+                CommandNode commandnode3 = argumentbuilder.build(); // CraftBukkit - decompile error
- 
-                 map.put(commandnode2, commandnode3);
-                 commandnode1.addChild(commandnode3);
-@@ -481,7 +567,7 @@
-             }
- 
-             private <T> HolderLookup.b.a<T> createLookup(final HolderLookup.b<T> holderlookup_b) {
--                return new HolderLookup.b.a<T>(this) {
-+                return new HolderLookup.b.a<T>() { // CraftBukkit - decompile error
-                     @Override
-                     public HolderLookup.b<T> parent() {
-                         return holderlookup_b;
diff --git a/paper-server/patches/sources/net/minecraft/commands/CommandListenerWrapper.patch b/paper-server/patches/sources/net/minecraft/commands/CommandListenerWrapper.patch
deleted file mode 100644
index 940733b490..0000000000
--- a/paper-server/patches/sources/net/minecraft/commands/CommandListenerWrapper.patch
+++ /dev/null
@@ -1,63 +0,0 @@
---- a/net/minecraft/commands/CommandListenerWrapper.java
-+++ b/net/minecraft/commands/CommandListenerWrapper.java
-@@ -46,6 +46,8 @@
- import net.minecraft.world.phys.Vec2F;
- import net.minecraft.world.phys.Vec3D;
- 
-+import com.mojang.brigadier.tree.CommandNode; // CraftBukkit
-+
- public class CommandListenerWrapper implements ExecutionCommandSource<CommandListenerWrapper>, ICompletionProvider {
- 
-     public static final SimpleCommandExceptionType ERROR_NOT_PLAYER = new SimpleCommandExceptionType(IChatBaseComponent.translatable("permissions.requires.player"));
-@@ -65,6 +67,7 @@
-     private final Vec2F rotation;
-     private final CommandSigningContext signingContext;
-     private final TaskChainer chatMessageChainer;
-+    public volatile CommandNode currentCommand; // CraftBukkit
- 
-     public CommandListenerWrapper(ICommandListener icommandlistener, Vec3D vec3d, Vec2F vec2f, WorldServer worldserver, int i, String s, IChatBaseComponent ichatbasecomponent, MinecraftServer minecraftserver, @Nullable Entity entity) {
-         this(icommandlistener, vec3d, vec2f, worldserver, i, s, ichatbasecomponent, minecraftserver, entity, false, CommandResultCallback.EMPTY, ArgumentAnchor.Anchor.FEET, CommandSigningContext.ANONYMOUS, TaskChainer.immediate(minecraftserver));
-@@ -171,9 +174,23 @@
- 
-     @Override
-     public boolean hasPermission(int i) {
-+        // CraftBukkit start
-+        CommandNode currentCommand = this.currentCommand;
-+        if (currentCommand != null) {
-+            return hasPermission(i, org.bukkit.craftbukkit.command.VanillaCommandWrapper.getPermission(currentCommand));
-+        }
-+        // CraftBukkit end
-+
-         return this.permissionLevel >= i;
-     }
- 
-+    // CraftBukkit start
-+    public boolean hasPermission(int i, String bukkitPermission) {
-+        // World is null when loading functions
-+        return ((getLevel() == null || !getLevel().getCraftServer().ignoreVanillaPermissions) && this.permissionLevel >= i) || getBukkitSender().hasPermission(bukkitPermission);
-+    }
-+    // CraftBukkit end
-+
-     public Vec3D getPosition() {
-         return this.worldPosition;
-     }
-@@ -302,7 +319,7 @@
-             while (iterator.hasNext()) {
-                 EntityPlayer entityplayer = (EntityPlayer) iterator.next();
- 
--                if (entityplayer.commandSource() != this.source && this.server.getPlayerList().isOp(entityplayer.getGameProfile())) {
-+                if (entityplayer.commandSource() != this.source && entityplayer.getBukkitEntity().hasPermission("minecraft.admin.command_feedback")) { // CraftBukkit
-                     entityplayer.sendSystemMessage(ichatmutablecomponent);
-                 }
-             }
-@@ -400,4 +417,10 @@
-     public boolean isSilent() {
-         return this.silent;
-     }
-+
-+    // CraftBukkit start
-+    public org.bukkit.command.CommandSender getBukkitSender() {
-+        return source.getBukkitSender(this);
-+    }
-+    // CraftBukkit end
- }
diff --git a/paper-server/patches/sources/net/minecraft/commands/ICommandListener.patch b/paper-server/patches/sources/net/minecraft/commands/CommandSource.java.patch
similarity index 58%
rename from paper-server/patches/sources/net/minecraft/commands/ICommandListener.patch
rename to paper-server/patches/sources/net/minecraft/commands/CommandSource.java.patch
index df9bb2402c..dff2434aec 100644
--- a/paper-server/patches/sources/net/minecraft/commands/ICommandListener.patch
+++ b/paper-server/patches/sources/net/minecraft/commands/CommandSource.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/commands/ICommandListener.java
-+++ b/net/minecraft/commands/ICommandListener.java
+--- a/net/minecraft/commands/CommandSource.java
++++ b/net/minecraft/commands/CommandSource.java
 @@ -22,6 +22,13 @@
          public boolean shouldInformAdmins() {
              return false;
@@ -7,17 +7,17 @@
 +
 +        // CraftBukkit start
 +        @Override
-+        public org.bukkit.command.CommandSender getBukkitSender(CommandListenerWrapper wrapper) {
++        public org.bukkit.command.CommandSender getBukkitSender(CommandSourceStack wrapper) {
 +            throw new UnsupportedOperationException("Not supported yet.");
 +        }
 +        // CraftBukkit end
      };
  
-     void sendSystemMessage(IChatBaseComponent ichatbasecomponent);
+     void sendSystemMessage(Component message);
 @@ -35,4 +42,6 @@
      default boolean alwaysAccepts() {
          return false;
      }
 +
-+    org.bukkit.command.CommandSender getBukkitSender(CommandListenerWrapper wrapper); // CraftBukkit
++    org.bukkit.command.CommandSender getBukkitSender(CommandSourceStack wrapper); // CraftBukkit
  }
diff --git a/paper-server/patches/sources/net/minecraft/commands/CommandSourceStack.java.patch b/paper-server/patches/sources/net/minecraft/commands/CommandSourceStack.java.patch
new file mode 100644
index 0000000000..cb284ec070
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/commands/CommandSourceStack.java.patch
@@ -0,0 +1,61 @@
+--- a/net/minecraft/commands/CommandSourceStack.java
++++ b/net/minecraft/commands/CommandSourceStack.java
+@@ -45,6 +45,7 @@
+ import net.minecraft.world.level.dimension.DimensionType;
+ import net.minecraft.world.phys.Vec2;
+ import net.minecraft.world.phys.Vec3;
++import com.mojang.brigadier.tree.CommandNode; // CraftBukkit
+ 
+ public class CommandSourceStack implements ExecutionCommandSource<CommandSourceStack>, SharedSuggestionProvider {
+ 
+@@ -65,6 +66,7 @@
+     private final Vec2 rotation;
+     private final CommandSigningContext signingContext;
+     private final TaskChainer chatMessageChainer;
++    public volatile CommandNode currentCommand; // CraftBukkit
+ 
+     public CommandSourceStack(CommandSource output, Vec3 pos, Vec2 rot, ServerLevel world, int level, String name, Component displayName, MinecraftServer server, @Nullable Entity entity) {
+         this(output, pos, rot, world, level, name, displayName, server, entity, false, CommandResultCallback.EMPTY, EntityAnchorArgument.Anchor.FEET, CommandSigningContext.ANONYMOUS, TaskChainer.immediate(server));
+@@ -171,8 +173,22 @@
+ 
+     @Override
+     public boolean hasPermission(int level) {
++        // CraftBukkit start
++        CommandNode currentCommand = this.currentCommand;
++        if (currentCommand != null) {
++            return this.hasPermission(level, org.bukkit.craftbukkit.command.VanillaCommandWrapper.getPermission(currentCommand));
++        }
++        // CraftBukkit end
++
+         return this.permissionLevel >= level;
++    }
++
++    // CraftBukkit start
++    public boolean hasPermission(int i, String bukkitPermission) {
++        // World is null when loading functions
++        return ((this.getLevel() == null || !this.getLevel().getCraftServer().ignoreVanillaPermissions) && this.permissionLevel >= i) || this.getBukkitSender().hasPermission(bukkitPermission);
+     }
++    // CraftBukkit end
+ 
+     public Vec3 getPosition() {
+         return this.worldPosition;
+@@ -302,7 +318,7 @@
+             while (iterator.hasNext()) {
+                 ServerPlayer entityplayer = (ServerPlayer) iterator.next();
+ 
+-                if (entityplayer.commandSource() != this.source && this.server.getPlayerList().isOp(entityplayer.getGameProfile())) {
++                if (entityplayer.commandSource() != this.source && entityplayer.getBukkitEntity().hasPermission("minecraft.admin.command_feedback")) { // CraftBukkit
+                     entityplayer.sendSystemMessage(ichatmutablecomponent);
+                 }
+             }
+@@ -400,4 +416,10 @@
+     public boolean isSilent() {
+         return this.silent;
+     }
++
++    // CraftBukkit start
++    public org.bukkit.command.CommandSender getBukkitSender() {
++        return this.source.getBukkitSender(this);
++    }
++    // CraftBukkit end
+ }
diff --git a/paper-server/patches/sources/net/minecraft/commands/Commands.java.patch b/paper-server/patches/sources/net/minecraft/commands/Commands.java.patch
new file mode 100644
index 0000000000..3acdbc697a
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/commands/Commands.java.patch
@@ -0,0 +1,240 @@
+--- a/net/minecraft/commands/Commands.java
++++ b/net/minecraft/commands/Commands.java
+@@ -138,6 +138,14 @@
+ import net.minecraft.world.flag.FeatureFlags;
+ import net.minecraft.world.level.GameRules;
+ import org.slf4j.Logger;
++
++// CraftBukkit start
++import com.google.common.base.Joiner;
++import java.util.Collection;
++import java.util.LinkedHashSet;
++import org.bukkit.event.player.PlayerCommandSendEvent;
++import org.bukkit.event.server.ServerCommandEvent;
++// CraftBukkit end
+ 
+ public class Commands {
+ 
+@@ -151,6 +159,7 @@
+     private final com.mojang.brigadier.CommandDispatcher<CommandSourceStack> dispatcher = new com.mojang.brigadier.CommandDispatcher();
+ 
+     public Commands(Commands.CommandSelection environment, CommandBuildContext commandRegistryAccess) {
++        this(); // CraftBukkit
+         AdvancementCommands.register(this.dispatcher);
+         AttributeCommand.register(this.dispatcher, commandRegistryAccess);
+         ExecuteCommand.register(this.dispatcher, commandRegistryAccess);
+@@ -252,6 +261,11 @@
+             PublishCommand.register(this.dispatcher);
+         }
+ 
++        // CraftBukkit start
++    }
++
++    public Commands() {
++        // CraftBukkkit end
+         this.dispatcher.setConsumer(ExecutionCommandSource.resultConsumer());
+     }
+ 
+@@ -262,30 +276,77 @@
+         return new ParseResults(commandcontextbuilder1, parseResults.getReader(), parseResults.getExceptions());
+     }
+ 
+-    public void performPrefixedCommand(CommandSourceStack source, String command) {
+-        command = command.startsWith("/") ? command.substring(1) : command;
+-        this.performCommand(this.dispatcher.parse(command, source), command);
++    // CraftBukkit start
++    public void dispatchServerCommand(CommandSourceStack sender, String command) {
++        Joiner joiner = Joiner.on(" ");
++        if (command.startsWith("/")) {
++            command = command.substring(1);
++        }
++
++        ServerCommandEvent event = new ServerCommandEvent(sender.getBukkitSender(), command);
++        org.bukkit.Bukkit.getPluginManager().callEvent(event);
++        if (event.isCancelled()) {
++            return;
++        }
++        command = event.getCommand();
++
++        String[] args = command.split(" ");
++
++        String cmd = args[0];
++        if (cmd.startsWith("minecraft:")) cmd = cmd.substring("minecraft:".length());
++        if (cmd.startsWith("bukkit:")) cmd = cmd.substring("bukkit:".length());
++
++        // Block disallowed commands
++        if (cmd.equalsIgnoreCase("stop") || cmd.equalsIgnoreCase("kick") || cmd.equalsIgnoreCase("op")
++                || cmd.equalsIgnoreCase("deop") || cmd.equalsIgnoreCase("ban") || cmd.equalsIgnoreCase("ban-ip")
++                || cmd.equalsIgnoreCase("pardon") || cmd.equalsIgnoreCase("pardon-ip") || cmd.equalsIgnoreCase("reload")) {
++            return;
++        }
++
++        // Handle vanilla commands;
++        if (sender.getLevel().getCraftServer().getCommandBlockOverride(args[0])) {
++            args[0] = "minecraft:" + args[0];
++        }
++
++        String newCommand = joiner.join(args);
++        this.performPrefixedCommand(sender, newCommand, newCommand);
+     }
++    // CraftBukkit end
+ 
++    public void performPrefixedCommand(CommandSourceStack source, String command) {
++        // CraftBukkit start
++        this.performPrefixedCommand(source, command, command);
++    }
++
++    public void performPrefixedCommand(CommandSourceStack commandlistenerwrapper, String s, String label) {
++        s = s.startsWith("/") ? s.substring(1) : s;
++        this.performCommand(this.dispatcher.parse(s, commandlistenerwrapper), s, label);
++        // CraftBukkit end
++    }
++
+     public void performCommand(ParseResults<CommandSourceStack> parseResults, String command) {
+-        CommandSourceStack commandlistenerwrapper = (CommandSourceStack) parseResults.getContext().getSource();
++        this.performCommand(parseResults, command, command);
++    }
++
++    public void performCommand(ParseResults<CommandSourceStack> parseresults, String s, String label) { // CraftBukkit
++        CommandSourceStack commandlistenerwrapper = (CommandSourceStack) parseresults.getContext().getSource();
+ 
+         Profiler.get().push(() -> {
+-            return "/" + command;
++            return "/" + s;
+         });
+-        ContextChain<CommandSourceStack> contextchain = Commands.finishParsing(parseResults, command, commandlistenerwrapper);
++        ContextChain<CommandSourceStack> contextchain = Commands.finishParsing(parseresults, s, commandlistenerwrapper, label); // CraftBukkit
+ 
+         try {
+             if (contextchain != null) {
+                 Commands.executeCommandInContext(commandlistenerwrapper, (executioncontext) -> {
+-                    ExecutionContext.queueInitialCommandExecution(executioncontext, command, contextchain, commandlistenerwrapper, CommandResultCallback.EMPTY);
++                    ExecutionContext.queueInitialCommandExecution(executioncontext, s, contextchain, commandlistenerwrapper, CommandResultCallback.EMPTY);
+                 });
+             }
+         } catch (Exception exception) {
+             MutableComponent ichatmutablecomponent = Component.literal(exception.getMessage() == null ? exception.getClass().getName() : exception.getMessage());
+ 
+             if (Commands.LOGGER.isDebugEnabled()) {
+-                Commands.LOGGER.error("Command exception: /{}", command, exception);
++                Commands.LOGGER.error("Command exception: /{}", s, exception);
+                 StackTraceElement[] astacktraceelement = exception.getStackTrace();
+ 
+                 for (int i = 0; i < Math.min(astacktraceelement.length, 3); ++i) {
+@@ -298,7 +359,7 @@
+             }));
+             if (SharedConstants.IS_RUNNING_IN_IDE) {
+                 commandlistenerwrapper.sendFailure(Component.literal(Util.describeError(exception)));
+-                Commands.LOGGER.error("'/{}' threw an exception", command, exception);
++                Commands.LOGGER.error("'/{}' threw an exception", s, exception);
+             }
+         } finally {
+             Profiler.get().pop();
+@@ -307,18 +368,18 @@
+     }
+ 
+     @Nullable
+-    private static ContextChain<CommandSourceStack> finishParsing(ParseResults<CommandSourceStack> parseResults, String command, CommandSourceStack source) {
++    private static ContextChain<CommandSourceStack> finishParsing(ParseResults<CommandSourceStack> parseresults, String s, CommandSourceStack commandlistenerwrapper, String label) { // CraftBukkit
+         try {
+-            Commands.validateParseResults(parseResults);
+-            return (ContextChain) ContextChain.tryFlatten(parseResults.getContext().build(command)).orElseThrow(() -> {
+-                return CommandSyntaxException.BUILT_IN_EXCEPTIONS.dispatcherUnknownCommand().createWithContext(parseResults.getReader());
++            Commands.validateParseResults(parseresults);
++            return (ContextChain) ContextChain.tryFlatten(parseresults.getContext().build(s)).orElseThrow(() -> {
++                return CommandSyntaxException.BUILT_IN_EXCEPTIONS.dispatcherUnknownCommand().createWithContext(parseresults.getReader());
+             });
+         } catch (CommandSyntaxException commandsyntaxexception) {
+-            source.sendFailure(ComponentUtils.fromMessage(commandsyntaxexception.getRawMessage()));
++            commandlistenerwrapper.sendFailure(ComponentUtils.fromMessage(commandsyntaxexception.getRawMessage()));
+             if (commandsyntaxexception.getInput() != null && commandsyntaxexception.getCursor() >= 0) {
+                 int i = Math.min(commandsyntaxexception.getInput().length(), commandsyntaxexception.getCursor());
+                 MutableComponent ichatmutablecomponent = Component.empty().withStyle(ChatFormatting.GRAY).withStyle((chatmodifier) -> {
+-                    return chatmodifier.withClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, "/" + command));
++                    return chatmodifier.withClickEvent(new ClickEvent(ClickEvent.Action.SUGGEST_COMMAND, label)); // CraftBukkit
+                 });
+ 
+                 if (i > 10) {
+@@ -333,7 +394,7 @@
+                 }
+ 
+                 ichatmutablecomponent.append((Component) Component.translatable("command.context.here").withStyle(ChatFormatting.RED, ChatFormatting.ITALIC));
+-                source.sendFailure(ichatmutablecomponent);
++                commandlistenerwrapper.sendFailure(ichatmutablecomponent);
+             }
+ 
+             return null;
+@@ -368,7 +429,7 @@
+ 
+                 executioncontext1.close();
+             } finally {
+-                Commands.CURRENT_EXECUTION_CONTEXT.set((Object) null);
++                Commands.CURRENT_EXECUTION_CONTEXT.set(null); // CraftBukkit - decompile error
+             }
+         } else {
+             callback.accept(executioncontext);
+@@ -377,11 +438,36 @@
+     }
+ 
+     public void sendCommands(ServerPlayer player) {
+-        Map<CommandNode<CommandSourceStack>, CommandNode<SharedSuggestionProvider>> map = Maps.newHashMap();
++        // CraftBukkit start
++        // Register Vanilla commands into builtRoot as before
++        Map<CommandNode<CommandSourceStack>, CommandNode<SharedSuggestionProvider>> map = Maps.newIdentityHashMap(); // Use identity to prevent aliasing issues
++        RootCommandNode vanillaRoot = new RootCommandNode();
++
++        RootCommandNode<CommandSourceStack> vanilla = player.server.vanillaCommandDispatcher.getDispatcher().getRoot();
++        map.put(vanilla, vanillaRoot);
++        this.fillUsableCommands(vanilla, vanillaRoot, player.createCommandSourceStack(), (Map) map);
++
++        // Now build the global commands in a second pass
+         RootCommandNode<SharedSuggestionProvider> rootcommandnode = new RootCommandNode();
+ 
+         map.put(this.dispatcher.getRoot(), rootcommandnode);
+         this.fillUsableCommands(this.dispatcher.getRoot(), rootcommandnode, player.createCommandSourceStack(), map);
++
++        Collection<String> bukkit = new LinkedHashSet<>();
++        for (CommandNode node : rootcommandnode.getChildren()) {
++            bukkit.add(node.getName());
++        }
++
++        PlayerCommandSendEvent event = new PlayerCommandSendEvent(player.getBukkitEntity(), new LinkedHashSet<>(bukkit));
++        event.getPlayer().getServer().getPluginManager().callEvent(event);
++
++        // Remove labels that were removed during the event
++        for (String orig : bukkit) {
++            if (!event.getCommands().contains(orig)) {
++                rootcommandnode.removeCommand(orig);
++            }
++        }
++        // CraftBukkit end
+         player.connection.send(new ClientboundCommandsPacket(rootcommandnode));
+     }
+ 
+@@ -392,7 +478,7 @@
+             CommandNode<CommandSourceStack> commandnode2 = (CommandNode) iterator.next();
+ 
+             if (commandnode2.canUse(source)) {
+-                ArgumentBuilder<SharedSuggestionProvider, ?> argumentbuilder = commandnode2.createBuilder();
++                ArgumentBuilder argumentbuilder = commandnode2.createBuilder(); // CraftBukkit - decompile error
+ 
+                 argumentbuilder.requires((icompletionprovider) -> {
+                     return true;
+@@ -415,7 +501,7 @@
+                     argumentbuilder.redirect((CommandNode) resultNodes.get(argumentbuilder.getRedirect()));
+                 }
+ 
+-                CommandNode<SharedSuggestionProvider> commandnode3 = argumentbuilder.build();
++                CommandNode commandnode3 = argumentbuilder.build(); // CraftBukkit - decompile error
+ 
+                 resultNodes.put(commandnode2, commandnode3);
+                 result.addChild(commandnode3);
+@@ -481,7 +567,7 @@
+             }
+ 
+             private <T> HolderLookup.RegistryLookup.Delegate<T> createLookup(final HolderLookup.RegistryLookup<T> original) {
+-                return new HolderLookup.RegistryLookup.Delegate<T>(this) {
++                return new HolderLookup.RegistryLookup.Delegate<T>() { // CraftBukkit - decompile error
+                     @Override
+                     public HolderLookup.RegistryLookup<T> parent() {
+                         return original;
diff --git a/paper-server/patches/sources/net/minecraft/commands/arguments/ArgumentEntity.patch b/paper-server/patches/sources/net/minecraft/commands/arguments/ArgumentEntity.patch
deleted file mode 100644
index 9f83ef9131..0000000000
--- a/paper-server/patches/sources/net/minecraft/commands/arguments/ArgumentEntity.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- a/net/minecraft/commands/arguments/ArgumentEntity.java
-+++ b/net/minecraft/commands/arguments/ArgumentEntity.java
-@@ -102,9 +102,15 @@
-     }
- 
-     private EntitySelector parse(StringReader stringreader, boolean flag) throws CommandSyntaxException {
-+        // CraftBukkit start
-+        return parse(stringreader, flag, false);
-+    }
-+
-+    public EntitySelector parse(StringReader stringreader, boolean flag, boolean overridePermissions) throws CommandSyntaxException {
-+        // CraftBukkit end
-         boolean flag1 = false;
-         ArgumentParserSelector argumentparserselector = new ArgumentParserSelector(stringreader, flag);
--        EntitySelector entityselector = argumentparserselector.parse();
-+        EntitySelector entityselector = argumentparserselector.parse(overridePermissions); // CraftBukkit
- 
-         if (entityselector.getMaxResults() > 1 && this.single) {
-             if (this.playersOnly) {
diff --git a/paper-server/patches/sources/net/minecraft/commands/arguments/EntityArgument.java.patch b/paper-server/patches/sources/net/minecraft/commands/arguments/EntityArgument.java.patch
new file mode 100644
index 0000000000..9e568bbf36
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/commands/arguments/EntityArgument.java.patch
@@ -0,0 +1,38 @@
+--- a/net/minecraft/commands/arguments/EntityArgument.java
++++ b/net/minecraft/commands/arguments/EntityArgument.java
+@@ -102,21 +102,27 @@
+     }
+ 
+     private EntitySelector parse(StringReader reader, boolean allowAtSelectors) throws CommandSyntaxException {
++        // CraftBukkit start
++        return this.parse(reader, allowAtSelectors, false);
++    }
++
++    public EntitySelector parse(StringReader stringreader, boolean flag, boolean overridePermissions) throws CommandSyntaxException {
++        // CraftBukkit end
+         boolean flag1 = false;
+-        EntitySelectorParser argumentparserselector = new EntitySelectorParser(reader, allowAtSelectors);
+-        EntitySelector entityselector = argumentparserselector.parse();
++        EntitySelectorParser argumentparserselector = new EntitySelectorParser(stringreader, flag);
++        EntitySelector entityselector = argumentparserselector.parse(overridePermissions); // CraftBukkit
+ 
+         if (entityselector.getMaxResults() > 1 && this.single) {
+             if (this.playersOnly) {
+-                reader.setCursor(0);
+-                throw EntityArgument.ERROR_NOT_SINGLE_PLAYER.createWithContext(reader);
++                stringreader.setCursor(0);
++                throw EntityArgument.ERROR_NOT_SINGLE_PLAYER.createWithContext(stringreader);
+             } else {
+-                reader.setCursor(0);
+-                throw EntityArgument.ERROR_NOT_SINGLE_ENTITY.createWithContext(reader);
++                stringreader.setCursor(0);
++                throw EntityArgument.ERROR_NOT_SINGLE_ENTITY.createWithContext(stringreader);
+             }
+         } else if (entityselector.includesEntities() && this.playersOnly && !entityselector.isSelfSelector()) {
+-            reader.setCursor(0);
+-            throw EntityArgument.ERROR_ONLY_PLAYERS_ALLOWED.createWithContext(reader);
++            stringreader.setCursor(0);
++            throw EntityArgument.ERROR_ONLY_PLAYERS_ALLOWED.createWithContext(stringreader);
+         } else {
+             return entityselector;
+         }
diff --git a/paper-server/patches/sources/net/minecraft/commands/arguments/blocks/ArgumentBlock.patch b/paper-server/patches/sources/net/minecraft/commands/arguments/blocks/ArgumentBlock.patch
deleted file mode 100644
index 09c5306353..0000000000
--- a/paper-server/patches/sources/net/minecraft/commands/arguments/blocks/ArgumentBlock.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- a/net/minecraft/commands/arguments/blocks/ArgumentBlock.java
-+++ b/net/minecraft/commands/arguments/blocks/ArgumentBlock.java
-@@ -67,7 +67,7 @@
-     private final StringReader reader;
-     private final boolean forTesting;
-     private final boolean allowNbt;
--    private final Map<IBlockState<?>, Comparable<?>> properties = Maps.newHashMap();
-+    private final Map<IBlockState<?>, Comparable<?>> properties = Maps.newLinkedHashMap(); // CraftBukkit - stable
-     private final Map<String, String> vagueProperties = Maps.newHashMap();
-     private MinecraftKey id = MinecraftKey.withDefaultNamespace("");
-     @Nullable
-@@ -275,7 +275,7 @@
-         Iterator iterator = iblockstate.getPossibleValues().iterator();
- 
-         while (iterator.hasNext()) {
--            T t0 = (Comparable) iterator.next();
-+            T t0 = (T) iterator.next(); // CraftBukkit - decompile error
- 
-             if (t0 instanceof Integer integer) {
-                 suggestionsbuilder.suggest(integer);
-@@ -545,7 +545,7 @@
-         Optional<T> optional = iblockstate.getValue(s);
- 
-         if (optional.isPresent()) {
--            this.state = (IBlockData) this.state.setValue(iblockstate, (Comparable) optional.get());
-+            this.state = (IBlockData) this.state.setValue(iblockstate, (T) optional.get()); // CraftBukkit - decompile error
-             this.properties.put(iblockstate, (Comparable) optional.get());
-         } else {
-             this.reader.setCursor(i);
-@@ -581,7 +581,7 @@
-     private static <T extends Comparable<T>> void appendProperty(StringBuilder stringbuilder, IBlockState<T> iblockstate, Comparable<?> comparable) {
-         stringbuilder.append(iblockstate.getName());
-         stringbuilder.append('=');
--        stringbuilder.append(iblockstate.getName(comparable));
-+        stringbuilder.append(iblockstate.getName((T) comparable)); // CraftBukkit - decompile error
-     }
- 
-     public static record a(IBlockData blockState, Map<IBlockState<?>, Comparable<?>> properties, @Nullable NBTTagCompound nbt) {
diff --git a/paper-server/patches/sources/net/minecraft/commands/arguments/blocks/BlockStateParser.java.patch b/paper-server/patches/sources/net/minecraft/commands/arguments/blocks/BlockStateParser.java.patch
new file mode 100644
index 0000000000..46961c4f64
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/commands/arguments/blocks/BlockStateParser.java.patch
@@ -0,0 +1,38 @@
+--- a/net/minecraft/commands/arguments/blocks/BlockStateParser.java
++++ b/net/minecraft/commands/arguments/blocks/BlockStateParser.java
+@@ -67,7 +67,7 @@
+     private final StringReader reader;
+     private final boolean forTesting;
+     private final boolean allowNbt;
+-    private final Map<Property<?>, Comparable<?>> properties = Maps.newHashMap();
++    private final Map<Property<?>, Comparable<?>> properties = Maps.newLinkedHashMap(); // CraftBukkit - stable
+     private final Map<String, String> vagueProperties = Maps.newHashMap();
+     private ResourceLocation id = ResourceLocation.withDefaultNamespace("");
+     @Nullable
+@@ -275,7 +275,7 @@
+         Iterator iterator = property.getPossibleValues().iterator();
+ 
+         while (iterator.hasNext()) {
+-            T t0 = (Comparable) iterator.next();
++            T t0 = (T) iterator.next(); // CraftBukkit - decompile error
+ 
+             if (t0 instanceof Integer integer) {
+                 builder.suggest(integer);
+@@ -545,7 +545,7 @@
+         Optional<T> optional = property.getValue(value);
+ 
+         if (optional.isPresent()) {
+-            this.state = (BlockState) this.state.setValue(property, (Comparable) optional.get());
++            this.state = (BlockState) this.state.setValue(property, (T) optional.get()); // CraftBukkit - decompile error
+             this.properties.put(property, (Comparable) optional.get());
+         } else {
+             this.reader.setCursor(cursor);
+@@ -581,7 +581,7 @@
+     private static <T extends Comparable<T>> void appendProperty(StringBuilder builder, Property<T> property, Comparable<?> value) {
+         builder.append(property.getName());
+         builder.append('=');
+-        builder.append(property.getName(value));
++        builder.append(property.getName((T) value)); // CraftBukkit - decompile error
+     }
+ 
+     public static record BlockResult(BlockState blockState, Map<Property<?>, Comparable<?>> properties, @Nullable CompoundTag nbt) {
diff --git a/paper-server/patches/sources/net/minecraft/commands/arguments/selector/EntitySelector.java.patch b/paper-server/patches/sources/net/minecraft/commands/arguments/selector/EntitySelector.java.patch
new file mode 100644
index 0000000000..2aa168b7b6
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/commands/arguments/selector/EntitySelector.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/commands/arguments/selector/EntitySelector.java
++++ b/net/minecraft/commands/arguments/selector/EntitySelector.java
+@@ -93,7 +93,7 @@
+     }
+ 
+     private void checkPermissions(CommandSourceStack source) throws CommandSyntaxException {
+-        if (this.usesSelector && !source.hasPermission(2)) {
++        if (this.usesSelector && !source.hasPermission(2, "minecraft.command.selector")) { // CraftBukkit
+             throw EntityArgument.ERROR_SELECTORS_NOT_ALLOWED.create();
+         }
+     }
diff --git a/paper-server/patches/sources/net/minecraft/commands/arguments/selector/EntitySelector.patch b/paper-server/patches/sources/net/minecraft/commands/arguments/selector/EntitySelector.patch
deleted file mode 100644
index 144825345e..0000000000
--- a/paper-server/patches/sources/net/minecraft/commands/arguments/selector/EntitySelector.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/commands/arguments/selector/EntitySelector.java
-+++ b/net/minecraft/commands/arguments/selector/EntitySelector.java
-@@ -93,7 +93,7 @@
-     }
- 
-     private void checkPermissions(CommandListenerWrapper commandlistenerwrapper) throws CommandSyntaxException {
--        if (this.usesSelector && !commandlistenerwrapper.hasPermission(2)) {
-+        if (this.usesSelector && !commandlistenerwrapper.hasPermission(2, "minecraft.command.selector")) { // CraftBukkit
-             throw ArgumentEntity.ERROR_SELECTORS_NOT_ALLOWED.create();
-         }
-     }
diff --git a/paper-server/patches/sources/net/minecraft/commands/arguments/selector/ArgumentParserSelector.patch b/paper-server/patches/sources/net/minecraft/commands/arguments/selector/EntitySelectorParser.java.patch
similarity index 80%
rename from paper-server/patches/sources/net/minecraft/commands/arguments/selector/ArgumentParserSelector.patch
rename to paper-server/patches/sources/net/minecraft/commands/arguments/selector/EntitySelectorParser.java.patch
index 0a3f633207..bc6ec0856d 100644
--- a/paper-server/patches/sources/net/minecraft/commands/arguments/selector/ArgumentParserSelector.patch
+++ b/paper-server/patches/sources/net/minecraft/commands/arguments/selector/EntitySelectorParser.java.patch
@@ -1,11 +1,11 @@
---- a/net/minecraft/commands/arguments/selector/ArgumentParserSelector.java
-+++ b/net/minecraft/commands/arguments/selector/ArgumentParserSelector.java
+--- a/net/minecraft/commands/arguments/selector/EntitySelectorParser.java
++++ b/net/minecraft/commands/arguments/selector/EntitySelectorParser.java
 @@ -158,7 +158,7 @@
              axisalignedbb = this.createAabb(this.deltaX == null ? 0.0D : this.deltaX, this.deltaY == null ? 0.0D : this.deltaY, this.deltaZ == null ? 0.0D : this.deltaZ);
          }
  
 -        Function function;
-+        Function<Vec3D, Vec3D> function; // CraftBukkit - decompile error
++        Function<Vec3, Vec3> function; // CraftBukkit - decompile error
  
          if (this.x == null && this.y == null && this.z == null) {
              function = (vec3d) -> {
@@ -21,13 +21,13 @@
 +        // CraftBukkit end
          this.suggestions = this::suggestSelector;
          if (!this.reader.canRead()) {
-             throw ArgumentParserSelector.ERROR_MISSING_SELECTOR_TYPE.createWithContext(this.reader);
+             throw EntitySelectorParser.ERROR_MISSING_SELECTOR_TYPE.createWithContext(this.reader);
 @@ -505,6 +507,12 @@
      }
  
      public EntitySelector parse() throws CommandSyntaxException {
 +        // CraftBukkit start
-+        return parse(false);
++        return this.parse(false);
 +    }
 +
 +    public EntitySelector parse(boolean overridePermissions) throws CommandSyntaxException {
diff --git a/paper-server/patches/sources/net/minecraft/core/cauldron/CauldronInteraction.java.patch b/paper-server/patches/sources/net/minecraft/core/cauldron/CauldronInteraction.java.patch
new file mode 100644
index 0000000000..f3dd315d56
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/core/cauldron/CauldronInteraction.java.patch
@@ -0,0 +1,195 @@
+--- a/net/minecraft/core/cauldron/CauldronInteraction.java
++++ b/net/minecraft/core/cauldron/CauldronInteraction.java
+@@ -35,15 +35,20 @@
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import net.minecraft.world.level.material.FluidState;
++// CraftBukkit start
++import org.bukkit.event.block.CauldronLevelChangeEvent;
++// CraftBukkit end
+ 
+ public interface CauldronInteraction {
+ 
+     Map<String, CauldronInteraction.InteractionMap> INTERACTIONS = new Object2ObjectArrayMap();
+-    Codec<CauldronInteraction.InteractionMap> CODEC;
+-    CauldronInteraction.InteractionMap EMPTY;
+-    CauldronInteraction.InteractionMap WATER;
+-    CauldronInteraction.InteractionMap LAVA;
+-    CauldronInteraction.InteractionMap POWDER_SNOW;
++    // CraftBukkit start - decompile errors
++    Codec<CauldronInteraction.InteractionMap> CODEC = Codec.stringResolver(CauldronInteraction.InteractionMap::name, CauldronInteraction.INTERACTIONS::get);
++    CauldronInteraction.InteractionMap EMPTY = CauldronInteraction.newInteractionMap("empty");
++    CauldronInteraction.InteractionMap WATER = CauldronInteraction.newInteractionMap("water");
++    CauldronInteraction.InteractionMap LAVA = CauldronInteraction.newInteractionMap("lava");
++    CauldronInteraction.InteractionMap POWDER_SNOW = CauldronInteraction.newInteractionMap("powder_snow");
++    // CraftBukkit end
+ 
+     static CauldronInteraction.InteractionMap newInteractionMap(String name) {
+         Object2ObjectOpenHashMap<Item, CauldronInteraction> object2objectopenhashmap = new Object2ObjectOpenHashMap();
+@@ -68,12 +73,17 @@
+ 
+             if (potioncontents != null && potioncontents.is(Potions.WATER)) {
+                 if (!world.isClientSide) {
++                    // CraftBukkit start
++                    if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, Blocks.WATER_CAULDRON.defaultBlockState(), entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY)) {
++                        return InteractionResult.SUCCESS;
++                    }
++                    // CraftBukkit end
+                     Item item = itemstack.getItem();
+ 
+                     entityhuman.setItemInHand(enumhand, ItemUtils.createFilledResult(itemstack, entityhuman, new ItemStack(Items.GLASS_BOTTLE)));
+                     entityhuman.awardStat(Stats.USE_CAULDRON);
+                     entityhuman.awardStat(Stats.ITEM_USED.get(item));
+-                    world.setBlockAndUpdate(blockposition, Blocks.WATER_CAULDRON.defaultBlockState());
++                    // world.setBlockAndUpdate(blockposition, Blocks.WATER_CAULDRON.defaultBlockState()); // CraftBukkit
+                     world.playSound((Player) null, blockposition, SoundEvents.BOTTLE_EMPTY, SoundSource.BLOCKS, 1.0F, 1.0F);
+                     world.gameEvent((Entity) null, (Holder) GameEvent.FLUID_PLACE, blockposition);
+                 }
+@@ -93,12 +103,17 @@
+         });
+         map1.put(Items.GLASS_BOTTLE, (iblockdata, world, blockposition, entityhuman, enumhand, itemstack) -> {
+             if (!world.isClientSide) {
++                // CraftBukkit start
++                if (!LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition, entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_FILL)) {
++                    return InteractionResult.SUCCESS;
++                }
++                // CraftBukkit end
+                 Item item = itemstack.getItem();
+ 
+                 entityhuman.setItemInHand(enumhand, ItemUtils.createFilledResult(itemstack, entityhuman, PotionContents.createItemStack(Items.POTION, Potions.WATER)));
+                 entityhuman.awardStat(Stats.USE_CAULDRON);
+                 entityhuman.awardStat(Stats.ITEM_USED.get(item));
+-                LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition);
++                // LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition); // CraftBukkit
+                 world.playSound((Player) null, blockposition, SoundEvents.BOTTLE_FILL, SoundSource.BLOCKS, 1.0F, 1.0F);
+                 world.gameEvent((Entity) null, (Holder) GameEvent.FLUID_PICKUP, blockposition);
+             }
+@@ -113,10 +128,15 @@
+ 
+                 if (potioncontents != null && potioncontents.is(Potions.WATER)) {
+                     if (!world.isClientSide) {
++                        // CraftBukkit start
++                        if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, iblockdata.cycle(LayeredCauldronBlock.LEVEL), entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY)) {
++                            return InteractionResult.SUCCESS;
++                        }
++                        // CraftBukkit end
+                         entityhuman.setItemInHand(enumhand, ItemUtils.createFilledResult(itemstack, entityhuman, new ItemStack(Items.GLASS_BOTTLE)));
+                         entityhuman.awardStat(Stats.USE_CAULDRON);
+                         entityhuman.awardStat(Stats.ITEM_USED.get(itemstack.getItem()));
+-                        world.setBlockAndUpdate(blockposition, (BlockState) iblockdata.cycle(LayeredCauldronBlock.LEVEL));
++                        // world.setBlockAndUpdate(blockposition, (IBlockData) iblockdata.cycle(LayeredCauldronBlock.LEVEL)); // CraftBukkit
+                         world.playSound((Player) null, blockposition, SoundEvents.BOTTLE_EMPTY, SoundSource.BLOCKS, 1.0F, 1.0F);
+                         world.gameEvent((Entity) null, (Holder) GameEvent.FLUID_PLACE, blockposition);
+                     }
+@@ -194,12 +214,17 @@
+             return InteractionResult.TRY_WITH_EMPTY_HAND;
+         } else {
+             if (!world.isClientSide) {
++                // CraftBukkit start
++                if (!LayeredCauldronBlock.changeLevel(state, world, pos, Blocks.CAULDRON.defaultBlockState(), player, CauldronLevelChangeEvent.ChangeReason.BUCKET_FILL)) {
++                    return InteractionResult.SUCCESS;
++                }
++                // CraftBukkit end
+                 Item item = stack.getItem();
+ 
+                 player.setItemInHand(hand, ItemUtils.createFilledResult(stack, player, output));
+                 player.awardStat(Stats.USE_CAULDRON);
+                 player.awardStat(Stats.ITEM_USED.get(item));
+-                world.setBlockAndUpdate(pos, Blocks.CAULDRON.defaultBlockState());
++                // world.setBlockAndUpdate(blockposition, Blocks.CAULDRON.defaultBlockState()); // CraftBukkit
+                 world.playSound((Player) null, pos, soundEvent, SoundSource.BLOCKS, 1.0F, 1.0F);
+                 world.gameEvent((Entity) null, (Holder) GameEvent.FLUID_PICKUP, pos);
+             }
+@@ -210,12 +235,17 @@
+ 
+     static InteractionResult emptyBucket(Level world, BlockPos pos, Player player, InteractionHand hand, ItemStack stack, BlockState state, SoundEvent soundEvent) {
+         if (!world.isClientSide) {
++            // CraftBukkit start
++            if (!LayeredCauldronBlock.changeLevel(state, world, pos, state, player, CauldronLevelChangeEvent.ChangeReason.BUCKET_EMPTY)) {
++                return InteractionResult.SUCCESS;
++            }
++            // CraftBukkit end
+             Item item = stack.getItem();
+ 
+             player.setItemInHand(hand, ItemUtils.createFilledResult(stack, player, new ItemStack(Items.BUCKET)));
+             player.awardStat(Stats.FILL_CAULDRON);
+             player.awardStat(Stats.ITEM_USED.get(item));
+-            world.setBlockAndUpdate(pos, state);
++            // world.setBlockAndUpdate(blockposition, iblockdata); // CraftBukkit
+             world.playSound((Player) null, pos, soundEvent, SoundSource.BLOCKS, 1.0F, 1.0F);
+             world.gameEvent((Entity) null, (Holder) GameEvent.FLUID_PLACE, pos);
+         }
+@@ -242,11 +272,16 @@
+             return InteractionResult.TRY_WITH_EMPTY_HAND;
+         } else {
+             if (!world.isClientSide) {
++                // CraftBukkit start
++                if (!LayeredCauldronBlock.lowerFillLevel(state, world, pos, player, CauldronLevelChangeEvent.ChangeReason.SHULKER_WASH)) {
++                    return InteractionResult.SUCCESS;
++                }
++                // CraftBukkit end
+                 ItemStack itemstack1 = stack.transmuteCopy(Blocks.SHULKER_BOX, 1);
+ 
+                 player.setItemInHand(hand, ItemUtils.createFilledResult(stack, player, itemstack1, false));
+                 player.awardStat(Stats.CLEAN_SHULKER_BOX);
+-                LayeredCauldronBlock.lowerFillLevel(state, world, pos);
++                // LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition); // CraftBukkit
+             }
+ 
+             return InteractionResult.SUCCESS;
+@@ -260,12 +295,17 @@
+             return InteractionResult.TRY_WITH_EMPTY_HAND;
+         } else {
+             if (!world.isClientSide) {
++                // CraftBukkit start
++                if (!LayeredCauldronBlock.lowerFillLevel(state, world, pos, player, CauldronLevelChangeEvent.ChangeReason.BANNER_WASH)) {
++                    return InteractionResult.SUCCESS;
++                }
++                // CraftBukkit end
+                 ItemStack itemstack1 = stack.copyWithCount(1);
+ 
+                 itemstack1.set(DataComponents.BANNER_PATTERNS, bannerpatternlayers.removeLast());
+                 player.setItemInHand(hand, ItemUtils.createFilledResult(stack, player, itemstack1, false));
+                 player.awardStat(Stats.CLEAN_BANNER);
+-                LayeredCauldronBlock.lowerFillLevel(state, world, pos);
++                // LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition); // CraftBukkit
+             }
+ 
+             return InteractionResult.SUCCESS;
+@@ -279,9 +319,14 @@
+             return InteractionResult.TRY_WITH_EMPTY_HAND;
+         } else {
+             if (!world.isClientSide) {
++                // CraftBukkit start
++                if (!LayeredCauldronBlock.lowerFillLevel(state, world, pos, player, CauldronLevelChangeEvent.ChangeReason.ARMOR_WASH)) {
++                    return InteractionResult.SUCCESS;
++                }
++                // CraftBukkit end
+                 stack.remove(DataComponents.DYED_COLOR);
+                 player.awardStat(Stats.CLEAN_ARMOR);
+-                LayeredCauldronBlock.lowerFillLevel(state, world, pos);
++                // LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition); // CraftBukkit
+             }
+ 
+             return InteractionResult.SUCCESS;
+@@ -294,8 +339,10 @@
+         return fluid.is(FluidTags.WATER);
+     }
+ 
++    // CraftBukkit start - decompile errors
++    /*
+     static {
+-        Function function = CauldronInteraction.InteractionMap::name;
++        Function function = CauldronInteraction.a::name;
+         Map map = CauldronInteraction.INTERACTIONS;
+ 
+         Objects.requireNonNull(map);
+@@ -305,6 +352,8 @@
+         LAVA = newInteractionMap("lava");
+         POWDER_SNOW = newInteractionMap("powder_snow");
+     }
++     */
++    // CraftBukkit end
+ 
+     public static record InteractionMap(String name, Map<Item, CauldronInteraction> map) {
+ 
diff --git a/paper-server/patches/sources/net/minecraft/core/cauldron/CauldronInteraction.patch b/paper-server/patches/sources/net/minecraft/core/cauldron/CauldronInteraction.patch
deleted file mode 100644
index d9fb2ed9e8..0000000000
--- a/paper-server/patches/sources/net/minecraft/core/cauldron/CauldronInteraction.patch
+++ /dev/null
@@ -1,192 +0,0 @@
---- a/net/minecraft/core/cauldron/CauldronInteraction.java
-+++ b/net/minecraft/core/cauldron/CauldronInteraction.java
-@@ -36,14 +36,20 @@
- import net.minecraft.world.level.gameevent.GameEvent;
- import net.minecraft.world.level.material.Fluid;
- 
-+// CraftBukkit start
-+import org.bukkit.event.block.CauldronLevelChangeEvent;
-+// CraftBukkit end
-+
- public interface CauldronInteraction {
- 
-     Map<String, CauldronInteraction.a> INTERACTIONS = new Object2ObjectArrayMap();
--    Codec<CauldronInteraction.a> CODEC;
--    CauldronInteraction.a EMPTY;
--    CauldronInteraction.a WATER;
--    CauldronInteraction.a LAVA;
--    CauldronInteraction.a POWDER_SNOW;
-+    // CraftBukkit start - decompile errors
-+    Codec<CauldronInteraction.a> CODEC = Codec.stringResolver(CauldronInteraction.a::name, CauldronInteraction.INTERACTIONS::get);
-+    CauldronInteraction.a EMPTY = newInteractionMap("empty");
-+    CauldronInteraction.a WATER = newInteractionMap("water");
-+    CauldronInteraction.a LAVA = newInteractionMap("lava");
-+    CauldronInteraction.a POWDER_SNOW = newInteractionMap("powder_snow");
-+    // CraftBukkit end
- 
-     static CauldronInteraction.a newInteractionMap(String s) {
-         Object2ObjectOpenHashMap<Item, CauldronInteraction> object2objectopenhashmap = new Object2ObjectOpenHashMap();
-@@ -68,12 +74,17 @@
- 
-             if (potioncontents != null && potioncontents.is(Potions.WATER)) {
-                 if (!world.isClientSide) {
-+                    // CraftBukkit start
-+                    if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, Blocks.WATER_CAULDRON.defaultBlockState(), entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY)) {
-+                        return EnumInteractionResult.SUCCESS;
-+                    }
-+                    // CraftBukkit end
-                     Item item = itemstack.getItem();
- 
-                     entityhuman.setItemInHand(enumhand, ItemLiquidUtil.createFilledResult(itemstack, entityhuman, new ItemStack(Items.GLASS_BOTTLE)));
-                     entityhuman.awardStat(StatisticList.USE_CAULDRON);
-                     entityhuman.awardStat(StatisticList.ITEM_USED.get(item));
--                    world.setBlockAndUpdate(blockposition, Blocks.WATER_CAULDRON.defaultBlockState());
-+                    // world.setBlockAndUpdate(blockposition, Blocks.WATER_CAULDRON.defaultBlockState()); // CraftBukkit
-                     world.playSound((EntityHuman) null, blockposition, SoundEffects.BOTTLE_EMPTY, SoundCategory.BLOCKS, 1.0F, 1.0F);
-                     world.gameEvent((Entity) null, (Holder) GameEvent.FLUID_PLACE, blockposition);
-                 }
-@@ -93,12 +104,17 @@
-         });
-         map1.put(Items.GLASS_BOTTLE, (iblockdata, world, blockposition, entityhuman, enumhand, itemstack) -> {
-             if (!world.isClientSide) {
-+                // CraftBukkit start
-+                if (!LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition, entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_FILL)) {
-+                    return EnumInteractionResult.SUCCESS;
-+                }
-+                // CraftBukkit end
-                 Item item = itemstack.getItem();
- 
-                 entityhuman.setItemInHand(enumhand, ItemLiquidUtil.createFilledResult(itemstack, entityhuman, PotionContents.createItemStack(Items.POTION, Potions.WATER)));
-                 entityhuman.awardStat(StatisticList.USE_CAULDRON);
-                 entityhuman.awardStat(StatisticList.ITEM_USED.get(item));
--                LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition);
-+                // LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition); // CraftBukkit
-                 world.playSound((EntityHuman) null, blockposition, SoundEffects.BOTTLE_FILL, SoundCategory.BLOCKS, 1.0F, 1.0F);
-                 world.gameEvent((Entity) null, (Holder) GameEvent.FLUID_PICKUP, blockposition);
-             }
-@@ -113,10 +129,15 @@
- 
-                 if (potioncontents != null && potioncontents.is(Potions.WATER)) {
-                     if (!world.isClientSide) {
-+                        // CraftBukkit start
-+                        if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, iblockdata.cycle(LayeredCauldronBlock.LEVEL), entityhuman, CauldronLevelChangeEvent.ChangeReason.BOTTLE_EMPTY)) {
-+                            return EnumInteractionResult.SUCCESS;
-+                        }
-+                        // CraftBukkit end
-                         entityhuman.setItemInHand(enumhand, ItemLiquidUtil.createFilledResult(itemstack, entityhuman, new ItemStack(Items.GLASS_BOTTLE)));
-                         entityhuman.awardStat(StatisticList.USE_CAULDRON);
-                         entityhuman.awardStat(StatisticList.ITEM_USED.get(itemstack.getItem()));
--                        world.setBlockAndUpdate(blockposition, (IBlockData) iblockdata.cycle(LayeredCauldronBlock.LEVEL));
-+                        // world.setBlockAndUpdate(blockposition, (IBlockData) iblockdata.cycle(LayeredCauldronBlock.LEVEL)); // CraftBukkit
-                         world.playSound((EntityHuman) null, blockposition, SoundEffects.BOTTLE_EMPTY, SoundCategory.BLOCKS, 1.0F, 1.0F);
-                         world.gameEvent((Entity) null, (Holder) GameEvent.FLUID_PLACE, blockposition);
-                     }
-@@ -194,12 +215,17 @@
-             return EnumInteractionResult.TRY_WITH_EMPTY_HAND;
-         } else {
-             if (!world.isClientSide) {
-+                // CraftBukkit start
-+                if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, Blocks.CAULDRON.defaultBlockState(), entityhuman, CauldronLevelChangeEvent.ChangeReason.BUCKET_FILL)) {
-+                    return EnumInteractionResult.SUCCESS;
-+                }
-+                // CraftBukkit end
-                 Item item = itemstack.getItem();
- 
-                 entityhuman.setItemInHand(enumhand, ItemLiquidUtil.createFilledResult(itemstack, entityhuman, itemstack1));
-                 entityhuman.awardStat(StatisticList.USE_CAULDRON);
-                 entityhuman.awardStat(StatisticList.ITEM_USED.get(item));
--                world.setBlockAndUpdate(blockposition, Blocks.CAULDRON.defaultBlockState());
-+                // world.setBlockAndUpdate(blockposition, Blocks.CAULDRON.defaultBlockState()); // CraftBukkit
-                 world.playSound((EntityHuman) null, blockposition, soundeffect, SoundCategory.BLOCKS, 1.0F, 1.0F);
-                 world.gameEvent((Entity) null, (Holder) GameEvent.FLUID_PICKUP, blockposition);
-             }
-@@ -210,12 +236,17 @@
- 
-     static EnumInteractionResult emptyBucket(World world, BlockPosition blockposition, EntityHuman entityhuman, EnumHand enumhand, ItemStack itemstack, IBlockData iblockdata, SoundEffect soundeffect) {
-         if (!world.isClientSide) {
-+            // CraftBukkit start
-+            if (!LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, iblockdata, entityhuman, CauldronLevelChangeEvent.ChangeReason.BUCKET_EMPTY)) {
-+                return EnumInteractionResult.SUCCESS;
-+            }
-+            // CraftBukkit end
-             Item item = itemstack.getItem();
- 
-             entityhuman.setItemInHand(enumhand, ItemLiquidUtil.createFilledResult(itemstack, entityhuman, new ItemStack(Items.BUCKET)));
-             entityhuman.awardStat(StatisticList.FILL_CAULDRON);
-             entityhuman.awardStat(StatisticList.ITEM_USED.get(item));
--            world.setBlockAndUpdate(blockposition, iblockdata);
-+            // world.setBlockAndUpdate(blockposition, iblockdata); // CraftBukkit
-             world.playSound((EntityHuman) null, blockposition, soundeffect, SoundCategory.BLOCKS, 1.0F, 1.0F);
-             world.gameEvent((Entity) null, (Holder) GameEvent.FLUID_PLACE, blockposition);
-         }
-@@ -242,11 +273,16 @@
-             return EnumInteractionResult.TRY_WITH_EMPTY_HAND;
-         } else {
-             if (!world.isClientSide) {
-+                // CraftBukkit start
-+                if (!LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition, entityhuman, CauldronLevelChangeEvent.ChangeReason.SHULKER_WASH)) {
-+                    return EnumInteractionResult.SUCCESS;
-+                }
-+                // CraftBukkit end
-                 ItemStack itemstack1 = itemstack.transmuteCopy(Blocks.SHULKER_BOX, 1);
- 
-                 entityhuman.setItemInHand(enumhand, ItemLiquidUtil.createFilledResult(itemstack, entityhuman, itemstack1, false));
-                 entityhuman.awardStat(StatisticList.CLEAN_SHULKER_BOX);
--                LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition);
-+                // LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition); // CraftBukkit
-             }
- 
-             return EnumInteractionResult.SUCCESS;
-@@ -260,12 +296,17 @@
-             return EnumInteractionResult.TRY_WITH_EMPTY_HAND;
-         } else {
-             if (!world.isClientSide) {
-+                // CraftBukkit start
-+                if (!LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition, entityhuman, CauldronLevelChangeEvent.ChangeReason.BANNER_WASH)) {
-+                    return EnumInteractionResult.SUCCESS;
-+                }
-+                // CraftBukkit end
-                 ItemStack itemstack1 = itemstack.copyWithCount(1);
- 
-                 itemstack1.set(DataComponents.BANNER_PATTERNS, bannerpatternlayers.removeLast());
-                 entityhuman.setItemInHand(enumhand, ItemLiquidUtil.createFilledResult(itemstack, entityhuman, itemstack1, false));
-                 entityhuman.awardStat(StatisticList.CLEAN_BANNER);
--                LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition);
-+                // LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition); // CraftBukkit
-             }
- 
-             return EnumInteractionResult.SUCCESS;
-@@ -279,9 +320,14 @@
-             return EnumInteractionResult.TRY_WITH_EMPTY_HAND;
-         } else {
-             if (!world.isClientSide) {
-+                // CraftBukkit start
-+                if (!LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition, entityhuman, CauldronLevelChangeEvent.ChangeReason.ARMOR_WASH)) {
-+                    return EnumInteractionResult.SUCCESS;
-+                }
-+                // CraftBukkit end
-                 itemstack.remove(DataComponents.DYED_COLOR);
-                 entityhuman.awardStat(StatisticList.CLEAN_ARMOR);
--                LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition);
-+                // LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition); // CraftBukkit
-             }
- 
-             return EnumInteractionResult.SUCCESS;
-@@ -294,6 +340,8 @@
-         return fluid.is(TagsFluid.WATER);
-     }
- 
-+    // CraftBukkit start - decompile errors
-+    /*
-     static {
-         Function function = CauldronInteraction.a::name;
-         Map map = CauldronInteraction.INTERACTIONS;
-@@ -305,6 +353,8 @@
-         LAVA = newInteractionMap("lava");
-         POWDER_SNOW = newInteractionMap("powder_snow");
-     }
-+     */
-+    // CraftBukkit end
- 
-     public static record a(String name, Map<Item, CauldronInteraction> map) {
- 
diff --git a/paper-server/patches/sources/net/minecraft/core/component/DataComponentPatch.patch b/paper-server/patches/sources/net/minecraft/core/component/DataComponentPatch.java.patch
similarity index 71%
rename from paper-server/patches/sources/net/minecraft/core/component/DataComponentPatch.patch
rename to paper-server/patches/sources/net/minecraft/core/component/DataComponentPatch.java.patch
index 5e70217b4a..b822091ea9 100644
--- a/paper-server/patches/sources/net/minecraft/core/component/DataComponentPatch.patch
+++ b/paper-server/patches/sources/net/minecraft/core/component/DataComponentPatch.java.patch
@@ -12,16 +12,17 @@
 @@ -144,7 +144,7 @@
          }
  
-         private static <T> void encodeComponent(RegistryFriendlyByteBuf registryfriendlybytebuf, DataComponentType<T> datacomponenttype, Object object) {
--            datacomponenttype.streamCodec().encode(registryfriendlybytebuf, object);
-+            datacomponenttype.streamCodec().encode(registryfriendlybytebuf, (T) object); // CraftBukkit - decompile error
+         private static <T> void encodeComponent(RegistryFriendlyByteBuf buf, DataComponentType<T> type, Object value) {
+-            type.streamCodec().encode(buf, value);
++            type.streamCodec().encode(buf, (T) value); // CraftBukkit - decompile error
          }
      };
      private static final String REMOVED_PREFIX = "!";
-@@ -271,6 +271,42 @@
- 
-         a() {}
+@@ -270,7 +270,43 @@
+         private final Reference2ObjectMap<DataComponentType<?>, Optional<?>> map = new Reference2ObjectArrayMap();
  
+         Builder() {}
++
 +        // CraftBukkit start
 +        public void copy(DataComponentPatch orig) {
 +            this.map.putAll(orig.map);
@@ -32,20 +33,20 @@
 +        }
 +
 +        public boolean isSet(DataComponentType<?> type) {
-+            return map.containsKey(type);
++            return this.map.containsKey(type);
 +        }
 +
 +        public boolean isEmpty() {
 +            return this.map.isEmpty();
 +        }
-+
+ 
 +        @Override
 +        public boolean equals(Object object) {
 +            if (this == object) {
 +                return true;
 +            }
 +
-+            if (object instanceof DataComponentPatch.a patch) {
++            if (object instanceof DataComponentPatch.Builder patch) {
 +                return this.map.equals(patch.map);
 +            }
 +
@@ -58,6 +59,6 @@
 +        }
 +        // CraftBukkit end
 +
-         public <T> DataComponentPatch.a set(DataComponentType<T> datacomponenttype, T t0) {
-             this.map.put(datacomponenttype, Optional.of(t0));
+         public <T> DataComponentPatch.Builder set(DataComponentType<T> type, T value) {
+             this.map.put(type, Optional.of(value));
              return this;
diff --git a/paper-server/patches/sources/net/minecraft/core/dispenser/DispenseBehaviorBoat.patch b/paper-server/patches/sources/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java.patch
similarity index 54%
rename from paper-server/patches/sources/net/minecraft/core/dispenser/DispenseBehaviorBoat.patch
rename to paper-server/patches/sources/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java.patch
index 9bef9068df..67335c71ae 100644
--- a/paper-server/patches/sources/net/minecraft/core/dispenser/DispenseBehaviorBoat.patch
+++ b/paper-server/patches/sources/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java.patch
@@ -1,45 +1,44 @@
---- a/net/minecraft/core/dispenser/DispenseBehaviorBoat.java
-+++ b/net/minecraft/core/dispenser/DispenseBehaviorBoat.java
-@@ -12,6 +12,12 @@
- import net.minecraft.world.level.block.BlockDispenser;
- import net.minecraft.world.phys.Vec3D;
- 
+--- a/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java
++++ b/net/minecraft/core/dispenser/BoatDispenseItemBehavior.java
+@@ -11,6 +11,11 @@
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.level.block.DispenserBlock;
+ import net.minecraft.world.phys.Vec3;
 +// CraftBukkit start
 +import org.bukkit.craftbukkit.block.CraftBlock;
 +import org.bukkit.craftbukkit.inventory.CraftItemStack;
 +import org.bukkit.event.block.BlockDispenseEvent;
 +// CraftBukkit end
-+
- public class DispenseBehaviorBoat extends DispenseBehaviorItem {
  
-     private final DispenseBehaviorItem defaultDispenseItemBehavior = new DispenseBehaviorItem();
-@@ -43,14 +49,40 @@
+ public class BoatDispenseItemBehavior extends DefaultDispenseItemBehavior {
+ 
+@@ -43,14 +48,40 @@
              d4 = 0.0D;
          }
  
 +        // CraftBukkit start
-+        ItemStack itemstack1 = itemstack.split(1);
-+        org.bukkit.block.Block block = CraftBlock.at(worldserver, sourceblock.pos());
++        ItemStack itemstack1 = stack.split(1);
++        org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
 +        CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
 +
 +        BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(d1, d2 + d4, d3));
-+        if (!BlockDispenser.eventFired) {
++        if (!DispenserBlock.eventFired) {
 +            worldserver.getCraftServer().getPluginManager().callEvent(event);
 +        }
 +
 +        if (event.isCancelled()) {
-+            itemstack.grow(1);
-+            return itemstack;
++            stack.grow(1);
++            return stack;
 +        }
 +
 +        if (!event.getItem().equals(craftItem)) {
-+            itemstack.grow(1);
++            stack.grow(1);
 +            // Chain to handler for new item
 +            ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-+            IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.DISPENSER_REGISTRY.get(eventStack.getItem());
-+            if (idispensebehavior != IDispenseBehavior.NOOP && idispensebehavior != this) {
-+                idispensebehavior.dispense(sourceblock, eventStack);
-+                return itemstack;
++            DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
++            if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
++                idispensebehavior.dispense(pointer, eventStack);
++                return stack;
 +            }
 +        }
 +        // CraftBukkit end
@@ -48,12 +47,12 @@
          if (abstractboat != null) {
 -            abstractboat.setInitialPos(d1, d2 + d4, d3);
 +            abstractboat.setInitialPos(event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ()); // CraftBukkit
-             EntityTypes.createDefaultStackConfig(worldserver, itemstack, (EntityHuman) null).accept(abstractboat);
+             EntityType.createDefaultStackConfig(worldserver, stack, (Player) null).accept(abstractboat);
              abstractboat.setYRot(enumdirection.toYRot());
 -            worldserver.addFreshEntity(abstractboat);
--            itemstack.shrink(1);
-+            if (!worldserver.addFreshEntity(abstractboat)) itemstack.grow(1); // CraftBukkit
+-            stack.shrink(1);
++            if (!worldserver.addFreshEntity(abstractboat)) stack.grow(1); // CraftBukkit
 +            // itemstack.shrink(1); // CraftBukkit - handled during event processing
          }
  
-         return itemstack;
+         return stack;
diff --git a/paper-server/patches/sources/net/minecraft/core/dispenser/DefaultDispenseItemBehavior.java.patch b/paper-server/patches/sources/net/minecraft/core/dispenser/DefaultDispenseItemBehavior.java.patch
new file mode 100644
index 0000000000..106bd8d147
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/core/dispenser/DefaultDispenseItemBehavior.java.patch
@@ -0,0 +1,113 @@
+--- a/net/minecraft/core/dispenser/DefaultDispenseItemBehavior.java
++++ b/net/minecraft/core/dispenser/DefaultDispenseItemBehavior.java
+@@ -6,11 +6,25 @@
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.block.DispenserBlock;
++// CraftBukkit start
++import org.bukkit.craftbukkit.block.CraftBlock;
++import org.bukkit.craftbukkit.inventory.CraftItemStack;
++import org.bukkit.craftbukkit.util.CraftVector;
++import org.bukkit.event.block.BlockDispenseEvent;
++// CraftBukkit end
+ 
+ public class DefaultDispenseItemBehavior implements DispenseItemBehavior {
+ 
+     private static final int DEFAULT_ACCURACY = 6;
+ 
++    // CraftBukkit start
++    private boolean dropper;
++
++    public DefaultDispenseItemBehavior(boolean dropper) {
++        this.dropper = dropper;
++    }
++    // CraftBukkit end
++
+     public DefaultDispenseItemBehavior() {}
+ 
+     @Override
+@@ -27,26 +41,77 @@
+         Position iposition = DispenserBlock.getDispensePosition(pointer);
+         ItemStack itemstack1 = stack.split(1);
+ 
+-        DefaultDispenseItemBehavior.spawnItem(pointer.level(), itemstack1, 6, enumdirection, iposition);
++        // CraftBukkit start
++        if (!DefaultDispenseItemBehavior.spawnItem(pointer.level(), itemstack1, 6, enumdirection, pointer, this.dropper)) {
++            stack.grow(1);
++        }
++        // CraftBukkit end
+         return stack;
+     }
+ 
+     public static void spawnItem(Level world, ItemStack stack, int speed, Direction side, Position pos) {
+-        double d0 = pos.x();
+-        double d1 = pos.y();
+-        double d2 = pos.z();
++        // CraftBukkit start
++        ItemEntity entityitem = DefaultDispenseItemBehavior.prepareItem(world, stack, speed, side, pos);
++        world.addFreshEntity(entityitem);
++    }
+ 
+-        if (side.getAxis() == Direction.Axis.Y) {
++    private static ItemEntity prepareItem(Level world, ItemStack itemstack, int i, Direction enumdirection, Position iposition) {
++        // CraftBukkit end
++        double d0 = iposition.x();
++        double d1 = iposition.y();
++        double d2 = iposition.z();
++
++        if (enumdirection.getAxis() == Direction.Axis.Y) {
+             d1 -= 0.125D;
+         } else {
+             d1 -= 0.15625D;
+         }
+ 
+-        ItemEntity entityitem = new ItemEntity(world, d0, d1, d2, stack);
++        ItemEntity entityitem = new ItemEntity(world, d0, d1, d2, itemstack);
+         double d3 = world.random.nextDouble() * 0.1D + 0.2D;
+ 
+-        entityitem.setDeltaMovement(world.random.triangle((double) side.getStepX() * d3, 0.0172275D * (double) speed), world.random.triangle(0.2D, 0.0172275D * (double) speed), world.random.triangle((double) side.getStepZ() * d3, 0.0172275D * (double) speed));
++        entityitem.setDeltaMovement(world.random.triangle((double) enumdirection.getStepX() * d3, 0.0172275D * (double) i), world.random.triangle(0.2D, 0.0172275D * (double) i), world.random.triangle((double) enumdirection.getStepZ() * d3, 0.0172275D * (double) i));
++        // CraftBukkit start
++        return entityitem;
++    }
++
++    // CraftBukkit - void -> boolean return, IPosition -> ISourceBlock last argument, dropper
++    public static boolean spawnItem(Level world, ItemStack itemstack, int i, Direction enumdirection, BlockSource sourceblock, boolean dropper) {
++        if (itemstack.isEmpty()) return true;
++        Position iposition = DispenserBlock.getDispensePosition(sourceblock);
++        ItemEntity entityitem = DefaultDispenseItemBehavior.prepareItem(world, itemstack, i, enumdirection, iposition);
++
++        org.bukkit.block.Block block = CraftBlock.at(world, sourceblock.pos());
++        CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack);
++
++        BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), CraftVector.toBukkit(entityitem.getDeltaMovement()));
++        if (!DispenserBlock.eventFired) {
++            world.getCraftServer().getPluginManager().callEvent(event);
++        }
++
++        if (event.isCancelled()) {
++            return false;
++        }
++
++        entityitem.setItem(CraftItemStack.asNMSCopy(event.getItem()));
++        entityitem.setDeltaMovement(CraftVector.toNMS(event.getVelocity()));
++
++        if (!dropper && !event.getItem().getType().equals(craftItem.getType())) {
++            // Chain to handler for new item
++            ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
++            DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
++            if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior.getClass() != DefaultDispenseItemBehavior.class) {
++                idispensebehavior.dispense(sourceblock, eventStack);
++            } else {
++                world.addFreshEntity(entityitem);
++            }
++            return false;
++        }
++
+         world.addFreshEntity(entityitem);
++
++        return true;
++        // CraftBukkit end
+     }
+ 
+     protected void playSound(BlockSource pointer) {
diff --git a/paper-server/patches/sources/net/minecraft/core/dispenser/DispenseBehaviorItem.patch b/paper-server/patches/sources/net/minecraft/core/dispenser/DispenseBehaviorItem.patch
deleted file mode 100644
index 6244b3f3bd..0000000000
--- a/paper-server/patches/sources/net/minecraft/core/dispenser/DispenseBehaviorItem.patch
+++ /dev/null
@@ -1,100 +0,0 @@
---- a/net/minecraft/core/dispenser/DispenseBehaviorItem.java
-+++ b/net/minecraft/core/dispenser/DispenseBehaviorItem.java
-@@ -7,10 +7,25 @@
- import net.minecraft.world.level.World;
- import net.minecraft.world.level.block.BlockDispenser;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.block.CraftBlock;
-+import org.bukkit.craftbukkit.inventory.CraftItemStack;
-+import org.bukkit.craftbukkit.util.CraftVector;
-+import org.bukkit.event.block.BlockDispenseEvent;
-+// CraftBukkit end
-+
- public class DispenseBehaviorItem implements IDispenseBehavior {
- 
-     private static final int DEFAULT_ACCURACY = 6;
- 
-+    // CraftBukkit start
-+    private boolean dropper;
-+
-+    public DispenseBehaviorItem(boolean dropper) {
-+        this.dropper = dropper;
-+    }
-+    // CraftBukkit end
-+
-     public DispenseBehaviorItem() {}
- 
-     @Override
-@@ -27,11 +42,22 @@
-         IPosition iposition = BlockDispenser.getDispensePosition(sourceblock);
-         ItemStack itemstack1 = itemstack.split(1);
- 
--        spawnItem(sourceblock.level(), itemstack1, 6, enumdirection, iposition);
-+        // CraftBukkit start
-+        if (!spawnItem(sourceblock.level(), itemstack1, 6, enumdirection, sourceblock, dropper)) {
-+            itemstack.grow(1);
-+        }
-+        // CraftBukkit end
-         return itemstack;
-     }
- 
-     public static void spawnItem(World world, ItemStack itemstack, int i, EnumDirection enumdirection, IPosition iposition) {
-+        // CraftBukkit start
-+        EntityItem entityitem = prepareItem(world, itemstack, i, enumdirection, iposition);
-+        world.addFreshEntity(entityitem);
-+    }
-+
-+    private static EntityItem prepareItem(World world, ItemStack itemstack, int i, EnumDirection enumdirection, IPosition iposition) {
-+        // CraftBukkit end
-         double d0 = iposition.x();
-         double d1 = iposition.y();
-         double d2 = iposition.z();
-@@ -46,7 +72,47 @@
-         double d3 = world.random.nextDouble() * 0.1D + 0.2D;
- 
-         entityitem.setDeltaMovement(world.random.triangle((double) enumdirection.getStepX() * d3, 0.0172275D * (double) i), world.random.triangle(0.2D, 0.0172275D * (double) i), world.random.triangle((double) enumdirection.getStepZ() * d3, 0.0172275D * (double) i));
-+        // CraftBukkit start
-+        return entityitem;
-+    }
-+
-+    // CraftBukkit - void -> boolean return, IPosition -> ISourceBlock last argument, dropper
-+    public static boolean spawnItem(World world, ItemStack itemstack, int i, EnumDirection enumdirection, SourceBlock sourceblock, boolean dropper) {
-+        if (itemstack.isEmpty()) return true;
-+        IPosition iposition = BlockDispenser.getDispensePosition(sourceblock);
-+        EntityItem entityitem = prepareItem(world, itemstack, i, enumdirection, iposition);
-+
-+        org.bukkit.block.Block block = CraftBlock.at(world, sourceblock.pos());
-+        CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack);
-+
-+        BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), CraftVector.toBukkit(entityitem.getDeltaMovement()));
-+        if (!BlockDispenser.eventFired) {
-+            world.getCraftServer().getPluginManager().callEvent(event);
-+        }
-+
-+        if (event.isCancelled()) {
-+            return false;
-+        }
-+
-+        entityitem.setItem(CraftItemStack.asNMSCopy(event.getItem()));
-+        entityitem.setDeltaMovement(CraftVector.toNMS(event.getVelocity()));
-+
-+        if (!dropper && !event.getItem().getType().equals(craftItem.getType())) {
-+            // Chain to handler for new item
-+            ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-+            IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.DISPENSER_REGISTRY.get(eventStack.getItem());
-+            if (idispensebehavior != IDispenseBehavior.NOOP && idispensebehavior.getClass() != DispenseBehaviorItem.class) {
-+                idispensebehavior.dispense(sourceblock, eventStack);
-+            } else {
-+                world.addFreshEntity(entityitem);
-+            }
-+            return false;
-+        }
-+
-         world.addFreshEntity(entityitem);
-+
-+        return true;
-+        // CraftBukkit end
-     }
- 
-     protected void playSound(SourceBlock sourceblock) {
diff --git a/paper-server/patches/sources/net/minecraft/core/dispenser/DispenseBehaviorProjectile.patch b/paper-server/patches/sources/net/minecraft/core/dispenser/DispenseBehaviorProjectile.patch
deleted file mode 100644
index c18b84566a..0000000000
--- a/paper-server/patches/sources/net/minecraft/core/dispenser/DispenseBehaviorProjectile.patch
+++ /dev/null
@@ -1,58 +0,0 @@
---- a/net/minecraft/core/dispenser/DispenseBehaviorProjectile.java
-+++ b/net/minecraft/core/dispenser/DispenseBehaviorProjectile.java
-@@ -9,6 +9,12 @@
- import net.minecraft.world.item.ProjectileItem;
- import net.minecraft.world.level.block.BlockDispenser;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.block.CraftBlock;
-+import org.bukkit.craftbukkit.inventory.CraftItemStack;
-+import org.bukkit.event.block.BlockDispenseEvent;
-+// CraftBukkit end
-+
- public class DispenseBehaviorProjectile extends DispenseBehaviorItem {
- 
-     private final ProjectileItem projectileItem;
-@@ -31,8 +37,40 @@
-         EnumDirection enumdirection = (EnumDirection) sourceblock.state().getValue(BlockDispenser.FACING);
-         IPosition iposition = this.dispenseConfig.positionFunction().getDispensePosition(sourceblock, enumdirection);
- 
--        IProjectile.spawnProjectileUsingShoot(this.projectileItem.asProjectile(worldserver, iposition, itemstack, enumdirection), worldserver, itemstack, (double) enumdirection.getStepX(), (double) enumdirection.getStepY(), (double) enumdirection.getStepZ(), this.dispenseConfig.power(), this.dispenseConfig.uncertainty());
--        itemstack.shrink(1);
-+        // CraftBukkit start
-+        // IProjectile.spawnProjectileUsingShoot(this.projectileItem.asProjectile(worldserver, iposition, itemstack, enumdirection), worldserver, itemstack, (double) enumdirection.getStepX(), (double) enumdirection.getStepY(), (double) enumdirection.getStepZ(), this.dispenseConfig.power(), this.dispenseConfig.uncertainty()); // CraftBukkit - call when finish the BlockDispenseEvent
-+        ItemStack itemstack1 = itemstack.split(1);
-+        org.bukkit.block.Block block = CraftBlock.at(worldserver, sourceblock.pos());
-+        CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
-+
-+        BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector((double) enumdirection.getStepX(), (double) enumdirection.getStepY(), (double) enumdirection.getStepZ()));
-+        if (!BlockDispenser.eventFired) {
-+            worldserver.getCraftServer().getPluginManager().callEvent(event);
-+        }
-+
-+        if (event.isCancelled()) {
-+            itemstack.grow(1);
-+            return itemstack;
-+        }
-+
-+        if (!event.getItem().equals(craftItem)) {
-+            itemstack.grow(1);
-+            // Chain to handler for new item
-+            ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-+            IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.DISPENSER_REGISTRY.get(eventStack.getItem());
-+            if (idispensebehavior != IDispenseBehavior.NOOP && idispensebehavior != this) {
-+                idispensebehavior.dispense(sourceblock, eventStack);
-+                return itemstack;
-+            }
-+        }
-+
-+        // SPIGOT-7923: Avoid create projectiles with empty item
-+        if (!itemstack1.isEmpty()) {
-+            IProjectile iprojectile = IProjectile.spawnProjectileUsingShoot(this.projectileItem.asProjectile(worldserver, iposition, itemstack1, enumdirection), worldserver, itemstack1, event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ(), this.dispenseConfig.power(), this.dispenseConfig.uncertainty());
-+            iprojectile.projectileSource = new org.bukkit.craftbukkit.projectiles.CraftBlockProjectileSource(sourceblock.blockEntity());
-+        }
-+        // itemstack.shrink(1); // CraftBukkit - Handled during event processing
-+        // CraftBukkit end
-         return itemstack;
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/core/dispenser/DispenseBehaviorShears.patch b/paper-server/patches/sources/net/minecraft/core/dispenser/DispenseBehaviorShears.patch
deleted file mode 100644
index 6e0926874b..0000000000
--- a/paper-server/patches/sources/net/minecraft/core/dispenser/DispenseBehaviorShears.patch
+++ /dev/null
@@ -1,73 +0,0 @@
---- a/net/minecraft/core/dispenser/DispenseBehaviorShears.java
-+++ b/net/minecraft/core/dispenser/DispenseBehaviorShears.java
-@@ -23,6 +23,13 @@
- import net.minecraft.world.level.gameevent.GameEvent;
- import net.minecraft.world.phys.AxisAlignedBB;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.block.CraftBlock;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.craftbukkit.inventory.CraftItemStack;
-+import org.bukkit.event.block.BlockDispenseEvent;
-+// CraftBukkit end
-+
- public class DispenseBehaviorShears extends DispenseBehaviorMaybe {
- 
-     public DispenseBehaviorShears() {}
-@@ -30,11 +37,34 @@
-     @Override
-     protected ItemStack execute(SourceBlock sourceblock, ItemStack itemstack) {
-         WorldServer worldserver = sourceblock.level();
-+        // CraftBukkit start
-+        org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, sourceblock.pos());
-+        CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack);
-+
-+        BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0));
-+        if (!BlockDispenser.eventFired) {
-+            worldserver.getCraftServer().getPluginManager().callEvent(event);
-+        }
-+
-+        if (event.isCancelled()) {
-+            return itemstack;
-+        }
-+
-+        if (!event.getItem().equals(craftItem)) {
-+            // Chain to handler for new item
-+            ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-+            IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.DISPENSER_REGISTRY.get(eventStack.getItem());
-+            if (idispensebehavior != IDispenseBehavior.NOOP && idispensebehavior != this) {
-+                idispensebehavior.dispense(sourceblock, eventStack);
-+                return itemstack;
-+            }
-+        }
-+        // CraftBukkit end
- 
-         if (!worldserver.isClientSide()) {
-             BlockPosition blockposition = sourceblock.pos().relative((EnumDirection) sourceblock.state().getValue(BlockDispenser.FACING));
- 
--            this.setSuccess(tryShearBeehive(worldserver, blockposition) || tryShearLivingEntity(worldserver, blockposition, itemstack));
-+            this.setSuccess(tryShearBeehive(worldserver, blockposition) || tryShearLivingEntity(worldserver, blockposition, itemstack, bukkitBlock, craftItem)); // CraftBukkit
-             if (this.isSuccess()) {
-                 itemstack.hurtAndBreak(1, worldserver, (EntityPlayer) null, (item) -> {
-                 });
-@@ -64,7 +94,7 @@
-         return false;
-     }
- 
--    private static boolean tryShearLivingEntity(WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack) {
-+    private static boolean tryShearLivingEntity(WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack, org.bukkit.block.Block bukkitBlock, CraftItemStack craftItem) { // CraftBukkit - add args
-         List<EntityLiving> list = worldserver.getEntitiesOfClass(EntityLiving.class, new AxisAlignedBB(blockposition), IEntitySelector.NO_SPECTATORS);
-         Iterator iterator = list.iterator();
- 
-@@ -73,6 +103,11 @@
- 
-             if (entityliving instanceof IShearable ishearable) {
-                 if (ishearable.readyForShearing()) {
-+                    // CraftBukkit start
-+                    if (CraftEventFactory.callBlockShearEntityEvent(entityliving, bukkitBlock, craftItem).isCancelled()) {
-+                        continue;
-+                    }
-+                    // CraftBukkit end
-                     ishearable.shear(worldserver, SoundCategory.BLOCKS, itemstack);
-                     worldserver.gameEvent((Entity) null, (Holder) GameEvent.SHEAR, blockposition);
-                     return true;
diff --git a/paper-server/patches/sources/net/minecraft/core/dispenser/DispenseBehaviorShulkerBox.patch b/paper-server/patches/sources/net/minecraft/core/dispenser/DispenseBehaviorShulkerBox.patch
deleted file mode 100644
index 4c4b20013c..0000000000
--- a/paper-server/patches/sources/net/minecraft/core/dispenser/DispenseBehaviorShulkerBox.patch
+++ /dev/null
@@ -1,46 +0,0 @@
---- a/net/minecraft/core/dispenser/DispenseBehaviorShulkerBox.java
-+++ b/net/minecraft/core/dispenser/DispenseBehaviorShulkerBox.java
-@@ -10,6 +10,12 @@
- import net.minecraft.world.level.block.BlockDispenser;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.block.CraftBlock;
-+import org.bukkit.craftbukkit.inventory.CraftItemStack;
-+import org.bukkit.event.block.BlockDispenseEvent;
-+// CraftBukkit end
-+
- public class DispenseBehaviorShulkerBox extends DispenseBehaviorMaybe {
- 
-     private static final Logger LOGGER = LogUtils.getLogger();
-@@ -26,6 +32,30 @@
-             BlockPosition blockposition = sourceblock.pos().relative(enumdirection);
-             EnumDirection enumdirection1 = sourceblock.level().isEmptyBlock(blockposition.below()) ? enumdirection : EnumDirection.UP;
- 
-+            // CraftBukkit start
-+            org.bukkit.block.Block bukkitBlock = CraftBlock.at(sourceblock.level(), sourceblock.pos());
-+            CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack);
-+
-+            BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
-+            if (!BlockDispenser.eventFired) {
-+                sourceblock.level().getCraftServer().getPluginManager().callEvent(event);
-+            }
-+
-+            if (event.isCancelled()) {
-+                return itemstack;
-+            }
-+
-+            if (!event.getItem().equals(craftItem)) {
-+                // Chain to handler for new item
-+                ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-+                IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.DISPENSER_REGISTRY.get(eventStack.getItem());
-+                if (idispensebehavior != IDispenseBehavior.NOOP && idispensebehavior != this) {
-+                    idispensebehavior.dispense(sourceblock, eventStack);
-+                    return itemstack;
-+                }
-+            }
-+            // CraftBukkit end
-+
-             try {
-                 this.setSuccess(((ItemBlock) item).place(new BlockActionContextDirectional(sourceblock.level(), blockposition, enumdirection, itemstack, enumdirection1)).consumesAction());
-             } catch (Exception exception) {
diff --git a/paper-server/patches/sources/net/minecraft/core/dispenser/IDispenseBehavior.patch b/paper-server/patches/sources/net/minecraft/core/dispenser/DispenseItemBehavior.java.patch
similarity index 51%
rename from paper-server/patches/sources/net/minecraft/core/dispenser/IDispenseBehavior.patch
rename to paper-server/patches/sources/net/minecraft/core/dispenser/DispenseItemBehavior.java.patch
index 9ea817d606..0f5f4ec00a 100644
--- a/paper-server/patches/sources/net/minecraft/core/dispenser/IDispenseBehavior.patch
+++ b/paper-server/patches/sources/net/minecraft/core/dispenser/DispenseItemBehavior.java.patch
@@ -1,13 +1,27 @@
---- a/net/minecraft/core/dispenser/IDispenseBehavior.java
-+++ b/net/minecraft/core/dispenser/IDispenseBehavior.java
-@@ -63,6 +63,22 @@
- import net.minecraft.world.phys.MovingObjectPositionBlock;
+--- a/net/minecraft/core/dispenser/DispenseItemBehavior.java
++++ b/net/minecraft/core/dispenser/DispenseItemBehavior.java
+@@ -28,6 +28,7 @@
+ import net.minecraft.world.entity.item.PrimedTnt;
+ import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.item.BoneMealItem;
++import net.minecraft.world.item.BucketItem;
+ import net.minecraft.world.item.DispensibleContainerItem;
+ import net.minecraft.world.item.DyeColor;
+ import net.minecraft.world.item.HoneycombItem;
+@@ -47,7 +48,9 @@
+ import net.minecraft.world.level.block.CandleCakeBlock;
+ import net.minecraft.world.level.block.CarvedPumpkinBlock;
+ import net.minecraft.world.level.block.DispenserBlock;
++import net.minecraft.world.level.block.LiquidBlockContainer;
+ import net.minecraft.world.level.block.RespawnAnchorBlock;
++import net.minecraft.world.level.block.SaplingBlock;
+ import net.minecraft.world.level.block.ShulkerBoxBlock;
+ import net.minecraft.world.level.block.SkullBlock;
+ import net.minecraft.world.level.block.TntBlock;
+@@ -62,6 +65,17 @@
+ import net.minecraft.world.phys.AABB;
+ import net.minecraft.world.phys.BlockHitResult;
  import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import net.minecraft.world.item.ItemBucket;
-+import net.minecraft.world.level.block.BlockSapling;
-+import net.minecraft.world.level.block.IFluidContainer;
 +import org.bukkit.Location;
 +import org.bukkit.TreeType;
 +import org.bukkit.craftbukkit.block.CraftBlock;
@@ -19,163 +33,162 @@
 +import org.bukkit.event.block.BlockFertilizeEvent;
 +import org.bukkit.event.world.StructureGrowEvent;
 +// CraftBukkit end
-+
- public interface IDispenseBehavior {
  
-     Logger LOGGER = LogUtils.getLogger();
-@@ -90,14 +106,42 @@
-                 EnumDirection enumdirection = (EnumDirection) sourceblock.state().getValue(BlockDispenser.FACING);
-                 EntityTypes<?> entitytypes = ((ItemMonsterEgg) itemstack.getItem()).getType(sourceblock.level().registryAccess(), itemstack);
+ public interface DispenseItemBehavior {
+ 
+@@ -90,14 +104,42 @@
+                 Direction enumdirection = (Direction) pointer.state().getValue(DispenserBlock.FACING);
+                 EntityType<?> entitytypes = ((SpawnEggItem) stack.getItem()).getType(pointer.level().registryAccess(), stack);
  
 +                // CraftBukkit start
-+                WorldServer worldserver = sourceblock.level();
-+                ItemStack itemstack1 = itemstack.split(1);
-+                org.bukkit.block.Block block = CraftBlock.at(worldserver, sourceblock.pos());
++                ServerLevel worldserver = pointer.level();
++                ItemStack itemstack1 = stack.split(1);
++                org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
 +                CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
 +
 +                BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0));
-+                if (!BlockDispenser.eventFired) {
++                if (!DispenserBlock.eventFired) {
 +                    worldserver.getCraftServer().getPluginManager().callEvent(event);
 +                }
 +
 +                if (event.isCancelled()) {
-+                    itemstack.grow(1);
-+                    return itemstack;
++                    stack.grow(1);
++                    return stack;
 +                }
 +
 +                if (!event.getItem().equals(craftItem)) {
-+                    itemstack.grow(1);
++                    stack.grow(1);
 +                    // Chain to handler for new item
 +                    ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-+                    IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.DISPENSER_REGISTRY.get(eventStack.getItem());
-+                    if (idispensebehavior != IDispenseBehavior.NOOP && idispensebehavior != this) {
-+                        idispensebehavior.dispense(sourceblock, eventStack);
-+                        return itemstack;
++                    DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
++                    if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
++                        idispensebehavior.dispense(pointer, eventStack);
++                        return stack;
 +                    }
 +                }
 +
                  try {
-                     entitytypes.spawn(sourceblock.level(), itemstack, (EntityHuman) null, sourceblock.pos().relative(enumdirection), EntitySpawnReason.DISPENSER, enumdirection != EnumDirection.UP, false);
+                     entitytypes.spawn(pointer.level(), stack, (Player) null, pointer.pos().relative(enumdirection), EntitySpawnReason.DISPENSER, enumdirection != Direction.UP, false);
                  } catch (Exception exception) {
--                    null.LOGGER.error("Error while dispensing spawn egg from dispenser at {}", sourceblock.pos(), exception);
-+                    LOGGER.error("Error while dispensing spawn egg from dispenser at {}", sourceblock.pos(), exception); // CraftBukkit - decompile error
+-                    null.LOGGER.error("Error while dispensing spawn egg from dispenser at {}", pointer.pos(), exception);
++                    DispenseItemBehavior.LOGGER.error("Error while dispensing spawn egg from dispenser at {}", pointer.pos(), exception); // CraftBukkit - decompile error
                      return ItemStack.EMPTY;
                  }
  
--                itemstack.shrink(1);
+-                stack.shrink(1);
 +                // itemstack.shrink(1); // Handled during event processing
 +                // CraftBukkit end
-                 sourceblock.level().gameEvent((Entity) null, (Holder) GameEvent.ENTITY_PLACE, sourceblock.pos());
-                 return itemstack;
+                 pointer.level().gameEvent((Entity) null, (Holder) GameEvent.ENTITY_PLACE, pointer.pos());
+                 return stack;
              }
-@@ -116,13 +160,41 @@
-                 EnumDirection enumdirection = (EnumDirection) sourceblock.state().getValue(BlockDispenser.FACING);
-                 BlockPosition blockposition = sourceblock.pos().relative(enumdirection);
-                 WorldServer worldserver = sourceblock.level();
+@@ -116,13 +158,41 @@
+                 Direction enumdirection = (Direction) pointer.state().getValue(DispenserBlock.FACING);
+                 BlockPos blockposition = pointer.pos().relative(enumdirection);
+                 ServerLevel worldserver = pointer.level();
 +
 +                // CraftBukkit start
-+                ItemStack itemstack1 = itemstack.split(1);
-+                org.bukkit.block.Block block = CraftBlock.at(worldserver, sourceblock.pos());
++                ItemStack itemstack1 = stack.split(1);
++                org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
 +                CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
 +
 +                BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0));
-+                if (!BlockDispenser.eventFired) {
++                if (!DispenserBlock.eventFired) {
 +                    worldserver.getCraftServer().getPluginManager().callEvent(event);
 +                }
 +
 +                if (event.isCancelled()) {
-+                    itemstack.grow(1);
-+                    return itemstack;
++                    stack.grow(1);
++                    return stack;
 +                }
 +
 +                if (!event.getItem().equals(craftItem)) {
-+                    itemstack.grow(1);
++                    stack.grow(1);
 +                    // Chain to handler for new item
 +                    ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-+                    IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.DISPENSER_REGISTRY.get(eventStack.getItem());
-+                    if (idispensebehavior != IDispenseBehavior.NOOP && idispensebehavior != this) {
-+                        idispensebehavior.dispense(sourceblock, eventStack);
-+                        return itemstack;
++                    DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
++                    if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
++                        idispensebehavior.dispense(pointer, eventStack);
++                        return stack;
 +                    }
 +                }
 +                // CraftBukkit end
 +
-                 Consumer<EntityArmorStand> consumer = EntityTypes.appendDefaultStackConfig((entityarmorstand) -> {
+                 Consumer<ArmorStand> consumer = EntityType.appendDefaultStackConfig((entityarmorstand) -> {
                      entityarmorstand.setYRot(enumdirection.toYRot());
-                 }, worldserver, itemstack, (EntityHuman) null);
-                 EntityArmorStand entityarmorstand = (EntityArmorStand) EntityTypes.ARMOR_STAND.spawn(worldserver, consumer, blockposition, EntitySpawnReason.DISPENSER, false, false);
+                 }, worldserver, stack, (Player) null);
+                 ArmorStand entityarmorstand = (ArmorStand) EntityType.ARMOR_STAND.spawn(worldserver, consumer, blockposition, EntitySpawnReason.DISPENSER, false, false);
  
                  if (entityarmorstand != null) {
--                    itemstack.shrink(1);
+-                    stack.shrink(1);
 +                    // itemstack.shrink(1); // CraftBukkit - Handled during event processing
                  }
  
-                 return itemstack;
-@@ -141,7 +213,34 @@
+                 return stack;
+@@ -141,7 +211,34 @@
                  });
  
                  if (!list.isEmpty()) {
--                    ((ISaddleable) list.get(0)).equipSaddle(itemstack.split(1), SoundCategory.BLOCKS);
+-                    ((Saddleable) list.get(0)).equipSaddle(stack.split(1), SoundSource.BLOCKS);
 +                    // CraftBukkit start
-+                    ItemStack itemstack1 = itemstack.split(1);
-+                    WorldServer world = sourceblock.level();
-+                    org.bukkit.block.Block block = CraftBlock.at(world, sourceblock.pos());
++                    ItemStack itemstack1 = stack.split(1);
++                    ServerLevel world = pointer.level();
++                    org.bukkit.block.Block block = CraftBlock.at(world, pointer.pos());
 +                    CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
 +
 +                    BlockDispenseArmorEvent event = new BlockDispenseArmorEvent(block, craftItem.clone(), (org.bukkit.craftbukkit.entity.CraftLivingEntity) list.get(0).getBukkitEntity());
-+                    if (!BlockDispenser.eventFired) {
++                    if (!DispenserBlock.eventFired) {
 +                        world.getCraftServer().getPluginManager().callEvent(event);
 +                    }
 +
 +                    if (event.isCancelled()) {
-+                        itemstack.grow(1);
-+                        return itemstack;
++                        stack.grow(1);
++                        return stack;
 +                    }
 +
 +                    if (!event.getItem().equals(craftItem)) {
-+                        itemstack.grow(1);
++                        stack.grow(1);
 +                        // Chain to handler for new item
 +                        ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-+                        IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.DISPENSER_REGISTRY.get(eventStack.getItem());
-+                        if (idispensebehavior != IDispenseBehavior.NOOP && idispensebehavior != EquipmentDispenseItemBehavior.INSTANCE) {
-+                            idispensebehavior.dispense(sourceblock, eventStack);
-+                            return itemstack;
++                        DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
++                        if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != EquipmentDispenseItemBehavior.INSTANCE) {
++                            idispensebehavior.dispense(pointer, eventStack);
++                            return stack;
 +                        }
 +                    }
-+                    ((ISaddleable) list.get(0)).equipSaddle(itemstack1, SoundCategory.BLOCKS);
++                    ((Saddleable) list.get(0)).equipSaddle(itemstack1, SoundSource.BLOCKS);
 +                    // CraftBukkit end
                      this.setSuccess(true);
-                     return itemstack;
+                     return stack;
                  } else {
-@@ -166,9 +265,35 @@
+@@ -166,9 +263,35 @@
                      }
  
-                     entityhorsechestedabstract = (EntityHorseChestedAbstract) iterator1.next();
--                } while (!entityhorsechestedabstract.isTamed() || !entityhorsechestedabstract.getSlot(499).set(itemstack));
+                     entityhorsechestedabstract = (AbstractChestedHorse) iterator1.next();
+-                } while (!entityhorsechestedabstract.isTamed() || !entityhorsechestedabstract.getSlot(499).set(stack));
 +                    // CraftBukkit start
 +                } while (!entityhorsechestedabstract.isTamed());
-+                ItemStack itemstack1 = itemstack.split(1);
-+                WorldServer world = sourceblock.level();
-+                org.bukkit.block.Block block = CraftBlock.at(world, sourceblock.pos());
++                ItemStack itemstack1 = stack.split(1);
++                ServerLevel world = pointer.level();
++                org.bukkit.block.Block block = CraftBlock.at(world, pointer.pos());
 +                CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
  
--                itemstack.shrink(1);
+-                stack.shrink(1);
 +                BlockDispenseArmorEvent event = new BlockDispenseArmorEvent(block, craftItem.clone(), (org.bukkit.craftbukkit.entity.CraftLivingEntity) entityhorsechestedabstract.getBukkitEntity());
-+                if (!BlockDispenser.eventFired) {
++                if (!DispenserBlock.eventFired) {
 +                    world.getCraftServer().getPluginManager().callEvent(event);
 +                }
 +
 +                if (event.isCancelled()) {
-+                    return itemstack;
++                    return stack;
 +                }
 +
 +                if (!event.getItem().equals(craftItem)) {
 +                    // Chain to handler for new item
 +                    ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-+                    IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.DISPENSER_REGISTRY.get(eventStack.getItem());
-+                    if (idispensebehavior != IDispenseBehavior.NOOP && idispensebehavior != EquipmentDispenseItemBehavior.INSTANCE) {
-+                        idispensebehavior.dispense(sourceblock, eventStack);
-+                        return itemstack;
++                    DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
++                    if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != EquipmentDispenseItemBehavior.INSTANCE) {
++                        idispensebehavior.dispense(pointer, eventStack);
++                        return stack;
 +                    }
 +                }
 +                entityhorsechestedabstract.getSlot(499).set(CraftItemStack.asNMSCopy(event.getItem()));
@@ -183,37 +196,37 @@
 +
 +                // itemstack.shrink(1); // CraftBukkit - handled above
                  this.setSuccess(true);
-                 return itemstack;
+                 return stack;
              }
-@@ -202,6 +327,38 @@
-                 BlockPosition blockposition = sourceblock.pos().relative((EnumDirection) sourceblock.state().getValue(BlockDispenser.FACING));
-                 WorldServer worldserver = sourceblock.level();
+@@ -202,6 +325,38 @@
+                 BlockPos blockposition = pointer.pos().relative((Direction) pointer.state().getValue(DispenserBlock.FACING));
+                 ServerLevel worldserver = pointer.level();
  
 +                // CraftBukkit start
 +                int x = blockposition.getX();
 +                int y = blockposition.getY();
 +                int z = blockposition.getZ();
-+                IBlockData iblockdata = worldserver.getBlockState(blockposition);
-+                if (iblockdata.isAir() || iblockdata.canBeReplaced() || (dispensiblecontaineritem instanceof ItemBucket && iblockdata.getBlock() instanceof IFluidContainer && ((IFluidContainer) iblockdata.getBlock()).canPlaceLiquid((EntityHuman) null, worldserver, blockposition, iblockdata, ((ItemBucket) dispensiblecontaineritem).content))) {
-+                    org.bukkit.block.Block block = CraftBlock.at(worldserver, sourceblock.pos());
-+                    CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack);
++                BlockState iblockdata = worldserver.getBlockState(blockposition);
++                if (iblockdata.isAir() || iblockdata.canBeReplaced() || (dispensiblecontaineritem instanceof BucketItem && iblockdata.getBlock() instanceof LiquidBlockContainer && ((LiquidBlockContainer) iblockdata.getBlock()).canPlaceLiquid((Player) null, worldserver, blockposition, iblockdata, ((BucketItem) dispensiblecontaineritem).content))) {
++                    org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
++                    CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack);
 +
 +                    BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(x, y, z));
-+                    if (!BlockDispenser.eventFired) {
++                    if (!DispenserBlock.eventFired) {
 +                        worldserver.getCraftServer().getPluginManager().callEvent(event);
 +                    }
 +
 +                    if (event.isCancelled()) {
-+                        return itemstack;
++                        return stack;
 +                    }
 +
 +                    if (!event.getItem().equals(craftItem)) {
 +                        // Chain to handler for new item
 +                        ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-+                        IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.DISPENSER_REGISTRY.get(eventStack.getItem());
-+                        if (idispensebehavior != IDispenseBehavior.NOOP && idispensebehavior != this) {
-+                            idispensebehavior.dispense(sourceblock, eventStack);
-+                            return itemstack;
++                        DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
++                        if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
++                            idispensebehavior.dispense(pointer, eventStack);
++                            return stack;
 +                        }
 +                    }
 +
@@ -221,130 +234,130 @@
 +                }
 +                // CraftBukkit end
 +
-                 if (dispensiblecontaineritem.emptyContents((EntityHuman) null, worldserver, blockposition, (MovingObjectPositionBlock) null)) {
-                     dispensiblecontaineritem.checkExtraContent((EntityHuman) null, worldserver, itemstack, blockposition);
-                     return this.consumeWithRemainder(sourceblock, itemstack, new ItemStack(Items.BUCKET));
-@@ -229,7 +386,7 @@
+                 if (dispensiblecontaineritem.emptyContents((Player) null, worldserver, blockposition, (BlockHitResult) null)) {
+                     dispensiblecontaineritem.checkExtraContent((Player) null, worldserver, stack, blockposition);
+                     return this.consumeWithRemainder(pointer, stack, new ItemStack(Items.BUCKET));
+@@ -229,7 +384,7 @@
                  Block block = iblockdata.getBlock();
  
-                 if (block instanceof IFluidSource ifluidsource) {
--                    ItemStack itemstack1 = ifluidsource.pickupBlock((EntityHuman) null, worldserver, blockposition, iblockdata);
-+                    ItemStack itemstack1 = ifluidsource.pickupBlock((EntityHuman) null, DummyGeneratorAccess.INSTANCE, blockposition, iblockdata); // CraftBukkit
+                 if (block instanceof BucketPickup ifluidsource) {
+-                    ItemStack itemstack1 = ifluidsource.pickupBlock((Player) null, worldserver, blockposition, iblockdata);
++                    ItemStack itemstack1 = ifluidsource.pickupBlock((Player) null, DummyGeneratorAccess.INSTANCE, blockposition, iblockdata); // CraftBukkit
  
                      if (itemstack1.isEmpty()) {
-                         return super.execute(sourceblock, itemstack);
-@@ -237,6 +394,32 @@
+                         return super.execute(pointer, stack);
+@@ -237,6 +392,32 @@
                          worldserver.gameEvent((Entity) null, (Holder) GameEvent.FLUID_PICKUP, blockposition);
                          Item item = itemstack1.getItem();
  
 +                        // CraftBukkit start
-+                        org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, sourceblock.pos());
-+                        CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack);
++                        org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos());
++                        CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack);
 +
 +                        BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
-+                        if (!BlockDispenser.eventFired) {
++                        if (!DispenserBlock.eventFired) {
 +                            worldserver.getCraftServer().getPluginManager().callEvent(event);
 +                        }
 +
 +                        if (event.isCancelled()) {
-+                            return itemstack;
++                            return stack;
 +                        }
 +
 +                        if (!event.getItem().equals(craftItem)) {
 +                            // Chain to handler for new item
 +                            ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-+                            IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.DISPENSER_REGISTRY.get(eventStack.getItem());
-+                            if (idispensebehavior != IDispenseBehavior.NOOP && idispensebehavior != this) {
-+                                idispensebehavior.dispense(sourceblock, eventStack);
-+                                return itemstack;
++                            DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
++                            if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
++                                idispensebehavior.dispense(pointer, eventStack);
++                                return stack;
 +                            }
 +                        }
 +
-+                        itemstack1 = ifluidsource.pickupBlock((EntityHuman) null, worldserver, blockposition, iblockdata); // From above
++                        itemstack1 = ifluidsource.pickupBlock((Player) null, worldserver, blockposition, iblockdata); // From above
 +                        // CraftBukkit end
 +
-                         return this.consumeWithRemainder(sourceblock, itemstack, new ItemStack(item));
+                         return this.consumeWithRemainder(pointer, stack, new ItemStack(item));
                      }
                  } else {
-@@ -249,16 +432,44 @@
-             protected ItemStack execute(SourceBlock sourceblock, ItemStack itemstack) {
-                 WorldServer worldserver = sourceblock.level();
+@@ -249,16 +430,44 @@
+             protected ItemStack execute(BlockSource pointer, ItemStack stack) {
+                 ServerLevel worldserver = pointer.level();
  
 +                // CraftBukkit start
-+                org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, sourceblock.pos());
-+                CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack);
++                org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos());
++                CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack);
 +
 +                BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0));
-+                if (!BlockDispenser.eventFired) {
++                if (!DispenserBlock.eventFired) {
 +                    worldserver.getCraftServer().getPluginManager().callEvent(event);
 +                }
 +
 +                if (event.isCancelled()) {
-+                    return itemstack;
++                    return stack;
 +                }
 +
 +                if (!event.getItem().equals(craftItem)) {
 +                    // Chain to handler for new item
 +                    ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-+                    IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.DISPENSER_REGISTRY.get(eventStack.getItem());
-+                    if (idispensebehavior != IDispenseBehavior.NOOP && idispensebehavior != this) {
-+                        idispensebehavior.dispense(sourceblock, eventStack);
-+                        return itemstack;
++                    DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
++                    if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
++                        idispensebehavior.dispense(pointer, eventStack);
++                        return stack;
 +                    }
 +                }
 +                // CraftBukkit end
 +
                  this.setSuccess(true);
-                 EnumDirection enumdirection = (EnumDirection) sourceblock.state().getValue(BlockDispenser.FACING);
-                 BlockPosition blockposition = sourceblock.pos().relative(enumdirection);
-                 IBlockData iblockdata = worldserver.getBlockState(blockposition);
+                 Direction enumdirection = (Direction) pointer.state().getValue(DispenserBlock.FACING);
+                 BlockPos blockposition = pointer.pos().relative(enumdirection);
+                 BlockState iblockdata = worldserver.getBlockState(blockposition);
  
-                 if (BlockFireAbstract.canBePlacedAt(worldserver, blockposition, enumdirection)) {
--                    worldserver.setBlockAndUpdate(blockposition, BlockFireAbstract.getState(worldserver, blockposition));
+                 if (BaseFireBlock.canBePlacedAt(worldserver, blockposition, enumdirection)) {
+-                    worldserver.setBlockAndUpdate(blockposition, BaseFireBlock.getState(worldserver, blockposition));
 -                    worldserver.gameEvent((Entity) null, (Holder) GameEvent.BLOCK_PLACE, blockposition);
 +                    // CraftBukkit start - Ignition by dispensing flint and steel
-+                    if (!org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(worldserver, blockposition, sourceblock.pos()).isCancelled()) {
-+                        worldserver.setBlockAndUpdate(blockposition, BlockFireAbstract.getState(worldserver, blockposition));
++                    if (!org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(worldserver, blockposition, pointer.pos()).isCancelled()) {
++                        worldserver.setBlockAndUpdate(blockposition, BaseFireBlock.getState(worldserver, blockposition));
 +                        worldserver.gameEvent((Entity) null, (Holder) GameEvent.BLOCK_PLACE, blockposition);
 +                    }
 +                    // CraftBukkit end
-                 } else if (!BlockCampfire.canLight(iblockdata) && !CandleBlock.canLight(iblockdata) && !CandleCakeBlock.canLight(iblockdata)) {
--                    if (iblockdata.getBlock() instanceof BlockTNT) {
-+                    if (iblockdata.getBlock() instanceof BlockTNT && org.bukkit.craftbukkit.event.CraftEventFactory.callTNTPrimeEvent(worldserver, blockposition, org.bukkit.event.block.TNTPrimeEvent.PrimeCause.DISPENSER, null, sourceblock.pos())) { // CraftBukkit - TNTPrimeEvent
-                         BlockTNT.explode(worldserver, blockposition);
+                 } else if (!CampfireBlock.canLight(iblockdata) && !CandleBlock.canLight(iblockdata) && !CandleCakeBlock.canLight(iblockdata)) {
+-                    if (iblockdata.getBlock() instanceof TntBlock) {
++                    if (iblockdata.getBlock() instanceof TntBlock && org.bukkit.craftbukkit.event.CraftEventFactory.callTNTPrimeEvent(worldserver, blockposition, org.bukkit.event.block.TNTPrimeEvent.PrimeCause.DISPENSER, null, pointer.pos())) { // CraftBukkit - TNTPrimeEvent
+                         TntBlock.explode(worldserver, blockposition);
                          worldserver.removeBlock(blockposition, false);
                      } else {
-@@ -283,12 +494,62 @@
+@@ -283,13 +492,63 @@
                  this.setSuccess(true);
-                 WorldServer worldserver = sourceblock.level();
-                 BlockPosition blockposition = sourceblock.pos().relative((EnumDirection) sourceblock.state().getValue(BlockDispenser.FACING));
+                 ServerLevel worldserver = pointer.level();
+                 BlockPos blockposition = pointer.pos().relative((Direction) pointer.state().getValue(DispenserBlock.FACING));
 +                // CraftBukkit start
-+                org.bukkit.block.Block block = CraftBlock.at(worldserver, sourceblock.pos());
-+                CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack);
-+
++                org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
++                CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack);
+ 
 +                BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0));
-+                if (!BlockDispenser.eventFired) {
++                if (!DispenserBlock.eventFired) {
 +                    worldserver.getCraftServer().getPluginManager().callEvent(event);
 +                }
 +
 +                if (event.isCancelled()) {
-+                    return itemstack;
++                    return stack;
 +                }
 +
 +                if (!event.getItem().equals(craftItem)) {
 +                    // Chain to handler for new item
 +                    ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-+                    IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.DISPENSER_REGISTRY.get(eventStack.getItem());
-+                    if (idispensebehavior != IDispenseBehavior.NOOP && idispensebehavior != this) {
-+                        idispensebehavior.dispense(sourceblock, eventStack);
-+                        return itemstack;
++                    DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
++                    if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
++                        idispensebehavior.dispense(pointer, eventStack);
++                        return stack;
 +                    }
 +                }
 +
 +                worldserver.captureTreeGeneration = true;
 +                // CraftBukkit end
- 
-                 if (!ItemBoneMeal.growCrop(itemstack, worldserver, blockposition) && !ItemBoneMeal.growWaterPlant(itemstack, worldserver, blockposition, (EnumDirection) null)) {
++
+                 if (!BoneMealItem.growCrop(stack, worldserver, blockposition) && !BoneMealItem.growWaterPlant(stack, worldserver, blockposition, (Direction) null)) {
                      this.setSuccess(false);
                  } else if (!worldserver.isClientSide) {
                      worldserver.levelEvent(1505, blockposition, 15);
@@ -352,8 +365,8 @@
 +                // CraftBukkit start
 +                worldserver.captureTreeGeneration = false;
 +                if (worldserver.capturedBlockStates.size() > 0) {
-+                    TreeType treeType = BlockSapling.treeType;
-+                    BlockSapling.treeType = null;
++                    TreeType treeType = SaplingBlock.treeType;
++                    SaplingBlock.treeType = null;
 +                    Location location = CraftLocation.toBukkit(blockposition, worldserver.getWorld());
 +                    List<org.bukkit.block.BlockState> blocks = new java.util.ArrayList<>(worldserver.capturedBlockStates.values());
 +                    worldserver.capturedBlockStates.clear();
@@ -362,7 +375,7 @@
 +                        structureEvent = new StructureGrowEvent(location, treeType, false, null, blocks);
 +                        org.bukkit.Bukkit.getPluginManager().callEvent(structureEvent);
 +                    }
-+
+ 
 +                    BlockFertilizeEvent fertilizeEvent = new BlockFertilizeEvent(location.getBlock(), null, blocks);
 +                    fertilizeEvent.setCancelled(structureEvent != null && structureEvent.isCancelled());
 +                    org.bukkit.Bukkit.getPluginManager().callEvent(fertilizeEvent);
@@ -374,108 +387,109 @@
 +                    }
 +                }
 +                // CraftBukkit end
- 
-                 return itemstack;
++
+                 return stack;
              }
-@@ -298,12 +559,41 @@
-             protected ItemStack execute(SourceBlock sourceblock, ItemStack itemstack) {
-                 WorldServer worldserver = sourceblock.level();
-                 BlockPosition blockposition = sourceblock.pos().relative((EnumDirection) sourceblock.state().getValue(BlockDispenser.FACING));
--                EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(worldserver, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, (EntityLiving) null);
+         });
+@@ -298,12 +557,41 @@
+             protected ItemStack execute(BlockSource pointer, ItemStack stack) {
+                 ServerLevel worldserver = pointer.level();
+                 BlockPos blockposition = pointer.pos().relative((Direction) pointer.state().getValue(DispenserBlock.FACING));
+-                PrimedTnt entitytntprimed = new PrimedTnt(worldserver, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, (LivingEntity) null);
 +                // CraftBukkit start
 +                // EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(worldserver, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, (EntityLiving) null);
-+
-+                ItemStack itemstack1 = itemstack.split(1);
-+                org.bukkit.block.Block block = CraftBlock.at(worldserver, sourceblock.pos());
+ 
++                ItemStack itemstack1 = stack.split(1);
++                org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
 +                CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
 +
 +                BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector((double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D));
-+                if (!BlockDispenser.eventFired) {
++                if (!DispenserBlock.eventFired) {
 +                   worldserver.getCraftServer().getPluginManager().callEvent(event);
 +                }
 +
 +                if (event.isCancelled()) {
-+                    itemstack.grow(1);
-+                    return itemstack;
++                    stack.grow(1);
++                    return stack;
 +                }
 +
 +                if (!event.getItem().equals(craftItem)) {
-+                    itemstack.grow(1);
++                    stack.grow(1);
 +                    // Chain to handler for new item
 +                    ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-+                    IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.DISPENSER_REGISTRY.get(eventStack.getItem());
-+                    if (idispensebehavior != IDispenseBehavior.NOOP && idispensebehavior != this) {
-+                        idispensebehavior.dispense(sourceblock, eventStack);
-+                        return itemstack;
++                    DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
++                    if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
++                        idispensebehavior.dispense(pointer, eventStack);
++                        return stack;
 +                    }
 +                }
 +
-+                EntityTNTPrimed entitytntprimed = new EntityTNTPrimed(worldserver, event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ(), (EntityLiving) null);
++                PrimedTnt entitytntprimed = new PrimedTnt(worldserver, event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ(), (LivingEntity) null);
 +                // CraftBukkit end
- 
++
                  worldserver.addFreshEntity(entitytntprimed);
-                 worldserver.playSound((EntityHuman) null, entitytntprimed.getX(), entitytntprimed.getY(), entitytntprimed.getZ(), SoundEffects.TNT_PRIMED, SoundCategory.BLOCKS, 1.0F, 1.0F);
+                 worldserver.playSound((Player) null, entitytntprimed.getX(), entitytntprimed.getY(), entitytntprimed.getZ(), SoundEvents.TNT_PRIMED, SoundSource.BLOCKS, 1.0F, 1.0F);
                  worldserver.gameEvent((Entity) null, (Holder) GameEvent.ENTITY_PLACE, blockposition);
--                itemstack.shrink(1);
+-                stack.shrink(1);
 +                // itemstack.shrink(1); // CraftBukkit - handled above
-                 return itemstack;
+                 return stack;
              }
          });
-@@ -314,6 +604,30 @@
-                 EnumDirection enumdirection = (EnumDirection) sourceblock.state().getValue(BlockDispenser.FACING);
-                 BlockPosition blockposition = sourceblock.pos().relative(enumdirection);
+@@ -314,6 +602,30 @@
+                 Direction enumdirection = (Direction) pointer.state().getValue(DispenserBlock.FACING);
+                 BlockPos blockposition = pointer.pos().relative(enumdirection);
  
 +                // CraftBukkit start
-+                org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, sourceblock.pos());
-+                CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack);
++                org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos());
++                CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack);
 +
 +                BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
-+                if (!BlockDispenser.eventFired) {
++                if (!DispenserBlock.eventFired) {
 +                    worldserver.getCraftServer().getPluginManager().callEvent(event);
 +                }
 +
 +                if (event.isCancelled()) {
-+                    return itemstack;
++                    return stack;
 +                }
 +
 +                if (!event.getItem().equals(craftItem)) {
 +                    // Chain to handler for new item
 +                    ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-+                    IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.DISPENSER_REGISTRY.get(eventStack.getItem());
-+                    if (idispensebehavior != IDispenseBehavior.NOOP && idispensebehavior != this) {
-+                        idispensebehavior.dispense(sourceblock, eventStack);
-+                        return itemstack;
++                    DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
++                    if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
++                        idispensebehavior.dispense(pointer, eventStack);
++                        return stack;
 +                    }
 +                }
 +                // CraftBukkit end
 +
-                 if (worldserver.isEmptyBlock(blockposition) && BlockWitherSkull.canSpawnMob(worldserver, blockposition, itemstack)) {
-                     worldserver.setBlock(blockposition, (IBlockData) Blocks.WITHER_SKELETON_SKULL.defaultBlockState().setValue(BlockSkull.ROTATION, RotationSegment.convertToSegment(enumdirection)), 3);
+                 if (worldserver.isEmptyBlock(blockposition) && WitherSkullBlock.canSpawnMob(worldserver, blockposition, stack)) {
+                     worldserver.setBlock(blockposition, (BlockState) Blocks.WITHER_SKELETON_SKULL.defaultBlockState().setValue(SkullBlock.ROTATION, RotationSegment.convertToSegment(enumdirection)), 3);
                      worldserver.gameEvent((Entity) null, (Holder) GameEvent.BLOCK_PLACE, blockposition);
-@@ -339,6 +653,30 @@
-                 BlockPosition blockposition = sourceblock.pos().relative((EnumDirection) sourceblock.state().getValue(BlockDispenser.FACING));
-                 BlockPumpkinCarved blockpumpkincarved = (BlockPumpkinCarved) Blocks.CARVED_PUMPKIN;
+@@ -339,6 +651,30 @@
+                 BlockPos blockposition = pointer.pos().relative((Direction) pointer.state().getValue(DispenserBlock.FACING));
+                 CarvedPumpkinBlock blockpumpkincarved = (CarvedPumpkinBlock) Blocks.CARVED_PUMPKIN;
  
 +                // CraftBukkit start
-+                org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, sourceblock.pos());
-+                CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack);
++                org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos());
++                CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack);
 +
 +                BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
-+                if (!BlockDispenser.eventFired) {
++                if (!DispenserBlock.eventFired) {
 +                    worldserver.getCraftServer().getPluginManager().callEvent(event);
 +                }
 +
 +                if (event.isCancelled()) {
-+                    return itemstack;
++                    return stack;
 +                }
 +
 +                if (!event.getItem().equals(craftItem)) {
 +                    // Chain to handler for new item
 +                    ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-+                    IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.DISPENSER_REGISTRY.get(eventStack.getItem());
-+                    if (idispensebehavior != IDispenseBehavior.NOOP && idispensebehavior != this) {
-+                        idispensebehavior.dispense(sourceblock, eventStack);
-+                        return itemstack;
++                    DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
++                    if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
++                        idispensebehavior.dispense(pointer, eventStack);
++                        return stack;
 +                    }
 +                }
 +                // CraftBukkit end
@@ -483,63 +497,63 @@
                  if (worldserver.isEmptyBlock(blockposition) && blockpumpkincarved.canSpawnGolem(worldserver, blockposition)) {
                      if (!worldserver.isClientSide) {
                          worldserver.setBlock(blockposition, blockpumpkincarved.defaultBlockState(), 3);
-@@ -377,6 +715,30 @@
-                 BlockPosition blockposition = sourceblock.pos().relative((EnumDirection) sourceblock.state().getValue(BlockDispenser.FACING));
-                 IBlockData iblockdata = worldserver.getBlockState(blockposition);
+@@ -377,6 +713,30 @@
+                 BlockPos blockposition = pointer.pos().relative((Direction) pointer.state().getValue(DispenserBlock.FACING));
+                 BlockState iblockdata = worldserver.getBlockState(blockposition);
  
 +                // CraftBukkit start
-+                org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, sourceblock.pos());
-+                CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack);
++                org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos());
++                CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack);
 +
 +                BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
-+                if (!BlockDispenser.eventFired) {
++                if (!DispenserBlock.eventFired) {
 +                    worldserver.getCraftServer().getPluginManager().callEvent(event);
 +                }
 +
 +                if (event.isCancelled()) {
-+                    return itemstack;
++                    return stack;
 +                }
 +
 +                if (!event.getItem().equals(craftItem)) {
 +                    // Chain to handler for new item
 +                    ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-+                    IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.DISPENSER_REGISTRY.get(eventStack.getItem());
-+                    if (idispensebehavior != IDispenseBehavior.NOOP && idispensebehavior != this) {
-+                        idispensebehavior.dispense(sourceblock, eventStack);
-+                        return itemstack;
++                    DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
++                    if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
++                        idispensebehavior.dispense(pointer, eventStack);
++                        return stack;
 +                    }
 +                }
 +                // CraftBukkit end
 +
-                 if (iblockdata.is(TagsBlock.BEEHIVES, (blockbase_blockdata) -> {
-                     return blockbase_blockdata.hasProperty(BlockBeehive.HONEY_LEVEL) && blockbase_blockdata.getBlock() instanceof BlockBeehive;
-                 }) && (Integer) iblockdata.getValue(BlockBeehive.HONEY_LEVEL) >= 5) {
-@@ -426,6 +788,31 @@
+                 if (iblockdata.is(BlockTags.BEEHIVES, (blockbase_blockdata) -> {
+                     return blockbase_blockdata.hasProperty(BeehiveBlock.HONEY_LEVEL) && blockbase_blockdata.getBlock() instanceof BeehiveBlock;
+                 }) && (Integer) iblockdata.getValue(BeehiveBlock.HONEY_LEVEL) >= 5) {
+@@ -426,6 +786,31 @@
                      this.setSuccess(false);
-                     return itemstack;
+                     return stack;
                  } else {
 +                    // CraftBukkit start
-+                    ItemStack itemstack1 = itemstack;
-+                    WorldServer world = sourceblock.level();
-+                    org.bukkit.block.Block block = CraftBlock.at(world, sourceblock.pos());
++                    ItemStack itemstack1 = stack;
++                    ServerLevel world = pointer.level();
++                    org.bukkit.block.Block block = CraftBlock.at(world, pointer.pos());
 +                    CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
 +
 +                    BlockDispenseEvent event = new BlockDispenseArmorEvent(block, craftItem.clone(), (org.bukkit.craftbukkit.entity.CraftLivingEntity) list.get(0).getBukkitEntity());
-+                    if (!BlockDispenser.eventFired) {
++                    if (!DispenserBlock.eventFired) {
 +                        world.getCraftServer().getPluginManager().callEvent(event);
 +                    }
 +
 +                    if (event.isCancelled()) {
-+                        return itemstack;
++                        return stack;
 +                    }
 +
 +                    if (!event.getItem().equals(craftItem)) {
 +                        // Chain to handler for new item
 +                        ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-+                        IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.DISPENSER_REGISTRY.get(eventStack.getItem());
-+                        if (idispensebehavior != IDispenseBehavior.NOOP && idispensebehavior != EquipmentDispenseItemBehavior.INSTANCE) {
-+                            idispensebehavior.dispense(sourceblock, eventStack);
-+                            return itemstack;
++                        DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
++                        if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != EquipmentDispenseItemBehavior.INSTANCE) {
++                            idispensebehavior.dispense(pointer, eventStack);
++                            return stack;
 +                        }
 +                    }
 +                    // CraftBukkit end
diff --git a/paper-server/patches/sources/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.patch b/paper-server/patches/sources/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java.patch
similarity index 52%
rename from paper-server/patches/sources/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.patch
rename to paper-server/patches/sources/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java.patch
index 4052a9e3f3..9b48740310 100644
--- a/paper-server/patches/sources/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.patch
+++ b/paper-server/patches/sources/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java.patch
@@ -1,52 +1,52 @@
 --- a/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java
 +++ b/net/minecraft/core/dispenser/EquipmentDispenseItemBehavior.java
-@@ -10,6 +10,13 @@
- import net.minecraft.world.level.block.BlockDispenser;
- import net.minecraft.world.phys.AxisAlignedBB;
- 
-+// CraftBukkit start
-+import net.minecraft.world.level.World;
+@@ -7,8 +7,13 @@
+ import net.minecraft.world.entity.LivingEntity;
+ import net.minecraft.world.entity.Mob;
+ import net.minecraft.world.item.ItemStack;
++import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.block.DispenserBlock;
+ import net.minecraft.world.phys.AABB;
 +import org.bukkit.craftbukkit.block.CraftBlock;
 +import org.bukkit.craftbukkit.inventory.CraftItemStack;
 +import org.bukkit.event.block.BlockDispenseArmorEvent;
 +// CraftBukkit end
-+
- public class EquipmentDispenseItemBehavior extends DispenseBehaviorItem {
  
-     public static final EquipmentDispenseItemBehavior INSTANCE = new EquipmentDispenseItemBehavior();
-@@ -34,7 +41,34 @@
-             EnumItemSlot enumitemslot = entityliving.getEquipmentSlotForItem(itemstack);
-             ItemStack itemstack1 = itemstack.split(1);
+ public class EquipmentDispenseItemBehavior extends DefaultDispenseItemBehavior {
+ 
+@@ -34,7 +39,34 @@
+             EquipmentSlot enumitemslot = entityliving.getEquipmentSlotForItem(stack);
+             ItemStack itemstack1 = stack.split(1);
  
 -            entityliving.setItemSlot(enumitemslot, itemstack1);
 +            // CraftBukkit start
-+            World world = sourceblock.level();
-+            org.bukkit.block.Block block = CraftBlock.at(world, sourceblock.pos());
++            Level world = pointer.level();
++            org.bukkit.block.Block block = CraftBlock.at(world, pointer.pos());
 +            CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
 +
 +            BlockDispenseArmorEvent event = new BlockDispenseArmorEvent(block, craftItem.clone(), (org.bukkit.craftbukkit.entity.CraftLivingEntity) entityliving.getBukkitEntity());
-+            if (!BlockDispenser.eventFired) {
++            if (!DispenserBlock.eventFired) {
 +                world.getCraftServer().getPluginManager().callEvent(event);
 +            }
 +
 +            if (event.isCancelled()) {
-+                itemstack.grow(1);
++                stack.grow(1);
 +                return false;
 +            }
 +
 +            if (!event.getItem().equals(craftItem)) {
-+                itemstack.grow(1);
++                stack.grow(1);
 +                // Chain to handler for new item
 +                ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-+                IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.DISPENSER_REGISTRY.get(eventStack.getItem());
-+                if (idispensebehavior != IDispenseBehavior.NOOP && idispensebehavior != EquipmentDispenseItemBehavior.INSTANCE) {
-+                    idispensebehavior.dispense(sourceblock, eventStack);
++                DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
++                if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != EquipmentDispenseItemBehavior.INSTANCE) {
++                    idispensebehavior.dispense(pointer, eventStack);
 +                    return true;
 +                }
 +            }
 +
 +            entityliving.setItemSlot(enumitemslot, CraftItemStack.asNMSCopy(event.getItem()));
 +            // CraftBukkit end
-             if (entityliving instanceof EntityInsentient) {
-                 EntityInsentient entityinsentient = (EntityInsentient) entityliving;
+             if (entityliving instanceof Mob) {
+                 Mob entityinsentient = (Mob) entityliving;
  
diff --git a/paper-server/patches/sources/net/minecraft/core/dispenser/MinecartDispenseItemBehavior.patch b/paper-server/patches/sources/net/minecraft/core/dispenser/MinecartDispenseItemBehavior.java.patch
similarity index 51%
rename from paper-server/patches/sources/net/minecraft/core/dispenser/MinecartDispenseItemBehavior.patch
rename to paper-server/patches/sources/net/minecraft/core/dispenser/MinecartDispenseItemBehavior.java.patch
index 5ea81d2ee8..5093e8f802 100644
--- a/paper-server/patches/sources/net/minecraft/core/dispenser/MinecartDispenseItemBehavior.patch
+++ b/paper-server/patches/sources/net/minecraft/core/dispenser/MinecartDispenseItemBehavior.java.patch
@@ -1,59 +1,58 @@
 --- a/net/minecraft/core/dispenser/MinecartDispenseItemBehavior.java
 +++ b/net/minecraft/core/dispenser/MinecartDispenseItemBehavior.java
-@@ -16,6 +16,12 @@
- import net.minecraft.world.level.block.state.properties.BlockPropertyTrackPosition;
- import net.minecraft.world.phys.Vec3D;
- 
+@@ -15,6 +15,11 @@
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.level.block.state.properties.RailShape;
+ import net.minecraft.world.phys.Vec3;
 +// CraftBukkit start
 +import org.bukkit.craftbukkit.block.CraftBlock;
 +import org.bukkit.craftbukkit.inventory.CraftItemStack;
 +import org.bukkit.event.block.BlockDispenseEvent;
 +// CraftBukkit end
-+
- public class MinecartDispenseItemBehavior extends DispenseBehaviorItem {
  
-     private final DispenseBehaviorItem defaultDispenseItemBehavior = new DispenseBehaviorItem();
-@@ -62,11 +68,40 @@
+ public class MinecartDispenseItemBehavior extends DefaultDispenseItemBehavior {
+ 
+@@ -62,11 +67,40 @@
          }
  
-         Vec3D vec3d1 = new Vec3D(d0, d1 + d3, d2);
--        EntityMinecartAbstract entityminecartabstract = EntityMinecartAbstract.createMinecart(worldserver, vec3d1.x, vec3d1.y, vec3d1.z, this.entityType, EntitySpawnReason.DISPENSER, itemstack, (EntityHuman) null);
+         Vec3 vec3d1 = new Vec3(d0, d1 + d3, d2);
+-        AbstractMinecart entityminecartabstract = AbstractMinecart.createMinecart(worldserver, vec3d1.x, vec3d1.y, vec3d1.z, this.entityType, EntitySpawnReason.DISPENSER, stack, (Player) null);
 +        // CraftBukkit start
 +        // EntityMinecartAbstract entityminecartabstract = EntityMinecartAbstract.createMinecart(worldserver, vec3d1.x, vec3d1.y, vec3d1.z, this.entityType, EntitySpawnReason.DISPENSER, itemstack, (EntityHuman) null);
-+        ItemStack itemstack1 = itemstack.split(1);
-+        org.bukkit.block.Block block2 = CraftBlock.at(worldserver, sourceblock.pos());
++        ItemStack itemstack1 = stack.split(1);
++        org.bukkit.block.Block block2 = CraftBlock.at(worldserver, pointer.pos());
 +        CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
-+
+ 
 +        BlockDispenseEvent event = new BlockDispenseEvent(block2, craftItem.clone(), new org.bukkit.util.Vector(vec3d1.x, vec3d1.y, vec3d1.z));
-+        if (!BlockDispenser.eventFired) {
++        if (!DispenserBlock.eventFired) {
 +            worldserver.getCraftServer().getPluginManager().callEvent(event);
 +        }
 +
 +        if (event.isCancelled()) {
-+            itemstack.grow(1);
-+            return itemstack;
++            stack.grow(1);
++            return stack;
 +        }
 +
 +        if (!event.getItem().equals(craftItem)) {
-+            itemstack.grow(1);
++            stack.grow(1);
 +            // Chain to handler for new item
 +            ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
-+            IDispenseBehavior idispensebehavior = (IDispenseBehavior) BlockDispenser.DISPENSER_REGISTRY.get(eventStack.getItem());
-+            if (idispensebehavior != IDispenseBehavior.NOOP && idispensebehavior != this) {
-+                idispensebehavior.dispense(sourceblock, eventStack);
-+                return itemstack;
++            DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
++            if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
++                idispensebehavior.dispense(pointer, eventStack);
++                return stack;
 +            }
 +        }
 +
 +        itemstack1 = CraftItemStack.asNMSCopy(event.getItem());
-+        EntityMinecartAbstract entityminecartabstract = EntityMinecartAbstract.createMinecart(worldserver, event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ(), this.entityType, EntitySpawnReason.DISPENSER, itemstack1, (EntityHuman) null);
- 
++        AbstractMinecart entityminecartabstract = AbstractMinecart.createMinecart(worldserver, event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ(), this.entityType, EntitySpawnReason.DISPENSER, itemstack1, (Player) null);
++
          if (entityminecartabstract != null) {
 -            worldserver.addFreshEntity(entityminecartabstract);
--            itemstack.shrink(1);
-+            if (!worldserver.addFreshEntity(entityminecartabstract)) itemstack.grow(1);
+-            stack.shrink(1);
++            if (!worldserver.addFreshEntity(entityminecartabstract)) stack.grow(1);
 +            // itemstack.shrink(1); // CraftBukkit - handled during event processing
 +            // CraftBukkit end
          }
  
-         return itemstack;
+         return stack;
diff --git a/paper-server/patches/sources/net/minecraft/core/dispenser/ProjectileDispenseBehavior.java.patch b/paper-server/patches/sources/net/minecraft/core/dispenser/ProjectileDispenseBehavior.java.patch
new file mode 100644
index 0000000000..a31d23b1a6
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/core/dispenser/ProjectileDispenseBehavior.java.patch
@@ -0,0 +1,57 @@
+--- a/net/minecraft/core/dispenser/ProjectileDispenseBehavior.java
++++ b/net/minecraft/core/dispenser/ProjectileDispenseBehavior.java
+@@ -8,6 +8,11 @@
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.item.ProjectileItem;
+ import net.minecraft.world.level.block.DispenserBlock;
++// CraftBukkit start
++import org.bukkit.craftbukkit.block.CraftBlock;
++import org.bukkit.craftbukkit.inventory.CraftItemStack;
++import org.bukkit.event.block.BlockDispenseEvent;
++// CraftBukkit end
+ 
+ public class ProjectileDispenseBehavior extends DefaultDispenseItemBehavior {
+ 
+@@ -31,8 +36,40 @@
+         Direction enumdirection = (Direction) pointer.state().getValue(DispenserBlock.FACING);
+         Position iposition = this.dispenseConfig.positionFunction().getDispensePosition(pointer, enumdirection);
+ 
+-        Projectile.spawnProjectileUsingShoot(this.projectileItem.asProjectile(worldserver, iposition, stack, enumdirection), worldserver, stack, (double) enumdirection.getStepX(), (double) enumdirection.getStepY(), (double) enumdirection.getStepZ(), this.dispenseConfig.power(), this.dispenseConfig.uncertainty());
+-        stack.shrink(1);
++        // CraftBukkit start
++        // IProjectile.spawnProjectileUsingShoot(this.projectileItem.asProjectile(worldserver, iposition, itemstack, enumdirection), worldserver, itemstack, (double) enumdirection.getStepX(), (double) enumdirection.getStepY(), (double) enumdirection.getStepZ(), this.dispenseConfig.power(), this.dispenseConfig.uncertainty()); // CraftBukkit - call when finish the BlockDispenseEvent
++        ItemStack itemstack1 = stack.split(1);
++        org.bukkit.block.Block block = CraftBlock.at(worldserver, pointer.pos());
++        CraftItemStack craftItem = CraftItemStack.asCraftMirror(itemstack1);
++
++        BlockDispenseEvent event = new BlockDispenseEvent(block, craftItem.clone(), new org.bukkit.util.Vector((double) enumdirection.getStepX(), (double) enumdirection.getStepY(), (double) enumdirection.getStepZ()));
++        if (!DispenserBlock.eventFired) {
++            worldserver.getCraftServer().getPluginManager().callEvent(event);
++        }
++
++        if (event.isCancelled()) {
++            stack.grow(1);
++            return stack;
++        }
++
++        if (!event.getItem().equals(craftItem)) {
++            stack.grow(1);
++            // Chain to handler for new item
++            ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
++            DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
++            if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
++                idispensebehavior.dispense(pointer, eventStack);
++                return stack;
++            }
++        }
++
++        // SPIGOT-7923: Avoid create projectiles with empty item
++        if (!itemstack1.isEmpty()) {
++            Projectile iprojectile = Projectile.spawnProjectileUsingShoot(this.projectileItem.asProjectile(worldserver, iposition, itemstack1, enumdirection), worldserver, itemstack1, event.getVelocity().getX(), event.getVelocity().getY(), event.getVelocity().getZ(), this.dispenseConfig.power(), this.dispenseConfig.uncertainty());
++            iprojectile.projectileSource = new org.bukkit.craftbukkit.projectiles.CraftBlockProjectileSource(pointer.blockEntity());
++        }
++        // itemstack.shrink(1); // CraftBukkit - Handled during event processing
++        // CraftBukkit end
+         return stack;
+     }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java.patch b/paper-server/patches/sources/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java.patch
new file mode 100644
index 0000000000..a4da08d62d
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java.patch
@@ -0,0 +1,78 @@
+--- a/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java
++++ b/net/minecraft/core/dispenser/ShearsDispenseItemBehavior.java
+@@ -22,6 +22,12 @@
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import net.minecraft.world.phys.AABB;
++// CraftBukkit start
++import org.bukkit.craftbukkit.block.CraftBlock;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.craftbukkit.inventory.CraftItemStack;
++import org.bukkit.event.block.BlockDispenseEvent;
++// CraftBukkit end
+ 
+ public class ShearsDispenseItemBehavior extends OptionalDispenseItemBehavior {
+ 
+@@ -30,11 +36,34 @@
+     @Override
+     protected ItemStack execute(BlockSource pointer, ItemStack stack) {
+         ServerLevel worldserver = pointer.level();
++        // CraftBukkit start
++        org.bukkit.block.Block bukkitBlock = CraftBlock.at(worldserver, pointer.pos());
++        CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack);
+ 
++        BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(0, 0, 0));
++        if (!DispenserBlock.eventFired) {
++            worldserver.getCraftServer().getPluginManager().callEvent(event);
++        }
++
++        if (event.isCancelled()) {
++            return stack;
++        }
++
++        if (!event.getItem().equals(craftItem)) {
++            // Chain to handler for new item
++            ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
++            DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
++            if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
++                idispensebehavior.dispense(pointer, eventStack);
++                return stack;
++            }
++        }
++        // CraftBukkit end
++
+         if (!worldserver.isClientSide()) {
+             BlockPos blockposition = pointer.pos().relative((Direction) pointer.state().getValue(DispenserBlock.FACING));
+ 
+-            this.setSuccess(ShearsDispenseItemBehavior.tryShearBeehive(worldserver, blockposition) || ShearsDispenseItemBehavior.tryShearLivingEntity(worldserver, blockposition, stack));
++            this.setSuccess(ShearsDispenseItemBehavior.tryShearBeehive(worldserver, blockposition) || ShearsDispenseItemBehavior.tryShearLivingEntity(worldserver, blockposition, stack, bukkitBlock, craftItem)); // CraftBukkit
+             if (this.isSuccess()) {
+                 stack.hurtAndBreak(1, worldserver, (ServerPlayer) null, (item) -> {
+                 });
+@@ -64,8 +93,8 @@
+         return false;
+     }
+ 
+-    private static boolean tryShearLivingEntity(ServerLevel world, BlockPos pos, ItemStack shears) {
+-        List<LivingEntity> list = world.getEntitiesOfClass(LivingEntity.class, new AABB(pos), EntitySelector.NO_SPECTATORS);
++    private static boolean tryShearLivingEntity(ServerLevel worldserver, BlockPos blockposition, ItemStack itemstack, org.bukkit.block.Block bukkitBlock, CraftItemStack craftItem) { // CraftBukkit - add args
++        List<LivingEntity> list = worldserver.getEntitiesOfClass(LivingEntity.class, new AABB(blockposition), EntitySelector.NO_SPECTATORS);
+         Iterator iterator = list.iterator();
+ 
+         while (iterator.hasNext()) {
+@@ -73,8 +102,13 @@
+ 
+             if (entityliving instanceof Shearable ishearable) {
+                 if (ishearable.readyForShearing()) {
+-                    ishearable.shear(world, SoundSource.BLOCKS, shears);
+-                    world.gameEvent((Entity) null, (Holder) GameEvent.SHEAR, pos);
++                    // CraftBukkit start
++                    if (CraftEventFactory.callBlockShearEntityEvent(entityliving, bukkitBlock, craftItem).isCancelled()) {
++                        continue;
++                    }
++                    // CraftBukkit end
++                    ishearable.shear(worldserver, SoundSource.BLOCKS, itemstack);
++                    worldserver.gameEvent((Entity) null, (Holder) GameEvent.SHEAR, blockposition);
+                     return true;
+                 }
+             }
diff --git a/paper-server/patches/sources/net/minecraft/core/dispenser/ShulkerBoxDispenseBehavior.java.patch b/paper-server/patches/sources/net/minecraft/core/dispenser/ShulkerBoxDispenseBehavior.java.patch
new file mode 100644
index 0000000000..06d029967b
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/core/dispenser/ShulkerBoxDispenseBehavior.java.patch
@@ -0,0 +1,46 @@
+--- a/net/minecraft/core/dispenser/ShulkerBoxDispenseBehavior.java
++++ b/net/minecraft/core/dispenser/ShulkerBoxDispenseBehavior.java
+@@ -10,6 +10,12 @@
+ import net.minecraft.world.level.block.DispenserBlock;
+ import org.slf4j.Logger;
+ 
++// CraftBukkit start
++import org.bukkit.craftbukkit.block.CraftBlock;
++import org.bukkit.craftbukkit.inventory.CraftItemStack;
++import org.bukkit.event.block.BlockDispenseEvent;
++// CraftBukkit end
++
+ public class ShulkerBoxDispenseBehavior extends OptionalDispenseItemBehavior {
+ 
+     private static final Logger LOGGER = LogUtils.getLogger();
+@@ -26,6 +32,30 @@
+             BlockPos blockposition = pointer.pos().relative(enumdirection);
+             Direction enumdirection1 = pointer.level().isEmptyBlock(blockposition.below()) ? enumdirection : Direction.UP;
+ 
++            // CraftBukkit start
++            org.bukkit.block.Block bukkitBlock = CraftBlock.at(pointer.level(), pointer.pos());
++            CraftItemStack craftItem = CraftItemStack.asCraftMirror(stack);
++
++            BlockDispenseEvent event = new BlockDispenseEvent(bukkitBlock, craftItem.clone(), new org.bukkit.util.Vector(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
++            if (!DispenserBlock.eventFired) {
++                pointer.level().getCraftServer().getPluginManager().callEvent(event);
++            }
++
++            if (event.isCancelled()) {
++                return stack;
++            }
++
++            if (!event.getItem().equals(craftItem)) {
++                // Chain to handler for new item
++                ItemStack eventStack = CraftItemStack.asNMSCopy(event.getItem());
++                DispenseItemBehavior idispensebehavior = (DispenseItemBehavior) DispenserBlock.DISPENSER_REGISTRY.get(eventStack.getItem());
++                if (idispensebehavior != DispenseItemBehavior.NOOP && idispensebehavior != this) {
++                    idispensebehavior.dispense(pointer, eventStack);
++                    return stack;
++                }
++            }
++            // CraftBukkit end
++
+             try {
+                 this.setSuccess(((BlockItem) item).place(new DirectionalPlaceContext(pointer.level(), blockposition, enumdirection, stack, enumdirection1)).consumesAction());
+             } catch (Exception exception) {
diff --git a/paper-server/patches/sources/net/minecraft/nbt/NBTTagIntArray.patch b/paper-server/patches/sources/net/minecraft/nbt/ByteArrayTag.java.patch
similarity index 50%
rename from paper-server/patches/sources/net/minecraft/nbt/NBTTagIntArray.patch
rename to paper-server/patches/sources/net/minecraft/nbt/ByteArrayTag.java.patch
index d62cce3d11..8425cde14a 100644
--- a/paper-server/patches/sources/net/minecraft/nbt/NBTTagIntArray.patch
+++ b/paper-server/patches/sources/net/minecraft/nbt/ByteArrayTag.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/nbt/NBTTagIntArray.java
-+++ b/net/minecraft/nbt/NBTTagIntArray.java
+--- a/net/minecraft/nbt/ByteArrayTag.java
++++ b/net/minecraft/nbt/ByteArrayTag.java
 @@ -1,3 +1,4 @@
 +// mc-dev import
  package net.minecraft.nbt;
diff --git a/paper-server/patches/sources/net/minecraft/nbt/NBTTagByteArray.patch b/paper-server/patches/sources/net/minecraft/nbt/IntArrayTag.java.patch
similarity index 50%
rename from paper-server/patches/sources/net/minecraft/nbt/NBTTagByteArray.patch
rename to paper-server/patches/sources/net/minecraft/nbt/IntArrayTag.java.patch
index 1bd3e4dac0..84a9ce8372 100644
--- a/paper-server/patches/sources/net/minecraft/nbt/NBTTagByteArray.patch
+++ b/paper-server/patches/sources/net/minecraft/nbt/IntArrayTag.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/nbt/NBTTagByteArray.java
-+++ b/net/minecraft/nbt/NBTTagByteArray.java
+--- a/net/minecraft/nbt/IntArrayTag.java
++++ b/net/minecraft/nbt/IntArrayTag.java
 @@ -1,3 +1,4 @@
 +// mc-dev import
  package net.minecraft.nbt;
diff --git a/paper-server/patches/sources/net/minecraft/nbt/NBTCompressedStreamTools.patch b/paper-server/patches/sources/net/minecraft/nbt/NBTCompressedStreamTools.patch
deleted file mode 100644
index e7fb3c7967..0000000000
--- a/paper-server/patches/sources/net/minecraft/nbt/NBTCompressedStreamTools.patch
+++ /dev/null
@@ -1,7 +0,0 @@
---- a/net/minecraft/nbt/NBTCompressedStreamTools.java
-+++ b/net/minecraft/nbt/NBTCompressedStreamTools.java
-@@ -1,3 +1,4 @@
-+// mc-dev import
- package net.minecraft.nbt;
- 
- import java.io.BufferedOutputStream;
diff --git a/paper-server/patches/sources/net/minecraft/nbt/NbtIo.java.patch b/paper-server/patches/sources/net/minecraft/nbt/NbtIo.java.patch
new file mode 100644
index 0000000000..661faf49b1
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/nbt/NbtIo.java.patch
@@ -0,0 +1,7 @@
+--- a/net/minecraft/nbt/NbtIo.java
++++ b/net/minecraft/nbt/NbtIo.java
+@@ -1,3 +1,4 @@
++// mc-dev import
+ package net.minecraft.nbt;
+ 
+ import java.io.BufferedOutputStream;
diff --git a/paper-server/patches/sources/net/minecraft/network/Connection.java.patch b/paper-server/patches/sources/net/minecraft/network/Connection.java.patch
new file mode 100644
index 0000000000..a374db572f
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/network/Connection.java.patch
@@ -0,0 +1,37 @@
+--- a/net/minecraft/network/Connection.java
++++ b/net/minecraft/network/Connection.java
+@@ -114,6 +114,7 @@
+     private volatile DisconnectionDetails delayedDisconnect;
+     @Nullable
+     BandwidthDebugMonitor bandwidthDebugMonitor;
++    public String hostname = ""; // CraftBukkit - add field
+ 
+     public Connection(PacketFlow side) {
+         this.receiving = side;
+@@ -205,7 +206,7 @@
+     }
+ 
+     private static <T extends PacketListener> void genericsFtw(Packet<T> packet, PacketListener listener) {
+-        packet.handle(listener);
++        packet.handle((T) listener); // CraftBukkit - decompile error
+     }
+ 
+     private void validateListener(ProtocolInfo<?> state, PacketListener listener) {
+@@ -469,7 +470,7 @@
+         }
+ 
+         if (this.isConnected()) {
+-            this.channel.close().awaitUninterruptibly();
++            this.channel.close(); // We can't wait as this may be called from an event loop.
+             this.disconnectionDetails = disconnectionInfo;
+         }
+ 
+@@ -537,7 +538,7 @@
+     }
+ 
+     public void configurePacketHandler(ChannelPipeline pipeline) {
+-        pipeline.addLast("hackfix", new ChannelOutboundHandlerAdapter(this) {
++        pipeline.addLast("hackfix", new ChannelOutboundHandlerAdapter() { // CraftBukkit - decompile error
+             public void write(ChannelHandlerContext channelhandlercontext, Object object, ChannelPromise channelpromise) throws Exception {
+                 super.write(channelhandlercontext, object, channelpromise);
+             }
diff --git a/paper-server/patches/sources/net/minecraft/network/FriendlyByteBuf.java.patch b/paper-server/patches/sources/net/minecraft/network/FriendlyByteBuf.java.patch
new file mode 100644
index 0000000000..c3723c4d7f
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/network/FriendlyByteBuf.java.patch
@@ -0,0 +1,71 @@
+--- a/net/minecraft/network/FriendlyByteBuf.java
++++ b/net/minecraft/network/FriendlyByteBuf.java
+@@ -139,7 +139,7 @@
+ 
+     public <T, C extends Collection<T>> C readCollection(IntFunction<C> collectionFactory, StreamDecoder<? super FriendlyByteBuf, T> reader) {
+         int i = this.readVarInt();
+-        C c0 = (Collection) collectionFactory.apply(i);
++        C c0 = collectionFactory.apply(i); // CraftBukkit - decompile error
+ 
+         for (int j = 0; j < i; ++j) {
+             c0.add(reader.decode(this));
+@@ -150,7 +150,7 @@
+ 
+     public <T> void writeCollection(Collection<T> collection, StreamEncoder<? super FriendlyByteBuf, T> writer) {
+         this.writeVarInt(collection.size());
+-        Iterator iterator = collection.iterator();
++        Iterator<T> iterator = collection.iterator(); // CraftBukkit - decompile error
+ 
+         while (iterator.hasNext()) {
+             T t0 = iterator.next();
+@@ -177,12 +177,12 @@
+ 
+     public void writeIntIdList(IntList list) {
+         this.writeVarInt(list.size());
+-        list.forEach(this::writeVarInt);
++        list.forEach((java.util.function.IntConsumer) this::writeVarInt); // CraftBukkit - decompile error
+     }
+ 
+     public <K, V, M extends Map<K, V>> M readMap(IntFunction<M> mapFactory, StreamDecoder<? super FriendlyByteBuf, K> keyReader, StreamDecoder<? super FriendlyByteBuf, V> valueReader) {
+         int i = this.readVarInt();
+-        M m0 = (Map) mapFactory.apply(i);
++        M m0 = mapFactory.apply(i); // CraftBukkit - decompile error
+ 
+         for (int j = 0; j < i; ++j) {
+             K k0 = keyReader.decode(this);
+@@ -216,7 +216,7 @@
+     }
+ 
+     public <E extends Enum<E>> void writeEnumSet(EnumSet<E> enumSet, Class<E> type) {
+-        E[] ae = (Enum[]) type.getEnumConstants();
++        E[] ae = type.getEnumConstants(); // CraftBukkit - decompile error
+         BitSet bitset = new BitSet(ae.length);
+ 
+         for (int i = 0; i < ae.length; ++i) {
+@@ -227,7 +227,7 @@
+     }
+ 
+     public <E extends Enum<E>> EnumSet<E> readEnumSet(Class<E> type) {
+-        E[] ae = (Enum[]) type.getEnumConstants();
++        E[] ae = type.getEnumConstants(); // CraftBukkit - decompile error
+         BitSet bitset = this.readFixedBitSet(ae.length);
+         EnumSet<E> enumset = EnumSet.noneOf(type);
+ 
+@@ -498,7 +498,7 @@
+     }
+ 
+     public <T extends Enum<T>> T readEnum(Class<T> enumClass) {
+-        return ((Enum[]) enumClass.getEnumConstants())[this.readVarInt()];
++        return ((T[]) enumClass.getEnumConstants())[this.readVarInt()]; // CraftBukkit - fix decompile error
+     }
+ 
+     public FriendlyByteBuf writeEnum(Enum<?> instance) {
+@@ -565,7 +565,7 @@
+ 
+         try {
+             NbtIo.writeAnyTag((Tag) nbt, new ByteBufOutputStream(buf));
+-        } catch (IOException ioexception) {
++        } catch (Exception ioexception) { // CraftBukkit - IOException -> Exception
+             throw new EncoderException(ioexception);
+         }
+     }
diff --git a/paper-server/patches/sources/net/minecraft/network/NetworkManager.patch b/paper-server/patches/sources/net/minecraft/network/NetworkManager.patch
deleted file mode 100644
index c5e3757727..0000000000
--- a/paper-server/patches/sources/net/minecraft/network/NetworkManager.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- a/net/minecraft/network/NetworkManager.java
-+++ b/net/minecraft/network/NetworkManager.java
-@@ -114,6 +114,7 @@
-     private volatile DisconnectionDetails delayedDisconnect;
-     @Nullable
-     BandwidthDebugMonitor bandwidthDebugMonitor;
-+    public String hostname = ""; // CraftBukkit - add field
- 
-     public NetworkManager(EnumProtocolDirection enumprotocoldirection) {
-         this.receiving = enumprotocoldirection;
-@@ -205,7 +206,7 @@
-     }
- 
-     private static <T extends PacketListener> void genericsFtw(Packet<T> packet, PacketListener packetlistener) {
--        packet.handle(packetlistener);
-+        packet.handle((T) packetlistener); // CraftBukkit - decompile error
-     }
- 
-     private void validateListener(ProtocolInfo<?> protocolinfo, PacketListener packetlistener) {
-@@ -469,7 +470,7 @@
-         }
- 
-         if (this.isConnected()) {
--            this.channel.close().awaitUninterruptibly();
-+            this.channel.close(); // We can't wait as this may be called from an event loop.
-             this.disconnectionDetails = disconnectiondetails;
-         }
- 
-@@ -537,7 +538,7 @@
-     }
- 
-     public void configurePacketHandler(ChannelPipeline channelpipeline) {
--        channelpipeline.addLast("hackfix", new ChannelOutboundHandlerAdapter(this) {
-+        channelpipeline.addLast("hackfix", new ChannelOutboundHandlerAdapter() { // CraftBukkit - decompile error
-             public void write(ChannelHandlerContext channelhandlercontext, Object object, ChannelPromise channelpromise) throws Exception {
-                 super.write(channelhandlercontext, object, channelpromise);
-             }
diff --git a/paper-server/patches/sources/net/minecraft/network/PacketDataSerializer.patch b/paper-server/patches/sources/net/minecraft/network/PacketDataSerializer.patch
deleted file mode 100644
index 459f097864..0000000000
--- a/paper-server/patches/sources/net/minecraft/network/PacketDataSerializer.patch
+++ /dev/null
@@ -1,71 +0,0 @@
---- a/net/minecraft/network/PacketDataSerializer.java
-+++ b/net/minecraft/network/PacketDataSerializer.java
-@@ -139,7 +139,7 @@
- 
-     public <T, C extends Collection<T>> C readCollection(IntFunction<C> intfunction, StreamDecoder<? super PacketDataSerializer, T> streamdecoder) {
-         int i = this.readVarInt();
--        C c0 = (Collection) intfunction.apply(i);
-+        C c0 = intfunction.apply(i); // CraftBukkit - decompile error
- 
-         for (int j = 0; j < i; ++j) {
-             c0.add(streamdecoder.decode(this));
-@@ -150,7 +150,7 @@
- 
-     public <T> void writeCollection(Collection<T> collection, StreamEncoder<? super PacketDataSerializer, T> streamencoder) {
-         this.writeVarInt(collection.size());
--        Iterator iterator = collection.iterator();
-+        Iterator<T> iterator = collection.iterator(); // CraftBukkit - decompile error
- 
-         while (iterator.hasNext()) {
-             T t0 = iterator.next();
-@@ -177,12 +177,12 @@
- 
-     public void writeIntIdList(IntList intlist) {
-         this.writeVarInt(intlist.size());
--        intlist.forEach(this::writeVarInt);
-+        intlist.forEach((java.util.function.IntConsumer) this::writeVarInt); // CraftBukkit - decompile error
-     }
- 
-     public <K, V, M extends Map<K, V>> M readMap(IntFunction<M> intfunction, StreamDecoder<? super PacketDataSerializer, K> streamdecoder, StreamDecoder<? super PacketDataSerializer, V> streamdecoder1) {
-         int i = this.readVarInt();
--        M m0 = (Map) intfunction.apply(i);
-+        M m0 = intfunction.apply(i); // CraftBukkit - decompile error
- 
-         for (int j = 0; j < i; ++j) {
-             K k0 = streamdecoder.decode(this);
-@@ -216,7 +216,7 @@
-     }
- 
-     public <E extends Enum<E>> void writeEnumSet(EnumSet<E> enumset, Class<E> oclass) {
--        E[] ae = (Enum[]) oclass.getEnumConstants();
-+        E[] ae = oclass.getEnumConstants(); // CraftBukkit - decompile error
-         BitSet bitset = new BitSet(ae.length);
- 
-         for (int i = 0; i < ae.length; ++i) {
-@@ -227,7 +227,7 @@
-     }
- 
-     public <E extends Enum<E>> EnumSet<E> readEnumSet(Class<E> oclass) {
--        E[] ae = (Enum[]) oclass.getEnumConstants();
-+        E[] ae = oclass.getEnumConstants(); // CraftBukkit - decompile error
-         BitSet bitset = this.readFixedBitSet(ae.length);
-         EnumSet<E> enumset = EnumSet.noneOf(oclass);
- 
-@@ -498,7 +498,7 @@
-     }
- 
-     public <T extends Enum<T>> T readEnum(Class<T> oclass) {
--        return ((Enum[]) oclass.getEnumConstants())[this.readVarInt()];
-+        return ((T[]) oclass.getEnumConstants())[this.readVarInt()]; // CraftBukkit - fix decompile error
-     }
- 
-     public PacketDataSerializer writeEnum(Enum<?> oenum) {
-@@ -565,7 +565,7 @@
- 
-         try {
-             NBTCompressedStreamTools.writeAnyTag((NBTBase) nbtbase, new ByteBufOutputStream(bytebuf));
--        } catch (IOException ioexception) {
-+        } catch (Exception ioexception) { // CraftBukkit - IOException -> Exception
-             throw new EncoderException(ioexception);
-         }
-     }
diff --git a/paper-server/patches/sources/net/minecraft/network/chat/ChatHexColor.patch b/paper-server/patches/sources/net/minecraft/network/chat/ChatHexColor.patch
deleted file mode 100644
index 8924ab3f00..0000000000
--- a/paper-server/patches/sources/net/minecraft/network/chat/ChatHexColor.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- a/net/minecraft/network/chat/ChatHexColor.java
-+++ b/net/minecraft/network/chat/ChatHexColor.java
-@@ -17,7 +17,7 @@
-     private static final String CUSTOM_COLOR_PREFIX = "#";
-     public static final Codec<ChatHexColor> CODEC = Codec.STRING.comapFlatMap(ChatHexColor::parseColor, ChatHexColor::serialize);
-     private static final Map<EnumChatFormat, ChatHexColor> LEGACY_FORMAT_TO_COLOR = (Map) Stream.of(EnumChatFormat.values()).filter(EnumChatFormat::isColor).collect(ImmutableMap.toImmutableMap(Function.identity(), (enumchatformat) -> {
--        return new ChatHexColor(enumchatformat.getColor(), enumchatformat.getName());
-+        return new ChatHexColor(enumchatformat.getColor(), enumchatformat.getName(), enumchatformat); // CraftBukkit
-     }));
-     private static final Map<String, ChatHexColor> NAMED_COLORS = (Map) ChatHexColor.LEGACY_FORMAT_TO_COLOR.values().stream().collect(ImmutableMap.toImmutableMap((chathexcolor) -> {
-         return chathexcolor.name;
-@@ -25,16 +25,22 @@
-     private final int value;
-     @Nullable
-     public final String name;
-+    // CraftBukkit start
-+    @Nullable
-+    public final EnumChatFormat format;
- 
--    private ChatHexColor(int i, String s) {
-+    private ChatHexColor(int i, String s, EnumChatFormat format) {
-         this.value = i & 16777215;
-         this.name = s;
-+        this.format = format;
-     }
- 
-     private ChatHexColor(int i) {
-         this.value = i & 16777215;
-         this.name = null;
-+        this.format = null;
-     }
-+    // CraftBukkit end
- 
-     public int getValue() {
-         return this.value;
diff --git a/paper-server/patches/sources/net/minecraft/network/chat/Component.java.patch b/paper-server/patches/sources/net/minecraft/network/chat/Component.java.patch
new file mode 100644
index 0000000000..5db0b612a2
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/network/chat/Component.java.patch
@@ -0,0 +1,27 @@
+--- a/net/minecraft/network/chat/Component.java
++++ b/net/minecraft/network/chat/Component.java
+@@ -37,9 +37,23 @@
+ import net.minecraft.resources.ResourceLocation;
+ import net.minecraft.util.FormattedCharSequence;
+ import net.minecraft.world.level.ChunkPos;
++// CraftBukkit start
++import java.util.stream.Stream;
++// CraftBukkit end
+ 
+-public interface Component extends Message, FormattedText {
++public interface Component extends Message, FormattedText, Iterable<Component> { // CraftBukkit
++
++    // CraftBukkit start
++    default Stream<Component> stream() {
++        return com.google.common.collect.Streams.concat(new Stream[]{Stream.of(this), this.getSiblings().stream().flatMap(Component::stream)});
++    }
+ 
++    @Override
++    default Iterator<Component> iterator() {
++        return this.stream().iterator();
++    }
++    // CraftBukkit end
++
+     Style getStyle();
+ 
+     ComponentContents getContents();
diff --git a/paper-server/patches/sources/net/minecraft/network/chat/IChatBaseComponent.patch b/paper-server/patches/sources/net/minecraft/network/chat/IChatBaseComponent.patch
deleted file mode 100644
index 783abb4db2..0000000000
--- a/paper-server/patches/sources/net/minecraft/network/chat/IChatBaseComponent.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- a/net/minecraft/network/chat/IChatBaseComponent.java
-+++ b/net/minecraft/network/chat/IChatBaseComponent.java
-@@ -38,7 +38,22 @@
- import net.minecraft.util.FormattedString;
- import net.minecraft.world.level.ChunkCoordIntPair;
- 
--public interface IChatBaseComponent extends Message, IChatFormatted {
-+// CraftBukkit start
-+import java.util.stream.Stream;
-+// CraftBukkit end
-+
-+public interface IChatBaseComponent extends Message, IChatFormatted, Iterable<IChatBaseComponent> { // CraftBukkit
-+
-+    // CraftBukkit start
-+    default Stream<IChatBaseComponent> stream() {
-+        return com.google.common.collect.Streams.concat(new Stream[]{Stream.of(this), this.getSiblings().stream().flatMap(IChatBaseComponent::stream)});
-+    }
-+
-+    @Override
-+    default Iterator<IChatBaseComponent> iterator() {
-+        return this.stream().iterator();
-+    }
-+    // CraftBukkit end
- 
-     ChatModifier getStyle();
- 
diff --git a/paper-server/patches/sources/net/minecraft/network/chat/TextColor.java.patch b/paper-server/patches/sources/net/minecraft/network/chat/TextColor.java.patch
new file mode 100644
index 0000000000..014fd3eb10
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/network/chat/TextColor.java.patch
@@ -0,0 +1,37 @@
+--- a/net/minecraft/network/chat/TextColor.java
++++ b/net/minecraft/network/chat/TextColor.java
+@@ -17,7 +17,7 @@
+     private static final String CUSTOM_COLOR_PREFIX = "#";
+     public static final Codec<TextColor> CODEC = Codec.STRING.comapFlatMap(TextColor::parseColor, TextColor::serialize);
+     private static final Map<ChatFormatting, TextColor> LEGACY_FORMAT_TO_COLOR = (Map) Stream.of(ChatFormatting.values()).filter(ChatFormatting::isColor).collect(ImmutableMap.toImmutableMap(Function.identity(), (enumchatformat) -> {
+-        return new TextColor(enumchatformat.getColor(), enumchatformat.getName());
++        return new TextColor(enumchatformat.getColor(), enumchatformat.getName(), enumchatformat); // CraftBukkit
+     }));
+     private static final Map<String, TextColor> NAMED_COLORS = (Map) TextColor.LEGACY_FORMAT_TO_COLOR.values().stream().collect(ImmutableMap.toImmutableMap((chathexcolor) -> {
+         return chathexcolor.name;
+@@ -25,16 +25,22 @@
+     private final int value;
+     @Nullable
+     public final String name;
++    // CraftBukkit start
++    @Nullable
++    public final ChatFormatting format;
+ 
+-    private TextColor(int rgb, String name) {
+-        this.value = rgb & 16777215;
+-        this.name = name;
++    private TextColor(int i, String s, ChatFormatting format) {
++        this.value = i & 16777215;
++        this.name = s;
++        this.format = format;
+     }
+ 
+     private TextColor(int rgb) {
+         this.value = rgb & 16777215;
+         this.name = null;
++        this.format = null;
+     }
++    // CraftBukkit end
+ 
+     public int getValue() {
+         return this.value;
diff --git a/paper-server/patches/sources/net/minecraft/network/protocol/PacketUtils.java.patch b/paper-server/patches/sources/net/minecraft/network/protocol/PacketUtils.java.patch
new file mode 100644
index 0000000000..67d49cd3f7
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/network/protocol/PacketUtils.java.patch
@@ -0,0 +1,27 @@
+--- a/net/minecraft/network/protocol/PacketUtils.java
++++ b/net/minecraft/network/protocol/PacketUtils.java
+@@ -6,10 +6,15 @@
+ import net.minecraft.CrashReportCategory;
+ import net.minecraft.ReportedException;
+ import net.minecraft.network.PacketListener;
++import org.slf4j.Logger;
++
++// CraftBukkit start
++import net.minecraft.server.MinecraftServer;
+ import net.minecraft.server.RunningOnDifferentThreadException;
+ import net.minecraft.server.level.ServerLevel;
++import net.minecraft.server.network.ServerCommonPacketListenerImpl;
++// CraftBukkit end
+ import net.minecraft.util.thread.BlockableEventLoop;
+-import org.slf4j.Logger;
+ 
+ public class PacketUtils {
+ 
+@@ -24,6 +29,7 @@
+     public static <T extends PacketListener> void ensureRunningOnSameThread(Packet<T> packet, T listener, BlockableEventLoop<?> engine) throws RunningOnDifferentThreadException {
+         if (!engine.isSameThread()) {
+             engine.executeIfPossible(() -> {
++                if (listener instanceof ServerCommonPacketListenerImpl serverCommonPacketListener && serverCommonPacketListener.processedDisconnect) return; // CraftBukkit - Don't handle sync packets for kicked players
+                 if (listener.shouldHandleMessage(packet)) {
+                     try {
+                         packet.handle(listener);
diff --git a/paper-server/patches/sources/net/minecraft/network/protocol/PlayerConnectionUtils.patch b/paper-server/patches/sources/net/minecraft/network/protocol/PlayerConnectionUtils.patch
deleted file mode 100644
index e909c52997..0000000000
--- a/paper-server/patches/sources/net/minecraft/network/protocol/PlayerConnectionUtils.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/net/minecraft/network/protocol/PlayerConnectionUtils.java
-+++ b/net/minecraft/network/protocol/PlayerConnectionUtils.java
-@@ -11,6 +11,11 @@
- import net.minecraft.util.thread.IAsyncTaskHandler;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import net.minecraft.server.MinecraftServer;
-+import net.minecraft.server.network.ServerCommonPacketListenerImpl;
-+// CraftBukkit end
-+
- public class PlayerConnectionUtils {
- 
-     private static final Logger LOGGER = LogUtils.getLogger();
-@@ -24,6 +29,7 @@
-     public static <T extends PacketListener> void ensureRunningOnSameThread(Packet<T> packet, T t0, IAsyncTaskHandler<?> iasynctaskhandler) throws CancelledPacketHandleException {
-         if (!iasynctaskhandler.isSameThread()) {
-             iasynctaskhandler.executeIfPossible(() -> {
-+                if (t0 instanceof ServerCommonPacketListenerImpl serverCommonPacketListener && serverCommonPacketListener.processedDisconnect) return; // CraftBukkit - Don't handle sync packets for kicked players
-                 if (t0.shouldHandleMessage(packet)) {
-                     try {
-                         packet.handle(t0);
diff --git a/paper-server/patches/sources/net/minecraft/network/protocol/common/ServerboundCustomPayloadPacket.patch b/paper-server/patches/sources/net/minecraft/network/protocol/common/ServerboundCustomPayloadPacket.java.patch
similarity index 50%
rename from paper-server/patches/sources/net/minecraft/network/protocol/common/ServerboundCustomPayloadPacket.patch
rename to paper-server/patches/sources/net/minecraft/network/protocol/common/ServerboundCustomPayloadPacket.java.patch
index 7e2451598d..e17dc6200b 100644
--- a/paper-server/patches/sources/net/minecraft/network/protocol/common/ServerboundCustomPayloadPacket.patch
+++ b/paper-server/patches/sources/net/minecraft/network/protocol/common/ServerboundCustomPayloadPacket.java.patch
@@ -1,10 +1,18 @@
 --- a/net/minecraft/network/protocol/common/ServerboundCustomPayloadPacket.java
 +++ b/net/minecraft/network/protocol/common/ServerboundCustomPayloadPacket.java
-@@ -16,8 +16,7 @@
+@@ -2,7 +2,6 @@
+ 
+ import com.google.common.collect.Lists;
+ import java.util.List;
+-import net.minecraft.Util;
+ import net.minecraft.network.FriendlyByteBuf;
+ import net.minecraft.network.codec.StreamCodec;
+ import net.minecraft.network.protocol.Packet;
+@@ -16,8 +15,7 @@
      private static final int MAX_PAYLOAD_SIZE = 32767;
-     public static final StreamCodec<PacketDataSerializer, ServerboundCustomPayloadPacket> STREAM_CODEC = CustomPacketPayload.codec((minecraftkey) -> {
+     public static final StreamCodec<FriendlyByteBuf, ServerboundCustomPayloadPacket> STREAM_CODEC = CustomPacketPayload.codec((minecraftkey) -> {
          return DiscardedPayload.codec(minecraftkey, 32767);
--    }, (List) SystemUtils.make(Lists.newArrayList(new CustomPacketPayload.c[]{new CustomPacketPayload.c<>(BrandPayload.TYPE, BrandPayload.STREAM_CODEC)}), (arraylist) -> {
+-    }, (List) Util.make(Lists.newArrayList(new CustomPacketPayload.TypeAndCodec[]{new CustomPacketPayload.TypeAndCodec<>(BrandPayload.TYPE, BrandPayload.STREAM_CODEC)}), (arraylist) -> {
 -    })).map(ServerboundCustomPayloadPacket::new, ServerboundCustomPayloadPacket::payload);
 +    }, java.util.Collections.emptyList()).map(ServerboundCustomPayloadPacket::new, ServerboundCustomPayloadPacket::payload); // CraftBukkit - treat all packets the same
  
diff --git a/paper-server/patches/sources/net/minecraft/network/protocol/common/custom/DiscardedPayload.patch b/paper-server/patches/sources/net/minecraft/network/protocol/common/custom/DiscardedPayload.java.patch
similarity index 53%
rename from paper-server/patches/sources/net/minecraft/network/protocol/common/custom/DiscardedPayload.patch
rename to paper-server/patches/sources/net/minecraft/network/protocol/common/custom/DiscardedPayload.java.patch
index c6b3d3ebe4..785d4efd47 100644
--- a/paper-server/patches/sources/net/minecraft/network/protocol/common/custom/DiscardedPayload.patch
+++ b/paper-server/patches/sources/net/minecraft/network/protocol/common/custom/DiscardedPayload.java.patch
@@ -2,23 +2,23 @@
 +++ b/net/minecraft/network/protocol/common/custom/DiscardedPayload.java
 @@ -4,16 +4,18 @@
  import net.minecraft.network.codec.StreamCodec;
- import net.minecraft.resources.MinecraftKey;
+ import net.minecraft.resources.ResourceLocation;
  
--public record DiscardedPayload(MinecraftKey id) implements CustomPacketPayload {
-+public record DiscardedPayload(MinecraftKey id, io.netty.buffer.ByteBuf data) implements CustomPacketPayload { // CraftBukkit - store data
+-public record DiscardedPayload(ResourceLocation id) implements CustomPacketPayload {
++public record DiscardedPayload(ResourceLocation id, io.netty.buffer.ByteBuf data) implements CustomPacketPayload { // CraftBukkit - store data
  
-     public static <T extends PacketDataSerializer> StreamCodec<T, DiscardedPayload> codec(MinecraftKey minecraftkey, int i) {
+     public static <T extends FriendlyByteBuf> StreamCodec<T, DiscardedPayload> codec(ResourceLocation id, int maxBytes) {
          return CustomPacketPayload.codec((discardedpayload, packetdataserializer) -> {
 +            packetdataserializer.writeBytes(discardedpayload.data); // CraftBukkit - serialize
          }, (packetdataserializer) -> {
              int j = packetdataserializer.readableBytes();
  
-             if (j >= 0 && j <= i) {
+             if (j >= 0 && j <= maxBytes) {
 -                packetdataserializer.skipBytes(j);
--                return new DiscardedPayload(minecraftkey);
+-                return new DiscardedPayload(id);
 +                // CraftBukkit start
-+                return new DiscardedPayload(minecraftkey, packetdataserializer.readBytes(j));
++                return new DiscardedPayload(id, packetdataserializer.readBytes(j));
 +                // CraftBukkit end
              } else {
-                 throw new IllegalArgumentException("Payload may not be larger than " + i + " bytes");
+                 throw new IllegalArgumentException("Payload may not be larger than " + maxBytes + " bytes");
              }
diff --git a/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundInitializeBorderPacket.java.patch b/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundInitializeBorderPacket.java.patch
new file mode 100644
index 0000000000..a1740eccbe
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundInitializeBorderPacket.java.patch
@@ -0,0 +1,15 @@
+--- a/net/minecraft/network/protocol/game/ClientboundInitializeBorderPacket.java
++++ b/net/minecraft/network/protocol/game/ClientboundInitializeBorderPacket.java
+@@ -30,8 +30,10 @@
+     }
+ 
+     public ClientboundInitializeBorderPacket(WorldBorder worldBorder) {
+-        this.newCenterX = worldBorder.getCenterX();
+-        this.newCenterZ = worldBorder.getCenterZ();
++        // CraftBukkit start - multiply out nether border
++        this.newCenterX = worldBorder.getCenterX() * worldBorder.world.dimensionType().coordinateScale();
++        this.newCenterZ = worldBorder.getCenterZ() * worldBorder.world.dimensionType().coordinateScale();
++        // CraftBukkit end
+         this.oldSize = worldBorder.getSize();
+         this.newSize = worldBorder.getLerpTarget();
+         this.lerpTime = worldBorder.getLerpRemainingTime();
diff --git a/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundInitializeBorderPacket.patch b/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundInitializeBorderPacket.patch
deleted file mode 100644
index 61b3f3b221..0000000000
--- a/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundInitializeBorderPacket.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/net/minecraft/network/protocol/game/ClientboundInitializeBorderPacket.java
-+++ b/net/minecraft/network/protocol/game/ClientboundInitializeBorderPacket.java
-@@ -30,8 +30,10 @@
-     }
- 
-     public ClientboundInitializeBorderPacket(WorldBorder worldborder) {
--        this.newCenterX = worldborder.getCenterX();
--        this.newCenterZ = worldborder.getCenterZ();
-+        // CraftBukkit start - multiply out nether border
-+        this.newCenterX = worldborder.getCenterX() * worldborder.world.dimensionType().coordinateScale();
-+        this.newCenterZ = worldborder.getCenterZ() * worldborder.world.dimensionType().coordinateScale();
-+        // CraftBukkit end
-         this.oldSize = worldborder.getSize();
-         this.newSize = worldborder.getLerpTarget();
-         this.lerpTime = worldborder.getLerpRemainingTime();
diff --git a/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java.patch b/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java.patch
new file mode 100644
index 0000000000..414f6fe6a7
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java.patch
@@ -0,0 +1,23 @@
+--- a/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java
++++ b/net/minecraft/network/protocol/game/ClientboundSectionBlocksUpdatePacket.java
+@@ -33,11 +33,19 @@
+             short short0 = (Short) shortiterator.next();
+ 
+             this.positions[j] = short0;
+-            this.states[j] = section.getBlockState(SectionPos.sectionRelativeX(short0), SectionPos.sectionRelativeY(short0), SectionPos.sectionRelativeZ(short0));
++            this.states[j] = (section != null) ? section.getBlockState(SectionPos.sectionRelativeX(short0), SectionPos.sectionRelativeY(short0), SectionPos.sectionRelativeZ(short0)) : net.minecraft.world.level.block.Blocks.AIR.defaultBlockState(); // CraftBukkit - SPIGOT-6076, Mojang bug when empty chunk section notified
+         }
+ 
+     }
+ 
++    // CraftBukkit start - Add constructor
++    public ClientboundSectionBlocksUpdatePacket(SectionPos sectionposition, ShortSet shortset, BlockState[] states) {
++        this.sectionPos = sectionposition;
++        this.positions = shortset.toShortArray();
++        this.states = states;
++    }
++    // CraftBukkit end
++
+     private ClientboundSectionBlocksUpdatePacket(FriendlyByteBuf buf) {
+         this.sectionPos = SectionPos.of(buf.readLong());
+         int i = buf.readVarInt();
diff --git a/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundSetBorderCenterPacket.java.patch b/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundSetBorderCenterPacket.java.patch
new file mode 100644
index 0000000000..139eaa42d9
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundSetBorderCenterPacket.java.patch
@@ -0,0 +1,15 @@
+--- a/net/minecraft/network/protocol/game/ClientboundSetBorderCenterPacket.java
++++ b/net/minecraft/network/protocol/game/ClientboundSetBorderCenterPacket.java
+@@ -13,8 +13,10 @@
+     private final double newCenterZ;
+ 
+     public ClientboundSetBorderCenterPacket(WorldBorder worldBorder) {
+-        this.newCenterX = worldBorder.getCenterX();
+-        this.newCenterZ = worldBorder.getCenterZ();
++        // CraftBukkit start - multiply out nether border
++        this.newCenterX = worldBorder.getCenterX() * (worldBorder.world != null ? worldBorder.world.dimensionType().coordinateScale() : 1.0);
++        this.newCenterZ = worldBorder.getCenterZ() * (worldBorder.world != null ? worldBorder.world.dimensionType().coordinateScale() : 1.0);
++        // CraftBukkit end
+     }
+ 
+     private ClientboundSetBorderCenterPacket(FriendlyByteBuf buf) {
diff --git a/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundSetBorderCenterPacket.patch b/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundSetBorderCenterPacket.patch
deleted file mode 100644
index ecc14ffea2..0000000000
--- a/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundSetBorderCenterPacket.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/net/minecraft/network/protocol/game/ClientboundSetBorderCenterPacket.java
-+++ b/net/minecraft/network/protocol/game/ClientboundSetBorderCenterPacket.java
-@@ -13,8 +13,10 @@
-     private final double newCenterZ;
- 
-     public ClientboundSetBorderCenterPacket(WorldBorder worldborder) {
--        this.newCenterX = worldborder.getCenterX();
--        this.newCenterZ = worldborder.getCenterZ();
-+        // CraftBukkit start - multiply out nether border
-+        this.newCenterX = worldborder.getCenterX() * (worldborder.world != null ? worldborder.world.dimensionType().coordinateScale() : 1.0);
-+        this.newCenterZ = worldborder.getCenterZ() * (worldborder.world != null ? worldborder.world.dimensionType().coordinateScale() : 1.0);
-+        // CraftBukkit end
-     }
- 
-     private ClientboundSetBorderCenterPacket(PacketDataSerializer packetdataserializer) {
diff --git a/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.patch b/paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java.patch
similarity index 100%
rename from paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.patch
rename to paper-server/patches/sources/net/minecraft/network/protocol/game/ClientboundSystemChatPacket.java.patch
diff --git a/paper-server/patches/sources/net/minecraft/network/protocol/game/PacketPlayInBlockPlace.patch b/paper-server/patches/sources/net/minecraft/network/protocol/game/PacketPlayInBlockPlace.patch
deleted file mode 100644
index 760a854cd4..0000000000
--- a/paper-server/patches/sources/net/minecraft/network/protocol/game/PacketPlayInBlockPlace.patch
+++ /dev/null
@@ -1,7 +0,0 @@
---- a/net/minecraft/network/protocol/game/PacketPlayInBlockPlace.java
-+++ b/net/minecraft/network/protocol/game/PacketPlayInBlockPlace.java
-@@ -1,3 +1,4 @@
-+// mc-dev import
- package net.minecraft.network.protocol.game;
- 
- import net.minecraft.network.PacketDataSerializer;
diff --git a/paper-server/patches/sources/net/minecraft/network/protocol/game/PacketPlayInUseItem.patch b/paper-server/patches/sources/net/minecraft/network/protocol/game/PacketPlayInUseItem.patch
deleted file mode 100644
index 9475518bd9..0000000000
--- a/paper-server/patches/sources/net/minecraft/network/protocol/game/PacketPlayInUseItem.patch
+++ /dev/null
@@ -1,7 +0,0 @@
---- a/net/minecraft/network/protocol/game/PacketPlayInUseItem.java
-+++ b/net/minecraft/network/protocol/game/PacketPlayInUseItem.java
-@@ -1,3 +1,4 @@
-+// mc-dev import
- package net.minecraft.network.protocol.game;
- 
- import net.minecraft.network.PacketDataSerializer;
diff --git a/paper-server/patches/sources/net/minecraft/network/protocol/game/PacketPlayOutMultiBlockChange.patch b/paper-server/patches/sources/net/minecraft/network/protocol/game/PacketPlayOutMultiBlockChange.patch
deleted file mode 100644
index 15a1ae262f..0000000000
--- a/paper-server/patches/sources/net/minecraft/network/protocol/game/PacketPlayOutMultiBlockChange.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/net/minecraft/network/protocol/game/PacketPlayOutMultiBlockChange.java
-+++ b/net/minecraft/network/protocol/game/PacketPlayOutMultiBlockChange.java
-@@ -33,11 +33,19 @@
-             short short0 = (Short) shortiterator.next();
- 
-             this.positions[j] = short0;
--            this.states[j] = chunksection.getBlockState(SectionPosition.sectionRelativeX(short0), SectionPosition.sectionRelativeY(short0), SectionPosition.sectionRelativeZ(short0));
-+            this.states[j] = (chunksection != null) ? chunksection.getBlockState(SectionPosition.sectionRelativeX(short0), SectionPosition.sectionRelativeY(short0), SectionPosition.sectionRelativeZ(short0)) : net.minecraft.world.level.block.Blocks.AIR.defaultBlockState(); // CraftBukkit - SPIGOT-6076, Mojang bug when empty chunk section notified
-         }
- 
-     }
- 
-+    // CraftBukkit start - Add constructor
-+    public PacketPlayOutMultiBlockChange(SectionPosition sectionposition, ShortSet shortset, IBlockData[] states) {
-+        this.sectionPos = sectionposition;
-+        this.positions = shortset.toShortArray();
-+        this.states = states;
-+    }
-+    // CraftBukkit end
-+
-     private PacketPlayOutMultiBlockChange(PacketDataSerializer packetdataserializer) {
-         this.sectionPos = SectionPosition.of(packetdataserializer.readLong());
-         int i = packetdataserializer.readVarInt();
diff --git a/paper-server/patches/sources/net/minecraft/network/protocol/game/ServerboundUseItemOnPacket.java.patch b/paper-server/patches/sources/net/minecraft/network/protocol/game/ServerboundUseItemOnPacket.java.patch
new file mode 100644
index 0000000000..8569d7ec7a
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/network/protocol/game/ServerboundUseItemOnPacket.java.patch
@@ -0,0 +1,7 @@
+--- a/net/minecraft/network/protocol/game/ServerboundUseItemOnPacket.java
++++ b/net/minecraft/network/protocol/game/ServerboundUseItemOnPacket.java
+@@ -1,3 +1,4 @@
++// mc-dev import
+ package net.minecraft.network.protocol.game;
+ 
+ import net.minecraft.network.FriendlyByteBuf;
diff --git a/paper-server/patches/sources/net/minecraft/network/protocol/game/ServerboundUseItemPacket.java.patch b/paper-server/patches/sources/net/minecraft/network/protocol/game/ServerboundUseItemPacket.java.patch
new file mode 100644
index 0000000000..9560378696
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/network/protocol/game/ServerboundUseItemPacket.java.patch
@@ -0,0 +1,7 @@
+--- a/net/minecraft/network/protocol/game/ServerboundUseItemPacket.java
++++ b/net/minecraft/network/protocol/game/ServerboundUseItemPacket.java
+@@ -1,3 +1,4 @@
++// mc-dev import
+ package net.minecraft.network.protocol.game;
+ 
+ import net.minecraft.network.FriendlyByteBuf;
diff --git a/paper-server/patches/sources/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch b/paper-server/patches/sources/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch
new file mode 100644
index 0000000000..e4b495427a
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java.patch
@@ -0,0 +1,7 @@
+--- a/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java
++++ b/net/minecraft/network/protocol/handshake/ClientIntentionPacket.java
+@@ -1,3 +1,4 @@
++// mc-dev import
+ package net.minecraft.network.protocol.handshake;
+ 
+ import net.minecraft.network.FriendlyByteBuf;
diff --git a/paper-server/patches/sources/net/minecraft/network/protocol/handshake/PacketHandshakingInSetProtocol.patch b/paper-server/patches/sources/net/minecraft/network/protocol/handshake/PacketHandshakingInSetProtocol.patch
deleted file mode 100644
index 01082820bd..0000000000
--- a/paper-server/patches/sources/net/minecraft/network/protocol/handshake/PacketHandshakingInSetProtocol.patch
+++ /dev/null
@@ -1,7 +0,0 @@
---- a/net/minecraft/network/protocol/handshake/PacketHandshakingInSetProtocol.java
-+++ b/net/minecraft/network/protocol/handshake/PacketHandshakingInSetProtocol.java
-@@ -1,3 +1,4 @@
-+// mc-dev import
- package net.minecraft.network.protocol.handshake;
- 
- import net.minecraft.network.PacketDataSerializer;
diff --git a/paper-server/patches/sources/net/minecraft/network/syncher/DataWatcher.patch b/paper-server/patches/sources/net/minecraft/network/syncher/DataWatcher.patch
deleted file mode 100644
index 309bde763f..0000000000
--- a/paper-server/patches/sources/net/minecraft/network/syncher/DataWatcher.patch
+++ /dev/null
@@ -1,46 +0,0 @@
---- a/net/minecraft/network/syncher/DataWatcher.java
-+++ b/net/minecraft/network/syncher/DataWatcher.java
-@@ -14,6 +14,11 @@
- import org.apache.commons.lang3.ObjectUtils;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import net.minecraft.network.protocol.game.PacketPlayOutEntityMetadata;
-+import net.minecraft.server.level.EntityPlayer;
-+// CraftBukkit end
-+
- public class DataWatcher {
- 
-     private static final Logger LOGGER = LogUtils.getLogger();
-@@ -51,7 +56,7 @@
-     }
- 
-     private <T> DataWatcher.Item<T> getItem(DataWatcherObject<T> datawatcherobject) {
--        return this.itemsById[datawatcherobject.id()];
-+        return (DataWatcher.Item<T>) this.itemsById[datawatcherobject.id()]; // CraftBukkit - decompile error
-     }
- 
-     public <T> T get(DataWatcherObject<T> datawatcherobject) {
-@@ -74,6 +79,13 @@
- 
-     }
- 
-+    // CraftBukkit start - add method from above
-+    public <T> void markDirty(DataWatcherObject<T> datawatcherobject) {
-+        this.getItem(datawatcherobject).setDirty(true);
-+        this.isDirty = true;
-+    }
-+    // CraftBukkit end
-+
-     public boolean isDirty() {
-         return this.isDirty;
-     }
-@@ -140,7 +152,7 @@
-         if (!Objects.equals(datawatcher_c.serializer(), datawatcher_item.accessor.serializer())) {
-             throw new IllegalStateException(String.format(Locale.ROOT, "Invalid entity data item type for field %d on entity %s: old=%s(%s), new=%s(%s)", datawatcher_item.accessor.id(), this.entity, datawatcher_item.value, datawatcher_item.value.getClass(), datawatcher_c.value, datawatcher_c.value.getClass()));
-         } else {
--            datawatcher_item.setValue(datawatcher_c.value);
-+            datawatcher_item.setValue((T) datawatcher_c.value); // CraftBukkit - decompile error
-         }
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/network/syncher/SynchedEntityData.java.patch b/paper-server/patches/sources/net/minecraft/network/syncher/SynchedEntityData.java.patch
new file mode 100644
index 0000000000..98be950605
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/network/syncher/SynchedEntityData.java.patch
@@ -0,0 +1,34 @@
+--- a/net/minecraft/network/syncher/SynchedEntityData.java
++++ b/net/minecraft/network/syncher/SynchedEntityData.java
+@@ -51,7 +51,7 @@
+     }
+ 
+     private <T> SynchedEntityData.DataItem<T> getItem(EntityDataAccessor<T> key) {
+-        return this.itemsById[key.id()];
++        return (SynchedEntityData.DataItem<T>) this.itemsById[key.id()]; // CraftBukkit - decompile error
+     }
+ 
+     public <T> T get(EntityDataAccessor<T> data) {
+@@ -74,6 +74,13 @@
+ 
+     }
+ 
++    // CraftBukkit start - add method from above
++    public <T> void markDirty(EntityDataAccessor<T> datawatcherobject) {
++        this.getItem(datawatcherobject).setDirty(true);
++        this.isDirty = true;
++    }
++    // CraftBukkit end
++
+     public boolean isDirty() {
+         return this.isDirty;
+     }
+@@ -140,7 +147,7 @@
+         if (!Objects.equals(from.serializer(), to.accessor.serializer())) {
+             throw new IllegalStateException(String.format(Locale.ROOT, "Invalid entity data item type for field %d on entity %s: old=%s(%s), new=%s(%s)", to.accessor.id(), this.entity, to.value, to.value.getClass(), from.value, from.value.getClass()));
+         } else {
+-            to.setValue(from.value);
++            to.setValue((T) from.value); // CraftBukkit - decompile error
+         }
+     }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/server/AdvancementDataPlayer.patch b/paper-server/patches/sources/net/minecraft/server/AdvancementDataPlayer.patch
deleted file mode 100644
index ef25110a6b..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/AdvancementDataPlayer.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/net/minecraft/server/AdvancementDataPlayer.java
-+++ b/net/minecraft/server/AdvancementDataPlayer.java
-@@ -196,6 +196,7 @@
-             AdvancementHolder advancementholder = advancementdataworld.get(minecraftkey);
- 
-             if (advancementholder == null) {
-+                if (!minecraftkey.getNamespace().equals("minecraft")) return; // CraftBukkit
-                 AdvancementDataPlayer.LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", minecraftkey, this.playerSavePath);
-             } else {
-                 this.startProgress(advancementholder, advancementprogress);
-@@ -227,6 +228,7 @@
-             this.progressChanged.add(advancementholder);
-             flag = true;
-             if (!flag1 && advancementprogress.isDone()) {
-+                this.player.level().getCraftServer().getPluginManager().callEvent(new org.bukkit.event.player.PlayerAdvancementDoneEvent(this.player.getBukkitEntity(), advancementholder.toBukkit())); // CraftBukkit
-                 advancementholder.value().rewards().grant(this.player);
-                 advancementholder.value().display().ifPresent((advancementdisplay) -> {
-                     if (advancementdisplay.shouldAnnounceChat() && this.player.serverLevel().getGameRules().getBoolean(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)) {
diff --git a/paper-server/patches/sources/net/minecraft/server/Bootstrap.java.patch b/paper-server/patches/sources/net/minecraft/server/Bootstrap.java.patch
new file mode 100644
index 0000000000..32b869b4e1
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/Bootstrap.java.patch
@@ -0,0 +1,116 @@
+--- a/net/minecraft/server/Bootstrap.java
++++ b/net/minecraft/server/Bootstrap.java
+@@ -17,6 +17,9 @@
+ import net.minecraft.core.dispenser.DispenseItemBehavior;
+ import net.minecraft.core.registries.BuiltInRegistries;
+ import net.minecraft.locale.Language;
++import net.minecraft.util.datafix.fixes.BlockStateData;
++import net.minecraft.util.datafix.fixes.ItemIdFix;
++import net.minecraft.util.datafix.fixes.ItemSpawnEggFix;
+ import net.minecraft.world.effect.MobEffect;
+ import net.minecraft.world.entity.EntityType;
+ import net.minecraft.world.entity.ai.attributes.Attribute;
+@@ -30,7 +33,8 @@
+ import net.minecraft.world.level.block.state.BlockBehaviour;
+ import org.slf4j.Logger;
+ 
+-@SuppressForbidden(a = "System.out setup")
++@SuppressForbidden(reason = "System.out setup")
++// CraftBukkit end
+ public class Bootstrap {
+ 
+     public static final PrintStream STDOUT = System.out;
+@@ -42,6 +46,23 @@
+ 
+     public static void bootStrap() {
+         if (!Bootstrap.isBootstrapped) {
++            // CraftBukkit start
++            String name = Bootstrap.class.getSimpleName();
++            switch (name) {
++                case "DispenserRegistry":
++                    break;
++                case "Bootstrap":
++                    System.err.println("***************************************************************************");
++                    System.err.println("*** WARNING: This server jar may only be used for development purposes. ***");
++                    System.err.println("***************************************************************************");
++                    break;
++                default:
++                    System.err.println("**********************************************************************");
++                    System.err.println("*** WARNING: This server jar is unsupported, use at your own risk. ***");
++                    System.err.println("**********************************************************************");
++                    break;
++            }
++            // CraftBukkit end
+             Bootstrap.isBootstrapped = true;
+             Instant instant = Instant.now();
+ 
+@@ -61,6 +82,69 @@
+                     Bootstrap.wrapStreams();
+                     Bootstrap.bootstrapDuration.set(Duration.between(instant, Instant.now()).toMillis());
+                 }
++                // CraftBukkit start - easier than fixing the decompile
++                BlockStateData.register(1008, "{Name:'minecraft:oak_sign',Properties:{rotation:'0'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'0'}}");
++                BlockStateData.register(1009, "{Name:'minecraft:oak_sign',Properties:{rotation:'1'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'1'}}");
++                BlockStateData.register(1010, "{Name:'minecraft:oak_sign',Properties:{rotation:'2'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'2'}}");
++                BlockStateData.register(1011, "{Name:'minecraft:oak_sign',Properties:{rotation:'3'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'3'}}");
++                BlockStateData.register(1012, "{Name:'minecraft:oak_sign',Properties:{rotation:'4'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'4'}}");
++                BlockStateData.register(1013, "{Name:'minecraft:oak_sign',Properties:{rotation:'5'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'5'}}");
++                BlockStateData.register(1014, "{Name:'minecraft:oak_sign',Properties:{rotation:'6'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'6'}}");
++                BlockStateData.register(1015, "{Name:'minecraft:oak_sign',Properties:{rotation:'7'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'7'}}");
++                BlockStateData.register(1016, "{Name:'minecraft:oak_sign',Properties:{rotation:'8'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'8'}}");
++                BlockStateData.register(1017, "{Name:'minecraft:oak_sign',Properties:{rotation:'9'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'9'}}");
++                BlockStateData.register(1018, "{Name:'minecraft:oak_sign',Properties:{rotation:'10'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'10'}}");
++                BlockStateData.register(1019, "{Name:'minecraft:oak_sign',Properties:{rotation:'11'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'11'}}");
++                BlockStateData.register(1020, "{Name:'minecraft:oak_sign',Properties:{rotation:'12'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'12'}}");
++                BlockStateData.register(1021, "{Name:'minecraft:oak_sign',Properties:{rotation:'13'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'13'}}");
++                BlockStateData.register(1022, "{Name:'minecraft:oak_sign',Properties:{rotation:'14'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'14'}}");
++                BlockStateData.register(1023, "{Name:'minecraft:oak_sign',Properties:{rotation:'15'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'15'}}");
++                ItemIdFix.ITEM_NAMES.put(323, "minecraft:oak_sign");
++
++                BlockStateData.register(1440, "{Name:\'minecraft:portal\',Properties:{axis:\'x\'}}", new String[]{"{Name:\'minecraft:portal\',Properties:{axis:\'x\'}}"});
++
++                ItemIdFix.ITEM_NAMES.put(409, "minecraft:prismarine_shard");
++                ItemIdFix.ITEM_NAMES.put(410, "minecraft:prismarine_crystals");
++                ItemIdFix.ITEM_NAMES.put(411, "minecraft:rabbit");
++                ItemIdFix.ITEM_NAMES.put(412, "minecraft:cooked_rabbit");
++                ItemIdFix.ITEM_NAMES.put(413, "minecraft:rabbit_stew");
++                ItemIdFix.ITEM_NAMES.put(414, "minecraft:rabbit_foot");
++                ItemIdFix.ITEM_NAMES.put(415, "minecraft:rabbit_hide");
++                ItemIdFix.ITEM_NAMES.put(416, "minecraft:armor_stand");
++
++                ItemIdFix.ITEM_NAMES.put(423, "minecraft:mutton");
++                ItemIdFix.ITEM_NAMES.put(424, "minecraft:cooked_mutton");
++                ItemIdFix.ITEM_NAMES.put(425, "minecraft:banner");
++                ItemIdFix.ITEM_NAMES.put(426, "minecraft:end_crystal");
++                ItemIdFix.ITEM_NAMES.put(427, "minecraft:spruce_door");
++                ItemIdFix.ITEM_NAMES.put(428, "minecraft:birch_door");
++                ItemIdFix.ITEM_NAMES.put(429, "minecraft:jungle_door");
++                ItemIdFix.ITEM_NAMES.put(430, "minecraft:acacia_door");
++                ItemIdFix.ITEM_NAMES.put(431, "minecraft:dark_oak_door");
++                ItemIdFix.ITEM_NAMES.put(432, "minecraft:chorus_fruit");
++                ItemIdFix.ITEM_NAMES.put(433, "minecraft:chorus_fruit_popped");
++                ItemIdFix.ITEM_NAMES.put(434, "minecraft:beetroot");
++                ItemIdFix.ITEM_NAMES.put(435, "minecraft:beetroot_seeds");
++                ItemIdFix.ITEM_NAMES.put(436, "minecraft:beetroot_soup");
++                ItemIdFix.ITEM_NAMES.put(437, "minecraft:dragon_breath");
++                ItemIdFix.ITEM_NAMES.put(438, "minecraft:splash_potion");
++                ItemIdFix.ITEM_NAMES.put(439, "minecraft:spectral_arrow");
++                ItemIdFix.ITEM_NAMES.put(440, "minecraft:tipped_arrow");
++                ItemIdFix.ITEM_NAMES.put(441, "minecraft:lingering_potion");
++                ItemIdFix.ITEM_NAMES.put(442, "minecraft:shield");
++                ItemIdFix.ITEM_NAMES.put(443, "minecraft:elytra");
++                ItemIdFix.ITEM_NAMES.put(444, "minecraft:spruce_boat");
++                ItemIdFix.ITEM_NAMES.put(445, "minecraft:birch_boat");
++                ItemIdFix.ITEM_NAMES.put(446, "minecraft:jungle_boat");
++                ItemIdFix.ITEM_NAMES.put(447, "minecraft:acacia_boat");
++                ItemIdFix.ITEM_NAMES.put(448, "minecraft:dark_oak_boat");
++                ItemIdFix.ITEM_NAMES.put(449, "minecraft:totem_of_undying");
++                ItemIdFix.ITEM_NAMES.put(450, "minecraft:shulker_shell");
++                ItemIdFix.ITEM_NAMES.put(452, "minecraft:iron_nugget");
++                ItemIdFix.ITEM_NAMES.put(453, "minecraft:knowledge_book");
++
++                ItemSpawnEggFix.ID_TO_ENTITY[23] = "Arrow";
++                // CraftBukkit end
+             }
+         }
+     }
diff --git a/paper-server/patches/sources/net/minecraft/server/DispenserRegistry.patch b/paper-server/patches/sources/net/minecraft/server/DispenserRegistry.patch
deleted file mode 100644
index 2c354a2c04..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/DispenserRegistry.patch
+++ /dev/null
@@ -1,111 +0,0 @@
---- a/net/minecraft/server/DispenserRegistry.java
-+++ b/net/minecraft/server/DispenserRegistry.java
-@@ -30,7 +30,13 @@
- import net.minecraft.world.level.block.state.BlockBase;
- import org.slf4j.Logger;
- 
--@SuppressForbidden(a = "System.out setup")
-+// CraftBukkit start
-+import net.minecraft.util.datafix.fixes.DataConverterFlattenData;
-+import net.minecraft.util.datafix.fixes.DataConverterMaterialId;
-+import net.minecraft.util.datafix.fixes.DataConverterSpawnEgg;
-+
-+@SuppressForbidden(reason = "System.out setup")
-+// CraftBukkit end
- public class DispenserRegistry {
- 
-     public static final PrintStream STDOUT = System.out;
-@@ -42,6 +48,23 @@
- 
-     public static void bootStrap() {
-         if (!DispenserRegistry.isBootstrapped) {
-+            // CraftBukkit start
-+            String name = DispenserRegistry.class.getSimpleName();
-+            switch (name) {
-+                case "DispenserRegistry":
-+                    break;
-+                case "Bootstrap":
-+                    System.err.println("***************************************************************************");
-+                    System.err.println("*** WARNING: This server jar may only be used for development purposes. ***");
-+                    System.err.println("***************************************************************************");
-+                    break;
-+                default:
-+                    System.err.println("**********************************************************************");
-+                    System.err.println("*** WARNING: This server jar is unsupported, use at your own risk. ***");
-+                    System.err.println("**********************************************************************");
-+                    break;
-+            }
-+            // CraftBukkit end
-             DispenserRegistry.isBootstrapped = true;
-             Instant instant = Instant.now();
- 
-@@ -61,6 +84,69 @@
-                     wrapStreams();
-                     DispenserRegistry.bootstrapDuration.set(Duration.between(instant, Instant.now()).toMillis());
-                 }
-+                // CraftBukkit start - easier than fixing the decompile
-+                DataConverterFlattenData.register(1008, "{Name:'minecraft:oak_sign',Properties:{rotation:'0'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'0'}}");
-+                DataConverterFlattenData.register(1009, "{Name:'minecraft:oak_sign',Properties:{rotation:'1'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'1'}}");
-+                DataConverterFlattenData.register(1010, "{Name:'minecraft:oak_sign',Properties:{rotation:'2'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'2'}}");
-+                DataConverterFlattenData.register(1011, "{Name:'minecraft:oak_sign',Properties:{rotation:'3'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'3'}}");
-+                DataConverterFlattenData.register(1012, "{Name:'minecraft:oak_sign',Properties:{rotation:'4'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'4'}}");
-+                DataConverterFlattenData.register(1013, "{Name:'minecraft:oak_sign',Properties:{rotation:'5'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'5'}}");
-+                DataConverterFlattenData.register(1014, "{Name:'minecraft:oak_sign',Properties:{rotation:'6'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'6'}}");
-+                DataConverterFlattenData.register(1015, "{Name:'minecraft:oak_sign',Properties:{rotation:'7'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'7'}}");
-+                DataConverterFlattenData.register(1016, "{Name:'minecraft:oak_sign',Properties:{rotation:'8'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'8'}}");
-+                DataConverterFlattenData.register(1017, "{Name:'minecraft:oak_sign',Properties:{rotation:'9'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'9'}}");
-+                DataConverterFlattenData.register(1018, "{Name:'minecraft:oak_sign',Properties:{rotation:'10'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'10'}}");
-+                DataConverterFlattenData.register(1019, "{Name:'minecraft:oak_sign',Properties:{rotation:'11'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'11'}}");
-+                DataConverterFlattenData.register(1020, "{Name:'minecraft:oak_sign',Properties:{rotation:'12'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'12'}}");
-+                DataConverterFlattenData.register(1021, "{Name:'minecraft:oak_sign',Properties:{rotation:'13'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'13'}}");
-+                DataConverterFlattenData.register(1022, "{Name:'minecraft:oak_sign',Properties:{rotation:'14'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'14'}}");
-+                DataConverterFlattenData.register(1023, "{Name:'minecraft:oak_sign',Properties:{rotation:'15'}}", "{Name:'minecraft:standing_sign',Properties:{rotation:'15'}}");
-+                DataConverterMaterialId.ITEM_NAMES.put(323, "minecraft:oak_sign");
-+
-+                DataConverterFlattenData.register(1440, "{Name:\'minecraft:portal\',Properties:{axis:\'x\'}}", new String[]{"{Name:\'minecraft:portal\',Properties:{axis:\'x\'}}"});
-+
-+                DataConverterMaterialId.ITEM_NAMES.put(409, "minecraft:prismarine_shard");
-+                DataConverterMaterialId.ITEM_NAMES.put(410, "minecraft:prismarine_crystals");
-+                DataConverterMaterialId.ITEM_NAMES.put(411, "minecraft:rabbit");
-+                DataConverterMaterialId.ITEM_NAMES.put(412, "minecraft:cooked_rabbit");
-+                DataConverterMaterialId.ITEM_NAMES.put(413, "minecraft:rabbit_stew");
-+                DataConverterMaterialId.ITEM_NAMES.put(414, "minecraft:rabbit_foot");
-+                DataConverterMaterialId.ITEM_NAMES.put(415, "minecraft:rabbit_hide");
-+                DataConverterMaterialId.ITEM_NAMES.put(416, "minecraft:armor_stand");
-+
-+                DataConverterMaterialId.ITEM_NAMES.put(423, "minecraft:mutton");
-+                DataConverterMaterialId.ITEM_NAMES.put(424, "minecraft:cooked_mutton");
-+                DataConverterMaterialId.ITEM_NAMES.put(425, "minecraft:banner");
-+                DataConverterMaterialId.ITEM_NAMES.put(426, "minecraft:end_crystal");
-+                DataConverterMaterialId.ITEM_NAMES.put(427, "minecraft:spruce_door");
-+                DataConverterMaterialId.ITEM_NAMES.put(428, "minecraft:birch_door");
-+                DataConverterMaterialId.ITEM_NAMES.put(429, "minecraft:jungle_door");
-+                DataConverterMaterialId.ITEM_NAMES.put(430, "minecraft:acacia_door");
-+                DataConverterMaterialId.ITEM_NAMES.put(431, "minecraft:dark_oak_door");
-+                DataConverterMaterialId.ITEM_NAMES.put(432, "minecraft:chorus_fruit");
-+                DataConverterMaterialId.ITEM_NAMES.put(433, "minecraft:chorus_fruit_popped");
-+                DataConverterMaterialId.ITEM_NAMES.put(434, "minecraft:beetroot");
-+                DataConverterMaterialId.ITEM_NAMES.put(435, "minecraft:beetroot_seeds");
-+                DataConverterMaterialId.ITEM_NAMES.put(436, "minecraft:beetroot_soup");
-+                DataConverterMaterialId.ITEM_NAMES.put(437, "minecraft:dragon_breath");
-+                DataConverterMaterialId.ITEM_NAMES.put(438, "minecraft:splash_potion");
-+                DataConverterMaterialId.ITEM_NAMES.put(439, "minecraft:spectral_arrow");
-+                DataConverterMaterialId.ITEM_NAMES.put(440, "minecraft:tipped_arrow");
-+                DataConverterMaterialId.ITEM_NAMES.put(441, "minecraft:lingering_potion");
-+                DataConverterMaterialId.ITEM_NAMES.put(442, "minecraft:shield");
-+                DataConverterMaterialId.ITEM_NAMES.put(443, "minecraft:elytra");
-+                DataConverterMaterialId.ITEM_NAMES.put(444, "minecraft:spruce_boat");
-+                DataConverterMaterialId.ITEM_NAMES.put(445, "minecraft:birch_boat");
-+                DataConverterMaterialId.ITEM_NAMES.put(446, "minecraft:jungle_boat");
-+                DataConverterMaterialId.ITEM_NAMES.put(447, "minecraft:acacia_boat");
-+                DataConverterMaterialId.ITEM_NAMES.put(448, "minecraft:dark_oak_boat");
-+                DataConverterMaterialId.ITEM_NAMES.put(449, "minecraft:totem_of_undying");
-+                DataConverterMaterialId.ITEM_NAMES.put(450, "minecraft:shulker_shell");
-+                DataConverterMaterialId.ITEM_NAMES.put(452, "minecraft:iron_nugget");
-+                DataConverterMaterialId.ITEM_NAMES.put(453, "minecraft:knowledge_book");
-+
-+                DataConverterSpawnEgg.ID_TO_ENTITY[23] = "Arrow";
-+                // CraftBukkit end
-             }
-         }
-     }
diff --git a/paper-server/patches/sources/net/minecraft/server/Main.patch b/paper-server/patches/sources/net/minecraft/server/Main.java.patch
similarity index 69%
rename from paper-server/patches/sources/net/minecraft/server/Main.patch
rename to paper-server/patches/sources/net/minecraft/server/Main.java.patch
index 416ed85cdc..e30aee3d2d 100644
--- a/paper-server/patches/sources/net/minecraft/server/Main.patch
+++ b/paper-server/patches/sources/net/minecraft/server/Main.java.patch
@@ -1,7 +1,22 @@
 --- a/net/minecraft/server/Main.java
 +++ b/net/minecraft/server/Main.java
-@@ -61,16 +61,28 @@
- import net.minecraft.world.level.storage.WorldInfo;
+@@ -38,6 +38,7 @@
+ import net.minecraft.server.dedicated.DedicatedServerProperties;
+ import net.minecraft.server.dedicated.DedicatedServerSettings;
+ import net.minecraft.server.level.progress.LoggerChunkProgressListener;
++import net.minecraft.server.packs.PackType;
+ import net.minecraft.server.packs.repository.PackRepository;
+ import net.minecraft.server.packs.repository.ServerPacksSource;
+ import net.minecraft.util.Mth;
+@@ -55,22 +56,31 @@
+ import net.minecraft.world.level.levelgen.WorldOptions;
+ import net.minecraft.world.level.levelgen.presets.WorldPresets;
+ import net.minecraft.world.level.storage.LevelDataAndDimensions;
++import net.minecraft.world.level.storage.LevelResource;
+ import net.minecraft.world.level.storage.LevelStorageSource;
+ import net.minecraft.world.level.storage.LevelSummary;
+ import net.minecraft.world.level.storage.PrimaryLevelData;
+-import net.minecraft.world.level.storage.WorldData;
  import org.slf4j.Logger;
  
 +// CraftBukkit start
@@ -9,9 +24,6 @@
 +import java.io.InputStreamReader;
 +import java.util.concurrent.atomic.AtomicReference;
 +import net.minecraft.SharedConstants;
-+import net.minecraft.server.packs.EnumResourcePackType;
-+import net.minecraft.world.level.dimension.WorldDimension;
-+import net.minecraft.world.level.storage.SavedFile;
 +import org.bukkit.configuration.file.YamlConfiguration;
 +// CraftBukkit end
 +
@@ -24,14 +36,21 @@
 -    @SuppressForbidden(a = "System.out needed before bootstrap")
 +    @SuppressForbidden(reason = "System.out needed before bootstrap") // CraftBukkit - decompile error
      @DontObfuscate
--    public static void main(String[] astring) {
+-    public static void main(String[] args) {
 +    public static void main(final OptionSet optionset) { // CraftBukkit - replaces main(String[] astring)
          SharedConstants.tryDetectVersion();
 +        /* CraftBukkit start - Replace everything
          OptionParser optionparser = new OptionParser();
          OptionSpec<Void> optionspec = optionparser.accepts("nogui");
          OptionSpec<Void> optionspec1 = optionparser.accepts("initSettings", "Initializes 'server.properties' and 'eula.txt', then quits");
-@@ -96,15 +108,18 @@
+@@ -90,21 +100,24 @@
+         OptionSpec<String> optionspec15 = optionparser.nonOptions();
+ 
+         try {
+-            OptionSet optionset = optionparser.parse(args);
++            OptionSet optionset = optionparser.parse(astring);
+ 
+             if (optionset.has(optionspec8)) {
                  optionparser.printHelpOn(System.err);
                  return;
              }
@@ -39,11 +58,11 @@
  
 -            Path path = (Path) optionset.valueOf(optionspec14);
 +        try {
-+
-+            Path path = (Path) optionset.valueOf("pidFile"); // CraftBukkit
  
++            Path path = (Path) optionset.valueOf("pidFile"); // CraftBukkit
++
              if (path != null) {
-                 writePidFile(path);
+                 Main.writePidFile(path);
              }
  
              CrashReport.preload();
@@ -52,17 +71,17 @@
                  JvmProfiler.INSTANCE.start(Environment.SERVER);
              }
  
-@@ -112,14 +127,27 @@
-             DispenserRegistry.validate();
-             SystemUtils.startTimerHackThread();
+@@ -112,14 +125,27 @@
+             Bootstrap.validate();
+             Util.startTimerHackThread();
              Path path1 = Paths.get("server.properties");
 -            DedicatedServerSettings dedicatedserversettings = new DedicatedServerSettings(path1);
 +            DedicatedServerSettings dedicatedserversettings = new DedicatedServerSettings(optionset); // CraftBukkit - CLI argument support
  
              dedicatedserversettings.forceSave();
-             RegionFileCompression.configure(dedicatedserversettings.getProperties().regionFileComression);
+             RegionFileVersion.configure(dedicatedserversettings.getProperties().regionFileComression);
              Path path2 = Paths.get("eula.txt");
-             EULA eula = new EULA(path2);
+             Eula eula = new Eula(path2);
  
 -            if (optionset.has(optionspec1)) {
 +            if (optionset.has("initSettings")) { // CraftBukkit
@@ -82,7 +101,7 @@
                  Main.LOGGER.info("Initialized '{}' and '{}'", path1.toAbsolutePath(), path2.toAbsolutePath());
                  return;
              }
-@@ -129,11 +157,13 @@
+@@ -129,11 +155,13 @@
                  return;
              }
  
@@ -92,14 +111,14 @@
 -            String s = (String) Optional.ofNullable((String) optionset.valueOf(optionspec10)).orElse(dedicatedserversettings.getProperties().levelName);
 +            // CraftBukkit start
 +            String s = (String) Optional.ofNullable((String) optionset.valueOf("world")).orElse(dedicatedserversettings.getProperties().levelName);
-             Convertable convertable = Convertable.createDefault(file.toPath());
--            Convertable.ConversionSession convertable_conversionsession = convertable.validateAndCreateAccess(s);
-+            Convertable.ConversionSession convertable_conversionsession = convertable.validateAndCreateAccess(s, WorldDimension.OVERWORLD);
+             LevelStorageSource convertable = LevelStorageSource.createDefault(file.toPath());
+-            LevelStorageSource.LevelStorageAccess convertable_conversionsession = convertable.validateAndCreateAccess(s);
++            LevelStorageSource.LevelStorageAccess convertable_conversionsession = convertable.validateAndCreateAccess(s, LevelStem.OVERWORLD);
 +            // CraftBukkit end
              Dynamic dynamic;
  
              if (convertable_conversionsession.hasWorldData()) {
-@@ -174,13 +204,31 @@
+@@ -174,13 +202,31 @@
              }
  
              Dynamic<?> dynamic1 = dynamic;
@@ -110,9 +129,9 @@
                  Main.LOGGER.warn("Safe mode active, only vanilla datapack will be loaded");
              }
  
-             ResourcePackRepository resourcepackrepository = ResourcePackSourceVanilla.createPackRepository(convertable_conversionsession);
+             PackRepository resourcepackrepository = ServerPacksSource.createPackRepository(convertable_conversionsession);
 +            // CraftBukkit start
-+            File bukkitDataPackFolder = new File(convertable_conversionsession.getLevelPath(SavedFile.DATAPACK_DIR).toFile(), "bukkit");
++            File bukkitDataPackFolder = new File(convertable_conversionsession.getLevelPath(LevelResource.DATAPACK_DIR).toFile(), "bukkit");
 +            if (!bukkitDataPackFolder.exists()) {
 +                bukkitDataPackFolder.mkdirs();
 +            }
@@ -121,26 +140,26 @@
 +                com.google.common.io.Files.write("{\n"
 +                        + "    \"pack\": {\n"
 +                        + "        \"description\": \"Data pack for resources provided by Bukkit plugins\",\n"
-+                        + "        \"pack_format\": " + SharedConstants.getCurrentVersion().getPackVersion(EnumResourcePackType.SERVER_DATA) + "\n"
++                        + "        \"pack_format\": " + SharedConstants.getCurrentVersion().getPackVersion(PackType.SERVER_DATA) + "\n"
 +                        + "    }\n"
 +                        + "}\n", mcMeta, com.google.common.base.Charsets.UTF_8);
 +            } catch (java.io.IOException ex) {
 +                throw new RuntimeException("Could not initialize Bukkit datapack", ex);
 +            }
-+            AtomicReference<WorldLoader.a> worldLoader = new AtomicReference<>();
++            AtomicReference<WorldLoader.DataLoadContext> worldLoader = new AtomicReference<>();
 +            // CraftBukkit end
  
              WorldStem worldstem;
  
-@@ -189,6 +237,7 @@
+@@ -189,6 +235,7 @@
  
-                 worldstem = (WorldStem) SystemUtils.blockUntilDone((executor) -> {
+                 worldstem = (WorldStem) Util.blockUntilDone((executor) -> {
                      return WorldLoader.load(worldloader_c, (worldloader_a) -> {
 +                        worldLoader.set(worldloader_a); // CraftBukkit
-                         IRegistry<WorldDimension> iregistry = worldloader_a.datapackDimensions().lookupOrThrow(Registries.LEVEL_STEM);
+                         Registry<LevelStem> iregistry = worldloader_a.datapackDimensions().lookupOrThrow(Registries.LEVEL_STEM);
  
                          if (dynamic1 != null) {
-@@ -201,7 +250,7 @@
+@@ -201,7 +248,7 @@
                              WorldOptions worldoptions;
                              WorldDimensions worlddimensions;
  
@@ -149,31 +168,39 @@
                                  worldsettings = MinecraftServer.DEMO_SETTINGS;
                                  worldoptions = WorldOptions.DEMO_OPTIONS;
                                  worlddimensions = WorldPresets.createNormalWorldDimensions(worldloader_a.datapackWorldgen());
-@@ -209,7 +258,7 @@
+@@ -209,7 +256,7 @@
                                  DedicatedServerProperties dedicatedserverproperties = dedicatedserversettings.getProperties();
  
-                                 worldsettings = new WorldSettings(dedicatedserverproperties.levelName, dedicatedserverproperties.gamemode, dedicatedserverproperties.hardcore, dedicatedserverproperties.difficulty, false, new GameRules(worldloader_a.dataConfiguration().enabledFeatures()), worldloader_a.dataConfiguration());
+                                 worldsettings = new LevelSettings(dedicatedserverproperties.levelName, dedicatedserverproperties.gamemode, dedicatedserverproperties.hardcore, dedicatedserverproperties.difficulty, false, new GameRules(worldloader_a.dataConfiguration().enabledFeatures()), worldloader_a.dataConfiguration());
 -                                worldoptions = optionset.has(optionspec3) ? dedicatedserverproperties.worldOptions.withBonusChest(true) : dedicatedserverproperties.worldOptions;
 +                                worldoptions = optionset.has("bonusChest") ? dedicatedserverproperties.worldOptions.withBonusChest(true) : dedicatedserverproperties.worldOptions; // CraftBukkit
                                  worlddimensions = dedicatedserverproperties.createDimensions(worldloader_a.datapackWorldgen());
                              }
  
-@@ -225,6 +274,7 @@
+@@ -225,32 +272,44 @@
                  return;
              }
  
+-            RegistryAccess.Frozen iregistrycustom_dimension = worldstem.registries().compositeAccess();
 +            /*
-             IRegistryCustom.Dimension iregistrycustom_dimension = worldstem.registries().compositeAccess();
++            IRegistryCustom.Dimension iregistrycustom_dimension = worldstem.registries().compositeAccess();
              boolean flag1 = optionset.has(optionspec6);
  
-@@ -237,20 +287,31 @@
-             SaveData savedata = worldstem.worldData();
+             if (optionset.has(optionspec4) || flag1) {
+-                Main.forceUpgrade(convertable_conversionsession, DataFixers.getDataFixer(), optionset.has(optionspec5), () -> {
++                forceUpgrade(convertable_conversionsession, DataConverterRegistry.getDataFixer(), optionset.has(optionspec5), () -> {
+                     return true;
+                 }, iregistrycustom_dimension, flag1);
+             }
+ 
+-            WorldData savedata = worldstem.worldData();
++            SaveData savedata = worldstem.worldData();
  
              convertable_conversionsession.saveDataTag(iregistrycustom_dimension, savedata);
 +            */
              final DedicatedServer dedicatedserver = (DedicatedServer) MinecraftServer.spin((thread) -> {
--                DedicatedServer dedicatedserver1 = new DedicatedServer(thread, convertable_conversionsession, resourcepackrepository, worldstem, dedicatedserversettings, DataConverterRegistry.getDataFixer(), services, WorldLoadListenerLogger::createFromGameruleRadius);
-+                DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, worldLoader.get(), thread, convertable_conversionsession, resourcepackrepository, worldstem, dedicatedserversettings, DataConverterRegistry.getDataFixer(), services, WorldLoadListenerLogger::createFromGameruleRadius);
+-                DedicatedServer dedicatedserver1 = new DedicatedServer(thread, convertable_conversionsession, resourcepackrepository, worldstem, dedicatedserversettings, DataFixers.getDataFixer(), services, LoggerChunkProgressListener::createFromGameruleRadius);
++                DedicatedServer dedicatedserver1 = new DedicatedServer(optionset, worldLoader.get(), thread, convertable_conversionsession, resourcepackrepository, worldstem, dedicatedserversettings, DataFixers.getDataFixer(), services, LoggerChunkProgressListener::createFromGameruleRadius);
  
 +                /*
                  dedicatedserver1.setPort((Integer) optionset.valueOf(optionspec11));
@@ -200,7 +227,7 @@
              Thread thread = new Thread("Server Shutdown Thread") {
                  public void run() {
                      dedicatedserver.halt(true);
-@@ -259,6 +320,7 @@
+@@ -259,6 +318,7 @@
  
              thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(Main.LOGGER));
              Runtime.getRuntime().addShutdownHook(thread);
@@ -208,12 +235,12 @@
          } catch (Exception exception1) {
              Main.LOGGER.error(LogUtils.FATAL_MARKER, "Failed to start the minecraft server", exception1);
          }
-@@ -295,7 +357,7 @@
+@@ -295,7 +355,7 @@
      }
  
-     public static void forceUpgrade(Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, boolean flag, BooleanSupplier booleansupplier, IRegistryCustom iregistrycustom, boolean flag1) {
+     public static void forceUpgrade(LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, boolean eraseCache, BooleanSupplier continueCheck, RegistryAccess dynamicRegistryManager, boolean recreateRegionFiles) {
 -        Main.LOGGER.info("Forcing world upgrade!");
-+        Main.LOGGER.info("Forcing world upgrade! {}", convertable_conversionsession.getLevelId()); // CraftBukkit
-         WorldUpgrader worldupgrader = new WorldUpgrader(convertable_conversionsession, datafixer, iregistrycustom, flag, flag1);
++        Main.LOGGER.info("Forcing world upgrade! {}", session.getLevelId()); // CraftBukkit
+         WorldUpgrader worldupgrader = new WorldUpgrader(session, dataFixer, dynamicRegistryManager, eraseCache, recreateRegionFiles);
  
          try {
diff --git a/paper-server/patches/sources/net/minecraft/server/MinecraftServer.patch b/paper-server/patches/sources/net/minecraft/server/MinecraftServer.java.patch
similarity index 55%
rename from paper-server/patches/sources/net/minecraft/server/MinecraftServer.patch
rename to paper-server/patches/sources/net/minecraft/server/MinecraftServer.java.patch
index a5c4537e4a..788e74d8e2 100644
--- a/paper-server/patches/sources/net/minecraft/server/MinecraftServer.patch
+++ b/paper-server/patches/sources/net/minecraft/server/MinecraftServer.java.patch
@@ -1,9 +1,49 @@
 --- a/net/minecraft/server/MinecraftServer.java
 +++ b/net/minecraft/server/MinecraftServer.java
-@@ -180,13 +180,38 @@
- import net.minecraft.world.phys.Vec3D;
- import org.slf4j.Logger;
- 
+@@ -84,17 +84,6 @@
+ import net.minecraft.obfuscate.DontObfuscate;
+ import net.minecraft.resources.ResourceKey;
+ import net.minecraft.resources.ResourceLocation;
+-import net.minecraft.server.bossevents.CustomBossEvents;
+-import net.minecraft.server.level.DemoMode;
+-import net.minecraft.server.level.PlayerRespawnLogic;
+-import net.minecraft.server.level.ServerChunkCache;
+-import net.minecraft.server.level.ServerLevel;
+-import net.minecraft.server.level.ServerPlayer;
+-import net.minecraft.server.level.ServerPlayerGameMode;
+-import net.minecraft.server.level.progress.ChunkProgressListener;
+-import net.minecraft.server.level.progress.ChunkProgressListenerFactory;
+-import net.minecraft.server.network.ServerConnectionListener;
+-import net.minecraft.server.network.TextFilter;
+ import net.minecraft.server.packs.PackType;
+ import net.minecraft.server.packs.repository.Pack;
+ import net.minecraft.server.packs.repository.PackRepository;
+@@ -116,6 +105,7 @@
+ import net.minecraft.util.RandomSource;
+ import net.minecraft.util.SignatureValidator;
+ import net.minecraft.util.TimeUtil;
++import net.minecraft.util.datafix.DataFixers;
+ import net.minecraft.util.debugchart.RemoteDebugSampleType;
+ import net.minecraft.util.debugchart.SampleLogger;
+ import net.minecraft.util.debugchart.TpsDebugDimensions;
+@@ -156,29 +146,62 @@
+ import net.minecraft.world.level.biome.BiomeManager;
+ import net.minecraft.world.level.block.Block;
+ import net.minecraft.world.level.block.entity.FuelValues;
+-import net.minecraft.world.level.border.BorderChangeListener;
+ import net.minecraft.world.level.border.WorldBorder;
+ import net.minecraft.world.level.chunk.storage.ChunkIOErrorReporter;
+ import net.minecraft.world.level.chunk.storage.RegionStorageInfo;
+ import net.minecraft.world.level.dimension.LevelStem;
+-import net.minecraft.world.level.levelgen.Heightmap;
+-import net.minecraft.world.level.levelgen.PatrolSpawner;
+-import net.minecraft.world.level.levelgen.PhantomSpawner;
+ import net.minecraft.world.level.levelgen.WorldOptions;
+ import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
+ import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager;
++import net.minecraft.world.level.storage.WorldData;
++import org.slf4j.Logger;
++
 +// CraftBukkit start
 +import com.mojang.serialization.Dynamic;
 +import com.mojang.serialization.Lifecycle;
@@ -13,39 +53,64 @@
 +import joptsimple.OptionSet;
 +import net.minecraft.nbt.NbtException;
 +import net.minecraft.nbt.ReportedNbtException;
++import net.minecraft.server.bossevents.CustomBossEvents;
 +import net.minecraft.server.dedicated.DedicatedServer;
 +import net.minecraft.server.dedicated.DedicatedServerProperties;
-+import net.minecraft.util.datafix.DataConverterRegistry;
++import net.minecraft.server.level.DemoMode;
++import net.minecraft.server.level.PlayerRespawnLogic;
++import net.minecraft.server.level.ServerChunkCache;
++import net.minecraft.server.level.ServerLevel;
++import net.minecraft.server.level.ServerPlayer;
++import net.minecraft.server.level.ServerPlayerGameMode;
++import net.minecraft.server.level.progress.ChunkProgressListener;
++import net.minecraft.server.level.progress.ChunkProgressListenerFactory;
++import net.minecraft.server.network.ServerConnectionListener;
++import net.minecraft.server.network.TextFilter;
++import net.minecraft.world.level.levelgen.Heightmap;
++import net.minecraft.world.level.levelgen.PatrolSpawner;
++import net.minecraft.world.level.levelgen.PhantomSpawner;
 +import net.minecraft.world.level.levelgen.WorldDimensions;
 +import net.minecraft.world.level.levelgen.presets.WorldPresets;
+ import net.minecraft.world.level.storage.CommandStorage;
+-import net.minecraft.world.level.storage.DerivedLevelData;
+ import net.minecraft.world.level.storage.DimensionDataStorage;
+ import net.minecraft.world.level.storage.LevelData;
 +import net.minecraft.world.level.storage.LevelDataAndDimensions;
-+import net.minecraft.world.level.storage.WorldDataServer;
-+import net.minecraft.world.level.storage.WorldInfo;
+ import net.minecraft.world.level.storage.LevelResource;
+ import net.minecraft.world.level.storage.LevelStorageSource;
++import net.minecraft.world.level.storage.LevelSummary;
+ import net.minecraft.world.level.storage.PlayerDataStorage;
++import net.minecraft.world.level.storage.PrimaryLevelData;
+ import net.minecraft.world.level.storage.ServerLevelData;
+-import net.minecraft.world.level.storage.WorldData;
 +import net.minecraft.world.level.validation.ContentValidationException;
+ import net.minecraft.world.phys.Vec2;
+ import net.minecraft.world.phys.Vec3;
+-import org.slf4j.Logger;
 +import org.bukkit.Bukkit;
 +import org.bukkit.craftbukkit.CraftRegistry;
 +import org.bukkit.craftbukkit.CraftServer;
 +import org.bukkit.craftbukkit.Main;
 +import org.bukkit.event.server.ServerLoadEvent;
 +// CraftBukkit end
-+
- public abstract class MinecraftServer extends IAsyncTaskHandlerReentrant<TickTask> implements ServerInfo, ChunkIOErrorReporter, ICommandListener {
  
-     public static final Logger LOGGER = LogUtils.getLogger();
+ public abstract class MinecraftServer extends ReentrantBlockableEventLoop<TickTask> implements ServerInfo, ChunkIOErrorReporter, CommandSource {
+ 
+@@ -186,7 +209,7 @@
      public static final String VANILLA_BRAND = "vanilla";
      private static final float AVERAGE_TICK_TIME_SMOOTHING = 0.8F;
      private static final int TICK_STATS_SPAN = 100;
--    private static final long OVERLOADED_THRESHOLD_NANOS = 20L * TimeRange.NANOSECONDS_PER_SECOND / 20L;
-+    private static final long OVERLOADED_THRESHOLD_NANOS = 30L * TimeRange.NANOSECONDS_PER_SECOND / 20L; // CraftBukkit
+-    private static final long OVERLOADED_THRESHOLD_NANOS = 20L * TimeUtil.NANOSECONDS_PER_SECOND / 20L;
++    private static final long OVERLOADED_THRESHOLD_NANOS = 30L * TimeUtil.NANOSECONDS_PER_SECOND / 20L; // CraftBukkit
      private static final int OVERLOADED_TICKS_THRESHOLD = 20;
-     private static final long OVERLOADED_WARNING_INTERVAL_NANOS = 10L * TimeRange.NANOSECONDS_PER_SECOND;
+     private static final long OVERLOADED_WARNING_INTERVAL_NANOS = 10L * TimeUtil.NANOSECONDS_PER_SECOND;
      private static final int OVERLOADED_TICKS_WARNING_INTERVAL = 100;
-@@ -277,6 +302,19 @@
+@@ -277,6 +300,19 @@
      private final SuppressedExceptionCollector suppressedExceptions;
      private final DiscontinuousFrame tickFrame;
  
 +    // CraftBukkit start
-+    public final WorldLoader.a worldLoader;
++    public final WorldLoader.DataLoadContext worldLoader;
 +    public org.bukkit.craftbukkit.CraftServer server;
 +    public OptionSet options;
 +    public org.bukkit.command.ConsoleCommandSender console;
@@ -53,40 +118,75 @@
 +    public static int currentTick = (int) (System.currentTimeMillis() / 50);
 +    public java.util.Queue<Runnable> processQueue = new java.util.concurrent.ConcurrentLinkedQueue<Runnable>();
 +    public int autosavePeriod;
-+    public CommandDispatcher vanillaCommandDispatcher;
++    public Commands vanillaCommandDispatcher;
 +    private boolean forceTicks;
 +    // CraftBukkit end
 +
-     public static <S extends MinecraftServer> S spin(Function<Thread, S> function) {
+     public static <S extends MinecraftServer> S spin(Function<Thread, S> serverFactory) {
          AtomicReference<S> atomicreference = new AtomicReference();
          Thread thread = new Thread(() -> {
-@@ -290,14 +328,14 @@
+@@ -290,14 +326,14 @@
              thread.setPriority(8);
          }
  
--        S s0 = (MinecraftServer) function.apply(thread);
-+        S s0 = function.apply(thread); // CraftBukkit - decompile error
+-        S s0 = (MinecraftServer) serverFactory.apply(thread);
++        S s0 = serverFactory.apply(thread); // CraftBukkit - decompile error
  
          atomicreference.set(s0);
          thread.start();
          return s0;
      }
  
--    public MinecraftServer(Thread thread, Convertable.ConversionSession convertable_conversionsession, ResourcePackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, Services services, WorldLoadListenerFactory worldloadlistenerfactory) {
-+    public MinecraftServer(OptionSet options, WorldLoader.a worldLoader, Thread thread, Convertable.ConversionSession convertable_conversionsession, ResourcePackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, Services services, WorldLoadListenerFactory worldloadlistenerfactory) {
+-    public MinecraftServer(Thread serverThread, LevelStorageSource.LevelStorageAccess session, PackRepository dataPackManager, WorldStem saveLoader, Proxy proxy, DataFixer dataFixer, Services apiServices, ChunkProgressListenerFactory worldGenerationProgressListenerFactory) {
++    public MinecraftServer(OptionSet options, WorldLoader.DataLoadContext worldLoader, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, Proxy proxy, DataFixer datafixer, Services services, ChunkProgressListenerFactory worldloadlistenerfactory) {
          super("Server");
          this.metricsRecorder = InactiveMetricsRecorder.INSTANCE;
          this.onMetricsRecordingStopped = (methodprofilerresults) -> {
-@@ -321,7 +359,7 @@
+@@ -319,36 +355,63 @@
+         this.scoreboard = new ServerScoreboard(this);
+         this.customBossEvents = new CustomBossEvents();
          this.suppressedExceptions = new SuppressedExceptionCollector();
-         this.registries = worldstem.registries();
-         this.worldData = worldstem.worldData();
--        if (!this.registries.compositeAccess().lookupOrThrow(Registries.LEVEL_STEM).containsKey(WorldDimension.OVERWORLD)) {
-+        if (false && !this.registries.compositeAccess().lookupOrThrow(Registries.LEVEL_STEM).containsKey(WorldDimension.OVERWORLD)) { // CraftBukkit - initialised later
+-        this.registries = saveLoader.registries();
+-        this.worldData = saveLoader.worldData();
+-        if (!this.registries.compositeAccess().lookupOrThrow(Registries.LEVEL_STEM).containsKey(LevelStem.OVERWORLD)) {
++        this.registries = worldstem.registries();
++        this.worldData = worldstem.worldData();
++        if (false && !this.registries.compositeAccess().lookupOrThrow(Registries.LEVEL_STEM).containsKey(LevelStem.OVERWORLD)) { // CraftBukkit - initialised later
              throw new IllegalStateException("Missing Overworld dimension data");
          } else {
              this.proxy = proxy;
-@@ -349,6 +387,33 @@
+-            this.packRepository = dataPackManager;
+-            this.resources = new MinecraftServer.ReloadableResources(saveLoader.resourceManager(), saveLoader.dataPackResources());
+-            this.services = apiServices;
+-            if (apiServices.profileCache() != null) {
+-                apiServices.profileCache().setExecutor(this);
++            this.packRepository = resourcepackrepository;
++            this.resources = new MinecraftServer.ReloadableResources(worldstem.resourceManager(), worldstem.dataPackResources());
++            this.services = services;
++            if (services.profileCache() != null) {
++                services.profileCache().setExecutor(this);
+             }
+ 
+             this.connection = new ServerConnectionListener(this);
+             this.tickRateManager = new ServerTickRateManager(this);
+-            this.progressListenerFactory = worldGenerationProgressListenerFactory;
+-            this.storageSource = session;
+-            this.playerDataStorage = session.createPlayerStorage();
+-            this.fixerUpper = dataFixer;
++            this.progressListenerFactory = worldloadlistenerfactory;
++            this.storageSource = convertable_conversionsession;
++            this.playerDataStorage = convertable_conversionsession.createPlayerStorage();
++            this.fixerUpper = datafixer;
+             this.functionManager = new ServerFunctionManager(this, this.resources.managers.getFunctionLibrary());
+             HolderGetter<Block> holdergetter = this.registries.compositeAccess().lookupOrThrow(Registries.BLOCK).filterFeatures(this.worldData.enabledFeatures());
+ 
+-            this.structureTemplateManager = new StructureTemplateManager(saveLoader.resourceManager(), session, dataFixer, holdergetter);
+-            this.serverThread = serverThread;
++            this.structureTemplateManager = new StructureTemplateManager(worldstem.resourceManager(), convertable_conversionsession, datafixer, holdergetter);
++            this.serverThread = thread;
+             this.executor = Util.backgroundExecutor();
+             this.potionBrewing = PotionBrewing.bootstrap(this.worldData.enabledFeatures());
+             this.resources.managers.getRecipeManager().finalizeRecipeLoading(this.worldData.enabledFeatures());
              this.fuelValues = FuelValues.vanillaBurnTimes(this.registries.compositeAccess(), this.worldData.enabledFeatures());
              this.tickFrame = TracyClient.createDiscontinuousFrame("Server Tick");
          }
@@ -101,26 +201,26 @@
 +        }
 +
 +        try {
-+            reader = new ConsoleReader(System.in, System.out);
-+            reader.setExpandEvents(false); // Avoid parsing exceptions for uncommonly used event designators
++            this.reader = new ConsoleReader(System.in, System.out);
++            this.reader.setExpandEvents(false); // Avoid parsing exceptions for uncommonly used event designators
 +        } catch (Throwable e) {
 +            try {
 +                // Try again with jline disabled for Windows users without C++ 2008 Redistributable
 +                System.setProperty("jline.terminal", "jline.UnsupportedTerminal");
 +                System.setProperty("user.language", "en");
 +                Main.useJline = false;
-+                reader = new ConsoleReader(System.in, System.out);
-+                reader.setExpandEvents(false);
++                this.reader = new ConsoleReader(System.in, System.out);
++                this.reader.setExpandEvents(false);
 +            } catch (IOException ex) {
-+                LOGGER.warn((String) null, ex);
++                MinecraftServer.LOGGER.warn((String) null, ex);
 +            }
 +        }
 +        Runtime.getRuntime().addShutdownHook(new org.bukkit.craftbukkit.util.ServerShutdownThread(this));
 +        // CraftBukkit end
      }
  
-     private void readScoreboard(WorldPersistentData worldpersistentdata) {
-@@ -357,7 +422,7 @@
+     private void readScoreboard(DimensionDataStorage persistentStateManager) {
+@@ -357,7 +420,7 @@
  
      protected abstract boolean initServer() throws IOException;
  
@@ -129,13 +229,13 @@
          if (!JvmProfiler.INSTANCE.isRunning()) {
              ;
          }
-@@ -365,12 +430,8 @@
+@@ -365,12 +428,8 @@
          boolean flag = false;
          ProfiledDuration profiledduration = JvmProfiler.INSTANCE.onWorldLoadedStarted();
  
 -        this.worldData.setModdedInfo(this.getServerModName(), this.getModdedStatus().shouldReportAsModified());
--        WorldLoadListener worldloadlistener = this.progressListenerFactory.create(this.worldData.getGameRules().getInt(GameRules.RULE_SPAWN_CHUNK_RADIUS));
-+        loadWorld0(s); // CraftBukkit
+-        ChunkProgressListener worldloadlistener = this.progressListenerFactory.create(this.worldData.getGameRules().getInt(GameRules.RULE_SPAWN_CHUNK_RADIUS));
++        this.loadWorld0(s); // CraftBukkit
  
 -        this.createLevels(worldloadlistener);
 -        this.forceDifficulty();
@@ -143,57 +243,57 @@
          if (profiledduration != null) {
              profiledduration.finish(true);
          }
-@@ -387,23 +448,217 @@
+@@ -387,23 +446,217 @@
  
      protected void forceDifficulty() {}
  
--    protected void createLevels(WorldLoadListener worldloadlistener) {
--        IWorldDataServer iworlddataserver = this.worldData.overworldData();
+-    protected void createLevels(ChunkProgressListener worldGenerationProgressListener) {
+-        ServerLevelData iworlddataserver = this.worldData.overworldData();
 -        boolean flag = this.worldData.isDebugWorld();
--        IRegistry<WorldDimension> iregistry = this.registries.compositeAccess().lookupOrThrow(Registries.LEVEL_STEM);
+-        Registry<LevelStem> iregistry = this.registries.compositeAccess().lookupOrThrow(Registries.LEVEL_STEM);
 -        WorldOptions worldoptions = this.worldData.worldGenOptions();
 -        long i = worldoptions.seed();
 -        long j = BiomeManager.obfuscateSeed(i);
--        List<MobSpawner> list = ImmutableList.of(new MobSpawnerPhantom(), new MobSpawnerPatrol(), new MobSpawnerCat(), new VillageSiege(), new MobSpawnerTrader(iworlddataserver));
--        WorldDimension worlddimension = (WorldDimension) iregistry.getValue(WorldDimension.OVERWORLD);
--        WorldServer worldserver = new WorldServer(this, this.executor, this.storageSource, iworlddataserver, World.OVERWORLD, worlddimension, worldloadlistener, flag, j, list, true, (RandomSequences) null);
+-        List<CustomSpawner> list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(iworlddataserver));
+-        LevelStem worlddimension = (LevelStem) iregistry.getValue(LevelStem.OVERWORLD);
+-        ServerLevel worldserver = new ServerLevel(this, this.executor, this.storageSource, iworlddataserver, Level.OVERWORLD, worlddimension, worldGenerationProgressListener, flag, j, list, true, (RandomSequences) null);
 +    // CraftBukkit start
 +    private void loadWorld0(String s) {
-+        Convertable.ConversionSession worldSession = this.storageSource;
++        LevelStorageSource.LevelStorageAccess worldSession = this.storageSource;
  
--        this.levels.put(World.OVERWORLD, worldserver);
--        WorldPersistentData worldpersistentdata = worldserver.getDataStorage();
-+        IRegistryCustom.Dimension iregistrycustom_dimension = this.registries.compositeAccess();
-+        IRegistry<WorldDimension> dimensions = iregistrycustom_dimension.lookupOrThrow(Registries.LEVEL_STEM);
-+        for (WorldDimension worldDimension : dimensions) {
-+            ResourceKey<WorldDimension> dimensionKey = dimensions.getResourceKey(worldDimension).get();
+-        this.levels.put(Level.OVERWORLD, worldserver);
+-        DimensionDataStorage worldpersistentdata = worldserver.getDataStorage();
++        RegistryAccess.Frozen iregistrycustom_dimension = this.registries.compositeAccess();
++        Registry<LevelStem> dimensions = iregistrycustom_dimension.lookupOrThrow(Registries.LEVEL_STEM);
++        for (LevelStem worldDimension : dimensions) {
++            ResourceKey<LevelStem> dimensionKey = dimensions.getResourceKey(worldDimension).get();
  
 -        this.readScoreboard(worldpersistentdata);
--        this.commandStorage = new PersistentCommandStorage(worldpersistentdata);
-+            WorldServer world;
+-        this.commandStorage = new CommandStorage(worldpersistentdata);
++            ServerLevel world;
 +            int dimension = 0;
 +
-+            if (dimensionKey == WorldDimension.NETHER) {
-+                if (server.getAllowNether()) {
++            if (dimensionKey == LevelStem.NETHER) {
++                if (this.server.getAllowNether()) {
 +                    dimension = -1;
 +                } else {
 +                    continue;
 +                }
-+            } else if (dimensionKey == WorldDimension.END) {
-+                if (server.getAllowEnd()) {
++            } else if (dimensionKey == LevelStem.END) {
++                if (this.server.getAllowEnd()) {
 +                    dimension = 1;
 +                } else {
 +                    continue;
 +                }
-+            } else if (dimensionKey != WorldDimension.OVERWORLD) {
++            } else if (dimensionKey != LevelStem.OVERWORLD) {
 +                dimension = -999;
 +            }
 +
 +            String worldType = (dimension == -999) ? dimensionKey.location().getNamespace() + "_" + dimensionKey.location().getPath() : org.bukkit.World.Environment.getEnvironment(dimension).toString().toLowerCase(Locale.ROOT);
-+            String name = (dimensionKey == WorldDimension.OVERWORLD) ? s : s + "_" + worldType;
++            String name = (dimensionKey == LevelStem.OVERWORLD) ? s : s + "_" + worldType;
 +            if (dimension != 0) {
-+                File newWorld = Convertable.getStorageFolder(new File(name).toPath(), dimensionKey).toFile();
-+                File oldWorld = Convertable.getStorageFolder(new File(s).toPath(), dimensionKey).toFile();
++                File newWorld = LevelStorageSource.getStorageFolder(new File(name).toPath(), dimensionKey).toFile();
++                File oldWorld = LevelStorageSource.getStorageFolder(new File(s).toPath(), dimensionKey).toFile();
 +                File oldLevelDat = new File(new File(s), "level.dat"); // The data folders exist on first run as they are created in the PersistentCollection constructor above, but the level.dat won't
 +
 +                if (!newWorld.isDirectory() && oldWorld.isDirectory() && oldLevelDat.isFile()) {
@@ -227,7 +327,7 @@
 +                }
 +
 +                try {
-+                    worldSession = Convertable.createDefault(server.getWorldContainer().toPath()).validateAndCreateAccess(name, dimensionKey);
++                    worldSession = LevelStorageSource.createDefault(this.server.getWorldContainer().toPath()).validateAndCreateAccess(name, dimensionKey);
 +                } catch (IOException | ContentValidationException ex) {
 +                    throw new RuntimeException(ex);
 +                }
@@ -235,13 +335,13 @@
 +
 +            Dynamic<?> dynamic;
 +            if (worldSession.hasWorldData()) {
-+                WorldInfo worldinfo;
++                LevelSummary worldinfo;
 +
 +                try {
 +                    dynamic = worldSession.getDataTag();
 +                    worldinfo = worldSession.getSummary(dynamic);
 +                } catch (NbtException | ReportedNbtException | IOException ioexception) {
-+                    Convertable.b convertable_b = worldSession.getLevelDirectory();
++                    LevelStorageSource.LevelDirectory convertable_b = worldSession.getLevelDirectory();
 +
 +                    MinecraftServer.LOGGER.warn("Failed to load world data from {}", convertable_b.dataFile(), ioexception);
 +                    MinecraftServer.LOGGER.info("Attempting to use fallback");
@@ -274,15 +374,15 @@
 +            org.bukkit.generator.ChunkGenerator gen = this.server.getGenerator(name);
 +            org.bukkit.generator.BiomeProvider biomeProvider = this.server.getBiomeProvider(name);
 +
-+            WorldDataServer worlddata;
-+            WorldLoader.a worldloader_a = this.worldLoader;
-+            IRegistry<WorldDimension> iregistry = worldloader_a.datapackDimensions().lookupOrThrow(Registries.LEVEL_STEM);
++            PrimaryLevelData worlddata;
++            WorldLoader.DataLoadContext worldloader_a = this.worldLoader;
++            Registry<LevelStem> iregistry = worldloader_a.datapackDimensions().lookupOrThrow(Registries.LEVEL_STEM);
 +            if (dynamic != null) {
-+                LevelDataAndDimensions leveldataanddimensions = Convertable.getLevelDataAndDimensions(dynamic, worldloader_a.dataConfiguration(), iregistry, worldloader_a.datapackWorldgen());
++                LevelDataAndDimensions leveldataanddimensions = LevelStorageSource.getLevelDataAndDimensions(dynamic, worldloader_a.dataConfiguration(), iregistry, worldloader_a.datapackWorldgen());
 +
-+                worlddata = (WorldDataServer) leveldataanddimensions.worldData();
++                worlddata = (PrimaryLevelData) leveldataanddimensions.worldData();
 +            } else {
-+                WorldSettings worldsettings;
++                LevelSettings worldsettings;
 +                WorldOptions worldoptions;
 +                WorldDimensions worlddimensions;
 +
@@ -293,56 +393,56 @@
 +                } else {
 +                    DedicatedServerProperties dedicatedserverproperties = ((DedicatedServer) this).getProperties();
 +
-+                    worldsettings = new WorldSettings(dedicatedserverproperties.levelName, dedicatedserverproperties.gamemode, dedicatedserverproperties.hardcore, dedicatedserverproperties.difficulty, false, new GameRules(worldloader_a.dataConfiguration().enabledFeatures()), worldloader_a.dataConfiguration());
-+                    worldoptions = options.has("bonusChest") ? dedicatedserverproperties.worldOptions.withBonusChest(true) : dedicatedserverproperties.worldOptions;
++                    worldsettings = new LevelSettings(dedicatedserverproperties.levelName, dedicatedserverproperties.gamemode, dedicatedserverproperties.hardcore, dedicatedserverproperties.difficulty, false, new GameRules(worldloader_a.dataConfiguration().enabledFeatures()), worldloader_a.dataConfiguration());
++                    worldoptions = this.options.has("bonusChest") ? dedicatedserverproperties.worldOptions.withBonusChest(true) : dedicatedserverproperties.worldOptions;
 +                    worlddimensions = dedicatedserverproperties.createDimensions(worldloader_a.datapackWorldgen());
 +                }
 +
-+                WorldDimensions.b worlddimensions_b = worlddimensions.bake(iregistry);
++                WorldDimensions.Complete worlddimensions_b = worlddimensions.bake(iregistry);
 +                Lifecycle lifecycle = worlddimensions_b.lifecycle().add(worldloader_a.datapackWorldgen().allRegistriesLifecycle());
 +
-+                worlddata = new WorldDataServer(worldsettings, worldoptions, worlddimensions_b.specialWorldProperty(), lifecycle);
++                worlddata = new PrimaryLevelData(worldsettings, worldoptions, worlddimensions_b.specialWorldProperty(), lifecycle);
 +            }
 +            worlddata.checkName(name); // CraftBukkit - Migration did not rewrite the level.dat; This forces 1.8 to take the last loaded world as respawn (in this case the end)
-+            if (options.has("forceUpgrade")) {
-+                net.minecraft.server.Main.forceUpgrade(worldSession, DataConverterRegistry.getDataFixer(), options.has("eraseCache"), () -> {
++            if (this.options.has("forceUpgrade")) {
++                net.minecraft.server.Main.forceUpgrade(worldSession, DataFixers.getDataFixer(), this.options.has("eraseCache"), () -> {
 +                    return true;
-+                }, iregistrycustom_dimension, options.has("recreateRegionFiles"));
++                }, iregistrycustom_dimension, this.options.has("recreateRegionFiles"));
 +            }
 +
-+            WorldDataServer iworlddataserver = worlddata;
++            PrimaryLevelData iworlddataserver = worlddata;
 +            boolean flag = worlddata.isDebugWorld();
 +            WorldOptions worldoptions = worlddata.worldGenOptions();
 +            long i = worldoptions.seed();
 +            long j = BiomeManager.obfuscateSeed(i);
-+            List<MobSpawner> list = ImmutableList.of(new MobSpawnerPhantom(), new MobSpawnerPatrol(), new MobSpawnerCat(), new VillageSiege(), new MobSpawnerTrader(iworlddataserver));
-+            WorldDimension worlddimension = (WorldDimension) dimensions.getValue(dimensionKey);
++            List<CustomSpawner> list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(iworlddataserver));
++            LevelStem worlddimension = (LevelStem) dimensions.getValue(dimensionKey);
 +
 +            org.bukkit.generator.WorldInfo worldInfo = new org.bukkit.craftbukkit.generator.CraftWorldInfo(iworlddataserver, worldSession, org.bukkit.World.Environment.getEnvironment(dimension), worlddimension.type().value());
 +            if (biomeProvider == null && gen != null) {
 +                biomeProvider = gen.getDefaultBiomeProvider(worldInfo);
 +            }
 +
-+            ResourceKey<World> worldKey = ResourceKey.create(Registries.DIMENSION, dimensionKey.location());
++            ResourceKey<Level> worldKey = ResourceKey.create(Registries.DIMENSION, dimensionKey.location());
 +
-+            if (dimensionKey == WorldDimension.OVERWORLD) {
++            if (dimensionKey == LevelStem.OVERWORLD) {
 +                this.worldData = worlddata;
 +                this.worldData.setGameType(((DedicatedServer) this).getProperties().gamemode); // From DedicatedServer.init
 +
-+                WorldLoadListener worldloadlistener = this.progressListenerFactory.create(this.worldData.getGameRules().getInt(GameRules.RULE_SPAWN_CHUNK_RADIUS));
++                ChunkProgressListener worldloadlistener = this.progressListenerFactory.create(this.worldData.getGameRules().getInt(GameRules.RULE_SPAWN_CHUNK_RADIUS));
 +
-+                world = new WorldServer(this, this.executor, worldSession, iworlddataserver, worldKey, worlddimension, worldloadlistener, flag, j, list, true, (RandomSequences) null, org.bukkit.World.Environment.getEnvironment(dimension), gen, biomeProvider);
-+                WorldPersistentData worldpersistentdata = world.getDataStorage();
++                world = new ServerLevel(this, this.executor, worldSession, iworlddataserver, worldKey, worlddimension, worldloadlistener, flag, j, list, true, (RandomSequences) null, org.bukkit.World.Environment.getEnvironment(dimension), gen, biomeProvider);
++                DimensionDataStorage worldpersistentdata = world.getDataStorage();
 +                this.readScoreboard(worldpersistentdata);
 +                this.server.scoreboardManager = new org.bukkit.craftbukkit.scoreboard.CraftScoreboardManager(this, world.getScoreboard());
-+                this.commandStorage = new PersistentCommandStorage(worldpersistentdata);
++                this.commandStorage = new CommandStorage(worldpersistentdata);
 +            } else {
-+                WorldLoadListener worldloadlistener = this.progressListenerFactory.create(worldData.getGameRules().getInt(GameRules.RULE_SPAWN_CHUNK_RADIUS));
-+                world = new WorldServer(this, this.executor, worldSession, iworlddataserver, worldKey, worlddimension, worldloadlistener, flag, j, ImmutableList.of(), true, this.overworld().getRandomSequences(), org.bukkit.World.Environment.getEnvironment(dimension), gen, biomeProvider);
++                ChunkProgressListener worldloadlistener = this.progressListenerFactory.create(this.worldData.getGameRules().getInt(GameRules.RULE_SPAWN_CHUNK_RADIUS));
++                world = new ServerLevel(this, this.executor, worldSession, iworlddataserver, worldKey, worlddimension, worldloadlistener, flag, j, ImmutableList.of(), true, this.overworld().getRandomSequences(), org.bukkit.World.Environment.getEnvironment(dimension), gen, biomeProvider);
 +            }
 +
 +            worlddata.setModdedInfo(this.getServerModName(), this.getModdedStatus().shouldReportAsModified());
-+            this.initWorld(world, worlddata, worldData, worldoptions);
++            this.initWorld(world, worlddata, this.worldData, worldoptions);
 +
 +            this.addLevel(world);
 +            this.getPlayerList().addWorldborderListener(world);
@@ -352,7 +452,7 @@
 +            }
 +        }
 +        this.forceDifficulty();
-+        for (WorldServer worldserver : this.getAllLevels()) {
++        for (ServerLevel worldserver : this.getAllLevels()) {
 +            this.prepareLevels(worldserver.getChunkSource().chunkMap.progressListener, worldserver);
 +            worldserver.entityManager.tick(); // SPIGOT-6526: Load pending entities so they are available to the API
 +            this.server.getPluginManager().callEvent(new org.bukkit.event.world.WorldLoadEvent(worldserver.getWorld()));
@@ -363,7 +463,7 @@
 +        this.connection.acceptConnections();
 +    }
 +
-+    public void initWorld(WorldServer worldserver, IWorldDataServer iworlddataserver, SaveData saveData, WorldOptions worldoptions) {
++    public void initWorld(ServerLevel worldserver, ServerLevelData iworlddataserver, WorldData saveData, WorldOptions worldoptions) {
 +        boolean flag = saveData.isDebugWorld();
 +        // CraftBukkit start
 +        if (worldserver.generator != null) {
@@ -375,7 +475,7 @@
  
          if (!iworlddataserver.isInitialized()) {
              try {
-@@ -427,30 +682,8 @@
+@@ -427,30 +680,8 @@
              iworlddataserver.setInitialized(true);
          }
  
@@ -388,15 +488,15 @@
 -        Iterator iterator = iregistry.entrySet().iterator();
 -
 -        while (iterator.hasNext()) {
--            Entry<ResourceKey<WorldDimension>, WorldDimension> entry = (Entry) iterator.next();
--            ResourceKey<WorldDimension> resourcekey = (ResourceKey) entry.getKey();
+-            Entry<ResourceKey<LevelStem>, LevelStem> entry = (Entry) iterator.next();
+-            ResourceKey<LevelStem> resourcekey = (ResourceKey) entry.getKey();
 -
--            if (resourcekey != WorldDimension.OVERWORLD) {
--                ResourceKey<World> resourcekey1 = ResourceKey.create(Registries.DIMENSION, resourcekey.location());
--                SecondaryWorldData secondaryworlddata = new SecondaryWorldData(this.worldData, iworlddataserver);
--                WorldServer worldserver1 = new WorldServer(this, this.executor, this.storageSource, secondaryworlddata, resourcekey1, (WorldDimension) entry.getValue(), worldloadlistener, flag, j, ImmutableList.of(), false, randomsequences);
+-            if (resourcekey != LevelStem.OVERWORLD) {
+-                ResourceKey<Level> resourcekey1 = ResourceKey.create(Registries.DIMENSION, resourcekey.location());
+-                DerivedLevelData secondaryworlddata = new DerivedLevelData(this.worldData, iworlddataserver);
+-                ServerLevel worldserver1 = new ServerLevel(this, this.executor, this.storageSource, secondaryworlddata, resourcekey1, (LevelStem) entry.getValue(), worldGenerationProgressListener, flag, j, ImmutableList.of(), false, randomsequences);
 -
--                worldborder.addListener(new IWorldBorderListener.a(worldserver1.getWorldBorder()));
+-                worldborder.addListener(new BorderChangeListener.DelegateBorderChangeListener(worldserver1.getWorldBorder()));
 -                this.levels.put(resourcekey1, worldserver1);
 -            }
 -        }
@@ -405,61 +505,64 @@
      }
 +    // CraftBukkit end
  
-     private static void setInitialSpawn(WorldServer worldserver, IWorldDataServer iworlddataserver, boolean flag, boolean flag1) {
-         if (flag1) {
-@@ -458,6 +691,21 @@
+     private static void setInitialSpawn(ServerLevel world, ServerLevelData worldProperties, boolean bonusChest, boolean debugWorld) {
+         if (debugWorld) {
+@@ -458,6 +689,21 @@
          } else {
-             ChunkProviderServer chunkproviderserver = worldserver.getChunkSource();
-             ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(chunkproviderserver.randomState().sampler().findSpawnPosition());
+             ServerChunkCache chunkproviderserver = world.getChunkSource();
+             ChunkPos chunkcoordintpair = new ChunkPos(chunkproviderserver.randomState().sampler().findSpawnPosition());
 +            // CraftBukkit start
-+            if (worldserver.generator != null) {
-+                Random rand = new Random(worldserver.getSeed());
-+                org.bukkit.Location spawn = worldserver.generator.getFixedSpawnLocation(worldserver.getWorld(), rand);
++            if (world.generator != null) {
++                Random rand = new Random(world.getSeed());
++                org.bukkit.Location spawn = world.generator.getFixedSpawnLocation(world.getWorld(), rand);
 +
 +                if (spawn != null) {
-+                    if (spawn.getWorld() != worldserver.getWorld()) {
-+                        throw new IllegalStateException("Cannot set spawn point for " + iworlddataserver.getLevelName() + " to be in another world (" + spawn.getWorld().getName() + ")");
++                    if (spawn.getWorld() != world.getWorld()) {
++                        throw new IllegalStateException("Cannot set spawn point for " + worldProperties.getLevelName() + " to be in another world (" + spawn.getWorld().getName() + ")");
 +                    } else {
-+                        iworlddataserver.setSpawn(new BlockPosition(spawn.getBlockX(), spawn.getBlockY(), spawn.getBlockZ()), spawn.getYaw());
++                        worldProperties.setSpawn(new BlockPos(spawn.getBlockX(), spawn.getBlockY(), spawn.getBlockZ()), spawn.getYaw());
 +                        return;
 +                    }
 +                }
 +            }
 +            // CraftBukkit end
-             int i = chunkproviderserver.getGenerator().getSpawnHeight(worldserver);
+             int i = chunkproviderserver.getGenerator().getSpawnHeight(world);
  
-             if (i < worldserver.getMinY()) {
-@@ -516,8 +764,11 @@
-         iworlddataserver.setGameType(EnumGamemode.SPECTATOR);
+             if (i < world.getMinY()) {
+@@ -516,31 +762,36 @@
+         iworlddataserver.setGameType(GameType.SPECTATOR);
      }
  
--    public void prepareLevels(WorldLoadListener worldloadlistener) {
--        WorldServer worldserver = this.overworld();
+-    public void prepareLevels(ChunkProgressListener worldGenerationProgressListener) {
+-        ServerLevel worldserver = this.overworld();
 +    // CraftBukkit start
-+    public void prepareLevels(WorldLoadListener worldloadlistener, WorldServer worldserver) {
++    public void prepareLevels(ChunkProgressListener worldloadlistener, ServerLevel worldserver) {
 +        // WorldServer worldserver = this.overworld();
 +        this.forceTicks = true;
 +        // CraftBukkit end
  
          MinecraftServer.LOGGER.info("Preparing start region for dimension {}", worldserver.dimension().location());
-         BlockPosition blockposition = worldserver.getSharedSpawnPos();
-@@ -527,20 +778,22 @@
+         BlockPos blockposition = worldserver.getSharedSpawnPos();
  
-         this.nextTickTimeNanos = SystemUtils.getNanos();
+-        worldGenerationProgressListener.updateSpawnPos(new ChunkPos(blockposition));
++        worldloadlistener.updateSpawnPos(new ChunkPos(blockposition));
+         ServerChunkCache chunkproviderserver = worldserver.getChunkSource();
+ 
+         this.nextTickTimeNanos = Util.getNanos();
          worldserver.setDefaultSpawnPos(blockposition, worldserver.getSharedSpawnAngle());
 -        int i = this.getGameRules().getInt(GameRules.RULE_SPAWN_CHUNK_RADIUS);
 +        int i = worldserver.getGameRules().getInt(GameRules.RULE_SPAWN_CHUNK_RADIUS); // CraftBukkit - per-world
-         int j = i > 0 ? MathHelper.square(WorldLoadListener.calculateDiameter(i)) : 0;
+         int j = i > 0 ? Mth.square(ChunkProgressListener.calculateDiameter(i)) : 0;
  
          while (chunkproviderserver.getTickingGenerated() < j) {
--            this.nextTickTimeNanos = SystemUtils.getNanos() + MinecraftServer.PREPARE_LEVELS_DEFAULT_DELAY_NANOS;
+-            this.nextTickTimeNanos = Util.getNanos() + MinecraftServer.PREPARE_LEVELS_DEFAULT_DELAY_NANOS;
 -            this.waitUntilNextTick();
 +            // CraftBukkit start
 +            // this.nextTickTimeNanos = SystemUtils.getNanos() + MinecraftServer.PREPARE_LEVELS_DEFAULT_DELAY_NANOS;
 +            this.executeModerately();
          }
  
--        this.nextTickTimeNanos = SystemUtils.getNanos() + MinecraftServer.PREPARE_LEVELS_DEFAULT_DELAY_NANOS;
+-        this.nextTickTimeNanos = Util.getNanos() + MinecraftServer.PREPARE_LEVELS_DEFAULT_DELAY_NANOS;
 -        this.waitUntilNextTick();
 -        Iterator iterator = this.levels.values().iterator();
 +        // this.nextTickTimeNanos = SystemUtils.getNanos() + MinecraftServer.PREPARE_LEVELS_DEFAULT_DELAY_NANOS;
@@ -467,25 +570,26 @@
 +        // Iterator iterator = this.levels.values().iterator();
  
 -        while (iterator.hasNext()) {
--            WorldServer worldserver1 = (WorldServer) iterator.next();
+-            ServerLevel worldserver1 = (ServerLevel) iterator.next();
 +        if (true) {
-+            WorldServer worldserver1 = worldserver;
++            ServerLevel worldserver1 = worldserver;
 +            // CraftBukkit end
-             ForcedChunk forcedchunk = (ForcedChunk) worldserver1.getDataStorage().get(ForcedChunk.factory(), "chunks");
+             ForcedChunksSavedData forcedchunk = (ForcedChunksSavedData) worldserver1.getDataStorage().get(ForcedChunksSavedData.factory(), "chunks");
  
              if (forcedchunk != null) {
-@@ -555,10 +808,17 @@
+@@ -555,10 +806,17 @@
              }
          }
  
--        this.nextTickTimeNanos = SystemUtils.getNanos() + MinecraftServer.PREPARE_LEVELS_DEFAULT_DELAY_NANOS;
+-        this.nextTickTimeNanos = Util.getNanos() + MinecraftServer.PREPARE_LEVELS_DEFAULT_DELAY_NANOS;
 -        this.waitUntilNextTick();
+-        worldGenerationProgressListener.stop();
+-        this.updateMobSpawningFlags();
 +        // CraftBukkit start
 +        // this.nextTickTimeNanos = SystemUtils.getNanos() + MinecraftServer.PREPARE_LEVELS_DEFAULT_DELAY_NANOS;
 +        this.executeModerately();
 +        // CraftBukkit end
-         worldloadlistener.stop();
--        this.updateMobSpawningFlags();
++        worldloadlistener.stop();
 +        // CraftBukkit start
 +        // this.updateMobSpawningFlags();
 +        worldserver.setSpawnSettings(this.isSpawningMonsters());
@@ -494,43 +598,46 @@
 +        // CraftBukkit end
      }
  
-     public EnumGamemode getDefaultGameType() {
-@@ -588,12 +848,16 @@
-             worldserver.save((IProgressUpdate) null, flag1, worldserver.noSave && !flag2);
+     public GameType getDefaultGameType() {
+@@ -588,12 +846,16 @@
+             worldserver.save((ProgressListener) null, flush, worldserver.noSave && !force);
          }
  
+-        ServerLevel worldserver1 = this.overworld();
+-        ServerLevelData iworlddataserver = this.worldData.overworldData();
 +        // CraftBukkit start - moved to WorldServer.save
 +        /*
-         WorldServer worldserver1 = this.overworld();
-         IWorldDataServer iworlddataserver = this.worldData.overworldData();
++        WorldServer worldserver1 = this.overworld();
++        IWorldDataServer iworlddataserver = this.worldData.overworldData();
  
          iworlddataserver.setWorldBorder(worldserver1.getWorldBorder().createSettings());
          this.worldData.setCustomBossEvents(this.getCustomBossEvents().save(this.registryAccess()));
          this.storageSource.saveDataTag(this.registryAccess(), this.worldData, this.getPlayerList().getSingleplayerData());
 +        */
 +        // CraftBukkit end
-         if (flag1) {
+         if (flush) {
              Iterator iterator1 = this.getAllLevels().iterator();
  
-@@ -628,18 +892,40 @@
+@@ -627,19 +889,41 @@
+     public void close() {
          this.stopServer();
      }
- 
++
 +    // CraftBukkit start
 +    private boolean hasStopped = false;
 +    private final Object stopLock = new Object();
 +    public final boolean hasStopped() {
-+        synchronized (stopLock) {
-+            return hasStopped;
++        synchronized (this.stopLock) {
++            return this.hasStopped;
 +        }
 +    }
 +    // CraftBukkit end
-+
+ 
      public void stopServer() {
 +        // CraftBukkit start - prevent double stopping on multiple threads
-+        synchronized(stopLock) {
-+            if (hasStopped) return;
-+            hasStopped = true;
++        synchronized(this.stopLock) {
++            if (this.hasStopped) return;
++            this.hasStopped = true;
 +        }
 +        // CraftBukkit end
          if (this.metricsRecorder.isRecording()) {
@@ -553,79 +660,81 @@
          }
  
          MinecraftServer.LOGGER.info("Saving worlds");
-@@ -727,7 +1013,7 @@
+@@ -727,7 +1011,7 @@
              }
  
-             this.nextTickTimeNanos = SystemUtils.getNanos();
--            this.statusIcon = (ServerPing.a) this.loadStatusIcon().orElse((Object) null);
-+            this.statusIcon = (ServerPing.a) this.loadStatusIcon().orElse(null); // CraftBukkit - decompile error
+             this.nextTickTimeNanos = Util.getNanos();
+-            this.statusIcon = (ServerStatus.Favicon) this.loadStatusIcon().orElse((Object) null);
++            this.statusIcon = (ServerStatus.Favicon) this.loadStatusIcon().orElse(null); // CraftBukkit - decompile error
              this.status = this.buildServerStatus();
  
              while (this.running) {
-@@ -744,6 +1030,7 @@
+@@ -744,6 +1028,7 @@
                      if (j > MinecraftServer.OVERLOADED_THRESHOLD_NANOS + 20L * i && this.nextTickTimeNanos - this.lastOverloadWarningNanos >= MinecraftServer.OVERLOADED_WARNING_INTERVAL_NANOS + 100L * i) {
                          long k = j / i;
  
-+                        if (server.getWarnOnOverload()) // CraftBukkit
-                         MinecraftServer.LOGGER.warn("Can't keep up! Is the server overloaded? Running {}ms or {} ticks behind", j / TimeRange.NANOSECONDS_PER_MILLISECOND, k);
++                        if (this.server.getWarnOnOverload()) // CraftBukkit
+                         MinecraftServer.LOGGER.warn("Can't keep up! Is the server overloaded? Running {}ms or {} ticks behind", j / TimeUtil.NANOSECONDS_PER_MILLISECOND, k);
                          this.nextTickTimeNanos += k * i;
                          this.lastOverloadWarningNanos = this.nextTickTimeNanos;
-@@ -757,6 +1044,7 @@
-                     this.debugCommandProfiler = new MinecraftServer.TimeProfiler(SystemUtils.getNanos(), this.tickCount);
+@@ -757,6 +1042,7 @@
+                     this.debugCommandProfiler = new MinecraftServer.TimeProfiler(Util.getNanos(), this.tickCount);
                  }
  
 +                MinecraftServer.currentTick = (int) (System.currentTimeMillis() / 50); // CraftBukkit
                  this.nextTickTimeNanos += i;
  
                  try {
-@@ -830,6 +1118,12 @@
+@@ -830,6 +1116,12 @@
                      this.services.profileCache().clearExecutor();
                  }
  
 +                // CraftBukkit start - Restore terminal to original settings
 +                try {
-+                    reader.getTerminal().restore();
++                    this.reader.getTerminal().restore();
 +                } catch (Exception ignored) {
 +                }
 +                // CraftBukkit end
                  this.onServerExit();
              }
  
-@@ -889,7 +1183,14 @@
+@@ -889,9 +1181,16 @@
      }
  
      private boolean haveTime() {
--        return this.runningTask() || SystemUtils.getNanos() < (this.mayHaveDelayedTasks ? this.delayedTasksMaxNextTickTimeNanos : this.nextTickTimeNanos);
+-        return this.runningTask() || Util.getNanos() < (this.mayHaveDelayedTasks ? this.delayedTasksMaxNextTickTimeNanos : this.nextTickTimeNanos);
 +        // CraftBukkit start
-+        return this.forceTicks || this.runningTask() || SystemUtils.getNanos() < (this.mayHaveDelayedTasks ? this.delayedTasksMaxNextTickTimeNanos : this.nextTickTimeNanos);
-+    }
-+
++        return this.forceTicks || this.runningTask() || Util.getNanos() < (this.mayHaveDelayedTasks ? this.delayedTasksMaxNextTickTimeNanos : this.nextTickTimeNanos);
+     }
+ 
 +    private void executeModerately() {
 +        this.runAllTasks();
 +        java.util.concurrent.locks.LockSupport.parkNanos("executing tasks", 1000L);
 +        // CraftBukkit end
-     }
- 
++    }
++
      public static boolean throwIfFatalException() {
-@@ -903,7 +1204,7 @@
+         RuntimeException runtimeexception = (RuntimeException) MinecraftServer.fatalException.get();
+ 
+@@ -903,7 +1202,7 @@
      }
  
-     public static void setFatalException(RuntimeException runtimeexception) {
--        MinecraftServer.fatalException.compareAndSet((Object) null, runtimeexception);
-+        MinecraftServer.fatalException.compareAndSet(null, runtimeexception); // CraftBukkit - decompile error
+     public static void setFatalException(RuntimeException exception) {
+-        MinecraftServer.fatalException.compareAndSet((Object) null, exception);
++        MinecraftServer.fatalException.compareAndSet(null, exception); // CraftBukkit - decompile error
      }
  
      @Override
-@@ -977,7 +1278,7 @@
+@@ -977,7 +1276,7 @@
          }
      }
  
--    protected void doRunTask(TickTask ticktask) {
+-    public void doRunTask(TickTask ticktask) {
 +    public void doRunTask(TickTask ticktask) { // CraftBukkit - decompile error
          Profiler.get().incrementCounter("runTask");
          super.doRunTask(ticktask);
      }
-@@ -1041,6 +1342,7 @@
+@@ -1041,6 +1340,7 @@
                      this.autoSave();
                  }
  
@@ -633,7 +742,7 @@
                  this.tickConnection();
                  return;
              }
-@@ -1055,7 +1357,7 @@
+@@ -1055,7 +1355,7 @@
          }
  
          --this.ticksUntilAutosave;
@@ -642,16 +751,16 @@
              this.autoSave();
          }
  
-@@ -1074,7 +1376,7 @@
+@@ -1074,7 +1374,7 @@
      }
  
      private void autoSave() {
 -        this.ticksUntilAutosave = this.computeNextAutosaveInterval();
 +        this.ticksUntilAutosave = this.autosavePeriod; // CraftBukkit
          MinecraftServer.LOGGER.debug("Autosave started");
-         GameProfilerFiller gameprofilerfiller = Profiler.get();
+         ProfilerFiller gameprofilerfiller = Profiler.get();
  
-@@ -1154,11 +1456,26 @@
+@@ -1154,11 +1454,26 @@
          this.getPlayerList().getPlayers().forEach((entityplayer) -> {
              entityplayer.connection.suspendFlushing();
          });
@@ -663,22 +772,22 @@
  
 +        // CraftBukkit start
 +        // Run tasks that are waiting on processing
-+        while (!processQueue.isEmpty()) {
-+            processQueue.remove().run();
++        while (!this.processQueue.isEmpty()) {
++            this.processQueue.remove().run();
 +        }
 +
 +        // Send time updates to everyone, it will get the right time from the world the player is in.
 +        if (this.tickCount % 20 == 0) {
 +            for (int i = 0; i < this.getPlayerList().players.size(); ++i) {
-+                EntityPlayer entityplayer = (EntityPlayer) this.getPlayerList().players.get(i);
-+                entityplayer.connection.send(new PacketPlayOutUpdateTime(entityplayer.level().getGameTime(), entityplayer.getPlayerTime(), entityplayer.serverLevel().getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); // Add support for per player time
++                ServerPlayer entityplayer = (ServerPlayer) this.getPlayerList().players.get(i);
++                entityplayer.connection.send(new ClientboundSetTimePacket(entityplayer.level().getGameTime(), entityplayer.getPlayerTime(), entityplayer.serverLevel().getGameRules().getBoolean(GameRules.RULE_DAYLIGHT))); // Add support for per player time
 +            }
 +        }
 +
          while (iterator.hasNext()) {
-             WorldServer worldserver = (WorldServer) iterator.next();
+             ServerLevel worldserver = (ServerLevel) iterator.next();
  
-@@ -1167,11 +1484,13 @@
+@@ -1167,11 +1482,13 @@
  
                  return s + " " + String.valueOf(worldserver.dimension().location());
              });
@@ -692,102 +801,105 @@
  
              gameprofilerfiller.push("tick");
  
-@@ -1267,6 +1586,22 @@
-         return (WorldServer) this.levels.get(resourcekey);
-     }
- 
+@@ -1265,7 +1582,23 @@
+     @Nullable
+     public ServerLevel getLevel(ResourceKey<Level> key) {
+         return (ServerLevel) this.levels.get(key);
++    }
++
 +    // CraftBukkit start
-+    public void addLevel(WorldServer level) {
-+        Map<ResourceKey<World>, WorldServer> oldLevels = this.levels;
-+        Map<ResourceKey<World>, WorldServer> newLevels = Maps.newLinkedHashMap(oldLevels);
++    public void addLevel(ServerLevel level) {
++        Map<ResourceKey<Level>, ServerLevel> oldLevels = this.levels;
++        Map<ResourceKey<Level>, ServerLevel> newLevels = Maps.newLinkedHashMap(oldLevels);
 +        newLevels.put(level.dimension(), level);
 +        this.levels = Collections.unmodifiableMap(newLevels);
 +    }
 +
-+    public void removeLevel(WorldServer level) {
-+        Map<ResourceKey<World>, WorldServer> oldLevels = this.levels;
-+        Map<ResourceKey<World>, WorldServer> newLevels = Maps.newLinkedHashMap(oldLevels);
++    public void removeLevel(ServerLevel level) {
++        Map<ResourceKey<Level>, ServerLevel> oldLevels = this.levels;
++        Map<ResourceKey<Level>, ServerLevel> newLevels = Maps.newLinkedHashMap(oldLevels);
 +        newLevels.remove(level.dimension());
 +        this.levels = Collections.unmodifiableMap(newLevels);
-+    }
-+    // CraftBukkit end
-+
-     public Set<ResourceKey<World>> levelKeys() {
-         return this.levels.keySet();
      }
-@@ -1296,7 +1631,7 @@
++    // CraftBukkit end
+ 
+     public Set<ResourceKey<Level>> levelKeys() {
+         return this.levels.keySet();
+@@ -1296,7 +1629,7 @@
  
      @DontObfuscate
      public String getServerModName() {
 -        return "vanilla";
-+        return server.getName(); // CraftBukkit - cb > vanilla!
++        return this.server.getName(); // CraftBukkit - cb > vanilla!
      }
  
-     public SystemReport fillSystemReport(SystemReport systemreport) {
-@@ -1634,11 +1969,11 @@
+     public SystemReport fillSystemReport(SystemReport details) {
+@@ -1634,11 +1967,11 @@
  
-     public CompletableFuture<Void> reloadResources(Collection<String> collection) {
+     public CompletableFuture<Void> reloadResources(Collection<String> dataPacks) {
          CompletableFuture<Void> completablefuture = CompletableFuture.supplyAsync(() -> {
--            Stream stream = collection.stream();
-+            Stream<String> stream = collection.stream(); // CraftBukkit - decompile error
-             ResourcePackRepository resourcepackrepository = this.packRepository;
+-            Stream stream = dataPacks.stream();
++            Stream<String> stream = dataPacks.stream(); // CraftBukkit - decompile error
+             PackRepository resourcepackrepository = this.packRepository;
  
              Objects.requireNonNull(this.packRepository);
--            return (ImmutableList) stream.map(resourcepackrepository::getPack).filter(Objects::nonNull).map(ResourcePackLoader::open).collect(ImmutableList.toImmutableList());
-+            return stream.map(resourcepackrepository::getPack).filter(Objects::nonNull).map(ResourcePackLoader::open).collect(ImmutableList.toImmutableList()); // CraftBukkit - decompile error
+-            return (ImmutableList) stream.map(resourcepackrepository::getPack).filter(Objects::nonNull).map(Pack::open).collect(ImmutableList.toImmutableList());
++            return stream.map(resourcepackrepository::getPack).filter(Objects::nonNull).map(Pack::open).collect(ImmutableList.toImmutableList()); // CraftBukkit - decompile error
          }, this).thenCompose((immutablelist) -> {
-             ResourceManager resourcemanager = new ResourceManager(EnumResourcePackType.SERVER_DATA, immutablelist);
-             List<IRegistry.a<?>> list = TagDataPack.loadTagsForExistingRegistries(resourcemanager, this.registries.compositeAccess());
-@@ -1654,6 +1989,7 @@
+             MultiPackResourceManager resourcemanager = new MultiPackResourceManager(PackType.SERVER_DATA, immutablelist);
+             List<Registry.PendingTags<?>> list = TagLoader.loadTagsForExistingRegistries(resourcemanager, this.registries.compositeAccess());
+@@ -1654,6 +1987,7 @@
          }).thenAcceptAsync((minecraftserver_reloadableresources) -> {
              this.resources.close();
              this.resources = minecraftserver_reloadableresources;
 +            this.server.syncCommands(); // SPIGOT-5884: Lost on reload
-             this.packRepository.setSelected(collection);
-             WorldDataConfiguration worlddataconfiguration = new WorldDataConfiguration(getSelectedPacks(this.packRepository, true), this.worldData.enabledFeatures());
+             this.packRepository.setSelected(dataPacks);
+             WorldDataConfiguration worlddataconfiguration = new WorldDataConfiguration(MinecraftServer.getSelectedPacks(this.packRepository, true), this.worldData.enabledFeatures());
  
-@@ -1952,7 +2288,7 @@
+@@ -1952,7 +2286,7 @@
              final List<String> list = Lists.newArrayList();
              final GameRules gamerules = this.getGameRules();
  
--            gamerules.visitGameRuleTypes(new GameRules.GameRuleVisitor(this) {
-+            gamerules.visitGameRuleTypes(new GameRules.GameRuleVisitor() { // CraftBukkit - decompile error
+-            gamerules.visitGameRuleTypes(new GameRules.GameRuleTypeVisitor(this) {
++            gamerules.visitGameRuleTypes(new GameRules.GameRuleTypeVisitor() { // CraftBukkit - decompile error
                  @Override
-                 public <T extends GameRules.GameRuleValue<T>> void visit(GameRules.GameRuleKey<T> gamerules_gamerulekey, GameRules.GameRuleDefinition<T> gamerules_gameruledefinition) {
-                     list.add(String.format(Locale.ROOT, "%s=%s\n", gamerules_gamerulekey.getId(), gamerules.getRule(gamerules_gamerulekey)));
-@@ -2058,7 +2394,7 @@
+                 public <T extends GameRules.Value<T>> void visit(GameRules.Key<T> key, GameRules.Type<T> type) {
+                     list.add(String.format(Locale.ROOT, "%s=%s\n", key.getId(), gamerules.getRule(key)));
+@@ -2058,7 +2392,7 @@
              try {
                  label51:
                  {
 -                    ArrayList arraylist;
-+                    ArrayList<NativeModuleLister.a> arraylist; // CraftBukkit - decompile error
++                    ArrayList<NativeModuleLister.NativeModuleInfo> arraylist; // CraftBukkit - decompile error
  
                      try {
                          arraylist = Lists.newArrayList(NativeModuleLister.listModules());
-@@ -2108,6 +2444,22 @@
- 
-     }
- 
+@@ -2105,8 +2439,24 @@
+         if (bufferedwriter != null) {
+             bufferedwriter.close();
+         }
++
++    }
++
 +    // CraftBukkit start
 +    public boolean isDebugging() {
 +        return false;
 +    }
-+
+ 
 +    @Deprecated
 +    public static MinecraftServer getServer() {
 +        return (Bukkit.getServer() instanceof CraftServer) ? ((CraftServer) Bukkit.getServer()).getServer() : null;
 +    }
 +
 +    @Deprecated
-+    public static IRegistryCustom getDefaultRegistryAccess() {
++    public static RegistryAccess getDefaultRegistryAccess() {
 +        return CraftRegistry.getMinecraftRegistry();
-+    }
+     }
 +    // CraftBukkit end
-+
-     private GameProfilerFiller createProfiler() {
+ 
+     private ProfilerFiller createProfiler() {
          if (this.willStartRecordingMetrics) {
-             this.metricsRecorder = ActiveMetricsRecorder.createStarted(new ServerMetricsSamplersProvider(SystemUtils.timeSource, this.isDedicatedServer()), SystemUtils.timeSource, SystemUtils.ioPool(), new MetricsPersister("server"), this.onMetricsRecordingStopped, (path) -> {
-@@ -2235,6 +2587,11 @@
+@@ -2235,6 +2585,11 @@
  
      }
  
diff --git a/paper-server/patches/sources/net/minecraft/server/PlayerAdvancements.java.patch b/paper-server/patches/sources/net/minecraft/server/PlayerAdvancements.java.patch
new file mode 100644
index 0000000000..bed58c139a
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/PlayerAdvancements.java.patch
@@ -0,0 +1,18 @@
+--- a/net/minecraft/server/PlayerAdvancements.java
++++ b/net/minecraft/server/PlayerAdvancements.java
+@@ -196,6 +196,7 @@
+             AdvancementHolder advancementholder = loader.get(minecraftkey);
+ 
+             if (advancementholder == null) {
++                if (!minecraftkey.getNamespace().equals("minecraft")) return; // CraftBukkit
+                 PlayerAdvancements.LOGGER.warn("Ignored advancement '{}' in progress file {} - it doesn't exist anymore?", minecraftkey, this.playerSavePath);
+             } else {
+                 this.startProgress(advancementholder, advancementprogress);
+@@ -227,6 +228,7 @@
+             this.progressChanged.add(advancement);
+             flag = true;
+             if (!flag1 && advancementprogress.isDone()) {
++                this.player.level().getCraftServer().getPluginManager().callEvent(new org.bukkit.event.player.PlayerAdvancementDoneEvent(this.player.getBukkitEntity(), advancement.toBukkit())); // CraftBukkit
+                 advancement.value().rewards().grant(this.player);
+                 advancement.value().display().ifPresent((advancementdisplay) -> {
+                     if (advancementdisplay.shouldAnnounceChat() && this.player.serverLevel().getGameRules().getBoolean(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)) {
diff --git a/paper-server/patches/sources/net/minecraft/server/ScoreboardServer.patch b/paper-server/patches/sources/net/minecraft/server/ScoreboardServer.patch
deleted file mode 100644
index a99db94a5b..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/ScoreboardServer.patch
+++ /dev/null
@@ -1,132 +0,0 @@
---- a/net/minecraft/server/ScoreboardServer.java
-+++ b/net/minecraft/server/ScoreboardServer.java
-@@ -42,7 +42,7 @@
-     protected void onScoreChanged(ScoreHolder scoreholder, ScoreboardObjective scoreboardobjective, ScoreboardScore scoreboardscore) {
-         super.onScoreChanged(scoreholder, scoreboardobjective, scoreboardscore);
-         if (this.trackedObjectives.contains(scoreboardobjective)) {
--            this.server.getPlayerList().broadcastAll(new PacketPlayOutScoreboardScore(scoreholder.getScoreboardName(), scoreboardobjective.getName(), scoreboardscore.value(), Optional.ofNullable(scoreboardscore.display()), Optional.ofNullable(scoreboardscore.numberFormat())));
-+            this.broadcastAll(new PacketPlayOutScoreboardScore(scoreholder.getScoreboardName(), scoreboardobjective.getName(), scoreboardscore.value(), Optional.ofNullable(scoreboardscore.display()), Optional.ofNullable(scoreboardscore.numberFormat()))); // CraftBukkit
-         }
- 
-         this.setDirty();
-@@ -57,7 +57,7 @@
-     @Override
-     public void onPlayerRemoved(ScoreHolder scoreholder) {
-         super.onPlayerRemoved(scoreholder);
--        this.server.getPlayerList().broadcastAll(new ClientboundResetScorePacket(scoreholder.getScoreboardName(), (String) null));
-+        this.broadcastAll(new ClientboundResetScorePacket(scoreholder.getScoreboardName(), (String) null)); // CraftBukkit
-         this.setDirty();
-     }
- 
-@@ -65,7 +65,7 @@
-     public void onPlayerScoreRemoved(ScoreHolder scoreholder, ScoreboardObjective scoreboardobjective) {
-         super.onPlayerScoreRemoved(scoreholder, scoreboardobjective);
-         if (this.trackedObjectives.contains(scoreboardobjective)) {
--            this.server.getPlayerList().broadcastAll(new ClientboundResetScorePacket(scoreholder.getScoreboardName(), scoreboardobjective.getName()));
-+            this.broadcastAll(new ClientboundResetScorePacket(scoreholder.getScoreboardName(), scoreboardobjective.getName())); // CraftBukkit
-         }
- 
-         this.setDirty();
-@@ -78,7 +78,7 @@
-         super.setDisplayObjective(displayslot, scoreboardobjective);
-         if (scoreboardobjective1 != scoreboardobjective && scoreboardobjective1 != null) {
-             if (this.getObjectiveDisplaySlotCount(scoreboardobjective1) > 0) {
--                this.server.getPlayerList().broadcastAll(new PacketPlayOutScoreboardDisplayObjective(displayslot, scoreboardobjective));
-+                this.broadcastAll(new PacketPlayOutScoreboardDisplayObjective(displayslot, scoreboardobjective)); // CraftBukkit
-             } else {
-                 this.stopTrackingObjective(scoreboardobjective1);
-             }
-@@ -86,7 +86,7 @@
- 
-         if (scoreboardobjective != null) {
-             if (this.trackedObjectives.contains(scoreboardobjective)) {
--                this.server.getPlayerList().broadcastAll(new PacketPlayOutScoreboardDisplayObjective(displayslot, scoreboardobjective));
-+                this.broadcastAll(new PacketPlayOutScoreboardDisplayObjective(displayslot, scoreboardobjective)); // CraftBukkit
-             } else {
-                 this.startTrackingObjective(scoreboardobjective);
-             }
-@@ -98,7 +98,7 @@
-     @Override
-     public boolean addPlayerToTeam(String s, ScoreboardTeam scoreboardteam) {
-         if (super.addPlayerToTeam(s, scoreboardteam)) {
--            this.server.getPlayerList().broadcastAll(PacketPlayOutScoreboardTeam.createPlayerPacket(scoreboardteam, s, PacketPlayOutScoreboardTeam.a.ADD));
-+            this.broadcastAll(PacketPlayOutScoreboardTeam.createPlayerPacket(scoreboardteam, s, PacketPlayOutScoreboardTeam.a.ADD)); // CraftBukkit
-             this.setDirty();
-             return true;
-         } else {
-@@ -109,7 +109,7 @@
-     @Override
-     public void removePlayerFromTeam(String s, ScoreboardTeam scoreboardteam) {
-         super.removePlayerFromTeam(s, scoreboardteam);
--        this.server.getPlayerList().broadcastAll(PacketPlayOutScoreboardTeam.createPlayerPacket(scoreboardteam, s, PacketPlayOutScoreboardTeam.a.REMOVE));
-+        this.broadcastAll(PacketPlayOutScoreboardTeam.createPlayerPacket(scoreboardteam, s, PacketPlayOutScoreboardTeam.a.REMOVE)); // CraftBukkit
-         this.setDirty();
-     }
- 
-@@ -123,7 +123,7 @@
-     public void onObjectiveChanged(ScoreboardObjective scoreboardobjective) {
-         super.onObjectiveChanged(scoreboardobjective);
-         if (this.trackedObjectives.contains(scoreboardobjective)) {
--            this.server.getPlayerList().broadcastAll(new PacketPlayOutScoreboardObjective(scoreboardobjective, 2));
-+            this.broadcastAll(new PacketPlayOutScoreboardObjective(scoreboardobjective, 2)); // CraftBukkit
-         }
- 
-         this.setDirty();
-@@ -142,21 +142,21 @@
-     @Override
-     public void onTeamAdded(ScoreboardTeam scoreboardteam) {
-         super.onTeamAdded(scoreboardteam);
--        this.server.getPlayerList().broadcastAll(PacketPlayOutScoreboardTeam.createAddOrModifyPacket(scoreboardteam, true));
-+        this.broadcastAll(PacketPlayOutScoreboardTeam.createAddOrModifyPacket(scoreboardteam, true)); // CraftBukkit
-         this.setDirty();
-     }
- 
-     @Override
-     public void onTeamChanged(ScoreboardTeam scoreboardteam) {
-         super.onTeamChanged(scoreboardteam);
--        this.server.getPlayerList().broadcastAll(PacketPlayOutScoreboardTeam.createAddOrModifyPacket(scoreboardteam, false));
-+        this.broadcastAll(PacketPlayOutScoreboardTeam.createAddOrModifyPacket(scoreboardteam, false)); // CraftBukkit
-         this.setDirty();
-     }
- 
-     @Override
-     public void onTeamRemoved(ScoreboardTeam scoreboardteam) {
-         super.onTeamRemoved(scoreboardteam);
--        this.server.getPlayerList().broadcastAll(PacketPlayOutScoreboardTeam.createRemovePacket(scoreboardteam));
-+        this.broadcastAll(PacketPlayOutScoreboardTeam.createRemovePacket(scoreboardteam)); // CraftBukkit
-         this.setDirty();
-     }
- 
-@@ -207,6 +207,7 @@
- 
-         while (iterator.hasNext()) {
-             EntityPlayer entityplayer = (EntityPlayer) iterator.next();
-+            if (entityplayer.getBukkitEntity().getScoreboard().getHandle() != this) continue; // CraftBukkit - Only players on this board
-             Iterator iterator1 = list.iterator();
- 
-             while (iterator1.hasNext()) {
-@@ -243,6 +244,7 @@
- 
-         while (iterator.hasNext()) {
-             EntityPlayer entityplayer = (EntityPlayer) iterator.next();
-+            if (entityplayer.getBukkitEntity().getScoreboard().getHandle() != this) continue; // CraftBukkit - Only players on this board
-             Iterator iterator1 = list.iterator();
- 
-             while (iterator1.hasNext()) {
-@@ -287,6 +289,16 @@
-         return this.createData().load(nbttagcompound, holderlookup_a);
-     }
- 
-+    // CraftBukkit start - Send to players
-+    private void broadcastAll(Packet packet) {
-+        for (EntityPlayer entityplayer : (List<EntityPlayer>) this.server.getPlayerList().players) {
-+            if (entityplayer.getBukkitEntity().getScoreboard().getHandle() == this) {
-+                entityplayer.connection.send(packet);
-+            }
-+        }
-+    }
-+    // CraftBukkit end
-+
-     public static enum Action {
- 
-         CHANGE, REMOVE;
diff --git a/paper-server/patches/sources/net/minecraft/server/AdvancementDataWorld.patch b/paper-server/patches/sources/net/minecraft/server/ServerAdvancementManager.java.patch
similarity index 57%
rename from paper-server/patches/sources/net/minecraft/server/AdvancementDataWorld.patch
rename to paper-server/patches/sources/net/minecraft/server/ServerAdvancementManager.java.patch
index 258a729f49..39dbd8090c 100644
--- a/paper-server/patches/sources/net/minecraft/server/AdvancementDataWorld.patch
+++ b/paper-server/patches/sources/net/minecraft/server/ServerAdvancementManager.java.patch
@@ -1,20 +1,20 @@
---- a/net/minecraft/server/AdvancementDataWorld.java
-+++ b/net/minecraft/server/AdvancementDataWorld.java
+--- a/net/minecraft/server/ServerAdvancementManager.java
++++ b/net/minecraft/server/ServerAdvancementManager.java
 @@ -21,10 +21,14 @@
- import net.minecraft.util.profiling.GameProfilerFiller;
+ import net.minecraft.util.profiling.ProfilerFiller;
  import org.slf4j.Logger;
  
 +// CraftBukkit start
 +import java.util.HashMap;
 +// CraftBukkit end
 +
- public class AdvancementDataWorld extends ResourceDataJson<Advancement> {
+ public class ServerAdvancementManager extends SimpleJsonResourceReloadListener<Advancement> {
  
      private static final Logger LOGGER = LogUtils.getLogger();
--    public Map<MinecraftKey, AdvancementHolder> advancements = Map.of();
-+    public Map<MinecraftKey, AdvancementHolder> advancements = new HashMap<>(); // CraftBukkit - SPIGOT-7734: mutable
+-    public Map<ResourceLocation, AdvancementHolder> advancements = Map.of();
++    public Map<ResourceLocation, AdvancementHolder> advancements = new HashMap<>(); // CraftBukkit - SPIGOT-7734: mutable
      private AdvancementTree tree = new AdvancementTree();
-     private final HolderLookup.a registries;
+     private final HolderLookup.Provider registries;
  
 @@ -40,7 +44,7 @@
              this.validate(minecraftkey, advancement);
diff --git a/paper-server/patches/sources/net/minecraft/server/CustomFunctionData.patch b/paper-server/patches/sources/net/minecraft/server/ServerFunctionManager.java.patch
similarity index 53%
rename from paper-server/patches/sources/net/minecraft/server/CustomFunctionData.patch
rename to paper-server/patches/sources/net/minecraft/server/ServerFunctionManager.java.patch
index 419c9c3ea8..c26f9aaa6c 100644
--- a/paper-server/patches/sources/net/minecraft/server/CustomFunctionData.patch
+++ b/paper-server/patches/sources/net/minecraft/server/ServerFunctionManager.java.patch
@@ -1,9 +1,9 @@
---- a/net/minecraft/server/CustomFunctionData.java
-+++ b/net/minecraft/server/CustomFunctionData.java
+--- a/net/minecraft/server/ServerFunctionManager.java
++++ b/net/minecraft/server/ServerFunctionManager.java
 @@ -37,7 +37,7 @@
      }
  
-     public CommandDispatcher<CommandListenerWrapper> getDispatcher() {
+     public CommandDispatcher<CommandSourceStack> getDispatcher() {
 -        return this.server.getCommands().getDispatcher();
 +        return this.server.vanillaCommandDispatcher.getDispatcher(); // CraftBukkit
      }
diff --git a/paper-server/patches/sources/net/minecraft/server/ServerScoreboard.java.patch b/paper-server/patches/sources/net/minecraft/server/ServerScoreboard.java.patch
new file mode 100644
index 0000000000..2cccb6d1cc
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/ServerScoreboard.java.patch
@@ -0,0 +1,132 @@
+--- a/net/minecraft/server/ServerScoreboard.java
++++ b/net/minecraft/server/ServerScoreboard.java
+@@ -42,7 +42,7 @@
+     protected void onScoreChanged(ScoreHolder scoreHolder, Objective objective, Score score) {
+         super.onScoreChanged(scoreHolder, objective, score);
+         if (this.trackedObjectives.contains(objective)) {
+-            this.server.getPlayerList().broadcastAll(new ClientboundSetScorePacket(scoreHolder.getScoreboardName(), objective.getName(), score.value(), Optional.ofNullable(score.display()), Optional.ofNullable(score.numberFormat())));
++            this.broadcastAll(new ClientboundSetScorePacket(scoreHolder.getScoreboardName(), objective.getName(), score.value(), Optional.ofNullable(score.display()), Optional.ofNullable(score.numberFormat()))); // CraftBukkit
+         }
+ 
+         this.setDirty();
+@@ -57,7 +57,7 @@
+     @Override
+     public void onPlayerRemoved(ScoreHolder scoreHolder) {
+         super.onPlayerRemoved(scoreHolder);
+-        this.server.getPlayerList().broadcastAll(new ClientboundResetScorePacket(scoreHolder.getScoreboardName(), (String) null));
++        this.broadcastAll(new ClientboundResetScorePacket(scoreHolder.getScoreboardName(), (String) null)); // CraftBukkit
+         this.setDirty();
+     }
+ 
+@@ -65,7 +65,7 @@
+     public void onPlayerScoreRemoved(ScoreHolder scoreHolder, Objective objective) {
+         super.onPlayerScoreRemoved(scoreHolder, objective);
+         if (this.trackedObjectives.contains(objective)) {
+-            this.server.getPlayerList().broadcastAll(new ClientboundResetScorePacket(scoreHolder.getScoreboardName(), objective.getName()));
++            this.broadcastAll(new ClientboundResetScorePacket(scoreHolder.getScoreboardName(), objective.getName())); // CraftBukkit
+         }
+ 
+         this.setDirty();
+@@ -78,7 +78,7 @@
+         super.setDisplayObjective(slot, objective);
+         if (scoreboardobjective1 != objective && scoreboardobjective1 != null) {
+             if (this.getObjectiveDisplaySlotCount(scoreboardobjective1) > 0) {
+-                this.server.getPlayerList().broadcastAll(new ClientboundSetDisplayObjectivePacket(slot, objective));
++                this.broadcastAll(new ClientboundSetDisplayObjectivePacket(slot, objective)); // CraftBukkit
+             } else {
+                 this.stopTrackingObjective(scoreboardobjective1);
+             }
+@@ -86,7 +86,7 @@
+ 
+         if (objective != null) {
+             if (this.trackedObjectives.contains(objective)) {
+-                this.server.getPlayerList().broadcastAll(new ClientboundSetDisplayObjectivePacket(slot, objective));
++                this.broadcastAll(new ClientboundSetDisplayObjectivePacket(slot, objective)); // CraftBukkit
+             } else {
+                 this.startTrackingObjective(objective);
+             }
+@@ -98,7 +98,7 @@
+     @Override
+     public boolean addPlayerToTeam(String scoreHolderName, PlayerTeam team) {
+         if (super.addPlayerToTeam(scoreHolderName, team)) {
+-            this.server.getPlayerList().broadcastAll(ClientboundSetPlayerTeamPacket.createPlayerPacket(team, scoreHolderName, ClientboundSetPlayerTeamPacket.Action.ADD));
++            this.broadcastAll(ClientboundSetPlayerTeamPacket.createPlayerPacket(team, scoreHolderName, ClientboundSetPlayerTeamPacket.Action.ADD)); // CraftBukkit
+             this.setDirty();
+             return true;
+         } else {
+@@ -109,7 +109,7 @@
+     @Override
+     public void removePlayerFromTeam(String scoreHolderName, PlayerTeam team) {
+         super.removePlayerFromTeam(scoreHolderName, team);
+-        this.server.getPlayerList().broadcastAll(ClientboundSetPlayerTeamPacket.createPlayerPacket(team, scoreHolderName, ClientboundSetPlayerTeamPacket.Action.REMOVE));
++        this.broadcastAll(ClientboundSetPlayerTeamPacket.createPlayerPacket(team, scoreHolderName, ClientboundSetPlayerTeamPacket.Action.REMOVE)); // CraftBukkit
+         this.setDirty();
+     }
+ 
+@@ -123,7 +123,7 @@
+     public void onObjectiveChanged(Objective objective) {
+         super.onObjectiveChanged(objective);
+         if (this.trackedObjectives.contains(objective)) {
+-            this.server.getPlayerList().broadcastAll(new ClientboundSetObjectivePacket(objective, 2));
++            this.broadcastAll(new ClientboundSetObjectivePacket(objective, 2)); // CraftBukkit
+         }
+ 
+         this.setDirty();
+@@ -142,21 +142,21 @@
+     @Override
+     public void onTeamAdded(PlayerTeam team) {
+         super.onTeamAdded(team);
+-        this.server.getPlayerList().broadcastAll(ClientboundSetPlayerTeamPacket.createAddOrModifyPacket(team, true));
++        this.broadcastAll(ClientboundSetPlayerTeamPacket.createAddOrModifyPacket(team, true)); // CraftBukkit
+         this.setDirty();
+     }
+ 
+     @Override
+     public void onTeamChanged(PlayerTeam team) {
+         super.onTeamChanged(team);
+-        this.server.getPlayerList().broadcastAll(ClientboundSetPlayerTeamPacket.createAddOrModifyPacket(team, false));
++        this.broadcastAll(ClientboundSetPlayerTeamPacket.createAddOrModifyPacket(team, false)); // CraftBukkit
+         this.setDirty();
+     }
+ 
+     @Override
+     public void onTeamRemoved(PlayerTeam team) {
+         super.onTeamRemoved(team);
+-        this.server.getPlayerList().broadcastAll(ClientboundSetPlayerTeamPacket.createRemovePacket(team));
++        this.broadcastAll(ClientboundSetPlayerTeamPacket.createRemovePacket(team)); // CraftBukkit
+         this.setDirty();
+     }
+ 
+@@ -207,6 +207,7 @@
+ 
+         while (iterator.hasNext()) {
+             ServerPlayer entityplayer = (ServerPlayer) iterator.next();
++            if (entityplayer.getBukkitEntity().getScoreboard().getHandle() != this) continue; // CraftBukkit - Only players on this board
+             Iterator iterator1 = list.iterator();
+ 
+             while (iterator1.hasNext()) {
+@@ -243,6 +244,7 @@
+ 
+         while (iterator.hasNext()) {
+             ServerPlayer entityplayer = (ServerPlayer) iterator.next();
++            if (entityplayer.getBukkitEntity().getScoreboard().getHandle() != this) continue; // CraftBukkit - Only players on this board
+             Iterator iterator1 = list.iterator();
+ 
+             while (iterator1.hasNext()) {
+@@ -287,6 +289,16 @@
+         return this.createData().load(nbt, registries);
+     }
+ 
++    // CraftBukkit start - Send to players
++    private void broadcastAll(Packet packet) {
++        for (ServerPlayer entityplayer : (List<ServerPlayer>) this.server.getPlayerList().players) {
++            if (entityplayer.getBukkitEntity().getScoreboard().getHandle() == this) {
++                entityplayer.connection.send(packet);
++            }
++        }
++    }
++    // CraftBukkit end
++
+     public static enum Method {
+ 
+         CHANGE, REMOVE;
diff --git a/paper-server/patches/sources/net/minecraft/server/ServerTickRateManager.patch b/paper-server/patches/sources/net/minecraft/server/ServerTickRateManager.java.patch
similarity index 82%
rename from paper-server/patches/sources/net/minecraft/server/ServerTickRateManager.patch
rename to paper-server/patches/sources/net/minecraft/server/ServerTickRateManager.java.patch
index ef54ff385b..9720b17dc9 100644
--- a/paper-server/patches/sources/net/minecraft/server/ServerTickRateManager.patch
+++ b/paper-server/patches/sources/net/minecraft/server/ServerTickRateManager.java.patch
@@ -5,7 +5,7 @@
  
      public boolean stopSprinting() {
 +        // CraftBukkit start, add sendLog parameter
-+        return stopSprinting(true);
++        return this.stopSprinting(true);
 +    }
 +
 +    public boolean stopSprinting(boolean sendLog) {
@@ -23,19 +23,19 @@
 -    private void finishTickSprint() {
 +    private void finishTickSprint(boolean sendLog) { // CraftBukkit - add sendLog parameter
          long i = this.scheduledCurrentSprintTicks - this.remainingSprintTicks;
-         double d0 = Math.max(1.0D, (double) this.sprintTimeSpend) / (double) TimeRange.NANOSECONDS_PER_MILLISECOND;
-         int j = (int) ((double) (TimeRange.MILLISECONDS_PER_SECOND * i) / d0);
+         double d0 = Math.max(1.0D, (double) this.sprintTimeSpend) / (double) TimeUtil.NANOSECONDS_PER_MILLISECOND;
+         int j = (int) ((double) (TimeUtil.MILLISECONDS_PER_SECOND * i) / d0);
 @@ -86,9 +92,13 @@
  
          this.scheduledCurrentSprintTicks = 0L;
          this.sprintTimeSpend = 0L;
 -        this.server.createCommandSourceStack().sendSuccess(() -> {
--            return IChatBaseComponent.translatable("commands.tick.sprint.report", j, s);
+-            return Component.translatable("commands.tick.sprint.report", j, s);
 -        }, true);
 +        // CraftBukkit start - add sendLog parameter
 +        if (sendLog) {
 +            this.server.createCommandSourceStack().sendSuccess(() -> {
-+                return IChatBaseComponent.translatable("commands.tick.sprint.report", j, s);
++                return Component.translatable("commands.tick.sprint.report", j, s);
 +            }, true);
 +        }
 +        // CraftBukkit end
diff --git a/paper-server/patches/sources/net/minecraft/server/bossevents/BossBattleCustom.patch b/paper-server/patches/sources/net/minecraft/server/bossevents/BossBattleCustom.patch
deleted file mode 100644
index 3dacf95669..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/bossevents/BossBattleCustom.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/net/minecraft/server/bossevents/BossBattleCustom.java
-+++ b/net/minecraft/server/bossevents/BossBattleCustom.java
-@@ -19,12 +19,27 @@
- import net.minecraft.util.MathHelper;
- import net.minecraft.world.BossBattle;
- 
-+// CraftBukkit start
-+import org.bukkit.boss.KeyedBossBar;
-+import org.bukkit.craftbukkit.boss.CraftKeyedBossbar;
-+// CraftBukkit end
-+
- public class BossBattleCustom extends BossBattleServer {
- 
-     private final MinecraftKey id;
-     private final Set<UUID> players = Sets.newHashSet();
-     private int value;
-     private int max = 100;
-+    // CraftBukkit start
-+    private KeyedBossBar bossBar;
-+
-+    public KeyedBossBar getBukkitEntity() {
-+        if (bossBar == null) {
-+            bossBar = new CraftKeyedBossbar(this);
-+        }
-+        return bossBar;
-+    }
-+    // CraftBukkit end
- 
-     public BossBattleCustom(MinecraftKey minecraftkey, IChatBaseComponent ichatbasecomponent) {
-         super(ichatbasecomponent, BossBattle.BarColor.WHITE, BossBattle.BarStyle.PROGRESS);
diff --git a/paper-server/patches/sources/net/minecraft/server/bossevents/CustomBossEvent.java.patch b/paper-server/patches/sources/net/minecraft/server/bossevents/CustomBossEvent.java.patch
new file mode 100644
index 0000000000..6e80d59765
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/bossevents/CustomBossEvent.java.patch
@@ -0,0 +1,31 @@
+--- a/net/minecraft/server/bossevents/CustomBossEvent.java
++++ b/net/minecraft/server/bossevents/CustomBossEvent.java
+@@ -18,6 +18,10 @@
+ import net.minecraft.server.level.ServerPlayer;
+ import net.minecraft.util.Mth;
+ import net.minecraft.world.BossEvent;
++// CraftBukkit start
++import org.bukkit.boss.KeyedBossBar;
++import org.bukkit.craftbukkit.boss.CraftKeyedBossbar;
++// CraftBukkit end
+ 
+ public class CustomBossEvent extends ServerBossEvent {
+ 
+@@ -25,7 +29,17 @@
+     private final Set<UUID> players = Sets.newHashSet();
+     private int value;
+     private int max = 100;
++    // CraftBukkit start
++    private KeyedBossBar bossBar;
+ 
++    public KeyedBossBar getBukkitEntity() {
++        if (this.bossBar == null) {
++            this.bossBar = new CraftKeyedBossbar(this);
++        }
++        return this.bossBar;
++    }
++    // CraftBukkit end
++
+     public CustomBossEvent(ResourceLocation id, Component displayName) {
+         super(displayName, BossEvent.BossBarColor.WHITE, BossEvent.BossBarOverlay.PROGRESS);
+         this.id = id;
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/CommandDifficulty.patch b/paper-server/patches/sources/net/minecraft/server/commands/CommandDifficulty.patch
deleted file mode 100644
index 2a303cc1f1..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/commands/CommandDifficulty.patch
+++ /dev/null
@@ -1,17 +0,0 @@
---- a/net/minecraft/server/commands/CommandDifficulty.java
-+++ b/net/minecraft/server/commands/CommandDifficulty.java
-@@ -44,11 +44,12 @@
- 
-     public static int setDifficulty(CommandListenerWrapper commandlistenerwrapper, EnumDifficulty enumdifficulty) throws CommandSyntaxException {
-         MinecraftServer minecraftserver = commandlistenerwrapper.getServer();
-+        net.minecraft.server.level.WorldServer worldServer = commandlistenerwrapper.getLevel(); // CraftBukkit
- 
--        if (minecraftserver.getWorldData().getDifficulty() == enumdifficulty) {
-+        if (worldServer.getDifficulty() == enumdifficulty) { // CraftBukkit
-             throw CommandDifficulty.ERROR_ALREADY_DIFFICULT.create(enumdifficulty.getKey());
-         } else {
--            minecraftserver.setDifficulty(enumdifficulty, true);
-+            worldServer.serverLevelData.setDifficulty(enumdifficulty); // CraftBukkit
-             commandlistenerwrapper.sendSuccess(() -> {
-                 return IChatBaseComponent.translatable("commands.difficulty.success", enumdifficulty.getDisplayName());
-             }, true);
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/CommandEffect.patch b/paper-server/patches/sources/net/minecraft/server/commands/CommandEffect.patch
deleted file mode 100644
index f1896566c8..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/commands/CommandEffect.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/net/minecraft/server/commands/CommandEffect.java
-+++ b/net/minecraft/server/commands/CommandEffect.java
-@@ -84,7 +84,7 @@
-             if (entity instanceof EntityLiving) {
-                 MobEffect mobeffect = new MobEffect(holder, k, i, false, flag);
- 
--                if (((EntityLiving) entity).addEffect(mobeffect, commandlistenerwrapper.getEntity())) {
-+                if (((EntityLiving) entity).addEffect(mobeffect, commandlistenerwrapper.getEntity(), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.COMMAND)) { // CraftBukkit
-                     ++j;
-                 }
-             }
-@@ -114,7 +114,7 @@
-         while (iterator.hasNext()) {
-             Entity entity = (Entity) iterator.next();
- 
--            if (entity instanceof EntityLiving && ((EntityLiving) entity).removeAllEffects()) {
-+            if (entity instanceof EntityLiving && ((EntityLiving) entity).removeAllEffects(org.bukkit.event.entity.EntityPotionEffectEvent.Cause.COMMAND)) { // CraftBukkit
-                 ++i;
-             }
-         }
-@@ -144,7 +144,7 @@
-         while (iterator.hasNext()) {
-             Entity entity = (Entity) iterator.next();
- 
--            if (entity instanceof EntityLiving && ((EntityLiving) entity).removeEffect(holder)) {
-+            if (entity instanceof EntityLiving && ((EntityLiving) entity).removeEffect(holder, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.COMMAND)) { // CraftBukkit
-                 ++i;
-             }
-         }
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/CommandGamerule.patch b/paper-server/patches/sources/net/minecraft/server/commands/CommandGamerule.patch
deleted file mode 100644
index f3107570d5..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/commands/CommandGamerule.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/net/minecraft/server/commands/CommandGamerule.java
-+++ b/net/minecraft/server/commands/CommandGamerule.java
-@@ -34,7 +34,7 @@
- 
-     static <T extends GameRules.GameRuleValue<T>> int setRule(CommandContext<CommandListenerWrapper> commandcontext, GameRules.GameRuleKey<T> gamerules_gamerulekey) {
-         CommandListenerWrapper commandlistenerwrapper = (CommandListenerWrapper) commandcontext.getSource();
--        T t0 = commandlistenerwrapper.getServer().getGameRules().getRule(gamerules_gamerulekey);
-+        T t0 = commandlistenerwrapper.getLevel().getGameRules().getRule(gamerules_gamerulekey); // CraftBukkit
- 
-         t0.setFromArgument(commandcontext, "value");
-         commandlistenerwrapper.sendSuccess(() -> {
-@@ -44,7 +44,7 @@
-     }
- 
-     static <T extends GameRules.GameRuleValue<T>> int queryRule(CommandListenerWrapper commandlistenerwrapper, GameRules.GameRuleKey<T> gamerules_gamerulekey) {
--        T t0 = commandlistenerwrapper.getServer().getGameRules().getRule(gamerules_gamerulekey);
-+        T t0 = commandlistenerwrapper.getLevel().getGameRules().getRule(gamerules_gamerulekey); // CraftBukkit
- 
-         commandlistenerwrapper.sendSuccess(() -> {
-             return IChatBaseComponent.translatable("commands.gamerule.query", gamerules_gamerulekey.getId(), t0.toString());
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/CommandList.patch b/paper-server/patches/sources/net/minecraft/server/commands/CommandList.patch
deleted file mode 100644
index dbd943ac63..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/commands/CommandList.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/net/minecraft/server/commands/CommandList.java
-+++ b/net/minecraft/server/commands/CommandList.java
-@@ -35,7 +35,14 @@
- 
-     private static int format(CommandListenerWrapper commandlistenerwrapper, Function<EntityPlayer, IChatBaseComponent> function) {
-         PlayerList playerlist = commandlistenerwrapper.getServer().getPlayerList();
--        List<EntityPlayer> list = playerlist.getPlayers();
-+        // CraftBukkit start
-+        List<EntityPlayer> players = playerlist.getPlayers();
-+        if (commandlistenerwrapper.getBukkitSender() instanceof org.bukkit.entity.Player) {
-+            org.bukkit.entity.Player sender = (org.bukkit.entity.Player) commandlistenerwrapper.getBukkitSender();
-+            players = players.stream().filter((ep) -> sender.canSee(ep.getBukkitEntity())).collect(java.util.stream.Collectors.toList());
-+        }
-+        List<EntityPlayer> list = players;
-+        // CraftBukkit end
-         IChatBaseComponent ichatbasecomponent = ChatComponentUtils.formatList(list, function);
- 
-         commandlistenerwrapper.sendSuccess(() -> {
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/CommandLoot.patch b/paper-server/patches/sources/net/minecraft/server/commands/CommandLoot.patch
deleted file mode 100644
index d68afd407f..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/commands/CommandLoot.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- a/net/minecraft/server/commands/CommandLoot.java
-+++ b/net/minecraft/server/commands/CommandLoot.java
-@@ -95,7 +95,7 @@
-     }
- 
-     private static <T extends ArgumentBuilder<CommandListenerWrapper, T>> T addTargets(T t0, CommandLoot.c commandloot_c) {
--        return t0.then(((LiteralArgumentBuilder) net.minecraft.commands.CommandDispatcher.literal("replace").then(net.minecraft.commands.CommandDispatcher.literal("entity").then(net.minecraft.commands.CommandDispatcher.argument("entities", ArgumentEntity.entities()).then(commandloot_c.construct(net.minecraft.commands.CommandDispatcher.argument("slot", ArgumentInventorySlot.slot()), (commandcontext, list, commandloot_a) -> {
-+        return (T) t0.then(((LiteralArgumentBuilder) net.minecraft.commands.CommandDispatcher.literal("replace").then(net.minecraft.commands.CommandDispatcher.literal("entity").then(net.minecraft.commands.CommandDispatcher.argument("entities", ArgumentEntity.entities()).then(commandloot_c.construct(net.minecraft.commands.CommandDispatcher.argument("slot", ArgumentInventorySlot.slot()), (commandcontext, list, commandloot_a) -> { // CraftBukkit - decompile error
-             return entityReplace(ArgumentEntity.getEntities(commandcontext, "entities"), ArgumentInventorySlot.getSlot(commandcontext, "slot"), list.size(), list, commandloot_a);
-         }).then(commandloot_c.construct(net.minecraft.commands.CommandDispatcher.argument("count", IntegerArgumentType.integer(0)), (commandcontext, list, commandloot_a) -> {
-             return entityReplace(ArgumentEntity.getEntities(commandcontext, "entities"), ArgumentInventorySlot.getSlot(commandcontext, "slot"), IntegerArgumentType.getInteger(commandcontext, "count"), list, commandloot_a);
-@@ -250,6 +250,7 @@
-     private static int dropInWorld(CommandListenerWrapper commandlistenerwrapper, Vec3D vec3d, List<ItemStack> list, CommandLoot.a commandloot_a) throws CommandSyntaxException {
-         WorldServer worldserver = commandlistenerwrapper.getLevel();
- 
-+        list.removeIf(ItemStack::isEmpty); // CraftBukkit - SPIGOT-6959 Remove empty items for avoid throw an error in new EntityItem
-         list.forEach((itemstack) -> {
-             EntityItem entityitem = new EntityItem(worldserver, vec3d.x, vec3d.y, vec3d.z, itemstack.copy());
- 
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/CommandReload.patch b/paper-server/patches/sources/net/minecraft/server/commands/CommandReload.patch
deleted file mode 100644
index 46887c0149..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/commands/CommandReload.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- a/net/minecraft/server/commands/CommandReload.java
-+++ b/net/minecraft/server/commands/CommandReload.java
-@@ -44,6 +44,16 @@
-         return collection1;
-     }
- 
-+    // CraftBukkit start
-+    public static void reload(MinecraftServer minecraftserver) {
-+        ResourcePackRepository resourcepackrepository = minecraftserver.getPackRepository();
-+        SaveData savedata = minecraftserver.getWorldData();
-+        Collection<String> collection = resourcepackrepository.getSelectedIds();
-+        Collection<String> collection1 = discoverNewPacks(resourcepackrepository, savedata, collection);
-+        minecraftserver.reloadResources(collection1);
-+    }
-+    // CraftBukkit end
-+
-     public static void register(CommandDispatcher<CommandListenerWrapper> commanddispatcher) {
-         commanddispatcher.register((LiteralArgumentBuilder) ((LiteralArgumentBuilder) net.minecraft.commands.CommandDispatcher.literal("reload").requires((commandlistenerwrapper) -> {
-             return commandlistenerwrapper.hasPermission(2);
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/CommandSchedule.patch b/paper-server/patches/sources/net/minecraft/server/commands/CommandSchedule.patch
deleted file mode 100644
index 96177b3a22..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/commands/CommandSchedule.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/server/commands/CommandSchedule.java
-+++ b/net/minecraft/server/commands/CommandSchedule.java
-@@ -58,7 +58,7 @@
-         } else {
-             long j = commandlistenerwrapper.getLevel().getGameTime() + (long) i;
-             MinecraftKey minecraftkey = (MinecraftKey) pair.getFirst();
--            CustomFunctionCallbackTimerQueue<MinecraftServer> customfunctioncallbacktimerqueue = commandlistenerwrapper.getServer().getWorldData().overworldData().getScheduledEvents();
-+            CustomFunctionCallbackTimerQueue<MinecraftServer> customfunctioncallbacktimerqueue = commandlistenerwrapper.getLevel().serverLevelData.overworldData().getScheduledEvents(); // CraftBukkit - SPIGOT-6667: Use world specific function timer
-             Optional<net.minecraft.commands.functions.CommandFunction<CommandListenerWrapper>> optional = ((Either) pair.getSecond()).left();
-             String s;
- 
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/CommandSetWorldSpawn.patch b/paper-server/patches/sources/net/minecraft/server/commands/CommandSetWorldSpawn.patch
deleted file mode 100644
index be68ecb398..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/commands/CommandSetWorldSpawn.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/server/commands/CommandSetWorldSpawn.java
-+++ b/net/minecraft/server/commands/CommandSetWorldSpawn.java
-@@ -30,7 +30,7 @@
-     private static int setSpawn(CommandListenerWrapper commandlistenerwrapper, BlockPosition blockposition, float f) {
-         WorldServer worldserver = commandlistenerwrapper.getLevel();
- 
--        if (worldserver.dimension() != World.OVERWORLD) {
-+        if (false && worldserver.dimension() != World.OVERWORLD) { // CraftBukkit - SPIGOT-7649: allow in all worlds
-             commandlistenerwrapper.sendFailure(IChatBaseComponent.translatable("commands.setworldspawn.failure.not_overworld"));
-             return 0;
-         } else {
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/CommandSpawnpoint.patch b/paper-server/patches/sources/net/minecraft/server/commands/CommandSpawnpoint.patch
deleted file mode 100644
index 20b1a585ec..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/commands/CommandSpawnpoint.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/server/commands/CommandSpawnpoint.java
-+++ b/net/minecraft/server/commands/CommandSpawnpoint.java
-@@ -41,7 +41,7 @@
-         while (iterator.hasNext()) {
-             EntityPlayer entityplayer = (EntityPlayer) iterator.next();
- 
--            entityplayer.setRespawnPosition(resourcekey, blockposition, f, true, false);
-+            entityplayer.setRespawnPosition(resourcekey, blockposition, f, true, false, org.bukkit.event.player.PlayerSpawnChangeEvent.Cause.COMMAND); // CraftBukkit
-         }
- 
-         String s = resourcekey.location().toString();
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/CommandSpreadPlayers.patch b/paper-server/patches/sources/net/minecraft/server/commands/CommandSpreadPlayers.patch
deleted file mode 100644
index 67d39d3329..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/commands/CommandSpreadPlayers.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/net/minecraft/server/commands/CommandSpreadPlayers.java
-+++ b/net/minecraft/server/commands/CommandSpreadPlayers.java
-@@ -93,7 +93,7 @@
-             if (entity instanceof EntityHuman) {
-                 set.add(entity.getTeam());
-             } else {
--                set.add((Object) null);
-+                set.add((ScoreboardTeamBase) null); // CraftBukkit - decompile error
-             }
-         }
- 
-@@ -203,7 +203,7 @@
-                 commandspreadplayers_a = acommandspreadplayers_a[j++];
-             }
- 
--            entity.teleportTo(worldserver, (double) MathHelper.floor(commandspreadplayers_a.x) + 0.5D, (double) commandspreadplayers_a.getSpawnY(worldserver, i), (double) MathHelper.floor(commandspreadplayers_a.z) + 0.5D, Set.of(), entity.getYRot(), entity.getXRot(), true);
-+            entity.teleportTo(worldserver, (double) MathHelper.floor(commandspreadplayers_a.x) + 0.5D, (double) commandspreadplayers_a.getSpawnY(worldserver, i), (double) MathHelper.floor(commandspreadplayers_a.z) + 0.5D, Set.of(), entity.getYRot(), entity.getXRot(), true, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.COMMAND); // CraftBukkit - handle teleport reason
-             d1 = Double.MAX_VALUE;
-             CommandSpreadPlayers.a[] acommandspreadplayers_a1 = acommandspreadplayers_a;
-             int k = acommandspreadplayers_a.length;
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/CommandSummon.patch b/paper-server/patches/sources/net/minecraft/server/commands/CommandSummon.patch
deleted file mode 100644
index 8e53d33698..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/commands/CommandSummon.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/server/commands/CommandSummon.java
-+++ b/net/minecraft/server/commands/CommandSummon.java
-@@ -67,7 +67,7 @@
-                     ((EntityInsentient) entity).finalizeSpawn(commandlistenerwrapper.getLevel(), commandlistenerwrapper.getLevel().getCurrentDifficultyAt(entity.blockPosition()), EntitySpawnReason.COMMAND, (GroupDataEntity) null);
-                 }
- 
--                if (!worldserver.tryAddFreshEntityWithPassengers(entity)) {
-+                if (!worldserver.tryAddFreshEntityWithPassengers(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.COMMAND)) { // CraftBukkit - pass a spawn reason of "COMMAND"
-                     throw CommandSummon.ERROR_DUPLICATE_UUID.create();
-                 } else {
-                     return entity;
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/CommandTeleport.patch b/paper-server/patches/sources/net/minecraft/server/commands/CommandTeleport.patch
deleted file mode 100644
index 01612c03da..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/commands/CommandTeleport.patch
+++ /dev/null
@@ -1,49 +0,0 @@
---- a/net/minecraft/server/commands/CommandTeleport.java
-+++ b/net/minecraft/server/commands/CommandTeleport.java
-@@ -31,6 +31,14 @@
- import net.minecraft.world.phys.Vec2F;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import net.minecraft.server.level.EntityPlayer;
-+import org.bukkit.Location;
-+import org.bukkit.craftbukkit.CraftWorld;
-+import org.bukkit.event.entity.EntityTeleportEvent;
-+import org.bukkit.event.player.PlayerTeleportEvent;
-+// CraftBukkit end
-+
- public class CommandTeleport {
- 
-     private static final SimpleCommandExceptionType INVALID_POSITION = new SimpleCommandExceptionType(IChatBaseComponent.translatable("commands.teleport.invalidPosition"));
-@@ -167,7 +175,30 @@
-             float f4 = MathHelper.wrapDegrees(f2);
-             float f5 = MathHelper.wrapDegrees(f3);
- 
--            if (entity.teleportTo(worldserver, d3, d4, d5, set, f4, f5, true)) {
-+            // CraftBukkit start - Teleport event
-+            boolean result;
-+            if (entity instanceof EntityPlayer player) {
-+                result = player.teleportTo(worldserver, d3, d4, d5, set, f4, f5, true, PlayerTeleportEvent.TeleportCause.COMMAND);
-+            } else {
-+                Location to = new Location(worldserver.getWorld(), d3, d4, d5, f4, f5);
-+                EntityTeleportEvent event = new EntityTeleportEvent(entity.getBukkitEntity(), entity.getBukkitEntity().getLocation(), to);
-+                worldserver.getCraftServer().getPluginManager().callEvent(event);
-+                if (event.isCancelled()) {
-+                    return;
-+                }
-+
-+                d3 = to.getX();
-+                d4 = to.getY();
-+                d5 = to.getZ();
-+                f4 = to.getYaw();
-+                f5 = to.getPitch();
-+                worldserver = ((CraftWorld) to.getWorld()).getHandle();
-+
-+                result = entity.teleportTo(worldserver, d3, d4, d5, set, f4, f5, true);
-+            }
-+
-+            if (result) {
-+                // CraftBukkit end
-                 if (lookat != null) {
-                     lookat.perform(commandlistenerwrapper, entity);
-                 }
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/CommandTime.patch b/paper-server/patches/sources/net/minecraft/server/commands/CommandTime.patch
deleted file mode 100644
index 6fd4ab8ae6..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/commands/CommandTime.patch
+++ /dev/null
@@ -1,56 +0,0 @@
---- a/net/minecraft/server/commands/CommandTime.java
-+++ b/net/minecraft/server/commands/CommandTime.java
-@@ -9,6 +9,11 @@
- import net.minecraft.network.chat.IChatBaseComponent;
- import net.minecraft.server.level.WorldServer;
- 
-+// CraftBukkit start
-+import org.bukkit.Bukkit;
-+import org.bukkit.event.world.TimeSkipEvent;
-+// CraftBukkit end
-+
- public class CommandTime {
- 
-     public CommandTime() {}
-@@ -49,12 +54,18 @@
-     }
- 
-     public static int setTime(CommandListenerWrapper commandlistenerwrapper, int i) {
--        Iterator iterator = commandlistenerwrapper.getServer().getAllLevels().iterator();
-+        Iterator iterator = com.google.common.collect.Iterators.singletonIterator(commandlistenerwrapper.getLevel()); // CraftBukkit - SPIGOT-6496: Only set the time for the world the command originates in
- 
-         while (iterator.hasNext()) {
-             WorldServer worldserver = (WorldServer) iterator.next();
- 
--            worldserver.setDayTime((long) i);
-+            // CraftBukkit start
-+            TimeSkipEvent event = new TimeSkipEvent(worldserver.getWorld(), TimeSkipEvent.SkipReason.COMMAND, i - worldserver.getDayTime());
-+            Bukkit.getPluginManager().callEvent(event);
-+            if (!event.isCancelled()) {
-+                worldserver.setDayTime((long) worldserver.getDayTime() + event.getSkipAmount());
-+            }
-+            // CraftBukkit end
-         }
- 
-         commandlistenerwrapper.getServer().forceTimeSynchronization();
-@@ -65,12 +76,18 @@
-     }
- 
-     public static int addTime(CommandListenerWrapper commandlistenerwrapper, int i) {
--        Iterator iterator = commandlistenerwrapper.getServer().getAllLevels().iterator();
-+        Iterator iterator = com.google.common.collect.Iterators.singletonIterator(commandlistenerwrapper.getLevel()); // CraftBukkit - SPIGOT-6496: Only set the time for the world the command originates in
- 
-         while (iterator.hasNext()) {
-             WorldServer worldserver = (WorldServer) iterator.next();
- 
--            worldserver.setDayTime(worldserver.getDayTime() + (long) i);
-+            // CraftBukkit start
-+            TimeSkipEvent event = new TimeSkipEvent(worldserver.getWorld(), TimeSkipEvent.SkipReason.COMMAND, i);
-+            Bukkit.getPluginManager().callEvent(event);
-+            if (!event.isCancelled()) {
-+                worldserver.setDayTime(worldserver.getDayTime() + event.getSkipAmount());
-+            }
-+            // CraftBukkit end
-         }
- 
-         commandlistenerwrapper.getServer().forceTimeSynchronization();
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/CommandWeather.patch b/paper-server/patches/sources/net/minecraft/server/commands/CommandWeather.patch
deleted file mode 100644
index 6e4499ce19..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/commands/CommandWeather.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- a/net/minecraft/server/commands/CommandWeather.java
-+++ b/net/minecraft/server/commands/CommandWeather.java
-@@ -34,11 +34,11 @@
-     }
- 
-     private static int getDuration(CommandListenerWrapper commandlistenerwrapper, int i, IntProvider intprovider) {
--        return i == -1 ? intprovider.sample(commandlistenerwrapper.getServer().overworld().getRandom()) : i;
-+        return i == -1 ? intprovider.sample(commandlistenerwrapper.getLevel().getRandom()) : i; // CraftBukkit - SPIGOT-7680: per-world
-     }
- 
-     private static int setClear(CommandListenerWrapper commandlistenerwrapper, int i) {
--        commandlistenerwrapper.getServer().overworld().setWeatherParameters(getDuration(commandlistenerwrapper, i, WorldServer.RAIN_DELAY), 0, false, false);
-+        commandlistenerwrapper.getLevel().setWeatherParameters(getDuration(commandlistenerwrapper, i, WorldServer.RAIN_DELAY), 0, false, false); // CraftBukkit - SPIGOT-7680: per-world
-         commandlistenerwrapper.sendSuccess(() -> {
-             return IChatBaseComponent.translatable("commands.weather.set.clear");
-         }, true);
-@@ -46,7 +46,7 @@
-     }
- 
-     private static int setRain(CommandListenerWrapper commandlistenerwrapper, int i) {
--        commandlistenerwrapper.getServer().overworld().setWeatherParameters(0, getDuration(commandlistenerwrapper, i, WorldServer.RAIN_DURATION), true, false);
-+        commandlistenerwrapper.getLevel().setWeatherParameters(0, getDuration(commandlistenerwrapper, i, WorldServer.RAIN_DURATION), true, false); // CraftBukkit - SPIGOT-7680: per-world
-         commandlistenerwrapper.sendSuccess(() -> {
-             return IChatBaseComponent.translatable("commands.weather.set.rain");
-         }, true);
-@@ -54,7 +54,7 @@
-     }
- 
-     private static int setThunder(CommandListenerWrapper commandlistenerwrapper, int i) {
--        commandlistenerwrapper.getServer().overworld().setWeatherParameters(0, getDuration(commandlistenerwrapper, i, WorldServer.THUNDER_DURATION), true, true);
-+        commandlistenerwrapper.getLevel().setWeatherParameters(0, getDuration(commandlistenerwrapper, i, WorldServer.THUNDER_DURATION), true, true); // CraftBukkit - SPIGOT-7680: per-world
-         commandlistenerwrapper.sendSuccess(() -> {
-             return IChatBaseComponent.translatable("commands.weather.set.thunder");
-         }, true);
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/CommandWorldBorder.patch b/paper-server/patches/sources/net/minecraft/server/commands/CommandWorldBorder.patch
deleted file mode 100644
index e21e3f8c38..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/commands/CommandWorldBorder.patch
+++ /dev/null
@@ -1,65 +0,0 @@
---- a/net/minecraft/server/commands/CommandWorldBorder.java
-+++ b/net/minecraft/server/commands/CommandWorldBorder.java
-@@ -57,7 +57,7 @@
-     }
- 
-     private static int setDamageBuffer(CommandListenerWrapper commandlistenerwrapper, float f) throws CommandSyntaxException {
--        WorldBorder worldborder = commandlistenerwrapper.getServer().overworld().getWorldBorder();
-+        WorldBorder worldborder = commandlistenerwrapper.getLevel().getWorldBorder(); // CraftBukkit
- 
-         if (worldborder.getDamageSafeZone() == (double) f) {
-             throw CommandWorldBorder.ERROR_SAME_DAMAGE_BUFFER.create();
-@@ -71,7 +71,7 @@
-     }
- 
-     private static int setDamageAmount(CommandListenerWrapper commandlistenerwrapper, float f) throws CommandSyntaxException {
--        WorldBorder worldborder = commandlistenerwrapper.getServer().overworld().getWorldBorder();
-+        WorldBorder worldborder = commandlistenerwrapper.getLevel().getWorldBorder(); // CraftBukkit
- 
-         if (worldborder.getDamagePerBlock() == (double) f) {
-             throw CommandWorldBorder.ERROR_SAME_DAMAGE_AMOUNT.create();
-@@ -85,7 +85,7 @@
-     }
- 
-     private static int setWarningTime(CommandListenerWrapper commandlistenerwrapper, int i) throws CommandSyntaxException {
--        WorldBorder worldborder = commandlistenerwrapper.getServer().overworld().getWorldBorder();
-+        WorldBorder worldborder = commandlistenerwrapper.getLevel().getWorldBorder(); // CraftBukkit
- 
-         if (worldborder.getWarningTime() == i) {
-             throw CommandWorldBorder.ERROR_SAME_WARNING_TIME.create();
-@@ -99,7 +99,7 @@
-     }
- 
-     private static int setWarningDistance(CommandListenerWrapper commandlistenerwrapper, int i) throws CommandSyntaxException {
--        WorldBorder worldborder = commandlistenerwrapper.getServer().overworld().getWorldBorder();
-+        WorldBorder worldborder = commandlistenerwrapper.getLevel().getWorldBorder(); // CraftBukkit
- 
-         if (worldborder.getWarningBlocks() == i) {
-             throw CommandWorldBorder.ERROR_SAME_WARNING_DISTANCE.create();
-@@ -113,7 +113,7 @@
-     }
- 
-     private static int getSize(CommandListenerWrapper commandlistenerwrapper) {
--        double d0 = commandlistenerwrapper.getServer().overworld().getWorldBorder().getSize();
-+        double d0 = commandlistenerwrapper.getLevel().getWorldBorder().getSize(); // CraftBukkit
- 
-         commandlistenerwrapper.sendSuccess(() -> {
-             return IChatBaseComponent.translatable("commands.worldborder.get", String.format(Locale.ROOT, "%.0f", d0));
-@@ -122,7 +122,7 @@
-     }
- 
-     private static int setCenter(CommandListenerWrapper commandlistenerwrapper, Vec2F vec2f) throws CommandSyntaxException {
--        WorldBorder worldborder = commandlistenerwrapper.getServer().overworld().getWorldBorder();
-+        WorldBorder worldborder = commandlistenerwrapper.getLevel().getWorldBorder(); // CraftBukkit
- 
-         if (worldborder.getCenterX() == (double) vec2f.x && worldborder.getCenterZ() == (double) vec2f.y) {
-             throw CommandWorldBorder.ERROR_SAME_CENTER.create();
-@@ -138,7 +138,7 @@
-     }
- 
-     private static int setSize(CommandListenerWrapper commandlistenerwrapper, double d0, long i) throws CommandSyntaxException {
--        WorldBorder worldborder = commandlistenerwrapper.getServer().overworld().getWorldBorder();
-+        WorldBorder worldborder = commandlistenerwrapper.getLevel().getWorldBorder(); // CraftBukkit
-         double d1 = worldborder.getSize();
- 
-         if (d1 == d0) {
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/DifficultyCommand.java.patch b/paper-server/patches/sources/net/minecraft/server/commands/DifficultyCommand.java.patch
new file mode 100644
index 0000000000..2dc65ce607
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/commands/DifficultyCommand.java.patch
@@ -0,0 +1,17 @@
+--- a/net/minecraft/server/commands/DifficultyCommand.java
++++ b/net/minecraft/server/commands/DifficultyCommand.java
+@@ -44,11 +44,12 @@
+ 
+     public static int setDifficulty(CommandSourceStack source, Difficulty difficulty) throws CommandSyntaxException {
+         MinecraftServer minecraftserver = source.getServer();
++        net.minecraft.server.level.ServerLevel worldServer = source.getLevel(); // CraftBukkit
+ 
+-        if (minecraftserver.getWorldData().getDifficulty() == difficulty) {
++        if (worldServer.getDifficulty() == difficulty) { // CraftBukkit
+             throw DifficultyCommand.ERROR_ALREADY_DIFFICULT.create(difficulty.getKey());
+         } else {
+-            minecraftserver.setDifficulty(difficulty, true);
++            worldServer.serverLevelData.setDifficulty(difficulty); // CraftBukkit
+             source.sendSuccess(() -> {
+                 return Component.translatable("commands.difficulty.success", difficulty.getDisplayName());
+             }, true);
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/EffectCommands.java.patch b/paper-server/patches/sources/net/minecraft/server/commands/EffectCommands.java.patch
new file mode 100644
index 0000000000..94c98f3597
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/commands/EffectCommands.java.patch
@@ -0,0 +1,29 @@
+--- a/net/minecraft/server/commands/EffectCommands.java
++++ b/net/minecraft/server/commands/EffectCommands.java
+@@ -84,7 +84,7 @@
+             if (entity instanceof LivingEntity) {
+                 MobEffectInstance mobeffect = new MobEffectInstance(statusEffect, k, amplifier, false, showParticles);
+ 
+-                if (((LivingEntity) entity).addEffect(mobeffect, source.getEntity())) {
++                if (((LivingEntity) entity).addEffect(mobeffect, source.getEntity(), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.COMMAND)) { // CraftBukkit
+                     ++j;
+                 }
+             }
+@@ -114,7 +114,7 @@
+         while (iterator.hasNext()) {
+             Entity entity = (Entity) iterator.next();
+ 
+-            if (entity instanceof LivingEntity && ((LivingEntity) entity).removeAllEffects()) {
++            if (entity instanceof LivingEntity && ((LivingEntity) entity).removeAllEffects(org.bukkit.event.entity.EntityPotionEffectEvent.Cause.COMMAND)) { // CraftBukkit
+                 ++i;
+             }
+         }
+@@ -144,7 +144,7 @@
+         while (iterator.hasNext()) {
+             Entity entity = (Entity) iterator.next();
+ 
+-            if (entity instanceof LivingEntity && ((LivingEntity) entity).removeEffect(statusEffect)) {
++            if (entity instanceof LivingEntity && ((LivingEntity) entity).removeEffect(statusEffect, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.COMMAND)) { // CraftBukkit
+                 ++i;
+             }
+         }
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/GameRuleCommand.java.patch b/paper-server/patches/sources/net/minecraft/server/commands/GameRuleCommand.java.patch
new file mode 100644
index 0000000000..e36706662a
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/commands/GameRuleCommand.java.patch
@@ -0,0 +1,20 @@
+--- a/net/minecraft/server/commands/GameRuleCommand.java
++++ b/net/minecraft/server/commands/GameRuleCommand.java
+@@ -34,7 +34,7 @@
+ 
+     static <T extends GameRules.Value<T>> int setRule(CommandContext<CommandSourceStack> context, GameRules.Key<T> key) {
+         CommandSourceStack commandlistenerwrapper = (CommandSourceStack) context.getSource();
+-        T t0 = commandlistenerwrapper.getServer().getGameRules().getRule(key);
++        T t0 = commandlistenerwrapper.getLevel().getGameRules().getRule(key); // CraftBukkit
+ 
+         t0.setFromArgument(context, "value");
+         commandlistenerwrapper.sendSuccess(() -> {
+@@ -44,7 +44,7 @@
+     }
+ 
+     static <T extends GameRules.Value<T>> int queryRule(CommandSourceStack source, GameRules.Key<T> key) {
+-        T t0 = source.getServer().getGameRules().getRule(key);
++        T t0 = source.getLevel().getGameRules().getRule(key); // CraftBukkit
+ 
+         source.sendSuccess(() -> {
+             return Component.translatable("commands.gamerule.query", key.getId(), t0.toString());
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/CommandGive.patch b/paper-server/patches/sources/net/minecraft/server/commands/GiveCommand.java.patch
similarity index 74%
rename from paper-server/patches/sources/net/minecraft/server/commands/CommandGive.patch
rename to paper-server/patches/sources/net/minecraft/server/commands/GiveCommand.java.patch
index bf774c373b..fb01d221b4 100644
--- a/paper-server/patches/sources/net/minecraft/server/commands/CommandGive.patch
+++ b/paper-server/patches/sources/net/minecraft/server/commands/GiveCommand.java.patch
@@ -1,7 +1,7 @@
---- a/net/minecraft/server/commands/CommandGive.java
-+++ b/net/minecraft/server/commands/CommandGive.java
+--- a/net/minecraft/server/commands/GiveCommand.java
++++ b/net/minecraft/server/commands/GiveCommand.java
 @@ -60,7 +60,7 @@
-                     EntityItem entityitem;
+                     ItemEntity entityitem;
  
                      if (flag && itemstack1.isEmpty()) {
 -                        entityitem = entityplayer.drop(itemstack, false);
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/ListPlayersCommand.java.patch b/paper-server/patches/sources/net/minecraft/server/commands/ListPlayersCommand.java.patch
new file mode 100644
index 0000000000..93aec260e3
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/commands/ListPlayersCommand.java.patch
@@ -0,0 +1,18 @@
+--- a/net/minecraft/server/commands/ListPlayersCommand.java
++++ b/net/minecraft/server/commands/ListPlayersCommand.java
+@@ -35,7 +35,14 @@
+ 
+     private static int format(CommandSourceStack source, Function<ServerPlayer, Component> nameProvider) {
+         PlayerList playerlist = source.getServer().getPlayerList();
+-        List<ServerPlayer> list = playerlist.getPlayers();
++        // CraftBukkit start
++        List<ServerPlayer> players = playerlist.getPlayers();
++        if (source.getBukkitSender() instanceof org.bukkit.entity.Player) {
++            org.bukkit.entity.Player sender = (org.bukkit.entity.Player) source.getBukkitSender();
++            players = players.stream().filter((ep) -> sender.canSee(ep.getBukkitEntity())).collect(java.util.stream.Collectors.toList());
++        }
++        List<ServerPlayer> list = players;
++        // CraftBukkit end
+         Component ichatbasecomponent = ComponentUtils.formatList(list, nameProvider);
+ 
+         source.sendSuccess(() -> {
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/LootCommand.java.patch b/paper-server/patches/sources/net/minecraft/server/commands/LootCommand.java.patch
new file mode 100644
index 0000000000..c579471341
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/commands/LootCommand.java.patch
@@ -0,0 +1,19 @@
+--- a/net/minecraft/server/commands/LootCommand.java
++++ b/net/minecraft/server/commands/LootCommand.java
+@@ -95,7 +95,7 @@
+     }
+ 
+     private static <T extends ArgumentBuilder<CommandSourceStack, T>> T addTargets(T rootArgument, LootCommand.TailProvider sourceConstructor) {
+-        return rootArgument.then(((LiteralArgumentBuilder) net.minecraft.commands.Commands.literal("replace").then(net.minecraft.commands.Commands.literal("entity").then(net.minecraft.commands.Commands.argument("entities", EntityArgument.entities()).then(sourceConstructor.construct(net.minecraft.commands.Commands.argument("slot", SlotArgument.slot()), (commandcontext, list, commandloot_a) -> {
++        return (T) rootArgument.then(((LiteralArgumentBuilder) net.minecraft.commands.Commands.literal("replace").then(net.minecraft.commands.Commands.literal("entity").then(net.minecraft.commands.Commands.argument("entities", EntityArgument.entities()).then(sourceConstructor.construct(net.minecraft.commands.Commands.argument("slot", SlotArgument.slot()), (commandcontext, list, commandloot_a) -> { // CraftBukkit - decompile error
+             return LootCommand.entityReplace(EntityArgument.getEntities(commandcontext, "entities"), SlotArgument.getSlot(commandcontext, "slot"), list.size(), list, commandloot_a);
+         }).then(sourceConstructor.construct(net.minecraft.commands.Commands.argument("count", IntegerArgumentType.integer(0)), (commandcontext, list, commandloot_a) -> {
+             return LootCommand.entityReplace(EntityArgument.getEntities(commandcontext, "entities"), SlotArgument.getSlot(commandcontext, "slot"), IntegerArgumentType.getInteger(commandcontext, "count"), list, commandloot_a);
+@@ -250,6 +250,7 @@
+     private static int dropInWorld(CommandSourceStack source, Vec3 pos, List<ItemStack> stacks, LootCommand.Callback messageSender) throws CommandSyntaxException {
+         ServerLevel worldserver = source.getLevel();
+ 
++        stacks.removeIf(ItemStack::isEmpty); // CraftBukkit - SPIGOT-6959 Remove empty items for avoid throw an error in new EntityItem
+         stacks.forEach((itemstack) -> {
+             ItemEntity entityitem = new ItemEntity(worldserver, pos.x, pos.y, pos.z, itemstack.copy());
+ 
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/PlaceCommand.java.patch b/paper-server/patches/sources/net/minecraft/server/commands/PlaceCommand.java.patch
new file mode 100644
index 0000000000..1c1e4cacb4
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/commands/PlaceCommand.java.patch
@@ -0,0 +1,10 @@
+--- a/net/minecraft/server/commands/PlaceCommand.java
++++ b/net/minecraft/server/commands/PlaceCommand.java
+@@ -132,6 +132,7 @@
+         if (!structurestart.isValid()) {
+             throw PlaceCommand.ERROR_STRUCTURE_FAILED.create();
+         } else {
++            structurestart.generationEventCause = org.bukkit.event.world.AsyncStructureGenerateEvent.Cause.COMMAND; // CraftBukkit - set AsyncStructureGenerateEvent.Cause.COMMAND as generation cause
+             BoundingBox structureboundingbox = structurestart.getBoundingBox();
+             ChunkPos chunkcoordintpair = new ChunkPos(SectionPos.blockToSectionCoord(structureboundingbox.minX()), SectionPos.blockToSectionCoord(structureboundingbox.minZ()));
+             ChunkPos chunkcoordintpair1 = new ChunkPos(SectionPos.blockToSectionCoord(structureboundingbox.maxX()), SectionPos.blockToSectionCoord(structureboundingbox.maxZ()));
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/PlaceCommand.patch b/paper-server/patches/sources/net/minecraft/server/commands/PlaceCommand.patch
deleted file mode 100644
index 61c08f6c46..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/commands/PlaceCommand.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/net/minecraft/server/commands/PlaceCommand.java
-+++ b/net/minecraft/server/commands/PlaceCommand.java
-@@ -132,6 +132,7 @@
-         if (!structurestart.isValid()) {
-             throw PlaceCommand.ERROR_STRUCTURE_FAILED.create();
-         } else {
-+            structurestart.generationEventCause = org.bukkit.event.world.AsyncStructureGenerateEvent.Cause.COMMAND; // CraftBukkit - set AsyncStructureGenerateEvent.Cause.COMMAND as generation cause
-             StructureBoundingBox structureboundingbox = structurestart.getBoundingBox();
-             ChunkCoordIntPair chunkcoordintpair = new ChunkCoordIntPair(SectionPosition.blockToSectionCoord(structureboundingbox.minX()), SectionPosition.blockToSectionCoord(structureboundingbox.minZ()));
-             ChunkCoordIntPair chunkcoordintpair1 = new ChunkCoordIntPair(SectionPosition.blockToSectionCoord(structureboundingbox.maxX()), SectionPosition.blockToSectionCoord(structureboundingbox.maxZ()));
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/ReloadCommand.java.patch b/paper-server/patches/sources/net/minecraft/server/commands/ReloadCommand.java.patch
new file mode 100644
index 0000000000..414f698fea
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/commands/ReloadCommand.java.patch
@@ -0,0 +1,19 @@
+--- a/net/minecraft/server/commands/ReloadCommand.java
++++ b/net/minecraft/server/commands/ReloadCommand.java
+@@ -44,6 +44,16 @@
+         return collection1;
+     }
+ 
++    // CraftBukkit start
++    public static void reload(MinecraftServer minecraftserver) {
++        PackRepository resourcepackrepository = minecraftserver.getPackRepository();
++        WorldData savedata = minecraftserver.getWorldData();
++        Collection<String> collection = resourcepackrepository.getSelectedIds();
++        Collection<String> collection1 = ReloadCommand.discoverNewPacks(resourcepackrepository, savedata, collection);
++        minecraftserver.reloadResources(collection1);
++    }
++    // CraftBukkit end
++
+     public static void register(CommandDispatcher<CommandSourceStack> dispatcher) {
+         dispatcher.register((LiteralArgumentBuilder) ((LiteralArgumentBuilder) net.minecraft.commands.Commands.literal("reload").requires((commandlistenerwrapper) -> {
+             return commandlistenerwrapper.hasPermission(2);
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/ScheduleCommand.java.patch b/paper-server/patches/sources/net/minecraft/server/commands/ScheduleCommand.java.patch
new file mode 100644
index 0000000000..686b6c5886
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/commands/ScheduleCommand.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/server/commands/ScheduleCommand.java
++++ b/net/minecraft/server/commands/ScheduleCommand.java
+@@ -58,7 +58,7 @@
+         } else {
+             long j = source.getLevel().getGameTime() + (long) time;
+             ResourceLocation minecraftkey = (ResourceLocation) function.getFirst();
+-            TimerQueue<MinecraftServer> customfunctioncallbacktimerqueue = source.getServer().getWorldData().overworldData().getScheduledEvents();
++            TimerQueue<MinecraftServer> customfunctioncallbacktimerqueue = source.getLevel().serverLevelData.overworldData().getScheduledEvents(); // CraftBukkit - SPIGOT-6667: Use world specific function timer
+             Optional<net.minecraft.commands.functions.CommandFunction<CommandSourceStack>> optional = ((Either) function.getSecond()).left();
+             String s;
+ 
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/SetSpawnCommand.java.patch b/paper-server/patches/sources/net/minecraft/server/commands/SetSpawnCommand.java.patch
new file mode 100644
index 0000000000..625935787c
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/commands/SetSpawnCommand.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/server/commands/SetSpawnCommand.java
++++ b/net/minecraft/server/commands/SetSpawnCommand.java
+@@ -41,7 +41,7 @@
+         while (iterator.hasNext()) {
+             ServerPlayer entityplayer = (ServerPlayer) iterator.next();
+ 
+-            entityplayer.setRespawnPosition(resourcekey, pos, angle, true, false);
++            entityplayer.setRespawnPosition(resourcekey, pos, angle, true, false, org.bukkit.event.player.PlayerSpawnChangeEvent.Cause.COMMAND); // CraftBukkit
+         }
+ 
+         String s = resourcekey.location().toString();
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/SetWorldSpawnCommand.java.patch b/paper-server/patches/sources/net/minecraft/server/commands/SetWorldSpawnCommand.java.patch
new file mode 100644
index 0000000000..5e3b2e9493
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/commands/SetWorldSpawnCommand.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/server/commands/SetWorldSpawnCommand.java
++++ b/net/minecraft/server/commands/SetWorldSpawnCommand.java
+@@ -30,7 +30,7 @@
+     private static int setSpawn(CommandSourceStack source, BlockPos pos, float angle) {
+         ServerLevel worldserver = source.getLevel();
+ 
+-        if (worldserver.dimension() != Level.OVERWORLD) {
++        if (false && worldserver.dimension() != Level.OVERWORLD) { // CraftBukkit - SPIGOT-7649: allow in all worlds
+             source.sendFailure(Component.translatable("commands.setworldspawn.failure.not_overworld"));
+             return 0;
+         } else {
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/SpreadPlayersCommand.java.patch b/paper-server/patches/sources/net/minecraft/server/commands/SpreadPlayersCommand.java.patch
new file mode 100644
index 0000000000..1827c81c69
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/commands/SpreadPlayersCommand.java.patch
@@ -0,0 +1,20 @@
+--- a/net/minecraft/server/commands/SpreadPlayersCommand.java
++++ b/net/minecraft/server/commands/SpreadPlayersCommand.java
+@@ -93,7 +93,7 @@
+             if (entity instanceof Player) {
+                 set.add(entity.getTeam());
+             } else {
+-                set.add((Object) null);
++                set.add((Team) null); // CraftBukkit - decompile error
+             }
+         }
+ 
+@@ -203,7 +203,7 @@
+                 commandspreadplayers_a = piles[j++];
+             }
+ 
+-            entity.teleportTo(world, (double) Mth.floor(commandspreadplayers_a.x) + 0.5D, (double) commandspreadplayers_a.getSpawnY(world, maxY), (double) Mth.floor(commandspreadplayers_a.z) + 0.5D, Set.of(), entity.getYRot(), entity.getXRot(), true);
++            entity.teleportTo(world, (double) Mth.floor(commandspreadplayers_a.x) + 0.5D, (double) commandspreadplayers_a.getSpawnY(world, maxY), (double) Mth.floor(commandspreadplayers_a.z) + 0.5D, Set.of(), entity.getYRot(), entity.getXRot(), true, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.COMMAND); // CraftBukkit - handle teleport reason
+             d1 = Double.MAX_VALUE;
+             SpreadPlayersCommand.Position[] acommandspreadplayers_a1 = piles;
+             int k = piles.length;
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/SummonCommand.java.patch b/paper-server/patches/sources/net/minecraft/server/commands/SummonCommand.java.patch
new file mode 100644
index 0000000000..8a1124cf96
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/commands/SummonCommand.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/server/commands/SummonCommand.java
++++ b/net/minecraft/server/commands/SummonCommand.java
+@@ -67,7 +67,7 @@
+                     ((Mob) entity).finalizeSpawn(source.getLevel(), source.getLevel().getCurrentDifficultyAt(entity.blockPosition()), EntitySpawnReason.COMMAND, (SpawnGroupData) null);
+                 }
+ 
+-                if (!worldserver.tryAddFreshEntityWithPassengers(entity)) {
++                if (!worldserver.tryAddFreshEntityWithPassengers(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.COMMAND)) { // CraftBukkit - pass a spawn reason of "COMMAND"
+                     throw SummonCommand.ERROR_DUPLICATE_UUID.create();
+                 } else {
+                     return entity;
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/TeleportCommand.java.patch b/paper-server/patches/sources/net/minecraft/server/commands/TeleportCommand.java.patch
new file mode 100644
index 0000000000..dfbc293e60
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/commands/TeleportCommand.java.patch
@@ -0,0 +1,54 @@
+--- a/net/minecraft/server/commands/TeleportCommand.java
++++ b/net/minecraft/server/commands/TeleportCommand.java
+@@ -22,6 +22,7 @@
+ import net.minecraft.core.BlockPos;
+ import net.minecraft.network.chat.Component;
+ import net.minecraft.server.level.ServerLevel;
++import net.minecraft.server.level.ServerPlayer;
+ import net.minecraft.util.Mth;
+ import net.minecraft.world.entity.Entity;
+ import net.minecraft.world.entity.LivingEntity;
+@@ -30,6 +31,11 @@
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.phys.Vec2;
+ import net.minecraft.world.phys.Vec3;
++import org.bukkit.Location;
++import org.bukkit.craftbukkit.CraftWorld;
++import org.bukkit.event.entity.EntityTeleportEvent;
++import org.bukkit.event.player.PlayerTeleportEvent;
++// CraftBukkit end
+ 
+ public class TeleportCommand {
+ 
+@@ -167,7 +173,30 @@
+             float f4 = Mth.wrapDegrees(f2);
+             float f5 = Mth.wrapDegrees(f3);
+ 
+-            if (target.teleportTo(world, d3, d4, d5, movementFlags, f4, f5, true)) {
++            // CraftBukkit start - Teleport event
++            boolean result;
++            if (target instanceof ServerPlayer player) {
++                result = player.teleportTo(world, d3, d4, d5, movementFlags, f4, f5, true, PlayerTeleportEvent.TeleportCause.COMMAND);
++            } else {
++                Location to = new Location(world.getWorld(), d3, d4, d5, f4, f5);
++                EntityTeleportEvent event = new EntityTeleportEvent(target.getBukkitEntity(), target.getBukkitEntity().getLocation(), to);
++                world.getCraftServer().getPluginManager().callEvent(event);
++                if (event.isCancelled()) {
++                    return;
++                }
++
++                d3 = to.getX();
++                d4 = to.getY();
++                d5 = to.getZ();
++                f4 = to.getYaw();
++                f5 = to.getPitch();
++                world = ((CraftWorld) to.getWorld()).getHandle();
++
++                result = target.teleportTo(world, d3, d4, d5, movementFlags, f4, f5, true);
++            }
++
++            if (result) {
++                // CraftBukkit end
+                 if (facingLocation != null) {
+                     facingLocation.perform(source, target);
+                 }
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/TimeCommand.java.patch b/paper-server/patches/sources/net/minecraft/server/commands/TimeCommand.java.patch
new file mode 100644
index 0000000000..ea80723824
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/commands/TimeCommand.java.patch
@@ -0,0 +1,55 @@
+--- a/net/minecraft/server/commands/TimeCommand.java
++++ b/net/minecraft/server/commands/TimeCommand.java
+@@ -8,6 +8,10 @@
+ import net.minecraft.commands.arguments.TimeArgument;
+ import net.minecraft.network.chat.Component;
+ import net.minecraft.server.level.ServerLevel;
++// CraftBukkit start
++import org.bukkit.Bukkit;
++import org.bukkit.event.world.TimeSkipEvent;
++// CraftBukkit end
+ 
+ public class TimeCommand {
+ 
+@@ -49,12 +53,18 @@
+     }
+ 
+     public static int setTime(CommandSourceStack source, int time) {
+-        Iterator iterator = source.getServer().getAllLevels().iterator();
++        Iterator iterator = com.google.common.collect.Iterators.singletonIterator(source.getLevel()); // CraftBukkit - SPIGOT-6496: Only set the time for the world the command originates in
+ 
+         while (iterator.hasNext()) {
+             ServerLevel worldserver = (ServerLevel) iterator.next();
+ 
+-            worldserver.setDayTime((long) time);
++            // CraftBukkit start
++            TimeSkipEvent event = new TimeSkipEvent(worldserver.getWorld(), TimeSkipEvent.SkipReason.COMMAND, time - worldserver.getDayTime());
++            Bukkit.getPluginManager().callEvent(event);
++            if (!event.isCancelled()) {
++                worldserver.setDayTime((long) worldserver.getDayTime() + event.getSkipAmount());
++            }
++            // CraftBukkit end
+         }
+ 
+         source.getServer().forceTimeSynchronization();
+@@ -65,12 +75,18 @@
+     }
+ 
+     public static int addTime(CommandSourceStack source, int time) {
+-        Iterator iterator = source.getServer().getAllLevels().iterator();
++        Iterator iterator = com.google.common.collect.Iterators.singletonIterator(source.getLevel()); // CraftBukkit - SPIGOT-6496: Only set the time for the world the command originates in
+ 
+         while (iterator.hasNext()) {
+             ServerLevel worldserver = (ServerLevel) iterator.next();
+ 
+-            worldserver.setDayTime(worldserver.getDayTime() + (long) time);
++            // CraftBukkit start
++            TimeSkipEvent event = new TimeSkipEvent(worldserver.getWorld(), TimeSkipEvent.SkipReason.COMMAND, time);
++            Bukkit.getPluginManager().callEvent(event);
++            if (!event.isCancelled()) {
++                worldserver.setDayTime(worldserver.getDayTime() + event.getSkipAmount());
++            }
++            // CraftBukkit end
+         }
+ 
+         source.getServer().forceTimeSynchronization();
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/WeatherCommand.java.patch b/paper-server/patches/sources/net/minecraft/server/commands/WeatherCommand.java.patch
new file mode 100644
index 0000000000..2f916fdf48
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/commands/WeatherCommand.java.patch
@@ -0,0 +1,34 @@
+--- a/net/minecraft/server/commands/WeatherCommand.java
++++ b/net/minecraft/server/commands/WeatherCommand.java
+@@ -34,11 +34,11 @@
+     }
+ 
+     private static int getDuration(CommandSourceStack source, int duration, IntProvider provider) {
+-        return duration == -1 ? provider.sample(source.getServer().overworld().getRandom()) : duration;
++        return duration == -1 ? provider.sample(source.getLevel().getRandom()) : duration; // CraftBukkit - SPIGOT-7680: per-world
+     }
+ 
+     private static int setClear(CommandSourceStack source, int duration) {
+-        source.getServer().overworld().setWeatherParameters(WeatherCommand.getDuration(source, duration, ServerLevel.RAIN_DELAY), 0, false, false);
++        source.getLevel().setWeatherParameters(WeatherCommand.getDuration(source, duration, ServerLevel.RAIN_DELAY), 0, false, false); // CraftBukkit - SPIGOT-7680: per-world
+         source.sendSuccess(() -> {
+             return Component.translatable("commands.weather.set.clear");
+         }, true);
+@@ -46,7 +46,7 @@
+     }
+ 
+     private static int setRain(CommandSourceStack source, int duration) {
+-        source.getServer().overworld().setWeatherParameters(0, WeatherCommand.getDuration(source, duration, ServerLevel.RAIN_DURATION), true, false);
++        source.getLevel().setWeatherParameters(0, WeatherCommand.getDuration(source, duration, ServerLevel.RAIN_DURATION), true, false); // CraftBukkit - SPIGOT-7680: per-world
+         source.sendSuccess(() -> {
+             return Component.translatable("commands.weather.set.rain");
+         }, true);
+@@ -54,7 +54,7 @@
+     }
+ 
+     private static int setThunder(CommandSourceStack source, int duration) {
+-        source.getServer().overworld().setWeatherParameters(0, WeatherCommand.getDuration(source, duration, ServerLevel.THUNDER_DURATION), true, true);
++        source.getLevel().setWeatherParameters(0, WeatherCommand.getDuration(source, duration, ServerLevel.THUNDER_DURATION), true, true); // CraftBukkit - SPIGOT-7680: per-world
+         source.sendSuccess(() -> {
+             return Component.translatable("commands.weather.set.thunder");
+         }, true);
diff --git a/paper-server/patches/sources/net/minecraft/server/commands/WorldBorderCommand.java.patch b/paper-server/patches/sources/net/minecraft/server/commands/WorldBorderCommand.java.patch
new file mode 100644
index 0000000000..d64cdd2c7d
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/commands/WorldBorderCommand.java.patch
@@ -0,0 +1,65 @@
+--- a/net/minecraft/server/commands/WorldBorderCommand.java
++++ b/net/minecraft/server/commands/WorldBorderCommand.java
+@@ -57,7 +57,7 @@
+     }
+ 
+     private static int setDamageBuffer(CommandSourceStack source, float distance) throws CommandSyntaxException {
+-        WorldBorder worldborder = source.getServer().overworld().getWorldBorder();
++        WorldBorder worldborder = source.getLevel().getWorldBorder(); // CraftBukkit
+ 
+         if (worldborder.getDamageSafeZone() == (double) distance) {
+             throw WorldBorderCommand.ERROR_SAME_DAMAGE_BUFFER.create();
+@@ -71,7 +71,7 @@
+     }
+ 
+     private static int setDamageAmount(CommandSourceStack source, float damagePerBlock) throws CommandSyntaxException {
+-        WorldBorder worldborder = source.getServer().overworld().getWorldBorder();
++        WorldBorder worldborder = source.getLevel().getWorldBorder(); // CraftBukkit
+ 
+         if (worldborder.getDamagePerBlock() == (double) damagePerBlock) {
+             throw WorldBorderCommand.ERROR_SAME_DAMAGE_AMOUNT.create();
+@@ -85,7 +85,7 @@
+     }
+ 
+     private static int setWarningTime(CommandSourceStack source, int time) throws CommandSyntaxException {
+-        WorldBorder worldborder = source.getServer().overworld().getWorldBorder();
++        WorldBorder worldborder = source.getLevel().getWorldBorder(); // CraftBukkit
+ 
+         if (worldborder.getWarningTime() == time) {
+             throw WorldBorderCommand.ERROR_SAME_WARNING_TIME.create();
+@@ -99,7 +99,7 @@
+     }
+ 
+     private static int setWarningDistance(CommandSourceStack source, int distance) throws CommandSyntaxException {
+-        WorldBorder worldborder = source.getServer().overworld().getWorldBorder();
++        WorldBorder worldborder = source.getLevel().getWorldBorder(); // CraftBukkit
+ 
+         if (worldborder.getWarningBlocks() == distance) {
+             throw WorldBorderCommand.ERROR_SAME_WARNING_DISTANCE.create();
+@@ -113,7 +113,7 @@
+     }
+ 
+     private static int getSize(CommandSourceStack source) {
+-        double d0 = source.getServer().overworld().getWorldBorder().getSize();
++        double d0 = source.getLevel().getWorldBorder().getSize(); // CraftBukkit
+ 
+         source.sendSuccess(() -> {
+             return Component.translatable("commands.worldborder.get", String.format(Locale.ROOT, "%.0f", d0));
+@@ -122,7 +122,7 @@
+     }
+ 
+     private static int setCenter(CommandSourceStack source, Vec2 pos) throws CommandSyntaxException {
+-        WorldBorder worldborder = source.getServer().overworld().getWorldBorder();
++        WorldBorder worldborder = source.getLevel().getWorldBorder(); // CraftBukkit
+ 
+         if (worldborder.getCenterX() == (double) pos.x && worldborder.getCenterZ() == (double) pos.y) {
+             throw WorldBorderCommand.ERROR_SAME_CENTER.create();
+@@ -138,7 +138,7 @@
+     }
+ 
+     private static int setSize(CommandSourceStack source, double distance, long time) throws CommandSyntaxException {
+-        WorldBorder worldborder = source.getServer().overworld().getWorldBorder();
++        WorldBorder worldborder = source.getLevel().getWorldBorder(); // CraftBukkit
+         double d1 = worldborder.getSize();
+ 
+         if (d1 == distance) {
diff --git a/paper-server/patches/sources/net/minecraft/server/dedicated/DedicatedServer.patch b/paper-server/patches/sources/net/minecraft/server/dedicated/DedicatedServer.java.patch
similarity index 64%
rename from paper-server/patches/sources/net/minecraft/server/dedicated/DedicatedServer.patch
rename to paper-server/patches/sources/net/minecraft/server/dedicated/DedicatedServer.java.patch
index 2b0e239702..e7f2701e07 100644
--- a/paper-server/patches/sources/net/minecraft/server/dedicated/DedicatedServer.patch
+++ b/paper-server/patches/sources/net/minecraft/server/dedicated/DedicatedServer.java.patch
@@ -1,7 +1,12 @@
 --- a/net/minecraft/server/dedicated/DedicatedServer.java
 +++ b/net/minecraft/server/dedicated/DedicatedServer.java
-@@ -59,6 +59,18 @@
- import net.minecraft.world.level.storage.Convertable;
+@@ -54,11 +54,22 @@
+ import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.level.GameRules;
+ import net.minecraft.world.level.GameType;
+-import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.block.entity.SkullBlockEntity;
+ import net.minecraft.world.level.storage.LevelStorageSource;
  import org.slf4j.Logger;
  
 +// CraftBukkit start
@@ -16,35 +21,39 @@
 +import org.bukkit.event.server.RemoteServerCommandEvent;
 +// CraftBukkit end
 +
- public class DedicatedServer extends MinecraftServer implements IMinecraftServer {
+ public class DedicatedServer extends MinecraftServer implements ServerInterface {
  
      static final Logger LOGGER = LogUtils.getLogger();
-@@ -67,7 +79,7 @@
-     private final List<ServerCommand> consoleInput = Collections.synchronizedList(Lists.newArrayList());
+@@ -67,7 +78,7 @@
+     private final List<ConsoleInput> consoleInput = Collections.synchronizedList(Lists.newArrayList());
      @Nullable
-     private RemoteStatusListener queryThreadGs4;
--    private final RemoteControlCommandListener rconConsoleSource;
+     private QueryThreadGs4 queryThreadGs4;
+-    private final RconConsoleSource rconConsoleSource;
 +    // private final RemoteControlCommandListener rconConsoleSource; // CraftBukkit - remove field
      @Nullable
-     private RemoteControlListener rconThread;
+     private RconThread rconThread;
      public DedicatedServerSettings settings;
-@@ -81,10 +93,12 @@
+@@ -81,25 +92,58 @@
      private DebugSampleSubscriptionTracker debugSampleSubscriptionTracker;
      public ServerLinks serverLinks;
  
--    public DedicatedServer(Thread thread, Convertable.ConversionSession convertable_conversionsession, ResourcePackRepository resourcepackrepository, WorldStem worldstem, DedicatedServerSettings dedicatedserversettings, DataFixer datafixer, Services services, WorldLoadListenerFactory worldloadlistenerfactory) {
--        super(thread, convertable_conversionsession, resourcepackrepository, worldstem, Proxy.NO_PROXY, datafixer, services, worldloadlistenerfactory);
+-    public DedicatedServer(Thread serverThread, LevelStorageSource.LevelStorageAccess session, PackRepository dataPackManager, WorldStem saveLoader, DedicatedServerSettings propertiesLoader, DataFixer dataFixer, Services apiServices, ChunkProgressListenerFactory worldGenerationProgressListenerFactory) {
+-        super(serverThread, session, dataPackManager, saveLoader, Proxy.NO_PROXY, dataFixer, apiServices, worldGenerationProgressListenerFactory);
+-        this.settings = propertiesLoader;
+-        this.rconConsoleSource = new RconConsoleSource(this);
+-        this.serverTextFilter = ServerTextFilter.createFromConfig(propertiesLoader.getProperties());
+-        this.serverLinks = DedicatedServer.createServerLinks(propertiesLoader);
 +    // CraftBukkit start - Signature changed
-+    public DedicatedServer(joptsimple.OptionSet options, WorldLoader.a worldLoader, Thread thread, Convertable.ConversionSession convertable_conversionsession, ResourcePackRepository resourcepackrepository, WorldStem worldstem, DedicatedServerSettings dedicatedserversettings, DataFixer datafixer, Services services, WorldLoadListenerFactory worldloadlistenerfactory) {
++    public DedicatedServer(joptsimple.OptionSet options, WorldLoader.DataLoadContext worldLoader, Thread thread, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PackRepository resourcepackrepository, WorldStem worldstem, DedicatedServerSettings dedicatedserversettings, DataFixer datafixer, Services services, ChunkProgressListenerFactory worldloadlistenerfactory) {
 +        super(options, worldLoader, thread, convertable_conversionsession, resourcepackrepository, worldstem, Proxy.NO_PROXY, datafixer, services, worldloadlistenerfactory);
 +        // CraftBukkit end
-         this.settings = dedicatedserversettings;
--        this.rconConsoleSource = new RemoteControlCommandListener(this);
++        this.settings = dedicatedserversettings;
 +        // this.rconConsoleSource = new RemoteControlCommandListener(this); // CraftBukkit - remove field
-         this.serverTextFilter = ServerTextFilter.createFromConfig(dedicatedserversettings.getProperties());
-         this.serverLinks = createServerLinks(dedicatedserversettings);
++        this.serverTextFilter = ServerTextFilter.createFromConfig(dedicatedserversettings.getProperties());
++        this.serverLinks = DedicatedServer.createServerLinks(dedicatedserversettings);
      }
-@@ -93,13 +107,44 @@
+ 
+     @Override
      public boolean initServer() throws IOException {
          Thread thread = new Thread("Server console handler") {
              public void run() {
@@ -53,8 +62,8 @@
 +                if (!org.bukkit.craftbukkit.Main.useConsole) {
 +                    return;
 +                }
-+                jline.console.ConsoleReader bufferedreader = reader;
-+
++                jline.console.ConsoleReader bufferedreader = DedicatedServer.this.reader;
+ 
 +                // MC-33041, SPIGOT-5538: if System.in is not valid due to javaw, then return
 +                try {
 +                    System.in.available();
@@ -62,7 +71,7 @@
 +                    return;
 +                }
 +                // CraftBukkit end
- 
++
                  String s;
  
                  try {
@@ -92,7 +101,7 @@
                      }
                  } catch (IOException ioexception) {
                      DedicatedServer.LOGGER.error("Exception handling console input", ioexception);
-@@ -108,6 +153,29 @@
+@@ -108,6 +152,29 @@
              }
          };
  
@@ -122,7 +131,7 @@
          thread.setDaemon(true);
          thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(DedicatedServer.LOGGER));
          thread.start();
-@@ -132,7 +200,7 @@
+@@ -132,7 +199,7 @@
          this.setMotd(dedicatedserverproperties.motd);
          super.setPlayerIdleTimeout((Integer) dedicatedserverproperties.playerIdleTimeout.get());
          this.setEnforceWhitelist(dedicatedserverproperties.enforceWhitelist);
@@ -131,45 +140,45 @@
          DedicatedServer.LOGGER.info("Default game type: {}", dedicatedserverproperties.gamemode);
          InetAddress inetaddress = null;
  
-@@ -156,6 +224,12 @@
+@@ -156,6 +223,12 @@
              return false;
          }
  
 +        // CraftBukkit start
 +        this.setPlayerList(new DedicatedPlayerList(this, this.registries(), this.playerDataStorage));
-+        server.loadPlugins();
-+        server.enablePlugins(org.bukkit.plugin.PluginLoadOrder.STARTUP);
++        this.server.loadPlugins();
++        this.server.enablePlugins(org.bukkit.plugin.PluginLoadOrder.STARTUP);
 +        // CraftBukkit end
 +
          if (!this.usesAuthentication()) {
              DedicatedServer.LOGGER.warn("**** SERVER IS RUNNING IN OFFLINE/INSECURE MODE!");
              DedicatedServer.LOGGER.warn("The server will make no attempt to authenticate usernames. Beware.");
-@@ -170,7 +244,7 @@
-         if (!NameReferencingFileConverter.serverReadyAfterUserconversion(this)) {
+@@ -170,7 +243,7 @@
+         if (!OldUsersConverter.serverReadyAfterUserconversion(this)) {
              return false;
          } else {
 -            this.setPlayerList(new DedicatedPlayerList(this, this.registries(), this.playerDataStorage));
 +            // this.setPlayerList(new DedicatedPlayerList(this, this.registries(), this.playerDataStorage)); // CraftBukkit - moved up
              this.debugSampleSubscriptionTracker = new DebugSampleSubscriptionTracker(this.getPlayerList());
              this.tickTimeLogger = new RemoteSampleLogger(TpsDebugDimensions.values().length, this.debugSampleSubscriptionTracker, RemoteDebugSampleType.TICK_TIME);
-             long i = SystemUtils.getNanos();
-@@ -178,13 +252,13 @@
-             TileEntitySkull.setup(this.services, this);
-             UserCache.setUsesAuthentication(this.usesAuthentication());
+             long i = Util.getNanos();
+@@ -178,13 +251,13 @@
+             SkullBlockEntity.setup(this.services, this);
+             GameProfileCache.setUsesAuthentication(this.usesAuthentication());
              DedicatedServer.LOGGER.info("Preparing level \"{}\"", this.getLevelIdName());
 -            this.loadLevel();
-+            this.loadLevel(storageSource.getLevelId()); // CraftBukkit
-             long j = SystemUtils.getNanos() - i;
++            this.loadLevel(this.storageSource.getLevelId()); // CraftBukkit
+             long j = Util.getNanos() - i;
              String s = String.format(Locale.ROOT, "%.3fs", (double) j / 1.0E9D);
  
              DedicatedServer.LOGGER.info("Done ({})! For help, type \"help\"", s);
              if (dedicatedserverproperties.announcePlayerAchievements != null) {
--                ((GameRules.GameRuleBoolean) this.getGameRules().getRule(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)).set(dedicatedserverproperties.announcePlayerAchievements, this);
-+                ((GameRules.GameRuleBoolean) this.getGameRules().getRule(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)).set(dedicatedserverproperties.announcePlayerAchievements, this.overworld()); // CraftBukkit - per-world
+-                ((GameRules.BooleanValue) this.getGameRules().getRule(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)).set(dedicatedserverproperties.announcePlayerAchievements, this);
++                ((GameRules.BooleanValue) this.getGameRules().getRule(GameRules.RULE_ANNOUNCE_ADVANCEMENTS)).set(dedicatedserverproperties.announcePlayerAchievements, this.overworld()); // CraftBukkit - per-world
              }
  
              if (dedicatedserverproperties.enableQuery) {
-@@ -293,6 +367,7 @@
+@@ -293,6 +366,7 @@
              this.queryThreadGs4.stop();
          }
  
@@ -177,37 +186,57 @@
      }
  
      @Override
-@@ -314,7 +389,15 @@
+@@ -302,8 +376,8 @@
+     }
+ 
+     @Override
+-    public boolean isLevelEnabled(Level world) {
+-        return world.dimension() == Level.NETHER ? this.getProperties().allowNether : true;
++    public boolean isLevelEnabled(net.minecraft.world.level.Level world) {
++        return world.dimension() == net.minecraft.world.level.Level.NETHER ? this.getProperties().allowNether : true;
+     }
+ 
+     public void handleConsoleInput(String command, CommandSourceStack commandSource) {
+@@ -314,7 +388,15 @@
          while (!this.consoleInput.isEmpty()) {
-             ServerCommand servercommand = (ServerCommand) this.consoleInput.remove(0);
+             ConsoleInput servercommand = (ConsoleInput) this.consoleInput.remove(0);
  
 -            this.getCommands().performPrefixedCommand(servercommand.source, servercommand.msg);
 +            // CraftBukkit start - ServerCommand for preprocessing
-+            ServerCommandEvent event = new ServerCommandEvent(console, servercommand.msg);
-+            server.getPluginManager().callEvent(event);
++            ServerCommandEvent event = new ServerCommandEvent(this.console, servercommand.msg);
++            this.server.getPluginManager().callEvent(event);
 +            if (event.isCancelled()) continue;
-+            servercommand = new ServerCommand(event.getCommand(), servercommand.source);
++            servercommand = new ConsoleInput(event.getCommand(), servercommand.source);
 +
 +            // this.getCommands().performPrefixedCommand(servercommand.source, servercommand.msg); // Called in dispatchServerCommand
-+            server.dispatchServerCommand(console, servercommand);
++            this.server.dispatchServerCommand(this.console, servercommand);
 +            // CraftBukkit end
          }
  
      }
-@@ -541,16 +624,52 @@
+@@ -383,7 +465,7 @@
+ 
+     @Override
+     public boolean isUnderSpawnProtection(ServerLevel world, BlockPos pos, Player player) {
+-        if (world.dimension() != Level.OVERWORLD) {
++        if (world.dimension() != net.minecraft.world.level.Level.OVERWORLD) {
+             return false;
+         } else if (this.getPlayerList().getOps().isEmpty()) {
+             return false;
+@@ -541,16 +623,52 @@
  
      @Override
      public String getPluginNames() {
 -        return "";
 +        // CraftBukkit start - Whole method
 +        StringBuilder result = new StringBuilder();
-+        org.bukkit.plugin.Plugin[] plugins = server.getPluginManager().getPlugins();
++        org.bukkit.plugin.Plugin[] plugins = this.server.getPluginManager().getPlugins();
 +
-+        result.append(server.getName());
++        result.append(this.server.getName());
 +        result.append(" on Bukkit ");
-+        result.append(server.getBukkitVersion());
++        result.append(this.server.getBukkitVersion());
 +
-+        if (plugins.length > 0 && server.getQueryPlugins()) {
++        if (plugins.length > 0 && this.server.getQueryPlugins()) {
 +            result.append(": ");
 +
 +            for (int i = 0; i < plugins.length; i++) {
@@ -226,32 +255,32 @@
      }
  
      @Override
-     public String runCommand(String s) {
+     public String runCommand(String command) {
 -        this.rconConsoleSource.prepareForCommand();
 +        // CraftBukkit start - fire RemoteServerCommandEvent
 +        throw new UnsupportedOperationException("Not supported - remote source required.");
 +    }
 +
-+    public String runCommand(RemoteControlCommandListener rconConsoleSource, String s) {
++    public String runCommand(RconConsoleSource rconConsoleSource, String s) {
 +        rconConsoleSource.prepareForCommand();
          this.executeBlocking(() -> {
--            this.getCommands().performPrefixedCommand(this.rconConsoleSource.createCommandSourceStack(), s);
-+            CommandListenerWrapper wrapper = rconConsoleSource.createCommandSourceStack();
+-            this.getCommands().performPrefixedCommand(this.rconConsoleSource.createCommandSourceStack(), command);
++            CommandSourceStack wrapper = rconConsoleSource.createCommandSourceStack();
 +            RemoteServerCommandEvent event = new RemoteServerCommandEvent(rconConsoleSource.getBukkitSender(wrapper), s);
-+            server.getPluginManager().callEvent(event);
++            this.server.getPluginManager().callEvent(event);
 +            if (event.isCancelled()) {
 +                return;
 +            }
-+            ServerCommand serverCommand = new ServerCommand(event.getCommand(), wrapper);
-+            server.dispatchServerCommand(event.getSender(), serverCommand);
++            ConsoleInput serverCommand = new ConsoleInput(event.getCommand(), wrapper);
++            this.server.dispatchServerCommand(event.getSender(), serverCommand);
          });
 -        return this.rconConsoleSource.getCommandResponse();
 +        return rconConsoleSource.getCommandResponse();
 +        // CraftBukkit end
      }
  
-     public void storeUsingWhiteList(boolean flag) {
-@@ -660,4 +779,15 @@
+     public void storeUsingWhiteList(boolean useWhitelist) {
+@@ -660,4 +778,15 @@
              }
          }
      }
@@ -262,8 +291,8 @@
 +    }
 +
 +    @Override
-+    public CommandSender getBukkitSender(CommandListenerWrapper wrapper) {
-+        return console;
++    public CommandSender getBukkitSender(CommandSourceStack wrapper) {
++        return this.console;
 +    }
 +    // CraftBukkit end
  }
diff --git a/paper-server/patches/sources/net/minecraft/server/dedicated/DedicatedServerProperties.patch b/paper-server/patches/sources/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch
similarity index 63%
rename from paper-server/patches/sources/net/minecraft/server/dedicated/DedicatedServerProperties.patch
rename to paper-server/patches/sources/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch
index 89fcf8664a..ec05393108 100644
--- a/paper-server/patches/sources/net/minecraft/server/dedicated/DedicatedServerProperties.patch
+++ b/paper-server/patches/sources/net/minecraft/server/dedicated/DedicatedServerProperties.java.patch
@@ -8,7 +8,7 @@
 +import joptsimple.OptionSet;
 +// CraftBukkit end
 +
- public class DedicatedServerProperties extends PropertyManager<DedicatedServerProperties> {
+ public class DedicatedServerProperties extends Settings<DedicatedServerProperties> {
  
      static final Logger LOGGER = LogUtils.getLogger();
      private static final Pattern SHA1 = Pattern.compile("^[a-fA-F0-9]{40}$");
@@ -18,7 +18,7 @@
      public final boolean preventProxyConnections = this.get("prevent-proxy-connections", false);
      public final String serverIp = this.get("server-ip", "");
 @@ -100,13 +105,15 @@
-     public final PropertyManager<DedicatedServerProperties>.EditableProperty<Boolean> whiteList;
+     public final Settings<DedicatedServerProperties>.MutableValue<Boolean> whiteList;
      public final boolean enforceSecureProfile;
      public final boolean logIPs;
 -    public final int pauseWhenEmptySeconds;
@@ -33,11 +33,11 @@
 +    public DedicatedServerProperties(Properties properties, OptionSet optionset) {
 +        super(properties, optionset);
 +        // CraftBukkit end
-         this.difficulty = (EnumDifficulty) this.get("difficulty", dispatchNumberOrString(EnumDifficulty::byId, EnumDifficulty::byName), EnumDifficulty::getKey, EnumDifficulty.EASY);
-         this.gamemode = (EnumGamemode) this.get("gamemode", dispatchNumberOrString(EnumGamemode::byId, EnumGamemode::byName), EnumGamemode::getName, EnumGamemode.SURVIVAL);
+         this.difficulty = (Difficulty) this.get("difficulty", dispatchNumberOrString(Difficulty::byId, Difficulty::byName), Difficulty::getKey, Difficulty.EASY);
+         this.gamemode = (GameType) this.get("gamemode", dispatchNumberOrString(GameType::byId, GameType::byName), GameType::getName, GameType.SURVIVAL);
          this.levelName = this.get("level-name", "world");
 @@ -167,13 +174,15 @@
-         this.initialDataPackConfiguration = getDatapackConfig(this.get("initial-enabled-packs", String.join(",", WorldDataConfiguration.DEFAULT.dataPacks().getEnabled())), this.get("initial-disabled-packs", String.join(",", WorldDataConfiguration.DEFAULT.dataPacks().getDisabled())));
+         this.initialDataPackConfiguration = DedicatedServerProperties.getDatapackConfig(this.get("initial-enabled-packs", String.join(",", WorldDataConfiguration.DEFAULT.dataPacks().getEnabled())), this.get("initial-disabled-packs", String.join(",", WorldDataConfiguration.DEFAULT.dataPacks().getDisabled())));
      }
  
 -    public static DedicatedServerProperties fromFile(Path path) {
@@ -48,9 +48,9 @@
      }
  
      @Override
--    protected DedicatedServerProperties reload(IRegistryCustom iregistrycustom, Properties properties) {
+-    protected DedicatedServerProperties reload(RegistryAccess registryManager, Properties properties) {
 -        return new DedicatedServerProperties(properties);
-+    protected DedicatedServerProperties reload(IRegistryCustom iregistrycustom, Properties properties, OptionSet optionset) {
++    public DedicatedServerProperties reload(RegistryAccess iregistrycustom, Properties properties, OptionSet optionset) {
 +        return new DedicatedServerProperties(properties, optionset);
 +        // CraftBukkit end
      }
@@ -60,8 +60,8 @@
              }).orElseThrow(() -> {
                  return new IllegalStateException("Invalid datapack contents: can't find default preset");
              });
--            Optional optional = Optional.ofNullable(MinecraftKey.tryParse(this.levelType)).map((minecraftkey) -> {
-+            Optional<ResourceKey<WorldPreset>> optional = Optional.ofNullable(MinecraftKey.tryParse(this.levelType)).map((minecraftkey) -> { // CraftBukkit - decompile error
+-            Optional optional = Optional.ofNullable(ResourceLocation.tryParse(this.levelType)).map((minecraftkey) -> {
++            Optional<ResourceKey<WorldPreset>> optional = Optional.ofNullable(ResourceLocation.tryParse(this.levelType)).map((minecraftkey) -> { // CraftBukkit - decompile error
                  return ResourceKey.create(Registries.WORLD_PRESET, minecraftkey);
              }).or(() -> {
 -                return Optional.ofNullable((ResourceKey) DedicatedServerProperties.WorldDimensionData.LEGACY_PRESET_NAMES.get(this.levelType));
@@ -72,9 +72,9 @@
 @@ -269,7 +278,7 @@
  
              if (holder.is(WorldPresets.FLAT)) {
-                 RegistryOps<JsonElement> registryops = holderlookup_a.createSerializationContext(JsonOps.INSTANCE);
--                DataResult dataresult = GeneratorSettingsFlat.CODEC.parse(new Dynamic(registryops, this.generatorSettings()));
-+                DataResult<GeneratorSettingsFlat> dataresult = GeneratorSettingsFlat.CODEC.parse(new Dynamic(registryops, this.generatorSettings())); // CraftBukkit - decompile error
+                 RegistryOps<JsonElement> registryops = registries.createSerializationContext(JsonOps.INSTANCE);
+-                DataResult dataresult = FlatLevelGeneratorSettings.CODEC.parse(new Dynamic(registryops, this.generatorSettings()));
++                DataResult<FlatLevelGeneratorSettings> dataresult = FlatLevelGeneratorSettings.CODEC.parse(new Dynamic(registryops, this.generatorSettings())); // CraftBukkit - decompile error
                  Logger logger = DedicatedServerProperties.LOGGER;
  
                  Objects.requireNonNull(logger);
diff --git a/paper-server/patches/sources/net/minecraft/server/dedicated/DedicatedServerSettings.patch b/paper-server/patches/sources/net/minecraft/server/dedicated/DedicatedServerSettings.java.patch
similarity index 90%
rename from paper-server/patches/sources/net/minecraft/server/dedicated/DedicatedServerSettings.patch
rename to paper-server/patches/sources/net/minecraft/server/dedicated/DedicatedServerSettings.java.patch
index 9a52b5cc81..0aaaffd34b 100644
--- a/paper-server/patches/sources/net/minecraft/server/dedicated/DedicatedServerSettings.patch
+++ b/paper-server/patches/sources/net/minecraft/server/dedicated/DedicatedServerSettings.java.patch
@@ -20,7 +20,7 @@
 +    // CraftBukkit start
 +    public DedicatedServerSettings(OptionSet optionset) {
 +        this.source = ((File) optionset.valueOf("config")).toPath();
-+        this.properties = DedicatedServerProperties.fromFile(source, optionset);
++        this.properties = DedicatedServerProperties.fromFile(this.source, optionset);
 +        // CraftBukkit end
      }
  
diff --git a/paper-server/patches/sources/net/minecraft/server/dedicated/PropertyManager.patch b/paper-server/patches/sources/net/minecraft/server/dedicated/PropertyManager.patch
deleted file mode 100644
index 7ad50cc4b0..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/dedicated/PropertyManager.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/net/minecraft/server/dedicated/PropertyManager.java
-+++ b/net/minecraft/server/dedicated/PropertyManager.java
-@@ -23,17 +23,37 @@
- import net.minecraft.core.IRegistryCustom;
- import org.slf4j.Logger;
- 
-+import joptsimple.OptionSet; // CraftBukkit
-+
- public abstract class PropertyManager<T extends PropertyManager<T>> {
- 
-     private static final Logger LOGGER = LogUtils.getLogger();
-     public final Properties properties;
-+    // CraftBukkit start
-+    private OptionSet options = null;
- 
--    public PropertyManager(Properties properties) {
-+    public PropertyManager(Properties properties, final OptionSet options) {
-         this.properties = properties;
-+
-+        this.options = options;
-+    }
-+
-+    private String getOverride(String name, String value) {
-+        if ((this.options != null) && (this.options.has(name))) {
-+            return String.valueOf(this.options.valueOf(name));
-+        }
-+
-+        return value;
-+        // CraftBukkit end
-     }
- 
-     public static Properties loadFromFile(Path path) {
-         try {
-+            // CraftBukkit start - SPIGOT-7465, MC-264979: Don't load if file doesn't exist
-+            if (!path.toFile().exists()) {
-+                return new Properties();
-+            }
-+            // CraftBukkit end
-             Properties properties;
-             Properties properties1;
- 
-@@ -97,6 +117,11 @@
- 
-     public void store(Path path) {
-         try {
-+            // CraftBukkit start - Don't attempt writing to file if it's read only
-+            if (path.toFile().exists() && !path.toFile().canWrite()) {
-+                return;
-+            }
-+            // CraftBukkit end
-             BufferedWriter bufferedwriter = Files.newBufferedWriter(path, StandardCharsets.UTF_8);
- 
-             try {
-@@ -125,7 +150,7 @@
-     private static <V extends Number> Function<String, V> wrapNumberDeserializer(Function<String, V> function) {
-         return (s) -> {
-             try {
--                return (Number) function.apply(s);
-+                return (V) function.apply(s); // CraftBukkit - decompile error
-             } catch (NumberFormatException numberformatexception) {
-                 return null;
-             }
-@@ -144,7 +169,7 @@
- 
-     @Nullable
-     private String getStringRaw(String s) {
--        return (String) this.properties.get(s);
-+        return (String) getOverride(s, this.properties.getProperty(s)); // CraftBukkit
-     }
- 
-     @Nullable
-@@ -160,6 +185,16 @@
-     }
- 
-     protected <V> V get(String s, Function<String, V> function, Function<V, String> function1, V v0) {
-+        // CraftBukkit start
-+        try {
-+            return get0(s, function, function1, v0);
-+        } catch (Exception ex) {
-+            throw new RuntimeException("Could not load invalidly configured property '" + s + "'", ex);
-+        }
-+    }
-+
-+    private <V> V get0(String s, Function<String, V> function, Function<V, String> function1, V v0) {
-+        // CraftBukkit end
-         String s1 = this.getStringRaw(s);
-         V v1 = MoreObjects.firstNonNull(s1 != null ? function.apply(s1) : null, v0);
- 
-@@ -172,7 +207,7 @@
-         V v1 = MoreObjects.firstNonNull(s1 != null ? function.apply(s1) : null, v0);
- 
-         this.properties.put(s, function1.apply(v1));
--        return new PropertyManager.EditableProperty<>(s, v1, function1);
-+        return new PropertyManager.EditableProperty(s, v1, function1); // CraftBukkit - decompile error
-     }
- 
-     protected <V> V get(String s, Function<String, V> function, UnaryOperator<V> unaryoperator, Function<V, String> function1, V v0) {
-@@ -236,7 +271,7 @@
-         return properties;
-     }
- 
--    protected abstract T reload(IRegistryCustom iregistrycustom, Properties properties);
-+    protected abstract T reload(IRegistryCustom iregistrycustom, Properties properties, OptionSet optionset); // CraftBukkit
- 
-     public class EditableProperty<V> implements Supplier<V> {
- 
-@@ -244,7 +279,7 @@
-         private final V value;
-         private final Function<V, String> serializer;
- 
--        EditableProperty(final String s, final Object object, final Function function) {
-+        EditableProperty(final String s, final V object, final Function function) { // CraftBukkit - decompile error
-             this.key = s;
-             this.value = object;
-             this.serializer = function;
-@@ -258,7 +293,7 @@
-             Properties properties = PropertyManager.this.cloneProperties();
- 
-             properties.put(this.key, this.serializer.apply(v0));
--            return PropertyManager.this.reload(iregistrycustom, properties);
-+            return PropertyManager.this.reload(iregistrycustom, properties, PropertyManager.this.options); // CraftBukkit
-         }
-     }
- }
diff --git a/paper-server/patches/sources/net/minecraft/server/dedicated/Settings.java.patch b/paper-server/patches/sources/net/minecraft/server/dedicated/Settings.java.patch
new file mode 100644
index 0000000000..b3795b16df
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/dedicated/Settings.java.patch
@@ -0,0 +1,135 @@
+--- a/net/minecraft/server/dedicated/Settings.java
++++ b/net/minecraft/server/dedicated/Settings.java
+@@ -20,20 +20,40 @@
+ import java.util.function.Supplier;
+ import java.util.function.UnaryOperator;
+ import javax.annotation.Nullable;
+-import net.minecraft.core.RegistryAccess;
+ import org.slf4j.Logger;
+ 
++import joptsimple.OptionSet; // CraftBukkit
++import net.minecraft.core.RegistryAccess;
++
+ public abstract class Settings<T extends Settings<T>> {
+ 
+     private static final Logger LOGGER = LogUtils.getLogger();
+     public final Properties properties;
++    // CraftBukkit start
++    private OptionSet options = null;
+ 
+-    public Settings(Properties properties) {
++    public Settings(Properties properties, final OptionSet options) {
+         this.properties = properties;
++
++        this.options = options;
+     }
+ 
++    private String getOverride(String name, String value) {
++        if ((this.options != null) && (this.options.has(name))) {
++            return String.valueOf(this.options.valueOf(name));
++        }
++
++        return value;
++        // CraftBukkit end
++    }
++
+     public static Properties loadFromFile(Path path) {
+         try {
++            // CraftBukkit start - SPIGOT-7465, MC-264979: Don't load if file doesn't exist
++            if (!path.toFile().exists()) {
++                return new Properties();
++            }
++            // CraftBukkit end
+             Properties properties;
+             Properties properties1;
+ 
+@@ -97,6 +117,11 @@
+ 
+     public void store(Path path) {
+         try {
++            // CraftBukkit start - Don't attempt writing to file if it's read only
++            if (path.toFile().exists() && !path.toFile().canWrite()) {
++                return;
++            }
++            // CraftBukkit end
+             BufferedWriter bufferedwriter = Files.newBufferedWriter(path, StandardCharsets.UTF_8);
+ 
+             try {
+@@ -125,7 +150,7 @@
+     private static <V extends Number> Function<String, V> wrapNumberDeserializer(Function<String, V> parser) {
+         return (s) -> {
+             try {
+-                return (Number) parser.apply(s);
++                return (V) parser.apply(s); // CraftBukkit - decompile error
+             } catch (NumberFormatException numberformatexception) {
+                 return null;
+             }
+@@ -144,7 +169,7 @@
+ 
+     @Nullable
+     public String getStringRaw(String key) {
+-        return (String) this.properties.get(key);
++        return (String) this.getOverride(key, this.properties.getProperty(key)); // CraftBukkit
+     }
+ 
+     @Nullable
+@@ -160,10 +185,20 @@
+     }
+ 
+     protected <V> V get(String key, Function<String, V> parser, Function<V, String> stringifier, V fallback) {
+-        String s1 = this.getStringRaw(key);
+-        V v1 = MoreObjects.firstNonNull(s1 != null ? parser.apply(s1) : null, fallback);
++        // CraftBukkit start
++        try {
++            return this.get0(key, parser, stringifier, fallback);
++        } catch (Exception ex) {
++            throw new RuntimeException("Could not load invalidly configured property '" + key + "'", ex);
++        }
++    }
+ 
+-        this.properties.put(key, stringifier.apply(v1));
++    private <V> V get0(String s, Function<String, V> function, Function<V, String> function1, V v0) {
++        // CraftBukkit end
++        String s1 = this.getStringRaw(s);
++        V v1 = MoreObjects.firstNonNull(s1 != null ? function.apply(s1) : null, v0);
++
++        this.properties.put(s, function1.apply(v1));
+         return v1;
+     }
+ 
+@@ -172,7 +207,7 @@
+         V v1 = MoreObjects.firstNonNull(s1 != null ? parser.apply(s1) : null, fallback);
+ 
+         this.properties.put(key, stringifier.apply(v1));
+-        return new Settings.MutableValue<>(key, v1, stringifier);
++        return new Settings.MutableValue(key, v1, stringifier); // CraftBukkit - decompile error
+     }
+ 
+     protected <V> V get(String key, Function<String, V> parser, UnaryOperator<V> parsedTransformer, Function<V, String> stringifier, V fallback) {
+@@ -236,7 +271,7 @@
+         return properties;
+     }
+ 
+-    protected abstract T reload(RegistryAccess registryManager, Properties properties);
++    protected abstract T reload(RegistryAccess iregistrycustom, Properties properties, OptionSet optionset); // CraftBukkit
+ 
+     public class MutableValue<V> implements Supplier<V> {
+ 
+@@ -244,7 +279,7 @@
+         private final V value;
+         private final Function<V, String> serializer;
+ 
+-        MutableValue(final String s, final Object object, final Function function) {
++        MutableValue(final String s, final V object, final Function function) { // CraftBukkit - decompile error
+             this.key = s;
+             this.value = object;
+             this.serializer = function;
+@@ -258,7 +293,7 @@
+             Properties properties = Settings.this.cloneProperties();
+ 
+             properties.put(this.key, this.serializer.apply(value));
+-            return Settings.this.reload(registryManager, properties);
++            return Settings.this.reload(registryManager, properties, Settings.this.options); // CraftBukkit
+         }
+     }
+ }
diff --git a/paper-server/patches/sources/net/minecraft/server/gui/ServerGUI.patch b/paper-server/patches/sources/net/minecraft/server/gui/MinecraftServerGui.java.patch
similarity index 69%
rename from paper-server/patches/sources/net/minecraft/server/gui/ServerGUI.patch
rename to paper-server/patches/sources/net/minecraft/server/gui/MinecraftServerGui.java.patch
index e99114a8d8..22c139e99c 100644
--- a/paper-server/patches/sources/net/minecraft/server/gui/ServerGUI.patch
+++ b/paper-server/patches/sources/net/minecraft/server/gui/MinecraftServerGui.java.patch
@@ -1,9 +1,9 @@
---- a/net/minecraft/server/gui/ServerGUI.java
-+++ b/net/minecraft/server/gui/ServerGUI.java
+--- a/net/minecraft/server/gui/MinecraftServerGui.java
++++ b/net/minecraft/server/gui/MinecraftServerGui.java
 @@ -96,7 +96,7 @@
      private JComponent buildInfoPanel() {
          JPanel jpanel = new JPanel(new BorderLayout());
-         GuiStatsComponent guistatscomponent = new GuiStatsComponent(this.server);
+         StatsComponent guistatscomponent = new StatsComponent(this.server);
 -        Collection collection = this.finalizers;
 +        Collection<Runnable> collection = this.finalizers; // CraftBukkit - decompile error
  
@@ -23,15 +23,15 @@
      }
  
 +    private static final java.util.regex.Pattern ANSI = java.util.regex.Pattern.compile("\\x1B\\[([0-9]{1,2}(;[0-9]{1,2})*)?[m|K]"); // CraftBukkit
-     public void print(JTextArea jtextarea, JScrollPane jscrollpane, String s) {
+     public void print(JTextArea textArea, JScrollPane scrollPane, String message) {
          if (!SwingUtilities.isEventDispatchThread()) {
              SwingUtilities.invokeLater(() -> {
 @@ -181,7 +182,7 @@
              }
  
              try {
--                document.insertString(document.getLength(), s, (AttributeSet) null);
-+                document.insertString(document.getLength(), ANSI.matcher(s).replaceAll(""), (AttributeSet) null); // CraftBukkit
+-                document.insertString(document.getLength(), message, (AttributeSet) null);
++                document.insertString(document.getLength(), MinecraftServerGui.ANSI.matcher(message).replaceAll(""), (AttributeSet) null); // CraftBukkit
              } catch (BadLocationException badlocationexception) {
                  ;
              }
diff --git a/paper-server/patches/sources/net/minecraft/server/level/PlayerChunk.patch b/paper-server/patches/sources/net/minecraft/server/level/ChunkHolder.java.patch
similarity index 70%
rename from paper-server/patches/sources/net/minecraft/server/level/PlayerChunk.patch
rename to paper-server/patches/sources/net/minecraft/server/level/ChunkHolder.java.patch
index 8cdc550802..a4b21ad935 100644
--- a/paper-server/patches/sources/net/minecraft/server/level/PlayerChunk.patch
+++ b/paper-server/patches/sources/net/minecraft/server/level/ChunkHolder.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/server/level/PlayerChunk.java
-+++ b/net/minecraft/server/level/PlayerChunk.java
+--- a/net/minecraft/server/level/ChunkHolder.java
++++ b/net/minecraft/server/level/ChunkHolder.java
 @@ -28,6 +28,10 @@
  import net.minecraft.world.level.chunk.status.ChunkStatus;
  import net.minecraft.world.level.lighting.LevelLightEngine;
@@ -8,11 +8,11 @@
 +import net.minecraft.server.MinecraftServer;
 +// CraftBukkit end
 +
- public class PlayerChunk extends GenerationChunkHolder {
+ public class ChunkHolder extends GenerationChunkHolder {
  
-     public static final ChunkResult<Chunk> UNLOADED_LEVEL_CHUNK = ChunkResult.error("Unloaded level chunk");
+     public static final ChunkResult<LevelChunk> UNLOADED_LEVEL_CHUNK = ChunkResult.error("Unloaded level chunk");
 @@ -58,9 +62,9 @@
-         this.entityTickingChunkFuture = PlayerChunk.UNLOADED_LEVEL_CHUNK_FUTURE;
+         this.entityTickingChunkFuture = ChunkHolder.UNLOADED_LEVEL_CHUNK_FUTURE;
          this.blockChangedLightSectionFilter = new BitSet();
          this.skyChangedLightSectionFilter = new BitSet();
 -        this.pendingFullStateConfirmation = CompletableFuture.completedFuture((Object) null);
@@ -21,47 +21,48 @@
 +        this.pendingFullStateConfirmation = CompletableFuture.completedFuture(null); // CraftBukkit - decompile error
 +        this.sendSync = CompletableFuture.completedFuture(null); // CraftBukkit - decompile error
 +        this.saveSync = CompletableFuture.completedFuture(null); // CraftBukkit - decompile error
-         this.levelHeightAccessor = levelheightaccessor;
-         this.lightEngine = levellightengine;
-         this.onLevelChange = playerchunk_a;
-@@ -72,6 +76,18 @@
-         this.changedBlocksPerSection = new ShortSet[levelheightaccessor.getSectionsCount()];
-     }
- 
+         this.levelHeightAccessor = world;
+         this.lightEngine = lightingProvider;
+         this.onLevelChange = levelUpdateListener;
+@@ -70,7 +74,19 @@
+         this.queueLevel = this.oldTicketLevel;
+         this.setTicketLevel(level);
+         this.changedBlocksPerSection = new ShortSet[world.getSectionsCount()];
++    }
++
 +    // CraftBukkit start
-+    public Chunk getFullChunkNow() {
++    public LevelChunk getFullChunkNow() {
 +        // Note: We use the oldTicketLevel for isLoaded checks.
 +        if (!ChunkLevel.fullStatus(this.oldTicketLevel).isOrAfter(FullChunkStatus.FULL)) return null;
 +        return this.getFullChunkNowUnchecked();
 +    }
 +
-+    public Chunk getFullChunkNowUnchecked() {
-+        return (Chunk) this.getChunkIfPresentUnchecked(ChunkStatus.FULL);
-+    }
-+    // CraftBukkit end
-+
-     public CompletableFuture<ChunkResult<Chunk>> getTickingChunkFuture() {
-         return this.tickingChunkFuture;
++    public LevelChunk getFullChunkNowUnchecked() {
++        return (LevelChunk) this.getChunkIfPresentUnchecked(ChunkStatus.FULL);
      }
++    // CraftBukkit end
+ 
+     public CompletableFuture<ChunkResult<LevelChunk>> getTickingChunkFuture() {
+         return this.tickingChunkFuture;
 @@ -86,7 +102,7 @@
  
      @Nullable
-     public Chunk getTickingChunk() {
--        return (Chunk) ((ChunkResult) this.getTickingChunkFuture().getNow(PlayerChunk.UNLOADED_LEVEL_CHUNK)).orElse((Object) null);
-+        return (Chunk) ((ChunkResult) this.getTickingChunkFuture().getNow(PlayerChunk.UNLOADED_LEVEL_CHUNK)).orElse(null); // CraftBukkit - decompile error
+     public LevelChunk getTickingChunk() {
+-        return (LevelChunk) ((ChunkResult) this.getTickingChunkFuture().getNow(ChunkHolder.UNLOADED_LEVEL_CHUNK)).orElse((Object) null);
++        return (LevelChunk) ((ChunkResult) this.getTickingChunkFuture().getNow(ChunkHolder.UNLOADED_LEVEL_CHUNK)).orElse(null); // CraftBukkit - decompile error
      }
  
      @Nullable
 @@ -138,6 +154,7 @@
              boolean flag = this.hasChangedSections;
-             int i = this.levelHeightAccessor.getSectionIndex(blockposition.getY());
+             int i = this.levelHeightAccessor.getSectionIndex(pos.getY());
  
 +            if (i < 0 || i >= this.changedBlocksPerSection.length) return false; // CraftBukkit - SPIGOT-6086, SPIGOT-6296
              if (this.changedBlocksPerSection[i] == null) {
                  this.hasChangedSections = true;
                  this.changedBlocksPerSection[i] = new ShortOpenHashSet();
 @@ -224,8 +241,11 @@
-                                 PacketPlayOutMultiBlockChange packetplayoutmultiblockchange = new PacketPlayOutMultiBlockChange(sectionposition, shortset, chunksection);
+                                 ClientboundSectionBlocksUpdatePacket packetplayoutmultiblockchange = new ClientboundSectionBlocksUpdatePacket(sectionposition, shortset, chunksection);
  
                                  this.broadcast(list, packetplayoutmultiblockchange);
 +                                // CraftBukkit start
@@ -75,28 +76,30 @@
                          }
 @@ -291,7 +311,7 @@
          this.pendingFullStateConfirmation = completablefuture1;
-         completablefuture.thenAccept((chunkresult) -> {
+         chunkFuture.thenAccept((chunkresult) -> {
              chunkresult.ifSuccess((chunk) -> {
 -                completablefuture1.complete((Object) null);
 +                completablefuture1.complete(null); // CraftBukkit - decompile error
              });
          });
      }
-@@ -301,6 +321,38 @@
-         playerchunkmap.onFullChunkStatusChange(this.pos, fullchunkstatus);
-     }
- 
+@@ -299,7 +319,39 @@
+     private void demoteFullChunk(ChunkMap chunkLoadingManager, FullChunkStatus target) {
+         this.pendingFullStateConfirmation.cancel(false);
+         chunkLoadingManager.onFullChunkStatusChange(this.pos, target);
++    }
++
 +    // CraftBukkit start
 +    // ChunkUnloadEvent: Called before the chunk is unloaded: isChunkLoaded is still true and chunk can still be modified by plugins.
 +    // SPIGOT-7780: Moved out of updateFutures to call all chunk unload events before calling updateHighestAllowedStatus for all chunks
-+    protected void callEventIfUnloading(PlayerChunkMap playerchunkmap) {
++    protected void callEventIfUnloading(ChunkMap playerchunkmap) {
 +        FullChunkStatus oldFullChunkStatus = ChunkLevel.fullStatus(this.oldTicketLevel);
 +        FullChunkStatus newFullChunkStatus = ChunkLevel.fullStatus(this.ticketLevel);
 +        boolean oldIsFull = oldFullChunkStatus.isOrAfter(FullChunkStatus.FULL);
 +        boolean newIsFull = newFullChunkStatus.isOrAfter(FullChunkStatus.FULL);
 +        if (oldIsFull && !newIsFull) {
 +            this.getFullChunkFuture().thenAccept((either) -> {
-+                Chunk chunk = (Chunk) either.orElse(null);
++                LevelChunk chunk = (LevelChunk) either.orElse(null);
 +                if (chunk != null) {
 +                    playerchunkmap.callbackExecutor.execute(() -> {
 +                        // Minecraft will apply the chunks tick lists to the world once the chunk got loaded, and then store the tick
@@ -108,19 +111,18 @@
 +                }
 +            }).exceptionally((throwable) -> {
 +                // ensure exceptions are printed, by default this is not the case
-+                MinecraftServer.LOGGER.error("Failed to schedule unload callback for chunk " + PlayerChunk.this.pos, throwable);
++                MinecraftServer.LOGGER.error("Failed to schedule unload callback for chunk " + ChunkHolder.this.pos, throwable);
 +                return null;
 +            });
 +
 +            // Run callback right away if the future was already done
 +            playerchunkmap.callbackExecutor.run();
 +        }
-+    }
+     }
 +    // CraftBukkit end
-+
-     protected void updateFutures(PlayerChunkMap playerchunkmap, Executor executor) {
+ 
+     protected void updateFutures(ChunkMap chunkLoadingManager, Executor executor) {
          FullChunkStatus fullchunkstatus = ChunkLevel.fullStatus(this.oldTicketLevel);
-         FullChunkStatus fullchunkstatus1 = ChunkLevel.fullStatus(this.ticketLevel);
 @@ -357,6 +409,26 @@
  
          this.onLevelChange.onLevelChange(this.pos, this::getQueueLevel, this.ticketLevel, this::setQueueLevel);
@@ -129,20 +131,20 @@
 +        // ChunkLoadEvent: Called after the chunk is loaded: isChunkLoaded returns true and chunk is ready to be modified by plugins.
 +        if (!fullchunkstatus.isOrAfter(FullChunkStatus.FULL) && fullchunkstatus1.isOrAfter(FullChunkStatus.FULL)) {
 +            this.getFullChunkFuture().thenAccept((either) -> {
-+                Chunk chunk = (Chunk) either.orElse(null);
++                LevelChunk chunk = (LevelChunk) either.orElse(null);
 +                if (chunk != null) {
-+                    playerchunkmap.callbackExecutor.execute(() -> {
++                    chunkLoadingManager.callbackExecutor.execute(() -> {
 +                        chunk.loadCallback();
 +                    });
 +                }
 +            }).exceptionally((throwable) -> {
 +                // ensure exceptions are printed, by default this is not the case
-+                MinecraftServer.LOGGER.error("Failed to schedule load callback for chunk " + PlayerChunk.this.pos, throwable);
++                MinecraftServer.LOGGER.error("Failed to schedule load callback for chunk " + ChunkHolder.this.pos, throwable);
 +                return null;
 +            });
 +
 +            // Run callback right away if the future was already done
-+            playerchunkmap.callbackExecutor.run();
++            chunkLoadingManager.callbackExecutor.run();
 +        }
 +        // CraftBukkit end
      }
diff --git a/paper-server/patches/sources/net/minecraft/server/level/ChunkMap.java.patch b/paper-server/patches/sources/net/minecraft/server/level/ChunkMap.java.patch
new file mode 100644
index 0000000000..f402fda9f2
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/level/ChunkMap.java.patch
@@ -0,0 +1,123 @@
+--- a/net/minecraft/server/level/ChunkMap.java
++++ b/net/minecraft/server/level/ChunkMap.java
+@@ -104,6 +104,10 @@
+ import org.apache.commons.lang3.mutable.MutableBoolean;
+ import org.slf4j.Logger;
+ 
++// CraftBukkit start
++import org.bukkit.craftbukkit.generator.CustomChunkGenerator;
++// CraftBukkit end
++
+ public class ChunkMap extends ChunkStorage implements ChunkHolder.PlayerProvider, GeneratingChunkMap {
+ 
+     private static final ChunkResult<List<ChunkAccess>> UNLOADED_CHUNK_LIST_RESULT = ChunkResult.error("Unloaded chunks found in range");
+@@ -149,6 +153,27 @@
+     public int serverViewDistance;
+     private final WorldGenContext worldGenContext;
+ 
++    // CraftBukkit start - recursion-safe executor for Chunk loadCallback() and unloadCallback()
++    public final CallbackExecutor callbackExecutor = new CallbackExecutor();
++    public static final class CallbackExecutor implements java.util.concurrent.Executor, Runnable {
++
++        private final java.util.Queue<Runnable> queue = new java.util.ArrayDeque<>();
++
++        @Override
++        public void execute(Runnable runnable) {
++            this.queue.add(runnable);
++        }
++
++        @Override
++        public void run() {
++            Runnable task;
++            while ((task = this.queue.poll()) != null) {
++                task.run();
++            }
++        }
++    };
++    // CraftBukkit end
++
+     public ChunkMap(ServerLevel world, LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, StructureTemplateManager structureTemplateManager, Executor executor, BlockableEventLoop<Runnable> mainThreadExecutor, LightChunkGetter chunkProvider, ChunkGenerator chunkGenerator, ChunkProgressListener worldGenerationProgressListener, ChunkStatusUpdateListener chunkStatusChangeListener, Supplier<DimensionDataStorage> persistentStateManagerFactory, int viewDistance, boolean dsync) {
+         super(new RegionStorageInfo(session.getLevelId(), world.dimension(), "chunk"), session.getDimensionPath(world.dimension()).resolve("region"), dataFixer, dsync);
+         this.visibleChunkMap = this.updatingChunkMap.clone();
+@@ -170,7 +195,13 @@
+         RegistryAccess iregistrycustom = world.registryAccess();
+         long j = world.getSeed();
+ 
+-        if (chunkGenerator instanceof NoiseBasedChunkGenerator chunkgeneratorabstract) {
++        // CraftBukkit start - SPIGOT-7051: It's a rigged game! Use delegate for random state creation, otherwise it is not so random.
++        ChunkGenerator randomGenerator = chunkGenerator;
++        if (randomGenerator instanceof CustomChunkGenerator customChunkGenerator) {
++            randomGenerator = customChunkGenerator.getDelegate();
++        }
++        if (randomGenerator instanceof NoiseBasedChunkGenerator chunkgeneratorabstract) {
++            // CraftBukkit end
+             this.randomState = RandomState.create((NoiseGeneratorSettings) chunkgeneratorabstract.generatorSettings().value(), (HolderGetter) iregistrycustom.lookupOrThrow(Registries.NOISE), j);
+         } else {
+             this.randomState = RandomState.create(NoiseGeneratorSettings.dummy(), (HolderGetter) iregistrycustom.lookupOrThrow(Registries.NOISE), j);
+@@ -325,7 +356,7 @@
+                         throw this.debugFuturesAndCreateReportedException(new IllegalStateException("At least one of the chunk futures were null"), "n/a");
+                     }
+ 
+-                    ChunkAccess ichunkaccess = (ChunkAccess) chunkresult.orElse((Object) null);
++                    ChunkAccess ichunkaccess = (ChunkAccess) chunkresult.orElse(null); // CraftBukkit - decompile error
+ 
+                     if (ichunkaccess == null) {
+                         return ChunkMap.UNLOADED_CHUNK_LIST_RESULT;
+@@ -977,7 +1008,8 @@
+                 return ichunkaccess instanceof LevelChunk ? Optional.of((LevelChunk) ichunkaccess) : Optional.empty();
+             });
+ 
+-            csvwriter.writeRow(chunkcoordintpair.x, chunkcoordintpair.z, playerchunk.getTicketLevel(), optional.isPresent(), optional.map(ChunkAccess::getPersistedStatus).orElse((Object) null), optional1.map(LevelChunk::getFullStatus).orElse((Object) null), ChunkMap.printFuture(playerchunk.getFullChunkFuture()), ChunkMap.printFuture(playerchunk.getTickingChunkFuture()), ChunkMap.printFuture(playerchunk.getEntityTickingChunkFuture()), this.distanceManager.getTicketDebugString(i), this.anyPlayerCloseEnoughForSpawning(chunkcoordintpair), optional1.map((chunk) -> {
++            // CraftBukkit - decompile error
++            csvwriter.writeRow(chunkcoordintpair.x, chunkcoordintpair.z, playerchunk.getTicketLevel(), optional.isPresent(), optional.map(ChunkAccess::getPersistedStatus).orElse(null), optional1.map(LevelChunk::getFullStatus).orElse(null), ChunkMap.printFuture(playerchunk.getFullChunkFuture()), ChunkMap.printFuture(playerchunk.getTickingChunkFuture()), ChunkMap.printFuture(playerchunk.getEntityTickingChunkFuture()), this.distanceManager.getTicketDebugString(i), this.anyPlayerCloseEnoughForSpawning(chunkcoordintpair), optional1.map((chunk) -> {
+                 return chunk.getBlockEntities().size();
+             }).orElse(0), tickingtracker.getTicketDebugString(i), tickingtracker.getLevel(i), optional1.map((chunk) -> {
+                 return chunk.getBlockTicks().count();
+@@ -990,7 +1022,7 @@
+ 
+     private static String printFuture(CompletableFuture<ChunkResult<LevelChunk>> future) {
+         try {
+-            ChunkResult<LevelChunk> chunkresult = (ChunkResult) future.getNow((Object) null);
++            ChunkResult<LevelChunk> chunkresult = (ChunkResult) future.getNow(null); // CraftBukkit - decompile error
+ 
+             return chunkresult != null ? (chunkresult.isSuccess() ? "done" : "unloaded") : "not completed";
+         } catch (CompletionException completionexception) {
+@@ -1002,12 +1034,14 @@
+ 
+     private CompletableFuture<Optional<CompoundTag>> readChunk(ChunkPos chunkPos) {
+         return this.read(chunkPos).thenApplyAsync((optional) -> {
+-            return optional.map(this::upgradeChunkTag);
++            return optional.map((nbttagcompound) -> this.upgradeChunkTag(nbttagcompound, chunkPos)); // CraftBukkit
+         }, Util.backgroundExecutor().forName("upgradeChunk"));
+     }
+ 
+-    private CompoundTag upgradeChunkTag(CompoundTag nbt) {
+-        return this.upgradeChunkTag(this.level.dimension(), this.overworldDataStorage, nbt, this.generator().getTypeNameForDataFixer());
++    // CraftBukkit start
++    private CompoundTag upgradeChunkTag(CompoundTag nbttagcompound, ChunkPos chunkcoordintpair) {
++        return this.upgradeChunkTag(this.level.getTypeKey(), this.overworldDataStorage, nbttagcompound, this.generator().getTypeNameForDataFixer(), chunkcoordintpair, this.level);
++        // CraftBukkit end
+     }
+ 
+     void forEachSpawnCandidateChunk(Consumer<ChunkHolder> callback) {
+@@ -1424,7 +1458,7 @@
+         public final Set<ServerPlayerConnection> seenBy = Sets.newIdentityHashSet();
+ 
+         public TrackedEntity(final Entity entity, final int i, final int j, final boolean flag) {
+-            this.serverEntity = new ServerEntity(ChunkMap.this.level, entity, j, flag, this::broadcast);
++            this.serverEntity = new ServerEntity(ChunkMap.this.level, entity, j, flag, this::broadcast, this.seenBy); // CraftBukkit
+             this.entity = entity;
+             this.range = i;
+             this.lastSectionPos = SectionPos.of((EntityAccess) entity);
+@@ -1484,6 +1518,11 @@
+                 double d2 = d0 * d0;
+                 boolean flag = d1 <= d2 && this.entity.broadcastToPlayer(player) && ChunkMap.this.isChunkTracked(player, this.entity.chunkPosition().x, this.entity.chunkPosition().z);
+ 
++                // CraftBukkit start - respect vanish API
++                if (!player.getBukkitEntity().canSee(this.entity.getBukkitEntity())) {
++                    flag = false;
++                }
++                // CraftBukkit end
+                 if (flag) {
+                     if (this.seenBy.add(player.connection)) {
+                         this.serverEntity.addPairing(player);
diff --git a/paper-server/patches/sources/net/minecraft/server/level/ChunkMapDistance.patch b/paper-server/patches/sources/net/minecraft/server/level/ChunkMapDistance.patch
deleted file mode 100644
index 8a42bd4dad..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/level/ChunkMapDistance.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/net/minecraft/server/level/ChunkMapDistance.java
-+++ b/net/minecraft/server/level/ChunkMapDistance.java
-@@ -117,6 +117,15 @@
- 
-             PlayerChunk playerchunk;
- 
-+            // CraftBukkit start - SPIGOT-7780: Call chunk unload events before updateHighestAllowedStatus
-+            while (iterator.hasNext()) {
-+                playerchunk = (PlayerChunk) iterator.next();
-+                playerchunk.callEventIfUnloading(playerchunkmap);
-+            }
-+
-+            iterator = this.chunksToUpdateFutures.iterator();
-+            // CraftBukkit end
-+
-             while (iterator.hasNext()) {
-                 playerchunk = (PlayerChunk) iterator.next();
-                 playerchunk.updateHighestAllowedStatus(playerchunkmap);
-@@ -165,7 +174,7 @@
-         }
-     }
- 
--    void addTicket(long i, Ticket<?> ticket) {
-+    boolean addTicket(long i, Ticket<?> ticket) { // CraftBukkit - void -> boolean
-         ArraySetSorted<Ticket<?>> arraysetsorted = this.getTickets(i);
-         int j = getTicketLevelAt(arraysetsorted);
-         Ticket<?> ticket1 = (Ticket) arraysetsorted.addOrGet(ticket);
-@@ -175,13 +184,15 @@
-             this.ticketTracker.update(i, ticket.getTicketLevel(), true);
-         }
- 
-+        return ticket == ticket1; // CraftBukkit
-     }
- 
--    void removeTicket(long i, Ticket<?> ticket) {
-+    boolean removeTicket(long i, Ticket<?> ticket) { // CraftBukkit - void -> boolean
-         ArraySetSorted<Ticket<?>> arraysetsorted = this.getTickets(i);
- 
-+        boolean removed = false; // CraftBukkit
-         if (arraysetsorted.remove(ticket)) {
--            ;
-+            removed = true; // CraftBukkit
-         }
- 
-         if (arraysetsorted.isEmpty()) {
-@@ -189,6 +200,7 @@
-         }
- 
-         this.ticketTracker.update(i, getTicketLevelAt(arraysetsorted), false);
-+        return removed; // CraftBukkit
-     }
- 
-     public <T> void addTicket(TicketType<T> tickettype, ChunkCoordIntPair chunkcoordintpair, int i, T t0) {
-@@ -202,19 +214,33 @@
-     }
- 
-     public <T> void addRegionTicket(TicketType<T> tickettype, ChunkCoordIntPair chunkcoordintpair, int i, T t0) {
-+        // CraftBukkit start
-+        addRegionTicketAtDistance(tickettype, chunkcoordintpair, i, t0);
-+    }
-+
-+    public <T> boolean addRegionTicketAtDistance(TicketType<T> tickettype, ChunkCoordIntPair chunkcoordintpair, int i, T t0) {
-+        // CraftBukkit end
-         Ticket<T> ticket = new Ticket<>(tickettype, ChunkLevel.byStatus(FullChunkStatus.FULL) - i, t0);
-         long j = chunkcoordintpair.toLong();
- 
--        this.addTicket(j, ticket);
-+        boolean added = this.addTicket(j, ticket); // CraftBukkit
-         this.tickingTicketsTracker.addTicket(j, ticket);
-+        return added; // CraftBukkit
-     }
- 
-     public <T> void removeRegionTicket(TicketType<T> tickettype, ChunkCoordIntPair chunkcoordintpair, int i, T t0) {
-+        // CraftBukkit start
-+        removeRegionTicketAtDistance(tickettype, chunkcoordintpair, i, t0);
-+    }
-+
-+    public <T> boolean removeRegionTicketAtDistance(TicketType<T> tickettype, ChunkCoordIntPair chunkcoordintpair, int i, T t0) {
-+        // CraftBukkit end
-         Ticket<T> ticket = new Ticket<>(tickettype, ChunkLevel.byStatus(FullChunkStatus.FULL) - i, t0);
-         long j = chunkcoordintpair.toLong();
- 
--        this.removeTicket(j, ticket);
-+        boolean removed = this.removeTicket(j, ticket); // CraftBukkit
-         this.tickingTicketsTracker.removeTicket(j, ticket);
-+        return removed; // CraftBukkit
-     }
- 
-     private ArraySetSorted<Ticket<?>> getTickets(long i) {
-@@ -253,6 +279,7 @@
-         ChunkCoordIntPair chunkcoordintpair = sectionposition.chunk();
-         long i = chunkcoordintpair.toLong();
-         ObjectSet<EntityPlayer> objectset = (ObjectSet) this.playersPerChunk.get(i);
-+        if (objectset == null) return; // CraftBukkit - SPIGOT-6208
- 
-         objectset.remove(entityplayer);
-         if (objectset.isEmpty()) {
-@@ -391,6 +418,26 @@
-         return !this.tickets.isEmpty();
-     }
- 
-+    // CraftBukkit start
-+    public <T> void removeAllTicketsFor(TicketType<T> ticketType, int ticketLevel, T ticketIdentifier) {
-+        Ticket<T> target = new Ticket<>(ticketType, ticketLevel, ticketIdentifier);
-+
-+        for (java.util.Iterator<Entry<ArraySetSorted<Ticket<?>>>> iterator = this.tickets.long2ObjectEntrySet().fastIterator(); iterator.hasNext();) {
-+            Entry<ArraySetSorted<Ticket<?>>> entry = iterator.next();
-+            ArraySetSorted<Ticket<?>> tickets = entry.getValue();
-+            if (tickets.remove(target)) {
-+                // copied from removeTicket
-+                this.ticketTracker.update(entry.getLongKey(), getTicketLevelAt(tickets), false);
-+
-+                // can't use entry after it's removed
-+                if (tickets.isEmpty()) {
-+                    iterator.remove();
-+                }
-+            }
-+        }
-+    }
-+    // CraftBukkit end
-+
-     private class a extends ChunkMap {
- 
-         private static final int MAX_LEVEL = ChunkLevel.MAX_LEVEL + 1;
diff --git a/paper-server/patches/sources/net/minecraft/server/level/DistanceManager.java.patch b/paper-server/patches/sources/net/minecraft/server/level/DistanceManager.java.patch
new file mode 100644
index 0000000000..84cda3e8a1
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/level/DistanceManager.java.patch
@@ -0,0 +1,137 @@
+--- a/net/minecraft/server/level/DistanceManager.java
++++ b/net/minecraft/server/level/DistanceManager.java
+@@ -117,8 +117,17 @@
+ 
+             ChunkHolder playerchunk;
+ 
++            // CraftBukkit start - SPIGOT-7780: Call chunk unload events before updateHighestAllowedStatus
+             while (iterator.hasNext()) {
+                 playerchunk = (ChunkHolder) iterator.next();
++                playerchunk.callEventIfUnloading(chunkLoadingManager);
++            }
++
++            iterator = this.chunksToUpdateFutures.iterator();
++            // CraftBukkit end
++
++            while (iterator.hasNext()) {
++                playerchunk = (ChunkHolder) iterator.next();
+                 playerchunk.updateHighestAllowedStatus(chunkLoadingManager);
+             }
+ 
+@@ -165,30 +174,33 @@
+         }
+     }
+ 
+-    void addTicket(long position, Ticket<?> ticket) {
+-        SortedArraySet<Ticket<?>> arraysetsorted = this.getTickets(position);
++    boolean addTicket(long i, Ticket<?> ticket) { // CraftBukkit - void -> boolean
++        SortedArraySet<Ticket<?>> arraysetsorted = this.getTickets(i);
+         int j = DistanceManager.getTicketLevelAt(arraysetsorted);
+         Ticket<?> ticket1 = (Ticket) arraysetsorted.addOrGet(ticket);
+ 
+         ticket1.setCreatedTick(this.ticketTickCounter);
+         if (ticket.getTicketLevel() < j) {
+-            this.ticketTracker.update(position, ticket.getTicketLevel(), true);
++            this.ticketTracker.update(i, ticket.getTicketLevel(), true);
+         }
+ 
++        return ticket == ticket1; // CraftBukkit
+     }
+ 
+-    void removeTicket(long pos, Ticket<?> ticket) {
+-        SortedArraySet<Ticket<?>> arraysetsorted = this.getTickets(pos);
++    boolean removeTicket(long i, Ticket<?> ticket) { // CraftBukkit - void -> boolean
++        SortedArraySet<Ticket<?>> arraysetsorted = this.getTickets(i);
+ 
++        boolean removed = false; // CraftBukkit
+         if (arraysetsorted.remove(ticket)) {
+-            ;
++            removed = true; // CraftBukkit
+         }
+ 
+         if (arraysetsorted.isEmpty()) {
+-            this.tickets.remove(pos);
++            this.tickets.remove(i);
+         }
+ 
+-        this.ticketTracker.update(pos, DistanceManager.getTicketLevelAt(arraysetsorted), false);
++        this.ticketTracker.update(i, DistanceManager.getTicketLevelAt(arraysetsorted), false);
++        return removed; // CraftBukkit
+     }
+ 
+     public <T> void addTicket(TicketType<T> type, ChunkPos pos, int level, T argument) {
+@@ -202,19 +214,33 @@
+     }
+ 
+     public <T> void addRegionTicket(TicketType<T> type, ChunkPos pos, int radius, T argument) {
+-        Ticket<T> ticket = new Ticket<>(type, ChunkLevel.byStatus(FullChunkStatus.FULL) - radius, argument);
+-        long j = pos.toLong();
++        // CraftBukkit start
++        this.addRegionTicketAtDistance(type, pos, radius, argument);
++    }
+ 
+-        this.addTicket(j, ticket);
++    public <T> boolean addRegionTicketAtDistance(TicketType<T> tickettype, ChunkPos chunkcoordintpair, int i, T t0) {
++        // CraftBukkit end
++        Ticket<T> ticket = new Ticket<>(tickettype, ChunkLevel.byStatus(FullChunkStatus.FULL) - i, t0);
++        long j = chunkcoordintpair.toLong();
++
++        boolean added = this.addTicket(j, ticket); // CraftBukkit
+         this.tickingTicketsTracker.addTicket(j, ticket);
++        return added; // CraftBukkit
+     }
+ 
+     public <T> void removeRegionTicket(TicketType<T> type, ChunkPos pos, int radius, T argument) {
+-        Ticket<T> ticket = new Ticket<>(type, ChunkLevel.byStatus(FullChunkStatus.FULL) - radius, argument);
+-        long j = pos.toLong();
++        // CraftBukkit start
++        this.removeRegionTicketAtDistance(type, pos, radius, argument);
++    }
+ 
+-        this.removeTicket(j, ticket);
++    public <T> boolean removeRegionTicketAtDistance(TicketType<T> tickettype, ChunkPos chunkcoordintpair, int i, T t0) {
++        // CraftBukkit end
++        Ticket<T> ticket = new Ticket<>(tickettype, ChunkLevel.byStatus(FullChunkStatus.FULL) - i, t0);
++        long j = chunkcoordintpair.toLong();
++
++        boolean removed = this.removeTicket(j, ticket); // CraftBukkit
+         this.tickingTicketsTracker.removeTicket(j, ticket);
++        return removed; // CraftBukkit
+     }
+ 
+     private SortedArraySet<Ticket<?>> getTickets(long position) {
+@@ -253,6 +279,7 @@
+         ChunkPos chunkcoordintpair = pos.chunk();
+         long i = chunkcoordintpair.toLong();
+         ObjectSet<ServerPlayer> objectset = (ObjectSet) this.playersPerChunk.get(i);
++        if (objectset == null) return; // CraftBukkit - SPIGOT-6208
+ 
+         objectset.remove(player);
+         if (objectset.isEmpty()) {
+@@ -391,6 +418,26 @@
+         return !this.tickets.isEmpty();
+     }
+ 
++    // CraftBukkit start
++    public <T> void removeAllTicketsFor(TicketType<T> ticketType, int ticketLevel, T ticketIdentifier) {
++        Ticket<T> target = new Ticket<>(ticketType, ticketLevel, ticketIdentifier);
++
++        for (java.util.Iterator<Entry<SortedArraySet<Ticket<?>>>> iterator = this.tickets.long2ObjectEntrySet().fastIterator(); iterator.hasNext();) {
++            Entry<SortedArraySet<Ticket<?>>> entry = iterator.next();
++            SortedArraySet<Ticket<?>> tickets = entry.getValue();
++            if (tickets.remove(target)) {
++                // copied from removeTicket
++                this.ticketTracker.update(entry.getLongKey(), DistanceManager.getTicketLevelAt(tickets), false);
++
++                // can't use entry after it's removed
++                if (tickets.isEmpty()) {
++                    iterator.remove();
++                }
++            }
++        }
++    }
++    // CraftBukkit end
++
+     private class ChunkTicketTracker extends ChunkTracker {
+ 
+         private static final int MAX_LEVEL = ChunkLevel.MAX_LEVEL + 1;
diff --git a/paper-server/patches/sources/net/minecraft/server/level/PlayerChunkMap.patch b/paper-server/patches/sources/net/minecraft/server/level/PlayerChunkMap.patch
deleted file mode 100644
index 91440ae953..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/level/PlayerChunkMap.patch
+++ /dev/null
@@ -1,123 +0,0 @@
---- a/net/minecraft/server/level/PlayerChunkMap.java
-+++ b/net/minecraft/server/level/PlayerChunkMap.java
-@@ -104,6 +104,10 @@
- import org.apache.commons.lang3.mutable.MutableBoolean;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.generator.CustomChunkGenerator;
-+// CraftBukkit end
-+
- public class PlayerChunkMap extends IChunkLoader implements PlayerChunk.b, GeneratingChunkMap {
- 
-     private static final ChunkResult<List<IChunkAccess>> UNLOADED_CHUNK_LIST_RESULT = ChunkResult.error("Unloaded chunks found in range");
-@@ -149,6 +153,27 @@
-     public int serverViewDistance;
-     private final WorldGenContext worldGenContext;
- 
-+    // CraftBukkit start - recursion-safe executor for Chunk loadCallback() and unloadCallback()
-+    public final CallbackExecutor callbackExecutor = new CallbackExecutor();
-+    public static final class CallbackExecutor implements java.util.concurrent.Executor, Runnable {
-+
-+        private final java.util.Queue<Runnable> queue = new java.util.ArrayDeque<>();
-+
-+        @Override
-+        public void execute(Runnable runnable) {
-+            queue.add(runnable);
-+        }
-+
-+        @Override
-+        public void run() {
-+            Runnable task;
-+            while ((task = queue.poll()) != null) {
-+                task.run();
-+            }
-+        }
-+    };
-+    // CraftBukkit end
-+
-     public PlayerChunkMap(WorldServer worldserver, Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, StructureTemplateManager structuretemplatemanager, Executor executor, IAsyncTaskHandler<Runnable> iasynctaskhandler, ILightAccess ilightaccess, ChunkGenerator chunkgenerator, WorldLoadListener worldloadlistener, ChunkStatusUpdateListener chunkstatusupdatelistener, Supplier<WorldPersistentData> supplier, int i, boolean flag) {
-         super(new RegionStorageInfo(convertable_conversionsession.getLevelId(), worldserver.dimension(), "chunk"), convertable_conversionsession.getDimensionPath(worldserver.dimension()).resolve("region"), datafixer, flag);
-         this.visibleChunkMap = this.updatingChunkMap.clone();
-@@ -170,7 +195,13 @@
-         IRegistryCustom iregistrycustom = worldserver.registryAccess();
-         long j = worldserver.getSeed();
- 
--        if (chunkgenerator instanceof ChunkGeneratorAbstract chunkgeneratorabstract) {
-+        // CraftBukkit start - SPIGOT-7051: It's a rigged game! Use delegate for random state creation, otherwise it is not so random.
-+        ChunkGenerator randomGenerator = chunkgenerator;
-+        if (randomGenerator instanceof CustomChunkGenerator customChunkGenerator) {
-+            randomGenerator = customChunkGenerator.getDelegate();
-+        }
-+        if (randomGenerator instanceof ChunkGeneratorAbstract chunkgeneratorabstract) {
-+            // CraftBukkit end
-             this.randomState = RandomState.create((GeneratorSettingBase) chunkgeneratorabstract.generatorSettings().value(), (HolderGetter) iregistrycustom.lookupOrThrow(Registries.NOISE), j);
-         } else {
-             this.randomState = RandomState.create(GeneratorSettingBase.dummy(), (HolderGetter) iregistrycustom.lookupOrThrow(Registries.NOISE), j);
-@@ -325,7 +356,7 @@
-                         throw this.debugFuturesAndCreateReportedException(new IllegalStateException("At least one of the chunk futures were null"), "n/a");
-                     }
- 
--                    IChunkAccess ichunkaccess = (IChunkAccess) chunkresult.orElse((Object) null);
-+                    IChunkAccess ichunkaccess = (IChunkAccess) chunkresult.orElse(null); // CraftBukkit - decompile error
- 
-                     if (ichunkaccess == null) {
-                         return PlayerChunkMap.UNLOADED_CHUNK_LIST_RESULT;
-@@ -977,7 +1008,8 @@
-                 return ichunkaccess instanceof Chunk ? Optional.of((Chunk) ichunkaccess) : Optional.empty();
-             });
- 
--            csvwriter.writeRow(chunkcoordintpair.x, chunkcoordintpair.z, playerchunk.getTicketLevel(), optional.isPresent(), optional.map(IChunkAccess::getPersistedStatus).orElse((Object) null), optional1.map(Chunk::getFullStatus).orElse((Object) null), printFuture(playerchunk.getFullChunkFuture()), printFuture(playerchunk.getTickingChunkFuture()), printFuture(playerchunk.getEntityTickingChunkFuture()), this.distanceManager.getTicketDebugString(i), this.anyPlayerCloseEnoughForSpawning(chunkcoordintpair), optional1.map((chunk) -> {
-+            // CraftBukkit - decompile error
-+            csvwriter.writeRow(chunkcoordintpair.x, chunkcoordintpair.z, playerchunk.getTicketLevel(), optional.isPresent(), optional.map(IChunkAccess::getPersistedStatus).orElse(null), optional1.map(Chunk::getFullStatus).orElse(null), printFuture(playerchunk.getFullChunkFuture()), printFuture(playerchunk.getTickingChunkFuture()), printFuture(playerchunk.getEntityTickingChunkFuture()), this.distanceManager.getTicketDebugString(i), this.anyPlayerCloseEnoughForSpawning(chunkcoordintpair), optional1.map((chunk) -> {
-                 return chunk.getBlockEntities().size();
-             }).orElse(0), tickingtracker.getTicketDebugString(i), tickingtracker.getLevel(i), optional1.map((chunk) -> {
-                 return chunk.getBlockTicks().count();
-@@ -990,7 +1022,7 @@
- 
-     private static String printFuture(CompletableFuture<ChunkResult<Chunk>> completablefuture) {
-         try {
--            ChunkResult<Chunk> chunkresult = (ChunkResult) completablefuture.getNow((Object) null);
-+            ChunkResult<Chunk> chunkresult = (ChunkResult) completablefuture.getNow(null); // CraftBukkit - decompile error
- 
-             return chunkresult != null ? (chunkresult.isSuccess() ? "done" : "unloaded") : "not completed";
-         } catch (CompletionException completionexception) {
-@@ -1002,12 +1034,14 @@
- 
-     private CompletableFuture<Optional<NBTTagCompound>> readChunk(ChunkCoordIntPair chunkcoordintpair) {
-         return this.read(chunkcoordintpair).thenApplyAsync((optional) -> {
--            return optional.map(this::upgradeChunkTag);
-+            return optional.map((nbttagcompound) -> upgradeChunkTag(nbttagcompound, chunkcoordintpair)); // CraftBukkit
-         }, SystemUtils.backgroundExecutor().forName("upgradeChunk"));
-     }
- 
--    private NBTTagCompound upgradeChunkTag(NBTTagCompound nbttagcompound) {
--        return this.upgradeChunkTag(this.level.dimension(), this.overworldDataStorage, nbttagcompound, this.generator().getTypeNameForDataFixer());
-+    // CraftBukkit start
-+    private NBTTagCompound upgradeChunkTag(NBTTagCompound nbttagcompound, ChunkCoordIntPair chunkcoordintpair) {
-+        return this.upgradeChunkTag(this.level.getTypeKey(), this.overworldDataStorage, nbttagcompound, this.generator().getTypeNameForDataFixer(), chunkcoordintpair, level);
-+        // CraftBukkit end
-     }
- 
-     void forEachSpawnCandidateChunk(Consumer<PlayerChunk> consumer) {
-@@ -1424,7 +1458,7 @@
-         public final Set<ServerPlayerConnection> seenBy = Sets.newIdentityHashSet();
- 
-         public EntityTracker(final Entity entity, final int i, final int j, final boolean flag) {
--            this.serverEntity = new EntityTrackerEntry(PlayerChunkMap.this.level, entity, j, flag, this::broadcast);
-+            this.serverEntity = new EntityTrackerEntry(PlayerChunkMap.this.level, entity, j, flag, this::broadcast, seenBy); // CraftBukkit
-             this.entity = entity;
-             this.range = i;
-             this.lastSectionPos = SectionPosition.of((EntityAccess) entity);
-@@ -1484,6 +1518,11 @@
-                 double d2 = d0 * d0;
-                 boolean flag = d1 <= d2 && this.entity.broadcastToPlayer(entityplayer) && PlayerChunkMap.this.isChunkTracked(entityplayer, this.entity.chunkPosition().x, this.entity.chunkPosition().z);
- 
-+                // CraftBukkit start - respect vanish API
-+                if (!entityplayer.getBukkitEntity().canSee(this.entity.getBukkitEntity())) {
-+                    flag = false;
-+                }
-+                // CraftBukkit end
-                 if (flag) {
-                     if (this.seenBy.add(entityplayer.connection)) {
-                         this.serverEntity.addPairing(entityplayer);
diff --git a/paper-server/patches/sources/net/minecraft/server/level/PlayerInteractManager.patch b/paper-server/patches/sources/net/minecraft/server/level/PlayerInteractManager.patch
deleted file mode 100644
index 5826f84b9b..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/level/PlayerInteractManager.patch
+++ /dev/null
@@ -1,333 +0,0 @@
---- a/net/minecraft/server/level/PlayerInteractManager.java
-+++ b/net/minecraft/server/level/PlayerInteractManager.java
-@@ -26,6 +26,27 @@
- import net.minecraft.world.phys.Vec3D;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import java.util.ArrayList;
-+import net.minecraft.network.protocol.game.PacketPlayOutBlockChange;
-+import net.minecraft.server.MinecraftServer;
-+import net.minecraft.world.entity.EnumItemSlot;
-+import net.minecraft.world.item.ItemBisected;
-+import net.minecraft.world.level.block.BlockCake;
-+import net.minecraft.world.level.block.BlockDoor;
-+import net.minecraft.world.level.block.BlockTrapdoor;
-+import net.minecraft.world.level.block.Blocks;
-+import net.minecraft.world.level.block.state.properties.BlockPropertyDoubleBlockHalf;
-+import org.bukkit.GameMode;
-+import org.bukkit.craftbukkit.block.CraftBlock;
-+import org.bukkit.event.block.BlockBreakEvent;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.event.Event;
-+import org.bukkit.event.block.Action;
-+import org.bukkit.event.player.PlayerGameModeChangeEvent;
-+import org.bukkit.event.player.PlayerInteractEvent;
-+// CraftBukkit end
-+
- public class PlayerInteractManager {
- 
-     private static final Logger LOGGER = LogUtils.getLogger();
-@@ -56,9 +77,16 @@
-         if (enumgamemode == this.gameModeForPlayer) {
-             return false;
-         } else {
-+            // CraftBukkit start
-+            PlayerGameModeChangeEvent event = new PlayerGameModeChangeEvent(player.getBukkitEntity(), GameMode.getByValue(enumgamemode.getId()));
-+            level.getCraftServer().getPluginManager().callEvent(event);
-+            if (event.isCancelled()) {
-+                return false;
-+            }
-+            // CraftBukkit end
-             this.setGameModeForPlayer(enumgamemode, this.previousGameModeForPlayer);
-             this.player.onUpdateAbilities();
--            this.player.server.getPlayerList().broadcastAll(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.a.UPDATE_GAME_MODE, this.player));
-+            this.player.server.getPlayerList().broadcastAll(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.a.UPDATE_GAME_MODE, this.player), this.player); // CraftBukkit
-             this.level.updateSleepingPlayerList();
-             if (enumgamemode == EnumGamemode.CREATIVE) {
-                 this.player.resetCurrentImpulseContext();
-@@ -92,7 +120,7 @@
-     }
- 
-     public void tick() {
--        ++this.gameTicks;
-+        this.gameTicks = MinecraftServer.currentTick; // CraftBukkit;
-         IBlockData iblockdata;
- 
-         if (this.hasDelayedDestroy) {
-@@ -146,11 +174,33 @@
- 
-             if (packetplayinblockdig_enumplayerdigtype == PacketPlayInBlockDig.EnumPlayerDigType.START_DESTROY_BLOCK) {
-                 if (!this.level.mayInteract(this.player, blockposition)) {
-+                    // CraftBukkit start - fire PlayerInteractEvent
-+                    CraftEventFactory.callPlayerInteractEvent(this.player, Action.LEFT_CLICK_BLOCK, blockposition, enumdirection, this.player.getInventory().getSelected(), EnumHand.MAIN_HAND);
-                     this.player.connection.send(new PacketPlayOutBlockChange(blockposition, this.level.getBlockState(blockposition)));
-                     this.debugLogging(blockposition, false, j, "may not interact");
-+                    // Update any tile entity data for this block
-+                    TileEntity tileentity = level.getBlockEntity(blockposition);
-+                    if (tileentity != null) {
-+                        this.player.connection.send(tileentity.getUpdatePacket());
-+                    }
-+                    // CraftBukkit end
-                     return;
-                 }
- 
-+                // CraftBukkit start
-+                PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.player, Action.LEFT_CLICK_BLOCK, blockposition, enumdirection, this.player.getInventory().getSelected(), EnumHand.MAIN_HAND);
-+                if (event.isCancelled()) {
-+                    // Let the client know the block still exists
-+                    this.player.connection.send(new PacketPlayOutBlockChange(this.level, blockposition));
-+                    // Update any tile entity data for this block
-+                    TileEntity tileentity = this.level.getBlockEntity(blockposition);
-+                    if (tileentity != null) {
-+                        this.player.connection.send(tileentity.getUpdatePacket());
-+                    }
-+                    return;
-+                }
-+                // CraftBukkit end
-+
-                 if (this.isCreative()) {
-                     this.destroyAndAck(blockposition, j, "creative destroy");
-                     return;
-@@ -166,7 +216,19 @@
-                 float f = 1.0F;
- 
-                 iblockdata = this.level.getBlockState(blockposition);
--                if (!iblockdata.isAir()) {
-+                // CraftBukkit start - Swings at air do *NOT* exist.
-+                if (event.useInteractedBlock() == Event.Result.DENY) {
-+                    // If we denied a door from opening, we need to send a correcting update to the client, as it already opened the door.
-+                    IBlockData data = this.level.getBlockState(blockposition);
-+                    if (data.getBlock() instanceof BlockDoor) {
-+                        // For some reason *BOTH* the bottom/top part have to be marked updated.
-+                        boolean bottom = data.getValue(BlockDoor.HALF) == BlockPropertyDoubleBlockHalf.LOWER;
-+                        this.player.connection.send(new PacketPlayOutBlockChange(this.level, blockposition));
-+                        this.player.connection.send(new PacketPlayOutBlockChange(this.level, bottom ? blockposition.above() : blockposition.below()));
-+                    } else if (data.getBlock() instanceof BlockTrapdoor) {
-+                        this.player.connection.send(new PacketPlayOutBlockChange(this.level, blockposition));
-+                    }
-+                } else if (!iblockdata.isAir()) {
-                     EnchantmentManager.onHitBlock(this.level, this.player.getMainHandItem(), this.player, this.player, EnumItemSlot.MAINHAND, Vec3D.atCenterOf(blockposition), iblockdata, (item) -> {
-                         this.player.onEquippedItemBroken(item, EnumItemSlot.MAINHAND);
-                     });
-@@ -174,6 +236,26 @@
-                     f = iblockdata.getDestroyProgress(this.player, this.player.level(), blockposition);
-                 }
- 
-+                if (event.useItemInHand() == Event.Result.DENY) {
-+                    // If we 'insta destroyed' then the client needs to be informed.
-+                    if (f > 1.0f) {
-+                        this.player.connection.send(new PacketPlayOutBlockChange(this.level, blockposition));
-+                    }
-+                    return;
-+                }
-+                org.bukkit.event.block.BlockDamageEvent blockEvent = CraftEventFactory.callBlockDamageEvent(this.player, blockposition, this.player.getInventory().getSelected(), f >= 1.0f);
-+
-+                if (blockEvent.isCancelled()) {
-+                    // Let the client know the block still exists
-+                    this.player.connection.send(new PacketPlayOutBlockChange(this.level, blockposition));
-+                    return;
-+                }
-+
-+                if (blockEvent.getInstaBreak()) {
-+                    f = 2.0f;
-+                }
-+                // CraftBukkit end
-+
-                 if (!iblockdata.isAir() && f >= 1.0F) {
-                     this.destroyAndAck(blockposition, j, "insta mine");
-                 } else {
-@@ -218,13 +300,15 @@
-             } else if (packetplayinblockdig_enumplayerdigtype == PacketPlayInBlockDig.EnumPlayerDigType.ABORT_DESTROY_BLOCK) {
-                 this.isDestroyingBlock = false;
-                 if (!Objects.equals(this.destroyPos, blockposition)) {
--                    PlayerInteractManager.LOGGER.warn("Mismatch in destroy block pos: {} {}", this.destroyPos, blockposition);
-+                    PlayerInteractManager.LOGGER.debug("Mismatch in destroy block pos: {} {}", this.destroyPos, blockposition); // CraftBukkit - SPIGOT-5457 sent by client when interact event cancelled
-                     this.level.destroyBlockProgress(this.player.getId(), this.destroyPos, -1);
-                     this.debugLogging(blockposition, true, j, "aborted mismatched destroying");
-                 }
- 
-                 this.level.destroyBlockProgress(this.player.getId(), blockposition, -1);
-                 this.debugLogging(blockposition, true, j, "aborted destroying");
-+
-+                CraftEventFactory.callBlockDamageAbortEvent(this.player, blockposition, this.player.getInventory().getSelected()); // CraftBukkit
-             }
- 
-         }
-@@ -242,10 +326,65 @@
- 
-     public boolean destroyBlock(BlockPosition blockposition) {
-         IBlockData iblockdata = this.level.getBlockState(blockposition);
-+        // CraftBukkit start - fire BlockBreakEvent
-+        org.bukkit.block.Block bblock = CraftBlock.at(level, blockposition);
-+        BlockBreakEvent event = null;
- 
--        if (!this.player.getMainHandItem().getItem().canAttackBlock(iblockdata, this.level, blockposition, this.player)) {
-+        if (this.player instanceof EntityPlayer) {
-+            // Sword + Creative mode pre-cancel
-+            boolean isSwordNoBreak = !this.player.getMainHandItem().getItem().canAttackBlock(iblockdata, this.level, blockposition, this.player);
-+
-+            // Tell client the block is gone immediately then process events
-+            // Don't tell the client if its a creative sword break because its not broken!
-+            if (level.getBlockEntity(blockposition) == null && !isSwordNoBreak) {
-+                PacketPlayOutBlockChange packet = new PacketPlayOutBlockChange(blockposition, Blocks.AIR.defaultBlockState());
-+                this.player.connection.send(packet);
-+            }
-+
-+            event = new BlockBreakEvent(bblock, this.player.getBukkitEntity());
-+
-+            // Sword + Creative mode pre-cancel
-+            event.setCancelled(isSwordNoBreak);
-+
-+            // Calculate default block experience
-+            IBlockData nmsData = this.level.getBlockState(blockposition);
-+            Block nmsBlock = nmsData.getBlock();
-+
-+            ItemStack itemstack = this.player.getItemBySlot(EnumItemSlot.MAINHAND);
-+
-+            if (nmsBlock != null && !event.isCancelled() && !this.isCreative() && this.player.hasCorrectToolForDrops(nmsBlock.defaultBlockState())) {
-+                event.setExpToDrop(nmsBlock.getExpDrop(nmsData, this.level, blockposition, itemstack, true));
-+            }
-+
-+            this.level.getCraftServer().getPluginManager().callEvent(event);
-+
-+            if (event.isCancelled()) {
-+                if (isSwordNoBreak) {
-+                    return false;
-+                }
-+                // Let the client know the block still exists
-+                this.player.connection.send(new PacketPlayOutBlockChange(this.level, blockposition));
-+
-+                // Brute force all possible updates
-+                for (EnumDirection dir : EnumDirection.values()) {
-+                    this.player.connection.send(new PacketPlayOutBlockChange(level, blockposition.relative(dir)));
-+                }
-+
-+                // Update any tile entity data for this block
-+                TileEntity tileentity = this.level.getBlockEntity(blockposition);
-+                if (tileentity != null) {
-+                    this.player.connection.send(tileentity.getUpdatePacket());
-+                }
-+                return false;
-+            }
-+        }
-+        // CraftBukkit end
-+
-+        if (false && !this.player.getMainHandItem().getItem().canAttackBlock(iblockdata, this.level, blockposition, this.player)) { // CraftBukkit - false
-             return false;
-         } else {
-+            iblockdata = this.level.getBlockState(blockposition); // CraftBukkit - update state from plugins
-+            if (iblockdata.isAir()) return false; // CraftBukkit - A plugin set block to air without cancelling
-             TileEntity tileentity = this.level.getBlockEntity(blockposition);
-             Block block = iblockdata.getBlock();
- 
-@@ -255,6 +394,10 @@
-             } else if (this.player.blockActionRestricted(this.level, blockposition, this.gameModeForPlayer)) {
-                 return false;
-             } else {
-+                // CraftBukkit start
-+                org.bukkit.block.BlockState state = bblock.getState();
-+                level.captureDrops = new ArrayList<>();
-+                // CraftBukkit end
-                 IBlockData iblockdata1 = block.playerWillDestroy(this.level, blockposition, iblockdata, this.player);
-                 boolean flag = this.level.removeBlock(blockposition, false);
- 
-@@ -263,19 +406,32 @@
-                 }
- 
-                 if (this.isCreative()) {
--                    return true;
-+                    // return true; // CraftBukkit
-                 } else {
-                     ItemStack itemstack = this.player.getMainHandItem();
-                     ItemStack itemstack1 = itemstack.copy();
-                     boolean flag1 = this.player.hasCorrectToolForDrops(iblockdata1);
- 
-                     itemstack.mineBlock(this.level, iblockdata1, blockposition, this.player);
--                    if (flag && flag1) {
-+                    if (flag && flag1 && event.isDropItems()) { // CraftBukkit - Check if block should drop items
-                         block.playerDestroy(this.level, this.player, blockposition, iblockdata1, tileentity, itemstack1);
-                     }
- 
--                    return true;
-+                    // return true; // CraftBukkit
-+                }
-+                // CraftBukkit start
-+                if (event.isDropItems()) {
-+                    org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockDropItemEvent(bblock, state, this.player, level.captureDrops);
-+                }
-+                level.captureDrops = null;
-+
-+                // Drop event experience
-+                if (flag && event != null) {
-+                    iblockdata.getBlock().popExperience(this.level, blockposition, event.getExpToDrop());
-                 }
-+
-+                return true;
-+                // CraftBukkit end
-             }
-         }
-     }
-@@ -321,14 +477,53 @@
-         }
-     }
- 
-+    // CraftBukkit start - whole method
-+    public boolean interactResult = false;
-+    public boolean firedInteract = false;
-+    public BlockPosition interactPosition;
-+    public EnumHand interactHand;
-+    public ItemStack interactItemStack;
-     public EnumInteractionResult useItemOn(EntityPlayer entityplayer, World world, ItemStack itemstack, EnumHand enumhand, MovingObjectPositionBlock movingobjectpositionblock) {
-         BlockPosition blockposition = movingobjectpositionblock.getBlockPos();
-         IBlockData iblockdata = world.getBlockState(blockposition);
-+        boolean cancelledBlock = false;
- 
-         if (!iblockdata.getBlock().isEnabled(world.enabledFeatures())) {
-             return EnumInteractionResult.FAIL;
-         } else if (this.gameModeForPlayer == EnumGamemode.SPECTATOR) {
-             ITileInventory itileinventory = iblockdata.getMenuProvider(world, blockposition);
-+            cancelledBlock = !(itileinventory instanceof ITileInventory);
-+        }
-+
-+        if (entityplayer.getCooldowns().isOnCooldown(itemstack)) {
-+            cancelledBlock = true;
-+        }
-+
-+        PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(entityplayer, Action.RIGHT_CLICK_BLOCK, blockposition, movingobjectpositionblock.getDirection(), itemstack, cancelledBlock, enumhand, movingobjectpositionblock.getLocation());
-+        firedInteract = true;
-+        interactResult = event.useItemInHand() == Event.Result.DENY;
-+        interactPosition = blockposition.immutable();
-+        interactHand = enumhand;
-+        interactItemStack = itemstack.copy();
-+
-+        if (event.useInteractedBlock() == Event.Result.DENY) {
-+            // If we denied a door from opening, we need to send a correcting update to the client, as it already opened the door.
-+            if (iblockdata.getBlock() instanceof BlockDoor) {
-+                boolean bottom = iblockdata.getValue(BlockDoor.HALF) == BlockPropertyDoubleBlockHalf.LOWER;
-+                entityplayer.connection.send(new PacketPlayOutBlockChange(world, bottom ? blockposition.above() : blockposition.below()));
-+            } else if (iblockdata.getBlock() instanceof BlockCake) {
-+                entityplayer.getBukkitEntity().sendHealthUpdate(); // SPIGOT-1341 - reset health for cake
-+            } else if (interactItemStack.getItem() instanceof ItemBisected) {
-+                // send a correcting update to the client, as it already placed the upper half of the bisected item
-+                entityplayer.connection.send(new PacketPlayOutBlockChange(world, blockposition.relative(movingobjectpositionblock.getDirection()).above()));
-+
-+                // send a correcting update to the client for the block above as well, this because of replaceable blocks (such as grass, sea grass etc)
-+                entityplayer.connection.send(new PacketPlayOutBlockChange(world, blockposition.above()));
-+            }
-+            entityplayer.getBukkitEntity().updateInventory(); // SPIGOT-2867
-+            return (event.useItemInHand() != Event.Result.ALLOW) ? EnumInteractionResult.SUCCESS : EnumInteractionResult.PASS;
-+        } else if (this.gameModeForPlayer == EnumGamemode.SPECTATOR) {
-+            ITileInventory itileinventory = iblockdata.getMenuProvider(world, blockposition);
- 
-             if (itileinventory != null) {
-                 entityplayer.openMenu(itileinventory);
-@@ -359,7 +554,7 @@
-                 }
-             }
- 
--            if (!itemstack.isEmpty() && !entityplayer.getCooldowns().isOnCooldown(itemstack)) {
-+            if (!itemstack.isEmpty() && !interactResult) { // add !interactResult SPIGOT-764
-                 ItemActionContext itemactioncontext = new ItemActionContext(entityplayer, enumhand, movingobjectpositionblock);
- 
-                 if (this.isCreative()) {
diff --git a/paper-server/patches/sources/net/minecraft/server/level/RegionLimitedWorldAccess.patch b/paper-server/patches/sources/net/minecraft/server/level/RegionLimitedWorldAccess.patch
deleted file mode 100644
index de07819628..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/level/RegionLimitedWorldAccess.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- a/net/minecraft/server/level/RegionLimitedWorldAccess.java
-+++ b/net/minecraft/server/level/RegionLimitedWorldAccess.java
-@@ -217,7 +217,7 @@
-         if (iblockdata.isAir()) {
-             return false;
-         } else {
--            if (flag) {
-+            if (false) { // CraftBukkit - SPIGOT-6833: Do not drop during world generation
-                 TileEntity tileentity = iblockdata.hasBlockEntity() ? this.getBlockEntity(blockposition) : null;
- 
-                 Block.dropResources(iblockdata, this.level, blockposition, tileentity, entity, ItemStack.EMPTY);
-@@ -336,6 +336,13 @@
- 
-     @Override
-     public boolean addFreshEntity(Entity entity) {
-+        // CraftBukkit start
-+        return addFreshEntity(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT);
-+    }
-+
-+    @Override
-+    public boolean addFreshEntity(Entity entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) {
-+        // CraftBukkit end
-         int i = SectionPosition.blockToSectionCoord(entity.getBlockX());
-         int j = SectionPosition.blockToSectionCoord(entity.getBlockZ());
- 
diff --git a/paper-server/patches/sources/net/minecraft/server/level/ChunkProviderServer.patch b/paper-server/patches/sources/net/minecraft/server/level/ServerChunkCache.java.patch
similarity index 58%
rename from paper-server/patches/sources/net/minecraft/server/level/ChunkProviderServer.patch
rename to paper-server/patches/sources/net/minecraft/server/level/ServerChunkCache.java.patch
index 6d00dd684d..93313a37c4 100644
--- a/paper-server/patches/sources/net/minecraft/server/level/ChunkProviderServer.patch
+++ b/paper-server/patches/sources/net/minecraft/server/level/ServerChunkCache.java.patch
@@ -1,12 +1,12 @@
---- a/net/minecraft/server/level/ChunkProviderServer.java
-+++ b/net/minecraft/server/level/ChunkProviderServer.java
-@@ -96,6 +96,16 @@
+--- a/net/minecraft/server/level/ServerChunkCache.java
++++ b/net/minecraft/server/level/ServerChunkCache.java
+@@ -95,6 +95,16 @@
          this.clearCache();
      }
  
 +    // CraftBukkit start - properly implement isChunkLoaded
 +    public boolean isChunkLoaded(int chunkX, int chunkZ) {
-+        PlayerChunk chunk = this.chunkMap.getUpdatingChunkIfPresent(ChunkCoordIntPair.asLong(chunkX, chunkZ));
++        ChunkHolder chunk = this.chunkMap.getUpdatingChunkIfPresent(ChunkPos.asLong(chunkX, chunkZ));
 +        if (chunk == null) {
 +            return false;
 +        }
@@ -15,31 +15,31 @@
 +    // CraftBukkit end
 +
      @Override
-     public LightEngineThreaded getLightEngine() {
+     public ThreadedLevelLightEngine getLightEngine() {
          return this.lightEngine;
-@@ -139,7 +149,7 @@
-                 if (k == this.lastChunkPos[l] && chunkstatus == this.lastChunkStatus[l]) {
-                     IChunkAccess ichunkaccess = this.lastChunk[l];
+@@ -138,7 +148,7 @@
+                 if (k == this.lastChunkPos[l] && leastStatus == this.lastChunkStatus[l]) {
+                     ChunkAccess ichunkaccess = this.lastChunk[l];
  
--                    if (ichunkaccess != null || !flag) {
+-                    if (ichunkaccess != null || !create) {
 +                    if (ichunkaccess != null) { // CraftBukkit - the chunk can become accessible in the meantime TODO for non-null chunks it might also make sense to check that the chunk's state hasn't changed in the meantime
                          return ichunkaccess;
                      }
                  }
-@@ -152,7 +162,7 @@
+@@ -151,7 +161,7 @@
              Objects.requireNonNull(completablefuture);
              chunkproviderserver_b.managedBlock(completablefuture::isDone);
-             ChunkResult<IChunkAccess> chunkresult = (ChunkResult) completablefuture.join();
--            IChunkAccess ichunkaccess1 = (IChunkAccess) chunkresult.orElse((Object) null);
-+            IChunkAccess ichunkaccess1 = (IChunkAccess) chunkresult.orElse(null); // CraftBukkit - decompile error
+             ChunkResult<ChunkAccess> chunkresult = (ChunkResult) completablefuture.join();
+-            ChunkAccess ichunkaccess1 = (ChunkAccess) chunkresult.orElse((Object) null);
++            ChunkAccess ichunkaccess1 = (ChunkAccess) chunkresult.orElse(null); // CraftBukkit - decompile error
  
-             if (ichunkaccess1 == null && flag) {
-                 throw (IllegalStateException) SystemUtils.pauseInIde(new IllegalStateException("Chunk not there when requested: " + chunkresult.getError()));
-@@ -232,7 +242,15 @@
-         int l = ChunkLevel.byStatus(chunkstatus);
-         PlayerChunk playerchunk = this.getVisibleChunkIfPresent(k);
+             if (ichunkaccess1 == null && create) {
+                 throw (IllegalStateException) Util.pauseInIde(new IllegalStateException("Chunk not there when requested: " + chunkresult.getError()));
+@@ -231,7 +241,15 @@
+         int l = ChunkLevel.byStatus(leastStatus);
+         ChunkHolder playerchunk = this.getVisibleChunkIfPresent(k);
  
--        if (flag) {
+-        if (create) {
 +        // CraftBukkit start - don't add new ticket for currently unloading chunk
 +        boolean currentlyUnloading = false;
 +        if (playerchunk != null) {
@@ -47,27 +47,27 @@
 +            FullChunkStatus currentChunkState = ChunkLevel.fullStatus(playerchunk.getTicketLevel());
 +            currentlyUnloading = (oldChunkState.isOrAfter(FullChunkStatus.FULL) && !currentChunkState.isOrAfter(FullChunkStatus.FULL));
 +        }
-+        if (flag && !currentlyUnloading) {
++        if (create && !currentlyUnloading) {
 +            // CraftBukkit end
              this.distanceManager.addTicket(TicketType.UNKNOWN, chunkcoordintpair, l, chunkcoordintpair);
              if (this.chunkAbsent(playerchunk, l)) {
-                 GameProfilerFiller gameprofilerfiller = Profiler.get();
-@@ -251,7 +269,7 @@
+                 ProfilerFiller gameprofilerfiller = Profiler.get();
+@@ -250,7 +268,7 @@
      }
  
-     private boolean chunkAbsent(@Nullable PlayerChunk playerchunk, int i) {
--        return playerchunk == null || playerchunk.getTicketLevel() > i;
-+        return playerchunk == null || playerchunk.oldTicketLevel > i; // CraftBukkit using oldTicketLevel for isLoaded checks
+     private boolean chunkAbsent(@Nullable ChunkHolder holder, int maxLevel) {
+-        return holder == null || holder.getTicketLevel() > maxLevel;
++        return holder == null || holder.oldTicketLevel > maxLevel; // CraftBukkit using oldTicketLevel for isLoaded checks
      }
  
      @Override
-@@ -310,12 +328,34 @@
+@@ -309,11 +327,33 @@
  
      @Override
      public void close() throws IOException {
 -        this.save(true);
 +        // CraftBukkit start
-+        close(true);
++        this.close(true);
 +    }
 +
 +    public void close(boolean save) throws IOException {
@@ -78,11 +78,11 @@
          this.dataStorage.close();
          this.lightEngine.close();
          this.chunkMap.close();
-     }
- 
++    }
++
 +    // CraftBukkit start - modelled on below
 +    public void purgeUnload() {
-+        GameProfilerFiller gameprofilerfiller = Profiler.get();
++        ProfilerFiller gameprofilerfiller = Profiler.get();
 +
 +        gameprofilerfiller.push("purge");
 +        this.distanceManager.purgeStaleTickets();
@@ -91,16 +91,15 @@
 +        this.chunkMap.tick(() -> true);
 +        gameprofilerfiller.pop();
 +        this.clearCache();
-+    }
+     }
 +    // CraftBukkit end
-+
+ 
      @Override
-     public void tick(BooleanSupplier booleansupplier, boolean flag) {
-         GameProfilerFiller gameprofilerfiller = Profiler.get();
-@@ -402,14 +442,14 @@
+     public void tick(BooleanSupplier shouldKeepTicking, boolean tickChunks) {
+@@ -401,14 +441,14 @@
  
          this.lastSpawnState = spawnercreature_d;
-         gameprofilerfiller.popPush("spawnAndTick");
+         profiler.popPush("spawnAndTick");
 -        boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING);
 +        boolean flag = this.level.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING) && !this.level.players().isEmpty(); // CraftBukkit
          int k = this.level.getGameRules().getInt(GameRules.RULE_RANDOMTICKING);
@@ -110,28 +109,31 @@
 -            boolean flag1 = this.level.getLevelData().getGameTime() % 400L == 0L;
 +            boolean flag1 = this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) != 0L && this.level.getLevelData().getGameTime() % this.level.ticksPerSpawnCategory.getLong(org.bukkit.entity.SpawnCategory.ANIMAL) == 0L; // CraftBukkit
  
--            list1 = SpawnerCreature.getFilteredSpawningCategories(spawnercreature_d, this.spawnFriendlies, this.spawnEnemies, flag1);
-+            list1 = SpawnerCreature.getFilteredSpawningCategories(spawnercreature_d, this.spawnFriendlies, this.spawnEnemies, flag1, this.level); // CraftBukkit
+-            list1 = NaturalSpawner.getFilteredSpawningCategories(spawnercreature_d, this.spawnFriendlies, this.spawnEnemies, flag1);
++            list1 = NaturalSpawner.getFilteredSpawningCategories(spawnercreature_d, this.spawnFriendlies, this.spawnEnemies, flag1, this.level); // CraftBukkit
          } else {
              list1 = List.of();
          }
-@@ -542,8 +582,14 @@
+@@ -541,10 +581,16 @@
  
      @Override
-     public void setSpawnSettings(boolean flag) {
-+        // CraftBukkit start
-+        this.setSpawnSettings(flag, this.spawnFriendlies);
-+    }
-+
-+    public void setSpawnSettings(boolean flag, boolean spawnFriendlies) {
-         this.spawnEnemies = flag;
+     public void setSpawnSettings(boolean spawnMonsters) {
+-        this.spawnEnemies = spawnMonsters;
 -        this.spawnFriendlies = this.spawnFriendlies;
-+        this.spawnFriendlies = spawnFriendlies;
-+        // CraftBukkit end
++        // CraftBukkit start
++        this.setSpawnSettings(spawnMonsters, this.spawnFriendlies);
      }
  
-     public String getChunkDebugData(ChunkCoordIntPair chunkcoordintpair) {
-@@ -619,13 +665,19 @@
++    public void setSpawnSettings(boolean flag, boolean spawnFriendlies) {
++        this.spawnEnemies = flag;
++        this.spawnFriendlies = spawnFriendlies;
++        // CraftBukkit end
++    }
++
+     public String getChunkDebugData(ChunkPos pos) {
+         return this.chunkMap.getChunkDebugData(pos);
+     }
+@@ -618,14 +664,20 @@
          }
  
          @Override
@@ -139,16 +141,17 @@
 +        // CraftBukkit start - process pending Chunk loadCallback() and unloadCallback() after each run task
 +        public boolean pollTask() {
 +        try {
-             if (ChunkProviderServer.this.runDistanceManagerUpdates()) {
+             if (ServerChunkCache.this.runDistanceManagerUpdates()) {
                  return true;
              } else {
-                 ChunkProviderServer.this.lightEngine.tryScheduleUpdate();
+                 ServerChunkCache.this.lightEngine.tryScheduleUpdate();
                  return super.pollTask();
              }
 +        } finally {
-+            chunkMap.callbackExecutor.run();
-+        }
-+        // CraftBukkit end
++            ServerChunkCache.this.chunkMap.callbackExecutor.run();
          }
++        // CraftBukkit end
++        }
      }
  
+     private static record ChunkAndHolder(LevelChunk chunk, ChunkHolder holder) {
diff --git a/paper-server/patches/sources/net/minecraft/server/level/EntityTrackerEntry.patch b/paper-server/patches/sources/net/minecraft/server/level/ServerEntity.java.patch
similarity index 51%
rename from paper-server/patches/sources/net/minecraft/server/level/EntityTrackerEntry.patch
rename to paper-server/patches/sources/net/minecraft/server/level/ServerEntity.java.patch
index 1e4584f0ea..2432be13bf 100644
--- a/paper-server/patches/sources/net/minecraft/server/level/EntityTrackerEntry.patch
+++ b/paper-server/patches/sources/net/minecraft/server/level/ServerEntity.java.patch
@@ -1,61 +1,79 @@
---- a/net/minecraft/server/level/EntityTrackerEntry.java
-+++ b/net/minecraft/server/level/EntityTrackerEntry.java
-@@ -50,6 +50,12 @@
- import net.minecraft.world.phys.Vec3D;
+--- a/net/minecraft/server/level/ServerEntity.java
++++ b/net/minecraft/server/level/ServerEntity.java
+@@ -31,7 +31,6 @@
+ import net.minecraft.network.protocol.game.ClientboundUpdateAttributesPacket;
+ import net.minecraft.network.protocol.game.VecDeltaCodec;
+ import net.minecraft.network.syncher.SynchedEntityData;
+-import net.minecraft.util.Mth;
+ import net.minecraft.world.entity.Entity;
+ import net.minecraft.world.entity.EquipmentSlot;
+ import net.minecraft.world.entity.Leashable;
+@@ -50,6 +49,13 @@
+ import net.minecraft.world.phys.Vec3;
  import org.slf4j.Logger;
  
 +// CraftBukkit start
 +import net.minecraft.server.network.ServerPlayerConnection;
++import net.minecraft.util.Mth;
 +import org.bukkit.entity.Player;
 +import org.bukkit.event.player.PlayerVelocityEvent;
 +// CraftBukkit end
 +
- public class EntityTrackerEntry {
+ public class ServerEntity {
  
      private static final Logger LOGGER = LogUtils.getLogger();
-@@ -74,8 +80,12 @@
+@@ -74,13 +80,17 @@
      private boolean wasOnGround;
      @Nullable
-     private List<DataWatcher.c<?>> trackedDataValues;
+     private List<SynchedEntityData.DataValue<?>> trackedDataValues;
 +    // CraftBukkit start
 +    private final Set<ServerPlayerConnection> trackedPlayers;
  
--    public EntityTrackerEntry(WorldServer worldserver, Entity entity, int i, boolean flag, Consumer<Packet<?>> consumer) {
-+    public EntityTrackerEntry(WorldServer worldserver, Entity entity, int i, boolean flag, Consumer<Packet<?>> consumer, Set<ServerPlayerConnection> trackedPlayers) {
+-    public ServerEntity(ServerLevel world, Entity entity, int tickInterval, boolean alwaysUpdateVelocity, Consumer<Packet<?>> receiver) {
+-        this.level = world;
+-        this.broadcast = receiver;
++    public ServerEntity(ServerLevel worldserver, Entity entity, int i, boolean flag, Consumer<Packet<?>> consumer, Set<ServerPlayerConnection> trackedPlayers) {
 +        this.trackedPlayers = trackedPlayers;
 +        // CraftBukkit end
-         this.level = worldserver;
-         this.broadcast = consumer;
++        this.level = worldserver;
++        this.broadcast = consumer;
          this.entity = entity;
+-        this.updateInterval = tickInterval;
+-        this.trackDelta = alwaysUpdateVelocity;
++        this.updateInterval = i;
++        this.trackDelta = flag;
+         this.positionCodec.setBase(entity.trackingPosition());
+         this.lastSentMovement = entity.getDeltaMovement();
+         this.lastSentYRot = Mth.packDegrees(entity.getYRot());
 @@ -94,7 +104,7 @@
          List<Entity> list = this.entity.getPassengers();
  
          if (!list.equals(this.lastPassengers)) {
--            this.broadcast.accept(new PacketPlayOutMount(this.entity));
-+            this.broadcastAndSend(new PacketPlayOutMount(this.entity)); // CraftBukkit
-             removedPassengers(list, this.lastPassengers).forEach((entity) -> {
-                 if (entity instanceof EntityPlayer entityplayer) {
+-            this.broadcast.accept(new ClientboundSetPassengersPacket(this.entity));
++            this.broadcastAndSend(new ClientboundSetPassengersPacket(this.entity)); // CraftBukkit
+             ServerEntity.removedPassengers(list, this.lastPassengers).forEach((entity) -> {
+                 if (entity instanceof ServerPlayer entityplayer) {
                      entityplayer.connection.teleport(entityplayer.getX(), entityplayer.getY(), entityplayer.getZ(), entityplayer.getYRot(), entityplayer.getXRot());
 @@ -107,18 +117,18 @@
          Entity entity = this.entity;
  
-         if (entity instanceof EntityItemFrame entityitemframe) {
+         if (entity instanceof ItemFrame entityitemframe) {
 -            if (this.tickCount % 10 == 0) {
 +            if (true || this.tickCount % 10 == 0) { // CraftBukkit - Moved below, should always enter this block
                  ItemStack itemstack = entityitemframe.getItem();
  
--                if (itemstack.getItem() instanceof ItemWorldMap) {
-+                if (this.tickCount % 10 == 0 && itemstack.getItem() instanceof ItemWorldMap) { // CraftBukkit - Moved this.tickCounter % 10 logic here so item frames do not enter the other blocks
+-                if (itemstack.getItem() instanceof MapItem) {
++                if (this.tickCount % 10 == 0 && itemstack.getItem() instanceof MapItem) { // CraftBukkit - Moved this.tickCounter % 10 logic here so item frames do not enter the other blocks
                      MapId mapid = (MapId) itemstack.get(DataComponents.MAP_ID);
-                     WorldMap worldmap = ItemWorldMap.getSavedData(mapid, this.level);
+                     MapItemSavedData worldmap = MapItem.getSavedData(mapid, this.level);
  
                      if (worldmap != null) {
 -                        Iterator iterator = this.level.players().iterator();
 +                        Iterator<ServerPlayerConnection> iterator = this.trackedPlayers.iterator(); // CraftBukkit
  
                          while (iterator.hasNext()) {
--                            EntityPlayer entityplayer = (EntityPlayer) iterator.next();
-+                            EntityPlayer entityplayer = iterator.next().getPlayer(); // CraftBukkit
+-                            ServerPlayer entityplayer = (ServerPlayer) iterator.next();
++                            ServerPlayer entityplayer = iterator.next().getPlayer(); // CraftBukkit
  
                              worldmap.tickCarriedBy(entityplayer, itemstack);
                              Packet<?> packet = worldmap.getUpdatePacket(mapid, entityplayer);
@@ -66,7 +84,7 @@
 +            // CraftBukkit start - Create PlayerVelocity event
 +            boolean cancelled = false;
 +
-+            if (this.entity instanceof EntityPlayer) {
++            if (this.entity instanceof ServerPlayer) {
 +                Player player = (Player) this.entity.getBukkitEntity();
 +                org.bukkit.util.Vector velocity = player.getVelocity();
 +
@@ -85,50 +103,50 @@
 +            }
 +            // CraftBukkit end
              this.entity.hurtMarked = false;
-             this.broadcastAndSend(new PacketPlayOutEntityVelocity(this.entity));
+             this.broadcastAndSend(new ClientboundSetEntityMotionPacket(this.entity));
          }
 @@ -298,7 +329,10 @@
  
-     public void sendPairingData(EntityPlayer entityplayer, Consumer<Packet<PacketListenerPlayOut>> consumer) {
+     public void sendPairingData(ServerPlayer player, Consumer<Packet<ClientGamePacketListener>> sender) {
          if (this.entity.isRemoved()) {
--            EntityTrackerEntry.LOGGER.warn("Fetching packet for removed entity {}", this.entity);
+-            ServerEntity.LOGGER.warn("Fetching packet for removed entity {}", this.entity);
 +            // CraftBukkit start - Remove useless error spam, just return
 +            // EntityTrackerEntry.LOGGER.warn("Fetching packet for removed entity {}", this.entity);
 +            return;
 +            // CraftBukkit end
          }
  
-         Packet<PacketListenerPlayOut> packet = this.entity.getAddEntityPacket(this);
+         Packet<ClientGamePacketListener> packet = this.entity.getAddEntityPacket(this);
 @@ -313,6 +347,12 @@
-         if (this.entity instanceof EntityLiving) {
-             Collection<AttributeModifiable> collection = ((EntityLiving) this.entity).getAttributes().getSyncableAttributes();
+         if (this.entity instanceof LivingEntity) {
+             Collection<AttributeInstance> collection = ((LivingEntity) this.entity).getAttributes().getSyncableAttributes();
  
 +            // CraftBukkit start - If sending own attributes send scaled health instead of current maximum health
-+            if (this.entity.getId() == entityplayer.getId()) {
-+                ((EntityPlayer) this.entity).getBukkitEntity().injectScaledMaxHealth(collection, false);
++            if (this.entity.getId() == player.getId()) {
++                ((ServerPlayer) this.entity).getBukkitEntity().injectScaledMaxHealth(collection, false);
 +            }
 +            // CraftBukkit end
 +
              if (!collection.isEmpty()) {
-                 consumer.accept(new PacketPlayOutUpdateAttributes(this.entity.getId(), collection));
+                 sender.accept(new ClientboundUpdateAttributesPacket(this.entity.getId(), collection));
              }
 @@ -344,6 +384,7 @@
              if (!list.isEmpty()) {
-                 consumer.accept(new PacketPlayOutEntityEquipment(this.entity.getId(), list));
+                 sender.accept(new ClientboundSetEquipmentPacket(this.entity.getId(), list));
              }
-+            ((EntityLiving) this.entity).detectEquipmentUpdatesPublic(); // CraftBukkit - SPIGOT-3789: sync again immediately after sending
++            ((LivingEntity) this.entity).detectEquipmentUpdatesPublic(); // CraftBukkit - SPIGOT-3789: sync again immediately after sending
          }
  
          if (!this.entity.getPassengers().isEmpty()) {
 @@ -396,6 +437,11 @@
-             Set<AttributeModifiable> set = ((EntityLiving) this.entity).getAttributes().getAttributesToSync();
+             Set<AttributeInstance> set = ((LivingEntity) this.entity).getAttributes().getAttributesToSync();
  
              if (!set.isEmpty()) {
 +                // CraftBukkit start - Send scaled max health
-+                if (this.entity instanceof EntityPlayer) {
-+                    ((EntityPlayer) this.entity).getBukkitEntity().injectScaledMaxHealth(set, false);
++                if (this.entity instanceof ServerPlayer) {
++                    ((ServerPlayer) this.entity).getBukkitEntity().injectScaledMaxHealth(set, false);
 +                }
 +                // CraftBukkit end
-                 this.broadcastAndSend(new PacketPlayOutUpdateAttributes(this.entity.getId(), set));
+                 this.broadcastAndSend(new ClientboundUpdateAttributesPacket(this.entity.getId(), set));
              }
  
diff --git a/paper-server/patches/sources/net/minecraft/server/level/ServerLevel.java.patch b/paper-server/patches/sources/net/minecraft/server/level/ServerLevel.java.patch
new file mode 100644
index 0000000000..88d306b6fb
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/level/ServerLevel.java.patch
@@ -0,0 +1,725 @@
+--- a/net/minecraft/server/level/ServerLevel.java
++++ b/net/minecraft/server/level/ServerLevel.java
+@@ -58,7 +58,6 @@
+ import net.minecraft.network.protocol.game.ClientboundDamageEventPacket;
+ import net.minecraft.network.protocol.game.ClientboundEntityEventPacket;
+ import net.minecraft.network.protocol.game.ClientboundExplodePacket;
+-import net.minecraft.network.protocol.game.ClientboundGameEventPacket;
+ import net.minecraft.network.protocol.game.ClientboundLevelEventPacket;
+ import net.minecraft.network.protocol.game.ClientboundLevelParticlesPacket;
+ import net.minecraft.network.protocol.game.ClientboundSetDefaultSpawnPositionPacket;
+@@ -124,6 +123,7 @@
+ import net.minecraft.world.level.StructureManager;
+ import net.minecraft.world.level.WorldGenLevel;
+ import net.minecraft.world.level.biome.Biome;
++import net.minecraft.world.level.biome.BiomeSource;
+ import net.minecraft.world.level.block.Block;
+ import net.minecraft.world.level.block.Blocks;
+ import net.minecraft.world.level.block.SnowLayerBlock;
+@@ -149,7 +149,9 @@
+ import net.minecraft.world.level.gameevent.DynamicGameEventListener;
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import net.minecraft.world.level.gameevent.GameEventDispatcher;
++import net.minecraft.world.level.levelgen.FlatLevelSource;
+ import net.minecraft.world.level.levelgen.Heightmap;
++import net.minecraft.world.level.levelgen.NoiseBasedChunkGenerator;
+ import net.minecraft.world.level.levelgen.structure.BoundingBox;
+ import net.minecraft.world.level.levelgen.structure.Structure;
+ import net.minecraft.world.level.levelgen.structure.StructureCheck;
+@@ -165,7 +167,7 @@
+ import net.minecraft.world.level.saveddata.maps.MapItemSavedData;
+ import net.minecraft.world.level.storage.DimensionDataStorage;
+ import net.minecraft.world.level.storage.LevelStorageSource;
+-import net.minecraft.world.level.storage.ServerLevelData;
++import net.minecraft.world.level.storage.PrimaryLevelData;
+ import net.minecraft.world.phys.AABB;
+ import net.minecraft.world.phys.Vec3;
+ import net.minecraft.world.phys.shapes.BooleanOp;
+@@ -173,6 +175,16 @@
+ import net.minecraft.world.phys.shapes.VoxelShape;
+ import net.minecraft.world.ticks.LevelTicks;
+ import org.slf4j.Logger;
++import org.bukkit.Bukkit;
++import org.bukkit.WeatherType;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.craftbukkit.generator.CustomWorldChunkManager;
++import org.bukkit.craftbukkit.util.WorldUUID;
++import org.bukkit.event.entity.CreatureSpawnEvent;
++import org.bukkit.event.server.MapInitializeEvent;
++import org.bukkit.event.weather.LightningStrikeEvent;
++import org.bukkit.event.world.TimeSkipEvent;
++// CraftBukkit end
+ 
+ public class ServerLevel extends Level implements ServerEntityGetter, WorldGenLevel {
+ 
+@@ -187,7 +199,7 @@
+     final List<ServerPlayer> players = Lists.newArrayList();
+     public final ServerChunkCache chunkSource;
+     private final MinecraftServer server;
+-    public final ServerLevelData serverLevelData;
++    public final PrimaryLevelData serverLevelData; // CraftBukkit - type
+     private int lastSpawnChunkRadius;
+     final EntityTickList entityTickList = new EntityTickList();
+     public final PersistentEntitySectionManager<Entity> entityManager;
+@@ -214,52 +226,87 @@
+     private final boolean tickTime;
+     private final RandomSequences randomSequences;
+ 
+-    public ServerLevel(MinecraftServer server, Executor workerExecutor, LevelStorageSource.LevelStorageAccess session, ServerLevelData properties, ResourceKey<Level> worldKey, LevelStem dimensionOptions, ChunkProgressListener worldGenerationProgressListener, boolean debugWorld, long seed, List<CustomSpawner> spawners, boolean shouldTickTime, @Nullable RandomSequences randomSequencesState) {
+-        super(properties, worldKey, server.registryAccess(), dimensionOptions.type(), false, debugWorld, seed, server.getMaxChainedNeighborUpdates());
+-        this.tickTime = shouldTickTime;
+-        this.server = server;
+-        this.customSpawners = spawners;
+-        this.serverLevelData = properties;
+-        ChunkGenerator chunkgenerator = dimensionOptions.generator();
+-        boolean flag2 = server.forceSynchronousWrites();
+-        DataFixer datafixer = server.getFixerUpper();
+-        EntityPersistentStorage<Entity> entitypersistentstorage = new EntityStorage(new SimpleRegionStorage(new RegionStorageInfo(session.getLevelId(), worldKey, "entities"), session.getDimensionPath(worldKey).resolve("entities"), datafixer, flag2, DataFixTypes.ENTITY_CHUNK), this, server);
++    // CraftBukkit start
++    public final LevelStorageSource.LevelStorageAccess convertable;
++    public final UUID uuid;
++
++    public LevelChunk getChunkIfLoaded(int x, int z) {
++        return this.chunkSource.getChunk(x, z, false);
++    }
++
++    @Override
++    public ResourceKey<LevelStem> getTypeKey() {
++        return this.convertable.dimensionType;
++    }
++
++    // Add env and gen to constructor, IWorldDataServer -> WorldDataServer
++    public ServerLevel(MinecraftServer minecraftserver, Executor executor, LevelStorageSource.LevelStorageAccess convertable_conversionsession, PrimaryLevelData iworlddataserver, ResourceKey<Level> resourcekey, LevelStem worlddimension, ChunkProgressListener worldloadlistener, boolean flag, long i, List<CustomSpawner> list, boolean flag1, @Nullable RandomSequences randomsequences, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
++        super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env);
++        this.pvpMode = minecraftserver.isPvpAllowed();
++        this.convertable = convertable_conversionsession;
++        this.uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile());
++        // CraftBukkit end
++        this.tickTime = flag1;
++        this.server = minecraftserver;
++        this.customSpawners = list;
++        this.serverLevelData = iworlddataserver;
++        ChunkGenerator chunkgenerator = worlddimension.generator();
++        // CraftBukkit start
++        this.serverLevelData.setWorld(this);
+ 
++        if (biomeProvider != null) {
++            BiomeSource worldChunkManager = new CustomWorldChunkManager(this.getWorld(), biomeProvider, this.server.registryAccess().lookupOrThrow(Registries.BIOME));
++            if (chunkgenerator instanceof NoiseBasedChunkGenerator cga) {
++                chunkgenerator = new NoiseBasedChunkGenerator(worldChunkManager, cga.settings);
++            } else if (chunkgenerator instanceof FlatLevelSource cpf) {
++                chunkgenerator = new FlatLevelSource(cpf.settings(), worldChunkManager);
++            }
++        }
++
++        if (gen != null) {
++            chunkgenerator = new org.bukkit.craftbukkit.generator.CustomChunkGenerator(this, chunkgenerator, gen);
++        }
++        // CraftBukkit end
++        boolean flag2 = minecraftserver.forceSynchronousWrites();
++        DataFixer datafixer = minecraftserver.getFixerUpper();
++        EntityPersistentStorage<Entity> entitypersistentstorage = new EntityStorage(new SimpleRegionStorage(new RegionStorageInfo(convertable_conversionsession.getLevelId(), resourcekey, "entities"), convertable_conversionsession.getDimensionPath(resourcekey).resolve("entities"), datafixer, flag2, DataFixTypes.ENTITY_CHUNK), this, minecraftserver);
++
+         this.entityManager = new PersistentEntitySectionManager<>(Entity.class, new ServerLevel.EntityCallbacks(), entitypersistentstorage);
+-        StructureTemplateManager structuretemplatemanager = server.getStructureManager();
+-        int j = server.getPlayerList().getViewDistance();
+-        int k = server.getPlayerList().getSimulationDistance();
++        StructureTemplateManager structuretemplatemanager = minecraftserver.getStructureManager();
++        int j = minecraftserver.getPlayerList().getViewDistance();
++        int k = minecraftserver.getPlayerList().getSimulationDistance();
+         PersistentEntitySectionManager persistententitysectionmanager = this.entityManager;
+ 
+         Objects.requireNonNull(this.entityManager);
+-        this.chunkSource = new ServerChunkCache(this, session, datafixer, structuretemplatemanager, workerExecutor, chunkgenerator, j, k, flag2, worldGenerationProgressListener, persistententitysectionmanager::updateChunkStatus, () -> {
+-            return server.overworld().getDataStorage();
++        this.chunkSource = new ServerChunkCache(this, convertable_conversionsession, datafixer, structuretemplatemanager, executor, chunkgenerator, j, k, flag2, worldloadlistener, persistententitysectionmanager::updateChunkStatus, () -> {
++            return minecraftserver.overworld().getDataStorage();
+         });
+         this.chunkSource.getGeneratorState().ensureStructuresGenerated();
+         this.portalForcer = new PortalForcer(this);
+         this.updateSkyBrightness();
+         this.prepareWeather();
+-        this.getWorldBorder().setAbsoluteMaxSize(server.getAbsoluteMaxWorldSize());
++        this.getWorldBorder().setAbsoluteMaxSize(minecraftserver.getAbsoluteMaxWorldSize());
+         this.raids = (Raids) this.getDataStorage().computeIfAbsent(Raids.factory(this), Raids.getFileId(this.dimensionTypeRegistration()));
+-        if (!server.isSingleplayer()) {
+-            properties.setGameType(server.getDefaultGameType());
++        if (!minecraftserver.isSingleplayer()) {
++            iworlddataserver.setGameType(minecraftserver.getDefaultGameType());
+         }
+ 
+-        long l = server.getWorldData().worldGenOptions().seed();
++        long l = minecraftserver.getWorldData().worldGenOptions().seed();
+ 
+-        this.structureCheck = new StructureCheck(this.chunkSource.chunkScanner(), this.registryAccess(), server.getStructureManager(), worldKey, chunkgenerator, this.chunkSource.randomState(), this, chunkgenerator.getBiomeSource(), l, datafixer);
+-        this.structureManager = new StructureManager(this, server.getWorldData().worldGenOptions(), this.structureCheck);
+-        if (this.dimension() == Level.END && this.dimensionTypeRegistration().is(BuiltinDimensionTypes.END)) {
+-            this.dragonFight = new EndDragonFight(this, l, server.getWorldData().endDragonFightData());
++        this.structureCheck = new StructureCheck(this.chunkSource.chunkScanner(), this.registryAccess(), minecraftserver.getStructureManager(), resourcekey, chunkgenerator, this.chunkSource.randomState(), this, chunkgenerator.getBiomeSource(), l, datafixer);
++        this.structureManager = new StructureManager(this, this.serverLevelData.worldGenOptions(), this.structureCheck); // CraftBukkit
++        if ((this.dimension() == Level.END && this.dimensionTypeRegistration().is(BuiltinDimensionTypes.END)) || env == org.bukkit.World.Environment.THE_END) { // CraftBukkit - Allow to create EnderDragonBattle in default and custom END
++            this.dragonFight = new EndDragonFight(this, this.serverLevelData.worldGenOptions().seed(), this.serverLevelData.endDragonFightData()); // CraftBukkit
+         } else {
+             this.dragonFight = null;
+         }
+ 
+         this.sleepStatus = new SleepStatus();
+         this.gameEventDispatcher = new GameEventDispatcher(this);
+-        this.randomSequences = (RandomSequences) Objects.requireNonNullElseGet(randomSequencesState, () -> {
++        this.randomSequences = (RandomSequences) Objects.requireNonNullElseGet(randomsequences, () -> {
+             return (RandomSequences) this.getDataStorage().computeIfAbsent(RandomSequences.factory(l), "random_sequences");
+         });
++        this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit
+     }
+ 
+     /** @deprecated */
+@@ -305,12 +352,20 @@
+         long j;
+ 
+         if (this.sleepStatus.areEnoughSleeping(i) && this.sleepStatus.areEnoughDeepSleeping(i, this.players)) {
+-            if (this.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)) {
+-                j = this.levelData.getDayTime() + 24000L;
+-                this.setDayTime(j - j % 24000L);
++            // CraftBukkit start
++            j = this.levelData.getDayTime() + 24000L;
++            TimeSkipEvent event = new TimeSkipEvent(this.getWorld(), TimeSkipEvent.SkipReason.NIGHT_SKIP, (j - j % 24000L) - this.getDayTime());
++            if (this.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)) {
++                this.getCraftServer().getPluginManager().callEvent(event);
++                if (!event.isCancelled()) {
++                    this.setDayTime(this.getDayTime() + event.getSkipAmount());
++                }
+             }
+ 
+-            this.wakeUpAllPlayers();
++            if (!event.isCancelled()) {
++                this.wakeUpAllPlayers();
++            }
++            // CraftBukkit end
+             if (this.getGameRules().getBoolean(GameRules.RULE_WEATHER_CYCLE) && this.isRaining()) {
+                 this.resetWeatherCycle();
+             }
+@@ -345,7 +400,7 @@
+ 
+         this.handlingTick = false;
+         gameprofilerfiller.pop();
+-        boolean flag1 = !this.players.isEmpty() || !this.getForcedChunks().isEmpty();
++        boolean flag1 = true || !this.players.isEmpty() || !this.getForcedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players
+ 
+         if (flag1) {
+             this.resetEmptyTime();
+@@ -429,7 +484,7 @@
+ 
+     private void wakeUpAllPlayers() {
+         this.sleepStatus.removeAllSleepers();
+-        ((List) this.players.stream().filter(LivingEntity::isSleeping).collect(Collectors.toList())).forEach((entityplayer) -> {
++        (this.players.stream().filter(LivingEntity::isSleeping).collect(Collectors.toList())).forEach((entityplayer) -> { // CraftBukkit - decompile error
+             entityplayer.stopSleepInBed(false, false);
+         });
+     }
+@@ -456,7 +511,7 @@
+                         entityhorseskeleton.setTrap(true);
+                         entityhorseskeleton.setAge(0);
+                         entityhorseskeleton.setPos((double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ());
+-                        this.addFreshEntity(entityhorseskeleton);
++                        this.addFreshEntity(entityhorseskeleton, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.LIGHTNING); // CraftBukkit
+                     }
+                 }
+ 
+@@ -465,7 +520,7 @@
+                 if (entitylightning != null) {
+                     entitylightning.moveTo(Vec3.atBottomCenterOf(blockposition));
+                     entitylightning.setVisualOnly(flag1);
+-                    this.addFreshEntity(entitylightning);
++                    this.strikeLightning(entitylightning, org.bukkit.event.weather.LightningStrikeEvent.Cause.WEATHER); // CraftBukkit
+                 }
+             }
+         }
+@@ -521,7 +576,7 @@
+         Biome biomebase = (Biome) this.getBiome(blockposition1).value();
+ 
+         if (biomebase.shouldFreeze(this, blockposition2)) {
+-            this.setBlockAndUpdate(blockposition2, Blocks.ICE.defaultBlockState());
++            org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this, blockposition2, Blocks.ICE.defaultBlockState(), null); // CraftBukkit
+         }
+ 
+         if (this.isRaining()) {
+@@ -537,10 +592,10 @@
+                         BlockState iblockdata1 = (BlockState) iblockdata.setValue(SnowLayerBlock.LAYERS, j + 1);
+ 
+                         Block.pushEntitiesUp(iblockdata, iblockdata1, this, blockposition1);
+-                        this.setBlockAndUpdate(blockposition1, iblockdata1);
++                        org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this, blockposition1, iblockdata1, null); // CraftBukkit
+                     }
+                 } else {
+-                    this.setBlockAndUpdate(blockposition1, Blocks.SNOW.defaultBlockState());
++                    org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this, blockposition1, Blocks.SNOW.defaultBlockState(), null); // CraftBukkit
+                 }
+             }
+ 
+@@ -701,33 +756,67 @@
+             this.rainLevel = Mth.clamp(this.rainLevel, 0.0F, 1.0F);
+         }
+ 
++        /* CraftBukkit start
+         if (this.oRainLevel != this.rainLevel) {
+-            this.server.getPlayerList().broadcastAll(new ClientboundGameEventPacket(ClientboundGameEventPacket.RAIN_LEVEL_CHANGE, this.rainLevel), this.dimension());
++            this.server.getPlayerList().broadcastAll(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.RAIN_LEVEL_CHANGE, this.rainLevel), this.dimension());
+         }
+ 
+         if (this.oThunderLevel != this.thunderLevel) {
+-            this.server.getPlayerList().broadcastAll(new ClientboundGameEventPacket(ClientboundGameEventPacket.THUNDER_LEVEL_CHANGE, this.thunderLevel), this.dimension());
++            this.server.getPlayerList().broadcastAll(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.THUNDER_LEVEL_CHANGE, this.thunderLevel), this.dimension());
+         }
+ 
+         if (flag != this.isRaining()) {
+             if (flag) {
+-                this.server.getPlayerList().broadcastAll(new ClientboundGameEventPacket(ClientboundGameEventPacket.STOP_RAINING, 0.0F));
++                this.server.getPlayerList().broadcastAll(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.STOP_RAINING, 0.0F));
+             } else {
+-                this.server.getPlayerList().broadcastAll(new ClientboundGameEventPacket(ClientboundGameEventPacket.START_RAINING, 0.0F));
++                this.server.getPlayerList().broadcastAll(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.START_RAINING, 0.0F));
+             }
+ 
+-            this.server.getPlayerList().broadcastAll(new ClientboundGameEventPacket(ClientboundGameEventPacket.RAIN_LEVEL_CHANGE, this.rainLevel));
+-            this.server.getPlayerList().broadcastAll(new ClientboundGameEventPacket(ClientboundGameEventPacket.THUNDER_LEVEL_CHANGE, this.thunderLevel));
++            this.server.getPlayerList().broadcastAll(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.RAIN_LEVEL_CHANGE, this.rainLevel));
++            this.server.getPlayerList().broadcastAll(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.THUNDER_LEVEL_CHANGE, this.thunderLevel));
+         }
++        // */
++        for (int idx = 0; idx < this.players.size(); ++idx) {
++            if (((ServerPlayer) this.players.get(idx)).level() == this) {
++                ((ServerPlayer) this.players.get(idx)).tickWeather();
++            }
++        }
+ 
++        if (flag != this.isRaining()) {
++            // Only send weather packets to those affected
++            for (int idx = 0; idx < this.players.size(); ++idx) {
++                if (((ServerPlayer) this.players.get(idx)).level() == this) {
++                    ((ServerPlayer) this.players.get(idx)).setPlayerWeather((!flag ? WeatherType.DOWNFALL : WeatherType.CLEAR), false);
++                }
++            }
++        }
++        for (int idx = 0; idx < this.players.size(); ++idx) {
++            if (((ServerPlayer) this.players.get(idx)).level() == this) {
++                ((ServerPlayer) this.players.get(idx)).updateWeather(this.oRainLevel, this.rainLevel, this.oThunderLevel, this.thunderLevel);
++            }
++        }
++        // CraftBukkit end
++
+     }
+ 
+     @VisibleForTesting
+     public void resetWeatherCycle() {
+-        this.serverLevelData.setRainTime(0);
++        // CraftBukkit start
+         this.serverLevelData.setRaining(false);
+-        this.serverLevelData.setThunderTime(0);
++        // If we stop due to everyone sleeping we should reset the weather duration to some other random value.
++        // Not that everyone ever manages to get the whole server to sleep at the same time....
++        if (!this.serverLevelData.isRaining()) {
++            this.serverLevelData.setRainTime(0);
++        }
++        // CraftBukkit end
+         this.serverLevelData.setThundering(false);
++        // CraftBukkit start
++        // If we stop due to everyone sleeping we should reset the weather duration to some other random value.
++        // Not that everyone ever manages to get the whole server to sleep at the same time....
++        if (!this.serverLevelData.isThundering()) {
++            this.serverLevelData.setThunderTime(0);
++        }
++        // CraftBukkit end
+     }
+ 
+     public void resetEmptyTime() {
+@@ -763,6 +852,7 @@
+         });
+         gameprofilerfiller.incrementCounter("tickNonPassenger");
+         entity.tick();
++        entity.postTick(); // CraftBukkit
+         gameprofilerfiller.pop();
+         Iterator iterator = entity.getPassengers().iterator();
+ 
+@@ -786,6 +876,7 @@
+                 });
+                 gameprofilerfiller.incrementCounter("tickPassenger");
+                 passenger.rideTick();
++                passenger.postTick(); // CraftBukkit
+                 gameprofilerfiller.pop();
+                 Iterator iterator = passenger.getPassengers().iterator();
+ 
+@@ -810,6 +901,7 @@
+         ServerChunkCache chunkproviderserver = this.getChunkSource();
+ 
+         if (!savingDisabled) {
++            org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(this.getWorld())); // CraftBukkit
+             if (progressListener != null) {
+                 progressListener.progressStartNoAbort(Component.translatable("menu.savingLevel"));
+             }
+@@ -827,11 +919,19 @@
+             }
+ 
+         }
++
++        // CraftBukkit start - moved from MinecraftServer.saveChunks
++        ServerLevel worldserver1 = this;
++
++        this.serverLevelData.setWorldBorder(worldserver1.getWorldBorder().createSettings());
++        this.serverLevelData.setCustomBossEvents(this.server.getCustomBossEvents().save(this.registryAccess()));
++        this.convertable.saveDataTag(this.server.registryAccess(), this.serverLevelData, this.server.getPlayerList().getSingleplayerData());
++        // CraftBukkit end
+     }
+ 
+     private void saveLevelData(boolean flush) {
+         if (this.dragonFight != null) {
+-            this.server.getWorldData().setEndDragonFightData(this.dragonFight.saveData());
++            this.serverLevelData.setEndDragonFightData(this.dragonFight.saveData()); // CraftBukkit
+         }
+ 
+         DimensionDataStorage worldpersistentdata = this.getChunkSource().getDataStorage();
+@@ -903,18 +1003,40 @@
+ 
+     @Override
+     public boolean addFreshEntity(Entity entity) {
+-        return this.addEntity(entity);
++        // CraftBukkit start
++        return this.addFreshEntity(entity, CreatureSpawnEvent.SpawnReason.DEFAULT);
+     }
+ 
++    @Override
++    public boolean addFreshEntity(Entity entity, CreatureSpawnEvent.SpawnReason reason) {
++        return this.addEntity(entity, reason);
++        // CraftBukkit end
++    }
++
+     public boolean addWithUUID(Entity entity) {
+-        return this.addEntity(entity);
++        // CraftBukkit start
++        return this.addWithUUID(entity, CreatureSpawnEvent.SpawnReason.DEFAULT);
+     }
+ 
++    public boolean addWithUUID(Entity entity, CreatureSpawnEvent.SpawnReason reason) {
++        return this.addEntity(entity, reason);
++        // CraftBukkit end
++    }
++
+     public void addDuringTeleport(Entity entity) {
++        // CraftBukkit start
++        // SPIGOT-6415: Don't call spawn event for entities which travel trough worlds,
++        // since it is only an implementation detail, that a new entity is created when
++        // they are traveling between worlds.
++        this.addDuringTeleport(entity, null);
++    }
++
++    public void addDuringTeleport(Entity entity, CreatureSpawnEvent.SpawnReason reason) {
++        // CraftBukkit end
+         if (entity instanceof ServerPlayer entityplayer) {
+             this.addPlayer(entityplayer);
+         } else {
+-            this.addEntity(entity);
++            this.addEntity(entity, reason); // CraftBukkit
+         }
+ 
+     }
+@@ -939,24 +1061,37 @@
+         this.entityManager.addNewEntity(player);
+     }
+ 
+-    private boolean addEntity(Entity entity) {
++    // CraftBukkit start
++    private boolean addEntity(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) {
+         if (entity.isRemoved()) {
+-            ServerLevel.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityType.getKey(entity.getType()));
++            // WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
+             return false;
+         } else {
++            // SPIGOT-6415: Don't call spawn event when reason is null. For example when an entity teleports to a new world.
++            if (spawnReason != null && !CraftEventFactory.doEntityAddEventCalling(this, entity, spawnReason)) {
++                return false;
++            }
++            // CraftBukkit end
++
+             return this.entityManager.addNewEntity(entity);
+         }
+     }
+ 
+     public boolean tryAddFreshEntityWithPassengers(Entity entity) {
+-        Stream stream = entity.getSelfAndPassengers().map(Entity::getUUID);
++        // CraftBukkit start
++        return this.tryAddFreshEntityWithPassengers(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT);
++    }
++
++    public boolean tryAddFreshEntityWithPassengers(Entity entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) {
++        // CraftBukkit end
++        Stream<UUID> stream = entity.getSelfAndPassengers().map(Entity::getUUID); // CraftBukkit - decompile error
+         PersistentEntitySectionManager persistententitysectionmanager = this.entityManager;
+ 
+         Objects.requireNonNull(this.entityManager);
+         if (stream.anyMatch(persistententitysectionmanager::isLoaded)) {
+             return false;
+         } else {
+-            this.addFreshEntityWithPassengers(entity);
++            this.addFreshEntityWithPassengers(entity, reason); // CraftBukkit
+             return true;
+         }
+     }
+@@ -967,13 +1102,35 @@
+     }
+ 
+     public void removePlayerImmediately(ServerPlayer player, Entity.RemovalReason reason) {
+-        player.remove(reason);
++        player.remove(reason, null); // CraftBukkit - add Bukkit remove cause
+     }
+ 
++    // CraftBukkit start
++    public boolean strikeLightning(Entity entitylightning) {
++        return this.strikeLightning(entitylightning, LightningStrikeEvent.Cause.UNKNOWN);
++    }
++
++    public boolean strikeLightning(Entity entitylightning, LightningStrikeEvent.Cause cause) {
++        LightningStrikeEvent lightning = CraftEventFactory.callLightningStrikeEvent((org.bukkit.entity.LightningStrike) entitylightning.getBukkitEntity(), cause);
++
++        if (lightning.isCancelled()) {
++            return false;
++        }
++
++        return this.addFreshEntity(entitylightning);
++    }
++    // CraftBukkit end
++
+     @Override
+     public void destroyBlockProgress(int entityId, BlockPos pos, int progress) {
+         Iterator iterator = this.server.getPlayerList().getPlayers().iterator();
+ 
++        // CraftBukkit start
++        Player entityhuman = null;
++        Entity entity = this.getEntity(entityId);
++        if (entity instanceof Player) entityhuman = (Player) entity;
++        // CraftBukkit end
++
+         while (iterator.hasNext()) {
+             ServerPlayer entityplayer = (ServerPlayer) iterator.next();
+ 
+@@ -982,6 +1139,12 @@
+                 double d1 = (double) pos.getY() - entityplayer.getY();
+                 double d2 = (double) pos.getZ() - entityplayer.getZ();
+ 
++                // CraftBukkit start
++                if (entityhuman != null && !entityplayer.getBukkitEntity().canSee(entityhuman.getBukkitEntity())) {
++                    continue;
++                }
++                // CraftBukkit end
++
+                 if (d0 * d0 + d1 * d1 + d2 * d2 < 1024.0D) {
+                     entityplayer.connection.send(new ClientboundBlockDestructionPacket(entityId, pos, progress));
+                 }
+@@ -1060,7 +1223,18 @@
+             Iterator iterator = this.navigatingMobs.iterator();
+ 
+             while (iterator.hasNext()) {
+-                Mob entityinsentient = (Mob) iterator.next();
++                // CraftBukkit start - fix SPIGOT-6362
++                Mob entityinsentient;
++                try {
++                    entityinsentient = (Mob) iterator.next();
++                } catch (java.util.ConcurrentModificationException ex) {
++                    // This can happen because the pathfinder update below may trigger a chunk load, which in turn may cause more navigators to register
++                    // In this case we just run the update again across all the iterators as the chunk will then be loaded
++                    // As this is a relative edge case it is much faster than copying navigators (on either read or write)
++                    this.sendBlockUpdated(pos, oldState, newState, flags);
++                    return;
++                }
++                // CraftBukkit end
+                 PathNavigation navigationabstract = entityinsentient.getNavigation();
+ 
+                 if (navigationabstract.shouldRecomputePath(pos)) {
+@@ -1126,9 +1300,15 @@
+ 
+     @Override
+     public void explode(@Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionDamageCalculator behavior, double x, double y, double z, float power, boolean createFire, Level.ExplosionInteraction explosionSourceType, ParticleOptions smallParticle, ParticleOptions largeParticle, Holder<SoundEvent> soundEvent) {
++        // CraftBukkit start
++        this.explode0(entity, damageSource, behavior, x, y, z, power, createFire, explosionSourceType, smallParticle, largeParticle, soundEvent);
++    }
++
++    public ServerExplosion explode0(@Nullable Entity entity, @Nullable DamageSource damagesource, @Nullable ExplosionDamageCalculator explosiondamagecalculator, double d0, double d1, double d2, float f, boolean flag, Level.ExplosionInteraction world_a, ParticleOptions particleparam, ParticleOptions particleparam1, Holder<SoundEvent> holder) {
++        // CraftBukkit end
+         Explosion.BlockInteraction explosion_effect;
+ 
+-        switch (explosionSourceType) {
++        switch (world_a) {
+             case NONE:
+                 explosion_effect = Explosion.BlockInteraction.KEEP;
+                 break;
+@@ -1144,16 +1324,26 @@
+             case TRIGGER:
+                 explosion_effect = Explosion.BlockInteraction.TRIGGER_BLOCK;
+                 break;
++            // CraftBukkit start - handle custom explosion type
++            case STANDARD:
++                explosion_effect = Explosion.BlockInteraction.DESTROY;
++                break;
++            // CraftBukkit end
+             default:
+                 throw new MatchException((String) null, (Throwable) null);
+         }
+ 
+         Explosion.BlockInteraction explosion_effect1 = explosion_effect;
+-        Vec3 vec3d = new Vec3(x, y, z);
+-        ServerExplosion serverexplosion = new ServerExplosion(this, entity, damageSource, behavior, vec3d, power, createFire, explosion_effect1);
++        Vec3 vec3d = new Vec3(d0, d1, d2);
++        ServerExplosion serverexplosion = new ServerExplosion(this, entity, damagesource, explosiondamagecalculator, vec3d, f, flag, explosion_effect1);
+ 
+         serverexplosion.explode();
+-        ParticleOptions particleparam2 = serverexplosion.isSmall() ? smallParticle : largeParticle;
++        // CraftBukkit start
++        if (serverexplosion.wasCanceled) {
++            return serverexplosion;
++        }
++        // CraftBukkit end
++        ParticleOptions particleparam2 = serverexplosion.isSmall() ? particleparam : particleparam1;
+         Iterator iterator = this.players.iterator();
+ 
+         while (iterator.hasNext()) {
+@@ -1162,10 +1352,11 @@
+             if (entityplayer.distanceToSqr(vec3d) < 4096.0D) {
+                 Optional<Vec3> optional = Optional.ofNullable((Vec3) serverexplosion.getHitPlayers().get(entityplayer));
+ 
+-                entityplayer.connection.send(new ClientboundExplodePacket(vec3d, optional, particleparam2, soundEvent));
++                entityplayer.connection.send(new ClientboundExplodePacket(vec3d, optional, particleparam2, holder));
+             }
+         }
+ 
++        return serverexplosion; // CraftBukkit
+     }
+ 
+     private Explosion.BlockInteraction getDestroyType(GameRules.Key<GameRules.BooleanValue> decayRule) {
+@@ -1226,17 +1417,24 @@
+     }
+ 
+     public <T extends ParticleOptions> int sendParticles(T parameters, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double speed) {
+-        return this.sendParticles(parameters, false, false, x, y, z, count, offsetX, offsetY, offsetZ, speed);
++        return this.sendParticlesSource(null, parameters, false, false, x, y, z, count, offsetX, offsetY, offsetZ, speed); // CraftBukkit - visibility api support
+     }
+ 
+     public <T extends ParticleOptions> int sendParticles(T parameters, boolean force, boolean important, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double speed) {
+-        ClientboundLevelParticlesPacket packetplayoutworldparticles = new ClientboundLevelParticlesPacket(parameters, force, important, x, y, z, (float) offsetX, (float) offsetY, (float) offsetZ, (float) speed, count);
++        return this.sendParticlesSource(null, parameters, force, important, x, y, z, count, offsetX, offsetY, offsetZ, speed); // CraftBukkit - visibility api support
++    }
++
++    // CraftBukkit start - visibility api support
++    public <T extends ParticleOptions> int sendParticlesSource(ServerPlayer sender, T t0, boolean flag, boolean flag1, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6) {
++        // CraftBukkit end
++        ClientboundLevelParticlesPacket packetplayoutworldparticles = new ClientboundLevelParticlesPacket(t0, flag, flag1, d0, d1, d2, (float) d3, (float) d4, (float) d5, (float) d6, i);
+         int j = 0;
+ 
+         for (int k = 0; k < this.players.size(); ++k) {
+             ServerPlayer entityplayer = (ServerPlayer) this.players.get(k);
++            if (sender != null && !entityplayer.getBukkitEntity().canSee(sender.getBukkitEntity())) continue; // CraftBukkit
+ 
+-            if (this.sendParticles(entityplayer, force, x, y, z, packetplayoutworldparticles)) {
++            if (this.sendParticles(entityplayer, flag, d0, d1, d2, packetplayoutworldparticles)) {
+                 ++j;
+             }
+         }
+@@ -1292,7 +1490,7 @@
+ 
+     @Nullable
+     public BlockPos findNearestMapStructure(TagKey<Structure> structureTag, BlockPos pos, int radius, boolean skipReferencedStructures) {
+-        if (!this.server.getWorldData().worldGenOptions().generateStructures()) {
++        if (!this.serverLevelData.worldGenOptions().generateStructures()) { // CraftBukkit
+             return null;
+         } else {
+             Optional<HolderSet.Named<Structure>> optional = this.registryAccess().lookupOrThrow(Registries.STRUCTURE).get(structureTag);
+@@ -1334,11 +1532,22 @@
+     @Nullable
+     @Override
+     public MapItemSavedData getMapData(MapId id) {
+-        return (MapItemSavedData) this.getServer().overworld().getDataStorage().get(MapItemSavedData.factory(), id.key());
++        // CraftBukkit start
++        MapItemSavedData worldmap = (MapItemSavedData) this.getServer().overworld().getDataStorage().get(MapItemSavedData.factory(), id.key());
++        if (worldmap != null) {
++            worldmap.id = id;
++        }
++        return worldmap;
++        // CraftBukkit end
+     }
+ 
+     @Override
+     public void setMapData(MapId id, MapItemSavedData state) {
++        // CraftBukkit start
++        state.id = id;
++        MapInitializeEvent event = new MapInitializeEvent(state.mapView);
++        Bukkit.getServer().getPluginManager().callEvent(event);
++        // CraftBukkit end
+         this.getServer().overworld().getDataStorage().set(id.key(), state);
+     }
+ 
+@@ -1649,6 +1858,11 @@
+     @Override
+     public void blockUpdated(BlockPos pos, Block block) {
+         if (!this.isDebug()) {
++            // CraftBukkit start
++            if (this.populating) {
++                return;
++            }
++            // CraftBukkit end
+             this.updateNeighborsAt(pos, block);
+         }
+ 
+@@ -1668,12 +1882,12 @@
+     }
+ 
+     public boolean isFlat() {
+-        return this.server.getWorldData().isFlatWorld();
++        return this.serverLevelData.isFlatWorld(); // CraftBukkit
+     }
+ 
+     @Override
+     public long getSeed() {
+-        return this.server.getWorldData().worldGenOptions().seed();
++        return this.serverLevelData.worldGenOptions().seed(); // CraftBukkit
+     }
+ 
+     @Nullable
+@@ -1696,7 +1910,7 @@
+     private static <T> String getTypeCount(Iterable<T> items, Function<T, String> classifier) {
+         try {
+             Object2IntOpenHashMap<String> object2intopenhashmap = new Object2IntOpenHashMap();
+-            Iterator iterator = items.iterator();
++            Iterator<T> iterator = items.iterator(); // CraftBukkit - decompile error
+ 
+             while (iterator.hasNext()) {
+                 T t0 = iterator.next();
+@@ -1705,7 +1919,7 @@
+                 object2intopenhashmap.addTo(s, 1);
+             }
+ 
+-            return (String) object2intopenhashmap.object2IntEntrySet().stream().sorted(Comparator.comparing(Entry::getIntValue).reversed()).limit(5L).map((entry) -> {
++            return (String) object2intopenhashmap.object2IntEntrySet().stream().sorted(Comparator.comparing(Entry<String>::getIntValue).reversed()).limit(5L).map((entry) -> { // CraftBukkit - decompile error
+                 String s1 = (String) entry.getKey();
+ 
+                 return s1 + ":" + entry.getIntValue();
+@@ -1864,6 +2078,8 @@
+             }
+ 
+             entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
++            entity.inWorld = true; // CraftBukkit - Mark entity as in world
++            entity.valid = true; // CraftBukkit
+         }
+ 
+         public void onTrackingEnd(Entity entity) {
+@@ -1895,6 +2111,14 @@
+             }
+ 
+             entity.updateDynamicGameEventListener(DynamicGameEventListener::remove);
++            // CraftBukkit start
++            entity.valid = false;
++            if (!(entity instanceof ServerPlayer)) {
++                for (ServerPlayer player : ServerLevel.this.players) {
++                    player.getBukkitEntity().onEntityRemove(entity);
++                }
++            }
++            // CraftBukkit end
+         }
+ 
+         public void onSectionChange(Entity entity) {
diff --git a/paper-server/patches/sources/net/minecraft/server/level/EntityPlayer.patch b/paper-server/patches/sources/net/minecraft/server/level/ServerPlayer.java.patch
similarity index 53%
rename from paper-server/patches/sources/net/minecraft/server/level/EntityPlayer.patch
rename to paper-server/patches/sources/net/minecraft/server/level/ServerPlayer.java.patch
index f93ce72b60..712b8abb64 100644
--- a/paper-server/patches/sources/net/minecraft/server/level/EntityPlayer.patch
+++ b/paper-server/patches/sources/net/minecraft/server/level/ServerPlayer.java.patch
@@ -1,17 +1,76 @@
---- a/net/minecraft/server/level/EntityPlayer.java
-+++ b/net/minecraft/server/level/EntityPlayer.java
-@@ -183,6 +183,41 @@
- import net.minecraft.world.scores.criteria.IScoreboardCriteria;
- import org.slf4j.Logger;
- 
+--- a/net/minecraft/server/level/ServerPlayer.java
++++ b/net/minecraft/server/level/ServerPlayer.java
+@@ -103,10 +103,6 @@
+ import net.minecraft.util.Unit;
+ import net.minecraft.util.profiling.Profiler;
+ import net.minecraft.util.profiling.ProfilerFiller;
+-import net.minecraft.world.Container;
+-import net.minecraft.world.Difficulty;
+-import net.minecraft.world.InteractionHand;
+-import net.minecraft.world.MenuProvider;
+ import net.minecraft.world.damagesource.DamageSource;
+ import net.minecraft.world.damagesource.DamageTypes;
+ import net.minecraft.world.effect.MobEffectInstance;
+@@ -135,15 +131,16 @@
+ import net.minecraft.world.entity.player.ChatVisiblity;
+ import net.minecraft.world.entity.player.Input;
+ import net.minecraft.world.entity.player.Inventory;
+-import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.entity.projectile.AbstractArrow;
+ import net.minecraft.world.entity.projectile.ThrownEnderpearl;
+ import net.minecraft.world.entity.vehicle.AbstractBoat;
+ import net.minecraft.world.entity.vehicle.AbstractMinecart;
++import net.minecraft.world.food.FoodData;
+ import net.minecraft.world.inventory.AbstractContainerMenu;
+ import net.minecraft.world.inventory.ContainerListener;
+ import net.minecraft.world.inventory.ContainerSynchronizer;
+ import net.minecraft.world.inventory.HorseInventoryMenu;
++import net.minecraft.world.inventory.InventoryMenu;
+ import net.minecraft.world.inventory.ResultSlot;
+ import net.minecraft.world.inventory.Slot;
+ import net.minecraft.world.item.Item;
+@@ -154,8 +151,6 @@
+ import net.minecraft.world.item.WrittenBookItem;
+ import net.minecraft.world.item.crafting.Recipe;
+ import net.minecraft.world.item.crafting.RecipeHolder;
+-import net.minecraft.world.item.enchantment.EnchantmentHelper;
+-import net.minecraft.world.item.trading.MerchantOffers;
+ import net.minecraft.world.level.ChunkPos;
+ import net.minecraft.world.level.GameRules;
+ import net.minecraft.world.level.GameType;
+@@ -163,12 +158,14 @@
+ import net.minecraft.world.level.biome.BiomeManager;
+ import net.minecraft.world.level.block.BedBlock;
+ import net.minecraft.world.level.block.Block;
++import net.minecraft.world.level.block.ChestBlock;
+ import net.minecraft.world.level.block.HorizontalDirectionalBlock;
+ import net.minecraft.world.level.block.RespawnAnchorBlock;
+ import net.minecraft.world.level.block.entity.BlockEntity;
+ import net.minecraft.world.level.block.entity.CommandBlockEntity;
+ import net.minecraft.world.level.block.entity.SignBlockEntity;
+ import net.minecraft.world.level.block.state.BlockState;
++import net.minecraft.world.level.dimension.LevelStem;
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import net.minecraft.world.level.portal.TeleportTransition;
+ import net.minecraft.world.level.saveddata.maps.MapId;
+@@ -179,11 +176,47 @@
+ import net.minecraft.world.scores.PlayerTeam;
+ import net.minecraft.world.scores.ScoreAccess;
+ import net.minecraft.world.scores.ScoreHolder;
++import org.slf4j.Logger;
++import net.minecraft.world.Container;
++import net.minecraft.world.Difficulty;
++import net.minecraft.world.InteractionHand;
++import net.minecraft.world.MenuProvider;
 +// CraftBukkit start
 +import net.minecraft.world.damagesource.CombatTracker;
-+import net.minecraft.world.food.FoodMetaData;
-+import net.minecraft.world.inventory.ContainerPlayer;
 +import net.minecraft.world.item.enchantment.EnchantmentEffectComponents;
-+import net.minecraft.world.level.block.BlockChest;
-+import net.minecraft.world.level.dimension.WorldDimension;
++import net.minecraft.world.item.enchantment.EnchantmentHelper;
++import net.minecraft.world.item.trading.MerchantOffers;
 +import net.minecraft.world.scores.Scoreboard;
+ import net.minecraft.world.scores.Team;
+ import net.minecraft.world.scores.criteria.ObjectiveCriteria;
+-import org.slf4j.Logger;
 +import org.bukkit.Bukkit;
 +import org.bukkit.Location;
 +import org.bukkit.WeatherType;
@@ -38,27 +97,29 @@
 +import org.bukkit.event.player.PlayerTeleportEvent.TeleportCause;
 +import org.bukkit.inventory.MainHand;
 +// CraftBukkit end
-+
- public class EntityPlayer extends EntityHuman {
+ 
+-public class ServerPlayer extends Player {
++public class ServerPlayer extends net.minecraft.world.entity.player.Player {
  
      private static final Logger LOGGER = LogUtils.getLogger();
-@@ -225,7 +260,7 @@
+     private static final int NEUTRAL_MOB_DEATH_NOTIFICATION_RADII_XZ = 32;
+@@ -225,7 +258,7 @@
      private int levitationStartTime;
      private boolean disconnected;
      private int requestedViewDistance;
 -    public String language;
 +    public String language = "en_us"; // CraftBukkit - default
      @Nullable
-     private Vec3D startingToFallPosition;
+     private Vec3 startingToFallPosition;
      @Nullable
-@@ -259,6 +294,22 @@
+@@ -259,6 +292,22 @@
      private int containerCounter;
      public boolean wonGame;
  
 +    // CraftBukkit start
 +    public CraftPlayer.TransferCookieConnection transferCookieConnection;
 +    public String displayName;
-+    public IChatBaseComponent listName;
++    public Component listName;
 +    public int listOrder = 0;
 +    public org.bukkit.Location compassTarget;
 +    public int newExp = 0;
@@ -71,51 +132,51 @@
 +    public String kickLeaveMessage = null; // SPIGOT-3034: Forward leave message to PlayerQuitEvent
 +    // CraftBukkit end
 +
-     public EntityPlayer(MinecraftServer minecraftserver, WorldServer worldserver, GameProfile gameprofile, ClientInformation clientinformation) {
-         super(worldserver, worldserver.getSharedSpawnPos(), worldserver.getSharedSpawnAngle(), gameprofile);
-         this.chatVisibility = EnumChatVisibility.FULL;
-@@ -340,6 +391,13 @@
-             public void sendSystemMessage(IChatBaseComponent ichatbasecomponent) {
-                 EntityPlayer.this.sendSystemMessage(ichatbasecomponent);
+     public ServerPlayer(MinecraftServer server, ServerLevel world, GameProfile profile, ClientInformation clientOptions) {
+         super(world, world.getSharedSpawnPos(), world.getSharedSpawnAngle(), profile);
+         this.chatVisibility = ChatVisiblity.FULL;
+@@ -340,6 +389,13 @@
+             public void sendSystemMessage(Component message) {
+                 ServerPlayer.this.sendSystemMessage(message);
              }
 +
 +            // CraftBukkit start
 +            @Override
-+            public CommandSender getBukkitSender(CommandListenerWrapper wrapper) {
-+                return getBukkitEntity();
++            public CommandSender getBukkitSender(CommandSourceStack wrapper) {
++                return ServerPlayer.this.getBukkitEntity();
 +            }
 +            // CraftBukkit end
          };
-         this.textFilter = minecraftserver.createTextFilterForPlayer(this);
-         this.gameMode = minecraftserver.createGameModeForPlayer(this);
-@@ -352,14 +410,67 @@
-         this.moveTo(this.adjustSpawnLocation(worldserver, worldserver.getSharedSpawnPos()).getBottomCenter(), 0.0F, 0.0F);
-         this.updateOptions(clientinformation);
+         this.textFilter = server.createTextFilterForPlayer(this);
+         this.gameMode = server.createGameModeForPlayer(this);
+@@ -352,14 +408,67 @@
+         this.moveTo(this.adjustSpawnLocation(world, world.getSharedSpawnPos()).getBottomCenter(), 0.0F, 0.0F);
+         this.updateOptions(clientOptions);
          this.object = null;
 +
 +        // CraftBukkit start
 +        this.displayName = this.getScoreboardName();
 +        this.bukkitPickUpLoot = true;
 +        this.maxHealthCache = this.getMaxHealth();
-+    }
-+
+     }
+ 
 +    // Use method to resend items in hands in case of client desync, because the item use got cancelled.
 +    // For example, when cancelling the leash event
 +    public void resendItemInHands() {
-+        containerMenu.findSlot(getInventory(), getInventory().selected).ifPresent(s -> {
-+            containerSynchronizer.sendSlotChange(containerMenu, s, getMainHandItem());
++        this.containerMenu.findSlot(this.getInventory(), this.getInventory().selected).ifPresent(s -> {
++            this.containerSynchronizer.sendSlotChange(this.containerMenu, s, this.getMainHandItem());
 +        });
-+        containerSynchronizer.sendSlotChange(inventoryMenu, ContainerPlayer.SHIELD_SLOT, getOffhandItem());
++        this.containerSynchronizer.sendSlotChange(this.inventoryMenu, InventoryMenu.SHIELD_SLOT, this.getOffhandItem());
 +    }
 +
 +    // Yes, this doesn't match Vanilla, but it's the best we can do for now.
 +    // If this is an issue, PRs are welcome
-+    public final BlockPosition getSpawnPoint(WorldServer worldserver) {
-+        BlockPosition blockposition = worldserver.getSharedSpawnPos();
++    public final BlockPos getSpawnPoint(ServerLevel worldserver) {
++        BlockPos blockposition = worldserver.getSharedSpawnPos();
 +
-+        if (worldserver.dimensionType().hasSkyLight() && worldserver.serverLevelData.getGameType() != EnumGamemode.ADVENTURE) {
++        if (worldserver.dimensionType().hasSkyLight() && worldserver.serverLevelData.getGameType() != GameType.ADVENTURE) {
 +            int i = Math.max(0, this.server.getSpawnRadius(worldserver));
-+            int j = MathHelper.floor(worldserver.getWorldBorder().getDistanceToBorder((double) blockposition.getX(), (double) blockposition.getZ()));
++            int j = Mth.floor(worldserver.getWorldBorder().getDistanceToBorder((double) blockposition.getX(), (double) blockposition.getZ()));
 +
 +            if (j < i) {
 +                i = j;
@@ -135,7 +196,7 @@
 +                int i2 = (k1 + j1 * l1) % i1;
 +                int j2 = i2 % (i * 2 + 1);
 +                int k2 = i2 / (i * 2 + 1);
-+                BlockPosition blockposition1 = WorldProviderNormal.getOverworldRespawnPos(worldserver, blockposition.getX() + j2 - i, blockposition.getZ() + k2 - i);
++                BlockPos blockposition1 = PlayerRespawnLogic.getOverworldRespawnPos(worldserver, blockposition.getX() + j2 - i, blockposition.getZ() + k2 - i);
 +
 +                if (blockposition1 != null) {
 +                    return blockposition1;
@@ -144,23 +205,23 @@
 +        }
 +
 +        return blockposition;
-     }
++    }
 +    // CraftBukkit end
- 
++
      @Override
-     public BlockPosition adjustSpawnLocation(WorldServer worldserver, BlockPosition blockposition) {
-         AxisAlignedBB axisalignedbb = this.getDimensions(EntityPose.STANDING).makeBoundingBox(Vec3D.ZERO);
-         BlockPosition blockposition1 = blockposition;
+     public BlockPos adjustSpawnLocation(ServerLevel world, BlockPos basePos) {
+         AABB axisalignedbb = this.getDimensions(Pose.STANDING).makeBoundingBox(Vec3.ZERO);
+         BlockPos blockposition1 = basePos;
  
--        if (worldserver.dimensionType().hasSkyLight() && worldserver.getServer().getWorldData().getGameType() != EnumGamemode.ADVENTURE) {
-+        if (worldserver.dimensionType().hasSkyLight() && worldserver.serverLevelData.getGameType() != EnumGamemode.ADVENTURE) { // CraftBukkit
-             int i = Math.max(0, this.server.getSpawnRadius(worldserver));
-             int j = MathHelper.floor(worldserver.getWorldBorder().getDistanceToBorder((double) blockposition.getX(), (double) blockposition.getZ()));
+-        if (world.dimensionType().hasSkyLight() && world.getServer().getWorldData().getGameType() != GameType.ADVENTURE) {
++        if (world.dimensionType().hasSkyLight() && world.serverLevelData.getGameType() != GameType.ADVENTURE) { // CraftBukkit
+             int i = Math.max(0, this.server.getSpawnRadius(world));
+             int j = Mth.floor(world.getWorldBorder().getDistanceToBorder((double) basePos.getX(), (double) basePos.getZ()));
  
-@@ -395,14 +506,20 @@
+@@ -395,14 +504,20 @@
  
-                     Objects.requireNonNull(blockposition);
-                     crashreportsystemdetails.setDetail("Origin", blockposition::toString);
+                     Objects.requireNonNull(basePos);
+                     crashreportsystemdetails.setDetail("Origin", basePos::toString);
 +                    // CraftBukkit start - decompile error
 +                    int finalI = i;
                      crashreportsystemdetails.setDetail("Radius", () -> {
@@ -180,70 +241,70 @@
                      });
                      throw new ReportedException(crashreport);
                  }
-@@ -440,7 +557,7 @@
-             dataresult = WardenSpawnTracker.CODEC.parse(new Dynamic(DynamicOpsNBT.INSTANCE, nbttagcompound.get("warden_spawn_tracker")));
-             logger = EntityPlayer.LOGGER;
+@@ -440,7 +555,7 @@
+             dataresult = WardenSpawnTracker.CODEC.parse(new Dynamic(NbtOps.INSTANCE, nbt.get("warden_spawn_tracker")));
+             logger = ServerPlayer.LOGGER;
              Objects.requireNonNull(logger);
 -            dataresult.resultOrPartial(logger::error).ifPresent((wardenspawntracker) -> {
 +            ((DataResult<WardenSpawnTracker>) dataresult).resultOrPartial(logger::error).ifPresent((wardenspawntracker) -> {
                  this.wardenSpawnTracker = wardenspawntracker;
              });
          }
-@@ -457,17 +574,26 @@
+@@ -457,17 +572,26 @@
                  return this.server.getRecipeManager().byKey(resourcekey).isPresent();
              });
          }
-+        this.getBukkitEntity().readExtraData(nbttagcompound); // CraftBukkit
++        this.getBukkitEntity().readExtraData(nbt); // CraftBukkit
  
          if (this.isSleeping()) {
              this.stopSleeping();
          }
  
 +        // CraftBukkit start
-+        String spawnWorld = nbttagcompound.getString("SpawnWorld");
++        String spawnWorld = nbt.getString("SpawnWorld");
 +        CraftWorld oldWorld = (CraftWorld) Bukkit.getWorld(spawnWorld);
 +        if (oldWorld != null) {
 +            this.respawnDimension = oldWorld.getHandle().dimension();
 +        }
 +        // CraftBukkit end
 +
-         if (nbttagcompound.contains("SpawnX", 99) && nbttagcompound.contains("SpawnY", 99) && nbttagcompound.contains("SpawnZ", 99)) {
-             this.respawnPosition = new BlockPosition(nbttagcompound.getInt("SpawnX"), nbttagcompound.getInt("SpawnY"), nbttagcompound.getInt("SpawnZ"));
-             this.respawnForced = nbttagcompound.getBoolean("SpawnForced");
-             this.respawnAngle = nbttagcompound.getFloat("SpawnAngle");
-             if (nbttagcompound.contains("SpawnDimension")) {
--                DataResult dataresult1 = World.RESOURCE_KEY_CODEC.parse(DynamicOpsNBT.INSTANCE, nbttagcompound.get("SpawnDimension"));
-+                DataResult<ResourceKey<World>> dataresult1 = World.RESOURCE_KEY_CODEC.parse(DynamicOpsNBT.INSTANCE, nbttagcompound.get("SpawnDimension")); // CraftBukkit - decompile error
-                 Logger logger1 = EntityPlayer.LOGGER;
+         if (nbt.contains("SpawnX", 99) && nbt.contains("SpawnY", 99) && nbt.contains("SpawnZ", 99)) {
+             this.respawnPosition = new BlockPos(nbt.getInt("SpawnX"), nbt.getInt("SpawnY"), nbt.getInt("SpawnZ"));
+             this.respawnForced = nbt.getBoolean("SpawnForced");
+             this.respawnAngle = nbt.getFloat("SpawnAngle");
+             if (nbt.contains("SpawnDimension")) {
+-                DataResult dataresult1 = Level.RESOURCE_KEY_CODEC.parse(NbtOps.INSTANCE, nbt.get("SpawnDimension"));
++                DataResult<ResourceKey<Level>> dataresult1 = Level.RESOURCE_KEY_CODEC.parse(NbtOps.INSTANCE, nbt.get("SpawnDimension")); // CraftBukkit - decompile error
+                 Logger logger1 = ServerPlayer.LOGGER;
  
                  Objects.requireNonNull(logger1);
-@@ -482,7 +608,7 @@
-             dataresult = BlockPosition.CODEC.parse(DynamicOpsNBT.INSTANCE, nbtbase);
-             logger = EntityPlayer.LOGGER;
+@@ -482,7 +606,7 @@
+             dataresult = BlockPos.CODEC.parse(NbtOps.INSTANCE, nbtbase);
+             logger = ServerPlayer.LOGGER;
              Objects.requireNonNull(logger);
 -            dataresult.resultOrPartial(logger::error).ifPresent((blockposition) -> {
-+            ((DataResult<BlockPosition>) dataresult).resultOrPartial(logger::error).ifPresent((blockposition) -> { // CraftBukkit - decompile error
++            ((DataResult<BlockPos>) dataresult).resultOrPartial(logger::error).ifPresent((blockposition) -> { // CraftBukkit - decompile error
                  this.raidOmenPosition = blockposition;
              });
          }
-@@ -492,7 +618,7 @@
+@@ -492,7 +616,7 @@
      @Override
-     public void addAdditionalSaveData(NBTTagCompound nbttagcompound) {
-         super.addAdditionalSaveData(nbttagcompound);
--        DataResult dataresult = WardenSpawnTracker.CODEC.encodeStart(DynamicOpsNBT.INSTANCE, this.wardenSpawnTracker);
-+        DataResult<NBTBase> dataresult = WardenSpawnTracker.CODEC.encodeStart(DynamicOpsNBT.INSTANCE, this.wardenSpawnTracker); // CraftBukkit - decompile error
-         Logger logger = EntityPlayer.LOGGER;
+     public void addAdditionalSaveData(CompoundTag nbt) {
+         super.addAdditionalSaveData(nbt);
+-        DataResult dataresult = WardenSpawnTracker.CODEC.encodeStart(NbtOps.INSTANCE, this.wardenSpawnTracker);
++        DataResult<Tag> dataresult = WardenSpawnTracker.CODEC.encodeStart(NbtOps.INSTANCE, this.wardenSpawnTracker); // CraftBukkit - decompile error
+         Logger logger = ServerPlayer.LOGGER;
  
          Objects.requireNonNull(logger);
-@@ -526,6 +652,7 @@
-                 nbttagcompound.put("SpawnDimension", nbtbase);
+@@ -526,6 +650,7 @@
+                 nbt.put("SpawnDimension", nbtbase);
              });
          }
-+        this.getBukkitEntity().setExtraData(nbttagcompound); // CraftBukkit
++        this.getBukkitEntity().setExtraData(nbt); // CraftBukkit
  
-         nbttagcompound.putBoolean("spawn_extra_particles_on_fall", this.spawnExtraParticlesOnFall);
+         nbt.putBoolean("spawn_extra_particles_on_fall", this.spawnExtraParticlesOnFall);
          if (this.raidOmenPosition != null) {
-@@ -544,7 +671,20 @@
+@@ -544,7 +669,20 @@
          Entity entity = this.getRootVehicle();
          Entity entity1 = this.getVehicle();
  
@@ -262,13 +323,13 @@
 +
 +        if (persistVehicle && entity1 != null && entity != this && entity.hasExactlyOnePlayerPassenger()) {
 +            // CraftBukkit end
-             NBTTagCompound nbttagcompound1 = new NBTTagCompound();
-             NBTTagCompound nbttagcompound2 = new NBTTagCompound();
+             CompoundTag nbttagcompound1 = new CompoundTag();
+             CompoundTag nbttagcompound2 = new CompoundTag();
  
-@@ -598,12 +738,12 @@
+@@ -598,12 +736,12 @@
  
                  if (!this.isPassenger()) {
-                     EntityPlayer.LOGGER.warn("Couldn't reattach entity to player");
+                     ServerPlayer.LOGGER.warn("Couldn't reattach entity to player");
 -                    entity.discard();
 +                    entity.discard(null); // CraftBukkit - add Bukkit remove cause
                      iterator = entity.getIndirectPassengers().iterator();
@@ -280,55 +341,56 @@
                      }
                  }
              }
-@@ -625,7 +765,7 @@
-                     NBTTagCompound nbttagcompound1 = new NBTTagCompound();
+@@ -625,7 +763,7 @@
+                     CompoundTag nbttagcompound1 = new CompoundTag();
  
                      entityenderpearl.save(nbttagcompound1);
--                    DataResult dataresult = MinecraftKey.CODEC.encodeStart(DynamicOpsNBT.INSTANCE, entityenderpearl.level().dimension().location());
-+                    DataResult<NBTBase> dataresult = MinecraftKey.CODEC.encodeStart(DynamicOpsNBT.INSTANCE, entityenderpearl.level().dimension().location()); // CraftBukkit - decompile error
-                     Logger logger = EntityPlayer.LOGGER;
+-                    DataResult dataresult = ResourceLocation.CODEC.encodeStart(NbtOps.INSTANCE, entityenderpearl.level().dimension().location());
++                    DataResult<Tag> dataresult = ResourceLocation.CODEC.encodeStart(NbtOps.INSTANCE, entityenderpearl.level().dimension().location()); // CraftBukkit - decompile error
+                     Logger logger = ServerPlayer.LOGGER;
  
                      Objects.requireNonNull(logger);
-@@ -651,7 +791,7 @@
+@@ -651,7 +789,7 @@
                  nbttaglist.forEach((nbtbase1) -> {
-                     if (nbtbase1 instanceof NBTTagCompound nbttagcompound) {
+                     if (nbtbase1 instanceof CompoundTag nbttagcompound) {
                          if (nbttagcompound.contains("ender_pearl_dimension")) {
--                            DataResult dataresult = World.RESOURCE_KEY_CODEC.parse(DynamicOpsNBT.INSTANCE, nbttagcompound.get("ender_pearl_dimension"));
-+                            DataResult<ResourceKey<World>> dataresult = World.RESOURCE_KEY_CODEC.parse(DynamicOpsNBT.INSTANCE, nbttagcompound.get("ender_pearl_dimension")); // CraftBukkit - decompile error
-                             Logger logger = EntityPlayer.LOGGER;
+-                            DataResult dataresult = Level.RESOURCE_KEY_CODEC.parse(NbtOps.INSTANCE, nbttagcompound.get("ender_pearl_dimension"));
++                            DataResult<ResourceKey<Level>> dataresult = Level.RESOURCE_KEY_CODEC.parse(NbtOps.INSTANCE, nbttagcompound.get("ender_pearl_dimension")); // CraftBukkit - decompile error
+                             Logger logger = ServerPlayer.LOGGER;
  
                              Objects.requireNonNull(logger);
-@@ -686,6 +826,29 @@
- 
-     }
+@@ -684,7 +822,30 @@
+             }
+         }
  
++    }
++
 +    // CraftBukkit start - World fallback code, either respawn location or global spawn
-+    public void spawnIn(World world) {
++    public void spawnIn(Level world) {
 +        this.setLevel(world);
 +        if (world == null) {
 +            this.unsetRemoved();
-+            Vec3D position = null;
++            Vec3 position = null;
 +            if (this.respawnDimension != null) {
 +                world = this.server.getLevel(this.respawnDimension);
 +                if (world != null && this.getRespawnPosition() != null) {
-+                    position = EntityPlayer.findRespawnAndUseSpawnBlock((WorldServer) world, this.getRespawnPosition(), this.getRespawnAngle(), false, false).map(EntityPlayer.RespawnPosAngle::position).orElse(null);
++                    position = ServerPlayer.findRespawnAndUseSpawnBlock((ServerLevel) world, this.getRespawnPosition(), this.getRespawnAngle(), false, false).map(ServerPlayer.RespawnPosAngle::position).orElse(null);
 +                }
 +            }
 +            if (world == null || position == null) {
 +                world = ((CraftWorld) Bukkit.getServer().getWorlds().get(0)).getHandle();
-+                position = Vec3D.atCenterOf(world.getSharedSpawnPos());
++                position = Vec3.atCenterOf(world.getSharedSpawnPos());
 +            }
 +            this.setLevel(world);
 +            this.setPos(position);
 +        }
-+        this.gameMode.setLevel((WorldServer) world);
-+    }
++        this.gameMode.setLevel((ServerLevel) world);
+     }
 +    // CraftBukkit end
-+
-     public void setExperiencePoints(int i) {
+ 
+     public void setExperiencePoints(int points) {
          float f = (float) this.getXpNeededForNextLevel();
-         float f1 = (f - 1.0F) / f;
-@@ -744,6 +907,11 @@
+@@ -744,6 +905,11 @@
  
      @Override
      public void tick() {
@@ -340,17 +402,17 @@
          this.tickClientLoadTimeout();
          this.gameMode.tick();
          this.wardenSpawnTracker.tick();
-@@ -820,7 +988,7 @@
+@@ -820,7 +986,7 @@
              }
  
              if (this.getHealth() != this.lastSentHealth || this.lastSentFood != this.foodData.getFoodLevel() || this.foodData.getSaturationLevel() == 0.0F != this.lastFoodSaturationZero) {
--                this.connection.send(new PacketPlayOutUpdateHealth(this.getHealth(), this.foodData.getFoodLevel(), this.foodData.getSaturationLevel()));
-+                this.connection.send(new PacketPlayOutUpdateHealth(this.getBukkitEntity().getScaledHealth(), this.foodData.getFoodLevel(), this.foodData.getSaturationLevel())); // CraftBukkit
+-                this.connection.send(new ClientboundSetHealthPacket(this.getHealth(), this.foodData.getFoodLevel(), this.foodData.getSaturationLevel()));
++                this.connection.send(new ClientboundSetHealthPacket(this.getBukkitEntity().getScaledHealth(), this.foodData.getFoodLevel(), this.foodData.getSaturationLevel())); // CraftBukkit
                  this.lastSentHealth = this.getHealth();
                  this.lastSentFood = this.foodData.getFoodLevel();
                  this.lastFoodSaturationZero = this.foodData.getSaturationLevel() == 0.0F;
-@@ -851,6 +1019,12 @@
-                 this.updateScoreForCriteria(IScoreboardCriteria.EXPERIENCE, MathHelper.ceil((float) this.lastRecordedExperience));
+@@ -851,6 +1017,12 @@
+                 this.updateScoreForCriteria(ObjectiveCriteria.EXPERIENCE, Mth.ceil((float) this.lastRecordedExperience));
              }
  
 +            // CraftBukkit start - Force max health updates
@@ -361,16 +423,18 @@
 +
              if (this.experienceLevel != this.lastRecordedLevel) {
                  this.lastRecordedLevel = this.experienceLevel;
-                 this.updateScoreForCriteria(IScoreboardCriteria.LEVEL, MathHelper.ceil((float) this.lastRecordedLevel));
-@@ -865,6 +1039,20 @@
-                 CriterionTriggers.LOCATION.trigger(this);
-             }
+                 this.updateScoreForCriteria(ObjectiveCriteria.LEVEL, Mth.ceil((float) this.lastRecordedLevel));
+@@ -863,8 +1035,22 @@
  
+             if (this.tickCount % 20 == 0) {
+                 CriteriaTriggers.LOCATION.trigger(this);
++            }
++
 +            // CraftBukkit start - initialize oldLevel, fire PlayerLevelChangeEvent, and tick client-sided world border
 +            if (this.oldLevel == -1) {
 +                this.oldLevel = this.experienceLevel;
-+            }
-+
+             }
+ 
 +            if (this.oldLevel != this.experienceLevel) {
 +                CraftEventFactory.callPlayerLevelChangeEvent(this.getBukkitEntity(), this.oldLevel, this.experienceLevel);
 +                this.oldLevel = this.experienceLevel;
@@ -382,9 +446,9 @@
 +            // CraftBukkit end
          } catch (Throwable throwable) {
              CrashReport crashreport = CrashReport.forThrowable(throwable, "Ticking player");
-             CrashReportSystemDetails crashreportsystemdetails = crashreport.addCategory("Player being ticked");
-@@ -893,7 +1081,7 @@
-         if (this.level().getDifficulty() == EnumDifficulty.PEACEFUL && this.serverLevel().getGameRules().getBoolean(GameRules.RULE_NATURAL_REGENERATION)) {
+             CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Player being ticked");
+@@ -893,7 +1079,7 @@
+         if (this.level().getDifficulty() == Difficulty.PEACEFUL && this.serverLevel().getGameRules().getBoolean(GameRules.RULE_NATURAL_REGENERATION)) {
              if (this.tickCount % 20 == 0) {
                  if (this.getHealth() < this.getMaxHealth()) {
 -                    this.heal(1.0F);
@@ -392,18 +456,18 @@
                  }
  
                  float f = this.foodData.getSaturationLevel();
-@@ -946,7 +1134,8 @@
+@@ -946,7 +1132,8 @@
      }
  
-     private void updateScoreForCriteria(IScoreboardCriteria iscoreboardcriteria, int i) {
--        this.getScoreboard().forAllObjectives(iscoreboardcriteria, this, (scoreaccess) -> {
+     private void updateScoreForCriteria(ObjectiveCriteria criterion, int score) {
+-        this.getScoreboard().forAllObjectives(criterion, this, (scoreaccess) -> {
 +        // CraftBukkit - Use our scores instead
-+        this.level().getCraftServer().getScoreboardManager().forAllObjectives(iscoreboardcriteria, this, (scoreaccess) -> {
-             scoreaccess.set(i);
++        this.level().getCraftServer().getScoreboardManager().forAllObjectives(criterion, this, (scoreaccess) -> {
+             scoreaccess.set(score);
          });
      }
-@@ -955,9 +1144,47 @@
-     public void die(DamageSource damagesource) {
+@@ -955,10 +1142,48 @@
+     public void die(DamageSource damageSource) {
          this.gameEvent(GameEvent.ENTITY_DIE);
          boolean flag = this.serverLevel().getGameRules().getBoolean(GameRules.RULE_SHOWDEATHMESSAGES);
 +        // CraftBukkit start - fire PlayerDeathEvent
@@ -414,26 +478,26 @@
 +        boolean keepInventory = this.serverLevel().getGameRules().getBoolean(GameRules.RULE_KEEPINVENTORY) || this.isSpectator();
  
 -        if (flag) {
--            IChatBaseComponent ichatbasecomponent = this.getCombatTracker().getDeathMessage();
+-            Component ichatbasecomponent = this.getCombatTracker().getDeathMessage();
 +        if (!keepInventory) {
 +            for (ItemStack item : this.getInventory().getContents()) {
-+                if (!item.isEmpty() && !EnchantmentManager.has(item, EnchantmentEffectComponents.PREVENT_EQUIPMENT_DROP)) {
++                if (!item.isEmpty() && !EnchantmentHelper.has(item, EnchantmentEffectComponents.PREVENT_EQUIPMENT_DROP)) {
 +                    loot.add(CraftItemStack.asCraftMirror(item).markForInventoryDrop());
 +                }
 +            }
 +        }
 +        // SPIGOT-5071: manually add player loot tables (SPIGOT-5195 - ignores keepInventory rule)
-+        this.dropFromLootTable(this.serverLevel(), damagesource, this.lastHurtByPlayerTime > 0);
-+        this.dropCustomDeathLoot(this.serverLevel(), damagesource, flag);
-+
++        this.dropFromLootTable(this.serverLevel(), damageSource, this.lastHurtByPlayerTime > 0);
++        this.dropCustomDeathLoot(this.serverLevel(), damageSource, flag);
+ 
 +        loot.addAll(this.drops);
 +        this.drops.clear(); // SPIGOT-5188: make sure to clear
 +
-+        IChatBaseComponent defaultMessage = this.getCombatTracker().getDeathMessage();
++        Component defaultMessage = this.getCombatTracker().getDeathMessage();
 +
 +        String deathmessage = defaultMessage.getString();
-+        keepLevel = keepInventory; // SPIGOT-2222: pre-set keepLevel
-+        org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, damagesource, loot, deathmessage, keepInventory);
++        this.keepLevel = keepInventory; // SPIGOT-2222: pre-set keepLevel
++        org.bukkit.event.entity.PlayerDeathEvent event = CraftEventFactory.callPlayerDeathEvent(this, damageSource, loot, deathmessage, keepInventory);
 +
 +        // SPIGOT-943 - only call if they have an inventory open
 +        if (this.containerMenu != this.inventoryMenu) {
@@ -443,64 +507,94 @@
 +        String deathMessage = event.getDeathMessage();
 +
 +        if (deathMessage != null && deathMessage.length() > 0 && flag) { // TODO: allow plugins to override?
-+            IChatBaseComponent ichatbasecomponent;
++            Component ichatbasecomponent;
 +            if (deathMessage.equals(deathmessage)) {
 +                ichatbasecomponent = this.getCombatTracker().getDeathMessage();
 +            } else {
 +                ichatbasecomponent = org.bukkit.craftbukkit.util.CraftChatMessage.fromStringOrNull(deathMessage);
 +            }
- 
++
              this.connection.send(new ClientboundPlayerCombatKillPacket(this.getId(), ichatbasecomponent), PacketSendListener.exceptionallySend(() -> {
                  boolean flag1 = true;
-@@ -988,12 +1215,18 @@
+                 String s = ichatbasecomponent.getString(256);
+@@ -988,12 +1213,18 @@
          if (this.serverLevel().getGameRules().getBoolean(GameRules.RULE_FORGIVE_DEAD_PLAYERS)) {
              this.tellNeutralMobsThatIDied();
          }
 -
 -        if (!this.isSpectator()) {
--            this.dropAllDeathLoot(this.serverLevel(), damagesource);
+-            this.dropAllDeathLoot(this.serverLevel(), damageSource);
 +        // SPIGOT-5478 must be called manually now
-+        this.dropExperience(this.serverLevel(), damagesource.getEntity());
++        this.dropExperience(this.serverLevel(), damageSource.getEntity());
 +        // we clean the player's inventory after the EntityDeathEvent is called so plugins can get the exact state of the inventory.
 +        if (!event.getKeepInventory()) {
 +            this.getInventory().clearContent();
          }
  
--        this.getScoreboard().forAllObjectives(IScoreboardCriteria.DEATH_COUNT, this, ScoreAccess::increment);
+-        this.getScoreboard().forAllObjectives(ObjectiveCriteria.DEATH_COUNT, this, ScoreAccess::increment);
 +        this.setCamera(this); // Remove spectated target
 +        // CraftBukkit end
 +
 +        // CraftBukkit - Get our scores instead
-+        this.level().getCraftServer().getScoreboardManager().forAllObjectives(IScoreboardCriteria.DEATH_COUNT, this, ScoreAccess::increment);
-         EntityLiving entityliving = this.getKillCredit();
++        this.level().getCraftServer().getScoreboardManager().forAllObjectives(ObjectiveCriteria.DEATH_COUNT, this, ScoreAccess::increment);
+         LivingEntity entityliving = this.getKillCredit();
  
          if (entityliving != null) {
-@@ -1028,10 +1261,12 @@
-     public void awardKillScore(Entity entity, DamageSource damagesource) {
-         if (entity != this) {
-             super.awardKillScore(entity, damagesource);
--            this.getScoreboard().forAllObjectives(IScoreboardCriteria.KILL_COUNT_ALL, this, ScoreAccess::increment);
+@@ -1028,10 +1259,12 @@
+     public void awardKillScore(Entity entityKilled, DamageSource damageSource) {
+         if (entityKilled != this) {
+             super.awardKillScore(entityKilled, damageSource);
+-            this.getScoreboard().forAllObjectives(ObjectiveCriteria.KILL_COUNT_ALL, this, ScoreAccess::increment);
+-            if (entityKilled instanceof Player) {
 +            // CraftBukkit - Get our scores instead
-+            this.level().getCraftServer().getScoreboardManager().forAllObjectives(IScoreboardCriteria.KILL_COUNT_ALL, this, ScoreAccess::increment);
-             if (entity instanceof EntityHuman) {
-                 this.awardStat(StatisticList.PLAYER_KILLS);
--                this.getScoreboard().forAllObjectives(IScoreboardCriteria.KILL_COUNT_PLAYERS, this, ScoreAccess::increment);
++            this.level().getCraftServer().getScoreboardManager().forAllObjectives(ObjectiveCriteria.KILL_COUNT_ALL, this, ScoreAccess::increment);
++            if (entityKilled instanceof net.minecraft.world.entity.player.Player) {
+                 this.awardStat(Stats.PLAYER_KILLS);
+-                this.getScoreboard().forAllObjectives(ObjectiveCriteria.KILL_COUNT_PLAYERS, this, ScoreAccess::increment);
 +                // CraftBukkit - Get our scores instead
-+                this.level().getCraftServer().getScoreboardManager().forAllObjectives(IScoreboardCriteria.KILL_COUNT_PLAYERS, this, ScoreAccess::increment);
++                this.level().getCraftServer().getScoreboardManager().forAllObjectives(ObjectiveCriteria.KILL_COUNT_PLAYERS, this, ScoreAccess::increment);
              } else {
-                 this.awardStat(StatisticList.MOB_KILLS);
+                 this.awardStat(Stats.MOB_KILLS);
              }
-@@ -1049,7 +1284,8 @@
+@@ -1049,7 +1282,8 @@
              int i = scoreboardteam.getColor().getId();
  
-             if (i >= 0 && i < aiscoreboardcriteria.length) {
--                this.getScoreboard().forAllObjectives(aiscoreboardcriteria[i], scoreholder, ScoreAccess::increment);
+             if (i >= 0 && i < criterions.length) {
+-                this.getScoreboard().forAllObjectives(criterions[i], targetScoreHolder, ScoreAccess::increment);
 +                // CraftBukkit - Get our scores instead
-+                this.level().getCraftServer().getScoreboardManager().forAllObjectives(aiscoreboardcriteria[i], scoreholder, ScoreAccess::increment);
++                this.level().getCraftServer().getScoreboardManager().forAllObjectives(criterions[i], targetScoreHolder, ScoreAccess::increment);
              }
          }
  
-@@ -1093,10 +1329,16 @@
+@@ -1062,8 +1296,8 @@
+         } else {
+             Entity entity = source.getEntity();
+ 
+-            if (entity instanceof Player) {
+-                Player entityhuman = (Player) entity;
++            if (entity instanceof net.minecraft.world.entity.player.Player) {
++                net.minecraft.world.entity.player.Player entityhuman = (net.minecraft.world.entity.player.Player) entity;
+ 
+                 if (!this.canHarmPlayer(entityhuman)) {
+                     return false;
+@@ -1074,8 +1308,8 @@
+                 AbstractArrow entityarrow = (AbstractArrow) entity;
+                 Entity entity1 = entityarrow.getOwner();
+ 
+-                if (entity1 instanceof Player) {
+-                    Player entityhuman1 = (Player) entity1;
++                if (entity1 instanceof net.minecraft.world.entity.player.Player) {
++                    net.minecraft.world.entity.player.Player entityhuman1 = (net.minecraft.world.entity.player.Player) entity1;
+ 
+                     if (!this.canHarmPlayer(entityhuman1)) {
+                         return false;
+@@ -1088,33 +1322,58 @@
+     }
+ 
+     @Override
+-    public boolean canHarmPlayer(Player player) {
++    public boolean canHarmPlayer(net.minecraft.world.entity.player.Player player) {
+         return !this.isPvpAllowed() ? false : super.canHarmPlayer(player);
      }
  
      private boolean isPvpAllowed() {
@@ -509,32 +603,37 @@
 +        return this.level().pvpMode;
      }
  
--    public TeleportTransition findRespawnPositionAndUseSpawnBlock(boolean flag, TeleportTransition.a teleporttransition_a) {
+-    public TeleportTransition findRespawnPositionAndUseSpawnBlock(boolean alive, TeleportTransition.PostTeleportTransition postDimensionTransition) {
 +    // CraftBukkit start
-+    public TeleportTransition findRespawnPositionAndUseSpawnBlock(boolean flag, TeleportTransition.a teleporttransition_a, PlayerRespawnEvent.RespawnReason reason) {
++    public TeleportTransition findRespawnPositionAndUseSpawnBlock(boolean flag, TeleportTransition.PostTeleportTransition teleporttransition_a, PlayerRespawnEvent.RespawnReason reason) {
 +        TeleportTransition teleportTransition;
 +        boolean isBedSpawn = false;
 +        boolean isAnchorSpawn = false;
 +        // CraftBukkit end
-         BlockPosition blockposition = this.getRespawnPosition();
+         BlockPos blockposition = this.getRespawnPosition();
          float f = this.getRespawnAngle();
          boolean flag1 = this.isRespawnForced();
-@@ -1108,13 +1350,32 @@
-             if (optional.isPresent()) {
-                 EntityPlayer.RespawnPosAngle entityplayer_respawnposangle = (EntityPlayer.RespawnPosAngle) optional.get();
+         ServerLevel worldserver = this.server.getLevel(this.getRespawnDimension());
  
--                return new TeleportTransition(worldserver, entityplayer_respawnposangle.position(), Vec3D.ZERO, entityplayer_respawnposangle.yaw(), 0.0F, teleporttransition_a);
+         if (worldserver != null && blockposition != null) {
+-            Optional<ServerPlayer.RespawnPosAngle> optional = ServerPlayer.findRespawnAndUseSpawnBlock(worldserver, blockposition, f, flag1, alive);
++            Optional<ServerPlayer.RespawnPosAngle> optional = ServerPlayer.findRespawnAndUseSpawnBlock(worldserver, blockposition, f, flag1, flag);
+ 
+             if (optional.isPresent()) {
+                 ServerPlayer.RespawnPosAngle entityplayer_respawnposangle = (ServerPlayer.RespawnPosAngle) optional.get();
+ 
+-                return new TeleportTransition(worldserver, entityplayer_respawnposangle.position(), Vec3.ZERO, entityplayer_respawnposangle.yaw(), 0.0F, postDimensionTransition);
 +                // CraftBukkit start
 +                isBedSpawn = entityplayer_respawnposangle.isBedSpawn();
 +                isAnchorSpawn = entityplayer_respawnposangle.isAnchorSpawn();
-+                teleportTransition = new TeleportTransition(worldserver, entityplayer_respawnposangle.position(), Vec3D.ZERO, entityplayer_respawnposangle.yaw(), 0.0F, teleporttransition_a);
++                teleportTransition = new TeleportTransition(worldserver, entityplayer_respawnposangle.position(), Vec3.ZERO, entityplayer_respawnposangle.yaw(), 0.0F, teleporttransition_a);
 +                // CraftBukkit end
              } else {
--                return TeleportTransition.missingRespawnBlock(this.server.overworld(), this, teleporttransition_a);
+-                return TeleportTransition.missingRespawnBlock(this.server.overworld(), this, postDimensionTransition);
 +                teleportTransition = TeleportTransition.missingRespawnBlock(this.server.overworld(), this, teleporttransition_a); // CraftBukkit
              }
          } else {
--            return new TeleportTransition(this.server.overworld(), this, teleporttransition_a);
+-            return new TeleportTransition(this.server.overworld(), this, postDimensionTransition);
 +            teleportTransition = new TeleportTransition(this.server.overworld(), this, teleporttransition_a); // CraftBukkit
          }
 +        // CraftBukkit start
@@ -554,50 +653,50 @@
 +        // CraftBukkit end
      }
  
-     public static Optional<EntityPlayer.RespawnPosAngle> findRespawnAndUseSpawnBlock(WorldServer worldserver, BlockPosition blockposition, float f, boolean flag, boolean flag1) {
-@@ -1129,11 +1390,11 @@
+     public static Optional<ServerPlayer.RespawnPosAngle> findRespawnAndUseSpawnBlock(ServerLevel world, BlockPos pos, float spawnAngle, boolean spawnForced, boolean alive) {
+@@ -1129,11 +1388,11 @@
              }
  
              return optional.map((vec3d) -> {
--                return EntityPlayer.RespawnPosAngle.of(vec3d, blockposition);
-+                return EntityPlayer.RespawnPosAngle.of(vec3d, blockposition, false, true); // CraftBukkit
+-                return ServerPlayer.RespawnPosAngle.of(vec3d, pos);
++                return ServerPlayer.RespawnPosAngle.of(vec3d, pos, false, true); // CraftBukkit
              });
-         } else if (block instanceof BlockBed && BlockBed.canSetSpawn(worldserver)) {
-             return BlockBed.findStandUpPosition(EntityTypes.PLAYER, worldserver, blockposition, (EnumDirection) iblockdata.getValue(BlockBed.FACING), f).map((vec3d) -> {
--                return EntityPlayer.RespawnPosAngle.of(vec3d, blockposition);
-+                return EntityPlayer.RespawnPosAngle.of(vec3d, blockposition, true, false); // CraftBukkit
+         } else if (block instanceof BedBlock && BedBlock.canSetSpawn(world)) {
+             return BedBlock.findStandUpPosition(EntityType.PLAYER, world, pos, (Direction) iblockdata.getValue(BedBlock.FACING), spawnAngle).map((vec3d) -> {
+-                return ServerPlayer.RespawnPosAngle.of(vec3d, pos);
++                return ServerPlayer.RespawnPosAngle.of(vec3d, pos, true, false); // CraftBukkit
              });
-         } else if (!flag) {
+         } else if (!spawnForced) {
              return Optional.empty();
-@@ -1142,7 +1403,7 @@
-             IBlockData iblockdata1 = worldserver.getBlockState(blockposition.above());
+@@ -1142,7 +1401,7 @@
+             BlockState iblockdata1 = world.getBlockState(pos.above());
              boolean flag3 = iblockdata1.getBlock().isPossibleToRespawnInThis(iblockdata1);
  
--            return flag2 && flag3 ? Optional.of(new EntityPlayer.RespawnPosAngle(new Vec3D((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.1D, (double) blockposition.getZ() + 0.5D), f)) : Optional.empty();
-+            return flag2 && flag3 ? Optional.of(new EntityPlayer.RespawnPosAngle(new Vec3D((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.1D, (double) blockposition.getZ() + 0.5D), f, false, false)) : Optional.empty(); // CraftBukkit
+-            return flag2 && flag3 ? Optional.of(new ServerPlayer.RespawnPosAngle(new Vec3((double) pos.getX() + 0.5D, (double) pos.getY() + 0.1D, (double) pos.getZ() + 0.5D), spawnAngle)) : Optional.empty();
++            return flag2 && flag3 ? Optional.of(new ServerPlayer.RespawnPosAngle(new Vec3((double) pos.getX() + 0.5D, (double) pos.getY() + 0.1D, (double) pos.getZ() + 0.5D), spawnAngle, false, false)) : Optional.empty(); // CraftBukkit
          }
      }
  
-@@ -1160,6 +1421,7 @@
+@@ -1160,6 +1419,7 @@
      @Nullable
      @Override
-     public EntityPlayer teleport(TeleportTransition teleporttransition) {
+     public ServerPlayer teleport(TeleportTransition teleportTarget) {
 +        if (this.isSleeping()) return null; // CraftBukkit - SPIGOT-3154
          if (this.isRemoved()) {
              return null;
          } else {
-@@ -1169,18 +1431,38 @@
+@@ -1169,39 +1429,73 @@
  
-             WorldServer worldserver = teleporttransition.newLevel();
-             WorldServer worldserver1 = this.serverLevel();
--            ResourceKey<World> resourcekey = worldserver1.dimension();
+             ServerLevel worldserver = teleportTarget.newLevel();
+             ServerLevel worldserver1 = this.serverLevel();
+-            ResourceKey<Level> resourcekey = worldserver1.dimension();
 +            // CraftBukkit start
-+            ResourceKey<WorldDimension> resourcekey = worldserver1.getTypeKey();
-+
++            ResourceKey<LevelStem> resourcekey = worldserver1.getTypeKey();
+ 
 +            Location enter = this.getBukkitEntity().getLocation();
-+            PositionMoveRotation absolutePosition = PositionMoveRotation.calculateAbsolute(PositionMoveRotation.of(this), PositionMoveRotation.of(teleporttransition), teleporttransition.relatives());
++            PositionMoveRotation absolutePosition = PositionMoveRotation.calculateAbsolute(PositionMoveRotation.of(this), PositionMoveRotation.of(teleportTarget), teleportTarget.relatives());
 +            Location exit = (worldserver == null) ? null : CraftLocation.toBukkit(absolutePosition.position(), worldserver.getWorld(), absolutePosition.yRot(), absolutePosition.xRot());
-+            PlayerTeleportEvent tpEvent = new PlayerTeleportEvent(this.getBukkitEntity(), enter, exit, teleporttransition.cause());
++            PlayerTeleportEvent tpEvent = new PlayerTeleportEvent(this.getBukkitEntity(), enter, exit, teleportTarget.cause());
 +            Bukkit.getServer().getPluginManager().callEvent(tpEvent);
 +            Location newExit = tpEvent.getTo();
 +            if (tpEvent.isCancelled() || newExit == null) {
@@ -605,40 +704,46 @@
 +            }
 +            if (!newExit.equals(exit)) {
 +                worldserver = ((CraftWorld) newExit.getWorld()).getHandle();
-+                teleporttransition = new TeleportTransition(worldserver, CraftLocation.toVec3D(newExit), Vec3D.ZERO, newExit.getYaw(), newExit.getPitch(), teleporttransition.missingRespawnBlock(), teleporttransition.asPassenger(), Set.of(), teleporttransition.postTeleportTransition(), teleporttransition.cause());
++                teleportTarget = new TeleportTransition(worldserver, CraftLocation.toVec3D(newExit), Vec3.ZERO, newExit.getYaw(), newExit.getPitch(), teleportTarget.missingRespawnBlock(), teleportTarget.asPassenger(), Set.of(), teleportTarget.postTeleportTransition(), teleportTarget.cause());
 +            }
 +            // CraftBukkit end
- 
-             if (!teleporttransition.asPassenger()) {
++
+             if (!teleportTarget.asPassenger()) {
                  this.stopRiding();
              }
  
 -            if (worldserver.dimension() == resourcekey) {
--                this.connection.teleport(PositionMoveRotation.of(teleporttransition), teleporttransition.relatives());
+-                this.connection.teleport(PositionMoveRotation.of(teleportTarget), teleportTarget.relatives());
 +            // CraftBukkit start
 +            if (worldserver != null && worldserver.dimension() == worldserver1.dimension()) {
-+                this.connection.internalTeleport(PositionMoveRotation.of(teleporttransition), teleporttransition.relatives());
++                this.connection.internalTeleport(PositionMoveRotation.of(teleportTarget), teleportTarget.relatives());
 +                // CraftBukkit end
                  this.connection.resetPosition();
-                 teleporttransition.postTeleportTransition().onTransition(this);
+                 teleportTarget.postTeleportTransition().onTransition(this);
                  return this;
              } else {
 +                // CraftBukkit start
 +                /*
                  this.isChangingDimension = true;
-                 WorldData worlddata = worldserver.getLevelData();
+-                LevelData worlddata = worldserver.getLevelData();
++                WorldData worlddata = worldserver.getLevelData();
+ 
+-                this.connection.send(new ClientboundRespawnPacket(this.createCommonSpawnInfo(worldserver), (byte) 3));
+-                this.connection.send(new ClientboundChangeDifficultyPacket(worlddata.getDifficulty(), worlddata.isDifficultyLocked()));
++                this.connection.send(new PacketPlayOutRespawn(this.createCommonSpawnInfo(worldserver), (byte) 3));
++                this.connection.send(new PacketPlayOutServerDifficulty(worlddata.getDifficulty(), worlddata.isDifficultyLocked()));
+                 PlayerList playerlist = this.server.getPlayerList();
  
-@@ -1191,17 +1473,31 @@
                  playerlist.sendPlayerPermissionLevel(this);
                  worldserver1.removePlayerImmediately(this, Entity.RemovalReason.CHANGED_DIMENSION);
                  this.unsetRemoved();
 +                */
 +                // CraftBukkit end
-                 GameProfilerFiller gameprofilerfiller = Profiler.get();
+                 ProfilerFiller gameprofilerfiller = Profiler.get();
  
                  gameprofilerfiller.push("moving");
--                if (resourcekey == World.OVERWORLD && worldserver.dimension() == World.NETHER) {
-+                if (worldserver != null && resourcekey == WorldDimension.OVERWORLD && worldserver.getTypeKey() == WorldDimension.NETHER) { // CraftBukkit - empty to fall through to null to event
+-                if (resourcekey == Level.OVERWORLD && worldserver.dimension() == Level.NETHER) {
++                if (worldserver != null && resourcekey == LevelStem.OVERWORLD && worldserver.getTypeKey() == LevelStem.NETHER) { // CraftBukkit - empty to fall through to null to event
                      this.enteredNetherPosition = this.position();
                  }
  
@@ -646,10 +751,10 @@
                  gameprofilerfiller.push("placing");
 +                // CraftBukkit start
 +                this.isChangingDimension = true; // CraftBukkit - Set teleport invulnerability only if player changing worlds
-+                WorldData worlddata = worldserver.getLevelData();
++                LevelData worlddata = worldserver.getLevelData();
 +
-+                this.connection.send(new PacketPlayOutRespawn(this.createCommonSpawnInfo(worldserver), (byte) 3));
-+                this.connection.send(new PacketPlayOutServerDifficulty(worlddata.getDifficulty(), worlddata.isDifficultyLocked()));
++                this.connection.send(new ClientboundRespawnPacket(this.createCommonSpawnInfo(worldserver), (byte) 3));
++                this.connection.send(new ClientboundChangeDifficultyPacket(worlddata.getDifficulty(), worlddata.isDifficultyLocked()));
 +                PlayerList playerlist = this.server.getPlayerList();
 +
 +                playerlist.sendPlayerPermissionLevel(this);
@@ -657,12 +762,12 @@
 +                this.unsetRemoved();
 +                // CraftBukkit end
                  this.setServerLevel(worldserver);
--                this.connection.teleport(PositionMoveRotation.of(teleporttransition), teleporttransition.relatives());
-+                this.connection.internalTeleport(PositionMoveRotation.of(teleporttransition), teleporttransition.relatives()); // CraftBukkit - use internal teleport without event
+-                this.connection.teleport(PositionMoveRotation.of(teleportTarget), teleportTarget.relatives());
++                this.connection.internalTeleport(PositionMoveRotation.of(teleportTarget), teleportTarget.relatives()); // CraftBukkit - use internal teleport without event
                  this.connection.resetPosition();
                  worldserver.addDuringTeleport(this);
                  gameprofilerfiller.pop();
-@@ -1215,11 +1511,29 @@
+@@ -1215,12 +1509,30 @@
                  this.lastSentExp = -1;
                  this.lastSentHealth = -1.0F;
                  this.lastSentFood = -1;
@@ -677,7 +782,7 @@
      }
  
 +    // CraftBukkit start
-+    @Override
+     @Override
 +    public CraftPortalEvent callPortalEvent(Entity entity, Location exit, TeleportCause cause, int searchRadius, int creationRadius) {
 +        Location enter = this.getBukkitEntity().getLocation();
 +        PlayerPortalEvent event = new PlayerPortalEvent(this.getBukkitEntity(), enter, exit, cause, searchRadius, true, creationRadius);
@@ -689,77 +794,95 @@
 +    }
 +    // CraftBukkit end
 +
-     @Override
-     public void forceSetRotation(float f, float f1) {
-         this.connection.send(new ClientboundPlayerRotationPacket(f, f1));
-@@ -1228,13 +1542,21 @@
-     public void triggerDimensionChangeTriggers(WorldServer worldserver) {
-         ResourceKey<World> resourcekey = worldserver.dimension();
-         ResourceKey<World> resourcekey1 = this.level().dimension();
++    @Override
+     public void forceSetRotation(float yaw, float pitch) {
+         this.connection.send(new ClientboundPlayerRotationPacket(yaw, pitch));
+     }
+@@ -1228,13 +1540,21 @@
+     public void triggerDimensionChangeTriggers(ServerLevel origin) {
+         ResourceKey<Level> resourcekey = origin.dimension();
+         ResourceKey<Level> resourcekey1 = this.level().dimension();
 +        // CraftBukkit start
-+        ResourceKey<World> maindimensionkey = CraftDimensionUtil.getMainDimensionKey(worldserver);
-+        ResourceKey<World> maindimensionkey1 = CraftDimensionUtil.getMainDimensionKey(this.level());
++        ResourceKey<Level> maindimensionkey = CraftDimensionUtil.getMainDimensionKey(origin);
++        ResourceKey<Level> maindimensionkey1 = CraftDimensionUtil.getMainDimensionKey(this.level());
  
--        CriterionTriggers.CHANGED_DIMENSION.trigger(this, resourcekey, resourcekey1);
--        if (resourcekey == World.NETHER && resourcekey1 == World.OVERWORLD && this.enteredNetherPosition != null) {
-+        CriterionTriggers.CHANGED_DIMENSION.trigger(this, maindimensionkey, maindimensionkey1);
+-        CriteriaTriggers.CHANGED_DIMENSION.trigger(this, resourcekey, resourcekey1);
+-        if (resourcekey == Level.NETHER && resourcekey1 == Level.OVERWORLD && this.enteredNetherPosition != null) {
++        CriteriaTriggers.CHANGED_DIMENSION.trigger(this, maindimensionkey, maindimensionkey1);
 +        if (maindimensionkey != resourcekey || maindimensionkey1 != resourcekey1) {
-+            CriterionTriggers.CHANGED_DIMENSION.trigger(this, resourcekey, resourcekey1);
++            CriteriaTriggers.CHANGED_DIMENSION.trigger(this, resourcekey, resourcekey1);
 +        }
 +
-+        if (maindimensionkey == World.NETHER && maindimensionkey1 == World.OVERWORLD && this.enteredNetherPosition != null) {
++        if (maindimensionkey == Level.NETHER && maindimensionkey1 == Level.OVERWORLD && this.enteredNetherPosition != null) {
 +            // CraftBukkit end
-             CriterionTriggers.NETHER_TRAVEL.trigger(this, this.enteredNetherPosition);
+             CriteriaTriggers.NETHER_TRAVEL.trigger(this, this.enteredNetherPosition);
          }
  
--        if (resourcekey1 != World.NETHER) {
-+        if (maindimensionkey1 != World.NETHER) { // CraftBukkit
+-        if (resourcekey1 != Level.NETHER) {
++        if (maindimensionkey1 != Level.NETHER) { // CraftBukkit
              this.enteredNetherPosition = null;
          }
  
-@@ -1251,19 +1573,17 @@
+@@ -1251,36 +1571,63 @@
          this.containerMenu.broadcastChanges();
      }
  
 -    @Override
--    public Either<EntityHuman.EnumBedResult, Unit> startSleepInBed(BlockPosition blockposition) {
--        EnumDirection enumdirection = (EnumDirection) this.level().getBlockState(blockposition).getValue(BlockFacingHorizontal.FACING);
+-    public Either<Player.BedSleepingProblem, Unit> startSleepInBed(BlockPos pos) {
+-        Direction enumdirection = (Direction) this.level().getBlockState(pos).getValue(HorizontalDirectionalBlock.FACING);
 -
 +    // CraftBukkit start - moved bed result checks from below into separate method
-+    private Either<EntityHuman.EnumBedResult, Unit> getBedResult(BlockPosition blockposition, EnumDirection enumdirection) {
++    private Either<net.minecraft.world.entity.player.Player.BedSleepingProblem, Unit> getBedResult(BlockPos blockposition, Direction enumdirection) {
          if (!this.isSleeping() && this.isAlive()) {
 -            if (!this.level().dimensionType().natural()) {
+-                return Either.left(Player.BedSleepingProblem.NOT_POSSIBLE_HERE);
+-            } else if (!this.bedInRange(pos, enumdirection)) {
+-                return Either.left(Player.BedSleepingProblem.TOO_FAR_AWAY);
+-            } else if (this.bedBlocked(pos, enumdirection)) {
+-                return Either.left(Player.BedSleepingProblem.OBSTRUCTED);
 +            if (!this.level().dimensionType().natural() || !this.level().dimensionType().bedWorks()) {
-                 return Either.left(EntityHuman.EnumBedResult.NOT_POSSIBLE_HERE);
-             } else if (!this.bedInRange(blockposition, enumdirection)) {
-                 return Either.left(EntityHuman.EnumBedResult.TOO_FAR_AWAY);
-             } else if (this.bedBlocked(blockposition, enumdirection)) {
-                 return Either.left(EntityHuman.EnumBedResult.OBSTRUCTED);
++                return Either.left(net.minecraft.world.entity.player.Player.BedSleepingProblem.NOT_POSSIBLE_HERE);
++            } else if (!this.bedInRange(blockposition, enumdirection)) {
++                return Either.left(net.minecraft.world.entity.player.Player.BedSleepingProblem.TOO_FAR_AWAY);
++            } else if (this.bedBlocked(blockposition, enumdirection)) {
++                return Either.left(net.minecraft.world.entity.player.Player.BedSleepingProblem.OBSTRUCTED);
              } else {
--                this.setRespawnPosition(this.level().dimension(), blockposition, this.getYRot(), false, true);
+-                this.setRespawnPosition(this.level().dimension(), pos, this.getYRot(), false, true);
 +                this.setRespawnPosition(this.level().dimension(), blockposition, this.getYRot(), false, true, PlayerSpawnChangeEvent.Cause.BED); // CraftBukkit
                  if (this.level().isDay()) {
-                     return Either.left(EntityHuman.EnumBedResult.NOT_POSSIBLE_NOW);
+-                    return Either.left(Player.BedSleepingProblem.NOT_POSSIBLE_NOW);
++                    return Either.left(net.minecraft.world.entity.player.Player.BedSleepingProblem.NOT_POSSIBLE_NOW);
                  } else {
-@@ -1280,7 +1600,36 @@
+                     if (!this.isCreative()) {
+                         double d0 = 8.0D;
+                         double d1 = 5.0D;
+-                        Vec3 vec3d = Vec3.atBottomCenterOf(pos);
++                        Vec3 vec3d = Vec3.atBottomCenterOf(blockposition);
+                         List<Monster> list = this.level().getEntitiesOfClass(Monster.class, new AABB(vec3d.x() - 8.0D, vec3d.y() - 5.0D, vec3d.z() - 8.0D, vec3d.x() + 8.0D, vec3d.y() + 5.0D, vec3d.z() + 8.0D), (entitymonster) -> {
+                             return entitymonster.isPreventingPlayerRest(this.serverLevel(), this);
+                         });
+ 
+                         if (!list.isEmpty()) {
+-                            return Either.left(Player.BedSleepingProblem.NOT_SAFE);
++                            return Either.left(net.minecraft.world.entity.player.Player.BedSleepingProblem.NOT_SAFE);
                          }
                      }
  
--                    Either<EntityHuman.EnumBedResult, Unit> either = super.startSleepInBed(blockposition).ifRight((unit) -> {
+-                    Either<Player.BedSleepingProblem, Unit> either = super.startSleepInBed(pos).ifRight((unit) -> {
 +                    return Either.right(Unit.INSTANCE);
 +                }
 +            }
 +        } else {
-+            return Either.left(EntityHuman.EnumBedResult.OTHER_PROBLEM);
++            return Either.left(net.minecraft.world.entity.player.Player.BedSleepingProblem.OTHER_PROBLEM);
 +        }
 +    }
 +
 +    @Override
-+    public Either<EntityHuman.EnumBedResult, Unit> startSleepInBed(BlockPosition blockposition, boolean force) {
-+        EnumDirection enumdirection = (EnumDirection) this.level().getBlockState(blockposition).getValue(BlockFacingHorizontal.FACING);
-+        Either<EntityHuman.EnumBedResult, Unit> bedResult = this.getBedResult(blockposition, enumdirection);
++    public Either<net.minecraft.world.entity.player.Player.BedSleepingProblem, Unit> startSleepInBed(BlockPos blockposition, boolean force) {
++        Direction enumdirection = (Direction) this.level().getBlockState(blockposition).getValue(HorizontalDirectionalBlock.FACING);
++        Either<net.minecraft.world.entity.player.Player.BedSleepingProblem, Unit> bedResult = this.getBedResult(blockposition, enumdirection);
 +
-+        if (bedResult.left().orElse(null) == EntityHuman.EnumBedResult.OTHER_PROBLEM) {
++        if (bedResult.left().orElse(null) == net.minecraft.world.entity.player.Player.BedSleepingProblem.OTHER_PROBLEM) {
 +            return bedResult; // return immediately if the result is not bypassable by plugins
 +        }
 +
@@ -775,29 +898,29 @@
 +        {
 +            {
 +                {
-+                    Either<EntityHuman.EnumBedResult, Unit> either = super.startSleepInBed(blockposition, force).ifRight((unit) -> {
-                         this.awardStat(StatisticList.SLEEP_IN_BED);
-                         CriterionTriggers.SLEPT_IN_BED.trigger(this);
++                    Either<net.minecraft.world.entity.player.Player.BedSleepingProblem, Unit> either = super.startSleepInBed(blockposition, force).ifRight((unit) -> {
+                         this.awardStat(Stats.SLEEP_IN_BED);
+                         CriteriaTriggers.SLEPT_IN_BED.trigger(this);
                      });
-@@ -1293,9 +1642,8 @@
+@@ -1293,9 +1640,8 @@
                      return either;
                  }
              }
 -        } else {
--            return Either.left(EntityHuman.EnumBedResult.OTHER_PROBLEM);
+-            return Either.left(Player.BedSleepingProblem.OTHER_PROBLEM);
          }
 +        // CraftBukkit end
      }
  
      @Override
-@@ -1322,13 +1670,31 @@
+@@ -1322,13 +1668,31 @@
  
      @Override
-     public void stopSleepInBed(boolean flag, boolean flag1) {
+     public void stopSleepInBed(boolean skipSleepTimer, boolean updateSleepingPlayers) {
 +        if (!this.isSleeping()) return; // CraftBukkit - Can't leave bed if not in one!
 +        // CraftBukkit start - fire PlayerBedLeaveEvent
 +        CraftPlayer player = this.getBukkitEntity();
-+        BlockPosition bedPosition = this.getSleepingPos().orElse(null);
++        BlockPos bedPosition = this.getSleepingPos().orElse(null);
 +
 +        org.bukkit.block.Block bed;
 +        if (bedPosition != null) {
@@ -813,29 +936,29 @@
 +        }
 +        // CraftBukkit end
          if (this.isSleeping()) {
-             this.serverLevel().getChunkSource().broadcastAndSend(this, new PacketPlayOutAnimation(this, 2));
+             this.serverLevel().getChunkSource().broadcastAndSend(this, new ClientboundAnimatePacket(this, 2));
          }
  
-         super.stopSleepInBed(flag, flag1);
+         super.stopSleepInBed(skipSleepTimer, updateSleepingPlayers);
          if (this.connection != null) {
 -            this.connection.teleport(this.getX(), this.getY(), this.getZ(), this.getYRot(), this.getXRot());
 +            this.connection.teleport(this.getX(), this.getY(), this.getZ(), this.getYRot(), this.getXRot(), TeleportCause.EXIT_BED); // CraftBukkit
          }
  
      }
-@@ -1387,8 +1753,9 @@
-         this.connection.send(new PacketPlayOutOpenSignEditor(tileentitysign.getBlockPos(), flag));
+@@ -1387,8 +1751,9 @@
+         this.connection.send(new ClientboundOpenSignEditorPacket(sign.getBlockPos(), front));
      }
  
 -    public void nextContainerCounter() {
 +    public int nextContainerCounter() { // CraftBukkit - void -> int
          this.containerCounter = this.containerCounter % 100 + 1;
-+        return containerCounter; // CraftBukkit
++        return this.containerCounter; // CraftBukkit
      }
  
      @Override
-@@ -1396,13 +1763,35 @@
-         if (itileinventory == null) {
+@@ -1396,13 +1761,35 @@
+         if (factory == null) {
              return OptionalInt.empty();
          } else {
 +            // CraftBukkit start - SPIGOT-6552: Handle inventory closing in CraftEventFactory#callInventoryOpenEvent(...)
@@ -847,21 +970,21 @@
 +            // CraftBukkit end
  
              this.nextContainerCounter();
-             Container container = itileinventory.createMenu(this.containerCounter, this.getInventory(), this);
+             AbstractContainerMenu container = factory.createMenu(this.containerCounter, this.getInventory(), this);
  
 +            // CraftBukkit start - Inventory open hook
 +            if (container != null) {
-+                container.setTitle(itileinventory.getDisplayName());
++                container.setTitle(factory.getDisplayName());
 +
 +                boolean cancelled = false;
 +                container = CraftEventFactory.callInventoryOpenEvent(this, container, cancelled);
 +                if (container == null && !cancelled) { // Let pre-cancelled events fall through
 +                    // SPIGOT-5263 - close chest if cancelled
-+                    if (itileinventory instanceof IInventory) {
-+                        ((IInventory) itileinventory).stopOpen(this);
-+                    } else if (itileinventory instanceof BlockChest.DoubleInventory) {
++                    if (factory instanceof Container) {
++                        ((Container) factory).stopOpen(this);
++                    } else if (factory instanceof ChestBlock.DoubleInventory) {
 +                        // SPIGOT-5355 - double chests too :(
-+                        ((BlockChest.DoubleInventory) itileinventory).inventorylargechest.stopOpen(this);
++                        ((ChestBlock.DoubleInventory) factory).inventorylargechest.stopOpen(this);
 +                    }
 +                    return OptionalInt.empty();
 +                }
@@ -869,33 +992,33 @@
 +            // CraftBukkit end
              if (container == null) {
                  if (this.isSpectator()) {
-                     this.displayClientMessage(IChatBaseComponent.translatable("container.spectatorCantOpen").withStyle(EnumChatFormat.RED), true);
-@@ -1410,9 +1799,11 @@
+                     this.displayClientMessage(Component.translatable("container.spectatorCantOpen").withStyle(ChatFormatting.RED), true);
+@@ -1410,9 +1797,11 @@
  
                  return OptionalInt.empty();
              } else {
--                this.connection.send(new PacketPlayOutOpenWindow(container.containerId, container.getType(), itileinventory.getDisplayName()));
+-                this.connection.send(new ClientboundOpenScreenPacket(container.containerId, container.getType(), factory.getDisplayName()));
 -                this.initMenu(container);
 +                // CraftBukkit start
                  this.containerMenu = container;
-+                this.connection.send(new PacketPlayOutOpenWindow(container.containerId, container.getType(), container.getTitle()));
++                this.connection.send(new ClientboundOpenScreenPacket(container.containerId, container.getType(), container.getTitle()));
 +                // CraftBukkit end
 +                this.initMenu(container);
                  return OptionalInt.of(this.containerCounter);
              }
          }
-@@ -1425,15 +1816,26 @@
+@@ -1425,15 +1814,26 @@
  
      @Override
-     public void openHorseInventory(EntityHorseAbstract entityhorseabstract, IInventory iinventory) {
+     public void openHorseInventory(AbstractHorse horse, Container inventory) {
 +        // CraftBukkit start - Inventory open hook
 +        this.nextContainerCounter();
-+        Container container = new ContainerHorse(this.containerCounter, this.getInventory(), iinventory, entityhorseabstract, entityhorseabstract.getInventoryColumns());
-+        container.setTitle(entityhorseabstract.getDisplayName());
++        AbstractContainerMenu container = new HorseInventoryMenu(this.containerCounter, this.getInventory(), inventory, horse, horse.getInventoryColumns());
++        container.setTitle(horse.getDisplayName());
 +        container = CraftEventFactory.callInventoryOpenEvent(this, container);
 +
 +        if (container == null) {
-+            iinventory.stopOpen(this);
++            inventory.stopOpen(this);
 +            return;
 +        }
 +        // CraftBukkit end
@@ -905,83 +1028,83 @@
  
 -        this.nextContainerCounter();
 +        // this.nextContainerCounter(); // CraftBukkit - moved up
-         int i = entityhorseabstract.getInventoryColumns();
+         int i = horse.getInventoryColumns();
  
-         this.connection.send(new PacketPlayOutOpenWindowHorse(this.containerCounter, i, entityhorseabstract.getId()));
--        this.containerMenu = new ContainerHorse(this.containerCounter, this.getInventory(), iinventory, entityhorseabstract, i);
+         this.connection.send(new ClientboundHorseScreenOpenPacket(this.containerCounter, i, horse.getId()));
+-        this.containerMenu = new HorseInventoryMenu(this.containerCounter, this.getInventory(), inventory, horse, i);
 +        this.containerMenu = container; // CraftBukkit
          this.initMenu(this.containerMenu);
      }
  
-@@ -1456,6 +1858,7 @@
+@@ -1456,6 +1856,7 @@
  
      @Override
      public void closeContainer() {
 +        CraftEventFactory.handleInventoryCloseEvent(this); // CraftBukkit
-         this.connection.send(new PacketPlayOutCloseWindow(this.containerMenu.containerId));
+         this.connection.send(new ClientboundContainerClosePacket(this.containerMenu.containerId));
          this.doCloseContainer();
      }
-@@ -1485,19 +1888,19 @@
-                 i = Math.round((float) Math.sqrt(d0 * d0 + d1 * d1 + d2 * d2) * 100.0F);
+@@ -1485,19 +1886,19 @@
+                 i = Math.round((float) Math.sqrt(deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ) * 100.0F);
                  if (i > 0) {
-                     this.awardStat(StatisticList.SWIM_ONE_CM, i);
+                     this.awardStat(Stats.SWIM_ONE_CM, i);
 -                    this.causeFoodExhaustion(0.01F * (float) i * 0.01F);
 +                    this.causeFoodExhaustion(0.01F * (float) i * 0.01F, EntityExhaustionEvent.ExhaustionReason.SWIM); // CraftBukkit - EntityExhaustionEvent
                  }
-             } else if (this.isEyeInFluid(TagsFluid.WATER)) {
-                 i = Math.round((float) Math.sqrt(d0 * d0 + d1 * d1 + d2 * d2) * 100.0F);
+             } else if (this.isEyeInFluid(FluidTags.WATER)) {
+                 i = Math.round((float) Math.sqrt(deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ) * 100.0F);
                  if (i > 0) {
-                     this.awardStat(StatisticList.WALK_UNDER_WATER_ONE_CM, i);
+                     this.awardStat(Stats.WALK_UNDER_WATER_ONE_CM, i);
 -                    this.causeFoodExhaustion(0.01F * (float) i * 0.01F);
 +                    this.causeFoodExhaustion(0.01F * (float) i * 0.01F, EntityExhaustionEvent.ExhaustionReason.WALK_UNDERWATER); // CraftBukkit - EntityExhaustionEvent
                  }
              } else if (this.isInWater()) {
-                 i = Math.round((float) Math.sqrt(d0 * d0 + d2 * d2) * 100.0F);
+                 i = Math.round((float) Math.sqrt(deltaX * deltaX + deltaZ * deltaZ) * 100.0F);
                  if (i > 0) {
-                     this.awardStat(StatisticList.WALK_ON_WATER_ONE_CM, i);
+                     this.awardStat(Stats.WALK_ON_WATER_ONE_CM, i);
 -                    this.causeFoodExhaustion(0.01F * (float) i * 0.01F);
 +                    this.causeFoodExhaustion(0.01F * (float) i * 0.01F, EntityExhaustionEvent.ExhaustionReason.WALK_ON_WATER); // CraftBukkit - EntityExhaustionEvent
                  }
              } else if (this.onClimbable()) {
-                 if (d1 > 0.0D) {
-@@ -1508,13 +1911,13 @@
+                 if (deltaY > 0.0D) {
+@@ -1508,13 +1909,13 @@
                  if (i > 0) {
                      if (this.isSprinting()) {
-                         this.awardStat(StatisticList.SPRINT_ONE_CM, i);
+                         this.awardStat(Stats.SPRINT_ONE_CM, i);
 -                        this.causeFoodExhaustion(0.1F * (float) i * 0.01F);
 +                        this.causeFoodExhaustion(0.1F * (float) i * 0.01F, EntityExhaustionEvent.ExhaustionReason.SPRINT); // CraftBukkit - EntityExhaustionEvent
                      } else if (this.isCrouching()) {
-                         this.awardStat(StatisticList.CROUCH_ONE_CM, i);
+                         this.awardStat(Stats.CROUCH_ONE_CM, i);
 -                        this.causeFoodExhaustion(0.0F * (float) i * 0.01F);
 +                        this.causeFoodExhaustion(0.0F * (float) i * 0.01F, EntityExhaustionEvent.ExhaustionReason.CROUCH); // CraftBukkit - EntityExhaustionEvent
                      } else {
-                         this.awardStat(StatisticList.WALK_ONE_CM, i);
+                         this.awardStat(Stats.WALK_ONE_CM, i);
 -                        this.causeFoodExhaustion(0.0F * (float) i * 0.01F);
 +                        this.causeFoodExhaustion(0.0F * (float) i * 0.01F, EntityExhaustionEvent.ExhaustionReason.WALK); // CraftBukkit - EntityExhaustionEvent
                      }
                  }
              } else if (this.isFallFlying()) {
-@@ -1557,7 +1960,7 @@
+@@ -1557,7 +1958,7 @@
      @Override
-     public void awardStat(Statistic<?> statistic, int i) {
-         this.stats.increment(this, statistic, i);
--        this.getScoreboard().forAllObjectives(statistic, this, (scoreaccess) -> {
-+        this.level().getCraftServer().getScoreboardManager().forAllObjectives(statistic, this, (scoreaccess) -> {
-             scoreaccess.add(i);
+     public void awardStat(Stat<?> stat, int amount) {
+         this.stats.increment(this, stat, amount);
+-        this.getScoreboard().forAllObjectives(stat, this, (scoreaccess) -> {
++        this.level().getCraftServer().getScoreboardManager().forAllObjectives(stat, this, (scoreaccess) -> {
+             scoreaccess.add(amount);
          });
      }
-@@ -1565,7 +1968,7 @@
+@@ -1565,7 +1966,7 @@
      @Override
-     public void resetStat(Statistic<?> statistic) {
-         this.stats.setValue(this, statistic, 0);
--        this.getScoreboard().forAllObjectives(statistic, this, ScoreAccess::reset);
-+        this.level().getCraftServer().getScoreboardManager().forAllObjectives(statistic, this, ScoreAccess::reset); // CraftBukkit - Get our scores instead
+     public void resetStat(Stat<?> stat) {
+         this.stats.setValue(this, stat, 0);
+-        this.getScoreboard().forAllObjectives(stat, this, ScoreAccess::reset);
++        this.level().getCraftServer().getScoreboardManager().forAllObjectives(stat, this, ScoreAccess::reset); // CraftBukkit - Get our scores instead
      }
  
      @Override
-@@ -1597,9 +2000,9 @@
+@@ -1597,9 +1998,9 @@
          super.jumpFromGround();
-         this.awardStat(StatisticList.JUMP);
+         this.awardStat(Stats.JUMP);
          if (this.isSprinting()) {
 -            this.causeFoodExhaustion(0.2F);
 +            this.causeFoodExhaustion(0.2F, EntityExhaustionEvent.ExhaustionReason.JUMP_SPRINT); // CraftBukkit - EntityExhaustionEvent
@@ -991,7 +1114,7 @@
          }
  
      }
-@@ -1625,6 +2028,7 @@
+@@ -1625,6 +2026,7 @@
  
      public void resetSentInfo() {
          this.lastSentHealth = -1.0E8F;
@@ -999,110 +1122,119 @@
      }
  
      @Override
-@@ -1661,7 +2065,7 @@
+@@ -1661,7 +2063,7 @@
          this.onUpdateAbilities();
-         if (flag) {
-             this.getAttributes().assignBaseValues(entityplayer.getAttributes());
--            this.getAttributes().assignPermanentModifiers(entityplayer.getAttributes());
+         if (alive) {
+             this.getAttributes().assignBaseValues(oldPlayer.getAttributes());
+-            this.getAttributes().assignPermanentModifiers(oldPlayer.getAttributes());
 +            // this.getAttributes().assignPermanentModifiers(entityplayer.getAttributes()); // CraftBukkit
-             this.setHealth(entityplayer.getHealth());
-             this.foodData = entityplayer.foodData;
-             Iterator iterator = entityplayer.getActiveEffects().iterator();
-@@ -1669,7 +2073,7 @@
+             this.setHealth(oldPlayer.getHealth());
+             this.foodData = oldPlayer.foodData;
+             Iterator iterator = oldPlayer.getActiveEffects().iterator();
+@@ -1669,7 +2071,7 @@
              while (iterator.hasNext()) {
-                 MobEffect mobeffect = (MobEffect) iterator.next();
+                 MobEffectInstance mobeffect = (MobEffectInstance) iterator.next();
  
--                this.addEffect(new MobEffect(mobeffect));
+-                this.addEffect(new MobEffectInstance(mobeffect));
 +                // this.addEffect(new MobEffect(mobeffect)); // CraftBukkit
              }
  
-             this.getInventory().replaceWith(entityplayer.getInventory());
-@@ -1680,7 +2084,7 @@
-             this.portalProcess = entityplayer.portalProcess;
+             this.getInventory().replaceWith(oldPlayer.getInventory());
+@@ -1680,7 +2082,7 @@
+             this.portalProcess = oldPlayer.portalProcess;
          } else {
-             this.getAttributes().assignBaseValues(entityplayer.getAttributes());
+             this.getAttributes().assignBaseValues(oldPlayer.getAttributes());
 -            this.setHealth(this.getMaxHealth());
 +            // this.setHealth(this.getMaxHealth()); // CraftBukkit
-             if (this.serverLevel().getGameRules().getBoolean(GameRules.RULE_KEEPINVENTORY) || entityplayer.isSpectator()) {
-                 this.getInventory().replaceWith(entityplayer.getInventory());
-                 this.experienceLevel = entityplayer.experienceLevel;
-@@ -1696,7 +2100,7 @@
+             if (this.serverLevel().getGameRules().getBoolean(GameRules.RULE_KEEPINVENTORY) || oldPlayer.isSpectator()) {
+                 this.getInventory().replaceWith(oldPlayer.getInventory());
+                 this.experienceLevel = oldPlayer.experienceLevel;
+@@ -1696,7 +2098,7 @@
          this.lastSentExp = -1;
          this.lastSentHealth = -1.0F;
          this.lastSentFood = -1;
--        this.recipeBook.copyOverData(entityplayer.recipeBook);
+-        this.recipeBook.copyOverData(oldPlayer.recipeBook);
 +        // this.recipeBook.copyOverData(entityplayer.recipeBook); // CraftBukkit
-         this.seenCredits = entityplayer.seenCredits;
-         this.enteredNetherPosition = entityplayer.enteredNetherPosition;
-         this.chunkTrackingView = entityplayer.chunkTrackingView;
-@@ -1752,7 +2156,7 @@
+         this.seenCredits = oldPlayer.seenCredits;
+         this.enteredNetherPosition = oldPlayer.enteredNetherPosition;
+         this.chunkTrackingView = oldPlayer.chunkTrackingView;
+@@ -1752,19 +2154,19 @@
      }
  
      @Override
--    public boolean teleportTo(WorldServer worldserver, double d0, double d1, double d2, Set<Relative> set, float f, float f1, boolean flag) {
-+    public boolean teleportTo(WorldServer worldserver, double d0, double d1, double d2, Set<Relative> set, float f, float f1, boolean flag, TeleportCause cause) { // CraftBukkit
+-    public boolean teleportTo(ServerLevel world, double destX, double destY, double destZ, Set<Relative> flags, float yaw, float pitch, boolean resetCamera) {
++    public boolean teleportTo(ServerLevel worldserver, double d0, double d1, double d2, Set<Relative> set, float f, float f1, boolean flag, TeleportCause cause) { // CraftBukkit
          if (this.isSleeping()) {
              this.stopSleepInBed(true, true);
          }
-@@ -1761,7 +2165,7 @@
+ 
+-        if (resetCamera) {
++        if (flag) {
              this.setCamera(this);
          }
  
--        boolean flag1 = super.teleportTo(worldserver, d0, d1, d2, set, f, f1, flag);
+-        boolean flag1 = super.teleportTo(world, destX, destY, destZ, flags, yaw, pitch, resetCamera);
 +        boolean flag1 = super.teleportTo(worldserver, d0, d1, d2, set, f, f1, flag, cause); // CraftBukkit
  
          if (flag1) {
-             this.setYHeadRot(set.contains(Relative.Y_ROT) ? this.getYHeadRot() + f : f);
-@@ -1878,6 +2282,16 @@
+-            this.setYHeadRot(flags.contains(Relative.Y_ROT) ? this.getYHeadRot() + yaw : yaw);
++            this.setYHeadRot(set.contains(Relative.Y_ROT) ? this.getYHeadRot() + f : f);
+         }
+ 
+         return flag1;
+@@ -1878,6 +2280,16 @@
      }
  
-     public void updateOptions(ClientInformation clientinformation) {
+     public void updateOptions(ClientInformation clientOptions) {
 +        // CraftBukkit start
-+        if (getMainArm() != clientinformation.mainHand()) {
-+            PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(getBukkitEntity(), getMainArm() == EnumMainHand.LEFT ? MainHand.LEFT : MainHand.RIGHT);
++        if (this.getMainArm() != clientOptions.mainHand()) {
++            PlayerChangedMainHandEvent event = new PlayerChangedMainHandEvent(this.getBukkitEntity(), this.getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT);
 +            this.server.server.getPluginManager().callEvent(event);
 +        }
-+        if (!this.language.equals(clientinformation.language())) {
-+            PlayerLocaleChangeEvent event = new PlayerLocaleChangeEvent(getBukkitEntity(), clientinformation.language());
++        if (!this.language.equals(clientOptions.language())) {
++            PlayerLocaleChangeEvent event = new PlayerLocaleChangeEvent(this.getBukkitEntity(), clientOptions.language());
 +            this.server.server.getPluginManager().callEvent(event);
 +        }
 +        // CraftBukkit end
-         this.language = clientinformation.language();
-         this.requestedViewDistance = clientinformation.viewDistance();
-         this.chatVisibility = clientinformation.chatVisibility();
-@@ -1962,7 +2376,7 @@
-             if (world instanceof WorldServer) {
-                 WorldServer worldserver = (WorldServer) world;
+         this.language = clientOptions.language();
+         this.requestedViewDistance = clientOptions.viewDistance();
+         this.chatVisibility = clientOptions.chatVisibility();
+@@ -1962,7 +2374,7 @@
+             if (world instanceof ServerLevel) {
+                 ServerLevel worldserver = (ServerLevel) world;
  
 -                this.teleportTo(worldserver, this.camera.getX(), this.camera.getY(), this.camera.getZ(), Set.of(), this.getYRot(), this.getXRot(), false);
 +                this.teleportTo(worldserver, this.camera.getX(), this.camera.getY(), this.camera.getZ(), Set.of(), this.getYRot(), this.getXRot(), false, TeleportCause.SPECTATE); // CraftBukkit
              }
  
              if (entity != null) {
-@@ -1999,11 +2413,11 @@
+@@ -1999,11 +2411,11 @@
  
      @Nullable
-     public IChatBaseComponent getTabListDisplayName() {
+     public Component getTabListDisplayName() {
 -        return null;
-+        return listName; // CraftBukkit
++        return this.listName; // CraftBukkit
      }
  
      public int getTabListOrder() {
 -        return 0;
-+        return listOrder; // CraftBukkit
++        return this.listOrder; // CraftBukkit
      }
  
      @Override
-@@ -2046,6 +2460,32 @@
+@@ -2046,17 +2458,43 @@
      }
  
-     public void setRespawnPosition(ResourceKey<World> resourcekey, @Nullable BlockPosition blockposition, float f, boolean flag, boolean flag1) {
+     public void setRespawnPosition(ResourceKey<Level> dimension, @Nullable BlockPos pos, float angle, boolean forced, boolean sendMessage) {
+-        if (pos != null) {
+-            boolean flag2 = pos.equals(this.respawnPosition) && dimension.equals(this.respawnDimension);
 +        // CraftBukkit start
-+        this.setRespawnPosition(resourcekey, blockposition, f, flag, flag1, PlayerSpawnChangeEvent.Cause.UNKNOWN);
++        this.setRespawnPosition(dimension, pos, angle, forced, sendMessage, PlayerSpawnChangeEvent.Cause.UNKNOWN);
 +    }
-+
-+    public void setRespawnPosition(ResourceKey<World> resourcekey, @Nullable BlockPosition blockposition, float f, boolean flag, boolean flag1, PlayerSpawnChangeEvent.Cause cause) {
-+        WorldServer newWorld = this.server.getLevel(resourcekey);
+ 
+-            if (sendMessage && !flag2) {
++    public void setRespawnPosition(ResourceKey<Level> resourcekey, @Nullable BlockPos blockposition, float f, boolean flag, boolean flag1, PlayerSpawnChangeEvent.Cause cause) {
++        ServerLevel newWorld = this.server.getLevel(resourcekey);
 +        Location newSpawn = (blockposition != null) ? CraftLocation.toBukkit(blockposition, newWorld.getWorld(), f, 0) : null;
 +
 +        PlayerSpawnChangeEvent event = new PlayerSpawnChangeEvent(this.getBukkitEntity(), newSpawn, flag, cause);
@@ -1115,24 +1247,40 @@
 +
 +        if (newSpawn != null) {
 +            resourcekey = ((CraftWorld) newSpawn.getWorld()).getHandle().dimension();
-+            blockposition = BlockPosition.containing(newSpawn.getX(), newSpawn.getY(), newSpawn.getZ());
++            blockposition = BlockPos.containing(newSpawn.getX(), newSpawn.getY(), newSpawn.getZ());
 +            f = newSpawn.getYaw();
 +        } else {
-+            resourcekey = World.OVERWORLD;
++            resourcekey = Level.OVERWORLD;
 +            blockposition = null;
 +            f = 0.0F;
 +        }
 +        // CraftBukkit end
-         if (blockposition != null) {
-             boolean flag2 = blockposition.equals(this.respawnPosition) && resourcekey.equals(this.respawnDimension);
++        if (blockposition != null) {
++            boolean flag2 = blockposition.equals(this.respawnPosition) && resourcekey.equals(this.respawnDimension);
++
++            if (flag1 && !flag2) {
+                 this.sendSystemMessage(Component.translatable("block.minecraft.set_spawn"));
+             }
  
-@@ -2088,12 +2528,38 @@
+-            this.respawnPosition = pos;
+-            this.respawnDimension = dimension;
+-            this.respawnAngle = angle;
+-            this.respawnForced = forced;
++            this.respawnPosition = blockposition;
++            this.respawnDimension = resourcekey;
++            this.respawnAngle = f;
++            this.respawnForced = flag;
+         } else {
+             this.respawnPosition = null;
+             this.respawnDimension = Level.OVERWORLD;
+@@ -2088,18 +2526,44 @@
      }
  
      @Override
--    public EntityItem drop(ItemStack itemstack, boolean flag, boolean flag1) {
-+    public EntityItem drop(ItemStack itemstack, boolean flag, boolean flag1, boolean callEvent) { // CraftBukkit - SPIGOT-2942: Add boolean to call event
-         EntityItem entityitem = this.createItemStackToDrop(itemstack, flag, flag1);
+-    public ItemEntity drop(ItemStack stack, boolean throwRandomly, boolean retainOwnership) {
+-        ItemEntity entityitem = this.createItemStackToDrop(stack, throwRandomly, retainOwnership);
++    public ItemEntity drop(ItemStack itemstack, boolean flag, boolean flag1, boolean callEvent) { // CraftBukkit - SPIGOT-2942: Add boolean to call event
++        ItemEntity entityitem = this.createItemStackToDrop(itemstack, flag, flag1);
  
          if (entityitem == null) {
              return null;
@@ -1166,26 +1314,35 @@
              this.level().addFreshEntity(entityitem);
              ItemStack itemstack1 = entityitem.getItem();
  
-@@ -2375,10 +2841,12 @@
+-            if (retainOwnership) {
++            if (flag1) {
+                 if (!itemstack1.isEmpty()) {
+-                    this.awardStat(Stats.ITEM_DROPPED.get(itemstack1.getItem()), stack.getCount());
++                    this.awardStat(Stats.ITEM_DROPPED.get(itemstack1.getItem()), itemstack.getCount());
+                 }
+ 
+                 this.awardStat(Stats.DROP);
+@@ -2375,16 +2839,160 @@
          return TicketType.ENDER_PEARL.timeout();
      }
  
--    public static record RespawnPosAngle(Vec3D position, float yaw) {
+-    public static record RespawnPosAngle(Vec3 position, float yaw) {
 +    // CraftBukkit start
-+    public static record RespawnPosAngle(Vec3D position, float yaw, boolean isBedSpawn, boolean isAnchorSpawn) {
++    public static record RespawnPosAngle(Vec3 position, float yaw, boolean isBedSpawn, boolean isAnchorSpawn) {
  
--        public static EntityPlayer.RespawnPosAngle of(Vec3D vec3d, BlockPosition blockposition) {
--            return new EntityPlayer.RespawnPosAngle(vec3d, calculateLookAtYaw(vec3d, blockposition));
-+        public static EntityPlayer.RespawnPosAngle of(Vec3D vec3d, BlockPosition blockposition, boolean isBedSpawn, boolean isAnchorSpawn) {
-+            return new EntityPlayer.RespawnPosAngle(vec3d, calculateLookAtYaw(vec3d, blockposition), isBedSpawn, isAnchorSpawn);
+-        public static ServerPlayer.RespawnPosAngle of(Vec3 respawnPos, BlockPos currentPos) {
+-            return new ServerPlayer.RespawnPosAngle(respawnPos, calculateLookAtYaw(respawnPos, currentPos));
++        public static ServerPlayer.RespawnPosAngle of(Vec3 vec3d, BlockPos blockposition, boolean isBedSpawn, boolean isAnchorSpawn) {
++            return new ServerPlayer.RespawnPosAngle(vec3d, calculateLookAtYaw(vec3d, blockposition), isBedSpawn, isAnchorSpawn);
 +            // CraftBukkit end
          }
  
-         private static float calculateLookAtYaw(Vec3D vec3d, BlockPosition blockposition) {
-@@ -2387,4 +2855,146 @@
-             return (float) MathHelper.wrapDegrees(MathHelper.atan2(vec3d1.z, vec3d1.x) * 57.2957763671875D - 90.0D);
-         }
-     }
+         private static float calculateLookAtYaw(Vec3 respawnPos, BlockPos currentPos) {
+             Vec3 vec3d1 = Vec3.atBottomCenterOf(currentPos).subtract(respawnPos).normalize();
+ 
+             return (float) Mth.wrapDegrees(Mth.atan2(vec3d1.z, vec3d1.x) * 57.2957763671875D - 90.0D);
++        }
++    }
 +
 +    // CraftBukkit start - Add per-player time and weather.
 +    public long timeOffset = 0;
@@ -1217,9 +1374,9 @@
 +        }
 +
 +        if (type == WeatherType.DOWNFALL) {
-+            this.connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.STOP_RAINING, 0));
++            this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.STOP_RAINING, 0));
 +        } else {
-+            this.connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.START_RAINING, 0));
++            this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.START_RAINING, 0));
 +        }
 +    }
 +
@@ -1230,35 +1387,35 @@
 +        if (this.weather == null) {
 +            // Vanilla
 +            if (oldRain != newRain) {
-+                this.connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.RAIN_LEVEL_CHANGE, newRain));
++                this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.RAIN_LEVEL_CHANGE, newRain));
 +            }
 +        } else {
 +            // Plugin
-+            if (pluginRainPositionPrevious != pluginRainPosition) {
-+                this.connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.RAIN_LEVEL_CHANGE, pluginRainPosition));
++            if (this.pluginRainPositionPrevious != this.pluginRainPosition) {
++                this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.RAIN_LEVEL_CHANGE, this.pluginRainPosition));
 +            }
-+        }
+         }
 +
 +        if (oldThunder != newThunder) {
-+            if (weather == WeatherType.DOWNFALL || weather == null) {
-+                this.connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.THUNDER_LEVEL_CHANGE, newThunder));
++            if (this.weather == WeatherType.DOWNFALL || this.weather == null) {
++                this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.THUNDER_LEVEL_CHANGE, newThunder));
 +            } else {
-+                this.connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.THUNDER_LEVEL_CHANGE, 0));
++                this.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.THUNDER_LEVEL_CHANGE, 0));
 +            }
 +        }
-+    }
+     }
 +
 +    public void tickWeather() {
 +        if (this.weather == null) return;
 +
-+        pluginRainPositionPrevious = pluginRainPosition;
-+        if (weather == WeatherType.DOWNFALL) {
-+            pluginRainPosition += 0.01;
++        this.pluginRainPositionPrevious = this.pluginRainPosition;
++        if (this.weather == WeatherType.DOWNFALL) {
++            this.pluginRainPosition += 0.01;
 +        } else {
-+            pluginRainPosition -= 0.01;
++            this.pluginRainPosition -= 0.01;
 +        }
 +
-+        pluginRainPosition = MathHelper.clamp(pluginRainPosition, 0.0F, 1.0F);
++        this.pluginRainPosition = Mth.clamp(this.pluginRainPosition, 0.0F, 1.0F);
 +    }
 +
 +    public void resetPlayerWeather() {
@@ -1279,12 +1436,12 @@
 +
 +    @Override
 +    public boolean isImmobile() {
-+        return super.isImmobile() || !getBukkitEntity().isOnline();
++        return super.isImmobile() || !this.getBukkitEntity().isOnline();
 +    }
 +
 +    @Override
 +    public Scoreboard getScoreboard() {
-+        return getBukkitEntity().getScoreboard().getHandle();
++        return this.getBukkitEntity().getScoreboard().getHandle();
 +    }
 +
 +    public void reset() {
@@ -1300,7 +1457,7 @@
 +        this.stopUsingItem(); // CraftBukkit - SPIGOT-6682: Clear active item on reset
 +        this.setRemainingFireTicks(0);
 +        this.fallDistance = 0;
-+        this.foodData = new FoodMetaData();
++        this.foodData = new FoodData();
 +        this.experienceLevel = this.newLevel;
 +        this.totalExperience = this.newTotalExp;
 +        this.experienceProgress = 0;
diff --git a/paper-server/patches/sources/net/minecraft/server/level/ServerPlayerGameMode.java.patch b/paper-server/patches/sources/net/minecraft/server/level/ServerPlayerGameMode.java.patch
new file mode 100644
index 0000000000..4d66920645
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/level/ServerPlayerGameMode.java.patch
@@ -0,0 +1,345 @@
+--- a/net/minecraft/server/level/ServerPlayerGameMode.java
++++ b/net/minecraft/server/level/ServerPlayerGameMode.java
+@@ -13,6 +13,7 @@
+ import net.minecraft.world.InteractionResult;
+ import net.minecraft.world.MenuProvider;
+ import net.minecraft.world.entity.EquipmentSlot;
++import net.minecraft.world.item.DoubleHighBlockItem;
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.item.context.UseOnContext;
+ import net.minecraft.world.item.enchantment.EnchantmentHelper;
+@@ -20,12 +21,30 @@
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.block.Block;
+ import net.minecraft.world.level.block.GameMasterBlock;
++import net.minecraft.world.level.block.TrapDoorBlock;
+ import net.minecraft.world.level.block.entity.BlockEntity;
+ import net.minecraft.world.level.block.state.BlockState;
++import net.minecraft.world.level.block.state.properties.DoubleBlockHalf;
+ import net.minecraft.world.phys.BlockHitResult;
+ import net.minecraft.world.phys.Vec3;
+ import org.slf4j.Logger;
+ 
++// CraftBukkit start
++import java.util.ArrayList;
++import net.minecraft.server.MinecraftServer;
++import net.minecraft.world.level.block.Blocks;
++import net.minecraft.world.level.block.CakeBlock;
++import net.minecraft.world.level.block.DoorBlock;
++import org.bukkit.GameMode;
++import org.bukkit.craftbukkit.block.CraftBlock;
++import org.bukkit.event.block.BlockBreakEvent;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.event.Event;
++import org.bukkit.event.block.Action;
++import org.bukkit.event.player.PlayerGameModeChangeEvent;
++import org.bukkit.event.player.PlayerInteractEvent;
++// CraftBukkit end
++
+ public class ServerPlayerGameMode {
+ 
+     private static final Logger LOGGER = LogUtils.getLogger();
+@@ -56,9 +75,16 @@
+         if (gameMode == this.gameModeForPlayer) {
+             return false;
+         } else {
++            // CraftBukkit start
++            PlayerGameModeChangeEvent event = new PlayerGameModeChangeEvent(this.player.getBukkitEntity(), GameMode.getByValue(gameMode.getId()));
++            this.level.getCraftServer().getPluginManager().callEvent(event);
++            if (event.isCancelled()) {
++                return false;
++            }
++            // CraftBukkit end
+             this.setGameModeForPlayer(gameMode, this.previousGameModeForPlayer);
+             this.player.onUpdateAbilities();
+-            this.player.server.getPlayerList().broadcastAll(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE, this.player));
++            this.player.server.getPlayerList().broadcastAll(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_GAME_MODE, this.player), this.player); // CraftBukkit
+             this.level.updateSleepingPlayerList();
+             if (gameMode == GameType.CREATIVE) {
+                 this.player.resetCurrentImpulseContext();
+@@ -92,7 +118,7 @@
+     }
+ 
+     public void tick() {
+-        ++this.gameTicks;
++        this.gameTicks = MinecraftServer.currentTick; // CraftBukkit;
+         BlockState iblockdata;
+ 
+         if (this.hasDelayedDestroy) {
+@@ -146,11 +172,33 @@
+ 
+             if (action == ServerboundPlayerActionPacket.Action.START_DESTROY_BLOCK) {
+                 if (!this.level.mayInteract(this.player, pos)) {
++                    // CraftBukkit start - fire PlayerInteractEvent
++                    CraftEventFactory.callPlayerInteractEvent(this.player, Action.LEFT_CLICK_BLOCK, pos, direction, this.player.getInventory().getSelected(), InteractionHand.MAIN_HAND);
+                     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
++                    BlockEntity tileentity = this.level.getBlockEntity(pos);
++                    if (tileentity != null) {
++                        this.player.connection.send(tileentity.getUpdatePacket());
++                    }
++                    // CraftBukkit end
+                     return;
+                 }
+ 
++                // CraftBukkit start
++                PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.player, Action.LEFT_CLICK_BLOCK, pos, direction, this.player.getInventory().getSelected(), InteractionHand.MAIN_HAND);
++                if (event.isCancelled()) {
++                    // Let the client know the block still exists
++                    this.player.connection.send(new ClientboundBlockUpdatePacket(this.level, pos));
++                    // Update any tile entity data for this block
++                    BlockEntity tileentity = this.level.getBlockEntity(pos);
++                    if (tileentity != null) {
++                        this.player.connection.send(tileentity.getUpdatePacket());
++                    }
++                    return;
++                }
++                // CraftBukkit end
++
+                 if (this.isCreative()) {
+                     this.destroyAndAck(pos, sequence, "creative destroy");
+                     return;
+@@ -166,7 +214,19 @@
+                 float f = 1.0F;
+ 
+                 iblockdata = this.level.getBlockState(pos);
+-                if (!iblockdata.isAir()) {
++                // CraftBukkit start - Swings at air do *NOT* exist.
++                if (event.useInteractedBlock() == Event.Result.DENY) {
++                    // If we denied a door from opening, we need to send a correcting update to the client, as it already opened the door.
++                    BlockState data = this.level.getBlockState(pos);
++                    if (data.getBlock() instanceof DoorBlock) {
++                        // For some reason *BOTH* the bottom/top part have to be marked updated.
++                        boolean bottom = data.getValue(DoorBlock.HALF) == DoubleBlockHalf.LOWER;
++                        this.player.connection.send(new ClientboundBlockUpdatePacket(this.level, pos));
++                        this.player.connection.send(new ClientboundBlockUpdatePacket(this.level, bottom ? pos.above() : pos.below()));
++                    } else if (data.getBlock() instanceof TrapDoorBlock) {
++                        this.player.connection.send(new ClientboundBlockUpdatePacket(this.level, pos));
++                    }
++                } else if (!iblockdata.isAir()) {
+                     EnchantmentHelper.onHitBlock(this.level, this.player.getMainHandItem(), this.player, this.player, EquipmentSlot.MAINHAND, Vec3.atCenterOf(pos), iblockdata, (item) -> {
+                         this.player.onEquippedItemBroken(item, EquipmentSlot.MAINHAND);
+                     });
+@@ -174,6 +234,26 @@
+                     f = iblockdata.getDestroyProgress(this.player, this.player.level(), pos);
+                 }
+ 
++                if (event.useItemInHand() == Event.Result.DENY) {
++                    // If we 'insta destroyed' then the client needs to be informed.
++                    if (f > 1.0f) {
++                        this.player.connection.send(new ClientboundBlockUpdatePacket(this.level, pos));
++                    }
++                    return;
++                }
++                org.bukkit.event.block.BlockDamageEvent blockEvent = CraftEventFactory.callBlockDamageEvent(this.player, pos, this.player.getInventory().getSelected(), f >= 1.0f);
++
++                if (blockEvent.isCancelled()) {
++                    // Let the client know the block still exists
++                    this.player.connection.send(new ClientboundBlockUpdatePacket(this.level, pos));
++                    return;
++                }
++
++                if (blockEvent.getInstaBreak()) {
++                    f = 2.0f;
++                }
++                // CraftBukkit end
++
+                 if (!iblockdata.isAir() && f >= 1.0F) {
+                     this.destroyAndAck(pos, sequence, "insta mine");
+                 } else {
+@@ -218,13 +298,15 @@
+             } else if (action == ServerboundPlayerActionPacket.Action.ABORT_DESTROY_BLOCK) {
+                 this.isDestroyingBlock = false;
+                 if (!Objects.equals(this.destroyPos, pos)) {
+-                    ServerPlayerGameMode.LOGGER.warn("Mismatch in destroy block pos: {} {}", this.destroyPos, pos);
++                    ServerPlayerGameMode.LOGGER.debug("Mismatch in destroy block pos: {} {}", this.destroyPos, pos); // CraftBukkit - SPIGOT-5457 sent by client when interact event cancelled
+                     this.level.destroyBlockProgress(this.player.getId(), this.destroyPos, -1);
+                     this.debugLogging(pos, true, sequence, "aborted mismatched destroying");
+                 }
+ 
+                 this.level.destroyBlockProgress(this.player.getId(), pos, -1);
+                 this.debugLogging(pos, true, sequence, "aborted destroying");
++
++                CraftEventFactory.callBlockDamageAbortEvent(this.player, pos, this.player.getInventory().getSelected()); // CraftBukkit
+             }
+ 
+         }
+@@ -242,10 +324,65 @@
+ 
+     public boolean destroyBlock(BlockPos pos) {
+         BlockState iblockdata = this.level.getBlockState(pos);
++        // CraftBukkit start - fire BlockBreakEvent
++        org.bukkit.block.Block bblock = CraftBlock.at(this.level, pos);
++        BlockBreakEvent event = null;
+ 
+-        if (!this.player.getMainHandItem().getItem().canAttackBlock(iblockdata, this.level, pos, this.player)) {
++        if (this.player instanceof ServerPlayer) {
++            // Sword + Creative mode pre-cancel
++            boolean isSwordNoBreak = !this.player.getMainHandItem().getItem().canAttackBlock(iblockdata, this.level, pos, this.player);
++
++            // Tell client the block is gone immediately then process events
++            // Don't tell the client if its a creative sword break because its not broken!
++            if (this.level.getBlockEntity(pos) == null && !isSwordNoBreak) {
++                ClientboundBlockUpdatePacket packet = new ClientboundBlockUpdatePacket(pos, Blocks.AIR.defaultBlockState());
++                this.player.connection.send(packet);
++            }
++
++            event = new BlockBreakEvent(bblock, this.player.getBukkitEntity());
++
++            // Sword + Creative mode pre-cancel
++            event.setCancelled(isSwordNoBreak);
++
++            // Calculate default block experience
++            BlockState nmsData = this.level.getBlockState(pos);
++            Block nmsBlock = nmsData.getBlock();
++
++            ItemStack itemstack = this.player.getItemBySlot(EquipmentSlot.MAINHAND);
++
++            if (nmsBlock != null && !event.isCancelled() && !this.isCreative() && this.player.hasCorrectToolForDrops(nmsBlock.defaultBlockState())) {
++                event.setExpToDrop(nmsBlock.getExpDrop(nmsData, this.level, pos, itemstack, true));
++            }
++
++            this.level.getCraftServer().getPluginManager().callEvent(event);
++
++            if (event.isCancelled()) {
++                if (isSwordNoBreak) {
++                    return false;
++                }
++                // Let the client know the block still exists
++                this.player.connection.send(new ClientboundBlockUpdatePacket(this.level, pos));
++
++                // Brute force all possible updates
++                for (Direction dir : Direction.values()) {
++                    this.player.connection.send(new ClientboundBlockUpdatePacket(this.level, pos.relative(dir)));
++                }
++
++                // Update any tile entity data for this block
++                BlockEntity tileentity = this.level.getBlockEntity(pos);
++                if (tileentity != null) {
++                    this.player.connection.send(tileentity.getUpdatePacket());
++                }
++                return false;
++            }
++        }
++        // CraftBukkit end
++
++        if (false && !this.player.getMainHandItem().getItem().canAttackBlock(iblockdata, this.level, pos, this.player)) { // CraftBukkit - false
+             return false;
+         } else {
++            iblockdata = this.level.getBlockState(pos); // CraftBukkit - update state from plugins
++            if (iblockdata.isAir()) return false; // CraftBukkit - A plugin set block to air without cancelling
+             BlockEntity tileentity = this.level.getBlockEntity(pos);
+             Block block = iblockdata.getBlock();
+ 
+@@ -255,6 +392,10 @@
+             } else if (this.player.blockActionRestricted(this.level, pos, this.gameModeForPlayer)) {
+                 return false;
+             } else {
++                // CraftBukkit start
++                org.bukkit.block.BlockState state = bblock.getState();
++                this.level.captureDrops = new ArrayList<>();
++                // CraftBukkit end
+                 BlockState iblockdata1 = block.playerWillDestroy(this.level, pos, iblockdata, this.player);
+                 boolean flag = this.level.removeBlock(pos, false);
+ 
+@@ -263,19 +404,32 @@
+                 }
+ 
+                 if (this.isCreative()) {
+-                    return true;
++                    // return true; // CraftBukkit
+                 } else {
+                     ItemStack itemstack = this.player.getMainHandItem();
+                     ItemStack itemstack1 = itemstack.copy();
+                     boolean flag1 = this.player.hasCorrectToolForDrops(iblockdata1);
+ 
+                     itemstack.mineBlock(this.level, iblockdata1, pos, this.player);
+-                    if (flag && flag1) {
++                    if (flag && flag1 && event.isDropItems()) { // CraftBukkit - Check if block should drop items
+                         block.playerDestroy(this.level, this.player, pos, iblockdata1, tileentity, itemstack1);
+                     }
+ 
+-                    return true;
++                    // return true; // CraftBukkit
+                 }
++                // CraftBukkit start
++                if (event.isDropItems()) {
++                    org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockDropItemEvent(bblock, state, this.player, this.level.captureDrops);
++                }
++                this.level.captureDrops = null;
++
++                // Drop event experience
++                if (flag && event != null) {
++                    iblockdata.getBlock().popExperience(this.level, pos, event.getExpToDrop());
++                }
++
++                return true;
++                // CraftBukkit end
+             }
+         }
+     }
+@@ -321,15 +475,54 @@
+         }
+     }
+ 
++    // CraftBukkit start - whole method
++    public boolean interactResult = false;
++    public boolean firedInteract = false;
++    public BlockPos interactPosition;
++    public InteractionHand interactHand;
++    public ItemStack interactItemStack;
+     public InteractionResult useItemOn(ServerPlayer player, Level world, ItemStack stack, InteractionHand hand, BlockHitResult hitResult) {
+         BlockPos blockposition = hitResult.getBlockPos();
+         BlockState iblockdata = world.getBlockState(blockposition);
++        boolean cancelledBlock = false;
+ 
+         if (!iblockdata.getBlock().isEnabled(world.enabledFeatures())) {
+             return InteractionResult.FAIL;
+         } else if (this.gameModeForPlayer == GameType.SPECTATOR) {
+             MenuProvider itileinventory = iblockdata.getMenuProvider(world, blockposition);
++            cancelledBlock = !(itileinventory instanceof MenuProvider);
++        }
+ 
++        if (player.getCooldowns().isOnCooldown(stack)) {
++            cancelledBlock = true;
++        }
++
++        PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(player, Action.RIGHT_CLICK_BLOCK, blockposition, hitResult.getDirection(), stack, cancelledBlock, hand, hitResult.getLocation());
++        this.firedInteract = true;
++        this.interactResult = event.useItemInHand() == Event.Result.DENY;
++        this.interactPosition = blockposition.immutable();
++        this.interactHand = hand;
++        this.interactItemStack = stack.copy();
++
++        if (event.useInteractedBlock() == Event.Result.DENY) {
++            // If we denied a door from opening, we need to send a correcting update to the client, as it already opened the door.
++            if (iblockdata.getBlock() instanceof DoorBlock) {
++                boolean bottom = iblockdata.getValue(DoorBlock.HALF) == DoubleBlockHalf.LOWER;
++                player.connection.send(new ClientboundBlockUpdatePacket(world, bottom ? blockposition.above() : blockposition.below()));
++            } else if (iblockdata.getBlock() instanceof CakeBlock) {
++                player.getBukkitEntity().sendHealthUpdate(); // SPIGOT-1341 - reset health for cake
++            } else if (this.interactItemStack.getItem() instanceof DoubleHighBlockItem) {
++                // send a correcting update to the client, as it already placed the upper half of the bisected item
++                player.connection.send(new ClientboundBlockUpdatePacket(world, blockposition.relative(hitResult.getDirection()).above()));
++
++                // send a correcting update to the client for the block above as well, this because of replaceable blocks (such as grass, sea grass etc)
++                player.connection.send(new ClientboundBlockUpdatePacket(world, blockposition.above()));
++            }
++            player.getBukkitEntity().updateInventory(); // SPIGOT-2867
++            return (event.useItemInHand() != Event.Result.ALLOW) ? InteractionResult.SUCCESS : InteractionResult.PASS;
++        } else if (this.gameModeForPlayer == GameType.SPECTATOR) {
++            MenuProvider itileinventory = iblockdata.getMenuProvider(world, blockposition);
++
+             if (itileinventory != null) {
+                 player.openMenu(itileinventory);
+                 return InteractionResult.CONSUME;
+@@ -359,7 +552,7 @@
+                 }
+             }
+ 
+-            if (!stack.isEmpty() && !player.getCooldowns().isOnCooldown(stack)) {
++            if (!stack.isEmpty() && !this.interactResult) { // add !interactResult SPIGOT-764
+                 UseOnContext itemactioncontext = new UseOnContext(player, hand, hitResult);
+ 
+                 if (this.isCreative()) {
diff --git a/paper-server/patches/sources/net/minecraft/server/level/TicketType.java.patch b/paper-server/patches/sources/net/minecraft/server/level/TicketType.java.patch
new file mode 100644
index 0000000000..bf272763d6
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/level/TicketType.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/server/level/TicketType.java
++++ b/net/minecraft/server/level/TicketType.java
+@@ -22,6 +22,8 @@
+     public static final TicketType<BlockPos> PORTAL = TicketType.create("portal", Vec3i::compareTo, 300);
+     public static final TicketType<ChunkPos> ENDER_PEARL = TicketType.create("ender_pearl", Comparator.comparingLong(ChunkPos::toLong), 40);
+     public static final TicketType<ChunkPos> UNKNOWN = TicketType.create("unknown", Comparator.comparingLong(ChunkPos::toLong), 1);
++    public static final TicketType<Unit> PLUGIN = TicketType.create("plugin", (a, b) -> 0); // CraftBukkit
++    public static final TicketType<org.bukkit.plugin.Plugin> PLUGIN_TICKET = TicketType.create("plugin_ticket", (plugin1, plugin2) -> plugin1.getClass().getName().compareTo(plugin2.getClass().getName())); // CraftBukkit
+ 
+     public static <T> TicketType<T> create(String name, Comparator<T> argumentComparator) {
+         return new TicketType<>(name, argumentComparator, 0L);
diff --git a/paper-server/patches/sources/net/minecraft/server/level/TicketType.patch b/paper-server/patches/sources/net/minecraft/server/level/TicketType.patch
deleted file mode 100644
index 6f0d819692..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/level/TicketType.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/server/level/TicketType.java
-+++ b/net/minecraft/server/level/TicketType.java
-@@ -22,6 +22,8 @@
-     public static final TicketType<BlockPosition> PORTAL = create("portal", BaseBlockPosition::compareTo, 300);
-     public static final TicketType<ChunkCoordIntPair> ENDER_PEARL = create("ender_pearl", Comparator.comparingLong(ChunkCoordIntPair::toLong), 40);
-     public static final TicketType<ChunkCoordIntPair> UNKNOWN = create("unknown", Comparator.comparingLong(ChunkCoordIntPair::toLong), 1);
-+    public static final TicketType<Unit> PLUGIN = create("plugin", (a, b) -> 0); // CraftBukkit
-+    public static final TicketType<org.bukkit.plugin.Plugin> PLUGIN_TICKET = create("plugin_ticket", (plugin1, plugin2) -> plugin1.getClass().getName().compareTo(plugin2.getClass().getName())); // CraftBukkit
- 
-     public static <T> TicketType<T> create(String s, Comparator<T> comparator) {
-         return new TicketType<>(s, comparator, 0L);
diff --git a/paper-server/patches/sources/net/minecraft/server/level/WorldGenRegion.java.patch b/paper-server/patches/sources/net/minecraft/server/level/WorldGenRegion.java.patch
new file mode 100644
index 0000000000..257feead95
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/level/WorldGenRegion.java.patch
@@ -0,0 +1,25 @@
+--- a/net/minecraft/server/level/WorldGenRegion.java
++++ b/net/minecraft/server/level/WorldGenRegion.java
+@@ -217,7 +217,7 @@
+         if (iblockdata.isAir()) {
+             return false;
+         } else {
+-            if (drop) {
++            if (false) { // CraftBukkit - SPIGOT-6833: Do not drop during world generation
+                 BlockEntity tileentity = iblockdata.hasBlockEntity() ? this.getBlockEntity(pos) : null;
+ 
+                 Block.dropResources(iblockdata, this.level, pos, tileentity, breakingEntity, ItemStack.EMPTY);
+@@ -336,6 +336,13 @@
+ 
+     @Override
+     public boolean addFreshEntity(Entity entity) {
++        // CraftBukkit start
++        return this.addFreshEntity(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT);
++    }
++
++    @Override
++    public boolean addFreshEntity(Entity entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) {
++        // CraftBukkit end
+         int i = SectionPos.blockToSectionCoord(entity.getBlockX());
+         int j = SectionPos.blockToSectionCoord(entity.getBlockZ());
+ 
diff --git a/paper-server/patches/sources/net/minecraft/server/level/WorldServer.patch b/paper-server/patches/sources/net/minecraft/server/level/WorldServer.patch
deleted file mode 100644
index 3ed6f6b4a2..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/level/WorldServer.patch
+++ /dev/null
@@ -1,619 +0,0 @@
---- a/net/minecraft/server/level/WorldServer.java
-+++ b/net/minecraft/server/level/WorldServer.java
-@@ -174,6 +174,23 @@
- import net.minecraft.world.ticks.TickListServer;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import net.minecraft.world.level.biome.WorldChunkManager;
-+import net.minecraft.world.level.dimension.WorldDimension;
-+import net.minecraft.world.level.levelgen.ChunkGeneratorAbstract;
-+import net.minecraft.world.level.levelgen.ChunkProviderFlat;
-+import net.minecraft.world.level.storage.WorldDataServer;
-+import org.bukkit.Bukkit;
-+import org.bukkit.WeatherType;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.craftbukkit.generator.CustomWorldChunkManager;
-+import org.bukkit.craftbukkit.util.WorldUUID;
-+import org.bukkit.event.entity.CreatureSpawnEvent;
-+import org.bukkit.event.server.MapInitializeEvent;
-+import org.bukkit.event.weather.LightningStrikeEvent;
-+import org.bukkit.event.world.TimeSkipEvent;
-+// CraftBukkit end
-+
- public class WorldServer extends World implements ServerEntityGetter, GeneratorAccessSeed {
- 
-     public static final BlockPosition END_SPAWN_POINT = new BlockPosition(100, 50, 0);
-@@ -187,7 +204,7 @@
-     final List<EntityPlayer> players = Lists.newArrayList();
-     private final ChunkProviderServer chunkSource;
-     private final MinecraftServer server;
--    public final IWorldDataServer serverLevelData;
-+    public final WorldDataServer serverLevelData; // CraftBukkit - type
-     private int lastSpawnChunkRadius;
-     final EntityTickList entityTickList = new EntityTickList();
-     public final PersistentEntitySectionManager<Entity> entityManager;
-@@ -214,13 +231,47 @@
-     private final boolean tickTime;
-     private final RandomSequences randomSequences;
- 
--    public WorldServer(MinecraftServer minecraftserver, Executor executor, Convertable.ConversionSession convertable_conversionsession, IWorldDataServer iworlddataserver, ResourceKey<World> resourcekey, WorldDimension worlddimension, WorldLoadListener worldloadlistener, boolean flag, long i, List<MobSpawner> list, boolean flag1, @Nullable RandomSequences randomsequences) {
--        super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), false, flag, i, minecraftserver.getMaxChainedNeighborUpdates());
-+    // CraftBukkit start
-+    public final Convertable.ConversionSession convertable;
-+    public final UUID uuid;
-+
-+    public Chunk getChunkIfLoaded(int x, int z) {
-+        return this.chunkSource.getChunk(x, z, false);
-+    }
-+
-+    @Override
-+    public ResourceKey<WorldDimension> getTypeKey() {
-+        return convertable.dimensionType;
-+    }
-+
-+    // Add env and gen to constructor, IWorldDataServer -> WorldDataServer
-+    public WorldServer(MinecraftServer minecraftserver, Executor executor, Convertable.ConversionSession convertable_conversionsession, WorldDataServer iworlddataserver, ResourceKey<World> resourcekey, WorldDimension worlddimension, WorldLoadListener worldloadlistener, boolean flag, long i, List<MobSpawner> list, boolean flag1, @Nullable RandomSequences randomsequences, org.bukkit.World.Environment env, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider) {
-+        super(iworlddataserver, resourcekey, minecraftserver.registryAccess(), worlddimension.type(), false, flag, i, minecraftserver.getMaxChainedNeighborUpdates(), gen, biomeProvider, env);
-+        this.pvpMode = minecraftserver.isPvpAllowed();
-+        convertable = convertable_conversionsession;
-+        uuid = WorldUUID.getUUID(convertable_conversionsession.levelDirectory.path().toFile());
-+        // CraftBukkit end
-         this.tickTime = flag1;
-         this.server = minecraftserver;
-         this.customSpawners = list;
-         this.serverLevelData = iworlddataserver;
-         ChunkGenerator chunkgenerator = worlddimension.generator();
-+        // CraftBukkit start
-+        serverLevelData.setWorld(this);
-+
-+        if (biomeProvider != null) {
-+            WorldChunkManager worldChunkManager = new CustomWorldChunkManager(getWorld(), biomeProvider, server.registryAccess().lookupOrThrow(Registries.BIOME));
-+            if (chunkgenerator instanceof ChunkGeneratorAbstract cga) {
-+                chunkgenerator = new ChunkGeneratorAbstract(worldChunkManager, cga.settings);
-+            } else if (chunkgenerator instanceof ChunkProviderFlat cpf) {
-+                chunkgenerator = new ChunkProviderFlat(cpf.settings(), worldChunkManager);
-+            }
-+        }
-+
-+        if (gen != null) {
-+            chunkgenerator = new org.bukkit.craftbukkit.generator.CustomChunkGenerator(this, chunkgenerator, gen);
-+        }
-+        // CraftBukkit end
-         boolean flag2 = minecraftserver.forceSynchronousWrites();
-         DataFixer datafixer = minecraftserver.getFixerUpper();
-         EntityPersistentStorage<Entity> entitypersistentstorage = new EntityStorage(new SimpleRegionStorage(new RegionStorageInfo(convertable_conversionsession.getLevelId(), resourcekey, "entities"), convertable_conversionsession.getDimensionPath(resourcekey).resolve("entities"), datafixer, flag2, DataFixTypes.ENTITY_CHUNK), this, minecraftserver);
-@@ -248,9 +299,9 @@
-         long l = minecraftserver.getWorldData().worldGenOptions().seed();
- 
-         this.structureCheck = new StructureCheck(this.chunkSource.chunkScanner(), this.registryAccess(), minecraftserver.getStructureManager(), resourcekey, chunkgenerator, this.chunkSource.randomState(), this, chunkgenerator.getBiomeSource(), l, datafixer);
--        this.structureManager = new StructureManager(this, minecraftserver.getWorldData().worldGenOptions(), this.structureCheck);
--        if (this.dimension() == World.END && this.dimensionTypeRegistration().is(BuiltinDimensionTypes.END)) {
--            this.dragonFight = new EnderDragonBattle(this, l, minecraftserver.getWorldData().endDragonFightData());
-+        this.structureManager = new StructureManager(this, this.serverLevelData.worldGenOptions(), structureCheck); // CraftBukkit
-+        if ((this.dimension() == World.END && this.dimensionTypeRegistration().is(BuiltinDimensionTypes.END)) || env == org.bukkit.World.Environment.THE_END) { // CraftBukkit - Allow to create EnderDragonBattle in default and custom END
-+            this.dragonFight = new EnderDragonBattle(this, this.serverLevelData.worldGenOptions().seed(), this.serverLevelData.endDragonFightData()); // CraftBukkit
-         } else {
-             this.dragonFight = null;
-         }
-@@ -260,6 +311,7 @@
-         this.randomSequences = (RandomSequences) Objects.requireNonNullElseGet(randomsequences, () -> {
-             return (RandomSequences) this.getDataStorage().computeIfAbsent(RandomSequences.factory(l), "random_sequences");
-         });
-+        this.getCraftServer().addWorld(this.getWorld()); // CraftBukkit
-     }
- 
-     /** @deprecated */
-@@ -305,12 +357,20 @@
-         long j;
- 
-         if (this.sleepStatus.areEnoughSleeping(i) && this.sleepStatus.areEnoughDeepSleeping(i, this.players)) {
-+            // CraftBukkit start
-+            j = this.levelData.getDayTime() + 24000L;
-+            TimeSkipEvent event = new TimeSkipEvent(this.getWorld(), TimeSkipEvent.SkipReason.NIGHT_SKIP, (j - j % 24000L) - this.getDayTime());
-             if (this.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)) {
--                j = this.levelData.getDayTime() + 24000L;
--                this.setDayTime(j - j % 24000L);
-+                getCraftServer().getPluginManager().callEvent(event);
-+                if (!event.isCancelled()) {
-+                    this.setDayTime(this.getDayTime() + event.getSkipAmount());
-+                }
-             }
- 
--            this.wakeUpAllPlayers();
-+            if (!event.isCancelled()) {
-+                this.wakeUpAllPlayers();
-+            }
-+            // CraftBukkit end
-             if (this.getGameRules().getBoolean(GameRules.RULE_WEATHER_CYCLE) && this.isRaining()) {
-                 this.resetWeatherCycle();
-             }
-@@ -345,7 +405,7 @@
- 
-         this.handlingTick = false;
-         gameprofilerfiller.pop();
--        boolean flag1 = !this.players.isEmpty() || !this.getForcedChunks().isEmpty();
-+        boolean flag1 = true || !this.players.isEmpty() || !this.getForcedChunks().isEmpty(); // CraftBukkit - this prevents entity cleanup, other issues on servers with no players
- 
-         if (flag1) {
-             this.resetEmptyTime();
-@@ -429,7 +489,7 @@
- 
-     private void wakeUpAllPlayers() {
-         this.sleepStatus.removeAllSleepers();
--        ((List) this.players.stream().filter(EntityLiving::isSleeping).collect(Collectors.toList())).forEach((entityplayer) -> {
-+        (this.players.stream().filter(EntityLiving::isSleeping).collect(Collectors.toList())).forEach((entityplayer) -> { // CraftBukkit - decompile error
-             entityplayer.stopSleepInBed(false, false);
-         });
-     }
-@@ -456,7 +516,7 @@
-                         entityhorseskeleton.setTrap(true);
-                         entityhorseskeleton.setAge(0);
-                         entityhorseskeleton.setPos((double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ());
--                        this.addFreshEntity(entityhorseskeleton);
-+                        this.addFreshEntity(entityhorseskeleton, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.LIGHTNING); // CraftBukkit
-                     }
-                 }
- 
-@@ -465,7 +525,7 @@
-                 if (entitylightning != null) {
-                     entitylightning.moveTo(Vec3D.atBottomCenterOf(blockposition));
-                     entitylightning.setVisualOnly(flag1);
--                    this.addFreshEntity(entitylightning);
-+                    this.strikeLightning(entitylightning, org.bukkit.event.weather.LightningStrikeEvent.Cause.WEATHER); // CraftBukkit
-                 }
-             }
-         }
-@@ -521,7 +581,7 @@
-         BiomeBase biomebase = (BiomeBase) this.getBiome(blockposition1).value();
- 
-         if (biomebase.shouldFreeze(this, blockposition2)) {
--            this.setBlockAndUpdate(blockposition2, Blocks.ICE.defaultBlockState());
-+            org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this, blockposition2, Blocks.ICE.defaultBlockState(), null); // CraftBukkit
-         }
- 
-         if (this.isRaining()) {
-@@ -537,10 +597,10 @@
-                         IBlockData iblockdata1 = (IBlockData) iblockdata.setValue(BlockSnow.LAYERS, j + 1);
- 
-                         Block.pushEntitiesUp(iblockdata, iblockdata1, this, blockposition1);
--                        this.setBlockAndUpdate(blockposition1, iblockdata1);
-+                        org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this, blockposition1, iblockdata1, null); // CraftBukkit
-                     }
-                 } else {
--                    this.setBlockAndUpdate(blockposition1, Blocks.SNOW.defaultBlockState());
-+                    org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this, blockposition1, Blocks.SNOW.defaultBlockState(), null); // CraftBukkit
-                 }
-             }
- 
-@@ -701,6 +761,7 @@
-             this.rainLevel = MathHelper.clamp(this.rainLevel, 0.0F, 1.0F);
-         }
- 
-+        /* CraftBukkit start
-         if (this.oRainLevel != this.rainLevel) {
-             this.server.getPlayerList().broadcastAll(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.RAIN_LEVEL_CHANGE, this.rainLevel), this.dimension());
-         }
-@@ -719,15 +780,48 @@
-             this.server.getPlayerList().broadcastAll(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.RAIN_LEVEL_CHANGE, this.rainLevel));
-             this.server.getPlayerList().broadcastAll(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.THUNDER_LEVEL_CHANGE, this.thunderLevel));
-         }
-+        // */
-+        for (int idx = 0; idx < this.players.size(); ++idx) {
-+            if (((EntityPlayer) this.players.get(idx)).level() == this) {
-+                ((EntityPlayer) this.players.get(idx)).tickWeather();
-+            }
-+        }
-+
-+        if (flag != this.isRaining()) {
-+            // Only send weather packets to those affected
-+            for (int idx = 0; idx < this.players.size(); ++idx) {
-+                if (((EntityPlayer) this.players.get(idx)).level() == this) {
-+                    ((EntityPlayer) this.players.get(idx)).setPlayerWeather((!flag ? WeatherType.DOWNFALL : WeatherType.CLEAR), false);
-+                }
-+            }
-+        }
-+        for (int idx = 0; idx < this.players.size(); ++idx) {
-+            if (((EntityPlayer) this.players.get(idx)).level() == this) {
-+                ((EntityPlayer) this.players.get(idx)).updateWeather(this.oRainLevel, this.rainLevel, this.oThunderLevel, this.thunderLevel);
-+            }
-+        }
-+        // CraftBukkit end
- 
-     }
- 
-     @VisibleForTesting
-     public void resetWeatherCycle() {
--        this.serverLevelData.setRainTime(0);
-+        // CraftBukkit start
-         this.serverLevelData.setRaining(false);
--        this.serverLevelData.setThunderTime(0);
-+        // If we stop due to everyone sleeping we should reset the weather duration to some other random value.
-+        // Not that everyone ever manages to get the whole server to sleep at the same time....
-+        if (!this.serverLevelData.isRaining()) {
-+            this.serverLevelData.setRainTime(0);
-+        }
-+        // CraftBukkit end
-         this.serverLevelData.setThundering(false);
-+        // CraftBukkit start
-+        // If we stop due to everyone sleeping we should reset the weather duration to some other random value.
-+        // Not that everyone ever manages to get the whole server to sleep at the same time....
-+        if (!this.serverLevelData.isThundering()) {
-+            this.serverLevelData.setThunderTime(0);
-+        }
-+        // CraftBukkit end
-     }
- 
-     public void resetEmptyTime() {
-@@ -763,6 +857,7 @@
-         });
-         gameprofilerfiller.incrementCounter("tickNonPassenger");
-         entity.tick();
-+        entity.postTick(); // CraftBukkit
-         gameprofilerfiller.pop();
-         Iterator iterator = entity.getPassengers().iterator();
- 
-@@ -786,6 +881,7 @@
-                 });
-                 gameprofilerfiller.incrementCounter("tickPassenger");
-                 entity1.rideTick();
-+                entity1.postTick(); // CraftBukkit
-                 gameprofilerfiller.pop();
-                 Iterator iterator = entity1.getPassengers().iterator();
- 
-@@ -810,6 +906,7 @@
-         ChunkProviderServer chunkproviderserver = this.getChunkSource();
- 
-         if (!flag1) {
-+            org.bukkit.Bukkit.getPluginManager().callEvent(new org.bukkit.event.world.WorldSaveEvent(getWorld())); // CraftBukkit
-             if (iprogressupdate != null) {
-                 iprogressupdate.progressStartNoAbort(IChatBaseComponent.translatable("menu.savingLevel"));
-             }
-@@ -827,11 +924,19 @@
-             }
- 
-         }
-+
-+        // CraftBukkit start - moved from MinecraftServer.saveChunks
-+        WorldServer worldserver1 = this;
-+
-+        serverLevelData.setWorldBorder(worldserver1.getWorldBorder().createSettings());
-+        serverLevelData.setCustomBossEvents(this.server.getCustomBossEvents().save(this.registryAccess()));
-+        convertable.saveDataTag(this.server.registryAccess(), this.serverLevelData, this.server.getPlayerList().getSingleplayerData());
-+        // CraftBukkit end
-     }
- 
-     private void saveLevelData(boolean flag) {
-         if (this.dragonFight != null) {
--            this.server.getWorldData().setEndDragonFightData(this.dragonFight.saveData());
-+            this.serverLevelData.setEndDragonFightData(this.dragonFight.saveData()); // CraftBukkit
-         }
- 
-         WorldPersistentData worldpersistentdata = this.getChunkSource().getDataStorage();
-@@ -903,18 +1008,40 @@
- 
-     @Override
-     public boolean addFreshEntity(Entity entity) {
--        return this.addEntity(entity);
-+        // CraftBukkit start
-+        return this.addFreshEntity(entity, CreatureSpawnEvent.SpawnReason.DEFAULT);
-+    }
-+
-+    @Override
-+    public boolean addFreshEntity(Entity entity, CreatureSpawnEvent.SpawnReason reason) {
-+        return this.addEntity(entity, reason);
-+        // CraftBukkit end
-     }
- 
-     public boolean addWithUUID(Entity entity) {
--        return this.addEntity(entity);
-+        // CraftBukkit start
-+        return this.addWithUUID(entity, CreatureSpawnEvent.SpawnReason.DEFAULT);
-+    }
-+
-+    public boolean addWithUUID(Entity entity, CreatureSpawnEvent.SpawnReason reason) {
-+        return this.addEntity(entity, reason);
-+        // CraftBukkit end
-     }
- 
-     public void addDuringTeleport(Entity entity) {
-+        // CraftBukkit start
-+        // SPIGOT-6415: Don't call spawn event for entities which travel trough worlds,
-+        // since it is only an implementation detail, that a new entity is created when
-+        // they are traveling between worlds.
-+        this.addDuringTeleport(entity, null);
-+    }
-+
-+    public void addDuringTeleport(Entity entity, CreatureSpawnEvent.SpawnReason reason) {
-+        // CraftBukkit end
-         if (entity instanceof EntityPlayer entityplayer) {
-             this.addPlayer(entityplayer);
-         } else {
--            this.addEntity(entity);
-+            this.addEntity(entity, reason); // CraftBukkit
-         }
- 
-     }
-@@ -939,24 +1066,37 @@
-         this.entityManager.addNewEntity(entityplayer);
-     }
- 
--    private boolean addEntity(Entity entity) {
-+    // CraftBukkit start
-+    private boolean addEntity(Entity entity, CreatureSpawnEvent.SpawnReason spawnReason) {
-         if (entity.isRemoved()) {
--            WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType()));
-+            // WorldServer.LOGGER.warn("Tried to add entity {} but it was marked as removed already", EntityTypes.getKey(entity.getType())); // CraftBukkit
-             return false;
-         } else {
-+            // SPIGOT-6415: Don't call spawn event when reason is null. For example when an entity teleports to a new world.
-+            if (spawnReason != null && !CraftEventFactory.doEntityAddEventCalling(this, entity, spawnReason)) {
-+                return false;
-+            }
-+            // CraftBukkit end
-+
-             return this.entityManager.addNewEntity(entity);
-         }
-     }
- 
-     public boolean tryAddFreshEntityWithPassengers(Entity entity) {
--        Stream stream = entity.getSelfAndPassengers().map(Entity::getUUID);
-+        // CraftBukkit start
-+        return this.tryAddFreshEntityWithPassengers(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT);
-+    }
-+
-+    public boolean tryAddFreshEntityWithPassengers(Entity entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) {
-+        // CraftBukkit end
-+        Stream<UUID> stream = entity.getSelfAndPassengers().map(Entity::getUUID); // CraftBukkit - decompile error
-         PersistentEntitySectionManager persistententitysectionmanager = this.entityManager;
- 
-         Objects.requireNonNull(this.entityManager);
-         if (stream.anyMatch(persistententitysectionmanager::isLoaded)) {
-             return false;
-         } else {
--            this.addFreshEntityWithPassengers(entity);
-+            this.addFreshEntityWithPassengers(entity, reason); // CraftBukkit
-             return true;
-         }
-     }
-@@ -967,13 +1107,35 @@
-     }
- 
-     public void removePlayerImmediately(EntityPlayer entityplayer, Entity.RemovalReason entity_removalreason) {
--        entityplayer.remove(entity_removalreason);
-+        entityplayer.remove(entity_removalreason, null); // CraftBukkit - add Bukkit remove cause
-     }
- 
-+    // CraftBukkit start
-+    public boolean strikeLightning(Entity entitylightning) {
-+        return this.strikeLightning(entitylightning, LightningStrikeEvent.Cause.UNKNOWN);
-+    }
-+
-+    public boolean strikeLightning(Entity entitylightning, LightningStrikeEvent.Cause cause) {
-+        LightningStrikeEvent lightning = CraftEventFactory.callLightningStrikeEvent((org.bukkit.entity.LightningStrike) entitylightning.getBukkitEntity(), cause);
-+
-+        if (lightning.isCancelled()) {
-+            return false;
-+        }
-+
-+        return this.addFreshEntity(entitylightning);
-+    }
-+    // CraftBukkit end
-+
-     @Override
-     public void destroyBlockProgress(int i, BlockPosition blockposition, int j) {
-         Iterator iterator = this.server.getPlayerList().getPlayers().iterator();
- 
-+        // CraftBukkit start
-+        EntityHuman entityhuman = null;
-+        Entity entity = this.getEntity(i);
-+        if (entity instanceof EntityHuman) entityhuman = (EntityHuman) entity;
-+        // CraftBukkit end
-+
-         while (iterator.hasNext()) {
-             EntityPlayer entityplayer = (EntityPlayer) iterator.next();
- 
-@@ -982,6 +1144,12 @@
-                 double d1 = (double) blockposition.getY() - entityplayer.getY();
-                 double d2 = (double) blockposition.getZ() - entityplayer.getZ();
- 
-+                // CraftBukkit start
-+                if (entityhuman != null && !entityplayer.getBukkitEntity().canSee(entityhuman.getBukkitEntity())) {
-+                    continue;
-+                }
-+                // CraftBukkit end
-+
-                 if (d0 * d0 + d1 * d1 + d2 * d2 < 1024.0D) {
-                     entityplayer.connection.send(new PacketPlayOutBlockBreakAnimation(i, blockposition, j));
-                 }
-@@ -1060,7 +1228,18 @@
-             Iterator iterator = this.navigatingMobs.iterator();
- 
-             while (iterator.hasNext()) {
--                EntityInsentient entityinsentient = (EntityInsentient) iterator.next();
-+                // CraftBukkit start - fix SPIGOT-6362
-+                EntityInsentient entityinsentient;
-+                try {
-+                    entityinsentient = (EntityInsentient) iterator.next();
-+                } catch (java.util.ConcurrentModificationException ex) {
-+                    // This can happen because the pathfinder update below may trigger a chunk load, which in turn may cause more navigators to register
-+                    // In this case we just run the update again across all the iterators as the chunk will then be loaded
-+                    // As this is a relative edge case it is much faster than copying navigators (on either read or write)
-+                    sendBlockUpdated(blockposition, iblockdata, iblockdata1, i);
-+                    return;
-+                }
-+                // CraftBukkit end
-                 NavigationAbstract navigationabstract = entityinsentient.getNavigation();
- 
-                 if (navigationabstract.shouldRecomputePath(blockposition)) {
-@@ -1126,6 +1305,12 @@
- 
-     @Override
-     public void explode(@Nullable Entity entity, @Nullable DamageSource damagesource, @Nullable ExplosionDamageCalculator explosiondamagecalculator, double d0, double d1, double d2, float f, boolean flag, World.a world_a, ParticleParam particleparam, ParticleParam particleparam1, Holder<SoundEffect> holder) {
-+        // CraftBukkit start
-+        this.explode0(entity, damagesource, explosiondamagecalculator, d0, d1, d2, f, flag, world_a, particleparam, particleparam1, holder);
-+    }
-+
-+    public ServerExplosion explode0(@Nullable Entity entity, @Nullable DamageSource damagesource, @Nullable ExplosionDamageCalculator explosiondamagecalculator, double d0, double d1, double d2, float f, boolean flag, World.a world_a, ParticleParam particleparam, ParticleParam particleparam1, Holder<SoundEffect> holder) {
-+        // CraftBukkit end
-         Explosion.Effect explosion_effect;
- 
-         switch (world_a) {
-@@ -1144,6 +1329,11 @@
-             case TRIGGER:
-                 explosion_effect = Explosion.Effect.TRIGGER_BLOCK;
-                 break;
-+            // CraftBukkit start - handle custom explosion type
-+            case STANDARD:
-+                explosion_effect = Explosion.Effect.DESTROY;
-+                break;
-+            // CraftBukkit end
-             default:
-                 throw new MatchException((String) null, (Throwable) null);
-         }
-@@ -1153,6 +1343,11 @@
-         ServerExplosion serverexplosion = new ServerExplosion(this, entity, damagesource, explosiondamagecalculator, vec3d, f, flag, explosion_effect1);
- 
-         serverexplosion.explode();
-+        // CraftBukkit start
-+        if (serverexplosion.wasCanceled) {
-+            return serverexplosion;
-+        }
-+        // CraftBukkit end
-         ParticleParam particleparam2 = serverexplosion.isSmall() ? particleparam : particleparam1;
-         Iterator iterator = this.players.iterator();
- 
-@@ -1166,6 +1361,7 @@
-             }
-         }
- 
-+        return serverexplosion; // CraftBukkit
-     }
- 
-     private Explosion.Effect getDestroyType(GameRules.GameRuleKey<GameRules.GameRuleBoolean> gamerules_gamerulekey) {
-@@ -1226,15 +1422,22 @@
-     }
- 
-     public <T extends ParticleParam> int sendParticles(T t0, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6) {
--        return this.sendParticles(t0, false, false, d0, d1, d2, i, d3, d4, d5, d6);
-+        return this.sendParticlesSource(null, t0, false, false, d0, d1, d2, i, d3, d4, d5, d6); // CraftBukkit - visibility api support
-     }
- 
-     public <T extends ParticleParam> int sendParticles(T t0, boolean flag, boolean flag1, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6) {
-+        return this.sendParticlesSource(null, t0, flag, flag1, d0, d1, d2, i, d3, d4, d5, d6); // CraftBukkit - visibility api support
-+    }
-+
-+    // CraftBukkit start - visibility api support
-+    public <T extends ParticleParam> int sendParticlesSource(EntityPlayer sender, T t0, boolean flag, boolean flag1, double d0, double d1, double d2, int i, double d3, double d4, double d5, double d6) {
-+        // CraftBukkit end
-         PacketPlayOutWorldParticles packetplayoutworldparticles = new PacketPlayOutWorldParticles(t0, flag, flag1, d0, d1, d2, (float) d3, (float) d4, (float) d5, (float) d6, i);
-         int j = 0;
- 
-         for (int k = 0; k < this.players.size(); ++k) {
-             EntityPlayer entityplayer = (EntityPlayer) this.players.get(k);
-+            if (sender != null && !entityplayer.getBukkitEntity().canSee(sender.getBukkitEntity())) continue; // CraftBukkit
- 
-             if (this.sendParticles(entityplayer, flag, d0, d1, d2, packetplayoutworldparticles)) {
-                 ++j;
-@@ -1292,7 +1495,7 @@
- 
-     @Nullable
-     public BlockPosition findNearestMapStructure(TagKey<Structure> tagkey, BlockPosition blockposition, int i, boolean flag) {
--        if (!this.server.getWorldData().worldGenOptions().generateStructures()) {
-+        if (!this.serverLevelData.worldGenOptions().generateStructures()) { // CraftBukkit
-             return null;
-         } else {
-             Optional<HolderSet.Named<Structure>> optional = this.registryAccess().lookupOrThrow(Registries.STRUCTURE).get(tagkey);
-@@ -1334,11 +1537,22 @@
-     @Nullable
-     @Override
-     public WorldMap getMapData(MapId mapid) {
--        return (WorldMap) this.getServer().overworld().getDataStorage().get(WorldMap.factory(), mapid.key());
-+        // CraftBukkit start
-+        WorldMap worldmap = (WorldMap) this.getServer().overworld().getDataStorage().get(WorldMap.factory(), mapid.key());
-+        if (worldmap != null) {
-+            worldmap.id = mapid;
-+        }
-+        return worldmap;
-+        // CraftBukkit end
-     }
- 
-     @Override
-     public void setMapData(MapId mapid, WorldMap worldmap) {
-+        // CraftBukkit start
-+        worldmap.id = mapid;
-+        MapInitializeEvent event = new MapInitializeEvent(worldmap.mapView);
-+        Bukkit.getServer().getPluginManager().callEvent(event);
-+        // CraftBukkit end
-         this.getServer().overworld().getDataStorage().set(mapid.key(), worldmap);
-     }
- 
-@@ -1649,6 +1863,11 @@
-     @Override
-     public void blockUpdated(BlockPosition blockposition, Block block) {
-         if (!this.isDebug()) {
-+            // CraftBukkit start
-+            if (populating) {
-+                return;
-+            }
-+            // CraftBukkit end
-             this.updateNeighborsAt(blockposition, block);
-         }
- 
-@@ -1668,12 +1887,12 @@
-     }
- 
-     public boolean isFlat() {
--        return this.server.getWorldData().isFlatWorld();
-+        return this.serverLevelData.isFlatWorld(); // CraftBukkit
-     }
- 
-     @Override
-     public long getSeed() {
--        return this.server.getWorldData().worldGenOptions().seed();
-+        return this.serverLevelData.worldGenOptions().seed(); // CraftBukkit
-     }
- 
-     @Nullable
-@@ -1696,7 +1915,7 @@
-     private static <T> String getTypeCount(Iterable<T> iterable, Function<T, String> function) {
-         try {
-             Object2IntOpenHashMap<String> object2intopenhashmap = new Object2IntOpenHashMap();
--            Iterator iterator = iterable.iterator();
-+            Iterator<T> iterator = iterable.iterator(); // CraftBukkit - decompile error
- 
-             while (iterator.hasNext()) {
-                 T t0 = iterator.next();
-@@ -1705,7 +1924,7 @@
-                 object2intopenhashmap.addTo(s, 1);
-             }
- 
--            return (String) object2intopenhashmap.object2IntEntrySet().stream().sorted(Comparator.comparing(Entry::getIntValue).reversed()).limit(5L).map((entry) -> {
-+            return (String) object2intopenhashmap.object2IntEntrySet().stream().sorted(Comparator.comparing(Entry<String>::getIntValue).reversed()).limit(5L).map((entry) -> { // CraftBukkit - decompile error
-                 String s1 = (String) entry.getKey();
- 
-                 return s1 + ":" + entry.getIntValue();
-@@ -1864,6 +2083,8 @@
-             }
- 
-             entity.updateDynamicGameEventListener(DynamicGameEventListener::add);
-+            entity.inWorld = true; // CraftBukkit - Mark entity as in world
-+            entity.valid = true; // CraftBukkit
-         }
- 
-         public void onTrackingEnd(Entity entity) {
-@@ -1895,6 +2116,14 @@
-             }
- 
-             entity.updateDynamicGameEventListener(DynamicGameEventListener::remove);
-+            // CraftBukkit start
-+            entity.valid = false;
-+            if (!(entity instanceof EntityPlayer)) {
-+                for (EntityPlayer player : players) {
-+                    player.getBukkitEntity().onEntityRemove(entity);
-+                }
-+            }
-+            // CraftBukkit end
-         }
- 
-         public void onSectionChange(Entity entity) {
diff --git a/paper-server/patches/sources/net/minecraft/server/network/HandshakeListener.patch b/paper-server/patches/sources/net/minecraft/server/network/HandshakeListener.patch
deleted file mode 100644
index 3b369126f9..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/network/HandshakeListener.patch
+++ /dev/null
@@ -1,69 +0,0 @@
---- a/net/minecraft/server/network/HandshakeListener.java
-+++ b/net/minecraft/server/network/HandshakeListener.java
-@@ -13,8 +13,17 @@
- import net.minecraft.network.protocol.status.StatusProtocols;
- import net.minecraft.server.MinecraftServer;
- 
-+// CraftBukkit start
-+import java.net.InetAddress;
-+import java.util.HashMap;
-+// CraftBukkit end
-+
- public class HandshakeListener implements PacketHandshakingInListener {
- 
-+    // CraftBukkit start - add fields
-+    private static final HashMap<InetAddress, Long> throttleTracker = new HashMap<InetAddress, Long>();
-+    private static int throttleCounter = 0;
-+    // CraftBukkit end
-     private static final IChatBaseComponent IGNORE_STATUS_REASON = IChatBaseComponent.translatable("disconnect.ignoring_status_request");
-     private final MinecraftServer server;
-     private final NetworkManager connection;
-@@ -26,6 +35,7 @@
- 
-     @Override
-     public void handleIntention(PacketHandshakingInSetProtocol packethandshakinginsetprotocol) {
-+        this.connection.hostname = packethandshakinginsetprotocol.hostName() + ":" + packethandshakinginsetprotocol.port(); // CraftBukkit  - set hostname
-         switch (packethandshakinginsetprotocol.intention()) {
-             case LOGIN:
-                 this.beginLogin(packethandshakinginsetprotocol, false);
-@@ -59,6 +69,40 @@
- 
-     private void beginLogin(PacketHandshakingInSetProtocol packethandshakinginsetprotocol, boolean flag) {
-         this.connection.setupOutboundProtocol(LoginProtocols.CLIENTBOUND);
-+        // CraftBukkit start - Connection throttle
-+        try {
-+            long currentTime = System.currentTimeMillis();
-+            long connectionThrottle = this.server.server.getConnectionThrottle();
-+            InetAddress address = ((java.net.InetSocketAddress) this.connection.getRemoteAddress()).getAddress();
-+
-+            synchronized (throttleTracker) {
-+                if (throttleTracker.containsKey(address) && !"127.0.0.1".equals(address.getHostAddress()) && currentTime - throttleTracker.get(address) < connectionThrottle) {
-+                    throttleTracker.put(address, currentTime);
-+                    IChatMutableComponent chatmessage = IChatBaseComponent.literal("Connection throttled! Please wait before reconnecting.");
-+                    this.connection.send(new PacketLoginOutDisconnect(chatmessage));
-+                    this.connection.disconnect(chatmessage);
-+                    return;
-+                }
-+
-+                throttleTracker.put(address, currentTime);
-+                throttleCounter++;
-+                if (throttleCounter > 200) {
-+                    throttleCounter = 0;
-+
-+                    // Cleanup stale entries
-+                    java.util.Iterator iter = throttleTracker.entrySet().iterator();
-+                    while (iter.hasNext()) {
-+                        java.util.Map.Entry<InetAddress, Long> entry = (java.util.Map.Entry) iter.next();
-+                        if (entry.getValue() > connectionThrottle) {
-+                            iter.remove();
-+                        }
-+                    }
-+                }
-+            }
-+        } catch (Throwable t) {
-+            org.apache.logging.log4j.LogManager.getLogger().debug("Failed to check connection throttle", t);
-+        }
-+        // CraftBukkit end
-         if (packethandshakinginsetprotocol.protocolVersion() != SharedConstants.getCurrentVersion().getProtocolVersion()) {
-             IChatMutableComponent ichatmutablecomponent;
- 
diff --git a/paper-server/patches/sources/net/minecraft/server/network/LegacyPingHandler.patch b/paper-server/patches/sources/net/minecraft/server/network/LegacyQueryHandler.java.patch
similarity index 53%
rename from paper-server/patches/sources/net/minecraft/server/network/LegacyPingHandler.patch
rename to paper-server/patches/sources/net/minecraft/server/network/LegacyQueryHandler.java.patch
index bed960eee0..e2c0afcb34 100644
--- a/paper-server/patches/sources/net/minecraft/server/network/LegacyPingHandler.patch
+++ b/paper-server/patches/sources/net/minecraft/server/network/LegacyQueryHandler.java.patch
@@ -1,45 +1,45 @@
---- a/net/minecraft/server/network/LegacyPingHandler.java
-+++ b/net/minecraft/server/network/LegacyPingHandler.java
+--- a/net/minecraft/server/network/LegacyQueryHandler.java
++++ b/net/minecraft/server/network/LegacyQueryHandler.java
 @@ -35,10 +35,11 @@
                  SocketAddress socketaddress = channelhandlercontext.channel().remoteAddress();
                  int i = bytebuf.readableBytes();
                  String s;
-+                org.bukkit.event.server.ServerListPingEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callServerListPingEvent(socketaddress, server.getMotd(), server.getPlayerCount(), server.getMaxPlayers()); // CraftBukkit
++                org.bukkit.event.server.ServerListPingEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callServerListPingEvent(socketaddress, this.server.getMotd(), this.server.getPlayerCount(), this.server.getMaxPlayers()); // CraftBukkit
  
                  if (i == 0) {
-                     LegacyPingHandler.LOGGER.debug("Ping: (<1.3.x) from {}", socketaddress);
--                    s = createVersion0Response(this.server);
-+                    s = createVersion0Response(this.server, event); // CraftBukkit
-                     sendFlushAndClose(channelhandlercontext, createLegacyDisconnectPacket(channelhandlercontext.alloc(), s));
+                     LegacyQueryHandler.LOGGER.debug("Ping: (<1.3.x) from {}", socketaddress);
+-                    s = LegacyQueryHandler.createVersion0Response(this.server);
++                    s = LegacyQueryHandler.createVersion0Response(this.server, event); // CraftBukkit
+                     LegacyQueryHandler.sendFlushAndClose(channelhandlercontext, LegacyQueryHandler.createLegacyDisconnectPacket(channelhandlercontext.alloc(), s));
                  } else {
                      if (bytebuf.readUnsignedByte() != 1) {
 @@ -55,7 +56,7 @@
-                         LegacyPingHandler.LOGGER.debug("Ping: (1.4-1.5.x) from {}", socketaddress);
+                         LegacyQueryHandler.LOGGER.debug("Ping: (1.4-1.5.x) from {}", socketaddress);
                      }
  
--                    s = createVersion1Response(this.server);
-+                    s = createVersion1Response(this.server, event); // CraftBukkit
-                     sendFlushAndClose(channelhandlercontext, createLegacyDisconnectPacket(channelhandlercontext.alloc(), s));
+-                    s = LegacyQueryHandler.createVersion1Response(this.server);
++                    s = LegacyQueryHandler.createVersion1Response(this.server, event); // CraftBukkit
+                     LegacyQueryHandler.sendFlushAndClose(channelhandlercontext, LegacyQueryHandler.createLegacyDisconnectPacket(channelhandlercontext.alloc(), s));
                  }
  
 @@ -106,12 +107,16 @@
          }
      }
  
--    private static String createVersion0Response(ServerInfo serverinfo) {
--        return String.format(Locale.ROOT, "%s\u00a7%d\u00a7%d", serverinfo.getMotd(), serverinfo.getPlayerCount(), serverinfo.getMaxPlayers());
+-    private static String createVersion0Response(ServerInfo server) {
+-        return String.format(Locale.ROOT, "%s\u00a7%d\u00a7%d", server.getMotd(), server.getPlayerCount(), server.getMaxPlayers());
 +    // CraftBukkit start
 +    private static String createVersion0Response(ServerInfo serverinfo, org.bukkit.event.server.ServerListPingEvent event) {
 +        return String.format(Locale.ROOT, "%s\u00a7%d\u00a7%d", event.getMotd(), event.getNumPlayers(), event.getMaxPlayers());
 +        // CraftBukkit end
      }
  
--    private static String createVersion1Response(ServerInfo serverinfo) {
--        return String.format(Locale.ROOT, "\u00a71\u0000%d\u0000%s\u0000%s\u0000%d\u0000%d", 127, serverinfo.getServerVersion(), serverinfo.getMotd(), serverinfo.getPlayerCount(), serverinfo.getMaxPlayers());
+-    private static String createVersion1Response(ServerInfo server) {
+-        return String.format(Locale.ROOT, "\u00a71\u0000%d\u0000%s\u0000%s\u0000%d\u0000%d", 127, server.getServerVersion(), server.getMotd(), server.getPlayerCount(), server.getMaxPlayers());
 +    // CraftBukkit start
 +    private static String createVersion1Response(ServerInfo serverinfo, org.bukkit.event.server.ServerListPingEvent event) {
 +        return String.format(Locale.ROOT, "\u00a71\u0000%d\u0000%s\u0000%s\u0000%d\u0000%d", 127, serverinfo.getServerVersion(), event.getMotd(), event.getNumPlayers(), event.getMaxPlayers());
 +        // CraftBukkit end
      }
  
-     private static void sendFlushAndClose(ChannelHandlerContext channelhandlercontext, ByteBuf bytebuf) {
+     private static void sendFlushAndClose(ChannelHandlerContext context, ByteBuf buf) {
diff --git a/paper-server/patches/sources/net/minecraft/server/network/ServerCommonPacketListenerImpl.patch b/paper-server/patches/sources/net/minecraft/server/network/ServerCommonPacketListenerImpl.java.patch
similarity index 54%
rename from paper-server/patches/sources/net/minecraft/server/network/ServerCommonPacketListenerImpl.patch
rename to paper-server/patches/sources/net/minecraft/server/network/ServerCommonPacketListenerImpl.java.patch
index 53e150b2ba..c4fe50b9c6 100644
--- a/paper-server/patches/sources/net/minecraft/server/network/ServerCommonPacketListenerImpl.patch
+++ b/paper-server/patches/sources/net/minecraft/server/network/ServerCommonPacketListenerImpl.java.patch
@@ -1,156 +1,182 @@
 --- a/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
 +++ b/net/minecraft/server/network/ServerCommonPacketListenerImpl.java
-@@ -29,8 +29,44 @@
- import net.minecraft.util.thread.IAsyncTaskHandler;
+@@ -4,11 +4,13 @@
+ import com.mojang.logging.LogUtils;
+ import java.util.Objects;
+ import javax.annotation.Nullable;
++import net.minecraft.ChatFormatting;
+ import net.minecraft.CrashReport;
+ import net.minecraft.CrashReportCategory;
+ import net.minecraft.ReportedException;
+ import net.minecraft.Util;
+ import net.minecraft.network.Connection;
++import net.minecraft.network.ConnectionProtocol;
+ import net.minecraft.network.DisconnectionDetails;
+ import net.minecraft.network.PacketSendListener;
+ import net.minecraft.network.chat.Component;
+@@ -22,15 +24,49 @@
+ import net.minecraft.network.protocol.common.ServerboundPongPacket;
+ import net.minecraft.network.protocol.common.ServerboundResourcePackPacket;
+ import net.minecraft.network.protocol.cookie.ServerboundCookieResponsePacket;
++import net.minecraft.network.protocol.game.ClientboundSetDefaultSpawnPositionPacket;
++import net.minecraft.resources.ResourceLocation;
+ import net.minecraft.server.MinecraftServer;
+ import net.minecraft.server.level.ClientInformation;
++import net.minecraft.server.level.ServerPlayer;
+ import net.minecraft.util.VisibleForDebug;
+ import net.minecraft.util.profiling.Profiler;
+ import net.minecraft.util.thread.BlockableEventLoop;
  import org.slf4j.Logger;
  
 -public abstract class ServerCommonPacketListenerImpl implements ServerCommonPacketListener {
 +// CraftBukkit start
 +import io.netty.buffer.ByteBuf;
 +import java.util.concurrent.ExecutionException;
-+import net.minecraft.EnumChatFormat;
-+import net.minecraft.network.EnumProtocol;
 +import net.minecraft.network.protocol.common.custom.DiscardedPayload;
-+import net.minecraft.network.protocol.game.PacketPlayOutSpawnPosition;
-+import net.minecraft.resources.MinecraftKey;
-+import net.minecraft.server.level.EntityPlayer;
 +import org.bukkit.craftbukkit.entity.CraftPlayer;
 +import org.bukkit.craftbukkit.util.CraftChatMessage;
 +import org.bukkit.craftbukkit.util.CraftLocation;
 +import org.bukkit.craftbukkit.util.Waitable;
 +import org.bukkit.event.player.PlayerKickEvent;
 +import org.bukkit.event.player.PlayerResourcePackStatusEvent;
-+
+ 
 +public abstract class ServerCommonPacketListenerImpl implements ServerCommonPacketListener, CraftPlayer.TransferCookieConnection {
 +
 +    @Override
 +    public boolean isTransferred() {
 +        return this.transferred;
 +    }
- 
++
 +    @Override
-+    public EnumProtocol getProtocol() {
-+        return protocol();
++    public ConnectionProtocol getProtocol() {
++        return this.protocol();
 +    }
 +
 +    @Override
 +    public void sendPacket(Packet<?> packet) {
-+        send(packet);
++        this.send(packet);
 +    }
 +
 +    @Override
-+    public void kickPlayer(IChatBaseComponent reason) {
-+        disconnect(reason);
++    public void kickPlayer(Component reason) {
++        this.disconnect(reason);
 +    }
 +    // CraftBukkit end
      private static final Logger LOGGER = LogUtils.getLogger();
      public static final int LATENCY_CHECK_INTERVAL = 15000;
      private static final int CLOSED_LISTENER_TIMEOUT = 15000;
-@@ -47,12 +83,24 @@
+@@ -47,14 +83,26 @@
      private int latency;
      private volatile boolean suspendFlushingOnServerThread = false;
  
--    public ServerCommonPacketListenerImpl(MinecraftServer minecraftserver, NetworkManager networkmanager, CommonListenerCookie commonlistenercookie) {
-+    public ServerCommonPacketListenerImpl(MinecraftServer minecraftserver, NetworkManager networkmanager, CommonListenerCookie commonlistenercookie, EntityPlayer player) { // CraftBukkit
-         this.server = minecraftserver;
-         this.connection = networkmanager;
-         this.keepAliveTime = SystemUtils.getMillis();
-         this.latency = commonlistenercookie.latency();
-         this.transferred = commonlistenercookie.transferred();
+-    public ServerCommonPacketListenerImpl(MinecraftServer server, Connection connection, CommonListenerCookie clientData) {
+-        this.server = server;
+-        this.connection = connection;
++    public ServerCommonPacketListenerImpl(MinecraftServer minecraftserver, Connection networkmanager, CommonListenerCookie commonlistenercookie, ServerPlayer player) { // CraftBukkit
++        this.server = minecraftserver;
++        this.connection = networkmanager;
+         this.keepAliveTime = Util.getMillis();
+-        this.latency = clientData.latency();
+-        this.transferred = clientData.transferred();
++        this.latency = commonlistenercookie.latency();
++        this.transferred = commonlistenercookie.transferred();
 +        // CraftBukkit start - add fields and methods
 +        this.player = player;
 +        this.player.transferCookieConnection = this;
 +        this.cserver = minecraftserver.server;
-+    }
-+    protected final EntityPlayer player;
+     }
++    protected final ServerPlayer player;
 +    protected final org.bukkit.craftbukkit.CraftServer cserver;
 +    public boolean processedDisconnect;
-+
+ 
 +    public CraftPlayer getCraftPlayer() {
 +        return (this.player == null) ? null : (CraftPlayer) this.player.getBukkitEntity();
 +        // CraftBukkit end
-     }
- 
++    }
++
      private void close() {
+         if (!this.closed) {
+             this.closedListenerTime = Util.getMillis();
 @@ -80,6 +128,7 @@
  
      @Override
-     public void handleKeepAlive(ServerboundKeepAlivePacket serverboundkeepalivepacket) {
-+        PlayerConnectionUtils.ensureRunningOnSameThread(serverboundkeepalivepacket, this, this.player.serverLevel()); // CraftBukkit
-         if (this.keepAlivePending && serverboundkeepalivepacket.getId() == this.keepAliveChallenge) {
-             int i = (int) (SystemUtils.getMillis() - this.keepAliveTime);
+     public void handleKeepAlive(ServerboundKeepAlivePacket packet) {
++        PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel()); // CraftBukkit
+         if (this.keepAlivePending && packet.getId() == this.keepAliveChallenge) {
+             int i = (int) (Util.getMillis() - this.keepAliveTime);
  
-@@ -94,8 +143,56 @@
+@@ -94,9 +143,57 @@
      @Override
-     public void handlePong(ServerboundPongPacket serverboundpongpacket) {}
+     public void handlePong(ServerboundPongPacket packet) {}
  
 +    // CraftBukkit start
-+    private static final MinecraftKey CUSTOM_REGISTER = MinecraftKey.withDefaultNamespace("register");
-+    private static final MinecraftKey CUSTOM_UNREGISTER = MinecraftKey.withDefaultNamespace("unregister");
++    private static final ResourceLocation CUSTOM_REGISTER = ResourceLocation.withDefaultNamespace("register");
++    private static final ResourceLocation CUSTOM_UNREGISTER = ResourceLocation.withDefaultNamespace("unregister");
 +
      @Override
--    public void handleCustomPayload(ServerboundCustomPayloadPacket serverboundcustompayloadpacket) {}
-+    public void handleCustomPayload(ServerboundCustomPayloadPacket serverboundcustompayloadpacket) {
-+        if (!(serverboundcustompayloadpacket.payload() instanceof DiscardedPayload)) {
+-    public void handleCustomPayload(ServerboundCustomPayloadPacket packet) {}
++    public void handleCustomPayload(ServerboundCustomPayloadPacket packet) {
++        if (!(packet.payload() instanceof DiscardedPayload)) {
 +            return;
 +        }
-+        PlayerConnectionUtils.ensureRunningOnSameThread(serverboundcustompayloadpacket, this, this.player.serverLevel());
-+        MinecraftKey identifier = serverboundcustompayloadpacket.payload().type().id();
-+        ByteBuf payload = ((DiscardedPayload)serverboundcustompayloadpacket.payload()).data();
++        PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
++        ResourceLocation identifier = packet.payload().type().id();
++        ByteBuf payload = ((DiscardedPayload)packet.payload()).data();
 +
-+        if (identifier.equals(CUSTOM_REGISTER)) {
++        if (identifier.equals(ServerCommonPacketListenerImpl.CUSTOM_REGISTER)) {
 +            try {
 +                String channels = payload.toString(com.google.common.base.Charsets.UTF_8);
 +                for (String channel : channels.split("\0")) {
-+                    getCraftPlayer().addChannel(channel);
++                    this.getCraftPlayer().addChannel(channel);
 +                }
 +            } catch (Exception ex) {
-+                PlayerConnection.LOGGER.error("Couldn\'t register custom payload", ex);
-+                this.disconnect(IChatBaseComponent.literal("Invalid payload REGISTER!"));
++                ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t register custom payload", ex);
++                this.disconnect(Component.literal("Invalid payload REGISTER!"));
 +            }
-+        } else if (identifier.equals(CUSTOM_UNREGISTER)) {
++        } else if (identifier.equals(ServerCommonPacketListenerImpl.CUSTOM_UNREGISTER)) {
 +            try {
 +                String channels = payload.toString(com.google.common.base.Charsets.UTF_8);
 +                for (String channel : channels.split("\0")) {
-+                    getCraftPlayer().removeChannel(channel);
++                    this.getCraftPlayer().removeChannel(channel);
 +                }
 +            } catch (Exception ex) {
-+                PlayerConnection.LOGGER.error("Couldn\'t unregister custom payload", ex);
-+                this.disconnect(IChatBaseComponent.literal("Invalid payload UNREGISTER!"));
++                ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t unregister custom payload", ex);
++                this.disconnect(Component.literal("Invalid payload UNREGISTER!"));
 +            }
 +        } else {
 +            try {
 +                byte[] data = new byte[payload.readableBytes()];
 +                payload.readBytes(data);
-+                cserver.getMessenger().dispatchIncomingMessage(player.getBukkitEntity(), identifier.toString(), data);
++                this.cserver.getMessenger().dispatchIncomingMessage(this.player.getBukkitEntity(), identifier.toString(), data);
 +            } catch (Exception ex) {
-+                PlayerConnection.LOGGER.error("Couldn\'t dispatch custom payload", ex);
-+                this.disconnect(IChatBaseComponent.literal("Invalid custom payload!"));
++                ServerGamePacketListenerImpl.LOGGER.error("Couldn\'t dispatch custom payload", ex);
++                this.disconnect(Component.literal("Invalid custom payload!"));
 +            }
 +        }
-+
+ 
 +    }
 +
 +    public final boolean isDisconnected() {
 +        return !this.player.joining && !this.connection.isConnected();
 +    }
 +    // CraftBukkit end
- 
++
      @Override
-     public void handleResourcePackResponse(ServerboundResourcePackPacket serverboundresourcepackpacket) {
+     public void handleResourcePackResponse(ServerboundResourcePackPacket packet) {
+         PacketUtils.ensureRunningOnSameThread(packet, this, (BlockableEventLoop) this.server);
 @@ -104,11 +201,18 @@
-             ServerCommonPacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack {} rejection", this.playerProfile().getName(), serverboundresourcepackpacket.id());
-             this.disconnect((IChatBaseComponent) IChatBaseComponent.translatable("multiplayer.requiredTexturePrompt.disconnect"));
+             ServerCommonPacketListenerImpl.LOGGER.info("Disconnecting {} due to resource pack {} rejection", this.playerProfile().getName(), packet.id());
+             this.disconnect((Component) Component.translatable("multiplayer.requiredTexturePrompt.disconnect"));
          }
-+        this.cserver.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(getCraftPlayer(), serverboundresourcepackpacket.id(), PlayerResourcePackStatusEvent.Status.values()[serverboundresourcepackpacket.action().ordinal()])); // CraftBukkit
++        this.cserver.getPluginManager().callEvent(new PlayerResourcePackStatusEvent(this.getCraftPlayer(), packet.id(), PlayerResourcePackStatusEvent.Status.values()[packet.action().ordinal()])); // CraftBukkit
  
      }
  
      @Override
-     public void handleCookieResponse(ServerboundCookieResponsePacket serverboundcookieresponsepacket) {
+     public void handleCookieResponse(ServerboundCookieResponsePacket packet) {
 +        // CraftBukkit start
-+        PlayerConnectionUtils.ensureRunningOnSameThread(serverboundcookieresponsepacket, this, (IAsyncTaskHandler) this.server);
-+        if (this.player.getBukkitEntity().handleCookieResponse(serverboundcookieresponsepacket)) {
++        PacketUtils.ensureRunningOnSameThread(packet, this, (BlockableEventLoop) this.server);
++        if (this.player.getBukkitEntity().handleCookieResponse(packet)) {
 +            return;
 +        }
 +        // CraftBukkit end
@@ -159,7 +185,7 @@
  
 @@ -116,7 +220,7 @@
          Profiler.get().push("keepAlive");
-         long i = SystemUtils.getMillis();
+         long i = Util.getMillis();
  
 -        if (!this.isSingleplayerOwner() && i - this.keepAliveTime >= 15000L) {
 +        if (!this.isSingleplayerOwner() && i - this.keepAliveTime >= 25000L) { // CraftBukkit
@@ -169,12 +195,12 @@
 @@ -156,6 +260,14 @@
      }
  
-     public void send(Packet<?> packet, @Nullable PacketSendListener packetsendlistener) {
+     public void send(Packet<?> packet, @Nullable PacketSendListener callbacks) {
 +        // CraftBukkit start
 +        if (packet == null) {
 +            return;
-+        } else if (packet instanceof PacketPlayOutSpawnPosition) {
-+            PacketPlayOutSpawnPosition packet6 = (PacketPlayOutSpawnPosition) packet;
++        } else if (packet instanceof ClientboundSetDefaultSpawnPositionPacket) {
++            ClientboundSetDefaultSpawnPositionPacket packet6 = (ClientboundSetDefaultSpawnPositionPacket) packet;
 +            this.player.compassTarget = CraftLocation.toBukkit(packet6.pos, this.getCraftPlayer().getWorld());
 +        }
 +        // CraftBukkit end
@@ -184,7 +210,9 @@
 @@ -180,15 +292,61 @@
      }
  
-     public void disconnect(DisconnectionDetails disconnectiondetails) {
+     public void disconnect(DisconnectionDetails disconnectionInfo) {
+-        this.connection.send(new ClientboundDisconnectPacket(disconnectionInfo.reason()), PacketSendListener.thenRun(() -> {
+-            this.connection.disconnect(disconnectionInfo);
 +        // CraftBukkit start - fire PlayerKickEvent
 +        if (this.processedDisconnect) {
 +            return;
@@ -193,7 +221,7 @@
 +            Waitable waitable = new Waitable() {
 +                @Override
 +                protected Object evaluate() {
-+                    ServerCommonPacketListenerImpl.this.disconnect(disconnectiondetails);
++                    ServerCommonPacketListenerImpl.this.disconnect(disconnectionInfo);
 +                    return null;
 +                }
 +            };
@@ -210,9 +238,9 @@
 +            return;
 +        }
 +
-+        String leaveMessage = EnumChatFormat.YELLOW + this.player.getScoreboardName() + " left the game.";
++        String leaveMessage = ChatFormatting.YELLOW + this.player.getScoreboardName() + " left the game.";
 +
-+        PlayerKickEvent event = new PlayerKickEvent(this.player.getBukkitEntity(), CraftChatMessage.fromComponent(disconnectiondetails.reason()), leaveMessage);
++        PlayerKickEvent event = new PlayerKickEvent(this.player.getBukkitEntity(), CraftChatMessage.fromComponent(disconnectionInfo.reason()), leaveMessage);
 +
 +        if (this.cserver.getServer().isRunning()) {
 +            this.cserver.getPluginManager().callEvent(event);
@@ -224,18 +252,18 @@
 +        }
 +        this.player.kickLeaveMessage = event.getLeaveMessage(); // CraftBukkit - SPIGOT-3034: Forward leave message to PlayerQuitEvent
 +        // Send the possibly modified leave message
-+        disconnect0(new DisconnectionDetails(CraftChatMessage.fromString(event.getReason(), true)[0], disconnectiondetails.report(), disconnectiondetails.bugReportLink()));
++        this.disconnect0(new DisconnectionDetails(CraftChatMessage.fromString(event.getReason(), true)[0], disconnectionInfo.report(), disconnectionInfo.bugReportLink()));
 +    }
 +
 +    private void disconnect0(DisconnectionDetails disconnectiondetails) {
 +        // CraftBukkit end
-         this.connection.send(new ClientboundDisconnectPacket(disconnectiondetails.reason()), PacketSendListener.thenRun(() -> {
-             this.connection.disconnect(disconnectiondetails);
++        this.connection.send(new ClientboundDisconnectPacket(disconnectiondetails.reason()), PacketSendListener.thenRun(() -> {
++            this.connection.disconnect(disconnectiondetails);
          }));
 +        this.onDisconnect(disconnectiondetails); // CraftBukkit - fire quit instantly
          this.connection.setReadOnly();
          MinecraftServer minecraftserver = this.server;
-         NetworkManager networkmanager = this.connection;
+         Connection networkmanager = this.connection;
  
          Objects.requireNonNull(this.connection);
 -        minecraftserver.executeBlocking(networkmanager::handleDisconnection);
diff --git a/paper-server/patches/sources/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.patch b/paper-server/patches/sources/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java.patch
similarity index 65%
rename from paper-server/patches/sources/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.patch
rename to paper-server/patches/sources/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java.patch
index 07e664c9eb..15355bcb31 100644
--- a/paper-server/patches/sources/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.patch
+++ b/paper-server/patches/sources/net/minecraft/server/network/ServerConfigurationPacketListenerImpl.java.patch
@@ -12,27 +12,31 @@
  public class ServerConfigurationPacketListenerImpl extends ServerCommonPacketListenerImpl implements ServerConfigurationPacketListener, TickablePacketListener {
  
      private static final Logger LOGGER = LogUtils.getLogger();
-@@ -50,8 +55,10 @@
+@@ -50,10 +55,12 @@
      @Nullable
      private SynchronizeRegistriesTask synchronizeRegistriesTask;
  
--    public ServerConfigurationPacketListenerImpl(MinecraftServer minecraftserver, NetworkManager networkmanager, CommonListenerCookie commonlistenercookie) {
--        super(minecraftserver, networkmanager, commonlistenercookie);
+-    public ServerConfigurationPacketListenerImpl(MinecraftServer server, Connection connection, CommonListenerCookie clientData) {
+-        super(server, connection, clientData);
+-        this.gameProfile = clientData.gameProfile();
+-        this.clientInformation = clientData.clientInformation();
 +    // CraftBukkit start
-+    public ServerConfigurationPacketListenerImpl(MinecraftServer minecraftserver, NetworkManager networkmanager, CommonListenerCookie commonlistenercookie, EntityPlayer player) {
++    public ServerConfigurationPacketListenerImpl(MinecraftServer minecraftserver, Connection networkmanager, CommonListenerCookie commonlistenercookie, ServerPlayer player) {
 +        super(minecraftserver, networkmanager, commonlistenercookie, player);
 +        // CraftBukkit end
-         this.gameProfile = commonlistenercookie.gameProfile();
-         this.clientInformation = commonlistenercookie.clientInformation();
++        this.gameProfile = commonlistenercookie.gameProfile();
++        this.clientInformation = commonlistenercookie.clientInformation();
      }
+ 
+     @Override
 @@ -75,6 +82,12 @@
      public void startConfiguration() {
          this.send(new ClientboundCustomPayloadPacket(new BrandPayload(this.server.getServerModName())));
          ServerLinks serverlinks = this.server.serverLinks();
 +        // CraftBukkit start
 +        CraftServerLinks wrapper = new CraftServerLinks(serverlinks);
-+        PlayerLinksSendEvent event = new PlayerLinksSendEvent(player.getBukkitEntity(), wrapper);
-+        player.getBukkitEntity().getServer().getPluginManager().callEvent(event);
++        PlayerLinksSendEvent event = new PlayerLinksSendEvent(this.player.getBukkitEntity(), wrapper);
++        this.player.getBukkitEntity().getServer().getPluginManager().callEvent(event);
 +        serverlinks = wrapper.getServerLinks();
 +        // CraftBukkit end
  
@@ -42,16 +46,16 @@
                  return;
              }
  
--            IChatBaseComponent ichatbasecomponent = playerlist.canPlayerLogin(this.connection.getRemoteAddress(), this.gameProfile);
-+            IChatBaseComponent ichatbasecomponent = null; // CraftBukkit - login checks already completed
+-            Component ichatbasecomponent = playerlist.canPlayerLogin(this.connection.getRemoteAddress(), this.gameProfile);
++            Component ichatbasecomponent = null; // CraftBukkit - login checks already completed
  
              if (ichatbasecomponent != null) {
                  this.disconnect(ichatbasecomponent);
                  return;
              }
  
--            EntityPlayer entityplayer = playerlist.getPlayerForLogin(this.gameProfile, this.clientInformation);
-+            EntityPlayer entityplayer = playerlist.getPlayerForLogin(this.gameProfile, this.clientInformation, this.player); // CraftBukkit
+-            ServerPlayer entityplayer = playerlist.getPlayerForLogin(this.gameProfile, this.clientInformation);
++            ServerPlayer entityplayer = playerlist.getPlayerForLogin(this.gameProfile, this.clientInformation, this.player); // CraftBukkit
  
              playerlist.placeNewPlayer(this.connection, entityplayer, this.createCookie(this.clientInformation));
          } catch (Exception exception) {
diff --git a/paper-server/patches/sources/net/minecraft/server/network/ServerConnection.patch b/paper-server/patches/sources/net/minecraft/server/network/ServerConnection.patch
deleted file mode 100644
index 3c67718d6b..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/network/ServerConnection.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/net/minecraft/server/network/ServerConnection.java
-+++ b/net/minecraft/server/network/ServerConnection.java
-@@ -100,15 +100,25 @@
- 
-                     NetworkManager.configureSerialization(channelpipeline, EnumProtocolDirection.SERVERBOUND, false, (BandwidthDebugMonitor) null);
-                     int j = ServerConnection.this.server.getRateLimitPacketsPerSecond();
--                    Object object = j > 0 ? new NetworkManagerServer(j) : new NetworkManager(EnumProtocolDirection.SERVERBOUND);
-+                    NetworkManager object = j > 0 ? new NetworkManagerServer(j) : new NetworkManager(EnumProtocolDirection.SERVERBOUND); // CraftBukkit - decompile error
- 
-                     ServerConnection.this.connections.add(object);
-                     ((NetworkManager) object).configurePacketHandler(channelpipeline);
-                     ((NetworkManager) object).setListenerForServerboundHandshake(new HandshakeListener(ServerConnection.this.server, (NetworkManager) object));
-                 }
--            }).group(eventloopgroup).localAddress(inetaddress, i)).bind().syncUninterruptibly());
-+            }).group(eventloopgroup).localAddress(inetaddress, i)).option(ChannelOption.AUTO_READ, false).bind().syncUninterruptibly()); // CraftBukkit
-+        }
-+    }
-+
-+    // CraftBukkit start
-+    public void acceptConnections() {
-+        synchronized (this.channels) {
-+            for (ChannelFuture future : this.channels) {
-+                future.channel().config().setAutoRead(true);
-+            }
-         }
-     }
-+    // CraftBukkit end
- 
-     public SocketAddress startMemoryChannel() {
-         List list = this.channels;
diff --git a/paper-server/patches/sources/net/minecraft/server/network/ServerConnectionListener.java.patch b/paper-server/patches/sources/net/minecraft/server/network/ServerConnectionListener.java.patch
new file mode 100644
index 0000000000..5d7f68c60e
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/network/ServerConnectionListener.java.patch
@@ -0,0 +1,31 @@
+--- a/net/minecraft/server/network/ServerConnectionListener.java
++++ b/net/minecraft/server/network/ServerConnectionListener.java
+@@ -100,16 +100,26 @@
+ 
+                     Connection.configureSerialization(channelpipeline, PacketFlow.SERVERBOUND, false, (BandwidthDebugMonitor) null);
+                     int j = ServerConnectionListener.this.server.getRateLimitPacketsPerSecond();
+-                    Object object = j > 0 ? new RateKickingConnection(j) : new Connection(PacketFlow.SERVERBOUND);
++                    Connection object = j > 0 ? new RateKickingConnection(j) : new Connection(PacketFlow.SERVERBOUND); // CraftBukkit - decompile error
+ 
+                     ServerConnectionListener.this.connections.add(object);
+                     ((Connection) object).configurePacketHandler(channelpipeline);
+                     ((Connection) object).setListenerForServerboundHandshake(new ServerHandshakePacketListenerImpl(ServerConnectionListener.this.server, (Connection) object));
+                 }
+-            }).group(eventloopgroup).localAddress(address, port)).bind().syncUninterruptibly());
++            }).group(eventloopgroup).localAddress(address, port)).option(ChannelOption.AUTO_READ, false).bind().syncUninterruptibly()); // CraftBukkit
+         }
+     }
+ 
++    // CraftBukkit start
++    public void acceptConnections() {
++        synchronized (this.channels) {
++            for (ChannelFuture future : this.channels) {
++                future.channel().config().setAutoRead(true);
++            }
++        }
++    }
++    // CraftBukkit end
++
+     public SocketAddress startMemoryChannel() {
+         List list = this.channels;
+         ChannelFuture channelfuture;
diff --git a/paper-server/patches/sources/net/minecraft/server/network/PlayerConnection.patch b/paper-server/patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch
similarity index 61%
rename from paper-server/patches/sources/net/minecraft/server/network/PlayerConnection.patch
rename to paper-server/patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch
index d02df844e2..d7239d1eaf 100644
--- a/paper-server/patches/sources/net/minecraft/server/network/PlayerConnection.patch
+++ b/paper-server/patches/sources/net/minecraft/server/network/ServerGamePacketListenerImpl.java.patch
@@ -1,7 +1,54 @@
---- a/net/minecraft/server/network/PlayerConnection.java
-+++ b/net/minecraft/server/network/PlayerConnection.java
-@@ -198,6 +198,71 @@
- import net.minecraft.world.phys.shapes.VoxelShapes;
+--- a/net/minecraft/server/network/ServerGamePacketListenerImpl.java
++++ b/net/minecraft/server/network/ServerGamePacketListenerImpl.java
+@@ -65,12 +65,15 @@
+ import net.minecraft.network.protocol.game.ClientboundBlockChangedAckPacket;
+ import net.minecraft.network.protocol.game.ClientboundBlockUpdatePacket;
+ import net.minecraft.network.protocol.game.ClientboundCommandSuggestionsPacket;
++import net.minecraft.network.protocol.game.ClientboundContainerSetSlotPacket;
+ import net.minecraft.network.protocol.game.ClientboundDisguisedChatPacket;
+ import net.minecraft.network.protocol.game.ClientboundMoveVehiclePacket;
+ import net.minecraft.network.protocol.game.ClientboundPlaceGhostRecipePacket;
+ import net.minecraft.network.protocol.game.ClientboundPlayerChatPacket;
+ import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
+ import net.minecraft.network.protocol.game.ClientboundPlayerPositionPacket;
++import net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket;
++import net.minecraft.network.protocol.game.ClientboundSetEquipmentPacket;
+ import net.minecraft.network.protocol.game.ClientboundSetHeldSlotPacket;
+ import net.minecraft.network.protocol.game.ClientboundStartConfigurationPacket;
+ import net.minecraft.network.protocol.game.ClientboundSystemChatPacket;
+@@ -148,14 +151,13 @@
+ import net.minecraft.world.entity.ExperienceOrb;
+ import net.minecraft.world.entity.HasCustomInventoryScreen;
+ import net.minecraft.world.entity.LivingEntity;
++import net.minecraft.world.entity.Mob;
+ import net.minecraft.world.entity.MoverType;
+ import net.minecraft.world.entity.PlayerRideableJumping;
+ import net.minecraft.world.entity.PositionMoveRotation;
+ import net.minecraft.world.entity.Relative;
+-import net.minecraft.world.entity.item.ItemEntity;
+ import net.minecraft.world.entity.player.ChatVisiblity;
+ import net.minecraft.world.entity.player.Inventory;
+-import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.entity.player.PlayerModelPart;
+ import net.minecraft.world.entity.player.ProfilePublicKey;
+ import net.minecraft.world.entity.projectile.AbstractArrow;
+@@ -176,6 +178,7 @@
+ import net.minecraft.world.item.crafting.RecipeHolder;
+ import net.minecraft.world.item.crafting.RecipeManager;
+ import net.minecraft.world.level.BaseCommandBlock;
++import net.minecraft.world.level.ClipContext;
+ import net.minecraft.world.level.GameRules;
+ import net.minecraft.world.level.GameType;
+ import net.minecraft.world.level.Level;
+@@ -192,12 +195,70 @@
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.phys.AABB;
+ import net.minecraft.world.phys.BlockHitResult;
++import net.minecraft.world.phys.HitResult;
+ import net.minecraft.world.phys.Vec3;
+ import net.minecraft.world.phys.shapes.BooleanOp;
+ import net.minecraft.world.phys.shapes.Shapes;
+ import net.minecraft.world.phys.shapes.VoxelShape;
  import org.slf4j.Logger;
  
 +// CraftBukkit start
@@ -11,19 +58,11 @@
 +import java.util.concurrent.atomic.AtomicInteger;
 +import java.util.function.Function;
 +import net.minecraft.network.chat.OutgoingChatMessage;
-+import net.minecraft.network.protocol.game.PacketPlayOutAttachEntity;
-+import net.minecraft.network.protocol.game.PacketPlayOutEntityEquipment;
-+import net.minecraft.network.protocol.game.PacketPlayOutSetSlot;
-+import net.minecraft.world.entity.EntityInsentient;
 +import net.minecraft.world.entity.animal.Bucketable;
-+import net.minecraft.world.entity.EntityLiving;
-+import net.minecraft.world.entity.EnumItemSlot;
 +import net.minecraft.world.entity.animal.allay.Allay;
-+import net.minecraft.world.inventory.InventoryClickType;
++import net.minecraft.world.entity.item.ItemEntity;
 +import net.minecraft.world.inventory.Slot;
 +import net.minecraft.world.item.crafting.RecipeHolder;
-+import net.minecraft.world.level.RayTrace;
-+import net.minecraft.world.phys.MovingObjectPosition;
 +import org.bukkit.Location;
 +import org.bukkit.craftbukkit.CraftInput;
 +import org.bukkit.craftbukkit.entity.CraftEntity;
@@ -69,33 +108,33 @@
 +import org.bukkit.inventory.SmithingInventory;
 +// CraftBukkit end
 +
- public class PlayerConnection extends ServerCommonPacketListenerImpl implements PacketListenerPlayIn, ServerPlayerConnection, TickablePacketListener {
+ public class ServerGamePacketListenerImpl extends ServerCommonPacketListenerImpl implements ServerGamePacketListener, ServerPlayerConnection, TickablePacketListener {
  
      static final Logger LOGGER = LogUtils.getLogger();
-@@ -247,7 +312,7 @@
+@@ -247,7 +308,7 @@
      private boolean waitingForSwitchToConfig;
  
-     public PlayerConnection(MinecraftServer minecraftserver, NetworkManager networkmanager, EntityPlayer entityplayer, CommonListenerCookie commonlistenercookie) {
--        super(minecraftserver, networkmanager, commonlistenercookie);
-+        super(minecraftserver, networkmanager, commonlistenercookie, entityplayer); // CraftBukkit
-         this.chunkSender = new PlayerChunkSender(networkmanager.isMemoryConnection());
-         this.player = entityplayer;
-         entityplayer.connection = this;
-@@ -256,9 +321,25 @@
+     public ServerGamePacketListenerImpl(MinecraftServer server, Connection connection, ServerPlayer player, CommonListenerCookie clientData) {
+-        super(server, connection, clientData);
++        super(server, connection, clientData, player); // CraftBukkit
+         this.chunkSender = new PlayerChunkSender(connection.isMemoryConnection());
+         this.player = player;
+         player.connection = this;
+@@ -256,9 +317,25 @@
  
-         Objects.requireNonNull(minecraftserver);
-         this.signedMessageDecoder = SignedMessageChain.b.unsigned(uuid, minecraftserver::enforceSecureProfile);
--        this.chatMessageChain = new FutureChain(minecraftserver);
-+        this.chatMessageChain = new FutureChain(minecraftserver.chatExecutor); // CraftBukkit - async chat
+         Objects.requireNonNull(server);
+         this.signedMessageDecoder = SignedMessageChain.Decoder.unsigned(uuid, server::enforceSecureProfile);
+-        this.chatMessageChain = new FutureChain(server);
++        this.chatMessageChain = new FutureChain(server.chatExecutor); // CraftBukkit - async chat
      }
- 
++
 +    // CraftBukkit start - add fields and methods
 +    private int lastTick = MinecraftServer.currentTick;
 +    private int allowedPlayerTicks = 1;
 +    private int lastDropTick = MinecraftServer.currentTick;
 +    private int lastBookTick  = MinecraftServer.currentTick;
 +    private int dropCount = 0;
-+
+ 
 +    private boolean hasMoved = false;
 +    private double lastPosX = Double.MAX_VALUE;
 +    private double lastPosY = Double.MAX_VALUE;
@@ -108,42 +147,42 @@
      @Override
      public void tick() {
          if (this.ackBlockChangesUpTo > -1) {
-@@ -313,6 +394,7 @@
+@@ -313,6 +390,7 @@
          this.chatSpamThrottler.tick();
          this.dropSpamThrottler.tick();
-         if (this.player.getLastActionTime() > 0L && this.server.getPlayerIdleTimeout() > 0 && SystemUtils.getMillis() - this.player.getLastActionTime() > (long) this.server.getPlayerIdleTimeout() * 1000L * 60L) {
+         if (this.player.getLastActionTime() > 0L && this.server.getPlayerIdleTimeout() > 0 && Util.getMillis() - this.player.getLastActionTime() > (long) this.server.getPlayerIdleTimeout() * 1000L * 60L) {
 +            this.player.resetLastActionTime(); // CraftBukkit - SPIGOT-854
-             this.disconnect((IChatBaseComponent) IChatBaseComponent.translatable("multiplayer.disconnect.idling"));
+             this.disconnect((Component) Component.translatable("multiplayer.disconnect.idling"));
          }
  
-@@ -376,6 +458,12 @@
+@@ -376,6 +454,12 @@
      @Override
-     public void handlePlayerInput(PacketPlayInSteerVehicle packetplayinsteervehicle) {
-         PlayerConnectionUtils.ensureRunningOnSameThread(packetplayinsteervehicle, this, this.player.serverLevel());
+     public void handlePlayerInput(ServerboundPlayerInputPacket packet) {
+         PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
 +        // CraftBukkit start
-+        if (!packetplayinsteervehicle.input().equals(this.player.getLastClientInput())) {
-+            PlayerInputEvent event = new PlayerInputEvent(this.player.getBukkitEntity(), new CraftInput(packetplayinsteervehicle.input()));
++        if (!packet.input().equals(this.player.getLastClientInput())) {
++            PlayerInputEvent event = new PlayerInputEvent(this.player.getBukkitEntity(), new CraftInput(packet.input()));
 +            this.cserver.getPluginManager().callEvent(event);
 +        }
 +        // CraftBukkit end
-         this.player.setLastClientInput(packetplayinsteervehicle.input());
+         this.player.setLastClientInput(packet.input());
      }
  
-@@ -401,6 +489,13 @@
+@@ -401,6 +485,13 @@
  
              if (entity != this.player && entity.getControllingPassenger() == this.player && entity == this.lastVehicle) {
-                 WorldServer worldserver = this.player.serverLevel();
+                 ServerLevel worldserver = this.player.serverLevel();
 +                // CraftBukkit - store current player position
-+                double prevX = player.getX();
-+                double prevY = player.getY();
-+                double prevZ = player.getZ();
-+                float prevYaw = player.getYRot();
-+                float prevPitch = player.getXRot();
++                double prevX = this.player.getX();
++                double prevY = this.player.getY();
++                double prevZ = this.player.getZ();
++                float prevYaw = this.player.getYRot();
++                float prevPitch = this.player.getXRot();
 +                // CraftBukkit end
                  double d0 = entity.getX();
                  double d1 = entity.getY();
                  double d2 = entity.getZ();
-@@ -415,7 +510,33 @@
+@@ -415,7 +506,33 @@
                  double d9 = entity.getDeltaMovement().lengthSqr();
                  double d10 = d6 * d6 + d7 * d7 + d8 * d8;
  
@@ -156,42 +195,42 @@
 +                ++this.receivedMovePacketCount;
 +                int i = this.receivedMovePacketCount - this.knownMovePacketCount;
 +                if (i > Math.max(this.allowedPlayerTicks, 5)) {
-+                    PlayerConnection.LOGGER.debug(this.player.getScoreboardName() + " is sending move packets too frequently (" + i + " packets since last tick)");
++                    ServerGamePacketListenerImpl.LOGGER.debug(this.player.getScoreboardName() + " is sending move packets too frequently (" + i + " packets since last tick)");
 +                    i = 1;
 +                }
 +
 +                if (d10 > 0) {
-+                    allowedPlayerTicks -= 1;
++                    this.allowedPlayerTicks -= 1;
 +                } else {
-+                    allowedPlayerTicks = 20;
++                    this.allowedPlayerTicks = 20;
 +                }
 +                double speed;
-+                if (player.getAbilities().flying) {
-+                    speed = player.getAbilities().flyingSpeed * 20f;
++                if (this.player.getAbilities().flying) {
++                    speed = this.player.getAbilities().flyingSpeed * 20f;
 +                } else {
-+                    speed = player.getAbilities().walkingSpeed * 10f;
++                    speed = this.player.getAbilities().walkingSpeed * 10f;
 +                }
 +                speed *= 2f; // TODO: Get the speed of the vehicle instead of the player
 +
 +                if (d10 - d9 > Math.max(100.0D, Math.pow((double) (10.0F * (float) i * speed), 2)) && !this.isSingleplayerOwner()) {
 +                // CraftBukkit end
-                     PlayerConnection.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", new Object[]{entity.getName().getString(), this.player.getName().getString(), d6, d7, d8});
-                     this.send(PacketPlayOutVehicleMove.fromEntity(entity));
+                     ServerGamePacketListenerImpl.LOGGER.warn("{} (vehicle of {}) moved too quickly! {},{},{}", new Object[]{entity.getName().getString(), this.player.getName().getString(), d6, d7, d8});
+                     this.send(ClientboundMoveVehiclePacket.fromEntity(entity));
                      return;
-@@ -455,14 +576,67 @@
+@@ -455,13 +572,66 @@
                  }
  
                  entity.absMoveTo(d3, d4, d5, f, f1);
-+                player.absMoveTo(d3, d4, d5, this.player.getYRot(), this.player.getXRot()); // CraftBukkit
++                this.player.absMoveTo(d3, d4, d5, this.player.getYRot(), this.player.getXRot()); // CraftBukkit
                  boolean flag3 = worldserver.noCollision(entity, entity.getBoundingBox().deflate(0.0625D));
  
                  if (flag && (flag2 || !flag3)) {
                      entity.absMoveTo(d0, d1, d2, f, f1);
-+                    player.absMoveTo(d0, d1, d2, this.player.getYRot(), this.player.getXRot()); // CraftBukkit
-                     this.send(PacketPlayOutVehicleMove.fromEntity(entity));
++                    this.player.absMoveTo(d0, d1, d2, this.player.getYRot(), this.player.getXRot()); // CraftBukkit
+                     this.send(ClientboundMoveVehiclePacket.fromEntity(entity));
                      return;
-                 }
- 
++                }
++
 +                // CraftBukkit start - fire PlayerMoveEvent
 +                Player player = this.getCraftPlayer();
 +                if (!this.hasMoved) {
@@ -202,8 +241,8 @@
 +                    this.lastPitch = prevPitch;
 +                    this.hasMoved = true;
 +                }
-+                Location from = new Location(player.getWorld(), lastPosX, lastPosY, lastPosZ, lastYaw, lastPitch); // Get the Players previous Event location.
-+                Location to = CraftLocation.toBukkit(packetplayinvehiclemove.position(), player.getWorld(), packetplayinvehiclemove.yRot(), packetplayinvehiclemove.xRot());
++                Location from = new Location(player.getWorld(), this.lastPosX, this.lastPosY, this.lastPosZ, this.lastYaw, this.lastPitch); // Get the Players previous Event location.
++                Location to = CraftLocation.toBukkit(packet.position(), player.getWorld(), packet.yRot(), packet.xRot());
 +
 +                // Prevent 40 event-calls for less than a single pixel of movement >.>
 +                double delta = Math.pow(this.lastPosX - to.getX(), 2) + Math.pow(this.lastPosY - to.getY(), 2) + Math.pow(this.lastPosZ - to.getZ(), 2);
@@ -222,7 +261,7 @@
 +
 +                    // If the event is cancelled we move the player back to their old location.
 +                    if (event.isCancelled()) {
-+                        teleport(from);
++                        this.teleport(from);
 +                        return;
 +                    }
 +
@@ -240,13 +279,12 @@
 +                        this.justTeleported = false;
 +                        return;
 +                    }
-+                }
+                 }
 +                // CraftBukkit end
-+
+ 
                  this.player.serverLevel().getChunkSource().move(this.player);
-                 entity.recordMovementThroughBlocks(new Vec3D(d0, d1, d2), entity.position());
-                 Vec3D vec3d = new Vec3D(entity.getX() - d0, entity.getY() - d1, entity.getZ() - d2);
-@@ -499,6 +673,7 @@
+                 entity.recordMovementThroughBlocks(new Vec3(d0, d1, d2), entity.position());
+@@ -499,6 +669,7 @@
              this.lastGoodZ = this.awaitingPositionFromClient.z;
              this.player.hasChangedDimension();
              this.awaitingPositionFromClient = null;
@@ -254,39 +292,39 @@
          }
  
      }
-@@ -528,6 +703,7 @@
+@@ -528,6 +699,7 @@
      @Override
-     public void handleRecipeBookChangeSettingsPacket(PacketPlayInRecipeSettings packetplayinrecipesettings) {
-         PlayerConnectionUtils.ensureRunningOnSameThread(packetplayinrecipesettings, this, this.player.serverLevel());
-+        CraftEventFactory.callRecipeBookSettingsEvent(this.player, packetplayinrecipesettings.getBookType(), packetplayinrecipesettings.isOpen(), packetplayinrecipesettings.isFiltering()); // CraftBukkit
-         this.player.getRecipeBook().setBookSetting(packetplayinrecipesettings.getBookType(), packetplayinrecipesettings.isOpen(), packetplayinrecipesettings.isFiltering());
+     public void handleRecipeBookChangeSettingsPacket(ServerboundRecipeBookChangeSettingsPacket packet) {
+         PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
++        CraftEventFactory.callRecipeBookSettingsEvent(this.player, packet.getBookType(), packet.isOpen(), packet.isFiltering()); // CraftBukkit
+         this.player.getRecipeBook().setBookSetting(packet.getBookType(), packet.isOpen(), packet.isFiltering());
      }
  
-@@ -548,6 +724,12 @@
+@@ -548,6 +720,12 @@
      @Override
-     public void handleCustomCommandSuggestions(PacketPlayInTabComplete packetplayintabcomplete) {
-         PlayerConnectionUtils.ensureRunningOnSameThread(packetplayintabcomplete, this, this.player.serverLevel());
+     public void handleCustomCommandSuggestions(ServerboundCommandSuggestionPacket packet) {
+         PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
 +        // CraftBukkit start
 +        if (!this.chatSpamThrottler.isIncrementAndUnderThreshold(1, 500) && !this.server.getPlayerList().isOp(this.player.getGameProfile()) && !this.server.isSingleplayerOwner(this.player.getGameProfile())) {
-+            this.disconnect(IChatBaseComponent.translatable("disconnect.spam"));
++            this.disconnect(Component.translatable("disconnect.spam"));
 +            return;
 +        }
 +        // CraftBukkit end
-         StringReader stringreader = new StringReader(packetplayintabcomplete.getCommand());
+         StringReader stringreader = new StringReader(packet.getCommand());
  
          if (stringreader.canRead() && stringreader.peek() == '/') {
-@@ -557,6 +739,7 @@
-         ParseResults<CommandListenerWrapper> parseresults = this.server.getCommands().getDispatcher().parse(stringreader, this.player.createCommandSourceStack());
+@@ -557,6 +735,7 @@
+         ParseResults<CommandSourceStack> parseresults = this.server.getCommands().getDispatcher().parse(stringreader, this.player.createCommandSourceStack());
  
          this.server.getCommands().getDispatcher().getCompletionSuggestions(parseresults).thenAccept((suggestions) -> {
 +            if (suggestions.isEmpty()) return; // CraftBukkit - don't send through empty suggestions - prevents [<args>] from showing for plugins with nothing more to offer
              Suggestions suggestions1 = suggestions.getList().size() <= 1000 ? suggestions : new Suggestions(suggestions.getRange(), suggestions.getList().subList(0, 1000));
  
-             this.send(new PacketPlayOutTabComplete(packetplayintabcomplete.getId(), suggestions1));
-@@ -866,6 +1049,13 @@
-         Container container = this.player.containerMenu;
+             this.send(new ClientboundCommandSuggestionsPacket(packet.getId(), suggestions1));
+@@ -866,6 +1045,13 @@
+         AbstractContainerMenu container = this.player.containerMenu;
  
-         if (container instanceof ContainerMerchant containermerchant) {
+         if (container instanceof MerchantMenu containermerchant) {
 +            // CraftBukkit start
 +            final org.bukkit.event.inventory.TradeSelectEvent tradeSelectEvent = CraftEventFactory.callTradeSelectEvent(this.player, i, containermerchant);
 +            if (tradeSelectEvent.isCancelled()) {
@@ -295,82 +333,82 @@
 +            }
 +            // CraftBukkit end
              if (!containermerchant.stillValid(this.player)) {
-                 PlayerConnection.LOGGER.debug("Player {} interacted with invalid menu {}", this.player, containermerchant);
+                 ServerGamePacketListenerImpl.LOGGER.debug("Player {} interacted with invalid menu {}", this.player, containermerchant);
                  return;
-@@ -879,6 +1069,13 @@
+@@ -879,6 +1065,13 @@
  
      @Override
-     public void handleEditBook(PacketPlayInBEdit packetplayinbedit) {
+     public void handleEditBook(ServerboundEditBookPacket packet) {
 +        // CraftBukkit start
 +        if (this.lastBookTick + 20 > MinecraftServer.currentTick) {
-+            this.disconnect(IChatBaseComponent.literal("Book edited too quickly!"));
++            this.disconnect(Component.literal("Book edited too quickly!"));
 +            return;
 +        }
 +        this.lastBookTick = MinecraftServer.currentTick;
 +        // CraftBukkit end
-         int i = packetplayinbedit.slot();
+         int i = packet.slot();
  
-         if (PlayerInventory.isHotbarSlot(i) || i == 40) {
-@@ -899,12 +1096,16 @@
+         if (Inventory.isHotbarSlot(i) || i == 40) {
+@@ -899,12 +1092,16 @@
      }
  
-     private void updateBookContents(List<FilteredText> list, int i) {
--        ItemStack itemstack = this.player.getInventory().getItem(i);
+     private void updateBookContents(List<FilteredText> pages, int slotId) {
+-        ItemStack itemstack = this.player.getInventory().getItem(slotId);
 +        // CraftBukkit start
-+        ItemStack handItem = this.player.getInventory().getItem(i);
++        ItemStack handItem = this.player.getInventory().getItem(slotId);
 +        ItemStack itemstack = handItem.copy();
 +        // CraftBukkit end
  
          if (itemstack.has(DataComponents.WRITABLE_BOOK_CONTENT)) {
-             List<Filterable<String>> list1 = list.stream().map(this::filterableFromOutgoing).toList();
+             List<Filterable<String>> list1 = pages.stream().map(this::filterableFromOutgoing).toList();
  
              itemstack.set(DataComponents.WRITABLE_BOOK_CONTENT, new WritableBookContent(list1));
-+            CraftEventFactory.handleEditBookEvent(player, i, handItem, itemstack); // CraftBukkit
++            CraftEventFactory.handleEditBookEvent(this.player, slotId, handItem, itemstack); // CraftBukkit
          }
      }
  
-@@ -915,12 +1116,13 @@
+@@ -915,12 +1112,13 @@
              ItemStack itemstack1 = itemstack.transmuteCopy(Items.WRITTEN_BOOK);
  
              itemstack1.remove(DataComponents.WRITABLE_BOOK_CONTENT);
--            List<Filterable<IChatBaseComponent>> list1 = list.stream().map((filteredtext1) -> {
-+            List<Filterable<IChatBaseComponent>> list1 = (List<Filterable<IChatBaseComponent>>) (List) list.stream().map((filteredtext1) -> { // CraftBukkit - decompile error
-                 return this.filterableFromOutgoing(filteredtext1).map(IChatBaseComponent::literal);
+-            List<Filterable<Component>> list1 = pages.stream().map((filteredtext1) -> {
++            List<Filterable<Component>> list1 = (List<Filterable<Component>>) (List) pages.stream().map((filteredtext1) -> { // CraftBukkit - decompile error
+                 return this.filterableFromOutgoing(filteredtext1).map(Component::literal);
              }).toList();
  
-             itemstack1.set(DataComponents.WRITTEN_BOOK_CONTENT, new WrittenBookContent(this.filterableFromOutgoing(filteredtext), this.player.getName().getString(), 0, list1, true));
--            this.player.getInventory().setItem(i, itemstack1);
-+            CraftEventFactory.handleEditBookEvent(player, i, itemstack, itemstack1); // CraftBukkit
-+            this.player.getInventory().setItem(i, itemstack); // CraftBukkit - event factory updates the hand book
+             itemstack1.set(DataComponents.WRITTEN_BOOK_CONTENT, new WrittenBookContent(this.filterableFromOutgoing(title), this.player.getName().getString(), 0, list1, true));
+-            this.player.getInventory().setItem(slotId, itemstack1);
++            CraftEventFactory.handleEditBookEvent(this.player, slotId, itemstack, itemstack1); // CraftBukkit
++            this.player.getInventory().setItem(slotId, itemstack); // CraftBukkit - event factory updates the hand book
          }
      }
  
-@@ -982,7 +1184,7 @@
+@@ -982,7 +1180,7 @@
          } else {
-             WorldServer worldserver = this.player.serverLevel();
+             ServerLevel worldserver = this.player.serverLevel();
  
 -            if (!this.player.wonGame) {
 +            if (!this.player.wonGame && !this.player.isImmobile()) { // CraftBukkit
                  if (this.tickCount == 0) {
                      this.resetPosition();
                  }
-@@ -997,7 +1199,15 @@
+@@ -997,7 +1195,15 @@
                      if (this.player.isPassenger()) {
                          this.player.absMoveTo(this.player.getX(), this.player.getY(), this.player.getZ(), f, f1);
                          this.player.serverLevel().getChunkSource().move(this.player);
 +                        this.allowedPlayerTicks = 20; // CraftBukkit
                      } else {
 +                        // CraftBukkit - Make sure the move is valid but then reset it for plugins to modify
-+                        double prevX = player.getX();
-+                        double prevY = player.getY();
-+                        double prevZ = player.getZ();
-+                        float prevYaw = player.getYRot();
-+                        float prevPitch = player.getXRot();
++                        double prevX = this.player.getX();
++                        double prevY = this.player.getY();
++                        double prevZ = this.player.getZ();
++                        float prevYaw = this.player.getYRot();
++                        float prevPitch = this.player.getXRot();
 +                        // CraftBukkit end
                          double d3 = this.player.getX();
                          double d4 = this.player.getY();
                          double d5 = this.player.getZ();
-@@ -1019,15 +1229,33 @@
+@@ -1019,15 +1225,33 @@
                                  ++this.receivedMovePacketCount;
                                  int i = this.receivedMovePacketCount - this.knownMovePacketCount;
  
@@ -381,20 +419,20 @@
 +                                this.lastTick = (int) (System.currentTimeMillis() / 50);
 +
 +                                if (i > Math.max(this.allowedPlayerTicks, 5)) {
-                                     PlayerConnection.LOGGER.debug("{} is sending move packets too frequently ({} packets since last tick)", this.player.getName().getString(), i);
+                                     ServerGamePacketListenerImpl.LOGGER.debug("{} is sending move packets too frequently ({} packets since last tick)", this.player.getName().getString(), i);
                                      i = 1;
                                  }
  
-+                                if (packetplayinflying.hasRot || d10 > 0) {
-+                                    allowedPlayerTicks -= 1;
++                                if (packet.hasRot || d10 > 0) {
++                                    this.allowedPlayerTicks -= 1;
 +                                } else {
-+                                    allowedPlayerTicks = 20;
++                                    this.allowedPlayerTicks = 20;
 +                                }
 +                                double speed;
-+                                if (player.getAbilities().flying) {
-+                                    speed = player.getAbilities().flyingSpeed * 20f;
++                                if (this.player.getAbilities().flying) {
++                                    speed = this.player.getAbilities().flyingSpeed * 20f;
 +                                } else {
-+                                    speed = player.getAbilities().walkingSpeed * 10f;
++                                    speed = this.player.getAbilities().walkingSpeed * 10f;
 +                                }
 +
                                  if (this.shouldCheckPlayerMovement(flag)) {
@@ -403,24 +441,24 @@
 -                                    if (d10 - d9 > (double) (f2 * (float) i)) {
 +                                    if (d10 - d9 > Math.max(f2, Math.pow((double) (10.0F * (float) i * speed), 2))) {
 +                                    // CraftBukkit end
-                                         PlayerConnection.LOGGER.warn("{} moved too quickly! {},{},{}", new Object[]{this.player.getName().getString(), d6, d7, d8});
+                                         ServerGamePacketListenerImpl.LOGGER.warn("{} moved too quickly! {},{},{}", new Object[]{this.player.getName().getString(), d6, d7, d8});
                                          this.teleport(this.player.getX(), this.player.getY(), this.player.getZ(), this.player.getYRot(), this.player.getXRot());
                                          return;
-@@ -1049,6 +1277,7 @@
+@@ -1049,6 +1273,7 @@
                              boolean flag2 = this.player.verticalCollisionBelow;
  
-                             this.player.move(EnumMoveType.PLAYER, new Vec3D(d6, d7, d8));
-+                            this.player.onGround = packetplayinflying.isOnGround(); // CraftBukkit - SPIGOT-5810, SPIGOT-5835, SPIGOT-6828: reset by this.player.move
+                             this.player.move(MoverType.PLAYER, new Vec3(d6, d7, d8));
++                            this.player.onGround = packet.isOnGround(); // CraftBukkit - SPIGOT-5810, SPIGOT-5835, SPIGOT-6828: reset by this.player.move
                              double d11 = d7;
  
                              d6 = d0 - this.player.getX();
-@@ -1067,9 +1296,75 @@
+@@ -1067,9 +1292,75 @@
                              }
  
                              if (!this.player.noPhysics && !this.player.isSleeping() && (flag3 && worldserver.noCollision(this.player, axisalignedbb) || this.isPlayerCollidingWithAnythingNew(worldserver, axisalignedbb, d0, d1, d2))) {
 -                                this.teleport(d3, d4, d5, f, f1);
 +                                this.internalTeleport(d3, d4, d5, f, f1); // CraftBukkit - SPIGOT-1807: Don't call teleport event, when the client thinks the player is falling, because the chunks are not loaded on the client yet.
-                                 this.player.doCheckFallDamage(this.player.getX() - d3, this.player.getY() - d4, this.player.getZ() - d5, packetplayinflying.isOnGround());
+                                 this.player.doCheckFallDamage(this.player.getX() - d3, this.player.getY() - d4, this.player.getZ() - d5, packet.isOnGround());
                              } else {
 +                                // CraftBukkit start - fire PlayerMoveEvent
 +                                // Reset to old location first
@@ -435,20 +473,20 @@
 +                                    this.lastPitch = prevPitch;
 +                                    this.hasMoved = true;
 +                                }
-+                                Location from = new Location(player.getWorld(), lastPosX, lastPosY, lastPosZ, lastYaw, lastPitch); // Get the Players previous Event location.
++                                Location from = new Location(player.getWorld(), this.lastPosX, this.lastPosY, this.lastPosZ, this.lastYaw, this.lastPitch); // Get the Players previous Event location.
 +                                Location to = player.getLocation().clone(); // Start off the To location as the Players current location.
 +
 +                                // If the packet contains movement information then we update the To location with the correct XYZ.
-+                                if (packetplayinflying.hasPos) {
-+                                    to.setX(packetplayinflying.x);
-+                                    to.setY(packetplayinflying.y);
-+                                    to.setZ(packetplayinflying.z);
++                                if (packet.hasPos) {
++                                    to.setX(packet.x);
++                                    to.setY(packet.y);
++                                    to.setZ(packet.z);
 +                                }
 +
 +                                // If the packet contains look information then we update the To location with the correct Yaw & Pitch.
-+                                if (packetplayinflying.hasRot) {
-+                                    to.setYaw(packetplayinflying.yRot);
-+                                    to.setPitch(packetplayinflying.xRot);
++                                if (packet.hasRot) {
++                                    to.setYaw(packet.yRot);
++                                    to.setPitch(packet.xRot);
 +                                }
 +
 +                                // Prevent 40 event-calls for less than a single pixel of movement >.>
@@ -468,7 +506,7 @@
 +
 +                                    // If the event is cancelled we move the player back to their old location.
 +                                    if (event.isCancelled()) {
-+                                        teleport(from);
++                                        this.teleport(from);
 +                                        return;
 +                                    }
 +
@@ -491,7 +529,7 @@
                                  this.player.absMoveTo(d0, d1, d2, f, f1);
                                  boolean flag4 = this.player.isAutoSpinAttack();
  
-@@ -1119,6 +1414,7 @@
+@@ -1119,6 +1410,7 @@
                  this.awaitingTeleportTime = this.tickCount;
                  this.teleport(this.awaitingPositionFromClient.x, this.awaitingPositionFromClient.y, this.awaitingPositionFromClient.z, this.player.getYRot(), this.player.getXRot());
              }
@@ -499,23 +537,23 @@
  
              return true;
          } else {
-@@ -1147,10 +1443,62 @@
+@@ -1147,23 +1439,83 @@
      }
  
-     public void teleport(double d0, double d1, double d2, float f, float f1) {
--        this.teleport(new PositionMoveRotation(new Vec3D(d0, d1, d2), Vec3D.ZERO, f, f1), Collections.emptySet());
+     public void teleport(double x, double y, double z, float yaw, float pitch) {
+-        this.teleport(new PositionMoveRotation(new Vec3(x, y, z), Vec3.ZERO, yaw, pitch), Collections.emptySet());
 +        // CraftBukkit start - Delegate to teleport(Location)
-+        this.teleport(d0, d1, d2, f, f1, PlayerTeleportEvent.TeleportCause.UNKNOWN);
++        this.teleport(x, y, z, yaw, pitch, PlayerTeleportEvent.TeleportCause.UNKNOWN);
+     }
+ 
++    public boolean teleport(double d0, double d1, double d2, float f, float f1, PlayerTeleportEvent.TeleportCause cause) {
++        return this.teleport(new PositionMoveRotation(new Vec3(d0, d1, d2), Vec3.ZERO, f, f1), Collections.emptySet(), cause);
++        // CraftBukkit end
 +    }
 +
-+    public boolean teleport(double d0, double d1, double d2, float f, float f1, PlayerTeleportEvent.TeleportCause cause) {
-+        return this.teleport(new PositionMoveRotation(new Vec3D(d0, d1, d2), Vec3D.ZERO, f, f1), Collections.emptySet(), cause);
-+        // CraftBukkit end
-     }
- 
-     public void teleport(PositionMoveRotation positionmoverotation, Set<Relative> set) {
+     public void teleport(PositionMoveRotation pos, Set<Relative> flags) {
 +        // CraftBukkit start
-+        this.teleport(positionmoverotation, set, PlayerTeleportEvent.TeleportCause.UNKNOWN);
++        this.teleport(pos, flags, PlayerTeleportEvent.TeleportCause.UNKNOWN);
 +    }
 +
 +    public boolean teleport(PositionMoveRotation positionmoverotation, Set<Relative> set, PlayerTeleportEvent.TeleportCause cause) { // CraftBukkit - Return event status
@@ -535,7 +573,7 @@
 +        if (event.isCancelled() || !to.equals(event.getTo())) {
 +            set = Collections.emptySet(); // Can't relative teleport
 +            to = event.isCancelled() ? event.getFrom() : event.getTo();
-+            positionmoverotation = new PositionMoveRotation(CraftLocation.toVec3D(to), Vec3D.ZERO, to.getYaw(), to.getPitch());
++            positionmoverotation = new PositionMoveRotation(CraftLocation.toVec3D(to), Vec3.ZERO, to.getYaw(), to.getPitch());
 +        }
 +
 +        this.internalTeleport(positionmoverotation, set);
@@ -547,7 +585,7 @@
 +    }
 +
 +    private void internalTeleport(double d0, double d1, double d2, float f, float f1) {
-+        this.internalTeleport(new PositionMoveRotation(new Vec3D(d0, d1, d2), Vec3D.ZERO, f, f1), Collections.emptySet());
++        this.internalTeleport(new PositionMoveRotation(new Vec3(d0, d1, d2), Vec3.ZERO, f, f1), Collections.emptySet());
 +    }
 +
 +    public void internalTeleport(PositionMoveRotation positionmoverotation, Set<Relative> set) {
@@ -563,10 +601,12 @@
          this.awaitingTeleportTime = this.tickCount;
          if (++this.awaitingTeleport == Integer.MAX_VALUE) {
              this.awaitingTeleport = 0;
-@@ -1158,12 +1506,20 @@
+         }
  
-         this.player.teleportSetPosition(positionmoverotation, set);
+-        this.player.teleportSetPosition(pos, flags);
++        this.player.teleportSetPosition(positionmoverotation, set);
          this.awaitingPositionFromClient = this.player.position();
+-        this.player.connection.send(ClientboundPlayerPositionPacket.of(this.awaitingTeleport, pos, flags));
 +        // CraftBukkit start - update last location
 +        this.lastPosX = this.awaitingPositionFromClient.x;
 +        this.lastPosY = this.awaitingPositionFromClient.y;
@@ -574,39 +614,39 @@
 +        this.lastYaw = this.player.getYRot();
 +        this.lastPitch = this.player.getXRot();
 +        // CraftBukkit end
-         this.player.connection.send(PacketPlayOutPosition.of(this.awaitingTeleport, positionmoverotation, set));
++        this.player.connection.send(ClientboundPlayerPositionPacket.of(this.awaitingTeleport, positionmoverotation, set));
      }
  
      @Override
-     public void handlePlayerAction(PacketPlayInBlockDig packetplayinblockdig) {
-         PlayerConnectionUtils.ensureRunningOnSameThread(packetplayinblockdig, this, this.player.serverLevel());
+     public void handlePlayerAction(ServerboundPlayerActionPacket packet) {
+         PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
 +        if (this.player.isImmobile()) return; // CraftBukkit
          if (this.player.hasClientLoaded()) {
-             BlockPosition blockposition = packetplayinblockdig.getPos();
+             BlockPos blockposition = packet.getPos();
  
-@@ -1175,14 +1531,46 @@
+@@ -1175,14 +1527,46 @@
                      if (!this.player.isSpectator()) {
-                         ItemStack itemstack = this.player.getItemInHand(EnumHand.OFF_HAND);
+                         ItemStack itemstack = this.player.getItemInHand(InteractionHand.OFF_HAND);
  
--                        this.player.setItemInHand(EnumHand.OFF_HAND, this.player.getItemInHand(EnumHand.MAIN_HAND));
--                        this.player.setItemInHand(EnumHand.MAIN_HAND, itemstack);
+-                        this.player.setItemInHand(InteractionHand.OFF_HAND, this.player.getItemInHand(InteractionHand.MAIN_HAND));
+-                        this.player.setItemInHand(InteractionHand.MAIN_HAND, itemstack);
 +                        // CraftBukkit start - inspiration taken from DispenserRegistry (See SpigotCraft#394)
 +                        CraftItemStack mainHand = CraftItemStack.asCraftMirror(itemstack);
-+                        CraftItemStack offHand = CraftItemStack.asCraftMirror(this.player.getItemInHand(EnumHand.MAIN_HAND));
-+                        PlayerSwapHandItemsEvent swapItemsEvent = new PlayerSwapHandItemsEvent(getCraftPlayer(), mainHand.clone(), offHand.clone());
++                        CraftItemStack offHand = CraftItemStack.asCraftMirror(this.player.getItemInHand(InteractionHand.MAIN_HAND));
++                        PlayerSwapHandItemsEvent swapItemsEvent = new PlayerSwapHandItemsEvent(this.getCraftPlayer(), mainHand.clone(), offHand.clone());
 +                        this.cserver.getPluginManager().callEvent(swapItemsEvent);
 +                        if (swapItemsEvent.isCancelled()) {
 +                            return;
 +                        }
 +                        if (swapItemsEvent.getOffHandItem().equals(offHand)) {
-+                            this.player.setItemInHand(EnumHand.OFF_HAND, this.player.getItemInHand(EnumHand.MAIN_HAND));
++                            this.player.setItemInHand(InteractionHand.OFF_HAND, this.player.getItemInHand(InteractionHand.MAIN_HAND));
 +                        } else {
-+                            this.player.setItemInHand(EnumHand.OFF_HAND, CraftItemStack.asNMSCopy(swapItemsEvent.getOffHandItem()));
++                            this.player.setItemInHand(InteractionHand.OFF_HAND, CraftItemStack.asNMSCopy(swapItemsEvent.getOffHandItem()));
 +                        }
 +                        if (swapItemsEvent.getMainHandItem().equals(mainHand)) {
-+                            this.player.setItemInHand(EnumHand.MAIN_HAND, itemstack);
++                            this.player.setItemInHand(InteractionHand.MAIN_HAND, itemstack);
 +                        } else {
-+                            this.player.setItemInHand(EnumHand.MAIN_HAND, CraftItemStack.asNMSCopy(swapItemsEvent.getMainHandItem()));
++                            this.player.setItemInHand(InteractionHand.MAIN_HAND, CraftItemStack.asNMSCopy(swapItemsEvent.getMainHandItem()));
 +                        }
 +                        // CraftBukkit end
                          this.player.stopUsingItem();
@@ -624,8 +664,8 @@
 +                            // Else we increment the drop count and check the amount.
 +                            this.dropCount++;
 +                            if (this.dropCount >= 20) {
-+                                LOGGER.warn(this.player.getScoreboardName() + " dropped their items too quickly!");
-+                                this.disconnect(IChatBaseComponent.literal("You dropped your items too quickly (Hacking?)"));
++                                ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " dropped their items too quickly!");
++                                this.disconnect(Component.literal("You dropped your items too quickly (Hacking?)"));
 +                                return;
 +                            }
 +                        }
@@ -633,31 +673,31 @@
                          this.player.drop(false);
                      }
  
-@@ -1221,6 +1609,7 @@
+@@ -1221,6 +1605,7 @@
      @Override
-     public void handleUseItemOn(PacketPlayInUseItem packetplayinuseitem) {
-         PlayerConnectionUtils.ensureRunningOnSameThread(packetplayinuseitem, this, this.player.serverLevel());
+     public void handleUseItemOn(ServerboundUseItemOnPacket packet) {
+         PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
 +        if (this.player.isImmobile()) return; // CraftBukkit
          if (this.player.hasClientLoaded()) {
-             this.player.connection.ackBlockChangesUpTo(packetplayinuseitem.getSequence());
-             WorldServer worldserver = this.player.serverLevel();
-@@ -1244,6 +1633,7 @@
+             this.player.connection.ackBlockChangesUpTo(packet.getSequence());
+             ServerLevel worldserver = this.player.serverLevel();
+@@ -1244,6 +1629,7 @@
  
                          if (blockposition.getY() <= i) {
                              if (this.awaitingPositionFromClient == null && worldserver.mayInteract(this.player, blockposition)) {
 +                                this.player.stopUsingItem(); // CraftBukkit - SPIGOT-4706
-                                 EnumInteractionResult enuminteractionresult = this.player.gameMode.useItemOn(this.player, worldserver, itemstack, enumhand, movingobjectpositionblock);
+                                 InteractionResult enuminteractionresult = this.player.gameMode.useItemOn(this.player, worldserver, itemstack, enumhand, movingobjectpositionblock);
  
                                  if (enuminteractionresult.consumesAction()) {
-@@ -1281,6 +1671,7 @@
+@@ -1281,6 +1667,7 @@
      @Override
-     public void handleUseItem(PacketPlayInBlockPlace packetplayinblockplace) {
-         PlayerConnectionUtils.ensureRunningOnSameThread(packetplayinblockplace, this, this.player.serverLevel());
+     public void handleUseItem(ServerboundUseItemPacket packet) {
+         PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
 +        if (this.player.isImmobile()) return; // CraftBukkit
          if (this.player.hasClientLoaded()) {
-             this.ackBlockChangesUpTo(packetplayinblockplace.getSequence());
-             WorldServer worldserver = this.player.serverLevel();
-@@ -1296,6 +1687,47 @@
+             this.ackBlockChangesUpTo(packet.getSequence());
+             ServerLevel worldserver = this.player.serverLevel();
+@@ -1296,6 +1683,47 @@
                      this.player.absRotateTo(f, f1);
                  }
  
@@ -666,31 +706,31 @@
 +                double d0 = this.player.getX();
 +                double d1 = this.player.getY() + (double) this.player.getEyeHeight();
 +                double d2 = this.player.getZ();
-+                Vec3D vec3d = new Vec3D(d0, d1, d2);
++                Vec3 vec3d = new Vec3(d0, d1, d2);
 +
-+                float f3 = MathHelper.cos(-f * 0.017453292F - 3.1415927F);
-+                float f4 = MathHelper.sin(-f * 0.017453292F - 3.1415927F);
-+                float f5 = -MathHelper.cos(-f1 * 0.017453292F);
-+                float f6 = MathHelper.sin(-f1 * 0.017453292F);
++                float f3 = Mth.cos(-f * 0.017453292F - 3.1415927F);
++                float f4 = Mth.sin(-f * 0.017453292F - 3.1415927F);
++                float f5 = -Mth.cos(-f1 * 0.017453292F);
++                float f6 = Mth.sin(-f1 * 0.017453292F);
 +                float f7 = f4 * f5;
 +                float f8 = f3 * f5;
-+                double d3 = player.blockInteractionRange();
-+                Vec3D vec3d1 = vec3d.add((double) f7 * d3, (double) f6 * d3, (double) f8 * d3);
-+                MovingObjectPosition movingobjectposition = this.player.level().clip(new RayTrace(vec3d, vec3d1, RayTrace.BlockCollisionOption.OUTLINE, RayTrace.FluidCollisionOption.NONE, player));
++                double d3 = this.player.blockInteractionRange();
++                Vec3 vec3d1 = vec3d.add((double) f7 * d3, (double) f6 * d3, (double) f8 * d3);
++                HitResult movingobjectposition = this.player.level().clip(new ClipContext(vec3d, vec3d1, ClipContext.Block.OUTLINE, ClipContext.Fluid.NONE, this.player));
 +
 +                boolean cancelled;
-+                if (movingobjectposition == null || movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.BLOCK) {
++                if (movingobjectposition == null || movingobjectposition.getType() != HitResult.Type.BLOCK) {
 +                    org.bukkit.event.player.PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.player, Action.RIGHT_CLICK_AIR, itemstack, enumhand);
 +                    cancelled = event.useItemInHand() == Event.Result.DENY;
 +                } else {
-+                    MovingObjectPositionBlock movingobjectpositionblock = (MovingObjectPositionBlock) movingobjectposition;
-+                    if (player.gameMode.firedInteract && player.gameMode.interactPosition.equals(movingobjectpositionblock.getBlockPos()) && player.gameMode.interactHand == enumhand && ItemStack.isSameItemSameComponents(player.gameMode.interactItemStack, itemstack)) {
-+                        cancelled = player.gameMode.interactResult;
++                    BlockHitResult movingobjectpositionblock = (BlockHitResult) movingobjectposition;
++                    if (this.player.gameMode.firedInteract && this.player.gameMode.interactPosition.equals(movingobjectpositionblock.getBlockPos()) && this.player.gameMode.interactHand == enumhand && ItemStack.isSameItemSameComponents(this.player.gameMode.interactItemStack, itemstack)) {
++                        cancelled = this.player.gameMode.interactResult;
 +                    } else {
-+                        org.bukkit.event.player.PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(player, Action.RIGHT_CLICK_BLOCK, movingobjectpositionblock.getBlockPos(), movingobjectpositionblock.getDirection(), itemstack, true, enumhand, movingobjectpositionblock.getLocation());
++                        org.bukkit.event.player.PlayerInteractEvent event = CraftEventFactory.callPlayerInteractEvent(this.player, Action.RIGHT_CLICK_BLOCK, movingobjectpositionblock.getBlockPos(), movingobjectpositionblock.getDirection(), itemstack, true, enumhand, movingobjectpositionblock.getLocation());
 +                        cancelled = event.useItemInHand() == Event.Result.DENY;
 +                    }
-+                    player.gameMode.firedInteract = false;
++                    this.player.gameMode.firedInteract = false;
 +                }
 +
 +                if (cancelled) {
@@ -702,11 +742,11 @@
 +                    return;
 +                }
 +                // CraftBukkit end
-                 EnumInteractionResult enuminteractionresult = this.player.gameMode.useItem(this.player, worldserver, itemstack, enumhand);
+                 InteractionResult enuminteractionresult = this.player.gameMode.useItem(this.player, worldserver, itemstack, enumhand);
  
-                 if (enuminteractionresult instanceof EnumInteractionResult.d) {
-@@ -1321,7 +1753,7 @@
-                 Entity entity = packetplayinspectate.getEntity(worldserver);
+                 if (enuminteractionresult instanceof InteractionResult.Success) {
+@@ -1321,7 +1749,7 @@
+                 Entity entity = packet.getEntity(worldserver);
  
                  if (entity != null) {
 -                    this.player.teleportTo(worldserver, entity.getX(), entity.getY(), entity.getZ(), Set.of(), entity.getYRot(), entity.getXRot(), true);
@@ -714,10 +754,10 @@
                      return;
                  }
              }
-@@ -1342,6 +1774,13 @@
+@@ -1342,6 +1770,13 @@
  
      @Override
-     public void onDisconnect(DisconnectionDetails disconnectiondetails) {
+     public void onDisconnect(DisconnectionDetails info) {
 +        // CraftBukkit start - Rarely it would send a disconnect line twice
 +        if (this.processedDisconnect) {
 +            return;
@@ -725,17 +765,18 @@
 +            this.processedDisconnect = true;
 +        }
 +        // CraftBukkit end
-         PlayerConnection.LOGGER.info("{} lost connection: {}", this.player.getName().getString(), disconnectiondetails.reason().getString());
+         ServerGamePacketListenerImpl.LOGGER.info("{} lost connection: {}", this.player.getName().getString(), info.reason().getString());
          this.removePlayerFromWorld();
-         super.onDisconnect(disconnectiondetails);
-@@ -1349,10 +1788,18 @@
+         super.onDisconnect(info);
+@@ -1349,10 +1784,18 @@
  
      private void removePlayerFromWorld() {
          this.chatMessageChain.close();
 +        // CraftBukkit start - Replace vanilla quit message handling with our own.
 +        /*
          this.server.invalidateStatus();
-         this.server.getPlayerList().broadcastSystemMessage(IChatBaseComponent.translatable("multiplayer.player.left", this.player.getDisplayName()).withStyle(EnumChatFormat.YELLOW), false);
+-        this.server.getPlayerList().broadcastSystemMessage(Component.translatable("multiplayer.player.left", this.player.getDisplayName()).withStyle(ChatFormatting.YELLOW), false);
++        this.server.getPlayerList().broadcastSystemMessage(IChatBaseComponent.translatable("multiplayer.player.left", this.player.getDisplayName()).withStyle(EnumChatFormat.YELLOW), false);
 +        */
 +
          this.player.disconnect();
@@ -748,52 +789,52 @@
          this.player.getTextFilter().leave();
      }
  
-@@ -1367,7 +1814,16 @@
+@@ -1367,7 +1810,16 @@
      @Override
-     public void handleSetCarriedItem(PacketPlayInHeldItemSlot packetplayinhelditemslot) {
-         PlayerConnectionUtils.ensureRunningOnSameThread(packetplayinhelditemslot, this, this.player.serverLevel());
+     public void handleSetCarriedItem(ServerboundSetCarriedItemPacket packet) {
+         PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
 +        if (this.player.isImmobile()) return; // CraftBukkit
-         if (packetplayinhelditemslot.getSlot() >= 0 && packetplayinhelditemslot.getSlot() < PlayerInventory.getSelectionSize()) {
-+            PlayerItemHeldEvent event = new PlayerItemHeldEvent(this.getCraftPlayer(), this.player.getInventory().selected, packetplayinhelditemslot.getSlot());
+         if (packet.getSlot() >= 0 && packet.getSlot() < Inventory.getSelectionSize()) {
++            PlayerItemHeldEvent event = new PlayerItemHeldEvent(this.getCraftPlayer(), this.player.getInventory().selected, packet.getSlot());
 +            this.cserver.getPluginManager().callEvent(event);
 +            if (event.isCancelled()) {
-+                this.send(new PacketPlayOutHeldItemSlot(this.player.getInventory().selected));
++                this.send(new ClientboundSetHeldSlotPacket(this.player.getInventory().selected));
 +                this.player.resetLastActionTime();
 +                return;
 +            }
 +            // CraftBukkit end
-             if (this.player.getInventory().selected != packetplayinhelditemslot.getSlot() && this.player.getUsedItemHand() == EnumHand.MAIN_HAND) {
+             if (this.player.getInventory().selected != packet.getSlot() && this.player.getUsedItemHand() == InteractionHand.MAIN_HAND) {
                  this.player.stopUsingItem();
              }
-@@ -1376,11 +1832,18 @@
+@@ -1376,11 +1828,18 @@
              this.player.resetLastActionTime();
          } else {
-             PlayerConnection.LOGGER.warn("{} tried to set an invalid carried item", this.player.getName().getString());
-+            this.disconnect(IChatBaseComponent.literal("Invalid hotbar selection (Hacking?)")); // CraftBukkit
+             ServerGamePacketListenerImpl.LOGGER.warn("{} tried to set an invalid carried item", this.player.getName().getString());
++            this.disconnect(Component.literal("Invalid hotbar selection (Hacking?)")); // CraftBukkit
          }
      }
  
      @Override
-     public void handleChat(PacketPlayInChat packetplayinchat) {
+     public void handleChat(ServerboundChatPacket packet) {
 +        // CraftBukkit start - async chat
 +        // SPIGOT-3638
 +        if (this.server.isStopped()) {
 +            return;
 +        }
 +        // CraftBukkit end
-         Optional<LastSeenMessages> optional = this.unpackAndApplyLastSeen(packetplayinchat.lastSeenMessages());
+         Optional<LastSeenMessages> optional = this.unpackAndApplyLastSeen(packet.lastSeenMessages());
  
          if (!optional.isEmpty()) {
-@@ -1394,7 +1857,7 @@
+@@ -1394,7 +1853,7 @@
                      return;
                  }
  
 -                CompletableFuture<FilteredText> completablefuture = this.filterTextPacket(playerchatmessage.signedContent());
 +                CompletableFuture<FilteredText> completablefuture = this.filterTextPacket(playerchatmessage.signedContent()).thenApplyAsync(Function.identity(), this.server.chatExecutor); // CraftBukkit - async chat
-                 IChatBaseComponent ichatbasecomponent = this.server.getChatDecorator().decorate(this.player, playerchatmessage.decoratedContent());
+                 Component ichatbasecomponent = this.server.getChatDecorator().decorate(this.player, playerchatmessage.decoratedContent());
  
                  this.chatMessageChain.append(completablefuture, (filteredtext) -> {
-@@ -1402,19 +1865,36 @@
+@@ -1402,19 +1861,36 @@
  
                      this.broadcastChatMessage(playerchatmessage1);
                  });
@@ -803,58 +844,58 @@
      }
  
      @Override
-     public void handleChatCommand(ServerboundChatCommandPacket serverboundchatcommandpacket) {
-         this.tryHandleChat(serverboundchatcommandpacket.command(), () -> {
+     public void handleChatCommand(ServerboundChatCommandPacket packet) {
+         this.tryHandleChat(packet.command(), () -> {
 +            // CraftBukkit start - SPIGOT-7346: Prevent disconnected players from executing commands
-+            if (player.hasDisconnected()) {
++            if (this.player.hasDisconnected()) {
 +                return;
 +            }
 +            // CraftBukkit end
-             this.performUnsignedChatCommand(serverboundchatcommandpacket.command());
+             this.performUnsignedChatCommand(packet.command());
              this.detectRateSpam();
 -        });
 +        }, true); // CraftBukkit - sync commands
      }
  
-     private void performUnsignedChatCommand(String s) {
+     private void performUnsignedChatCommand(String command) {
 +        // CraftBukkit start
-+        String command = "/" + s;
-+        PlayerConnection.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + command);
++        String command1 = "/" + command;
++        ServerGamePacketListenerImpl.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + command1);
 +
-+        PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(getCraftPlayer(), command, new LazyPlayerSet(server));
++        PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(this.getCraftPlayer(), command1, new LazyPlayerSet(this.server));
 +        this.cserver.getPluginManager().callEvent(event);
 +
 +        if (event.isCancelled()) {
 +            return;
 +        }
-+        s = event.getMessage().substring(1);
++        command = event.getMessage().substring(1);
 +        // CraftBukkit end
-         ParseResults<CommandListenerWrapper> parseresults = this.parseCommand(s);
+         ParseResults<CommandSourceStack> parseresults = this.parseCommand(command);
  
          if (this.server.enforceSecureProfile() && SignableCommand.hasSignableArguments(parseresults)) {
-@@ -1431,19 +1911,37 @@
+@@ -1431,19 +1907,37 @@
  
          if (!optional.isEmpty()) {
-             this.tryHandleChat(serverboundchatcommandsignedpacket.command(), () -> {
+             this.tryHandleChat(packet.command(), () -> {
 +                // CraftBukkit start - SPIGOT-7346: Prevent disconnected players from executing commands
-+                if (player.hasDisconnected()) {
++                if (this.player.hasDisconnected()) {
 +                    return;
 +                }
 +                // CraftBukkit end
-                 this.performSignedChatCommand(serverboundchatcommandsignedpacket, (LastSeenMessages) optional.get());
+                 this.performSignedChatCommand(packet, (LastSeenMessages) optional.get());
                  this.detectRateSpam();
 -            });
 +            }, true); // CraftBukkit - sync commands
          }
      }
  
-     private void performSignedChatCommand(ServerboundChatCommandSignedPacket serverboundchatcommandsignedpacket, LastSeenMessages lastseenmessages) {
--        ParseResults<CommandListenerWrapper> parseresults = this.parseCommand(serverboundchatcommandsignedpacket.command());
+     private void performSignedChatCommand(ServerboundChatCommandSignedPacket packet, LastSeenMessages lastSeenMessages) {
+-        ParseResults<CommandSourceStack> parseresults = this.parseCommand(packet.command());
 +        // CraftBukkit start
-+        String command = "/" + serverboundchatcommandsignedpacket.command();
-+        PlayerConnection.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + command);
-+
-+        PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(getCraftPlayer(), command, new LazyPlayerSet(server));
++        String command = "/" + packet.command();
++        ServerGamePacketListenerImpl.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + command);
+ 
++        PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(this.getCraftPlayer(), command, new LazyPlayerSet(this.server));
 +        this.cserver.getPluginManager().callEvent(event);
 +
 +        if (event.isCancelled()) {
@@ -862,44 +903,45 @@
 +        }
 +        command = event.getMessage().substring(1);
 +
-+        ParseResults<CommandListenerWrapper> parseresults = this.parseCommand(command);
++        ParseResults<CommandSourceStack> parseresults = this.parseCommand(command);
 +        // CraftBukkit end
- 
++
          Map map;
  
          try {
--            map = this.collectSignedArguments(serverboundchatcommandsignedpacket, SignableCommand.of(parseresults), lastseenmessages);
-+            map = (serverboundchatcommandsignedpacket.command().equals(command)) ? this.collectSignedArguments(serverboundchatcommandsignedpacket, SignableCommand.of(parseresults), lastseenmessages) : Collections.emptyMap(); // CraftBukkit
-         } catch (SignedMessageChain.a signedmessagechain_a) {
+-            map = this.collectSignedArguments(packet, SignableCommand.of(parseresults), lastSeenMessages);
++            map = (packet.command().equals(command)) ? this.collectSignedArguments(packet, SignableCommand.of(parseresults), lastSeenMessages) : Collections.emptyMap(); // CraftBukkit
+         } catch (SignedMessageChain.DecodeException signedmessagechain_a) {
              this.handleMessageDecodeFailure(signedmessagechain_a);
              return;
-@@ -1451,10 +1949,10 @@
+@@ -1451,10 +1945,10 @@
  
-         CommandSigningContext.a commandsigningcontext_a = new CommandSigningContext.a(map);
+         CommandSigningContext.SignedArguments commandsigningcontext_a = new CommandSigningContext.SignedArguments(map);
  
--        parseresults = CommandDispatcher.mapSource(parseresults, (commandlistenerwrapper) -> {
-+        parseresults = CommandDispatcher.<CommandListenerWrapper>mapSource(parseresults, (commandlistenerwrapper) -> { // CraftBukkit - decompile error
+-        parseresults = Commands.mapSource(parseresults, (commandlistenerwrapper) -> {
++        parseresults = Commands.<CommandSourceStack>mapSource(parseresults, (commandlistenerwrapper) -> { // CraftBukkit - decompile error
              return commandlistenerwrapper.withSigningContext(commandsigningcontext_a, this.chatMessageChain);
          });
--        this.server.getCommands().performCommand(parseresults, serverboundchatcommandsignedpacket.command());
+-        this.server.getCommands().performCommand(parseresults, packet.command());
 +        this.server.getCommands().performCommand(parseresults, command); // CraftBukkit
      }
  
-     private void handleMessageDecodeFailure(SignedMessageChain.a signedmessagechain_a) {
-@@ -1530,14 +2028,20 @@
-         return com_mojang_brigadier_commanddispatcher.parse(s, this.player.createCommandSourceStack());
+     private void handleMessageDecodeFailure(SignedMessageChain.DecodeException exception) {
+@@ -1530,14 +2024,20 @@
+         return com_mojang_brigadier_commanddispatcher.parse(command, this.player.createCommandSourceStack());
      }
  
--    private void tryHandleChat(String s, Runnable runnable) {
+-    private void tryHandleChat(String message, Runnable callback) {
+-        if (ServerGamePacketListenerImpl.isChatMessageIllegal(message)) {
 +    private void tryHandleChat(String s, Runnable runnable, boolean sync) { // CraftBukkit
-         if (isChatMessageIllegal(s)) {
-             this.disconnect((IChatBaseComponent) IChatBaseComponent.translatable("multiplayer.disconnect.illegal_characters"));
--        } else if (this.player.getChatVisibility() == EnumChatVisibility.HIDDEN) {
-+        } else if (this.player.isRemoved() || this.player.getChatVisibility() == EnumChatVisibility.HIDDEN) { // CraftBukkit - dead men tell no tales
-             this.send(new ClientboundSystemChatPacket(IChatBaseComponent.translatable("chat.disabled.options").withStyle(EnumChatFormat.RED), false));
++        if (ServerGamePacketListenerImpl.isChatMessageIllegal(s)) {
+             this.disconnect((Component) Component.translatable("multiplayer.disconnect.illegal_characters"));
+-        } else if (this.player.getChatVisibility() == ChatVisiblity.HIDDEN) {
++        } else if (this.player.isRemoved() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) { // CraftBukkit - dead men tell no tales
+             this.send(new ClientboundSystemChatPacket(Component.translatable("chat.disabled.options").withStyle(ChatFormatting.RED), false));
          } else {
              this.player.resetLastActionTime();
--            this.server.execute(runnable);
+-            this.server.execute(callback);
 +            // CraftBukkit start
 +            if (sync) {
 +                this.server.execute(runnable);
@@ -910,24 +952,26 @@
          }
      }
  
-@@ -1566,6 +2070,116 @@
-         return false;
-     }
+@@ -1564,8 +2064,118 @@
+         }
  
+         return false;
++    }
++
 +    // CraftBukkit start - add method
 +    public void chat(String s, PlayerChatMessage original, boolean async) {
-+        if (s.isEmpty() || this.player.getChatVisibility() == EnumChatVisibility.HIDDEN) {
++        if (s.isEmpty() || this.player.getChatVisibility() == ChatVisiblity.HIDDEN) {
 +            return;
 +        }
 +        OutgoingChatMessage outgoing = OutgoingChatMessage.create(original);
 +
 +        if (!async && s.startsWith("/")) {
 +            this.handleCommand(s);
-+        } else if (this.player.getChatVisibility() == EnumChatVisibility.SYSTEM) {
++        } else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) {
 +            // Do nothing, this is coming from a plugin
 +        } else {
 +            Player player = this.getCraftPlayer();
-+            AsyncPlayerChatEvent event = new AsyncPlayerChatEvent(async, player, s, new LazyPlayerSet(server));
++            AsyncPlayerChatEvent event = new AsyncPlayerChatEvent(async, player, s, new LazyPlayerSet(this.server));
 +            String originalFormat = event.getFormat(), originalMessage = event.getMessage();
 +            this.cserver.getPluginManager().callEvent(event);
 +
@@ -947,24 +991,24 @@
 +                        String message = String.format(queueEvent.getFormat(), queueEvent.getPlayer().getDisplayName(), queueEvent.getMessage());
 +                        if (((LazyPlayerSet) queueEvent.getRecipients()).isLazy()) {
 +                            if (originalFormat.equals(queueEvent.getFormat()) && originalMessage.equals(queueEvent.getMessage()) && queueEvent.getPlayer().getName().equalsIgnoreCase(queueEvent.getPlayer().getDisplayName())) {
-+                                PlayerConnection.this.server.getPlayerList().broadcastChatMessage(original, PlayerConnection.this.player, ChatMessageType.bind(ChatMessageType.CHAT, (Entity) PlayerConnection.this.player));
++                                ServerGamePacketListenerImpl.this.server.getPlayerList().broadcastChatMessage(original, ServerGamePacketListenerImpl.this.player, ChatType.bind(ChatType.CHAT, (Entity) ServerGamePacketListenerImpl.this.player));
 +                                return null;
 +                            }
 +
-+                            for (EntityPlayer recipient : server.getPlayerList().players) {
-+                                recipient.getBukkitEntity().sendMessage(PlayerConnection.this.player.getUUID(), message);
++                            for (ServerPlayer recipient : ServerGamePacketListenerImpl.this.server.getPlayerList().players) {
++                                recipient.getBukkitEntity().sendMessage(ServerGamePacketListenerImpl.this.player.getUUID(), message);
 +                            }
 +                        } else {
 +                            for (Player player : queueEvent.getRecipients()) {
-+                                player.sendMessage(PlayerConnection.this.player.getUUID(), message);
++                                player.sendMessage(ServerGamePacketListenerImpl.this.player.getUUID(), message);
 +                            }
 +                        }
-+                        PlayerConnection.this.server.console.sendMessage(message);
++                        ServerGamePacketListenerImpl.this.server.console.sendMessage(message);
 +
 +                        return null;
 +                    }};
 +                if (async) {
-+                    server.processQueue.add(waitable);
++                    this.server.processQueue.add(waitable);
 +                } else {
 +                    waitable.run();
 +                }
@@ -983,29 +1027,29 @@
 +                s = String.format(event.getFormat(), event.getPlayer().getDisplayName(), event.getMessage());
 +                if (((LazyPlayerSet) event.getRecipients()).isLazy()) {
 +                    if (originalFormat.equals(event.getFormat()) && originalMessage.equals(event.getMessage()) && event.getPlayer().getName().equalsIgnoreCase(event.getPlayer().getDisplayName())) {
-+                        PlayerConnection.this.server.getPlayerList().broadcastChatMessage(original, PlayerConnection.this.player, ChatMessageType.bind(ChatMessageType.CHAT, (Entity) PlayerConnection.this.player));
++                        ServerGamePacketListenerImpl.this.server.getPlayerList().broadcastChatMessage(original, ServerGamePacketListenerImpl.this.player, ChatType.bind(ChatType.CHAT, (Entity) ServerGamePacketListenerImpl.this.player));
 +                        return;
 +                    }
 +
-+                    for (EntityPlayer recipient : server.getPlayerList().players) {
-+                        recipient.getBukkitEntity().sendMessage(PlayerConnection.this.player.getUUID(), s);
++                    for (ServerPlayer recipient : this.server.getPlayerList().players) {
++                        recipient.getBukkitEntity().sendMessage(ServerGamePacketListenerImpl.this.player.getUUID(), s);
 +                    }
 +                } else {
 +                    for (Player recipient : event.getRecipients()) {
-+                        recipient.sendMessage(PlayerConnection.this.player.getUUID(), s);
++                        recipient.sendMessage(ServerGamePacketListenerImpl.this.player.getUUID(), s);
 +                    }
 +                }
-+                server.console.sendMessage(s);
++                this.server.console.sendMessage(s);
 +            }
 +        }
-+    }
-+
+     }
+ 
 +    private void handleCommand(String s) {
 +        this.LOGGER.info(this.player.getScoreboardName() + " issued server command: " + s);
 +
 +        CraftPlayer player = this.getCraftPlayer();
 +
-+        PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(player, s, new LazyPlayerSet(server));
++        PlayerCommandPreprocessEvent event = new PlayerCommandPreprocessEvent(player, s, new LazyPlayerSet(this.server));
 +        this.cserver.getPluginManager().callEvent(event);
 +
 +        if (event.isCancelled()) {
@@ -1018,36 +1062,36 @@
 +            }
 +        } catch (org.bukkit.command.CommandException ex) {
 +            player.sendMessage(org.bukkit.ChatColor.RED + "An internal error occurred while attempting to perform this command");
-+            java.util.logging.Logger.getLogger(PlayerConnection.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
++            java.util.logging.Logger.getLogger(ServerGamePacketListenerImpl.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
 +            return;
 +        }
 +    }
 +    // CraftBukkit end
 +
-     private PlayerChatMessage getSignedMessage(PacketPlayInChat packetplayinchat, LastSeenMessages lastseenmessages) throws SignedMessageChain.a {
-         SignedMessageBody signedmessagebody = new SignedMessageBody(packetplayinchat.message(), packetplayinchat.timeStamp(), packetplayinchat.salt(), lastseenmessages);
+     private PlayerChatMessage getSignedMessage(ServerboundChatPacket packet, LastSeenMessages lastSeenMessages) throws SignedMessageChain.DecodeException {
+         SignedMessageBody signedmessagebody = new SignedMessageBody(packet.message(), packet.timeStamp(), packet.salt(), lastSeenMessages);
  
-@@ -1573,13 +2187,33 @@
+@@ -1573,13 +2183,33 @@
      }
  
-     private void broadcastChatMessage(PlayerChatMessage playerchatmessage) {
--        this.server.getPlayerList().broadcastChatMessage(playerchatmessage, this.player, ChatMessageType.bind(ChatMessageType.CHAT, (Entity) this.player));
+     private void broadcastChatMessage(PlayerChatMessage message) {
+-        this.server.getPlayerList().broadcastChatMessage(message, this.player, ChatType.bind(ChatType.CHAT, (Entity) this.player));
 +        // CraftBukkit start
-+        String s = playerchatmessage.signedContent();
++        String s = message.signedContent();
 +        if (s.isEmpty()) {
-+            LOGGER.warn(this.player.getScoreboardName() + " tried to send an empty message");
-+        } else if (getCraftPlayer().isConversing()) {
++            ServerGamePacketListenerImpl.LOGGER.warn(this.player.getScoreboardName() + " tried to send an empty message");
++        } else if (this.getCraftPlayer().isConversing()) {
 +            final String conversationInput = s;
 +            this.server.processQueue.add(new Runnable() {
 +                @Override
 +                public void run() {
-+                    getCraftPlayer().acceptConversationInput(conversationInput);
++                    ServerGamePacketListenerImpl.this.getCraftPlayer().acceptConversationInput(conversationInput);
 +                }
 +            });
-+        } else if (this.player.getChatVisibility() == EnumChatVisibility.SYSTEM) { // Re-add "Command Only" flag check
-+            this.send(new ClientboundSystemChatPacket(IChatBaseComponent.translatable("chat.cannotSend").withStyle(EnumChatFormat.RED), false));
++        } else if (this.player.getChatVisibility() == ChatVisiblity.SYSTEM) { // Re-add "Command Only" flag check
++            this.send(new ClientboundSystemChatPacket(Component.translatable("chat.cannotSend").withStyle(ChatFormatting.RED), false));
 +        } else {
-+            this.chat(s, playerchatmessage, true);
++            this.chat(s, message, true);
 +        }
 +        // this.server.getPlayerList().broadcastChatMessage(playerchatmessage, this.player, ChatMessageType.bind(ChatMessageType.CHAT, (Entity) this.player));
 +        // CraftBukkit end
@@ -1061,13 +1105,13 @@
 +        // this.chatSpamThrottler.increment();
 +        if (!this.chatSpamThrottler.isIncrementAndUnderThreshold() && !this.server.getPlayerList().isOp(this.player.getGameProfile()) && !this.server.isSingleplayerOwner(this.player.getGameProfile())) {
 +            // CraftBukkit end
-             this.disconnect((IChatBaseComponent) IChatBaseComponent.translatable("disconnect.spam"));
+             this.disconnect((Component) Component.translatable("disconnect.spam"));
          }
  
-@@ -1601,7 +2235,33 @@
+@@ -1601,7 +2231,33 @@
      @Override
-     public void handleAnimate(PacketPlayInArmAnimation packetplayinarmanimation) {
-         PlayerConnectionUtils.ensureRunningOnSameThread(packetplayinarmanimation, this, this.player.serverLevel());
+     public void handleAnimate(ServerboundSwingPacket packet) {
+         PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
 +        if (this.player.isImmobile()) return; // CraftBukkit
          this.player.resetLastActionTime();
 +        // CraftBukkit start - Raytrace to look for 'rogue armswings'
@@ -1078,36 +1122,36 @@
 +        double d2 = this.player.getZ();
 +        Location origin = new Location(this.player.level().getWorld(), d0, d1, d2, f2, f1);
 +
-+        double d3 = Math.max(player.blockInteractionRange(), player.entityInteractionRange());
++        double d3 = Math.max(this.player.blockInteractionRange(), this.player.entityInteractionRange());
 +        // SPIGOT-5607: Only call interact event if no block or entity is being clicked. Use bukkit ray trace method, because it handles blocks and entities at the same time
 +        // SPIGOT-7429: Make sure to call PlayerInteractEvent for spectators and non-pickable entities
 +        org.bukkit.util.RayTraceResult result = this.player.level().getWorld().rayTrace(origin, origin.getDirection(), d3, org.bukkit.FluidCollisionMode.NEVER, false, 0.1, entity -> {
 +            Entity handle = ((CraftEntity) entity).getHandle();
-+            return entity != this.player.getBukkitEntity() && this.player.getBukkitEntity().canSee(entity) && !handle.isSpectator() && handle.isPickable() && !handle.isPassengerOfSameVehicle(player);
++            return entity != this.player.getBukkitEntity() && this.player.getBukkitEntity().canSee(entity) && !handle.isSpectator() && handle.isPickable() && !handle.isPassengerOfSameVehicle(this.player);
 +        });
 +        if (result == null) {
-+            CraftEventFactory.callPlayerInteractEvent(this.player, Action.LEFT_CLICK_AIR, this.player.getInventory().getSelected(), EnumHand.MAIN_HAND);
++            CraftEventFactory.callPlayerInteractEvent(this.player, Action.LEFT_CLICK_AIR, this.player.getInventory().getSelected(), InteractionHand.MAIN_HAND);
 +        }
 +
 +        // Arm swing animation
-+        PlayerAnimationEvent event = new PlayerAnimationEvent(this.getCraftPlayer(), (packetplayinarmanimation.getHand() == EnumHand.MAIN_HAND) ? PlayerAnimationType.ARM_SWING : PlayerAnimationType.OFF_ARM_SWING);
++        PlayerAnimationEvent event = new PlayerAnimationEvent(this.getCraftPlayer(), (packet.getHand() == InteractionHand.MAIN_HAND) ? PlayerAnimationType.ARM_SWING : PlayerAnimationType.OFF_ARM_SWING);
 +        this.cserver.getPluginManager().callEvent(event);
 +
 +        if (event.isCancelled()) return;
 +        // CraftBukkit end
-         this.player.swing(packetplayinarmanimation.getHand());
+         this.player.swing(packet.getHand());
      }
  
-@@ -1609,6 +2269,29 @@
-     public void handlePlayerCommand(PacketPlayInEntityAction packetplayinentityaction) {
-         PlayerConnectionUtils.ensureRunningOnSameThread(packetplayinentityaction, this, this.player.serverLevel());
+@@ -1609,6 +2265,29 @@
+     public void handlePlayerCommand(ServerboundPlayerCommandPacket packet) {
+         PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
          if (this.player.hasClientLoaded()) {
 +            // CraftBukkit start
 +            if (this.player.isRemoved()) return;
-+            switch (packetplayinentityaction.getAction()) {
++            switch (packet.getAction()) {
 +                case PRESS_SHIFT_KEY:
 +                case RELEASE_SHIFT_KEY:
-+                    PlayerToggleSneakEvent event = new PlayerToggleSneakEvent(this.getCraftPlayer(), packetplayinentityaction.getAction() == PacketPlayInEntityAction.EnumPlayerAction.PRESS_SHIFT_KEY);
++                    PlayerToggleSneakEvent event = new PlayerToggleSneakEvent(this.getCraftPlayer(), packet.getAction() == ServerboundPlayerCommandPacket.Action.PRESS_SHIFT_KEY);
 +                    this.cserver.getPluginManager().callEvent(event);
 +
 +                    if (event.isCancelled()) {
@@ -1116,7 +1160,7 @@
 +                    break;
 +                case START_SPRINTING:
 +                case STOP_SPRINTING:
-+                    PlayerToggleSprintEvent e2 = new PlayerToggleSprintEvent(this.getCraftPlayer(), packetplayinentityaction.getAction() == PacketPlayInEntityAction.EnumPlayerAction.START_SPRINTING);
++                    PlayerToggleSprintEvent e2 = new PlayerToggleSprintEvent(this.getCraftPlayer(), packet.getAction() == ServerboundPlayerCommandPacket.Action.START_SPRINTING);
 +                    this.cserver.getPluginManager().callEvent(e2);
 +
 +                    if (e2.isCancelled()) {
@@ -1127,63 +1171,65 @@
 +            // CraftBukkit end
              this.player.resetLastActionTime();
              Entity entity;
-             IJumpable ijumpable;
-@@ -1691,6 +2374,12 @@
+             PlayerRideableJumping ijumpable;
+@@ -1691,6 +2370,12 @@
      }
  
-     public void sendPlayerChatMessage(PlayerChatMessage playerchatmessage, ChatMessageType.a chatmessagetype_a) {
+     public void sendPlayerChatMessage(PlayerChatMessage message, ChatType.Bound params) {
 +        // CraftBukkit start - SPIGOT-7262: if hidden we have to send as disguised message. Query whether we should send at all (but changing this may not be expected).
-+        if (!getCraftPlayer().canSeePlayer(playerchatmessage.link().sender())) {
-+            sendDisguisedChatMessage(playerchatmessage.decoratedContent(), chatmessagetype_a);
++        if (!this.getCraftPlayer().canSeePlayer(message.link().sender())) {
++            this.sendDisguisedChatMessage(message.decoratedContent(), params);
 +            return;
 +        }
 +        // CraftBukkit end
-         this.send(new ClientboundPlayerChatPacket(playerchatmessage.link().sender(), playerchatmessage.link().index(), playerchatmessage.signature(), playerchatmessage.signedBody().pack(this.messageSignatureCache), playerchatmessage.unsignedContent(), playerchatmessage.filterMask(), chatmessagetype_a));
-         this.addPendingMessage(playerchatmessage);
+         this.send(new ClientboundPlayerChatPacket(message.link().sender(), message.link().index(), message.signature(), message.signedBody().pack(this.messageSignatureCache), message.unsignedContent(), message.filterMask(), params));
+         this.addPendingMessage(message);
      }
-@@ -1718,6 +2407,7 @@
+@@ -1718,6 +2403,7 @@
      @Override
-     public void handleInteract(PacketPlayInUseEntity packetplayinuseentity) {
-         PlayerConnectionUtils.ensureRunningOnSameThread(packetplayinuseentity, this, this.player.serverLevel());
+     public void handleInteract(ServerboundInteractPacket packet) {
+         PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
 +        if (this.player.isImmobile()) return; // CraftBukkit
          if (this.player.hasClientLoaded()) {
-             final WorldServer worldserver = this.player.serverLevel();
-             final Entity entity = packetplayinuseentity.getTarget(worldserver);
-@@ -1733,13 +2423,51 @@
+             final ServerLevel worldserver = this.player.serverLevel();
+             final Entity entity = packet.getTarget(worldserver);
+@@ -1733,20 +2419,58 @@
  
                  if (this.player.canInteractWithEntity(axisalignedbb, 3.0D)) {
-                     packetplayinuseentity.dispatch(new PacketPlayInUseEntity.c() {
--                        private void performInteraction(EnumHand enumhand, PlayerConnection.a playerconnection_a) {
-+                        private void performInteraction(EnumHand enumhand, PlayerConnection.a playerconnection_a, PlayerInteractEntityEvent event) { // CraftBukkit
-                             ItemStack itemstack = PlayerConnection.this.player.getItemInHand(enumhand);
+                     packet.dispatch(new ServerboundInteractPacket.Handler() {
+-                        private void performInteraction(InteractionHand hand, ServerGamePacketListenerImpl.EntityInteraction action) {
+-                            ItemStack itemstack = ServerGamePacketListenerImpl.this.player.getItemInHand(hand);
++                        private void performInteraction(InteractionHand enumhand, ServerGamePacketListenerImpl.EntityInteraction playerconnection_a, PlayerInteractEntityEvent event) { // CraftBukkit
++                            ItemStack itemstack = ServerGamePacketListenerImpl.this.player.getItemInHand(enumhand);
  
                              if (itemstack.isItemEnabled(worldserver.enabledFeatures())) {
                                  ItemStack itemstack1 = itemstack.copy();
+-                                InteractionResult enuminteractionresult = action.run(ServerGamePacketListenerImpl.this.player, entity, hand);
 +                                // CraftBukkit start
-+                                ItemStack itemInHand = PlayerConnection.this.player.getItemInHand(enumhand);
-+                                boolean triggerLeashUpdate = itemInHand != null && itemInHand.getItem() == Items.LEAD && entity instanceof EntityInsentient;
-+                                Item origItem = player.getInventory().getSelected() == null ? null : player.getInventory().getSelected().getItem();
-+
-+                                cserver.getPluginManager().callEvent(event);
++                                ItemStack itemInHand = ServerGamePacketListenerImpl.this.player.getItemInHand(enumhand);
++                                boolean triggerLeashUpdate = itemInHand != null && itemInHand.getItem() == Items.LEAD && entity instanceof Mob;
++                                Item origItem = ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null ? null : ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem();
+ 
++                                ServerGamePacketListenerImpl.this.cserver.getPluginManager().callEvent(event);
 +
 +                                // Entity in bucket - SPIGOT-4048 and SPIGOT-6859a
-+                                if ((entity instanceof Bucketable && entity instanceof EntityLiving && origItem != null && origItem.asItem() == Items.WATER_BUCKET) && (event.isCancelled() || player.getInventory().getSelected() == null || player.getInventory().getSelected().getItem() != origItem)) {
-+                                    entity.getBukkitEntity().update(player);
-+                                    player.containerMenu.sendAllDataToRemote();
++                                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)) {
++                                    entity.getBukkitEntity().update(ServerGamePacketListenerImpl.this.player);
++                                    ServerGamePacketListenerImpl.this.player.containerMenu.sendAllDataToRemote();
 +                                }
 +
-+                                if (triggerLeashUpdate && (event.isCancelled() || player.getInventory().getSelected() == null || player.getInventory().getSelected().getItem() != origItem)) {
++                                if (triggerLeashUpdate && (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem)) {
 +                                    // Refresh the current leash state
-+                                    send(new PacketPlayOutAttachEntity(entity, ((EntityInsentient) entity).getLeashHolder()));
++                                    ServerGamePacketListenerImpl.this.send(new ClientboundSetEntityLinkPacket(entity, ((Mob) entity).getLeashHolder()));
 +                                }
 +
-+                                if (event.isCancelled() || player.getInventory().getSelected() == null || player.getInventory().getSelected().getItem() != origItem) {
++                                if (event.isCancelled() || ServerGamePacketListenerImpl.this.player.getInventory().getSelected() == null || ServerGamePacketListenerImpl.this.player.getInventory().getSelected().getItem() != origItem) {
 +                                    // Refresh the current entity metadata
-+                                    entity.refreshEntityData(player);
++                                    entity.refreshEntityData(ServerGamePacketListenerImpl.this.player);
 +                                    // SPIGOT-7136 - Allays
 +                                    if (entity instanceof Allay) {
-+                                        send(new PacketPlayOutEntityEquipment(entity.getId(), Arrays.stream(EnumItemSlot.values()).map((slot) -> Pair.of(slot, ((EntityLiving) entity).getItemBySlot(slot).copy())).collect(Collectors.toList())));
-+                                        player.containerMenu.sendAllDataToRemote();
++                                        ServerGamePacketListenerImpl.this.send(new ClientboundSetEquipmentPacket(entity.getId(), Arrays.stream(net.minecraft.world.entity.EquipmentSlot.values()).map((slot) -> Pair.of(slot, ((LivingEntity) entity).getItemBySlot(slot).copy())).collect(Collectors.toList())));
++                                        ServerGamePacketListenerImpl.this.player.containerMenu.sendAllDataToRemote();
 +                                    }
 +                                }
 +
@@ -1191,63 +1237,71 @@
 +                                    return;
 +                                }
 +                                // CraftBukkit end
-                                 EnumInteractionResult enuminteractionresult = playerconnection_a.run(PlayerConnection.this.player, entity, enumhand);
- 
++                                InteractionResult enuminteractionresult = playerconnection_a.run(ServerGamePacketListenerImpl.this.player, entity, enumhand);
++
 +                                // CraftBukkit start
 +                                if (!itemInHand.isEmpty() && itemInHand.getCount() <= -1) {
-+                                    player.containerMenu.sendAllDataToRemote();
++                                    ServerGamePacketListenerImpl.this.player.containerMenu.sendAllDataToRemote();
 +                                }
 +                                // CraftBukkit end
 +
-                                 if (enuminteractionresult instanceof EnumInteractionResult.d) {
-                                     EnumInteractionResult.d enuminteractionresult_d = (EnumInteractionResult.d) enuminteractionresult;
+                                 if (enuminteractionresult instanceof InteractionResult.Success) {
+                                     InteractionResult.Success enuminteractionresult_d = (InteractionResult.Success) enuminteractionresult;
                                      ItemStack itemstack2 = enuminteractionresult_d.wasItemInteraction() ? itemstack1 : ItemStack.EMPTY;
-@@ -1755,19 +2483,20 @@
+ 
+                                     CriteriaTriggers.PLAYER_INTERACTED_WITH_ENTITY.trigger(ServerGamePacketListenerImpl.this.player, itemstack2, entity);
+                                     if (enuminteractionresult_d.swingSource() == InteractionResult.SwingSource.SERVER) {
+-                                        ServerGamePacketListenerImpl.this.player.swing(hand, true);
++                                        ServerGamePacketListenerImpl.this.player.swing(enumhand, true);
+                                     }
+                                 }
+ 
+@@ -1755,19 +2479,20 @@
  
                          @Override
-                         public void onInteraction(EnumHand enumhand) {
--                            this.performInteraction(enumhand, EntityHuman::interactOn);
-+                            this.performInteraction(enumhand, EntityHuman::interactOn, new PlayerInteractEntityEvent(getCraftPlayer(), entity.getBukkitEntity(), (enumhand == EnumHand.OFF_HAND) ? EquipmentSlot.OFF_HAND : EquipmentSlot.HAND)); // CraftBukkit
+                         public void onInteraction(InteractionHand hand) {
+-                            this.performInteraction(hand, Player::interactOn);
++                            this.performInteraction(hand, net.minecraft.world.entity.player.Player::interactOn, new PlayerInteractEntityEvent(ServerGamePacketListenerImpl.this.getCraftPlayer(), entity.getBukkitEntity(), (hand == InteractionHand.OFF_HAND) ? EquipmentSlot.OFF_HAND : EquipmentSlot.HAND)); // CraftBukkit
                          }
  
                          @Override
-                         public void onInteraction(EnumHand enumhand, Vec3D vec3d) {
-                             this.performInteraction(enumhand, (entityplayer, entity1, enumhand1) -> {
-                                 return entity1.interactAt(entityplayer, vec3d, enumhand1);
+                         public void onInteraction(InteractionHand hand, Vec3 pos) {
+                             this.performInteraction(hand, (entityplayer, entity1, enumhand1) -> {
+                                 return entity1.interactAt(entityplayer, pos, enumhand1);
 -                            });
-+                            }, new PlayerInteractAtEntityEvent(getCraftPlayer(), entity.getBukkitEntity(), new org.bukkit.util.Vector(vec3d.x, vec3d.y, vec3d.z), (enumhand == EnumHand.OFF_HAND) ? EquipmentSlot.OFF_HAND : EquipmentSlot.HAND)); // CraftBukkit
++                            }, new PlayerInteractAtEntityEvent(ServerGamePacketListenerImpl.this.getCraftPlayer(), entity.getBukkitEntity(), new org.bukkit.util.Vector(pos.x, pos.y, pos.z), (hand == InteractionHand.OFF_HAND) ? EquipmentSlot.OFF_HAND : EquipmentSlot.HAND)); // CraftBukkit
                          }
  
                          @Override
                          public void onAttack() {
--                            if (!(entity instanceof EntityItem) && !(entity instanceof EntityExperienceOrb) && entity != PlayerConnection.this.player) {
+-                            if (!(entity instanceof ItemEntity) && !(entity instanceof ExperienceOrb) && entity != ServerGamePacketListenerImpl.this.player) {
 +                            // CraftBukkit
-+                            if (!(entity instanceof EntityItem) && !(entity instanceof EntityExperienceOrb) && (entity != PlayerConnection.this.player || player.isSpectator())) {
++                            if (!(entity instanceof ItemEntity) && !(entity instanceof ExperienceOrb) && (entity != ServerGamePacketListenerImpl.this.player || ServerGamePacketListenerImpl.this.player.isSpectator())) {
                                  label23:
                                  {
-                                     if (entity instanceof EntityArrow) {
-@@ -1785,6 +2514,11 @@
+                                     if (entity instanceof AbstractArrow) {
+@@ -1785,6 +2510,11 @@
                                      }
  
-                                     PlayerConnection.this.player.attack(entity);
+                                     ServerGamePacketListenerImpl.this.player.attack(entity);
 +                                    // CraftBukkit start
 +                                    if (!itemstack.isEmpty() && itemstack.getCount() <= -1) {
-+                                        player.containerMenu.sendAllDataToRemote();
++                                        ServerGamePacketListenerImpl.this.player.containerMenu.sendAllDataToRemote();
 +                                    }
 +                                    // CraftBukkit end
                                      return;
                                  }
                              }
-@@ -1809,7 +2543,7 @@
+@@ -1809,7 +2539,7 @@
              case PERFORM_RESPAWN:
                  if (this.player.wonGame) {
                      this.player.wonGame = false;
 -                    this.player = this.server.getPlayerList().respawn(this.player, true, Entity.RemovalReason.CHANGED_DIMENSION);
 +                    this.player = this.server.getPlayerList().respawn(this.player, true, Entity.RemovalReason.CHANGED_DIMENSION, RespawnReason.END_PORTAL); // CraftBukkit
                      this.resetPosition();
-                     CriterionTriggers.CHANGED_DIMENSION.trigger(this.player, World.END, World.OVERWORLD);
+                     CriteriaTriggers.CHANGED_DIMENSION.trigger(this.player, Level.END, Level.OVERWORLD);
                  } else {
-@@ -1817,11 +2551,11 @@
+@@ -1817,11 +2547,11 @@
                          return;
                      }
  
@@ -1255,16 +1309,16 @@
 +                    this.player = this.server.getPlayerList().respawn(this.player, false, Entity.RemovalReason.KILLED, RespawnReason.DEATH); // CraftBukkit
                      this.resetPosition();
                      if (this.server.isHardcore()) {
-                         this.player.setGameMode(EnumGamemode.SPECTATOR);
--                        ((GameRules.GameRuleBoolean) this.player.serverLevel().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.server);
-+                        ((GameRules.GameRuleBoolean) this.player.serverLevel().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.player.serverLevel()); // CraftBukkit - per-world
+                         this.player.setGameMode(GameType.SPECTATOR);
+-                        ((GameRules.BooleanValue) this.player.serverLevel().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.server);
++                        ((GameRules.BooleanValue) this.player.serverLevel().getGameRules().getRule(GameRules.RULE_SPECTATORSGENERATECHUNKS)).set(false, this.player.serverLevel()); // CraftBukkit - per-world
                      }
                  }
                  break;
-@@ -1834,15 +2568,21 @@
+@@ -1834,15 +2564,21 @@
      @Override
-     public void handleContainerClose(PacketPlayInCloseWindow packetplayinclosewindow) {
-         PlayerConnectionUtils.ensureRunningOnSameThread(packetplayinclosewindow, this, this.player.serverLevel());
+     public void handleContainerClose(ServerboundContainerClosePacket packet) {
+         PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
 +
 +        if (this.player.isImmobile()) return; // CraftBukkit
 +        CraftEventFactory.handleInventoryCloseEvent(this.player); // CraftBukkit
@@ -1273,30 +1327,30 @@
      }
  
      @Override
-     public void handleContainerClick(PacketPlayInWindowClick packetplayinwindowclick) {
-         PlayerConnectionUtils.ensureRunningOnSameThread(packetplayinwindowclick, this, this.player.serverLevel());
+     public void handleContainerClick(ServerboundContainerClickPacket packet) {
+         PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
 +        if (this.player.isImmobile()) return; // CraftBukkit
          this.player.resetLastActionTime();
--        if (this.player.containerMenu.containerId == packetplayinwindowclick.getContainerId()) {
+-        if (this.player.containerMenu.containerId == packet.getContainerId()) {
 -            if (this.player.isSpectator()) {
-+        if (this.player.containerMenu.containerId == packetplayinwindowclick.getContainerId() && this.player.containerMenu.stillValid(this.player)) { // CraftBukkit
++        if (this.player.containerMenu.containerId == packet.getContainerId() && this.player.containerMenu.stillValid(this.player)) { // CraftBukkit
 +            boolean cancelled = this.player.isSpectator(); // CraftBukkit - see below if
 +            if (false/*this.player.isSpectator()*/) { // CraftBukkit
                  this.player.containerMenu.sendAllDataToRemote();
              } else if (!this.player.containerMenu.stillValid(this.player)) {
-                 PlayerConnection.LOGGER.debug("Player {} interacted with invalid menu {}", this.player, this.player.containerMenu);
-@@ -1855,7 +2595,284 @@
-                     boolean flag = packetplayinwindowclick.getStateId() != this.player.containerMenu.getStateId();
+                 ServerGamePacketListenerImpl.LOGGER.debug("Player {} interacted with invalid menu {}", this.player, this.player.containerMenu);
+@@ -1855,7 +2591,284 @@
+                     boolean flag = packet.getStateId() != this.player.containerMenu.getStateId();
  
                      this.player.containerMenu.suppressRemoteUpdates();
--                    this.player.containerMenu.clicked(i, packetplayinwindowclick.getButtonNum(), packetplayinwindowclick.getClickType(), this.player);
+-                    this.player.containerMenu.clicked(i, packet.getButtonNum(), packet.getClickType(), this.player);
 +                    // CraftBukkit start - Call InventoryClickEvent
-+                    if (packetplayinwindowclick.getSlotNum() < -1 && packetplayinwindowclick.getSlotNum() != -999) {
++                    if (packet.getSlotNum() < -1 && packet.getSlotNum() != -999) {
 +                        return;
 +                    }
 +
 +                    InventoryView inventory = this.player.containerMenu.getBukkitView();
-+                    SlotType type = inventory.getSlotType(packetplayinwindowclick.getSlotNum());
++                    SlotType type = inventory.getSlotType(packet.getSlotNum());
 +
 +                    InventoryClickEvent event;
 +                    ClickType click = ClickType.UNKNOWN;
@@ -1304,36 +1358,36 @@
 +
 +                    ItemStack itemstack = ItemStack.EMPTY;
 +
-+                    switch (packetplayinwindowclick.getClickType()) {
++                    switch (packet.getClickType()) {
 +                        case PICKUP:
-+                            if (packetplayinwindowclick.getButtonNum() == 0) {
++                            if (packet.getButtonNum() == 0) {
 +                                click = ClickType.LEFT;
-+                            } else if (packetplayinwindowclick.getButtonNum() == 1) {
++                            } else if (packet.getButtonNum() == 1) {
 +                                click = ClickType.RIGHT;
 +                            }
-+                            if (packetplayinwindowclick.getButtonNum() == 0 || packetplayinwindowclick.getButtonNum() == 1) {
++                            if (packet.getButtonNum() == 0 || packet.getButtonNum() == 1) {
 +                                action = InventoryAction.NOTHING; // Don't want to repeat ourselves
-+                                if (packetplayinwindowclick.getSlotNum() == -999) {
-+                                    if (!player.containerMenu.getCarried().isEmpty()) {
-+                                        action = packetplayinwindowclick.getButtonNum() == 0 ? InventoryAction.DROP_ALL_CURSOR : InventoryAction.DROP_ONE_CURSOR;
++                                if (packet.getSlotNum() == -999) {
++                                    if (!this.player.containerMenu.getCarried().isEmpty()) {
++                                        action = packet.getButtonNum() == 0 ? InventoryAction.DROP_ALL_CURSOR : InventoryAction.DROP_ONE_CURSOR;
 +                                    }
-+                                } else if (packetplayinwindowclick.getSlotNum() < 0)  {
++                                } else if (packet.getSlotNum() < 0)  {
 +                                    action = InventoryAction.NOTHING;
 +                                } else {
-+                                    Slot slot = this.player.containerMenu.getSlot(packetplayinwindowclick.getSlotNum());
++                                    Slot slot = this.player.containerMenu.getSlot(packet.getSlotNum());
 +                                    if (slot != null) {
 +                                        ItemStack clickedItem = slot.getItem();
-+                                        ItemStack cursor = player.containerMenu.getCarried();
++                                        ItemStack cursor = this.player.containerMenu.getCarried();
 +                                        if (clickedItem.isEmpty()) {
 +                                            if (!cursor.isEmpty()) {
-+                                                action = packetplayinwindowclick.getButtonNum() == 0 ? InventoryAction.PLACE_ALL : InventoryAction.PLACE_ONE;
++                                                action = packet.getButtonNum() == 0 ? InventoryAction.PLACE_ALL : InventoryAction.PLACE_ONE;
 +                                            }
-+                                        } else if (slot.mayPickup(player)) {
++                                        } else if (slot.mayPickup(this.player)) {
 +                                            if (cursor.isEmpty()) {
-+                                                action = packetplayinwindowclick.getButtonNum() == 0 ? InventoryAction.PICKUP_ALL : InventoryAction.PICKUP_HALF;
++                                                action = packet.getButtonNum() == 0 ? InventoryAction.PICKUP_ALL : InventoryAction.PICKUP_HALF;
 +                                            } else if (slot.mayPlace(cursor)) {
 +                                                if (ItemStack.isSameItemSameComponents(clickedItem, cursor)) {
-+                                                    int toPlace = packetplayinwindowclick.getButtonNum() == 0 ? cursor.getCount() : 1;
++                                                    int toPlace = packet.getButtonNum() == 0 ? cursor.getCount() : 1;
 +                                                    toPlace = Math.min(toPlace, clickedItem.getMaxStackSize() - clickedItem.getCount());
 +                                                    toPlace = Math.min(toPlace, slot.container.getMaxStackSize() - clickedItem.getCount());
 +                                                    if (toPlace == 1) {
@@ -1363,16 +1417,16 @@
 +                            break;
 +                        // TODO check on updates
 +                        case QUICK_MOVE:
-+                            if (packetplayinwindowclick.getButtonNum() == 0) {
++                            if (packet.getButtonNum() == 0) {
 +                                click = ClickType.SHIFT_LEFT;
-+                            } else if (packetplayinwindowclick.getButtonNum() == 1) {
++                            } else if (packet.getButtonNum() == 1) {
 +                                click = ClickType.SHIFT_RIGHT;
 +                            }
-+                            if (packetplayinwindowclick.getButtonNum() == 0 || packetplayinwindowclick.getButtonNum() == 1) {
-+                                if (packetplayinwindowclick.getSlotNum() < 0) {
++                            if (packet.getButtonNum() == 0 || packet.getButtonNum() == 1) {
++                                if (packet.getSlotNum() < 0) {
 +                                    action = InventoryAction.NOTHING;
 +                                } else {
-+                                    Slot slot = this.player.containerMenu.getSlot(packetplayinwindowclick.getSlotNum());
++                                    Slot slot = this.player.containerMenu.getSlot(packet.getSlotNum());
 +                                    if (slot != null && slot.mayPickup(this.player) && slot.hasItem()) {
 +                                        action = InventoryAction.MOVE_TO_OTHER_INVENTORY;
 +                                    } else {
@@ -1382,12 +1436,12 @@
 +                            }
 +                            break;
 +                        case SWAP:
-+                            if ((packetplayinwindowclick.getButtonNum() >= 0 && packetplayinwindowclick.getButtonNum() < 9) || packetplayinwindowclick.getButtonNum() == 40) {
-+                                click = (packetplayinwindowclick.getButtonNum() == 40) ? ClickType.SWAP_OFFHAND : ClickType.NUMBER_KEY;
-+                                Slot clickedSlot = this.player.containerMenu.getSlot(packetplayinwindowclick.getSlotNum());
-+                                if (clickedSlot.mayPickup(player)) {
-+                                    ItemStack hotbar = this.player.getInventory().getItem(packetplayinwindowclick.getButtonNum());
-+                                    boolean canCleanSwap = hotbar.isEmpty() || (clickedSlot.container == player.getInventory() && clickedSlot.mayPlace(hotbar)); // the slot will accept the hotbar item
++                            if ((packet.getButtonNum() >= 0 && packet.getButtonNum() < 9) || packet.getButtonNum() == 40) {
++                                click = (packet.getButtonNum() == 40) ? ClickType.SWAP_OFFHAND : ClickType.NUMBER_KEY;
++                                Slot clickedSlot = this.player.containerMenu.getSlot(packet.getSlotNum());
++                                if (clickedSlot.mayPickup(this.player)) {
++                                    ItemStack hotbar = this.player.getInventory().getItem(packet.getButtonNum());
++                                    boolean canCleanSwap = hotbar.isEmpty() || (clickedSlot.container == this.player.getInventory() && clickedSlot.mayPlace(hotbar)); // the slot will accept the hotbar item
 +                                    if (clickedSlot.hasItem()) {
 +                                        if (canCleanSwap) {
 +                                            action = InventoryAction.HOTBAR_SWAP;
@@ -1405,13 +1459,13 @@
 +                            }
 +                            break;
 +                        case CLONE:
-+                            if (packetplayinwindowclick.getButtonNum() == 2) {
++                            if (packet.getButtonNum() == 2) {
 +                                click = ClickType.MIDDLE;
-+                                if (packetplayinwindowclick.getSlotNum() < 0) {
++                                if (packet.getSlotNum() < 0) {
 +                                    action = InventoryAction.NOTHING;
 +                                } else {
-+                                    Slot slot = this.player.containerMenu.getSlot(packetplayinwindowclick.getSlotNum());
-+                                    if (slot != null && slot.hasItem() && player.getAbilities().instabuild && player.containerMenu.getCarried().isEmpty()) {
++                                    Slot slot = this.player.containerMenu.getSlot(packet.getSlotNum());
++                                    if (slot != null && slot.hasItem() && this.player.getAbilities().instabuild && this.player.containerMenu.getCarried().isEmpty()) {
 +                                        action = InventoryAction.CLONE_STACK;
 +                                    } else {
 +                                        action = InventoryAction.NOTHING;
@@ -1423,19 +1477,19 @@
 +                            }
 +                            break;
 +                        case THROW:
-+                            if (packetplayinwindowclick.getSlotNum() >= 0) {
-+                                if (packetplayinwindowclick.getButtonNum() == 0) {
++                            if (packet.getSlotNum() >= 0) {
++                                if (packet.getButtonNum() == 0) {
 +                                    click = ClickType.DROP;
-+                                    Slot slot = this.player.containerMenu.getSlot(packetplayinwindowclick.getSlotNum());
-+                                    if (slot != null && slot.hasItem() && slot.mayPickup(player) && !slot.getItem().isEmpty() && slot.getItem().getItem() != Item.byBlock(Blocks.AIR)) {
++                                    Slot slot = this.player.containerMenu.getSlot(packet.getSlotNum());
++                                    if (slot != null && slot.hasItem() && slot.mayPickup(this.player) && !slot.getItem().isEmpty() && slot.getItem().getItem() != Item.byBlock(Blocks.AIR)) {
 +                                        action = InventoryAction.DROP_ONE_SLOT;
 +                                    } else {
 +                                        action = InventoryAction.NOTHING;
 +                                    }
-+                                } else if (packetplayinwindowclick.getButtonNum() == 1) {
++                                } else if (packet.getButtonNum() == 1) {
 +                                    click = ClickType.CONTROL_DROP;
-+                                    Slot slot = this.player.containerMenu.getSlot(packetplayinwindowclick.getSlotNum());
-+                                    if (slot != null && slot.hasItem() && slot.mayPickup(player) && !slot.getItem().isEmpty() && slot.getItem().getItem() != Item.byBlock(Blocks.AIR)) {
++                                    Slot slot = this.player.containerMenu.getSlot(packet.getSlotNum());
++                                    if (slot != null && slot.hasItem() && slot.mayPickup(this.player) && !slot.getItem().isEmpty() && slot.getItem().getItem() != Item.byBlock(Blocks.AIR)) {
 +                                        action = InventoryAction.DROP_ALL_SLOT;
 +                                    } else {
 +                                        action = InventoryAction.NOTHING;
@@ -1444,19 +1498,19 @@
 +                            } else {
 +                                // Sane default (because this happens when they are holding nothing. Don't ask why.)
 +                                click = ClickType.LEFT;
-+                                if (packetplayinwindowclick.getButtonNum() == 1) {
++                                if (packet.getButtonNum() == 1) {
 +                                    click = ClickType.RIGHT;
 +                                }
 +                                action = InventoryAction.NOTHING;
 +                            }
 +                            break;
 +                        case QUICK_CRAFT:
-+                            this.player.containerMenu.clicked(packetplayinwindowclick.getSlotNum(), packetplayinwindowclick.getButtonNum(), packetplayinwindowclick.getClickType(), this.player);
++                            this.player.containerMenu.clicked(packet.getSlotNum(), packet.getButtonNum(), packet.getClickType(), this.player);
 +                            break;
 +                        case PICKUP_ALL:
 +                            click = ClickType.DOUBLE_CLICK;
 +                            action = InventoryAction.NOTHING;
-+                            if (packetplayinwindowclick.getSlotNum() >= 0 && !this.player.containerMenu.getCarried().isEmpty()) {
++                            if (packet.getSlotNum() >= 0 && !this.player.containerMenu.getCarried().isEmpty()) {
 +                                ItemStack cursor = this.player.containerMenu.getCarried();
 +                                action = InventoryAction.NOTHING;
 +                                // Quick check for if we have any of the item
@@ -1469,39 +1523,39 @@
 +                            break;
 +                    }
 +
-+                    if (packetplayinwindowclick.getClickType() != InventoryClickType.QUICK_CRAFT) {
++                    if (packet.getClickType() != net.minecraft.world.inventory.ClickType.QUICK_CRAFT) {
 +                        if (click == ClickType.NUMBER_KEY) {
-+                            event = new InventoryClickEvent(inventory, type, packetplayinwindowclick.getSlotNum(), click, action, packetplayinwindowclick.getButtonNum());
++                            event = new InventoryClickEvent(inventory, type, packet.getSlotNum(), click, action, packet.getButtonNum());
 +                        } else {
-+                            event = new InventoryClickEvent(inventory, type, packetplayinwindowclick.getSlotNum(), click, action);
++                            event = new InventoryClickEvent(inventory, type, packet.getSlotNum(), click, action);
 +                        }
 +
 +                        org.bukkit.inventory.Inventory top = inventory.getTopInventory();
-+                        if (packetplayinwindowclick.getSlotNum() == 0 && top instanceof CraftingInventory) {
++                        if (packet.getSlotNum() == 0 && top instanceof CraftingInventory) {
 +                            org.bukkit.inventory.Recipe recipe = ((CraftingInventory) top).getRecipe();
 +                            if (recipe != null) {
 +                                if (click == ClickType.NUMBER_KEY) {
-+                                    event = new CraftItemEvent(recipe, inventory, type, packetplayinwindowclick.getSlotNum(), click, action, packetplayinwindowclick.getButtonNum());
++                                    event = new CraftItemEvent(recipe, inventory, type, packet.getSlotNum(), click, action, packet.getButtonNum());
 +                                } else {
-+                                    event = new CraftItemEvent(recipe, inventory, type, packetplayinwindowclick.getSlotNum(), click, action);
++                                    event = new CraftItemEvent(recipe, inventory, type, packet.getSlotNum(), click, action);
 +                                }
 +                            }
 +                        }
 +
-+                        if (packetplayinwindowclick.getSlotNum() == 3 && top instanceof SmithingInventory) {
++                        if (packet.getSlotNum() == 3 && top instanceof SmithingInventory) {
 +                            org.bukkit.inventory.ItemStack result = ((SmithingInventory) top).getResult();
 +                            if (result != null) {
 +                                if (click == ClickType.NUMBER_KEY) {
-+                                    event = new SmithItemEvent(inventory, type, packetplayinwindowclick.getSlotNum(), click, action, packetplayinwindowclick.getButtonNum());
++                                    event = new SmithItemEvent(inventory, type, packet.getSlotNum(), click, action, packet.getButtonNum());
 +                                } else {
-+                                    event = new SmithItemEvent(inventory, type, packetplayinwindowclick.getSlotNum(), click, action);
++                                    event = new SmithItemEvent(inventory, type, packet.getSlotNum(), click, action);
 +                                }
 +                            }
 +                        }
 +
 +                        event.setCancelled(cancelled);
-+                        Container oldContainer = this.player.containerMenu; // SPIGOT-1224
-+                        cserver.getPluginManager().callEvent(event);
++                        AbstractContainerMenu oldContainer = this.player.containerMenu; // SPIGOT-1224
++                        this.cserver.getPluginManager().callEvent(event);
 +                        if (this.player.containerMenu != oldContainer) {
 +                            return;
 +                        }
@@ -1509,7 +1563,7 @@
 +                        switch (event.getResult()) {
 +                            case ALLOW:
 +                            case DEFAULT:
-+                                this.player.containerMenu.clicked(i, packetplayinwindowclick.getButtonNum(), packetplayinwindowclick.getClickType(), this.player);
++                                this.player.containerMenu.clicked(i, packet.getButtonNum(), packet.getClickType(), this.player);
 +                                break;
 +                            case DENY:
 +                                /* Needs enum constructor in InventoryAction
@@ -1541,19 +1595,19 @@
 +                                    case PLACE_SOME:
 +                                    case PLACE_ONE:
 +                                    case SWAP_WITH_CURSOR:
-+                                        this.player.connection.send(new PacketPlayOutSetSlot(-1, -1, this.player.inventoryMenu.incrementStateId(), this.player.containerMenu.getCarried()));
-+                                        this.player.connection.send(new PacketPlayOutSetSlot(this.player.containerMenu.containerId, this.player.inventoryMenu.incrementStateId(), packetplayinwindowclick.getSlotNum(), this.player.containerMenu.getSlot(packetplayinwindowclick.getSlotNum()).getItem()));
++                                        this.player.connection.send(new ClientboundContainerSetSlotPacket(-1, -1, this.player.inventoryMenu.incrementStateId(), this.player.containerMenu.getCarried()));
++                                        this.player.connection.send(new ClientboundContainerSetSlotPacket(this.player.containerMenu.containerId, this.player.inventoryMenu.incrementStateId(), packet.getSlotNum(), this.player.containerMenu.getSlot(packet.getSlotNum()).getItem()));
 +                                        break;
 +                                    // Modified clicked only
 +                                    case DROP_ALL_SLOT:
 +                                    case DROP_ONE_SLOT:
-+                                        this.player.connection.send(new PacketPlayOutSetSlot(this.player.containerMenu.containerId, this.player.inventoryMenu.incrementStateId(), packetplayinwindowclick.getSlotNum(), this.player.containerMenu.getSlot(packetplayinwindowclick.getSlotNum()).getItem()));
++                                        this.player.connection.send(new ClientboundContainerSetSlotPacket(this.player.containerMenu.containerId, this.player.inventoryMenu.incrementStateId(), packet.getSlotNum(), this.player.containerMenu.getSlot(packet.getSlotNum()).getItem()));
 +                                        break;
 +                                    // Modified cursor only
 +                                    case DROP_ALL_CURSOR:
 +                                    case DROP_ONE_CURSOR:
 +                                    case CLONE_STACK:
-+                                        this.player.connection.send(new PacketPlayOutSetSlot(-1, -1, this.player.inventoryMenu.incrementStateId(), this.player.containerMenu.getCarried()));
++                                        this.player.connection.send(new ClientboundContainerSetSlotPacket(-1, -1, this.player.inventoryMenu.incrementStateId(), this.player.containerMenu.getCarried()));
 +                                        break;
 +                                    // Nothing
 +                                    case NOTHING:
@@ -1564,65 +1618,66 @@
 +                        if (event instanceof CraftItemEvent || event instanceof SmithItemEvent) {
 +                            // Need to update the inventory on crafting to
 +                            // correctly support custom recipes
-+                            player.containerMenu.sendAllDataToRemote();
++                            this.player.containerMenu.sendAllDataToRemote();
 +                        }
 +                    }
 +                    // CraftBukkit end
-                     ObjectIterator objectiterator = Int2ObjectMaps.fastIterable(packetplayinwindowclick.getChangedSlots()).iterator();
+                     ObjectIterator objectiterator = Int2ObjectMaps.fastIterable(packet.getChangedSlots()).iterator();
  
                      while (objectiterator.hasNext()) {
-@@ -1901,7 +2918,21 @@
+@@ -1901,8 +2914,22 @@
                                  return;
                              }
  
--                            ContainerRecipeBook.a containerrecipebook_a = containerrecipebook.handlePlacement(packetplayinautorecipe.useMaxItems(), this.player.isCreative(), recipeholder, this.player.serverLevel(), this.player.getInventory());
+-                            RecipeBookMenu.PostPlaceAction containerrecipebook_a = containerrecipebook.handlePlacement(packet.useMaxItems(), this.player.isCreative(), recipeholder, this.player.serverLevel(), this.player.getInventory());
 +                            // CraftBukkit start - implement PlayerRecipeBookClickEvent
 +                            org.bukkit.inventory.Recipe recipe = recipeholder.toBukkitRecipe();
 +                            if (recipe == null) {
 +                                return;
 +                            }
-+                            org.bukkit.event.player.PlayerRecipeBookClickEvent event = CraftEventFactory.callRecipeBookClickEvent(this.player, recipe, packetplayinautorecipe.useMaxItems());
-+
++                            org.bukkit.event.player.PlayerRecipeBookClickEvent event = CraftEventFactory.callRecipeBookClickEvent(this.player, recipe, packet.useMaxItems());
+ 
 +                            // Cast to keyed should be safe as the recipe will never be a MerchantRecipe.
 +                            recipeholder = this.server.getRecipeManager().byKey(CraftRecipe.toMinecraft(((org.bukkit.Keyed) event.getRecipe()).getKey())).orElse(null);
 +                            if (recipeholder == null) {
 +                                return;
 +                            }
 +
-+                            ContainerRecipeBook.a containerrecipebook_a = containerrecipebook.handlePlacement(event.isShiftClick(), this.player.isCreative(), recipeholder, this.player.serverLevel(), this.player.getInventory());
++                            RecipeBookMenu.PostPlaceAction containerrecipebook_a = containerrecipebook.handlePlacement(event.isShiftClick(), this.player.isCreative(), recipeholder, this.player.serverLevel(), this.player.getInventory());
 +                            // CraftBukkit end
- 
-                             if (containerrecipebook_a == ContainerRecipeBook.a.PLACE_GHOST_RECIPE) {
-                                 this.player.connection.send(new PacketPlayOutAutoRecipe(this.player.containerMenu.containerId, craftingmanager_d.display().display()));
-@@ -1917,6 +2948,7 @@
++
+                             if (containerrecipebook_a == RecipeBookMenu.PostPlaceAction.PLACE_GHOST_RECIPE) {
+                                 this.player.connection.send(new ClientboundPlaceGhostRecipePacket(this.player.containerMenu.containerId, craftingmanager_d.display().display()));
+                             }
+@@ -1917,6 +2944,7 @@
      @Override
-     public void handleContainerButtonClick(PacketPlayInEnchantItem packetplayinenchantitem) {
-         PlayerConnectionUtils.ensureRunningOnSameThread(packetplayinenchantitem, this, this.player.serverLevel());
+     public void handleContainerButtonClick(ServerboundContainerButtonClickPacket packet) {
+         PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
 +        if (this.player.isImmobile()) return; // CraftBukkit
          this.player.resetLastActionTime();
-         if (this.player.containerMenu.containerId == packetplayinenchantitem.containerId() && !this.player.isSpectator()) {
+         if (this.player.containerMenu.containerId == packet.containerId() && !this.player.isSpectator()) {
              if (!this.player.containerMenu.stillValid(this.player)) {
-@@ -1945,6 +2977,43 @@
+@@ -1945,7 +2973,44 @@
  
-             boolean flag1 = packetplayinsetcreativeslot.slotNum() >= 1 && packetplayinsetcreativeslot.slotNum() <= 45;
+             boolean flag1 = packet.slotNum() >= 1 && packet.slotNum() <= 45;
              boolean flag2 = itemstack.isEmpty() || itemstack.getCount() <= itemstack.getMaxStackSize();
-+            if (flag || (flag1 && !ItemStack.matches(this.player.inventoryMenu.getSlot(packetplayinsetcreativeslot.slotNum()).getItem(), packetplayinsetcreativeslot.itemStack()))) { // Insist on valid slot
++            if (flag || (flag1 && !ItemStack.matches(this.player.inventoryMenu.getSlot(packet.slotNum()).getItem(), packet.itemStack()))) { // Insist on valid slot
 +                // CraftBukkit start - Call click event
 +                InventoryView inventory = this.player.inventoryMenu.getBukkitView();
-+                org.bukkit.inventory.ItemStack item = CraftItemStack.asBukkitCopy(packetplayinsetcreativeslot.itemStack());
-+
++                org.bukkit.inventory.ItemStack item = CraftItemStack.asBukkitCopy(packet.itemStack());
+ 
 +                SlotType type = SlotType.QUICKBAR;
 +                if (flag) {
 +                    type = SlotType.OUTSIDE;
-+                } else if (packetplayinsetcreativeslot.slotNum() < 36) {
-+                    if (packetplayinsetcreativeslot.slotNum() >= 5 && packetplayinsetcreativeslot.slotNum() < 9) {
++                } else if (packet.slotNum() < 36) {
++                    if (packet.slotNum() >= 5 && packet.slotNum() < 9) {
 +                        type = SlotType.ARMOR;
 +                    } else {
 +                        type = SlotType.CONTAINER;
 +                    }
 +                }
-+                InventoryCreativeEvent event = new InventoryCreativeEvent(inventory, type, flag ? -999 : packetplayinsetcreativeslot.slotNum(), item);
-+                cserver.getPluginManager().callEvent(event);
++                InventoryCreativeEvent event = new InventoryCreativeEvent(inventory, type, flag ? -999 : packet.slotNum(), item);
++                this.cserver.getPluginManager().callEvent(event);
 +
 +                itemstack = CraftItemStack.asNMSCopy(event.getCursor());
 +
@@ -1635,36 +1690,37 @@
 +                    break;
 +                case DENY:
 +                    // Reset the slot
-+                    if (packetplayinsetcreativeslot.slotNum() >= 0) {
-+                        this.player.connection.send(new PacketPlayOutSetSlot(this.player.inventoryMenu.containerId, this.player.inventoryMenu.incrementStateId(), packetplayinsetcreativeslot.slotNum(), this.player.inventoryMenu.getSlot(packetplayinsetcreativeslot.slotNum()).getItem()));
-+                        this.player.connection.send(new PacketPlayOutSetSlot(-1, this.player.inventoryMenu.incrementStateId(), -1, ItemStack.EMPTY));
++                    if (packet.slotNum() >= 0) {
++                        this.player.connection.send(new ClientboundContainerSetSlotPacket(this.player.inventoryMenu.containerId, this.player.inventoryMenu.incrementStateId(), packet.slotNum(), this.player.inventoryMenu.getSlot(packet.slotNum()).getItem()));
++                        this.player.connection.send(new ClientboundContainerSetSlotPacket(-1, this.player.inventoryMenu.incrementStateId(), -1, ItemStack.EMPTY));
 +                    }
 +                    return;
 +                }
 +            }
 +            // CraftBukkit end
- 
++
              if (flag1 && flag2) {
-                 this.player.inventoryMenu.getSlot(packetplayinsetcreativeslot.slotNum()).setByPlayer(itemstack);
-@@ -1972,6 +3041,7 @@
+                 this.player.inventoryMenu.getSlot(packet.slotNum()).setByPlayer(itemstack);
+                 this.player.inventoryMenu.setRemoteSlot(packet.slotNum(), itemstack);
+@@ -1972,6 +3037,7 @@
      }
  
-     private void updateSignText(PacketPlayInUpdateSign packetplayinupdatesign, List<FilteredText> list) {
+     private void updateSignText(ServerboundSignUpdatePacket packet, List<FilteredText> signText) {
 +        if (this.player.isImmobile()) return; // CraftBukkit
          this.player.resetLastActionTime();
-         WorldServer worldserver = this.player.serverLevel();
-         BlockPosition blockposition = packetplayinupdatesign.getPos();
-@@ -1993,7 +3063,17 @@
+         ServerLevel worldserver = this.player.serverLevel();
+         BlockPos blockposition = packet.getPos();
+@@ -1993,7 +3059,17 @@
      @Override
-     public void handlePlayerAbilities(PacketPlayInAbilities packetplayinabilities) {
-         PlayerConnectionUtils.ensureRunningOnSameThread(packetplayinabilities, this, this.player.serverLevel());
--        this.player.getAbilities().flying = packetplayinabilities.isFlying() && this.player.getAbilities().mayfly;
+     public void handlePlayerAbilities(ServerboundPlayerAbilitiesPacket packet) {
+         PacketUtils.ensureRunningOnSameThread(packet, this, this.player.serverLevel());
+-        this.player.getAbilities().flying = packet.isFlying() && this.player.getAbilities().mayfly;
 +        // CraftBukkit start
-+        if (this.player.getAbilities().mayfly && this.player.getAbilities().flying != packetplayinabilities.isFlying()) {
-+            PlayerToggleFlightEvent event = new PlayerToggleFlightEvent(this.player.getBukkitEntity(), packetplayinabilities.isFlying());
++        if (this.player.getAbilities().mayfly && this.player.getAbilities().flying != packet.isFlying()) {
++            PlayerToggleFlightEvent event = new PlayerToggleFlightEvent(this.player.getBukkitEntity(), packet.isFlying());
 +            this.cserver.getPluginManager().callEvent(event);
 +            if (!event.isCancelled()) {
-+                this.player.getAbilities().flying = packetplayinabilities.isFlying(); // Actually set the player's flying status
++                this.player.getAbilities().flying = packet.isFlying(); // Actually set the player's flying status
 +            } else {
 +                this.player.onUpdateAbilities(); // Tell the player their ability was reverted
 +            }
@@ -1673,7 +1729,7 @@
      }
  
      @Override
-@@ -2058,7 +3138,7 @@
+@@ -2058,7 +3134,7 @@
          if (!this.waitingForSwitchToConfig) {
              throw new IllegalStateException("Client acknowledged config, but none was requested");
          } else {
@@ -1682,16 +1738,16 @@
          }
      }
  
-@@ -2083,8 +3163,10 @@
+@@ -2083,8 +3159,10 @@
          });
      }
  
 -    @Override
--    public void handleCustomPayload(ServerboundCustomPayloadPacket serverboundcustompayloadpacket) {}
+-    public void handleCustomPayload(ServerboundCustomPayloadPacket packet) {}
 +    // CraftBukkit start - handled in super
 +    // @Override
 +    // public void handleCustomPayload(ServerboundCustomPayloadPacket serverboundcustompayloadpacket) {}
 +    // CraftBukkit end
  
      @Override
-     public void handleClientTickEnd(ServerboundClientTickEndPacket serverboundclienttickendpacket) {
+     public void handleClientTickEnd(ServerboundClientTickEndPacket packet) {
diff --git a/paper-server/patches/sources/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java.patch b/paper-server/patches/sources/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java.patch
new file mode 100644
index 0000000000..2c4bc5028a
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java.patch
@@ -0,0 +1,69 @@
+--- a/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
++++ b/net/minecraft/server/network/ServerHandshakePacketListenerImpl.java
+@@ -13,8 +13,17 @@
+ import net.minecraft.network.protocol.status.StatusProtocols;
+ import net.minecraft.server.MinecraftServer;
+ 
++// CraftBukkit start
++import java.net.InetAddress;
++import java.util.HashMap;
++// CraftBukkit end
++
+ public class ServerHandshakePacketListenerImpl implements ServerHandshakePacketListener {
+ 
++    // CraftBukkit start - add fields
++    private static final HashMap<InetAddress, Long> throttleTracker = new HashMap<InetAddress, Long>();
++    private static int throttleCounter = 0;
++    // CraftBukkit end
+     private static final Component IGNORE_STATUS_REASON = Component.translatable("disconnect.ignoring_status_request");
+     private final MinecraftServer server;
+     private final Connection connection;
+@@ -26,6 +35,7 @@
+ 
+     @Override
+     public void handleIntention(ClientIntentionPacket packet) {
++        this.connection.hostname = packet.hostName() + ":" + packet.port(); // CraftBukkit  - set hostname
+         switch (packet.intention()) {
+             case LOGIN:
+                 this.beginLogin(packet, false);
+@@ -59,6 +69,40 @@
+ 
+     private void beginLogin(ClientIntentionPacket packet, boolean transfer) {
+         this.connection.setupOutboundProtocol(LoginProtocols.CLIENTBOUND);
++        // CraftBukkit start - Connection throttle
++        try {
++            long currentTime = System.currentTimeMillis();
++            long connectionThrottle = this.server.server.getConnectionThrottle();
++            InetAddress address = ((java.net.InetSocketAddress) this.connection.getRemoteAddress()).getAddress();
++
++            synchronized (ServerHandshakePacketListenerImpl.throttleTracker) {
++                if (ServerHandshakePacketListenerImpl.throttleTracker.containsKey(address) && !"127.0.0.1".equals(address.getHostAddress()) && currentTime - ServerHandshakePacketListenerImpl.throttleTracker.get(address) < connectionThrottle) {
++                    ServerHandshakePacketListenerImpl.throttleTracker.put(address, currentTime);
++                    MutableComponent chatmessage = Component.literal("Connection throttled! Please wait before reconnecting.");
++                    this.connection.send(new ClientboundLoginDisconnectPacket(chatmessage));
++                    this.connection.disconnect(chatmessage);
++                    return;
++                }
++
++                ServerHandshakePacketListenerImpl.throttleTracker.put(address, currentTime);
++                ServerHandshakePacketListenerImpl.throttleCounter++;
++                if (ServerHandshakePacketListenerImpl.throttleCounter > 200) {
++                    ServerHandshakePacketListenerImpl.throttleCounter = 0;
++
++                    // Cleanup stale entries
++                    java.util.Iterator iter = ServerHandshakePacketListenerImpl.throttleTracker.entrySet().iterator();
++                    while (iter.hasNext()) {
++                        java.util.Map.Entry<InetAddress, Long> entry = (java.util.Map.Entry) iter.next();
++                        if (entry.getValue() > connectionThrottle) {
++                            iter.remove();
++                        }
++                    }
++                }
++            }
++        } catch (Throwable t) {
++            org.apache.logging.log4j.LogManager.getLogger().debug("Failed to check connection throttle", t);
++        }
++        // CraftBukkit end
+         if (packet.protocolVersion() != SharedConstants.getCurrentVersion().getProtocolVersion()) {
+             MutableComponent ichatmutablecomponent;
+ 
diff --git a/paper-server/patches/sources/net/minecraft/server/network/LoginListener.patch b/paper-server/patches/sources/net/minecraft/server/network/ServerLoginPacketListenerImpl.java.patch
similarity index 53%
rename from paper-server/patches/sources/net/minecraft/server/network/LoginListener.patch
rename to paper-server/patches/sources/net/minecraft/server/network/ServerLoginPacketListenerImpl.java.patch
index 4ff8933d73..e7b48fd8a1 100644
--- a/paper-server/patches/sources/net/minecraft/server/network/LoginListener.patch
+++ b/paper-server/patches/sources/net/minecraft/server/network/ServerLoginPacketListenerImpl.java.patch
@@ -1,124 +1,137 @@
---- a/net/minecraft/server/network/LoginListener.java
-+++ b/net/minecraft/server/network/LoginListener.java
-@@ -44,8 +44,38 @@
+--- a/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
++++ b/net/minecraft/server/network/ServerLoginPacketListenerImpl.java
+@@ -20,6 +20,7 @@
+ import net.minecraft.DefaultUncaughtExceptionHandler;
+ import net.minecraft.core.UUIDUtil;
+ import net.minecraft.network.Connection;
++import net.minecraft.network.ConnectionProtocol;
+ import net.minecraft.network.DisconnectionDetails;
+ import net.minecraft.network.PacketSendListener;
+ import net.minecraft.network.TickablePacketListener;
+@@ -36,6 +37,7 @@
+ import net.minecraft.network.protocol.login.ServerboundKeyPacket;
+ import net.minecraft.network.protocol.login.ServerboundLoginAcknowledgedPacket;
+ import net.minecraft.server.MinecraftServer;
++import net.minecraft.server.level.ServerPlayer;
+ import net.minecraft.server.players.PlayerList;
+ import net.minecraft.util.Crypt;
+ import net.minecraft.util.CryptException;
+@@ -43,9 +45,35 @@
+ import net.minecraft.util.StringUtil;
  import org.apache.commons.lang3.Validate;
  import org.slf4j.Logger;
- 
--public class LoginListener implements PacketLoginInListener, TickablePacketListener {
-+// CraftBukkit start
-+import net.minecraft.network.EnumProtocol;
 +import net.minecraft.network.protocol.Packet;
-+import net.minecraft.network.protocol.PlayerConnectionUtils;
-+import net.minecraft.server.level.EntityPlayer;
++import net.minecraft.network.protocol.PacketUtils;
 +import org.bukkit.craftbukkit.entity.CraftPlayer;
 +import org.bukkit.craftbukkit.util.Waitable;
 +import org.bukkit.event.player.AsyncPlayerPreLoginEvent;
 +import org.bukkit.event.player.PlayerPreLoginEvent;
-+
-+public class LoginListener implements PacketLoginInListener, TickablePacketListener, CraftPlayer.TransferCookieConnection {
-+
+ 
+-public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, TickablePacketListener {
++public class ServerLoginPacketListenerImpl implements ServerLoginPacketListener, TickablePacketListener, CraftPlayer.TransferCookieConnection {
+ 
 +    @Override
 +    public boolean isTransferred() {
 +        return this.transferred;
 +    }
 +
 +    @Override
-+    public EnumProtocol getProtocol() {
-+        return EnumProtocol.LOGIN;
++    public ConnectionProtocol getProtocol() {
++        return ConnectionProtocol.LOGIN;
 +    }
 +
 +    @Override
 +    public void sendPacket(Packet<?> packet) {
 +        this.connection.send(packet);
 +    }
- 
++
 +    @Override
-+    public void kickPlayer(IChatBaseComponent reason) {
-+        disconnect(reason);
++    public void kickPlayer(Component reason) {
++        this.disconnect(reason);
 +    }
 +    // CraftBukkit end
      private static final AtomicInteger UNIQUE_THREAD_ID = new AtomicInteger(0);
      static final Logger LOGGER = LogUtils.getLogger();
      private static final int MAX_TICKS_BEFORE_LOGIN = 600;
-@@ -60,6 +90,7 @@
+@@ -60,6 +88,7 @@
      private GameProfile authenticatedProfile;
      private final String serverId;
      private final boolean transferred;
-+    private EntityPlayer player; // CraftBukkit
++    private ServerPlayer player; // CraftBukkit
  
-     public LoginListener(MinecraftServer minecraftserver, NetworkManager networkmanager, boolean flag) {
-         this.state = LoginListener.EnumProtocolState.HELLO;
-@@ -76,6 +107,12 @@
+     public ServerLoginPacketListenerImpl(MinecraftServer server, Connection connection, boolean transferred) {
+         this.state = ServerLoginPacketListenerImpl.State.HELLO;
+@@ -76,6 +105,12 @@
              this.verifyLoginAndFinishConnectionSetup((GameProfile) Objects.requireNonNull(this.authenticatedProfile));
          }
  
 +        // CraftBukkit start
-+        if (this.state == LoginListener.EnumProtocolState.WAITING_FOR_COOKIES && !this.player.getBukkitEntity().isAwaitingCookies()) {
++        if (this.state == ServerLoginPacketListenerImpl.State.WAITING_FOR_COOKIES && !this.player.getBukkitEntity().isAwaitingCookies()) {
 +            this.postCookies(this.authenticatedProfile);
 +        }
 +        // CraftBukkit end
 +
-         if (this.state == LoginListener.EnumProtocolState.WAITING_FOR_DUPE_DISCONNECT && !this.isPlayerAlreadyInWorld((GameProfile) Objects.requireNonNull(this.authenticatedProfile))) {
+         if (this.state == ServerLoginPacketListenerImpl.State.WAITING_FOR_DUPE_DISCONNECT && !this.isPlayerAlreadyInWorld((GameProfile) Objects.requireNonNull(this.authenticatedProfile))) {
              this.finishLoginAndWaitForClient(this.authenticatedProfile);
          }
-@@ -86,6 +123,13 @@
+@@ -86,6 +121,13 @@
  
      }
  
 +    // CraftBukkit start
 +    @Deprecated
 +    public void disconnect(String s) {
-+        disconnect(IChatBaseComponent.literal(s));
++        this.disconnect(Component.literal(s));
 +    }
 +    // CraftBukkit end
 +
      @Override
      public boolean isAcceptingMessages() {
          return this.connection.isConnected();
-@@ -131,7 +175,27 @@
-                 this.state = LoginListener.EnumProtocolState.KEY;
-                 this.connection.send(new PacketLoginOutEncryptionBegin("", this.server.getKeyPair().getPublic().getEncoded(), this.challenge, true));
+@@ -131,7 +173,27 @@
+                 this.state = ServerLoginPacketListenerImpl.State.KEY;
+                 this.connection.send(new ClientboundHelloPacket("", this.server.getKeyPair().getPublic().getEncoded(), this.challenge, true));
              } else {
 -                this.startClientVerification(UUIDUtil.createOfflineProfile(this.requestedUsername));
 +                // CraftBukkit start
-+                Thread thread = new Thread("User Authenticator #" + LoginListener.UNIQUE_THREAD_ID.incrementAndGet()) {
++                Thread thread = new Thread("User Authenticator #" + ServerLoginPacketListenerImpl.UNIQUE_THREAD_ID.incrementAndGet()) {
 +
 +                    @Override
 +                    public void run() {
 +                        try {
-+                            GameProfile gameprofile = UUIDUtil.createOfflineProfile(LoginListener.this.requestedUsername);
++                            GameProfile gameprofile = UUIDUtil.createOfflineProfile(ServerLoginPacketListenerImpl.this.requestedUsername);
 +
-+                            LoginListener.this.callPlayerPreLoginEvents(gameprofile);
-+                            LoginListener.LOGGER.info("UUID of player {} is {}", gameprofile.getName(), gameprofile.getId());
-+                            LoginListener.this.startClientVerification(gameprofile);
++                            ServerLoginPacketListenerImpl.this.callPlayerPreLoginEvents(gameprofile);
++                            ServerLoginPacketListenerImpl.LOGGER.info("UUID of player {} is {}", gameprofile.getName(), gameprofile.getId());
++                            ServerLoginPacketListenerImpl.this.startClientVerification(gameprofile);
 +                        } catch (Exception ex) {
-+                            disconnect("Failed to verify username!");
-+                            server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + LoginListener.this.requestedUsername, ex);
++                            ServerLoginPacketListenerImpl.this.disconnect("Failed to verify username!");
++                            ServerLoginPacketListenerImpl.this.server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + ServerLoginPacketListenerImpl.this.requestedUsername, ex);
 +                        }
 +                    }
 +                };
 +
-+                thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(LoginListener.LOGGER));
++                thread.setUncaughtExceptionHandler(new DefaultUncaughtExceptionHandler(ServerLoginPacketListenerImpl.LOGGER));
 +                thread.start();
 +                // CraftBukkit end
              }
  
          }
-@@ -144,10 +208,24 @@
+@@ -144,10 +206,24 @@
  
-     private void verifyLoginAndFinishConnectionSetup(GameProfile gameprofile) {
+     private void verifyLoginAndFinishConnectionSetup(GameProfile profile) {
          PlayerList playerlist = this.server.getPlayerList();
--        IChatBaseComponent ichatbasecomponent = playerlist.canPlayerLogin(this.connection.getRemoteAddress(), gameprofile);
+-        Component ichatbasecomponent = playerlist.canPlayerLogin(this.connection.getRemoteAddress(), profile);
 +        // CraftBukkit start - fire PlayerLoginEvent
-+        this.player = playerlist.canPlayerLogin(this, gameprofile); // CraftBukkit
++        this.player = playerlist.canPlayerLogin(this, profile); // CraftBukkit
  
 -        if (ichatbasecomponent != null) {
 -            this.disconnect(ichatbasecomponent);
 +        if (this.player != null) {
 +            if (this.player.getBukkitEntity().isAwaitingCookies()) {
-+                this.state = LoginListener.EnumProtocolState.WAITING_FOR_COOKIES;
++                this.state = ServerLoginPacketListenerImpl.State.WAITING_FOR_COOKIES;
 +            } else {
-+                this.postCookies(gameprofile);
++                this.postCookies(profile);
 +            }
 +        }
 +    }
@@ -131,51 +144,57 @@
 +            // CraftBukkit end
          } else {
              if (this.server.getCompressionThreshold() >= 0 && !this.connection.isMemoryConnection()) {
-                 this.connection.send(new PacketLoginOutSetCompression(this.server.getCompressionThreshold()), PacketSendListener.thenRun(() -> {
-@@ -155,7 +233,7 @@
+                 this.connection.send(new ClientboundLoginCompressionPacket(this.server.getCompressionThreshold()), PacketSendListener.thenRun(() -> {
+@@ -155,12 +231,12 @@
                  }));
              }
  
--            boolean flag = playerlist.disconnectAllPlayersWithProfile(gameprofile);
+-            boolean flag = playerlist.disconnectAllPlayersWithProfile(profile);
 +            boolean flag = playerlist.disconnectAllPlayersWithProfile(gameprofile, this.player); // CraftBukkit - add player reference
  
              if (flag) {
-                 this.state = LoginListener.EnumProtocolState.WAITING_FOR_DUPE_DISCONNECT;
-@@ -205,6 +283,12 @@
+                 this.state = ServerLoginPacketListenerImpl.State.WAITING_FOR_DUPE_DISCONNECT;
+             } else {
+-                this.finishLoginAndWaitForClient(profile);
++                this.finishLoginAndWaitForClient(gameprofile);
+             }
+         }
+ 
+@@ -205,6 +281,12 @@
                      if (profileresult != null) {
                          GameProfile gameprofile = profileresult.profile();
  
 +                        // CraftBukkit start - fire PlayerPreLoginEvent
-+                        if (!connection.isConnected()) {
++                        if (!ServerLoginPacketListenerImpl.this.connection.isConnected()) {
 +                            return;
 +                        }
-+                        LoginListener.this.callPlayerPreLoginEvents(gameprofile);
++                        ServerLoginPacketListenerImpl.this.callPlayerPreLoginEvents(gameprofile);
 +                        // CraftBukkit end
-                         LoginListener.LOGGER.info("UUID of player {} is {}", gameprofile.getName(), gameprofile.getId());
-                         LoginListener.this.startClientVerification(gameprofile);
-                     } else if (LoginListener.this.server.isSingleplayer()) {
-@@ -222,6 +306,11 @@
-                         LoginListener.this.disconnect(IChatBaseComponent.translatable("multiplayer.disconnect.authservers_down"));
-                         LoginListener.LOGGER.error("Couldn't verify username because servers are unavailable");
+                         ServerLoginPacketListenerImpl.LOGGER.info("UUID of player {} is {}", gameprofile.getName(), gameprofile.getId());
+                         ServerLoginPacketListenerImpl.this.startClientVerification(gameprofile);
+                     } else if (ServerLoginPacketListenerImpl.this.server.isSingleplayer()) {
+@@ -222,6 +304,11 @@
+                         ServerLoginPacketListenerImpl.this.disconnect(Component.translatable("multiplayer.disconnect.authservers_down"));
+                         ServerLoginPacketListenerImpl.LOGGER.error("Couldn't verify username because servers are unavailable");
                      }
 +                    // CraftBukkit start - catch all exceptions
 +                } catch (Exception exception) {
-+                    disconnect("Failed to verify username!");
-+                    server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + s1, exception);
++                    ServerLoginPacketListenerImpl.this.disconnect("Failed to verify username!");
++                    ServerLoginPacketListenerImpl.this.server.server.getLogger().log(java.util.logging.Level.WARNING, "Exception verifying " + s1, exception);
 +                    // CraftBukkit end
                  }
  
              }
-@@ -238,6 +327,43 @@
+@@ -238,6 +325,43 @@
          thread.start();
      }
  
 +    // CraftBukkit start
 +    private void callPlayerPreLoginEvents(GameProfile gameprofile) throws Exception {
 +        String playerName = gameprofile.getName();
-+        java.net.InetAddress address = ((java.net.InetSocketAddress) connection.getRemoteAddress()).getAddress();
++        java.net.InetAddress address = ((java.net.InetSocketAddress) this.connection.getRemoteAddress()).getAddress();
 +        java.util.UUID uniqueId = gameprofile.getId();
-+        final org.bukkit.craftbukkit.CraftServer server = LoginListener.this.server.server;
++        final org.bukkit.craftbukkit.CraftServer server = ServerLoginPacketListenerImpl.this.server.server;
 +
 +        AsyncPlayerPreLoginEvent asyncEvent = new AsyncPlayerPreLoginEvent(playerName, address, uniqueId, this.transferred);
 +        server.getPluginManager().callEvent(asyncEvent);
@@ -193,14 +212,14 @@
 +                }
 +            };
 +
-+            LoginListener.this.server.processQueue.add(waitable);
++            ServerLoginPacketListenerImpl.this.server.processQueue.add(waitable);
 +            if (waitable.get() != PlayerPreLoginEvent.Result.ALLOWED) {
-+                disconnect(event.getKickMessage());
++                this.disconnect(event.getKickMessage());
 +                return;
 +            }
 +        } else {
 +            if (asyncEvent.getLoginResult() != AsyncPlayerPreLoginEvent.Result.ALLOWED) {
-+                disconnect(asyncEvent.getKickMessage());
++                this.disconnect(asyncEvent.getKickMessage());
 +                return;
 +            }
 +        }
@@ -208,14 +227,14 @@
 +    // CraftBukkit end
 +
      @Override
-     public void handleCustomQueryPacket(ServerboundCustomQueryAnswerPacket serverboundcustomqueryanswerpacket) {
+     public void handleCustomQueryPacket(ServerboundCustomQueryAnswerPacket packet) {
          this.disconnect(ServerCommonPacketListenerImpl.DISCONNECT_UNEXPECTED_QUERY);
-@@ -245,10 +371,11 @@
+@@ -245,10 +369,11 @@
  
      @Override
-     public void handleLoginAcknowledgement(ServerboundLoginAcknowledgedPacket serverboundloginacknowledgedpacket) {
-+        PlayerConnectionUtils.ensureRunningOnSameThread(serverboundloginacknowledgedpacket, this, this.server); // CraftBukkit
-         Validate.validState(this.state == LoginListener.EnumProtocolState.PROTOCOL_SWITCHING, "Unexpected login acknowledgement packet", new Object[0]);
+     public void handleLoginAcknowledgement(ServerboundLoginAcknowledgedPacket packet) {
++        PacketUtils.ensureRunningOnSameThread(packet, this, this.server); // CraftBukkit
+         Validate.validState(this.state == ServerLoginPacketListenerImpl.State.PROTOCOL_SWITCHING, "Unexpected login acknowledgement packet", new Object[0]);
          this.connection.setupOutboundProtocol(ConfigurationProtocols.CLIENTBOUND);
          CommonListenerCookie commonlistenercookie = CommonListenerCookie.createInitial((GameProfile) Objects.requireNonNull(this.authenticatedProfile), this.transferred);
 -        ServerConfigurationPacketListenerImpl serverconfigurationpacketlistenerimpl = new ServerConfigurationPacketListenerImpl(this.server, this.connection, commonlistenercookie);
@@ -223,23 +242,23 @@
  
          this.connection.setupInboundProtocol(ConfigurationProtocols.SERVERBOUND, serverconfigurationpacketlistenerimpl);
          serverconfigurationpacketlistenerimpl.startConfiguration();
-@@ -264,12 +391,18 @@
+@@ -264,12 +389,18 @@
  
      @Override
-     public void handleCookieResponse(ServerboundCookieResponsePacket serverboundcookieresponsepacket) {
+     public void handleCookieResponse(ServerboundCookieResponsePacket packet) {
 +        // CraftBukkit start
-+        PlayerConnectionUtils.ensureRunningOnSameThread(serverboundcookieresponsepacket, this, this.server);
-+        if (this.player != null && this.player.getBukkitEntity().handleCookieResponse(serverboundcookieresponsepacket)) {
++        PacketUtils.ensureRunningOnSameThread(packet, this, this.server);
++        if (this.player != null && this.player.getBukkitEntity().handleCookieResponse(packet)) {
 +            return;
 +        }
 +        // CraftBukkit end
          this.disconnect(ServerCommonPacketListenerImpl.DISCONNECT_UNEXPECTED_QUERY);
      }
  
-     private static enum EnumProtocolState {
+     public static enum State {
  
 -        HELLO, KEY, AUTHENTICATING, NEGOTIATING, VERIFYING, WAITING_FOR_DUPE_DISCONNECT, PROTOCOL_SWITCHING, ACCEPTED;
 +        HELLO, KEY, AUTHENTICATING, NEGOTIATING, VERIFYING, WAITING_FOR_COOKIES, WAITING_FOR_DUPE_DISCONNECT, PROTOCOL_SWITCHING, ACCEPTED; // CraftBukkit
  
-         private EnumProtocolState() {}
+         private State() {}
      }
diff --git a/paper-server/patches/sources/net/minecraft/server/network/PacketStatusListener.patch b/paper-server/patches/sources/net/minecraft/server/network/ServerStatusPacketListenerImpl.java.patch
similarity index 69%
rename from paper-server/patches/sources/net/minecraft/server/network/PacketStatusListener.patch
rename to paper-server/patches/sources/net/minecraft/server/network/ServerStatusPacketListenerImpl.java.patch
index 0448615e31..244b467dfa 100644
--- a/paper-server/patches/sources/net/minecraft/server/network/PacketStatusListener.patch
+++ b/paper-server/patches/sources/net/minecraft/server/network/ServerStatusPacketListenerImpl.java.patch
@@ -1,9 +1,9 @@
---- a/net/minecraft/server/network/PacketStatusListener.java
-+++ b/net/minecraft/server/network/PacketStatusListener.java
-@@ -10,6 +10,21 @@
- import net.minecraft.network.protocol.status.PacketStatusOutServerInfo;
- import net.minecraft.network.protocol.status.ServerPing;
- 
+--- a/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
++++ b/net/minecraft/server/network/ServerStatusPacketListenerImpl.java
+@@ -9,6 +9,19 @@
+ import net.minecraft.network.protocol.status.ServerStatus;
+ import net.minecraft.network.protocol.status.ServerStatusPacketListener;
+ import net.minecraft.network.protocol.status.ServerboundStatusRequestPacket;
 +// CraftBukkit start
 +import com.mojang.authlib.GameProfile;
 +import java.net.InetSocketAddress;
@@ -11,22 +11,20 @@
 +import java.util.Iterator;
 +import java.util.Optional;
 +import net.minecraft.SharedConstants;
-+import net.minecraft.network.protocol.status.ServerPing;
 +import net.minecraft.server.MinecraftServer;
-+import net.minecraft.server.level.EntityPlayer;
++import net.minecraft.server.level.ServerPlayer;
 +import org.bukkit.craftbukkit.util.CraftChatMessage;
 +import org.bukkit.craftbukkit.util.CraftIconCache;
 +import org.bukkit.entity.Player;
 +// CraftBukkit end
-+
- public class PacketStatusListener implements PacketStatusInListener {
  
-     private static final IChatBaseComponent DISCONNECT_REASON = IChatBaseComponent.translatable("multiplayer.status.request_handled");
-@@ -36,7 +51,101 @@
-             this.connection.disconnect(PacketStatusListener.DISCONNECT_REASON);
+ public class ServerStatusPacketListenerImpl implements ServerStatusPacketListener {
+ 
+@@ -36,7 +49,101 @@
+             this.connection.disconnect(ServerStatusPacketListenerImpl.DISCONNECT_REASON);
          } else {
              this.hasRequestedStatus = true;
--            this.connection.send(new PacketStatusOutServerInfo(this.status));
+-            this.connection.send(new ClientboundStatusResponsePacket(this.status));
 +            // CraftBukkit start
 +            // this.connection.send(new PacketStatusOutServerInfo(this.status));
 +            MinecraftServer server = MinecraftServer.getServer();
@@ -36,7 +34,7 @@
 +                CraftIconCache icon = server.server.getServerIcon();
 +
 +                ServerListPingEvent() {
-+                    super(connection.hostname, ((InetSocketAddress) connection.getRemoteAddress()).getAddress(), server.getMotd(), server.getPlayerList().getMaxPlayers());
++                    super(ServerStatusPacketListenerImpl.this.connection.hostname, ((InetSocketAddress) ServerStatusPacketListenerImpl.this.connection.getRemoteAddress()).getAddress(), server.getMotd(), server.getPlayerList().getMaxPlayers());
 +                }
 +
 +                @Override
@@ -52,16 +50,16 @@
 +                    return new Iterator<Player>() {
 +                        int i;
 +                        int ret = Integer.MIN_VALUE;
-+                        EntityPlayer player;
++                        ServerPlayer player;
 +
 +                        @Override
 +                        public boolean hasNext() {
-+                            if (player != null) {
++                            if (this.player != null) {
 +                                return true;
 +                            }
 +                            final Object[] currentPlayers = players;
 +                            for (int length = currentPlayers.length, i = this.i; i < length; i++) {
-+                                final EntityPlayer player = (EntityPlayer) currentPlayers[i];
++                                final ServerPlayer player = (ServerPlayer) currentPlayers[i];
 +                                if (player != null) {
 +                                    this.i = i + 1;
 +                                    this.player = player;
@@ -73,10 +71,10 @@
 +
 +                        @Override
 +                        public Player next() {
-+                            if (!hasNext()) {
++                            if (!this.hasNext()) {
 +                                throw new java.util.NoSuchElementException();
 +                            }
-+                            final EntityPlayer player = this.player;
++                            final ServerPlayer player = this.player;
 +                            this.player = null;
 +                            this.ret = this.i - 1;
 +                            return player.getBukkitEntity();
@@ -101,7 +99,7 @@
 +            java.util.List<GameProfile> profiles = new java.util.ArrayList<GameProfile>(players.length);
 +            for (Object player : players) {
 +                if (player != null) {
-+                    EntityPlayer entityPlayer = ((EntityPlayer) player);
++                    ServerPlayer entityPlayer = ((ServerPlayer) player);
 +                    if (entityPlayer.allowsListing()) {
 +                        profiles.add(entityPlayer.getGameProfile());
 +                    } else {
@@ -110,17 +108,17 @@
 +                }
 +            }
 +
-+            ServerPing.ServerPingPlayerSample playerSample = new ServerPing.ServerPingPlayerSample(event.getMaxPlayers(), event.getNumPlayers(), (server.hidesOnlinePlayers()) ? Collections.emptyList() : profiles);
++            ServerStatus.Players playerSample = new ServerStatus.Players(event.getMaxPlayers(), event.getNumPlayers(), (server.hidesOnlinePlayers()) ? Collections.emptyList() : profiles);
 +
-+            ServerPing ping = new ServerPing(
++            ServerStatus ping = new ServerStatus(
 +                    CraftChatMessage.fromString(event.getMotd(), true)[0],
 +                    Optional.of(playerSample),
-+                    Optional.of(new ServerPing.ServerData(server.getServerModName() + " " + server.getServerVersion(), SharedConstants.getCurrentVersion().getProtocolVersion())),
-+                    (event.icon.value != null) ? Optional.of(new ServerPing.a(event.icon.value)) : Optional.empty(),
++                    Optional.of(new ServerStatus.Version(server.getServerModName() + " " + server.getServerVersion(), SharedConstants.getCurrentVersion().getProtocolVersion())),
++                    (event.icon.value != null) ? Optional.of(new ServerStatus.Favicon(event.icon.value)) : Optional.empty(),
 +                    server.enforceSecureProfile()
 +            );
 +
-+            this.connection.send(new PacketStatusOutServerInfo(ping));
++            this.connection.send(new ClientboundStatusResponsePacket(ping));
 +            // CraftBukkit end
          }
      }
diff --git a/paper-server/patches/sources/net/minecraft/server/players/BanListEntry.java.patch b/paper-server/patches/sources/net/minecraft/server/players/BanListEntry.java.patch
new file mode 100644
index 0000000000..205eaad746
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/players/BanListEntry.java.patch
@@ -0,0 +1,34 @@
+--- a/net/minecraft/server/players/BanListEntry.java
++++ b/net/minecraft/server/players/BanListEntry.java
+@@ -27,7 +27,7 @@
+     }
+ 
+     protected BanListEntry(@Nullable T key, JsonObject json) {
+-        super(key);
++        super(BanListEntry.checkExpiry(key, json)); // CraftBukkit
+ 
+         Date date;
+ 
+@@ -83,4 +83,22 @@
+         json.addProperty("expires", this.expires == null ? "forever" : BanListEntry.DATE_FORMAT.format(this.expires));
+         json.addProperty("reason", this.reason);
+     }
++
++    // CraftBukkit start
++    private static <T> T checkExpiry(T object, JsonObject jsonobject) {
++        Date expires = null;
++
++        try {
++            expires = jsonobject.has("expires") ? BanListEntry.DATE_FORMAT.parse(jsonobject.get("expires").getAsString()) : null;
++        } catch (ParseException ex) {
++            // Guess we don't have a date
++        }
++
++        if (expires == null || expires.after(new Date())) {
++            return object;
++        } else {
++            return null;
++        }
++    }
++    // CraftBukkit end
+ }
diff --git a/paper-server/patches/sources/net/minecraft/server/players/ExpirableListEntry.patch b/paper-server/patches/sources/net/minecraft/server/players/ExpirableListEntry.patch
deleted file mode 100644
index 4291c54428..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/players/ExpirableListEntry.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- a/net/minecraft/server/players/ExpirableListEntry.java
-+++ b/net/minecraft/server/players/ExpirableListEntry.java
-@@ -27,7 +27,7 @@
-     }
- 
-     protected ExpirableListEntry(@Nullable T t0, JsonObject jsonobject) {
--        super(t0);
-+        super(checkExpiry(t0, jsonobject)); // CraftBukkit
- 
-         Date date;
- 
-@@ -83,4 +83,22 @@
-         jsonobject.addProperty("expires", this.expires == null ? "forever" : ExpirableListEntry.DATE_FORMAT.format(this.expires));
-         jsonobject.addProperty("reason", this.reason);
-     }
-+
-+    // CraftBukkit start
-+    private static <T> T checkExpiry(T object, JsonObject jsonobject) {
-+        Date expires = null;
-+
-+        try {
-+            expires = jsonobject.has("expires") ? DATE_FORMAT.parse(jsonobject.get("expires").getAsString()) : null;
-+        } catch (ParseException ex) {
-+            // Guess we don't have a date
-+        }
-+
-+        if (expires == null || expires.after(new Date())) {
-+            return object;
-+        } else {
-+            return null;
-+        }
-+    }
-+    // CraftBukkit end
- }
diff --git a/paper-server/patches/sources/net/minecraft/server/players/GameProfileBanEntry.patch b/paper-server/patches/sources/net/minecraft/server/players/GameProfileBanEntry.patch
deleted file mode 100644
index ccd98b70e1..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/players/GameProfileBanEntry.patch
+++ /dev/null
@@ -1,7 +0,0 @@
---- a/net/minecraft/server/players/GameProfileBanEntry.java
-+++ b/net/minecraft/server/players/GameProfileBanEntry.java
-@@ -1,3 +1,4 @@
-+// mc-dev import
- package net.minecraft.server.players;
- 
- import com.google.gson.JsonObject;
diff --git a/paper-server/patches/sources/net/minecraft/server/players/UserCache.patch b/paper-server/patches/sources/net/minecraft/server/players/GameProfileCache.java.patch
similarity index 56%
rename from paper-server/patches/sources/net/minecraft/server/players/UserCache.patch
rename to paper-server/patches/sources/net/minecraft/server/players/GameProfileCache.java.patch
index 3199cd6eab..331384a555 100644
--- a/paper-server/patches/sources/net/minecraft/server/players/UserCache.patch
+++ b/paper-server/patches/sources/net/minecraft/server/players/GameProfileCache.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/server/players/UserCache.java
-+++ b/net/minecraft/server/players/UserCache.java
+--- a/net/minecraft/server/players/GameProfileCache.java
++++ b/net/minecraft/server/players/GameProfileCache.java
 @@ -85,7 +85,7 @@
                  }
  
@@ -13,8 +13,8 @@
              usercache_usercacheentry.setLastAccess(this.getNextOperation());
              optional = Optional.of(usercache_usercacheentry.getProfile());
          } else {
--            optional = lookupGameProfile(this.profileRepository, s1);
-+            optional = lookupGameProfile(this.profileRepository, s); // CraftBukkit - use correct case for offline players
+-            optional = GameProfileCache.lookupGameProfile(this.profileRepository, s1);
++            optional = GameProfileCache.lookupGameProfile(this.profileRepository, name); // CraftBukkit - use correct case for offline players
              if (optional.isPresent()) {
                  this.add((GameProfile) optional.get());
                  flag = false;
@@ -23,16 +23,16 @@
              label54:
              {
 -                ArrayList arraylist;
-+                List<UserCache.UserCacheEntry> arraylist; // CraftBukkit - decompile error
++                List<GameProfileCache.GameProfileInfo> arraylist; // CraftBukkit - decompile error
  
                  try {
                      JsonArray jsonarray = (JsonArray) this.gson.fromJson(bufferedreader, JsonArray.class);
 @@ -217,7 +217,7 @@
-                         DateFormat dateformat = createDateFormat();
+                         DateFormat dateformat = GameProfileCache.createDateFormat();
  
                          jsonarray.forEach((jsonelement) -> {
--                            Optional optional = readGameProfile(jsonelement, dateformat);
-+                            Optional<UserCache.UserCacheEntry> optional = readGameProfile(jsonelement, dateformat); // CraftBukkit - decompile error
+-                            Optional optional = GameProfileCache.readGameProfile(jsonelement, dateformat);
++                            Optional<GameProfileCache.GameProfileInfo> optional = GameProfileCache.readGameProfile(jsonelement, dateformat); // CraftBukkit - decompile error
  
                              Objects.requireNonNull(list);
                              optional.ifPresent(list::add);
diff --git a/paper-server/patches/sources/net/minecraft/server/players/NameReferencingFileConverter.patch b/paper-server/patches/sources/net/minecraft/server/players/NameReferencingFileConverter.patch
deleted file mode 100644
index 57e1d5a7c4..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/players/NameReferencingFileConverter.patch
+++ /dev/null
@@ -1,82 +0,0 @@
---- a/net/minecraft/server/players/NameReferencingFileConverter.java
-+++ b/net/minecraft/server/players/NameReferencingFileConverter.java
-@@ -27,6 +27,12 @@
- import net.minecraft.world.level.storage.SavedFile;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import net.minecraft.nbt.NBTCompressedStreamTools;
-+import net.minecraft.nbt.NBTReadLimiter;
-+import net.minecraft.nbt.NBTTagCompound;
-+// CraftBukkit end
-+
- public class NameReferencingFileConverter {
- 
-     static final Logger LOGGER = LogUtils.getLogger();
-@@ -85,7 +91,7 @@
-                 try {
-                     gameprofilebanlist.load();
-                 } catch (IOException ioexception) {
--                    NameReferencingFileConverter.LOGGER.warn("Could not load existing file {}", gameprofilebanlist.getFile().getName(), ioexception);
-+                    NameReferencingFileConverter.LOGGER.warn("Could not load existing file {}", gameprofilebanlist.getFile().getName()); // CraftBukkit - don't print stacktrace
-                 }
-             }
- 
-@@ -143,7 +149,7 @@
-                 try {
-                     ipbanlist.load();
-                 } catch (IOException ioexception) {
--                    NameReferencingFileConverter.LOGGER.warn("Could not load existing file {}", ipbanlist.getFile().getName(), ioexception);
-+                    NameReferencingFileConverter.LOGGER.warn("Could not load existing file {}", ipbanlist.getFile().getName()); // CraftBukkit - don't print stacktrace
-                 }
-             }
- 
-@@ -184,7 +190,7 @@
-                 try {
-                     oplist.load();
-                 } catch (IOException ioexception) {
--                    NameReferencingFileConverter.LOGGER.warn("Could not load existing file {}", oplist.getFile().getName(), ioexception);
-+                    NameReferencingFileConverter.LOGGER.warn("Could not load existing file {}", oplist.getFile().getName()); // CraftBukkit - don't print stacktrace
-                 }
-             }
- 
-@@ -228,7 +234,7 @@
-                 try {
-                     whitelist.load();
-                 } catch (IOException ioexception) {
--                    NameReferencingFileConverter.LOGGER.warn("Could not load existing file {}", whitelist.getFile().getName(), ioexception);
-+                    NameReferencingFileConverter.LOGGER.warn("Could not load existing file {}", whitelist.getFile().getName()); // CraftBukkit - don't print stacktrace
-                 }
-             }
- 
-@@ -347,6 +353,30 @@
-                         File file5 = new File(file, s2 + ".dat");
-                         File file6 = new File(file4, s3 + ".dat");
- 
-+                        // CraftBukkit start - Use old file name to seed lastKnownName
-+                        NBTTagCompound root = null;
-+
-+                        try {
-+                            root = NBTCompressedStreamTools.readCompressed(new java.io.FileInputStream(file5), NBTReadLimiter.unlimitedHeap());
-+                        } catch (Exception exception) {
-+                            exception.printStackTrace();
-+                        }
-+
-+                        if (root != null) {
-+                            if (!root.contains("bukkit")) {
-+                                root.put("bukkit", new NBTTagCompound());
-+                            }
-+                            NBTTagCompound data = root.getCompound("bukkit");
-+                            data.putString("lastKnownName", s2);
-+
-+                            try {
-+                                NBTCompressedStreamTools.writeCompressed(root, new java.io.FileOutputStream(file2));
-+                            } catch (Exception exception) {
-+                                exception.printStackTrace();
-+                            }
-+                       }
-+                        // CraftBukkit end
-+
-                         NameReferencingFileConverter.ensureDirectoryExists(file4);
-                         if (!file5.renameTo(file6)) {
-                             throw new NameReferencingFileConverter.FileConversionException("Could not convert file for " + s2);
diff --git a/paper-server/patches/sources/net/minecraft/server/players/OldUsersConverter.java.patch b/paper-server/patches/sources/net/minecraft/server/players/OldUsersConverter.java.patch
new file mode 100644
index 0000000000..3cc118dd0f
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/players/OldUsersConverter.java.patch
@@ -0,0 +1,79 @@
+--- a/net/minecraft/server/players/OldUsersConverter.java
++++ b/net/minecraft/server/players/OldUsersConverter.java
+@@ -21,6 +21,9 @@
+ import java.util.UUID;
+ import javax.annotation.Nullable;
+ import net.minecraft.core.UUIDUtil;
++import net.minecraft.nbt.CompoundTag;
++import net.minecraft.nbt.NbtAccounter;
++import net.minecraft.nbt.NbtIo;
+ import net.minecraft.server.MinecraftServer;
+ import net.minecraft.server.dedicated.DedicatedServer;
+ import net.minecraft.util.StringUtil;
+@@ -85,7 +88,7 @@
+                 try {
+                     gameprofilebanlist.load();
+                 } catch (IOException ioexception) {
+-                    OldUsersConverter.LOGGER.warn("Could not load existing file {}", gameprofilebanlist.getFile().getName(), ioexception);
++                    OldUsersConverter.LOGGER.warn("Could not load existing file {}", gameprofilebanlist.getFile().getName()); // CraftBukkit - don't print stacktrace
+                 }
+             }
+ 
+@@ -143,7 +146,7 @@
+                 try {
+                     ipbanlist.load();
+                 } catch (IOException ioexception) {
+-                    OldUsersConverter.LOGGER.warn("Could not load existing file {}", ipbanlist.getFile().getName(), ioexception);
++                    OldUsersConverter.LOGGER.warn("Could not load existing file {}", ipbanlist.getFile().getName()); // CraftBukkit - don't print stacktrace
+                 }
+             }
+ 
+@@ -184,7 +187,7 @@
+                 try {
+                     oplist.load();
+                 } catch (IOException ioexception) {
+-                    OldUsersConverter.LOGGER.warn("Could not load existing file {}", oplist.getFile().getName(), ioexception);
++                    OldUsersConverter.LOGGER.warn("Could not load existing file {}", oplist.getFile().getName()); // CraftBukkit - don't print stacktrace
+                 }
+             }
+ 
+@@ -228,7 +231,7 @@
+                 try {
+                     whitelist.load();
+                 } catch (IOException ioexception) {
+-                    OldUsersConverter.LOGGER.warn("Could not load existing file {}", whitelist.getFile().getName(), ioexception);
++                    OldUsersConverter.LOGGER.warn("Could not load existing file {}", whitelist.getFile().getName()); // CraftBukkit - don't print stacktrace
+                 }
+             }
+ 
+@@ -347,6 +350,30 @@
+                         File file5 = new File(file, fileName + ".dat");
+                         File file6 = new File(playerDataFolder, uuid + ".dat");
+ 
++                        // CraftBukkit start - Use old file name to seed lastKnownName
++                        CompoundTag root = null;
++
++                        try {
++                            root = NbtIo.readCompressed(new java.io.FileInputStream(file5), NbtAccounter.unlimitedHeap());
++                        } catch (Exception exception) {
++                            exception.printStackTrace();
++                        }
++
++                        if (root != null) {
++                            if (!root.contains("bukkit")) {
++                                root.put("bukkit", new CompoundTag());
++                            }
++                            CompoundTag data = root.getCompound("bukkit");
++                            data.putString("lastKnownName", fileName);
++
++                            try {
++                                NbtIo.writeCompressed(root, new java.io.FileOutputStream(file2));
++                            } catch (Exception exception) {
++                                exception.printStackTrace();
++                            }
++                       }
++                        // CraftBukkit end
++
+                         OldUsersConverter.ensureDirectoryExists(playerDataFolder);
+                         if (!file5.renameTo(file6)) {
+                             throw new OldUsersConverter.ConversionError("Could not convert file for " + fileName);
diff --git a/paper-server/patches/sources/net/minecraft/server/players/PlayerList.java.patch b/paper-server/patches/sources/net/minecraft/server/players/PlayerList.java.patch
new file mode 100644
index 0000000000..d6ace8786e
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/players/PlayerList.java.patch
@@ -0,0 +1,911 @@
+--- a/net/minecraft/server/players/PlayerList.java
++++ b/net/minecraft/server/players/PlayerList.java
+@@ -76,6 +76,7 @@
+ import net.minecraft.server.level.ServerPlayer;
+ import net.minecraft.server.network.CommonListenerCookie;
+ import net.minecraft.server.network.ServerGamePacketListenerImpl;
++import net.minecraft.server.network.ServerLoginPacketListenerImpl;
+ import net.minecraft.sounds.SoundEvents;
+ import net.minecraft.sounds.SoundSource;
+ import net.minecraft.stats.ServerStatsCounter;
+@@ -84,7 +85,6 @@
+ import net.minecraft.world.effect.MobEffectInstance;
+ import net.minecraft.world.entity.Entity;
+ import net.minecraft.world.entity.LivingEntity;
+-import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.entity.projectile.ThrownEnderpearl;
+ import net.minecraft.world.item.crafting.RecipeManager;
+ import net.minecraft.world.level.GameRules;
+@@ -104,6 +104,26 @@
+ import net.minecraft.world.scores.PlayerTeam;
+ import org.slf4j.Logger;
+ 
++// CraftBukkit start
++import java.util.stream.Collectors;
++import net.minecraft.server.dedicated.DedicatedServer;
++import org.bukkit.Location;
++import org.bukkit.craftbukkit.CraftServer;
++import org.bukkit.craftbukkit.CraftWorld;
++import org.bukkit.craftbukkit.entity.CraftPlayer;
++import org.bukkit.craftbukkit.util.CraftChatMessage;
++import org.bukkit.craftbukkit.util.CraftLocation;
++import org.bukkit.entity.Player;
++import org.bukkit.event.entity.EntityRemoveEvent;
++import org.bukkit.event.player.PlayerChangedWorldEvent;
++import org.bukkit.event.player.PlayerJoinEvent;
++import org.bukkit.event.player.PlayerLoginEvent;
++import org.bukkit.event.player.PlayerQuitEvent;
++import org.bukkit.event.player.PlayerRespawnEvent;
++import org.bukkit.event.player.PlayerRespawnEvent.RespawnReason;
++import org.bukkit.event.player.PlayerSpawnChangeEvent;
++// CraftBukkit end
++
+ public abstract class PlayerList {
+ 
+     public static final File USERBANLIST_FILE = new File("banned-players.json");
+@@ -116,14 +136,16 @@
+     private static final int SEND_PLAYER_INFO_INTERVAL = 600;
+     private static final SimpleDateFormat BAN_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd 'at' HH:mm:ss z");
+     private final MinecraftServer server;
+-    public final List<ServerPlayer> players = Lists.newArrayList();
++    public final List<ServerPlayer> players = new java.util.concurrent.CopyOnWriteArrayList(); // CraftBukkit - ArrayList -> CopyOnWriteArrayList: Iterator safety
+     private final Map<UUID, ServerPlayer> playersByUUID = Maps.newHashMap();
+     private final UserBanList bans;
+     private final IpBanList ipBans;
+     private final ServerOpList ops;
+     private final UserWhiteList whitelist;
+-    private final Map<UUID, ServerStatsCounter> stats;
+-    private final Map<UUID, PlayerAdvancements> advancements;
++    // CraftBukkit start
++    // private final Map<UUID, ServerStatisticManager> stats;
++    // private final Map<UUID, AdvancementDataPlayer> advancements;
++    // CraftBukkit end
+     public final PlayerDataStorage playerIo;
+     private boolean doWhiteList;
+     private final LayeredRegistryAccess<RegistryLayer> registries;
+@@ -134,13 +156,23 @@
+     private static final boolean ALLOW_LOGOUTIVATOR = false;
+     private int sendAllPlayerInfoIn;
+ 
++    // CraftBukkit start
++    private CraftServer cserver;
++
+     public PlayerList(MinecraftServer server, LayeredRegistryAccess<RegistryLayer> registryManager, PlayerDataStorage saveHandler, int maxPlayers) {
++        this.cserver = server.server = new CraftServer((DedicatedServer) server, this);
++        server.console = org.bukkit.craftbukkit.command.ColouredConsoleSender.getInstance();
++        server.reader.addCompleter(new org.bukkit.craftbukkit.command.ConsoleCommandCompleter(server.server));
++        // CraftBukkit end
++
+         this.bans = new UserBanList(PlayerList.USERBANLIST_FILE);
+         this.ipBans = new IpBanList(PlayerList.IPBANLIST_FILE);
+         this.ops = new ServerOpList(PlayerList.OPLIST_FILE);
+         this.whitelist = new UserWhiteList(PlayerList.WHITELIST_FILE);
+-        this.stats = Maps.newHashMap();
+-        this.advancements = Maps.newHashMap();
++        // CraftBukkit start
++        // this.stats = Maps.newHashMap();
++        // this.advancements = Maps.newHashMap();
++        // CraftBukkit end
+         this.server = server;
+         this.registries = registryManager;
+         this.maxPlayers = maxPlayers;
+@@ -150,25 +182,34 @@
+     public void placeNewPlayer(Connection connection, ServerPlayer player, CommonListenerCookie clientData) {
+         GameProfile gameprofile = player.getGameProfile();
+         GameProfileCache usercache = this.server.getProfileCache();
+-        Optional optional;
++        // Optional optional; // CraftBukkit - decompile error
+         String s;
+ 
+         if (usercache != null) {
+-            optional = usercache.get(gameprofile.getId());
++            Optional<GameProfile> optional = usercache.get(gameprofile.getId()); // CraftBukkit - decompile error
+             s = (String) optional.map(GameProfile::getName).orElse(gameprofile.getName());
+             usercache.add(gameprofile);
+         } else {
+             s = gameprofile.getName();
+         }
+ 
+-        optional = this.load(player);
++        Optional<CompoundTag> optional = this.load(player); // CraftBukkit - decompile error
++        // CraftBukkit start - Better rename detection
++        if (optional.isPresent()) {
++            CompoundTag nbttagcompound = optional.get();
++            if (nbttagcompound.contains("bukkit")) {
++                CompoundTag bukkit = nbttagcompound.getCompound("bukkit");
++                s = bukkit.contains("lastKnownName", 8) ? bukkit.getString("lastKnownName") : s;
++            }
++        }
++        // CraftBukkit end
+         ResourceKey<Level> resourcekey = (ResourceKey) optional.flatMap((nbttagcompound) -> {
+-            DataResult dataresult = DimensionType.parseLegacy(new Dynamic(NbtOps.INSTANCE, nbttagcompound.get("Dimension")));
++            DataResult<ResourceKey<Level>> dataresult = DimensionType.parseLegacy(new Dynamic(NbtOps.INSTANCE, nbttagcompound.get("Dimension"))); // CraftBukkit - decompile error
+             Logger logger = PlayerList.LOGGER;
+ 
+             Objects.requireNonNull(logger);
+             return dataresult.resultOrPartial(logger::error);
+-        }).orElse(Level.OVERWORLD);
++        }).orElse(player.serverLevel().dimension()); // CraftBukkit - SPIGOT-7507: If no dimension, fall back to existing dimension loaded from "WorldUUID", which in turn defaults to World.OVERWORLD
+         ServerLevel worldserver = this.server.getLevel(resourcekey);
+         ServerLevel worldserver1;
+ 
+@@ -182,10 +223,11 @@
+         player.setServerLevel(worldserver1);
+         String s1 = connection.getLoggableAddress(this.server.logIPs());
+ 
+-        PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ({}, {}, {})", new Object[]{player.getName().getString(), s1, player.getId(), player.getX(), player.getY(), player.getZ()});
++        // CraftBukkit - Moved message to after join
++        // PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ({}, {}, {})", new Object[]{entityplayer.getName().getString(), s1, entityplayer.getId(), entityplayer.getX(), entityplayer.getY(), entityplayer.getZ()});
+         LevelData worlddata = worldserver1.getLevelData();
+ 
+-        player.loadGameTypes((CompoundTag) optional.orElse((Object) null));
++        player.loadGameTypes((CompoundTag) optional.orElse(null)); // CraftBukkit - decompile error
+         ServerGamePacketListenerImpl playerconnection = new ServerGamePacketListenerImpl(this.server, connection, player, clientData);
+ 
+         connection.setupInboundProtocol(GameProtocols.SERVERBOUND_TEMPLATE.bind(RegistryFriendlyByteBuf.decorator(this.server.registryAccess())), playerconnection);
+@@ -195,6 +237,7 @@
+         boolean flag2 = gamerules.getBoolean(GameRules.RULE_LIMITED_CRAFTING);
+ 
+         playerconnection.send(new ClientboundLoginPacket(player.getId(), worlddata.isHardcore(), this.server.levelKeys(), this.getMaxPlayers(), this.viewDistance, this.simulationDistance, flag1, !flag, flag2, player.createCommonSpawnInfo(worldserver1), this.server.enforceSecureProfile()));
++        player.getBukkitEntity().sendSupportedChannels(); // CraftBukkit
+         playerconnection.send(new ClientboundChangeDifficultyPacket(worlddata.getDifficulty(), worlddata.isDifficultyLocked()));
+         playerconnection.send(new ClientboundPlayerAbilitiesPacket(player.getAbilities()));
+         playerconnection.send(new ClientboundSetHeldSlotPacket(player.getInventory().selected));
+@@ -213,8 +256,10 @@
+         } else {
+             ichatmutablecomponent = Component.translatable("multiplayer.player.joined.renamed", player.getDisplayName(), s);
+         }
++        // CraftBukkit start
++        ichatmutablecomponent.withStyle(ChatFormatting.YELLOW);
++        String joinMessage = CraftChatMessage.fromComponent(ichatmutablecomponent);
+ 
+-        this.broadcastSystemMessage(ichatmutablecomponent.withStyle(ChatFormatting.YELLOW), false);
+         playerconnection.teleport(player.getX(), player.getY(), player.getZ(), player.getYRot(), player.getXRot());
+         ServerStatus serverping = this.server.getStatus();
+ 
+@@ -222,17 +267,70 @@
+             player.sendServerStatus(serverping);
+         }
+ 
+-        player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(this.players));
++        // entityplayer.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(this.players)); // CraftBukkit - replaced with loop below
+         this.players.add(player);
+         this.playersByUUID.put(player.getUUID(), player);
+-        this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(player)));
++        // this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer))); // CraftBukkit - replaced with loop below
++
++        // CraftBukkit start
++        CraftPlayer bukkitPlayer = player.getBukkitEntity();
++
++        // Ensure that player inventory is populated with its viewer
++        player.containerMenu.transferTo(player.containerMenu, bukkitPlayer);
++
++        PlayerJoinEvent playerJoinEvent = new PlayerJoinEvent(bukkitPlayer, joinMessage);
++        this.cserver.getPluginManager().callEvent(playerJoinEvent);
++
++        if (!player.connection.isAcceptingMessages()) {
++            return;
++        }
++
++        joinMessage = playerJoinEvent.getJoinMessage();
++
++        if (joinMessage != null && joinMessage.length() > 0) {
++            for (Component line : org.bukkit.craftbukkit.util.CraftChatMessage.fromString(joinMessage)) {
++                this.server.getPlayerList().broadcastSystemMessage(line, false);
++            }
++        }
++        // CraftBukkit end
++
++        // CraftBukkit start - sendAll above replaced with this loop
++        ClientboundPlayerInfoUpdatePacket packet = ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(player));
++
++        for (int i = 0; i < this.players.size(); ++i) {
++            ServerPlayer entityplayer1 = (ServerPlayer) this.players.get(i);
++
++            if (entityplayer1.getBukkitEntity().canSee(bukkitPlayer)) {
++                entityplayer1.connection.send(packet);
++            }
++
++            if (!bukkitPlayer.canSee(entityplayer1.getBukkitEntity())) {
++                continue;
++            }
++
++            player.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer1)));
++        }
++        player.sentListPacket = true;
++        // CraftBukkit end
++
++        player.refreshEntityData(player); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn
++
+         this.sendLevelInfo(player, worldserver1);
+-        worldserver1.addNewPlayer(player);
+-        this.server.getCustomBossEvents().onPlayerConnect(player);
++
++        // CraftBukkit start - Only add if the player wasn't moved in the event
++        if (player.level() == worldserver1 && !worldserver1.players().contains(player)) {
++            worldserver1.addNewPlayer(player);
++            this.server.getCustomBossEvents().onPlayerConnect(player);
++        }
++
++        worldserver1 = player.serverLevel(); // CraftBukkit - Update in case join event changed it
++        // CraftBukkit end
+         this.sendActivePlayerEffects(player);
+         player.loadAndSpawnEnderpearls(optional);
+         player.loadAndSpawnParentVehicle(optional);
+         player.initInventoryMenu();
++        // CraftBukkit - Moved from above, added world
++        PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", player.getName().getString(), s1, player.getId(), worldserver1.serverLevelData.getLevelName(), player.getX(), player.getY(), player.getZ());
+     }
+ 
+     public void updateEntireScoreboard(ServerScoreboard scoreboard, ServerPlayer player) {
+@@ -269,30 +367,31 @@
+     }
+ 
+     public void addWorldborderListener(ServerLevel world) {
++        if (this.playerIo != null) return; // CraftBukkit
+         world.getWorldBorder().addListener(new BorderChangeListener() {
+             @Override
+             public void onBorderSizeSet(WorldBorder border, double size) {
+-                PlayerList.this.broadcastAll(new ClientboundSetBorderSizePacket(border));
++                PlayerList.this.broadcastAll(new ClientboundSetBorderSizePacket(border), border.world); // CraftBukkit
+             }
+ 
+             @Override
+             public void onBorderSizeLerping(WorldBorder border, double fromSize, double toSize, long time) {
+-                PlayerList.this.broadcastAll(new ClientboundSetBorderLerpSizePacket(border));
++                PlayerList.this.broadcastAll(new ClientboundSetBorderLerpSizePacket(border), border.world); // CraftBukkit
+             }
+ 
+             @Override
+             public void onBorderCenterSet(WorldBorder border, double centerX, double centerZ) {
+-                PlayerList.this.broadcastAll(new ClientboundSetBorderCenterPacket(border));
++                PlayerList.this.broadcastAll(new ClientboundSetBorderCenterPacket(border), border.world); // CraftBukkit
+             }
+ 
+             @Override
+             public void onBorderSetWarningTime(WorldBorder border, int warningTime) {
+-                PlayerList.this.broadcastAll(new ClientboundSetBorderWarningDelayPacket(border));
++                PlayerList.this.broadcastAll(new ClientboundSetBorderWarningDelayPacket(border), border.world); // CraftBukkit
+             }
+ 
+             @Override
+             public void onBorderSetWarningBlocks(WorldBorder border, int warningBlockDistance) {
+-                PlayerList.this.broadcastAll(new ClientboundSetBorderWarningDistancePacket(border));
++                PlayerList.this.broadcastAll(new ClientboundSetBorderWarningDistancePacket(border), border.world); // CraftBukkit
+             }
+ 
+             @Override
+@@ -319,14 +418,15 @@
+     }
+ 
+     protected void save(ServerPlayer player) {
++        if (!player.getBukkitEntity().isPersistent()) return; // CraftBukkit
+         this.playerIo.save(player);
+-        ServerStatsCounter serverstatisticmanager = (ServerStatsCounter) this.stats.get(player.getUUID());
++        ServerStatsCounter serverstatisticmanager = (ServerStatsCounter) player.getStats(); // CraftBukkit
+ 
+         if (serverstatisticmanager != null) {
+             serverstatisticmanager.save();
+         }
+ 
+-        PlayerAdvancements advancementdataplayer = (PlayerAdvancements) this.advancements.get(player.getUUID());
++        PlayerAdvancements advancementdataplayer = (PlayerAdvancements) player.getAdvancements(); // CraftBukkit
+ 
+         if (advancementdataplayer != null) {
+             advancementdataplayer.save();
+@@ -334,95 +434,175 @@
+ 
+     }
+ 
+-    public void remove(ServerPlayer player) {
+-        ServerLevel worldserver = player.serverLevel();
++    public String remove(ServerPlayer entityplayer) { // CraftBukkit - return string
++        ServerLevel worldserver = entityplayer.serverLevel();
+ 
+-        player.awardStat(Stats.LEAVE_GAME);
+-        this.save(player);
+-        if (player.isPassenger()) {
+-            Entity entity = player.getRootVehicle();
++        entityplayer.awardStat(Stats.LEAVE_GAME);
+ 
++        // CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it
++        // See SPIGOT-5799, SPIGOT-6145
++        if (entityplayer.containerMenu != entityplayer.inventoryMenu) {
++            entityplayer.closeContainer();
++        }
++
++        PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(entityplayer.getBukkitEntity(), entityplayer.kickLeaveMessage != null ? entityplayer.kickLeaveMessage : "\u00A7e" + entityplayer.getScoreboardName() + " left the game");
++        this.cserver.getPluginManager().callEvent(playerQuitEvent);
++        entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
++
++        entityplayer.doTick(); // SPIGOT-924
++        // CraftBukkit end
++
++        this.save(entityplayer);
++        if (entityplayer.isPassenger()) {
++            Entity entity = entityplayer.getRootVehicle();
++
+             if (entity.hasExactlyOnePlayerPassenger()) {
+                 PlayerList.LOGGER.debug("Removing player mount");
+-                player.stopRiding();
++                entityplayer.stopRiding();
+                 entity.getPassengersAndSelf().forEach((entity1) -> {
+-                    entity1.setRemoved(Entity.RemovalReason.UNLOADED_WITH_PLAYER);
++                    entity1.setRemoved(Entity.RemovalReason.UNLOADED_WITH_PLAYER, EntityRemoveEvent.Cause.PLAYER_QUIT); // CraftBukkit - add Bukkit remove cause
+                 });
+             }
+         }
+ 
+-        player.unRide();
+-        Iterator iterator = player.getEnderPearls().iterator();
++        entityplayer.unRide();
++        Iterator iterator = entityplayer.getEnderPearls().iterator();
+ 
+         while (iterator.hasNext()) {
+             ThrownEnderpearl entityenderpearl = (ThrownEnderpearl) iterator.next();
+ 
+-            entityenderpearl.setRemoved(Entity.RemovalReason.UNLOADED_WITH_PLAYER);
++            entityenderpearl.setRemoved(Entity.RemovalReason.UNLOADED_WITH_PLAYER, EntityRemoveEvent.Cause.PLAYER_QUIT); // CraftBukkit - add Bukkit remove cause
+         }
+ 
+-        worldserver.removePlayerImmediately(player, Entity.RemovalReason.UNLOADED_WITH_PLAYER);
+-        player.getAdvancements().stopListening();
+-        this.players.remove(player);
+-        this.server.getCustomBossEvents().onPlayerDisconnect(player);
+-        UUID uuid = player.getUUID();
++        worldserver.removePlayerImmediately(entityplayer, Entity.RemovalReason.UNLOADED_WITH_PLAYER);
++        entityplayer.getAdvancements().stopListening();
++        this.players.remove(entityplayer);
++        this.server.getCustomBossEvents().onPlayerDisconnect(entityplayer);
++        UUID uuid = entityplayer.getUUID();
+         ServerPlayer entityplayer1 = (ServerPlayer) this.playersByUUID.get(uuid);
+ 
+-        if (entityplayer1 == player) {
++        if (entityplayer1 == entityplayer) {
+             this.playersByUUID.remove(uuid);
+-            this.stats.remove(uuid);
+-            this.advancements.remove(uuid);
++            // CraftBukkit start
++            // this.stats.remove(uuid);
++            // this.advancements.remove(uuid);
++            // CraftBukkit end
+         }
+ 
+-        this.broadcastAll(new ClientboundPlayerInfoRemovePacket(List.of(player.getUUID())));
++        // CraftBukkit start
++        // this.broadcastAll(new ClientboundPlayerInfoRemovePacket(List.of(entityplayer.getUUID())));
++        ClientboundPlayerInfoRemovePacket packet = new ClientboundPlayerInfoRemovePacket(List.of(entityplayer.getUUID()));
++        for (int i = 0; i < this.players.size(); i++) {
++            ServerPlayer entityplayer2 = (ServerPlayer) this.players.get(i);
++
++            if (entityplayer2.getBukkitEntity().canSee(entityplayer.getBukkitEntity())) {
++                entityplayer2.connection.send(packet);
++            } else {
++                entityplayer2.getBukkitEntity().onEntityRemove(entityplayer);
++            }
++        }
++        // This removes the scoreboard (and player reference) for the specific player in the manager
++        this.cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity());
++        // CraftBukkit end
++
++        return playerQuitEvent.getQuitMessage(); // CraftBukkit
+     }
+ 
+-    @Nullable
+-    public Component canPlayerLogin(SocketAddress address, GameProfile profile) {
++    // CraftBukkit start - Whole method, SocketAddress to LoginListener, added hostname to signature, return EntityPlayer
++    public ServerPlayer canPlayerLogin(ServerLoginPacketListenerImpl loginlistener, GameProfile gameprofile) {
+         MutableComponent ichatmutablecomponent;
+ 
+-        if (this.bans.isBanned(profile)) {
+-            UserBanListEntry gameprofilebanentry = (UserBanListEntry) this.bans.get(profile);
++        // Moved from processLogin
++        UUID uuid = gameprofile.getId();
++        List<ServerPlayer> list = Lists.newArrayList();
+ 
++        ServerPlayer entityplayer;
++
++        for (int i = 0; i < this.players.size(); ++i) {
++            entityplayer = (ServerPlayer) this.players.get(i);
++            if (entityplayer.getUUID().equals(uuid)) {
++                list.add(entityplayer);
++            }
++        }
++
++        Iterator iterator = list.iterator();
++
++        while (iterator.hasNext()) {
++            entityplayer = (ServerPlayer) iterator.next();
++            this.save(entityplayer); // CraftBukkit - Force the player's inventory to be saved
++            entityplayer.connection.disconnect(Component.translatable("multiplayer.disconnect.duplicate_login"));
++        }
++
++        // Instead of kicking then returning, we need to store the kick reason
++        // in the event, check with plugins to see if it's ok, and THEN kick
++        // depending on the outcome.
++        SocketAddress socketaddress = loginlistener.connection.getRemoteAddress();
++
++        ServerPlayer entity = new ServerPlayer(this.server, this.server.getLevel(Level.OVERWORLD), gameprofile, ClientInformation.createDefault());
++        entity.transferCookieConnection = loginlistener;
++        Player player = entity.getBukkitEntity();
++        PlayerLoginEvent event = new PlayerLoginEvent(player, loginlistener.connection.hostname, ((java.net.InetSocketAddress) socketaddress).getAddress());
++
++        if (this.bans.isBanned(gameprofile)) {
++            UserBanListEntry gameprofilebanentry = (UserBanListEntry) this.bans.get(gameprofile);
++
+             ichatmutablecomponent = Component.translatable("multiplayer.disconnect.banned.reason", gameprofilebanentry.getReason());
+             if (gameprofilebanentry.getExpires() != null) {
+                 ichatmutablecomponent.append((Component) Component.translatable("multiplayer.disconnect.banned.expiration", PlayerList.BAN_DATE_FORMAT.format(gameprofilebanentry.getExpires())));
+             }
+ 
+-            return ichatmutablecomponent;
+-        } else if (!this.isWhiteListed(profile)) {
+-            return Component.translatable("multiplayer.disconnect.not_whitelisted");
+-        } else if (this.ipBans.isBanned(address)) {
+-            IpBanListEntry ipbanentry = this.ipBans.get(address);
++            // return chatmessage;
++            event.disallow(PlayerLoginEvent.Result.KICK_BANNED, CraftChatMessage.fromComponent(ichatmutablecomponent));
++        } else if (!this.isWhiteListed(gameprofile)) {
++            ichatmutablecomponent = Component.translatable("multiplayer.disconnect.not_whitelisted");
++            event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, CraftChatMessage.fromComponent(ichatmutablecomponent));
++        } else if (this.ipBans.isBanned(socketaddress)) {
++            IpBanListEntry ipbanentry = this.ipBans.get(socketaddress);
+ 
+             ichatmutablecomponent = Component.translatable("multiplayer.disconnect.banned_ip.reason", ipbanentry.getReason());
+             if (ipbanentry.getExpires() != null) {
+                 ichatmutablecomponent.append((Component) Component.translatable("multiplayer.disconnect.banned_ip.expiration", PlayerList.BAN_DATE_FORMAT.format(ipbanentry.getExpires())));
+             }
+ 
+-            return ichatmutablecomponent;
+-        } else {
+-            return this.players.size() >= this.maxPlayers && !this.canBypassPlayerLimit(profile) ? Component.translatable("multiplayer.disconnect.server_full") : null;
++            // return chatmessage;
++            event.disallow(PlayerLoginEvent.Result.KICK_BANNED, CraftChatMessage.fromComponent(ichatmutablecomponent));
++        } else {
++            // return this.players.size() >= this.maxPlayers && !this.canBypassPlayerLimit(gameprofile) ? IChatBaseComponent.translatable("multiplayer.disconnect.server_full") : null;
++            if (this.players.size() >= this.maxPlayers && !this.canBypassPlayerLimit(gameprofile)) {
++                event.disallow(PlayerLoginEvent.Result.KICK_FULL, "The server is full");
++            }
+         }
++
++        this.cserver.getPluginManager().callEvent(event);
++        if (event.getResult() != PlayerLoginEvent.Result.ALLOWED) {
++            loginlistener.disconnect(event.getKickMessage());
++            return null;
++        }
++        return entity;
+     }
+ 
+-    public ServerPlayer getPlayerForLogin(GameProfile profile, ClientInformation syncedOptions) {
+-        return new ServerPlayer(this.server, this.server.overworld(), profile, syncedOptions);
++    // CraftBukkit start - added EntityPlayer
++    public ServerPlayer getPlayerForLogin(GameProfile gameprofile, ClientInformation clientinformation, ServerPlayer player) {
++        player.updateOptions(clientinformation);
++        return player;
++        // CraftBukkit end
+     }
+ 
+-    public boolean disconnectAllPlayersWithProfile(GameProfile profile) {
+-        UUID uuid = profile.getId();
+-        Set<ServerPlayer> set = Sets.newIdentityHashSet();
++    public boolean disconnectAllPlayersWithProfile(GameProfile gameprofile, ServerPlayer player) { // CraftBukkit - added EntityPlayer
++        /* CraftBukkit startMoved up
++        UUID uuid = gameprofile.getId();
++        Set<EntityPlayer> set = Sets.newIdentityHashSet();
+         Iterator iterator = this.players.iterator();
+ 
+         while (iterator.hasNext()) {
+-            ServerPlayer entityplayer = (ServerPlayer) iterator.next();
++            EntityPlayer entityplayer = (EntityPlayer) iterator.next();
+ 
+             if (entityplayer.getUUID().equals(uuid)) {
+                 set.add(entityplayer);
+             }
+         }
+ 
+-        ServerPlayer entityplayer1 = (ServerPlayer) this.playersByUUID.get(profile.getId());
++        EntityPlayer entityplayer1 = (EntityPlayer) this.playersByUUID.get(gameprofile.getId());
+ 
+         if (entityplayer1 != null) {
+             set.add(entityplayer1);
+@@ -431,30 +611,49 @@
+         Iterator iterator1 = set.iterator();
+ 
+         while (iterator1.hasNext()) {
+-            ServerPlayer entityplayer2 = (ServerPlayer) iterator1.next();
++            EntityPlayer entityplayer2 = (EntityPlayer) iterator1.next();
+ 
+             entityplayer2.connection.disconnect(PlayerList.DUPLICATE_LOGIN_DISCONNECT_MESSAGE);
+         }
+ 
+         return !set.isEmpty();
++        */
++        return player == null;
++        // CraftBukkit end
+     }
+ 
+-    public ServerPlayer respawn(ServerPlayer player, boolean alive, Entity.RemovalReason removalReason) {
+-        this.players.remove(player);
+-        player.serverLevel().removePlayerImmediately(player, removalReason);
+-        TeleportTransition teleporttransition = player.findRespawnPositionAndUseSpawnBlock(!alive, TeleportTransition.DO_NOTHING);
+-        ServerLevel worldserver = teleporttransition.newLevel();
+-        ServerPlayer entityplayer1 = new ServerPlayer(this.server, worldserver, player.getGameProfile(), player.clientInformation());
++    // CraftBukkit start
++    public ServerPlayer respawn(ServerPlayer entityplayer, boolean flag, Entity.RemovalReason entity_removalreason, RespawnReason reason) {
++        return this.respawn(entityplayer, flag, entity_removalreason, reason, null);
++    }
+ 
+-        entityplayer1.connection = player.connection;
+-        entityplayer1.restoreFrom(player, alive);
+-        entityplayer1.setId(player.getId());
+-        entityplayer1.setMainArm(player.getMainArm());
++    public ServerPlayer respawn(ServerPlayer entityplayer, boolean flag, Entity.RemovalReason entity_removalreason, RespawnReason reason, Location location) {
++        entityplayer.stopRiding(); // CraftBukkit
++        this.players.remove(entityplayer);
++        entityplayer.serverLevel().removePlayerImmediately(entityplayer, entity_removalreason);
++        /* CraftBukkit start
++        TeleportTransition teleporttransition = entityplayer.findRespawnPositionAndUseSpawnBlock(!flag, TeleportTransition.DO_NOTHING);
++        WorldServer worldserver = teleporttransition.newLevel();
++        EntityPlayer entityplayer1 = new EntityPlayer(this.server, worldserver, entityplayer.getGameProfile(), entityplayer.clientInformation());
++        // */
++        ServerPlayer entityplayer1 = entityplayer;
++        Level fromWorld = entityplayer.level();
++        entityplayer.wonGame = false;
++        // CraftBukkit end
++
++        entityplayer1.connection = entityplayer.connection;
++        entityplayer1.restoreFrom(entityplayer, flag);
++        entityplayer1.setId(entityplayer.getId());
++        entityplayer1.setMainArm(entityplayer.getMainArm());
++        // CraftBukkit - not required, just copies old location into reused entity
++        /*
+         if (!teleporttransition.missingRespawnBlock()) {
+-            entityplayer1.copyRespawnPosition(player);
++            entityplayer1.copyRespawnPosition(entityplayer);
+         }
++         */
++        // CraftBukkit end
+ 
+-        Iterator iterator = player.getTags().iterator();
++        Iterator iterator = entityplayer.getTags().iterator();
+ 
+         while (iterator.hasNext()) {
+             String s = (String) iterator.next();
+@@ -462,41 +661,79 @@
+             entityplayer1.addTag(s);
+         }
+ 
++        // CraftBukkit start - fire PlayerRespawnEvent
++        TeleportTransition teleporttransition;
++        if (location == null) {
++            teleporttransition = entityplayer.findRespawnPositionAndUseSpawnBlock(!flag, TeleportTransition.DO_NOTHING, reason);
++
++            if (!flag) entityplayer.reset(); // SPIGOT-4785
++        } else {
++            teleporttransition = new TeleportTransition(((CraftWorld) location.getWorld()).getHandle(), CraftLocation.toVec3D(location), Vec3.ZERO, location.getYaw(), location.getPitch(), TeleportTransition.DO_NOTHING);
++        }
++        ServerLevel worldserver = teleporttransition.newLevel();
++        entityplayer1.spawnIn(worldserver);
++        entityplayer1.unsetRemoved();
++        entityplayer1.setShiftKeyDown(false);
+         Vec3 vec3d = teleporttransition.position();
+ 
+-        entityplayer1.moveTo(vec3d.x, vec3d.y, vec3d.z, teleporttransition.yRot(), teleporttransition.xRot());
++        entityplayer1.forceSetPositionRotation(vec3d.x, vec3d.y, vec3d.z, teleporttransition.yRot(), teleporttransition.xRot());
++        // CraftBukkit end
+         if (teleporttransition.missingRespawnBlock()) {
+             entityplayer1.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.NO_RESPAWN_BLOCK_AVAILABLE, 0.0F));
++            entityplayer1.setRespawnPosition(null, null, 0f, false, false, PlayerSpawnChangeEvent.Cause.RESET); // CraftBukkit - SPIGOT-5988: Clear respawn location when obstructed
+         }
+ 
+-        int i = alive ? 1 : 0;
++        int i = flag ? 1 : 0;
+         ServerLevel worldserver1 = entityplayer1.serverLevel();
+         LevelData worlddata = worldserver1.getLevelData();
+ 
+         entityplayer1.connection.send(new ClientboundRespawnPacket(entityplayer1.createCommonSpawnInfo(worldserver1), (byte) i));
+-        entityplayer1.connection.teleport(entityplayer1.getX(), entityplayer1.getY(), entityplayer1.getZ(), entityplayer1.getYRot(), entityplayer1.getXRot());
++        entityplayer1.connection.teleport(CraftLocation.toBukkit(entityplayer1.position(), worldserver1.getWorld(), entityplayer1.getYRot(), entityplayer1.getXRot())); // CraftBukkit
+         entityplayer1.connection.send(new ClientboundSetDefaultSpawnPositionPacket(worldserver.getSharedSpawnPos(), worldserver.getSharedSpawnAngle()));
+         entityplayer1.connection.send(new ClientboundChangeDifficultyPacket(worlddata.getDifficulty(), worlddata.isDifficultyLocked()));
+         entityplayer1.connection.send(new ClientboundSetExperiencePacket(entityplayer1.experienceProgress, entityplayer1.totalExperience, entityplayer1.experienceLevel));
+         this.sendActivePlayerEffects(entityplayer1);
+         this.sendLevelInfo(entityplayer1, worldserver);
+         this.sendPlayerPermissionLevel(entityplayer1);
+-        worldserver.addRespawnedPlayer(entityplayer1);
+-        this.players.add(entityplayer1);
+-        this.playersByUUID.put(entityplayer1.getUUID(), entityplayer1);
+-        entityplayer1.initInventoryMenu();
++        if (!entityplayer.connection.isDisconnected()) {
++            worldserver.addRespawnedPlayer(entityplayer1);
++            this.players.add(entityplayer1);
++            this.playersByUUID.put(entityplayer1.getUUID(), entityplayer1);
++        }
++        // entityplayer1.initInventoryMenu();
+         entityplayer1.setHealth(entityplayer1.getHealth());
+         BlockPos blockposition = entityplayer1.getRespawnPosition();
+         ServerLevel worldserver2 = this.server.getLevel(entityplayer1.getRespawnDimension());
+ 
+-        if (!alive && blockposition != null && worldserver2 != null) {
++        if (!flag && blockposition != null && worldserver2 != null) {
+             BlockState iblockdata = worldserver2.getBlockState(blockposition);
+ 
+             if (iblockdata.is(Blocks.RESPAWN_ANCHOR)) {
+                 entityplayer1.connection.send(new ClientboundSoundPacket(SoundEvents.RESPAWN_ANCHOR_DEPLETE, SoundSource.BLOCKS, (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), 1.0F, 1.0F, worldserver.getRandom().nextLong()));
+             }
+         }
++        // Added from changeDimension
++        this.sendAllPlayerInfo(entityplayer); // Update health, etc...
++        entityplayer.onUpdateAbilities();
++        for (MobEffectInstance mobEffect : entityplayer.getActiveEffects()) {
++            entityplayer.connection.send(new ClientboundUpdateMobEffectPacket(entityplayer.getId(), mobEffect, false)); // blend = false
++        }
+ 
++        // Fire advancement trigger
++        entityplayer.triggerDimensionChangeTriggers(worldserver);
++
++        // Don't fire on respawn
++        if (fromWorld != worldserver) {
++            PlayerChangedWorldEvent event = new PlayerChangedWorldEvent(entityplayer.getBukkitEntity(), fromWorld.getWorld());
++            this.server.server.getPluginManager().callEvent(event);
++        }
++
++        // Save player file again if they were disconnected
++        if (entityplayer.connection.isDisconnected()) {
++            this.save(entityplayer);
++        }
++        // CraftBukkit end
++
+         return entityplayer1;
+     }
+ 
+@@ -524,7 +761,18 @@
+ 
+     public void tick() {
+         if (++this.sendAllPlayerInfoIn > 600) {
+-            this.broadcastAll(new ClientboundPlayerInfoUpdatePacket(EnumSet.of(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_LATENCY), this.players));
++            // CraftBukkit start
++            for (int i = 0; i < this.players.size(); ++i) {
++                final ServerPlayer target = (ServerPlayer) this.players.get(i);
++
++                target.connection.send(new ClientboundPlayerInfoUpdatePacket(EnumSet.of(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_LATENCY), this.players.stream().filter(new Predicate<ServerPlayer>() {
++                    @Override
++                    public boolean test(ServerPlayer input) {
++                        return target.getBukkitEntity().canSee(input.getBukkitEntity());
++                    }
++                }).collect(Collectors.toList())));
++            }
++            // CraftBukkit end
+             this.sendAllPlayerInfoIn = 0;
+         }
+ 
+@@ -541,6 +789,25 @@
+ 
+     }
+ 
++    // CraftBukkit start - add a world/entity limited version
++    public void broadcastAll(Packet packet, net.minecraft.world.entity.player.Player entityhuman) {
++        for (int i = 0; i < this.players.size(); ++i) {
++            ServerPlayer entityplayer =  this.players.get(i);
++            if (entityhuman != null && !entityplayer.getBukkitEntity().canSee(entityhuman.getBukkitEntity())) {
++                continue;
++            }
++            ((ServerPlayer) this.players.get(i)).connection.send(packet);
++        }
++    }
++
++    public void broadcastAll(Packet packet, Level world) {
++        for (int i = 0; i < world.players().size(); ++i) {
++            ((ServerPlayer) world.players().get(i)).connection.send(packet);
++        }
++
++    }
++    // CraftBukkit end
++
+     public void broadcastAll(Packet<?> packet, ResourceKey<Level> dimension) {
+         Iterator iterator = this.players.iterator();
+ 
+@@ -554,7 +821,7 @@
+ 
+     }
+ 
+-    public void broadcastSystemToTeam(Player source, Component message) {
++    public void broadcastSystemToTeam(net.minecraft.world.entity.player.Player source, Component message) {
+         PlayerTeam scoreboardteam = source.getTeam();
+ 
+         if (scoreboardteam != null) {
+@@ -573,7 +840,7 @@
+         }
+     }
+ 
+-    public void broadcastSystemToAllExceptTeam(Player source, Component message) {
++    public void broadcastSystemToAllExceptTeam(net.minecraft.world.entity.player.Player source, Component message) {
+         PlayerTeam scoreboardteam = source.getTeam();
+ 
+         if (scoreboardteam == null) {
+@@ -619,7 +886,7 @@
+     }
+ 
+     public void deop(GameProfile profile) {
+-        this.ops.remove((Object) profile);
++        this.ops.remove(profile); // CraftBukkit - decompile error
+         ServerPlayer entityplayer = this.getPlayer(profile.getId());
+ 
+         if (entityplayer != null) {
+@@ -643,6 +910,7 @@
+             player.connection.send(new ClientboundEntityEventPacket(player, b0));
+         }
+ 
++        player.getBukkitEntity().recalculatePermissions(); // CraftBukkit
+         this.server.getCommands().sendCommands(player);
+     }
+ 
+@@ -669,10 +937,16 @@
+         return null;
+     }
+ 
+-    public void broadcast(@Nullable Player player, double x, double y, double z, double distance, ResourceKey<Level> worldKey, Packet<?> packet) {
++    public void broadcast(@Nullable net.minecraft.world.entity.player.Player player, double x, double y, double z, double distance, ResourceKey<Level> worldKey, Packet<?> packet) {
+         for (int i = 0; i < this.players.size(); ++i) {
+             ServerPlayer entityplayer = (ServerPlayer) this.players.get(i);
+ 
++            // CraftBukkit start - Test if player receiving packet can see the source of the packet
++            if (player != null && !entityplayer.getBukkitEntity().canSee(player.getBukkitEntity())) {
++               continue;
++            }
++            // CraftBukkit end
++
+             if (entityplayer != player && entityplayer.level().dimension() == worldKey) {
+                 double d4 = x - entityplayer.getX();
+                 double d5 = y - entityplayer.getY();
+@@ -712,15 +986,19 @@
+     public void reloadWhiteList() {}
+ 
+     public void sendLevelInfo(ServerPlayer player, ServerLevel world) {
+-        WorldBorder worldborder = this.server.overworld().getWorldBorder();
++        WorldBorder worldborder = player.level().getWorldBorder(); // CraftBukkit
+ 
+         player.connection.send(new ClientboundInitializeBorderPacket(worldborder));
+         player.connection.send(new ClientboundSetTimePacket(world.getGameTime(), world.getDayTime(), world.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)));
+         player.connection.send(new ClientboundSetDefaultSpawnPositionPacket(world.getSharedSpawnPos(), world.getSharedSpawnAngle()));
+         if (world.isRaining()) {
+-            player.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.START_RAINING, 0.0F));
+-            player.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.RAIN_LEVEL_CHANGE, world.getRainLevel(1.0F)));
+-            player.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.THUNDER_LEVEL_CHANGE, world.getThunderLevel(1.0F)));
++            // CraftBukkit start - handle player weather
++            // entityplayer.connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.START_RAINING, 0.0F));
++            // entityplayer.connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.RAIN_LEVEL_CHANGE, worldserver.getRainLevel(1.0F)));
++            // entityplayer.connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.THUNDER_LEVEL_CHANGE, worldserver.getThunderLevel(1.0F)));
++            player.setPlayerWeather(org.bukkit.WeatherType.DOWNFALL, false);
++            player.updateWeather(-world.rainLevel, world.rainLevel, -world.thunderLevel, world.thunderLevel);
++            // CraftBukkit end
+         }
+ 
+         player.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.LEVEL_CHUNKS_LOAD_START, 0.0F));
+@@ -729,8 +1007,16 @@
+ 
+     public void sendAllPlayerInfo(ServerPlayer player) {
+         player.inventoryMenu.sendAllDataToRemote();
+-        player.resetSentInfo();
++        // entityplayer.resetSentInfo();
++        player.getBukkitEntity().updateScaledHealth(); // CraftBukkit - Update scaled health on respawn and worldchange
++        player.refreshEntityData(player); // CraftBukkkit - SPIGOT-7218: sync metadata
+         player.connection.send(new ClientboundSetHeldSlotPacket(player.getInventory().selected));
++        // CraftBukkit start - from GameRules
++        int i = player.serverLevel().getGameRules().getBoolean(GameRules.RULE_REDUCEDDEBUGINFO) ? 22 : 23;
++        player.connection.send(new ClientboundEntityEventPacket(player, (byte) i));
++        float immediateRespawn = player.serverLevel().getGameRules().getBoolean(GameRules.RULE_DO_IMMEDIATE_RESPAWN) ? 1.0F: 0.0F;
++        player.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.IMMEDIATE_RESPAWN, immediateRespawn));
++        // CraftBukkit end
+     }
+ 
+     public int getPlayerCount() {
+@@ -786,12 +1072,22 @@
+     }
+ 
+     public void removeAll() {
+-        for (int i = 0; i < this.players.size(); ++i) {
+-            ((ServerPlayer) this.players.get(i)).connection.disconnect((Component) Component.translatable("multiplayer.disconnect.server_shutdown"));
++        // CraftBukkit start - disconnect safely
++        for (ServerPlayer player : this.players) {
++            player.connection.disconnect(CraftChatMessage.fromStringOrEmpty(this.server.server.getShutdownMessage())); // CraftBukkit - add custom shutdown message
+         }
++        // CraftBukkit end
+ 
+     }
+ 
++    // CraftBukkit start
++    public void broadcastMessage(Component[] iChatBaseComponents) {
++        for (Component component : iChatBaseComponents) {
++            this.broadcastSystemMessage(component, false);
++        }
++    }
++    // CraftBukkit end
++
+     public void broadcastSystemMessage(Component message, boolean overlay) {
+         this.broadcastSystemMessage(message, (entityplayer) -> {
+             return message;
+@@ -849,16 +1145,23 @@
+         return message.hasSignature() && !message.hasExpiredServer(Instant.now());
+     }
+ 
+-    public ServerStatsCounter getPlayerStats(Player player) {
+-        UUID uuid = player.getUUID();
+-        ServerStatsCounter serverstatisticmanager = (ServerStatsCounter) this.stats.get(uuid);
++    // CraftBukkit start
++    public ServerStatsCounter getPlayerStats(ServerPlayer entityhuman) {
++        ServerStatsCounter serverstatisticmanager = entityhuman.getStats();
++        return serverstatisticmanager == null ? this.getPlayerStats(entityhuman.getUUID(), entityhuman.getDisplayName().getString()) : serverstatisticmanager;
++    }
+ 
++    public ServerStatsCounter getPlayerStats(UUID uuid, String displayName) {
++        ServerPlayer entityhuman = this.getPlayer(uuid);
++        ServerStatsCounter serverstatisticmanager = entityhuman == null ? null : (ServerStatsCounter) entityhuman.getStats();
++        // CraftBukkit end
++
+         if (serverstatisticmanager == null) {
+             File file = this.server.getWorldPath(LevelResource.PLAYER_STATS_DIR).toFile();
+             File file1 = new File(file, String.valueOf(uuid) + ".json");
+ 
+             if (!file1.exists()) {
+-                File file2 = new File(file, player.getName().getString() + ".json");
++                File file2 = new File(file, displayName + ".json"); // CraftBukkit
+                 Path path = file2.toPath();
+ 
+                 if (FileUtil.isPathNormalized(path) && FileUtil.isPathPortable(path) && path.startsWith(file.getPath()) && file2.isFile()) {
+@@ -867,7 +1170,7 @@
+             }
+ 
+             serverstatisticmanager = new ServerStatsCounter(this.server, file1);
+-            this.stats.put(uuid, serverstatisticmanager);
++            // this.stats.put(uuid, serverstatisticmanager); // CraftBukkit
+         }
+ 
+         return serverstatisticmanager;
+@@ -875,13 +1178,13 @@
+ 
+     public PlayerAdvancements getPlayerAdvancements(ServerPlayer player) {
+         UUID uuid = player.getUUID();
+-        PlayerAdvancements advancementdataplayer = (PlayerAdvancements) this.advancements.get(uuid);
++        PlayerAdvancements advancementdataplayer = (PlayerAdvancements) player.getAdvancements(); // CraftBukkit
+ 
+         if (advancementdataplayer == null) {
+             Path path = this.server.getWorldPath(LevelResource.PLAYER_ADVANCEMENTS_DIR).resolve(String.valueOf(uuid) + ".json");
+ 
+             advancementdataplayer = new PlayerAdvancements(this.server.getFixerUpper(), this, this.server.getAdvancements(), path, player);
+-            this.advancements.put(uuid, advancementdataplayer);
++            // this.advancements.put(uuid, advancementdataplayer); // CraftBukkit
+         }
+ 
+         advancementdataplayer.setPlayer(player);
+@@ -932,15 +1235,28 @@
+     }
+ 
+     public void reloadResources() {
+-        Iterator iterator = this.advancements.values().iterator();
++        // CraftBukkit start
++        /*Iterator iterator = this.advancements.values().iterator();
+ 
+         while (iterator.hasNext()) {
+-            PlayerAdvancements advancementdataplayer = (PlayerAdvancements) iterator.next();
++            AdvancementDataPlayer advancementdataplayer = (AdvancementDataPlayer) iterator.next();
+ 
+             advancementdataplayer.reload(this.server.getAdvancements());
++        }*/
++
++        for (ServerPlayer player : this.players) {
++            player.getAdvancements().reload(this.server.getAdvancements());
++            player.getAdvancements().flushDirty(player); // CraftBukkit - trigger immediate flush of advancements
+         }
++        // CraftBukkit end
+ 
+         this.broadcastAll(new ClientboundUpdateTagsPacket(TagNetworkSerialization.serializeTagsToNetwork(this.registries)));
++        // CraftBukkit start
++        this.reloadRecipes();
++    }
++
++    public void reloadRecipes() {
++        // CraftBukkit end
+         RecipeManager craftingmanager = this.server.getRecipeManager();
+         ClientboundUpdateRecipesPacket packetplayoutrecipeupdate = new ClientboundUpdateRecipesPacket(craftingmanager.getSynchronizedItemProperties(), craftingmanager.getSynchronizedStonecutterRecipes());
+         Iterator iterator1 = this.players.iterator();
diff --git a/paper-server/patches/sources/net/minecraft/server/players/PlayerList.patch b/paper-server/patches/sources/net/minecraft/server/players/PlayerList.patch
deleted file mode 100644
index f7122713bc..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/players/PlayerList.patch
+++ /dev/null
@@ -1,798 +0,0 @@
---- a/net/minecraft/server/players/PlayerList.java
-+++ b/net/minecraft/server/players/PlayerList.java
-@@ -104,6 +104,27 @@
- import net.minecraft.world.scores.ScoreboardTeam;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import java.util.stream.Collectors;
-+import net.minecraft.server.dedicated.DedicatedServer;
-+import net.minecraft.server.network.LoginListener;
-+import org.bukkit.Location;
-+import org.bukkit.craftbukkit.CraftServer;
-+import org.bukkit.craftbukkit.CraftWorld;
-+import org.bukkit.craftbukkit.entity.CraftPlayer;
-+import org.bukkit.craftbukkit.util.CraftChatMessage;
-+import org.bukkit.craftbukkit.util.CraftLocation;
-+import org.bukkit.entity.Player;
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+import org.bukkit.event.player.PlayerChangedWorldEvent;
-+import org.bukkit.event.player.PlayerJoinEvent;
-+import org.bukkit.event.player.PlayerLoginEvent;
-+import org.bukkit.event.player.PlayerQuitEvent;
-+import org.bukkit.event.player.PlayerRespawnEvent;
-+import org.bukkit.event.player.PlayerRespawnEvent.RespawnReason;
-+import org.bukkit.event.player.PlayerSpawnChangeEvent;
-+// CraftBukkit end
-+
- public abstract class PlayerList {
- 
-     public static final File USERBANLIST_FILE = new File("banned-players.json");
-@@ -116,14 +137,16 @@
-     private static final int SEND_PLAYER_INFO_INTERVAL = 600;
-     private static final SimpleDateFormat BAN_DATE_FORMAT = new SimpleDateFormat("yyyy-MM-dd 'at' HH:mm:ss z");
-     private final MinecraftServer server;
--    public final List<EntityPlayer> players = Lists.newArrayList();
-+    public final List<EntityPlayer> players = new java.util.concurrent.CopyOnWriteArrayList(); // CraftBukkit - ArrayList -> CopyOnWriteArrayList: Iterator safety
-     private final Map<UUID, EntityPlayer> playersByUUID = Maps.newHashMap();
-     private final GameProfileBanList bans;
-     private final IpBanList ipBans;
-     private final OpList ops;
-     private final WhiteList whitelist;
--    private final Map<UUID, ServerStatisticManager> stats;
--    private final Map<UUID, AdvancementDataPlayer> advancements;
-+    // CraftBukkit start
-+    // private final Map<UUID, ServerStatisticManager> stats;
-+    // private final Map<UUID, AdvancementDataPlayer> advancements;
-+    // CraftBukkit end
-     public final WorldNBTStorage playerIo;
-     private boolean doWhiteList;
-     private final LayeredRegistryAccess<RegistryLayer> registries;
-@@ -134,13 +157,23 @@
-     private static final boolean ALLOW_LOGOUTIVATOR = false;
-     private int sendAllPlayerInfoIn;
- 
-+    // CraftBukkit start
-+    private CraftServer cserver;
-+
-     public PlayerList(MinecraftServer minecraftserver, LayeredRegistryAccess<RegistryLayer> layeredregistryaccess, WorldNBTStorage worldnbtstorage, int i) {
-+        this.cserver = minecraftserver.server = new CraftServer((DedicatedServer) minecraftserver, this);
-+        minecraftserver.console = org.bukkit.craftbukkit.command.ColouredConsoleSender.getInstance();
-+        minecraftserver.reader.addCompleter(new org.bukkit.craftbukkit.command.ConsoleCommandCompleter(minecraftserver.server));
-+        // CraftBukkit end
-+
-         this.bans = new GameProfileBanList(PlayerList.USERBANLIST_FILE);
-         this.ipBans = new IpBanList(PlayerList.IPBANLIST_FILE);
-         this.ops = new OpList(PlayerList.OPLIST_FILE);
-         this.whitelist = new WhiteList(PlayerList.WHITELIST_FILE);
--        this.stats = Maps.newHashMap();
--        this.advancements = Maps.newHashMap();
-+        // CraftBukkit start
-+        // this.stats = Maps.newHashMap();
-+        // this.advancements = Maps.newHashMap();
-+        // CraftBukkit end
-         this.server = minecraftserver;
-         this.registries = layeredregistryaccess;
-         this.maxPlayers = i;
-@@ -150,25 +183,34 @@
-     public void placeNewPlayer(NetworkManager networkmanager, EntityPlayer entityplayer, CommonListenerCookie commonlistenercookie) {
-         GameProfile gameprofile = entityplayer.getGameProfile();
-         UserCache usercache = this.server.getProfileCache();
--        Optional optional;
-+        // Optional optional; // CraftBukkit - decompile error
-         String s;
- 
-         if (usercache != null) {
--            optional = usercache.get(gameprofile.getId());
-+            Optional<GameProfile> optional = usercache.get(gameprofile.getId()); // CraftBukkit - decompile error
-             s = (String) optional.map(GameProfile::getName).orElse(gameprofile.getName());
-             usercache.add(gameprofile);
-         } else {
-             s = gameprofile.getName();
-         }
- 
--        optional = this.load(entityplayer);
-+        Optional<NBTTagCompound> optional = this.load(entityplayer); // CraftBukkit - decompile error
-+        // CraftBukkit start - Better rename detection
-+        if (optional.isPresent()) {
-+            NBTTagCompound nbttagcompound = optional.get();
-+            if (nbttagcompound.contains("bukkit")) {
-+                NBTTagCompound bukkit = nbttagcompound.getCompound("bukkit");
-+                s = bukkit.contains("lastKnownName", 8) ? bukkit.getString("lastKnownName") : s;
-+            }
-+        }
-+        // CraftBukkit end
-         ResourceKey<World> resourcekey = (ResourceKey) optional.flatMap((nbttagcompound) -> {
--            DataResult dataresult = DimensionManager.parseLegacy(new Dynamic(DynamicOpsNBT.INSTANCE, nbttagcompound.get("Dimension")));
-+            DataResult<ResourceKey<World>> dataresult = DimensionManager.parseLegacy(new Dynamic(DynamicOpsNBT.INSTANCE, nbttagcompound.get("Dimension"))); // CraftBukkit - decompile error
-             Logger logger = PlayerList.LOGGER;
- 
-             Objects.requireNonNull(logger);
-             return dataresult.resultOrPartial(logger::error);
--        }).orElse(World.OVERWORLD);
-+        }).orElse(entityplayer.serverLevel().dimension()); // CraftBukkit - SPIGOT-7507: If no dimension, fall back to existing dimension loaded from "WorldUUID", which in turn defaults to World.OVERWORLD
-         WorldServer worldserver = this.server.getLevel(resourcekey);
-         WorldServer worldserver1;
- 
-@@ -182,10 +224,11 @@
-         entityplayer.setServerLevel(worldserver1);
-         String s1 = networkmanager.getLoggableAddress(this.server.logIPs());
- 
--        PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ({}, {}, {})", new Object[]{entityplayer.getName().getString(), s1, entityplayer.getId(), entityplayer.getX(), entityplayer.getY(), entityplayer.getZ()});
-+        // CraftBukkit - Moved message to after join
-+        // PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ({}, {}, {})", new Object[]{entityplayer.getName().getString(), s1, entityplayer.getId(), entityplayer.getX(), entityplayer.getY(), entityplayer.getZ()});
-         WorldData worlddata = worldserver1.getLevelData();
- 
--        entityplayer.loadGameTypes((NBTTagCompound) optional.orElse((Object) null));
-+        entityplayer.loadGameTypes((NBTTagCompound) optional.orElse(null)); // CraftBukkit - decompile error
-         PlayerConnection playerconnection = new PlayerConnection(this.server, networkmanager, entityplayer, commonlistenercookie);
- 
-         networkmanager.setupInboundProtocol(GameProtocols.SERVERBOUND_TEMPLATE.bind(RegistryFriendlyByteBuf.decorator(this.server.registryAccess())), playerconnection);
-@@ -195,6 +238,7 @@
-         boolean flag2 = gamerules.getBoolean(GameRules.RULE_LIMITED_CRAFTING);
- 
-         playerconnection.send(new PacketPlayOutLogin(entityplayer.getId(), worlddata.isHardcore(), this.server.levelKeys(), this.getMaxPlayers(), this.viewDistance, this.simulationDistance, flag1, !flag, flag2, entityplayer.createCommonSpawnInfo(worldserver1), this.server.enforceSecureProfile()));
-+        entityplayer.getBukkitEntity().sendSupportedChannels(); // CraftBukkit
-         playerconnection.send(new PacketPlayOutServerDifficulty(worlddata.getDifficulty(), worlddata.isDifficultyLocked()));
-         playerconnection.send(new PacketPlayOutAbilities(entityplayer.getAbilities()));
-         playerconnection.send(new PacketPlayOutHeldItemSlot(entityplayer.getInventory().selected));
-@@ -213,8 +257,10 @@
-         } else {
-             ichatmutablecomponent = IChatBaseComponent.translatable("multiplayer.player.joined.renamed", entityplayer.getDisplayName(), s);
-         }
-+        // CraftBukkit start
-+        ichatmutablecomponent.withStyle(EnumChatFormat.YELLOW);
-+        String joinMessage = CraftChatMessage.fromComponent(ichatmutablecomponent);
- 
--        this.broadcastSystemMessage(ichatmutablecomponent.withStyle(EnumChatFormat.YELLOW), false);
-         playerconnection.teleport(entityplayer.getX(), entityplayer.getY(), entityplayer.getZ(), entityplayer.getYRot(), entityplayer.getXRot());
-         ServerPing serverping = this.server.getStatus();
- 
-@@ -222,17 +268,70 @@
-             entityplayer.sendServerStatus(serverping);
-         }
- 
--        entityplayer.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(this.players));
-+        // entityplayer.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(this.players)); // CraftBukkit - replaced with loop below
-         this.players.add(entityplayer);
-         this.playersByUUID.put(entityplayer.getUUID(), entityplayer);
--        this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer)));
-+        // this.broadcastAll(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer))); // CraftBukkit - replaced with loop below
-+
-+        // CraftBukkit start
-+        CraftPlayer bukkitPlayer = entityplayer.getBukkitEntity();
-+
-+        // Ensure that player inventory is populated with its viewer
-+        entityplayer.containerMenu.transferTo(entityplayer.containerMenu, bukkitPlayer);
-+
-+        PlayerJoinEvent playerJoinEvent = new PlayerJoinEvent(bukkitPlayer, joinMessage);
-+        cserver.getPluginManager().callEvent(playerJoinEvent);
-+
-+        if (!entityplayer.connection.isAcceptingMessages()) {
-+            return;
-+        }
-+
-+        joinMessage = playerJoinEvent.getJoinMessage();
-+
-+        if (joinMessage != null && joinMessage.length() > 0) {
-+            for (IChatBaseComponent line : org.bukkit.craftbukkit.util.CraftChatMessage.fromString(joinMessage)) {
-+                server.getPlayerList().broadcastSystemMessage(line, false);
-+            }
-+        }
-+        // CraftBukkit end
-+
-+        // CraftBukkit start - sendAll above replaced with this loop
-+        ClientboundPlayerInfoUpdatePacket packet = ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer));
-+
-+        for (int i = 0; i < this.players.size(); ++i) {
-+            EntityPlayer entityplayer1 = (EntityPlayer) this.players.get(i);
-+
-+            if (entityplayer1.getBukkitEntity().canSee(bukkitPlayer)) {
-+                entityplayer1.connection.send(packet);
-+            }
-+
-+            if (!bukkitPlayer.canSee(entityplayer1.getBukkitEntity())) {
-+                continue;
-+            }
-+
-+            entityplayer.connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(entityplayer1)));
-+        }
-+        entityplayer.sentListPacket = true;
-+        // CraftBukkit end
-+
-+        entityplayer.refreshEntityData(entityplayer); // CraftBukkit - BungeeCord#2321, send complete data to self on spawn
-+
-         this.sendLevelInfo(entityplayer, worldserver1);
--        worldserver1.addNewPlayer(entityplayer);
--        this.server.getCustomBossEvents().onPlayerConnect(entityplayer);
-+
-+        // CraftBukkit start - Only add if the player wasn't moved in the event
-+        if (entityplayer.level() == worldserver1 && !worldserver1.players().contains(entityplayer)) {
-+            worldserver1.addNewPlayer(entityplayer);
-+            this.server.getCustomBossEvents().onPlayerConnect(entityplayer);
-+        }
-+
-+        worldserver1 = entityplayer.serverLevel(); // CraftBukkit - Update in case join event changed it
-+        // CraftBukkit end
-         this.sendActivePlayerEffects(entityplayer);
-         entityplayer.loadAndSpawnEnderpearls(optional);
-         entityplayer.loadAndSpawnParentVehicle(optional);
-         entityplayer.initInventoryMenu();
-+        // CraftBukkit - Moved from above, added world
-+        PlayerList.LOGGER.info("{}[{}] logged in with entity id {} at ([{}]{}, {}, {})", entityplayer.getName().getString(), s1, entityplayer.getId(), worldserver1.serverLevelData.getLevelName(), entityplayer.getX(), entityplayer.getY(), entityplayer.getZ());
-     }
- 
-     public void updateEntireScoreboard(ScoreboardServer scoreboardserver, EntityPlayer entityplayer) {
-@@ -269,30 +368,31 @@
-     }
- 
-     public void addWorldborderListener(WorldServer worldserver) {
-+        if (playerIo != null) return; // CraftBukkit
-         worldserver.getWorldBorder().addListener(new IWorldBorderListener() {
-             @Override
-             public void onBorderSizeSet(WorldBorder worldborder, double d0) {
--                PlayerList.this.broadcastAll(new ClientboundSetBorderSizePacket(worldborder));
-+                PlayerList.this.broadcastAll(new ClientboundSetBorderSizePacket(worldborder), worldborder.world); // CraftBukkit
-             }
- 
-             @Override
-             public void onBorderSizeLerping(WorldBorder worldborder, double d0, double d1, long i) {
--                PlayerList.this.broadcastAll(new ClientboundSetBorderLerpSizePacket(worldborder));
-+                PlayerList.this.broadcastAll(new ClientboundSetBorderLerpSizePacket(worldborder), worldborder.world); // CraftBukkit
-             }
- 
-             @Override
-             public void onBorderCenterSet(WorldBorder worldborder, double d0, double d1) {
--                PlayerList.this.broadcastAll(new ClientboundSetBorderCenterPacket(worldborder));
-+                PlayerList.this.broadcastAll(new ClientboundSetBorderCenterPacket(worldborder), worldborder.world); // CraftBukkit
-             }
- 
-             @Override
-             public void onBorderSetWarningTime(WorldBorder worldborder, int i) {
--                PlayerList.this.broadcastAll(new ClientboundSetBorderWarningDelayPacket(worldborder));
-+                PlayerList.this.broadcastAll(new ClientboundSetBorderWarningDelayPacket(worldborder), worldborder.world); // CraftBukkit
-             }
- 
-             @Override
-             public void onBorderSetWarningBlocks(WorldBorder worldborder, int i) {
--                PlayerList.this.broadcastAll(new ClientboundSetBorderWarningDistancePacket(worldborder));
-+                PlayerList.this.broadcastAll(new ClientboundSetBorderWarningDistancePacket(worldborder), worldborder.world); // CraftBukkit
-             }
- 
-             @Override
-@@ -319,14 +419,15 @@
-     }
- 
-     protected void save(EntityPlayer entityplayer) {
-+        if (!entityplayer.getBukkitEntity().isPersistent()) return; // CraftBukkit
-         this.playerIo.save(entityplayer);
--        ServerStatisticManager serverstatisticmanager = (ServerStatisticManager) this.stats.get(entityplayer.getUUID());
-+        ServerStatisticManager serverstatisticmanager = (ServerStatisticManager) entityplayer.getStats(); // CraftBukkit
- 
-         if (serverstatisticmanager != null) {
-             serverstatisticmanager.save();
-         }
- 
--        AdvancementDataPlayer advancementdataplayer = (AdvancementDataPlayer) this.advancements.get(entityplayer.getUUID());
-+        AdvancementDataPlayer advancementdataplayer = (AdvancementDataPlayer) entityplayer.getAdvancements(); // CraftBukkit
- 
-         if (advancementdataplayer != null) {
-             advancementdataplayer.save();
-@@ -334,10 +435,24 @@
- 
-     }
- 
--    public void remove(EntityPlayer entityplayer) {
-+    public String remove(EntityPlayer entityplayer) { // CraftBukkit - return string
-         WorldServer worldserver = entityplayer.serverLevel();
- 
-         entityplayer.awardStat(StatisticList.LEAVE_GAME);
-+
-+        // CraftBukkit start - Quitting must be before we do final save of data, in case plugins need to modify it
-+        // See SPIGOT-5799, SPIGOT-6145
-+        if (entityplayer.containerMenu != entityplayer.inventoryMenu) {
-+            entityplayer.closeContainer();
-+        }
-+
-+        PlayerQuitEvent playerQuitEvent = new PlayerQuitEvent(entityplayer.getBukkitEntity(), entityplayer.kickLeaveMessage != null ? entityplayer.kickLeaveMessage : "\u00A7e" + entityplayer.getScoreboardName() + " left the game");
-+        cserver.getPluginManager().callEvent(playerQuitEvent);
-+        entityplayer.getBukkitEntity().disconnect(playerQuitEvent.getQuitMessage());
-+
-+        entityplayer.doTick(); // SPIGOT-924
-+        // CraftBukkit end
-+
-         this.save(entityplayer);
-         if (entityplayer.isPassenger()) {
-             Entity entity = entityplayer.getRootVehicle();
-@@ -346,7 +461,7 @@
-                 PlayerList.LOGGER.debug("Removing player mount");
-                 entityplayer.stopRiding();
-                 entity.getPassengersAndSelf().forEach((entity1) -> {
--                    entity1.setRemoved(Entity.RemovalReason.UNLOADED_WITH_PLAYER);
-+                    entity1.setRemoved(Entity.RemovalReason.UNLOADED_WITH_PLAYER, EntityRemoveEvent.Cause.PLAYER_QUIT); // CraftBukkit - add Bukkit remove cause
-                 });
-             }
-         }
-@@ -357,7 +472,7 @@
-         while (iterator.hasNext()) {
-             EntityEnderPearl entityenderpearl = (EntityEnderPearl) iterator.next();
- 
--            entityenderpearl.setRemoved(Entity.RemovalReason.UNLOADED_WITH_PLAYER);
-+            entityenderpearl.setRemoved(Entity.RemovalReason.UNLOADED_WITH_PLAYER, EntityRemoveEvent.Cause.PLAYER_QUIT); // CraftBukkit - add Bukkit remove cause
-         }
- 
-         worldserver.removePlayerImmediately(entityplayer, Entity.RemovalReason.UNLOADED_WITH_PLAYER);
-@@ -369,17 +484,66 @@
- 
-         if (entityplayer1 == entityplayer) {
-             this.playersByUUID.remove(uuid);
--            this.stats.remove(uuid);
--            this.advancements.remove(uuid);
-+            // CraftBukkit start
-+            // this.stats.remove(uuid);
-+            // this.advancements.remove(uuid);
-+            // CraftBukkit end
-         }
- 
--        this.broadcastAll(new ClientboundPlayerInfoRemovePacket(List.of(entityplayer.getUUID())));
-+        // CraftBukkit start
-+        // this.broadcastAll(new ClientboundPlayerInfoRemovePacket(List.of(entityplayer.getUUID())));
-+        ClientboundPlayerInfoRemovePacket packet = new ClientboundPlayerInfoRemovePacket(List.of(entityplayer.getUUID()));
-+        for (int i = 0; i < players.size(); i++) {
-+            EntityPlayer entityplayer2 = (EntityPlayer) this.players.get(i);
-+
-+            if (entityplayer2.getBukkitEntity().canSee(entityplayer.getBukkitEntity())) {
-+                entityplayer2.connection.send(packet);
-+            } else {
-+                entityplayer2.getBukkitEntity().onEntityRemove(entityplayer);
-+            }
-+        }
-+        // This removes the scoreboard (and player reference) for the specific player in the manager
-+        cserver.getScoreboardManager().removePlayer(entityplayer.getBukkitEntity());
-+        // CraftBukkit end
-+
-+        return playerQuitEvent.getQuitMessage(); // CraftBukkit
-     }
- 
--    @Nullable
--    public IChatBaseComponent canPlayerLogin(SocketAddress socketaddress, GameProfile gameprofile) {
-+    // CraftBukkit start - Whole method, SocketAddress to LoginListener, added hostname to signature, return EntityPlayer
-+    public EntityPlayer canPlayerLogin(LoginListener loginlistener, GameProfile gameprofile) {
-         IChatMutableComponent ichatmutablecomponent;
- 
-+        // Moved from processLogin
-+        UUID uuid = gameprofile.getId();
-+        List<EntityPlayer> list = Lists.newArrayList();
-+
-+        EntityPlayer entityplayer;
-+
-+        for (int i = 0; i < this.players.size(); ++i) {
-+            entityplayer = (EntityPlayer) this.players.get(i);
-+            if (entityplayer.getUUID().equals(uuid)) {
-+                list.add(entityplayer);
-+            }
-+        }
-+
-+        Iterator iterator = list.iterator();
-+
-+        while (iterator.hasNext()) {
-+            entityplayer = (EntityPlayer) iterator.next();
-+            save(entityplayer); // CraftBukkit - Force the player's inventory to be saved
-+            entityplayer.connection.disconnect(IChatBaseComponent.translatable("multiplayer.disconnect.duplicate_login"));
-+        }
-+
-+        // Instead of kicking then returning, we need to store the kick reason
-+        // in the event, check with plugins to see if it's ok, and THEN kick
-+        // depending on the outcome.
-+        SocketAddress socketaddress = loginlistener.connection.getRemoteAddress();
-+
-+        EntityPlayer entity = new EntityPlayer(this.server, this.server.getLevel(World.OVERWORLD), gameprofile, ClientInformation.createDefault());
-+        entity.transferCookieConnection = loginlistener;
-+        Player player = entity.getBukkitEntity();
-+        PlayerLoginEvent event = new PlayerLoginEvent(player, loginlistener.connection.hostname, ((java.net.InetSocketAddress) socketaddress).getAddress());
-+
-         if (this.bans.isBanned(gameprofile)) {
-             GameProfileBanEntry gameprofilebanentry = (GameProfileBanEntry) this.bans.get(gameprofile);
- 
-@@ -388,9 +552,11 @@
-                 ichatmutablecomponent.append((IChatBaseComponent) IChatBaseComponent.translatable("multiplayer.disconnect.banned.expiration", PlayerList.BAN_DATE_FORMAT.format(gameprofilebanentry.getExpires())));
-             }
- 
--            return ichatmutablecomponent;
-+            // return chatmessage;
-+            event.disallow(PlayerLoginEvent.Result.KICK_BANNED, CraftChatMessage.fromComponent(ichatmutablecomponent));
-         } else if (!this.isWhiteListed(gameprofile)) {
--            return IChatBaseComponent.translatable("multiplayer.disconnect.not_whitelisted");
-+            ichatmutablecomponent = IChatBaseComponent.translatable("multiplayer.disconnect.not_whitelisted");
-+            event.disallow(PlayerLoginEvent.Result.KICK_WHITELIST, CraftChatMessage.fromComponent(ichatmutablecomponent));
-         } else if (this.ipBans.isBanned(socketaddress)) {
-             IpBanEntry ipbanentry = this.ipBans.get(socketaddress);
- 
-@@ -399,17 +565,32 @@
-                 ichatmutablecomponent.append((IChatBaseComponent) IChatBaseComponent.translatable("multiplayer.disconnect.banned_ip.expiration", PlayerList.BAN_DATE_FORMAT.format(ipbanentry.getExpires())));
-             }
- 
--            return ichatmutablecomponent;
-+            // return chatmessage;
-+            event.disallow(PlayerLoginEvent.Result.KICK_BANNED, CraftChatMessage.fromComponent(ichatmutablecomponent));
-         } else {
--            return this.players.size() >= this.maxPlayers && !this.canBypassPlayerLimit(gameprofile) ? IChatBaseComponent.translatable("multiplayer.disconnect.server_full") : null;
-+            // return this.players.size() >= this.maxPlayers && !this.canBypassPlayerLimit(gameprofile) ? IChatBaseComponent.translatable("multiplayer.disconnect.server_full") : null;
-+            if (this.players.size() >= this.maxPlayers && !this.canBypassPlayerLimit(gameprofile)) {
-+                event.disallow(PlayerLoginEvent.Result.KICK_FULL, "The server is full");
-+            }
-+        }
-+
-+        cserver.getPluginManager().callEvent(event);
-+        if (event.getResult() != PlayerLoginEvent.Result.ALLOWED) {
-+            loginlistener.disconnect(event.getKickMessage());
-+            return null;
-         }
-+        return entity;
-     }
- 
--    public EntityPlayer getPlayerForLogin(GameProfile gameprofile, ClientInformation clientinformation) {
--        return new EntityPlayer(this.server, this.server.overworld(), gameprofile, clientinformation);
-+    // CraftBukkit start - added EntityPlayer
-+    public EntityPlayer getPlayerForLogin(GameProfile gameprofile, ClientInformation clientinformation, EntityPlayer player) {
-+        player.updateOptions(clientinformation);
-+        return player;
-+        // CraftBukkit end
-     }
- 
--    public boolean disconnectAllPlayersWithProfile(GameProfile gameprofile) {
-+    public boolean disconnectAllPlayersWithProfile(GameProfile gameprofile, EntityPlayer player) { // CraftBukkit - added EntityPlayer
-+        /* CraftBukkit startMoved up
-         UUID uuid = gameprofile.getId();
-         Set<EntityPlayer> set = Sets.newIdentityHashSet();
-         Iterator iterator = this.players.iterator();
-@@ -437,22 +618,41 @@
-         }
- 
-         return !set.isEmpty();
-+        */
-+        return player == null;
-+        // CraftBukkit end
-     }
- 
--    public EntityPlayer respawn(EntityPlayer entityplayer, boolean flag, Entity.RemovalReason entity_removalreason) {
-+    // CraftBukkit start
-+    public EntityPlayer respawn(EntityPlayer entityplayer, boolean flag, Entity.RemovalReason entity_removalreason, RespawnReason reason) {
-+        return this.respawn(entityplayer, flag, entity_removalreason, reason, null);
-+    }
-+
-+    public EntityPlayer respawn(EntityPlayer entityplayer, boolean flag, Entity.RemovalReason entity_removalreason, RespawnReason reason, Location location) {
-+        entityplayer.stopRiding(); // CraftBukkit
-         this.players.remove(entityplayer);
-         entityplayer.serverLevel().removePlayerImmediately(entityplayer, entity_removalreason);
-+        /* CraftBukkit start
-         TeleportTransition teleporttransition = entityplayer.findRespawnPositionAndUseSpawnBlock(!flag, TeleportTransition.DO_NOTHING);
-         WorldServer worldserver = teleporttransition.newLevel();
-         EntityPlayer entityplayer1 = new EntityPlayer(this.server, worldserver, entityplayer.getGameProfile(), entityplayer.clientInformation());
-+        // */
-+        EntityPlayer entityplayer1 = entityplayer;
-+        World fromWorld = entityplayer.level();
-+        entityplayer.wonGame = false;
-+        // CraftBukkit end
- 
-         entityplayer1.connection = entityplayer.connection;
-         entityplayer1.restoreFrom(entityplayer, flag);
-         entityplayer1.setId(entityplayer.getId());
-         entityplayer1.setMainArm(entityplayer.getMainArm());
-+        // CraftBukkit - not required, just copies old location into reused entity
-+        /*
-         if (!teleporttransition.missingRespawnBlock()) {
-             entityplayer1.copyRespawnPosition(entityplayer);
-         }
-+         */
-+        // CraftBukkit end
- 
-         Iterator iterator = entityplayer.getTags().iterator();
- 
-@@ -462,11 +662,26 @@
-             entityplayer1.addTag(s);
-         }
- 
-+        // CraftBukkit start - fire PlayerRespawnEvent
-+        TeleportTransition teleporttransition;
-+        if (location == null) {
-+            teleporttransition = entityplayer.findRespawnPositionAndUseSpawnBlock(!flag, TeleportTransition.DO_NOTHING, reason);
-+
-+            if (!flag) entityplayer.reset(); // SPIGOT-4785
-+        } else {
-+            teleporttransition = new TeleportTransition(((CraftWorld) location.getWorld()).getHandle(), CraftLocation.toVec3D(location), Vec3D.ZERO, location.getYaw(), location.getPitch(), TeleportTransition.DO_NOTHING);
-+        }
-+        WorldServer worldserver = teleporttransition.newLevel();
-+        entityplayer1.spawnIn(worldserver);
-+        entityplayer1.unsetRemoved();
-+        entityplayer1.setShiftKeyDown(false);
-         Vec3D vec3d = teleporttransition.position();
- 
--        entityplayer1.moveTo(vec3d.x, vec3d.y, vec3d.z, teleporttransition.yRot(), teleporttransition.xRot());
-+        entityplayer1.forceSetPositionRotation(vec3d.x, vec3d.y, vec3d.z, teleporttransition.yRot(), teleporttransition.xRot());
-+        // CraftBukkit end
-         if (teleporttransition.missingRespawnBlock()) {
-             entityplayer1.connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.NO_RESPAWN_BLOCK_AVAILABLE, 0.0F));
-+            entityplayer1.setRespawnPosition(null, null, 0f, false, false, PlayerSpawnChangeEvent.Cause.RESET); // CraftBukkit - SPIGOT-5988: Clear respawn location when obstructed
-         }
- 
-         int i = flag ? 1 : 0;
-@@ -474,17 +689,19 @@
-         WorldData worlddata = worldserver1.getLevelData();
- 
-         entityplayer1.connection.send(new PacketPlayOutRespawn(entityplayer1.createCommonSpawnInfo(worldserver1), (byte) i));
--        entityplayer1.connection.teleport(entityplayer1.getX(), entityplayer1.getY(), entityplayer1.getZ(), entityplayer1.getYRot(), entityplayer1.getXRot());
-+        entityplayer1.connection.teleport(CraftLocation.toBukkit(entityplayer1.position(), worldserver1.getWorld(), entityplayer1.getYRot(), entityplayer1.getXRot())); // CraftBukkit
-         entityplayer1.connection.send(new PacketPlayOutSpawnPosition(worldserver.getSharedSpawnPos(), worldserver.getSharedSpawnAngle()));
-         entityplayer1.connection.send(new PacketPlayOutServerDifficulty(worlddata.getDifficulty(), worlddata.isDifficultyLocked()));
-         entityplayer1.connection.send(new PacketPlayOutExperience(entityplayer1.experienceProgress, entityplayer1.totalExperience, entityplayer1.experienceLevel));
-         this.sendActivePlayerEffects(entityplayer1);
-         this.sendLevelInfo(entityplayer1, worldserver);
-         this.sendPlayerPermissionLevel(entityplayer1);
--        worldserver.addRespawnedPlayer(entityplayer1);
--        this.players.add(entityplayer1);
--        this.playersByUUID.put(entityplayer1.getUUID(), entityplayer1);
--        entityplayer1.initInventoryMenu();
-+        if (!entityplayer.connection.isDisconnected()) {
-+            worldserver.addRespawnedPlayer(entityplayer1);
-+            this.players.add(entityplayer1);
-+            this.playersByUUID.put(entityplayer1.getUUID(), entityplayer1);
-+        }
-+        // entityplayer1.initInventoryMenu();
-         entityplayer1.setHealth(entityplayer1.getHealth());
-         BlockPosition blockposition = entityplayer1.getRespawnPosition();
-         WorldServer worldserver2 = this.server.getLevel(entityplayer1.getRespawnDimension());
-@@ -496,6 +713,27 @@
-                 entityplayer1.connection.send(new PacketPlayOutNamedSoundEffect(SoundEffects.RESPAWN_ANCHOR_DEPLETE, SoundCategory.BLOCKS, (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), 1.0F, 1.0F, worldserver.getRandom().nextLong()));
-             }
-         }
-+        // Added from changeDimension
-+        sendAllPlayerInfo(entityplayer); // Update health, etc...
-+        entityplayer.onUpdateAbilities();
-+        for (MobEffect mobEffect : entityplayer.getActiveEffects()) {
-+            entityplayer.connection.send(new PacketPlayOutEntityEffect(entityplayer.getId(), mobEffect, false)); // blend = false
-+        }
-+
-+        // Fire advancement trigger
-+        entityplayer.triggerDimensionChangeTriggers(worldserver);
-+
-+        // Don't fire on respawn
-+        if (fromWorld != worldserver) {
-+            PlayerChangedWorldEvent event = new PlayerChangedWorldEvent(entityplayer.getBukkitEntity(), fromWorld.getWorld());
-+            server.server.getPluginManager().callEvent(event);
-+        }
-+
-+        // Save player file again if they were disconnected
-+        if (entityplayer.connection.isDisconnected()) {
-+            this.save(entityplayer);
-+        }
-+        // CraftBukkit end
- 
-         return entityplayer1;
-     }
-@@ -524,7 +762,18 @@
- 
-     public void tick() {
-         if (++this.sendAllPlayerInfoIn > 600) {
--            this.broadcastAll(new ClientboundPlayerInfoUpdatePacket(EnumSet.of(ClientboundPlayerInfoUpdatePacket.a.UPDATE_LATENCY), this.players));
-+            // CraftBukkit start
-+            for (int i = 0; i < this.players.size(); ++i) {
-+                final EntityPlayer target = (EntityPlayer) this.players.get(i);
-+
-+                target.connection.send(new ClientboundPlayerInfoUpdatePacket(EnumSet.of(ClientboundPlayerInfoUpdatePacket.a.UPDATE_LATENCY), this.players.stream().filter(new Predicate<EntityPlayer>() {
-+                    @Override
-+                    public boolean test(EntityPlayer input) {
-+                        return target.getBukkitEntity().canSee(input.getBukkitEntity());
-+                    }
-+                }).collect(Collectors.toList())));
-+            }
-+            // CraftBukkit end
-             this.sendAllPlayerInfoIn = 0;
-         }
- 
-@@ -541,6 +790,25 @@
- 
-     }
- 
-+    // CraftBukkit start - add a world/entity limited version
-+    public void broadcastAll(Packet packet, EntityHuman entityhuman) {
-+        for (int i = 0; i < this.players.size(); ++i) {
-+            EntityPlayer entityplayer =  this.players.get(i);
-+            if (entityhuman != null && !entityplayer.getBukkitEntity().canSee(entityhuman.getBukkitEntity())) {
-+                continue;
-+            }
-+            ((EntityPlayer) this.players.get(i)).connection.send(packet);
-+        }
-+    }
-+
-+    public void broadcastAll(Packet packet, World world) {
-+        for (int i = 0; i < world.players().size(); ++i) {
-+            ((EntityPlayer) world.players().get(i)).connection.send(packet);
-+        }
-+
-+    }
-+    // CraftBukkit end
-+
-     public void broadcastAll(Packet<?> packet, ResourceKey<World> resourcekey) {
-         Iterator iterator = this.players.iterator();
- 
-@@ -619,7 +887,7 @@
-     }
- 
-     public void deop(GameProfile gameprofile) {
--        this.ops.remove((Object) gameprofile);
-+        this.ops.remove(gameprofile); // CraftBukkit - decompile error
-         EntityPlayer entityplayer = this.getPlayer(gameprofile.getId());
- 
-         if (entityplayer != null) {
-@@ -643,6 +911,7 @@
-             entityplayer.connection.send(new PacketPlayOutEntityStatus(entityplayer, b0));
-         }
- 
-+        entityplayer.getBukkitEntity().recalculatePermissions(); // CraftBukkit
-         this.server.getCommands().sendCommands(entityplayer);
-     }
- 
-@@ -673,6 +942,12 @@
-         for (int i = 0; i < this.players.size(); ++i) {
-             EntityPlayer entityplayer = (EntityPlayer) this.players.get(i);
- 
-+            // CraftBukkit start - Test if player receiving packet can see the source of the packet
-+            if (entityhuman != null && !entityplayer.getBukkitEntity().canSee(entityhuman.getBukkitEntity())) {
-+               continue;
-+            }
-+            // CraftBukkit end
-+
-             if (entityplayer != entityhuman && entityplayer.level().dimension() == resourcekey) {
-                 double d4 = d0 - entityplayer.getX();
-                 double d5 = d1 - entityplayer.getY();
-@@ -712,15 +987,19 @@
-     public void reloadWhiteList() {}
- 
-     public void sendLevelInfo(EntityPlayer entityplayer, WorldServer worldserver) {
--        WorldBorder worldborder = this.server.overworld().getWorldBorder();
-+        WorldBorder worldborder = entityplayer.level().getWorldBorder(); // CraftBukkit
- 
-         entityplayer.connection.send(new ClientboundInitializeBorderPacket(worldborder));
-         entityplayer.connection.send(new PacketPlayOutUpdateTime(worldserver.getGameTime(), worldserver.getDayTime(), worldserver.getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)));
-         entityplayer.connection.send(new PacketPlayOutSpawnPosition(worldserver.getSharedSpawnPos(), worldserver.getSharedSpawnAngle()));
-         if (worldserver.isRaining()) {
--            entityplayer.connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.START_RAINING, 0.0F));
--            entityplayer.connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.RAIN_LEVEL_CHANGE, worldserver.getRainLevel(1.0F)));
--            entityplayer.connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.THUNDER_LEVEL_CHANGE, worldserver.getThunderLevel(1.0F)));
-+            // CraftBukkit start - handle player weather
-+            // entityplayer.connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.START_RAINING, 0.0F));
-+            // entityplayer.connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.RAIN_LEVEL_CHANGE, worldserver.getRainLevel(1.0F)));
-+            // entityplayer.connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.THUNDER_LEVEL_CHANGE, worldserver.getThunderLevel(1.0F)));
-+            entityplayer.setPlayerWeather(org.bukkit.WeatherType.DOWNFALL, false);
-+            entityplayer.updateWeather(-worldserver.rainLevel, worldserver.rainLevel, -worldserver.thunderLevel, worldserver.thunderLevel);
-+            // CraftBukkit end
-         }
- 
-         entityplayer.connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.LEVEL_CHUNKS_LOAD_START, 0.0F));
-@@ -729,8 +1008,16 @@
- 
-     public void sendAllPlayerInfo(EntityPlayer entityplayer) {
-         entityplayer.inventoryMenu.sendAllDataToRemote();
--        entityplayer.resetSentInfo();
-+        // entityplayer.resetSentInfo();
-+        entityplayer.getBukkitEntity().updateScaledHealth(); // CraftBukkit - Update scaled health on respawn and worldchange
-+        entityplayer.refreshEntityData(entityplayer); // CraftBukkkit - SPIGOT-7218: sync metadata
-         entityplayer.connection.send(new PacketPlayOutHeldItemSlot(entityplayer.getInventory().selected));
-+        // CraftBukkit start - from GameRules
-+        int i = entityplayer.serverLevel().getGameRules().getBoolean(GameRules.RULE_REDUCEDDEBUGINFO) ? 22 : 23;
-+        entityplayer.connection.send(new PacketPlayOutEntityStatus(entityplayer, (byte) i));
-+        float immediateRespawn = entityplayer.serverLevel().getGameRules().getBoolean(GameRules.RULE_DO_IMMEDIATE_RESPAWN) ? 1.0F: 0.0F;
-+        entityplayer.connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.IMMEDIATE_RESPAWN, immediateRespawn));
-+        // CraftBukkit end
-     }
- 
-     public int getPlayerCount() {
-@@ -786,12 +1073,22 @@
-     }
- 
-     public void removeAll() {
--        for (int i = 0; i < this.players.size(); ++i) {
--            ((EntityPlayer) this.players.get(i)).connection.disconnect((IChatBaseComponent) IChatBaseComponent.translatable("multiplayer.disconnect.server_shutdown"));
-+        // CraftBukkit start - disconnect safely
-+        for (EntityPlayer player : this.players) {
-+            player.connection.disconnect(CraftChatMessage.fromStringOrEmpty(this.server.server.getShutdownMessage())); // CraftBukkit - add custom shutdown message
-         }
-+        // CraftBukkit end
- 
-     }
- 
-+    // CraftBukkit start
-+    public void broadcastMessage(IChatBaseComponent[] iChatBaseComponents) {
-+        for (IChatBaseComponent component : iChatBaseComponents) {
-+            broadcastSystemMessage(component, false);
-+        }
-+    }
-+    // CraftBukkit end
-+
-     public void broadcastSystemMessage(IChatBaseComponent ichatbasecomponent, boolean flag) {
-         this.broadcastSystemMessage(ichatbasecomponent, (entityplayer) -> {
-             return ichatbasecomponent;
-@@ -849,16 +1146,23 @@
-         return playerchatmessage.hasSignature() && !playerchatmessage.hasExpiredServer(Instant.now());
-     }
- 
--    public ServerStatisticManager getPlayerStats(EntityHuman entityhuman) {
--        UUID uuid = entityhuman.getUUID();
--        ServerStatisticManager serverstatisticmanager = (ServerStatisticManager) this.stats.get(uuid);
-+    // CraftBukkit start
-+    public ServerStatisticManager getPlayerStats(EntityPlayer entityhuman) {
-+        ServerStatisticManager serverstatisticmanager = entityhuman.getStats();
-+        return serverstatisticmanager == null ? getPlayerStats(entityhuman.getUUID(), entityhuman.getDisplayName().getString()) : serverstatisticmanager;
-+    }
-+
-+    public ServerStatisticManager getPlayerStats(UUID uuid, String displayName) {
-+        EntityPlayer entityhuman = this.getPlayer(uuid);
-+        ServerStatisticManager serverstatisticmanager = entityhuman == null ? null : (ServerStatisticManager) entityhuman.getStats();
-+        // CraftBukkit end
- 
-         if (serverstatisticmanager == null) {
-             File file = this.server.getWorldPath(SavedFile.PLAYER_STATS_DIR).toFile();
-             File file1 = new File(file, String.valueOf(uuid) + ".json");
- 
-             if (!file1.exists()) {
--                File file2 = new File(file, entityhuman.getName().getString() + ".json");
-+                File file2 = new File(file, displayName + ".json"); // CraftBukkit
-                 Path path = file2.toPath();
- 
-                 if (FileUtils.isPathNormalized(path) && FileUtils.isPathPortable(path) && path.startsWith(file.getPath()) && file2.isFile()) {
-@@ -867,7 +1171,7 @@
-             }
- 
-             serverstatisticmanager = new ServerStatisticManager(this.server, file1);
--            this.stats.put(uuid, serverstatisticmanager);
-+            // this.stats.put(uuid, serverstatisticmanager); // CraftBukkit
-         }
- 
-         return serverstatisticmanager;
-@@ -875,13 +1179,13 @@
- 
-     public AdvancementDataPlayer getPlayerAdvancements(EntityPlayer entityplayer) {
-         UUID uuid = entityplayer.getUUID();
--        AdvancementDataPlayer advancementdataplayer = (AdvancementDataPlayer) this.advancements.get(uuid);
-+        AdvancementDataPlayer advancementdataplayer = (AdvancementDataPlayer) entityplayer.getAdvancements(); // CraftBukkit
- 
-         if (advancementdataplayer == null) {
-             Path path = this.server.getWorldPath(SavedFile.PLAYER_ADVANCEMENTS_DIR).resolve(String.valueOf(uuid) + ".json");
- 
-             advancementdataplayer = new AdvancementDataPlayer(this.server.getFixerUpper(), this, this.server.getAdvancements(), path, entityplayer);
--            this.advancements.put(uuid, advancementdataplayer);
-+            // this.advancements.put(uuid, advancementdataplayer); // CraftBukkit
-         }
- 
-         advancementdataplayer.setPlayer(entityplayer);
-@@ -932,15 +1236,28 @@
-     }
- 
-     public void reloadResources() {
--        Iterator iterator = this.advancements.values().iterator();
-+        // CraftBukkit start
-+        /*Iterator iterator = this.advancements.values().iterator();
- 
-         while (iterator.hasNext()) {
-             AdvancementDataPlayer advancementdataplayer = (AdvancementDataPlayer) iterator.next();
- 
-             advancementdataplayer.reload(this.server.getAdvancements());
-+        }*/
-+
-+        for (EntityPlayer player : players) {
-+            player.getAdvancements().reload(this.server.getAdvancements());
-+            player.getAdvancements().flushDirty(player); // CraftBukkit - trigger immediate flush of advancements
-         }
-+        // CraftBukkit end
- 
-         this.broadcastAll(new ClientboundUpdateTagsPacket(TagNetworkSerialization.serializeTagsToNetwork(this.registries)));
-+        // CraftBukkit start
-+        reloadRecipes();
-+    }
-+
-+    public void reloadRecipes() {
-+        // CraftBukkit end
-         CraftingManager craftingmanager = this.server.getRecipeManager();
-         PacketPlayOutRecipeUpdate packetplayoutrecipeupdate = new PacketPlayOutRecipeUpdate(craftingmanager.getSynchronizedItemProperties(), craftingmanager.getSynchronizedStonecutterRecipes());
-         Iterator iterator1 = this.players.iterator();
diff --git a/paper-server/patches/sources/net/minecraft/server/players/SleepStatus.patch b/paper-server/patches/sources/net/minecraft/server/players/SleepStatus.java.patch
similarity index 63%
rename from paper-server/patches/sources/net/minecraft/server/players/SleepStatus.patch
rename to paper-server/patches/sources/net/minecraft/server/players/SleepStatus.java.patch
index 3af51ebff8..568224fe25 100644
--- a/paper-server/patches/sources/net/minecraft/server/players/SleepStatus.patch
+++ b/paper-server/patches/sources/net/minecraft/server/players/SleepStatus.java.patch
@@ -3,26 +3,26 @@
 @@ -18,9 +18,12 @@
      }
  
-     public boolean areEnoughDeepSleeping(int i, List<EntityPlayer> list) {
--        int j = (int) list.stream().filter(EntityHuman::isSleepingLongEnough).count();
+     public boolean areEnoughDeepSleeping(int percentage, List<ServerPlayer> players) {
+-        int j = (int) players.stream().filter(Player::isSleepingLongEnough).count();
 +        // CraftBukkit start
-+        int j = (int) list.stream().filter((eh) -> { return eh.isSleepingLongEnough() || eh.fauxSleeping; }).count();
-+        boolean anyDeepSleep = list.stream().anyMatch(EntityHuman::isSleepingLongEnough);
++        int j = (int) players.stream().filter((eh) -> { return eh.isSleepingLongEnough() || eh.fauxSleeping; }).count();
++        boolean anyDeepSleep = players.stream().anyMatch(Player::isSleepingLongEnough);
  
--        return j >= this.sleepersNeeded(i);
-+        return anyDeepSleep && j >= this.sleepersNeeded(i);
+-        return j >= this.sleepersNeeded(percentage);
++        return anyDeepSleep && j >= this.sleepersNeeded(percentage);
 +        // CraftBukkit end
      }
  
-     public int sleepersNeeded(int i) {
+     public int sleepersNeeded(int percentage) {
 @@ -42,18 +45,24 @@
          this.activePlayers = 0;
          this.sleepingPlayers = 0;
-         Iterator iterator = list.iterator();
+         Iterator iterator = players.iterator();
 +        boolean anySleep = false; // CraftBukkit
  
          while (iterator.hasNext()) {
-             EntityPlayer entityplayer = (EntityPlayer) iterator.next();
+             ServerPlayer entityplayer = (ServerPlayer) iterator.next();
  
              if (!entityplayer.isSpectator()) {
                  ++this.activePlayers;
diff --git a/paper-server/patches/sources/net/minecraft/server/players/JsonList.patch b/paper-server/patches/sources/net/minecraft/server/players/StoredUserList.java.patch
similarity index 78%
rename from paper-server/patches/sources/net/minecraft/server/players/JsonList.patch
rename to paper-server/patches/sources/net/minecraft/server/players/StoredUserList.java.patch
index 411461f15a..1580322705 100644
--- a/paper-server/patches/sources/net/minecraft/server/players/JsonList.patch
+++ b/paper-server/patches/sources/net/minecraft/server/players/StoredUserList.java.patch
@@ -1,14 +1,14 @@
---- a/net/minecraft/server/players/JsonList.java
-+++ b/net/minecraft/server/players/JsonList.java
+--- a/net/minecraft/server/players/StoredUserList.java
++++ b/net/minecraft/server/players/StoredUserList.java
 @@ -54,7 +54,7 @@
      @Nullable
-     public V get(K k0) {
+     public V get(K key) {
          this.removeExpired();
--        return (JsonListEntry) this.map.get(this.getKeyForUser(k0));
-+        return (V) this.map.get(this.getKeyForUser(k0)); // CraftBukkit - fix decompile error
+-        return (StoredUserEntry) this.map.get(this.getKeyForUser(key));
++        return (V) this.map.get(this.getKeyForUser(key)); // CraftBukkit - fix decompile error
      }
  
-     public void remove(K k0) {
+     public void remove(K key) {
 @@ -85,6 +85,7 @@
      }
  
@@ -21,7 +21,7 @@
          Iterator iterator = this.map.values().iterator();
  
          while (iterator.hasNext()) {
--            V v0 = (JsonListEntry) iterator.next();
+-            V v0 = (StoredUserEntry) iterator.next();
 +            V v0 = (V) iterator.next(); // CraftBukkit - decompile error
  
              if (v0.hasExpired()) {
@@ -45,7 +45,7 @@
  
              Objects.requireNonNull(jsonlistentry);
 @@ -171,7 +172,7 @@
-                         JsonListEntry<K> jsonlistentry = this.createEntry(jsonobject);
+                         StoredUserEntry<K> jsonlistentry = this.createEntry(jsonobject);
  
                          if (jsonlistentry.getUser() != null) {
 -                            this.map.put(this.getKeyForUser(jsonlistentry.getUser()), jsonlistentry);
diff --git a/paper-server/patches/sources/net/minecraft/server/players/UserBanListEntry.java.patch b/paper-server/patches/sources/net/minecraft/server/players/UserBanListEntry.java.patch
new file mode 100644
index 0000000000..40e9a043fa
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/players/UserBanListEntry.java.patch
@@ -0,0 +1,7 @@
+--- a/net/minecraft/server/players/UserBanListEntry.java
++++ b/net/minecraft/server/players/UserBanListEntry.java
+@@ -1,3 +1,4 @@
++// mc-dev import
+ package net.minecraft.server.players;
+ 
+ import com.google.gson.JsonObject;
diff --git a/paper-server/patches/sources/net/minecraft/server/rcon/RconConsoleSource.java.patch b/paper-server/patches/sources/net/minecraft/server/rcon/RconConsoleSource.java.patch
new file mode 100644
index 0000000000..589c29e384
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/server/rcon/RconConsoleSource.java.patch
@@ -0,0 +1,49 @@
+--- a/net/minecraft/server/rcon/RconConsoleSource.java
++++ b/net/minecraft/server/rcon/RconConsoleSource.java
+@@ -8,16 +8,24 @@
+ import net.minecraft.world.entity.Entity;
+ import net.minecraft.world.phys.Vec2;
+ import net.minecraft.world.phys.Vec3;
+-
++// CraftBukkit start
++import java.net.SocketAddress;
++import org.bukkit.craftbukkit.command.CraftRemoteConsoleCommandSender;
++// CraftBukkit end
+ public class RconConsoleSource implements CommandSource {
+ 
+     private static final String RCON = "Rcon";
+     private static final Component RCON_COMPONENT = Component.literal("Rcon");
+     private final StringBuffer buffer = new StringBuffer();
+     private final MinecraftServer server;
++    // CraftBukkit start
++    public final SocketAddress socketAddress;
++    private final CraftRemoteConsoleCommandSender remoteConsole = new CraftRemoteConsoleCommandSender(this);
+ 
+-    public RconConsoleSource(MinecraftServer server) {
+-        this.server = server;
++    public RconConsoleSource(MinecraftServer minecraftserver, SocketAddress socketAddress) {
++        this.socketAddress = socketAddress;
++        // CraftBukkit end
++        this.server = minecraftserver;
+     }
+ 
+     public void prepareForCommand() {
+@@ -34,7 +42,18 @@
+         return new CommandSourceStack(this, Vec3.atLowerCornerOf(worldserver.getSharedSpawnPos()), Vec2.ZERO, worldserver, 4, "Rcon", RconConsoleSource.RCON_COMPONENT, this.server, (Entity) null);
+     }
+ 
++    // CraftBukkit start - Send a String
++    public void sendMessage(String message) {
++        this.buffer.append(message);
++    }
++
+     @Override
++    public org.bukkit.command.CommandSender getBukkitSender(CommandSourceStack wrapper) {
++        return this.remoteConsole;
++    }
++    // CraftBukkit end
++
++    @Override
+     public void sendSystemMessage(Component message) {
+         this.buffer.append(message.getString());
+     }
diff --git a/paper-server/patches/sources/net/minecraft/server/rcon/RemoteControlCommandListener.patch b/paper-server/patches/sources/net/minecraft/server/rcon/RemoteControlCommandListener.patch
deleted file mode 100644
index df736515af..0000000000
--- a/paper-server/patches/sources/net/minecraft/server/rcon/RemoteControlCommandListener.patch
+++ /dev/null
@@ -1,45 +0,0 @@
---- a/net/minecraft/server/rcon/RemoteControlCommandListener.java
-+++ b/net/minecraft/server/rcon/RemoteControlCommandListener.java
-@@ -9,14 +9,23 @@
- import net.minecraft.world.phys.Vec2F;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import java.net.SocketAddress;
-+import org.bukkit.craftbukkit.command.CraftRemoteConsoleCommandSender;
-+// CraftBukkit end
- public class RemoteControlCommandListener implements ICommandListener {
- 
-     private static final String RCON = "Rcon";
-     private static final IChatBaseComponent RCON_COMPONENT = IChatBaseComponent.literal("Rcon");
-     private final StringBuffer buffer = new StringBuffer();
-     private final MinecraftServer server;
-+    // CraftBukkit start
-+    public final SocketAddress socketAddress;
-+    private final CraftRemoteConsoleCommandSender remoteConsole = new CraftRemoteConsoleCommandSender(this);
- 
--    public RemoteControlCommandListener(MinecraftServer minecraftserver) {
-+    public RemoteControlCommandListener(MinecraftServer minecraftserver, SocketAddress socketAddress) {
-+        this.socketAddress = socketAddress;
-+        // CraftBukkit end
-         this.server = minecraftserver;
-     }
- 
-@@ -34,6 +43,17 @@
-         return new CommandListenerWrapper(this, Vec3D.atLowerCornerOf(worldserver.getSharedSpawnPos()), Vec2F.ZERO, worldserver, 4, "Rcon", RemoteControlCommandListener.RCON_COMPONENT, this.server, (Entity) null);
-     }
- 
-+    // CraftBukkit start - Send a String
-+    public void sendMessage(String message) {
-+        this.buffer.append(message);
-+    }
-+
-+    @Override
-+    public org.bukkit.command.CommandSender getBukkitSender(CommandListenerWrapper wrapper) {
-+        return this.remoteConsole;
-+    }
-+    // CraftBukkit end
-+
-     @Override
-     public void sendSystemMessage(IChatBaseComponent ichatbasecomponent) {
-         this.buffer.append(ichatbasecomponent.getString());
diff --git a/paper-server/patches/sources/net/minecraft/server/rcon/thread/RemoteControlSession.patch b/paper-server/patches/sources/net/minecraft/server/rcon/thread/RconClient.java.patch
similarity index 61%
rename from paper-server/patches/sources/net/minecraft/server/rcon/thread/RemoteControlSession.patch
rename to paper-server/patches/sources/net/minecraft/server/rcon/thread/RconClient.java.patch
index 3feb32243d..1aa09ff9d7 100644
--- a/paper-server/patches/sources/net/minecraft/server/rcon/thread/RemoteControlSession.patch
+++ b/paper-server/patches/sources/net/minecraft/server/rcon/thread/RconClient.java.patch
@@ -1,38 +1,41 @@
---- a/net/minecraft/server/rcon/thread/RemoteControlSession.java
-+++ b/net/minecraft/server/rcon/thread/RemoteControlSession.java
-@@ -11,6 +11,10 @@
- import net.minecraft.server.IMinecraftServer;
- import net.minecraft.server.rcon.StatusChallengeUtils;
- import org.slf4j.Logger;
+--- a/net/minecraft/server/rcon/thread/RconClient.java
++++ b/net/minecraft/server/rcon/thread/RconClient.java
+@@ -8,9 +8,12 @@
+ import java.net.Socket;
+ import java.nio.charset.StandardCharsets;
+ import java.util.Locale;
++import org.slf4j.Logger;
+ import net.minecraft.server.ServerInterface;
 +// CraftBukkit start
 +import net.minecraft.server.dedicated.DedicatedServer;
-+import net.minecraft.server.rcon.RemoteControlCommandListener;
-+// CraftBukkit end
+ import net.minecraft.server.rcon.PktUtils;
+-import org.slf4j.Logger;
++import net.minecraft.server.rcon.RconConsoleSource;
  
- public class RemoteControlSession extends RemoteConnectionThread {
+ public class RconClient extends GenericThread {
  
-@@ -24,11 +28,14 @@
+@@ -24,11 +27,14 @@
      private final Socket client;
      private final byte[] buf = new byte[1460];
      private final String rconPassword;
--    private final IMinecraftServer serverInterface;
+-    private final ServerInterface serverInterface;
 +    // CraftBukkit start
 +    private final DedicatedServer serverInterface;
-+    private final RemoteControlCommandListener rconConsoleSource;
++    private final RconConsoleSource rconConsoleSource;
 +    // CraftBukkit end
  
-     RemoteControlSession(IMinecraftServer iminecraftserver, String s, Socket socket) {
+     RconClient(ServerInterface server, String password, Socket socket) {
          super("RCON Client " + String.valueOf(socket.getInetAddress()));
--        this.serverInterface = iminecraftserver;
-+        this.serverInterface = (DedicatedServer) iminecraftserver; // CraftBukkit
+-        this.serverInterface = server;
++        this.serverInterface = (DedicatedServer) server; // CraftBukkit
          this.client = socket;
  
          try {
-@@ -38,11 +45,14 @@
+@@ -38,11 +44,14 @@
          }
  
-         this.rconPassword = s;
-+        this.rconConsoleSource = new net.minecraft.server.rcon.RemoteControlCommandListener(this.serverInterface, socket.getRemoteSocketAddress()); // CraftBukkit
+         this.rconPassword = password;
++        this.rconConsoleSource = new net.minecraft.server.rcon.RconConsoleSource(this.serverInterface, socket.getRemoteSocketAddress()); // CraftBukkit
      }
  
      public void run() {
@@ -45,8 +48,8 @@
                  if (!this.running) {
                      return;
                  }
-@@ -71,7 +81,7 @@
-                                 String s = StatusChallengeUtils.stringFromByteArray(this.buf, j, i);
+@@ -71,7 +80,7 @@
+                                 String s = PktUtils.stringFromByteArray(this.buf, j, i);
  
                                  try {
 -                                    this.sendCmdResponse(l, this.serverInterface.runCommand(s));
@@ -54,7 +57,7 @@
                                  } catch (Exception exception) {
                                      this.sendCmdResponse(l, "Error executing: " + s + " (" + exception.getMessage() + ")");
                                  }
-@@ -98,6 +108,7 @@
+@@ -98,6 +107,7 @@
                              continue;
                      }
                  }
@@ -62,7 +65,7 @@
              } catch (IOException ioexception) {
                  return;
              } catch (Exception exception1) {
-@@ -109,8 +120,10 @@
+@@ -109,8 +119,10 @@
                  this.running = false;
              }
  
@@ -74,4 +77,4 @@
 +        // CraftBukkit end
      }
  
-     private void send(int i, int j, String s) throws IOException {
+     private void send(int sessionToken, int responseType, String message) throws IOException {
diff --git a/paper-server/patches/sources/net/minecraft/stats/RecipeBookServer.patch b/paper-server/patches/sources/net/minecraft/stats/ServerRecipeBook.java.patch
similarity index 57%
rename from paper-server/patches/sources/net/minecraft/stats/RecipeBookServer.patch
rename to paper-server/patches/sources/net/minecraft/stats/ServerRecipeBook.java.patch
index 38c18d2127..f95e98f66a 100644
--- a/paper-server/patches/sources/net/minecraft/stats/RecipeBookServer.patch
+++ b/paper-server/patches/sources/net/minecraft/stats/ServerRecipeBook.java.patch
@@ -1,20 +1,20 @@
---- a/net/minecraft/stats/RecipeBookServer.java
-+++ b/net/minecraft/stats/RecipeBookServer.java
+--- a/net/minecraft/stats/ServerRecipeBook.java
++++ b/net/minecraft/stats/ServerRecipeBook.java
 @@ -29,6 +29,8 @@
  import net.minecraft.world.item.crafting.display.RecipeDisplayId;
  import org.slf4j.Logger;
  
 +import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
 +
- public class RecipeBookServer extends RecipeBook {
+ public class ServerRecipeBook extends RecipeBook {
  
      public static final String RECIPE_BOOK_TAG = "recipeBook";
 @@ -72,7 +74,7 @@
              RecipeHolder<?> recipeholder = (RecipeHolder) iterator.next();
-             ResourceKey<IRecipe<?>> resourcekey = recipeholder.id();
+             ResourceKey<Recipe<?>> resourcekey = recipeholder.id();
  
 -            if (!this.known.contains(resourcekey) && !recipeholder.value().isSpecial()) {
-+            if (!this.known.contains(resourcekey) && !recipeholder.value().isSpecial() && CraftEventFactory.handlePlayerRecipeListUpdateEvent(entityplayer, resourcekey.location())) { // CraftBukkit
++            if (!this.known.contains(resourcekey) && !recipeholder.value().isSpecial() && CraftEventFactory.handlePlayerRecipeListUpdateEvent(player, resourcekey.location())) { // CraftBukkit
                  this.add(resourcekey);
                  this.addHighlight(resourcekey);
                  this.displayResolver.displaysForRecipe(resourcekey, (recipedisplayentry) -> {
@@ -23,8 +23,8 @@
          }
  
 -        if (!list.isEmpty()) {
-+        if (!list.isEmpty() && entityplayer.connection != null) { // SPIGOT-4478 during PlayerLoginEvent
-             entityplayer.connection.send(new ClientboundRecipeBookAddPacket(list, false));
++        if (!list.isEmpty() && player.connection != null) { // SPIGOT-4478 during PlayerLoginEvent
+             player.connection.send(new ClientboundRecipeBookAddPacket(list, false));
          }
  
 @@ -105,7 +107,7 @@
@@ -32,7 +32,7 @@
          }
  
 -        if (!list.isEmpty()) {
-+        if (!list.isEmpty() && entityplayer.connection != null) { // SPIGOT-4478 during PlayerLoginEvent
-             entityplayer.connection.send(new ClientboundRecipeBookRemovePacket(list));
++        if (!list.isEmpty() && player.connection != null) { // SPIGOT-4478 during PlayerLoginEvent
+             player.connection.send(new ClientboundRecipeBookRemovePacket(list));
          }
  
diff --git a/paper-server/patches/sources/net/minecraft/stats/ServerStatisticManager.patch b/paper-server/patches/sources/net/minecraft/stats/ServerStatisticManager.patch
deleted file mode 100644
index ac3c4fffdf..0000000000
--- a/paper-server/patches/sources/net/minecraft/stats/ServerStatisticManager.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- a/net/minecraft/stats/ServerStatisticManager.java
-+++ b/net/minecraft/stats/ServerStatisticManager.java
-@@ -1,3 +1,4 @@
-+// mc-dev import
- package net.minecraft.stats;
- 
- import com.google.common.collect.Maps;
-@@ -158,13 +159,12 @@
-     }
- 
-     private <T> Optional<Statistic<T>> getStat(StatisticWrapper<T> statisticwrapper, String s) {
--        Optional optional = Optional.ofNullable(MinecraftKey.tryParse(s));
--        IRegistry iregistry = statisticwrapper.getRegistry();
-+        // CraftBukkit - decompile error start
-+        Optional<MinecraftKey> optional = Optional.ofNullable(MinecraftKey.tryParse(s));
-+        IRegistry<T> iregistry = statisticwrapper.getRegistry();
- 
--        Objects.requireNonNull(iregistry);
--        optional = optional.flatMap(iregistry::getOptional);
--        Objects.requireNonNull(statisticwrapper);
--        return optional.map(statisticwrapper::get);
-+        return optional.flatMap(iregistry::getOptional).map(statisticwrapper::get);
-+        // CraftBukkit - decompile error end
-     }
- 
-     private static NBTTagCompound fromJson(JsonObject jsonobject) {
diff --git a/paper-server/patches/sources/net/minecraft/stats/ServerStatsCounter.java.patch b/paper-server/patches/sources/net/minecraft/stats/ServerStatsCounter.java.patch
new file mode 100644
index 0000000000..65bbb793d8
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/stats/ServerStatsCounter.java.patch
@@ -0,0 +1,26 @@
+--- a/net/minecraft/stats/ServerStatsCounter.java
++++ b/net/minecraft/stats/ServerStatsCounter.java
+@@ -1,3 +1,4 @@
++// mc-dev import
+ package net.minecraft.stats;
+ 
+ import com.google.common.collect.Maps;
+@@ -158,13 +159,12 @@
+     }
+ 
+     private <T> Optional<Stat<T>> getStat(StatType<T> type, String id) {
+-        Optional optional = Optional.ofNullable(ResourceLocation.tryParse(id));
+-        Registry iregistry = type.getRegistry();
++        // CraftBukkit - decompile error start
++        Optional<ResourceLocation> optional = Optional.ofNullable(ResourceLocation.tryParse(id));
++        Registry<T> iregistry = type.getRegistry();
+ 
+-        Objects.requireNonNull(iregistry);
+-        optional = optional.flatMap(iregistry::getOptional);
+-        Objects.requireNonNull(type);
+-        return optional.map(type::get);
++        return optional.flatMap(iregistry::getOptional).map(type::get);
++        // CraftBukkit - decompile error end
+     }
+ 
+     private static CompoundTag fromJson(JsonObject json) {
diff --git a/paper-server/patches/sources/net/minecraft/stats/StatisticManager.patch b/paper-server/patches/sources/net/minecraft/stats/StatisticManager.patch
deleted file mode 100644
index 118075d566..0000000000
--- a/paper-server/patches/sources/net/minecraft/stats/StatisticManager.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/net/minecraft/stats/StatisticManager.java
-+++ b/net/minecraft/stats/StatisticManager.java
-@@ -16,6 +16,12 @@
-     public void increment(EntityHuman entityhuman, Statistic<?> statistic, int i) {
-         int j = (int) Math.min((long) this.getValue(statistic) + (long) i, 2147483647L);
- 
-+        // CraftBukkit start - fire Statistic events
-+        org.bukkit.event.Cancellable cancellable = org.bukkit.craftbukkit.event.CraftEventFactory.handleStatisticsIncrease(entityhuman, statistic, this.getValue(statistic), j);
-+        if (cancellable != null && cancellable.isCancelled()) {
-+            return;
-+        }
-+        // CraftBukkit end
-         this.setValue(entityhuman, statistic, j);
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/stats/StatsCounter.java.patch b/paper-server/patches/sources/net/minecraft/stats/StatsCounter.java.patch
new file mode 100644
index 0000000000..51c6680579
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/stats/StatsCounter.java.patch
@@ -0,0 +1,15 @@
+--- a/net/minecraft/stats/StatsCounter.java
++++ b/net/minecraft/stats/StatsCounter.java
+@@ -16,6 +16,12 @@
+     public void increment(Player player, Stat<?> stat, int value) {
+         int j = (int) Math.min((long) this.getValue(stat) + (long) value, 2147483647L);
+ 
++        // CraftBukkit start - fire Statistic events
++        org.bukkit.event.Cancellable cancellable = org.bukkit.craftbukkit.event.CraftEventFactory.handleStatisticsIncrease(player, stat, this.getValue(stat), j);
++        if (cancellable != null && cancellable.isCancelled()) {
++            return;
++        }
++        // CraftBukkit end
+         this.setValue(player, stat, j);
+     }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/util/SpawnUtil.java.patch b/paper-server/patches/sources/net/minecraft/util/SpawnUtil.java.patch
new file mode 100644
index 0000000000..c10588bdee
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/util/SpawnUtil.java.patch
@@ -0,0 +1,44 @@
+--- a/net/minecraft/util/SpawnUtil.java
++++ b/net/minecraft/util/SpawnUtil.java
+@@ -21,24 +21,31 @@
+     public SpawnUtil() {}
+ 
+     public static <T extends Mob> Optional<T> trySpawnMob(EntityType<T> entityType, EntitySpawnReason reason, ServerLevel world, BlockPos pos, int tries, int horizontalRange, int verticalRange, SpawnUtil.Strategy requirements, boolean requireEmptySpace) {
+-        BlockPos.MutableBlockPos blockposition_mutableblockposition = pos.mutable();
++        // CraftBukkit start
++        return SpawnUtil.trySpawnMob(entityType, reason, world, pos, tries, horizontalRange, verticalRange, requirements, requireEmptySpace, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT);
++    }
+ 
+-        for (int l = 0; l < tries; ++l) {
+-            int i1 = Mth.randomBetweenInclusive(world.random, -horizontalRange, horizontalRange);
+-            int j1 = Mth.randomBetweenInclusive(world.random, -horizontalRange, horizontalRange);
++    public static <T extends Mob> Optional<T> trySpawnMob(EntityType<T> entitytypes, EntitySpawnReason entityspawnreason, ServerLevel worldserver, BlockPos blockposition, int i, int j, int k, SpawnUtil.Strategy spawnutil_a, boolean flag, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) {
++        // CraftBukkit end
++        BlockPos.MutableBlockPos blockposition_mutableblockposition = blockposition.mutable();
+ 
+-            blockposition_mutableblockposition.setWithOffset(pos, i1, verticalRange, j1);
+-            if (world.getWorldBorder().isWithinBounds((BlockPos) blockposition_mutableblockposition) && SpawnUtil.moveToPossibleSpawnPosition(world, verticalRange, blockposition_mutableblockposition, requirements) && (!requireEmptySpace || world.noCollision(entityType.getSpawnAABB((double) blockposition_mutableblockposition.getX() + 0.5D, (double) blockposition_mutableblockposition.getY(), (double) blockposition_mutableblockposition.getZ() + 0.5D)))) {
+-                T t0 = (Mob) entityType.create(world, (Consumer) null, blockposition_mutableblockposition, reason, false, false);
++        for (int l = 0; l < i; ++l) {
++            int i1 = Mth.randomBetweenInclusive(worldserver.random, -j, j);
++            int j1 = Mth.randomBetweenInclusive(worldserver.random, -j, j);
+ 
++            blockposition_mutableblockposition.setWithOffset(blockposition, i1, k, j1);
++            if (worldserver.getWorldBorder().isWithinBounds((BlockPos) blockposition_mutableblockposition) && SpawnUtil.moveToPossibleSpawnPosition(worldserver, k, blockposition_mutableblockposition, spawnutil_a) && (!flag || worldserver.noCollision(entitytypes.getSpawnAABB((double) blockposition_mutableblockposition.getX() + 0.5D, (double) blockposition_mutableblockposition.getY(), (double) blockposition_mutableblockposition.getZ() + 0.5D)))) {
++                T t0 = entitytypes.create(worldserver, (Consumer<T>) null, blockposition_mutableblockposition, entityspawnreason, false, false); // CraftBukkit - decompile error
++
+                 if (t0 != null) {
+-                    if (t0.checkSpawnRules(world, reason) && t0.checkSpawnObstruction(world)) {
+-                        world.addFreshEntityWithPassengers(t0);
++                    if (t0.checkSpawnRules(worldserver, entityspawnreason) && t0.checkSpawnObstruction(worldserver)) {
++                        worldserver.addFreshEntityWithPassengers(t0, reason); // CraftBukkit
++                        if (t0.isRemoved()) return Optional.empty(); // CraftBukkit
+                         t0.playAmbientSound();
+                         return Optional.of(t0);
+                     }
+ 
+-                    t0.discard();
++                    t0.discard(null); // CraftBukkit - add Bukkit remove cause
+                 }
+             }
+         }
diff --git a/paper-server/patches/sources/net/minecraft/util/SpawnUtil.patch b/paper-server/patches/sources/net/minecraft/util/SpawnUtil.patch
deleted file mode 100644
index 7e75aa0c21..0000000000
--- a/paper-server/patches/sources/net/minecraft/util/SpawnUtil.patch
+++ /dev/null
@@ -1,36 +0,0 @@
---- a/net/minecraft/util/SpawnUtil.java
-+++ b/net/minecraft/util/SpawnUtil.java
-@@ -21,6 +21,12 @@
-     public SpawnUtil() {}
- 
-     public static <T extends EntityInsentient> Optional<T> trySpawnMob(EntityTypes<T> entitytypes, EntitySpawnReason entityspawnreason, WorldServer worldserver, BlockPosition blockposition, int i, int j, int k, SpawnUtil.a spawnutil_a, boolean flag) {
-+        // CraftBukkit start
-+        return trySpawnMob(entitytypes, entityspawnreason, worldserver, blockposition, i, j, k, spawnutil_a, flag, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT);
-+    }
-+
-+    public static <T extends EntityInsentient> Optional<T> trySpawnMob(EntityTypes<T> entitytypes, EntitySpawnReason entityspawnreason, WorldServer worldserver, BlockPosition blockposition, int i, int j, int k, SpawnUtil.a spawnutil_a, boolean flag, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) {
-+        // CraftBukkit end
-         BlockPosition.MutableBlockPosition blockposition_mutableblockposition = blockposition.mutable();
- 
-         for (int l = 0; l < i; ++l) {
-@@ -29,16 +35,17 @@
- 
-             blockposition_mutableblockposition.setWithOffset(blockposition, i1, k, j1);
-             if (worldserver.getWorldBorder().isWithinBounds((BlockPosition) blockposition_mutableblockposition) && moveToPossibleSpawnPosition(worldserver, k, blockposition_mutableblockposition, spawnutil_a) && (!flag || worldserver.noCollision(entitytypes.getSpawnAABB((double) blockposition_mutableblockposition.getX() + 0.5D, (double) blockposition_mutableblockposition.getY(), (double) blockposition_mutableblockposition.getZ() + 0.5D)))) {
--                T t0 = (EntityInsentient) entitytypes.create(worldserver, (Consumer) null, blockposition_mutableblockposition, entityspawnreason, false, false);
-+                T t0 = entitytypes.create(worldserver, (Consumer<T>) null, blockposition_mutableblockposition, entityspawnreason, false, false); // CraftBukkit - decompile error
- 
-                 if (t0 != null) {
-                     if (t0.checkSpawnRules(worldserver, entityspawnreason) && t0.checkSpawnObstruction(worldserver)) {
--                        worldserver.addFreshEntityWithPassengers(t0);
-+                        worldserver.addFreshEntityWithPassengers(t0, reason); // CraftBukkit
-+                        if (t0.isRemoved()) return Optional.empty(); // CraftBukkit
-                         t0.playAmbientSound();
-                         return Optional.of(t0);
-                     }
- 
--                    t0.discard();
-+                    t0.discard(null); // CraftBukkit - add Bukkit remove cause
-                 }
-             }
-         }
diff --git a/paper-server/patches/sources/net/minecraft/util/TickThrottler.patch b/paper-server/patches/sources/net/minecraft/util/TickThrottler.java.patch
similarity index 82%
rename from paper-server/patches/sources/net/minecraft/util/TickThrottler.patch
rename to paper-server/patches/sources/net/minecraft/util/TickThrottler.java.patch
index 38e6ddbc1a..b829a1224e 100644
--- a/paper-server/patches/sources/net/minecraft/util/TickThrottler.patch
+++ b/paper-server/patches/sources/net/minecraft/util/TickThrottler.java.patch
@@ -14,8 +14,8 @@
 -    private int count;
 +    private final AtomicInteger count = new AtomicInteger(); // CraftBukkit - multithreaded field
  
-     public TickThrottler(int i, int j) {
-         this.incrementStep = i;
+     public TickThrottler(int increment, int threshold) {
+         this.incrementStep = increment;
 @@ -12,17 +16,32 @@
      }
  
@@ -26,7 +26,7 @@
  
      public void tick() {
 +        // CraftBukkit start
-+        for (int val; (val = this.count.get()) > 0 && !count.compareAndSet(val, val - 1); ) ;
++        for (int val; (val = this.count.get()) > 0 && !this.count.compareAndSet(val, val - 1); ) ;
 +        /* Use thread-safe field access instead
          if (this.count > 0) {
              --this.count;
@@ -40,14 +40,14 @@
 -        return this.count < this.threshold;
 +        // CraftBukkit start - use thread-safe field access instead
 +        return this.count.get() < this.threshold;
-+    }
+     }
 +
 +    public boolean isIncrementAndUnderThreshold() {
-+        return isIncrementAndUnderThreshold(this.incrementStep, this.threshold);
++        return this.isIncrementAndUnderThreshold(this.incrementStep, this.threshold);
 +    }
 +
 +    public boolean isIncrementAndUnderThreshold(int incrementStep, int threshold) {
 +        return this.count.addAndGet(incrementStep) < threshold;
 +        // CraftBukkit end
-     }
++    }
  }
diff --git a/paper-server/patches/sources/net/minecraft/util/datafix/DataConverterRegistry.patch b/paper-server/patches/sources/net/minecraft/util/datafix/DataFixers.java.patch
similarity index 52%
rename from paper-server/patches/sources/net/minecraft/util/datafix/DataConverterRegistry.patch
rename to paper-server/patches/sources/net/minecraft/util/datafix/DataFixers.java.patch
index f801d05570..86e8fe50b7 100644
--- a/paper-server/patches/sources/net/minecraft/util/datafix/DataConverterRegistry.patch
+++ b/paper-server/patches/sources/net/minecraft/util/datafix/DataFixers.java.patch
@@ -1,82 +1,82 @@
---- a/net/minecraft/util/datafix/DataConverterRegistry.java
-+++ b/net/minecraft/util/datafix/DataConverterRegistry.java
-@@ -517,6 +517,18 @@
-         datafixerbuilder.addFixer(new DataConverterItemFrame(schema44, false));
-         Schema schema45 = datafixerbuilder.addSchema(1458, DataConverterRegistry.SAME_NAMESPACED);
+--- a/net/minecraft/util/datafix/DataFixers.java
++++ b/net/minecraft/util/datafix/DataFixers.java
+@@ -302,6 +302,18 @@
+         builder.addFixer(new EntityItemFrameDirectionFix(schema44, false));
+         Schema schema45 = builder.addSchema(1458, DataFixers.SAME_NAMESPACED);
  
 +        // CraftBukkit start
-+        datafixerbuilder.addFixer(new com.mojang.datafixers.DataFix(schema45, false) {
++        builder.addFixer(new com.mojang.datafixers.DataFix(schema45, false) {
 +            @Override
 +            protected com.mojang.datafixers.TypeRewriteRule makeRule() {
-+                return this.fixTypeEverywhereTyped("Player CustomName", this.getInputSchema().getType(DataConverterTypes.PLAYER), (typed) -> {
++                return this.fixTypeEverywhereTyped("Player CustomName", this.getInputSchema().getType(References.PLAYER), (typed) -> {
 +                    return typed.update(DSL.remainderFinder(), (dynamic) -> {
-+                        return DataConverterCustomNameEntity.fixTagCustomName(dynamic);
++                        return EntityCustomNameToComponentFix.fixTagCustomName(dynamic);
 +                    });
 +                });
 +            }
 +        });
 +        // CraftBukkit end
-         datafixerbuilder.addFixer(new DataConverterCustomNameEntity(schema45, false));
-         datafixerbuilder.addFixer(new DataConverterCustomNameItem(schema45, false));
-         datafixerbuilder.addFixer(new DataConverterCustomNameTile(schema45, false));
-@@ -775,7 +787,8 @@
-         datafixerbuilder.addFixer(new DataConverterAddChoices(schema110, "Added Zoglin", DataConverterTypes.ENTITY));
-         Schema schema111 = datafixerbuilder.addSchema(2523, DataConverterRegistry.SAME_NAMESPACED);
+         builder.addFixer(new EntityCustomNameToComponentFix(schema45, false));
+         builder.addFixer(new ItemCustomNameToComponentFix(schema45, false));
+         builder.addFixer(new BlockEntityCustomNameToComponentFix(schema45, false));
+@@ -560,7 +572,8 @@
+         builder.addFixer(new AddNewChoices(schema110, "Added Zoglin", References.ENTITY));
+         Schema schema111 = builder.addSchema(2523, DataFixers.SAME_NAMESPACED);
  
--        datafixerbuilder.addFixer(new DataConverterAttributes(schema111, "Attribute renames", createRenamerNoNamespace(ImmutableMap.builder().put("generic.maxHealth", "minecraft:generic.max_health").put("Max Health", "minecraft:generic.max_health").put("zombie.spawnReinforcements", "minecraft:zombie.spawn_reinforcements").put("Spawn Reinforcements Chance", "minecraft:zombie.spawn_reinforcements").put("horse.jumpStrength", "minecraft:horse.jump_strength").put("Jump Strength", "minecraft:horse.jump_strength").put("generic.followRange", "minecraft:generic.follow_range").put("Follow Range", "minecraft:generic.follow_range").put("generic.knockbackResistance", "minecraft:generic.knockback_resistance").put("Knockback Resistance", "minecraft:generic.knockback_resistance").put("generic.movementSpeed", "minecraft:generic.movement_speed").put("Movement Speed", "minecraft:generic.movement_speed").put("generic.flyingSpeed", "minecraft:generic.flying_speed").put("Flying Speed", "minecraft:generic.flying_speed").put("generic.attackDamage", "minecraft:generic.attack_damage").put("generic.attackKnockback", "minecraft:generic.attack_knockback").put("generic.attackSpeed", "minecraft:generic.attack_speed").put("generic.armorToughness", "minecraft:generic.armor_toughness").build())));
+-        builder.addFixer(new AttributesRenameLegacy(schema111, "Attribute renames", DataFixers.createRenamerNoNamespace(ImmutableMap.builder().put("generic.maxHealth", "minecraft:generic.max_health").put("Max Health", "minecraft:generic.max_health").put("zombie.spawnReinforcements", "minecraft:zombie.spawn_reinforcements").put("Spawn Reinforcements Chance", "minecraft:zombie.spawn_reinforcements").put("horse.jumpStrength", "minecraft:horse.jump_strength").put("Jump Strength", "minecraft:horse.jump_strength").put("generic.followRange", "minecraft:generic.follow_range").put("Follow Range", "minecraft:generic.follow_range").put("generic.knockbackResistance", "minecraft:generic.knockback_resistance").put("Knockback Resistance", "minecraft:generic.knockback_resistance").put("generic.movementSpeed", "minecraft:generic.movement_speed").put("Movement Speed", "minecraft:generic.movement_speed").put("generic.flyingSpeed", "minecraft:generic.flying_speed").put("Flying Speed", "minecraft:generic.flying_speed").put("generic.attackDamage", "minecraft:generic.attack_damage").put("generic.attackKnockback", "minecraft:generic.attack_knockback").put("generic.attackSpeed", "minecraft:generic.attack_speed").put("generic.armorToughness", "minecraft:generic.armor_toughness").build())));
 +        // CraftBukkit - decompile error
-+        datafixerbuilder.addFixer(new DataConverterAttributes(schema111, "Attribute renames", createRenamerNoNamespace(ImmutableMap.<String, String>builder().put("generic.maxHealth", "minecraft:generic.max_health").put("Max Health", "minecraft:generic.max_health").put("zombie.spawnReinforcements", "minecraft:zombie.spawn_reinforcements").put("Spawn Reinforcements Chance", "minecraft:zombie.spawn_reinforcements").put("horse.jumpStrength", "minecraft:horse.jump_strength").put("Jump Strength", "minecraft:horse.jump_strength").put("generic.followRange", "minecraft:generic.follow_range").put("Follow Range", "minecraft:generic.follow_range").put("generic.knockbackResistance", "minecraft:generic.knockback_resistance").put("Knockback Resistance", "minecraft:generic.knockback_resistance").put("generic.movementSpeed", "minecraft:generic.movement_speed").put("Movement Speed", "minecraft:generic.movement_speed").put("generic.flyingSpeed", "minecraft:generic.flying_speed").put("Flying Speed", "minecraft:generic.flying_speed").put("generic.attackDamage", "minecraft:generic.attack_damage").put("generic.attackKnockback", "minecraft:generic.attack_knockback").put("generic.attackSpeed", "minecraft:generic.attack_speed").put("generic.armorToughness", "minecraft:generic.armor_toughness").build())));
-         Schema schema112 = datafixerbuilder.addSchema(2527, DataConverterRegistry.SAME_NAMESPACED);
++        builder.addFixer(new AttributesRenameLegacy(schema111, "Attribute renames", DataFixers.createRenamerNoNamespace(ImmutableMap.<String, String>builder().put("generic.maxHealth", "minecraft:generic.max_health").put("Max Health", "minecraft:generic.max_health").put("zombie.spawnReinforcements", "minecraft:zombie.spawn_reinforcements").put("Spawn Reinforcements Chance", "minecraft:zombie.spawn_reinforcements").put("horse.jumpStrength", "minecraft:horse.jump_strength").put("Jump Strength", "minecraft:horse.jump_strength").put("generic.followRange", "minecraft:generic.follow_range").put("Follow Range", "minecraft:generic.follow_range").put("generic.knockbackResistance", "minecraft:generic.knockback_resistance").put("Knockback Resistance", "minecraft:generic.knockback_resistance").put("generic.movementSpeed", "minecraft:generic.movement_speed").put("Movement Speed", "minecraft:generic.movement_speed").put("generic.flyingSpeed", "minecraft:generic.flying_speed").put("Flying Speed", "minecraft:generic.flying_speed").put("generic.attackDamage", "minecraft:generic.attack_damage").put("generic.attackKnockback", "minecraft:generic.attack_knockback").put("generic.attackSpeed", "minecraft:generic.attack_speed").put("generic.armorToughness", "minecraft:generic.armor_toughness").build())));
+         Schema schema112 = builder.addSchema(2527, DataFixers.SAME_NAMESPACED);
  
-         datafixerbuilder.addFixer(new DataConverterBitStorageAlign(schema112));
-@@ -838,12 +851,14 @@
-         datafixerbuilder.addFixer(new DataConverterAddChoices(schema130, "Added Glow Squid", DataConverterTypes.ENTITY));
-         datafixerbuilder.addFixer(new DataConverterAddChoices(schema130, "Added Glow Item Frame", DataConverterTypes.ENTITY));
-         Schema schema131 = datafixerbuilder.addSchema(2690, DataConverterRegistry.SAME_NAMESPACED);
+         builder.addFixer(new BitStorageAlignFix(schema112));
+@@ -623,12 +636,14 @@
+         builder.addFixer(new AddNewChoices(schema130, "Added Glow Squid", References.ENTITY));
+         builder.addFixer(new AddNewChoices(schema130, "Added Glow Item Frame", References.ENTITY));
+         Schema schema131 = builder.addSchema(2690, DataFixers.SAME_NAMESPACED);
 -        ImmutableMap<String, String> immutablemap = ImmutableMap.builder().put("minecraft:weathered_copper_block", "minecraft:oxidized_copper_block").put("minecraft:semi_weathered_copper_block", "minecraft:weathered_copper_block").put("minecraft:lightly_weathered_copper_block", "minecraft:exposed_copper_block").put("minecraft:weathered_cut_copper", "minecraft:oxidized_cut_copper").put("minecraft:semi_weathered_cut_copper", "minecraft:weathered_cut_copper").put("minecraft:lightly_weathered_cut_copper", "minecraft:exposed_cut_copper").put("minecraft:weathered_cut_copper_stairs", "minecraft:oxidized_cut_copper_stairs").put("minecraft:semi_weathered_cut_copper_stairs", "minecraft:weathered_cut_copper_stairs").put("minecraft:lightly_weathered_cut_copper_stairs", "minecraft:exposed_cut_copper_stairs").put("minecraft:weathered_cut_copper_slab", "minecraft:oxidized_cut_copper_slab").put("minecraft:semi_weathered_cut_copper_slab", "minecraft:weathered_cut_copper_slab").put("minecraft:lightly_weathered_cut_copper_slab", "minecraft:exposed_cut_copper_slab").put("minecraft:waxed_semi_weathered_copper", "minecraft:waxed_weathered_copper").put("minecraft:waxed_lightly_weathered_copper", "minecraft:waxed_exposed_copper").put("minecraft:waxed_semi_weathered_cut_copper", "minecraft:waxed_weathered_cut_copper").put("minecraft:waxed_lightly_weathered_cut_copper", "minecraft:waxed_exposed_cut_copper").put("minecraft:waxed_semi_weathered_cut_copper_stairs", "minecraft:waxed_weathered_cut_copper_stairs").put("minecraft:waxed_lightly_weathered_cut_copper_stairs", "minecraft:waxed_exposed_cut_copper_stairs").put("minecraft:waxed_semi_weathered_cut_copper_slab", "minecraft:waxed_weathered_cut_copper_slab").put("minecraft:waxed_lightly_weathered_cut_copper_slab", "minecraft:waxed_exposed_cut_copper_slab").build();
 +        // CraftBukkit - decompile error
 +        ImmutableMap<String, String> immutablemap = ImmutableMap.<String, String>builder().put("minecraft:weathered_copper_block", "minecraft:oxidized_copper_block").put("minecraft:semi_weathered_copper_block", "minecraft:weathered_copper_block").put("minecraft:lightly_weathered_copper_block", "minecraft:exposed_copper_block").put("minecraft:weathered_cut_copper", "minecraft:oxidized_cut_copper").put("minecraft:semi_weathered_cut_copper", "minecraft:weathered_cut_copper").put("minecraft:lightly_weathered_cut_copper", "minecraft:exposed_cut_copper").put("minecraft:weathered_cut_copper_stairs", "minecraft:oxidized_cut_copper_stairs").put("minecraft:semi_weathered_cut_copper_stairs", "minecraft:weathered_cut_copper_stairs").put("minecraft:lightly_weathered_cut_copper_stairs", "minecraft:exposed_cut_copper_stairs").put("minecraft:weathered_cut_copper_slab", "minecraft:oxidized_cut_copper_slab").put("minecraft:semi_weathered_cut_copper_slab", "minecraft:weathered_cut_copper_slab").put("minecraft:lightly_weathered_cut_copper_slab", "minecraft:exposed_cut_copper_slab").put("minecraft:waxed_semi_weathered_copper", "minecraft:waxed_weathered_copper").put("minecraft:waxed_lightly_weathered_copper", "minecraft:waxed_exposed_copper").put("minecraft:waxed_semi_weathered_cut_copper", "minecraft:waxed_weathered_cut_copper").put("minecraft:waxed_lightly_weathered_cut_copper", "minecraft:waxed_exposed_cut_copper").put("minecraft:waxed_semi_weathered_cut_copper_stairs", "minecraft:waxed_weathered_cut_copper_stairs").put("minecraft:waxed_lightly_weathered_cut_copper_stairs", "minecraft:waxed_exposed_cut_copper_stairs").put("minecraft:waxed_semi_weathered_cut_copper_slab", "minecraft:waxed_weathered_cut_copper_slab").put("minecraft:waxed_lightly_weathered_cut_copper_slab", "minecraft:waxed_exposed_cut_copper_slab").build();
  
-         datafixerbuilder.addFixer(DataConverterItemName.create(schema131, "Renamed copper block items to new oxidized terms", createRenamer(immutablemap)));
-         datafixerbuilder.addFixer(DataConverterBlockRename.create(schema131, "Renamed copper blocks to new oxidized terms", createRenamer(immutablemap)));
-         Schema schema132 = datafixerbuilder.addSchema(2691, DataConverterRegistry.SAME_NAMESPACED);
+         builder.addFixer(ItemRenameFix.create(schema131, "Renamed copper block items to new oxidized terms", DataFixers.createRenamer(immutablemap)));
+         builder.addFixer(BlockRenameFix.create(schema131, "Renamed copper blocks to new oxidized terms", DataFixers.createRenamer(immutablemap)));
+         Schema schema132 = builder.addSchema(2691, DataFixers.SAME_NAMESPACED);
 -        ImmutableMap<String, String> immutablemap1 = ImmutableMap.builder().put("minecraft:waxed_copper", "minecraft:waxed_copper_block").put("minecraft:oxidized_copper_block", "minecraft:oxidized_copper").put("minecraft:weathered_copper_block", "minecraft:weathered_copper").put("minecraft:exposed_copper_block", "minecraft:exposed_copper").build();
 +        // CraftBukkit - decompile error
 +        ImmutableMap<String, String> immutablemap1 = ImmutableMap.<String, String>builder().put("minecraft:waxed_copper", "minecraft:waxed_copper_block").put("minecraft:oxidized_copper_block", "minecraft:oxidized_copper").put("minecraft:weathered_copper_block", "minecraft:weathered_copper").put("minecraft:exposed_copper_block", "minecraft:exposed_copper").build();
  
-         datafixerbuilder.addFixer(DataConverterItemName.create(schema132, "Rename copper item suffixes", createRenamer(immutablemap1)));
-         datafixerbuilder.addFixer(DataConverterBlockRename.create(schema132, "Rename copper blocks suffixes", createRenamer(immutablemap1)));
-@@ -851,7 +866,8 @@
+         builder.addFixer(ItemRenameFix.create(schema132, "Rename copper item suffixes", DataFixers.createRenamer(immutablemap1)));
+         builder.addFixer(BlockRenameFix.create(schema132, "Rename copper blocks suffixes", DataFixers.createRenamer(immutablemap1)));
+@@ -636,7 +651,8 @@
  
-         datafixerbuilder.addFixer(new AddFlagIfNotPresentFix(schema133, DataConverterTypes.WORLD_GEN_SETTINGS, "has_increased_height_already", false));
-         Schema schema134 = datafixerbuilder.addSchema(2696, DataConverterRegistry.SAME_NAMESPACED);
+         builder.addFixer(new AddFlagIfNotPresentFix(schema133, References.WORLD_GEN_SETTINGS, "has_increased_height_already", false));
+         Schema schema134 = builder.addSchema(2696, DataFixers.SAME_NAMESPACED);
 -        ImmutableMap<String, String> immutablemap2 = ImmutableMap.builder().put("minecraft:grimstone", "minecraft:deepslate").put("minecraft:grimstone_slab", "minecraft:cobbled_deepslate_slab").put("minecraft:grimstone_stairs", "minecraft:cobbled_deepslate_stairs").put("minecraft:grimstone_wall", "minecraft:cobbled_deepslate_wall").put("minecraft:polished_grimstone", "minecraft:polished_deepslate").put("minecraft:polished_grimstone_slab", "minecraft:polished_deepslate_slab").put("minecraft:polished_grimstone_stairs", "minecraft:polished_deepslate_stairs").put("minecraft:polished_grimstone_wall", "minecraft:polished_deepslate_wall").put("minecraft:grimstone_tiles", "minecraft:deepslate_tiles").put("minecraft:grimstone_tile_slab", "minecraft:deepslate_tile_slab").put("minecraft:grimstone_tile_stairs", "minecraft:deepslate_tile_stairs").put("minecraft:grimstone_tile_wall", "minecraft:deepslate_tile_wall").put("minecraft:grimstone_bricks", "minecraft:deepslate_bricks").put("minecraft:grimstone_brick_slab", "minecraft:deepslate_brick_slab").put("minecraft:grimstone_brick_stairs", "minecraft:deepslate_brick_stairs").put("minecraft:grimstone_brick_wall", "minecraft:deepslate_brick_wall").put("minecraft:chiseled_grimstone", "minecraft:chiseled_deepslate").build();
 +        // CraftBukkit - decompile error
 +        ImmutableMap<String, String> immutablemap2 = ImmutableMap.<String, String>builder().put("minecraft:grimstone", "minecraft:deepslate").put("minecraft:grimstone_slab", "minecraft:cobbled_deepslate_slab").put("minecraft:grimstone_stairs", "minecraft:cobbled_deepslate_stairs").put("minecraft:grimstone_wall", "minecraft:cobbled_deepslate_wall").put("minecraft:polished_grimstone", "minecraft:polished_deepslate").put("minecraft:polished_grimstone_slab", "minecraft:polished_deepslate_slab").put("minecraft:polished_grimstone_stairs", "minecraft:polished_deepslate_stairs").put("minecraft:polished_grimstone_wall", "minecraft:polished_deepslate_wall").put("minecraft:grimstone_tiles", "minecraft:deepslate_tiles").put("minecraft:grimstone_tile_slab", "minecraft:deepslate_tile_slab").put("minecraft:grimstone_tile_stairs", "minecraft:deepslate_tile_stairs").put("minecraft:grimstone_tile_wall", "minecraft:deepslate_tile_wall").put("minecraft:grimstone_bricks", "minecraft:deepslate_bricks").put("minecraft:grimstone_brick_slab", "minecraft:deepslate_brick_slab").put("minecraft:grimstone_brick_stairs", "minecraft:deepslate_brick_stairs").put("minecraft:grimstone_brick_wall", "minecraft:deepslate_brick_wall").put("minecraft:chiseled_grimstone", "minecraft:chiseled_deepslate").build();
  
-         datafixerbuilder.addFixer(DataConverterItemName.create(schema134, "Renamed grimstone block items to deepslate", createRenamer(immutablemap2)));
-         datafixerbuilder.addFixer(DataConverterBlockRename.create(schema134, "Renamed grimstone blocks to deepslate", createRenamer(immutablemap2)));
-@@ -938,10 +954,11 @@
-         datafixerbuilder.addFixer(new DataConverterAddChoices(schema159, "Added Allay", DataConverterTypes.ENTITY));
-         Schema schema160 = datafixerbuilder.addSchema(3084, DataConverterRegistry.SAME_NAMESPACED);
+         builder.addFixer(ItemRenameFix.create(schema134, "Renamed grimstone block items to deepslate", DataFixers.createRenamer(immutablemap2)));
+         builder.addFixer(BlockRenameFix.create(schema134, "Renamed grimstone blocks to deepslate", DataFixers.createRenamer(immutablemap2)));
+@@ -723,10 +739,11 @@
+         builder.addFixer(new AddNewChoices(schema159, "Added Allay", References.ENTITY));
+         Schema schema160 = builder.addSchema(3084, DataFixers.SAME_NAMESPACED);
  
--        datafixerbuilder.addFixer(new NamespacedTypeRenameFix(schema160, "game_event_renames_3084", DataConverterTypes.GAME_EVENT_NAME, createRenamer(ImmutableMap.builder().put("minecraft:block_press", "minecraft:block_activate").put("minecraft:block_switch", "minecraft:block_activate").put("minecraft:block_unpress", "minecraft:block_deactivate").put("minecraft:block_unswitch", "minecraft:block_deactivate").put("minecraft:drinking_finish", "minecraft:drink").put("minecraft:elytra_free_fall", "minecraft:elytra_glide").put("minecraft:entity_damaged", "minecraft:entity_damage").put("minecraft:entity_dying", "minecraft:entity_die").put("minecraft:entity_killed", "minecraft:entity_die").put("minecraft:mob_interact", "minecraft:entity_interact").put("minecraft:ravager_roar", "minecraft:entity_roar").put("minecraft:ring_bell", "minecraft:block_change").put("minecraft:shulker_close", "minecraft:container_close").put("minecraft:shulker_open", "minecraft:container_open").put("minecraft:wolf_shaking", "minecraft:entity_shake").build())));
+-        builder.addFixer(new NamespacedTypeRenameFix(schema160, "game_event_renames_3084", References.GAME_EVENT_NAME, DataFixers.createRenamer(ImmutableMap.builder().put("minecraft:block_press", "minecraft:block_activate").put("minecraft:block_switch", "minecraft:block_activate").put("minecraft:block_unpress", "minecraft:block_deactivate").put("minecraft:block_unswitch", "minecraft:block_deactivate").put("minecraft:drinking_finish", "minecraft:drink").put("minecraft:elytra_free_fall", "minecraft:elytra_glide").put("minecraft:entity_damaged", "minecraft:entity_damage").put("minecraft:entity_dying", "minecraft:entity_die").put("minecraft:entity_killed", "minecraft:entity_die").put("minecraft:mob_interact", "minecraft:entity_interact").put("minecraft:ravager_roar", "minecraft:entity_roar").put("minecraft:ring_bell", "minecraft:block_change").put("minecraft:shulker_close", "minecraft:container_close").put("minecraft:shulker_open", "minecraft:container_open").put("minecraft:wolf_shaking", "minecraft:entity_shake").build())));
 +        // CraftBukkit - decompile error
-+        datafixerbuilder.addFixer(new NamespacedTypeRenameFix(schema160, "game_event_renames_3084", DataConverterTypes.GAME_EVENT_NAME, createRenamer(ImmutableMap.<String, String>builder().put("minecraft:block_press", "minecraft:block_activate").put("minecraft:block_switch", "minecraft:block_activate").put("minecraft:block_unpress", "minecraft:block_deactivate").put("minecraft:block_unswitch", "minecraft:block_deactivate").put("minecraft:drinking_finish", "minecraft:drink").put("minecraft:elytra_free_fall", "minecraft:elytra_glide").put("minecraft:entity_damaged", "minecraft:entity_damage").put("minecraft:entity_dying", "minecraft:entity_die").put("minecraft:entity_killed", "minecraft:entity_die").put("minecraft:mob_interact", "minecraft:entity_interact").put("minecraft:ravager_roar", "minecraft:entity_roar").put("minecraft:ring_bell", "minecraft:block_change").put("minecraft:shulker_close", "minecraft:container_close").put("minecraft:shulker_open", "minecraft:container_open").put("minecraft:wolf_shaking", "minecraft:entity_shake").build())));
-         Schema schema161 = datafixerbuilder.addSchema(3086, DataConverterRegistry.SAME_NAMESPACED);
-         TypeReference typereference = DataConverterTypes.ENTITY;
--        Int2ObjectOpenHashMap int2objectopenhashmap = (Int2ObjectOpenHashMap) SystemUtils.make(new Int2ObjectOpenHashMap(), (int2objectopenhashmap1) -> {
-+        Int2ObjectOpenHashMap<String> int2objectopenhashmap = (Int2ObjectOpenHashMap) SystemUtils.make(new Int2ObjectOpenHashMap(), (int2objectopenhashmap1) -> { // CraftBukkit - decompile error
++        builder.addFixer(new NamespacedTypeRenameFix(schema160, "game_event_renames_3084", References.GAME_EVENT_NAME, DataFixers.createRenamer(ImmutableMap.<String, String>builder().put("minecraft:block_press", "minecraft:block_activate").put("minecraft:block_switch", "minecraft:block_activate").put("minecraft:block_unpress", "minecraft:block_deactivate").put("minecraft:block_unswitch", "minecraft:block_deactivate").put("minecraft:drinking_finish", "minecraft:drink").put("minecraft:elytra_free_fall", "minecraft:elytra_glide").put("minecraft:entity_damaged", "minecraft:entity_damage").put("minecraft:entity_dying", "minecraft:entity_die").put("minecraft:entity_killed", "minecraft:entity_die").put("minecraft:mob_interact", "minecraft:entity_interact").put("minecraft:ravager_roar", "minecraft:entity_roar").put("minecraft:ring_bell", "minecraft:block_change").put("minecraft:shulker_close", "minecraft:container_close").put("minecraft:shulker_open", "minecraft:container_open").put("minecraft:wolf_shaking", "minecraft:entity_shake").build())));
+         Schema schema161 = builder.addSchema(3086, DataFixers.SAME_NAMESPACED);
+         TypeReference typereference = References.ENTITY;
+-        Int2ObjectOpenHashMap int2objectopenhashmap = (Int2ObjectOpenHashMap) Util.make(new Int2ObjectOpenHashMap(), (int2objectopenhashmap1) -> {
++        Int2ObjectOpenHashMap<String> int2objectopenhashmap = (Int2ObjectOpenHashMap) Util.make(new Int2ObjectOpenHashMap(), (int2objectopenhashmap1) -> { // CraftBukkit - decompile error
              int2objectopenhashmap1.defaultReturnValue("minecraft:tabby");
              int2objectopenhashmap1.put(0, "minecraft:tabby");
              int2objectopenhashmap1.put(1, "minecraft:black");
-@@ -958,7 +975,8 @@
+@@ -743,7 +760,8 @@
  
          Objects.requireNonNull(int2objectopenhashmap);
-         datafixerbuilder.addFixer(new EntityVariantFix(schema161, "Change cat variant type", typereference, "minecraft:cat", "CatType", int2objectopenhashmap::get));
+         builder.addFixer(new EntityVariantFix(schema161, "Change cat variant type", typereference, "minecraft:cat", "CatType", int2objectopenhashmap::get));
 -        ImmutableMap<String, String> immutablemap3 = ImmutableMap.builder().put("textures/entity/cat/tabby.png", "minecraft:tabby").put("textures/entity/cat/black.png", "minecraft:black").put("textures/entity/cat/red.png", "minecraft:red").put("textures/entity/cat/siamese.png", "minecraft:siamese").put("textures/entity/cat/british_shorthair.png", "minecraft:british").put("textures/entity/cat/calico.png", "minecraft:calico").put("textures/entity/cat/persian.png", "minecraft:persian").put("textures/entity/cat/ragdoll.png", "minecraft:ragdoll").put("textures/entity/cat/white.png", "minecraft:white").put("textures/entity/cat/jellie.png", "minecraft:jellie").put("textures/entity/cat/all_black.png", "minecraft:all_black").build();
 +        // CraftBukkit - decompile error
 +        ImmutableMap<String, String> immutablemap3 = ImmutableMap.<String, String>builder().put("textures/entity/cat/tabby.png", "minecraft:tabby").put("textures/entity/cat/black.png", "minecraft:black").put("textures/entity/cat/red.png", "minecraft:red").put("textures/entity/cat/siamese.png", "minecraft:siamese").put("textures/entity/cat/british_shorthair.png", "minecraft:british").put("textures/entity/cat/calico.png", "minecraft:calico").put("textures/entity/cat/persian.png", "minecraft:persian").put("textures/entity/cat/ragdoll.png", "minecraft:ragdoll").put("textures/entity/cat/white.png", "minecraft:white").put("textures/entity/cat/jellie.png", "minecraft:jellie").put("textures/entity/cat/all_black.png", "minecraft:all_black").build();
  
-         datafixerbuilder.addFixer(new CriteriaRenameFix(schema161, "Migrate cat variant advancement", "minecraft:husbandry/complete_catalogue", (s) -> {
+         builder.addFixer(new CriteriaRenameFix(schema161, "Migrate cat variant advancement", "minecraft:husbandry/complete_catalogue", (s) -> {
              return (String) immutablemap3.getOrDefault(s, s);
diff --git a/paper-server/patches/sources/net/minecraft/util/datafix/fixes/DataConverterMap.patch b/paper-server/patches/sources/net/minecraft/util/datafix/fixes/ItemStackMapIdFix.java.patch
similarity index 82%
rename from paper-server/patches/sources/net/minecraft/util/datafix/fixes/DataConverterMap.patch
rename to paper-server/patches/sources/net/minecraft/util/datafix/fixes/ItemStackMapIdFix.java.patch
index 41b8ab111a..139090af75 100644
--- a/paper-server/patches/sources/net/minecraft/util/datafix/fixes/DataConverterMap.patch
+++ b/paper-server/patches/sources/net/minecraft/util/datafix/fixes/ItemStackMapIdFix.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/util/datafix/fixes/DataConverterMap.java
-+++ b/net/minecraft/util/datafix/fixes/DataConverterMap.java
+--- a/net/minecraft/util/datafix/fixes/ItemStackMapIdFix.java
++++ b/net/minecraft/util/datafix/fixes/ItemStackMapIdFix.java
 @@ -32,7 +32,7 @@
                  Typed<?> typed1 = typed.getOrCreateTyped(opticfinder1);
                  Dynamic<?> dynamic1 = (Dynamic) typed1.get(DSL.remainderFinder());
diff --git a/paper-server/patches/sources/net/minecraft/util/datafix/fixes/DataConverterFlatten.patch b/paper-server/patches/sources/net/minecraft/util/datafix/fixes/ItemStackTheFlatteningFix.java.patch
similarity index 77%
rename from paper-server/patches/sources/net/minecraft/util/datafix/fixes/DataConverterFlatten.patch
rename to paper-server/patches/sources/net/minecraft/util/datafix/fixes/ItemStackTheFlatteningFix.java.patch
index 6916dff542..a56a92ae47 100644
--- a/paper-server/patches/sources/net/minecraft/util/datafix/fixes/DataConverterFlatten.patch
+++ b/paper-server/patches/sources/net/minecraft/util/datafix/fixes/ItemStackTheFlatteningFix.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/util/datafix/fixes/DataConverterFlatten.java
-+++ b/net/minecraft/util/datafix/fixes/DataConverterFlatten.java
+--- a/net/minecraft/util/datafix/fixes/ItemStackTheFlatteningFix.java
++++ b/net/minecraft/util/datafix/fixes/ItemStackTheFlatteningFix.java
 @@ -376,7 +376,7 @@
                      Typed<?> typed2 = typed.getOrCreateTyped(opticfinder1);
                      Dynamic<?> dynamic1 = (Dynamic) typed2.get(DSL.remainderFinder());
diff --git a/paper-server/patches/sources/net/minecraft/util/worldupdate/WorldUpgrader.java.patch b/paper-server/patches/sources/net/minecraft/util/worldupdate/WorldUpgrader.java.patch
new file mode 100644
index 0000000000..de3432baee
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/util/worldupdate/WorldUpgrader.java.patch
@@ -0,0 +1,32 @@
+--- a/net/minecraft/util/worldupdate/WorldUpgrader.java
++++ b/net/minecraft/util/worldupdate/WorldUpgrader.java
+@@ -80,7 +80,7 @@
+ 
+     public WorldUpgrader(LevelStorageSource.LevelStorageAccess session, DataFixer dataFixer, RegistryAccess dynamicRegistryManager, boolean eraseCache, boolean recreateRegionFiles) {
+         this.dimensions = dynamicRegistryManager.lookupOrThrow(Registries.LEVEL_STEM);
+-        this.levels = (Set) this.dimensions.registryKeySet().stream().map(Registries::levelStemToLevel).collect(Collectors.toUnmodifiableSet());
++        this.levels = (Set) java.util.stream.Stream.of(session.dimensionType).map(Registries::levelStemToLevel).collect(Collectors.toUnmodifiableSet()); // CraftBukkit
+         this.eraseCache = eraseCache;
+         this.dataFixer = dataFixer;
+         this.levelStorage = session;
+@@ -197,9 +197,9 @@
+             if (nbttagcompound != null) {
+                 int i = ChunkStorage.getVersion(nbttagcompound);
+                 ChunkGenerator chunkgenerator = ((LevelStem) WorldUpgrader.this.dimensions.getValueOrThrow(Registries.levelToLevelStem(worldKey))).generator();
+-                CompoundTag nbttagcompound1 = storage.upgradeChunkTag(worldKey, () -> {
++                CompoundTag nbttagcompound1 = storage.upgradeChunkTag(Registries.levelToLevelStem(worldKey), () -> { // CraftBukkit
+                     return WorldUpgrader.this.overworldDataStorage;
+-                }, nbttagcompound, chunkgenerator.getTypeNameForDataFixer());
++                }, nbttagcompound, chunkgenerator.getTypeNameForDataFixer(), chunkPos, null); // CraftBukkit
+                 ChunkPos chunkcoordintpair1 = new ChunkPos(nbttagcompound1.getInt("xPos"), nbttagcompound1.getInt("zPos"));
+ 
+                 if (!chunkcoordintpair1.equals(chunkPos)) {
+@@ -321,7 +321,7 @@
+                         WorldUpgrader.DimensionToUpgrade<T> worldupgrader_c = (WorldUpgrader.DimensionToUpgrade) iterator.next();
+                         ResourceKey<Level> resourcekey = worldupgrader_c.dimensionKey;
+                         ListIterator<WorldUpgrader.FileToUpgrade> listiterator = worldupgrader_c.files;
+-                        T t0 = (AutoCloseable) worldupgrader_c.storage;
++                        T t0 = (T) worldupgrader_c.storage; // CraftBukkit - decompile error
+ 
+                         if (listiterator.hasNext()) {
+                             WorldUpgrader.FileToUpgrade worldupgrader_e = (WorldUpgrader.FileToUpgrade) listiterator.next();
diff --git a/paper-server/patches/sources/net/minecraft/util/worldupdate/WorldUpgrader.patch b/paper-server/patches/sources/net/minecraft/util/worldupdate/WorldUpgrader.patch
deleted file mode 100644
index 722e0a99b1..0000000000
--- a/paper-server/patches/sources/net/minecraft/util/worldupdate/WorldUpgrader.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- a/net/minecraft/util/worldupdate/WorldUpgrader.java
-+++ b/net/minecraft/util/worldupdate/WorldUpgrader.java
-@@ -80,7 +80,7 @@
- 
-     public WorldUpgrader(Convertable.ConversionSession convertable_conversionsession, DataFixer datafixer, IRegistryCustom iregistrycustom, boolean flag, boolean flag1) {
-         this.dimensions = iregistrycustom.lookupOrThrow(Registries.LEVEL_STEM);
--        this.levels = (Set) this.dimensions.registryKeySet().stream().map(Registries::levelStemToLevel).collect(Collectors.toUnmodifiableSet());
-+        this.levels = (Set) java.util.stream.Stream.of(convertable_conversionsession.dimensionType).map(Registries::levelStemToLevel).collect(Collectors.toUnmodifiableSet()); // CraftBukkit
-         this.eraseCache = flag;
-         this.dataFixer = datafixer;
-         this.levelStorage = convertable_conversionsession;
-@@ -197,9 +197,9 @@
-             if (nbttagcompound != null) {
-                 int i = IChunkLoader.getVersion(nbttagcompound);
-                 ChunkGenerator chunkgenerator = ((WorldDimension) WorldUpgrader.this.dimensions.getValueOrThrow(Registries.levelToLevelStem(resourcekey))).generator();
--                NBTTagCompound nbttagcompound1 = ichunkloader.upgradeChunkTag(resourcekey, () -> {
-+                NBTTagCompound nbttagcompound1 = ichunkloader.upgradeChunkTag(Registries.levelToLevelStem(resourcekey), () -> { // CraftBukkit
-                     return WorldUpgrader.this.overworldDataStorage;
--                }, nbttagcompound, chunkgenerator.getTypeNameForDataFixer());
-+                }, nbttagcompound, chunkgenerator.getTypeNameForDataFixer(), chunkcoordintpair, null); // CraftBukkit
-                 ChunkCoordIntPair chunkcoordintpair1 = new ChunkCoordIntPair(nbttagcompound1.getInt("xPos"), nbttagcompound1.getInt("zPos"));
- 
-                 if (!chunkcoordintpair1.equals(chunkcoordintpair)) {
-@@ -321,7 +321,7 @@
-                         WorldUpgrader.c<T> worldupgrader_c = (WorldUpgrader.c) iterator.next();
-                         ResourceKey<World> resourcekey = worldupgrader_c.dimensionKey;
-                         ListIterator<WorldUpgrader.e> listiterator = worldupgrader_c.files;
--                        T t0 = (AutoCloseable) worldupgrader_c.storage;
-+                        T t0 = (T) worldupgrader_c.storage; // CraftBukkit - decompile error
- 
-                         if (listiterator.hasNext()) {
-                             WorldUpgrader.e worldupgrader_e = (WorldUpgrader.e) listiterator.next();
diff --git a/paper-server/patches/sources/net/minecraft/world/InventoryLargeChest.patch b/paper-server/patches/sources/net/minecraft/world/CompoundContainer.java.patch
similarity index 73%
rename from paper-server/patches/sources/net/minecraft/world/InventoryLargeChest.patch
rename to paper-server/patches/sources/net/minecraft/world/CompoundContainer.java.patch
index 871fff1b74..1a360b99ad 100644
--- a/paper-server/patches/sources/net/minecraft/world/InventoryLargeChest.patch
+++ b/paper-server/patches/sources/net/minecraft/world/CompoundContainer.java.patch
@@ -1,7 +1,7 @@
---- a/net/minecraft/world/InventoryLargeChest.java
-+++ b/net/minecraft/world/InventoryLargeChest.java
+--- a/net/minecraft/world/CompoundContainer.java
++++ b/net/minecraft/world/CompoundContainer.java
 @@ -3,11 +3,62 @@
- import net.minecraft.world.entity.player.EntityHuman;
+ import net.minecraft.world.entity.player.Player;
  import net.minecraft.world.item.ItemStack;
  
 +// CraftBukkit start
@@ -13,10 +13,10 @@
 +import org.bukkit.entity.HumanEntity;
 +// CraftBukkit end
 +
- public class InventoryLargeChest implements IInventory {
+ public class CompoundContainer implements Container {
  
-     public final IInventory container1;
-     public final IInventory container2;
+     public final Container container1;
+     public final Container container2;
  
 +    // CraftBukkit start - add fields and methods
 +    public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
@@ -32,17 +32,17 @@
 +    public void onOpen(CraftHumanEntity who) {
 +        this.container1.onOpen(who);
 +        this.container2.onOpen(who);
-+        transaction.add(who);
++        this.transaction.add(who);
 +    }
 +
 +    public void onClose(CraftHumanEntity who) {
 +        this.container1.onClose(who);
 +        this.container2.onClose(who);
-+        transaction.remove(who);
++        this.transaction.remove(who);
 +    }
 +
 +    public List<HumanEntity> getViewers() {
-+        return transaction;
++        return this.transaction;
 +    }
 +
 +    public org.bukkit.inventory.InventoryHolder getOwner() {
@@ -56,13 +56,13 @@
 +
 +    @Override
 +    public Location getLocation() {
-+        return container1.getLocation(); // TODO: right?
++        return this.container1.getLocation(); // TODO: right?
 +    }
 +    // CraftBukkit end
 +
-     public InventoryLargeChest(IInventory iinventory, IInventory iinventory1) {
-         this.container1 = iinventory;
-         this.container2 = iinventory1;
+     public CompoundContainer(Container first, Container second) {
+         this.container1 = first;
+         this.container2 = second;
 @@ -54,7 +105,7 @@
  
      @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/IInventory.patch b/paper-server/patches/sources/net/minecraft/world/Container.java.patch
similarity index 52%
rename from paper-server/patches/sources/net/minecraft/world/IInventory.patch
rename to paper-server/patches/sources/net/minecraft/world/Container.java.patch
index 90d9dcf5a2..aec1c158f1 100644
--- a/paper-server/patches/sources/net/minecraft/world/IInventory.patch
+++ b/paper-server/patches/sources/net/minecraft/world/Container.java.patch
@@ -1,31 +1,32 @@
---- a/net/minecraft/world/IInventory.java
-+++ b/net/minecraft/world/IInventory.java
-@@ -9,6 +9,11 @@
- import net.minecraft.world.level.World;
- import net.minecraft.world.level.block.entity.TileEntity;
- 
+--- a/net/minecraft/world/Container.java
++++ b/net/minecraft/world/Container.java
+@@ -6,8 +6,12 @@
+ import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.item.Item;
+ import net.minecraft.world.item.ItemStack;
 +// CraftBukkit start
 +import net.minecraft.world.item.crafting.RecipeHolder;
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.block.entity.BlockEntity;
 +import org.bukkit.craftbukkit.entity.CraftHumanEntity;
 +// CraftBukkit end
-+
- public interface IInventory extends Clearable {
  
-     float DEFAULT_DISTANCE_BUFFER = 4.0F;
-@@ -25,9 +30,7 @@
+ public interface Container extends Clearable {
  
-     void setItem(int i, ItemStack itemstack);
+@@ -25,9 +29,7 @@
+ 
+     void setItem(int slot, ItemStack stack);
  
 -    default int getMaxStackSize() {
 -        return 99;
 -    }
 +    int getMaxStackSize(); // CraftBukkit
  
-     default int getMaxStackSize(ItemStack itemstack) {
-         return Math.min(this.getMaxStackSize(), itemstack.getMaxStackSize());
-@@ -91,4 +94,22 @@
+     default int getMaxStackSize(ItemStack stack) {
+         return Math.min(this.getMaxStackSize(), stack.getMaxStackSize());
+@@ -91,4 +93,22 @@
  
-         return world == null ? false : (world.getBlockEntity(blockposition) != tileentity ? false : entityhuman.canInteractWithBlock(blockposition, (double) f));
+         return world == null ? false : (world.getBlockEntity(blockposition) != blockEntity ? false : player.canInteractWithBlock(blockposition, (double) range));
      }
 +
 +    // CraftBukkit start
diff --git a/paper-server/patches/sources/net/minecraft/world/InventorySubcontainer.patch b/paper-server/patches/sources/net/minecraft/world/SimpleContainer.java.patch
similarity index 58%
rename from paper-server/patches/sources/net/minecraft/world/InventorySubcontainer.patch
rename to paper-server/patches/sources/net/minecraft/world/SimpleContainer.java.patch
index c77b2aa78e..a49fedbf82 100644
--- a/paper-server/patches/sources/net/minecraft/world/InventorySubcontainer.patch
+++ b/paper-server/patches/sources/net/minecraft/world/SimpleContainer.java.patch
@@ -1,6 +1,6 @@
---- a/net/minecraft/world/InventorySubcontainer.java
-+++ b/net/minecraft/world/InventorySubcontainer.java
-@@ -14,6 +14,12 @@
+--- a/net/minecraft/world/SimpleContainer.java
++++ b/net/minecraft/world/SimpleContainer.java
+@@ -14,16 +14,74 @@
  import net.minecraft.world.item.Item;
  import net.minecraft.world.item.ItemStack;
  
@@ -10,13 +10,13 @@
 +import org.bukkit.entity.HumanEntity;
 +// CraftBukkit end
 +
- public class InventorySubcontainer implements IInventory, AutoRecipeOutput {
+ public class SimpleContainer implements Container, StackedContentsCompatible {
  
      private final int size;
-@@ -21,7 +27,59 @@
+     public final NonNullList<ItemStack> items;
      @Nullable
-     private List<IInventoryListener> listeners;
- 
+     private List<ContainerListener> listeners;
++
 +    // CraftBukkit start - add fields and methods
 +    public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
 +    private int maxStack = MAX_STACK;
@@ -27,28 +27,28 @@
 +    }
 +
 +    public void onOpen(CraftHumanEntity who) {
-+        transaction.add(who);
++        this.transaction.add(who);
 +    }
 +
 +    public void onClose(CraftHumanEntity who) {
-+        transaction.remove(who);
++        this.transaction.remove(who);
 +    }
 +
 +    public List<HumanEntity> getViewers() {
-+        return transaction;
++        return this.transaction;
 +    }
 +
 +    @Override
 +    public int getMaxStackSize() {
-+        return maxStack;
++        return this.maxStack;
 +    }
 +
 +    public void setMaxStackSize(int i) {
-+        maxStack = i;
++        this.maxStack = i;
 +    }
 +
 +    public org.bukkit.inventory.InventoryHolder getOwner() {
-+        return bukkitOwner;
++        return this.bukkitOwner;
 +    }
 +
 +    @Override
@@ -56,20 +56,24 @@
 +        return null;
 +    }
 +
-+    public InventorySubcontainer(InventorySubcontainer original) {
++    public SimpleContainer(SimpleContainer original) {
 +        this(original.size);
 +        for (int slot = 0; slot < original.size; slot++) {
 +            this.items.set(slot, original.items.get(slot).copy());
 +        }
 +    }
-+
-     public InventorySubcontainer(int i) {
-+        this(i, null);
+ 
+     public SimpleContainer(int size) {
+-        this.size = size;
+-        this.items = NonNullList.withSize(size, ItemStack.EMPTY);
++        this(size, null);
 +    }
 +
-+    public InventorySubcontainer(int i, org.bukkit.inventory.InventoryHolder owner) {
++    public SimpleContainer(int i, org.bukkit.inventory.InventoryHolder owner) {
 +        this.bukkitOwner = owner;
 +        // CraftBukkit end
-         this.size = i;
-         this.items = NonNullList.withSize(i, ItemStack.EMPTY);
++        this.size = i;
++        this.items = NonNullList.withSize(i, ItemStack.EMPTY);
      }
+ 
+     public SimpleContainer(ItemStack... items) {
diff --git a/paper-server/patches/sources/net/minecraft/world/damagesource/DamageSource.patch b/paper-server/patches/sources/net/minecraft/world/damagesource/DamageSource.java.patch
similarity index 93%
rename from paper-server/patches/sources/net/minecraft/world/damagesource/DamageSource.patch
rename to paper-server/patches/sources/net/minecraft/world/damagesource/DamageSource.java.patch
index a76f254922..b7a60501b4 100644
--- a/paper-server/patches/sources/net/minecraft/world/damagesource/DamageSource.patch
+++ b/paper-server/patches/sources/net/minecraft/world/damagesource/DamageSource.java.patch
@@ -1,9 +1,9 @@
 --- a/net/minecraft/world/damagesource/DamageSource.java
 +++ b/net/minecraft/world/damagesource/DamageSource.java
-@@ -21,6 +21,119 @@
+@@ -21,7 +21,120 @@
      private final Entity directEntity;
      @Nullable
-     private final Vec3D damageSourcePosition;
+     private final Vec3 damageSourcePosition;
 +    // CraftBukkit start
 +    @Nullable
 +    private org.bukkit.block.Block directBlock; // The block that caused the damage. damageSourcePosition is not used for all block damages
@@ -14,7 +14,7 @@
 +    private boolean poison = false;
 +    private Entity customEntityDamager = null; // This field is a helper for when direct entity damage is not set by vanilla
 +    private Entity customCausingEntityDamager = null; // This field is a helper for when causing entity damage is not set by vanilla
-+
+ 
 +    public DamageSource sweep() {
 +        this.sweep = true;
 +        return this;
@@ -76,11 +76,11 @@
 +        return this.directBlock;
 +    }
 +
-+    public DamageSource directBlock(net.minecraft.world.level.World world, net.minecraft.core.BlockPosition blockPosition) {
++    public DamageSource directBlock(net.minecraft.world.level.Level world, net.minecraft.core.BlockPos blockPosition) {
 +        if (blockPosition == null || world == null) {
 +            return this;
 +        }
-+        return directBlock(org.bukkit.craftbukkit.block.CraftBlock.at(world, blockPosition));
++        return this.directBlock(org.bukkit.craftbukkit.block.CraftBlock.at(world, blockPosition));
 +    }
 +
 +    public DamageSource directBlock(org.bukkit.block.Block block) {
@@ -117,6 +117,7 @@
 +        return damageSource;
 +    }
 +    // CraftBukkit end
- 
++
      public String toString() {
          return "DamageSource (" + this.type().msgId() + ")";
+     }
diff --git a/paper-server/patches/sources/net/minecraft/world/damagesource/DamageSources.patch b/paper-server/patches/sources/net/minecraft/world/damagesource/DamageSources.java.patch
similarity index 58%
rename from paper-server/patches/sources/net/minecraft/world/damagesource/DamageSources.patch
rename to paper-server/patches/sources/net/minecraft/world/damagesource/DamageSources.java.patch
index 2397a45a46..a02a23d0e1 100644
--- a/paper-server/patches/sources/net/minecraft/world/damagesource/DamageSources.patch
+++ b/paper-server/patches/sources/net/minecraft/world/damagesource/DamageSources.java.patch
@@ -8,18 +8,19 @@
 +    private final DamageSource melting;
 +    private final DamageSource poison;
  
-     public DamageSources(IRegistryCustom iregistrycustom) {
-         this.damageTypes = iregistrycustom.lookupOrThrow(Registries.DAMAGE_TYPE);
+     public DamageSources(RegistryAccess registryManager) {
+         this.damageTypes = registryManager.lookupOrThrow(Registries.DAMAGE_TYPE);
 +        this.melting = this.source(DamageTypes.ON_FIRE).melting();
 +        this.poison = this.source(DamageTypes.MAGIC).poison();
 +        // CraftBukkit end
          this.inFire = this.source(DamageTypes.IN_FIRE);
          this.campfire = this.source(DamageTypes.CAMPFIRE);
          this.lightningBolt = this.source(DamageTypes.LIGHTNING_BOLT);
-@@ -85,6 +91,16 @@
-         return new DamageSource(this.damageTypes.getOrThrow(resourcekey), entity, entity1);
+@@ -84,6 +90,16 @@
+     private DamageSource source(ResourceKey<DamageType> key, @Nullable Entity source, @Nullable Entity attacker) {
+         return new DamageSource(this.damageTypes.getOrThrow(key), source, attacker);
      }
- 
++
 +    // CraftBukkit start
 +    public DamageSource melting() {
 +        return this.melting;
@@ -29,37 +30,38 @@
 +        return this.poison;
 +    }
 +    // CraftBukkit end
-+
+ 
      public DamageSource inFire() {
          return this.inFire;
-     }
-@@ -254,7 +270,13 @@
+@@ -254,17 +270,29 @@
      }
  
-     public DamageSource explosion(@Nullable Entity entity, @Nullable Entity entity1) {
--        return this.source(entity1 != null && entity != null ? DamageTypes.PLAYER_EXPLOSION : DamageTypes.EXPLOSION, entity, entity1);
+     public DamageSource explosion(@Nullable Entity source, @Nullable Entity attacker) {
+-        return this.source(attacker != null && source != null ? DamageTypes.PLAYER_EXPLOSION : DamageTypes.EXPLOSION, source, attacker);
 +        // CraftBukkit start
-+        return this.explosion(entity, entity1, entity1 != null && entity != null ? DamageTypes.PLAYER_EXPLOSION : DamageTypes.EXPLOSION);
-+    }
-+
++        return this.explosion(source, attacker, attacker != null && source != null ? DamageTypes.PLAYER_EXPLOSION : DamageTypes.EXPLOSION);
+     }
+ 
 +    public DamageSource explosion(@Nullable Entity entity, @Nullable Entity entity1, ResourceKey<DamageType> resourceKey) {
 +        return this.source(resourceKey, entity, entity1);
 +        // CraftBukkit end
-     }
- 
-     public DamageSource sonicBoom(Entity entity) {
-@@ -262,7 +284,13 @@
-     }
- 
-     public DamageSource badRespawnPointExplosion(Vec3D vec3d) {
--        return new DamageSource(this.damageTypes.getOrThrow(DamageTypes.BAD_RESPAWN_POINT), vec3d);
-+        // CraftBukkit start
-+        return badRespawnPointExplosion(vec3d, null);
 +    }
 +
-+    public DamageSource badRespawnPointExplosion(Vec3D vec3d, org.bukkit.block.BlockState blockState) {
-+        return new DamageSource(this.damageTypes.getOrThrow(DamageTypes.BAD_RESPAWN_POINT), vec3d).directBlockState(blockState);
-+        // CraftBukkit end
+     public DamageSource sonicBoom(Entity attacker) {
+         return this.source(DamageTypes.SONIC_BOOM, attacker);
      }
  
+     public DamageSource badRespawnPointExplosion(Vec3 position) {
+-        return new DamageSource(this.damageTypes.getOrThrow(DamageTypes.BAD_RESPAWN_POINT), position);
++        // CraftBukkit start
++        return this.badRespawnPointExplosion(position, null);
+     }
+ 
++    public DamageSource badRespawnPointExplosion(Vec3 vec3d, org.bukkit.block.BlockState blockState) {
++        return new DamageSource(this.damageTypes.getOrThrow(DamageTypes.BAD_RESPAWN_POINT), vec3d).directBlockState(blockState);
++        // CraftBukkit end
++    }
++
      public DamageSource outOfBorder() {
+         return this.outsideBorder;
+     }
diff --git a/paper-server/patches/sources/net/minecraft/world/effect/HealOrHarmMobEffect.java.patch b/paper-server/patches/sources/net/minecraft/world/effect/HealOrHarmMobEffect.java.patch
new file mode 100644
index 0000000000..d8a62a429d
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/effect/HealOrHarmMobEffect.java.patch
@@ -0,0 +1,20 @@
+--- a/net/minecraft/world/effect/HealOrHarmMobEffect.java
++++ b/net/minecraft/world/effect/HealOrHarmMobEffect.java
+@@ -17,7 +17,7 @@
+     @Override
+     public boolean applyEffectTick(ServerLevel world, LivingEntity entity, int amplifier) {
+         if (this.isHarm == entity.isInvertedHealAndHarm()) {
+-            entity.heal((float) Math.max(4 << amplifier, 0));
++            entity.heal((float) Math.max(4 << amplifier, 0), org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.MAGIC); // CraftBukkit
+         } else {
+             entity.hurtServer(world, entity.damageSources().magic(), (float) (6 << amplifier));
+         }
+@@ -31,7 +31,7 @@
+ 
+         if (this.isHarm == target.isInvertedHealAndHarm()) {
+             j = (int) (proximity * (double) (4 << amplifier) + 0.5D);
+-            target.heal((float) j);
++            target.heal((float) j, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.MAGIC); // CraftBukkit
+         } else {
+             j = (int) (proximity * (double) (6 << amplifier) + 0.5D);
+             if (effectEntity == null) {
diff --git a/paper-server/patches/sources/net/minecraft/world/effect/HealOrHarmMobEffect.patch b/paper-server/patches/sources/net/minecraft/world/effect/HealOrHarmMobEffect.patch
deleted file mode 100644
index f6f2811028..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/effect/HealOrHarmMobEffect.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/net/minecraft/world/effect/HealOrHarmMobEffect.java
-+++ b/net/minecraft/world/effect/HealOrHarmMobEffect.java
-@@ -17,7 +17,7 @@
-     @Override
-     public boolean applyEffectTick(WorldServer worldserver, EntityLiving entityliving, int i) {
-         if (this.isHarm == entityliving.isInvertedHealAndHarm()) {
--            entityliving.heal((float) Math.max(4 << i, 0));
-+            entityliving.heal((float) Math.max(4 << i, 0), org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.MAGIC); // CraftBukkit
-         } else {
-             entityliving.hurtServer(worldserver, entityliving.damageSources().magic(), (float) (6 << i));
-         }
-@@ -31,7 +31,7 @@
- 
-         if (this.isHarm == entityliving.isInvertedHealAndHarm()) {
-             j = (int) (d0 * (double) (4 << i) + 0.5D);
--            entityliving.heal((float) j);
-+            entityliving.heal((float) j, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.MAGIC); // CraftBukkit
-         } else {
-             j = (int) (d0 * (double) (6 << i) + 0.5D);
-             if (entity == null) {
diff --git a/paper-server/patches/sources/net/minecraft/world/effect/HungerMobEffect.java.patch b/paper-server/patches/sources/net/minecraft/world/effect/HungerMobEffect.java.patch
new file mode 100644
index 0000000000..9757b68e1a
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/effect/HungerMobEffect.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/effect/HungerMobEffect.java
++++ b/net/minecraft/world/effect/HungerMobEffect.java
+@@ -13,7 +13,7 @@
+     @Override
+     public boolean applyEffectTick(ServerLevel world, LivingEntity entity, int amplifier) {
+         if (entity instanceof Player entityhuman) {
+-            entityhuman.causeFoodExhaustion(0.005F * (float) (amplifier + 1));
++            entityhuman.causeFoodExhaustion(0.005F * (float) (amplifier + 1), org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.HUNGER_EFFECT); // CraftBukkit - EntityExhaustionEvent
+         }
+ 
+         return true;
diff --git a/paper-server/patches/sources/net/minecraft/world/effect/HungerMobEffect.patch b/paper-server/patches/sources/net/minecraft/world/effect/HungerMobEffect.patch
deleted file mode 100644
index f3a3c20618..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/effect/HungerMobEffect.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/effect/HungerMobEffect.java
-+++ b/net/minecraft/world/effect/HungerMobEffect.java
-@@ -13,7 +13,7 @@
-     @Override
-     public boolean applyEffectTick(WorldServer worldserver, EntityLiving entityliving, int i) {
-         if (entityliving instanceof EntityHuman entityhuman) {
--            entityhuman.causeFoodExhaustion(0.005F * (float) (i + 1));
-+            entityhuman.causeFoodExhaustion(0.005F * (float) (i + 1), org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.HUNGER_EFFECT); // CraftBukkit - EntityExhaustionEvent
-         }
- 
-         return true;
diff --git a/paper-server/patches/sources/net/minecraft/world/effect/InfestedMobEffect.java.patch b/paper-server/patches/sources/net/minecraft/world/effect/InfestedMobEffect.java.patch
new file mode 100644
index 0000000000..98497613dc
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/effect/InfestedMobEffect.java.patch
@@ -0,0 +1,15 @@
+--- a/net/minecraft/world/effect/InfestedMobEffect.java
++++ b/net/minecraft/world/effect/InfestedMobEffect.java
+@@ -48,7 +48,11 @@
+ 
+             entitysilverfish.moveTo(x, y, z, world.getRandom().nextFloat() * 360.0F, 0.0F);
+             entitysilverfish.setDeltaMovement(new Vec3(vector3f));
+-            world.addFreshEntity(entitysilverfish);
++            // CraftBukkit start
++            if (!world.addFreshEntity(entitysilverfish, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.POTION_EFFECT)) {
++                return;
++            }
++            // CraftBukkit end
+             entitysilverfish.playSound(SoundEvents.SILVERFISH_HURT);
+         }
+     }
diff --git a/paper-server/patches/sources/net/minecraft/world/effect/InfestedMobEffect.patch b/paper-server/patches/sources/net/minecraft/world/effect/InfestedMobEffect.patch
deleted file mode 100644
index ce145e5229..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/effect/InfestedMobEffect.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/net/minecraft/world/effect/InfestedMobEffect.java
-+++ b/net/minecraft/world/effect/InfestedMobEffect.java
-@@ -48,7 +48,11 @@
- 
-             entitysilverfish.moveTo(d0, d1, d2, worldserver.getRandom().nextFloat() * 360.0F, 0.0F);
-             entitysilverfish.setDeltaMovement(new Vec3D(vector3f));
--            worldserver.addFreshEntity(entitysilverfish);
-+            // CraftBukkit start
-+            if (!worldserver.addFreshEntity(entitysilverfish, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.POTION_EFFECT)) {
-+                return;
-+            }
-+            // CraftBukkit end
-             entitysilverfish.playSound(SoundEffects.SILVERFISH_HURT);
-         }
-     }
diff --git a/paper-server/patches/sources/net/minecraft/world/effect/MobEffectUtil.java.patch b/paper-server/patches/sources/net/minecraft/world/effect/MobEffectUtil.java.patch
new file mode 100644
index 0000000000..7e1ffaaa62
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/effect/MobEffectUtil.java.patch
@@ -0,0 +1,26 @@
+--- a/net/minecraft/world/effect/MobEffectUtil.java
++++ b/net/minecraft/world/effect/MobEffectUtil.java
+@@ -50,13 +50,19 @@
+     }
+ 
+     public static List<ServerPlayer> addEffectToPlayersAround(ServerLevel world, @Nullable Entity entity, Vec3 origin, double range, MobEffectInstance statusEffectInstance, int duration) {
+-        Holder<MobEffect> holder = statusEffectInstance.getEffect();
+-        List<ServerPlayer> list = world.getPlayers((entityplayer) -> {
+-            return entityplayer.gameMode.isSurvival() && (entity == null || !entity.isAlliedTo((Entity) entityplayer)) && origin.closerThan(entityplayer.position(), range) && (!entityplayer.hasEffect(holder) || entityplayer.getEffect(holder).getAmplifier() < statusEffectInstance.getAmplifier() || entityplayer.getEffect(holder).endsWithin(duration - 1));
++        // CraftBukkit start
++        return MobEffectUtil.addEffectToPlayersAround(world, entity, origin, range, statusEffectInstance, duration, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.UNKNOWN);
++    }
++
++    public static List<ServerPlayer> addEffectToPlayersAround(ServerLevel worldserver, @Nullable Entity entity, Vec3 vec3d, double d0, MobEffectInstance mobeffect, int i, org.bukkit.event.entity.EntityPotionEffectEvent.Cause cause) {
++        // CraftBukkit end
++        Holder<MobEffect> holder = mobeffect.getEffect();
++        List<ServerPlayer> list = worldserver.getPlayers((entityplayer) -> {
++            return entityplayer.gameMode.isSurvival() && (entity == null || !entity.isAlliedTo((Entity) entityplayer)) && vec3d.closerThan(entityplayer.position(), d0) && (!entityplayer.hasEffect(holder) || entityplayer.getEffect(holder).getAmplifier() < mobeffect.getAmplifier() || entityplayer.getEffect(holder).endsWithin(i - 1));
+         });
+ 
+         list.forEach((entityplayer) -> {
+-            entityplayer.addEffect(new MobEffectInstance(statusEffectInstance), entity);
++            entityplayer.addEffect(new MobEffectInstance(mobeffect), entity, cause); // CraftBukkit
+         });
+         return list;
+     }
diff --git a/paper-server/patches/sources/net/minecraft/world/effect/MobEffectUtil.patch b/paper-server/patches/sources/net/minecraft/world/effect/MobEffectUtil.patch
deleted file mode 100644
index ae1001ff82..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/effect/MobEffectUtil.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/net/minecraft/world/effect/MobEffectUtil.java
-+++ b/net/minecraft/world/effect/MobEffectUtil.java
-@@ -50,13 +50,19 @@
-     }
- 
-     public static List<EntityPlayer> addEffectToPlayersAround(WorldServer worldserver, @Nullable Entity entity, Vec3D vec3d, double d0, MobEffect mobeffect, int i) {
-+        // CraftBukkit start
-+        return addEffectToPlayersAround(worldserver, entity, vec3d, d0, mobeffect, i, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.UNKNOWN);
-+    }
-+
-+    public static List<EntityPlayer> addEffectToPlayersAround(WorldServer worldserver, @Nullable Entity entity, Vec3D vec3d, double d0, MobEffect mobeffect, int i, org.bukkit.event.entity.EntityPotionEffectEvent.Cause cause) {
-+        // CraftBukkit end
-         Holder<MobEffectList> holder = mobeffect.getEffect();
-         List<EntityPlayer> list = worldserver.getPlayers((entityplayer) -> {
-             return entityplayer.gameMode.isSurvival() && (entity == null || !entity.isAlliedTo((Entity) entityplayer)) && vec3d.closerThan(entityplayer.position(), d0) && (!entityplayer.hasEffect(holder) || entityplayer.getEffect(holder).getAmplifier() < mobeffect.getAmplifier() || entityplayer.getEffect(holder).endsWithin(i - 1));
-         });
- 
-         list.forEach((entityplayer) -> {
--            entityplayer.addEffect(new MobEffect(mobeffect), entity);
-+            entityplayer.addEffect(new MobEffect(mobeffect), entity, cause); // CraftBukkit
-         });
-         return list;
-     }
diff --git a/paper-server/patches/sources/net/minecraft/world/effect/OozingMobEffect.patch b/paper-server/patches/sources/net/minecraft/world/effect/OozingMobEffect.java.patch
similarity index 81%
rename from paper-server/patches/sources/net/minecraft/world/effect/OozingMobEffect.patch
rename to paper-server/patches/sources/net/minecraft/world/effect/OozingMobEffect.java.patch
index 1619b97690..4a2bef9952 100644
--- a/paper-server/patches/sources/net/minecraft/world/effect/OozingMobEffect.patch
+++ b/paper-server/patches/sources/net/minecraft/world/effect/OozingMobEffect.java.patch
@@ -3,7 +3,7 @@
 @@ -52,7 +52,7 @@
          if (entityslime != null) {
              entityslime.setSize(2, true);
-             entityslime.moveTo(d0, d1, d2, world.getRandom().nextFloat() * 360.0F, 0.0F);
+             entityslime.moveTo(x, y, z, world.getRandom().nextFloat() * 360.0F, 0.0F);
 -            world.addFreshEntity(entityslime);
 +            world.addFreshEntity(entityslime, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.POTION_EFFECT); // CraftBukkit
          }
diff --git a/paper-server/patches/sources/net/minecraft/world/effect/PoisonMobEffect.java.patch b/paper-server/patches/sources/net/minecraft/world/effect/PoisonMobEffect.java.patch
new file mode 100644
index 0000000000..367358c2d8
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/effect/PoisonMobEffect.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/effect/PoisonMobEffect.java
++++ b/net/minecraft/world/effect/PoisonMobEffect.java
+@@ -14,7 +14,7 @@
+     @Override
+     public boolean applyEffectTick(ServerLevel world, LivingEntity entity, int amplifier) {
+         if (entity.getHealth() > 1.0F) {
+-            entity.hurtServer(world, entity.damageSources().magic(), 1.0F);
++            entity.hurtServer(world, entity.damageSources().poison(), 1.0F);  // CraftBukkit - DamageSource.MAGIC -> CraftEventFactory.POISON
+         }
+ 
+         return true;
diff --git a/paper-server/patches/sources/net/minecraft/world/effect/PoisonMobEffect.patch b/paper-server/patches/sources/net/minecraft/world/effect/PoisonMobEffect.patch
deleted file mode 100644
index 0b9b1aa748..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/effect/PoisonMobEffect.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/effect/PoisonMobEffect.java
-+++ b/net/minecraft/world/effect/PoisonMobEffect.java
-@@ -14,7 +14,7 @@
-     @Override
-     public boolean applyEffectTick(WorldServer worldserver, EntityLiving entityliving, int i) {
-         if (entityliving.getHealth() > 1.0F) {
--            entityliving.hurtServer(worldserver, entityliving.damageSources().magic(), 1.0F);
-+            entityliving.hurtServer(worldserver, entityliving.damageSources().poison(), 1.0F);  // CraftBukkit - DamageSource.MAGIC -> CraftEventFactory.POISON
-         }
- 
-         return true;
diff --git a/paper-server/patches/sources/net/minecraft/world/effect/RegenerationMobEffect.java.patch b/paper-server/patches/sources/net/minecraft/world/effect/RegenerationMobEffect.java.patch
new file mode 100644
index 0000000000..9a24fc0330
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/effect/RegenerationMobEffect.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/effect/RegenerationMobEffect.java
++++ b/net/minecraft/world/effect/RegenerationMobEffect.java
+@@ -12,7 +12,7 @@
+     @Override
+     public boolean applyEffectTick(ServerLevel world, LivingEntity entity, int amplifier) {
+         if (entity.getHealth() < entity.getMaxHealth()) {
+-            entity.heal(1.0F);
++            entity.heal(1.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.MAGIC_REGEN); // CraftBukkit
+         }
+ 
+         return true;
diff --git a/paper-server/patches/sources/net/minecraft/world/effect/RegenerationMobEffect.patch b/paper-server/patches/sources/net/minecraft/world/effect/RegenerationMobEffect.patch
deleted file mode 100644
index 4ca57f3724..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/effect/RegenerationMobEffect.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/effect/RegenerationMobEffect.java
-+++ b/net/minecraft/world/effect/RegenerationMobEffect.java
-@@ -12,7 +12,7 @@
-     @Override
-     public boolean applyEffectTick(WorldServer worldserver, EntityLiving entityliving, int i) {
-         if (entityliving.getHealth() < entityliving.getMaxHealth()) {
--            entityliving.heal(1.0F);
-+            entityliving.heal(1.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.MAGIC_REGEN); // CraftBukkit
-         }
- 
-         return true;
diff --git a/paper-server/patches/sources/net/minecraft/world/effect/SaturationMobEffect.patch b/paper-server/patches/sources/net/minecraft/world/effect/SaturationMobEffect.java.patch
similarity index 56%
rename from paper-server/patches/sources/net/minecraft/world/effect/SaturationMobEffect.patch
rename to paper-server/patches/sources/net/minecraft/world/effect/SaturationMobEffect.java.patch
index ebf1e21ea1..5d38f090c8 100644
--- a/paper-server/patches/sources/net/minecraft/world/effect/SaturationMobEffect.patch
+++ b/paper-server/patches/sources/net/minecraft/world/effect/SaturationMobEffect.java.patch
@@ -1,25 +1,24 @@
 --- a/net/minecraft/world/effect/SaturationMobEffect.java
 +++ b/net/minecraft/world/effect/SaturationMobEffect.java
-@@ -4,6 +4,11 @@
- import net.minecraft.world.entity.EntityLiving;
- import net.minecraft.world.entity.player.EntityHuman;
- 
+@@ -3,6 +3,10 @@
+ import net.minecraft.server.level.ServerLevel;
+ import net.minecraft.world.entity.LivingEntity;
+ import net.minecraft.world.entity.player.Player;
 +// CraftBukkit start
 +import org.bukkit.craftbukkit.entity.CraftPlayer;
 +import org.bukkit.craftbukkit.event.CraftEventFactory;
 +// CraftBukkit end
-+
- class SaturationMobEffect extends InstantMobEffect {
  
-     protected SaturationMobEffect(MobEffectInfo mobeffectinfo, int i) {
-@@ -13,7 +18,15 @@
+ class SaturationMobEffect extends InstantenousMobEffect {
+ 
+@@ -13,7 +17,15 @@
      @Override
-     public boolean applyEffectTick(WorldServer worldserver, EntityLiving entityliving, int i) {
-         if (entityliving instanceof EntityHuman entityhuman) {
--            entityhuman.getFoodData().eat(i + 1, 1.0F);
+     public boolean applyEffectTick(ServerLevel world, LivingEntity entity, int amplifier) {
+         if (entity instanceof Player entityhuman) {
+-            entityhuman.getFoodData().eat(amplifier + 1, 1.0F);
 +            // CraftBukkit start
 +            int oldFoodLevel = entityhuman.getFoodData().foodLevel;
-+            org.bukkit.event.entity.FoodLevelChangeEvent event = CraftEventFactory.callFoodLevelChangeEvent(entityhuman, i + 1 + oldFoodLevel);
++            org.bukkit.event.entity.FoodLevelChangeEvent event = CraftEventFactory.callFoodLevelChangeEvent(entityhuman, amplifier + 1 + oldFoodLevel);
 +            if (!event.isCancelled()) {
 +                entityhuman.getFoodData().eat(event.getFoodLevel() - oldFoodLevel, 1.0F);
 +            }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/AgeableMob.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/AgeableMob.java.patch
new file mode 100644
index 0000000000..525e6fc399
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/AgeableMob.java.patch
@@ -0,0 +1,35 @@
+--- a/net/minecraft/world/entity/AgeableMob.java
++++ b/net/minecraft/world/entity/AgeableMob.java
+@@ -21,6 +21,7 @@
+     protected int age;
+     protected int forcedAge;
+     protected int forcedAgeTimer;
++    public boolean ageLocked; // CraftBukkit
+ 
+     protected AgeableMob(EntityType<? extends AgeableMob> type, Level world) {
+         super(type, world);
+@@ -104,6 +105,7 @@
+         super.addAdditionalSaveData(nbt);
+         nbt.putInt("Age", this.getAge());
+         nbt.putInt("ForcedAge", this.forcedAge);
++        nbt.putBoolean("AgeLocked", this.ageLocked); // CraftBukkit
+     }
+ 
+     @Override
+@@ -111,6 +113,7 @@
+         super.readAdditionalSaveData(nbt);
+         this.setAge(nbt.getInt("Age"));
+         this.forcedAge = nbt.getInt("ForcedAge");
++        this.ageLocked = nbt.getBoolean("AgeLocked"); // CraftBukkit
+     }
+ 
+     @Override
+@@ -125,7 +128,7 @@
+     @Override
+     public void aiStep() {
+         super.aiStep();
+-        if (this.level().isClientSide) {
++        if (this.level().isClientSide || this.ageLocked) { // CraftBukkit
+             if (this.forcedAgeTimer > 0) {
+                 if (this.forcedAgeTimer % 4 == 0) {
+                     this.level().addParticle(ParticleTypes.HAPPY_VILLAGER, this.getRandomX(1.0D), this.getRandomY() + 0.5D, this.getRandomZ(1.0D), 0.0D, 0.0D, 0.0D);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/EntityAreaEffectCloud.patch b/paper-server/patches/sources/net/minecraft/world/entity/AreaEffectCloud.java.patch
similarity index 58%
rename from paper-server/patches/sources/net/minecraft/world/entity/EntityAreaEffectCloud.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/AreaEffectCloud.java.patch
index 3f2bb94126..3ec6f8cfc8 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/EntityAreaEffectCloud.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/AreaEffectCloud.java.patch
@@ -1,7 +1,7 @@
---- a/net/minecraft/world/entity/EntityAreaEffectCloud.java
-+++ b/net/minecraft/world/entity/EntityAreaEffectCloud.java
+--- a/net/minecraft/world/entity/AreaEffectCloud.java
++++ b/net/minecraft/world/entity/AreaEffectCloud.java
 @@ -33,6 +33,12 @@
- import net.minecraft.world.level.material.EnumPistonReaction;
+ import net.minecraft.world.level.material.PushReaction;
  import org.slf4j.Logger;
  
 +// CraftBukkit start
@@ -10,12 +10,21 @@
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +// CraftBukkit end
 +
- public class EntityAreaEffectCloud extends Entity implements TraceableEntity {
+ public class AreaEffectCloud extends Entity implements TraceableEntity {
  
      private static final Logger LOGGER = LogUtils.getLogger();
+@@ -54,7 +60,7 @@
+     public float radiusOnUse;
+     public float radiusPerTick;
+     @Nullable
+-    private LivingEntity owner;
++    private net.minecraft.world.entity.LivingEntity owner;
+     @Nullable
+     public UUID ownerUUID;
+ 
 @@ -200,7 +206,7 @@
  
-     private void serverTick(WorldServer worldserver) {
+     private void serverTick(ServerLevel world) {
          if (this.tickCount >= this.waitTime + this.duration) {
 -            this.discard();
 +            this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
@@ -31,17 +40,24 @@
                          return;
                      }
  
-@@ -249,11 +255,12 @@
+@@ -244,16 +250,17 @@
+                         }
+ 
+                         list.addAll(this.potionContents.customEffects());
+-                        List<LivingEntity> list1 = this.level().getEntitiesOfClass(LivingEntity.class, this.getBoundingBox());
++                        List<net.minecraft.world.entity.LivingEntity> list1 = this.level().getEntitiesOfClass(net.minecraft.world.entity.LivingEntity.class, this.getBoundingBox());
+ 
                          if (!list1.isEmpty()) {
                              Iterator iterator1 = list1.iterator();
  
 +                            List<LivingEntity> entities = new java.util.ArrayList<LivingEntity>(); // CraftBukkit
                              while (iterator1.hasNext()) {
-                                 EntityLiving entityliving = (EntityLiving) iterator1.next();
+-                                LivingEntity entityliving = (LivingEntity) iterator1.next();
++                                net.minecraft.world.entity.LivingEntity entityliving = (net.minecraft.world.entity.LivingEntity) iterator1.next();
  
                                  if (!this.victims.containsKey(entityliving) && entityliving.isAffectedByPotions()) {
 -                                    Stream stream = list.stream();
-+                                    Stream<MobEffect> stream = list.stream(); // CraftBukkit - decompile error
++                                    Stream<MobEffectInstance> stream = list.stream(); // CraftBukkit - decompile error
  
                                      Objects.requireNonNull(entityliving);
                                      if (!stream.noneMatch(entityliving::canBeAffected)) {
@@ -60,17 +76,17 @@
 +                                if (!event.isCancelled()) {
 +                                    for (LivingEntity entity : event.getAffectedEntities()) {
 +                                        if (entity instanceof CraftLivingEntity) {
-+                                            EntityLiving entityliving = ((CraftLivingEntity) entity).getHandle();
++                                            net.minecraft.world.entity.LivingEntity entityliving = ((CraftLivingEntity) entity).getHandle();
 +                                            // CraftBukkit end
                                              this.victims.put(entityliving, this.tickCount + this.reapplicationDelay);
                                              Iterator iterator2 = list.iterator();
  
 @@ -271,14 +291,14 @@
-                                                 if (((MobEffectList) mobeffect1.getEffect().value()).isInstantenous()) {
-                                                     ((MobEffectList) mobeffect1.getEffect().value()).applyInstantenousEffect(worldserver, this, this.getOwner(), entityliving, mobeffect1.getAmplifier(), 0.5D);
+                                                 if (((MobEffect) mobeffect1.getEffect().value()).isInstantenous()) {
+                                                     ((MobEffect) mobeffect1.getEffect().value()).applyInstantenousEffect(world, this, this.getOwner(), entityliving, mobeffect1.getAmplifier(), 0.5D);
                                                  } else {
--                                                    entityliving.addEffect(new MobEffect(mobeffect1), this);
-+                                                    entityliving.addEffect(new MobEffect(mobeffect1), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.AREA_EFFECT_CLOUD); // CraftBukkit
+-                                                    entityliving.addEffect(new MobEffectInstance(mobeffect1), this);
++                                                    entityliving.addEffect(new MobEffectInstance(mobeffect1), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.AREA_EFFECT_CLOUD); // CraftBukkit
                                                  }
                                              }
  
@@ -91,3 +107,34 @@
                                                      return;
                                                  }
                                              }
+@@ -336,14 +356,14 @@
+         this.waitTime = waitTime;
+     }
+ 
+-    public void setOwner(@Nullable LivingEntity owner) {
++    public void setOwner(@Nullable net.minecraft.world.entity.LivingEntity owner) {
+         this.owner = owner;
+         this.ownerUUID = owner == null ? null : owner.getUUID();
+     }
+ 
+     @Nullable
+     @Override
+-    public LivingEntity getOwner() {
++    public net.minecraft.world.entity.LivingEntity getOwner() {
+         if (this.owner != null && !this.owner.isRemoved()) {
+             return this.owner;
+         } else {
+@@ -353,10 +373,10 @@
+                 if (world instanceof ServerLevel) {
+                     ServerLevel worldserver = (ServerLevel) world;
+                     Entity entity = worldserver.getEntity(this.ownerUUID);
+-                    LivingEntity entityliving;
++                    net.minecraft.world.entity.LivingEntity entityliving;
+ 
+-                    if (entity instanceof LivingEntity) {
+-                        LivingEntity entityliving1 = (LivingEntity) entity;
++                    if (entity instanceof net.minecraft.world.entity.LivingEntity) {
++                        net.minecraft.world.entity.LivingEntity entityliving1 = (net.minecraft.world.entity.LivingEntity) entity;
+ 
+                         entityliving = entityliving1;
+                     } else {
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ConversionType.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/ConversionType.java.patch
new file mode 100644
index 0000000000..ed6daf39bf
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ConversionType.java.patch
@@ -0,0 +1,46 @@
+--- a/net/minecraft/world/entity/ConversionType.java
++++ b/net/minecraft/world/entity/ConversionType.java
+@@ -4,6 +4,7 @@
+ import java.util.Objects;
+ import java.util.Optional;
+ import java.util.Set;
++import net.minecraft.core.BlockPos;
+ import net.minecraft.world.effect.MobEffectInstance;
+ import net.minecraft.world.entity.ai.Brain;
+ import net.minecraft.world.entity.ai.memory.MemoryModuleType;
+@@ -11,6 +12,8 @@
+ import net.minecraft.world.entity.monster.Zombie;
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.scores.Scoreboard;
++import org.bukkit.event.entity.EntityRemoveEvent;
++// CraftBukkit end
+ 
+ public enum ConversionType {
+ 
+@@ -31,7 +34,7 @@
+                 while (iterator.hasNext()) {
+                     entity1 = (Entity) iterator.next();
+                     entity1.stopRiding();
+-                    entity1.remove(Entity.RemovalReason.DISCARDED);
++                    entity1.remove(Entity.RemovalReason.DISCARDED, EntityRemoveEvent.Cause.TRANSFORMATION); // CraftBukkit - add Bukkit remove cause
+                 }
+ 
+                 entity.startRiding(newEntity);
+@@ -64,7 +67,7 @@
+             newEntity.hurtTime = oldEntity.hurtTime;
+             newEntity.yBodyRot = oldEntity.yBodyRot;
+             newEntity.setOnGround(oldEntity.onGround());
+-            Optional optional = oldEntity.getSleepingPos();
++            Optional<BlockPos> optional = oldEntity.getSleepingPos(); // CraftBukkit - decompile error
+ 
+             Objects.requireNonNull(newEntity);
+             optional.ifPresent(newEntity::setSleepingPos);
+@@ -156,7 +159,7 @@
+         newEntity.setNoGravity(oldEntity.isNoGravity());
+         newEntity.setPortalCooldown(oldEntity.getPortalCooldown());
+         newEntity.setSilent(oldEntity.isSilent());
+-        Set set = oldEntity.getTags();
++        Set<String> set = oldEntity.getTags(); // CraftBukkit - decompile error
+ 
+         Objects.requireNonNull(newEntity);
+         set.forEach(newEntity::addTag);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ConversionType.patch b/paper-server/patches/sources/net/minecraft/world/entity/ConversionType.patch
deleted file mode 100644
index 4aaf08e2cd..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/ConversionType.patch
+++ /dev/null
@@ -1,41 +0,0 @@
---- a/net/minecraft/world/entity/ConversionType.java
-+++ b/net/minecraft/world/entity/ConversionType.java
-@@ -12,6 +12,11 @@
- import net.minecraft.world.item.ItemStack;
- import net.minecraft.world.scores.Scoreboard;
- 
-+// CraftBukkit start
-+import net.minecraft.core.BlockPosition;
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+// CraftBukkit end
-+
- public enum ConversionType {
- 
-     SINGLE(true) {
-@@ -31,7 +36,7 @@
-                 while (iterator.hasNext()) {
-                     entity1 = (Entity) iterator.next();
-                     entity1.stopRiding();
--                    entity1.remove(Entity.RemovalReason.DISCARDED);
-+                    entity1.remove(Entity.RemovalReason.DISCARDED, EntityRemoveEvent.Cause.TRANSFORMATION); // CraftBukkit - add Bukkit remove cause
-                 }
- 
-                 entity.startRiding(entityinsentient1);
-@@ -64,7 +69,7 @@
-             entityinsentient1.hurtTime = entityinsentient.hurtTime;
-             entityinsentient1.yBodyRot = entityinsentient.yBodyRot;
-             entityinsentient1.setOnGround(entityinsentient.onGround());
--            Optional optional = entityinsentient.getSleepingPos();
-+            Optional<BlockPosition> optional = entityinsentient.getSleepingPos(); // CraftBukkit - decompile error
- 
-             Objects.requireNonNull(entityinsentient1);
-             optional.ifPresent(entityinsentient1::setSleepingPos);
-@@ -156,7 +161,7 @@
-         entityinsentient1.setNoGravity(entityinsentient.isNoGravity());
-         entityinsentient1.setPortalCooldown(entityinsentient.getPortalCooldown());
-         entityinsentient1.setSilent(entityinsentient.isSilent());
--        Set set = entityinsentient.getTags();
-+        Set<String> set = entityinsentient.getTags(); // CraftBukkit - decompile error
- 
-         Objects.requireNonNull(entityinsentient1);
-         set.forEach(entityinsentient1::addTag);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/Entity.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/Entity.java.patch
new file mode 100644
index 0000000000..e28d0b4929
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/Entity.java.patch
@@ -0,0 +1,1267 @@
+--- a/net/minecraft/world/entity/Entity.java
++++ b/net/minecraft/world/entity/Entity.java
+@@ -59,6 +59,8 @@
+ import net.minecraft.network.protocol.Packet;
+ import net.minecraft.network.protocol.game.ClientGamePacketListener;
+ import net.minecraft.network.protocol.game.ClientboundAddEntityPacket;
++import net.minecraft.network.protocol.game.ClientboundSetEntityDataPacket;
++import net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket;
+ import net.minecraft.network.protocol.game.ClientboundTeleportEntityPacket;
+ import net.minecraft.network.protocol.game.VecDeltaCodec;
+ import net.minecraft.network.syncher.EntityDataAccessor;
+@@ -101,8 +103,6 @@
+ import net.minecraft.world.level.ChunkPos;
+ import net.minecraft.world.level.ClipContext;
+ import net.minecraft.world.level.Explosion;
+-import net.minecraft.world.level.ItemLike;
+-import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.block.Block;
+ import net.minecraft.world.level.block.Blocks;
+ import net.minecraft.world.level.block.FenceGateBlock;
+@@ -138,9 +138,67 @@
+ import net.minecraft.world.scores.ScoreHolder;
+ import net.minecraft.world.scores.Team;
+ import org.slf4j.Logger;
++import net.minecraft.world.level.GameRules;
++import net.minecraft.world.level.ItemLike;
++import net.minecraft.world.level.Level;
++import org.bukkit.Bukkit;
++import org.bukkit.Location;
++import org.bukkit.Server;
++import org.bukkit.block.BlockFace;
++import org.bukkit.command.CommandSender;
++import org.bukkit.entity.Hanging;
++import org.bukkit.entity.LivingEntity;
++import org.bukkit.entity.Vehicle;
++import org.bukkit.event.entity.EntityCombustByEntityEvent;
++import org.bukkit.event.hanging.HangingBreakByEntityEvent;
++import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
++import org.bukkit.event.vehicle.VehicleEnterEvent;
++import org.bukkit.event.vehicle.VehicleExitEvent;
++import org.bukkit.craftbukkit.CraftWorld;
++import org.bukkit.craftbukkit.entity.CraftEntity;
++import org.bukkit.craftbukkit.entity.CraftPlayer;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.craftbukkit.event.CraftPortalEvent;
++import org.bukkit.craftbukkit.util.CraftLocation;
++import org.bukkit.entity.Pose;
++import org.bukkit.event.entity.EntityAirChangeEvent;
++import org.bukkit.event.entity.EntityCombustEvent;
++import org.bukkit.event.entity.EntityDismountEvent;
++import org.bukkit.event.entity.EntityDropItemEvent;
++import org.bukkit.event.entity.EntityMountEvent;
++import org.bukkit.event.entity.EntityPortalEvent;
++import org.bukkit.event.entity.EntityPoseChangeEvent;
++import org.bukkit.event.entity.EntityRemoveEvent;
++import org.bukkit.event.entity.EntityTeleportEvent;
++import org.bukkit.event.entity.EntityUnleashEvent;
++import org.bukkit.event.entity.EntityUnleashEvent.UnleashReason;
++import org.bukkit.event.player.PlayerTeleportEvent;
++import org.bukkit.plugin.PluginManager;
++// CraftBukkit end
+ 
+ public abstract class Entity implements SyncedDataHolder, Nameable, EntityAccess, ScoreHolder {
++
++    // CraftBukkit start
++    private static final int CURRENT_LEVEL = 2;
++    static boolean isLevelAtLeast(CompoundTag tag, int level) {
++        return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
++    }
+ 
++    private CraftEntity bukkitEntity;
++
++    public CraftEntity getBukkitEntity() {
++        if (this.bukkitEntity == null) {
++            this.bukkitEntity = CraftEntity.getEntity(this.level.getCraftServer(), this);
++        }
++        return this.bukkitEntity;
++    }
++
++    // CraftBukkit - SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
++    public int getDefaultMaxAirSupply() {
++        return Entity.TOTAL_AIR_SUPPLY;
++    }
++    // CraftBukkit end
++
+     private static final Logger LOGGER = LogUtils.getLogger();
+     public static final String ID_TAG = "id";
+     public static final String PASSENGERS_TAG = "Passengers";
+@@ -224,7 +282,7 @@
+     private static final EntityDataAccessor<Boolean> DATA_CUSTOM_NAME_VISIBLE = SynchedEntityData.defineId(Entity.class, EntityDataSerializers.BOOLEAN);
+     private static final EntityDataAccessor<Boolean> DATA_SILENT = SynchedEntityData.defineId(Entity.class, EntityDataSerializers.BOOLEAN);
+     private static final EntityDataAccessor<Boolean> DATA_NO_GRAVITY = SynchedEntityData.defineId(Entity.class, EntityDataSerializers.BOOLEAN);
+-    protected static final EntityDataAccessor<Pose> DATA_POSE = SynchedEntityData.defineId(Entity.class, EntityDataSerializers.POSE);
++    protected static final EntityDataAccessor<net.minecraft.world.entity.Pose> DATA_POSE = SynchedEntityData.defineId(Entity.class, EntityDataSerializers.POSE);
+     private static final EntityDataAccessor<Integer> DATA_TICKS_FROZEN = SynchedEntityData.defineId(Entity.class, EntityDataSerializers.INT);
+     private EntityInLevelCallback levelCallback;
+     private final VecDeltaCodec packetPositionCodec;
+@@ -253,7 +311,31 @@
+     private final List<Entity.Movement> movementThisTick;
+     private final Set<BlockState> blocksInside;
+     private final LongSet visitedBlocks;
++    // CraftBukkit start
++    public boolean forceDrops;
++    public boolean persist = true;
++    public boolean visibleByDefault = true;
++    public boolean valid;
++    public boolean inWorld = false;
++    public boolean generation;
++    public int maxAirTicks = this.getDefaultMaxAirSupply(); // CraftBukkit - SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
++    public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only
++    public boolean lastDamageCancelled; // SPIGOT-5339, SPIGOT-6252, SPIGOT-6777: Keep track if the event was canceled
++    public boolean persistentInvisibility = false;
++    public BlockPos lastLavaContact;
++    // Marks an entity, that it was removed by a plugin via Entity#remove
++    // Main use case currently is for SPIGOT-7487, preventing dropping of leash when leash is removed
++    public boolean pluginRemoved = false;
+ 
++    public float getBukkitYaw() {
++        return this.yRot;
++    }
++
++    public boolean isChunkLoaded() {
++        return this.level.hasChunk((int) Math.floor(this.getX()) >> 4, (int) Math.floor(this.getZ()) >> 4);
++    }
++    // CraftBukkit end
++
+     public Entity(EntityType<?> type, Level world) {
+         this.id = Entity.ENTITY_COUNTER.incrementAndGet();
+         this.passengers = ImmutableList.of();
+@@ -292,7 +374,7 @@
+         datawatcher_a.define(Entity.DATA_CUSTOM_NAME, Optional.empty());
+         datawatcher_a.define(Entity.DATA_SILENT, false);
+         datawatcher_a.define(Entity.DATA_NO_GRAVITY, false);
+-        datawatcher_a.define(Entity.DATA_POSE, Pose.STANDING);
++        datawatcher_a.define(Entity.DATA_POSE, net.minecraft.world.entity.Pose.STANDING);
+         datawatcher_a.define(Entity.DATA_TICKS_FROZEN, 0);
+         this.defineSynchedData(datawatcher_a);
+         this.entityData = datawatcher_a.build();
+@@ -362,20 +444,36 @@
+     }
+ 
+     public void kill(ServerLevel world) {
+-        this.remove(Entity.RemovalReason.KILLED);
++        this.remove(Entity.RemovalReason.KILLED, EntityRemoveEvent.Cause.DEATH); // CraftBukkit - add Bukkit remove cause
+         this.gameEvent(GameEvent.ENTITY_DIE);
+     }
+ 
+     public final void discard() {
+-        this.remove(Entity.RemovalReason.DISCARDED);
++        // CraftBukkit start - add Bukkit remove cause
++        this.discard(null);
+     }
+ 
++    public final void discard(EntityRemoveEvent.Cause cause) {
++        this.remove(Entity.RemovalReason.DISCARDED, cause);
++        // CraftBukkit end
++    }
++
+     protected abstract void defineSynchedData(SynchedEntityData.Builder builder);
+ 
+     public SynchedEntityData getEntityData() {
+         return this.entityData;
+     }
+ 
++    // CraftBukkit start
++    public void refreshEntityData(ServerPlayer to) {
++        List<SynchedEntityData.DataValue<?>> list = this.getEntityData().getNonDefaultValues();
++
++        if (list != null) {
++            to.connection.send(new ClientboundSetEntityDataPacket(this.getId(), list));
++        }
++    }
++    // CraftBukkit end
++
+     public boolean equals(Object object) {
+         return object instanceof Entity ? ((Entity) object).id == this.id : false;
+     }
+@@ -385,22 +483,34 @@
+     }
+ 
+     public void remove(Entity.RemovalReason reason) {
+-        this.setRemoved(reason);
++        // CraftBukkit start - add Bukkit remove cause
++        this.setRemoved(reason, null);
+     }
+ 
++    public void remove(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) {
++        this.setRemoved(entity_removalreason, cause);
++        // CraftBukkit end
++    }
++
+     public void onClientRemoval() {}
+ 
+     public void onRemoval(Entity.RemovalReason reason) {}
+ 
+-    public void setPose(Pose pose) {
++    public void setPose(net.minecraft.world.entity.Pose pose) {
++        // CraftBukkit start
++        if (pose == this.getPose()) {
++            return;
++        }
++        this.level.getCraftServer().getPluginManager().callEvent(new EntityPoseChangeEvent(this.getBukkitEntity(), Pose.values()[pose.ordinal()]));
++        // CraftBukkit end
+         this.entityData.set(Entity.DATA_POSE, pose);
+     }
+ 
+-    public Pose getPose() {
+-        return (Pose) this.entityData.get(Entity.DATA_POSE);
++    public net.minecraft.world.entity.Pose getPose() {
++        return (net.minecraft.world.entity.Pose) this.entityData.get(Entity.DATA_POSE);
+     }
+ 
+-    public boolean hasPose(Pose pose) {
++    public boolean hasPose(net.minecraft.world.entity.Pose pose) {
+         return this.getPose() == pose;
+     }
+ 
+@@ -417,6 +527,33 @@
+     }
+ 
+     public void setRot(float yaw, float pitch) {
++        // CraftBukkit start - yaw was sometimes set to NaN, so we need to set it back to 0
++        if (Float.isNaN(yaw)) {
++            yaw = 0;
++        }
++
++        if (yaw == Float.POSITIVE_INFINITY || yaw == Float.NEGATIVE_INFINITY) {
++            if (this instanceof ServerPlayer) {
++                this.level.getCraftServer().getLogger().warning(this.getScoreboardName() + " was caught trying to crash the server with an invalid yaw");
++                ((CraftPlayer) this.getBukkitEntity()).kickPlayer("Infinite yaw (Hacking?)");
++            }
++            yaw = 0;
++        }
++
++        // pitch was sometimes set to NaN, so we need to set it back to 0
++        if (Float.isNaN(pitch)) {
++            pitch = 0;
++        }
++
++        if (pitch == Float.POSITIVE_INFINITY || pitch == Float.NEGATIVE_INFINITY) {
++            if (this instanceof ServerPlayer) {
++                this.level.getCraftServer().getLogger().warning(this.getScoreboardName() + " was caught trying to crash the server with an invalid pitch");
++                ((CraftPlayer) this.getBukkitEntity()).kickPlayer("Infinite pitch (Hacking?)");
++            }
++            pitch = 0;
++        }
++        // CraftBukkit end
++
+         this.setYRot(yaw % 360.0F);
+         this.setXRot(pitch % 360.0F);
+     }
+@@ -462,6 +599,15 @@
+         this.baseTick();
+     }
+ 
++    // CraftBukkit start
++    public void postTick() {
++        // No clean way to break out of ticking once the entity has been copied to a new world, so instead we move the portalling later in the tick cycle
++        if (!(this instanceof ServerPlayer)) {
++            this.handlePortal();
++        }
++    }
++    // CraftBukkit end
++
+     public void baseTick() {
+         ProfilerFiller gameprofilerfiller = Profiler.get();
+ 
+@@ -475,7 +621,7 @@
+             --this.boardingCooldown;
+         }
+ 
+-        this.handlePortal();
++        if (this instanceof ServerPlayer) this.handlePortal(); // CraftBukkit - // Moved up to postTick
+         if (this.canSpawnSprintParticle()) {
+             this.spawnSprintParticle();
+         }
+@@ -514,6 +660,10 @@
+         if (this.isInLava()) {
+             this.lavaHurt();
+             this.fallDistance *= 0.5F;
++            // CraftBukkit start
++        } else {
++            this.lastLavaContact = null;
++            // CraftBukkit end
+         }
+ 
+         this.checkBelowWorld();
+@@ -525,7 +675,7 @@
+         world = this.level();
+         if (world instanceof ServerLevel worldserver) {
+             if (this instanceof Leashable) {
+-                Leashable.tickLeash(worldserver, (Entity) ((Leashable) this));
++                Leashable.tickLeash(worldserver, (Entity & Leashable) this); // CraftBukkit - decompile error
+             }
+         }
+ 
+@@ -568,15 +718,32 @@
+ 
+     public void lavaHurt() {
+         if (!this.fireImmune()) {
+-            this.igniteForSeconds(15.0F);
++            // CraftBukkit start - Fallen in lava TODO: this event spams!
++            if (this instanceof net.minecraft.world.entity.LivingEntity && this.remainingFireTicks <= 0) {
++                // not on fire yet
++                org.bukkit.block.Block damager = (this.lastLavaContact == null) ? null : org.bukkit.craftbukkit.block.CraftBlock.at(this.level, this.lastLavaContact);
++                org.bukkit.entity.Entity damagee = this.getBukkitEntity();
++                EntityCombustEvent combustEvent = new org.bukkit.event.entity.EntityCombustByBlockEvent(damager, damagee, 15);
++                this.level.getCraftServer().getPluginManager().callEvent(combustEvent);
++
++                if (!combustEvent.isCancelled()) {
++                    this.igniteForSeconds(combustEvent.getDuration(), false);
++                }
++            } else {
++                // This will be called every single tick the entity is in lava, so don't throw an event
++                this.igniteForSeconds(15.0F, false);
++            }
++            // CraftBukkit end
+             Level world = this.level();
+ 
+             if (world instanceof ServerLevel) {
+                 ServerLevel worldserver = (ServerLevel) world;
+ 
+-                if (this.hurtServer(worldserver, this.damageSources().lava(), 4.0F) && this.shouldPlayLavaHurtSound() && !this.isSilent()) {
++                // CraftBukkit start
++                if (this.hurtServer(worldserver, this.damageSources().lava().directBlock(this.level, this.lastLavaContact), 4.0F) && this.shouldPlayLavaHurtSound() && !this.isSilent()) {
+                     worldserver.playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.GENERIC_BURN, this.getSoundSource(), 0.4F, 2.0F + this.random.nextFloat() * 0.4F);
+                 }
++                // CraftBukkit end - we also don't throw an event unless the object in lava is living, to save on some event calls
+             }
+ 
+         }
+@@ -587,9 +754,25 @@
+     }
+ 
+     public final void igniteForSeconds(float seconds) {
+-        this.igniteForTicks(Mth.floor(seconds * 20.0F));
++        // CraftBukkit start
++        this.igniteForSeconds(seconds, true);
+     }
+ 
++    public final void igniteForSeconds(float f, boolean callEvent) {
++        if (callEvent) {
++            EntityCombustEvent event = new EntityCombustEvent(this.getBukkitEntity(), f);
++            this.level.getCraftServer().getPluginManager().callEvent(event);
++
++            if (event.isCancelled()) {
++                return;
++            }
++
++            f = event.getDuration();
++        }
++        // CraftBukkit end
++        this.igniteForTicks(Mth.floor(f * 20.0F));
++    }
++
+     public void igniteForTicks(int ticks) {
+         if (this.remainingFireTicks < ticks) {
+             this.setRemainingFireTicks(ticks);
+@@ -610,7 +793,7 @@
+     }
+ 
+     protected void onBelowWorld() {
+-        this.discard();
++        this.discard(EntityRemoveEvent.Cause.OUT_OF_WORLD); // CraftBukkit - add Bukkit remove cause
+     }
+ 
+     public boolean isFree(double offsetX, double offsetY, double offsetZ) {
+@@ -747,8 +930,30 @@
+ 
+                     if (movement.y != vec3d1.y) {
+                         block.updateEntityMovementAfterFallOn(this.level(), this);
++                    }
++                }
++
++                // CraftBukkit start
++                if (this.horizontalCollision && this.getBukkitEntity() instanceof Vehicle) {
++                    Vehicle vehicle = (Vehicle) this.getBukkitEntity();
++                    org.bukkit.block.Block bl = this.level.getWorld().getBlockAt(Mth.floor(this.getX()), Mth.floor(this.getY()), Mth.floor(this.getZ()));
++
++                    if (movement.x > vec3d1.x) {
++                        bl = bl.getRelative(BlockFace.EAST);
++                    } else if (movement.x < vec3d1.x) {
++                        bl = bl.getRelative(BlockFace.WEST);
++                    } else if (movement.z > vec3d1.z) {
++                        bl = bl.getRelative(BlockFace.SOUTH);
++                    } else if (movement.z < vec3d1.z) {
++                        bl = bl.getRelative(BlockFace.NORTH);
+                     }
++
++                    if (!bl.getType().isAir()) {
++                        VehicleBlockCollisionEvent event = new VehicleBlockCollisionEvent(vehicle, bl);
++                        this.level.getCraftServer().getPluginManager().callEvent(event);
++                    }
+                 }
++                // CraftBukkit end
+ 
+                 if (!this.level().isClientSide() || this.isControlledByLocalInstance()) {
+                     Entity.MovementEmission entity_movementemission = this.getMovementEmission();
+@@ -1131,7 +1336,21 @@
+ 
+     protected SoundEvent getSwimHighSpeedSplashSound() {
+         return SoundEvents.GENERIC_SPLASH;
++    }
++
++    // CraftBukkit start - Add delegate methods
++    public SoundEvent getSwimSound0() {
++        return this.getSwimSound();
++    }
++
++    public SoundEvent getSwimSplashSound0() {
++        return this.getSwimSplashSound();
++    }
++
++    public SoundEvent getSwimHighSpeedSplashSound0() {
++        return this.getSwimHighSpeedSplashSound();
+     }
++    // CraftBukkit end
+ 
+     public void recordMovementThroughBlocks(Vec3 oldPos, Vec3 newPos) {
+         this.movementThisTick.add(new Entity.Movement(oldPos, newPos));
+@@ -1609,6 +1828,7 @@
+         this.yo = y;
+         this.zo = d4;
+         this.setPos(d3, y, d4);
++        if (this.valid) this.level.getChunk((int) Math.floor(this.getX()) >> 4, (int) Math.floor(this.getZ()) >> 4); // CraftBukkit
+     }
+ 
+     public void moveTo(Vec3 pos) {
+@@ -1861,6 +2081,12 @@
+         return false;
+     }
+ 
++    // CraftBukkit start - collidable API
++    public boolean canCollideWithBukkit(Entity entity) {
++        return this.isPushable();
++    }
++    // CraftBukkit end
++
+     public void awardKillScore(Entity entityKilled, DamageSource damageSource) {
+         if (entityKilled instanceof ServerPlayer) {
+             CriteriaTriggers.ENTITY_KILLED_PLAYER.trigger((ServerPlayer) entityKilled, this, damageSource);
+@@ -1889,16 +2115,22 @@
+     }
+ 
+     public boolean saveAsPassenger(CompoundTag nbt) {
++        // CraftBukkit start - allow excluding certain data when saving
++        return this.saveAsPassenger(nbt, true);
++    }
++
++    public boolean saveAsPassenger(CompoundTag nbttagcompound, boolean includeAll) {
++        // CraftBukkit end
+         if (this.removalReason != null && !this.removalReason.shouldSave()) {
+             return false;
+         } else {
+             String s = this.getEncodeId();
+ 
+-            if (s == null) {
++            if (!this.persist || s == null) { // CraftBukkit - persist flag
+                 return false;
+             } else {
+-                nbt.putString("id", s);
+-                this.saveWithoutId(nbt);
++                nbttagcompound.putString("id", s);
++                this.saveWithoutId(nbttagcompound, includeAll); // CraftBukkit - pass on includeAll
+                 return true;
+             }
+         }
+@@ -1909,54 +2141,97 @@
+     }
+ 
+     public CompoundTag saveWithoutId(CompoundTag nbt) {
+-        try {
+-            if (this.vehicle != null) {
+-                nbt.put("Pos", this.newDoubleList(this.vehicle.getX(), this.getY(), this.vehicle.getZ()));
+-            } else {
+-                nbt.put("Pos", this.newDoubleList(this.getX(), this.getY(), this.getZ()));
++        // CraftBukkit start - allow excluding certain data when saving
++        return this.saveWithoutId(nbt, true);
++    }
++
++    public CompoundTag saveWithoutId(CompoundTag nbttagcompound, boolean includeAll) {
++        // CraftBukkit end
++        try {
++            // CraftBukkit start - selectively save position
++            if (includeAll) {
++                if (this.vehicle != null) {
++                    nbttagcompound.put("Pos", this.newDoubleList(this.vehicle.getX(), this.getY(), this.vehicle.getZ()));
++                } else {
++                    nbttagcompound.put("Pos", this.newDoubleList(this.getX(), this.getY(), this.getZ()));
++                }
+             }
++            // CraftBukkit end
+ 
+             Vec3 vec3d = this.getDeltaMovement();
+ 
+-            nbt.put("Motion", this.newDoubleList(vec3d.x, vec3d.y, vec3d.z));
+-            nbt.put("Rotation", this.newFloatList(this.getYRot(), this.getXRot()));
+-            nbt.putFloat("FallDistance", this.fallDistance);
+-            nbt.putShort("Fire", (short) this.remainingFireTicks);
+-            nbt.putShort("Air", (short) this.getAirSupply());
+-            nbt.putBoolean("OnGround", this.onGround());
+-            nbt.putBoolean("Invulnerable", this.invulnerable);
+-            nbt.putInt("PortalCooldown", this.portalCooldown);
+-            nbt.putUUID("UUID", this.getUUID());
++            nbttagcompound.put("Motion", this.newDoubleList(vec3d.x, vec3d.y, vec3d.z));
++
++            // CraftBukkit start - Checking for NaN pitch/yaw and resetting to zero
++            // TODO: make sure this is the best way to address this.
++            if (Float.isNaN(this.yRot)) {
++                this.yRot = 0;
++            }
++
++            if (Float.isNaN(this.xRot)) {
++                this.xRot = 0;
++            }
++            // CraftBukkit end
++
++            nbttagcompound.put("Rotation", this.newFloatList(this.getYRot(), this.getXRot()));
++            nbttagcompound.putFloat("FallDistance", this.fallDistance);
++            nbttagcompound.putShort("Fire", (short) this.remainingFireTicks);
++            nbttagcompound.putShort("Air", (short) this.getAirSupply());
++            nbttagcompound.putBoolean("OnGround", this.onGround());
++            nbttagcompound.putBoolean("Invulnerable", this.invulnerable);
++            nbttagcompound.putInt("PortalCooldown", this.portalCooldown);
++            // CraftBukkit start - selectively save uuid and world
++            if (includeAll) {
++                nbttagcompound.putUUID("UUID", this.getUUID());
++                // PAIL: Check above UUID reads 1.8 properly, ie: UUIDMost / UUIDLeast
++                nbttagcompound.putLong("WorldUUIDLeast", ((ServerLevel) this.level).getWorld().getUID().getLeastSignificantBits());
++                nbttagcompound.putLong("WorldUUIDMost", ((ServerLevel) this.level).getWorld().getUID().getMostSignificantBits());
++            }
++            nbttagcompound.putInt("Bukkit.updateLevel", Entity.CURRENT_LEVEL);
++            if (!this.persist) {
++                nbttagcompound.putBoolean("Bukkit.persist", this.persist);
++            }
++            if (!this.visibleByDefault) {
++                nbttagcompound.putBoolean("Bukkit.visibleByDefault", this.visibleByDefault);
++            }
++            if (this.persistentInvisibility) {
++                nbttagcompound.putBoolean("Bukkit.invisible", this.persistentInvisibility);
++            }
++            // SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
++            if (this.maxAirTicks != this.getDefaultMaxAirSupply()) {
++                nbttagcompound.putInt("Bukkit.MaxAirSupply", this.getMaxAirSupply());
++            }
++            // CraftBukkit end
+             Component ichatbasecomponent = this.getCustomName();
+ 
+             if (ichatbasecomponent != null) {
+-                nbt.putString("CustomName", Component.Serializer.toJson(ichatbasecomponent, this.registryAccess()));
++                nbttagcompound.putString("CustomName", Component.Serializer.toJson(ichatbasecomponent, this.registryAccess()));
+             }
+ 
+             if (this.isCustomNameVisible()) {
+-                nbt.putBoolean("CustomNameVisible", this.isCustomNameVisible());
++                nbttagcompound.putBoolean("CustomNameVisible", this.isCustomNameVisible());
+             }
+ 
+             if (this.isSilent()) {
+-                nbt.putBoolean("Silent", this.isSilent());
++                nbttagcompound.putBoolean("Silent", this.isSilent());
+             }
+ 
+             if (this.isNoGravity()) {
+-                nbt.putBoolean("NoGravity", this.isNoGravity());
++                nbttagcompound.putBoolean("NoGravity", this.isNoGravity());
+             }
+ 
+             if (this.hasGlowingTag) {
+-                nbt.putBoolean("Glowing", true);
++                nbttagcompound.putBoolean("Glowing", true);
+             }
+ 
+             int i = this.getTicksFrozen();
+ 
+             if (i > 0) {
+-                nbt.putInt("TicksFrozen", this.getTicksFrozen());
++                nbttagcompound.putInt("TicksFrozen", this.getTicksFrozen());
+             }
+ 
+             if (this.hasVisualFire) {
+-                nbt.putBoolean("HasVisualFire", this.hasVisualFire);
++                nbttagcompound.putBoolean("HasVisualFire", this.hasVisualFire);
+             }
+ 
+             ListTag nbttaglist;
+@@ -1972,10 +2247,10 @@
+                     nbttaglist.add(StringTag.valueOf(s));
+                 }
+ 
+-                nbt.put("Tags", nbttaglist);
++                nbttagcompound.put("Tags", nbttaglist);
+             }
+ 
+-            this.addAdditionalSaveData(nbt);
++            this.addAdditionalSaveData(nbttagcompound, includeAll); // CraftBukkit - pass on includeAll
+             if (this.isVehicle()) {
+                 nbttaglist = new ListTag();
+                 iterator = this.getPassengers().iterator();
+@@ -1984,17 +2259,22 @@
+                     Entity entity = (Entity) iterator.next();
+                     CompoundTag nbttagcompound1 = new CompoundTag();
+ 
+-                    if (entity.saveAsPassenger(nbttagcompound1)) {
++                    if (entity.saveAsPassenger(nbttagcompound1, includeAll)) { // CraftBukkit - pass on includeAll
+                         nbttaglist.add(nbttagcompound1);
+                     }
+                 }
+ 
+                 if (!nbttaglist.isEmpty()) {
+-                    nbt.put("Passengers", nbttaglist);
++                    nbttagcompound.put("Passengers", nbttaglist);
+                 }
+             }
+ 
+-            return nbt;
++            // CraftBukkit start - stores eventually existing bukkit values
++            if (this.bukkitEntity != null) {
++                this.bukkitEntity.storeBukkitValues(nbttagcompound);
++            }
++            // CraftBukkit end
++            return nbttagcompound;
+         } catch (Throwable throwable) {
+             CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
+             CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being saved");
+@@ -2080,6 +2360,45 @@
+             } else {
+                 throw new IllegalStateException("Entity has invalid position");
+             }
++
++            // CraftBukkit start
++            this.persist = !nbt.contains("Bukkit.persist") || nbt.getBoolean("Bukkit.persist");
++            this.visibleByDefault = !nbt.contains("Bukkit.visibleByDefault") || nbt.getBoolean("Bukkit.visibleByDefault");
++            // SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
++            if (nbt.contains("Bukkit.MaxAirSupply")) {
++                this.maxAirTicks = nbt.getInt("Bukkit.MaxAirSupply");
++            }
++            // CraftBukkit end
++
++            // CraftBukkit start - Reset world
++            if (this instanceof ServerPlayer) {
++                Server server = Bukkit.getServer();
++                org.bukkit.World bworld = null;
++
++                // TODO: Remove World related checks, replaced with WorldUID
++                String worldName = nbt.getString("world");
++
++                if (nbt.contains("WorldUUIDMost") && nbt.contains("WorldUUIDLeast")) {
++                    UUID uid = new UUID(nbt.getLong("WorldUUIDMost"), nbt.getLong("WorldUUIDLeast"));
++                    bworld = server.getWorld(uid);
++                } else {
++                    bworld = server.getWorld(worldName);
++                }
++
++                if (bworld == null) {
++                    bworld = ((org.bukkit.craftbukkit.CraftServer) server).getServer().getLevel(Level.OVERWORLD).getWorld();
++                }
++
++                ((ServerPlayer) this).setLevel(bworld == null ? null : ((CraftWorld) bworld).getHandle());
++            }
++            this.getBukkitEntity().readBukkitValues(nbt);
++            if (nbt.contains("Bukkit.invisible")) {
++                boolean bukkitInvisible = nbt.getBoolean("Bukkit.invisible");
++                this.setInvisible(bukkitInvisible);
++                this.persistentInvisibility = bukkitInvisible;
++            }
++            // CraftBukkit end
++
+         } catch (Throwable throwable) {
+             CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
+             CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Entity being loaded");
+@@ -2101,6 +2420,12 @@
+         return entitytypes.canSerialize() && minecraftkey != null ? minecraftkey.toString() : null;
+     }
+ 
++    // CraftBukkit start - allow excluding certain data when saving
++    protected void addAdditionalSaveData(CompoundTag nbttagcompound, boolean includeAll) {
++        this.addAdditionalSaveData(nbttagcompound);
++    }
++    // CraftBukkit end
++
+     protected abstract void readAdditionalSaveData(CompoundTag nbt);
+ 
+     protected abstract void addAdditionalSaveData(CompoundTag nbt);
+@@ -2153,9 +2478,22 @@
+         if (stack.isEmpty()) {
+             return null;
+         } else {
++            // CraftBukkit start - Capture drops for death event
++            if (this instanceof net.minecraft.world.entity.LivingEntity && !((net.minecraft.world.entity.LivingEntity) this).forceDrops) {
++                ((net.minecraft.world.entity.LivingEntity) this).drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(stack));
++                return null;
++            }
++            // CraftBukkit end
+             ItemEntity entityitem = new ItemEntity(world, this.getX(), this.getY() + (double) yOffset, this.getZ(), stack);
+ 
+             entityitem.setDefaultPickUpDelay();
++            // CraftBukkit start
++            EntityDropItemEvent event = new EntityDropItemEvent(this.getBukkitEntity(), (org.bukkit.entity.Item) entityitem.getBukkitEntity());
++            Bukkit.getPluginManager().callEvent(event);
++            if (event.isCancelled()) {
++                return null;
++            }
++            // CraftBukkit end
+             world.addFreshEntity(entityitem);
+             return entityitem;
+         }
+@@ -2184,6 +2522,12 @@
+         if (this.isAlive() && this instanceof Leashable leashable) {
+             if (leashable.getLeashHolder() == player) {
+                 if (!this.level().isClientSide()) {
++                    // CraftBukkit start - fire PlayerUnleashEntityEvent
++                    if (CraftEventFactory.callPlayerUnleashEntityEvent(this, player, hand).isCancelled()) {
++                        ((ServerPlayer) player).connection.send(new ClientboundSetEntityLinkPacket(this, leashable.getLeashHolder()));
++                        return InteractionResult.PASS;
++                    }
++                    // CraftBukkit end
+                     if (player.hasInfiniteMaterials()) {
+                         leashable.removeLeash();
+                     } else {
+@@ -2200,6 +2544,13 @@
+ 
+             if (itemstack.is(Items.LEAD) && leashable.canHaveALeashAttachedToIt()) {
+                 if (!this.level().isClientSide()) {
++                    // CraftBukkit start - fire PlayerLeashEntityEvent
++                    if (CraftEventFactory.callPlayerLeashEntityEvent(this, player, player, hand).isCancelled()) {
++                        ((ServerPlayer) player).resendItemInHands(); // SPIGOT-7615: Resend to fix client desync with used item
++                        ((ServerPlayer) player).connection.send(new ClientboundSetEntityLinkPacket(this, leashable.getLeashHolder()));
++                        return InteractionResult.PASS;
++                    }
++                    // CraftBukkit end
+                     leashable.setLeashedTo(player, true);
+                 }
+ 
+@@ -2265,7 +2616,7 @@
+     }
+ 
+     public boolean showVehicleHealth() {
+-        return this instanceof LivingEntity;
++        return this instanceof net.minecraft.world.entity.LivingEntity;
+     }
+ 
+     public boolean startRiding(Entity entity, boolean force) {
+@@ -2273,7 +2624,7 @@
+             return false;
+         } else if (!entity.couldAcceptPassenger()) {
+             return false;
+-        } else if (!this.level().isClientSide() && !entity.type.canSerialize()) {
++        } else if (!force && !this.level().isClientSide() && !entity.type.canSerialize()) { // SPIGOT-7947: Allow force riding all entities
+             return false;
+         } else {
+             for (Entity entity1 = entity; entity1.vehicle != null; entity1 = entity1.vehicle) {
+@@ -2285,11 +2636,32 @@
+             if (!force && (!this.canRide(entity) || !entity.canAddPassenger(this))) {
+                 return false;
+             } else {
++                // CraftBukkit start
++                if (entity.getBukkitEntity() instanceof Vehicle && this.getBukkitEntity() instanceof LivingEntity) {
++                    VehicleEnterEvent event = new VehicleEnterEvent((Vehicle) entity.getBukkitEntity(), this.getBukkitEntity());
++                    // Suppress during worldgen
++                    if (this.valid) {
++                        Bukkit.getPluginManager().callEvent(event);
++                    }
++                    if (event.isCancelled()) {
++                        return false;
++                    }
++                }
++
++                EntityMountEvent event = new EntityMountEvent(this.getBukkitEntity(), entity.getBukkitEntity());
++                // Suppress during worldgen
++                if (this.valid) {
++                    Bukkit.getPluginManager().callEvent(event);
++                }
++                if (event.isCancelled()) {
++                    return false;
++                }
++                // CraftBukkit end
+                 if (this.isPassenger()) {
+                     this.stopRiding();
+                 }
+ 
+-                this.setPose(Pose.STANDING);
++                this.setPose(net.minecraft.world.entity.Pose.STANDING);
+                 this.vehicle = entity;
+                 this.vehicle.addPassenger(this);
+                 entity.getIndirectPassengersStream().filter((entity2) -> {
+@@ -2318,7 +2690,7 @@
+             Entity entity = this.vehicle;
+ 
+             this.vehicle = null;
+-            entity.removePassenger(this);
++            if (!entity.removePassenger(this)) this.vehicle = entity; // CraftBukkit
+         }
+ 
+     }
+@@ -2349,21 +2721,50 @@
+         }
+     }
+ 
+-    protected void removePassenger(Entity passenger) {
+-        if (passenger.getVehicle() == this) {
++    protected boolean removePassenger(Entity entity) { // CraftBukkit
++        if (entity.getVehicle() == this) {
+             throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
+         } else {
+-            if (this.passengers.size() == 1 && this.passengers.get(0) == passenger) {
++            // CraftBukkit start
++            CraftEntity craft = (CraftEntity) entity.getBukkitEntity().getVehicle();
++            Entity orig = craft == null ? null : craft.getHandle();
++            if (this.getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
++                VehicleExitEvent event = new VehicleExitEvent(
++                        (Vehicle) this.getBukkitEntity(),
++                        (LivingEntity) entity.getBukkitEntity()
++                );
++                // Suppress during worldgen
++                if (this.valid) {
++                    Bukkit.getPluginManager().callEvent(event);
++                }
++                CraftEntity craftn = (CraftEntity) entity.getBukkitEntity().getVehicle();
++                Entity n = craftn == null ? null : craftn.getHandle();
++                if (event.isCancelled() || n != orig) {
++                    return false;
++                }
++            }
++
++            EntityDismountEvent event = new EntityDismountEvent(entity.getBukkitEntity(), this.getBukkitEntity());
++            // Suppress during worldgen
++            if (this.valid) {
++                Bukkit.getPluginManager().callEvent(event);
++            }
++            if (event.isCancelled()) {
++                return false;
++            }
++            // CraftBukkit end
++            if (this.passengers.size() == 1 && this.passengers.get(0) == entity) {
+                 this.passengers = ImmutableList.of();
+             } else {
+                 this.passengers = (ImmutableList) this.passengers.stream().filter((entity1) -> {
+-                    return entity1 != passenger;
++                    return entity1 != entity;
+                 }).collect(ImmutableList.toImmutableList());
+             }
+ 
+-            passenger.boardingCooldown = 60;
+-            this.gameEvent(GameEvent.ENTITY_DISMOUNT, passenger);
++            entity.boardingCooldown = 60;
++            this.gameEvent(GameEvent.ENTITY_DISMOUNT, entity);
+         }
++        return true; // CraftBukkit
+     }
+ 
+     protected boolean canAddPassenger(Entity passenger) {
+@@ -2464,7 +2865,7 @@
+                     if (teleporttransition != null) {
+                         ServerLevel worldserver1 = teleporttransition.newLevel();
+ 
+-                        if (worldserver.getServer().isLevelEnabled(worldserver1) && (worldserver1.dimension() == worldserver.dimension() || this.canTeleport(worldserver, worldserver1))) {
++                        if (this instanceof ServerPlayer || (worldserver1 != null && (worldserver1.dimension() == worldserver.dimension() || this.canTeleport(worldserver, worldserver1)))) { // CraftBukkit - always call event for players
+                             this.teleport(teleporttransition);
+                         }
+                     }
+@@ -2547,7 +2948,7 @@
+     }
+ 
+     public boolean isCrouching() {
+-        return this.hasPose(Pose.CROUCHING);
++        return this.hasPose(net.minecraft.world.entity.Pose.CROUCHING);
+     }
+ 
+     public boolean isSprinting() {
+@@ -2563,7 +2964,7 @@
+     }
+ 
+     public boolean isVisuallySwimming() {
+-        return this.hasPose(Pose.SWIMMING);
++        return this.hasPose(net.minecraft.world.entity.Pose.SWIMMING);
+     }
+ 
+     public boolean isVisuallyCrawling() {
+@@ -2571,6 +2972,13 @@
+     }
+ 
+     public void setSwimming(boolean swimming) {
++        // CraftBukkit start
++        if (this.valid && this.isSwimming() != swimming && this instanceof net.minecraft.world.entity.LivingEntity) {
++            if (CraftEventFactory.callToggleSwimEvent((net.minecraft.world.entity.LivingEntity) this, swimming).isCancelled()) {
++                return;
++            }
++        }
++        // CraftBukkit end
+         this.setSharedFlag(4, swimming);
+     }
+ 
+@@ -2624,8 +3032,12 @@
+         return this.getTeam() != null ? this.getTeam().isAlliedTo(team) : false;
+     }
+ 
++    // CraftBukkit - start
+     public void setInvisible(boolean invisible) {
+-        this.setSharedFlag(5, invisible);
++        if (!this.persistentInvisibility) { // Prevent Minecraft from removing our invisibility flag
++            this.setSharedFlag(5, invisible);
++        }
++        // CraftBukkit - end
+     }
+ 
+     public boolean getSharedFlag(int index) {
+@@ -2644,7 +3056,7 @@
+     }
+ 
+     public int getMaxAirSupply() {
+-        return 300;
++        return this.maxAirTicks; // CraftBukkit - SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
+     }
+ 
+     public int getAirSupply() {
+@@ -2652,7 +3064,18 @@
+     }
+ 
+     public void setAirSupply(int air) {
+-        this.entityData.set(Entity.DATA_AIR_SUPPLY_ID, air);
++        // CraftBukkit start
++        EntityAirChangeEvent event = new EntityAirChangeEvent(this.getBukkitEntity(), air);
++        // Suppress during worldgen
++        if (this.valid) {
++            event.getEntity().getServer().getPluginManager().callEvent(event);
++        }
++        if (event.isCancelled() && this.getAirSupply() != air) {
++            this.entityData.markDirty(Entity.DATA_AIR_SUPPLY_ID);
++            return;
++        }
++        this.entityData.set(Entity.DATA_AIR_SUPPLY_ID, event.getAmount());
++        // CraftBukkit end
+     }
+ 
+     public int getTicksFrozen() {
+@@ -2679,11 +3102,40 @@
+ 
+     public void thunderHit(ServerLevel world, LightningBolt lightning) {
+         this.setRemainingFireTicks(this.remainingFireTicks + 1);
++        // CraftBukkit start
++        final org.bukkit.entity.Entity thisBukkitEntity = this.getBukkitEntity();
++        final org.bukkit.entity.Entity stormBukkitEntity = lightning.getBukkitEntity();
++        final PluginManager pluginManager = Bukkit.getPluginManager();
++        // CraftBukkit end
++
+         if (this.remainingFireTicks == 0) {
+-            this.igniteForSeconds(8.0F);
++            // CraftBukkit start - Call a combust event when lightning strikes
++            EntityCombustByEntityEvent entityCombustEvent = new EntityCombustByEntityEvent(stormBukkitEntity, thisBukkitEntity, 8.0F);
++            pluginManager.callEvent(entityCombustEvent);
++            if (!entityCombustEvent.isCancelled()) {
++                this.igniteForSeconds(entityCombustEvent.getDuration(), false);
++            }
++            // CraftBukkit end
+         }
+ 
+-        this.hurtServer(world, this.damageSources().lightningBolt(), 5.0F);
++        // CraftBukkit start
++        if (thisBukkitEntity instanceof Hanging) {
++            HangingBreakByEntityEvent hangingEvent = new HangingBreakByEntityEvent((Hanging) thisBukkitEntity, stormBukkitEntity);
++            pluginManager.callEvent(hangingEvent);
++
++            if (hangingEvent.isCancelled()) {
++                return;
++            }
++        }
++
++        if (this.fireImmune()) {
++            return;
++        }
++
++        if (!this.hurtServer(world, this.damageSources().lightningBolt().customEntityDamager(lightning), 5.0F)) {
++            return;
++        }
++        // CraftBukkit end
+     }
+ 
+     public void onAboveBubbleCol(boolean drag) {
+@@ -2713,7 +3165,7 @@
+         this.resetFallDistance();
+     }
+ 
+-    public boolean killedEntity(ServerLevel world, LivingEntity other) {
++    public boolean killedEntity(ServerLevel world, net.minecraft.world.entity.LivingEntity other) {
+         return true;
+     }
+ 
+@@ -2852,6 +3304,18 @@
+ 
+         if (world instanceof ServerLevel worldserver) {
+             if (!this.isRemoved()) {
++                // CraftBukkit start
++                PositionMoveRotation absolutePosition = PositionMoveRotation.calculateAbsolute(PositionMoveRotation.of(this), PositionMoveRotation.of(teleportTarget), teleportTarget.relatives());
++                Location to = CraftLocation.toBukkit(absolutePosition.position(), teleportTarget.newLevel().getWorld(), absolutePosition.yRot(), absolutePosition.xRot());
++                EntityTeleportEvent teleEvent = CraftEventFactory.callEntityTeleportEvent(this, to);
++                if (teleEvent.isCancelled()) {
++                    return null;
++                }
++                if (!to.equals(teleEvent.getTo())) {
++                    to = teleEvent.getTo();
++                    teleportTarget = new TeleportTransition(((CraftWorld) to.getWorld()).getHandle(), CraftLocation.toVec3D(to), Vec3.ZERO, to.getYaw(), to.getPitch(), teleportTarget.missingRespawnBlock(), teleportTarget.asPassenger(), Set.of(), teleportTarget.postTeleportTransition(), teleportTarget.cause());
++                }
++                // CraftBukkit end
+                 ServerLevel worldserver1 = teleportTarget.newLevel();
+                 boolean flag = worldserver1.dimension() != worldserver.dimension();
+ 
+@@ -2920,8 +3384,12 @@
+         } else {
+             entity.restoreFrom(this);
+             this.removeAfterChangingDimensions();
++            // CraftBukkit start - Forward the CraftEntity to the new entity
++            this.getBukkitEntity().setHandle(entity);
++            entity.bukkitEntity = this.getBukkitEntity();
++            // CraftBukkit end
+             entity.teleportSetPosition(PositionMoveRotation.of(teleportTarget), teleportTarget.relatives());
+-            world.addDuringTeleport(entity);
++            if (this.inWorld) world.addDuringTeleport(entity); // CraftBukkit - Don't spawn the new entity if the current entity isn't spawned
+             Iterator iterator1 = list1.iterator();
+ 
+             while (iterator1.hasNext()) {
+@@ -2947,7 +3415,7 @@
+     }
+ 
+     private void sendTeleportTransitionToRidingPlayers(TeleportTransition teleportTarget) {
+-        LivingEntity entityliving = this.getControllingPassenger();
++        net.minecraft.world.entity.LivingEntity entityliving = this.getControllingPassenger();
+         Iterator iterator = this.getIndirectPassengers().iterator();
+ 
+         while (iterator.hasNext()) {
+@@ -2995,8 +3463,9 @@
+     }
+ 
+     protected void removeAfterChangingDimensions() {
+-        this.setRemoved(Entity.RemovalReason.CHANGED_DIMENSION);
++        this.setRemoved(Entity.RemovalReason.CHANGED_DIMENSION, null); // CraftBukkit - add Bukkit remove cause
+         if (this instanceof Leashable leashable) {
++            this.level().getCraftServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.UNKNOWN)); // CraftBukkit
+             leashable.removeLeash();
+         }
+ 
+@@ -3004,7 +3473,21 @@
+ 
+     public Vec3 getRelativePortalPosition(Direction.Axis portalAxis, BlockUtil.FoundRectangle portalRect) {
+         return PortalShape.getRelativePosition(portalRect, portalAxis, this.position(), this.getDimensions(this.getPose()));
++    }
++
++    // CraftBukkit start
++    public CraftPortalEvent callPortalEvent(Entity entity, Location exit, PlayerTeleportEvent.TeleportCause cause, int searchRadius, int creationRadius) {
++        org.bukkit.entity.Entity bukkitEntity = entity.getBukkitEntity();
++        Location enter = bukkitEntity.getLocation();
++
++        EntityPortalEvent event = new EntityPortalEvent(bukkitEntity, enter, exit, searchRadius, true, creationRadius);
++        event.getEntity().getServer().getPluginManager().callEvent(event);
++        if (event.isCancelled() || event.getTo() == null || event.getTo().getWorld() == null || !entity.isAlive()) {
++            return null;
++        }
++        return new CraftPortalEvent(event);
+     }
++    // CraftBukkit end
+ 
+     public boolean canUsePortal(boolean allowVehicles) {
+         return (allowVehicles || !this.isPassenger()) && this.isAlive();
+@@ -3134,10 +3617,16 @@
+         return (Boolean) this.entityData.get(Entity.DATA_CUSTOM_NAME_VISIBLE);
+     }
+ 
+-    public boolean teleportTo(ServerLevel world, double destX, double destY, double destZ, Set<Relative> flags, float yaw, float pitch, boolean resetCamera) {
+-        float f2 = Mth.clamp(pitch, -90.0F, 90.0F);
+-        Entity entity = this.teleport(new TeleportTransition(world, new Vec3(destX, destY, destZ), Vec3.ZERO, yaw, f2, flags, TeleportTransition.DO_NOTHING));
++    // CraftBukkit start
++    public final boolean teleportTo(ServerLevel world, double destX, double destY, double destZ, Set<Relative> flags, float yaw, float pitch, boolean resetCamera) {
++        return this.teleportTo(world, destX, destY, destZ, flags, yaw, pitch, resetCamera, PlayerTeleportEvent.TeleportCause.UNKNOWN);
++    }
+ 
++    public boolean teleportTo(ServerLevel worldserver, double d0, double d1, double d2, Set<Relative> set, float f, float f1, boolean flag, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause) {
++        float f2 = Mth.clamp(f1, -90.0F, 90.0F);
++        Entity entity = this.teleport(new TeleportTransition(worldserver, new Vec3(d0, d1, d2), Vec3.ZERO, f, f2, set, TeleportTransition.DO_NOTHING, cause));
++        // CraftBukkit end
++
+         return entity != null;
+     }
+ 
+@@ -3187,7 +3676,7 @@
+     /** @deprecated */
+     @Deprecated
+     protected void fixupDimensions() {
+-        Pose entitypose = this.getPose();
++        net.minecraft.world.entity.Pose entitypose = this.getPose();
+         EntityDimensions entitysize = this.getDimensions(entitypose);
+ 
+         this.dimensions = entitysize;
+@@ -3196,7 +3685,7 @@
+ 
+     public void refreshDimensions() {
+         EntityDimensions entitysize = this.dimensions;
+-        Pose entitypose = this.getPose();
++        net.minecraft.world.entity.Pose entitypose = this.getPose();
+         EntityDimensions entitysize1 = this.getDimensions(entitypose);
+ 
+         this.dimensions = entitysize1;
+@@ -3258,10 +3747,29 @@
+     }
+ 
+     public final void setBoundingBox(AABB boundingBox) {
+-        this.bb = boundingBox;
++        // CraftBukkit start - block invalid bounding boxes
++        double minX = boundingBox.minX,
++                minY = boundingBox.minY,
++                minZ = boundingBox.minZ,
++                maxX = boundingBox.maxX,
++                maxY = boundingBox.maxY,
++                maxZ = boundingBox.maxZ;
++        double len = boundingBox.maxX - boundingBox.minX;
++        if (len < 0) maxX = minX;
++        if (len > 64) maxX = minX + 64.0;
++
++        len = boundingBox.maxY - boundingBox.minY;
++        if (len < 0) maxY = minY;
++        if (len > 64) maxY = minY + 64.0;
++
++        len = boundingBox.maxZ - boundingBox.minZ;
++        if (len < 0) maxZ = minZ;
++        if (len > 64) maxZ = minZ + 64.0;
++        this.bb = new AABB(minX, minY, minZ, maxX, maxY, maxZ);
++        // CraftBukkit end
+     }
+ 
+-    public final float getEyeHeight(Pose pose) {
++    public final float getEyeHeight(net.minecraft.world.entity.Pose pose) {
+         return this.getDimensions(pose).eyeHeight();
+     }
+ 
+@@ -3335,7 +3843,7 @@
+     }
+ 
+     @Nullable
+-    public LivingEntity getControllingPassenger() {
++    public net.minecraft.world.entity.LivingEntity getControllingPassenger() {
+         return null;
+     }
+ 
+@@ -3435,7 +3943,7 @@
+     }
+ 
+     public boolean isControlledByLocalInstance() {
+-        LivingEntity entityliving = this.getControllingPassenger();
++        net.minecraft.world.entity.LivingEntity entityliving = this.getControllingPassenger();
+ 
+         if (entityliving instanceof Player entityhuman) {
+             return entityhuman.isLocalPlayer();
+@@ -3445,7 +3953,7 @@
+     }
+ 
+     public boolean isControlledByClient() {
+-        LivingEntity entityliving = this.getControllingPassenger();
++        net.minecraft.world.entity.LivingEntity entityliving = this.getControllingPassenger();
+ 
+         return entityliving != null && entityliving.isControlledByClient();
+     }
+@@ -3463,7 +3971,7 @@
+         return new Vec3((double) f1 * d2 / (double) f3, 0.0D, (double) f2 * d2 / (double) f3);
+     }
+ 
+-    public Vec3 getDismountLocationForPassenger(LivingEntity passenger) {
++    public Vec3 getDismountLocationForPassenger(net.minecraft.world.entity.LivingEntity passenger) {
+         return new Vec3(this.getX(), this.getBoundingBox().maxY, this.getZ());
+     }
+ 
+@@ -3489,8 +3997,37 @@
+         return 1;
+     }
+ 
++    // CraftBukkit start
++    private final CommandSource commandSource = new CommandSource() {
++
++        @Override
++        public void sendSystemMessage(Component message) {
++        }
++
++        @Override
++        public CommandSender getBukkitSender(CommandSourceStack wrapper) {
++            return Entity.this.getBukkitEntity();
++        }
++
++        @Override
++        public boolean acceptsSuccess() {
++            return ((ServerLevel) Entity.this.level()).getGameRules().getBoolean(GameRules.RULE_SENDCOMMANDFEEDBACK);
++        }
++
++        @Override
++        public boolean acceptsFailure() {
++            return true;
++        }
++
++        @Override
++        public boolean shouldInformAdmins() {
++            return true;
++        }
++    };
++    // CraftBukkit end
++
+     public CommandSourceStack createCommandSourceStackForNameResolution(ServerLevel world) {
+-        return new CommandSourceStack(CommandSource.NULL, this.position(), this.getRotationVector(), world, 0, this.getName().getString(), this.getDisplayName(), world.getServer(), this);
++        return new CommandSourceStack(this.commandSource, this.position(), this.getRotationVector(), world, 0, this.getName().getString(), this.getDisplayName(), world.getServer(), this); // CraftBukkit
+     }
+ 
+     public void lookAt(EntityAnchorArgument.Anchor anchorPoint, Vec3 target) {
+@@ -3551,6 +4088,11 @@
+                                     vec3d = vec3d.add(vec3d1);
+                                     ++k1;
+                                 }
++                                // CraftBukkit start - store last lava contact location
++                                if (tag == FluidTags.LAVA) {
++                                    this.lastLavaContact = blockposition_mutableblockposition.immutable();
++                                }
++                                // CraftBukkit end
+                             }
+                         }
+                     }
+@@ -3613,7 +4155,7 @@
+         return new ClientboundAddEntityPacket(this, entityTrackerEntry);
+     }
+ 
+-    public EntityDimensions getDimensions(Pose pose) {
++    public EntityDimensions getDimensions(net.minecraft.world.entity.Pose pose) {
+         return this.type.getDimensions();
+     }
+ 
+@@ -3818,8 +4360,16 @@
+ 
+     @Override
+     public final void setRemoved(Entity.RemovalReason reason) {
++        // CraftBukkit start - add Bukkit remove cause
++        this.setRemoved(reason, null);
++    }
++
++    @Override
++    public final void setRemoved(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) {
++        CraftEventFactory.callEntityRemoveEvent(this, cause);
++        // CraftBukkit end
+         if (this.removalReason == null) {
+-            this.removalReason = reason;
++            this.removalReason = entity_removalreason;
+         }
+ 
+         if (this.removalReason.shouldDestroy()) {
+@@ -3827,8 +4377,8 @@
+         }
+ 
+         this.getPassengers().forEach(Entity::stopRiding);
+-        this.levelCallback.onRemove(reason);
+-        this.onRemoval(reason);
++        this.levelCallback.onRemove(entity_removalreason);
++        this.onRemoval(entity_removalreason);
+     }
+ 
+     public void unsetRemoved() {
+@@ -3887,7 +4437,7 @@
+     }
+ 
+     public Vec3 getKnownMovement() {
+-        LivingEntity entityliving = this.getControllingPassenger();
++        net.minecraft.world.entity.LivingEntity entityliving = this.getControllingPassenger();
+ 
+         if (entityliving instanceof Player entityhuman) {
+             if (this.isAlive()) {
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/Entity.patch b/paper-server/patches/sources/net/minecraft/world/entity/Entity.patch
deleted file mode 100644
index 4a5f08dd3f..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/Entity.patch
+++ /dev/null
@@ -1,1002 +0,0 @@
---- a/net/minecraft/world/entity/Entity.java
-+++ b/net/minecraft/world/entity/Entity.java
-@@ -139,8 +139,68 @@
- import net.minecraft.world.scores.ScoreboardTeamBase;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import net.minecraft.network.protocol.game.PacketPlayOutAttachEntity;
-+import net.minecraft.network.protocol.game.PacketPlayOutEntityMetadata;
-+import net.minecraft.world.level.GameRules;
-+import org.bukkit.Bukkit;
-+import org.bukkit.Location;
-+import org.bukkit.Server;
-+import org.bukkit.block.BlockFace;
-+import org.bukkit.command.CommandSender;
-+import org.bukkit.entity.Hanging;
-+import org.bukkit.entity.LivingEntity;
-+import org.bukkit.entity.Vehicle;
-+import org.bukkit.event.entity.EntityCombustByEntityEvent;
-+import org.bukkit.event.hanging.HangingBreakByEntityEvent;
-+import org.bukkit.event.vehicle.VehicleBlockCollisionEvent;
-+import org.bukkit.event.vehicle.VehicleEnterEvent;
-+import org.bukkit.event.vehicle.VehicleExitEvent;
-+import org.bukkit.craftbukkit.CraftWorld;
-+import org.bukkit.craftbukkit.entity.CraftEntity;
-+import org.bukkit.craftbukkit.entity.CraftPlayer;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.craftbukkit.event.CraftPortalEvent;
-+import org.bukkit.craftbukkit.util.CraftLocation;
-+import org.bukkit.entity.Pose;
-+import org.bukkit.event.entity.EntityAirChangeEvent;
-+import org.bukkit.event.entity.EntityCombustEvent;
-+import org.bukkit.event.entity.EntityDismountEvent;
-+import org.bukkit.event.entity.EntityDropItemEvent;
-+import org.bukkit.event.entity.EntityMountEvent;
-+import org.bukkit.event.entity.EntityPortalEvent;
-+import org.bukkit.event.entity.EntityPoseChangeEvent;
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+import org.bukkit.event.entity.EntityTeleportEvent;
-+import org.bukkit.event.entity.EntityUnleashEvent;
-+import org.bukkit.event.entity.EntityUnleashEvent.UnleashReason;
-+import org.bukkit.event.player.PlayerTeleportEvent;
-+import org.bukkit.plugin.PluginManager;
-+// CraftBukkit end
-+
- public abstract class Entity implements SyncedDataHolder, INamableTileEntity, EntityAccess, ScoreHolder {
- 
-+    // CraftBukkit start
-+    private static final int CURRENT_LEVEL = 2;
-+    static boolean isLevelAtLeast(NBTTagCompound tag, int level) {
-+        return tag.contains("Bukkit.updateLevel") && tag.getInt("Bukkit.updateLevel") >= level;
-+    }
-+
-+    private CraftEntity bukkitEntity;
-+
-+    public CraftEntity getBukkitEntity() {
-+        if (bukkitEntity == null) {
-+            bukkitEntity = CraftEntity.getEntity(level.getCraftServer(), this);
-+        }
-+        return bukkitEntity;
-+    }
-+
-+    // CraftBukkit - SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
-+    public int getDefaultMaxAirSupply() {
-+        return TOTAL_AIR_SUPPLY;
-+    }
-+    // CraftBukkit end
-+
-     private static final Logger LOGGER = LogUtils.getLogger();
-     public static final String ID_TAG = "id";
-     public static final String PASSENGERS_TAG = "Passengers";
-@@ -253,6 +313,30 @@
-     private final List<Entity.b> movementThisTick;
-     private final Set<IBlockData> blocksInside;
-     private final LongSet visitedBlocks;
-+    // CraftBukkit start
-+    public boolean forceDrops;
-+    public boolean persist = true;
-+    public boolean visibleByDefault = true;
-+    public boolean valid;
-+    public boolean inWorld = false;
-+    public boolean generation;
-+    public int maxAirTicks = getDefaultMaxAirSupply(); // CraftBukkit - SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
-+    public org.bukkit.projectiles.ProjectileSource projectileSource; // For projectiles only
-+    public boolean lastDamageCancelled; // SPIGOT-5339, SPIGOT-6252, SPIGOT-6777: Keep track if the event was canceled
-+    public boolean persistentInvisibility = false;
-+    public BlockPosition lastLavaContact;
-+    // Marks an entity, that it was removed by a plugin via Entity#remove
-+    // Main use case currently is for SPIGOT-7487, preventing dropping of leash when leash is removed
-+    public boolean pluginRemoved = false;
-+
-+    public float getBukkitYaw() {
-+        return this.yRot;
-+    }
-+
-+    public boolean isChunkLoaded() {
-+        return level.hasChunk((int) Math.floor(this.getX()) >> 4, (int) Math.floor(this.getZ()) >> 4);
-+    }
-+    // CraftBukkit end
- 
-     public Entity(EntityTypes<?> entitytypes, World world) {
-         this.id = Entity.ENTITY_COUNTER.incrementAndGet();
-@@ -362,12 +446,18 @@
-     }
- 
-     public void kill(WorldServer worldserver) {
--        this.remove(Entity.RemovalReason.KILLED);
-+        this.remove(Entity.RemovalReason.KILLED, EntityRemoveEvent.Cause.DEATH); // CraftBukkit - add Bukkit remove cause
-         this.gameEvent(GameEvent.ENTITY_DIE);
-     }
- 
-     public final void discard() {
--        this.remove(Entity.RemovalReason.DISCARDED);
-+        // CraftBukkit start - add Bukkit remove cause
-+        this.discard(null);
-+    }
-+
-+    public final void discard(EntityRemoveEvent.Cause cause) {
-+        this.remove(Entity.RemovalReason.DISCARDED, cause);
-+        // CraftBukkit end
-     }
- 
-     protected abstract void defineSynchedData(DataWatcher.a datawatcher_a);
-@@ -376,6 +466,16 @@
-         return this.entityData;
-     }
- 
-+    // CraftBukkit start
-+    public void refreshEntityData(EntityPlayer to) {
-+        List<DataWatcher.c<?>> list = this.getEntityData().getNonDefaultValues();
-+
-+        if (list != null) {
-+            to.connection.send(new PacketPlayOutEntityMetadata(this.getId(), list));
-+        }
-+    }
-+    // CraftBukkit end
-+
-     public boolean equals(Object object) {
-         return object instanceof Entity ? ((Entity) object).id == this.id : false;
-     }
-@@ -385,7 +485,13 @@
-     }
- 
-     public void remove(Entity.RemovalReason entity_removalreason) {
--        this.setRemoved(entity_removalreason);
-+        // CraftBukkit start - add Bukkit remove cause
-+        this.setRemoved(entity_removalreason, null);
-+    }
-+
-+    public void remove(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) {
-+        this.setRemoved(entity_removalreason, cause);
-+        // CraftBukkit end
-     }
- 
-     public void onClientRemoval() {}
-@@ -393,6 +499,12 @@
-     public void onRemoval(Entity.RemovalReason entity_removalreason) {}
- 
-     public void setPose(EntityPose entitypose) {
-+        // CraftBukkit start
-+        if (entitypose == this.getPose()) {
-+            return;
-+        }
-+        this.level.getCraftServer().getPluginManager().callEvent(new EntityPoseChangeEvent(this.getBukkitEntity(), Pose.values()[entitypose.ordinal()]));
-+        // CraftBukkit end
-         this.entityData.set(Entity.DATA_POSE, entitypose);
-     }
- 
-@@ -417,6 +529,33 @@
-     }
- 
-     protected void setRot(float f, float f1) {
-+        // CraftBukkit start - yaw was sometimes set to NaN, so we need to set it back to 0
-+        if (Float.isNaN(f)) {
-+            f = 0;
-+        }
-+
-+        if (f == Float.POSITIVE_INFINITY || f == Float.NEGATIVE_INFINITY) {
-+            if (this instanceof EntityPlayer) {
-+                this.level.getCraftServer().getLogger().warning(this.getScoreboardName() + " was caught trying to crash the server with an invalid yaw");
-+                ((CraftPlayer) this.getBukkitEntity()).kickPlayer("Infinite yaw (Hacking?)");
-+            }
-+            f = 0;
-+        }
-+
-+        // pitch was sometimes set to NaN, so we need to set it back to 0
-+        if (Float.isNaN(f1)) {
-+            f1 = 0;
-+        }
-+
-+        if (f1 == Float.POSITIVE_INFINITY || f1 == Float.NEGATIVE_INFINITY) {
-+            if (this instanceof EntityPlayer) {
-+                this.level.getCraftServer().getLogger().warning(this.getScoreboardName() + " was caught trying to crash the server with an invalid pitch");
-+                ((CraftPlayer) this.getBukkitEntity()).kickPlayer("Infinite pitch (Hacking?)");
-+            }
-+            f1 = 0;
-+        }
-+        // CraftBukkit end
-+
-         this.setYRot(f % 360.0F);
-         this.setXRot(f1 % 360.0F);
-     }
-@@ -462,6 +601,15 @@
-         this.baseTick();
-     }
- 
-+    // CraftBukkit start
-+    public void postTick() {
-+        // No clean way to break out of ticking once the entity has been copied to a new world, so instead we move the portalling later in the tick cycle
-+        if (!(this instanceof EntityPlayer)) {
-+            this.handlePortal();
-+        }
-+    }
-+    // CraftBukkit end
-+
-     public void baseTick() {
-         GameProfilerFiller gameprofilerfiller = Profiler.get();
- 
-@@ -475,7 +623,7 @@
-             --this.boardingCooldown;
-         }
- 
--        this.handlePortal();
-+        if (this instanceof EntityPlayer) this.handlePortal(); // CraftBukkit - // Moved up to postTick
-         if (this.canSpawnSprintParticle()) {
-             this.spawnSprintParticle();
-         }
-@@ -514,6 +662,10 @@
-         if (this.isInLava()) {
-             this.lavaHurt();
-             this.fallDistance *= 0.5F;
-+            // CraftBukkit start
-+        } else {
-+            this.lastLavaContact = null;
-+            // CraftBukkit end
-         }
- 
-         this.checkBelowWorld();
-@@ -525,7 +677,7 @@
-         world = this.level();
-         if (world instanceof WorldServer worldserver) {
-             if (this instanceof Leashable) {
--                Leashable.tickLeash(worldserver, (Entity) ((Leashable) this));
-+                Leashable.tickLeash(worldserver, (Entity & Leashable) this); // CraftBukkit - decompile error
-             }
-         }
- 
-@@ -568,15 +720,32 @@
- 
-     public void lavaHurt() {
-         if (!this.fireImmune()) {
--            this.igniteForSeconds(15.0F);
-+            // CraftBukkit start - Fallen in lava TODO: this event spams!
-+            if (this instanceof EntityLiving && remainingFireTicks <= 0) {
-+                // not on fire yet
-+                org.bukkit.block.Block damager = (lastLavaContact == null) ? null : org.bukkit.craftbukkit.block.CraftBlock.at(level, lastLavaContact);
-+                org.bukkit.entity.Entity damagee = this.getBukkitEntity();
-+                EntityCombustEvent combustEvent = new org.bukkit.event.entity.EntityCombustByBlockEvent(damager, damagee, 15);
-+                this.level.getCraftServer().getPluginManager().callEvent(combustEvent);
-+
-+                if (!combustEvent.isCancelled()) {
-+                    this.igniteForSeconds(combustEvent.getDuration(), false);
-+                }
-+            } else {
-+                // This will be called every single tick the entity is in lava, so don't throw an event
-+                this.igniteForSeconds(15.0F, false);
-+            }
-+            // CraftBukkit end
-             World world = this.level();
- 
-             if (world instanceof WorldServer) {
-                 WorldServer worldserver = (WorldServer) world;
- 
--                if (this.hurtServer(worldserver, this.damageSources().lava(), 4.0F) && this.shouldPlayLavaHurtSound() && !this.isSilent()) {
-+                // CraftBukkit start
-+                if (this.hurtServer(worldserver, this.damageSources().lava().directBlock(level, lastLavaContact), 4.0F) && this.shouldPlayLavaHurtSound() && !this.isSilent()) {
-                     worldserver.playSound((EntityHuman) null, this.getX(), this.getY(), this.getZ(), SoundEffects.GENERIC_BURN, this.getSoundSource(), 0.4F, 2.0F + this.random.nextFloat() * 0.4F);
-                 }
-+                // CraftBukkit end - we also don't throw an event unless the object in lava is living, to save on some event calls
-             }
- 
-         }
-@@ -587,6 +756,22 @@
-     }
- 
-     public final void igniteForSeconds(float f) {
-+        // CraftBukkit start
-+        this.igniteForSeconds(f, true);
-+    }
-+
-+    public final void igniteForSeconds(float f, boolean callEvent) {
-+        if (callEvent) {
-+            EntityCombustEvent event = new EntityCombustEvent(this.getBukkitEntity(), f);
-+            this.level.getCraftServer().getPluginManager().callEvent(event);
-+
-+            if (event.isCancelled()) {
-+                return;
-+            }
-+
-+            f = event.getDuration();
-+        }
-+        // CraftBukkit end
-         this.igniteForTicks(MathHelper.floor(f * 20.0F));
-     }
- 
-@@ -610,7 +795,7 @@
-     }
- 
-     protected void onBelowWorld() {
--        this.discard();
-+        this.discard(EntityRemoveEvent.Cause.OUT_OF_WORLD); // CraftBukkit - add Bukkit remove cause
-     }
- 
-     public boolean isFree(double d0, double d1, double d2) {
-@@ -750,6 +935,28 @@
-                     }
-                 }
- 
-+                // CraftBukkit start
-+                if (horizontalCollision && getBukkitEntity() instanceof Vehicle) {
-+                    Vehicle vehicle = (Vehicle) this.getBukkitEntity();
-+                    org.bukkit.block.Block bl = this.level.getWorld().getBlockAt(MathHelper.floor(this.getX()), MathHelper.floor(this.getY()), MathHelper.floor(this.getZ()));
-+
-+                    if (vec3d.x > vec3d1.x) {
-+                        bl = bl.getRelative(BlockFace.EAST);
-+                    } else if (vec3d.x < vec3d1.x) {
-+                        bl = bl.getRelative(BlockFace.WEST);
-+                    } else if (vec3d.z > vec3d1.z) {
-+                        bl = bl.getRelative(BlockFace.SOUTH);
-+                    } else if (vec3d.z < vec3d1.z) {
-+                        bl = bl.getRelative(BlockFace.NORTH);
-+                    }
-+
-+                    if (!bl.getType().isAir()) {
-+                        VehicleBlockCollisionEvent event = new VehicleBlockCollisionEvent(vehicle, bl);
-+                        level.getCraftServer().getPluginManager().callEvent(event);
-+                    }
-+                }
-+                // CraftBukkit end
-+
-                 if (!this.level().isClientSide() || this.isControlledByLocalInstance()) {
-                     Entity.MovementEmission entity_movementemission = this.getMovementEmission();
- 
-@@ -1133,6 +1340,20 @@
-         return SoundEffects.GENERIC_SPLASH;
-     }
- 
-+    // CraftBukkit start - Add delegate methods
-+    public SoundEffect getSwimSound0() {
-+        return getSwimSound();
-+    }
-+
-+    public SoundEffect getSwimSplashSound0() {
-+        return getSwimSplashSound();
-+    }
-+
-+    public SoundEffect getSwimHighSpeedSplashSound0() {
-+        return getSwimHighSpeedSplashSound();
-+    }
-+    // CraftBukkit end
-+
-     public void recordMovementThroughBlocks(Vec3D vec3d, Vec3D vec3d1) {
-         this.movementThisTick.add(new Entity.b(vec3d, vec3d1));
-     }
-@@ -1609,6 +1830,7 @@
-         this.yo = d1;
-         this.zo = d4;
-         this.setPos(d3, d1, d4);
-+        if (valid) level.getChunk((int) Math.floor(this.getX()) >> 4, (int) Math.floor(this.getZ()) >> 4); // CraftBukkit
-     }
- 
-     public void moveTo(Vec3D vec3d) {
-@@ -1861,6 +2083,12 @@
-         return false;
-     }
- 
-+    // CraftBukkit start - collidable API
-+    public boolean canCollideWithBukkit(Entity entity) {
-+        return isPushable();
-+    }
-+    // CraftBukkit end
-+
-     public void awardKillScore(Entity entity, DamageSource damagesource) {
-         if (entity instanceof EntityPlayer) {
-             CriterionTriggers.ENTITY_KILLED_PLAYER.trigger((EntityPlayer) entity, this, damagesource);
-@@ -1889,16 +2117,22 @@
-     }
- 
-     public boolean saveAsPassenger(NBTTagCompound nbttagcompound) {
-+        // CraftBukkit start - allow excluding certain data when saving
-+        return saveAsPassenger(nbttagcompound, true);
-+    }
-+
-+    public boolean saveAsPassenger(NBTTagCompound nbttagcompound, boolean includeAll) {
-+        // CraftBukkit end
-         if (this.removalReason != null && !this.removalReason.shouldSave()) {
-             return false;
-         } else {
-             String s = this.getEncodeId();
- 
--            if (s == null) {
-+            if (!this.persist || s == null) { // CraftBukkit - persist flag
-                 return false;
-             } else {
-                 nbttagcompound.putString("id", s);
--                this.saveWithoutId(nbttagcompound);
-+                this.saveWithoutId(nbttagcompound, includeAll); // CraftBukkit - pass on includeAll
-                 return true;
-             }
-         }
-@@ -1909,16 +2143,38 @@
-     }
- 
-     public NBTTagCompound saveWithoutId(NBTTagCompound nbttagcompound) {
-+        // CraftBukkit start - allow excluding certain data when saving
-+        return saveWithoutId(nbttagcompound, true);
-+    }
-+
-+    public NBTTagCompound saveWithoutId(NBTTagCompound nbttagcompound, boolean includeAll) {
-+        // CraftBukkit end
-         try {
--            if (this.vehicle != null) {
--                nbttagcompound.put("Pos", this.newDoubleList(this.vehicle.getX(), this.getY(), this.vehicle.getZ()));
--            } else {
--                nbttagcompound.put("Pos", this.newDoubleList(this.getX(), this.getY(), this.getZ()));
-+            // CraftBukkit start - selectively save position
-+            if (includeAll) {
-+                if (this.vehicle != null) {
-+                    nbttagcompound.put("Pos", this.newDoubleList(this.vehicle.getX(), this.getY(), this.vehicle.getZ()));
-+                } else {
-+                    nbttagcompound.put("Pos", this.newDoubleList(this.getX(), this.getY(), this.getZ()));
-+                }
-             }
-+            // CraftBukkit end
- 
-             Vec3D vec3d = this.getDeltaMovement();
- 
-             nbttagcompound.put("Motion", this.newDoubleList(vec3d.x, vec3d.y, vec3d.z));
-+
-+            // CraftBukkit start - Checking for NaN pitch/yaw and resetting to zero
-+            // TODO: make sure this is the best way to address this.
-+            if (Float.isNaN(this.yRot)) {
-+                this.yRot = 0;
-+            }
-+
-+            if (Float.isNaN(this.xRot)) {
-+                this.xRot = 0;
-+            }
-+            // CraftBukkit end
-+
-             nbttagcompound.put("Rotation", this.newFloatList(this.getYRot(), this.getXRot()));
-             nbttagcompound.putFloat("FallDistance", this.fallDistance);
-             nbttagcompound.putShort("Fire", (short) this.remainingFireTicks);
-@@ -1926,7 +2182,28 @@
-             nbttagcompound.putBoolean("OnGround", this.onGround());
-             nbttagcompound.putBoolean("Invulnerable", this.invulnerable);
-             nbttagcompound.putInt("PortalCooldown", this.portalCooldown);
--            nbttagcompound.putUUID("UUID", this.getUUID());
-+            // CraftBukkit start - selectively save uuid and world
-+            if (includeAll) {
-+                nbttagcompound.putUUID("UUID", this.getUUID());
-+                // PAIL: Check above UUID reads 1.8 properly, ie: UUIDMost / UUIDLeast
-+                nbttagcompound.putLong("WorldUUIDLeast", ((WorldServer) this.level).getWorld().getUID().getLeastSignificantBits());
-+                nbttagcompound.putLong("WorldUUIDMost", ((WorldServer) this.level).getWorld().getUID().getMostSignificantBits());
-+            }
-+            nbttagcompound.putInt("Bukkit.updateLevel", CURRENT_LEVEL);
-+            if (!this.persist) {
-+                nbttagcompound.putBoolean("Bukkit.persist", this.persist);
-+            }
-+            if (!this.visibleByDefault) {
-+                nbttagcompound.putBoolean("Bukkit.visibleByDefault", this.visibleByDefault);
-+            }
-+            if (this.persistentInvisibility) {
-+                nbttagcompound.putBoolean("Bukkit.invisible", this.persistentInvisibility);
-+            }
-+            // SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
-+            if (maxAirTicks != getDefaultMaxAirSupply()) {
-+                nbttagcompound.putInt("Bukkit.MaxAirSupply", getMaxAirSupply());
-+            }
-+            // CraftBukkit end
-             IChatBaseComponent ichatbasecomponent = this.getCustomName();
- 
-             if (ichatbasecomponent != null) {
-@@ -1975,7 +2252,7 @@
-                 nbttagcompound.put("Tags", nbttaglist);
-             }
- 
--            this.addAdditionalSaveData(nbttagcompound);
-+            this.addAdditionalSaveData(nbttagcompound, includeAll); // CraftBukkit - pass on includeAll
-             if (this.isVehicle()) {
-                 nbttaglist = new NBTTagList();
-                 iterator = this.getPassengers().iterator();
-@@ -1984,7 +2261,7 @@
-                     Entity entity = (Entity) iterator.next();
-                     NBTTagCompound nbttagcompound1 = new NBTTagCompound();
- 
--                    if (entity.saveAsPassenger(nbttagcompound1)) {
-+                    if (entity.saveAsPassenger(nbttagcompound1, includeAll)) { // CraftBukkit - pass on includeAll
-                         nbttaglist.add(nbttagcompound1);
-                     }
-                 }
-@@ -1994,6 +2271,11 @@
-                 }
-             }
- 
-+            // CraftBukkit start - stores eventually existing bukkit values
-+            if (this.bukkitEntity != null) {
-+                this.bukkitEntity.storeBukkitValues(nbttagcompound);
-+            }
-+            // CraftBukkit end
-             return nbttagcompound;
-         } catch (Throwable throwable) {
-             CrashReport crashreport = CrashReport.forThrowable(throwable, "Saving entity NBT");
-@@ -2080,6 +2362,45 @@
-             } else {
-                 throw new IllegalStateException("Entity has invalid position");
-             }
-+
-+            // CraftBukkit start
-+            this.persist = !nbttagcompound.contains("Bukkit.persist") || nbttagcompound.getBoolean("Bukkit.persist");
-+            this.visibleByDefault = !nbttagcompound.contains("Bukkit.visibleByDefault") || nbttagcompound.getBoolean("Bukkit.visibleByDefault");
-+            // SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
-+            if (nbttagcompound.contains("Bukkit.MaxAirSupply")) {
-+                maxAirTicks = nbttagcompound.getInt("Bukkit.MaxAirSupply");
-+            }
-+            // CraftBukkit end
-+
-+            // CraftBukkit start - Reset world
-+            if (this instanceof EntityPlayer) {
-+                Server server = Bukkit.getServer();
-+                org.bukkit.World bworld = null;
-+
-+                // TODO: Remove World related checks, replaced with WorldUID
-+                String worldName = nbttagcompound.getString("world");
-+
-+                if (nbttagcompound.contains("WorldUUIDMost") && nbttagcompound.contains("WorldUUIDLeast")) {
-+                    UUID uid = new UUID(nbttagcompound.getLong("WorldUUIDMost"), nbttagcompound.getLong("WorldUUIDLeast"));
-+                    bworld = server.getWorld(uid);
-+                } else {
-+                    bworld = server.getWorld(worldName);
-+                }
-+
-+                if (bworld == null) {
-+                    bworld = ((org.bukkit.craftbukkit.CraftServer) server).getServer().getLevel(World.OVERWORLD).getWorld();
-+                }
-+
-+                ((EntityPlayer) this).setLevel(bworld == null ? null : ((CraftWorld) bworld).getHandle());
-+            }
-+            this.getBukkitEntity().readBukkitValues(nbttagcompound);
-+            if (nbttagcompound.contains("Bukkit.invisible")) {
-+                boolean bukkitInvisible = nbttagcompound.getBoolean("Bukkit.invisible");
-+                this.setInvisible(bukkitInvisible);
-+                this.persistentInvisibility = bukkitInvisible;
-+            }
-+            // CraftBukkit end
-+
-         } catch (Throwable throwable) {
-             CrashReport crashreport = CrashReport.forThrowable(throwable, "Loading entity NBT");
-             CrashReportSystemDetails crashreportsystemdetails = crashreport.addCategory("Entity being loaded");
-@@ -2101,6 +2422,12 @@
-         return entitytypes.canSerialize() && minecraftkey != null ? minecraftkey.toString() : null;
-     }
- 
-+    // CraftBukkit start - allow excluding certain data when saving
-+    protected void addAdditionalSaveData(NBTTagCompound nbttagcompound, boolean includeAll) {
-+        addAdditionalSaveData(nbttagcompound);
-+    }
-+    // CraftBukkit end
-+
-     protected abstract void readAdditionalSaveData(NBTTagCompound nbttagcompound);
- 
-     protected abstract void addAdditionalSaveData(NBTTagCompound nbttagcompound);
-@@ -2153,9 +2480,22 @@
-         if (itemstack.isEmpty()) {
-             return null;
-         } else {
-+            // CraftBukkit start - Capture drops for death event
-+            if (this instanceof EntityLiving && !((EntityLiving) this).forceDrops) {
-+                ((EntityLiving) this).drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack));
-+                return null;
-+            }
-+            // CraftBukkit end
-             EntityItem entityitem = new EntityItem(worldserver, this.getX(), this.getY() + (double) f, this.getZ(), itemstack);
- 
-             entityitem.setDefaultPickUpDelay();
-+            // CraftBukkit start
-+            EntityDropItemEvent event = new EntityDropItemEvent(this.getBukkitEntity(), (org.bukkit.entity.Item) entityitem.getBukkitEntity());
-+            Bukkit.getPluginManager().callEvent(event);
-+            if (event.isCancelled()) {
-+                return null;
-+            }
-+            // CraftBukkit end
-             worldserver.addFreshEntity(entityitem);
-             return entityitem;
-         }
-@@ -2184,6 +2524,12 @@
-         if (this.isAlive() && this instanceof Leashable leashable) {
-             if (leashable.getLeashHolder() == entityhuman) {
-                 if (!this.level().isClientSide()) {
-+                    // CraftBukkit start - fire PlayerUnleashEntityEvent
-+                    if (CraftEventFactory.callPlayerUnleashEntityEvent(this, entityhuman, enumhand).isCancelled()) {
-+                        ((EntityPlayer) entityhuman).connection.send(new PacketPlayOutAttachEntity(this, leashable.getLeashHolder()));
-+                        return EnumInteractionResult.PASS;
-+                    }
-+                    // CraftBukkit end
-                     if (entityhuman.hasInfiniteMaterials()) {
-                         leashable.removeLeash();
-                     } else {
-@@ -2200,6 +2546,13 @@
- 
-             if (itemstack.is(Items.LEAD) && leashable.canHaveALeashAttachedToIt()) {
-                 if (!this.level().isClientSide()) {
-+                    // CraftBukkit start - fire PlayerLeashEntityEvent
-+                    if (CraftEventFactory.callPlayerLeashEntityEvent(this, entityhuman, entityhuman, enumhand).isCancelled()) {
-+                        ((EntityPlayer) entityhuman).resendItemInHands(); // SPIGOT-7615: Resend to fix client desync with used item
-+                        ((EntityPlayer) entityhuman).connection.send(new PacketPlayOutAttachEntity(this, leashable.getLeashHolder()));
-+                        return EnumInteractionResult.PASS;
-+                    }
-+                    // CraftBukkit end
-                     leashable.setLeashedTo(entityhuman, true);
-                 }
- 
-@@ -2273,7 +2626,7 @@
-             return false;
-         } else if (!entity.couldAcceptPassenger()) {
-             return false;
--        } else if (!this.level().isClientSide() && !entity.type.canSerialize()) {
-+        } else if (!flag && !this.level().isClientSide() && !entity.type.canSerialize()) { // SPIGOT-7947: Allow force riding all entities
-             return false;
-         } else {
-             for (Entity entity1 = entity; entity1.vehicle != null; entity1 = entity1.vehicle) {
-@@ -2285,6 +2638,27 @@
-             if (!flag && (!this.canRide(entity) || !entity.canAddPassenger(this))) {
-                 return false;
-             } else {
-+                // CraftBukkit start
-+                if (entity.getBukkitEntity() instanceof Vehicle && this.getBukkitEntity() instanceof LivingEntity) {
-+                    VehicleEnterEvent event = new VehicleEnterEvent((Vehicle) entity.getBukkitEntity(), this.getBukkitEntity());
-+                    // Suppress during worldgen
-+                    if (this.valid) {
-+                        Bukkit.getPluginManager().callEvent(event);
-+                    }
-+                    if (event.isCancelled()) {
-+                        return false;
-+                    }
-+                }
-+
-+                EntityMountEvent event = new EntityMountEvent(this.getBukkitEntity(), entity.getBukkitEntity());
-+                // Suppress during worldgen
-+                if (this.valid) {
-+                    Bukkit.getPluginManager().callEvent(event);
-+                }
-+                if (event.isCancelled()) {
-+                    return false;
-+                }
-+                // CraftBukkit end
-                 if (this.isPassenger()) {
-                     this.stopRiding();
-                 }
-@@ -2318,7 +2692,7 @@
-             Entity entity = this.vehicle;
- 
-             this.vehicle = null;
--            entity.removePassenger(this);
-+            if (!entity.removePassenger(this)) this.vehicle = entity; // CraftBukkit
-         }
- 
-     }
-@@ -2349,10 +2723,38 @@
-         }
-     }
- 
--    protected void removePassenger(Entity entity) {
-+    protected boolean removePassenger(Entity entity) { // CraftBukkit
-         if (entity.getVehicle() == this) {
-             throw new IllegalStateException("Use x.stopRiding(y), not y.removePassenger(x)");
-         } else {
-+            // CraftBukkit start
-+            CraftEntity craft = (CraftEntity) entity.getBukkitEntity().getVehicle();
-+            Entity orig = craft == null ? null : craft.getHandle();
-+            if (getBukkitEntity() instanceof Vehicle && entity.getBukkitEntity() instanceof LivingEntity) {
-+                VehicleExitEvent event = new VehicleExitEvent(
-+                        (Vehicle) getBukkitEntity(),
-+                        (LivingEntity) entity.getBukkitEntity()
-+                );
-+                // Suppress during worldgen
-+                if (this.valid) {
-+                    Bukkit.getPluginManager().callEvent(event);
-+                }
-+                CraftEntity craftn = (CraftEntity) entity.getBukkitEntity().getVehicle();
-+                Entity n = craftn == null ? null : craftn.getHandle();
-+                if (event.isCancelled() || n != orig) {
-+                    return false;
-+                }
-+            }
-+
-+            EntityDismountEvent event = new EntityDismountEvent(entity.getBukkitEntity(), this.getBukkitEntity());
-+            // Suppress during worldgen
-+            if (this.valid) {
-+                Bukkit.getPluginManager().callEvent(event);
-+            }
-+            if (event.isCancelled()) {
-+                return false;
-+            }
-+            // CraftBukkit end
-             if (this.passengers.size() == 1 && this.passengers.get(0) == entity) {
-                 this.passengers = ImmutableList.of();
-             } else {
-@@ -2364,6 +2766,7 @@
-             entity.boardingCooldown = 60;
-             this.gameEvent(GameEvent.ENTITY_DISMOUNT, entity);
-         }
-+        return true; // CraftBukkit
-     }
- 
-     protected boolean canAddPassenger(Entity entity) {
-@@ -2464,7 +2867,7 @@
-                     if (teleporttransition != null) {
-                         WorldServer worldserver1 = teleporttransition.newLevel();
- 
--                        if (worldserver.getServer().isLevelEnabled(worldserver1) && (worldserver1.dimension() == worldserver.dimension() || this.canTeleport(worldserver, worldserver1))) {
-+                        if (this instanceof EntityPlayer || (worldserver1 != null && (worldserver1.dimension() == worldserver.dimension() || this.canTeleport(worldserver, worldserver1)))) { // CraftBukkit - always call event for players
-                             this.teleport(teleporttransition);
-                         }
-                     }
-@@ -2571,6 +2974,13 @@
-     }
- 
-     public void setSwimming(boolean flag) {
-+        // CraftBukkit start
-+        if (valid && this.isSwimming() != flag && this instanceof EntityLiving) {
-+            if (CraftEventFactory.callToggleSwimEvent((EntityLiving) this, flag).isCancelled()) {
-+                return;
-+            }
-+        }
-+        // CraftBukkit end
-         this.setSharedFlag(4, flag);
-     }
- 
-@@ -2624,8 +3034,12 @@
-         return this.getTeam() != null ? this.getTeam().isAlliedTo(scoreboardteambase) : false;
-     }
- 
-+    // CraftBukkit - start
-     public void setInvisible(boolean flag) {
--        this.setSharedFlag(5, flag);
-+        if (!this.persistentInvisibility) { // Prevent Minecraft from removing our invisibility flag
-+            this.setSharedFlag(5, flag);
-+        }
-+        // CraftBukkit - end
-     }
- 
-     public boolean getSharedFlag(int i) {
-@@ -2644,7 +3058,7 @@
-     }
- 
-     public int getMaxAirSupply() {
--        return 300;
-+        return maxAirTicks; // CraftBukkit - SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
-     }
- 
-     public int getAirSupply() {
-@@ -2652,7 +3066,18 @@
-     }
- 
-     public void setAirSupply(int i) {
--        this.entityData.set(Entity.DATA_AIR_SUPPLY_ID, i);
-+        // CraftBukkit start
-+        EntityAirChangeEvent event = new EntityAirChangeEvent(this.getBukkitEntity(), i);
-+        // Suppress during worldgen
-+        if (this.valid) {
-+            event.getEntity().getServer().getPluginManager().callEvent(event);
-+        }
-+        if (event.isCancelled() && this.getAirSupply() != i) {
-+            this.entityData.markDirty(Entity.DATA_AIR_SUPPLY_ID);
-+            return;
-+        }
-+        this.entityData.set(Entity.DATA_AIR_SUPPLY_ID, event.getAmount());
-+        // CraftBukkit end
-     }
- 
-     public int getTicksFrozen() {
-@@ -2679,11 +3104,40 @@
- 
-     public void thunderHit(WorldServer worldserver, EntityLightning entitylightning) {
-         this.setRemainingFireTicks(this.remainingFireTicks + 1);
-+        // CraftBukkit start
-+        final org.bukkit.entity.Entity thisBukkitEntity = this.getBukkitEntity();
-+        final org.bukkit.entity.Entity stormBukkitEntity = entitylightning.getBukkitEntity();
-+        final PluginManager pluginManager = Bukkit.getPluginManager();
-+        // CraftBukkit end
-+
-         if (this.remainingFireTicks == 0) {
--            this.igniteForSeconds(8.0F);
-+            // CraftBukkit start - Call a combust event when lightning strikes
-+            EntityCombustByEntityEvent entityCombustEvent = new EntityCombustByEntityEvent(stormBukkitEntity, thisBukkitEntity, 8.0F);
-+            pluginManager.callEvent(entityCombustEvent);
-+            if (!entityCombustEvent.isCancelled()) {
-+                this.igniteForSeconds(entityCombustEvent.getDuration(), false);
-+            }
-+            // CraftBukkit end
-         }
- 
--        this.hurtServer(worldserver, this.damageSources().lightningBolt(), 5.0F);
-+        // CraftBukkit start
-+        if (thisBukkitEntity instanceof Hanging) {
-+            HangingBreakByEntityEvent hangingEvent = new HangingBreakByEntityEvent((Hanging) thisBukkitEntity, stormBukkitEntity);
-+            pluginManager.callEvent(hangingEvent);
-+
-+            if (hangingEvent.isCancelled()) {
-+                return;
-+            }
-+        }
-+
-+        if (this.fireImmune()) {
-+            return;
-+        }
-+
-+        if (!this.hurtServer(worldserver, this.damageSources().lightningBolt().customEntityDamager(entitylightning), 5.0F)) {
-+            return;
-+        }
-+        // CraftBukkit end
-     }
- 
-     public void onAboveBubbleCol(boolean flag) {
-@@ -2852,6 +3306,18 @@
- 
-         if (world instanceof WorldServer worldserver) {
-             if (!this.isRemoved()) {
-+                // CraftBukkit start
-+                PositionMoveRotation absolutePosition = PositionMoveRotation.calculateAbsolute(PositionMoveRotation.of(this), PositionMoveRotation.of(teleporttransition), teleporttransition.relatives());
-+                Location to = CraftLocation.toBukkit(absolutePosition.position(), teleporttransition.newLevel().getWorld(), absolutePosition.yRot(), absolutePosition.xRot());
-+                EntityTeleportEvent teleEvent = CraftEventFactory.callEntityTeleportEvent(this, to);
-+                if (teleEvent.isCancelled()) {
-+                    return null;
-+                }
-+                if (!to.equals(teleEvent.getTo())) {
-+                    to = teleEvent.getTo();
-+                    teleporttransition = new TeleportTransition(((CraftWorld) to.getWorld()).getHandle(), CraftLocation.toVec3D(to), Vec3D.ZERO, to.getYaw(), to.getPitch(), teleporttransition.missingRespawnBlock(), teleporttransition.asPassenger(), Set.of(), teleporttransition.postTeleportTransition(), teleporttransition.cause());
-+                }
-+                // CraftBukkit end
-                 WorldServer worldserver1 = teleporttransition.newLevel();
-                 boolean flag = worldserver1.dimension() != worldserver.dimension();
- 
-@@ -2920,8 +3386,12 @@
-         } else {
-             entity.restoreFrom(this);
-             this.removeAfterChangingDimensions();
-+            // CraftBukkit start - Forward the CraftEntity to the new entity
-+            this.getBukkitEntity().setHandle(entity);
-+            entity.bukkitEntity = this.getBukkitEntity();
-+            // CraftBukkit end
-             entity.teleportSetPosition(PositionMoveRotation.of(teleporttransition), teleporttransition.relatives());
--            worldserver.addDuringTeleport(entity);
-+            if (this.inWorld) worldserver.addDuringTeleport(entity); // CraftBukkit - Don't spawn the new entity if the current entity isn't spawned
-             Iterator iterator1 = list1.iterator();
- 
-             while (iterator1.hasNext()) {
-@@ -2995,8 +3465,9 @@
-     }
- 
-     protected void removeAfterChangingDimensions() {
--        this.setRemoved(Entity.RemovalReason.CHANGED_DIMENSION);
-+        this.setRemoved(Entity.RemovalReason.CHANGED_DIMENSION, null); // CraftBukkit - add Bukkit remove cause
-         if (this instanceof Leashable leashable) {
-+            this.level().getCraftServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.UNKNOWN)); // CraftBukkit
-             leashable.removeLeash();
-         }
- 
-@@ -3006,6 +3477,20 @@
-         return BlockPortalShape.getRelativePosition(blockutil_rectangle, enumdirection_enumaxis, this.position(), this.getDimensions(this.getPose()));
-     }
- 
-+    // CraftBukkit start
-+    public CraftPortalEvent callPortalEvent(Entity entity, Location exit, PlayerTeleportEvent.TeleportCause cause, int searchRadius, int creationRadius) {
-+        org.bukkit.entity.Entity bukkitEntity = entity.getBukkitEntity();
-+        Location enter = bukkitEntity.getLocation();
-+
-+        EntityPortalEvent event = new EntityPortalEvent(bukkitEntity, enter, exit, searchRadius, true, creationRadius);
-+        event.getEntity().getServer().getPluginManager().callEvent(event);
-+        if (event.isCancelled() || event.getTo() == null || event.getTo().getWorld() == null || !entity.isAlive()) {
-+            return null;
-+        }
-+        return new CraftPortalEvent(event);
-+    }
-+    // CraftBukkit end
-+
-     public boolean canUsePortal(boolean flag) {
-         return (flag || !this.isPassenger()) && this.isAlive();
-     }
-@@ -3134,9 +3619,15 @@
-         return (Boolean) this.entityData.get(Entity.DATA_CUSTOM_NAME_VISIBLE);
-     }
- 
--    public boolean teleportTo(WorldServer worldserver, double d0, double d1, double d2, Set<Relative> set, float f, float f1, boolean flag) {
-+    // CraftBukkit start
-+    public final boolean teleportTo(WorldServer worldserver, double d0, double d1, double d2, Set<Relative> set, float f, float f1, boolean flag) {
-+        return teleportTo(worldserver, d0, d1, d2, set, f, f1, flag, PlayerTeleportEvent.TeleportCause.UNKNOWN);
-+    }
-+
-+    public boolean teleportTo(WorldServer worldserver, double d0, double d1, double d2, Set<Relative> set, float f, float f1, boolean flag, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause) {
-         float f2 = MathHelper.clamp(f1, -90.0F, 90.0F);
--        Entity entity = this.teleport(new TeleportTransition(worldserver, new Vec3D(d0, d1, d2), Vec3D.ZERO, f, f2, set, TeleportTransition.DO_NOTHING));
-+        Entity entity = this.teleport(new TeleportTransition(worldserver, new Vec3D(d0, d1, d2), Vec3D.ZERO, f, f2, set, TeleportTransition.DO_NOTHING, cause));
-+        // CraftBukkit end
- 
-         return entity != null;
-     }
-@@ -3258,7 +3749,26 @@
-     }
- 
-     public final void setBoundingBox(AxisAlignedBB axisalignedbb) {
--        this.bb = axisalignedbb;
-+        // CraftBukkit start - block invalid bounding boxes
-+        double minX = axisalignedbb.minX,
-+                minY = axisalignedbb.minY,
-+                minZ = axisalignedbb.minZ,
-+                maxX = axisalignedbb.maxX,
-+                maxY = axisalignedbb.maxY,
-+                maxZ = axisalignedbb.maxZ;
-+        double len = axisalignedbb.maxX - axisalignedbb.minX;
-+        if (len < 0) maxX = minX;
-+        if (len > 64) maxX = minX + 64.0;
-+
-+        len = axisalignedbb.maxY - axisalignedbb.minY;
-+        if (len < 0) maxY = minY;
-+        if (len > 64) maxY = minY + 64.0;
-+
-+        len = axisalignedbb.maxZ - axisalignedbb.minZ;
-+        if (len < 0) maxZ = minZ;
-+        if (len > 64) maxZ = minZ + 64.0;
-+        this.bb = new AxisAlignedBB(minX, minY, minZ, maxX, maxY, maxZ);
-+        // CraftBukkit end
-     }
- 
-     public final float getEyeHeight(EntityPose entitypose) {
-@@ -3489,8 +3999,37 @@
-         return 1;
-     }
- 
-+    // CraftBukkit start
-+    private final ICommandListener commandSource = new ICommandListener() {
-+
-+        @Override
-+        public void sendSystemMessage(IChatBaseComponent ichatbasecomponent) {
-+        }
-+
-+        @Override
-+        public CommandSender getBukkitSender(CommandListenerWrapper wrapper) {
-+            return Entity.this.getBukkitEntity();
-+        }
-+
-+        @Override
-+        public boolean acceptsSuccess() {
-+            return ((WorldServer) Entity.this.level()).getGameRules().getBoolean(GameRules.RULE_SENDCOMMANDFEEDBACK);
-+        }
-+
-+        @Override
-+        public boolean acceptsFailure() {
-+            return true;
-+        }
-+
-+        @Override
-+        public boolean shouldInformAdmins() {
-+            return true;
-+        }
-+    };
-+    // CraftBukkit end
-+
-     public CommandListenerWrapper createCommandSourceStackForNameResolution(WorldServer worldserver) {
--        return new CommandListenerWrapper(ICommandListener.NULL, this.position(), this.getRotationVector(), worldserver, 0, this.getName().getString(), this.getDisplayName(), worldserver.getServer(), this);
-+        return new CommandListenerWrapper(commandSource, this.position(), this.getRotationVector(), worldserver, 0, this.getName().getString(), this.getDisplayName(), worldserver.getServer(), this); // CraftBukkit
-     }
- 
-     public void lookAt(ArgumentAnchor.Anchor argumentanchor_anchor, Vec3D vec3d) {
-@@ -3551,6 +4090,11 @@
-                                     vec3d = vec3d.add(vec3d1);
-                                     ++k1;
-                                 }
-+                                // CraftBukkit start - store last lava contact location
-+                                if (tagkey == TagsFluid.LAVA) {
-+                                    this.lastLavaContact = blockposition_mutableblockposition.immutable();
-+                                }
-+                                // CraftBukkit end
-                             }
-                         }
-                     }
-@@ -3818,6 +4362,14 @@
- 
-     @Override
-     public final void setRemoved(Entity.RemovalReason entity_removalreason) {
-+        // CraftBukkit start - add Bukkit remove cause
-+        setRemoved(entity_removalreason, null);
-+    }
-+
-+    @Override
-+    public final void setRemoved(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) {
-+        CraftEventFactory.callEntityRemoveEvent(this, cause);
-+        // CraftBukkit end
-         if (this.removalReason == null) {
-             this.removalReason = entity_removalreason;
-         }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/EntityAgeable.patch b/paper-server/patches/sources/net/minecraft/world/entity/EntityAgeable.patch
deleted file mode 100644
index 77d10c6a16..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/EntityAgeable.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- a/net/minecraft/world/entity/EntityAgeable.java
-+++ b/net/minecraft/world/entity/EntityAgeable.java
-@@ -21,6 +21,7 @@
-     protected int age;
-     protected int forcedAge;
-     protected int forcedAgeTimer;
-+    public boolean ageLocked; // CraftBukkit
- 
-     protected EntityAgeable(EntityTypes<? extends EntityAgeable> entitytypes, World world) {
-         super(entitytypes, world);
-@@ -104,6 +105,7 @@
-         super.addAdditionalSaveData(nbttagcompound);
-         nbttagcompound.putInt("Age", this.getAge());
-         nbttagcompound.putInt("ForcedAge", this.forcedAge);
-+        nbttagcompound.putBoolean("AgeLocked", this.ageLocked); // CraftBukkit
-     }
- 
-     @Override
-@@ -111,6 +113,7 @@
-         super.readAdditionalSaveData(nbttagcompound);
-         this.setAge(nbttagcompound.getInt("Age"));
-         this.forcedAge = nbttagcompound.getInt("ForcedAge");
-+        this.ageLocked = nbttagcompound.getBoolean("AgeLocked"); // CraftBukkit
-     }
- 
-     @Override
-@@ -125,7 +128,7 @@
-     @Override
-     public void aiStep() {
-         super.aiStep();
--        if (this.level().isClientSide) {
-+        if (this.level().isClientSide || ageLocked) { // CraftBukkit
-             if (this.forcedAgeTimer > 0) {
-                 if (this.forcedAgeTimer % 4 == 0) {
-                     this.level().addParticle(Particles.HAPPY_VILLAGER, this.getRandomX(1.0D), this.getRandomY() + 0.5D, this.getRandomZ(1.0D), 0.0D, 0.0D, 0.0D);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/EntityCreature.patch b/paper-server/patches/sources/net/minecraft/world/entity/EntityCreature.patch
deleted file mode 100644
index 9834a2c814..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/EntityCreature.patch
+++ /dev/null
@@ -1,13 +0,0 @@
---- a/net/minecraft/world/entity/EntityCreature.java
-+++ b/net/minecraft/world/entity/EntityCreature.java
-@@ -11,6 +11,10 @@
- import net.minecraft.world.level.World;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.EntityUnleashEvent;
-+// CraftBukkit end
-+
- public abstract class EntityCreature extends EntityInsentient {
- 
-     protected static final float DEFAULT_WALK_TARGET_VALUE = 0.0F;
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/EntityExperienceOrb.patch b/paper-server/patches/sources/net/minecraft/world/entity/EntityExperienceOrb.patch
deleted file mode 100644
index c41a98ad22..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/EntityExperienceOrb.patch
+++ /dev/null
@@ -1,143 +0,0 @@
---- a/net/minecraft/world/entity/EntityExperienceOrb.java
-+++ b/net/minecraft/world/entity/EntityExperienceOrb.java
-@@ -25,6 +25,14 @@
- import net.minecraft.world.phys.AxisAlignedBB;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+import org.bukkit.event.entity.EntityTargetLivingEntityEvent;
-+import org.bukkit.event.entity.EntityTargetEvent;
-+import org.bukkit.event.player.PlayerExpCooldownChangeEvent;
-+// CraftBukkit end
-+
- public class EntityExperienceOrb extends Entity {
- 
-     private static final int LIFETIME = 6000;
-@@ -68,6 +76,7 @@
-     @Override
-     public void tick() {
-         super.tick();
-+        EntityHuman prevTarget = this.followingPlayer;// CraftBukkit - store old target
-         this.xo = this.getX();
-         this.yo = this.getY();
-         this.zo = this.getZ();
-@@ -93,7 +102,22 @@
-             this.followingPlayer = null;
-         }
- 
--        if (this.followingPlayer != null) {
-+        // CraftBukkit start
-+        boolean cancelled = false;
-+        if (this.followingPlayer != prevTarget) {
-+            EntityTargetLivingEntityEvent event = CraftEventFactory.callEntityTargetLivingEvent(this, followingPlayer, (followingPlayer != null) ? EntityTargetEvent.TargetReason.CLOSEST_PLAYER : EntityTargetEvent.TargetReason.FORGOT_TARGET);
-+            EntityLiving target = (event.getTarget() == null) ? null : ((org.bukkit.craftbukkit.entity.CraftLivingEntity) event.getTarget()).getHandle();
-+            cancelled = event.isCancelled();
-+
-+            if (cancelled) {
-+                followingPlayer = prevTarget;
-+            } else {
-+                followingPlayer = (target instanceof EntityHuman) ? (EntityHuman) target : null;
-+            }
-+        }
-+
-+        if (this.followingPlayer != null && !cancelled) {
-+            // CraftBukkit end
-             Vec3D vec3d = new Vec3D(this.followingPlayer.getX() - this.getX(), this.followingPlayer.getY() + (double) this.followingPlayer.getEyeHeight() / 2.0D - this.getY(), this.followingPlayer.getZ() - this.getZ());
-             double d0 = vec3d.lengthSqr();
- 
-@@ -121,7 +145,7 @@
- 
-         ++this.age;
-         if (this.age >= 6000) {
--            this.discard();
-+            this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
-         }
- 
-     }
-@@ -190,7 +214,7 @@
-     private void merge(EntityExperienceOrb entityexperienceorb) {
-         this.count += entityexperienceorb.count;
-         this.age = Math.min(this.age, entityexperienceorb.age);
--        entityexperienceorb.discard();
-+        entityexperienceorb.discard(EntityRemoveEvent.Cause.MERGE); // CraftBukkit - add Bukkit remove cause
-     }
- 
-     private void setUnderwaterMovement() {
-@@ -215,7 +239,7 @@
-             this.markHurt();
-             this.health = (int) ((float) this.health - f);
-             if (this.health <= 0) {
--                this.discard();
-+                this.discard(EntityRemoveEvent.Cause.DEATH); // CraftBukkit - add Bukkit remove cause
-             }
- 
-             return true;
-@@ -242,17 +266,17 @@
-     public void playerTouch(EntityHuman entityhuman) {
-         if (entityhuman instanceof EntityPlayer entityplayer) {
-             if (entityhuman.takeXpDelay == 0) {
--                entityhuman.takeXpDelay = 2;
-+                entityhuman.takeXpDelay = CraftEventFactory.callPlayerXpCooldownEvent(entityhuman, 2, PlayerExpCooldownChangeEvent.ChangeReason.PICKUP_ORB).getNewCooldown(); // CraftBukkit - entityhuman.takeXpDelay = 2;
-                 entityhuman.take(this, 1);
-                 int i = this.repairPlayerItems(entityplayer, this.value);
- 
-                 if (i > 0) {
--                    entityhuman.giveExperiencePoints(i);
-+                    entityhuman.giveExperiencePoints(CraftEventFactory.callPlayerExpChangeEvent(entityhuman, i).getAmount()); // CraftBukkit - this.value -> event.getAmount()
-                 }
- 
-                 --this.count;
-                 if (this.count == 0) {
--                    this.discard();
-+                    this.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
-                 }
-             }
- 
-@@ -266,12 +290,20 @@
-             ItemStack itemstack = ((EnchantedItemInUse) optional.get()).itemStack();
-             int j = EnchantmentManager.modifyDurabilityToRepairFromXp(entityplayer.serverLevel(), itemstack, i);
-             int k = Math.min(j, itemstack.getDamageValue());
-+            // CraftBukkit start
-+            org.bukkit.event.player.PlayerItemMendEvent event = CraftEventFactory.callPlayerItemMendEvent(entityplayer, this, itemstack, optional.get().inSlot(), k);
-+            k = event.getRepairAmount();
-+            if (event.isCancelled()) {
-+                return i;
-+            }
-+            // CraftBukkit end
- 
-             itemstack.setDamageValue(itemstack.getDamageValue() - k);
-             if (k > 0) {
-                 int l = i - k * i / j;
- 
-                 if (l > 0) {
-+                    this.value = l; // CraftBukkit - update exp value of orb for PlayerItemMendEvent calls
-                     return this.repairPlayerItems(entityplayer, l);
-                 }
-             }
-@@ -291,6 +323,24 @@
-     }
- 
-     public static int getExperienceValue(int i) {
-+        // CraftBukkit start
-+        if (i > 162670129) return i - 100000;
-+        if (i > 81335063) return 81335063;
-+        if (i > 40667527) return 40667527;
-+        if (i > 20333759) return 20333759;
-+        if (i > 10166857) return 10166857;
-+        if (i > 5083423) return 5083423;
-+        if (i > 2541701) return 2541701;
-+        if (i > 1270849) return 1270849;
-+        if (i > 635413) return 635413;
-+        if (i > 317701) return 317701;
-+        if (i > 158849) return 158849;
-+        if (i > 79423) return 79423;
-+        if (i > 39709) return 39709;
-+        if (i > 19853) return 19853;
-+        if (i > 9923) return 9923;
-+        if (i > 4957) return 4957;
-+        // CraftBukkit end
-         return i >= 2477 ? 2477 : (i >= 1237 ? 1237 : (i >= 617 ? 617 : (i >= 307 ? 307 : (i >= 149 ? 149 : (i >= 73 ? 73 : (i >= 37 ? 37 : (i >= 17 ? 17 : (i >= 7 ? 7 : (i >= 3 ? 3 : 1)))))))));
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/EntityInsentient.patch b/paper-server/patches/sources/net/minecraft/world/entity/EntityInsentient.patch
deleted file mode 100644
index 08c814221f..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/EntityInsentient.patch
+++ /dev/null
@@ -1,314 +0,0 @@
---- a/net/minecraft/world/entity/EntityInsentient.java
-+++ b/net/minecraft/world/entity/EntityInsentient.java
-@@ -85,6 +85,18 @@
- import net.minecraft.world.level.storage.loot.parameters.LootContextParameters;
- import net.minecraft.world.phys.AxisAlignedBB;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.craftbukkit.entity.CraftLivingEntity;
-+import org.bukkit.event.entity.CreatureSpawnEvent;
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+import org.bukkit.event.entity.EntityTargetLivingEntityEvent;
-+import org.bukkit.event.entity.EntityTargetEvent;
-+import org.bukkit.event.entity.EntityTransformEvent;
-+import org.bukkit.event.entity.EntityUnleashEvent;
-+import org.bukkit.event.entity.EntityUnleashEvent.UnleashReason;
-+// CraftBukkit end
-+
- public abstract class EntityInsentient extends EntityLiving implements EquipmentUser, Leashable, Targeting {
- 
-     private static final DataWatcherObject<Byte> DATA_MOB_FLAGS_ID = DataWatcher.defineId(EntityInsentient.class, DataWatcherRegistry.BYTE);
-@@ -132,6 +144,8 @@
-     private BlockPosition restrictCenter;
-     private float restrictRadius;
- 
-+    public boolean aware = true; // CraftBukkit
-+
-     protected EntityInsentient(EntityTypes<? extends EntityInsentient> entitytypes, World world) {
-         super(entitytypes, world);
-         this.handItems = NonNullList.withSize(2, ItemStack.EMPTY);
-@@ -160,6 +174,12 @@
- 
-     }
- 
-+    // CraftBukkit start
-+    public void setPersistenceRequired(boolean persistenceRequired) {
-+        this.persistenceRequired = persistenceRequired;
-+    }
-+    // CraftBukkit end
-+
-     protected void registerGoals() {}
- 
-     public static AttributeProvider.Builder createMobAttributes() {
-@@ -264,11 +284,42 @@
- 
-     @Nullable
-     protected final EntityLiving getTargetFromBrain() {
--        return (EntityLiving) this.getBrain().getMemory(MemoryModuleType.ATTACK_TARGET).orElse((Object) null);
-+        return (EntityLiving) this.getBrain().getMemory(MemoryModuleType.ATTACK_TARGET).orElse(null); // CraftBukkit - decompile error
-     }
- 
-     public void setTarget(@Nullable EntityLiving entityliving) {
-+        // CraftBukkit start - fire event
-+        setTarget(entityliving, EntityTargetEvent.TargetReason.UNKNOWN, true);
-+    }
-+
-+    public boolean setTarget(EntityLiving entityliving, EntityTargetEvent.TargetReason reason, boolean fireEvent) {
-+        if (getTarget() == entityliving) return false;
-+        if (fireEvent) {
-+            if (reason == EntityTargetEvent.TargetReason.UNKNOWN && getTarget() != null && entityliving == null) {
-+                reason = getTarget().isAlive() ? EntityTargetEvent.TargetReason.FORGOT_TARGET : EntityTargetEvent.TargetReason.TARGET_DIED;
-+            }
-+            if (reason == EntityTargetEvent.TargetReason.UNKNOWN) {
-+                this.level().getCraftServer().getLogger().log(java.util.logging.Level.WARNING, "Unknown target reason, please report on the issue tracker", new Exception());
-+            }
-+            CraftLivingEntity ctarget = null;
-+            if (entityliving != null) {
-+                ctarget = (CraftLivingEntity) entityliving.getBukkitEntity();
-+            }
-+            EntityTargetLivingEntityEvent event = new EntityTargetLivingEntityEvent(this.getBukkitEntity(), ctarget, reason);
-+            this.level().getCraftServer().getPluginManager().callEvent(event);
-+            if (event.isCancelled()) {
-+                return false;
-+            }
-+
-+            if (event.getTarget() != null) {
-+                entityliving = ((CraftLivingEntity) event.getTarget()).getHandle();
-+            } else {
-+                entityliving = null;
-+            }
-+        }
-         this.target = entityliving;
-+        return true;
-+        // CraftBukkit end
-     }
- 
-     @Override
-@@ -399,6 +450,12 @@
-         return null;
-     }
- 
-+    // CraftBukkit start - Add delegate method
-+    public SoundEffect getAmbientSound0() {
-+        return getAmbientSound();
-+    }
-+    // CraftBukkit end
-+
-     @Override
-     public void addAdditionalSaveData(NBTTagCompound nbttagcompound) {
-         super.addAdditionalSaveData(nbttagcompound);
-@@ -473,13 +530,25 @@
-             nbttagcompound.putBoolean("NoAI", this.isNoAi());
-         }
- 
-+        nbttagcompound.putBoolean("Bukkit.Aware", this.aware); // CraftBukkit
-     }
- 
-     @Override
-     public void readAdditionalSaveData(NBTTagCompound nbttagcompound) {
-         super.readAdditionalSaveData(nbttagcompound);
--        this.setCanPickUpLoot(nbttagcompound.getBoolean("CanPickUpLoot"));
--        this.persistenceRequired = nbttagcompound.getBoolean("PersistenceRequired");
-+        // CraftBukkit start - If looting or persistence is false only use it if it was set after we started using it
-+        if (nbttagcompound.contains("CanPickUpLoot", 99)) {
-+            boolean data = nbttagcompound.getBoolean("CanPickUpLoot");
-+            if (isLevelAtLeast(nbttagcompound, 1) || data) {
-+                this.setCanPickUpLoot(data);
-+            }
-+        }
-+
-+        boolean data = nbttagcompound.getBoolean("PersistenceRequired");
-+        if (isLevelAtLeast(nbttagcompound, 1) || data) {
-+            this.persistenceRequired = data;
-+        }
-+        // CraftBukkit end
-         NBTTagList nbttaglist;
-         NBTTagCompound nbttagcompound1;
-         int i;
-@@ -547,6 +616,11 @@
- 
-         this.lootTableSeed = nbttagcompound.getLong("DeathLootTableSeed");
-         this.setNoAi(nbttagcompound.getBoolean("NoAI"));
-+        // CraftBukkit start
-+        if (nbttagcompound.contains("Bukkit.Aware")) {
-+            this.aware = nbttagcompound.getBoolean("Bukkit.Aware");
-+        }
-+        // CraftBukkit end
-     }
- 
-     @Override
-@@ -623,20 +697,26 @@
- 
-     protected void pickUpItem(WorldServer worldserver, EntityItem entityitem) {
-         ItemStack itemstack = entityitem.getItem();
--        ItemStack itemstack1 = this.equipItemIfPossible(worldserver, itemstack.copy());
-+        ItemStack itemstack1 = this.equipItemIfPossible(worldserver, itemstack.copy(), entityitem); // CraftBukkit - add item
- 
-         if (!itemstack1.isEmpty()) {
-             this.onItemPickup(entityitem);
-             this.take(entityitem, itemstack1.getCount());
-             itemstack.shrink(itemstack1.getCount());
-             if (itemstack.isEmpty()) {
--                entityitem.discard();
-+                entityitem.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
-             }
-         }
- 
-     }
- 
-     public ItemStack equipItemIfPossible(WorldServer worldserver, ItemStack itemstack) {
-+        // CraftBukkit start - add item
-+        return this.equipItemIfPossible(worldserver, itemstack, null);
-+    }
-+
-+    public ItemStack equipItemIfPossible(WorldServer worldserver, ItemStack itemstack, EntityItem entityitem) {
-+        // CraftBukkit end
-         EnumItemSlot enumitemslot = this.getEquipmentSlotForItem(itemstack);
-         ItemStack itemstack1 = this.getItemBySlot(enumitemslot);
-         boolean flag = this.canReplaceCurrentItem(itemstack, itemstack1, enumitemslot);
-@@ -647,11 +727,19 @@
-             flag = itemstack1.isEmpty();
-         }
- 
--        if (flag && this.canHoldItem(itemstack)) {
-+        // CraftBukkit start
-+        boolean canPickup = flag && this.canHoldItem(itemstack);
-+        if (entityitem != null) {
-+            canPickup = !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPickupItemEvent(this, entityitem, 0, !canPickup).isCancelled();
-+        }
-+        if (canPickup) {
-+            // CraftBukkit end
-             double d0 = (double) this.getEquipmentDropChance(enumitemslot);
- 
-             if (!itemstack1.isEmpty() && (double) Math.max(this.random.nextFloat() - 0.1F, 0.0F) < d0) {
-+                this.forceDrops = true; // CraftBukkit
-                 this.spawnAtLocation(worldserver, itemstack1);
-+                this.forceDrops = false; // CraftBukkit
-             }
- 
-             ItemStack itemstack2 = enumitemslot.limit(itemstack);
-@@ -768,7 +856,7 @@
-     @Override
-     public void checkDespawn() {
-         if (this.level().getDifficulty() == EnumDifficulty.PEACEFUL && this.shouldDespawnInPeaceful()) {
--            this.discard();
-+            this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
-         } else if (!this.isPersistenceRequired() && !this.requiresCustomPersistence()) {
-             EntityHuman entityhuman = this.level().getNearestPlayer(this, -1.0D);
- 
-@@ -778,14 +866,14 @@
-                 int j = i * i;
- 
-                 if (d0 > (double) j && this.removeWhenFarAway(d0)) {
--                    this.discard();
-+                    this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
-                 }
- 
-                 int k = this.getType().getCategory().getNoDespawnDistance();
-                 int l = k * k;
- 
-                 if (this.noActionTime > 600 && this.random.nextInt(800) == 0 && d0 > (double) l && this.removeWhenFarAway(d0)) {
--                    this.discard();
-+                    this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
-                 } else if (d0 < (double) l) {
-                     this.noActionTime = 0;
-                 }
-@@ -799,6 +887,7 @@
-     @Override
-     protected final void serverAiStep() {
-         ++this.noActionTime;
-+        if (!this.aware) return; // CraftBukkit
-         GameProfilerFiller gameprofilerfiller = Profiler.get();
- 
-         gameprofilerfiller.push("sensing");
-@@ -1338,7 +1427,7 @@
-         if (itemstack.getItem() instanceof ItemMonsterEgg) {
-             if (this.level() instanceof WorldServer) {
-                 ItemMonsterEgg itemmonsteregg = (ItemMonsterEgg) itemstack.getItem();
--                Optional<EntityInsentient> optional = itemmonsteregg.spawnOffspringFromSpawnEgg(entityhuman, this, this.getType(), (WorldServer) this.level(), this.position(), itemstack);
-+                Optional<EntityInsentient> optional = itemmonsteregg.spawnOffspringFromSpawnEgg(entityhuman, this, (EntityTypes<? extends EntityInsentient>) this.getType(), (WorldServer) this.level(), this.position(), itemstack); // CraftBukkit - decompile error
- 
-                 optional.ifPresent((entityinsentient) -> {
-                     this.onOffspringSpawnedFromEgg(entityhuman, entityinsentient);
-@@ -1389,12 +1478,19 @@
-         return this.restrictRadius != -1.0F;
-     }
- 
-+    // CraftBukkit start
-     @Nullable
-     public <T extends EntityInsentient> T convertTo(EntityTypes<T> entitytypes, ConversionParams conversionparams, EntitySpawnReason entityspawnreason, ConversionParams.a<T> conversionparams_a) {
-+        return this.convertTo(entitytypes, conversionparams, entityspawnreason, conversionparams_a, EntityTransformEvent.TransformReason.UNKNOWN, CreatureSpawnEvent.SpawnReason.DEFAULT);
-+    }
-+
-+    @Nullable
-+    public <T extends EntityInsentient> T convertTo(EntityTypes<T> entitytypes, ConversionParams conversionparams, EntitySpawnReason entityspawnreason, ConversionParams.a<T> conversionparams_a, EntityTransformEvent.TransformReason transformReason, CreatureSpawnEvent.SpawnReason spawnReason) {
-+        // CraftBukkit end
-         if (this.isRemoved()) {
-             return null;
-         } else {
--            T t0 = (EntityInsentient) entitytypes.create(this.level(), entityspawnreason);
-+            T t0 = entitytypes.create(this.level(), EntitySpawnReason.CONVERSION); // CraftBukkit - decompile error
- 
-             if (t0 == null) {
-                 return null;
-@@ -1403,14 +1499,24 @@
-                 conversionparams_a.finalizeConversion(t0);
-                 World world = this.level();
- 
-+                // CraftBukkit start
-+                if (transformReason == null) {
-+                    // Special handling for slime split and pig lightning
-+                    return t0;
-+                }
-+
-+                if (CraftEventFactory.callEntityTransformEvent(this, t0, transformReason).isCancelled()) {
-+                    return null;
-+                }
-+                // CraftBukkit end
-                 if (world instanceof WorldServer) {
-                     WorldServer worldserver = (WorldServer) world;
- 
--                    worldserver.addFreshEntity(t0);
-+                    worldserver.addFreshEntity(t0, spawnReason); // CraftBukkit
-                 }
- 
-                 if (conversionparams.type().shouldDiscardAfterConversion()) {
--                    this.discard();
-+                    this.discard(EntityRemoveEvent.Cause.TRANSFORMATION); // CraftBukkit - add Bukkit remove cause
-                 }
- 
-                 return t0;
-@@ -1420,7 +1526,14 @@
- 
-     @Nullable
-     public <T extends EntityInsentient> T convertTo(EntityTypes<T> entitytypes, ConversionParams conversionparams, ConversionParams.a<T> conversionparams_a) {
--        return this.convertTo(entitytypes, conversionparams, EntitySpawnReason.CONVERSION, conversionparams_a);
-+        // CraftBukkit start
-+        return this.convertTo(entitytypes, conversionparams, conversionparams_a, EntityTransformEvent.TransformReason.UNKNOWN, CreatureSpawnEvent.SpawnReason.DEFAULT);
-+    }
-+
-+    @Nullable
-+    public <T extends EntityInsentient> T convertTo(EntityTypes<T> entitytypes, ConversionParams conversionparams, ConversionParams.a<T> conversionparams_a, EntityTransformEvent.TransformReason transformReason, CreatureSpawnEvent.SpawnReason spawnReason) {
-+        return this.convertTo(entitytypes, conversionparams, EntitySpawnReason.CONVERSION, conversionparams_a, transformReason, spawnReason);
-+        // CraftBukkit end
-     }
- 
-     @Nullable
-@@ -1458,6 +1571,7 @@
-         boolean flag1 = super.startRiding(entity, flag);
- 
-         if (flag1 && this.isLeashed()) {
-+            this.level().getCraftServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.UNKNOWN)); // CraftBukkit
-             this.dropLeash();
-         }
- 
-@@ -1542,7 +1656,7 @@
- 
-             if (f1 > 0.0F && entity instanceof EntityLiving) {
-                 entityliving = (EntityLiving) entity;
--                entityliving.knockback((double) (f1 * 0.5F), (double) MathHelper.sin(this.getYRot() * 0.017453292F), (double) (-MathHelper.cos(this.getYRot() * 0.017453292F)));
-+                entityliving.knockback((double) (f1 * 0.5F), (double) MathHelper.sin(this.getYRot() * 0.017453292F), (double) (-MathHelper.cos(this.getYRot() * 0.017453292F)), this, org.bukkit.event.entity.EntityKnockbackEvent.KnockbackCause.ENTITY_ATTACK); // CraftBukkit
-                 this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D));
-             }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/EntityLiving.patch b/paper-server/patches/sources/net/minecraft/world/entity/EntityLiving.patch
deleted file mode 100644
index 55110c5acb..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/EntityLiving.patch
+++ /dev/null
@@ -1,1130 +0,0 @@
---- a/net/minecraft/world/entity/EntityLiving.java
-+++ b/net/minecraft/world/entity/EntityLiving.java
-@@ -136,6 +136,33 @@
- import net.minecraft.world.scores.ScoreboardTeam;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import java.util.ArrayList;
-+import java.util.HashSet;
-+import java.util.Set;
-+import java.util.LinkedList;
-+import java.util.UUID;
-+import net.minecraft.nbt.NBTTagFloat;
-+import net.minecraft.nbt.NBTTagInt;
-+import net.minecraft.world.item.component.Consumable;
-+import org.bukkit.Location;
-+import org.bukkit.craftbukkit.attribute.CraftAttributeMap;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.craftbukkit.inventory.CraftItemStack;
-+import org.bukkit.entity.LivingEntity;
-+import org.bukkit.entity.Player;
-+import org.bukkit.event.entity.ArrowBodyCountChangeEvent;
-+import org.bukkit.event.entity.EntityDamageEvent;
-+import org.bukkit.event.entity.EntityDamageEvent.DamageModifier;
-+import org.bukkit.event.entity.EntityKnockbackEvent;
-+import org.bukkit.event.entity.EntityPotionEffectEvent;
-+import org.bukkit.event.entity.EntityRegainHealthEvent;
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+import org.bukkit.event.entity.EntityResurrectEvent;
-+import org.bukkit.event.entity.EntityTeleportEvent;
-+import org.bukkit.event.player.PlayerItemConsumeEvent;
-+// CraftBukkit end
-+
- public abstract class EntityLiving extends Entity implements Attackable {
- 
-     private static final Logger LOGGER = LogUtils.getLogger();
-@@ -260,6 +287,19 @@
-     protected boolean skipDropExperience;
-     private final EnumMap<EnumItemSlot, Reference2ObjectMap<Enchantment, Set<EnchantmentLocationBasedEffect>>> activeLocationDependentEnchantments;
-     protected float appliedScale;
-+    // CraftBukkit start
-+    public int expToDrop;
-+    public ArrayList<org.bukkit.inventory.ItemStack> drops = new ArrayList<org.bukkit.inventory.ItemStack>();
-+    public final org.bukkit.craftbukkit.attribute.CraftAttributeMap craftAttributes;
-+    public boolean collides = true;
-+    public Set<UUID> collidableExemptions = new HashSet<>();
-+    public boolean bukkitPickUpLoot;
-+
-+    @Override
-+    public float getBukkitYaw() {
-+        return getYHeadRot();
-+    }
-+    // CraftBukkit end
- 
-     protected EntityLiving(EntityTypes<? extends EntityLiving> entitytypes, World world) {
-         super(entitytypes, world);
-@@ -276,7 +316,9 @@
-         this.activeLocationDependentEnchantments = new EnumMap(EnumItemSlot.class);
-         this.appliedScale = 1.0F;
-         this.attributes = new AttributeMapBase(AttributeDefaults.getSupplier(entitytypes));
--        this.setHealth(this.getMaxHealth());
-+        this.craftAttributes = new CraftAttributeMap(attributes); // CraftBukkit
-+        // CraftBukkit - setHealth(getMaxHealth()) inlined and simplified to skip the instanceof check for EntityPlayer, as getBukkitEntity() is not initialized in constructor
-+        this.entityData.set(EntityLiving.DATA_HEALTH_ID, (float) this.getAttribute(GenericAttributes.MAX_HEALTH).getValue());
-         this.blocksBuilding = true;
-         this.rotA = (float) ((Math.random() + 1.0D) * 0.009999999776482582D);
-         this.reapplyPosition();
-@@ -356,7 +398,13 @@
-                     double d8 = Math.min((double) (0.2F + f / 15.0F), 2.5D);
-                     int i = (int) (150.0D * d8);
- 
--                    worldserver.sendParticles(new ParticleParamBlock(Particles.BLOCK, iblockdata), d2, d3, d4, i, 0.0D, 0.0D, 0.0D, 0.15000000596046448D);
-+                    // CraftBukkit start - visiblity api
-+                    if (this instanceof EntityPlayer) {
-+                        worldserver.sendParticlesSource((EntityPlayer) this, new ParticleParamBlock(Particles.BLOCK, iblockdata), false, false, d2, d3, d4, i, 0.0D, 0.0D, 0.0D, 0.15000000596046448D);
-+                    } else {
-+                        worldserver.sendParticles(new ParticleParamBlock(Particles.BLOCK, iblockdata), d2, d3, d4, i, 0.0D, 0.0D, 0.0D, 0.15000000596046448D);
-+                    }
-+                    // CraftBukkit end
-                 }
-             }
-         }
-@@ -573,7 +621,7 @@
-         ++this.deathTime;
-         if (this.deathTime >= 20 && !this.level().isClientSide() && !this.isRemoved()) {
-             this.level().broadcastEntityEvent(this, (byte) 60);
--            this.remove(Entity.RemovalReason.KILLED);
-+            this.remove(Entity.RemovalReason.KILLED, EntityRemoveEvent.Cause.DEATH); // CraftBukkit - add Bukkit remove cause
-         }
- 
-     }
-@@ -679,13 +727,19 @@
-     }
- 
-     public void onEquipItem(EnumItemSlot enumitemslot, ItemStack itemstack, ItemStack itemstack1) {
-+        // CraftBukkit start
-+        onEquipItem(enumitemslot, itemstack, itemstack1, false);
-+    }
-+
-+    public void onEquipItem(EnumItemSlot enumitemslot, ItemStack itemstack, ItemStack itemstack1, boolean silent) {
-+        // CraftBukkit end
-         if (!this.level().isClientSide() && !this.isSpectator()) {
-             boolean flag = itemstack1.isEmpty() && itemstack.isEmpty();
- 
-             if (!flag && !ItemStack.isSameItemSameComponents(itemstack, itemstack1) && !this.firstTick) {
-                 Equippable equippable = (Equippable) itemstack1.get(DataComponents.EQUIPPABLE);
- 
--                if (!this.isSilent() && equippable != null && enumitemslot == equippable.slot()) {
-+                if (!this.isSilent() && equippable != null && enumitemslot == equippable.slot() && !silent) { // CraftBukkit
-                     this.level().playSeededSound((EntityHuman) null, this.getX(), this.getY(), this.getZ(), equippable.equipSound(), this.getSoundSource(), 1.0F, 1.0F, this.random.nextLong());
-                 }
- 
-@@ -699,6 +753,13 @@
- 
-     @Override
-     public void remove(Entity.RemovalReason entity_removalreason) {
-+        // CraftBukkit start - add Bukkit remove cause
-+        this.remove(entity_removalreason, null);
-+    }
-+
-+    @Override
-+    public void remove(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) {
-+        // CraftBukkit end
-         if (entity_removalreason == Entity.RemovalReason.KILLED || entity_removalreason == Entity.RemovalReason.DISCARDED) {
-             World world = this.level();
- 
-@@ -709,7 +770,7 @@
-             }
-         }
- 
--        super.remove(entity_removalreason);
-+        super.remove(entity_removalreason, cause); // CraftBukkit
-         this.brain.clearMemories();
-     }
- 
-@@ -722,6 +783,7 @@
-             mobeffect.onMobRemoved(worldserver, this, entity_removalreason);
-         }
- 
-+        this.removeAllEffects(org.bukkit.event.entity.EntityPotionEffectEvent.Cause.DEATH); // CraftBukkit
-         this.activeEffects.clear();
-     }
- 
-@@ -781,6 +843,17 @@
-             }
-         }
- 
-+        // CraftBukkit start
-+        if (nbttagcompound.contains("Bukkit.MaxHealth")) {
-+            NBTBase nbtbase = nbttagcompound.get("Bukkit.MaxHealth");
-+            if (nbtbase.getId() == 5) {
-+                this.getAttribute(GenericAttributes.MAX_HEALTH).setBaseValue(((NBTTagFloat) nbtbase).getAsDouble());
-+            } else if (nbtbase.getId() == 3) {
-+                this.getAttribute(GenericAttributes.MAX_HEALTH).setBaseValue(((NBTTagInt) nbtbase).getAsDouble());
-+            }
-+        }
-+        // CraftBukkit end
-+
-         if (nbttagcompound.contains("Health", 99)) {
-             this.setHealth(nbttagcompound.getFloat("Health"));
-         }
-@@ -819,9 +892,32 @@
- 
-     }
- 
-+    // CraftBukkit start
-+    private boolean isTickingEffects = false;
-+    private List<ProcessableEffect> effectsToProcess = Lists.newArrayList();
-+
-+    private static class ProcessableEffect {
-+
-+        private Holder<MobEffectList> type;
-+        private MobEffect effect;
-+        private final EntityPotionEffectEvent.Cause cause;
-+
-+        private ProcessableEffect(MobEffect effect, EntityPotionEffectEvent.Cause cause) {
-+            this.effect = effect;
-+            this.cause = cause;
-+        }
-+
-+        private ProcessableEffect(Holder<MobEffectList> type, EntityPotionEffectEvent.Cause cause) {
-+            this.type = type;
-+            this.cause = cause;
-+        }
-+    }
-+    // CraftBukkit end
-+
-     protected void tickEffects() {
-         Iterator<Holder<MobEffectList>> iterator = this.activeEffects.keySet().iterator();
- 
-+        isTickingEffects = true; // CraftBukkit
-         try {
-             while (iterator.hasNext()) {
-                 Holder<MobEffectList> holder = (Holder) iterator.next();
-@@ -831,6 +927,12 @@
-                     this.onEffectUpdated(mobeffect, true, (Entity) null);
-                 })) {
-                     if (!this.level().isClientSide) {
-+                        // CraftBukkit start
-+                        EntityPotionEffectEvent event = CraftEventFactory.callEntityPotionEffectChangeEvent(this, mobeffect, null, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.EXPIRATION);
-+                        if (event.isCancelled()) {
-+                            continue;
-+                        }
-+                        // CraftBukkit end
-                         iterator.remove();
-                         this.onEffectsRemoved(List.of(mobeffect));
-                     }
-@@ -841,6 +943,17 @@
-         } catch (ConcurrentModificationException concurrentmodificationexception) {
-             ;
-         }
-+        // CraftBukkit start
-+        isTickingEffects = false;
-+        for (ProcessableEffect e : effectsToProcess) {
-+            if (e.effect != null) {
-+                addEffect(e.effect, e.cause);
-+            } else {
-+                removeEffect(e.type, e.cause);
-+            }
-+        }
-+        effectsToProcess.clear();
-+        // CraftBukkit end
- 
-         if (this.effectsDirty) {
-             if (!this.level().isClientSide) {
-@@ -952,17 +1065,36 @@
-         this.entityData.set(EntityLiving.DATA_EFFECT_PARTICLES, List.of());
-     }
- 
-+    // CraftBukkit start
-     public boolean removeAllEffects() {
-+        return removeAllEffects(org.bukkit.event.entity.EntityPotionEffectEvent.Cause.UNKNOWN);
-+    }
-+
-+    public boolean removeAllEffects(EntityPotionEffectEvent.Cause cause) {
-+        // CraftBukkit end
-         if (this.level().isClientSide) {
-             return false;
-         } else if (this.activeEffects.isEmpty()) {
-             return false;
-         } else {
--            Map<Holder<MobEffectList>, MobEffect> map = Maps.newHashMap(this.activeEffects);
-+            // CraftBukkit start
-+            List<MobEffect> toRemove = new LinkedList<>();
-+            Iterator<MobEffect> iterator = this.activeEffects.values().iterator();
- 
--            this.activeEffects.clear();
--            this.onEffectsRemoved(map.values());
--            return true;
-+            while (iterator.hasNext()) {
-+                MobEffect effect = iterator.next();
-+                EntityPotionEffectEvent event = CraftEventFactory.callEntityPotionEffectChangeEvent(this, effect, null, cause, EntityPotionEffectEvent.Action.CLEARED);
-+                if (event.isCancelled()) {
-+                    continue;
-+                }
-+
-+                iterator.remove();
-+                toRemove.add(effect);
-+            }
-+
-+            this.onEffectsRemoved(toRemove);
-+            return !toRemove.isEmpty();
-+            // CraftBukkit end
-         }
-     }
- 
-@@ -987,20 +1119,50 @@
-         return this.addEffect(mobeffect, (Entity) null);
-     }
- 
-+    // CraftBukkit start
-+    public boolean addEffect(MobEffect mobeffect, EntityPotionEffectEvent.Cause cause) {
-+        return this.addEffect(mobeffect, (Entity) null, cause);
-+    }
-+
-     public boolean addEffect(MobEffect mobeffect, @Nullable Entity entity) {
-+        return this.addEffect(mobeffect, entity, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.UNKNOWN);
-+    }
-+
-+    public boolean addEffect(MobEffect mobeffect, @Nullable Entity entity, EntityPotionEffectEvent.Cause cause) {
-+        if (isTickingEffects) {
-+            effectsToProcess.add(new ProcessableEffect(mobeffect, cause));
-+            return true;
-+        }
-+        // CraftBukkit end
-+
-         if (!this.canBeAffected(mobeffect)) {
-             return false;
-         } else {
-             MobEffect mobeffect1 = (MobEffect) this.activeEffects.get(mobeffect.getEffect());
-             boolean flag = false;
- 
-+            // CraftBukkit start
-+            boolean override = false;
-+            if (mobeffect1 != null) {
-+                override = new MobEffect(mobeffect1).update(mobeffect);
-+            }
-+
-+            EntityPotionEffectEvent event = CraftEventFactory.callEntityPotionEffectChangeEvent(this, mobeffect1, mobeffect, cause, override);
-+            if (event.isCancelled()) {
-+                return false;
-+            }
-+            // CraftBukkit end
-+
-             if (mobeffect1 == null) {
-                 this.activeEffects.put(mobeffect.getEffect(), mobeffect);
-                 this.onEffectAdded(mobeffect, entity);
-                 flag = true;
-                 mobeffect.onEffectAdded(this);
--            } else if (mobeffect1.update(mobeffect)) {
-+                // CraftBukkit start
-+            } else if (event.isOverride()) {
-+                mobeffect1.update(mobeffect);
-                 this.onEffectUpdated(mobeffect1, true, entity);
-+                // CraftBukkit end
-                 flag = true;
-             }
- 
-@@ -1031,13 +1193,39 @@
-         return this.getType().is(TagsEntity.INVERTED_HEALING_AND_HARM);
-     }
- 
-+    // CraftBukkit start
-     @Nullable
-     public MobEffect removeEffectNoUpdate(Holder<MobEffectList> holder) {
-+        return removeEffectNoUpdate(holder, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.UNKNOWN);
-+    }
-+
-+    @Nullable
-+    public MobEffect removeEffectNoUpdate(Holder<MobEffectList> holder, EntityPotionEffectEvent.Cause cause) {
-+        if (isTickingEffects) {
-+            effectsToProcess.add(new ProcessableEffect(holder, cause));
-+            return null;
-+        }
-+
-+        MobEffect effect = this.activeEffects.get(holder);
-+        if (effect == null) {
-+            return null;
-+        }
-+
-+        EntityPotionEffectEvent event = CraftEventFactory.callEntityPotionEffectChangeEvent(this, effect, null, cause);
-+        if (event.isCancelled()) {
-+            return null;
-+        }
-+
-         return (MobEffect) this.activeEffects.remove(holder);
-     }
- 
-     public boolean removeEffect(Holder<MobEffectList> holder) {
--        MobEffect mobeffect = this.removeEffectNoUpdate(holder);
-+        return removeEffect(holder, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.UNKNOWN);
-+    }
-+
-+    public boolean removeEffect(Holder<MobEffectList> holder, EntityPotionEffectEvent.Cause cause) {
-+        MobEffect mobeffect = this.removeEffectNoUpdate(holder, cause);
-+        // CraftBukkit end
- 
-         if (mobeffect != null) {
-             this.onEffectsRemoved(List.of(mobeffect));
-@@ -1142,20 +1330,55 @@
- 
-     }
- 
-+    // CraftBukkit start - Delegate so we can handle providing a reason for health being regained
-     public void heal(float f) {
-+        heal(f, EntityRegainHealthEvent.RegainReason.CUSTOM);
-+    }
-+
-+    public void heal(float f, EntityRegainHealthEvent.RegainReason regainReason) {
-         float f1 = this.getHealth();
- 
-         if (f1 > 0.0F) {
--            this.setHealth(f1 + f);
-+            EntityRegainHealthEvent event = new EntityRegainHealthEvent(this.getBukkitEntity(), f, regainReason);
-+            // Suppress during worldgen
-+            if (this.valid) {
-+                this.level().getCraftServer().getPluginManager().callEvent(event);
-+            }
-+
-+            if (!event.isCancelled()) {
-+                this.setHealth((float) (this.getHealth() + event.getAmount()));
-+            }
-+            // CraftBukkit end
-         }
- 
-     }
- 
-     public float getHealth() {
-+        // CraftBukkit start - Use unscaled health
-+        if (this instanceof EntityPlayer) {
-+            return (float) ((EntityPlayer) this).getBukkitEntity().getHealth();
-+        }
-+        // CraftBukkit end
-         return (Float) this.entityData.get(EntityLiving.DATA_HEALTH_ID);
-     }
- 
-     public void setHealth(float f) {
-+        // CraftBukkit start - Handle scaled health
-+        if (this instanceof EntityPlayer) {
-+            org.bukkit.craftbukkit.entity.CraftPlayer player = ((EntityPlayer) this).getBukkitEntity();
-+            // Squeeze
-+            if (f < 0.0F) {
-+                player.setRealHealth(0.0D);
-+            } else if (f > player.getMaxHealth()) {
-+                player.setRealHealth(player.getMaxHealth());
-+            } else {
-+                player.setRealHealth(f);
-+            }
-+
-+            player.updateScaledHealth(false);
-+            return;
-+        }
-+        // CraftBukkit end
-         this.entityData.set(EntityLiving.DATA_HEALTH_ID, MathHelper.clamp(f, 0.0F, this.getMaxHealth()));
-     }
- 
-@@ -1167,7 +1390,7 @@
-     public boolean hurtServer(WorldServer worldserver, DamageSource damagesource, float f) {
-         if (this.isInvulnerableTo(worldserver, damagesource)) {
-             return false;
--        } else if (this.isDeadOrDying()) {
-+        } else if (this.isRemoved() || this.dead || this.getHealth() <= 0.0F) { // CraftBukkit - Don't allow entities that got set to dead/killed elsewhere to get damaged and die
-             return false;
-         } else if (damagesource.is(DamageTypeTags.IS_FIRE) && this.hasEffect(MobEffects.FIRE_RESISTANCE)) {
-             return false;
-@@ -1182,10 +1405,11 @@
-             }
- 
-             float f1 = f;
--            boolean flag = false;
-+            boolean flag = f > 0.0F && this.isDamageSourceBlocked(damagesource); // Copied from below
-             float f2 = 0.0F;
- 
--            if (f > 0.0F && this.isDamageSourceBlocked(damagesource)) {
-+            // CraftBukkit - Moved into handleEntityDamage(DamageSource, float) for get f and actuallyHurt(DamageSource, float, EntityDamageEvent) for handle damage
-+            if (false && f > 0.0F && this.isDamageSourceBlocked(damagesource)) {
-                 this.hurtCurrentlyUsedShield(f);
-                 f2 = f;
-                 f = 0.0F;
-@@ -1202,15 +1426,26 @@
-                 flag = true;
-             }
- 
--            if (damagesource.is(DamageTypeTags.IS_FREEZING) && this.getType().is(TagsEntity.FREEZE_HURTS_EXTRA_TYPES)) {
-+            // CraftBukkit - Moved into handleEntityDamage(DamageSource, float) for get f
-+            if (false && damagesource.is(DamageTypeTags.IS_FREEZING) && this.getType().is(TagsEntity.FREEZE_HURTS_EXTRA_TYPES)) {
-                 f *= 5.0F;
-             }
- 
--            if (damagesource.is(DamageTypeTags.DAMAGES_HELMET) && !this.getItemBySlot(EnumItemSlot.HEAD).isEmpty()) {
-+            // CraftBukkit - Moved into handleEntityDamage(DamageSource, float) for get f and actuallyHurt(DamageSource, float, EntityDamageEvent) for handle damage
-+            if (false && damagesource.is(DamageTypeTags.DAMAGES_HELMET) && !this.getItemBySlot(EnumItemSlot.HEAD).isEmpty()) {
-                 this.hurtHelmet(damagesource, f);
-                 f *= 0.75F;
-             }
- 
-+            // CraftBukkit start
-+            EntityDamageEvent event = handleEntityDamage(damagesource, f);
-+            f = 0;
-+            f += (float) event.getDamage(DamageModifier.BASE);
-+            f += (float) event.getDamage(DamageModifier.BLOCKING);
-+            f += (float) event.getDamage(DamageModifier.FREEZING);
-+            f += (float) event.getDamage(DamageModifier.HARD_HAT);
-+            // CraftBukkit end
-+
-             this.walkAnimation.setSpeed(1.5F);
-             if (Float.isNaN(f) || Float.isInfinite(f)) {
-                 f = Float.MAX_VALUE;
-@@ -1218,18 +1453,27 @@
- 
-             boolean flag1 = true;
- 
--            if ((float) this.invulnerableTime > 10.0F && !damagesource.is(DamageTypeTags.BYPASSES_COOLDOWN)) {
-+            if ((float) this.invulnerableTime > (float) this.invulnerableDuration / 2.0F && !damagesource.is(DamageTypeTags.BYPASSES_COOLDOWN)) { // CraftBukkit - restore use of maxNoDamageTicks
-                 if (f <= this.lastHurt) {
-                     return false;
-                 }
- 
--                this.actuallyHurt(worldserver, damagesource, f - this.lastHurt);
-+                // CraftBukkit start
-+                if (!this.actuallyHurt(worldserver, damagesource, (float) event.getFinalDamage() - this.lastHurt, event)) {
-+                    return false;
-+                }
-+                // CraftBukkit end
-                 this.lastHurt = f;
-                 flag1 = false;
-             } else {
-+                // CraftBukkit start
-+                if (!this.actuallyHurt(worldserver, damagesource, (float) event.getFinalDamage(), event)) {
-+                    return false;
-+                }
-                 this.lastHurt = f;
--                this.invulnerableTime = 20;
--                this.actuallyHurt(worldserver, damagesource, f);
-+                this.invulnerableTime = this.invulnerableDuration; // CraftBukkit - restore use of maxNoDamageTicks
-+                // this.actuallyHurt(worldserver, damagesource, f);
-+                // CraftBukkit end
-                 this.hurtDuration = 10;
-                 this.hurtTime = this.hurtDuration;
-             }
-@@ -1243,7 +1487,7 @@
-                     worldserver.broadcastDamageEvent(this, damagesource);
-                 }
- 
--                if (!damagesource.is(DamageTypeTags.NO_IMPACT) && (!flag || f > 0.0F)) {
-+                if (!damagesource.is(DamageTypeTags.NO_IMPACT) && !flag) { // CraftBukkit - Prevent marking hurt if the damage is blocked
-                     this.markHurt();
-                 }
- 
-@@ -1263,7 +1507,7 @@
-                         d1 = damagesource.getSourcePosition().z() - this.getZ();
-                     }
- 
--                    this.knockback(0.4000000059604645D, d0, d1);
-+                    this.knockback(0.4000000059604645D, d0, d1, entity1, entity1 == null ? EntityKnockbackEvent.KnockbackCause.DAMAGE : EntityKnockbackEvent.KnockbackCause.ENTITY_ATTACK); // CraftBukkit
-                     if (!flag) {
-                         this.indicateDamage(d0, d1);
-                     }
-@@ -1282,7 +1526,7 @@
-                 this.playHurtSound(damagesource);
-             }
- 
--            boolean flag2 = !flag || f > 0.0F;
-+            boolean flag2 = !flag; // CraftBukkit - Ensure to return false if damage is blocked
- 
-             if (flag2) {
-                 this.lastDamageSource = damagesource;
-@@ -1363,7 +1607,7 @@
-     }
- 
-     protected void blockedByShield(EntityLiving entityliving) {
--        entityliving.knockback(0.5D, entityliving.getX() - this.getX(), entityliving.getZ() - this.getZ());
-+        entityliving.knockback(0.5D, entityliving.getX() - this.getX(), entityliving.getZ() - this.getZ(), null, EntityKnockbackEvent.KnockbackCause.SHIELD_BLOCK); // CraftBukkit
-     }
- 
-     private boolean checkTotemDeathProtection(DamageSource damagesource) {
-@@ -1375,20 +1619,33 @@
-             EnumHand[] aenumhand = EnumHand.values();
-             int i = aenumhand.length;
- 
-+            // CraftBukkit start
-+            EnumHand hand = null;
-+            ItemStack itemstack1 = ItemStack.EMPTY;
-             for (int j = 0; j < i; ++j) {
-                 EnumHand enumhand = aenumhand[j];
--                ItemStack itemstack1 = this.getItemInHand(enumhand);
-+                itemstack1 = this.getItemInHand(enumhand);
- 
-                 deathprotection = (DeathProtection) itemstack1.get(DataComponents.DEATH_PROTECTION);
-                 if (deathprotection != null) {
-+                    hand = enumhand; // CraftBukkit
-                     itemstack = itemstack1.copy();
--                    itemstack1.shrink(1);
-+                    // itemstack1.subtract(1); // CraftBukkit
-                     break;
-                 }
-             }
- 
--            if (itemstack != null) {
--                if (this instanceof EntityPlayer) {
-+            org.bukkit.inventory.EquipmentSlot handSlot = (hand != null) ? org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(hand) : null;
-+            EntityResurrectEvent event = new EntityResurrectEvent((LivingEntity) this.getBukkitEntity(), handSlot);
-+            event.setCancelled(itemstack == null);
-+            this.level().getCraftServer().getPluginManager().callEvent(event);
-+
-+            if (!event.isCancelled()) {
-+                if (!itemstack1.isEmpty()) {
-+                    itemstack1.shrink(1);
-+                }
-+                if (itemstack != null && this instanceof EntityPlayer) {
-+                    // CraftBukkit end
-                     EntityPlayer entityplayer = (EntityPlayer) this;
- 
-                     entityplayer.awardStat(StatisticList.ITEM_USED.get(itemstack.getItem()));
-@@ -1512,14 +1769,22 @@
-                     IBlockData iblockdata = Blocks.WITHER_ROSE.defaultBlockState();
- 
-                     if (this.level().getBlockState(blockposition).isAir() && iblockdata.canSurvive(this.level(), blockposition)) {
--                        this.level().setBlock(blockposition, iblockdata, 3);
--                        flag = true;
-+                        // CraftBukkit start - call EntityBlockFormEvent for Wither Rose
-+                        flag = org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this.level(), blockposition, iblockdata, 3, this);
-+                        // CraftBukkit end
-                     }
-                 }
- 
-                 if (!flag) {
-                     EntityItem entityitem = new EntityItem(this.level(), this.getX(), this.getY(), this.getZ(), new ItemStack(Items.WITHER_ROSE));
- 
-+                    // CraftBukkit start
-+                    org.bukkit.event.entity.EntityDropItemEvent event = new org.bukkit.event.entity.EntityDropItemEvent(this.getBukkitEntity(), (org.bukkit.entity.Item) entityitem.getBukkitEntity());
-+                    CraftEventFactory.callEvent(event);
-+                    if (event.isCancelled()) {
-+                        return;
-+                    }
-+                    // CraftBukkit end
-                     this.level().addFreshEntity(entityitem);
-                 }
-             }
-@@ -1530,22 +1795,37 @@
-     protected void dropAllDeathLoot(WorldServer worldserver, DamageSource damagesource) {
-         boolean flag = this.lastHurtByPlayerTime > 0;
- 
-+        this.dropEquipment(worldserver); // CraftBukkit - from below
-         if (this.shouldDropLoot() && worldserver.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
-             this.dropFromLootTable(worldserver, damagesource, flag);
-             this.dropCustomDeathLoot(worldserver, damagesource, flag);
-         }
-+        // CraftBukkit start - Call death event
-+        CraftEventFactory.callEntityDeathEvent(this, damagesource, this.drops);
-+        this.drops = new ArrayList<>();
-+        // CraftBukkit end
- 
--        this.dropEquipment(worldserver);
-+        // this.dropEquipment(worldserver);// CraftBukkit - moved up
-         this.dropExperience(worldserver, damagesource.getEntity());
-     }
- 
-     protected void dropEquipment(WorldServer worldserver) {}
- 
--    protected void dropExperience(WorldServer worldserver, @Nullable Entity entity) {
-+    public int getExpReward(WorldServer worldserver, @Nullable Entity entity) { // CraftBukkit
-         if (!this.wasExperienceConsumed() && (this.isAlwaysExperienceDropper() || this.lastHurtByPlayerTime > 0 && this.shouldDropExperience() && worldserver.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT))) {
--            EntityExperienceOrb.award(worldserver, this.position(), this.getExperienceReward(worldserver, entity));
-+            return this.getExperienceReward(worldserver, entity); // CraftBukkit            }
-         }
- 
-+        return 0; // CraftBukkit
-+    }
-+
-+    protected void dropExperience(WorldServer worldserver, @Nullable Entity entity) {
-+        // CraftBukkit start - Update getExpReward() above if the removed if() changes!
-+        if (!(this instanceof net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon)) { // CraftBukkit - SPIGOT-2420: Special case ender dragon will drop the xp over time
-+            EntityExperienceOrb.award(worldserver, this.position(), this.expToDrop);
-+            this.expToDrop = 0;
-+        }
-+        // CraftBukkit end
-     }
- 
-     protected void dropCustomDeathLoot(WorldServer worldserver, DamageSource damagesource, boolean flag) {}
-@@ -1612,9 +1892,14 @@
-     }
- 
-     public void knockback(double d0, double d1, double d2) {
-+        // CraftBukkit start - EntityKnockbackEvent
-+        knockback(d0, d1, d2, null, EntityKnockbackEvent.KnockbackCause.UNKNOWN);
-+    }
-+
-+    public void knockback(double d0, double d1, double d2, Entity attacker, EntityKnockbackEvent.KnockbackCause cause) {
-         d0 *= 1.0D - this.getAttributeValue(GenericAttributes.KNOCKBACK_RESISTANCE);
--        if (d0 > 0.0D) {
--            this.hasImpulse = true;
-+        if (true || d0 > 0.0D) { // CraftBukkit - Call event even when force is 0
-+            //this.hasImpulse = true; // CraftBukkit - Move down
- 
-             Vec3D vec3d;
- 
-@@ -1624,7 +1909,14 @@
- 
-             Vec3D vec3d1 = (new Vec3D(d1, 0.0D, d2)).normalize().scale(d0);
- 
--            this.setDeltaMovement(vec3d.x / 2.0D - vec3d1.x, this.onGround() ? Math.min(0.4D, vec3d.y / 2.0D + d0) : vec3d.y, vec3d.z / 2.0D - vec3d1.z);
-+            EntityKnockbackEvent event = CraftEventFactory.callEntityKnockbackEvent((org.bukkit.craftbukkit.entity.CraftLivingEntity) this.getBukkitEntity(), attacker, cause, d0, vec3d1, vec3d.x / 2.0D - vec3d1.x, this.onGround() ? Math.min(0.4D, vec3d.y / 2.0D + d0) : vec3d.y, vec3d.z / 2.0D - vec3d1.z);
-+            if (event.isCancelled()) {
-+                return;
-+            }
-+
-+            this.hasImpulse = true;
-+            this.setDeltaMovement(event.getFinalKnockback().getX(), event.getFinalKnockback().getY(), event.getFinalKnockback().getZ());
-+            // CraftBukkit end
-         }
-     }
- 
-@@ -1683,6 +1975,20 @@
-         return new EntityLiving.a(SoundEffects.GENERIC_SMALL_FALL, SoundEffects.GENERIC_BIG_FALL);
-     }
- 
-+    // CraftBukkit start - Add delegate methods
-+    public SoundEffect getHurtSound0(DamageSource damagesource) {
-+        return getHurtSound(damagesource);
-+    }
-+
-+    public SoundEffect getDeathSound0() {
-+        return getDeathSound();
-+    }
-+
-+    public SoundEffect getFallDamageSound0(int fallHeight) {
-+        return getFallDamageSound(fallHeight);
-+    }
-+    // CraftBukkit end
-+
-     public Optional<BlockPosition> getLastClimbablePos() {
-         return this.lastClimbablePos;
-     }
-@@ -1757,9 +2063,14 @@
-         int i = this.calculateFallDamage(f, f1);
- 
-         if (i > 0) {
-+            // CraftBukkit start
-+            if (!this.hurtServer((WorldServer) this.level(), damagesource, (float) i)) {
-+                return true;
-+            }
-+            // CraftBukkit end
-             this.playSound(this.getFallDamageSound(i), 1.0F, 1.0F);
-             this.playBlockFallSound();
--            this.hurt(damagesource, (float) i);
-+            // this.damageEntity(damagesource, (float) i); // CraftBukkit - moved up
-             return true;
-         } else {
-             return flag;
-@@ -1830,7 +2141,7 @@
- 
-     protected float getDamageAfterArmorAbsorb(DamageSource damagesource, float f) {
-         if (!damagesource.is(DamageTypeTags.BYPASSES_ARMOR)) {
--            this.hurtArmor(damagesource, f);
-+            // this.hurtArmor(damagesource, f); // CraftBukkit - actuallyHurt(DamageSource, float, EntityDamageEvent) for handle damage
-             f = CombatMath.getDamageAfterAbsorb(this, f, damagesource, (float) this.getArmorValue(), (float) this.getAttributeValue(GenericAttributes.ARMOR_TOUGHNESS));
-         }
- 
-@@ -1841,7 +2152,8 @@
-         if (damagesource.is(DamageTypeTags.BYPASSES_EFFECTS)) {
-             return f;
-         } else {
--            if (this.hasEffect(MobEffects.DAMAGE_RESISTANCE) && !damagesource.is(DamageTypeTags.BYPASSES_RESISTANCE)) {
-+            // CraftBukkit - Moved to handleEntityDamage(DamageSource, float)
-+            if (false && this.hasEffect(MobEffects.DAMAGE_RESISTANCE) && !damagesource.is(DamageTypeTags.BYPASSES_RESISTANCE)) {
-                 int i = (this.getEffect(MobEffects.DAMAGE_RESISTANCE).getAmplifier() + 1) * 5;
-                 int j = 25 - i;
-                 float f1 = f * (float) j;
-@@ -1884,15 +2196,141 @@
-         }
-     }
- 
--    protected void actuallyHurt(WorldServer worldserver, DamageSource damagesource, float f) {
-+    // CraftBukkit start
-+    private EntityDamageEvent handleEntityDamage(final DamageSource damagesource, float f) {
-+        float originalDamage = f;
-+
-+        com.google.common.base.Function<Double, Double> freezing = new com.google.common.base.Function<Double, Double>() {
-+            @Override
-+            public Double apply(Double f) {
-+                if (damagesource.is(DamageTypeTags.IS_FREEZING) && EntityLiving.this.getType().is(TagsEntity.FREEZE_HURTS_EXTRA_TYPES)) {
-+                    return -(f - (f * 5.0F));
-+                }
-+                return -0.0;
-+            }
-+        };
-+        float freezingModifier = freezing.apply((double) f).floatValue();
-+        f += freezingModifier;
-+
-+        com.google.common.base.Function<Double, Double> hardHat = new com.google.common.base.Function<Double, Double>() {
-+            @Override
-+            public Double apply(Double f) {
-+                if (damagesource.is(DamageTypeTags.DAMAGES_HELMET) && !EntityLiving.this.getItemBySlot(EnumItemSlot.HEAD).isEmpty()) {
-+                    return -(f - (f * 0.75F));
-+                }
-+                return -0.0;
-+            }
-+        };
-+        float hardHatModifier = hardHat.apply((double) f).floatValue();
-+        f += hardHatModifier;
-+
-+        com.google.common.base.Function<Double, Double> blocking = new com.google.common.base.Function<Double, Double>() {
-+            @Override
-+            public Double apply(Double f) {
-+                return -((EntityLiving.this.isDamageSourceBlocked(damagesource)) ? f : 0.0);
-+            }
-+        };
-+        float blockingModifier = blocking.apply((double) f).floatValue();
-+        f += blockingModifier;
-+
-+        com.google.common.base.Function<Double, Double> armor = new com.google.common.base.Function<Double, Double>() {
-+            @Override
-+            public Double apply(Double f) {
-+                return -(f - EntityLiving.this.getDamageAfterArmorAbsorb(damagesource, f.floatValue()));
-+            }
-+        };
-+        float armorModifier = armor.apply((double) f).floatValue();
-+        f += armorModifier;
-+
-+        com.google.common.base.Function<Double, Double> resistance = new com.google.common.base.Function<Double, Double>() {
-+            @Override
-+            public Double apply(Double f) {
-+                if (!damagesource.is(DamageTypeTags.BYPASSES_EFFECTS) && EntityLiving.this.hasEffect(MobEffects.DAMAGE_RESISTANCE) && !damagesource.is(DamageTypeTags.BYPASSES_RESISTANCE)) {
-+                    int i = (EntityLiving.this.getEffect(MobEffects.DAMAGE_RESISTANCE).getAmplifier() + 1) * 5;
-+                    int j = 25 - i;
-+                    float f1 = f.floatValue() * (float) j;
-+
-+                    return -(f - Math.max(f1 / 25.0F, 0.0F));
-+                }
-+                return -0.0;
-+            }
-+        };
-+        float resistanceModifier = resistance.apply((double) f).floatValue();
-+        f += resistanceModifier;
-+
-+        com.google.common.base.Function<Double, Double> magic = new com.google.common.base.Function<Double, Double>() {
-+            @Override
-+            public Double apply(Double f) {
-+                return -(f - EntityLiving.this.getDamageAfterMagicAbsorb(damagesource, f.floatValue()));
-+            }
-+        };
-+        float magicModifier = magic.apply((double) f).floatValue();
-+        f += magicModifier;
-+
-+        com.google.common.base.Function<Double, Double> absorption = new com.google.common.base.Function<Double, Double>() {
-+            @Override
-+            public Double apply(Double f) {
-+                return -(Math.max(f - Math.max(f - EntityLiving.this.getAbsorptionAmount(), 0.0F), 0.0F));
-+            }
-+        };
-+        float absorptionModifier = absorption.apply((double) f).floatValue();
-+
-+        return CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, freezingModifier, hardHatModifier, blockingModifier, armorModifier, resistanceModifier, magicModifier, absorptionModifier, freezing, hardHat, blocking, armor, resistance, magic, absorption);
-+    }
-+
-+    protected boolean actuallyHurt(WorldServer worldserver, final DamageSource damagesource, float f, final EntityDamageEvent event) { // void -> boolean, add final
-         if (!this.isInvulnerableTo(worldserver, damagesource)) {
--            f = this.getDamageAfterArmorAbsorb(damagesource, f);
--            f = this.getDamageAfterMagicAbsorb(damagesource, f);
--            float f1 = f;
-+            if (event.isCancelled()) {
-+                return false;
-+            }
- 
--            f = Math.max(f - this.getAbsorptionAmount(), 0.0F);
--            this.setAbsorptionAmount(this.getAbsorptionAmount() - (f1 - f));
--            float f2 = f1 - f;
-+            if (damagesource.getEntity() instanceof EntityHuman) {
-+                ((EntityHuman) damagesource.getEntity()).resetAttackStrengthTicker(); // Moved from EntityHuman in order to make the cooldown reset get called after the damage event is fired
-+            }
-+
-+            // Resistance
-+            if (event.getDamage(DamageModifier.RESISTANCE) < 0) {
-+                float f3 = (float) -event.getDamage(DamageModifier.RESISTANCE);
-+                if (f3 > 0.0F && f3 < 3.4028235E37F) {
-+                    if (this instanceof EntityPlayer) {
-+                        ((EntityPlayer) this).awardStat(StatisticList.DAMAGE_RESISTED, Math.round(f3 * 10.0F));
-+                    } else if (damagesource.getEntity() instanceof EntityPlayer) {
-+                        ((EntityPlayer) damagesource.getEntity()).awardStat(StatisticList.DAMAGE_DEALT_RESISTED, Math.round(f3 * 10.0F));
-+                    }
-+                }
-+            }
-+
-+            // Apply damage to helmet
-+            if (damagesource.is(DamageTypeTags.DAMAGES_HELMET) && !this.getItemBySlot(EnumItemSlot.HEAD).isEmpty()) {
-+                this.hurtHelmet(damagesource, f);
-+            }
-+
-+            // Apply damage to armor
-+            if (!damagesource.is(DamageTypeTags.BYPASSES_ARMOR)) {
-+                float armorDamage = (float) (event.getDamage() + event.getDamage(DamageModifier.BLOCKING) + event.getDamage(DamageModifier.HARD_HAT));
-+                this.hurtArmor(damagesource, armorDamage);
-+            }
-+
-+            // Apply blocking code // PAIL: steal from above
-+            if (event.getDamage(DamageModifier.BLOCKING) < 0) {
-+                this.hurtCurrentlyUsedShield((float) -event.getDamage(DamageModifier.BLOCKING));
-+                Entity entity = damagesource.getDirectEntity();
-+
-+                if (entity instanceof EntityLiving) {
-+                    this.blockUsingShield((EntityLiving) entity);
-+                }
-+            }
-+
-+            boolean human = this instanceof EntityHuman;
-+            float originalDamage = (float) event.getDamage();
-+            float absorptionModifier = (float) -event.getDamage(DamageModifier.ABSORPTION);
-+            this.setAbsorptionAmount(Math.max(this.getAbsorptionAmount() - absorptionModifier, 0.0F));
-+            float f2 = absorptionModifier;
-+
-+            if (f2 > 0.0F && f2 < 3.4028235E37F && this instanceof EntityHuman) {
-+                ((EntityHuman) this).awardStat(StatisticList.DAMAGE_ABSORBED, Math.round(f2 * 10.0F));
-+            }
-+            // CraftBukkit end
- 
-             if (f2 > 0.0F && f2 < 3.4028235E37F) {
-                 Entity entity = damagesource.getEntity();
-@@ -1904,13 +2342,48 @@
-                 }
-             }
- 
--            if (f != 0.0F) {
-+            // CraftBukkit start
-+            if (f > 0 || !human) {
-+                if (human) {
-+                    // PAIL: Be sure to drag all this code from the EntityHuman subclass each update.
-+                    ((EntityHuman) this).causeFoodExhaustion(damagesource.getFoodExhaustion(), org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.DAMAGED); // CraftBukkit - EntityExhaustionEvent
-+                    if (f < 3.4028235E37F) {
-+                        ((EntityHuman) this).awardStat(StatisticList.DAMAGE_TAKEN, Math.round(f * 10.0F));
-+                    }
-+                }
-+                // CraftBukkit end
-                 this.getCombatTracker().recordDamage(damagesource, f);
-                 this.setHealth(this.getHealth() - f);
--                this.setAbsorptionAmount(this.getAbsorptionAmount() - f);
-+                // CraftBukkit start
-+                if (!human) {
-+                    this.setAbsorptionAmount(this.getAbsorptionAmount() - f);
-+                }
-                 this.gameEvent(GameEvent.ENTITY_DAMAGE);
-+
-+                return true;
-+            } else {
-+                // Duplicate triggers if blocking
-+                if (event.getDamage(DamageModifier.BLOCKING) < 0) {
-+                    if (this instanceof EntityPlayer) {
-+                        CriterionTriggers.ENTITY_HURT_PLAYER.trigger((EntityPlayer) this, damagesource, f, originalDamage, true);
-+                        f2 = (float) -event.getDamage(DamageModifier.BLOCKING);
-+                        if (f2 > 0.0F && f2 < 3.4028235E37F) {
-+                            ((EntityPlayer) this).awardStat(StatisticList.DAMAGE_BLOCKED_BY_SHIELD, Math.round(originalDamage * 10.0F));
-+                        }
-+                    }
-+
-+                    if (damagesource.getEntity() instanceof EntityPlayer) {
-+                        CriterionTriggers.PLAYER_HURT_ENTITY.trigger((EntityPlayer) damagesource.getEntity(), this, damagesource, f, originalDamage, true);
-+                    }
-+
-+                    return true;
-+                } else {
-+                    return originalDamage > 0;
-+                }
-+                // CraftBukkit end
-             }
-         }
-+        return false; // CraftBukkit
-     }
- 
-     public CombatTracker getCombatTracker() {
-@@ -1935,9 +2408,19 @@
-     }
- 
-     public final void setArrowCount(int i) {
--        this.entityData.set(EntityLiving.DATA_ARROW_COUNT_ID, i);
-+        // CraftBukkit start
-+        setArrowCount(i, false);
-     }
- 
-+    public final void setArrowCount(int i, boolean flag) {
-+        ArrowBodyCountChangeEvent event = CraftEventFactory.callArrowBodyCountChangeEvent(this, getArrowCount(), i, flag);
-+        if (event.isCancelled()) {
-+            return;
-+        }
-+        this.entityData.set(EntityLiving.DATA_ARROW_COUNT_ID, event.getNewAmount());
-+    }
-+    // CraftBukkit end
-+
-     public final int getStingerCount() {
-         return (Integer) this.entityData.get(EntityLiving.DATA_STINGER_COUNT_ID);
-     }
-@@ -2182,6 +2665,12 @@
- 
-     public abstract ItemStack getItemBySlot(EnumItemSlot enumitemslot);
- 
-+    // CraftBukkit start
-+    public void setItemSlot(EnumItemSlot enumitemslot, ItemStack itemstack, boolean silent) {
-+        this.setItemSlot(enumitemslot, itemstack);
-+    }
-+    // CraftBukkit end
-+
-     public abstract void setItemSlot(EnumItemSlot enumitemslot, ItemStack itemstack);
- 
-     public Iterable<ItemStack> getHandSlots() {
-@@ -2634,7 +3123,7 @@
-                 }
-             }
- 
--            this.detectEquipmentUpdates();
-+            this.detectEquipmentUpdatesPublic(); // CraftBukkit
-             if (this.tickCount % 20 == 0) {
-                 this.getCombatTracker().recheckStatus();
-             }
-@@ -2741,7 +3230,7 @@
-         this.elytraAnimationState.tick();
-     }
- 
--    public void detectEquipmentUpdates() {
-+    public void detectEquipmentUpdatesPublic() { // CraftBukkit
-         Map<EnumItemSlot, ItemStack> map = this.collectEquipmentChanges();
- 
-         if (map != null) {
-@@ -3063,6 +3552,7 @@
-         this.checkSlowFallDistance();
-         if (!this.level().isClientSide) {
-             if (!this.canGlide()) {
-+                if (this.getSharedFlag(7) != false && !CraftEventFactory.callToggleGlideEvent(this, false).isCancelled()) // CraftBukkit
-                 this.setSharedFlag(7, false);
-                 return;
-             }
-@@ -3305,14 +3795,21 @@
- 
-     @Override
-     public boolean isPickable() {
--        return !this.isRemoved();
-+        return !this.isRemoved() && this.collides; // CraftBukkit
-     }
- 
-     @Override
-     public boolean isPushable() {
--        return this.isAlive() && !this.isSpectator() && !this.onClimbable();
-+        return this.isAlive() && !this.isSpectator() && !this.onClimbable() && this.collides; // CraftBukkit
-     }
- 
-+    // CraftBukkit start - collidable API
-+    @Override
-+    public boolean canCollideWithBukkit(Entity entity) {
-+        return isPushable() && this.collides != this.collidableExemptions.contains(entity.getUUID());
-+    }
-+    // CraftBukkit end
-+
-     @Override
-     public float getYHeadRot() {
-         return this.yHeadRot;
-@@ -3483,7 +3980,30 @@
-                 this.releaseUsingItem();
-             } else {
-                 if (!this.useItem.isEmpty() && this.isUsingItem()) {
--                    ItemStack itemstack = this.useItem.finishUsingItem(this.level(), this);
-+                    // CraftBukkit start - fire PlayerItemConsumeEvent
-+                    ItemStack itemstack;
-+                    if (this instanceof EntityPlayer entityPlayer) {
-+                        org.bukkit.inventory.ItemStack craftItem = CraftItemStack.asBukkitCopy(this.useItem);
-+                        org.bukkit.inventory.EquipmentSlot hand = org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(enumhand);
-+                        PlayerItemConsumeEvent event = new PlayerItemConsumeEvent((Player) this.getBukkitEntity(), craftItem, hand);
-+                        this.level().getCraftServer().getPluginManager().callEvent(event);
-+
-+                        if (event.isCancelled()) {
-+                            // Update client
-+                            Consumable consumable = this.useItem.get(DataComponents.CONSUMABLE);
-+                            if (consumable != null) {
-+                                consumable.cancelUsingItem(entityPlayer, this.useItem);
-+                            }
-+                            entityPlayer.getBukkitEntity().updateInventory();
-+                            entityPlayer.getBukkitEntity().updateScaledHealth();
-+                            return;
-+                        }
-+
-+                        itemstack = (craftItem.equals(event.getItem())) ? this.useItem.finishUsingItem(this.level(), this) : CraftItemStack.asNMSCopy(event.getItem()).finishUsingItem(this.level(), this);
-+                    } else {
-+                        itemstack = this.useItem.finishUsingItem(this.level(), this);
-+                    }
-+                    // CraftBukkit end
- 
-                     if (itemstack != this.useItem) {
-                         this.setItemInHand(enumhand, itemstack);
-@@ -3568,6 +4088,12 @@
-     }
- 
-     public boolean randomTeleport(double d0, double d1, double d2, boolean flag) {
-+        // CraftBukkit start
-+        return randomTeleport(d0, d1, d2, flag, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.UNKNOWN).orElse(false);
-+    }
-+
-+    public Optional<Boolean> randomTeleport(double d0, double d1, double d2, boolean flag, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause) {
-+        // CraftBukkit end
-         double d3 = this.getX();
-         double d4 = this.getY();
-         double d5 = this.getZ();
-@@ -3592,16 +4118,41 @@
-             }
- 
-             if (flag2) {
--                this.teleportTo(d0, d6, d2);
-+                // CraftBukkit start - Teleport event
-+                // this.teleportTo(d0, d6, d2);
-+
-+                // first set position, to check if the place to teleport is valid
-+                this.setPos(d0, d6, d2);
-                 if (world.noCollision((Entity) this) && !world.containsAnyLiquid(this.getBoundingBox())) {
-                     flag1 = true;
-                 }
-+                // now revert and call event if the teleport place is valid
-+                this.setPos(d3, d4, d5);
-+
-+                if (flag1) {
-+                    if (!(this instanceof EntityPlayer)) {
-+                        EntityTeleportEvent teleport = new EntityTeleportEvent(this.getBukkitEntity(), new Location(this.level().getWorld(), d3, d4, d5), new Location(this.level().getWorld(), d0, d6, d2));
-+                        this.level().getCraftServer().getPluginManager().callEvent(teleport);
-+                        if (!teleport.isCancelled()) {
-+                            Location to = teleport.getTo();
-+                            this.teleportTo(to.getX(), to.getY(), to.getZ());
-+                        } else {
-+                            return Optional.empty();
-+                        }
-+                    } else {
-+                        // player teleport event is called in the underlining code
-+                        if (!((EntityPlayer) this).connection.teleport(d0, d6, d2, this.getYRot(), this.getXRot(), cause)) {
-+                            return Optional.empty();
-+                        }
-+                    }
-+                }
-+                // CraftBukkit end
-             }
-         }
- 
-         if (!flag1) {
--            this.teleportTo(d3, d4, d5);
--            return false;
-+            // this.enderTeleportTo(d3, d4, d5); // CraftBukkit - already set the location back
-+            return Optional.of(false); // CraftBukkit
-         } else {
-             if (flag) {
-                 world.broadcastEntityEvent(this, (byte) 46);
-@@ -3613,7 +4164,7 @@
-                 entitycreature.getNavigation().stop();
-             }
- 
--            return true;
-+            return Optional.of(true); // CraftBukkit
-         }
-     }
- 
-@@ -3706,7 +4257,7 @@
-     }
- 
-     public void stopSleeping() {
--        Optional optional = this.getSleepingPos();
-+        Optional<BlockPosition> optional = this.getSleepingPos(); // CraftBukkit - decompile error
-         World world = this.level();
- 
-         java.util.Objects.requireNonNull(world);
-@@ -3740,7 +4291,7 @@
- 
-     @Nullable
-     public EnumDirection getBedOrientation() {
--        BlockPosition blockposition = (BlockPosition) this.getSleepingPos().orElse((Object) null);
-+        BlockPosition blockposition = (BlockPosition) this.getSleepingPos().orElse(null); // CraftBukkit - decompile error
- 
-         return blockposition != null ? BlockBed.getBedOrientation(this.level(), blockposition) : null;
-     }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/EntitySelector.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/EntitySelector.java.patch
new file mode 100644
index 0000000000..bef21e6fcd
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/EntitySelector.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/entity/EntitySelector.java
++++ b/net/minecraft/world/entity/EntitySelector.java
+@@ -43,7 +43,7 @@
+         Team.CollisionRule scoreboardteambase_enumteampush = scoreboardteam == null ? Team.CollisionRule.ALWAYS : scoreboardteam.getCollisionRule();
+ 
+         return (Predicate) (scoreboardteambase_enumteampush == Team.CollisionRule.NEVER ? Predicates.alwaysFalse() : EntitySelector.NO_SPECTATORS.and((entity1) -> {
+-            if (!entity1.isPushable()) {
++            if (!entity1.canCollideWithBukkit(entity) || !entity.canCollideWithBukkit(entity1)) { // CraftBukkit - collidable API
+                 return false;
+             } else if (entity.level().isClientSide && (!(entity1 instanceof Player) || !((Player) entity1).isLocalPlayer())) {
+                 return false;
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/EntityTameableAnimal.patch b/paper-server/patches/sources/net/minecraft/world/entity/EntityTameableAnimal.patch
deleted file mode 100644
index 3825a9b7fc..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/EntityTameableAnimal.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- a/net/minecraft/world/entity/EntityTameableAnimal.java
-+++ b/net/minecraft/world/entity/EntityTameableAnimal.java
-@@ -28,6 +28,12 @@
- import net.minecraft.world.level.pathfinder.PathfinderNormal;
- import net.minecraft.world.scores.ScoreboardTeam;
- 
-+// CraftBukkit start
-+import org.bukkit.Location;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.event.entity.EntityTeleportEvent;
-+// CraftBukkit end
-+
- public abstract class EntityTameableAnimal extends EntityAnimal implements OwnableEntity {
- 
-     public static final int TELEPORT_WHEN_DISTANCE_IS_SQ = 144;
-@@ -295,7 +301,14 @@
-         if (!this.canTeleportTo(new BlockPosition(i, j, k))) {
-             return false;
-         } else {
--            this.moveTo((double) i + 0.5D, (double) j, (double) k + 0.5D, this.getYRot(), this.getXRot());
-+            // CraftBukkit start
-+            EntityTeleportEvent event = CraftEventFactory.callEntityTeleportEvent(this, (double) i + 0.5D, (double) j, (double) k + 0.5D);
-+            if (event.isCancelled()) {
-+                return false;
-+            }
-+            Location to = event.getTo();
-+            this.moveTo(to.getX(), to.getY(), to.getZ(), to.getYaw(), to.getPitch());
-+            // CraftBukkit end
-             this.navigation.stop();
-             return true;
-         }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/EntityType.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/EntityType.java.patch
new file mode 100644
index 0000000000..3045be366e
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/EntityType.java.patch
@@ -0,0 +1,128 @@
+--- a/net/minecraft/world/entity/EntityType.java
++++ b/net/minecraft/world/entity/EntityType.java
+@@ -176,6 +176,7 @@
+ import net.minecraft.world.phys.Vec3;
+ import net.minecraft.world.phys.shapes.Shapes;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++import org.bukkit.event.entity.CreatureSpawnEvent;
+ import org.slf4j.Logger;
+ 
+ public class EntityType<T extends Entity> implements FeatureElement, EntityTypeTest<Entity, T> {
+@@ -191,7 +192,7 @@
+         return Items.ACACIA_CHEST_BOAT;
+     }), MobCategory.MISC).noLootTable().sized(1.375F, 0.5625F).eyeHeight(0.5625F).clientTrackingRange(10));
+     public static final EntityType<Allay> ALLAY = EntityType.register("allay", EntityType.Builder.of(Allay::new, MobCategory.CREATURE).sized(0.35F, 0.6F).eyeHeight(0.36F).ridingOffset(0.04F).clientTrackingRange(8).updateInterval(2));
+-    public static final EntityType<AreaEffectCloud> AREA_EFFECT_CLOUD = EntityType.register("area_effect_cloud", EntityType.Builder.of(AreaEffectCloud::new, MobCategory.MISC).noLootTable().fireImmune().sized(6.0F, 0.5F).clientTrackingRange(10).updateInterval(Integer.MAX_VALUE));
++    public static final EntityType<AreaEffectCloud> AREA_EFFECT_CLOUD = EntityType.register("area_effect_cloud", EntityType.Builder.of(AreaEffectCloud::new, MobCategory.MISC).noLootTable().fireImmune().sized(6.0F, 0.5F).clientTrackingRange(10).updateInterval(10)); // CraftBukkit - SPIGOT-3729: track area effect clouds
+     public static final EntityType<Armadillo> ARMADILLO = EntityType.register("armadillo", EntityType.Builder.of(Armadillo::new, MobCategory.CREATURE).sized(0.7F, 0.65F).eyeHeight(0.26F).clientTrackingRange(10));
+     public static final EntityType<ArmorStand> ARMOR_STAND = EntityType.register("armor_stand", EntityType.Builder.of(ArmorStand::new, MobCategory.MISC).sized(0.5F, 1.975F).eyeHeight(1.7775F).clientTrackingRange(10));
+     public static final EntityType<Arrow> ARROW = EntityType.register("arrow", EntityType.Builder.of(Arrow::new, MobCategory.MISC).noLootTable().sized(0.5F, 0.5F).eyeHeight(0.13F).clientTrackingRange(4).updateInterval(20));
+@@ -399,7 +400,7 @@
+         return ResourceKey.create(Registries.ENTITY_TYPE, ResourceLocation.withDefaultNamespace(id));
+     }
+ 
+-    private static <T extends Entity> EntityType<T> register(String id, EntityType.Builder<T> type) {
++    private static <T extends Entity> EntityType<T> register(String id, EntityType.Builder type) { // CraftBukkit - decompile error
+         return EntityType.register(EntityType.vanillaEntityId(id), type);
+     }
+ 
+@@ -431,16 +432,23 @@
+ 
+     @Nullable
+     public T spawn(ServerLevel world, @Nullable ItemStack stack, @Nullable Player player, BlockPos pos, EntitySpawnReason spawnReason, boolean alignPosition, boolean invertY) {
+-        Consumer consumer;
++        // CraftBukkit start
++        return this.spawn(world, stack, player, pos, spawnReason, alignPosition, invertY, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG);
++    }
+ 
+-        if (stack != null) {
+-            consumer = EntityType.createDefaultStackConfig(world, stack, player);
++    @Nullable
++    public T spawn(ServerLevel worldserver, @Nullable ItemStack itemstack, @Nullable Player entityhuman, BlockPos blockposition, EntitySpawnReason entityspawnreason, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) {
++        // CraftBukkit end
++        Consumer<T> consumer; // CraftBukkit - decompile error
++
++        if (itemstack != null) {
++            consumer = EntityType.createDefaultStackConfig(worldserver, itemstack, entityhuman);
+         } else {
+             consumer = (entity) -> {
+             };
+         }
+ 
+-        return this.spawn(world, consumer, pos, spawnReason, alignPosition, invertY);
++        return this.spawn(worldserver, consumer, blockposition, entityspawnreason, flag, flag1, spawnReason); // CraftBukkit
+     }
+ 
+     public static <T extends Entity> Consumer<T> createDefaultStackConfig(Level world, ItemStack stack, @Nullable Player player) {
+@@ -464,21 +472,40 @@
+         CustomData customdata = (CustomData) stack.getOrDefault(DataComponents.ENTITY_DATA, CustomData.EMPTY);
+ 
+         return !customdata.isEmpty() ? chained.andThen((entity) -> {
+-            EntityType.updateCustomEntityTag(world, player, entity, customdata);
++            try { EntityType.updateCustomEntityTag(world, player, entity, customdata); } catch (Throwable t) { EntityType.LOGGER.warn("Error loading spawn egg NBT", t); } // CraftBukkit - SPIGOT-5665
+         }) : chained;
+     }
+ 
+     @Nullable
+     public T spawn(ServerLevel world, BlockPos pos, EntitySpawnReason reason) {
+-        return this.spawn(world, (Consumer) null, pos, reason, false, false);
++        // CraftBukkit start
++        return this.spawn(world, pos, reason, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT);
+     }
+ 
+     @Nullable
++    public T spawn(ServerLevel worldserver, BlockPos blockposition, EntitySpawnReason entityspawnreason, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) {
++        return this.spawn(worldserver, (Consumer<T>) null, blockposition, entityspawnreason, false, false, spawnReason); // CraftBukkit - decompile error
++        // CraftBukkit end
++    }
++
++    @Nullable
+     public T spawn(ServerLevel world, @Nullable Consumer<T> afterConsumer, BlockPos pos, EntitySpawnReason reason, boolean alignPosition, boolean invertY) {
+-        T t0 = this.create(world, afterConsumer, pos, reason, alignPosition, invertY);
++        // CraftBukkit start
++        return this.spawn(world, afterConsumer, pos, reason, alignPosition, invertY, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT);
++    }
++
++    @Nullable
++    public T spawn(ServerLevel worldserver, @Nullable Consumer<T> consumer, BlockPos blockposition, EntitySpawnReason entityspawnreason, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) {
++        // CraftBukkit end
++        T t0 = this.create(worldserver, consumer, blockposition, entityspawnreason, flag, flag1);
+ 
+         if (t0 != null) {
+-            world.addFreshEntityWithPassengers(t0);
++            // CraftBukkit start
++            worldserver.addFreshEntityWithPassengers(t0, spawnReason);
++            if (t0.isRemoved()) {
++                return null; // Don't return an entity when CreatureSpawnEvent is canceled
++            }
++            // CraftBukkit end
+             if (t0 instanceof Mob) {
+                 Mob entityinsentient = (Mob) t0;
+ 
+@@ -657,7 +684,7 @@
+             }
+ 
+             return entity;
+-        }).orElse((Object) null);
++        }).orElse(null); // CraftBukkit - decompile error
+     }
+ 
+     public static Stream<Entity> loadEntitiesRecursive(final List<? extends Tag> entityNbtList, final Level world, final EntitySpawnReason reason) {
+@@ -718,7 +745,7 @@
+ 
+     @Nullable
+     public T tryCast(Entity obj) {
+-        return obj.getType() == this ? obj : null;
++        return obj.getType() == this ? (T) obj : null; // CraftBukkit - decompile error
+     }
+ 
+     @Override
+@@ -791,7 +818,7 @@
+             this.canSpawnFarFromPlayer = spawnGroup == MobCategory.CREATURE || spawnGroup == MobCategory.MISC;
+         }
+ 
+-        public static <T extends Entity> EntityType.Builder<T> of(EntityType.EntityFactory<T> factory, MobCategory spawnGroup) {
++        public static <T extends Entity> EntityType.Builder<T> of(EntityType.EntityFactory factory, MobCategory spawnGroup) { // CraftBukkit - decompile error
+             return new EntityType.Builder<>(factory, spawnGroup);
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/EntityTypes.patch b/paper-server/patches/sources/net/minecraft/world/entity/EntityTypes.patch
deleted file mode 100644
index 7f9b3654d8..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/EntityTypes.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/net/minecraft/world/entity/EntityTypes.java
-+++ b/net/minecraft/world/entity/EntityTypes.java
-@@ -176,6 +176,7 @@
- import net.minecraft.world.phys.Vec3D;
- import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapes;
-+import org.bukkit.event.entity.CreatureSpawnEvent;
- import org.slf4j.Logger;
- 
- public class EntityTypes<T extends Entity> implements FeatureElement, EntityTypeTest<Entity, T> {
-@@ -191,7 +192,7 @@
-         return Items.ACACIA_CHEST_BOAT;
-     }), EnumCreatureType.MISC).noLootTable().sized(1.375F, 0.5625F).eyeHeight(0.5625F).clientTrackingRange(10));
-     public static final EntityTypes<Allay> ALLAY = register("allay", EntityTypes.Builder.of(Allay::new, EnumCreatureType.CREATURE).sized(0.35F, 0.6F).eyeHeight(0.36F).ridingOffset(0.04F).clientTrackingRange(8).updateInterval(2));
--    public static final EntityTypes<EntityAreaEffectCloud> AREA_EFFECT_CLOUD = register("area_effect_cloud", EntityTypes.Builder.of(EntityAreaEffectCloud::new, EnumCreatureType.MISC).noLootTable().fireImmune().sized(6.0F, 0.5F).clientTrackingRange(10).updateInterval(Integer.MAX_VALUE));
-+    public static final EntityTypes<EntityAreaEffectCloud> AREA_EFFECT_CLOUD = register("area_effect_cloud", EntityTypes.Builder.of(EntityAreaEffectCloud::new, EnumCreatureType.MISC).noLootTable().fireImmune().sized(6.0F, 0.5F).clientTrackingRange(10).updateInterval(10)); // CraftBukkit - SPIGOT-3729: track area effect clouds
-     public static final EntityTypes<Armadillo> ARMADILLO = register("armadillo", EntityTypes.Builder.of(Armadillo::new, EnumCreatureType.CREATURE).sized(0.7F, 0.65F).eyeHeight(0.26F).clientTrackingRange(10));
-     public static final EntityTypes<EntityArmorStand> ARMOR_STAND = register("armor_stand", EntityTypes.Builder.of(EntityArmorStand::new, EnumCreatureType.MISC).sized(0.5F, 1.975F).eyeHeight(1.7775F).clientTrackingRange(10));
-     public static final EntityTypes<EntityTippedArrow> ARROW = register("arrow", EntityTypes.Builder.of(EntityTippedArrow::new, EnumCreatureType.MISC).noLootTable().sized(0.5F, 0.5F).eyeHeight(0.13F).clientTrackingRange(4).updateInterval(20));
-@@ -399,7 +400,7 @@
-         return ResourceKey.create(Registries.ENTITY_TYPE, MinecraftKey.withDefaultNamespace(s));
-     }
- 
--    private static <T extends Entity> EntityTypes<T> register(String s, EntityTypes.Builder<T> entitytypes_builder) {
-+    private static <T extends Entity> EntityTypes<T> register(String s, EntityTypes.Builder entitytypes_builder) { // CraftBukkit - decompile error
-         return register(vanillaEntityId(s), entitytypes_builder);
-     }
- 
-@@ -431,7 +432,14 @@
- 
-     @Nullable
-     public T spawn(WorldServer worldserver, @Nullable ItemStack itemstack, @Nullable EntityHuman entityhuman, BlockPosition blockposition, EntitySpawnReason entityspawnreason, boolean flag, boolean flag1) {
--        Consumer consumer;
-+        // CraftBukkit start
-+        return this.spawn(worldserver, itemstack, entityhuman, blockposition, entityspawnreason, flag, flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG);
-+    }
-+
-+    @Nullable
-+    public T spawn(WorldServer worldserver, @Nullable ItemStack itemstack, @Nullable EntityHuman entityhuman, BlockPosition blockposition, EntitySpawnReason entityspawnreason, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) {
-+        // CraftBukkit end
-+        Consumer<T> consumer; // CraftBukkit - decompile error
- 
-         if (itemstack != null) {
-             consumer = createDefaultStackConfig(worldserver, itemstack, entityhuman);
-@@ -440,7 +448,7 @@
-             };
-         }
- 
--        return this.spawn(worldserver, consumer, blockposition, entityspawnreason, flag, flag1);
-+        return this.spawn(worldserver, consumer, blockposition, entityspawnreason, flag, flag1, spawnReason); // CraftBukkit
-     }
- 
-     public static <T extends Entity> Consumer<T> createDefaultStackConfig(World world, ItemStack itemstack, @Nullable EntityHuman entityhuman) {
-@@ -464,21 +472,40 @@
-         CustomData customdata = (CustomData) itemstack.getOrDefault(DataComponents.ENTITY_DATA, CustomData.EMPTY);
- 
-         return !customdata.isEmpty() ? consumer.andThen((entity) -> {
--            updateCustomEntityTag(world, entityhuman, entity, customdata);
-+            try { updateCustomEntityTag(world, entityhuman, entity, customdata); } catch (Throwable t) { LOGGER.warn("Error loading spawn egg NBT", t); } // CraftBukkit - SPIGOT-5665
-         }) : consumer;
-     }
- 
-     @Nullable
-     public T spawn(WorldServer worldserver, BlockPosition blockposition, EntitySpawnReason entityspawnreason) {
--        return this.spawn(worldserver, (Consumer) null, blockposition, entityspawnreason, false, false);
-+        // CraftBukkit start
-+        return this.spawn(worldserver, blockposition, entityspawnreason, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT);
-+    }
-+
-+    @Nullable
-+    public T spawn(WorldServer worldserver, BlockPosition blockposition, EntitySpawnReason entityspawnreason, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) {
-+        return this.spawn(worldserver, (Consumer<T>) null, blockposition, entityspawnreason, false, false, spawnReason); // CraftBukkit - decompile error
-+        // CraftBukkit end
-     }
- 
-     @Nullable
-     public T spawn(WorldServer worldserver, @Nullable Consumer<T> consumer, BlockPosition blockposition, EntitySpawnReason entityspawnreason, boolean flag, boolean flag1) {
-+        // CraftBukkit start
-+        return this.spawn(worldserver, consumer, blockposition, entityspawnreason, flag, flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT);
-+    }
-+
-+    @Nullable
-+    public T spawn(WorldServer worldserver, @Nullable Consumer<T> consumer, BlockPosition blockposition, EntitySpawnReason entityspawnreason, boolean flag, boolean flag1, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) {
-+        // CraftBukkit end
-         T t0 = this.create(worldserver, consumer, blockposition, entityspawnreason, flag, flag1);
- 
-         if (t0 != null) {
--            worldserver.addFreshEntityWithPassengers(t0);
-+            // CraftBukkit start
-+            worldserver.addFreshEntityWithPassengers(t0, spawnReason);
-+            if (t0.isRemoved()) {
-+                return null; // Don't return an entity when CreatureSpawnEvent is canceled
-+            }
-+            // CraftBukkit end
-             if (t0 instanceof EntityInsentient) {
-                 EntityInsentient entityinsentient = (EntityInsentient) t0;
- 
-@@ -657,7 +684,7 @@
-             }
- 
-             return entity;
--        }).orElse((Object) null);
-+        }).orElse(null); // CraftBukkit - decompile error
-     }
- 
-     public static Stream<Entity> loadEntitiesRecursive(final List<? extends NBTBase> list, final World world, final EntitySpawnReason entityspawnreason) {
-@@ -718,7 +745,7 @@
- 
-     @Nullable
-     public T tryCast(Entity entity) {
--        return entity.getType() == this ? entity : null;
-+        return entity.getType() == this ? (T) entity : null; // CraftBukkit - decompile error
-     }
- 
-     @Override
-@@ -791,7 +818,7 @@
-             this.canSpawnFarFromPlayer = enumcreaturetype == EnumCreatureType.CREATURE || enumcreaturetype == EnumCreatureType.MISC;
-         }
- 
--        public static <T extends Entity> EntityTypes.Builder<T> of(EntityTypes.b<T> entitytypes_b, EnumCreatureType enumcreaturetype) {
-+        public static <T extends Entity> EntityTypes.Builder<T> of(EntityTypes.b entitytypes_b, EnumCreatureType enumcreaturetype) { // CraftBukkit - decompile error
-             return new EntityTypes.Builder<>(entitytypes_b, enumcreaturetype);
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ExperienceOrb.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/ExperienceOrb.java.patch
new file mode 100644
index 0000000000..ba47e3b211
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ExperienceOrb.java.patch
@@ -0,0 +1,142 @@
+--- a/net/minecraft/world/entity/ExperienceOrb.java
++++ b/net/minecraft/world/entity/ExperienceOrb.java
+@@ -24,6 +24,13 @@
+ import net.minecraft.world.level.entity.EntityTypeTest;
+ import net.minecraft.world.phys.AABB;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.event.entity.EntityRemoveEvent;
++import org.bukkit.event.entity.EntityTargetLivingEntityEvent;
++import org.bukkit.event.entity.EntityTargetEvent;
++import org.bukkit.event.player.PlayerExpCooldownChangeEvent;
++// CraftBukkit end
+ 
+ public class ExperienceOrb extends Entity {
+ 
+@@ -68,6 +75,7 @@
+     @Override
+     public void tick() {
+         super.tick();
++        Player prevTarget = this.followingPlayer;// CraftBukkit - store old target
+         this.xo = this.getX();
+         this.yo = this.getY();
+         this.zo = this.getZ();
+@@ -93,7 +101,22 @@
+             this.followingPlayer = null;
+         }
+ 
+-        if (this.followingPlayer != null) {
++        // CraftBukkit start
++        boolean cancelled = false;
++        if (this.followingPlayer != prevTarget) {
++            EntityTargetLivingEntityEvent event = CraftEventFactory.callEntityTargetLivingEvent(this, this.followingPlayer, (this.followingPlayer != null) ? EntityTargetEvent.TargetReason.CLOSEST_PLAYER : EntityTargetEvent.TargetReason.FORGOT_TARGET);
++            LivingEntity target = (event.getTarget() == null) ? null : ((org.bukkit.craftbukkit.entity.CraftLivingEntity) event.getTarget()).getHandle();
++            cancelled = event.isCancelled();
++
++            if (cancelled) {
++                this.followingPlayer = prevTarget;
++            } else {
++                this.followingPlayer = (target instanceof Player) ? (Player) target : null;
++            }
++        }
++
++        if (this.followingPlayer != null && !cancelled) {
++            // CraftBukkit end
+             Vec3 vec3d = new Vec3(this.followingPlayer.getX() - this.getX(), this.followingPlayer.getY() + (double) this.followingPlayer.getEyeHeight() / 2.0D - this.getY(), this.followingPlayer.getZ() - this.getZ());
+             double d0 = vec3d.lengthSqr();
+ 
+@@ -121,7 +144,7 @@
+ 
+         ++this.age;
+         if (this.age >= 6000) {
+-            this.discard();
++            this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
+         }
+ 
+     }
+@@ -190,7 +213,7 @@
+     private void merge(ExperienceOrb other) {
+         this.count += other.count;
+         this.age = Math.min(this.age, other.age);
+-        other.discard();
++        other.discard(EntityRemoveEvent.Cause.MERGE); // CraftBukkit - add Bukkit remove cause
+     }
+ 
+     private void setUnderwaterMovement() {
+@@ -215,7 +238,7 @@
+             this.markHurt();
+             this.health = (int) ((float) this.health - amount);
+             if (this.health <= 0) {
+-                this.discard();
++                this.discard(EntityRemoveEvent.Cause.DEATH); // CraftBukkit - add Bukkit remove cause
+             }
+ 
+             return true;
+@@ -242,17 +265,17 @@
+     public void playerTouch(Player player) {
+         if (player instanceof ServerPlayer entityplayer) {
+             if (player.takeXpDelay == 0) {
+-                player.takeXpDelay = 2;
++                player.takeXpDelay = CraftEventFactory.callPlayerXpCooldownEvent(player, 2, PlayerExpCooldownChangeEvent.ChangeReason.PICKUP_ORB).getNewCooldown(); // CraftBukkit - entityhuman.takeXpDelay = 2;
+                 player.take(this, 1);
+                 int i = this.repairPlayerItems(entityplayer, this.value);
+ 
+                 if (i > 0) {
+-                    player.giveExperiencePoints(i);
++                    player.giveExperiencePoints(CraftEventFactory.callPlayerExpChangeEvent(player, i).getAmount()); // CraftBukkit - this.value -> event.getAmount()
+                 }
+ 
+                 --this.count;
+                 if (this.count == 0) {
+-                    this.discard();
++                    this.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
+                 }
+             }
+ 
+@@ -266,12 +289,20 @@
+             ItemStack itemstack = ((EnchantedItemInUse) optional.get()).itemStack();
+             int j = EnchantmentHelper.modifyDurabilityToRepairFromXp(player.serverLevel(), itemstack, amount);
+             int k = Math.min(j, itemstack.getDamageValue());
++            // CraftBukkit start
++            org.bukkit.event.player.PlayerItemMendEvent event = CraftEventFactory.callPlayerItemMendEvent(player, this, itemstack, optional.get().inSlot(), k);
++            k = event.getRepairAmount();
++            if (event.isCancelled()) {
++                return amount;
++            }
++            // CraftBukkit end
+ 
+             itemstack.setDamageValue(itemstack.getDamageValue() - k);
+             if (k > 0) {
+                 int l = amount - k * amount / j;
+ 
+                 if (l > 0) {
++                    this.value = l; // CraftBukkit - update exp value of orb for PlayerItemMendEvent calls
+                     return this.repairPlayerItems(player, l);
+                 }
+             }
+@@ -291,6 +322,24 @@
+     }
+ 
+     public static int getExperienceValue(int value) {
++        // CraftBukkit start
++        if (value > 162670129) return value - 100000;
++        if (value > 81335063) return 81335063;
++        if (value > 40667527) return 40667527;
++        if (value > 20333759) return 20333759;
++        if (value > 10166857) return 10166857;
++        if (value > 5083423) return 5083423;
++        if (value > 2541701) return 2541701;
++        if (value > 1270849) return 1270849;
++        if (value > 635413) return 635413;
++        if (value > 317701) return 317701;
++        if (value > 158849) return 158849;
++        if (value > 79423) return 79423;
++        if (value > 39709) return 39709;
++        if (value > 19853) return 19853;
++        if (value > 9923) return 9923;
++        if (value > 4957) return 4957;
++        // CraftBukkit end
+         return value >= 2477 ? 2477 : (value >= 1237 ? 1237 : (value >= 617 ? 617 : (value >= 307 ? 307 : (value >= 149 ? 149 : (value >= 73 ? 73 : (value >= 37 ? 37 : (value >= 17 ? 17 : (value >= 7 ? 7 : (value >= 3 ? 3 : 1)))))))));
+     }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/IEntitySelector.patch b/paper-server/patches/sources/net/minecraft/world/entity/IEntitySelector.patch
deleted file mode 100644
index 35099c5ae7..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/IEntitySelector.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/entity/IEntitySelector.java
-+++ b/net/minecraft/world/entity/IEntitySelector.java
-@@ -43,7 +43,7 @@
-         ScoreboardTeamBase.EnumTeamPush scoreboardteambase_enumteampush = scoreboardteam == null ? ScoreboardTeamBase.EnumTeamPush.ALWAYS : scoreboardteam.getCollisionRule();
- 
-         return (Predicate) (scoreboardteambase_enumteampush == ScoreboardTeamBase.EnumTeamPush.NEVER ? Predicates.alwaysFalse() : IEntitySelector.NO_SPECTATORS.and((entity1) -> {
--            if (!entity1.isPushable()) {
-+            if (!entity1.canCollideWithBukkit(entity) || !entity.canCollideWithBukkit(entity1)) { // CraftBukkit - collidable API
-                 return false;
-             } else if (entity.level().isClientSide && (!(entity1 instanceof EntityHuman) || !((EntityHuman) entity1).isLocalPlayer())) {
-                 return false;
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/Interaction.patch b/paper-server/patches/sources/net/minecraft/world/entity/Interaction.java.patch
similarity index 62%
rename from paper-server/patches/sources/net/minecraft/world/entity/Interaction.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/Interaction.java.patch
index e19f5f6026..e799453694 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/Interaction.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/Interaction.java.patch
@@ -1,7 +1,7 @@
 --- a/net/minecraft/world/entity/Interaction.java
 +++ b/net/minecraft/world/entity/Interaction.java
 @@ -27,6 +27,12 @@
- import net.minecraft.world.phys.Vec3D;
+ import net.minecraft.world.phys.Vec3;
  import org.slf4j.Logger;
  
 +// CraftBukkit start
@@ -14,18 +14,18 @@
  
      private static final Logger LOGGER = LogUtils.getLogger();
 @@ -65,7 +71,7 @@
-             this.setHeight(nbttagcompound.getFloat("height"));
+             this.setHeight(nbt.getFloat("height"));
          }
  
 -        DataResult dataresult;
-+        DataResult<com.mojang.datafixers.util.Pair<Interaction.PlayerAction, net.minecraft.nbt.NBTBase>> dataresult; // CraftBukkit - decompile error
++        DataResult<com.mojang.datafixers.util.Pair<Interaction.PlayerAction, net.minecraft.nbt.Tag>> dataresult; // CraftBukkit - decompile error
          Logger logger;
  
-         if (nbttagcompound.contains("attack")) {
+         if (nbt.contains("attack")) {
 @@ -145,9 +151,16 @@
      @Override
-     public boolean skipAttackInteraction(Entity entity) {
-         if (entity instanceof EntityHuman entityhuman) {
+     public boolean skipAttackInteraction(Entity attacker) {
+         if (attacker instanceof Player entityhuman) {
 +            // CraftBukkit start
 +            DamageSource source = entityhuman.damageSources().playerAttack(entityhuman);
 +            EntityDamageEvent event = CraftEventFactory.callNonLivingEntityDamageEvent(this, source, 1.0F, false);
@@ -34,9 +34,9 @@
 +            }
 +            // CraftBukkit end
              this.attack = new Interaction.PlayerAction(entityhuman.getUUID(), this.level().getGameTime());
-             if (entityhuman instanceof EntityPlayer entityplayer) {
--                CriterionTriggers.PLAYER_HURT_ENTITY.trigger(entityplayer, this, entityhuman.damageSources().generic(), 1.0F, 1.0F, false);
-+                CriterionTriggers.PLAYER_HURT_ENTITY.trigger(entityplayer, this, source, (float) event.getFinalDamage(), 1.0F, false); // CraftBukkit
+             if (entityhuman instanceof ServerPlayer entityplayer) {
+-                CriteriaTriggers.PLAYER_HURT_ENTITY.trigger(entityplayer, this, entityhuman.damageSources().generic(), 1.0F, 1.0F, false);
++                CriteriaTriggers.PLAYER_HURT_ENTITY.trigger(entityplayer, this, source, (float) event.getFinalDamage(), 1.0F, false); // CraftBukkit
              }
  
              return !this.getResponse();
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/SaddleStorage.patch b/paper-server/patches/sources/net/minecraft/world/entity/ItemBasedSteering.java.patch
similarity index 59%
rename from paper-server/patches/sources/net/minecraft/world/entity/SaddleStorage.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/ItemBasedSteering.java.patch
index 087cd81c37..2f4eab4bc8 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/SaddleStorage.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ItemBasedSteering.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/world/entity/SaddleStorage.java
-+++ b/net/minecraft/world/entity/SaddleStorage.java
+--- a/net/minecraft/world/entity/ItemBasedSteering.java
++++ b/net/minecraft/world/entity/ItemBasedSteering.java
 @@ -53,6 +53,14 @@
          return (Integer) this.entityData.get(this.boostTimeAccessor);
      }
@@ -12,6 +12,6 @@
 +    }
 +    // CraftBukkit end
 +
-     public void addAdditionalSaveData(NBTTagCompound nbttagcompound) {
-         nbttagcompound.putBoolean("Saddle", this.hasSaddle());
+     public void addAdditionalSaveData(CompoundTag nbt) {
+         nbt.putBoolean("Saddle", this.hasSaddle());
      }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/Leashable.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/Leashable.java.patch
new file mode 100644
index 0000000000..109ed9f981
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/Leashable.java.patch
@@ -0,0 +1,125 @@
+--- a/net/minecraft/world/entity/Leashable.java
++++ b/net/minecraft/world/entity/Leashable.java
+@@ -15,6 +15,10 @@
+ import net.minecraft.world.level.GameRules;
+ import net.minecraft.world.level.ItemLike;
+ import net.minecraft.world.level.Level;
++// CraftBukkit start
++import org.bukkit.event.entity.EntityUnleashEvent;
++import org.bukkit.event.entity.EntityUnleashEvent.UnleashReason;
++// CraftBukkit end
+ 
+ public interface Leashable {
+ 
+@@ -45,7 +49,7 @@
+ 
+     default void setDelayedLeashHolderId(int unresolvedLeashHolderId) {
+         this.setLeashData(new Leashable.LeashData(unresolvedLeashHolderId));
+-        Leashable.dropLeash((Entity) this, false, false);
++        Leashable.dropLeash((Entity & Leashable) this, false, false); // CraftBukkit - decompile error
+     }
+ 
+     default void readLeashData(CompoundTag nbt) {
+@@ -64,7 +68,7 @@
+             return new Leashable.LeashData(Either.left(nbt.getCompound("leash").getUUID("UUID")));
+         } else {
+             if (nbt.contains("leash", 11)) {
+-                Either<UUID, BlockPos> either = (Either) NbtUtils.readBlockPos(nbt, "leash").map(Either::right).orElse((Object) null);
++                Either<UUID, BlockPos> either = (Either) NbtUtils.readBlockPos(nbt, "leash").map(Either::right).orElse(null); // CraftBukkit - decompile error
+ 
+                 if (either != null) {
+                     return new Leashable.LeashData(either);
+@@ -79,6 +83,11 @@
+         if (leashData != null) {
+             Either<UUID, BlockPos> either = leashData.delayedLeashInfo;
+             Entity entity = leashData.leashHolder;
++            // CraftBukkit start - SPIGOT-7487: Don't save (and possible drop) leash, when the holder was removed by a plugin
++            if (entity != null && entity.pluginRemoved) {
++                return;
++            }
++            // CraftBukkit end
+ 
+             if (entity instanceof LeashFenceKnotEntity) {
+                 LeashFenceKnotEntity entityleash = (LeashFenceKnotEntity) entity;
+@@ -121,7 +130,9 @@
+                 }
+ 
+                 if (entity.tickCount > 100) {
++                    entity.forceDrops = true; // CraftBukkit
+                     entity.spawnAtLocation(worldserver, (ItemLike) Items.LEAD);
++                    entity.forceDrops = false; // CraftBukkit
+                     ((Leashable) entity).setLeashData((Leashable.LeashData) null);
+                 }
+             }
+@@ -130,11 +141,11 @@
+     }
+ 
+     default void dropLeash() {
+-        Leashable.dropLeash((Entity) this, true, true);
++        Leashable.dropLeash((Entity & Leashable) this, true, true); // CraftBukkit - decompile error
+     }
+ 
+     default void removeLeash() {
+-        Leashable.dropLeash((Entity) this, true, false);
++        Leashable.dropLeash((Entity & Leashable) this, true, false); // CraftBukkit - decompile error
+     }
+ 
+     default void onLeashRemoved() {}
+@@ -151,7 +162,9 @@
+                 ServerLevel worldserver = (ServerLevel) world;
+ 
+                 if (dropItem) {
++                    entity.forceDrops = true; // CraftBukkit
+                     entity.spawnAtLocation(worldserver, (ItemLike) Items.LEAD);
++                    entity.forceDrops = false; // CraftBukkit
+                 }
+ 
+                 if (sendPacket) {
+@@ -171,7 +184,8 @@
+ 
+         if (leashable_a != null && leashable_a.leashHolder != null) {
+             if (!entity.isAlive() || !leashable_a.leashHolder.isAlive()) {
+-                if (world.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
++                world.getCraftServer().getPluginManager().callEvent(new EntityUnleashEvent(entity.getBukkitEntity(), (!entity.isAlive()) ? UnleashReason.PLAYER_UNLEASH : UnleashReason.HOLDER_GONE)); // CraftBukkit
++                if (world.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS) && !entity.pluginRemoved) { // CraftBukkit - SPIGOT-7487: Don't drop leash, when the holder was removed by a plugin
+                     ((Leashable) entity).dropLeash();
+                 } else {
+                     ((Leashable) entity).removeLeash();
+@@ -205,13 +219,18 @@
+     }
+ 
+     default void leashTooFarBehaviour() {
++        // CraftBukkit start
++        if (this instanceof Entity entity) {
++            entity.level().getCraftServer().getPluginManager().callEvent(new EntityUnleashEvent(entity.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE));
++        }
++        // CraftBukkit end
+         this.dropLeash();
+     }
+ 
+     default void closeRangeLeashBehaviour(Entity entity) {}
+ 
+     default void elasticRangeLeashBehaviour(Entity leashHolder, float distance) {
+-        Leashable.legacyElasticRangeLeashBehaviour((Entity) this, leashHolder, distance);
++        Leashable.legacyElasticRangeLeashBehaviour((Entity & Leashable) this, leashHolder, distance); // CraftBukkit - decompile error
+     }
+ 
+     private static <E extends Entity & Leashable> void legacyElasticRangeLeashBehaviour(E entity, Entity leashHolder, float distance) {
+@@ -223,7 +242,7 @@
+     }
+ 
+     default void setLeashedTo(Entity leashHolder, boolean sendPacket) {
+-        this.setLeashedTo((Entity) this, leashHolder, sendPacket);
++        Leashable.setLeashedTo((Entity & Leashable) this, leashHolder, sendPacket); // CraftBukkit - decompile error
+     }
+ 
+     private static <E extends Entity & Leashable> void setLeashedTo(E entity, Entity leashHolder, boolean sendPacket) {
+@@ -254,7 +273,7 @@
+ 
+     @Nullable
+     default Entity getLeashHolder() {
+-        return Leashable.getLeashHolder((Entity) this);
++        return Leashable.getLeashHolder((Entity & Leashable) this); // CraftBukkit - decompile error
+     }
+ 
+     @Nullable
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/Leashable.patch b/paper-server/patches/sources/net/minecraft/world/entity/Leashable.patch
deleted file mode 100644
index eb60e25af7..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/Leashable.patch
+++ /dev/null
@@ -1,126 +0,0 @@
---- a/net/minecraft/world/entity/Leashable.java
-+++ b/net/minecraft/world/entity/Leashable.java
-@@ -16,6 +16,11 @@
- import net.minecraft.world.level.IMaterial;
- import net.minecraft.world.level.World;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.EntityUnleashEvent;
-+import org.bukkit.event.entity.EntityUnleashEvent.UnleashReason;
-+// CraftBukkit end
-+
- public interface Leashable {
- 
-     String LEASH_TAG = "leash";
-@@ -45,7 +50,7 @@
- 
-     default void setDelayedLeashHolderId(int i) {
-         this.setLeashData(new Leashable.a(i));
--        dropLeash((Entity) this, false, false);
-+        dropLeash((Entity & Leashable) this, false, false); // CraftBukkit - decompile error
-     }
- 
-     default void readLeashData(NBTTagCompound nbttagcompound) {
-@@ -64,7 +69,7 @@
-             return new Leashable.a(Either.left(nbttagcompound.getCompound("leash").getUUID("UUID")));
-         } else {
-             if (nbttagcompound.contains("leash", 11)) {
--                Either<UUID, BlockPosition> either = (Either) GameProfileSerializer.readBlockPos(nbttagcompound, "leash").map(Either::right).orElse((Object) null);
-+                Either<UUID, BlockPosition> either = (Either) GameProfileSerializer.readBlockPos(nbttagcompound, "leash").map(Either::right).orElse(null); // CraftBukkit - decompile error
- 
-                 if (either != null) {
-                     return new Leashable.a(either);
-@@ -79,6 +84,11 @@
-         if (leashable_a != null) {
-             Either<UUID, BlockPosition> either = leashable_a.delayedLeashInfo;
-             Entity entity = leashable_a.leashHolder;
-+            // CraftBukkit start - SPIGOT-7487: Don't save (and possible drop) leash, when the holder was removed by a plugin
-+            if (entity != null && entity.pluginRemoved) {
-+                return;
-+            }
-+            // CraftBukkit end
- 
-             if (entity instanceof EntityLeash) {
-                 EntityLeash entityleash = (EntityLeash) entity;
-@@ -121,7 +131,9 @@
-                 }
- 
-                 if (e0.tickCount > 100) {
-+                    e0.forceDrops = true; // CraftBukkit
-                     e0.spawnAtLocation(worldserver, (IMaterial) Items.LEAD);
-+                    e0.forceDrops = false; // CraftBukkit
-                     ((Leashable) e0).setLeashData((Leashable.a) null);
-                 }
-             }
-@@ -130,11 +142,11 @@
-     }
- 
-     default void dropLeash() {
--        dropLeash((Entity) this, true, true);
-+        dropLeash((Entity & Leashable) this, true, true); // CraftBukkit - decompile error
-     }
- 
-     default void removeLeash() {
--        dropLeash((Entity) this, true, false);
-+        dropLeash((Entity & Leashable) this, true, false); // CraftBukkit - decompile error
-     }
- 
-     default void onLeashRemoved() {}
-@@ -151,7 +163,9 @@
-                 WorldServer worldserver = (WorldServer) world;
- 
-                 if (flag1) {
-+                    e0.forceDrops = true; // CraftBukkit
-                     e0.spawnAtLocation(worldserver, (IMaterial) Items.LEAD);
-+                    e0.forceDrops = false; // CraftBukkit
-                 }
- 
-                 if (flag) {
-@@ -171,7 +185,8 @@
- 
-         if (leashable_a != null && leashable_a.leashHolder != null) {
-             if (!e0.isAlive() || !leashable_a.leashHolder.isAlive()) {
--                if (worldserver.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
-+                worldserver.getCraftServer().getPluginManager().callEvent(new EntityUnleashEvent(e0.getBukkitEntity(), (!e0.isAlive()) ? UnleashReason.PLAYER_UNLEASH : UnleashReason.HOLDER_GONE)); // CraftBukkit
-+                if (worldserver.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS) && !e0.pluginRemoved) { // CraftBukkit - SPIGOT-7487: Don't drop leash, when the holder was removed by a plugin
-                     ((Leashable) e0).dropLeash();
-                 } else {
-                     ((Leashable) e0).removeLeash();
-@@ -205,13 +220,18 @@
-     }
- 
-     default void leashTooFarBehaviour() {
-+        // CraftBukkit start
-+        if (this instanceof Entity entity) {
-+            entity.level().getCraftServer().getPluginManager().callEvent(new EntityUnleashEvent(entity.getBukkitEntity(), EntityUnleashEvent.UnleashReason.DISTANCE));
-+        }
-+        // CraftBukkit end
-         this.dropLeash();
-     }
- 
-     default void closeRangeLeashBehaviour(Entity entity) {}
- 
-     default void elasticRangeLeashBehaviour(Entity entity, float f) {
--        legacyElasticRangeLeashBehaviour((Entity) this, entity, f);
-+        legacyElasticRangeLeashBehaviour((Entity & Leashable) this, entity, f); // CraftBukkit - decompile error
-     }
- 
-     private static <E extends Entity & Leashable> void legacyElasticRangeLeashBehaviour(E e0, Entity entity, float f) {
-@@ -223,7 +243,7 @@
-     }
- 
-     default void setLeashedTo(Entity entity, boolean flag) {
--        setLeashedTo((Entity) this, entity, flag);
-+        setLeashedTo((Entity & Leashable) this, entity, flag); // CraftBukkit - decompile error
-     }
- 
-     private static <E extends Entity & Leashable> void setLeashedTo(E e0, Entity entity, boolean flag) {
-@@ -254,7 +274,7 @@
- 
-     @Nullable
-     default Entity getLeashHolder() {
--        return getLeashHolder((Entity) this);
-+        return getLeashHolder((Entity & Leashable) this); // CraftBukkit - decompile error
-     }
- 
-     @Nullable
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/EntityLightning.patch b/paper-server/patches/sources/net/minecraft/world/entity/LightningBolt.java.patch
similarity index 69%
rename from paper-server/patches/sources/net/minecraft/world/entity/EntityLightning.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/LightningBolt.java.patch
index 04073819bc..146c9e2a04 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/EntityLightning.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/LightningBolt.java.patch
@@ -1,18 +1,17 @@
---- a/net/minecraft/world/entity/EntityLightning.java
-+++ b/net/minecraft/world/entity/EntityLightning.java
-@@ -31,6 +31,11 @@
- import net.minecraft.world.phys.AxisAlignedBB;
- import net.minecraft.world.phys.Vec3D;
- 
+--- a/net/minecraft/world/entity/LightningBolt.java
++++ b/net/minecraft/world/entity/LightningBolt.java
+@@ -30,6 +30,10 @@
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import net.minecraft.world.phys.AABB;
+ import net.minecraft.world.phys.Vec3;
 +// CraftBukkit start
 +import org.bukkit.craftbukkit.event.CraftEventFactory;
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +// CraftBukkit end
-+
- public class EntityLightning extends Entity {
  
-     private static final int START_LIFE = 2;
-@@ -120,7 +125,7 @@
+ public class LightningBolt extends Entity {
+ 
+@@ -120,7 +124,7 @@
                      }
                  }
  
@@ -21,38 +20,38 @@
              } else if (this.life < -this.random.nextInt(10)) {
                  --this.flashes;
                  this.life = 1;
-@@ -129,7 +134,7 @@
+@@ -129,7 +133,7 @@
              }
          }
  
 -        if (this.life >= 0) {
 +        if (this.life >= 0 && !this.visualOnly) { // CraftBukkit - add !this.visualOnly
-             if (!(this.level() instanceof WorldServer)) {
+             if (!(this.level() instanceof ServerLevel)) {
                  this.level().setSkyFlashTime(2);
              } else if (!this.visualOnly) {
-@@ -169,8 +174,12 @@
-                     IBlockData iblockdata = BlockFireAbstract.getState(this.level(), blockposition);
+@@ -169,8 +173,12 @@
+                     BlockState iblockdata = BaseFireBlock.getState(this.level(), blockposition);
  
                      if (this.level().getBlockState(blockposition).isAir() && iblockdata.canSurvive(this.level(), blockposition)) {
 -                        this.level().setBlockAndUpdate(blockposition, iblockdata);
 -                        ++this.blocksSetOnFire;
 +                        // CraftBukkit start - add "!visualOnly"
-+                        if (!visualOnly && !CraftEventFactory.callBlockIgniteEvent(this.level(), blockposition, this).isCancelled()) {
++                        if (!this.visualOnly && !CraftEventFactory.callBlockIgniteEvent(this.level(), blockposition, this).isCancelled()) {
 +                            this.level().setBlockAndUpdate(blockposition, iblockdata);
 +                            ++this.blocksSetOnFire;
 +                        }
 +                        // CraftBukkit end
                      }
  
-                     for (int j = 0; j < i; ++j) {
-@@ -178,8 +187,12 @@
+                     for (int j = 0; j < spreadAttempts; ++j) {
+@@ -178,8 +186,12 @@
  
-                         iblockdata = BlockFireAbstract.getState(this.level(), blockposition1);
+                         iblockdata = BaseFireBlock.getState(this.level(), blockposition1);
                          if (this.level().getBlockState(blockposition1).isAir() && iblockdata.canSurvive(this.level(), blockposition1)) {
 -                            this.level().setBlockAndUpdate(blockposition1, iblockdata);
 -                            ++this.blocksSetOnFire;
 +                            // CraftBukkit start - add "!visualOnly"
-+                            if (!visualOnly && !CraftEventFactory.callBlockIgniteEvent(this.level(), blockposition1, this).isCancelled()) {
++                            if (!this.visualOnly && !CraftEventFactory.callBlockIgniteEvent(this.level(), blockposition1, this).isCancelled()) {
 +                                this.level().setBlockAndUpdate(blockposition1, iblockdata);
 +                                ++this.blocksSetOnFire;
 +                            }
@@ -60,11 +59,11 @@
                          }
                      }
  
-@@ -247,8 +260,9 @@
+@@ -247,8 +259,9 @@
              iblockdata = world.getBlockState(blockposition1);
          } while (!(iblockdata.getBlock() instanceof WeatheringCopper));
  
-+        BlockPosition blockposition1Final = blockposition1; // CraftBukkit - decompile error
++        BlockPos blockposition1Final = blockposition1; // CraftBukkit - decompile error
          WeatheringCopper.getPrevious(iblockdata).ifPresent((iblockdata1) -> {
 -            world.setBlockAndUpdate(blockposition1, iblockdata1);
 +            world.setBlockAndUpdate(blockposition1Final, iblockdata1); // CraftBukkit - decompile error
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/LivingEntity.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/LivingEntity.java.patch
new file mode 100644
index 0000000000..fdda023f17
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/LivingEntity.java.patch
@@ -0,0 +1,1373 @@
+--- a/net/minecraft/world/entity/LivingEntity.java
++++ b/net/minecraft/world/entity/LivingEntity.java
+@@ -42,6 +42,8 @@
+ import net.minecraft.core.particles.ParticleOptions;
+ import net.minecraft.core.particles.ParticleTypes;
+ import net.minecraft.nbt.CompoundTag;
++import net.minecraft.nbt.FloatTag;
++import net.minecraft.nbt.IntTag;
+ import net.minecraft.nbt.ListTag;
+ import net.minecraft.nbt.NbtOps;
+ import net.minecraft.nbt.Tag;
+@@ -94,7 +96,6 @@
+ import net.minecraft.world.entity.animal.Wolf;
+ import net.minecraft.world.entity.boss.wither.WitherBoss;
+ import net.minecraft.world.entity.item.ItemEntity;
+-import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.entity.projectile.AbstractArrow;
+ import net.minecraft.world.entity.projectile.Projectile;
+ import net.minecraft.world.item.AxeItem;
+@@ -135,6 +136,30 @@
+ import net.minecraft.world.scores.PlayerTeam;
+ import net.minecraft.world.scores.Scoreboard;
+ import org.slf4j.Logger;
++
++// CraftBukkit start
++import java.util.ArrayList;
++import java.util.HashSet;
++import java.util.Set;
++import java.util.LinkedList;
++import java.util.UUID;
++import net.minecraft.world.item.component.Consumable;
++import org.bukkit.Location;
++import org.bukkit.craftbukkit.attribute.CraftAttributeMap;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.craftbukkit.inventory.CraftItemStack;
++import org.bukkit.entity.Player;
++import org.bukkit.event.entity.ArrowBodyCountChangeEvent;
++import org.bukkit.event.entity.EntityDamageEvent;
++import org.bukkit.event.entity.EntityDamageEvent.DamageModifier;
++import org.bukkit.event.entity.EntityKnockbackEvent;
++import org.bukkit.event.entity.EntityPotionEffectEvent;
++import org.bukkit.event.entity.EntityRegainHealthEvent;
++import org.bukkit.event.entity.EntityRemoveEvent;
++import org.bukkit.event.entity.EntityResurrectEvent;
++import org.bukkit.event.entity.EntityTeleportEvent;
++import org.bukkit.event.player.PlayerItemConsumeEvent;
++// CraftBukkit end
+ 
+ public abstract class LivingEntity extends Entity implements Attackable {
+ 
+@@ -174,7 +199,7 @@
+     public static final float DEFAULT_BABY_SCALE = 0.5F;
+     public static final String ATTRIBUTES_FIELD = "attributes";
+     public static final Predicate<LivingEntity> PLAYER_NOT_WEARING_DISGUISE_ITEM = (entityliving) -> {
+-        if (entityliving instanceof Player entityhuman) {
++        if (entityliving instanceof net.minecraft.world.entity.player.Player entityhuman) {
+             ItemStack itemstack = entityhuman.getItemBySlot(EquipmentSlot.HEAD);
+ 
+             return !itemstack.is(ItemTags.GAZE_DISGUISE_EQUIPMENT);
+@@ -210,7 +235,7 @@
+     public float yHeadRotO;
+     public final ElytraAnimationState elytraAnimationState;
+     @Nullable
+-    public Player lastHurtByPlayer;
++    public net.minecraft.world.entity.player.Player lastHurtByPlayer;
+     public int lastHurtByPlayerTime;
+     protected boolean dead;
+     protected int noActionTime;
+@@ -260,7 +285,20 @@
+     protected boolean skipDropExperience;
+     private final EnumMap<EquipmentSlot, Reference2ObjectMap<Enchantment, Set<EnchantmentLocationBasedEffect>>> activeLocationDependentEnchantments;
+     protected float appliedScale;
++    // CraftBukkit start
++    public int expToDrop;
++    public ArrayList<org.bukkit.inventory.ItemStack> drops = new ArrayList<org.bukkit.inventory.ItemStack>();
++    public final org.bukkit.craftbukkit.attribute.CraftAttributeMap craftAttributes;
++    public boolean collides = true;
++    public Set<UUID> collidableExemptions = new HashSet<>();
++    public boolean bukkitPickUpLoot;
+ 
++    @Override
++    public float getBukkitYaw() {
++        return this.getYHeadRot();
++    }
++    // CraftBukkit end
++
+     protected LivingEntity(EntityType<? extends LivingEntity> type, Level world) {
+         super(type, world);
+         this.lastHandItemStacks = NonNullList.withSize(2, ItemStack.EMPTY);
+@@ -276,7 +314,9 @@
+         this.activeLocationDependentEnchantments = new EnumMap(EquipmentSlot.class);
+         this.appliedScale = 1.0F;
+         this.attributes = new AttributeMap(DefaultAttributes.getSupplier(type));
+-        this.setHealth(this.getMaxHealth());
++        this.craftAttributes = new CraftAttributeMap(this.attributes); // CraftBukkit
++        // CraftBukkit - setHealth(getMaxHealth()) inlined and simplified to skip the instanceof check for EntityPlayer, as getBukkitEntity() is not initialized in constructor
++        this.entityData.set(LivingEntity.DATA_HEALTH_ID, (float) this.getAttribute(Attributes.MAX_HEALTH).getValue());
+         this.blocksBuilding = true;
+         this.rotA = (float) ((Math.random() + 1.0D) * 0.009999999776482582D);
+         this.reapplyPosition();
+@@ -356,7 +396,13 @@
+                     double d8 = Math.min((double) (0.2F + f / 15.0F), 2.5D);
+                     int i = (int) (150.0D * d8);
+ 
+-                    worldserver.sendParticles(new BlockParticleOption(ParticleTypes.BLOCK, state), d2, d3, d4, i, 0.0D, 0.0D, 0.0D, 0.15000000596046448D);
++                    // CraftBukkit start - visiblity api
++                    if (this instanceof ServerPlayer) {
++                        worldserver.sendParticlesSource((ServerPlayer) this, new BlockParticleOption(ParticleTypes.BLOCK, state), false, false, d2, d3, d4, i, 0.0D, 0.0D, 0.0D, 0.15000000596046448D);
++                    } else {
++                        worldserver.sendParticles(new BlockParticleOption(ParticleTypes.BLOCK, state), d2, d3, d4, i, 0.0D, 0.0D, 0.0D, 0.15000000596046448D);
++                    }
++                    // CraftBukkit end
+                 }
+             }
+         }
+@@ -402,7 +448,7 @@
+         }
+ 
+         if (this.isAlive()) {
+-            boolean flag = this instanceof Player;
++            boolean flag = this instanceof net.minecraft.world.entity.player.Player;
+             Level world1 = this.level();
+             ServerLevel worldserver1;
+             double d0;
+@@ -424,7 +470,7 @@
+             }
+ 
+             if (this.isEyeInFluid(FluidTags.WATER) && !this.level().getBlockState(BlockPos.containing(this.getX(), this.getEyeY(), this.getZ())).is(Blocks.BUBBLE_COLUMN)) {
+-                boolean flag1 = !this.canBreatheUnderwater() && !MobEffectUtil.hasWaterBreathing(this) && (!flag || !((Player) this).getAbilities().invulnerable);
++                boolean flag1 = !this.canBreatheUnderwater() && !MobEffectUtil.hasWaterBreathing(this) && (!flag || !((net.minecraft.world.entity.player.Player) this).getAbilities().invulnerable);
+ 
+                 if (flag1) {
+                     this.setAirSupply(this.decreaseAirSupply(this.getAirSupply()));
+@@ -573,7 +619,7 @@
+         ++this.deathTime;
+         if (this.deathTime >= 20 && !this.level().isClientSide() && !this.isRemoved()) {
+             this.level().broadcastEntityEvent(this, (byte) 60);
+-            this.remove(Entity.RemovalReason.KILLED);
++            this.remove(Entity.RemovalReason.KILLED, EntityRemoveEvent.Cause.DEATH); // CraftBukkit - add Bukkit remove cause
+         }
+ 
+     }
+@@ -629,7 +675,7 @@
+         return this.lastHurtByMobTimestamp;
+     }
+ 
+-    public void setLastHurtByPlayer(@Nullable Player attacking) {
++    public void setLastHurtByPlayer(@Nullable net.minecraft.world.entity.player.Player attacking) {
+         this.lastHurtByPlayer = attacking;
+         this.lastHurtByPlayerTime = this.tickCount;
+     }
+@@ -679,17 +725,23 @@
+     }
+ 
+     public void onEquipItem(EquipmentSlot slot, ItemStack oldStack, ItemStack newStack) {
+-        if (!this.level().isClientSide() && !this.isSpectator()) {
+-            boolean flag = newStack.isEmpty() && oldStack.isEmpty();
++        // CraftBukkit start
++        this.onEquipItem(slot, oldStack, newStack, false);
++    }
+ 
+-            if (!flag && !ItemStack.isSameItemSameComponents(oldStack, newStack) && !this.firstTick) {
+-                Equippable equippable = (Equippable) newStack.get(DataComponents.EQUIPPABLE);
++    public void onEquipItem(EquipmentSlot enumitemslot, ItemStack itemstack, ItemStack itemstack1, boolean silent) {
++        // CraftBukkit end
++        if (!this.level().isClientSide() && !this.isSpectator()) {
++            boolean flag = itemstack1.isEmpty() && itemstack.isEmpty();
+ 
+-                if (!this.isSilent() && equippable != null && slot == equippable.slot()) {
+-                    this.level().playSeededSound((Player) null, this.getX(), this.getY(), this.getZ(), equippable.equipSound(), this.getSoundSource(), 1.0F, 1.0F, this.random.nextLong());
++            if (!flag && !ItemStack.isSameItemSameComponents(itemstack, itemstack1) && !this.firstTick) {
++                Equippable equippable = (Equippable) itemstack1.get(DataComponents.EQUIPPABLE);
++
++                if (!this.isSilent() && equippable != null && enumitemslot == equippable.slot() && !silent) { // CraftBukkit
++                    this.level().playSeededSound((net.minecraft.world.entity.player.Player) null, this.getX(), this.getY(), this.getZ(), equippable.equipSound(), this.getSoundSource(), 1.0F, 1.0F, this.random.nextLong());
+                 }
+ 
+-                if (this.doesEmitEquipEvent(slot)) {
++                if (this.doesEmitEquipEvent(enumitemslot)) {
+                     this.gameEvent(equippable != null ? GameEvent.EQUIP : GameEvent.UNEQUIP);
+                 }
+ 
+@@ -699,17 +751,24 @@
+ 
+     @Override
+     public void remove(Entity.RemovalReason reason) {
+-        if (reason == Entity.RemovalReason.KILLED || reason == Entity.RemovalReason.DISCARDED) {
++        // CraftBukkit start - add Bukkit remove cause
++        this.remove(reason, null);
++    }
++
++    @Override
++    public void remove(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) {
++        // CraftBukkit end
++        if (entity_removalreason == Entity.RemovalReason.KILLED || entity_removalreason == Entity.RemovalReason.DISCARDED) {
+             Level world = this.level();
+ 
+             if (world instanceof ServerLevel) {
+                 ServerLevel worldserver = (ServerLevel) world;
+ 
+-                this.triggerOnDeathMobEffects(worldserver, reason);
++                this.triggerOnDeathMobEffects(worldserver, entity_removalreason);
+             }
+         }
+ 
+-        super.remove(reason);
++        super.remove(entity_removalreason, cause); // CraftBukkit
+         this.brain.clearMemories();
+     }
+ 
+@@ -722,6 +781,7 @@
+             mobeffect.onMobRemoved(world, this, reason);
+         }
+ 
++        this.removeAllEffects(org.bukkit.event.entity.EntityPotionEffectEvent.Cause.DEATH); // CraftBukkit
+         this.activeEffects.clear();
+     }
+ 
+@@ -781,6 +841,17 @@
+             }
+         }
+ 
++        // CraftBukkit start
++        if (nbt.contains("Bukkit.MaxHealth")) {
++            Tag nbtbase = nbt.get("Bukkit.MaxHealth");
++            if (nbtbase.getId() == 5) {
++                this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(((FloatTag) nbtbase).getAsDouble());
++            } else if (nbtbase.getId() == 3) {
++                this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(((IntTag) nbtbase).getAsDouble());
++            }
++        }
++        // CraftBukkit end
++
+         if (nbt.contains("Health", 99)) {
+             this.setHealth(nbt.getFloat("Health"));
+         }
+@@ -819,9 +890,32 @@
+ 
+     }
+ 
++    // CraftBukkit start
++    private boolean isTickingEffects = false;
++    private List<ProcessableEffect> effectsToProcess = Lists.newArrayList();
++
++    private static class ProcessableEffect {
++
++        private Holder<MobEffect> type;
++        private MobEffectInstance effect;
++        private final EntityPotionEffectEvent.Cause cause;
++
++        private ProcessableEffect(MobEffectInstance effect, EntityPotionEffectEvent.Cause cause) {
++            this.effect = effect;
++            this.cause = cause;
++        }
++
++        private ProcessableEffect(Holder<MobEffect> type, EntityPotionEffectEvent.Cause cause) {
++            this.type = type;
++            this.cause = cause;
++        }
++    }
++    // CraftBukkit end
++
+     protected void tickEffects() {
+         Iterator<Holder<MobEffect>> iterator = this.activeEffects.keySet().iterator();
+ 
++        this.isTickingEffects = true; // CraftBukkit
+         try {
+             while (iterator.hasNext()) {
+                 Holder<MobEffect> holder = (Holder) iterator.next();
+@@ -831,6 +925,12 @@
+                     this.onEffectUpdated(mobeffect, true, (Entity) null);
+                 })) {
+                     if (!this.level().isClientSide) {
++                        // CraftBukkit start
++                        EntityPotionEffectEvent event = CraftEventFactory.callEntityPotionEffectChangeEvent(this, mobeffect, null, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.EXPIRATION);
++                        if (event.isCancelled()) {
++                            continue;
++                        }
++                        // CraftBukkit end
+                         iterator.remove();
+                         this.onEffectsRemoved(List.of(mobeffect));
+                     }
+@@ -841,6 +941,17 @@
+         } catch (ConcurrentModificationException concurrentmodificationexception) {
+             ;
+         }
++        // CraftBukkit start
++        this.isTickingEffects = false;
++        for (ProcessableEffect e : this.effectsToProcess) {
++            if (e.effect != null) {
++                this.addEffect(e.effect, e.cause);
++            } else {
++                this.removeEffect(e.type, e.cause);
++            }
++        }
++        this.effectsToProcess.clear();
++        // CraftBukkit end
+ 
+         if (this.effectsDirty) {
+             if (!this.level().isClientSide) {
+@@ -921,7 +1032,7 @@
+     }
+ 
+     public boolean canAttack(LivingEntity target) {
+-        return target instanceof Player && this.level().getDifficulty() == Difficulty.PEACEFUL ? false : target.canBeSeenAsEnemy();
++        return target instanceof net.minecraft.world.entity.player.Player && this.level().getDifficulty() == Difficulty.PEACEFUL ? false : target.canBeSeenAsEnemy();
+     }
+ 
+     public boolean canBeSeenAsEnemy() {
+@@ -952,17 +1063,36 @@
+         this.entityData.set(LivingEntity.DATA_EFFECT_PARTICLES, List.of());
+     }
+ 
++    // CraftBukkit start
+     public boolean removeAllEffects() {
++        return this.removeAllEffects(org.bukkit.event.entity.EntityPotionEffectEvent.Cause.UNKNOWN);
++    }
++
++    public boolean removeAllEffects(EntityPotionEffectEvent.Cause cause) {
++        // CraftBukkit end
+         if (this.level().isClientSide) {
+             return false;
+         } else if (this.activeEffects.isEmpty()) {
+             return false;
+         } else {
+-            Map<Holder<MobEffect>, MobEffectInstance> map = Maps.newHashMap(this.activeEffects);
++            // CraftBukkit start
++            List<MobEffectInstance> toRemove = new LinkedList<>();
++            Iterator<MobEffectInstance> iterator = this.activeEffects.values().iterator();
+ 
+-            this.activeEffects.clear();
+-            this.onEffectsRemoved(map.values());
+-            return true;
++            while (iterator.hasNext()) {
++                MobEffectInstance effect = iterator.next();
++                EntityPotionEffectEvent event = CraftEventFactory.callEntityPotionEffectChangeEvent(this, effect, null, cause, EntityPotionEffectEvent.Action.CLEARED);
++                if (event.isCancelled()) {
++                    continue;
++                }
++
++                iterator.remove();
++                toRemove.add(effect);
++            }
++
++            this.onEffectsRemoved(toRemove);
++            return !toRemove.isEmpty();
++            // CraftBukkit end
+         }
+     }
+ 
+@@ -987,24 +1117,54 @@
+         return this.addEffect(effect, (Entity) null);
+     }
+ 
++    // CraftBukkit start
++    public boolean addEffect(MobEffectInstance mobeffect, EntityPotionEffectEvent.Cause cause) {
++        return this.addEffect(mobeffect, (Entity) null, cause);
++    }
++
+     public boolean addEffect(MobEffectInstance effect, @Nullable Entity source) {
+-        if (!this.canBeAffected(effect)) {
++        return this.addEffect(effect, source, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.UNKNOWN);
++    }
++
++    public boolean addEffect(MobEffectInstance mobeffect, @Nullable Entity entity, EntityPotionEffectEvent.Cause cause) {
++        if (this.isTickingEffects) {
++            this.effectsToProcess.add(new ProcessableEffect(mobeffect, cause));
++            return true;
++        }
++        // CraftBukkit end
++
++        if (!this.canBeAffected(mobeffect)) {
+             return false;
+         } else {
+-            MobEffectInstance mobeffect1 = (MobEffectInstance) this.activeEffects.get(effect.getEffect());
++            MobEffectInstance mobeffect1 = (MobEffectInstance) this.activeEffects.get(mobeffect.getEffect());
+             boolean flag = false;
+ 
+-            if (mobeffect1 == null) {
+-                this.activeEffects.put(effect.getEffect(), effect);
+-                this.onEffectAdded(effect, source);
++            // CraftBukkit start
++            boolean override = false;
++            if (mobeffect1 != null) {
++                override = new MobEffectInstance(mobeffect1).update(mobeffect);
++            }
++
++            EntityPotionEffectEvent event = CraftEventFactory.callEntityPotionEffectChangeEvent(this, mobeffect1, mobeffect, cause, override);
++            if (event.isCancelled()) {
++                return false;
++            }
++            // CraftBukkit end
++
++            if (mobeffect1 == null) {
++                this.activeEffects.put(mobeffect.getEffect(), mobeffect);
++                this.onEffectAdded(mobeffect, entity);
+                 flag = true;
+-                effect.onEffectAdded(this);
+-            } else if (mobeffect1.update(effect)) {
+-                this.onEffectUpdated(mobeffect1, true, source);
++                mobeffect.onEffectAdded(this);
++                // CraftBukkit start
++            } else if (event.isOverride()) {
++                mobeffect1.update(mobeffect);
++                this.onEffectUpdated(mobeffect1, true, entity);
++                // CraftBukkit end
+                 flag = true;
+             }
+ 
+-            effect.onEffectStarted(this);
++            mobeffect.onEffectStarted(this);
+             return flag;
+         }
+     }
+@@ -1031,14 +1191,40 @@
+         return this.getType().is(EntityTypeTags.INVERTED_HEALING_AND_HARM);
+     }
+ 
++    // CraftBukkit start
+     @Nullable
+     public MobEffectInstance removeEffectNoUpdate(Holder<MobEffect> effect) {
+-        return (MobEffectInstance) this.activeEffects.remove(effect);
++        return this.removeEffectNoUpdate(effect, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.UNKNOWN);
+     }
+ 
++    @Nullable
++    public MobEffectInstance removeEffectNoUpdate(Holder<MobEffect> holder, EntityPotionEffectEvent.Cause cause) {
++        if (this.isTickingEffects) {
++            this.effectsToProcess.add(new ProcessableEffect(holder, cause));
++            return null;
++        }
++
++        MobEffectInstance effect = this.activeEffects.get(holder);
++        if (effect == null) {
++            return null;
++        }
++
++        EntityPotionEffectEvent event = CraftEventFactory.callEntityPotionEffectChangeEvent(this, effect, null, cause);
++        if (event.isCancelled()) {
++            return null;
++        }
++
++        return (MobEffectInstance) this.activeEffects.remove(holder);
++    }
++
+     public boolean removeEffect(Holder<MobEffect> effect) {
+-        MobEffectInstance mobeffect = this.removeEffectNoUpdate(effect);
++        return this.removeEffect(effect, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.UNKNOWN);
++    }
+ 
++    public boolean removeEffect(Holder<MobEffect> holder, EntityPotionEffectEvent.Cause cause) {
++        MobEffectInstance mobeffect = this.removeEffectNoUpdate(holder, cause);
++        // CraftBukkit end
++
+         if (mobeffect != null) {
+             this.onEffectsRemoved(List.of(mobeffect));
+             return true;
+@@ -1142,20 +1328,55 @@
+ 
+     }
+ 
++    // CraftBukkit start - Delegate so we can handle providing a reason for health being regained
+     public void heal(float amount) {
++        this.heal(amount, EntityRegainHealthEvent.RegainReason.CUSTOM);
++    }
++
++    public void heal(float f, EntityRegainHealthEvent.RegainReason regainReason) {
+         float f1 = this.getHealth();
+ 
+         if (f1 > 0.0F) {
+-            this.setHealth(f1 + amount);
++            EntityRegainHealthEvent event = new EntityRegainHealthEvent(this.getBukkitEntity(), f, regainReason);
++            // Suppress during worldgen
++            if (this.valid) {
++                this.level().getCraftServer().getPluginManager().callEvent(event);
++            }
++
++            if (!event.isCancelled()) {
++                this.setHealth((float) (this.getHealth() + event.getAmount()));
++            }
++            // CraftBukkit end
+         }
+ 
+     }
+ 
+     public float getHealth() {
++        // CraftBukkit start - Use unscaled health
++        if (this instanceof ServerPlayer) {
++            return (float) ((ServerPlayer) this).getBukkitEntity().getHealth();
++        }
++        // CraftBukkit end
+         return (Float) this.entityData.get(LivingEntity.DATA_HEALTH_ID);
+     }
+ 
+     public void setHealth(float health) {
++        // CraftBukkit start - Handle scaled health
++        if (this instanceof ServerPlayer) {
++            org.bukkit.craftbukkit.entity.CraftPlayer player = ((ServerPlayer) this).getBukkitEntity();
++            // Squeeze
++            if (health < 0.0F) {
++                player.setRealHealth(0.0D);
++            } else if (health > player.getMaxHealth()) {
++                player.setRealHealth(player.getMaxHealth());
++            } else {
++                player.setRealHealth(health);
++            }
++
++            player.updateScaledHealth(false);
++            return;
++        }
++        // CraftBukkit end
+         this.entityData.set(LivingEntity.DATA_HEALTH_ID, Mth.clamp(health, 0.0F, this.getMaxHealth()));
+     }
+ 
+@@ -1167,7 +1388,7 @@
+     public boolean hurtServer(ServerLevel world, DamageSource source, float amount) {
+         if (this.isInvulnerableTo(world, source)) {
+             return false;
+-        } else if (this.isDeadOrDying()) {
++        } else if (this.isRemoved() || this.dead || this.getHealth() <= 0.0F) { // CraftBukkit - Don't allow entities that got set to dead/killed elsewhere to get damaged and die
+             return false;
+         } else if (source.is(DamageTypeTags.IS_FIRE) && this.hasEffect(MobEffects.FIRE_RESISTANCE)) {
+             return false;
+@@ -1182,10 +1403,11 @@
+             }
+ 
+             float f1 = amount;
+-            boolean flag = false;
++            boolean flag = amount > 0.0F && this.isDamageSourceBlocked(source); // Copied from below
+             float f2 = 0.0F;
+ 
+-            if (amount > 0.0F && this.isDamageSourceBlocked(source)) {
++            // CraftBukkit - Moved into handleEntityDamage(DamageSource, float) for get f and actuallyHurt(DamageSource, float, EntityDamageEvent) for handle damage
++            if (false && amount > 0.0F && this.isDamageSourceBlocked(source)) {
+                 this.hurtCurrentlyUsedShield(amount);
+                 f2 = amount;
+                 amount = 0.0F;
+@@ -1202,15 +1424,26 @@
+                 flag = true;
+             }
+ 
+-            if (source.is(DamageTypeTags.IS_FREEZING) && this.getType().is(EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES)) {
++            // CraftBukkit - Moved into handleEntityDamage(DamageSource, float) for get f
++            if (false && source.is(DamageTypeTags.IS_FREEZING) && this.getType().is(EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES)) {
+                 amount *= 5.0F;
+             }
+ 
+-            if (source.is(DamageTypeTags.DAMAGES_HELMET) && !this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) {
++            // CraftBukkit - Moved into handleEntityDamage(DamageSource, float) for get f and actuallyHurt(DamageSource, float, EntityDamageEvent) for handle damage
++            if (false && source.is(DamageTypeTags.DAMAGES_HELMET) && !this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) {
+                 this.hurtHelmet(source, amount);
+                 amount *= 0.75F;
+             }
+ 
++            // CraftBukkit start
++            EntityDamageEvent event = this.handleEntityDamage(source, amount);
++            amount = 0;
++            amount += (float) event.getDamage(DamageModifier.BASE);
++            amount += (float) event.getDamage(DamageModifier.BLOCKING);
++            amount += (float) event.getDamage(DamageModifier.FREEZING);
++            amount += (float) event.getDamage(DamageModifier.HARD_HAT);
++            // CraftBukkit end
++
+             this.walkAnimation.setSpeed(1.5F);
+             if (Float.isNaN(amount) || Float.isInfinite(amount)) {
+                 amount = Float.MAX_VALUE;
+@@ -1218,18 +1451,27 @@
+ 
+             boolean flag1 = true;
+ 
+-            if ((float) this.invulnerableTime > 10.0F && !source.is(DamageTypeTags.BYPASSES_COOLDOWN)) {
++            if ((float) this.invulnerableTime > (float) this.invulnerableDuration / 2.0F && !source.is(DamageTypeTags.BYPASSES_COOLDOWN)) { // CraftBukkit - restore use of maxNoDamageTicks
+                 if (amount <= this.lastHurt) {
+                     return false;
+                 }
+ 
+-                this.actuallyHurt(world, source, amount - this.lastHurt);
++                // CraftBukkit start
++                if (!this.actuallyHurt(world, source, (float) event.getFinalDamage() - this.lastHurt, event)) {
++                    return false;
++                }
++                // CraftBukkit end
+                 this.lastHurt = amount;
+                 flag1 = false;
+             } else {
++                // CraftBukkit start
++                if (!this.actuallyHurt(world, source, (float) event.getFinalDamage(), event)) {
++                    return false;
++                }
+                 this.lastHurt = amount;
+-                this.invulnerableTime = 20;
+-                this.actuallyHurt(world, source, amount);
++                this.invulnerableTime = this.invulnerableDuration; // CraftBukkit - restore use of maxNoDamageTicks
++                // this.actuallyHurt(worldserver, damagesource, f);
++                // CraftBukkit end
+                 this.hurtDuration = 10;
+                 this.hurtTime = this.hurtDuration;
+             }
+@@ -1243,7 +1485,7 @@
+                     world.broadcastDamageEvent(this, source);
+                 }
+ 
+-                if (!source.is(DamageTypeTags.NO_IMPACT) && (!flag || amount > 0.0F)) {
++                if (!source.is(DamageTypeTags.NO_IMPACT) && !flag) { // CraftBukkit - Prevent marking hurt if the damage is blocked
+                     this.markHurt();
+                 }
+ 
+@@ -1263,7 +1505,7 @@
+                         d1 = source.getSourcePosition().z() - this.getZ();
+                     }
+ 
+-                    this.knockback(0.4000000059604645D, d0, d1);
++                    this.knockback(0.4000000059604645D, d0, d1, entity1, entity1 == null ? EntityKnockbackEvent.KnockbackCause.DAMAGE : EntityKnockbackEvent.KnockbackCause.ENTITY_ATTACK); // CraftBukkit
+                     if (!flag) {
+                         this.indicateDamage(d0, d1);
+                     }
+@@ -1282,7 +1524,7 @@
+                 this.playHurtSound(source);
+             }
+ 
+-            boolean flag2 = !flag || amount > 0.0F;
++            boolean flag2 = !flag; // CraftBukkit - Ensure to return false if damage is blocked
+ 
+             if (flag2) {
+                 this.lastDamageSource = source;
+@@ -1329,10 +1571,10 @@
+     }
+ 
+     @Nullable
+-    protected Player resolvePlayerResponsibleForDamage(DamageSource damageSource) {
++    protected net.minecraft.world.entity.player.Player resolvePlayerResponsibleForDamage(DamageSource damageSource) {
+         Entity entity = damageSource.getEntity();
+ 
+-        if (entity instanceof Player entityhuman) {
++        if (entity instanceof net.minecraft.world.entity.player.Player entityhuman) {
+             this.lastHurtByPlayerTime = 100;
+             this.lastHurtByPlayer = entityhuman;
+             return entityhuman;
+@@ -1342,8 +1584,8 @@
+                     this.lastHurtByPlayerTime = 100;
+                     LivingEntity entityliving = entitywolf.getOwner();
+ 
+-                    if (entityliving instanceof Player) {
+-                        Player entityhuman1 = (Player) entityliving;
++                    if (entityliving instanceof net.minecraft.world.entity.player.Player) {
++                        net.minecraft.world.entity.player.Player entityhuman1 = (net.minecraft.world.entity.player.Player) entityliving;
+ 
+                         this.lastHurtByPlayer = entityhuman1;
+                     } else {
+@@ -1363,7 +1605,7 @@
+     }
+ 
+     protected void blockedByShield(LivingEntity target) {
+-        target.knockback(0.5D, target.getX() - this.getX(), target.getZ() - this.getZ());
++        target.knockback(0.5D, target.getX() - this.getX(), target.getZ() - this.getZ(), null, EntityKnockbackEvent.KnockbackCause.SHIELD_BLOCK); // CraftBukkit
+     }
+ 
+     private boolean checkTotemDeathProtection(DamageSource source) {
+@@ -1375,20 +1617,33 @@
+             InteractionHand[] aenumhand = InteractionHand.values();
+             int i = aenumhand.length;
+ 
++            // CraftBukkit start
++            InteractionHand hand = null;
++            ItemStack itemstack1 = ItemStack.EMPTY;
+             for (int j = 0; j < i; ++j) {
+                 InteractionHand enumhand = aenumhand[j];
+-                ItemStack itemstack1 = this.getItemInHand(enumhand);
++                itemstack1 = this.getItemInHand(enumhand);
+ 
+                 deathprotection = (DeathProtection) itemstack1.get(DataComponents.DEATH_PROTECTION);
+                 if (deathprotection != null) {
++                    hand = enumhand; // CraftBukkit
+                     itemstack = itemstack1.copy();
+-                    itemstack1.shrink(1);
++                    // itemstack1.subtract(1); // CraftBukkit
+                     break;
+                 }
+             }
+ 
+-            if (itemstack != null) {
+-                if (this instanceof ServerPlayer) {
++            org.bukkit.inventory.EquipmentSlot handSlot = (hand != null) ? org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(hand) : null;
++            EntityResurrectEvent event = new EntityResurrectEvent((org.bukkit.entity.LivingEntity) this.getBukkitEntity(), handSlot);
++            event.setCancelled(itemstack == null);
++            this.level().getCraftServer().getPluginManager().callEvent(event);
++
++            if (!event.isCancelled()) {
++                if (!itemstack1.isEmpty()) {
++                    itemstack1.shrink(1);
++                }
++                if (itemstack != null && this instanceof ServerPlayer) {
++                    // CraftBukkit end
+                     ServerPlayer entityplayer = (ServerPlayer) this;
+ 
+                     entityplayer.awardStat(Stats.ITEM_USED.get(itemstack.getItem()));
+@@ -1512,14 +1767,22 @@
+                     BlockState iblockdata = Blocks.WITHER_ROSE.defaultBlockState();
+ 
+                     if (this.level().getBlockState(blockposition).isAir() && iblockdata.canSurvive(this.level(), blockposition)) {
+-                        this.level().setBlock(blockposition, iblockdata, 3);
+-                        flag = true;
++                        // CraftBukkit start - call EntityBlockFormEvent for Wither Rose
++                        flag = org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(this.level(), blockposition, iblockdata, 3, this);
++                        // CraftBukkit end
+                     }
+                 }
+ 
+                 if (!flag) {
+                     ItemEntity entityitem = new ItemEntity(this.level(), this.getX(), this.getY(), this.getZ(), new ItemStack(Items.WITHER_ROSE));
+ 
++                    // CraftBukkit start
++                    org.bukkit.event.entity.EntityDropItemEvent event = new org.bukkit.event.entity.EntityDropItemEvent(this.getBukkitEntity(), (org.bukkit.entity.Item) entityitem.getBukkitEntity());
++                    CraftEventFactory.callEvent(event);
++                    if (event.isCancelled()) {
++                        return;
++                    }
++                    // CraftBukkit end
+                     this.level().addFreshEntity(entityitem);
+                 }
+             }
+@@ -1530,24 +1793,39 @@
+     protected void dropAllDeathLoot(ServerLevel world, DamageSource damageSource) {
+         boolean flag = this.lastHurtByPlayerTime > 0;
+ 
++        this.dropEquipment(world); // CraftBukkit - from below
+         if (this.shouldDropLoot() && world.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
+             this.dropFromLootTable(world, damageSource, flag);
+             this.dropCustomDeathLoot(world, damageSource, flag);
+         }
++        // CraftBukkit start - Call death event
++        CraftEventFactory.callEntityDeathEvent(this, damageSource, this.drops);
++        this.drops = new ArrayList<>();
++        // CraftBukkit end
+ 
+-        this.dropEquipment(world);
++        // this.dropEquipment(worldserver);// CraftBukkit - moved up
+         this.dropExperience(world, damageSource.getEntity());
+     }
+ 
+     protected void dropEquipment(ServerLevel world) {}
+ 
+-    protected void dropExperience(ServerLevel world, @Nullable Entity attacker) {
+-        if (!this.wasExperienceConsumed() && (this.isAlwaysExperienceDropper() || this.lastHurtByPlayerTime > 0 && this.shouldDropExperience() && world.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT))) {
+-            ExperienceOrb.award(world, this.position(), this.getExperienceReward(world, attacker));
++    public int getExpReward(ServerLevel worldserver, @Nullable Entity entity) { // CraftBukkit
++        if (!this.wasExperienceConsumed() && (this.isAlwaysExperienceDropper() || this.lastHurtByPlayerTime > 0 && this.shouldDropExperience() && worldserver.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT))) {
++            return this.getExperienceReward(worldserver, entity); // CraftBukkit            }
+         }
+ 
++        return 0; // CraftBukkit
+     }
+ 
++    protected void dropExperience(ServerLevel world, @Nullable Entity attacker) {
++        // CraftBukkit start - Update getExpReward() above if the removed if() changes!
++        if (!(this instanceof net.minecraft.world.entity.boss.enderdragon.EnderDragon)) { // CraftBukkit - SPIGOT-2420: Special case ender dragon will drop the xp over time
++            ExperienceOrb.award(world, this.position(), this.expToDrop);
++            this.expToDrop = 0;
++        }
++        // CraftBukkit end
++    }
++
+     protected void dropCustomDeathLoot(ServerLevel world, DamageSource source, boolean causedByPlayer) {}
+ 
+     public long getLootTableSeed() {
+@@ -1612,19 +1890,31 @@
+     }
+ 
+     public void knockback(double strength, double x, double z) {
+-        strength *= 1.0D - this.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE);
+-        if (strength > 0.0D) {
+-            this.hasImpulse = true;
++        // CraftBukkit start - EntityKnockbackEvent
++        this.knockback(strength, x, z, null, EntityKnockbackEvent.KnockbackCause.UNKNOWN);
++    }
+ 
++    public void knockback(double d0, double d1, double d2, Entity attacker, EntityKnockbackEvent.KnockbackCause cause) {
++        d0 *= 1.0D - this.getAttributeValue(Attributes.KNOCKBACK_RESISTANCE);
++        if (true || d0 > 0.0D) { // CraftBukkit - Call event even when force is 0
++            //this.hasImpulse = true; // CraftBukkit - Move down
++
+             Vec3 vec3d;
+ 
+-            for (vec3d = this.getDeltaMovement(); x * x + z * z < 9.999999747378752E-6D; z = (Math.random() - Math.random()) * 0.01D) {
+-                x = (Math.random() - Math.random()) * 0.01D;
++            for (vec3d = this.getDeltaMovement(); d1 * d1 + d2 * d2 < 9.999999747378752E-6D; d2 = (Math.random() - Math.random()) * 0.01D) {
++                d1 = (Math.random() - Math.random()) * 0.01D;
+             }
+ 
+-            Vec3 vec3d1 = (new Vec3(x, 0.0D, z)).normalize().scale(strength);
++            Vec3 vec3d1 = (new Vec3(d1, 0.0D, d2)).normalize().scale(d0);
+ 
+-            this.setDeltaMovement(vec3d.x / 2.0D - vec3d1.x, this.onGround() ? Math.min(0.4D, vec3d.y / 2.0D + strength) : vec3d.y, vec3d.z / 2.0D - vec3d1.z);
++            EntityKnockbackEvent event = CraftEventFactory.callEntityKnockbackEvent((org.bukkit.craftbukkit.entity.CraftLivingEntity) this.getBukkitEntity(), attacker, cause, d0, vec3d1, vec3d.x / 2.0D - vec3d1.x, this.onGround() ? Math.min(0.4D, vec3d.y / 2.0D + d0) : vec3d.y, vec3d.z / 2.0D - vec3d1.z);
++            if (event.isCancelled()) {
++                return;
++            }
++
++            this.hasImpulse = true;
++            this.setDeltaMovement(event.getFinalKnockback().getX(), event.getFinalKnockback().getY(), event.getFinalKnockback().getZ());
++            // CraftBukkit end
+         }
+     }
+ 
+@@ -1683,6 +1973,20 @@
+         return new LivingEntity.Fallsounds(SoundEvents.GENERIC_SMALL_FALL, SoundEvents.GENERIC_BIG_FALL);
+     }
+ 
++    // CraftBukkit start - Add delegate methods
++    public SoundEvent getHurtSound0(DamageSource damagesource) {
++        return this.getHurtSound(damagesource);
++    }
++
++    public SoundEvent getDeathSound0() {
++        return this.getDeathSound();
++    }
++
++    public SoundEvent getFallDamageSound0(int fallHeight) {
++        return this.getFallDamageSound(fallHeight);
++    }
++    // CraftBukkit end
++
+     public Optional<BlockPos> getLastClimbablePos() {
+         return this.lastClimbablePos;
+     }
+@@ -1757,9 +2061,14 @@
+         int i = this.calculateFallDamage(fallDistance, damageMultiplier);
+ 
+         if (i > 0) {
++            // CraftBukkit start
++            if (!this.hurtServer((ServerLevel) this.level(), damageSource, (float) i)) {
++                return true;
++            }
++            // CraftBukkit end
+             this.playSound(this.getFallDamageSound(i), 1.0F, 1.0F);
+             this.playBlockFallSound();
+-            this.hurt(damageSource, (float) i);
++            // this.damageEntity(damagesource, (float) i); // CraftBukkit - moved up
+             return true;
+         } else {
+             return flag;
+@@ -1830,7 +2139,7 @@
+ 
+     protected float getDamageAfterArmorAbsorb(DamageSource source, float amount) {
+         if (!source.is(DamageTypeTags.BYPASSES_ARMOR)) {
+-            this.hurtArmor(source, amount);
++            // this.hurtArmor(damagesource, f); // CraftBukkit - actuallyHurt(DamageSource, float, EntityDamageEvent) for handle damage
+             amount = CombatRules.getDamageAfterAbsorb(this, amount, source, (float) this.getArmorValue(), (float) this.getAttributeValue(Attributes.ARMOR_TOUGHNESS));
+         }
+ 
+@@ -1841,7 +2150,8 @@
+         if (source.is(DamageTypeTags.BYPASSES_EFFECTS)) {
+             return amount;
+         } else {
+-            if (this.hasEffect(MobEffects.DAMAGE_RESISTANCE) && !source.is(DamageTypeTags.BYPASSES_RESISTANCE)) {
++            // CraftBukkit - Moved to handleEntityDamage(DamageSource, float)
++            if (false && this.hasEffect(MobEffects.DAMAGE_RESISTANCE) && !source.is(DamageTypeTags.BYPASSES_RESISTANCE)) {
+                 int i = (this.getEffect(MobEffects.DAMAGE_RESISTANCE).getAmplifier() + 1) * 5;
+                 int j = 25 - i;
+                 float f1 = amount * (float) j;
+@@ -1884,18 +2194,144 @@
+         }
+     }
+ 
+-    protected void actuallyHurt(ServerLevel world, DamageSource source, float amount) {
+-        if (!this.isInvulnerableTo(world, source)) {
+-            amount = this.getDamageAfterArmorAbsorb(source, amount);
+-            amount = this.getDamageAfterMagicAbsorb(source, amount);
+-            float f1 = amount;
++    // CraftBukkit start
++    private EntityDamageEvent handleEntityDamage(final DamageSource damagesource, float f) {
++        float originalDamage = f;
+ 
+-            amount = Math.max(amount - this.getAbsorptionAmount(), 0.0F);
+-            this.setAbsorptionAmount(this.getAbsorptionAmount() - (f1 - amount));
+-            float f2 = f1 - amount;
++        com.google.common.base.Function<Double, Double> freezing = new com.google.common.base.Function<Double, Double>() {
++            @Override
++            public Double apply(Double f) {
++                if (damagesource.is(DamageTypeTags.IS_FREEZING) && LivingEntity.this.getType().is(EntityTypeTags.FREEZE_HURTS_EXTRA_TYPES)) {
++                    return -(f - (f * 5.0F));
++                }
++                return -0.0;
++            }
++        };
++        float freezingModifier = freezing.apply((double) f).floatValue();
++        f += freezingModifier;
+ 
++        com.google.common.base.Function<Double, Double> hardHat = new com.google.common.base.Function<Double, Double>() {
++            @Override
++            public Double apply(Double f) {
++                if (damagesource.is(DamageTypeTags.DAMAGES_HELMET) && !LivingEntity.this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) {
++                    return -(f - (f * 0.75F));
++                }
++                return -0.0;
++            }
++        };
++        float hardHatModifier = hardHat.apply((double) f).floatValue();
++        f += hardHatModifier;
++
++        com.google.common.base.Function<Double, Double> blocking = new com.google.common.base.Function<Double, Double>() {
++            @Override
++            public Double apply(Double f) {
++                return -((LivingEntity.this.isDamageSourceBlocked(damagesource)) ? f : 0.0);
++            }
++        };
++        float blockingModifier = blocking.apply((double) f).floatValue();
++        f += blockingModifier;
++
++        com.google.common.base.Function<Double, Double> armor = new com.google.common.base.Function<Double, Double>() {
++            @Override
++            public Double apply(Double f) {
++                return -(f - LivingEntity.this.getDamageAfterArmorAbsorb(damagesource, f.floatValue()));
++            }
++        };
++        float armorModifier = armor.apply((double) f).floatValue();
++        f += armorModifier;
++
++        com.google.common.base.Function<Double, Double> resistance = new com.google.common.base.Function<Double, Double>() {
++            @Override
++            public Double apply(Double f) {
++                if (!damagesource.is(DamageTypeTags.BYPASSES_EFFECTS) && LivingEntity.this.hasEffect(MobEffects.DAMAGE_RESISTANCE) && !damagesource.is(DamageTypeTags.BYPASSES_RESISTANCE)) {
++                    int i = (LivingEntity.this.getEffect(MobEffects.DAMAGE_RESISTANCE).getAmplifier() + 1) * 5;
++                    int j = 25 - i;
++                    float f1 = f.floatValue() * (float) j;
++
++                    return -(f - Math.max(f1 / 25.0F, 0.0F));
++                }
++                return -0.0;
++            }
++        };
++        float resistanceModifier = resistance.apply((double) f).floatValue();
++        f += resistanceModifier;
++
++        com.google.common.base.Function<Double, Double> magic = new com.google.common.base.Function<Double, Double>() {
++            @Override
++            public Double apply(Double f) {
++                return -(f - LivingEntity.this.getDamageAfterMagicAbsorb(damagesource, f.floatValue()));
++            }
++        };
++        float magicModifier = magic.apply((double) f).floatValue();
++        f += magicModifier;
++
++        com.google.common.base.Function<Double, Double> absorption = new com.google.common.base.Function<Double, Double>() {
++            @Override
++            public Double apply(Double f) {
++                return -(Math.max(f - Math.max(f - LivingEntity.this.getAbsorptionAmount(), 0.0F), 0.0F));
++            }
++        };
++        float absorptionModifier = absorption.apply((double) f).floatValue();
++
++        return CraftEventFactory.handleLivingEntityDamageEvent(this, damagesource, originalDamage, freezingModifier, hardHatModifier, blockingModifier, armorModifier, resistanceModifier, magicModifier, absorptionModifier, freezing, hardHat, blocking, armor, resistance, magic, absorption);
++    }
++
++    protected boolean actuallyHurt(ServerLevel worldserver, final DamageSource damagesource, float f, final EntityDamageEvent event) { // void -> boolean, add final
++        if (!this.isInvulnerableTo(worldserver, damagesource)) {
++            if (event.isCancelled()) {
++                return false;
++            }
++
++            if (damagesource.getEntity() instanceof net.minecraft.world.entity.player.Player) {
++                ((net.minecraft.world.entity.player.Player) damagesource.getEntity()).resetAttackStrengthTicker(); // Moved from EntityHuman in order to make the cooldown reset get called after the damage event is fired
++            }
++
++            // Resistance
++            if (event.getDamage(DamageModifier.RESISTANCE) < 0) {
++                float f3 = (float) -event.getDamage(DamageModifier.RESISTANCE);
++                if (f3 > 0.0F && f3 < 3.4028235E37F) {
++                    if (this instanceof ServerPlayer) {
++                        ((ServerPlayer) this).awardStat(Stats.DAMAGE_RESISTED, Math.round(f3 * 10.0F));
++                    } else if (damagesource.getEntity() instanceof ServerPlayer) {
++                        ((ServerPlayer) damagesource.getEntity()).awardStat(Stats.DAMAGE_DEALT_RESISTED, Math.round(f3 * 10.0F));
++                    }
++                }
++            }
++
++            // Apply damage to helmet
++            if (damagesource.is(DamageTypeTags.DAMAGES_HELMET) && !this.getItemBySlot(EquipmentSlot.HEAD).isEmpty()) {
++                this.hurtHelmet(damagesource, f);
++            }
++
++            // Apply damage to armor
++            if (!damagesource.is(DamageTypeTags.BYPASSES_ARMOR)) {
++                float armorDamage = (float) (event.getDamage() + event.getDamage(DamageModifier.BLOCKING) + event.getDamage(DamageModifier.HARD_HAT));
++                this.hurtArmor(damagesource, armorDamage);
++            }
++
++            // Apply blocking code // PAIL: steal from above
++            if (event.getDamage(DamageModifier.BLOCKING) < 0) {
++                this.hurtCurrentlyUsedShield((float) -event.getDamage(DamageModifier.BLOCKING));
++                Entity entity = damagesource.getDirectEntity();
++
++                if (entity instanceof LivingEntity) {
++                    this.blockUsingShield((LivingEntity) entity);
++                }
++            }
++
++            boolean human = this instanceof net.minecraft.world.entity.player.Player;
++            float originalDamage = (float) event.getDamage();
++            float absorptionModifier = (float) -event.getDamage(DamageModifier.ABSORPTION);
++            this.setAbsorptionAmount(Math.max(this.getAbsorptionAmount() - absorptionModifier, 0.0F));
++            float f2 = absorptionModifier;
++
++            if (f2 > 0.0F && f2 < 3.4028235E37F && this instanceof net.minecraft.world.entity.player.Player) {
++                ((net.minecraft.world.entity.player.Player) this).awardStat(Stats.DAMAGE_ABSORBED, Math.round(f2 * 10.0F));
++            }
++            // CraftBukkit end
++
+             if (f2 > 0.0F && f2 < 3.4028235E37F) {
+-                Entity entity = source.getEntity();
++                Entity entity = damagesource.getEntity();
+ 
+                 if (entity instanceof ServerPlayer) {
+                     ServerPlayer entityplayer = (ServerPlayer) entity;
+@@ -1904,13 +2340,48 @@
+                 }
+             }
+ 
+-            if (amount != 0.0F) {
+-                this.getCombatTracker().recordDamage(source, amount);
+-                this.setHealth(this.getHealth() - amount);
+-                this.setAbsorptionAmount(this.getAbsorptionAmount() - amount);
++            // CraftBukkit start
++            if (f > 0 || !human) {
++                if (human) {
++                    // PAIL: Be sure to drag all this code from the EntityHuman subclass each update.
++                    ((net.minecraft.world.entity.player.Player) this).causeFoodExhaustion(damagesource.getFoodExhaustion(), org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.DAMAGED); // CraftBukkit - EntityExhaustionEvent
++                    if (f < 3.4028235E37F) {
++                        ((net.minecraft.world.entity.player.Player) this).awardStat(Stats.DAMAGE_TAKEN, Math.round(f * 10.0F));
++                    }
++                }
++                // CraftBukkit end
++                this.getCombatTracker().recordDamage(damagesource, f);
++                this.setHealth(this.getHealth() - f);
++                // CraftBukkit start
++                if (!human) {
++                    this.setAbsorptionAmount(this.getAbsorptionAmount() - f);
++                }
+                 this.gameEvent(GameEvent.ENTITY_DAMAGE);
++
++                return true;
++            } else {
++                // Duplicate triggers if blocking
++                if (event.getDamage(DamageModifier.BLOCKING) < 0) {
++                    if (this instanceof ServerPlayer) {
++                        CriteriaTriggers.ENTITY_HURT_PLAYER.trigger((ServerPlayer) this, damagesource, f, originalDamage, true);
++                        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));
++                        }
++                    }
++
++                    if (damagesource.getEntity() instanceof ServerPlayer) {
++                        CriteriaTriggers.PLAYER_HURT_ENTITY.trigger((ServerPlayer) damagesource.getEntity(), this, damagesource, f, originalDamage, true);
++                    }
++
++                    return true;
++                } else {
++                    return originalDamage > 0;
++                }
++                // CraftBukkit end
+             }
+         }
++        return false; // CraftBukkit
+     }
+ 
+     public CombatTracker getCombatTracker() {
+@@ -1935,9 +2406,19 @@
+     }
+ 
+     public final void setArrowCount(int stuckArrowCount) {
+-        this.entityData.set(LivingEntity.DATA_ARROW_COUNT_ID, stuckArrowCount);
++        // CraftBukkit start
++        this.setArrowCount(stuckArrowCount, false);
+     }
+ 
++    public final void setArrowCount(int i, boolean flag) {
++        ArrowBodyCountChangeEvent event = CraftEventFactory.callArrowBodyCountChangeEvent(this, this.getArrowCount(), i, flag);
++        if (event.isCancelled()) {
++            return;
++        }
++        this.entityData.set(LivingEntity.DATA_ARROW_COUNT_ID, event.getNewAmount());
++    }
++    // CraftBukkit end
++
+     public final int getStingerCount() {
+         return (Integer) this.entityData.get(LivingEntity.DATA_STINGER_COUNT_ID);
+     }
+@@ -1999,7 +2480,7 @@
+                     this.playSound(soundeffect, this.getSoundVolume(), (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
+                 }
+ 
+-                if (!(this instanceof Player)) {
++                if (!(this instanceof net.minecraft.world.entity.player.Player)) {
+                     this.setHealth(0.0F);
+                     this.die(this.damageSources().generic());
+                 }
+@@ -2182,6 +2663,12 @@
+ 
+     public abstract ItemStack getItemBySlot(EquipmentSlot slot);
+ 
++    // CraftBukkit start
++    public void setItemSlot(EquipmentSlot enumitemslot, ItemStack itemstack, boolean silent) {
++        this.setItemSlot(enumitemslot, itemstack);
++    }
++    // CraftBukkit end
++
+     public abstract void setItemSlot(EquipmentSlot slot, ItemStack stack);
+ 
+     public Iterable<ItemStack> getHandSlots() {
+@@ -2494,7 +2981,7 @@
+ 
+     }
+ 
+-    private void travelRidden(Player controllingPlayer, Vec3 movementInput) {
++    private void travelRidden(net.minecraft.world.entity.player.Player controllingPlayer, Vec3 movementInput) {
+         Vec3 vec3d1 = this.getRiddenInput(controllingPlayer, movementInput);
+ 
+         this.tickRidden(controllingPlayer, vec3d1);
+@@ -2507,13 +2994,13 @@
+ 
+     }
+ 
+-    protected void tickRidden(Player controllingPlayer, Vec3 movementInput) {}
++    protected void tickRidden(net.minecraft.world.entity.player.Player controllingPlayer, Vec3 movementInput) {}
+ 
+-    protected Vec3 getRiddenInput(Player controllingPlayer, Vec3 movementInput) {
++    protected Vec3 getRiddenInput(net.minecraft.world.entity.player.Player controllingPlayer, Vec3 movementInput) {
+         return movementInput;
+     }
+ 
+-    protected float getRiddenSpeed(Player controllingPlayer) {
++    protected float getRiddenSpeed(net.minecraft.world.entity.player.Player controllingPlayer) {
+         return this.getSpeed();
+     }
+ 
+@@ -2571,7 +3058,7 @@
+             double d1 = Mth.clamp(motion.z, -0.15000000596046448D, 0.15000000596046448D);
+             double d2 = Math.max(motion.y, -0.15000000596046448D);
+ 
+-            if (d2 < 0.0D && !this.getInBlockState().is(Blocks.SCAFFOLDING) && this.isSuppressingSlidingDownLadder() && this instanceof Player) {
++            if (d2 < 0.0D && !this.getInBlockState().is(Blocks.SCAFFOLDING) && this.isSuppressingSlidingDownLadder() && this instanceof net.minecraft.world.entity.player.Player) {
+                 d2 = 0.0D;
+             }
+ 
+@@ -2586,7 +3073,7 @@
+     }
+ 
+     protected float getFlyingSpeed() {
+-        return this.getControllingPassenger() instanceof Player ? this.getSpeed() * 0.1F : 0.02F;
++        return this.getControllingPassenger() instanceof net.minecraft.world.entity.player.Player ? this.getSpeed() * 0.1F : 0.02F;
+     }
+ 
+     public float getSpeed() {
+@@ -2634,7 +3121,7 @@
+                 }
+             }
+ 
+-            this.detectEquipmentUpdates();
++            this.detectEquipmentUpdatesPublic(); // CraftBukkit
+             if (this.tickCount % 20 == 0) {
+                 this.getCombatTracker().recheckStatus();
+             }
+@@ -2741,7 +3228,7 @@
+         this.elytraAnimationState.tick();
+     }
+ 
+-    public void detectEquipmentUpdates() {
++    public void detectEquipmentUpdatesPublic() { // CraftBukkit
+         Map<EquipmentSlot, ItemStack> map = this.collectEquipmentChanges();
+ 
+         if (map != null) {
+@@ -3000,7 +3487,7 @@
+         {
+             LivingEntity entityliving = this.getControllingPassenger();
+ 
+-            if (entityliving instanceof Player entityhuman) {
++            if (entityliving instanceof net.minecraft.world.entity.player.Player entityhuman) {
+                 if (this.isAlive()) {
+                     this.travelRidden(entityhuman, vec3d1);
+                     break label112;
+@@ -3063,6 +3550,7 @@
+         this.checkSlowFallDistance();
+         if (!this.level().isClientSide) {
+             if (!this.canGlide()) {
++                if (this.getSharedFlag(7) != false && !CraftEventFactory.callToggleGlideEvent(this, false).isCancelled()) // CraftBukkit
+                 this.setSharedFlag(7, false);
+                 return;
+             }
+@@ -3113,7 +3601,7 @@
+         Level world = this.level();
+ 
+         if (!(world instanceof ServerLevel worldserver)) {
+-            this.level().getEntities(EntityTypeTest.forClass(Player.class), this.getBoundingBox(), EntitySelector.pushableBy(this)).forEach(this::doPush);
++            this.level().getEntities(EntityTypeTest.forClass(net.minecraft.world.entity.player.Player.class), this.getBoundingBox(), EntitySelector.pushableBy(this)).forEach(this::doPush);
+         } else {
+             List list = this.level().getEntities((Entity) this, this.getBoundingBox(), EntitySelector.pushableBy(this));
+ 
+@@ -3305,15 +3793,22 @@
+ 
+     @Override
+     public boolean isPickable() {
+-        return !this.isRemoved();
++        return !this.isRemoved() && this.collides; // CraftBukkit
+     }
+ 
+     @Override
+     public boolean isPushable() {
+-        return this.isAlive() && !this.isSpectator() && !this.onClimbable();
++        return this.isAlive() && !this.isSpectator() && !this.onClimbable() && this.collides; // CraftBukkit
+     }
+ 
++    // CraftBukkit start - collidable API
+     @Override
++    public boolean canCollideWithBukkit(Entity entity) {
++        return this.isPushable() && this.collides != this.collidableExemptions.contains(entity.getUUID());
++    }
++    // CraftBukkit end
++
++    @Override
+     public float getYHeadRot() {
+         return this.yHeadRot;
+     }
+@@ -3483,8 +3978,31 @@
+                 this.releaseUsingItem();
+             } else {
+                 if (!this.useItem.isEmpty() && this.isUsingItem()) {
+-                    ItemStack itemstack = this.useItem.finishUsingItem(this.level(), this);
++                    // CraftBukkit start - fire PlayerItemConsumeEvent
++                    ItemStack itemstack;
++                    if (this instanceof ServerPlayer entityPlayer) {
++                        org.bukkit.inventory.ItemStack craftItem = CraftItemStack.asBukkitCopy(this.useItem);
++                        org.bukkit.inventory.EquipmentSlot hand = org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(enumhand);
++                        PlayerItemConsumeEvent event = new PlayerItemConsumeEvent((Player) this.getBukkitEntity(), craftItem, hand);
++                        this.level().getCraftServer().getPluginManager().callEvent(event);
+ 
++                        if (event.isCancelled()) {
++                            // Update client
++                            Consumable consumable = this.useItem.get(DataComponents.CONSUMABLE);
++                            if (consumable != null) {
++                                consumable.cancelUsingItem(entityPlayer, this.useItem);
++                            }
++                            entityPlayer.getBukkitEntity().updateInventory();
++                            entityPlayer.getBukkitEntity().updateScaledHealth();
++                            return;
++                        }
++
++                        itemstack = (craftItem.equals(event.getItem())) ? this.useItem.finishUsingItem(this.level(), this) : CraftItemStack.asNMSCopy(event.getItem()).finishUsingItem(this.level(), this);
++                    } else {
++                        itemstack = this.useItem.finishUsingItem(this.level(), this);
++                    }
++                    // CraftBukkit end
++
+                     if (itemstack != this.useItem) {
+                         this.setItemInHand(enumhand, itemstack);
+                     }
+@@ -3568,12 +4086,18 @@
+     }
+ 
+     public boolean randomTeleport(double x, double y, double z, boolean particleEffects) {
++        // CraftBukkit start
++        return this.randomTeleport(x, y, z, particleEffects, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.UNKNOWN).orElse(false);
++    }
++
++    public Optional<Boolean> randomTeleport(double d0, double d1, double d2, boolean flag, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause cause) {
++        // CraftBukkit end
+         double d3 = this.getX();
+         double d4 = this.getY();
+         double d5 = this.getZ();
+-        double d6 = y;
++        double d6 = d1;
+         boolean flag1 = false;
+-        BlockPos blockposition = BlockPos.containing(x, y, z);
++        BlockPos blockposition = BlockPos.containing(d0, d1, d2);
+         Level world = this.level();
+ 
+         if (world.hasChunkAt(blockposition)) {
+@@ -3592,18 +4116,43 @@
+             }
+ 
+             if (flag2) {
+-                this.teleportTo(x, d6, z);
++                // CraftBukkit start - Teleport event
++                // this.teleportTo(d0, d6, d2);
++
++                // first set position, to check if the place to teleport is valid
++                this.setPos(d0, d6, d2);
+                 if (world.noCollision((Entity) this) && !world.containsAnyLiquid(this.getBoundingBox())) {
+                     flag1 = true;
+                 }
++                // now revert and call event if the teleport place is valid
++                this.setPos(d3, d4, d5);
++
++                if (flag1) {
++                    if (!(this instanceof ServerPlayer)) {
++                        EntityTeleportEvent teleport = new EntityTeleportEvent(this.getBukkitEntity(), new Location(this.level().getWorld(), d3, d4, d5), new Location(this.level().getWorld(), d0, d6, d2));
++                        this.level().getCraftServer().getPluginManager().callEvent(teleport);
++                        if (!teleport.isCancelled()) {
++                            Location to = teleport.getTo();
++                            this.teleportTo(to.getX(), to.getY(), to.getZ());
++                        } else {
++                            return Optional.empty();
++                        }
++                    } else {
++                        // player teleport event is called in the underlining code
++                        if (!((ServerPlayer) this).connection.teleport(d0, d6, d2, this.getYRot(), this.getXRot(), cause)) {
++                            return Optional.empty();
++                        }
++                    }
++                }
++                // CraftBukkit end
+             }
+         }
+ 
+         if (!flag1) {
+-            this.teleportTo(d3, d4, d5);
+-            return false;
++            // this.enderTeleportTo(d3, d4, d5); // CraftBukkit - already set the location back
++            return Optional.of(false); // CraftBukkit
+         } else {
+-            if (particleEffects) {
++            if (flag) {
+                 world.broadcastEntityEvent(this, (byte) 46);
+             }
+ 
+@@ -3613,7 +4162,7 @@
+                 entitycreature.getNavigation().stop();
+             }
+ 
+-            return true;
++            return Optional.of(true); // CraftBukkit
+         }
+     }
+ 
+@@ -3706,7 +4255,7 @@
+     }
+ 
+     public void stopSleeping() {
+-        Optional optional = this.getSleepingPos();
++        Optional<BlockPos> optional = this.getSleepingPos(); // CraftBukkit - decompile error
+         Level world = this.level();
+ 
+         java.util.Objects.requireNonNull(world);
+@@ -3718,9 +4267,9 @@
+ 
+                 this.level().setBlock(blockposition, (BlockState) iblockdata.setValue(BedBlock.OCCUPIED, false), 3);
+                 Vec3 vec3d = (Vec3) BedBlock.findStandUpPosition(this.getType(), this.level(), blockposition, enumdirection, this.getYRot()).orElseGet(() -> {
+-                    BlockPosition blockposition1 = blockposition.above();
++                    BlockPos blockposition1 = blockposition.above();
+ 
+-                    return new Vec3D((double) blockposition1.getX() + 0.5D, (double) blockposition1.getY() + 0.1D, (double) blockposition1.getZ() + 0.5D);
++                    return new Vec3((double) blockposition1.getX() + 0.5D, (double) blockposition1.getY() + 0.1D, (double) blockposition1.getZ() + 0.5D);
+                 });
+                 Vec3 vec3d1 = Vec3.atBottomCenterOf(blockposition).subtract(vec3d).normalize();
+                 float f = (float) Mth.wrapDegrees(Mth.atan2(vec3d1.z, vec3d1.x) * 57.2957763671875D - 90.0D);
+@@ -3740,7 +4289,7 @@
+ 
+     @Nullable
+     public Direction getBedOrientation() {
+-        BlockPos blockposition = (BlockPos) this.getSleepingPos().orElse((Object) null);
++        BlockPos blockposition = (BlockPos) this.getSleepingPos().orElse(null); // CraftBukkit - decompile error
+ 
+         return blockposition != null ? BedBlock.getBedOrientation(this.level(), blockposition) : null;
+     }
+@@ -3905,7 +4454,7 @@
+     public float maxUpStep() {
+         float f = (float) this.getAttributeValue(Attributes.STEP_HEIGHT);
+ 
+-        return this.getControllingPassenger() instanceof Player ? Math.max(f, 1.0F) : f;
++        return this.getControllingPassenger() instanceof net.minecraft.world.entity.player.Player ? Math.max(f, 1.0F) : f;
+     }
+ 
+     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/Mob.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/Mob.java.patch
new file mode 100644
index 0000000000..786260974e
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/Mob.java.patch
@@ -0,0 +1,333 @@
+--- a/net/minecraft/world/entity/Mob.java
++++ b/net/minecraft/world/entity/Mob.java
+@@ -84,6 +84,17 @@
+ import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets;
+ import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
+ import net.minecraft.world.phys.AABB;
++// CraftBukkit start
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.craftbukkit.entity.CraftLivingEntity;
++import org.bukkit.event.entity.CreatureSpawnEvent;
++import org.bukkit.event.entity.EntityRemoveEvent;
++import org.bukkit.event.entity.EntityTargetLivingEntityEvent;
++import org.bukkit.event.entity.EntityTargetEvent;
++import org.bukkit.event.entity.EntityTransformEvent;
++import org.bukkit.event.entity.EntityUnleashEvent;
++import org.bukkit.event.entity.EntityUnleashEvent.UnleashReason;
++// CraftBukkit end
+ 
+ public abstract class Mob extends LivingEntity implements EquipmentUser, Leashable, Targeting {
+ 
+@@ -132,6 +143,8 @@
+     private BlockPos restrictCenter;
+     private float restrictRadius;
+ 
++    public boolean aware = true; // CraftBukkit
++
+     protected Mob(EntityType<? extends Mob> type, Level world) {
+         super(type, world);
+         this.handItems = NonNullList.withSize(2, ItemStack.EMPTY);
+@@ -160,6 +173,12 @@
+ 
+     }
+ 
++    // CraftBukkit start
++    public void setPersistenceRequired(boolean persistenceRequired) {
++        this.persistenceRequired = persistenceRequired;
++    }
++    // CraftBukkit end
++
+     protected void registerGoals() {}
+ 
+     public static AttributeSupplier.Builder createMobAttributes() {
+@@ -264,13 +283,44 @@
+ 
+     @Nullable
+     protected final LivingEntity getTargetFromBrain() {
+-        return (LivingEntity) this.getBrain().getMemory(MemoryModuleType.ATTACK_TARGET).orElse((Object) null);
++        return (LivingEntity) this.getBrain().getMemory(MemoryModuleType.ATTACK_TARGET).orElse(null); // CraftBukkit - decompile error
+     }
+ 
+     public void setTarget(@Nullable LivingEntity target) {
+-        this.target = target;
++        // CraftBukkit start - fire event
++        this.setTarget(target, EntityTargetEvent.TargetReason.UNKNOWN, true);
+     }
+ 
++    public boolean setTarget(LivingEntity entityliving, EntityTargetEvent.TargetReason reason, boolean fireEvent) {
++        if (this.getTarget() == entityliving) return false;
++        if (fireEvent) {
++            if (reason == EntityTargetEvent.TargetReason.UNKNOWN && this.getTarget() != null && entityliving == null) {
++                reason = this.getTarget().isAlive() ? EntityTargetEvent.TargetReason.FORGOT_TARGET : EntityTargetEvent.TargetReason.TARGET_DIED;
++            }
++            if (reason == EntityTargetEvent.TargetReason.UNKNOWN) {
++                this.level().getCraftServer().getLogger().log(java.util.logging.Level.WARNING, "Unknown target reason, please report on the issue tracker", new Exception());
++            }
++            CraftLivingEntity ctarget = null;
++            if (entityliving != null) {
++                ctarget = (CraftLivingEntity) entityliving.getBukkitEntity();
++            }
++            EntityTargetLivingEntityEvent event = new EntityTargetLivingEntityEvent(this.getBukkitEntity(), ctarget, reason);
++            this.level().getCraftServer().getPluginManager().callEvent(event);
++            if (event.isCancelled()) {
++                return false;
++            }
++
++            if (event.getTarget() != null) {
++                entityliving = ((CraftLivingEntity) event.getTarget()).getHandle();
++            } else {
++                entityliving = null;
++            }
++        }
++        this.target = entityliving;
++        return true;
++        // CraftBukkit end
++    }
++
+     @Override
+     public boolean canAttackType(EntityType<?> type) {
+         return type != EntityType.GHAST;
+@@ -399,6 +449,12 @@
+         return null;
+     }
+ 
++    // CraftBukkit start - Add delegate method
++    public SoundEvent getAmbientSound0() {
++        return this.getAmbientSound();
++    }
++    // CraftBukkit end
++
+     @Override
+     public void addAdditionalSaveData(CompoundTag nbt) {
+         super.addAdditionalSaveData(nbt);
+@@ -473,13 +529,25 @@
+             nbt.putBoolean("NoAI", this.isNoAi());
+         }
+ 
++        nbt.putBoolean("Bukkit.Aware", this.aware); // CraftBukkit
+     }
+ 
+     @Override
+     public void readAdditionalSaveData(CompoundTag nbt) {
+         super.readAdditionalSaveData(nbt);
+-        this.setCanPickUpLoot(nbt.getBoolean("CanPickUpLoot"));
+-        this.persistenceRequired = nbt.getBoolean("PersistenceRequired");
++        // CraftBukkit start - If looting or persistence is false only use it if it was set after we started using it
++        if (nbt.contains("CanPickUpLoot", 99)) {
++            boolean data = nbt.getBoolean("CanPickUpLoot");
++            if (isLevelAtLeast(nbt, 1) || data) {
++                this.setCanPickUpLoot(data);
++            }
++        }
++
++        boolean data = nbt.getBoolean("PersistenceRequired");
++        if (isLevelAtLeast(nbt, 1) || data) {
++            this.persistenceRequired = data;
++        }
++        // CraftBukkit end
+         ListTag nbttaglist;
+         CompoundTag nbttagcompound1;
+         int i;
+@@ -547,6 +615,11 @@
+ 
+         this.lootTableSeed = nbt.getLong("DeathLootTableSeed");
+         this.setNoAi(nbt.getBoolean("NoAI"));
++        // CraftBukkit start
++        if (nbt.contains("Bukkit.Aware")) {
++            this.aware = nbt.getBoolean("Bukkit.Aware");
++        }
++        // CraftBukkit end
+     }
+ 
+     @Override
+@@ -623,23 +696,29 @@
+ 
+     protected void pickUpItem(ServerLevel world, ItemEntity itemEntity) {
+         ItemStack itemstack = itemEntity.getItem();
+-        ItemStack itemstack1 = this.equipItemIfPossible(world, itemstack.copy());
++        ItemStack itemstack1 = this.equipItemIfPossible(world, itemstack.copy(), itemEntity); // CraftBukkit - add item
+ 
+         if (!itemstack1.isEmpty()) {
+             this.onItemPickup(itemEntity);
+             this.take(itemEntity, itemstack1.getCount());
+             itemstack.shrink(itemstack1.getCount());
+             if (itemstack.isEmpty()) {
+-                itemEntity.discard();
++                itemEntity.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
+             }
+         }
+ 
+     }
+ 
+     public ItemStack equipItemIfPossible(ServerLevel world, ItemStack stack) {
+-        EquipmentSlot enumitemslot = this.getEquipmentSlotForItem(stack);
++        // CraftBukkit start - add item
++        return this.equipItemIfPossible(world, stack, null);
++    }
++
++    public ItemStack equipItemIfPossible(ServerLevel worldserver, ItemStack itemstack, ItemEntity entityitem) {
++        // CraftBukkit end
++        EquipmentSlot enumitemslot = this.getEquipmentSlotForItem(itemstack);
+         ItemStack itemstack1 = this.getItemBySlot(enumitemslot);
+-        boolean flag = this.canReplaceCurrentItem(stack, itemstack1, enumitemslot);
++        boolean flag = this.canReplaceCurrentItem(itemstack, itemstack1, enumitemslot);
+ 
+         if (enumitemslot.isArmor() && !flag) {
+             enumitemslot = EquipmentSlot.MAINHAND;
+@@ -647,14 +726,22 @@
+             flag = itemstack1.isEmpty();
+         }
+ 
+-        if (flag && this.canHoldItem(stack)) {
++        // CraftBukkit start
++        boolean canPickup = flag && this.canHoldItem(itemstack);
++        if (entityitem != null) {
++            canPickup = !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPickupItemEvent(this, entityitem, 0, !canPickup).isCancelled();
++        }
++        if (canPickup) {
++            // CraftBukkit end
+             double d0 = (double) this.getEquipmentDropChance(enumitemslot);
+ 
+             if (!itemstack1.isEmpty() && (double) Math.max(this.random.nextFloat() - 0.1F, 0.0F) < d0) {
+-                this.spawnAtLocation(world, itemstack1);
++                this.forceDrops = true; // CraftBukkit
++                this.spawnAtLocation(worldserver, itemstack1);
++                this.forceDrops = false; // CraftBukkit
+             }
+ 
+-            ItemStack itemstack2 = enumitemslot.limit(stack);
++            ItemStack itemstack2 = enumitemslot.limit(itemstack);
+ 
+             this.setItemSlotAndDropWhenKilled(enumitemslot, itemstack2);
+             return itemstack2;
+@@ -768,7 +855,7 @@
+     @Override
+     public void checkDespawn() {
+         if (this.level().getDifficulty() == Difficulty.PEACEFUL && this.shouldDespawnInPeaceful()) {
+-            this.discard();
++            this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
+         } else if (!this.isPersistenceRequired() && !this.requiresCustomPersistence()) {
+             Player entityhuman = this.level().getNearestPlayer(this, -1.0D);
+ 
+@@ -778,14 +865,14 @@
+                 int j = i * i;
+ 
+                 if (d0 > (double) j && this.removeWhenFarAway(d0)) {
+-                    this.discard();
++                    this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
+                 }
+ 
+                 int k = this.getType().getCategory().getNoDespawnDistance();
+                 int l = k * k;
+ 
+                 if (this.noActionTime > 600 && this.random.nextInt(800) == 0 && d0 > (double) l && this.removeWhenFarAway(d0)) {
+-                    this.discard();
++                    this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
+                 } else if (d0 < (double) l) {
+                     this.noActionTime = 0;
+                 }
+@@ -799,6 +886,7 @@
+     @Override
+     protected final void serverAiStep() {
+         ++this.noActionTime;
++        if (!this.aware) return; // CraftBukkit
+         ProfilerFiller gameprofilerfiller = Profiler.get();
+ 
+         gameprofilerfiller.push("sensing");
+@@ -1338,7 +1426,7 @@
+         if (itemstack.getItem() instanceof SpawnEggItem) {
+             if (this.level() instanceof ServerLevel) {
+                 SpawnEggItem itemmonsteregg = (SpawnEggItem) itemstack.getItem();
+-                Optional<Mob> optional = itemmonsteregg.spawnOffspringFromSpawnEgg(player, this, this.getType(), (ServerLevel) this.level(), this.position(), itemstack);
++                Optional<Mob> optional = itemmonsteregg.spawnOffspringFromSpawnEgg(player, this, (EntityType<? extends Mob>) this.getType(), (ServerLevel) this.level(), this.position(), itemstack); // CraftBukkit - decompile error
+ 
+                 optional.ifPresent((entityinsentient) -> {
+                     this.onOffspringSpawnedFromEgg(player, entityinsentient);
+@@ -1389,28 +1477,45 @@
+         return this.restrictRadius != -1.0F;
+     }
+ 
++    // CraftBukkit start
+     @Nullable
+     public <T extends Mob> T convertTo(EntityType<T> entityType, ConversionParams context, EntitySpawnReason reason, ConversionParams.AfterConversion<T> finalizer) {
++        return this.convertTo(entityType, context, reason, finalizer, EntityTransformEvent.TransformReason.UNKNOWN, CreatureSpawnEvent.SpawnReason.DEFAULT);
++    }
++
++    @Nullable
++    public <T extends Mob> T convertTo(EntityType<T> entitytypes, ConversionParams conversionparams, EntitySpawnReason entityspawnreason, ConversionParams.AfterConversion<T> conversionparams_a, EntityTransformEvent.TransformReason transformReason, CreatureSpawnEvent.SpawnReason spawnReason) {
++        // CraftBukkit end
+         if (this.isRemoved()) {
+             return null;
+         } else {
+-            T t0 = (Mob) entityType.create(this.level(), reason);
++            T t0 = entitytypes.create(this.level(), EntitySpawnReason.CONVERSION); // CraftBukkit - decompile error
+ 
+             if (t0 == null) {
+                 return null;
+             } else {
+-                context.type().convert(this, t0, context);
+-                finalizer.finalizeConversion(t0);
++                conversionparams.type().convert(this, t0, conversionparams);
++                conversionparams_a.finalizeConversion(t0);
+                 Level world = this.level();
+ 
++                // CraftBukkit start
++                if (transformReason == null) {
++                    // Special handling for slime split and pig lightning
++                    return t0;
++                }
++
++                if (CraftEventFactory.callEntityTransformEvent(this, t0, transformReason).isCancelled()) {
++                    return null;
++                }
++                // CraftBukkit end
+                 if (world instanceof ServerLevel) {
+                     ServerLevel worldserver = (ServerLevel) world;
+ 
+-                    worldserver.addFreshEntity(t0);
++                    worldserver.addFreshEntity(t0, spawnReason); // CraftBukkit
+                 }
+ 
+-                if (context.type().shouldDiscardAfterConversion()) {
+-                    this.discard();
++                if (conversionparams.type().shouldDiscardAfterConversion()) {
++                    this.discard(EntityRemoveEvent.Cause.TRANSFORMATION); // CraftBukkit - add Bukkit remove cause
+                 }
+ 
+                 return t0;
+@@ -1420,10 +1525,17 @@
+ 
+     @Nullable
+     public <T extends Mob> T convertTo(EntityType<T> entityType, ConversionParams context, ConversionParams.AfterConversion<T> finalizer) {
+-        return this.convertTo(entityType, context, EntitySpawnReason.CONVERSION, finalizer);
++        // CraftBukkit start
++        return this.convertTo(entityType, context, finalizer, EntityTransformEvent.TransformReason.UNKNOWN, CreatureSpawnEvent.SpawnReason.DEFAULT);
+     }
+ 
+     @Nullable
++    public <T extends Mob> T convertTo(EntityType<T> entitytypes, ConversionParams conversionparams, ConversionParams.AfterConversion<T> conversionparams_a, EntityTransformEvent.TransformReason transformReason, CreatureSpawnEvent.SpawnReason spawnReason) {
++        return this.convertTo(entitytypes, conversionparams, EntitySpawnReason.CONVERSION, conversionparams_a, transformReason, spawnReason);
++        // CraftBukkit end
++    }
++
++    @Nullable
+     @Override
+     public Leashable.LeashData getLeashData() {
+         return this.leashData;
+@@ -1458,6 +1570,7 @@
+         boolean flag1 = super.startRiding(entity, force);
+ 
+         if (flag1 && this.isLeashed()) {
++            this.level().getCraftServer().getPluginManager().callEvent(new EntityUnleashEvent(this.getBukkitEntity(), UnleashReason.UNKNOWN)); // CraftBukkit
+             this.dropLeash();
+         }
+ 
+@@ -1542,7 +1655,7 @@
+ 
+             if (f1 > 0.0F && target instanceof LivingEntity) {
+                 entityliving = (LivingEntity) target;
+-                entityliving.knockback((double) (f1 * 0.5F), (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)));
++                entityliving.knockback((double) (f1 * 0.5F), (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)), this, org.bukkit.event.entity.EntityKnockbackEvent.KnockbackCause.ENTITY_ATTACK); // CraftBukkit
+                 this.setDeltaMovement(this.getDeltaMovement().multiply(0.6D, 1.0D, 0.6D));
+             }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/IEntityAngerable.patch b/paper-server/patches/sources/net/minecraft/world/entity/NeutralMob.java.patch
similarity index 52%
rename from paper-server/patches/sources/net/minecraft/world/entity/IEntityAngerable.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/NeutralMob.java.patch
index 13eea45b8b..25410e40a5 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/IEntityAngerable.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/NeutralMob.java.patch
@@ -1,48 +1,47 @@
---- a/net/minecraft/world/entity/IEntityAngerable.java
-+++ b/net/minecraft/world/entity/IEntityAngerable.java
-@@ -9,6 +9,10 @@
+--- a/net/minecraft/world/entity/NeutralMob.java
++++ b/net/minecraft/world/entity/NeutralMob.java
+@@ -8,6 +8,9 @@
+ import net.minecraft.world.entity.player.Player;
  import net.minecraft.world.level.GameRules;
- import net.minecraft.world.level.World;
- 
+ import net.minecraft.world.level.Level;
 +// CraftBukkit start
 +import org.bukkit.event.entity.EntityTargetEvent;
 +// CraftBukkit end
-+
- public interface IEntityAngerable {
  
-     String TAG_ANGER_TIME = "AngerTime";
-@@ -48,14 +52,14 @@
-                     if (entity instanceof EntityInsentient) {
-                         EntityInsentient entityinsentient = (EntityInsentient) entity;
+ public interface NeutralMob {
+ 
+@@ -48,14 +51,14 @@
+                     if (entity instanceof Mob) {
+                         Mob entityinsentient = (Mob) entity;
  
 -                        this.setTarget(entityinsentient);
 +                        this.setTarget(entityinsentient, EntityTargetEvent.TargetReason.UNKNOWN, false); // CraftBukkit
                          this.setLastHurtByMob(entityinsentient);
                      }
  
-                     if (entity instanceof EntityHuman) {
-                         EntityHuman entityhuman = (EntityHuman) entity;
+                     if (entity instanceof Player) {
+                         Player entityhuman = (Player) entity;
  
 -                        this.setTarget(entityhuman);
 +                        this.setTarget(entityhuman, EntityTargetEvent.TargetReason.UNKNOWN, false); // CraftBukkit
                          this.setLastHurtByPlayer(entityhuman);
                      }
  
-@@ -114,7 +118,7 @@
+@@ -114,7 +117,7 @@
      default void stopBeingAngry() {
-         this.setLastHurtByMob((EntityLiving) null);
+         this.setLastHurtByMob((LivingEntity) null);
          this.setPersistentAngerTarget((UUID) null);
--        this.setTarget((EntityLiving) null);
-+        this.setTarget((EntityLiving) null, org.bukkit.event.entity.EntityTargetEvent.TargetReason.FORGOT_TARGET, true); // CraftBukkit
+-        this.setTarget((LivingEntity) null);
++        this.setTarget((LivingEntity) null, org.bukkit.event.entity.EntityTargetEvent.TargetReason.FORGOT_TARGET, true); // CraftBukkit
          this.setRemainingPersistentAngerTime(0);
      }
  
-@@ -127,6 +131,8 @@
+@@ -127,6 +130,8 @@
  
-     void setTarget(@Nullable EntityLiving entityliving);
+     void setTarget(@Nullable LivingEntity target);
  
-+    boolean setTarget(@Nullable EntityLiving entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fireEvent); // CraftBukkit
++    boolean setTarget(@Nullable LivingEntity entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fireEvent); // CraftBukkit
 +
-     boolean canAttack(EntityLiving entityliving);
+     boolean canAttack(LivingEntity target);
  
      @Nullable
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/PathfinderMob.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/PathfinderMob.java.patch
new file mode 100644
index 0000000000..24a880fc47
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/PathfinderMob.java.patch
@@ -0,0 +1,12 @@
+--- a/net/minecraft/world/entity/PathfinderMob.java
++++ b/net/minecraft/world/entity/PathfinderMob.java
+@@ -10,6 +10,9 @@
+ import net.minecraft.world.level.LevelAccessor;
+ import net.minecraft.world.level.LevelReader;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import org.bukkit.event.entity.EntityUnleashEvent;
++// CraftBukkit end
+ 
+ public abstract class PathfinderMob extends Mob {
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/TamableAnimal.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/TamableAnimal.java.patch
new file mode 100644
index 0000000000..7a3fb81abc
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/TamableAnimal.java.patch
@@ -0,0 +1,30 @@
+--- a/net/minecraft/world/entity/TamableAnimal.java
++++ b/net/minecraft/world/entity/TamableAnimal.java
+@@ -27,6 +27,11 @@
+ import net.minecraft.world.level.pathfinder.PathType;
+ import net.minecraft.world.level.pathfinder.WalkNodeEvaluator;
+ import net.minecraft.world.scores.PlayerTeam;
++// CraftBukkit start
++import org.bukkit.Location;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.event.entity.EntityTeleportEvent;
++// CraftBukkit end
+ 
+ public abstract class TamableAnimal extends Animal implements OwnableEntity {
+ 
+@@ -295,7 +300,14 @@
+         if (!this.canTeleportTo(new BlockPos(x, y, z))) {
+             return false;
+         } else {
+-            this.moveTo((double) x + 0.5D, (double) y, (double) z + 0.5D, this.getYRot(), this.getXRot());
++            // CraftBukkit start
++            EntityTeleportEvent event = CraftEventFactory.callEntityTeleportEvent(this, (double) x + 0.5D, (double) y, (double) z + 0.5D);
++            if (event.isCancelled()) {
++                return false;
++            }
++            Location to = event.getTo();
++            this.moveTo(to.getX(), to.getY(), to.getZ(), to.getYaw(), to.getPitch());
++            // CraftBukkit end
+             this.navigation.stop();
+             return true;
+         }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/attributes/Attributes.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/attributes/Attributes.java.patch
new file mode 100644
index 0000000000..0bd19b831e
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/attributes/Attributes.java.patch
@@ -0,0 +1,7 @@
+--- a/net/minecraft/world/entity/ai/attributes/Attributes.java
++++ b/net/minecraft/world/entity/ai/attributes/Attributes.java
+@@ -1,3 +1,4 @@
++// mc-dev import
+ package net.minecraft.world.entity.ai.attributes;
+ 
+ import net.minecraft.core.Holder;
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/attributes/GenericAttributes.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/attributes/GenericAttributes.patch
deleted file mode 100644
index 034aac95ab..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/attributes/GenericAttributes.patch
+++ /dev/null
@@ -1,7 +0,0 @@
---- a/net/minecraft/world/entity/ai/attributes/GenericAttributes.java
-+++ b/net/minecraft/world/entity/ai/attributes/GenericAttributes.java
-@@ -1,3 +1,4 @@
-+// mc-dev import
- package net.minecraft.world.entity.ai.attributes;
- 
- import net.minecraft.core.Holder;
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorCareer.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/AssignProfessionFromJobSite.java.patch
similarity index 84%
rename from paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorCareer.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/AssignProfessionFromJobSite.java.patch
index ec8f9aad80..a3aec14777 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorCareer.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/AssignProfessionFromJobSite.java.patch
@@ -1,7 +1,7 @@
---- a/net/minecraft/world/entity/ai/behavior/BehaviorCareer.java
-+++ b/net/minecraft/world/entity/ai/behavior/BehaviorCareer.java
+--- a/net/minecraft/world/entity/ai/behavior/AssignProfessionFromJobSite.java
++++ b/net/minecraft/world/entity/ai/behavior/AssignProfessionFromJobSite.java
 @@ -9,6 +9,12 @@
- import net.minecraft.world.entity.npc.EntityVillager;
+ import net.minecraft.world.entity.npc.Villager;
  import net.minecraft.world.entity.npc.VillagerProfession;
  
 +// CraftBukkit start
@@ -10,9 +10,9 @@
 +import org.bukkit.event.entity.VillagerCareerChangeEvent;
 +// CraftBukkit end
 +
- public class BehaviorCareer {
+ public class AssignProfessionFromJobSite {
  
-     public BehaviorCareer() {}
+     public AssignProfessionFromJobSite() {}
 @@ -37,7 +43,14 @@
                                      return villagerprofession.heldJobSite().test(holder);
                                  }).findFirst();
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorFollowAdult.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BabyFollowAdult.java.patch
similarity index 55%
rename from paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorFollowAdult.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BabyFollowAdult.java.patch
index fd374d3742..fe0de69d00 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorFollowAdult.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BabyFollowAdult.java.patch
@@ -1,27 +1,26 @@
---- a/net/minecraft/world/entity/ai/behavior/BehaviorFollowAdult.java
-+++ b/net/minecraft/world/entity/ai/behavior/BehaviorFollowAdult.java
-@@ -8,6 +8,13 @@
+--- a/net/minecraft/world/entity/ai/behavior/BabyFollowAdult.java
++++ b/net/minecraft/world/entity/ai/behavior/BabyFollowAdult.java
+@@ -7,6 +7,12 @@
+ import net.minecraft.world.entity.ai.behavior.declarative.BehaviorBuilder;
  import net.minecraft.world.entity.ai.memory.MemoryModuleType;
- import net.minecraft.world.entity.ai.memory.MemoryTarget;
- 
+ import net.minecraft.world.entity.ai.memory.WalkTarget;
 +// CraftBukkit start
 +import org.bukkit.craftbukkit.entity.CraftLivingEntity;
 +import org.bukkit.craftbukkit.event.CraftEventFactory;
 +import org.bukkit.event.entity.EntityTargetEvent;
 +import org.bukkit.event.entity.EntityTargetLivingEntityEvent;
 +// CraftBukkit end
-+
- public class BehaviorFollowAdult {
  
-     public BehaviorFollowAdult() {}
-@@ -25,9 +32,20 @@
+ public class BabyFollowAdult {
+ 
+@@ -25,9 +31,20 @@
                      if (!entityageable.isBaby()) {
                          return false;
                      } else {
--                        EntityAgeable entityageable1 = (EntityAgeable) behaviorbuilder_b.get(memoryaccessor);
-+                        EntityLiving entityageable1 = (EntityAgeable) behaviorbuilder_b.get(memoryaccessor); // CraftBukkit - type
+-                        AgeableMob entityageable1 = (AgeableMob) behaviorbuilder_b.get(memoryaccessor);
++                        LivingEntity entityageable1 = (AgeableMob) behaviorbuilder_b.get(memoryaccessor); // CraftBukkit - type
  
-                         if (entityageable.closerThan(entityageable1, (double) (uniformint.getMaxValue() + 1)) && !entityageable.closerThan(entityageable1, (double) uniformint.getMinValue())) {
+                         if (entityageable.closerThan(entityageable1, (double) (executionRange.getMaxValue() + 1)) && !entityageable.closerThan(entityageable1, (double) executionRange.getMinValue())) {
 +                            // CraftBukkit start
 +                            EntityTargetLivingEntityEvent event = CraftEventFactory.callEntityTargetLivingEvent(entityageable, entityageable1, EntityTargetEvent.TargetReason.FOLLOW_LEADER);
 +                            if (event.isCancelled()) {
@@ -33,6 +32,6 @@
 +                            }
 +                            entityageable1 = ((CraftLivingEntity) event.getTarget()).getHandle();
 +                            // CraftBukkit end
-                             MemoryTarget memorytarget = new MemoryTarget(new BehaviorPositionEntity(entityageable1, false), (Float) function.apply(entityageable), uniformint.getMinValue() - 1);
+                             WalkTarget memorytarget = new WalkTarget(new EntityTracker(entityageable1, false), (Float) speed.apply(entityageable), executionRange.getMinValue() - 1);
  
-                             memoryaccessor1.set(new BehaviorPositionEntity(entityageable1, true));
+                             memoryaccessor1.set(new EntityTracker(entityageable1, true));
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorFarm.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorFarm.patch
deleted file mode 100644
index b02f71bc72..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorFarm.patch
+++ /dev/null
@@ -1,58 +0,0 @@
---- a/net/minecraft/world/entity/ai/behavior/BehaviorFarm.java
-+++ b/net/minecraft/world/entity/ai/behavior/BehaviorFarm.java
-@@ -27,6 +27,11 @@
- import net.minecraft.world.level.block.state.IBlockData;
- import net.minecraft.world.level.gameevent.GameEvent;
- 
-+// CraftBukkit start
-+import net.minecraft.world.level.block.Blocks;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+// CraftBukkit end
-+
- public class BehaviorFarm extends Behavior<EntityVillager> {
- 
-     private static final int HARVEST_DURATION = 200;
-@@ -82,8 +87,8 @@
- 
-     protected void start(WorldServer worldserver, EntityVillager entityvillager, long i) {
-         if (i > this.nextOkStartTime && this.aboveFarmlandPos != null) {
--            entityvillager.getBrain().setMemory(MemoryModuleType.LOOK_TARGET, (Object) (new BehaviorTarget(this.aboveFarmlandPos)));
--            entityvillager.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (Object) (new MemoryTarget(new BehaviorTarget(this.aboveFarmlandPos), 0.5F, 1)));
-+            entityvillager.getBrain().setMemory(MemoryModuleType.LOOK_TARGET, (new BehaviorTarget(this.aboveFarmlandPos))); // CraftBukkit - decompile error
-+            entityvillager.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (new MemoryTarget(new BehaviorTarget(this.aboveFarmlandPos), 0.5F, 1))); // CraftBukkit - decompile error
-         }
- 
-     }
-@@ -103,7 +108,9 @@
-                 Block block1 = worldserver.getBlockState(this.aboveFarmlandPos.below()).getBlock();
- 
-                 if (block instanceof BlockCrops && ((BlockCrops) block).isMaxAge(iblockdata)) {
-+                    if (CraftEventFactory.callEntityChangeBlockEvent(entityvillager, this.aboveFarmlandPos, Blocks.AIR.defaultBlockState())) { // CraftBukkit
-                     worldserver.destroyBlock(this.aboveFarmlandPos, true, entityvillager);
-+                    } // CraftBukkit
-                 }
- 
-                 if (iblockdata.isAir() && block1 instanceof BlockSoil && entityvillager.hasFarmSeeds()) {
-@@ -120,9 +127,11 @@
-                                 ItemBlock itemblock = (ItemBlock) item;
-                                 IBlockData iblockdata1 = itemblock.getBlock().defaultBlockState();
- 
-+                                if (CraftEventFactory.callEntityChangeBlockEvent(entityvillager, this.aboveFarmlandPos, iblockdata1)) { // CraftBukkit
-                                 worldserver.setBlockAndUpdate(this.aboveFarmlandPos, iblockdata1);
-                                 worldserver.gameEvent((Holder) GameEvent.BLOCK_PLACE, this.aboveFarmlandPos, GameEvent.a.of(entityvillager, iblockdata1));
-                                 flag = true;
-+                                } // CraftBukkit
-                             }
-                         }
- 
-@@ -142,8 +151,8 @@
-                     this.aboveFarmlandPos = this.getValidFarmland(worldserver);
-                     if (this.aboveFarmlandPos != null) {
-                         this.nextOkStartTime = i + 20L;
--                        entityvillager.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (Object) (new MemoryTarget(new BehaviorTarget(this.aboveFarmlandPos), 0.5F, 1)));
--                        entityvillager.getBrain().setMemory(MemoryModuleType.LOOK_TARGET, (Object) (new BehaviorTarget(this.aboveFarmlandPos)));
-+                        entityvillager.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (new MemoryTarget(new BehaviorTarget(this.aboveFarmlandPos), 0.5F, 1))); // CraftBukkit - decompile error
-+                        entityvillager.getBrain().setMemory(MemoryModuleType.LOOK_TARGET, (new BehaviorTarget(this.aboveFarmlandPos))); // CraftBukkit - decompile error
-                     }
-                 }
-             }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorMakeLove.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorMakeLove.patch
deleted file mode 100644
index b8033a44c4..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorMakeLove.patch
+++ /dev/null
@@ -1,43 +0,0 @@
---- a/net/minecraft/world/entity/ai/behavior/BehaviorMakeLove.java
-+++ b/net/minecraft/world/entity/ai/behavior/BehaviorMakeLove.java
-@@ -18,6 +18,11 @@
- import net.minecraft.world.entity.npc.EntityVillager;
- import net.minecraft.world.level.pathfinder.PathEntity;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.event.entity.CreatureSpawnEvent;
-+// CraftBukkit end
-+
- public class BehaviorMakeLove extends Behavior<EntityVillager> {
- 
-     private long birthTimestamp;
-@@ -114,11 +119,17 @@
-         if (entityvillager2 == null) {
-             return Optional.empty();
-         } else {
--            entityvillager.setAge(6000);
--            entityvillager1.setAge(6000);
-             entityvillager2.setAge(-24000);
-             entityvillager2.moveTo(entityvillager.getX(), entityvillager.getY(), entityvillager.getZ(), 0.0F, 0.0F);
--            worldserver.addFreshEntityWithPassengers(entityvillager2);
-+            // CraftBukkit start - call EntityBreedEvent
-+            if (CraftEventFactory.callEntityBreedEvent(entityvillager2, entityvillager, entityvillager1, null, null, 0).isCancelled()) {
-+                return Optional.empty();
-+            }
-+            // Move age setting down
-+            entityvillager.setAge(6000);
-+            entityvillager1.setAge(6000);
-+            worldserver.addFreshEntityWithPassengers(entityvillager2, CreatureSpawnEvent.SpawnReason.BREEDING);
-+            // CraftBukkit end
-             worldserver.broadcastEntityEvent(entityvillager2, (byte) 12);
-             return Optional.of(entityvillager2);
-         }
-@@ -127,6 +138,6 @@
-     private void giveBedToChild(WorldServer worldserver, EntityVillager entityvillager, BlockPosition blockposition) {
-         GlobalPos globalpos = GlobalPos.of(worldserver.dimension(), blockposition);
- 
--        entityvillager.getBrain().setMemory(MemoryModuleType.HOME, (Object) globalpos);
-+        entityvillager.getBrain().setMemory(MemoryModuleType.HOME, globalpos); // CraftBukkit - decompile error
-     }
- }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorUtil.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorUtil.patch
deleted file mode 100644
index ffcb48472a..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorUtil.patch
+++ /dev/null
@@ -1,51 +0,0 @@
---- a/net/minecraft/world/entity/ai/behavior/BehaviorUtil.java
-+++ b/net/minecraft/world/entity/ai/behavior/BehaviorUtil.java
-@@ -60,7 +60,7 @@
-     }
- 
-     public static void lookAtEntity(EntityLiving entityliving, EntityLiving entityliving1) {
--        entityliving.getBrain().setMemory(MemoryModuleType.LOOK_TARGET, (Object) (new BehaviorPositionEntity(entityliving1, true)));
-+        entityliving.getBrain().setMemory(MemoryModuleType.LOOK_TARGET, (new BehaviorPositionEntity(entityliving1, true))); // CraftBukkit - decompile error
-     }
- 
-     private static void setWalkAndLookTargetMemoriesToEachOther(EntityLiving entityliving, EntityLiving entityliving1, float f, int i) {
-@@ -79,8 +79,8 @@
-     public static void setWalkAndLookTargetMemories(EntityLiving entityliving, BehaviorPosition behaviorposition, float f, int i) {
-         MemoryTarget memorytarget = new MemoryTarget(behaviorposition, f, i);
- 
--        entityliving.getBrain().setMemory(MemoryModuleType.LOOK_TARGET, (Object) behaviorposition);
--        entityliving.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (Object) memorytarget);
-+        entityliving.getBrain().setMemory(MemoryModuleType.LOOK_TARGET, behaviorposition); // CraftBukkit - decompile error
-+        entityliving.getBrain().setMemory(MemoryModuleType.WALK_TARGET, memorytarget); // CraftBukkit - decompile error
-     }
- 
-     public static void throwItem(EntityLiving entityliving, ItemStack itemstack, Vec3D vec3d) {
-@@ -90,6 +90,7 @@
-     }
- 
-     public static void throwItem(EntityLiving entityliving, ItemStack itemstack, Vec3D vec3d, Vec3D vec3d1, float f) {
-+        if (itemstack.isEmpty()) return; // CraftBukkit - SPIGOT-4940: no empty loot
-         double d0 = entityliving.getEyeY() - (double) f;
-         EntityItem entityitem = new EntityItem(entityliving.level(), entityliving.getX(), d0, entityliving.getZ(), itemstack);
- 
-@@ -99,12 +100,19 @@
-         vec3d2 = vec3d2.normalize().multiply(vec3d1.x, vec3d1.y, vec3d1.z);
-         entityitem.setDeltaMovement(vec3d2);
-         entityitem.setDefaultPickUpDelay();
-+        // CraftBukkit start
-+        org.bukkit.event.entity.EntityDropItemEvent event = new org.bukkit.event.entity.EntityDropItemEvent(entityliving.getBukkitEntity(), (org.bukkit.entity.Item) entityitem.getBukkitEntity());
-+        entityitem.level().getCraftServer().getPluginManager().callEvent(event);
-+        if (event.isCancelled()) {
-+            return;
-+        }
-+        // CraftBukkit end
-         entityliving.level().addFreshEntity(entityitem);
-     }
- 
-     public static SectionPosition findSectionClosestToVillage(WorldServer worldserver, SectionPosition sectionposition, int i) {
-         int j = worldserver.sectionsToVillage(sectionposition);
--        Stream stream = SectionPosition.cube(sectionposition, i).filter((sectionposition1) -> {
-+        Stream<SectionPosition> stream = SectionPosition.cube(sectionposition, i).filter((sectionposition1) -> { // CraftBukkit - decompile error
-             return worldserver.sectionsToVillage(sectionposition1) < j;
-         });
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java.patch
new file mode 100644
index 0000000000..a738cb8985
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java.patch
@@ -0,0 +1,51 @@
+--- a/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java
++++ b/net/minecraft/world/entity/ai/behavior/BehaviorUtils.java
+@@ -60,7 +60,7 @@
+     }
+ 
+     public static void lookAtEntity(LivingEntity entity, LivingEntity target) {
+-        entity.getBrain().setMemory(MemoryModuleType.LOOK_TARGET, (Object) (new EntityTracker(target, true)));
++        entity.getBrain().setMemory(MemoryModuleType.LOOK_TARGET, (new EntityTracker(target, true))); // CraftBukkit - decompile error
+     }
+ 
+     private static void setWalkAndLookTargetMemoriesToEachOther(LivingEntity first, LivingEntity second, float speed, int completionRange) {
+@@ -79,8 +79,8 @@
+     public static void setWalkAndLookTargetMemories(LivingEntity entity, PositionTracker target, float speed, int completionRange) {
+         WalkTarget memorytarget = new WalkTarget(target, speed, completionRange);
+ 
+-        entity.getBrain().setMemory(MemoryModuleType.LOOK_TARGET, (Object) target);
+-        entity.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (Object) memorytarget);
++        entity.getBrain().setMemory(MemoryModuleType.LOOK_TARGET, target); // CraftBukkit - decompile error
++        entity.getBrain().setMemory(MemoryModuleType.WALK_TARGET, memorytarget); // CraftBukkit - decompile error
+     }
+ 
+     public static void throwItem(LivingEntity entity, ItemStack stack, Vec3 targetLocation) {
+@@ -90,6 +90,7 @@
+     }
+ 
+     public static void throwItem(LivingEntity entity, ItemStack stack, Vec3 targetLocation, Vec3 velocityFactor, float yOffset) {
++        if (stack.isEmpty()) return; // CraftBukkit - SPIGOT-4940: no empty loot
+         double d0 = entity.getEyeY() - (double) yOffset;
+         ItemEntity entityitem = new ItemEntity(entity.level(), entity.getX(), d0, entity.getZ(), stack);
+ 
+@@ -99,12 +100,19 @@
+         vec3d2 = vec3d2.normalize().multiply(velocityFactor.x, velocityFactor.y, velocityFactor.z);
+         entityitem.setDeltaMovement(vec3d2);
+         entityitem.setDefaultPickUpDelay();
++        // CraftBukkit start
++        org.bukkit.event.entity.EntityDropItemEvent event = new org.bukkit.event.entity.EntityDropItemEvent(entity.getBukkitEntity(), (org.bukkit.entity.Item) entityitem.getBukkitEntity());
++        entityitem.level().getCraftServer().getPluginManager().callEvent(event);
++        if (event.isCancelled()) {
++            return;
++        }
++        // CraftBukkit end
+         entity.level().addFreshEntity(entityitem);
+     }
+ 
+     public static SectionPos findSectionClosestToVillage(ServerLevel world, SectionPos center, int radius) {
+         int j = world.sectionsToVillage(center);
+-        Stream stream = SectionPos.cube(center, radius).filter((sectionposition1) -> {
++        Stream<SectionPos> stream = SectionPos.cube(center, radius).filter((sectionposition1) -> { // CraftBukkit - decompile error
+             return world.sectionsToVillage(sectionposition1) < j;
+         });
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorFindAdmirableItem.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/GoToWantedItem.java.patch
similarity index 56%
rename from paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorFindAdmirableItem.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/GoToWantedItem.java.patch
index bc34f91743..081aa95a66 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorFindAdmirableItem.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/GoToWantedItem.java.patch
@@ -1,9 +1,9 @@
---- a/net/minecraft/world/entity/ai/behavior/BehaviorFindAdmirableItem.java
-+++ b/net/minecraft/world/entity/ai/behavior/BehaviorFindAdmirableItem.java
+--- a/net/minecraft/world/entity/ai/behavior/GoToWantedItem.java
++++ b/net/minecraft/world/entity/ai/behavior/GoToWantedItem.java
 @@ -28,6 +28,20 @@
-                     EntityItem entityitem = (EntityItem) behaviorbuilder_b.get(memoryaccessor2);
+                     ItemEntity entityitem = (ItemEntity) behaviorbuilder_b.get(memoryaccessor2);
  
-                     if (behaviorbuilder_b.tryGet(memoryaccessor3).isEmpty() && predicate.test(entityliving) && entityitem.closerThan(entityliving, (double) i) && entityliving.level().getWorldBorder().isWithinBounds(entityitem.blockPosition()) && entityliving.canPickUpLoot()) {
+                     if (behaviorbuilder_b.tryGet(memoryaccessor3).isEmpty() && startCondition.test(entityliving) && entityitem.closerThan(entityliving, (double) radius) && entityliving.level().getWorldBorder().isWithinBounds(entityitem.blockPosition()) && entityliving.canPickUpLoot()) {
 +                        // CraftBukkit start
 +                        if (entityliving instanceof net.minecraft.world.entity.animal.allay.Allay) {
 +                            org.bukkit.event.entity.EntityTargetEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTargetEvent(entityliving, entityitem, org.bukkit.event.entity.EntityTargetEvent.TargetReason.CLOSEST_ENTITY);
@@ -11,13 +11,13 @@
 +                            if (event.isCancelled()) {
 +                                return false;
 +                            }
-+                            if (!(event.getTarget() instanceof EntityItem)) {
++                            if (!(event.getTarget() instanceof ItemEntity)) {
 +                                memoryaccessor2.erase();
 +                            }
 +
-+                            entityitem = (EntityItem) ((org.bukkit.craftbukkit.entity.CraftEntity) event.getTarget()).getHandle();
++                            entityitem = (ItemEntity) ((org.bukkit.craftbukkit.entity.CraftEntity) event.getTarget()).getHandle();
 +                        }
 +                        // CraftBukkit end
-                         MemoryTarget memorytarget = new MemoryTarget(new BehaviorPositionEntity(entityitem, false), f, 0);
+                         WalkTarget memorytarget = new WalkTarget(new EntityTracker(entityitem, false), speed, 0);
  
-                         memoryaccessor.set(new BehaviorPositionEntity(entityitem, true));
+                         memoryaccessor.set(new EntityTracker(entityitem, true));
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/HarvestFarmland.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/HarvestFarmland.java.patch
new file mode 100644
index 0000000000..3ccec446ad
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/HarvestFarmland.java.patch
@@ -0,0 +1,63 @@
+--- a/net/minecraft/world/entity/ai/behavior/HarvestFarmland.java
++++ b/net/minecraft/world/entity/ai/behavior/HarvestFarmland.java
+@@ -22,10 +22,15 @@
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.level.GameRules;
+ import net.minecraft.world.level.block.Block;
++import net.minecraft.world.level.gameevent.GameEvent;
++
++// CraftBukkit start
++import net.minecraft.world.level.block.Blocks;
+ import net.minecraft.world.level.block.CropBlock;
+ import net.minecraft.world.level.block.FarmBlock;
+ import net.minecraft.world.level.block.state.BlockState;
+-import net.minecraft.world.level.gameevent.GameEvent;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++// CraftBukkit end
+ 
+ public class HarvestFarmland extends Behavior<Villager> {
+ 
+@@ -82,8 +87,8 @@
+ 
+     protected void start(ServerLevel worldserver, Villager entityvillager, long i) {
+         if (i > this.nextOkStartTime && this.aboveFarmlandPos != null) {
+-            entityvillager.getBrain().setMemory(MemoryModuleType.LOOK_TARGET, (Object) (new BlockPosTracker(this.aboveFarmlandPos)));
+-            entityvillager.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (Object) (new WalkTarget(new BlockPosTracker(this.aboveFarmlandPos), 0.5F, 1)));
++            entityvillager.getBrain().setMemory(MemoryModuleType.LOOK_TARGET, (new BlockPosTracker(this.aboveFarmlandPos))); // CraftBukkit - decompile error
++            entityvillager.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (new WalkTarget(new BlockPosTracker(this.aboveFarmlandPos), 0.5F, 1))); // CraftBukkit - decompile error
+         }
+ 
+     }
+@@ -103,7 +108,9 @@
+                 Block block1 = world.getBlockState(this.aboveFarmlandPos.below()).getBlock();
+ 
+                 if (block instanceof CropBlock && ((CropBlock) block).isMaxAge(iblockdata)) {
++                    if (CraftEventFactory.callEntityChangeBlockEvent(entity, this.aboveFarmlandPos, Blocks.AIR.defaultBlockState())) { // CraftBukkit
+                     world.destroyBlock(this.aboveFarmlandPos, true, entity);
++                    } // CraftBukkit
+                 }
+ 
+                 if (iblockdata.isAir() && block1 instanceof FarmBlock && entity.hasFarmSeeds()) {
+@@ -120,9 +127,11 @@
+                                 BlockItem itemblock = (BlockItem) item;
+                                 BlockState iblockdata1 = itemblock.getBlock().defaultBlockState();
+ 
++                                if (CraftEventFactory.callEntityChangeBlockEvent(entity, this.aboveFarmlandPos, iblockdata1)) { // CraftBukkit
+                                 world.setBlockAndUpdate(this.aboveFarmlandPos, iblockdata1);
+                                 world.gameEvent((Holder) GameEvent.BLOCK_PLACE, this.aboveFarmlandPos, GameEvent.Context.of(entity, iblockdata1));
+                                 flag = true;
++                                } // CraftBukkit
+                             }
+                         }
+ 
+@@ -142,8 +151,8 @@
+                     this.aboveFarmlandPos = this.getValidFarmland(world);
+                     if (this.aboveFarmlandPos != null) {
+                         this.nextOkStartTime = time + 20L;
+-                        entity.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (Object) (new WalkTarget(new BlockPosTracker(this.aboveFarmlandPos), 0.5F, 1)));
+-                        entity.getBrain().setMemory(MemoryModuleType.LOOK_TARGET, (Object) (new BlockPosTracker(this.aboveFarmlandPos)));
++                        entity.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (new WalkTarget(new BlockPosTracker(this.aboveFarmlandPos), 0.5F, 1))); // CraftBukkit - decompile error
++                        entity.getBrain().setMemory(MemoryModuleType.LOOK_TARGET, (new BlockPosTracker(this.aboveFarmlandPos))); // CraftBukkit - decompile error
+                     }
+                 }
+             }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorInteractDoor.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java.patch
similarity index 66%
rename from paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorInteractDoor.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java.patch
index 28e608f44b..7348471be5 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorInteractDoor.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java.patch
@@ -1,7 +1,7 @@
---- a/net/minecraft/world/entity/ai/behavior/BehaviorInteractDoor.java
-+++ b/net/minecraft/world/entity/ai/behavior/BehaviorInteractDoor.java
+--- a/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java
++++ b/net/minecraft/world/entity/ai/behavior/InteractWithDoor.java
 @@ -61,6 +61,13 @@
-                             BlockDoor blockdoor = (BlockDoor) iblockdata.getBlock();
+                             DoorBlock blockdoor = (DoorBlock) iblockdata.getBlock();
  
                              if (!blockdoor.isOpen(iblockdata)) {
 +                                // CraftBukkit start - entities opening doors
@@ -15,7 +15,7 @@
                              }
  
 @@ -76,6 +83,13 @@
-                             BlockDoor blockdoor1 = (BlockDoor) iblockdata1.getBlock();
+                             DoorBlock blockdoor1 = (DoorBlock) iblockdata1.getBlock();
  
                              if (!blockdoor1.isOpen(iblockdata1)) {
 +                                // CraftBukkit start - entities opening doors
@@ -26,14 +26,14 @@
 +                                }
 +                                // CraftBukkit end
                                  blockdoor1.setOpen(entityliving, worldserver, iblockdata1, blockposition1, true);
-                                 optional = rememberDoorToClose(memoryaccessor1, optional, worldserver, blockposition1);
+                                 optional = InteractWithDoor.rememberDoorToClose(memoryaccessor1, optional, worldserver, blockposition1);
                              }
 @@ -129,7 +143,7 @@
      }
  
-     private static boolean areOtherMobsComingThroughDoor(EntityLiving entityliving, BlockPosition blockposition, Optional<List<EntityLiving>> optional) {
--        return optional.isEmpty() ? false : ((List) optional.get()).stream().filter((entityliving1) -> {
-+        return optional.isEmpty() ? false : (optional.get()).stream().filter((entityliving1) -> { // CraftBukkit - decompile error
-             return entityliving1.getType() == entityliving.getType();
+     private static boolean areOtherMobsComingThroughDoor(LivingEntity entity, BlockPos pos, Optional<List<LivingEntity>> otherMobs) {
+-        return otherMobs.isEmpty() ? false : ((List) otherMobs.get()).stream().filter((entityliving1) -> {
++        return otherMobs.isEmpty() ? false : (otherMobs.get()).stream().filter((entityliving1) -> { // CraftBukkit - decompile error
+             return entityliving1.getType() == entity.getType();
          }).filter((entityliving1) -> {
-             return blockposition.closerToCenterThan(entityliving1.position(), 2.0D);
+             return pos.closerToCenterThan(entityliving1.position(), 2.0D);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/PrepareRamNearestTarget.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/PrepareRamNearestTarget.java.patch
new file mode 100644
index 0000000000..18aef70f25
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/PrepareRamNearestTarget.java.patch
@@ -0,0 +1,73 @@
+--- a/net/minecraft/world/entity/ai/behavior/PrepareRamNearestTarget.java
++++ b/net/minecraft/world/entity/ai/behavior/PrepareRamNearestTarget.java
+@@ -13,6 +13,7 @@
+ import net.minecraft.core.BlockPos;
+ import net.minecraft.core.Direction;
+ import net.minecraft.server.level.ServerLevel;
++import net.minecraft.server.level.ServerPlayer;
+ import net.minecraft.sounds.SoundEvent;
+ import net.minecraft.sounds.SoundSource;
+ import net.minecraft.util.Mth;
+@@ -30,6 +31,10 @@
+ import net.minecraft.world.level.pathfinder.Path;
+ import net.minecraft.world.level.pathfinder.WalkNodeEvaluator;
+ import net.minecraft.world.phys.Vec3;
++import org.bukkit.craftbukkit.entity.CraftLivingEntity;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.event.entity.EntityTargetEvent;
++// CraftBukkit end
+ 
+ public class PrepareRamNearestTarget<E extends PathfinderMob> extends Behavior<E> {
+ 
+@@ -63,6 +68,13 @@
+                 return this.ramTargeting.test(worldserver, entitycreature, entityliving);
+             });
+         }).ifPresent((entityliving) -> {
++            // CraftBukkit start
++            EntityTargetEvent event = CraftEventFactory.callEntityTargetLivingEvent(entitycreature, entityliving, (entityliving instanceof ServerPlayer) ? EntityTargetEvent.TargetReason.CLOSEST_PLAYER : EntityTargetEvent.TargetReason.CLOSEST_ENTITY);
++            if (event.isCancelled() || event.getTarget() == null) {
++                return;
++            }
++            entityliving = ((CraftLivingEntity) event.getTarget()).getHandle();
++            // CraftBukkit end
+             this.chooseRamPosition(entitycreature, entityliving);
+         });
+     }
+@@ -72,7 +84,7 @@
+ 
+         if (!behaviorcontroller.hasMemoryValue(MemoryModuleType.RAM_TARGET)) {
+             world.broadcastEntityEvent(entity, (byte) 59);
+-            behaviorcontroller.setMemory(MemoryModuleType.RAM_COOLDOWN_TICKS, (Object) this.getCooldownOnFail.applyAsInt(entity));
++            behaviorcontroller.setMemory(MemoryModuleType.RAM_COOLDOWN_TICKS, this.getCooldownOnFail.applyAsInt(entity)); // CraftBukkit - decompile error
+         }
+ 
+     }
+@@ -83,8 +95,8 @@
+ 
+     protected void tick(ServerLevel worldserver, E e0, long i) {
+         if (!this.ramCandidate.isEmpty()) {
+-            e0.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (Object) (new WalkTarget(((PrepareRamNearestTarget.RamCandidate) this.ramCandidate.get()).getStartPosition(), this.walkSpeed, 0)));
+-            e0.getBrain().setMemory(MemoryModuleType.LOOK_TARGET, (Object) (new EntityTracker(((PrepareRamNearestTarget.RamCandidate) this.ramCandidate.get()).getTarget(), true)));
++            e0.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (new WalkTarget(((PrepareRamNearestTarget.RamCandidate) this.ramCandidate.get()).getStartPosition(), this.walkSpeed, 0))); // CraftBukkit - decompile error
++            e0.getBrain().setMemory(MemoryModuleType.LOOK_TARGET, (new EntityTracker(((PrepareRamNearestTarget.RamCandidate) this.ramCandidate.get()).getTarget(), true))); // CraftBukkit - decompile error
+             boolean flag = !((PrepareRamNearestTarget.RamCandidate) this.ramCandidate.get()).getTarget().blockPosition().equals(((PrepareRamNearestTarget.RamCandidate) this.ramCandidate.get()).getTargetPosition());
+ 
+             if (flag) {
+@@ -101,7 +113,7 @@
+                     }
+ 
+                     if (i - (Long) this.reachedRamPositionTimestamp.get() >= (long) this.ramPrepareTime) {
+-                        e0.getBrain().setMemory(MemoryModuleType.RAM_TARGET, (Object) this.getEdgeOfBlock(blockposition, ((PrepareRamNearestTarget.RamCandidate) this.ramCandidate.get()).getTargetPosition()));
++                        e0.getBrain().setMemory(MemoryModuleType.RAM_TARGET, this.getEdgeOfBlock(blockposition, ((PrepareRamNearestTarget.RamCandidate) this.ramCandidate.get()).getTargetPosition())); // CraftBukkit - decompile error
+                         worldserver.playSound((Player) null, (Entity) e0, (SoundEvent) this.getPrepareRamSound.apply(e0), SoundSource.NEUTRAL, 1.0F, e0.getVoicePitch());
+                         this.ramCandidate = Optional.empty();
+                     }
+@@ -153,7 +165,7 @@
+             }
+ 
+             PathNavigation navigationabstract = entity.getNavigation();
+-            Stream stream = list.stream();
++            Stream<BlockPos> stream = list.stream(); // CraftBukkit - decompile error
+             BlockPos blockposition1 = entity.blockPosition();
+ 
+             Objects.requireNonNull(blockposition1);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/PrepareRamNearestTarget.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/PrepareRamNearestTarget.patch
deleted file mode 100644
index eed68fa491..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/PrepareRamNearestTarget.patch
+++ /dev/null
@@ -1,68 +0,0 @@
---- a/net/minecraft/world/entity/ai/behavior/PrepareRamNearestTarget.java
-+++ b/net/minecraft/world/entity/ai/behavior/PrepareRamNearestTarget.java
-@@ -31,6 +31,13 @@
- import net.minecraft.world.level.pathfinder.PathfinderNormal;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import net.minecraft.server.level.EntityPlayer;
-+import org.bukkit.craftbukkit.entity.CraftLivingEntity;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.event.entity.EntityTargetEvent;
-+// CraftBukkit end
-+
- public class PrepareRamNearestTarget<E extends EntityCreature> extends Behavior<E> {
- 
-     public static final int TIME_OUT_DURATION = 160;
-@@ -63,6 +70,13 @@
-                 return this.ramTargeting.test(worldserver, entitycreature, entityliving);
-             });
-         }).ifPresent((entityliving) -> {
-+            // CraftBukkit start
-+            EntityTargetEvent event = CraftEventFactory.callEntityTargetLivingEvent(entitycreature, entityliving, (entityliving instanceof EntityPlayer) ? EntityTargetEvent.TargetReason.CLOSEST_PLAYER : EntityTargetEvent.TargetReason.CLOSEST_ENTITY);
-+            if (event.isCancelled() || event.getTarget() == null) {
-+                return;
-+            }
-+            entityliving = ((CraftLivingEntity) event.getTarget()).getHandle();
-+            // CraftBukkit end
-             this.chooseRamPosition(entitycreature, entityliving);
-         });
-     }
-@@ -72,7 +86,7 @@
- 
-         if (!behaviorcontroller.hasMemoryValue(MemoryModuleType.RAM_TARGET)) {
-             worldserver.broadcastEntityEvent(e0, (byte) 59);
--            behaviorcontroller.setMemory(MemoryModuleType.RAM_COOLDOWN_TICKS, (Object) this.getCooldownOnFail.applyAsInt(e0));
-+            behaviorcontroller.setMemory(MemoryModuleType.RAM_COOLDOWN_TICKS, this.getCooldownOnFail.applyAsInt(e0)); // CraftBukkit - decompile error
-         }
- 
-     }
-@@ -83,8 +97,8 @@
- 
-     protected void tick(WorldServer worldserver, E e0, long i) {
-         if (!this.ramCandidate.isEmpty()) {
--            e0.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (Object) (new MemoryTarget(((PrepareRamNearestTarget.a) this.ramCandidate.get()).getStartPosition(), this.walkSpeed, 0)));
--            e0.getBrain().setMemory(MemoryModuleType.LOOK_TARGET, (Object) (new BehaviorPositionEntity(((PrepareRamNearestTarget.a) this.ramCandidate.get()).getTarget(), true)));
-+            e0.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (new MemoryTarget(((PrepareRamNearestTarget.a) this.ramCandidate.get()).getStartPosition(), this.walkSpeed, 0))); // CraftBukkit - decompile error
-+            e0.getBrain().setMemory(MemoryModuleType.LOOK_TARGET, (new BehaviorPositionEntity(((PrepareRamNearestTarget.a) this.ramCandidate.get()).getTarget(), true))); // CraftBukkit - decompile error
-             boolean flag = !((PrepareRamNearestTarget.a) this.ramCandidate.get()).getTarget().blockPosition().equals(((PrepareRamNearestTarget.a) this.ramCandidate.get()).getTargetPosition());
- 
-             if (flag) {
-@@ -101,7 +115,7 @@
-                     }
- 
-                     if (i - (Long) this.reachedRamPositionTimestamp.get() >= (long) this.ramPrepareTime) {
--                        e0.getBrain().setMemory(MemoryModuleType.RAM_TARGET, (Object) this.getEdgeOfBlock(blockposition, ((PrepareRamNearestTarget.a) this.ramCandidate.get()).getTargetPosition()));
-+                        e0.getBrain().setMemory(MemoryModuleType.RAM_TARGET, this.getEdgeOfBlock(blockposition, ((PrepareRamNearestTarget.a) this.ramCandidate.get()).getTargetPosition())); // CraftBukkit - decompile error
-                         worldserver.playSound((EntityHuman) null, (Entity) e0, (SoundEffect) this.getPrepareRamSound.apply(e0), SoundCategory.NEUTRAL, 1.0F, e0.getVoicePitch());
-                         this.ramCandidate = Optional.empty();
-                     }
-@@ -153,7 +167,7 @@
-             }
- 
-             NavigationAbstract navigationabstract = entitycreature.getNavigation();
--            Stream stream = list.stream();
-+            Stream<BlockPosition> stream = list.stream(); // CraftBukkit - decompile error
-             BlockPosition blockposition1 = entitycreature.blockPosition();
- 
-             Objects.requireNonNull(blockposition1);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorProfession.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/ResetProfession.java.patch
similarity index 88%
rename from paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorProfession.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/ResetProfession.java.patch
index 71a1571ee4..f5dc7ba366 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorProfession.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/ResetProfession.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/world/entity/ai/behavior/BehaviorProfession.java
-+++ b/net/minecraft/world/entity/ai/behavior/BehaviorProfession.java
+--- a/net/minecraft/world/entity/ai/behavior/ResetProfession.java
++++ b/net/minecraft/world/entity/ai/behavior/ResetProfession.java
 @@ -6,6 +6,12 @@
  import net.minecraft.world.entity.npc.VillagerData;
  import net.minecraft.world.entity.npc.VillagerProfession;
@@ -10,9 +10,9 @@
 +import org.bukkit.event.entity.VillagerCareerChangeEvent;
 +// CraftBukkit end
 +
- public class BehaviorProfession {
+ public class ResetProfession {
  
-     public BehaviorProfession() {}
+     public ResetProfession() {}
 @@ -17,7 +23,14 @@
                      VillagerData villagerdata = entityvillager.getVillagerData();
  
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorAttackTargetSet.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/StartAttacking.java.patch
similarity index 75%
rename from paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorAttackTargetSet.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/StartAttacking.java.patch
index 51929e4020..0a02e4eb2c 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorAttackTargetSet.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/StartAttacking.java.patch
@@ -1,25 +1,27 @@
---- a/net/minecraft/world/entity/ai/behavior/BehaviorAttackTargetSet.java
-+++ b/net/minecraft/world/entity/ai/behavior/BehaviorAttackTargetSet.java
-@@ -7,6 +7,13 @@
+--- a/net/minecraft/world/entity/ai/behavior/StartAttacking.java
++++ b/net/minecraft/world/entity/ai/behavior/StartAttacking.java
+@@ -2,10 +2,15 @@
+ 
+ import java.util.Optional;
+ import net.minecraft.server.level.ServerLevel;
++import net.minecraft.server.level.ServerPlayer;
+ import net.minecraft.world.entity.LivingEntity;
+ import net.minecraft.world.entity.Mob;
  import net.minecraft.world.entity.ai.behavior.declarative.BehaviorBuilder;
  import net.minecraft.world.entity.ai.memory.MemoryModuleType;
- 
-+// CraftBukkit start
-+import net.minecraft.server.level.EntityPlayer;
 +import org.bukkit.craftbukkit.entity.CraftLivingEntity;
 +import org.bukkit.craftbukkit.event.CraftEventFactory;
 +import org.bukkit.event.entity.EntityTargetEvent;
 +// CraftBukkit end
-+
- public class BehaviorAttackTargetSet {
  
-     public BehaviorAttackTargetSet() {}
-@@ -34,6 +41,17 @@
+ public class StartAttacking {
+ 
+@@ -34,6 +39,17 @@
                              if (!entityinsentient.canAttack(entityliving)) {
                                  return false;
                              } else {
 +                                // CraftBukkit start
-+                                EntityTargetEvent event = CraftEventFactory.callEntityTargetLivingEvent(entityinsentient, entityliving, (entityliving instanceof EntityPlayer) ? EntityTargetEvent.TargetReason.CLOSEST_PLAYER : EntityTargetEvent.TargetReason.CLOSEST_ENTITY);
++                                EntityTargetEvent event = CraftEventFactory.callEntityTargetLivingEvent(entityinsentient, entityliving, (entityliving instanceof ServerPlayer) ? EntityTargetEvent.TargetReason.CLOSEST_PLAYER : EntityTargetEvent.TargetReason.CLOSEST_ENTITY);
 +                                if (event.isCancelled()) {
 +                                    return false;
 +                                }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorAttackTargetForget.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/StopAttackingIfTargetInvalid.java.patch
similarity index 69%
rename from paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorAttackTargetForget.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/StopAttackingIfTargetInvalid.java.patch
index 7952cb5e14..4c35e9e97f 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/BehaviorAttackTargetForget.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/StopAttackingIfTargetInvalid.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/world/entity/ai/behavior/BehaviorAttackTargetForget.java
-+++ b/net/minecraft/world/entity/ai/behavior/BehaviorAttackTargetForget.java
+--- a/net/minecraft/world/entity/ai/behavior/StopAttackingIfTargetInvalid.java
++++ b/net/minecraft/world/entity/ai/behavior/StopAttackingIfTargetInvalid.java
 @@ -7,6 +7,12 @@
  import net.minecraft.world.entity.ai.behavior.declarative.BehaviorBuilder;
  import net.minecraft.world.entity.ai.memory.MemoryModuleType;
@@ -10,15 +10,15 @@
 +import org.bukkit.event.entity.EntityTargetEvent;
 +// CraftBukkit end
 +
- public class BehaviorAttackTargetForget {
+ public class StopAttackingIfTargetInvalid {
  
      private static final int TIMEOUT_TO_GET_WITHIN_ATTACK_RANGE = 200;
 @@ -40,6 +46,17 @@
-                     if (entityinsentient.canAttack(entityliving) && (!flag || !isTiredOfTryingToReachTarget(entityinsentient, behaviorbuilder_b.tryGet(memoryaccessor1))) && entityliving.isAlive() && entityliving.level() == entityinsentient.level() && !behaviorattacktargetforget_a.test(worldserver, entityliving)) {
+                     if (entityinsentient.canAttack(entityliving) && (!shouldForgetIfTargetUnreachable || !StopAttackingIfTargetInvalid.isTiredOfTryingToReachTarget(entityinsentient, behaviorbuilder_b.tryGet(memoryaccessor1))) && entityliving.isAlive() && entityliving.level() == entityinsentient.level() && !condition.test(worldserver, entityliving)) {
                          return true;
                      } else {
 +                        // CraftBukkit start
-+                        EntityLiving old = entityinsentient.getBrain().getMemory(MemoryModuleType.ATTACK_TARGET).orElse(null);
++                        LivingEntity old = entityinsentient.getBrain().getMemory(MemoryModuleType.ATTACK_TARGET).orElse(null);
 +                        EntityTargetEvent event = CraftEventFactory.callEntityTargetLivingEvent(entityinsentient, null, (old != null && !old.isAlive()) ? EntityTargetEvent.TargetReason.TARGET_DIED : EntityTargetEvent.TargetReason.FORGOT_TARGET);
 +                        if (event.isCancelled()) {
 +                            return false;
@@ -28,6 +28,6 @@
 +                            return true;
 +                        }
 +                        // CraftBukkit end
-                         behaviorattacktargetforget_b.accept(worldserver, entityinsentient, entityliving);
+                         callback.accept(worldserver, entityinsentient, entityliving);
                          memoryaccessor.erase();
                          return true;
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java.patch
similarity index 71%
rename from paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java.patch
index e8c12b0853..e0fa77caef 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java.patch
@@ -2,7 +2,7 @@
 +++ b/net/minecraft/world/entity/ai/behavior/TryLaySpawnOnWaterNearLand.java
 @@ -39,6 +39,12 @@
                                  if (worldserver.getBlockState(blockposition2).isAir()) {
-                                     IBlockData iblockdata = block.defaultBlockState();
+                                     BlockState iblockdata = frogSpawn.defaultBlockState();
  
 +                                    // CraftBukkit start
 +                                    if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entityliving, blockposition2, iblockdata)) {
@@ -11,5 +11,5 @@
 +                                    }
 +                                    // CraftBukkit end
                                      worldserver.setBlock(blockposition2, iblockdata, 3);
-                                     worldserver.gameEvent((Holder) GameEvent.BLOCK_PLACE, blockposition2, GameEvent.a.of(entityliving, iblockdata));
-                                     worldserver.playSound((EntityHuman) null, (Entity) entityliving, SoundEffects.FROG_LAY_SPAWN, SoundCategory.BLOCKS, 1.0F, 1.0F);
+                                     worldserver.gameEvent((Holder) GameEvent.BLOCK_PLACE, blockposition2, GameEvent.Context.of(entityliving, iblockdata));
+                                     worldserver.playSound((Player) null, (Entity) entityliving, SoundEvents.FROG_LAY_SPAWN, SoundSource.BLOCKS, 1.0F, 1.0F);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/VillagerMakeLove.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/VillagerMakeLove.java.patch
new file mode 100644
index 0000000000..9875c853b9
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/VillagerMakeLove.java.patch
@@ -0,0 +1,42 @@
+--- a/net/minecraft/world/entity/ai/behavior/VillagerMakeLove.java
++++ b/net/minecraft/world/entity/ai/behavior/VillagerMakeLove.java
+@@ -17,6 +17,10 @@
+ import net.minecraft.world.entity.ai.village.poi.PoiTypes;
+ import net.minecraft.world.entity.npc.Villager;
+ import net.minecraft.world.level.pathfinder.Path;
++// CraftBukkit start
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.event.entity.CreatureSpawnEvent;
++// CraftBukkit end
+ 
+ public class VillagerMakeLove extends Behavior<Villager> {
+ 
+@@ -114,11 +118,17 @@
+         if (entityvillager2 == null) {
+             return Optional.empty();
+         } else {
+-            parent.setAge(6000);
+-            partner.setAge(6000);
+             entityvillager2.setAge(-24000);
+             entityvillager2.moveTo(parent.getX(), parent.getY(), parent.getZ(), 0.0F, 0.0F);
+-            world.addFreshEntityWithPassengers(entityvillager2);
++            // CraftBukkit start - call EntityBreedEvent
++            if (CraftEventFactory.callEntityBreedEvent(entityvillager2, parent, partner, null, null, 0).isCancelled()) {
++                return Optional.empty();
++            }
++            // Move age setting down
++            parent.setAge(6000);
++            partner.setAge(6000);
++            world.addFreshEntityWithPassengers(entityvillager2, CreatureSpawnEvent.SpawnReason.BREEDING);
++            // CraftBukkit end
+             world.broadcastEntityEvent(entityvillager2, (byte) 12);
+             return Optional.of(entityvillager2);
+         }
+@@ -127,6 +137,6 @@
+     private void giveBedToChild(ServerLevel world, Villager child, BlockPos pos) {
+         GlobalPos globalpos = GlobalPos.of(world.dimension(), pos);
+ 
+-        child.getBrain().setMemory(MemoryModuleType.HOME, (Object) globalpos);
++        child.getBrain().setMemory(MemoryModuleType.HOME, globalpos); // CraftBukkit - decompile error
+     }
+ }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/warden/Digging.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/warden/Digging.java.patch
similarity index 87%
rename from paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/warden/Digging.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/warden/Digging.java.patch
index 24f78f89dc..6f3b4a357c 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/warden/Digging.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/behavior/warden/Digging.java.patch
@@ -10,10 +10,10 @@
 +
  public class Digging<E extends Warden> extends Behavior<E> {
  
-     public Digging(int i) {
+     public Digging(int duration) {
 @@ -37,7 +41,7 @@
  
-     protected void stop(WorldServer worldserver, E e0, long i) {
+     protected void stop(ServerLevel worldserver, E e0, long i) {
          if (e0.getRemovalReason() == null) {
 -            e0.remove(Entity.RemovalReason.DISCARDED);
 +            e0.remove(Entity.RemovalReason.DISCARDED, EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - Add bukkit remove cause
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/PathfinderGoalBreakDoor.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/BreakDoorGoal.java.patch
similarity index 82%
rename from paper-server/patches/sources/net/minecraft/world/entity/ai/goal/PathfinderGoalBreakDoor.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/ai/goal/BreakDoorGoal.java.patch
index c4a2f98fcd..fd9157bdd7 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/PathfinderGoalBreakDoor.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/BreakDoorGoal.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/world/entity/ai/goal/PathfinderGoalBreakDoor.java
-+++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalBreakDoor.java
+--- a/net/minecraft/world/entity/ai/goal/BreakDoorGoal.java
++++ b/net/minecraft/world/entity/ai/goal/BreakDoorGoal.java
 @@ -72,6 +72,12 @@
          }
  
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/PathfinderGoalEatTile.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/EatBlockGoal.java.patch
similarity index 73%
rename from paper-server/patches/sources/net/minecraft/world/entity/ai/goal/PathfinderGoalEatTile.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/ai/goal/EatBlockGoal.java.patch
index 34b12bbccc..9f774f6e06 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/PathfinderGoalEatTile.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/EatBlockGoal.java.patch
@@ -1,27 +1,27 @@
---- a/net/minecraft/world/entity/ai/goal/PathfinderGoalEatTile.java
-+++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalEatTile.java
+--- a/net/minecraft/world/entity/ai/goal/EatBlockGoal.java
++++ b/net/minecraft/world/entity/ai/goal/EatBlockGoal.java
 @@ -11,6 +11,10 @@
- import net.minecraft.world.level.block.state.IBlockData;
+ import net.minecraft.world.level.block.state.BlockState;
  import net.minecraft.world.level.block.state.predicate.BlockStatePredicate;
  
 +// CraftBukkit start
 +import org.bukkit.craftbukkit.event.CraftEventFactory;
 +// CraftBukkit end
 +
- public class PathfinderGoalEatTile extends PathfinderGoal {
+ public class EatBlockGoal extends Goal {
  
      private static final int EAT_ANIMATION_TICKS = 40;
 @@ -64,7 +68,7 @@
-             BlockPosition blockposition = this.mob.blockPosition();
+             BlockPos blockposition = this.mob.blockPosition();
  
-             if (PathfinderGoalEatTile.IS_TALL_GRASS.test(this.level.getBlockState(blockposition))) {
+             if (EatBlockGoal.IS_TALL_GRASS.test(this.level.getBlockState(blockposition))) {
 -                if (getServerLevel(this.level).getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
 +                if (CraftEventFactory.callEntityChangeBlockEvent(this.mob, blockposition, Blocks.AIR.defaultBlockState(), !getServerLevel(this.level).getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING))) { // CraftBukkit
                      this.level.destroyBlock(blockposition, false);
                  }
  
 @@ -73,7 +77,7 @@
-                 BlockPosition blockposition1 = blockposition.below();
+                 BlockPos blockposition1 = blockposition.below();
  
                  if (this.level.getBlockState(blockposition1).is(Blocks.GRASS_BLOCK)) {
 -                    if (getServerLevel(this.level).getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/PathfinderGoalRemoveBlock.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java.patch
similarity index 67%
rename from paper-server/patches/sources/net/minecraft/world/entity/ai/goal/PathfinderGoalRemoveBlock.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java.patch
index b0ee5531f7..add15d695b 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/PathfinderGoalRemoveBlock.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java.patch
@@ -1,18 +1,17 @@
---- a/net/minecraft/world/entity/ai/goal/PathfinderGoalRemoveBlock.java
-+++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalRemoveBlock.java
-@@ -22,6 +22,11 @@
+--- a/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java
++++ b/net/minecraft/world/entity/ai/goal/RemoveBlockGoal.java
+@@ -21,6 +21,10 @@
+ import net.minecraft.world.level.chunk.ChunkAccess;
  import net.minecraft.world.level.chunk.status.ChunkStatus;
- import net.minecraft.world.phys.Vec3D;
- 
+ import net.minecraft.world.phys.Vec3;
 +// CraftBukkit start
 +import org.bukkit.craftbukkit.block.CraftBlock;
 +import org.bukkit.craftbukkit.event.CraftEventFactory;
 +// CraftBukkit end
-+
- public class PathfinderGoalRemoveBlock extends PathfinderGoalGotoTarget {
  
-     private final Block blockToRemove;
-@@ -97,6 +102,11 @@
+ public class RemoveBlockGoal extends MoveToBlockGoal {
+ 
+@@ -97,6 +101,11 @@
              }
  
              if (this.ticksSinceReachedGoal > 60) {
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/PathfinderGoalTame.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java.patch
similarity index 64%
rename from paper-server/patches/sources/net/minecraft/world/entity/ai/goal/PathfinderGoalTame.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java.patch
index a7469ed6d1..4f41b508ea 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/PathfinderGoalTame.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java.patch
@@ -1,18 +1,17 @@
---- a/net/minecraft/world/entity/ai/goal/PathfinderGoalTame.java
-+++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalTame.java
-@@ -7,6 +7,11 @@
- import net.minecraft.world.entity.player.EntityHuman;
- import net.minecraft.world.phys.Vec3D;
- 
+--- a/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java
++++ b/net/minecraft/world/entity/ai/goal/RunAroundLikeCrazyGoal.java
+@@ -6,6 +6,10 @@
+ import net.minecraft.world.entity.animal.horse.AbstractHorse;
+ import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.phys.Vec3;
 +// CraftBukkit start
 +import org.bukkit.craftbukkit.entity.CraftHumanEntity;
 +import org.bukkit.craftbukkit.event.CraftEventFactory;
 +// CraftBukkit end
-+
- public class PathfinderGoalTame extends PathfinderGoal {
  
-     private final EntityHorseAbstract horse;
-@@ -63,7 +68,7 @@
+ public class RunAroundLikeCrazyGoal extends Goal {
+ 
+@@ -63,7 +67,7 @@
                  int i = this.horse.getTemper();
                  int j = this.horse.getMaxTemper();
  
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/PathfinderGoalSit.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/SitWhenOrderedToGoal.java.patch
similarity index 73%
rename from paper-server/patches/sources/net/minecraft/world/entity/ai/goal/PathfinderGoalSit.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/ai/goal/SitWhenOrderedToGoal.java.patch
index 10fef72e32..64830b4a5b 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/PathfinderGoalSit.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/SitWhenOrderedToGoal.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/world/entity/ai/goal/PathfinderGoalSit.java
-+++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalSit.java
+--- a/net/minecraft/world/entity/ai/goal/SitWhenOrderedToGoal.java
++++ b/net/minecraft/world/entity/ai/goal/SitWhenOrderedToGoal.java
 @@ -22,7 +22,7 @@
      @Override
      public boolean canUse() {
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/PathfinderGoalTempt.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/TemptGoal.java.patch
similarity index 64%
rename from paper-server/patches/sources/net/minecraft/world/entity/ai/goal/PathfinderGoalTempt.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/ai/goal/TemptGoal.java.patch
index bff667efef..8d33e61ef6 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/PathfinderGoalTempt.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/TemptGoal.java.patch
@@ -1,7 +1,10 @@
---- a/net/minecraft/world/entity/ai/goal/PathfinderGoalTempt.java
-+++ b/net/minecraft/world/entity/ai/goal/PathfinderGoalTempt.java
-@@ -11,6 +11,13 @@
- import net.minecraft.world.entity.player.EntityHuman;
+--- a/net/minecraft/world/entity/ai/goal/TemptGoal.java
++++ b/net/minecraft/world/entity/ai/goal/TemptGoal.java
+@@ -8,9 +8,15 @@
+ import net.minecraft.world.entity.PathfinderMob;
+ import net.minecraft.world.entity.ai.attributes.Attributes;
+ import net.minecraft.world.entity.ai.targeting.TargetingConditions;
+-import net.minecraft.world.entity.player.Player;
  import net.minecraft.world.item.ItemStack;
  
 +// CraftBukkit start
@@ -11,22 +14,22 @@
 +import org.bukkit.event.entity.EntityTargetLivingEntityEvent;
 +// CraftBukkit end
 +
- public class PathfinderGoalTempt extends PathfinderGoal {
+ public class TemptGoal extends Goal {
  
-     private static final PathfinderTargetCondition TEMPT_TARGETING = PathfinderTargetCondition.forNonCombat().ignoreLineOfSight();
-@@ -23,7 +30,7 @@
+     private static final TargetingConditions TEMPT_TARGETING = TargetingConditions.forNonCombat().ignoreLineOfSight();
+@@ -23,7 +29,7 @@
      private double pRotX;
      private double pRotY;
      @Nullable
--    protected EntityHuman player;
-+    protected EntityLiving player; // CraftBukkit
+-    protected Player player;
++    protected LivingEntity player; // CraftBukkit
      private int calmDown;
      private boolean isRunning;
      private final Predicate<ItemStack> items;
-@@ -47,6 +54,15 @@
+@@ -47,6 +53,15 @@
              return false;
          } else {
-             this.player = getServerLevel((Entity) this.mob).getNearestPlayer(this.targetingConditions.range(this.mob.getAttributeValue(GenericAttributes.TEMPT_RANGE)), this.mob);
+             this.player = getServerLevel((Entity) this.mob).getNearestPlayer(this.targetingConditions.range(this.mob.getAttributeValue(Attributes.TEMPT_RANGE)), this.mob);
 +            // CraftBukkit start
 +            if (this.player != null) {
 +                EntityTargetLivingEntityEvent event = CraftEventFactory.callEntityTargetLivingEvent(this.mob, this.player, EntityTargetEvent.TargetReason.TEMPT);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/PathfinderGoalDefendVillage.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/DefendVillageTargetGoal.java.patch
similarity index 65%
rename from paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/PathfinderGoalDefendVillage.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/DefendVillageTargetGoal.java.patch
index e5894e995f..3a2b688e7b 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/PathfinderGoalDefendVillage.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/DefendVillageTargetGoal.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/world/entity/ai/goal/target/PathfinderGoalDefendVillage.java
-+++ b/net/minecraft/world/entity/ai/goal/target/PathfinderGoalDefendVillage.java
+--- a/net/minecraft/world/entity/ai/goal/target/DefendVillageTargetGoal.java
++++ b/net/minecraft/world/entity/ai/goal/target/DefendVillageTargetGoal.java
 @@ -61,7 +61,7 @@
  
      @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/PathfinderGoalHurtByTarget.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/HurtByTargetGoal.java.patch
similarity index 50%
rename from paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/PathfinderGoalHurtByTarget.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/HurtByTargetGoal.java.patch
index 713349a4d2..3b4092a6f3 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/PathfinderGoalHurtByTarget.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/HurtByTargetGoal.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/world/entity/ai/goal/target/PathfinderGoalHurtByTarget.java
-+++ b/net/minecraft/world/entity/ai/goal/target/PathfinderGoalHurtByTarget.java
+--- a/net/minecraft/world/entity/ai/goal/target/HurtByTargetGoal.java
++++ b/net/minecraft/world/entity/ai/goal/target/HurtByTargetGoal.java
 @@ -67,7 +67,7 @@
  
      @Override
@@ -12,8 +12,8 @@
 @@ -114,6 +114,6 @@
      }
  
-     protected void alertOther(EntityInsentient entityinsentient, EntityLiving entityliving) {
--        entityinsentient.setTarget(entityliving);
-+        entityinsentient.setTarget(entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason.TARGET_ATTACKED_NEARBY_ENTITY, true); // CraftBukkit - reason
+     protected void alertOther(Mob mob, LivingEntity target) {
+-        mob.setTarget(target);
++        mob.setTarget(target, org.bukkit.event.entity.EntityTargetEvent.TargetReason.TARGET_ATTACKED_NEARBY_ENTITY, true); // CraftBukkit - reason
      }
  }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.java.patch
new file mode 100644
index 0000000000..5d304f4ac8
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.java
++++ b/net/minecraft/world/entity/ai/goal/target/NearestAttackableTargetGoal.java
+@@ -70,7 +70,7 @@
+ 
+     @Override
+     public void start() {
+-        this.mob.setTarget(this.target);
++        this.mob.setTarget(this.target, this.target instanceof ServerPlayer ? org.bukkit.event.entity.EntityTargetEvent.TargetReason.CLOSEST_PLAYER : org.bukkit.event.entity.EntityTargetEvent.TargetReason.CLOSEST_ENTITY, true); // CraftBukkit - reason
+         super.start();
+     }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtByTarget.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/OwnerHurtByTargetGoal.java.patch
similarity index 57%
rename from paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtByTarget.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/OwnerHurtByTargetGoal.java.patch
index 4d1c071dfc..edaee8e182 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtByTarget.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/OwnerHurtByTargetGoal.java.patch
@@ -1,11 +1,11 @@
---- a/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtByTarget.java
-+++ b/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtByTarget.java
+--- a/net/minecraft/world/entity/ai/goal/target/OwnerHurtByTargetGoal.java
++++ b/net/minecraft/world/entity/ai/goal/target/OwnerHurtByTargetGoal.java
 @@ -38,7 +38,7 @@
  
      @Override
      public void start() {
 -        this.mob.setTarget(this.ownerLastHurtBy);
 +        this.mob.setTarget(this.ownerLastHurtBy, org.bukkit.event.entity.EntityTargetEvent.TargetReason.TARGET_ATTACKED_OWNER, true); // CraftBukkit - reason
-         EntityLiving entityliving = this.tameAnimal.getOwner();
+         LivingEntity entityliving = this.tameAnimal.getOwner();
  
          if (entityliving != null) {
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtTarget.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/OwnerHurtTargetGoal.java.patch
similarity index 57%
rename from paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtTarget.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/OwnerHurtTargetGoal.java.patch
index db655681e5..696e8ea9fa 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtTarget.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/OwnerHurtTargetGoal.java.patch
@@ -1,11 +1,11 @@
---- a/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtTarget.java
-+++ b/net/minecraft/world/entity/ai/goal/target/PathfinderGoalOwnerHurtTarget.java
+--- a/net/minecraft/world/entity/ai/goal/target/OwnerHurtTargetGoal.java
++++ b/net/minecraft/world/entity/ai/goal/target/OwnerHurtTargetGoal.java
 @@ -38,7 +38,7 @@
  
      @Override
      public void start() {
 -        this.mob.setTarget(this.ownerLastHurt);
 +        this.mob.setTarget(this.ownerLastHurt, org.bukkit.event.entity.EntityTargetEvent.TargetReason.OWNER_ATTACKED_TARGET, true); // CraftBukkit - reason
-         EntityLiving entityliving = this.tameAnimal.getOwner();
+         LivingEntity entityliving = this.tameAnimal.getOwner();
  
          if (entityliving != null) {
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/PathfinderGoalNearestAttackableTarget.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/PathfinderGoalNearestAttackableTarget.patch
deleted file mode 100644
index 61d5a08fda..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/PathfinderGoalNearestAttackableTarget.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/entity/ai/goal/target/PathfinderGoalNearestAttackableTarget.java
-+++ b/net/minecraft/world/entity/ai/goal/target/PathfinderGoalNearestAttackableTarget.java
-@@ -70,7 +70,7 @@
- 
-     @Override
-     public void start() {
--        this.mob.setTarget(this.target);
-+        this.mob.setTarget(this.target, target instanceof EntityPlayer ? org.bukkit.event.entity.EntityTargetEvent.TargetReason.CLOSEST_PLAYER : org.bukkit.event.entity.EntityTargetEvent.TargetReason.CLOSEST_ENTITY, true); // CraftBukkit - reason
-         super.start();
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/PathfinderGoalTarget.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/PathfinderGoalTarget.patch
deleted file mode 100644
index fa68981dc0..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/PathfinderGoalTarget.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- a/net/minecraft/world/entity/ai/goal/target/PathfinderGoalTarget.java
-+++ b/net/minecraft/world/entity/ai/goal/target/PathfinderGoalTarget.java
-@@ -11,6 +11,10 @@
- import net.minecraft.world.level.pathfinder.PathPoint;
- import net.minecraft.world.scores.ScoreboardTeam;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.EntityTargetEvent;
-+// CraftBukkit end
-+
- public abstract class PathfinderGoalTarget extends PathfinderGoal {
- 
-     private static final int EMPTY_REACH_CACHE = 0;
-@@ -69,7 +73,7 @@
-                         }
-                     }
- 
--                    this.mob.setTarget(entityliving);
-+                    this.mob.setTarget(entityliving, EntityTargetEvent.TargetReason.CLOSEST_ENTITY, true); // CraftBukkit
-                     return true;
-                 }
-             }
-@@ -89,7 +93,7 @@
- 
-     @Override
-     public void stop() {
--        this.mob.setTarget((EntityLiving) null);
-+        this.mob.setTarget((EntityLiving) null, EntityTargetEvent.TargetReason.FORGOT_TARGET, true); // CraftBukkit
-         this.targetMob = null;
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/TargetGoal.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/TargetGoal.java.patch
new file mode 100644
index 0000000000..ab51c6b369
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/goal/target/TargetGoal.java.patch
@@ -0,0 +1,30 @@
+--- a/net/minecraft/world/entity/ai/goal/target/TargetGoal.java
++++ b/net/minecraft/world/entity/ai/goal/target/TargetGoal.java
+@@ -10,6 +10,9 @@
+ import net.minecraft.world.level.pathfinder.Node;
+ import net.minecraft.world.level.pathfinder.Path;
+ import net.minecraft.world.scores.PlayerTeam;
++// CraftBukkit start
++import org.bukkit.event.entity.EntityTargetEvent;
++// CraftBukkit end
+ 
+ public abstract class TargetGoal extends Goal {
+ 
+@@ -69,7 +72,7 @@
+                         }
+                     }
+ 
+-                    this.mob.setTarget(entityliving);
++                    this.mob.setTarget(entityliving, EntityTargetEvent.TargetReason.CLOSEST_ENTITY, true); // CraftBukkit
+                     return true;
+                 }
+             }
+@@ -89,7 +92,7 @@
+ 
+     @Override
+     public void stop() {
+-        this.mob.setTarget((LivingEntity) null);
++        this.mob.setTarget((LivingEntity) null, EntityTargetEvent.TargetReason.FORGOT_TARGET, true); // CraftBukkit
+         this.targetMob = null;
+     }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/sensing/TemptingSensor.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/sensing/TemptingSensor.java.patch
similarity index 52%
rename from paper-server/patches/sources/net/minecraft/world/entity/ai/sensing/TemptingSensor.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/ai/sensing/TemptingSensor.java.patch
index 0781087ad9..2bd53d40cd 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/sensing/TemptingSensor.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/sensing/TemptingSensor.java.patch
@@ -1,7 +1,7 @@
 --- a/net/minecraft/world/entity/ai/sensing/TemptingSensor.java
 +++ b/net/minecraft/world/entity/ai/sensing/TemptingSensor.java
 @@ -19,6 +19,14 @@
- import net.minecraft.world.entity.player.EntityHuman;
+ import net.minecraft.world.entity.player.Player;
  import net.minecraft.world.item.ItemStack;
  
 +// CraftBukkit start
@@ -12,25 +12,25 @@
 +import org.bukkit.event.entity.EntityTargetLivingEntityEvent;
 +// CraftBukkit end
 +
- public class TemptingSensor extends Sensor<EntityCreature> {
+ public class TemptingSensor extends Sensor<PathfinderMob> {
  
-     private static final PathfinderTargetCondition TEMPT_TARGETING = PathfinderTargetCondition.forNonCombat().ignoreLineOfSight();
+     private static final TargetingConditions TEMPT_TARGETING = TargetingConditions.forNonCombat().ignoreLineOfSight();
 @@ -31,7 +39,7 @@
-     protected void doTick(WorldServer worldserver, EntityCreature entitycreature) {
-         BehaviorController<?> behaviorcontroller = entitycreature.getBrain();
-         PathfinderTargetCondition pathfindertargetcondition = TemptingSensor.TEMPT_TARGETING.copy().range((double) ((float) entitycreature.getAttributeValue(GenericAttributes.TEMPT_RANGE)));
--        Stream stream = worldserver.players().stream().filter(IEntitySelector.NO_SPECTATORS).filter((entityplayer) -> {
-+        Stream<net.minecraft.server.level.EntityPlayer> stream = worldserver.players().stream().filter(IEntitySelector.NO_SPECTATORS).filter((entityplayer) -> { // CraftBukkit - decompile error
-             return pathfindertargetcondition.test(worldserver, entitycreature, entityplayer);
+     protected void doTick(ServerLevel world, PathfinderMob entity) {
+         Brain<?> behaviorcontroller = entity.getBrain();
+         TargetingConditions pathfindertargetcondition = TemptingSensor.TEMPT_TARGETING.copy().range((double) ((float) entity.getAttributeValue(Attributes.TEMPT_RANGE)));
+-        Stream stream = world.players().stream().filter(EntitySelector.NO_SPECTATORS).filter((entityplayer) -> {
++        Stream<net.minecraft.server.level.ServerPlayer> stream = world.players().stream().filter(EntitySelector.NO_SPECTATORS).filter((entityplayer) -> { // CraftBukkit - decompile error
+             return pathfindertargetcondition.test(world, entity, entityplayer);
          }).filter(this::playerHoldingTemptation).filter((entityplayer) -> {
-             return !entitycreature.hasPassenger((Entity) entityplayer);
+             return !entity.hasPassenger((Entity) entityplayer);
 @@ -43,7 +51,17 @@
          if (!list.isEmpty()) {
-             EntityHuman entityhuman = (EntityHuman) list.get(0);
+             Player entityhuman = (Player) list.get(0);
  
 -            behaviorcontroller.setMemory(MemoryModuleType.TEMPTING_PLAYER, (Object) entityhuman);
 +            // CraftBukkit start
-+            EntityTargetLivingEntityEvent event = CraftEventFactory.callEntityTargetLivingEvent(entitycreature, entityhuman, EntityTargetEvent.TargetReason.TEMPT);
++            EntityTargetLivingEntityEvent event = CraftEventFactory.callEntityTargetLivingEvent(entity, entityhuman, EntityTargetEvent.TargetReason.TEMPT);
 +            if (event.isCancelled()) {
 +                return;
 +            }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/village/VillageSiege.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/village/VillageSiege.java.patch
new file mode 100644
index 0000000000..87c2f6b5e5
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ai/village/VillageSiege.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/entity/ai/village/VillageSiege.java
++++ b/net/minecraft/world/entity/ai/village/VillageSiege.java
+@@ -121,7 +121,7 @@
+             }
+ 
+             entityzombie.moveTo(vec3d.x, vec3d.y, vec3d.z, world.random.nextFloat() * 360.0F, 0.0F);
+-            world.addFreshEntityWithPassengers(entityzombie);
++            world.addFreshEntityWithPassengers(entityzombie, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.VILLAGE_INVASION); // CraftBukkit
+         }
+     }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ai/village/VillageSiege.patch b/paper-server/patches/sources/net/minecraft/world/entity/ai/village/VillageSiege.patch
deleted file mode 100644
index e048e9d58c..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/ai/village/VillageSiege.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/entity/ai/village/VillageSiege.java
-+++ b/net/minecraft/world/entity/ai/village/VillageSiege.java
-@@ -121,7 +121,7 @@
-             }
- 
-             entityzombie.moveTo(vec3d.x, vec3d.y, vec3d.z, worldserver.random.nextFloat() * 360.0F, 0.0F);
--            worldserver.addFreshEntityWithPassengers(entityzombie);
-+            worldserver.addFreshEntityWithPassengers(entityzombie, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.VILLAGE_INVASION); // CraftBukkit
-         }
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ambient/Bat.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/ambient/Bat.java.patch
new file mode 100644
index 0000000000..0299fa2395
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/ambient/Bat.java.patch
@@ -0,0 +1,46 @@
+--- a/net/minecraft/world/entity/ambient/Bat.java
++++ b/net/minecraft/world/entity/ambient/Bat.java
+@@ -29,6 +29,9 @@
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.level.levelgen.Heightmap;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++// CraftBukkit end
+ 
+ public class Bat extends AmbientCreature {
+ 
+@@ -144,13 +147,13 @@
+                     this.yHeadRot = (float) this.random.nextInt(360);
+                 }
+ 
+-                if (world.getNearestPlayer(Bat.BAT_RESTING_TARGETING, this) != null) {
++                if (world.getNearestPlayer(Bat.BAT_RESTING_TARGETING, this) != null && CraftEventFactory.handleBatToggleSleepEvent(this, true)) { // CraftBukkit - Call BatToggleSleepEvent
+                     this.setResting(false);
+                     if (!flag) {
+                         world.levelEvent((Player) null, 1025, blockposition, 0);
+                     }
+                 }
+-            } else {
++            } else if (CraftEventFactory.handleBatToggleSleepEvent(this, true)) { // CraftBukkit - Call BatToggleSleepEvent
+                 this.setResting(false);
+                 if (!flag) {
+                     world.levelEvent((Player) null, 1025, blockposition, 0);
+@@ -177,7 +180,7 @@
+ 
+             this.zza = 0.5F;
+             this.setYRot(this.getYRot() + f1);
+-            if (this.random.nextInt(100) == 0 && world.getBlockState(blockposition1).isRedstoneConductor(world, blockposition1)) {
++            if (this.random.nextInt(100) == 0 && world.getBlockState(blockposition1).isRedstoneConductor(world, blockposition1) && CraftEventFactory.handleBatToggleSleepEvent(this, false)) { // CraftBukkit - Call BatToggleSleepEvent
+                 this.setResting(true);
+             }
+         }
+@@ -202,7 +205,7 @@
+         if (this.isInvulnerableTo(world, source)) {
+             return false;
+         } else {
+-            if (this.isResting()) {
++            if (this.isResting() && CraftEventFactory.handleBatToggleSleepEvent(this, true)) { // CraftBukkit - Call BatToggleSleepEvent
+                 this.setResting(false);
+             }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/ambient/EntityBat.patch b/paper-server/patches/sources/net/minecraft/world/entity/ambient/EntityBat.patch
deleted file mode 100644
index fbac4f6090..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/ambient/EntityBat.patch
+++ /dev/null
@@ -1,47 +0,0 @@
---- a/net/minecraft/world/entity/ambient/EntityBat.java
-+++ b/net/minecraft/world/entity/ambient/EntityBat.java
-@@ -30,6 +30,10 @@
- import net.minecraft.world.level.levelgen.HeightMap;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+// CraftBukkit end
-+
- public class EntityBat extends EntityAmbient {
- 
-     public static final float FLAP_LENGTH_SECONDS = 0.5F;
-@@ -144,13 +148,13 @@
-                     this.yHeadRot = (float) this.random.nextInt(360);
-                 }
- 
--                if (worldserver.getNearestPlayer(EntityBat.BAT_RESTING_TARGETING, this) != null) {
-+                if (worldserver.getNearestPlayer(EntityBat.BAT_RESTING_TARGETING, this) != null && CraftEventFactory.handleBatToggleSleepEvent(this, true)) { // CraftBukkit - Call BatToggleSleepEvent
-                     this.setResting(false);
-                     if (!flag) {
-                         worldserver.levelEvent((EntityHuman) null, 1025, blockposition, 0);
-                     }
-                 }
--            } else {
-+            } else if (CraftEventFactory.handleBatToggleSleepEvent(this, true)) { // CraftBukkit - Call BatToggleSleepEvent
-                 this.setResting(false);
-                 if (!flag) {
-                     worldserver.levelEvent((EntityHuman) null, 1025, blockposition, 0);
-@@ -177,7 +181,7 @@
- 
-             this.zza = 0.5F;
-             this.setYRot(this.getYRot() + f1);
--            if (this.random.nextInt(100) == 0 && worldserver.getBlockState(blockposition1).isRedstoneConductor(worldserver, blockposition1)) {
-+            if (this.random.nextInt(100) == 0 && worldserver.getBlockState(blockposition1).isRedstoneConductor(worldserver, blockposition1) && CraftEventFactory.handleBatToggleSleepEvent(this, false)) { // CraftBukkit - Call BatToggleSleepEvent
-                 this.setResting(true);
-             }
-         }
-@@ -202,7 +206,7 @@
-         if (this.isInvulnerableTo(worldserver, damagesource)) {
-             return false;
-         } else {
--            if (this.isResting()) {
-+            if (this.isResting() && CraftEventFactory.handleBatToggleSleepEvent(this, true)) { // CraftBukkit - Call BatToggleSleepEvent
-                 this.setResting(false);
-             }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/Animal.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/Animal.java.patch
new file mode 100644
index 0000000000..9fcf8b12c3
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/Animal.java.patch
@@ -0,0 +1,116 @@
+--- a/net/minecraft/world/entity/animal/Animal.java
++++ b/net/minecraft/world/entity/animal/Animal.java
+@@ -35,12 +35,20 @@
+ import net.minecraft.world.level.block.Blocks;
+ import net.minecraft.world.level.pathfinder.PathType;
+ 
++// CraftBukkit start
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.event.entity.EntityBreedEvent;
++import org.bukkit.event.entity.EntityDamageEvent;
++import org.bukkit.event.entity.EntityEnterLoveModeEvent;
++// CraftBukkit end
++
+ public abstract class Animal extends AgeableMob {
+ 
+     protected static final int PARENT_AGE_AFTER_BREEDING = 6000;
+     public int inLove;
+     @Nullable
+     public UUID loveCause;
++    public ItemStack breedItem; // CraftBukkit - Add breedItem variable
+ 
+     protected Animal(EntityType<? extends Animal> type, Level world) {
+         super(type, world);
+@@ -82,9 +90,15 @@
+     }
+ 
+     @Override
+-    protected void actuallyHurt(ServerLevel world, DamageSource source, float amount) {
++    // CraftBukkit start - void -> boolean
++    public boolean actuallyHurt(ServerLevel worldserver, DamageSource damagesource, float f, EntityDamageEvent event) {
++        boolean damageResult = super.actuallyHurt(worldserver, damagesource, f, event);
++        if (!damageResult) {
++            return false;
++        }
+         this.resetLove();
+-        super.actuallyHurt(world, source, amount);
++        return true;
++        // CraftBukkit end
+     }
+ 
+     @Override
+@@ -188,10 +202,17 @@
+     }
+ 
+     public void setInLove(@Nullable Player player) {
+-        this.inLove = 600;
++        // CraftBukkit start
++        EntityEnterLoveModeEvent entityEnterLoveModeEvent = CraftEventFactory.callEntityEnterLoveModeEvent(player, this, 600);
++        if (entityEnterLoveModeEvent.isCancelled()) {
++            return;
++        }
++        this.inLove = entityEnterLoveModeEvent.getTicksInLove();
++        // CraftBukkit end
+         if (player != null) {
+             this.loveCause = player.getUUID();
+         }
++        this.breedItem = player.getInventory().getSelected(); // CraftBukkit
+ 
+         this.level().broadcastEntityEvent(this, (byte) 18);
+     }
+@@ -233,25 +254,46 @@
+         if (entityageable != null) {
+             entityageable.setBaby(true);
+             entityageable.moveTo(this.getX(), this.getY(), this.getZ(), 0.0F, 0.0F);
+-            this.finalizeSpawnChildFromBreeding(world, other, entityageable);
+-            world.addFreshEntityWithPassengers(entityageable);
++            // CraftBukkit start - call EntityBreedEvent
++            ServerPlayer breeder = Optional.ofNullable(this.getLoveCause()).or(() -> {
++                return Optional.ofNullable(other.getLoveCause());
++            }).orElse(null);
++            int experience = this.getRandom().nextInt(7) + 1;
++            EntityBreedEvent entityBreedEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityBreedEvent(entityageable, this, other, breeder, this.breedItem, experience);
++            if (entityBreedEvent.isCancelled()) {
++                return;
++            }
++            experience = entityBreedEvent.getExperience();
++            this.finalizeSpawnChildFromBreeding(world, other, entityageable, experience);
++            world.addFreshEntityWithPassengers(entityageable, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING);
++            // CraftBukkit end
+         }
+     }
+ 
+     public void finalizeSpawnChildFromBreeding(ServerLevel world, Animal other, @Nullable AgeableMob baby) {
++        // CraftBukkit start
++        this.finalizeSpawnChildFromBreeding(world, other, baby, this.getRandom().nextInt(7) + 1);
++    }
++
++    public void finalizeSpawnChildFromBreeding(ServerLevel worldserver, Animal entityanimal, @Nullable AgeableMob entityageable, int experience) {
++        // CraftBukkit end
+         Optional.ofNullable(this.getLoveCause()).or(() -> {
+-            return Optional.ofNullable(other.getLoveCause());
++            return Optional.ofNullable(entityanimal.getLoveCause());
+         }).ifPresent((entityplayer) -> {
+             entityplayer.awardStat(Stats.ANIMALS_BRED);
+-            CriteriaTriggers.BRED_ANIMALS.trigger(entityplayer, this, other, baby);
++            CriteriaTriggers.BRED_ANIMALS.trigger(entityplayer, this, entityanimal, entityageable);
+         });
+         this.setAge(6000);
+-        other.setAge(6000);
++        entityanimal.setAge(6000);
+         this.resetLove();
+-        other.resetLove();
+-        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));
++        entityanimal.resetLove();
++        worldserver.broadcastEntityEvent(this, (byte) 18);
++        if (worldserver.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
++            // CraftBukkit start - use event experience
++            if (experience > 0) {
++                worldserver.addFreshEntity(new ExperienceOrb(worldserver, this.getX(), this.getY(), this.getZ(), experience));
++            }
++            // CraftBukkit end
+         }
+ 
+     }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/Bee.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/Bee.java.patch
new file mode 100644
index 0000000000..b6e49ca27a
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/Bee.java.patch
@@ -0,0 +1,144 @@
+--- a/net/minecraft/world/entity/animal/Bee.java
++++ b/net/minecraft/world/entity/animal/Bee.java
+@@ -92,6 +92,11 @@
+ import net.minecraft.world.level.pathfinder.Path;
+ import net.minecraft.world.level.pathfinder.PathType;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.event.entity.EntityPotionEffectEvent;
++import org.bukkit.event.entity.EntityTargetEvent;
++// CraftBukkit end
+ 
+ public class Bee extends Animal implements NeutralMob, FlyingAnimal {
+ 
+@@ -198,21 +203,28 @@
+ 
+     @Override
+     public void addAdditionalSaveData(CompoundTag nbt) {
+-        super.addAdditionalSaveData(nbt);
+-        if (this.hasHive()) {
+-            nbt.put("hive_pos", NbtUtils.writeBlockPos(this.getHivePos()));
++        // CraftBukkit start - selectively save data
++        this.addAdditionalSaveData(nbt, true);
++    }
++
++    @Override
++    public void addAdditionalSaveData(CompoundTag nbttagcompound, boolean includeAll) {
++        // CraftBukkit end
++        super.addAdditionalSaveData(nbttagcompound);
++        if (includeAll && this.hasHive()) { // CraftBukkit - selectively save hive
++            nbttagcompound.put("hive_pos", NbtUtils.writeBlockPos(this.getHivePos()));
+         }
+ 
+-        if (this.hasSavedFlowerPos()) {
+-            nbt.put("flower_pos", NbtUtils.writeBlockPos(this.getSavedFlowerPos()));
++        if (includeAll && this.hasSavedFlowerPos()) { // CraftBukkit - selectively save flower
++            nbttagcompound.put("flower_pos", NbtUtils.writeBlockPos(this.getSavedFlowerPos()));
+         }
+ 
+-        nbt.putBoolean("HasNectar", this.hasNectar());
+-        nbt.putBoolean("HasStung", this.hasStung());
+-        nbt.putInt("TicksSincePollination", this.ticksWithoutNectarSinceExitingHive);
+-        nbt.putInt("CannotEnterHiveTicks", this.stayOutOfHiveCountdown);
+-        nbt.putInt("CropsGrownSincePollination", this.numCropsGrownSincePollination);
+-        this.addPersistentAngerSaveData(nbt);
++        nbttagcompound.putBoolean("HasNectar", this.hasNectar());
++        nbttagcompound.putBoolean("HasStung", this.hasStung());
++        nbttagcompound.putInt("TicksSincePollination", this.ticksWithoutNectarSinceExitingHive);
++        nbttagcompound.putInt("CannotEnterHiveTicks", this.stayOutOfHiveCountdown);
++        nbttagcompound.putInt("CropsGrownSincePollination", this.numCropsGrownSincePollination);
++        this.addPersistentAngerSaveData(nbttagcompound);
+     }
+ 
+     @Override
+@@ -223,8 +235,8 @@
+         this.ticksWithoutNectarSinceExitingHive = nbt.getInt("TicksSincePollination");
+         this.stayOutOfHiveCountdown = nbt.getInt("CannotEnterHiveTicks");
+         this.numCropsGrownSincePollination = nbt.getInt("CropsGrownSincePollination");
+-        this.hivePos = (BlockPos) NbtUtils.readBlockPos(nbt, "hive_pos").orElse((Object) null);
+-        this.savedFlowerPos = (BlockPos) NbtUtils.readBlockPos(nbt, "flower_pos").orElse((Object) null);
++        this.hivePos = (BlockPos) NbtUtils.readBlockPos(nbt, "hive_pos").orElse(null); // CraftBukkit - decompile error
++        this.savedFlowerPos = (BlockPos) NbtUtils.readBlockPos(nbt, "flower_pos").orElse(null); // CraftBukkit - decompile error
+         this.readPersistentAngerSaveData(this.level(), nbt);
+     }
+ 
+@@ -248,7 +260,7 @@
+                 }
+ 
+                 if (b0 > 0) {
+-                    entityliving.addEffect(new MobEffectInstance(MobEffects.POISON, b0 * 20, 0), this);
++                    entityliving.addEffect(new MobEffectInstance(MobEffects.POISON, b0 * 20, 0), this, EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
+                 }
+             }
+ 
+@@ -506,7 +518,7 @@
+ 
+     @Nullable
+     BeehiveBlockEntity getBeehiveBlockEntity() {
+-        return this.hivePos == null ? null : (this.isTooFarAway(this.hivePos) ? null : (BeehiveBlockEntity) this.level().getBlockEntity(this.hivePos, BlockEntityType.BEEHIVE).orElse((Object) null));
++        return this.hivePos == null ? null : (this.isTooFarAway(this.hivePos) ? null : (BeehiveBlockEntity) this.level().getBlockEntity(this.hivePos, BlockEntityType.BEEHIVE).orElse(null)); // CraftBukkit - decompile error
+     }
+ 
+     boolean isHiveValid() {
+@@ -671,8 +683,14 @@
+         if (this.isInvulnerableTo(world, source)) {
+             return false;
+         } else {
++            // CraftBukkit start - Only stop pollinating if entity was damaged
++            boolean result = super.hurtServer(world, source, amount);
++            if (!result) {
++                return result;
++            }
++            // CraftBukkit end
+             this.beePollinateGoal.stopPollinating();
+-            return super.hurtServer(world, source, amount);
++            return result; // CraftBukkit
+         }
+     }
+ 
+@@ -1082,7 +1100,7 @@
+ 
+         BeeGoToHiveGoal() {
+             super();
+-            this.travellingTicks = Bee.this.level().random.nextInt(10);
++            this.travellingTicks = Bee.this.random.nextInt(10); // CraftBukkit - SPIGOT-7495: Give Bees another chance and let them use their own random, avoid concurrency issues
+             this.blacklistedTargets = Lists.newArrayList();
+             this.setFlags(EnumSet.of(Goal.Flag.MOVE));
+         }
+@@ -1196,7 +1214,7 @@
+ 
+         BeeGoToKnownFlowerGoal() {
+             super();
+-            this.travellingTicks = Bee.this.level().random.nextInt(10);
++            this.travellingTicks = Bee.this.random.nextInt(10); // CraftBukkit - SPIGOT-7495: Give Bees another chance and let them use their own random, avoid concurrency issues
+             this.setFlags(EnumSet.of(Goal.Flag.MOVE));
+         }
+ 
+@@ -1301,7 +1319,7 @@
+                             }
+                         }
+ 
+-                        if (iblockdata1 != null) {
++                        if (iblockdata1 != null && CraftEventFactory.callEntityChangeBlockEvent(Bee.this, blockposition, iblockdata1)) { // CraftBukkit
+                             Bee.this.level().levelEvent(2011, blockposition, 15);
+                             Bee.this.level().setBlockAndUpdate(blockposition, iblockdata1);
+                             Bee.this.incrementNumCropsGrownSincePollination();
+@@ -1378,7 +1396,7 @@
+         @Override
+         protected void alertOther(Mob mob, LivingEntity target) {
+             if (mob instanceof Bee && this.mob.hasLineOfSight(target)) {
+-                mob.setTarget(target);
++                mob.setTarget(target, EntityTargetEvent.TargetReason.TARGET_ATTACKED_ENTITY, true); // CraftBukkit - reason
+             }
+ 
+         }
+@@ -1387,7 +1405,7 @@
+     private static class BeeBecomeAngryTargetGoal extends NearestAttackableTargetGoal<Player> {
+ 
+         BeeBecomeAngryTargetGoal(Bee bee) {
+-            Objects.requireNonNull(bee);
++            // Objects.requireNonNull(entitybee); // CraftBukkit - decompile error
+             super(bee, Player.class, 10, true, false, bee::isAngryAt);
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/Bucketable.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/Bucketable.java.patch
new file mode 100644
index 0000000000..0776d6fecd
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/Bucketable.java.patch
@@ -0,0 +1,47 @@
+--- a/net/minecraft/world/entity/animal/Bucketable.java
++++ b/net/minecraft/world/entity/animal/Bucketable.java
+@@ -16,6 +16,11 @@
+ import net.minecraft.world.item.Items;
+ import net.minecraft.world.item.component.CustomData;
+ import net.minecraft.world.level.Level;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.craftbukkit.inventory.CraftItemStack;
++import org.bukkit.event.entity.EntityRemoveEvent;
++import org.bukkit.event.player.PlayerBucketEntityEvent;
++// CraftBukkit end
+ 
+ public interface Bucketable {
+ 
+@@ -93,10 +98,22 @@
+         ItemStack itemstack = player.getItemInHand(hand);
+ 
+         if (itemstack.getItem() == Items.WATER_BUCKET && entity.isAlive()) {
+-            entity.playSound(((Bucketable) entity).getPickupSound(), 1.0F, 1.0F);
++            // CraftBukkit start
++            // t0.playSound(((Bucketable) t0).getPickupSound(), 1.0F, 1.0F); // CraftBukkit - moved down
+             ItemStack itemstack1 = ((Bucketable) entity).getBucketItemStack();
+ 
+             ((Bucketable) entity).saveToBucketTag(itemstack1);
++
++            PlayerBucketEntityEvent playerBucketFishEvent = CraftEventFactory.callPlayerFishBucketEvent(entity, player, itemstack, itemstack1, hand);
++            itemstack1 = CraftItemStack.asNMSCopy(playerBucketFishEvent.getEntityBucket());
++            if (playerBucketFishEvent.isCancelled()) {
++                ((ServerPlayer) player).containerMenu.sendAllDataToRemote(); // We need to update inventory to resync client's bucket
++                entity.getBukkitEntity().update((ServerPlayer) player); // We need to play out these packets as the client assumes the fish is gone
++                entity.refreshEntityData((ServerPlayer) player); // Need to send data such as the display name to client
++                return Optional.of(InteractionResult.FAIL);
++            }
++            entity.playSound(((Bucketable) entity).getPickupSound(), 1.0F, 1.0F);
++            // CraftBukkit end
+             ItemStack itemstack2 = ItemUtils.createFilledResult(itemstack, player, itemstack1, false);
+ 
+             player.setItemInHand(hand, itemstack2);
+@@ -106,7 +123,7 @@
+                 CriteriaTriggers.FILLED_BUCKET.trigger((ServerPlayer) player, itemstack1);
+             }
+ 
+-            entity.discard();
++            entity.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
+             return Optional.of(InteractionResult.SUCCESS);
+         } else {
+             return Optional.empty();
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/Bucketable.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/Bucketable.patch
deleted file mode 100644
index 1476f05000..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/Bucketable.patch
+++ /dev/null
@@ -1,50 +0,0 @@
---- a/net/minecraft/world/entity/animal/Bucketable.java
-+++ b/net/minecraft/world/entity/animal/Bucketable.java
-@@ -17,6 +17,14 @@
- import net.minecraft.world.item.component.CustomData;
- import net.minecraft.world.level.World;
- 
-+// CraftBukkit start
-+import net.minecraft.network.protocol.game.PacketPlayOutSpawnEntity;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.craftbukkit.inventory.CraftItemStack;
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+import org.bukkit.event.player.PlayerBucketEntityEvent;
-+// CraftBukkit end
-+
- public interface Bucketable {
- 
-     boolean fromBucket();
-@@ -93,10 +101,22 @@
-         ItemStack itemstack = entityhuman.getItemInHand(enumhand);
- 
-         if (itemstack.getItem() == Items.WATER_BUCKET && t0.isAlive()) {
--            t0.playSound(((Bucketable) t0).getPickupSound(), 1.0F, 1.0F);
-+            // CraftBukkit start
-+            // t0.playSound(((Bucketable) t0).getPickupSound(), 1.0F, 1.0F); // CraftBukkit - moved down
-             ItemStack itemstack1 = ((Bucketable) t0).getBucketItemStack();
- 
-             ((Bucketable) t0).saveToBucketTag(itemstack1);
-+
-+            PlayerBucketEntityEvent playerBucketFishEvent = CraftEventFactory.callPlayerFishBucketEvent(t0, entityhuman, itemstack, itemstack1, enumhand);
-+            itemstack1 = CraftItemStack.asNMSCopy(playerBucketFishEvent.getEntityBucket());
-+            if (playerBucketFishEvent.isCancelled()) {
-+                ((EntityPlayer) entityhuman).containerMenu.sendAllDataToRemote(); // We need to update inventory to resync client's bucket
-+                t0.getBukkitEntity().update((EntityPlayer) entityhuman); // We need to play out these packets as the client assumes the fish is gone
-+                t0.refreshEntityData((EntityPlayer) entityhuman); // Need to send data such as the display name to client
-+                return Optional.of(EnumInteractionResult.FAIL);
-+            }
-+            t0.playSound(((Bucketable) t0).getPickupSound(), 1.0F, 1.0F);
-+            // CraftBukkit end
-             ItemStack itemstack2 = ItemLiquidUtil.createFilledResult(itemstack, entityhuman, itemstack1, false);
- 
-             entityhuman.setItemInHand(enumhand, itemstack2);
-@@ -106,7 +126,7 @@
-                 CriterionTriggers.FILLED_BUCKET.trigger((EntityPlayer) entityhuman, itemstack1);
-             }
- 
--            t0.discard();
-+            t0.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
-             return Optional.of(EnumInteractionResult.SUCCESS);
-         } else {
-             return Optional.empty();
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/Cat.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/Cat.java.patch
new file mode 100644
index 0000000000..b52975f163
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/Cat.java.patch
@@ -0,0 +1,64 @@
+--- a/net/minecraft/world/entity/animal/Cat.java
++++ b/net/minecraft/world/entity/animal/Cat.java
+@@ -174,10 +174,10 @@
+     @Override
+     public void readAdditionalSaveData(CompoundTag nbt) {
+         super.readAdditionalSaveData(nbt);
+-        Optional optional = Optional.ofNullable(ResourceLocation.tryParse(nbt.getString("variant"))).map((minecraftkey) -> {
++        Optional<ResourceKey<CatVariant>> optional = Optional.ofNullable(ResourceLocation.tryParse(nbt.getString("variant"))).map((minecraftkey) -> { // CraftBukkit - decompile error
+             return ResourceKey.create(Registries.CAT_VARIANT, minecraftkey);
+         });
+-        Registry iregistry = BuiltInRegistries.CAT_VARIANT;
++        Registry<CatVariant> iregistry = BuiltInRegistries.CAT_VARIANT; // CraftBukkit - decompile error
+ 
+         Objects.requireNonNull(iregistry);
+         optional.flatMap(iregistry::get).ifPresent(this::setVariant);
+@@ -462,7 +462,7 @@
+     }
+ 
+     private void tryToTame(Player player) {
+-        if (this.random.nextInt(3) == 0) {
++        if (this.random.nextInt(3) == 0 && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this, player).isCancelled()) { // CraftBukkit
+             this.tame(player);
+             this.setOrderedToSit(true);
+             this.level().broadcastEntityEvent(this, (byte) 7);
+@@ -480,7 +480,7 @@
+     private static class CatTemptGoal extends TemptGoal {
+ 
+         @Nullable
+-        private Player selectedPlayer;
++        private LivingEntity selectedPlayer; // CraftBukkit
+         private final Cat cat;
+ 
+         public CatTemptGoal(Cat cat, double speed, Predicate<ItemStack> foodPredicate, boolean canBeScared) {
+@@ -614,7 +614,15 @@
+             this.cat.randomTeleport((double) (blockposition_mutableblockposition.getX() + randomsource.nextInt(11) - 5), (double) (blockposition_mutableblockposition.getY() + randomsource.nextInt(5) - 2), (double) (blockposition_mutableblockposition.getZ() + randomsource.nextInt(11) - 5), false);
+             blockposition_mutableblockposition.set(this.cat.blockPosition());
+             this.cat.dropFromGiftLootTable(getServerLevel((Entity) this.cat), BuiltInLootTables.CAT_MORNING_GIFT, (worldserver, itemstack) -> {
+-                worldserver.addFreshEntity(new ItemEntity(worldserver, (double) blockposition_mutableblockposition.getX() - (double) Mth.sin(this.cat.yBodyRot * 0.017453292F), (double) blockposition_mutableblockposition.getY(), (double) blockposition_mutableblockposition.getZ() + (double) Mth.cos(this.cat.yBodyRot * 0.017453292F), itemstack));
++                // CraftBukkit start
++                ItemEntity entityitem = new ItemEntity(worldserver, (double) blockposition_mutableblockposition.getX() - (double) Mth.sin(this.cat.yBodyRot * 0.017453292F), (double) blockposition_mutableblockposition.getY(), (double) blockposition_mutableblockposition.getZ() + (double) Mth.cos(this.cat.yBodyRot * 0.017453292F), itemstack);
++                org.bukkit.event.entity.EntityDropItemEvent event = new org.bukkit.event.entity.EntityDropItemEvent(this.cat.getBukkitEntity(), (org.bukkit.entity.Item) entityitem.getBukkitEntity());
++                entityitem.level().getCraftServer().getPluginManager().callEvent(event);
++                if (event.isCancelled()) {
++                    return;
++                }
++                worldserver.addFreshEntity(entityitem);
++                // CraftBukkit end
+             });
+         }
+ 
+@@ -645,10 +653,10 @@
+         private final Cat cat;
+ 
+         public CatAvoidEntityGoal(Cat cat, Class<T> fleeFromType, float distance, double slowSpeed, double fastSpeed) {
+-            Predicate predicate = EntitySelector.NO_CREATIVE_OR_SPECTATOR;
++            // Predicate predicate = IEntitySelector.NO_CREATIVE_OR_SPECTATOR; // CraftBukkit - decompile error
+ 
+-            Objects.requireNonNull(predicate);
+-            super(cat, fleeFromType, distance, slowSpeed, fastSpeed, predicate::test);
++            // Objects.requireNonNull(predicate); // CraftBukkit - decompile error
++            super(cat, fleeFromType, distance, slowSpeed, fastSpeed, EntitySelector.NO_CREATIVE_OR_SPECTATOR::test); // CraftBukkit - decompile error
+             this.cat = cat;
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/Chicken.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/Chicken.java.patch
new file mode 100644
index 0000000000..78c5696f2a
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/Chicken.java.patch
@@ -0,0 +1,15 @@
+--- a/net/minecraft/world/entity/animal/Chicken.java
++++ b/net/minecraft/world/entity/animal/Chicken.java
+@@ -99,10 +99,12 @@
+ 
+         if (world instanceof ServerLevel worldserver) {
+             if (this.isAlive() && !this.isBaby() && !this.isChickenJockey() && --this.eggTime <= 0) {
++                this.forceDrops = true; // CraftBukkit
+                 if (this.dropFromGiftLootTable(worldserver, BuiltInLootTables.CHICKEN_LAY, this::spawnAtLocation)) {
+                     this.playSound(SoundEvents.CHICKEN_EGG, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
+                     this.gameEvent(GameEvent.ENTITY_PLACE);
+                 }
++                this.forceDrops = false; // CraftBukkit
+ 
+                 this.eggTime = this.random.nextInt(6000) + 6000;
+             }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/Cow.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/Cow.java.patch
new file mode 100644
index 0000000000..e09b07cd04
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/Cow.java.patch
@@ -0,0 +1,32 @@
+--- a/net/minecraft/world/entity/animal/Cow.java
++++ b/net/minecraft/world/entity/animal/Cow.java
+@@ -30,6 +30,11 @@
+ import net.minecraft.world.item.Items;
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.block.state.BlockState;
++// CraftBukkit start
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.craftbukkit.inventory.CraftItemStack;
++import org.bukkit.event.player.PlayerBucketFillEvent;
++// CraftBukkit end
+ 
+ public class Cow extends Animal {
+ 
+@@ -92,8 +97,16 @@
+         ItemStack itemstack = player.getItemInHand(hand);
+ 
+         if (itemstack.is(Items.BUCKET) && !this.isBaby()) {
++            // CraftBukkit start - Got milk?
++            PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent((ServerLevel) player.level(), player, this.blockPosition(), this.blockPosition(), null, itemstack, Items.MILK_BUCKET, hand);
++
++            if (event.isCancelled()) {
++                return InteractionResult.PASS;
++            }
++            // CraftBukkit end
++
+             player.playSound(SoundEvents.COW_MILK, 1.0F, 1.0F);
+-            ItemStack itemstack1 = ItemUtils.createFilledResult(itemstack, player, Items.MILK_BUCKET.getDefaultInstance());
++            ItemStack itemstack1 = ItemUtils.createFilledResult(itemstack, player, CraftItemStack.asNMSCopy(event.getItemStack())); // CraftBukkit
+ 
+             player.setItemInHand(hand, itemstack1);
+             return InteractionResult.SUCCESS;
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/Dolphin.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/Dolphin.java.patch
new file mode 100644
index 0000000000..3da0d3b474
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/Dolphin.java.patch
@@ -0,0 +1,69 @@
+--- a/net/minecraft/world/entity/animal/Dolphin.java
++++ b/net/minecraft/world/entity/animal/Dolphin.java
+@@ -61,9 +61,20 @@
+ import net.minecraft.world.level.ServerLevelAccessor;
+ import net.minecraft.world.level.pathfinder.PathComputationType;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.event.entity.EntityPotionEffectEvent;
++import org.bukkit.event.entity.EntityRemoveEvent;
++// CraftBukkit end
+ 
+ public class Dolphin extends AgeableWaterCreature {
+ 
++    // CraftBukkit start - SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
++    @Override
++    public int getDefaultMaxAirSupply() {
++        return Dolphin.TOTAL_AIR_SUPPLY;
++    }
++    // CraftBukkit end
+     private static final EntityDataAccessor<BlockPos> TREASURE_POS = SynchedEntityData.defineId(Dolphin.class, EntityDataSerializers.BLOCK_POS);
+     private static final EntityDataAccessor<Boolean> GOT_FISH = SynchedEntityData.defineId(Dolphin.class, EntityDataSerializers.BOOLEAN);
+     private static final EntityDataAccessor<Integer> MOISTNESS_LEVEL = SynchedEntityData.defineId(Dolphin.class, EntityDataSerializers.INT);
+@@ -200,7 +211,7 @@
+ 
+     @Override
+     public int getMaxAirSupply() {
+-        return 4800;
++        return this.maxAirTicks; // CraftBukkit - SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
+     }
+ 
+     @Override
+@@ -234,11 +245,17 @@
+             ItemStack itemstack = itemEntity.getItem();
+ 
+             if (this.canHoldItem(itemstack)) {
++                // CraftBukkit start - call EntityPickupItemEvent
++                if (CraftEventFactory.callEntityPickupItemEvent(this, itemEntity, 0, false).isCancelled()) {
++                    return;
++                }
++                itemstack = itemEntity.getItem(); // CraftBukkit- update ItemStack from event
++                // CraftBukkit start
+                 this.onItemPickup(itemEntity);
+                 this.setItemSlot(EquipmentSlot.MAINHAND, itemstack);
+                 this.setGuaranteedDrop(EquipmentSlot.MAINHAND);
+                 this.take(itemEntity, itemstack.getCount());
+-                itemEntity.discard();
++                itemEntity.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
+             }
+         }
+ 
+@@ -495,7 +512,7 @@
+ 
+         @Override
+         public void start() {
+-            this.player.addEffect(new MobEffectInstance(MobEffects.DOLPHINS_GRACE, 100), this.dolphin);
++            this.player.addEffect(new MobEffectInstance(MobEffects.DOLPHINS_GRACE, 100), this.dolphin, EntityPotionEffectEvent.Cause.DOLPHIN); // CraftBukkit
+         }
+ 
+         @Override
+@@ -514,7 +531,7 @@
+             }
+ 
+             if (this.player.isSwimming() && this.player.level().random.nextInt(6) == 0) {
+-                this.player.addEffect(new MobEffectInstance(MobEffects.DOLPHINS_GRACE, 100), this.dolphin);
++                this.player.addEffect(new MobEffectInstance(MobEffects.DOLPHINS_GRACE, 100), this.dolphin, EntityPotionEffectEvent.Cause.DOLPHIN); // CraftBukkit
+             }
+ 
+         }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityAnimal.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityAnimal.patch
deleted file mode 100644
index 2a29f15fe9..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityAnimal.patch
+++ /dev/null
@@ -1,105 +0,0 @@
---- a/net/minecraft/world/entity/animal/EntityAnimal.java
-+++ b/net/minecraft/world/entity/animal/EntityAnimal.java
-@@ -35,12 +35,20 @@
- import net.minecraft.world.level.block.Blocks;
- import net.minecraft.world.level.pathfinder.PathType;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.event.entity.EntityBreedEvent;
-+import org.bukkit.event.entity.EntityDamageEvent;
-+import org.bukkit.event.entity.EntityEnterLoveModeEvent;
-+// CraftBukkit end
-+
- public abstract class EntityAnimal extends EntityAgeable {
- 
-     protected static final int PARENT_AGE_AFTER_BREEDING = 6000;
-     public int inLove;
-     @Nullable
-     public UUID loveCause;
-+    public ItemStack breedItem; // CraftBukkit - Add breedItem variable
- 
-     protected EntityAnimal(EntityTypes<? extends EntityAnimal> entitytypes, World world) {
-         super(entitytypes, world);
-@@ -82,9 +90,15 @@
-     }
- 
-     @Override
--    protected void actuallyHurt(WorldServer worldserver, DamageSource damagesource, float f) {
-+    // CraftBukkit start - void -> boolean
-+    public boolean actuallyHurt(WorldServer worldserver, DamageSource damagesource, float f, EntityDamageEvent event) {
-+        boolean damageResult = super.actuallyHurt(worldserver, damagesource, f, event);
-+        if (!damageResult) {
-+            return false;
-+        }
-         this.resetLove();
--        super.actuallyHurt(worldserver, damagesource, f);
-+        return true;
-+        // CraftBukkit end
-     }
- 
-     @Override
-@@ -188,10 +202,17 @@
-     }
- 
-     public void setInLove(@Nullable EntityHuman entityhuman) {
--        this.inLove = 600;
-+        // CraftBukkit start
-+        EntityEnterLoveModeEvent entityEnterLoveModeEvent = CraftEventFactory.callEntityEnterLoveModeEvent(entityhuman, this, 600);
-+        if (entityEnterLoveModeEvent.isCancelled()) {
-+            return;
-+        }
-+        this.inLove = entityEnterLoveModeEvent.getTicksInLove();
-+        // CraftBukkit end
-         if (entityhuman != null) {
-             this.loveCause = entityhuman.getUUID();
-         }
-+        this.breedItem = entityhuman.getInventory().getSelected(); // CraftBukkit
- 
-         this.level().broadcastEntityEvent(this, (byte) 18);
-     }
-@@ -233,12 +254,29 @@
-         if (entityageable != null) {
-             entityageable.setBaby(true);
-             entityageable.moveTo(this.getX(), this.getY(), this.getZ(), 0.0F, 0.0F);
--            this.finalizeSpawnChildFromBreeding(worldserver, entityanimal, entityageable);
--            worldserver.addFreshEntityWithPassengers(entityageable);
-+            // CraftBukkit start - call EntityBreedEvent
-+            EntityPlayer breeder = Optional.ofNullable(this.getLoveCause()).or(() -> {
-+                return Optional.ofNullable(entityanimal.getLoveCause());
-+            }).orElse(null);
-+            int experience = this.getRandom().nextInt(7) + 1;
-+            EntityBreedEvent entityBreedEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityBreedEvent(entityageable, this, entityanimal, breeder, this.breedItem, experience);
-+            if (entityBreedEvent.isCancelled()) {
-+                return;
-+            }
-+            experience = entityBreedEvent.getExperience();
-+            this.finalizeSpawnChildFromBreeding(worldserver, entityanimal, entityageable, experience);
-+            worldserver.addFreshEntityWithPassengers(entityageable, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING);
-+            // CraftBukkit end
-         }
-     }
- 
-     public void finalizeSpawnChildFromBreeding(WorldServer worldserver, EntityAnimal entityanimal, @Nullable EntityAgeable entityageable) {
-+        // CraftBukkit start
-+        this.finalizeSpawnChildFromBreeding(worldserver, entityanimal, entityageable, this.getRandom().nextInt(7) + 1);
-+    }
-+
-+    public void finalizeSpawnChildFromBreeding(WorldServer worldserver, EntityAnimal entityanimal, @Nullable EntityAgeable entityageable, int experience) {
-+        // CraftBukkit end
-         Optional.ofNullable(this.getLoveCause()).or(() -> {
-             return Optional.ofNullable(entityanimal.getLoveCause());
-         }).ifPresent((entityplayer) -> {
-@@ -251,7 +289,11 @@
-         entityanimal.resetLove();
-         worldserver.broadcastEntityEvent(this, (byte) 18);
-         if (worldserver.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
--            worldserver.addFreshEntity(new EntityExperienceOrb(worldserver, this.getX(), this.getY(), this.getZ(), this.getRandom().nextInt(7) + 1));
-+            // CraftBukkit start - use event experience
-+            if (experience > 0) {
-+                worldserver.addFreshEntity(new EntityExperienceOrb(worldserver, this.getX(), this.getY(), this.getZ(), experience));
-+            }
-+            // CraftBukkit end
-         }
- 
-     }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityBee.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityBee.patch
deleted file mode 100644
index 5344d0cdaa..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityBee.patch
+++ /dev/null
@@ -1,127 +0,0 @@
---- a/net/minecraft/world/entity/animal/EntityBee.java
-+++ b/net/minecraft/world/entity/animal/EntityBee.java
-@@ -93,6 +93,12 @@
- import net.minecraft.world.level.pathfinder.PathType;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.event.entity.EntityPotionEffectEvent;
-+import org.bukkit.event.entity.EntityTargetEvent;
-+// CraftBukkit end
-+
- public class EntityBee extends EntityAnimal implements IEntityAngerable, EntityBird {
- 
-     public static final float FLAP_DEGREES_PER_TICK = 120.32113F;
-@@ -198,12 +204,19 @@
- 
-     @Override
-     public void addAdditionalSaveData(NBTTagCompound nbttagcompound) {
-+        // CraftBukkit start - selectively save data
-+        addAdditionalSaveData(nbttagcompound, true);
-+    }
-+
-+    @Override
-+    public void addAdditionalSaveData(NBTTagCompound nbttagcompound, boolean includeAll) {
-+        // CraftBukkit end
-         super.addAdditionalSaveData(nbttagcompound);
--        if (this.hasHive()) {
-+        if (includeAll && this.hasHive()) { // CraftBukkit - selectively save hive
-             nbttagcompound.put("hive_pos", GameProfileSerializer.writeBlockPos(this.getHivePos()));
-         }
- 
--        if (this.hasSavedFlowerPos()) {
-+        if (includeAll && this.hasSavedFlowerPos()) { // CraftBukkit - selectively save flower
-             nbttagcompound.put("flower_pos", GameProfileSerializer.writeBlockPos(this.getSavedFlowerPos()));
-         }
- 
-@@ -223,8 +236,8 @@
-         this.ticksWithoutNectarSinceExitingHive = nbttagcompound.getInt("TicksSincePollination");
-         this.stayOutOfHiveCountdown = nbttagcompound.getInt("CannotEnterHiveTicks");
-         this.numCropsGrownSincePollination = nbttagcompound.getInt("CropsGrownSincePollination");
--        this.hivePos = (BlockPosition) GameProfileSerializer.readBlockPos(nbttagcompound, "hive_pos").orElse((Object) null);
--        this.savedFlowerPos = (BlockPosition) GameProfileSerializer.readBlockPos(nbttagcompound, "flower_pos").orElse((Object) null);
-+        this.hivePos = (BlockPosition) GameProfileSerializer.readBlockPos(nbttagcompound, "hive_pos").orElse(null); // CraftBukkit - decompile error
-+        this.savedFlowerPos = (BlockPosition) GameProfileSerializer.readBlockPos(nbttagcompound, "flower_pos").orElse(null); // CraftBukkit - decompile error
-         this.readPersistentAngerSaveData(this.level(), nbttagcompound);
-     }
- 
-@@ -248,7 +261,7 @@
-                 }
- 
-                 if (b0 > 0) {
--                    entityliving.addEffect(new MobEffect(MobEffects.POISON, b0 * 20, 0), this);
-+                    entityliving.addEffect(new MobEffect(MobEffects.POISON, b0 * 20, 0), this, EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
-                 }
-             }
- 
-@@ -506,7 +519,7 @@
- 
-     @Nullable
-     TileEntityBeehive getBeehiveBlockEntity() {
--        return this.hivePos == null ? null : (this.isTooFarAway(this.hivePos) ? null : (TileEntityBeehive) this.level().getBlockEntity(this.hivePos, TileEntityTypes.BEEHIVE).orElse((Object) null));
-+        return this.hivePos == null ? null : (this.isTooFarAway(this.hivePos) ? null : (TileEntityBeehive) this.level().getBlockEntity(this.hivePos, TileEntityTypes.BEEHIVE).orElse(null)); // CraftBukkit - decompile error
-     }
- 
-     boolean isHiveValid() {
-@@ -671,8 +684,14 @@
-         if (this.isInvulnerableTo(worldserver, damagesource)) {
-             return false;
-         } else {
-+            // CraftBukkit start - Only stop pollinating if entity was damaged
-+            boolean result = super.hurtServer(worldserver, damagesource, f);
-+            if (!result) {
-+                return result;
-+            }
-+            // CraftBukkit end
-             this.beePollinateGoal.stopPollinating();
--            return super.hurtServer(worldserver, damagesource, f);
-+            return result; // CraftBukkit
-         }
-     }
- 
-@@ -1082,7 +1101,7 @@
- 
-         e() {
-             super();
--            this.travellingTicks = EntityBee.this.level().random.nextInt(10);
-+            this.travellingTicks = EntityBee.this.random.nextInt(10); // CraftBukkit - SPIGOT-7495: Give Bees another chance and let them use their own random, avoid concurrency issues
-             this.blacklistedTargets = Lists.newArrayList();
-             this.setFlags(EnumSet.of(PathfinderGoal.Type.MOVE));
-         }
-@@ -1196,7 +1215,7 @@
- 
-         f() {
-             super();
--            this.travellingTicks = EntityBee.this.level().random.nextInt(10);
-+            this.travellingTicks = EntityBee.this.random.nextInt(10); // CraftBukkit - SPIGOT-7495: Give Bees another chance and let them use their own random, avoid concurrency issues
-             this.setFlags(EnumSet.of(PathfinderGoal.Type.MOVE));
-         }
- 
-@@ -1301,7 +1320,7 @@
-                             }
-                         }
- 
--                        if (iblockdata1 != null) {
-+                        if (iblockdata1 != null && CraftEventFactory.callEntityChangeBlockEvent(EntityBee.this, blockposition, iblockdata1)) { // CraftBukkit
-                             EntityBee.this.level().levelEvent(2011, blockposition, 15);
-                             EntityBee.this.level().setBlockAndUpdate(blockposition, iblockdata1);
-                             EntityBee.this.incrementNumCropsGrownSincePollination();
-@@ -1378,7 +1397,7 @@
-         @Override
-         protected void alertOther(EntityInsentient entityinsentient, EntityLiving entityliving) {
-             if (entityinsentient instanceof EntityBee && this.mob.hasLineOfSight(entityliving)) {
--                entityinsentient.setTarget(entityliving);
-+                entityinsentient.setTarget(entityliving, EntityTargetEvent.TargetReason.TARGET_ATTACKED_ENTITY, true); // CraftBukkit - reason
-             }
- 
-         }
-@@ -1387,7 +1406,7 @@
-     private static class c extends PathfinderGoalNearestAttackableTarget<EntityHuman> {
- 
-         c(EntityBee entitybee) {
--            Objects.requireNonNull(entitybee);
-+            // Objects.requireNonNull(entitybee); // CraftBukkit - decompile error
-             super(entitybee, EntityHuman.class, 10, true, false, entitybee::isAngryAt);
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityCat.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityCat.patch
deleted file mode 100644
index beee3ec814..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityCat.patch
+++ /dev/null
@@ -1,64 +0,0 @@
---- a/net/minecraft/world/entity/animal/EntityCat.java
-+++ b/net/minecraft/world/entity/animal/EntityCat.java
-@@ -174,10 +174,10 @@
-     @Override
-     public void readAdditionalSaveData(NBTTagCompound nbttagcompound) {
-         super.readAdditionalSaveData(nbttagcompound);
--        Optional optional = Optional.ofNullable(MinecraftKey.tryParse(nbttagcompound.getString("variant"))).map((minecraftkey) -> {
-+        Optional<ResourceKey<CatVariant>> optional = Optional.ofNullable(MinecraftKey.tryParse(nbttagcompound.getString("variant"))).map((minecraftkey) -> { // CraftBukkit - decompile error
-             return ResourceKey.create(Registries.CAT_VARIANT, minecraftkey);
-         });
--        IRegistry iregistry = BuiltInRegistries.CAT_VARIANT;
-+        IRegistry<CatVariant> iregistry = BuiltInRegistries.CAT_VARIANT; // CraftBukkit - decompile error
- 
-         Objects.requireNonNull(iregistry);
-         optional.flatMap(iregistry::get).ifPresent(this::setVariant);
-@@ -462,7 +462,7 @@
-     }
- 
-     private void tryToTame(EntityHuman entityhuman) {
--        if (this.random.nextInt(3) == 0) {
-+        if (this.random.nextInt(3) == 0 && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this, entityhuman).isCancelled()) { // CraftBukkit
-             this.tame(entityhuman);
-             this.setOrderedToSit(true);
-             this.level().broadcastEntityEvent(this, (byte) 7);
-@@ -480,7 +480,7 @@
-     private static class PathfinderGoalTemptChance extends PathfinderGoalTempt {
- 
-         @Nullable
--        private EntityHuman selectedPlayer;
-+        private EntityLiving selectedPlayer; // CraftBukkit
-         private final EntityCat cat;
- 
-         public PathfinderGoalTemptChance(EntityCat entitycat, double d0, Predicate<ItemStack> predicate, boolean flag) {
-@@ -614,7 +614,15 @@
-             this.cat.randomTeleport((double) (blockposition_mutableblockposition.getX() + randomsource.nextInt(11) - 5), (double) (blockposition_mutableblockposition.getY() + randomsource.nextInt(5) - 2), (double) (blockposition_mutableblockposition.getZ() + randomsource.nextInt(11) - 5), false);
-             blockposition_mutableblockposition.set(this.cat.blockPosition());
-             this.cat.dropFromGiftLootTable(getServerLevel((Entity) this.cat), LootTables.CAT_MORNING_GIFT, (worldserver, itemstack) -> {
--                worldserver.addFreshEntity(new EntityItem(worldserver, (double) blockposition_mutableblockposition.getX() - (double) MathHelper.sin(this.cat.yBodyRot * 0.017453292F), (double) blockposition_mutableblockposition.getY(), (double) blockposition_mutableblockposition.getZ() + (double) MathHelper.cos(this.cat.yBodyRot * 0.017453292F), itemstack));
-+                // CraftBukkit start
-+                EntityItem entityitem = new EntityItem(worldserver, (double) blockposition_mutableblockposition.getX() - (double) MathHelper.sin(this.cat.yBodyRot * 0.017453292F), (double) blockposition_mutableblockposition.getY(), (double) blockposition_mutableblockposition.getZ() + (double) MathHelper.cos(this.cat.yBodyRot * 0.017453292F), itemstack);
-+                org.bukkit.event.entity.EntityDropItemEvent event = new org.bukkit.event.entity.EntityDropItemEvent(this.cat.getBukkitEntity(), (org.bukkit.entity.Item) entityitem.getBukkitEntity());
-+                entityitem.level().getCraftServer().getPluginManager().callEvent(event);
-+                if (event.isCancelled()) {
-+                    return;
-+                }
-+                worldserver.addFreshEntity(entityitem);
-+                // CraftBukkit end
-             });
-         }
- 
-@@ -645,10 +653,10 @@
-         private final EntityCat cat;
- 
-         public a(EntityCat entitycat, Class<T> oclass, float f, double d0, double d1) {
--            Predicate predicate = IEntitySelector.NO_CREATIVE_OR_SPECTATOR;
-+            // Predicate predicate = IEntitySelector.NO_CREATIVE_OR_SPECTATOR; // CraftBukkit - decompile error
- 
--            Objects.requireNonNull(predicate);
--            super(entitycat, oclass, f, d0, d1, predicate::test);
-+            // Objects.requireNonNull(predicate); // CraftBukkit - decompile error
-+            super(entitycat, oclass, f, d0, d1, IEntitySelector.NO_CREATIVE_OR_SPECTATOR::test); // CraftBukkit - decompile error
-             this.cat = entitycat;
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityChicken.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityChicken.patch
deleted file mode 100644
index 11e71cc922..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityChicken.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/net/minecraft/world/entity/animal/EntityChicken.java
-+++ b/net/minecraft/world/entity/animal/EntityChicken.java
-@@ -99,10 +99,12 @@
- 
-         if (world instanceof WorldServer worldserver) {
-             if (this.isAlive() && !this.isBaby() && !this.isChickenJockey() && --this.eggTime <= 0) {
-+                this.forceDrops = true; // CraftBukkit
-                 if (this.dropFromGiftLootTable(worldserver, LootTables.CHICKEN_LAY, this::spawnAtLocation)) {
-                     this.playSound(SoundEffects.CHICKEN_EGG, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
-                     this.gameEvent(GameEvent.ENTITY_PLACE);
-                 }
-+                this.forceDrops = false; // CraftBukkit
- 
-                 this.eggTime = this.random.nextInt(6000) + 6000;
-             }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityCow.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityCow.patch
deleted file mode 100644
index 35abe25ccf..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityCow.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- a/net/minecraft/world/entity/animal/EntityCow.java
-+++ b/net/minecraft/world/entity/animal/EntityCow.java
-@@ -31,6 +31,12 @@
- import net.minecraft.world.level.World;
- import net.minecraft.world.level.block.state.IBlockData;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.craftbukkit.inventory.CraftItemStack;
-+import org.bukkit.event.player.PlayerBucketFillEvent;
-+// CraftBukkit end
-+
- public class EntityCow extends EntityAnimal {
- 
-     private static final EntitySize BABY_DIMENSIONS = EntityTypes.COW.getDimensions().scale(0.5F).withEyeHeight(0.665F);
-@@ -92,8 +98,16 @@
-         ItemStack itemstack = entityhuman.getItemInHand(enumhand);
- 
-         if (itemstack.is(Items.BUCKET) && !this.isBaby()) {
-+            // CraftBukkit start - Got milk?
-+            PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent((WorldServer) entityhuman.level(), entityhuman, this.blockPosition(), this.blockPosition(), null, itemstack, Items.MILK_BUCKET, enumhand);
-+
-+            if (event.isCancelled()) {
-+                return EnumInteractionResult.PASS;
-+            }
-+            // CraftBukkit end
-+
-             entityhuman.playSound(SoundEffects.COW_MILK, 1.0F, 1.0F);
--            ItemStack itemstack1 = ItemLiquidUtil.createFilledResult(itemstack, entityhuman, Items.MILK_BUCKET.getDefaultInstance());
-+            ItemStack itemstack1 = ItemLiquidUtil.createFilledResult(itemstack, entityhuman, CraftItemStack.asNMSCopy(event.getItemStack())); // CraftBukkit
- 
-             entityhuman.setItemInHand(enumhand, itemstack1);
-             return EnumInteractionResult.SUCCESS;
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityDolphin.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityDolphin.patch
deleted file mode 100644
index 27264decc0..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityDolphin.patch
+++ /dev/null
@@ -1,69 +0,0 @@
---- a/net/minecraft/world/entity/animal/EntityDolphin.java
-+++ b/net/minecraft/world/entity/animal/EntityDolphin.java
-@@ -62,8 +62,20 @@
- import net.minecraft.world.level.pathfinder.PathMode;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.event.entity.EntityPotionEffectEvent;
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+// CraftBukkit end
-+
- public class EntityDolphin extends AgeableWaterCreature {
- 
-+    // CraftBukkit start - SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
-+    @Override
-+    public int getDefaultMaxAirSupply() {
-+        return TOTAL_AIR_SUPPLY;
-+    }
-+    // CraftBukkit end
-     private static final DataWatcherObject<BlockPosition> TREASURE_POS = DataWatcher.defineId(EntityDolphin.class, DataWatcherRegistry.BLOCK_POS);
-     private static final DataWatcherObject<Boolean> GOT_FISH = DataWatcher.defineId(EntityDolphin.class, DataWatcherRegistry.BOOLEAN);
-     private static final DataWatcherObject<Integer> MOISTNESS_LEVEL = DataWatcher.defineId(EntityDolphin.class, DataWatcherRegistry.INT);
-@@ -200,7 +212,7 @@
- 
-     @Override
-     public int getMaxAirSupply() {
--        return 4800;
-+        return maxAirTicks; // CraftBukkit - SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
-     }
- 
-     @Override
-@@ -234,11 +246,17 @@
-             ItemStack itemstack = entityitem.getItem();
- 
-             if (this.canHoldItem(itemstack)) {
-+                // CraftBukkit start - call EntityPickupItemEvent
-+                if (CraftEventFactory.callEntityPickupItemEvent(this, entityitem, 0, false).isCancelled()) {
-+                    return;
-+                }
-+                itemstack = entityitem.getItem(); // CraftBukkit- update ItemStack from event
-+                // CraftBukkit start
-                 this.onItemPickup(entityitem);
-                 this.setItemSlot(EnumItemSlot.MAINHAND, itemstack);
-                 this.setGuaranteedDrop(EnumItemSlot.MAINHAND);
-                 this.take(entityitem, itemstack.getCount());
--                entityitem.discard();
-+                entityitem.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
-             }
-         }
- 
-@@ -495,7 +513,7 @@
- 
-         @Override
-         public void start() {
--            this.player.addEffect(new MobEffect(MobEffects.DOLPHINS_GRACE, 100), this.dolphin);
-+            this.player.addEffect(new MobEffect(MobEffects.DOLPHINS_GRACE, 100), this.dolphin, EntityPotionEffectEvent.Cause.DOLPHIN); // CraftBukkit
-         }
- 
-         @Override
-@@ -514,7 +532,7 @@
-             }
- 
-             if (this.player.isSwimming() && this.player.level().random.nextInt(6) == 0) {
--                this.player.addEffect(new MobEffect(MobEffects.DOLPHINS_GRACE, 100), this.dolphin);
-+                this.player.addEffect(new MobEffect(MobEffects.DOLPHINS_GRACE, 100), this.dolphin, EntityPotionEffectEvent.Cause.DOLPHIN); // CraftBukkit
-             }
- 
-         }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityIronGolem.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityIronGolem.patch
deleted file mode 100644
index 0477fb5526..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityIronGolem.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/entity/animal/EntityIronGolem.java
-+++ b/net/minecraft/world/entity/animal/EntityIronGolem.java
-@@ -98,7 +98,7 @@
-     @Override
-     protected void doPush(Entity entity) {
-         if (entity instanceof IMonster && !(entity instanceof EntityCreeper) && this.getRandom().nextInt(20) == 0) {
--            this.setTarget((EntityLiving) entity);
-+            this.setTarget((EntityLiving) entity, org.bukkit.event.entity.EntityTargetLivingEntityEvent.TargetReason.COLLISION, true); // CraftBukkit - set reason
-         }
- 
-         super.doPush(entity);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityMushroomCow.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityMushroomCow.patch
deleted file mode 100644
index 13fc6bcc6a..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityMushroomCow.patch
+++ /dev/null
@@ -1,59 +0,0 @@
---- a/net/minecraft/world/entity/animal/EntityMushroomCow.java
-+++ b/net/minecraft/world/entity/animal/EntityMushroomCow.java
-@@ -43,6 +43,13 @@
- import net.minecraft.world.level.gameevent.GameEvent;
- import net.minecraft.world.level.storage.loot.LootTables;
- 
-+// CraftBukkit start
-+import org.bukkit.Bukkit;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.event.entity.EntityDropItemEvent;
-+import org.bukkit.event.entity.EntityTransformEvent;
-+// CraftBukkit end
-+
- public class EntityMushroomCow extends EntityCow implements IShearable, VariantHolder<EntityMushroomCow.Type> {
- 
-     private static final DataWatcherObject<String> DATA_TYPE = DataWatcher.defineId(EntityMushroomCow.class, DataWatcherRegistry.STRING);
-@@ -120,6 +127,11 @@
-             if (world instanceof WorldServer) {
-                 WorldServer worldserver = (WorldServer) world;
- 
-+                // CraftBukkit start
-+                if (!CraftEventFactory.handlePlayerShearEntityEvent(entityhuman, this, itemstack, enumhand)) {
-+                    return EnumInteractionResult.PASS;
-+                }
-+                // CraftBukkit end
-                 this.shear(worldserver, SoundCategory.PLAYERS, itemstack);
-                 this.gameEvent(GameEvent.SHEAR, entityhuman);
-                 itemstack.hurtAndBreak(1, entityhuman, getSlotForHand(enumhand));
-@@ -163,11 +175,19 @@
-             worldserver.sendParticles(Particles.EXPLOSION, this.getX(), this.getY(0.5D), this.getZ(), 1, 0.0D, 0.0D, 0.0D, 0.0D);
-             this.dropFromShearingLootTable(worldserver, LootTables.SHEAR_MOOSHROOM, itemstack, (worldserver1, itemstack1) -> {
-                 for (int i = 0; i < itemstack1.getCount(); ++i) {
--                    worldserver1.addFreshEntity(new EntityItem(this.level(), this.getX(), this.getY(1.0D), this.getZ(), itemstack1.copyWithCount(1)));
-+                    // CraftBukkit start
-+                    EntityItem entityitem = new EntityItem(this.level(), this.getX(), this.getY(1.0D), this.getZ(), itemstack1.copyWithCount(1));
-+                    EntityDropItemEvent event = new EntityDropItemEvent(this.getBukkitEntity(), (org.bukkit.entity.Item) entityitem.getBukkitEntity());
-+                    Bukkit.getPluginManager().callEvent(event);
-+                    if (event.isCancelled()) {
-+                        continue;
-+                    }
-+                    worldserver1.addFreshEntity(entityitem);
-+                    // CraftBukkit end
-                 }
- 
-             });
--        });
-+        }, EntityTransformEvent.TransformReason.SHEARED, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SHEARED); // CraftBukkit
-     }
- 
-     @Override
-@@ -263,7 +283,7 @@
-         }
- 
-         static EntityMushroomCow.Type byName(String s) {
--            return (EntityMushroomCow.Type) EntityMushroomCow.Type.CODEC.byName(s, (Enum) EntityMushroomCow.Type.RED);
-+            return (EntityMushroomCow.Type) EntityMushroomCow.Type.CODEC.byName(s, EntityMushroomCow.Type.RED); // CraftBukkit - decompile error
-         }
-     }
- }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityOcelot.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityOcelot.patch
deleted file mode 100644
index 9c76590e33..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityOcelot.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- a/net/minecraft/world/entity/animal/EntityOcelot.java
-+++ b/net/minecraft/world/entity/animal/EntityOcelot.java
-@@ -167,7 +167,7 @@
-         if ((this.temptGoal == null || this.temptGoal.isRunning()) && !this.isTrusting() && this.isFood(itemstack) && entityhuman.distanceToSqr((Entity) this) < 9.0D) {
-             this.usePlayerItem(entityhuman, enumhand, itemstack);
-             if (!this.level().isClientSide) {
--                if (this.random.nextInt(3) == 0) {
-+                if (this.random.nextInt(3) == 0 && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this, entityhuman).isCancelled()) { // CraftBukkit - added event call and isCancelled check
-                     this.setTrusting(true);
-                     this.spawnTrustingParticles(true);
-                     this.level().broadcastEntityEvent(this, (byte) 41);
-@@ -298,10 +298,10 @@
-         private final EntityOcelot ocelot;
- 
-         public a(EntityOcelot entityocelot, Class<T> oclass, float f, double d0, double d1) {
--            Predicate predicate = IEntitySelector.NO_CREATIVE_OR_SPECTATOR;
-+            // Predicate predicate = IEntitySelector.NO_CREATIVE_OR_SPECTATOR; // CraftBukkit - decompile error
- 
--            Objects.requireNonNull(predicate);
--            super(entityocelot, oclass, f, d0, d1, predicate::test);
-+            // Objects.requireNonNull(predicate); // CraftBukkit - decompile error
-+            super(entityocelot, oclass, f, d0, d1, IEntitySelector.NO_CREATIVE_OR_SPECTATOR::test); // CraftBukkit - decompile error
-             this.ocelot = entityocelot;
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityPanda.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityPanda.patch
deleted file mode 100644
index 6dbcfc20f9..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityPanda.patch
+++ /dev/null
@@ -1,64 +0,0 @@
---- a/net/minecraft/world/entity/animal/EntityPanda.java
-+++ b/net/minecraft/world/entity/animal/EntityPanda.java
-@@ -69,6 +69,12 @@
- import net.minecraft.world.level.storage.loot.LootTables;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+import org.bukkit.event.entity.EntityTargetEvent;
-+// CraftBukkit end
-+
- public class EntityPanda extends EntityAnimal {
- 
-     private static final DataWatcherObject<Integer> UNHAPPY_COUNTER = DataWatcher.defineId(EntityPanda.class, DataWatcherRegistry.INT);
-@@ -541,14 +547,14 @@
- 
-     @Override
-     protected void pickUpItem(WorldServer worldserver, EntityItem entityitem) {
--        if (this.getItemBySlot(EnumItemSlot.MAINHAND).isEmpty() && canPickUpAndEat(entityitem)) {
-+        if (!CraftEventFactory.callEntityPickupItemEvent(this, entityitem, 0, !(this.getItemBySlot(EnumItemSlot.MAINHAND).isEmpty() && canPickUpAndEat(entityitem))).isCancelled()) { // CraftBukkit
-             this.onItemPickup(entityitem);
-             ItemStack itemstack = entityitem.getItem();
- 
-             this.setItemSlot(EnumItemSlot.MAINHAND, itemstack);
-             this.setGuaranteedDrop(EnumItemSlot.MAINHAND);
-             this.take(entityitem, itemstack.getCount());
--            entityitem.discard();
-+            entityitem.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
-         }
- 
-     }
-@@ -772,7 +778,7 @@
-         }
- 
-         public static EntityPanda.Gene byName(String s) {
--            return (EntityPanda.Gene) EntityPanda.Gene.CODEC.byName(s, (Enum) EntityPanda.Gene.NORMAL);
-+            return (EntityPanda.Gene) EntityPanda.Gene.CODEC.byName(s, EntityPanda.Gene.NORMAL); // CraftBukkit - decompile error
-         }
- 
-         public static EntityPanda.Gene getRandom(RandomSource randomsource) {
-@@ -876,10 +882,10 @@
-         private final EntityPanda panda;
- 
-         public c(EntityPanda entitypanda, Class<T> oclass, float f, double d0, double d1) {
--            Predicate predicate = IEntitySelector.NO_SPECTATORS;
-+            // Predicate predicate = IEntitySelector.NO_SPECTATORS;
- 
--            Objects.requireNonNull(predicate);
--            super(entitypanda, oclass, f, d0, d1, predicate::test);
-+            // Objects.requireNonNull(predicate);
-+            super(entitypanda, oclass, f, d0, d1, IEntitySelector.NO_SPECTATORS::test);
-             this.panda = entitypanda;
-         }
- 
-@@ -1116,7 +1122,7 @@
-         @Override
-         protected void alertOther(EntityInsentient entityinsentient, EntityLiving entityliving) {
-             if (entityinsentient instanceof EntityPanda && entityinsentient.isAggressive()) {
--                entityinsentient.setTarget(entityliving);
-+                entityinsentient.setTarget(entityliving, EntityTargetEvent.TargetReason.TARGET_ATTACKED_ENTITY, true); // CraftBukkit
-             }
- 
-         }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityParrot.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityParrot.patch
deleted file mode 100644
index 1b39ad8972..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityParrot.patch
+++ /dev/null
@@ -1,45 +0,0 @@
---- a/net/minecraft/world/entity/animal/EntityParrot.java
-+++ b/net/minecraft/world/entity/animal/EntityParrot.java
-@@ -248,7 +248,7 @@
-             }
- 
-             if (!this.level().isClientSide) {
--                if (this.random.nextInt(10) == 0) {
-+                if (this.random.nextInt(10) == 0 && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this, entityhuman).isCancelled()) { // CraftBukkit
-                     this.tame(entityhuman);
-                     this.level().broadcastEntityEvent(this, (byte) 7);
-                 } else {
-@@ -269,7 +269,7 @@
-             }
-         } else {
-             this.usePlayerItem(entityhuman, enumhand, itemstack);
--            this.addEffect(new MobEffect(MobEffects.POISON, 900));
-+            this.addEffect(new MobEffect(MobEffects.POISON, 900), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.FOOD); // CraftBukkit
-             if (entityhuman.isCreative() || !this.isInvulnerable()) {
-                 this.hurt(this.damageSources().playerAttack(entityhuman), Float.MAX_VALUE);
-             }
-@@ -363,7 +363,7 @@
- 
-     @Override
-     public boolean isPushable() {
--        return true;
-+        return super.isPushable(); // CraftBukkit - collidable API
-     }
- 
-     @Override
-@@ -378,8 +378,14 @@
-         if (this.isInvulnerableTo(worldserver, damagesource)) {
-             return false;
-         } else {
-+            // CraftBukkit start
-+            boolean result = super.hurtServer(worldserver, damagesource, f);
-+            if (!result) {
-+                return result;
-+            }
-+            // CraftBukkit end
-             this.setOrderedToSit(false);
--            return super.hurtServer(worldserver, damagesource, f);
-+            return result; // CraftBukkit
-         }
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityPerchable.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityPerchable.patch
deleted file mode 100644
index 2c2acfed73..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityPerchable.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/net/minecraft/world/entity/animal/EntityPerchable.java
-+++ b/net/minecraft/world/entity/animal/EntityPerchable.java
-@@ -6,6 +6,10 @@
- import net.minecraft.world.entity.EntityTypes;
- import net.minecraft.world.level.World;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+// CraftBukkit end
-+
- public abstract class EntityPerchable extends EntityTameableAnimal {
- 
-     private static final int RIDE_COOLDOWN = 100;
-@@ -21,7 +25,7 @@
-         nbttagcompound.putString("id", this.getEncodeId());
-         this.saveWithoutId(nbttagcompound);
-         if (entityplayer.setEntityOnShoulder(nbttagcompound)) {
--            this.discard();
-+            this.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
-             return true;
-         } else {
-             return false;
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityPig.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityPig.patch
deleted file mode 100644
index 0f44b395a0..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityPig.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/net/minecraft/world/entity/animal/EntityPig.java
-+++ b/net/minecraft/world/entity/animal/EntityPig.java
-@@ -50,6 +50,11 @@
- import net.minecraft.world.phys.AxisAlignedBB;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+// CraftBukkit end
-+
- public class EntityPig extends EntityAnimal implements ISteerable, ISaddleable {
- 
-     private static final DataWatcherObject<Boolean> DATA_SADDLE_ID = DataWatcher.defineId(EntityPig.class, DataWatcherRegistry.BOOLEAN);
-@@ -247,7 +252,14 @@
-                 }
- 
-                 entitypigzombie1.setPersistenceRequired();
--            });
-+            // CraftBukkit start
-+            }, null, null);
-+            if (CraftEventFactory.callPigZapEvent(this, entitylightning, entitypigzombie).isCancelled()) {
-+                return;
-+            }
-+            worldserver.addFreshEntity(entitypigzombie, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.LIGHTNING);
-+            this.discard(EntityRemoveEvent.Cause.TRANSFORMATION); // CraftBukkit - add Bukkit remove cause
-+            // CraftBukkit end
- 
-             if (entitypigzombie == null) {
-                 super.thunderHit(worldserver, entitylightning);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityPufferFish.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityPufferFish.patch
deleted file mode 100644
index 10104083f5..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityPufferFish.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/net/minecraft/world/entity/animal/EntityPufferFish.java
-+++ b/net/minecraft/world/entity/animal/EntityPufferFish.java
-@@ -155,7 +155,7 @@
-         int i = this.getPuffState();
- 
-         if (entityinsentient.hurtServer(worldserver, this.damageSources().mobAttack(this), (float) (1 + i))) {
--            entityinsentient.addEffect(new MobEffect(MobEffects.POISON, 60 * i, 0), this);
-+            entityinsentient.addEffect(new MobEffect(MobEffects.POISON, 60 * i, 0), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
-             this.playSound(SoundEffects.PUFFER_FISH_STING, 1.0F, 1.0F);
-         }
- 
-@@ -171,7 +171,7 @@
-                     entityplayer.connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.PUFFER_FISH_STING, 0.0F));
-                 }
- 
--                entityhuman.addEffect(new MobEffect(MobEffects.POISON, 60 * i, 0), this);
-+                entityhuman.addEffect(new MobEffect(MobEffects.POISON, 60 * i, 0), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
-             }
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntitySheep.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/EntitySheep.patch
deleted file mode 100644
index ad06fe3b28..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntitySheep.patch
+++ /dev/null
@@ -1,50 +0,0 @@
---- a/net/minecraft/world/entity/animal/EntitySheep.java
-+++ b/net/minecraft/world/entity/animal/EntitySheep.java
-@@ -50,6 +50,12 @@
- import net.minecraft.world.level.gameevent.GameEvent;
- import net.minecraft.world.level.storage.loot.LootTables;
- 
-+// CraftBukkit start
-+import net.minecraft.world.item.Item;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.event.entity.SheepRegrowWoolEvent;
-+// CraftBukkit end
-+
- public class EntitySheep extends EntityAnimal implements IShearable {
- 
-     private static final int EAT_ANIMATION_TICKS = 40;
-@@ -160,6 +166,11 @@
-                 WorldServer worldserver = (WorldServer) world;
- 
-                 if (this.readyForShearing()) {
-+                    // CraftBukkit start
-+                    if (!CraftEventFactory.handlePlayerShearEntityEvent(entityhuman, this, itemstack, enumhand)) {
-+                        return EnumInteractionResult.PASS;
-+                    }
-+                    // CraftBukkit end
-                     this.shear(worldserver, SoundCategory.PLAYERS, itemstack);
-                     this.gameEvent(GameEvent.SHEAR, entityhuman);
-                     itemstack.hurtAndBreak(1, entityhuman, getSlotForHand(enumhand));
-@@ -178,7 +189,9 @@
-         worldserver.playSound((EntityHuman) null, (Entity) this, SoundEffects.SHEEP_SHEAR, soundcategory, 1.0F, 1.0F);
-         this.dropFromShearingLootTable(worldserver, LootTables.SHEAR_SHEEP, itemstack, (worldserver1, itemstack1) -> {
-             for (int i = 0; i < itemstack1.getCount(); ++i) {
-+                this.forceDrops = true; // CraftBukkit
-                 EntityItem entityitem = this.spawnAtLocation(worldserver1, itemstack1.copyWithCount(1), 1.0F);
-+                this.forceDrops = false; // CraftBukkit
- 
-                 if (entityitem != null) {
-                     entityitem.setDeltaMovement(entityitem.getDeltaMovement().add((double) ((this.random.nextFloat() - this.random.nextFloat()) * 0.1F), (double) (this.random.nextFloat() * 0.05F), (double) ((this.random.nextFloat() - this.random.nextFloat()) * 0.1F)));
-@@ -276,6 +289,12 @@
- 
-     @Override
-     public void ate() {
-+        // CraftBukkit start
-+        SheepRegrowWoolEvent event = new SheepRegrowWoolEvent((org.bukkit.entity.Sheep) this.getBukkitEntity());
-+        this.level().getCraftServer().getPluginManager().callEvent(event);
-+
-+        if (event.isCancelled()) return;
-+        // CraftBukkit end
-         super.ate();
-         this.setSheared(false);
-         if (this.isBaby()) {
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityTurtle.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityTurtle.patch
deleted file mode 100644
index 5484958bca..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityTurtle.patch
+++ /dev/null
@@ -1,36 +0,0 @@
---- a/net/minecraft/world/entity/animal/EntityTurtle.java
-+++ b/net/minecraft/world/entity/animal/EntityTurtle.java
-@@ -310,7 +310,9 @@
-                 WorldServer worldserver = (WorldServer) world;
- 
-                 if (worldserver.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
-+                    this.forceDrops = true; // CraftBukkit
-                     this.spawnAtLocation(worldserver, Items.TURTLE_SCUTE, 1);
-+                    this.forceDrops = false; // CraftBukkit
-                 }
-             }
-         }
-@@ -339,7 +341,7 @@
- 
-     @Override
-     public void thunderHit(WorldServer worldserver, EntityLightning entitylightning) {
--        this.hurtServer(worldserver, this.damageSources().lightningBolt(), Float.MAX_VALUE);
-+        this.hurtServer(worldserver, this.damageSources().lightningBolt().customEntityDamager(entitylightning), Float.MAX_VALUE); // CraftBukkit
-     }
- 
-     @Override
-@@ -496,12 +498,14 @@
-                 } else if (this.turtle.layEggCounter > this.adjustedTickDelay(200)) {
-                     World world = this.turtle.level();
- 
-+                    if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.turtle, this.blockPos.above(), (IBlockData) Blocks.TURTLE_EGG.defaultBlockState().setValue(BlockTurtleEgg.EGGS, this.turtle.random.nextInt(4) + 1))) { // CraftBukkit
-                     world.playSound((EntityHuman) null, blockposition, SoundEffects.TURTLE_LAY_EGG, SoundCategory.BLOCKS, 0.3F, 0.9F + world.random.nextFloat() * 0.2F);
-                     BlockPosition blockposition1 = this.blockPos.above();
-                     IBlockData iblockdata = (IBlockData) Blocks.TURTLE_EGG.defaultBlockState().setValue(BlockTurtleEgg.EGGS, this.turtle.random.nextInt(4) + 1);
- 
-                     world.setBlock(blockposition1, iblockdata, 3);
-                     world.gameEvent((Holder) GameEvent.BLOCK_PLACE, blockposition1, GameEvent.a.of(this.turtle, iblockdata));
-+                    } // CraftBukkit
-                     this.turtle.setHasEgg(false);
-                     this.turtle.setLayingEgg(false);
-                     this.turtle.setInLoveTime(600);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityWolf.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityWolf.patch
deleted file mode 100644
index e29a99b4b8..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityWolf.patch
+++ /dev/null
@@ -1,105 +0,0 @@
---- a/net/minecraft/world/entity/animal/EntityWolf.java
-+++ b/net/minecraft/world/entity/animal/EntityWolf.java
-@@ -86,6 +86,13 @@
- import net.minecraft.world.level.pathfinder.PathType;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.EntityDamageEvent;
-+import org.bukkit.event.entity.EntityRegainHealthEvent;
-+import org.bukkit.event.entity.EntityTargetEvent;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+// CraftBukkit end
-+
- public class EntityWolf extends EntityTameableAnimal implements IEntityAngerable, VariantHolder<Holder<WolfVariant>> {
- 
-     private static final DataWatcherObject<Boolean> DATA_INTERESTED_ID = DataWatcher.defineId(EntityWolf.class, DataWatcherRegistry.BOOLEAN);
-@@ -345,8 +352,14 @@
-         if (this.isInvulnerableTo(worldserver, damagesource)) {
-             return false;
-         } else {
-+            // CraftBukkit start
-+            boolean result = super.hurtServer(worldserver, damagesource, f);
-+            if (!result) {
-+                return result;
-+            }
-+            // CraftBukkit end
-             this.setOrderedToSit(false);
--            return super.hurtServer(worldserver, damagesource, f);
-+            return result; // CraftBukkit
-         }
-     }
- 
-@@ -356,10 +369,15 @@
-     }
- 
-     @Override
--    protected void actuallyHurt(WorldServer worldserver, DamageSource damagesource, float f) {
-+    public boolean actuallyHurt(WorldServer worldserver, DamageSource damagesource, float f, EntityDamageEvent event) { // CraftBukkit - void -> boolean
-         if (!this.canArmorAbsorb(damagesource)) {
--            super.actuallyHurt(worldserver, damagesource, f);
-+            return super.actuallyHurt(worldserver, damagesource, f, event); // CraftBukkit
-         } else {
-+            // CraftBukkit start - SPIGOT-7815: if the damage was cancelled, no need to run the wolf armor behaviour
-+            if (event.isCancelled()) {
-+                return false;
-+            }
-+            // CraftBukkit end
-             ItemStack itemstack = this.getBodyArmorItem();
-             int i = itemstack.getDamageValue();
-             int j = itemstack.getMaxDamage();
-@@ -371,6 +389,7 @@
-             }
- 
-         }
-+        return false; // CraftBukkit
-     }
- 
-     private boolean canArmorAbsorb(DamageSource damagesource) {
-@@ -381,7 +400,7 @@
-     protected void applyTamingSideEffects() {
-         if (this.isTame()) {
-             this.getAttribute(GenericAttributes.MAX_HEALTH).setBaseValue(40.0D);
--            this.setHealth(40.0F);
-+            this.setHealth(this.getMaxHealth()); // CraftBukkit - 40.0 -> getMaxHealth()
-         } else {
-             this.getAttribute(GenericAttributes.MAX_HEALTH).setBaseValue(8.0D);
-         }
-@@ -404,7 +423,7 @@
-                 FoodInfo foodinfo = (FoodInfo) itemstack.get(DataComponents.FOOD);
-                 float f = foodinfo != null ? (float) foodinfo.nutrition() : 1.0F;
- 
--                this.heal(2.0F * f);
-+                this.heal(2.0F * f, EntityRegainHealthEvent.RegainReason.EATING); // CraftBukkit
-                 return EnumInteractionResult.SUCCESS;
-             } else {
-                 if (item instanceof ItemDye) {
-@@ -440,7 +459,9 @@
-                         if (world instanceof WorldServer) {
-                             WorldServer worldserver = (WorldServer) world;
- 
-+                            this.forceDrops = true; // CraftBukkit
-                             this.spawnAtLocation(worldserver, itemstack1);
-+                            this.forceDrops = false; // CraftBukkit
-                         }
- 
-                         return EnumInteractionResult.SUCCESS;
-@@ -459,7 +480,7 @@
-                             this.setOrderedToSit(!this.isOrderedToSit());
-                             this.jumping = false;
-                             this.navigation.stop();
--                            this.setTarget((EntityLiving) null);
-+                            this.setTarget((EntityLiving) null, EntityTargetEvent.TargetReason.FORGOT_TARGET, true); // CraftBukkit - reason
-                             return EnumInteractionResult.SUCCESS.withoutItem();
-                         } else {
-                             return enuminteractionresult;
-@@ -477,7 +498,8 @@
-     }
- 
-     private void tryToTame(EntityHuman entityhuman) {
--        if (this.random.nextInt(3) == 0) {
-+        // CraftBukkit - added event call and isCancelled check.
-+        if (this.random.nextInt(3) == 0 && !CraftEventFactory.callEntityTameEvent(this, entityhuman).isCancelled()) {
-             this.tame(entityhuman);
-             this.navigation.stop();
-             this.setTarget((EntityLiving) null);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityFox.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/Fox.java.patch
similarity index 51%
rename from paper-server/patches/sources/net/minecraft/world/entity/animal/EntityFox.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/animal/Fox.java.patch
index 2c4b0856d0..832793d2cc 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityFox.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/Fox.java.patch
@@ -1,53 +1,53 @@
---- a/net/minecraft/world/entity/animal/EntityFox.java
-+++ b/net/minecraft/world/entity/animal/EntityFox.java
-@@ -91,6 +91,10 @@
+--- a/net/minecraft/world/entity/animal/Fox.java
++++ b/net/minecraft/world/entity/animal/Fox.java
+@@ -90,6 +90,9 @@
+ import net.minecraft.world.level.gameevent.GameEvent;
  import net.minecraft.world.level.pathfinder.PathType;
- import net.minecraft.world.phys.Vec3D;
- 
+ import net.minecraft.world.phys.Vec3;
 +// CraftBukkit start
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +// CraftBukkit end
-+
- public class EntityFox extends EntityAnimal implements VariantHolder<EntityFox.Type> {
  
-     private static final DataWatcherObject<Integer> DATA_TYPE_ID = DataWatcher.defineId(EntityFox.class, DataWatcherRegistry.INT);
-@@ -503,7 +507,8 @@
-     protected void pickUpItem(WorldServer worldserver, EntityItem entityitem) {
-         ItemStack itemstack = entityitem.getItem();
+ public class Fox extends Animal implements VariantHolder<Fox.Variant> {
+ 
+@@ -503,7 +506,8 @@
+     protected void pickUpItem(ServerLevel world, ItemEntity itemEntity) {
+         ItemStack itemstack = itemEntity.getItem();
  
 -        if (this.canHoldItem(itemstack)) {
-+        if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPickupItemEvent(this, entityitem, itemstack.getCount() - 1, !this.canHoldItem(itemstack)).isCancelled()) { // CraftBukkit - call EntityPickupItemEvent
-+            itemstack = entityitem.getItem(); // CraftBukkit - update ItemStack from event
++        if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPickupItemEvent(this, itemEntity, itemstack.getCount() - 1, !this.canHoldItem(itemstack)).isCancelled()) { // CraftBukkit - call EntityPickupItemEvent
++            itemstack = itemEntity.getItem(); // CraftBukkit - update ItemStack from event
              int i = itemstack.getCount();
  
              if (i > 1) {
-@@ -515,7 +520,7 @@
-             this.setItemSlot(EnumItemSlot.MAINHAND, itemstack.split(1));
-             this.setGuaranteedDrop(EnumItemSlot.MAINHAND);
-             this.take(entityitem, itemstack.getCount());
--            entityitem.discard();
-+            entityitem.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
+@@ -515,7 +519,7 @@
+             this.setItemSlot(EquipmentSlot.MAINHAND, itemstack.split(1));
+             this.setGuaranteedDrop(EquipmentSlot.MAINHAND);
+             this.take(itemEntity, itemstack.getCount());
+-            itemEntity.discard();
++            itemEntity.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
              this.ticksSinceEaten = 0;
          }
  
-@@ -853,6 +858,16 @@
+@@ -852,7 +856,17 @@
+ 
                  if (entityplayer1 != null && entityplayer != entityplayer1) {
                      entityfox.addTrustedUUID(entityplayer1.getUUID());
-                 }
++                }
 +                // CraftBukkit start - call EntityBreedEvent
 +                entityfox.setAge(-24000);
 +                entityfox.moveTo(this.animal.getX(), this.animal.getY(), this.animal.getZ(), 0.0F, 0.0F);
 +                int experience = this.animal.getRandom().nextInt(7) + 1;
-+                org.bukkit.event.entity.EntityBreedEvent entityBreedEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityBreedEvent(entityfox, animal, partner, entityplayer, this.animal.breedItem, experience);
++                org.bukkit.event.entity.EntityBreedEvent entityBreedEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityBreedEvent(entityfox, this.animal, this.partner, entityplayer, this.animal.breedItem, experience);
 +                if (entityBreedEvent.isCancelled()) {
 +                    return;
-+                }
+                 }
 +                experience = entityBreedEvent.getExperience();
 +                // CraftBukkit end
  
                  if (entityplayer2 != null) {
-                     entityplayer2.awardStat(StatisticList.ANIMALS_BRED);
-@@ -863,12 +878,14 @@
+                     entityplayer2.awardStat(Stats.ANIMALS_BRED);
+@@ -863,12 +877,14 @@
                  this.partner.setAge(6000);
                  this.animal.resetLove();
                  this.partner.resetLove();
@@ -57,33 +57,33 @@
 +                worldserver.addFreshEntityWithPassengers(entityfox, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BREEDING); // CraftBukkit - added SpawnReason
                  this.level.broadcastEntityEvent(this.animal, (byte) 18);
                  if (worldserver.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
--                    this.level.addFreshEntity(new EntityExperienceOrb(this.level, this.animal.getX(), this.animal.getY(), this.animal.getZ(), this.animal.getRandom().nextInt(7) + 1));
+-                    this.level.addFreshEntity(new ExperienceOrb(this.level, this.animal.getX(), this.animal.getY(), this.animal.getZ(), this.animal.getRandom().nextInt(7) + 1));
 +                    // CraftBukkit start - use event experience
 +                    if (experience > 0) {
-+                        this.level.addFreshEntity(new EntityExperienceOrb(this.level, this.animal.getX(), this.animal.getY(), this.animal.getZ(), experience));
++                        this.level.addFreshEntity(new ExperienceOrb(this.level, this.animal.getX(), this.animal.getY(), this.animal.getZ(), experience));
 +                    }
 +                    // CraftBukkit end
                  }
  
              }
-@@ -1264,6 +1281,11 @@
-             int i = (Integer) iblockdata.getValue(BlockSweetBerryBush.AGE);
+@@ -1264,6 +1280,11 @@
+             int i = (Integer) state.getValue(SweetBerryBushBlock.AGE);
  
-             iblockdata.setValue(BlockSweetBerryBush.AGE, 1);
+             state.setValue(SweetBerryBushBlock.AGE, 1);
 +            // CraftBukkit start - call EntityChangeBlockEvent
-+            if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(EntityFox.this, this.blockPos, iblockdata.setValue(BlockSweetBerryBush.AGE, 1))) {
++            if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(Fox.this, this.blockPos, state.setValue(SweetBerryBushBlock.AGE, 1))) {
 +                return;
 +            }
 +            // CraftBukkit end
-             int j = 1 + EntityFox.this.level().random.nextInt(2) + (i == 3 ? 1 : 0);
-             ItemStack itemstack = EntityFox.this.getItemBySlot(EnumItemSlot.MAINHAND);
+             int j = 1 + Fox.this.level().random.nextInt(2) + (i == 3 ? 1 : 0);
+             ItemStack itemstack = Fox.this.getItemBySlot(EquipmentSlot.MAINHAND);
  
-@@ -1494,7 +1516,7 @@
+@@ -1494,7 +1515,7 @@
          }
  
-         public static EntityFox.Type byName(String s) {
--            return (EntityFox.Type) EntityFox.Type.CODEC.byName(s, (Enum) EntityFox.Type.RED);
-+            return (EntityFox.Type) EntityFox.Type.CODEC.byName(s, EntityFox.Type.RED); // CraftBukkit - decompile error
+         public static Fox.Variant byName(String name) {
+-            return (Fox.Variant) Fox.Variant.CODEC.byName(name, (Enum) Fox.Variant.RED);
++            return (Fox.Variant) Fox.Variant.CODEC.byName(name, Fox.Variant.RED); // CraftBukkit - decompile error
          }
  
-         public static EntityFox.Type byId(int i) {
+         public static Fox.Variant byId(int id) {
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/IronGolem.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/IronGolem.java.patch
new file mode 100644
index 0000000000..52c727eac4
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/IronGolem.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/entity/animal/IronGolem.java
++++ b/net/minecraft/world/entity/animal/IronGolem.java
+@@ -98,7 +98,7 @@
+     @Override
+     protected void doPush(Entity entity) {
+         if (entity instanceof Enemy && !(entity instanceof Creeper) && this.getRandom().nextInt(20) == 0) {
+-            this.setTarget((LivingEntity) entity);
++            this.setTarget((LivingEntity) entity, org.bukkit.event.entity.EntityTargetLivingEntityEvent.TargetReason.COLLISION, true); // CraftBukkit - set reason
+         }
+ 
+         super.doPush(entity);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/MushroomCow.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/MushroomCow.java.patch
new file mode 100644
index 0000000000..206b65eecb
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/MushroomCow.java.patch
@@ -0,0 +1,58 @@
+--- a/net/minecraft/world/entity/animal/MushroomCow.java
++++ b/net/minecraft/world/entity/animal/MushroomCow.java
+@@ -42,6 +42,12 @@
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import net.minecraft.world.level.storage.loot.BuiltInLootTables;
++// CraftBukkit start
++import org.bukkit.Bukkit;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.event.entity.EntityDropItemEvent;
++import org.bukkit.event.entity.EntityTransformEvent;
++// CraftBukkit end
+ 
+ public class MushroomCow extends Cow implements Shearable, VariantHolder<MushroomCow.Variant> {
+ 
+@@ -120,6 +126,11 @@
+             if (world instanceof ServerLevel) {
+                 ServerLevel worldserver = (ServerLevel) world;
+ 
++                // CraftBukkit start
++                if (!CraftEventFactory.handlePlayerShearEntityEvent(player, this, itemstack, hand)) {
++                    return InteractionResult.PASS;
++                }
++                // CraftBukkit end
+                 this.shear(worldserver, SoundSource.PLAYERS, itemstack);
+                 this.gameEvent(GameEvent.SHEAR, player);
+                 itemstack.hurtAndBreak(1, player, getSlotForHand(hand));
+@@ -163,11 +174,19 @@
+             world.sendParticles(ParticleTypes.EXPLOSION, this.getX(), this.getY(0.5D), this.getZ(), 1, 0.0D, 0.0D, 0.0D, 0.0D);
+             this.dropFromShearingLootTable(world, BuiltInLootTables.SHEAR_MOOSHROOM, shears, (worldserver1, itemstack1) -> {
+                 for (int i = 0; i < itemstack1.getCount(); ++i) {
+-                    worldserver1.addFreshEntity(new ItemEntity(this.level(), this.getX(), this.getY(1.0D), this.getZ(), itemstack1.copyWithCount(1)));
++                    // CraftBukkit start
++                    ItemEntity entityitem = new ItemEntity(this.level(), this.getX(), this.getY(1.0D), this.getZ(), itemstack1.copyWithCount(1));
++                    EntityDropItemEvent event = new EntityDropItemEvent(this.getBukkitEntity(), (org.bukkit.entity.Item) entityitem.getBukkitEntity());
++                    Bukkit.getPluginManager().callEvent(event);
++                    if (event.isCancelled()) {
++                        continue;
++                    }
++                    worldserver1.addFreshEntity(entityitem);
++                    // CraftBukkit end
+                 }
+ 
+             });
+-        });
++        }, EntityTransformEvent.TransformReason.SHEARED, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SHEARED); // CraftBukkit
+     }
+ 
+     @Override
+@@ -263,7 +282,7 @@
+         }
+ 
+         static MushroomCow.Variant byName(String name) {
+-            return (MushroomCow.Variant) MushroomCow.Variant.CODEC.byName(name, (Enum) MushroomCow.Variant.RED);
++            return (MushroomCow.Variant) MushroomCow.Variant.CODEC.byName(name, MushroomCow.Variant.RED); // CraftBukkit - decompile error
+         }
+     }
+ }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/Ocelot.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/Ocelot.java.patch
new file mode 100644
index 0000000000..1b6fb2d654
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/Ocelot.java.patch
@@ -0,0 +1,25 @@
+--- a/net/minecraft/world/entity/animal/Ocelot.java
++++ b/net/minecraft/world/entity/animal/Ocelot.java
+@@ -167,7 +167,7 @@
+         if ((this.temptGoal == null || this.temptGoal.isRunning()) && !this.isTrusting() && this.isFood(itemstack) && player.distanceToSqr((Entity) this) < 9.0D) {
+             this.usePlayerItem(player, hand, itemstack);
+             if (!this.level().isClientSide) {
+-                if (this.random.nextInt(3) == 0) {
++                if (this.random.nextInt(3) == 0 && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this, player).isCancelled()) { // CraftBukkit - added event call and isCancelled check
+                     this.setTrusting(true);
+                     this.spawnTrustingParticles(true);
+                     this.level().broadcastEntityEvent(this, (byte) 41);
+@@ -298,10 +298,10 @@
+         private final Ocelot ocelot;
+ 
+         public OcelotAvoidEntityGoal(Ocelot ocelot, Class<T> fleeFromType, float distance, double slowSpeed, double fastSpeed) {
+-            Predicate predicate = EntitySelector.NO_CREATIVE_OR_SPECTATOR;
++            // Predicate predicate = IEntitySelector.NO_CREATIVE_OR_SPECTATOR; // CraftBukkit - decompile error
+ 
+-            Objects.requireNonNull(predicate);
+-            super(ocelot, fleeFromType, distance, slowSpeed, fastSpeed, predicate::test);
++            // Objects.requireNonNull(predicate); // CraftBukkit - decompile error
++            super(ocelot, fleeFromType, distance, slowSpeed, fastSpeed, EntitySelector.NO_CREATIVE_OR_SPECTATOR::test); // CraftBukkit - decompile error
+             this.ocelot = ocelot;
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/Panda.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/Panda.java.patch
new file mode 100644
index 0000000000..9baedd821f
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/Panda.java.patch
@@ -0,0 +1,63 @@
+--- a/net/minecraft/world/entity/animal/Panda.java
++++ b/net/minecraft/world/entity/animal/Panda.java
+@@ -68,6 +68,11 @@
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import net.minecraft.world.level.storage.loot.BuiltInLootTables;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.event.entity.EntityRemoveEvent;
++import org.bukkit.event.entity.EntityTargetEvent;
++// CraftBukkit end
+ 
+ public class Panda extends Animal {
+ 
+@@ -541,14 +546,14 @@
+ 
+     @Override
+     protected void pickUpItem(ServerLevel world, ItemEntity itemEntity) {
+-        if (this.getItemBySlot(EquipmentSlot.MAINHAND).isEmpty() && Panda.canPickUpAndEat(itemEntity)) {
++        if (!CraftEventFactory.callEntityPickupItemEvent(this, itemEntity, 0, !(this.getItemBySlot(EquipmentSlot.MAINHAND).isEmpty() && Panda.canPickUpAndEat(itemEntity))).isCancelled()) { // CraftBukkit
+             this.onItemPickup(itemEntity);
+             ItemStack itemstack = itemEntity.getItem();
+ 
+             this.setItemSlot(EquipmentSlot.MAINHAND, itemstack);
+             this.setGuaranteedDrop(EquipmentSlot.MAINHAND);
+             this.take(itemEntity, itemstack.getCount());
+-            itemEntity.discard();
++            itemEntity.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
+         }
+ 
+     }
+@@ -772,7 +777,7 @@
+         }
+ 
+         public static Panda.Gene byName(String name) {
+-            return (Panda.Gene) Panda.Gene.CODEC.byName(name, (Enum) Panda.Gene.NORMAL);
++            return (Panda.Gene) Panda.Gene.CODEC.byName(name, Panda.Gene.NORMAL); // CraftBukkit - decompile error
+         }
+ 
+         public static Panda.Gene getRandom(RandomSource random) {
+@@ -876,10 +881,10 @@
+         private final Panda panda;
+ 
+         public PandaAvoidGoal(Panda panda, Class<T> fleeFromType, float distance, double slowSpeed, double fastSpeed) {
+-            Predicate predicate = EntitySelector.NO_SPECTATORS;
++            // Predicate predicate = IEntitySelector.NO_SPECTATORS;
+ 
+-            Objects.requireNonNull(predicate);
+-            super(panda, fleeFromType, distance, slowSpeed, fastSpeed, predicate::test);
++            // Objects.requireNonNull(predicate);
++            super(panda, fleeFromType, distance, slowSpeed, fastSpeed, EntitySelector.NO_SPECTATORS::test);
+             this.panda = panda;
+         }
+ 
+@@ -1116,7 +1121,7 @@
+         @Override
+         protected void alertOther(Mob mob, LivingEntity target) {
+             if (mob instanceof Panda && mob.isAggressive()) {
+-                mob.setTarget(target);
++                mob.setTarget(target, EntityTargetEvent.TargetReason.TARGET_ATTACKED_ENTITY, true); // CraftBukkit
+             }
+ 
+         }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/Parrot.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/Parrot.java.patch
new file mode 100644
index 0000000000..ac7bc8a977
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/Parrot.java.patch
@@ -0,0 +1,45 @@
+--- a/net/minecraft/world/entity/animal/Parrot.java
++++ b/net/minecraft/world/entity/animal/Parrot.java
+@@ -248,7 +248,7 @@
+             }
+ 
+             if (!this.level().isClientSide) {
+-                if (this.random.nextInt(10) == 0) {
++                if (this.random.nextInt(10) == 0 && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityTameEvent(this, player).isCancelled()) { // CraftBukkit
+                     this.tame(player);
+                     this.level().broadcastEntityEvent(this, (byte) 7);
+                 } else {
+@@ -269,7 +269,7 @@
+             }
+         } else {
+             this.usePlayerItem(player, hand, itemstack);
+-            this.addEffect(new MobEffectInstance(MobEffects.POISON, 900));
++            this.addEffect(new MobEffectInstance(MobEffects.POISON, 900), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.FOOD); // CraftBukkit
+             if (player.isCreative() || !this.isInvulnerable()) {
+                 this.hurt(this.damageSources().playerAttack(player), Float.MAX_VALUE);
+             }
+@@ -363,7 +363,7 @@
+ 
+     @Override
+     public boolean isPushable() {
+-        return true;
++        return super.isPushable(); // CraftBukkit - collidable API
+     }
+ 
+     @Override
+@@ -378,8 +378,14 @@
+         if (this.isInvulnerableTo(world, source)) {
+             return false;
+         } else {
++            // CraftBukkit start
++            boolean result = super.hurtServer(world, source, amount);
++            if (!result) {
++                return result;
++            }
++            // CraftBukkit end
+             this.setOrderedToSit(false);
+-            return super.hurtServer(world, source, amount);
++            return result; // CraftBukkit
+         }
+     }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/Pig.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/Pig.java.patch
new file mode 100644
index 0000000000..a5cdaa0866
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/Pig.java.patch
@@ -0,0 +1,29 @@
+--- a/net/minecraft/world/entity/animal/Pig.java
++++ b/net/minecraft/world/entity/animal/Pig.java
+@@ -49,6 +49,10 @@
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.phys.AABB;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.event.entity.EntityRemoveEvent;
++// CraftBukkit end
+ 
+ public class Pig extends Animal implements ItemSteerable, Saddleable {
+ 
+@@ -247,7 +251,14 @@
+                 }
+ 
+                 entitypigzombie1.setPersistenceRequired();
+-            });
++            // CraftBukkit start
++            }, null, null);
++            if (CraftEventFactory.callPigZapEvent(this, lightning, entitypigzombie).isCancelled()) {
++                return;
++            }
++            world.addFreshEntity(entitypigzombie, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.LIGHTNING);
++            this.discard(EntityRemoveEvent.Cause.TRANSFORMATION); // CraftBukkit - add Bukkit remove cause
++            // CraftBukkit end
+ 
+             if (entitypigzombie == null) {
+                 super.thunderHit(world, lightning);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/Pufferfish.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/Pufferfish.java.patch
new file mode 100644
index 0000000000..1c931c1f45
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/Pufferfish.java.patch
@@ -0,0 +1,20 @@
+--- a/net/minecraft/world/entity/animal/Pufferfish.java
++++ b/net/minecraft/world/entity/animal/Pufferfish.java
+@@ -155,7 +155,7 @@
+         int i = this.getPuffState();
+ 
+         if (target.hurtServer(world, this.damageSources().mobAttack(this), (float) (1 + i))) {
+-            target.addEffect(new MobEffectInstance(MobEffects.POISON, 60 * i, 0), this);
++            target.addEffect(new MobEffectInstance(MobEffects.POISON, 60 * i, 0), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
+             this.playSound(SoundEvents.PUFFER_FISH_STING, 1.0F, 1.0F);
+         }
+ 
+@@ -171,7 +171,7 @@
+                     entityplayer.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.PUFFER_FISH_STING, 0.0F));
+                 }
+ 
+-                player.addEffect(new MobEffectInstance(MobEffects.POISON, 60 * i, 0), this);
++                player.addEffect(new MobEffectInstance(MobEffects.POISON, 60 * i, 0), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
+             }
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityRabbit.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/Rabbit.java.patch
similarity index 52%
rename from paper-server/patches/sources/net/minecraft/world/entity/animal/EntityRabbit.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/animal/Rabbit.java.patch
index 60b150a8bf..636fd21d1e 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntityRabbit.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/Rabbit.java.patch
@@ -1,26 +1,25 @@
---- a/net/minecraft/world/entity/animal/EntityRabbit.java
-+++ b/net/minecraft/world/entity/animal/EntityRabbit.java
-@@ -66,6 +66,10 @@
- import net.minecraft.world.level.pathfinder.PathEntity;
- import net.minecraft.world.phys.Vec3D;
- 
+--- a/net/minecraft/world/entity/animal/Rabbit.java
++++ b/net/minecraft/world/entity/animal/Rabbit.java
+@@ -65,6 +65,9 @@
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import net.minecraft.world.level.pathfinder.Path;
+ import net.minecraft.world.phys.Vec3;
 +// CraftBukkit start
 +import org.bukkit.craftbukkit.event.CraftEventFactory;
 +// CraftBukkit end
-+
- public class EntityRabbit extends EntityAnimal implements VariantHolder<EntityRabbit.Variant> {
  
-     public static final double STROLL_SPEED_MOD = 0.6D;
-@@ -90,7 +94,6 @@
-         super(entitytypes, world);
-         this.jumpControl = new EntityRabbit.ControllerJumpRabbit(this);
-         this.moveControl = new EntityRabbit.ControllerMoveRabbit(this);
+ public class Rabbit extends Animal implements VariantHolder<Rabbit.Variant> {
+ 
+@@ -90,7 +93,6 @@
+         super(type, world);
+         this.jumpControl = new Rabbit.RabbitJumpControl(this);
+         this.moveControl = new Rabbit.RabbitMoveControl(this);
 -        this.setSpeedModifier(0.0D);
      }
  
      @Override
-@@ -577,9 +580,19 @@
-                     int i = (Integer) iblockdata.getValue(BlockCarrots.AGE);
+@@ -577,9 +579,19 @@
+                     int i = (Integer) iblockdata.getValue(CarrotBlock.AGE);
  
                      if (i == 0) {
 +                        // CraftBukkit start
@@ -32,10 +31,10 @@
                          world.destroyBlock(blockposition, true, this.rabbit);
                      } else {
 +                        // CraftBukkit start
-+                        if (!CraftEventFactory.callEntityChangeBlockEvent(this.rabbit, blockposition, iblockdata.setValue(BlockCarrots.AGE, i - 1))) {
++                        if (!CraftEventFactory.callEntityChangeBlockEvent(this.rabbit, blockposition, iblockdata.setValue(CarrotBlock.AGE, i - 1))) {
 +                            return;
 +                        }
 +                        // CraftBukkit end
-                         world.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockCarrots.AGE, i - 1), 2);
-                         world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, blockposition, GameEvent.a.of((Entity) this.rabbit));
+                         world.setBlock(blockposition, (BlockState) iblockdata.setValue(CarrotBlock.AGE, i - 1), 2);
+                         world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of((Entity) this.rabbit));
                          world.levelEvent(2001, blockposition, Block.getId(iblockdata));
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/Sheep.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/Sheep.java.patch
new file mode 100644
index 0000000000..e36530769d
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/Sheep.java.patch
@@ -0,0 +1,58 @@
+--- a/net/minecraft/world/entity/animal/Sheep.java
++++ b/net/minecraft/world/entity/animal/Sheep.java
+@@ -41,7 +41,6 @@
+ import net.minecraft.world.entity.ai.goal.WaterAvoidingRandomStrollGoal;
+ import net.minecraft.world.entity.item.ItemEntity;
+ import net.minecraft.world.entity.player.Player;
+-import net.minecraft.world.item.DyeColor;
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.item.Items;
+ import net.minecraft.world.level.Level;
+@@ -49,6 +48,12 @@
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import net.minecraft.world.level.storage.loot.BuiltInLootTables;
++import net.minecraft.world.item.DyeColor;
++// CraftBukkit start
++import net.minecraft.world.item.Item;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.event.entity.SheepRegrowWoolEvent;
++// CraftBukkit end
+ 
+ public class Sheep extends Animal implements Shearable {
+ 
+@@ -160,6 +165,11 @@
+                 ServerLevel worldserver = (ServerLevel) world;
+ 
+                 if (this.readyForShearing()) {
++                    // CraftBukkit start
++                    if (!CraftEventFactory.handlePlayerShearEntityEvent(player, this, itemstack, hand)) {
++                        return InteractionResult.PASS;
++                    }
++                    // CraftBukkit end
+                     this.shear(worldserver, SoundSource.PLAYERS, itemstack);
+                     this.gameEvent(GameEvent.SHEAR, player);
+                     itemstack.hurtAndBreak(1, player, getSlotForHand(hand));
+@@ -178,7 +188,9 @@
+         world.playSound((Player) null, (Entity) this, SoundEvents.SHEEP_SHEAR, shearedSoundCategory, 1.0F, 1.0F);
+         this.dropFromShearingLootTable(world, BuiltInLootTables.SHEAR_SHEEP, shears, (worldserver1, itemstack1) -> {
+             for (int i = 0; i < itemstack1.getCount(); ++i) {
++                this.forceDrops = true; // CraftBukkit
+                 ItemEntity entityitem = this.spawnAtLocation(worldserver1, itemstack1.copyWithCount(1), 1.0F);
++                this.forceDrops = false; // CraftBukkit
+ 
+                 if (entityitem != null) {
+                     entityitem.setDeltaMovement(entityitem.getDeltaMovement().add((double) ((this.random.nextFloat() - this.random.nextFloat()) * 0.1F), (double) (this.random.nextFloat() * 0.05F), (double) ((this.random.nextFloat() - this.random.nextFloat()) * 0.1F)));
+@@ -276,6 +288,12 @@
+ 
+     @Override
+     public void ate() {
++        // CraftBukkit start
++        SheepRegrowWoolEvent event = new SheepRegrowWoolEvent((org.bukkit.entity.Sheep) this.getBukkitEntity());
++        this.level().getCraftServer().getPluginManager().callEvent(event);
++
++        if (event.isCancelled()) return;
++        // CraftBukkit end
+         super.ate();
+         this.setSheared(false);
+         if (this.isBaby()) {
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/ShoulderRidingEntity.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/ShoulderRidingEntity.java.patch
new file mode 100644
index 0000000000..40307984a0
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/ShoulderRidingEntity.java.patch
@@ -0,0 +1,21 @@
+--- a/net/minecraft/world/entity/animal/ShoulderRidingEntity.java
++++ b/net/minecraft/world/entity/animal/ShoulderRidingEntity.java
+@@ -5,6 +5,9 @@
+ import net.minecraft.world.entity.EntityType;
+ import net.minecraft.world.entity.TamableAnimal;
+ import net.minecraft.world.level.Level;
++// CraftBukkit start
++import org.bukkit.event.entity.EntityRemoveEvent;
++// CraftBukkit end
+ 
+ public abstract class ShoulderRidingEntity extends TamableAnimal {
+ 
+@@ -21,7 +24,7 @@
+         nbttagcompound.putString("id", this.getEncodeId());
+         this.saveWithoutId(nbttagcompound);
+         if (player.setEntityOnShoulder(nbttagcompound)) {
+-            this.discard();
++            this.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
+             return true;
+         } else {
+             return false;
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntitySnowman.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/SnowGolem.java.patch
similarity index 51%
rename from paper-server/patches/sources/net/minecraft/world/entity/animal/EntitySnowman.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/animal/SnowGolem.java.patch
index f662758d50..18394afab0 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/EntitySnowman.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/SnowGolem.java.patch
@@ -1,27 +1,26 @@
---- a/net/minecraft/world/entity/animal/EntitySnowman.java
-+++ b/net/minecraft/world/entity/animal/EntitySnowman.java
-@@ -43,6 +43,10 @@
- import net.minecraft.world.level.storage.loot.LootTables;
- import net.minecraft.world.phys.Vec3D;
- 
+--- a/net/minecraft/world/entity/animal/SnowGolem.java
++++ b/net/minecraft/world/entity/animal/SnowGolem.java
+@@ -42,6 +42,9 @@
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import net.minecraft.world.level.storage.loot.BuiltInLootTables;
+ import net.minecraft.world.phys.Vec3;
 +// CraftBukkit start
 +import org.bukkit.craftbukkit.event.CraftEventFactory;
 +// CraftBukkit end
-+
- public class EntitySnowman extends EntityGolem implements IShearable, IRangedEntity {
  
-     private static final DataWatcherObject<Byte> DATA_PUMPKIN_ID = DataWatcher.defineId(EntitySnowman.class, DataWatcherRegistry.BYTE);
-@@ -100,7 +104,7 @@
+ public class SnowGolem extends AbstractGolem implements Shearable, RangedAttackMob {
  
-         if (world instanceof WorldServer worldserver) {
+@@ -100,7 +103,7 @@
+ 
+         if (world instanceof ServerLevel worldserver) {
              if (this.level().getBiome(this.blockPosition()).is(BiomeTags.SNOW_GOLEM_MELTS)) {
 -                this.hurtServer(worldserver, this.damageSources().onFire(), 1.0F);
 +                this.hurtServer(worldserver, this.damageSources().melting(), 1.0F); // CraftBukkit - DamageSources.ON_FIRE -> CraftEventFactory.MELTING
              }
  
              if (!worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
-@@ -116,7 +120,11 @@
-                 BlockPosition blockposition = new BlockPosition(j, k, l);
+@@ -116,7 +119,11 @@
+                 BlockPos blockposition = new BlockPos(j, k, l);
  
                  if (this.level().getBlockState(blockposition).isAir() && iblockdata.canSurvive(this.level(), blockposition)) {
 -                    this.level().setBlockAndUpdate(blockposition, iblockdata);
@@ -30,25 +29,25 @@
 +                        continue;
 +                    }
 +                    // CraftBukkit end
-                     this.level().gameEvent((Holder) GameEvent.BLOCK_PLACE, blockposition, GameEvent.a.of(this, iblockdata));
+                     this.level().gameEvent((Holder) GameEvent.BLOCK_PLACE, blockposition, GameEvent.Context.of(this, iblockdata));
                  }
              }
-@@ -153,6 +161,11 @@
-             if (world instanceof WorldServer) {
-                 WorldServer worldserver = (WorldServer) world;
+@@ -153,6 +160,11 @@
+             if (world instanceof ServerLevel) {
+                 ServerLevel worldserver = (ServerLevel) world;
  
 +                // CraftBukkit start
-+                if (!CraftEventFactory.handlePlayerShearEntityEvent(entityhuman, this, itemstack, enumhand)) {
-+                    return EnumInteractionResult.PASS;
++                if (!CraftEventFactory.handlePlayerShearEntityEvent(player, this, itemstack, hand)) {
++                    return InteractionResult.PASS;
 +                }
 +                // CraftBukkit end
-                 this.shear(worldserver, SoundCategory.PLAYERS, itemstack);
-                 this.gameEvent(GameEvent.SHEAR, entityhuman);
-                 itemstack.hurtAndBreak(1, entityhuman, getSlotForHand(enumhand));
-@@ -169,7 +182,9 @@
-         worldserver.playSound((EntityHuman) null, (Entity) this, SoundEffects.SNOW_GOLEM_SHEAR, soundcategory, 1.0F, 1.0F);
+                 this.shear(worldserver, SoundSource.PLAYERS, itemstack);
+                 this.gameEvent(GameEvent.SHEAR, player);
+                 itemstack.hurtAndBreak(1, player, getSlotForHand(hand));
+@@ -169,7 +181,9 @@
+         world.playSound((Player) null, (Entity) this, SoundEvents.SNOW_GOLEM_SHEAR, shearedSoundCategory, 1.0F, 1.0F);
          this.setPumpkin(false);
-         this.dropFromShearingLootTable(worldserver, LootTables.SHEAR_SNOW_GOLEM, itemstack, (worldserver1, itemstack1) -> {
+         this.dropFromShearingLootTable(world, BuiltInLootTables.SHEAR_SNOW_GOLEM, shears, (worldserver1, itemstack1) -> {
 +            this.forceDrops = true; // CraftBukkit
              this.spawnAtLocation(worldserver1, itemstack1, this.getEyeHeight());
 +            this.forceDrops = false; // CraftBukkit
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/Turtle.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/Turtle.java.patch
new file mode 100644
index 0000000000..5a6ee3ed21
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/Turtle.java.patch
@@ -0,0 +1,36 @@
+--- a/net/minecraft/world/entity/animal/Turtle.java
++++ b/net/minecraft/world/entity/animal/Turtle.java
+@@ -310,7 +310,9 @@
+                 ServerLevel worldserver = (ServerLevel) world;
+ 
+                 if (worldserver.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
++                    this.forceDrops = true; // CraftBukkit
+                     this.spawnAtLocation(worldserver, Items.TURTLE_SCUTE, 1);
++                    this.forceDrops = false; // CraftBukkit
+                 }
+             }
+         }
+@@ -339,7 +341,7 @@
+ 
+     @Override
+     public void thunderHit(ServerLevel world, LightningBolt lightning) {
+-        this.hurtServer(world, this.damageSources().lightningBolt(), Float.MAX_VALUE);
++        this.hurtServer(world, this.damageSources().lightningBolt().customEntityDamager(lightning), Float.MAX_VALUE); // CraftBukkit
+     }
+ 
+     @Override
+@@ -496,12 +498,14 @@
+                 } else if (this.turtle.layEggCounter > this.adjustedTickDelay(200)) {
+                     Level world = this.turtle.level();
+ 
++                    if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(this.turtle, this.blockPos.above(), (BlockState) Blocks.TURTLE_EGG.defaultBlockState().setValue(TurtleEggBlock.EGGS, this.turtle.random.nextInt(4) + 1))) { // CraftBukkit
+                     world.playSound((Player) null, blockposition, SoundEvents.TURTLE_LAY_EGG, SoundSource.BLOCKS, 0.3F, 0.9F + world.random.nextFloat() * 0.2F);
+                     BlockPos blockposition1 = this.blockPos.above();
+                     BlockState iblockdata = (BlockState) Blocks.TURTLE_EGG.defaultBlockState().setValue(TurtleEggBlock.EGGS, this.turtle.random.nextInt(4) + 1);
+ 
+                     world.setBlock(blockposition1, iblockdata, 3);
+                     world.gameEvent((Holder) GameEvent.BLOCK_PLACE, blockposition1, GameEvent.Context.of(this.turtle, iblockdata));
++                    } // CraftBukkit
+                     this.turtle.setHasEgg(false);
+                     this.turtle.setLayingEgg(false);
+                     this.turtle.setInLoveTime(600);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/Wolf.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/Wolf.java.patch
new file mode 100644
index 0000000000..550b440f16
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/Wolf.java.patch
@@ -0,0 +1,111 @@
+--- a/net/minecraft/world/entity/animal/Wolf.java
++++ b/net/minecraft/world/entity/animal/Wolf.java
+@@ -85,6 +85,12 @@
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import net.minecraft.world.level.pathfinder.PathType;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import org.bukkit.event.entity.EntityDamageEvent;
++import org.bukkit.event.entity.EntityRegainHealthEvent;
++import org.bukkit.event.entity.EntityTargetEvent;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++// CraftBukkit end
+ 
+ public class Wolf extends TamableAnimal implements NeutralMob, VariantHolder<Holder<WolfVariant>> {
+ 
+@@ -345,8 +351,14 @@
+         if (this.isInvulnerableTo(world, source)) {
+             return false;
+         } else {
++            // CraftBukkit start
++            boolean result = super.hurtServer(world, source, amount);
++            if (!result) {
++                return result;
++            }
++            // CraftBukkit end
+             this.setOrderedToSit(false);
+-            return super.hurtServer(world, source, amount);
++            return result; // CraftBukkit
+         }
+     }
+ 
+@@ -356,21 +368,27 @@
+     }
+ 
+     @Override
+-    protected void actuallyHurt(ServerLevel world, DamageSource source, float amount) {
+-        if (!this.canArmorAbsorb(source)) {
+-            super.actuallyHurt(world, source, amount);
++    public boolean actuallyHurt(ServerLevel worldserver, DamageSource damagesource, float f, EntityDamageEvent event) { // CraftBukkit - void -> boolean
++        if (!this.canArmorAbsorb(damagesource)) {
++            return super.actuallyHurt(worldserver, damagesource, f, event); // CraftBukkit
+         } else {
++            // CraftBukkit start - SPIGOT-7815: if the damage was cancelled, no need to run the wolf armor behaviour
++            if (event.isCancelled()) {
++                return false;
++            }
++            // CraftBukkit end
+             ItemStack itemstack = this.getBodyArmorItem();
+             int i = itemstack.getDamageValue();
+             int j = itemstack.getMaxDamage();
+ 
+-            itemstack.hurtAndBreak(Mth.ceil(amount), this, EquipmentSlot.BODY);
++            itemstack.hurtAndBreak(Mth.ceil(f), this, EquipmentSlot.BODY);
+             if (Crackiness.WOLF_ARMOR.byDamage(i, j) != Crackiness.WOLF_ARMOR.byDamage(this.getBodyArmorItem())) {
+                 this.playSound(SoundEvents.WOLF_ARMOR_CRACK);
+-                world.sendParticles(new ItemParticleOption(ParticleTypes.ITEM, Items.ARMADILLO_SCUTE.getDefaultInstance()), this.getX(), this.getY() + 1.0D, this.getZ(), 20, 0.2D, 0.1D, 0.2D, 0.1D);
++                worldserver.sendParticles(new ItemParticleOption(ParticleTypes.ITEM, Items.ARMADILLO_SCUTE.getDefaultInstance()), this.getX(), this.getY() + 1.0D, this.getZ(), 20, 0.2D, 0.1D, 0.2D, 0.1D);
+             }
+ 
+         }
++        return false; // CraftBukkit
+     }
+ 
+     private boolean canArmorAbsorb(DamageSource source) {
+@@ -381,7 +399,7 @@
+     protected void applyTamingSideEffects() {
+         if (this.isTame()) {
+             this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(40.0D);
+-            this.setHealth(40.0F);
++            this.setHealth(this.getMaxHealth()); // CraftBukkit - 40.0 -> getMaxHealth()
+         } else {
+             this.getAttribute(Attributes.MAX_HEALTH).setBaseValue(8.0D);
+         }
+@@ -404,7 +422,7 @@
+                 FoodProperties foodinfo = (FoodProperties) itemstack.get(DataComponents.FOOD);
+                 float f = foodinfo != null ? (float) foodinfo.nutrition() : 1.0F;
+ 
+-                this.heal(2.0F * f);
++                this.heal(2.0F * f, EntityRegainHealthEvent.RegainReason.EATING); // CraftBukkit
+                 return InteractionResult.SUCCESS;
+             } else {
+                 if (item instanceof DyeItem) {
+@@ -440,7 +458,9 @@
+                         if (world instanceof ServerLevel) {
+                             ServerLevel worldserver = (ServerLevel) world;
+ 
++                            this.forceDrops = true; // CraftBukkit
+                             this.spawnAtLocation(worldserver, itemstack1);
++                            this.forceDrops = false; // CraftBukkit
+                         }
+ 
+                         return InteractionResult.SUCCESS;
+@@ -459,7 +479,7 @@
+                             this.setOrderedToSit(!this.isOrderedToSit());
+                             this.jumping = false;
+                             this.navigation.stop();
+-                            this.setTarget((LivingEntity) null);
++                            this.setTarget((LivingEntity) null, EntityTargetEvent.TargetReason.FORGOT_TARGET, true); // CraftBukkit - reason
+                             return InteractionResult.SUCCESS.withoutItem();
+                         } else {
+                             return enuminteractionresult;
+@@ -477,7 +497,8 @@
+     }
+ 
+     private void tryToTame(Player player) {
+-        if (this.random.nextInt(3) == 0) {
++        // CraftBukkit - added event call and isCancelled check.
++        if (this.random.nextInt(3) == 0 && !CraftEventFactory.callEntityTameEvent(this, player).isCancelled()) {
+             this.tame(player);
+             this.navigation.stop();
+             this.setTarget((LivingEntity) null);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/allay/Allay.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/allay/Allay.java.patch
similarity index 60%
rename from paper-server/patches/sources/net/minecraft/world/entity/animal/allay/Allay.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/animal/allay/Allay.java.patch
index 4f81cea4a4..8428a6cf72 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/allay/Allay.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/allay/Allay.java.patch
@@ -6,30 +6,30 @@
      private float spinningAnimationTicks0;
 +    public boolean forceDancing = false; // CraftBukkit
  
-     public Allay(EntityTypes<? extends Allay> entitytypes, World world) {
-         super(entitytypes, world);
-@@ -114,6 +115,12 @@
-         this.dynamicJukeboxListener = new DynamicGameEventListener<>(new Allay.a(this.vibrationUser.getPositionSource(), ((GameEvent) GameEvent.JUKEBOX_PLAY.value()).notificationRadius()));
+     public Allay(EntityType<? extends Allay> type, Level world) {
+         super(type, world);
+@@ -113,6 +114,12 @@
+         this.dynamicVibrationListener = new DynamicGameEventListener<>(new VibrationSystem.Listener(this));
+         this.dynamicJukeboxListener = new DynamicGameEventListener<>(new Allay.JukeboxListener(this.vibrationUser.getPositionSource(), ((GameEvent) GameEvent.JUKEBOX_PLAY.value()).notificationRadius()));
      }
- 
++
 +    // CraftBukkit start
 +    public void setCanDuplicate(boolean canDuplicate) {
 +        this.entityData.set(Allay.DATA_CAN_DUPLICATE, canDuplicate);
 +    }
 +    // CraftBukkit end
-+
+ 
      @Override
-     protected BehaviorController.b<Allay> brainProvider() {
-         return BehaviorController.provider(Allay.MEMORY_TYPES, Allay.SENSOR_TYPES);
+     protected Brain.Provider<Allay> brainProvider() {
 @@ -126,7 +133,7 @@
  
      @Override
-     public BehaviorController<Allay> getBrain() {
+     public Brain<Allay> getBrain() {
 -        return super.getBrain();
-+        return (BehaviorController<Allay>) super.getBrain(); // CraftBukkit - decompile error
++        return (Brain<Allay>) super.getBrain(); // CraftBukkit - decompile error
      }
  
-     public static AttributeProvider.Builder createAttributes() {
+     public static AttributeSupplier.Builder createAttributes() {
 @@ -233,7 +240,7 @@
      public void aiStep() {
          super.aiStep();
@@ -40,28 +40,28 @@
  
          if (this.isDancing() && this.shouldStopDancing() && this.tickCount % 20 == 0) {
 @@ -303,7 +310,12 @@
-         ItemStack itemstack1 = this.getItemInHand(EnumHand.MAIN_HAND);
+         ItemStack itemstack1 = this.getItemInHand(InteractionHand.MAIN_HAND);
  
-         if (this.isDancing() && itemstack.is(TagsItem.DUPLICATES_ALLAYS) && this.canDuplicate()) {
+         if (this.isDancing() && itemstack.is(ItemTags.DUPLICATES_ALLAYS) && this.canDuplicate()) {
 -            this.duplicateAllay();
 +            // CraftBukkit start - handle cancel duplication
 +            Allay allay = this.duplicateAllay();
 +            if (allay == null) {
-+                return EnumInteractionResult.SUCCESS;
++                return InteractionResult.SUCCESS;
 +            }
 +            // CraftBukkit end
              this.level().broadcastEntityEvent(this, (byte) 18);
-             this.level().playSound(entityhuman, (Entity) this, SoundEffects.AMETHYST_BLOCK_CHIME, SoundCategory.NEUTRAL, 2.0F, 1.0F);
-             this.removeInteractionItem(entityhuman, itemstack);
+             this.level().playSound(player, (Entity) this, SoundEvents.AMETHYST_BLOCK_CHIME, SoundSource.NEUTRAL, 2.0F, 1.0F);
+             this.removeInteractionItem(player, itemstack);
 @@ -314,7 +326,7 @@
-             this.setItemInHand(EnumHand.MAIN_HAND, itemstack2);
-             this.removeInteractionItem(entityhuman, itemstack);
-             this.level().playSound(entityhuman, (Entity) this, SoundEffects.ALLAY_ITEM_GIVEN, SoundCategory.NEUTRAL, 2.0F, 1.0F);
--            this.getBrain().setMemory(MemoryModuleType.LIKED_PLAYER, (Object) entityhuman.getUUID());
-+            this.getBrain().setMemory(MemoryModuleType.LIKED_PLAYER, entityhuman.getUUID()); // CraftBukkit - decompile error
-             return EnumInteractionResult.SUCCESS;
-         } else if (!itemstack1.isEmpty() && enumhand == EnumHand.MAIN_HAND && itemstack.isEmpty()) {
-             this.setItemSlot(EnumItemSlot.MAINHAND, ItemStack.EMPTY);
+             this.setItemInHand(InteractionHand.MAIN_HAND, itemstack2);
+             this.removeInteractionItem(player, itemstack);
+             this.level().playSound(player, (Entity) this, SoundEvents.ALLAY_ITEM_GIVEN, SoundSource.NEUTRAL, 2.0F, 1.0F);
+-            this.getBrain().setMemory(MemoryModuleType.LIKED_PLAYER, (Object) player.getUUID());
++            this.getBrain().setMemory(MemoryModuleType.LIKED_PLAYER, player.getUUID()); // CraftBukkit - decompile error
+             return InteractionResult.SUCCESS;
+         } else if (!itemstack1.isEmpty() && hand == InteractionHand.MAIN_HAND && itemstack.isEmpty()) {
+             this.setItemSlot(EquipmentSlot.MAINHAND, ItemStack.EMPTY);
 @@ -415,6 +427,7 @@
      }
  
@@ -76,7 +76,7 @@
  
 -    public void duplicateAllay() {
 +    public Allay duplicateAllay() { // CraftBukkit - return allay
-         Allay allay = (Allay) EntityTypes.ALLAY.create(this.level(), EntitySpawnReason.BREEDING);
+         Allay allay = (Allay) EntityType.ALLAY.create(this.level(), EntitySpawnReason.BREEDING);
  
          if (allay != null) {
 @@ -514,9 +527,9 @@
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/armadillo/Armadillo.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/armadillo/Armadillo.java.patch
new file mode 100644
index 0000000000..2e72adb5ea
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/armadillo/Armadillo.java.patch
@@ -0,0 +1,81 @@
+--- a/net/minecraft/world/entity/animal/armadillo/Armadillo.java
++++ b/net/minecraft/world/entity/animal/armadillo/Armadillo.java
+@@ -47,6 +47,9 @@
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import net.minecraft.world.level.storage.loot.BuiltInLootTables;
++// CraftBukkit start
++import org.bukkit.event.entity.EntityDamageEvent;
++// CraftBukkit end
+ 
+ public class Armadillo extends Animal {
+ 
+@@ -135,16 +138,18 @@
+         ProfilerFiller gameprofilerfiller = Profiler.get();
+ 
+         gameprofilerfiller.push("armadilloBrain");
+-        this.brain.tick(world, this);
++        ((Brain<Armadillo>) this.brain).tick(world, this); // CraftBukkit - decompile error
+         gameprofilerfiller.pop();
+         gameprofilerfiller.push("armadilloActivityUpdate");
+         ArmadilloAi.updateActivity(this);
+         gameprofilerfiller.pop();
+         if (this.isAlive() && !this.isBaby() && --this.scuteTime <= 0) {
++            this.forceDrops = true; // CraftBukkit
+             if (this.dropFromGiftLootTable(world, BuiltInLootTables.ARMADILLO_SHED, this::spawnAtLocation)) {
+                 this.playSound(SoundEvents.ARMADILLO_SCUTE_DROP, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
+                 this.gameEvent(GameEvent.ENTITY_PLACE);
+             }
++            this.forceDrops = false; // CraftBukkit
+ 
+             this.scuteTime = this.pickNextScuteDropTime();
+         }
+@@ -291,19 +296,25 @@
+     }
+ 
+     @Override
+-    protected void actuallyHurt(ServerLevel world, DamageSource source, float amount) {
+-        super.actuallyHurt(world, source, amount);
++    // CraftBukkit start - void -> boolean
++    public boolean actuallyHurt(ServerLevel worldserver, DamageSource damagesource, float f, EntityDamageEvent event) {
++        boolean damageResult = super.actuallyHurt(worldserver, damagesource, f, event);
++        if (!damageResult) {
++            return false;
++        }
++        // CraftBukkit end
+         if (!this.isNoAi() && !this.isDeadOrDying()) {
+-            if (source.getEntity() instanceof LivingEntity) {
++            if (damagesource.getEntity() instanceof LivingEntity) {
+                 this.getBrain().setMemoryWithExpiry(MemoryModuleType.DANGER_DETECTED_RECENTLY, true, 80L);
+                 if (this.canStayRolledUp()) {
+                     this.rollUp();
+                 }
+-            } else if (source.is(DamageTypeTags.PANIC_ENVIRONMENTAL_CAUSES)) {
++            } else if (damagesource.is(DamageTypeTags.PANIC_ENVIRONMENTAL_CAUSES)) {
+                 this.rollOut();
+             }
+ 
+         }
++        return true; // CraftBukkit
+     }
+ 
+     @Override
+@@ -327,7 +338,9 @@
+             if (world instanceof ServerLevel) {
+                 ServerLevel worldserver = (ServerLevel) world;
+ 
++                this.forceDrops = true; // CraftBukkit
+                 this.spawnAtLocation(worldserver, new ItemStack(Items.ARMADILLO_SCUTE));
++                this.forceDrops = false; // CraftBukkit
+                 this.gameEvent(GameEvent.ENTITY_INTERACT);
+                 this.playSound(SoundEvents.ARMADILLO_BRUSH);
+             }
+@@ -431,7 +444,7 @@
+         }
+ 
+         public static Armadillo.ArmadilloState fromName(String name) {
+-            return (Armadillo.ArmadilloState) Armadillo.ArmadilloState.CODEC.byName(name, (Enum) Armadillo.ArmadilloState.IDLE);
++            return (Armadillo.ArmadilloState) Armadillo.ArmadilloState.CODEC.byName(name, Armadillo.ArmadilloState.IDLE); // CraftBukkit - decompile error
+         }
+ 
+         @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/armadillo/Armadillo.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/armadillo/Armadillo.patch
deleted file mode 100644
index 8187e9f14e..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/armadillo/Armadillo.patch
+++ /dev/null
@@ -1,76 +0,0 @@
---- a/net/minecraft/world/entity/animal/armadillo/Armadillo.java
-+++ b/net/minecraft/world/entity/animal/armadillo/Armadillo.java
-@@ -48,6 +48,10 @@
- import net.minecraft.world.level.gameevent.GameEvent;
- import net.minecraft.world.level.storage.loot.LootTables;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.EntityDamageEvent;
-+// CraftBukkit end
-+
- public class Armadillo extends EntityAnimal {
- 
-     public static final float BABY_SCALE = 0.6F;
-@@ -135,16 +139,18 @@
-         GameProfilerFiller gameprofilerfiller = Profiler.get();
- 
-         gameprofilerfiller.push("armadilloBrain");
--        this.brain.tick(worldserver, this);
-+        ((BehaviorController<Armadillo>) this.brain).tick(worldserver, this); // CraftBukkit - decompile error
-         gameprofilerfiller.pop();
-         gameprofilerfiller.push("armadilloActivityUpdate");
-         ArmadilloAi.updateActivity(this);
-         gameprofilerfiller.pop();
-         if (this.isAlive() && !this.isBaby() && --this.scuteTime <= 0) {
-+            this.forceDrops = true; // CraftBukkit
-             if (this.dropFromGiftLootTable(worldserver, LootTables.ARMADILLO_SHED, this::spawnAtLocation)) {
-                 this.playSound(SoundEffects.ARMADILLO_SCUTE_DROP, 1.0F, (this.random.nextFloat() - this.random.nextFloat()) * 0.2F + 1.0F);
-                 this.gameEvent(GameEvent.ENTITY_PLACE);
-             }
-+            this.forceDrops = false; // CraftBukkit
- 
-             this.scuteTime = this.pickNextScuteDropTime();
-         }
-@@ -291,8 +297,13 @@
-     }
- 
-     @Override
--    protected void actuallyHurt(WorldServer worldserver, DamageSource damagesource, float f) {
--        super.actuallyHurt(worldserver, damagesource, f);
-+    // CraftBukkit start - void -> boolean
-+    public boolean actuallyHurt(WorldServer worldserver, DamageSource damagesource, float f, EntityDamageEvent event) {
-+        boolean damageResult = super.actuallyHurt(worldserver, damagesource, f, event);
-+        if (!damageResult) {
-+            return false;
-+        }
-+        // CraftBukkit end
-         if (!this.isNoAi() && !this.isDeadOrDying()) {
-             if (damagesource.getEntity() instanceof EntityLiving) {
-                 this.getBrain().setMemoryWithExpiry(MemoryModuleType.DANGER_DETECTED_RECENTLY, true, 80L);
-@@ -304,6 +315,7 @@
-             }
- 
-         }
-+        return true; // CraftBukkit
-     }
- 
-     @Override
-@@ -327,7 +339,9 @@
-             if (world instanceof WorldServer) {
-                 WorldServer worldserver = (WorldServer) world;
- 
-+                this.forceDrops = true; // CraftBukkit
-                 this.spawnAtLocation(worldserver, new ItemStack(Items.ARMADILLO_SCUTE));
-+                this.forceDrops = false; // CraftBukkit
-                 this.gameEvent(GameEvent.ENTITY_INTERACT);
-                 this.playSound(SoundEffects.ARMADILLO_BRUSH);
-             }
-@@ -431,7 +445,7 @@
-         }
- 
-         public static Armadillo.a fromName(String s) {
--            return (Armadillo.a) Armadillo.a.CODEC.byName(s, (Enum) Armadillo.a.IDLE);
-+            return (Armadillo.a) Armadillo.a.CODEC.byName(s, Armadillo.a.IDLE); // CraftBukkit - decompile error
-         }
- 
-         @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/axolotl/Axolotl.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/axolotl/Axolotl.java.patch
similarity index 71%
rename from paper-server/patches/sources/net/minecraft/world/entity/animal/axolotl/Axolotl.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/animal/axolotl/Axolotl.java.patch
index b975228524..0b468a3add 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/axolotl/Axolotl.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/axolotl/Axolotl.java.patch
@@ -2,12 +2,12 @@
 +++ b/net/minecraft/world/entity/animal/axolotl/Axolotl.java
 @@ -67,10 +67,17 @@
  
- public class Axolotl extends EntityAnimal implements VariantHolder<Axolotl.Variant>, Bucketable {
+ public class Axolotl extends Animal implements VariantHolder<Axolotl.Variant>, Bucketable {
  
 +    // CraftBukkit start - SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
 +    @Override
 +    public int getDefaultMaxAirSupply() {
-+        return AXOLOTL_TOTAL_AIR_SUPPLY;
++        return Axolotl.AXOLOTL_TOTAL_AIR_SUPPLY;
 +    }
 +    // CraftBukkit end
      public static final int TOTAL_PLAYDEAD_TIME = 200;
@@ -16,15 +16,15 @@
 -    protected static final ImmutableList<? extends MemoryModuleType<?>> MEMORY_TYPES = ImmutableList.of(MemoryModuleType.BREED_TARGET, MemoryModuleType.NEAREST_LIVING_ENTITIES, MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES, MemoryModuleType.NEAREST_VISIBLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_ATTACKABLE_PLAYER, MemoryModuleType.LOOK_TARGET, MemoryModuleType.WALK_TARGET, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.PATH, MemoryModuleType.ATTACK_TARGET, MemoryModuleType.ATTACK_COOLING_DOWN, MemoryModuleType.NEAREST_VISIBLE_ADULT, new MemoryModuleType[]{MemoryModuleType.HURT_BY_ENTITY, MemoryModuleType.PLAY_DEAD_TICKS, MemoryModuleType.NEAREST_ATTACKABLE, MemoryModuleType.TEMPTING_PLAYER, MemoryModuleType.TEMPTATION_COOLDOWN_TICKS, MemoryModuleType.IS_TEMPTED, MemoryModuleType.HAS_HUNTING_COOLDOWN, MemoryModuleType.IS_PANICKING});
 +    // CraftBukkit - decompile error
 +    protected static final ImmutableList<? extends MemoryModuleType<?>> MEMORY_TYPES = ImmutableList.<MemoryModuleType<?>>of(MemoryModuleType.BREED_TARGET, MemoryModuleType.NEAREST_LIVING_ENTITIES, MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES, MemoryModuleType.NEAREST_VISIBLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_ATTACKABLE_PLAYER, MemoryModuleType.LOOK_TARGET, MemoryModuleType.WALK_TARGET, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.PATH, MemoryModuleType.ATTACK_TARGET, MemoryModuleType.ATTACK_COOLING_DOWN, MemoryModuleType.NEAREST_VISIBLE_ADULT, new MemoryModuleType[]{MemoryModuleType.HURT_BY_ENTITY, MemoryModuleType.PLAY_DEAD_TICKS, MemoryModuleType.NEAREST_ATTACKABLE, MemoryModuleType.TEMPTING_PLAYER, MemoryModuleType.TEMPTATION_COOLDOWN_TICKS, MemoryModuleType.IS_TEMPTED, MemoryModuleType.HAS_HUNTING_COOLDOWN, MemoryModuleType.IS_PANICKING});
-     private static final DataWatcherObject<Integer> DATA_VARIANT = DataWatcher.defineId(Axolotl.class, DataWatcherRegistry.INT);
-     private static final DataWatcherObject<Boolean> DATA_PLAYING_DEAD = DataWatcher.defineId(Axolotl.class, DataWatcherRegistry.BOOLEAN);
-     private static final DataWatcherObject<Boolean> FROM_BUCKET = DataWatcher.defineId(Axolotl.class, DataWatcherRegistry.BOOLEAN);
+     private static final EntityDataAccessor<Integer> DATA_VARIANT = SynchedEntityData.defineId(Axolotl.class, EntityDataSerializers.INT);
+     private static final EntityDataAccessor<Boolean> DATA_PLAYING_DEAD = SynchedEntityData.defineId(Axolotl.class, EntityDataSerializers.BOOLEAN);
+     private static final EntityDataAccessor<Boolean> FROM_BUCKET = SynchedEntityData.defineId(Axolotl.class, EntityDataSerializers.BOOLEAN);
 @@ -210,7 +217,7 @@
  
      @Override
      public int getMaxAirSupply() {
 -        return 6000;
-+        return maxAirTicks; // CraftBukkit - SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
++        return this.maxAirTicks; // CraftBukkit - SPIGOT-6907: re-implement LivingEntity#setMaximumAir()
      }
  
      @Override
@@ -32,17 +32,17 @@
              int i = mobeffect != null ? mobeffect.getDuration() : 0;
              int j = Math.min(2400, 100 + i);
  
--            entityhuman.addEffect(new MobEffect(MobEffects.REGENERATION, j, 0), this);
-+            entityhuman.addEffect(new MobEffect(MobEffects.REGENERATION, j, 0), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.AXOLOTL); // CraftBukkit
+-            player.addEffect(new MobEffectInstance(MobEffects.REGENERATION, j, 0), this);
++            player.addEffect(new MobEffectInstance(MobEffects.REGENERATION, j, 0), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.AXOLOTL); // CraftBukkit
          }
  
-         entityhuman.removeEffect(MobEffects.DIG_SLOWDOWN);
+         player.removeEffect(MobEffects.DIG_SLOWDOWN);
 @@ -464,7 +471,7 @@
  
      @Override
-     public BehaviorController<Axolotl> getBrain() {
+     public Brain<Axolotl> getBrain() {
 -        return super.getBrain();
-+        return (BehaviorController<Axolotl>) super.getBrain(); // CraftBukkit - decompile error
++        return (Brain<Axolotl>) super.getBrain(); // CraftBukkit - decompile error
      }
  
      @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/camel/Camel.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/camel/Camel.java.patch
new file mode 100644
index 0000000000..43f1e0aa95
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/camel/Camel.java.patch
@@ -0,0 +1,39 @@
+--- a/net/minecraft/world/entity/animal/camel/Camel.java
++++ b/net/minecraft/world/entity/animal/camel/Camel.java
+@@ -49,6 +49,9 @@
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import net.minecraft.world.phys.Vec2;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import org.bukkit.event.entity.EntityDamageEvent;
++// CraftBukkit end
+ 
+ public class Camel extends AbstractHorse {
+ 
+@@ -143,7 +146,7 @@
+         ProfilerFiller gameprofilerfiller = Profiler.get();
+ 
+         gameprofilerfiller.push("camelBrain");
+-        Brain<?> behaviorcontroller = this.getBrain();
++        Brain<Camel> behaviorcontroller = (Brain<Camel>) this.getBrain(); // CraftBukkit - decompile error
+ 
+         behaviorcontroller.tick(world, this);
+         gameprofilerfiller.pop();
+@@ -454,9 +457,15 @@
+     }
+ 
+     @Override
+-    protected void actuallyHurt(ServerLevel world, DamageSource source, float amount) {
++    // CraftBukkit start - void -> boolean
++    public boolean actuallyHurt(ServerLevel worldserver, DamageSource damagesource, float f, EntityDamageEvent event) {
++        boolean damageResult = super.actuallyHurt(worldserver, damagesource, f, event);
++        if (!damageResult) {
++            return false;
++        }
++        // CraftBukkit end
+         this.standUpInstantly();
+-        super.actuallyHurt(world, source, amount);
++        return true; // CraftBukkit
+     }
+ 
+     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/camel/Camel.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/camel/Camel.patch
deleted file mode 100644
index 1c78bcdbab..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/camel/Camel.patch
+++ /dev/null
@@ -1,40 +0,0 @@
---- a/net/minecraft/world/entity/animal/camel/Camel.java
-+++ b/net/minecraft/world/entity/animal/camel/Camel.java
-@@ -50,6 +50,10 @@
- import net.minecraft.world.phys.Vec2F;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.EntityDamageEvent;
-+// CraftBukkit end
-+
- public class Camel extends EntityHorseAbstract {
- 
-     public static final float BABY_SCALE = 0.45F;
-@@ -143,7 +147,7 @@
-         GameProfilerFiller gameprofilerfiller = Profiler.get();
- 
-         gameprofilerfiller.push("camelBrain");
--        BehaviorController<?> behaviorcontroller = this.getBrain();
-+        BehaviorController<Camel> behaviorcontroller = (BehaviorController<Camel>) this.getBrain(); // CraftBukkit - decompile error
- 
-         behaviorcontroller.tick(worldserver, this);
-         gameprofilerfiller.pop();
-@@ -454,9 +458,15 @@
-     }
- 
-     @Override
--    protected void actuallyHurt(WorldServer worldserver, DamageSource damagesource, float f) {
-+    // CraftBukkit start - void -> boolean
-+    public boolean actuallyHurt(WorldServer worldserver, DamageSource damagesource, float f, EntityDamageEvent event) {
-+        boolean damageResult = super.actuallyHurt(worldserver, damagesource, f, event);
-+        if (!damageResult) {
-+            return false;
-+        }
-+        // CraftBukkit end
-         this.standUpInstantly();
--        super.actuallyHurt(worldserver, damagesource, f);
-+        return true; // CraftBukkit
-     }
- 
-     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/frog/ShootTongue.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/frog/ShootTongue.java.patch
similarity index 60%
rename from paper-server/patches/sources/net/minecraft/world/entity/animal/frog/ShootTongue.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/animal/frog/ShootTongue.java.patch
index 00ad10cb2e..354d8a45c5 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/frog/ShootTongue.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/frog/ShootTongue.java.patch
@@ -1,40 +1,39 @@
 --- a/net/minecraft/world/entity/animal/frog/ShootTongue.java
 +++ b/net/minecraft/world/entity/animal/frog/ShootTongue.java
-@@ -20,6 +20,10 @@
- import net.minecraft.world.level.pathfinder.PathEntity;
- import net.minecraft.world.phys.Vec3D;
- 
+@@ -19,6 +19,9 @@
+ import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.level.pathfinder.Path;
+ import net.minecraft.world.phys.Vec3;
 +// CraftBukkit start
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +// CraftBukkit end
-+
+ 
  public class ShootTongue extends Behavior<Frog> {
  
-     public static final int TIME_OUT_DURATION = 100;
-@@ -64,7 +68,7 @@
+@@ -64,7 +67,7 @@
  
-         BehaviorUtil.lookAtEntity(frog, entityliving);
+         BehaviorUtils.lookAtEntity(frog, entityliving);
          frog.setTongueTarget(entityliving);
--        frog.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (Object) (new MemoryTarget(entityliving.position(), 2.0F, 0)));
-+        frog.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (new MemoryTarget(entityliving.position(), 2.0F, 0))); // CraftBukkit - decompile error
+-        frog.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (Object) (new WalkTarget(entityliving.position(), 2.0F, 0)));
++        frog.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (new WalkTarget(entityliving.position(), 2.0F, 0))); // CraftBukkit - decompile error
          this.calculatePathCounter = 10;
-         this.state = ShootTongue.a.MOVE_TO_TARGET;
+         this.state = ShootTongue.State.MOVE_TO_TARGET;
      }
-@@ -85,7 +89,7 @@
+@@ -85,7 +88,7 @@
              if (entity.isAlive()) {
-                 frog.doHurtTarget(worldserver, entity);
+                 frog.doHurtTarget(world, entity);
                  if (!entity.isAlive()) {
 -                    entity.remove(Entity.RemovalReason.KILLED);
 +                    entity.remove(Entity.RemovalReason.KILLED, EntityRemoveEvent.Cause.DEATH); // CraftBukkit - add Bukkit remove cause
                  }
              }
          }
-@@ -106,7 +110,7 @@
+@@ -106,7 +109,7 @@
                      this.eatAnimationTimer = 0;
-                     this.state = ShootTongue.a.CATCH_ANIMATION;
+                     this.state = ShootTongue.State.CATCH_ANIMATION;
                  } else if (this.calculatePathCounter <= 0) {
--                    frog.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (Object) (new MemoryTarget(entityliving.position(), 2.0F, 0)));
-+                    frog.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (new MemoryTarget(entityliving.position(), 2.0F, 0))); // CraftBukkit - decompile error
+-                    frog.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (Object) (new WalkTarget(entityliving.position(), 2.0F, 0)));
++                    frog.getBrain().setMemory(MemoryModuleType.WALK_TARGET, (new WalkTarget(entityliving.position(), 2.0F, 0))); // CraftBukkit - decompile error
                      this.calculatePathCounter = 10;
                  } else {
                      --this.calculatePathCounter;
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/frog/Tadpole.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/frog/Tadpole.java.patch
similarity index 60%
rename from paper-server/patches/sources/net/minecraft/world/entity/animal/frog/Tadpole.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/animal/frog/Tadpole.java.patch
index d8295126db..b9bde411e8 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/frog/Tadpole.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/frog/Tadpole.java.patch
@@ -3,22 +3,22 @@
 @@ -74,7 +74,7 @@
  
      @Override
-     public BehaviorController<Tadpole> getBrain() {
+     public Brain<Tadpole> getBrain() {
 -        return super.getBrain();
-+        return (BehaviorController<Tadpole>) super.getBrain(); // CraftBukkit - decompile error
++        return (Brain<Tadpole>) super.getBrain(); // CraftBukkit - decompile error
      }
  
      @Override
 @@ -225,12 +225,17 @@
-         World world = this.level();
+         Level world = this.level();
  
-         if (world instanceof WorldServer worldserver) {
--            this.convertTo(EntityTypes.FROG, ConversionParams.single(this, false, false), (frog) -> {
-+            Frog converted = this.convertTo(EntityTypes.FROG, ConversionParams.single(this, false, false), (frog) -> { // CraftBukkit
-                 frog.finalizeSpawn(worldserver, this.level().getCurrentDifficultyAt(frog.blockPosition()), EntitySpawnReason.CONVERSION, (GroupDataEntity) null);
+         if (world instanceof ServerLevel worldserver) {
+-            this.convertTo(EntityType.FROG, ConversionParams.single(this, false, false), (frog) -> {
++            Frog converted = this.convertTo(EntityType.FROG, ConversionParams.single(this, false, false), (frog) -> { // CraftBukkit
+                 frog.finalizeSpawn(worldserver, this.level().getCurrentDifficultyAt(frog.blockPosition()), EntitySpawnReason.CONVERSION, (SpawnGroupData) null);
                  frog.setPersistenceRequired();
                  frog.fudgePositionAfterSizeChange(this.getDimensions(this.getPose()));
-                 this.playSound(SoundEffects.TADPOLE_GROW_UP, 0.15F, 1.0F);
+                 this.playSound(SoundEvents.TADPOLE_GROW_UP, 0.15F, 1.0F);
 -            });
 +            // CraftBukkit start
 +            }, org.bukkit.event.entity.EntityTransformEvent.TransformReason.METAMORPHOSIS, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.METAMORPHOSIS);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/goat/Goat.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/goat/Goat.java.patch
new file mode 100644
index 0000000000..f1f22ff036
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/goat/Goat.java.patch
@@ -0,0 +1,40 @@
+--- a/net/minecraft/world/entity/animal/goat/Goat.java
++++ b/net/minecraft/world/entity/animal/goat/Goat.java
+@@ -53,6 +53,11 @@
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.level.pathfinder.PathType;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.craftbukkit.inventory.CraftItemStack;
++import org.bukkit.event.player.PlayerBucketFillEvent;
++// CraftBukkit end
+ 
+ public class Goat extends Animal {
+ 
+@@ -184,7 +189,7 @@
+ 
+     @Override
+     public Brain<Goat> getBrain() {
+-        return super.getBrain();
++        return (Brain<Goat>) super.getBrain(); // CraftBukkit - decompile error
+     }
+ 
+     @Override
+@@ -229,8 +234,15 @@
+         ItemStack itemstack = player.getItemInHand(hand);
+ 
+         if (itemstack.is(Items.BUCKET) && !this.isBaby()) {
++            // CraftBukkit start - Got milk?
++            PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent((ServerLevel) player.level(), player, this.blockPosition(), this.blockPosition(), null, itemstack, Items.MILK_BUCKET, hand);
++
++            if (event.isCancelled()) {
++                return InteractionResult.PASS;
++            }
++            // CraftBukkit end
+             player.playSound(this.getMilkingSound(), 1.0F, 1.0F);
+-            ItemStack itemstack1 = ItemUtils.createFilledResult(itemstack, player, Items.MILK_BUCKET.getDefaultInstance());
++            ItemStack itemstack1 = ItemUtils.createFilledResult(itemstack, player, CraftItemStack.asNMSCopy(event.getItemStack())); // CraftBukkit
+ 
+             player.setItemInHand(hand, itemstack1);
+             return InteractionResult.SUCCESS;
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/goat/Goat.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/goat/Goat.patch
deleted file mode 100644
index fa246c2f2d..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/goat/Goat.patch
+++ /dev/null
@@ -1,41 +0,0 @@
---- a/net/minecraft/world/entity/animal/goat/Goat.java
-+++ b/net/minecraft/world/entity/animal/goat/Goat.java
-@@ -54,6 +54,12 @@
- import net.minecraft.world.level.pathfinder.PathType;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.craftbukkit.inventory.CraftItemStack;
-+import org.bukkit.event.player.PlayerBucketFillEvent;
-+// CraftBukkit end
-+
- public class Goat extends EntityAnimal {
- 
-     public static final EntitySize LONG_JUMPING_DIMENSIONS = EntitySize.scalable(0.9F, 1.3F).scale(0.7F);
-@@ -184,7 +190,7 @@
- 
-     @Override
-     public BehaviorController<Goat> getBrain() {
--        return super.getBrain();
-+        return (BehaviorController<Goat>) super.getBrain(); // CraftBukkit - decompile error
-     }
- 
-     @Override
-@@ -229,8 +235,15 @@
-         ItemStack itemstack = entityhuman.getItemInHand(enumhand);
- 
-         if (itemstack.is(Items.BUCKET) && !this.isBaby()) {
-+            // CraftBukkit start - Got milk?
-+            PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent((WorldServer) entityhuman.level(), entityhuman, this.blockPosition(), this.blockPosition(), null, itemstack, Items.MILK_BUCKET, enumhand);
-+
-+            if (event.isCancelled()) {
-+                return EnumInteractionResult.PASS;
-+            }
-+            // CraftBukkit end
-             entityhuman.playSound(this.getMilkingSound(), 1.0F, 1.0F);
--            ItemStack itemstack1 = ItemLiquidUtil.createFilledResult(itemstack, entityhuman, Items.MILK_BUCKET.getDefaultInstance());
-+            ItemStack itemstack1 = ItemLiquidUtil.createFilledResult(itemstack, entityhuman, CraftItemStack.asNMSCopy(event.getItemStack())); // CraftBukkit
- 
-             entityhuman.setItemInHand(enumhand, itemstack1);
-             return EnumInteractionResult.SUCCESS;
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/horse/EntityHorseAbstract.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/horse/AbstractHorse.java.patch
similarity index 58%
rename from paper-server/patches/sources/net/minecraft/world/entity/animal/horse/EntityHorseAbstract.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/animal/horse/AbstractHorse.java.patch
index 6857727453..bc28b5165b 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/horse/EntityHorseAbstract.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/horse/AbstractHorse.java.patch
@@ -1,7 +1,7 @@
---- a/net/minecraft/world/entity/animal/horse/EntityHorseAbstract.java
-+++ b/net/minecraft/world/entity/animal/horse/EntityHorseAbstract.java
-@@ -79,6 +79,18 @@
- import net.minecraft.world.phys.Vec3D;
+--- a/net/minecraft/world/entity/animal/horse/AbstractHorse.java
++++ b/net/minecraft/world/entity/animal/horse/AbstractHorse.java
+@@ -79,6 +79,17 @@
+ import net.minecraft.world.phys.Vec3;
  import net.minecraft.world.ticks.ContainerSingleItem;
  
 +// CraftBukkit start
@@ -10,19 +10,19 @@
 +import org.bukkit.Location;
 +import org.bukkit.craftbukkit.entity.CraftHumanEntity;
 +import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.entity.AbstractHorse;
 +import org.bukkit.entity.HumanEntity;
 +import org.bukkit.event.entity.EntityRegainHealthEvent;
 +import org.bukkit.inventory.InventoryHolder;
 +// CraftBukkit end
 +
- public abstract class EntityHorseAbstract extends EntityAnimal implements IInventoryListener, HasCustomInventoryScreen, OwnableEntity, IJumpable, ISaddleable {
+ public abstract class AbstractHorse extends Animal implements ContainerListener, HasCustomInventoryScreen, OwnableEntity, PlayerRideableJumping, Saddleable {
  
      public static final int EQUIPMENT_SLOT_OFFSET = 400;
-@@ -167,7 +179,53 @@
-         public boolean stillValid(EntityHuman entityhuman) {
-             return entityhuman.getVehicle() == EntityHorseAbstract.this || entityhuman.canInteractWithEntity((Entity) EntityHorseAbstract.this, 4.0D);
-         }
+@@ -166,8 +177,54 @@
+         @Override
+         public boolean stillValid(Player player) {
+             return player.getVehicle() == AbstractHorse.this || player.canInteractWithEntity((Entity) AbstractHorse.this, 4.0D);
++        }
 +
 +        // CraftBukkit start - add fields and methods
 +        public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
@@ -35,54 +35,54 @@
 +
 +        @Override
 +        public void onOpen(CraftHumanEntity who) {
-+            transaction.add(who);
++            this.transaction.add(who);
 +        }
 +
 +        @Override
 +        public void onClose(CraftHumanEntity who) {
-+            transaction.remove(who);
++            this.transaction.remove(who);
 +        }
 +
 +        @Override
 +        public List<HumanEntity> getViewers() {
-+            return transaction;
++            return this.transaction;
 +        }
 +
 +        @Override
 +        public int getMaxStackSize() {
-+            return maxStack;
++            return this.maxStack;
 +        }
 +
 +        @Override
 +        public void setMaxStackSize(int size) {
-+            maxStack = size;
++            this.maxStack = size;
 +        }
 +
 +        @Override
 +        public InventoryHolder getOwner() {
-+            return (AbstractHorse) EntityHorseAbstract.this.getBukkitEntity();
++            return (org.bukkit.entity.AbstractHorse) AbstractHorse.this.getBukkitEntity();
 +        }
 +
 +        @Override
 +        public Location getLocation() {
-+            return EntityHorseAbstract.this.getBukkitEntity().getLocation();
-+        }
++            return AbstractHorse.this.getBukkitEntity().getLocation();
+         }
 +        // CraftBukkit end
      };
 +    public int maxDomestication = 100; // CraftBukkit - store max domestication value
  
-     protected EntityHorseAbstract(EntityTypes<? extends EntityHorseAbstract> entitytypes, World world) {
-         super(entitytypes, world);
-@@ -366,7 +424,7 @@
+     protected AbstractHorse(EntityType<? extends AbstractHorse> type, Level world) {
+         super(type, world);
+@@ -366,7 +423,7 @@
      public void createInventory() {
-         InventorySubcontainer inventorysubcontainer = this.inventory;
+         SimpleContainer inventorysubcontainer = this.inventory;
  
--        this.inventory = new InventorySubcontainer(this.getInventorySize());
-+        this.inventory = new InventorySubcontainer(this.getInventorySize(), (AbstractHorse) this.getBukkitEntity()); // CraftBukkit
+-        this.inventory = new SimpleContainer(this.getInventorySize());
++        this.inventory = new SimpleContainer(this.getInventorySize(), (org.bukkit.entity.AbstractHorse) this.getBukkitEntity()); // CraftBukkit
          if (inventorysubcontainer != null) {
              inventorysubcontainer.removeListener(this);
              int i = Math.min(inventorysubcontainer.getContainerSize(), this.inventory.getContainerSize());
-@@ -470,7 +528,7 @@
+@@ -470,7 +527,7 @@
      }
  
      public int getMaxTemper() {
@@ -91,7 +91,7 @@
      }
  
      @Override
-@@ -541,7 +599,7 @@
+@@ -541,7 +598,7 @@
          }
  
          if (this.getHealth() < this.getMaxHealth() && f > 0.0F) {
@@ -100,8 +100,8 @@
              flag = true;
          }
  
-@@ -618,7 +676,7 @@
-         if (world instanceof WorldServer worldserver) {
+@@ -618,7 +675,7 @@
+         if (world instanceof ServerLevel worldserver) {
              if (this.isAlive()) {
                  if (this.random.nextInt(900) == 0 && this.deathTime == 0) {
 -                    this.heal(1.0F);
@@ -109,36 +109,36 @@
                  }
  
                  if (this.canEatGrass()) {
-@@ -883,6 +941,7 @@
+@@ -883,6 +940,7 @@
          if (this.getOwnerUUID() != null) {
-             nbttagcompound.putUUID("Owner", this.getOwnerUUID());
+             nbt.putUUID("Owner", this.getOwnerUUID());
          }
-+        nbttagcompound.putInt("Bukkit.MaxDomestication", this.maxDomestication); // CraftBukkit
++        nbt.putInt("Bukkit.MaxDomestication", this.maxDomestication); // CraftBukkit
  
          if (!this.inventory.getItem(0).isEmpty()) {
-             nbttagcompound.put("SaddleItem", this.inventory.getItem(0).save(this.registryAccess()));
-@@ -910,6 +969,11 @@
+             nbt.put("SaddleItem", this.inventory.getItem(0).save(this.registryAccess()));
+@@ -910,6 +968,11 @@
          if (uuid != null) {
              this.setOwnerUUID(uuid);
          }
 +        // CraftBukkit start
-+        if (nbttagcompound.contains("Bukkit.MaxDomestication")) {
-+            this.maxDomestication = nbttagcompound.getInt("Bukkit.MaxDomestication");
++        if (nbt.contains("Bukkit.MaxDomestication")) {
++            this.maxDomestication = nbt.getInt("Bukkit.MaxDomestication");
 +        }
 +        // CraftBukkit end
  
-         if (nbttagcompound.contains("SaddleItem", 10)) {
-             ItemStack itemstack = (ItemStack) ItemStack.parse(this.registryAccess(), nbttagcompound.getCompound("SaddleItem")).orElse(ItemStack.EMPTY);
-@@ -1012,6 +1076,17 @@
+         if (nbt.contains("SaddleItem", 10)) {
+             ItemStack itemstack = (ItemStack) ItemStack.parse(this.registryAccess(), nbt.getCompound("SaddleItem")).orElse(ItemStack.EMPTY);
+@@ -1012,6 +1075,17 @@
  
      @Override
-     public void handleStartJump(int i) {
+     public void handleStartJump(int height) {
 +        // CraftBukkit start
 +        float power;
-+        if (i >= 90) {
++        if (height >= 90) {
 +            power = 1.0F;
 +        } else {
-+            power = 0.4F + 0.4F * (float) i / 90.0F;
++            power = 0.4F + 0.4F * (float) height / 90.0F;
 +        }
 +        if (!CraftEventFactory.callHorseJumpEvent(this, power)) {
 +            return;
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/horse/EntityHorseSkeleton.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/horse/EntityHorseSkeleton.patch
deleted file mode 100644
index b63cd24319..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/horse/EntityHorseSkeleton.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/net/minecraft/world/entity/animal/horse/EntityHorseSkeleton.java
-+++ b/net/minecraft/world/entity/animal/horse/EntityHorseSkeleton.java
-@@ -27,6 +27,10 @@
- import net.minecraft.world.level.GeneratorAccess;
- import net.minecraft.world.level.World;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+// CraftBukkit end
-+
- public class EntityHorseSkeleton extends EntityHorseAbstract {
- 
-     private final PathfinderGoalHorseTrap skeletonTrapGoal = new PathfinderGoalHorseTrap(this);
-@@ -122,7 +126,7 @@
-     public void aiStep() {
-         super.aiStep();
-         if (this.isTrap() && this.trapTime++ >= 18000) {
--            this.discard();
-+            this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
-         }
- 
-     }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/horse/EntityLlama.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/horse/EntityLlama.patch
deleted file mode 100644
index edd02d7ad7..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/horse/EntityLlama.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/net/minecraft/world/entity/animal/horse/EntityLlama.java
-+++ b/net/minecraft/world/entity/animal/horse/EntityLlama.java
-@@ -82,6 +82,11 @@
-         return false;
-     }
- 
-+    // CraftBukkit start
-+    public void setStrengthPublic(int i) {
-+        this.setStrength(i);
-+    }
-+    // CraftBukkit end
-     private void setStrength(int i) {
-         this.entityData.set(EntityLlama.DATA_STRENGTH_ID, Math.max(1, Math.min(5, i)));
-     }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/horse/Llama.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/horse/Llama.java.patch
new file mode 100644
index 0000000000..0abd6bf0a6
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/horse/Llama.java.patch
@@ -0,0 +1,14 @@
+--- a/net/minecraft/world/entity/animal/horse/Llama.java
++++ b/net/minecraft/world/entity/animal/horse/Llama.java
+@@ -82,6 +82,11 @@
+         return false;
+     }
+ 
++    // CraftBukkit start
++    public void setStrengthPublic(int i) {
++        this.setStrength(i);
++    }
++    // CraftBukkit end
+     private void setStrength(int strength) {
+         this.entityData.set(Llama.DATA_STRENGTH_ID, Math.max(1, Math.min(5, strength)));
+     }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/horse/SkeletonHorse.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/horse/SkeletonHorse.java.patch
new file mode 100644
index 0000000000..a0ae868b36
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/horse/SkeletonHorse.java.patch
@@ -0,0 +1,21 @@
+--- a/net/minecraft/world/entity/animal/horse/SkeletonHorse.java
++++ b/net/minecraft/world/entity/animal/horse/SkeletonHorse.java
+@@ -26,6 +26,9 @@
+ import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.LevelAccessor;
++// CraftBukkit start
++import org.bukkit.event.entity.EntityRemoveEvent;
++// CraftBukkit end
+ 
+ public class SkeletonHorse extends AbstractHorse {
+ 
+@@ -122,7 +125,7 @@
+     public void aiStep() {
+         super.aiStep();
+         if (this.isTrap() && this.trapTime++ >= 18000) {
+-            this.discard();
++            this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
+         }
+ 
+     }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/horse/PathfinderGoalHorseTrap.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java.patch
similarity index 79%
rename from paper-server/patches/sources/net/minecraft/world/entity/animal/horse/PathfinderGoalHorseTrap.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java.patch
index d004aa1439..25fb150bd1 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/horse/PathfinderGoalHorseTrap.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java.patch
@@ -1,12 +1,12 @@
---- a/net/minecraft/world/entity/animal/horse/PathfinderGoalHorseTrap.java
-+++ b/net/minecraft/world/entity/animal/horse/PathfinderGoalHorseTrap.java
+--- a/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java
++++ b/net/minecraft/world/entity/animal/horse/SkeletonTrapGoal.java
 @@ -43,12 +43,12 @@
          if (entitylightning != null) {
              entitylightning.moveTo(this.horse.getX(), this.horse.getY(), this.horse.getZ());
              entitylightning.setVisualOnly(true);
 -            worldserver.addFreshEntity(entitylightning);
 +            worldserver.strikeLightning(entitylightning, org.bukkit.event.weather.LightningStrikeEvent.Cause.TRAP); // CraftBukkit
-             EntitySkeleton entityskeleton = this.createSkeleton(difficultydamagescaler, this.horse);
+             Skeleton entityskeleton = this.createSkeleton(difficultydamagescaler, this.horse);
  
              if (entityskeleton != null) {
                  entityskeleton.startRiding(this.horse);
@@ -14,7 +14,7 @@
 +                worldserver.addFreshEntityWithPassengers(entityskeleton, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.TRAP); // CraftBukkit
  
                  for (int i = 0; i < 3; ++i) {
-                     EntityHorseAbstract entityhorseabstract = this.createHorse(difficultydamagescaler);
+                     AbstractHorse entityhorseabstract = this.createHorse(difficultydamagescaler);
 @@ -59,7 +59,7 @@
                          if (entityskeleton1 != null) {
                              entityskeleton1.startRiding(entityhorseabstract);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/horse/EntityLlamaTrader.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/horse/TraderLlama.java.patch
similarity index 57%
rename from paper-server/patches/sources/net/minecraft/world/entity/animal/horse/EntityLlamaTrader.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/animal/horse/TraderLlama.java.patch
index 0c8602cd25..1edf3cd1bd 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/horse/EntityLlamaTrader.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/horse/TraderLlama.java.patch
@@ -1,18 +1,17 @@
---- a/net/minecraft/world/entity/animal/horse/EntityLlamaTrader.java
-+++ b/net/minecraft/world/entity/animal/horse/EntityLlamaTrader.java
-@@ -22,6 +22,10 @@
- import net.minecraft.world.level.World;
- import net.minecraft.world.level.WorldAccess;
- 
+--- a/net/minecraft/world/entity/animal/horse/TraderLlama.java
++++ b/net/minecraft/world/entity/animal/horse/TraderLlama.java
+@@ -21,6 +21,9 @@
+ import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.ServerLevelAccessor;
 +// CraftBukkit start
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +// CraftBukkit end
-+
- public class EntityLlamaTrader extends EntityLlama {
  
-     private int despawnDelay = 47999;
-@@ -94,7 +98,7 @@
-             this.despawnDelay = this.isLeashedToWanderingTrader() ? ((EntityVillagerTrader) this.getLeashHolder()).getDespawnDelay() - 1 : this.despawnDelay - 1;
+ public class TraderLlama extends Llama {
+ 
+@@ -94,7 +97,7 @@
+             this.despawnDelay = this.isLeashedToWanderingTrader() ? ((WanderingTrader) this.getLeashHolder()).getDespawnDelay() - 1 : this.despawnDelay - 1;
              if (this.despawnDelay <= 0) {
                  this.removeLeash();
 -                this.discard();
@@ -20,7 +19,7 @@
              }
  
          }
-@@ -160,7 +164,7 @@
+@@ -160,7 +163,7 @@
  
          @Override
          public void start() {
@@ -28,4 +27,4 @@
 +            this.mob.setTarget(this.ownerLastHurtBy, org.bukkit.event.entity.EntityTargetEvent.TargetReason.TARGET_ATTACKED_OWNER, true); // CraftBukkit
              Entity entity = this.llama.getLeashHolder();
  
-             if (entity instanceof EntityVillagerTrader) {
+             if (entity instanceof WanderingTrader) {
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/animal/sniffer/Sniffer.patch b/paper-server/patches/sources/net/minecraft/world/entity/animal/sniffer/Sniffer.java.patch
similarity index 77%
rename from paper-server/patches/sources/net/minecraft/world/entity/animal/sniffer/Sniffer.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/animal/sniffer/Sniffer.java.patch
index a100d9df99..82028f86b3 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/animal/sniffer/Sniffer.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/animal/sniffer/Sniffer.java.patch
@@ -1,8 +1,8 @@
 --- a/net/minecraft/world/entity/animal/sniffer/Sniffer.java
 +++ b/net/minecraft/world/entity/animal/sniffer/Sniffer.java
 @@ -267,6 +267,13 @@
-                 this.dropFromGiftLootTable(worldserver, LootTables.SNIFFER_DIGGING, (worldserver1, itemstack) -> {
-                     EntityItem entityitem = new EntityItem(this.level(), (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), itemstack);
+                 this.dropFromGiftLootTable(worldserver, BuiltInLootTables.SNIFFER_DIGGING, (worldserver1, itemstack) -> {
+                     ItemEntity entityitem = new ItemEntity(this.level(), (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), itemstack);
  
 +                    // CraftBukkit start - handle EntityDropItemEvent
 +                    org.bukkit.event.entity.EntityDropItemEvent event = new org.bukkit.event.entity.EntityDropItemEvent(this.getBukkitEntity(), (org.bukkit.entity.Item) entityitem.getBukkitEntity());
@@ -17,7 +17,7 @@
 @@ -308,7 +315,7 @@
          List<GlobalPos> list = (List) this.getExploredPositions().limit(20L).collect(Collectors.toList());
  
-         list.add(0, GlobalPos.of(this.level().dimension(), blockposition));
+         list.add(0, GlobalPos.of(this.level().dimension(), pos));
 -        this.getBrain().setMemory(MemoryModuleType.SNIFFER_EXPLORED_POSITIONS, (Object) list);
 +        this.getBrain().setMemory(MemoryModuleType.SNIFFER_EXPLORED_POSITIONS, list); // CraftBukkit - decompile error
          return this;
@@ -26,9 +26,9 @@
 @@ -444,7 +451,7 @@
  
      @Override
-     public BehaviorController<Sniffer> getBrain() {
+     public Brain<Sniffer> getBrain() {
 -        return super.getBrain();
-+        return (BehaviorController<Sniffer>) super.getBrain(); // CraftBukkit - decompile error
++        return (Brain<Sniffer>) super.getBrain(); // CraftBukkit - decompile error
      }
  
      @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/EntityEnderCrystal.patch b/paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java.patch
similarity index 52%
rename from paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/EntityEnderCrystal.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java.patch
index 1bc0b773ef..bbf50c3986 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/EntityEnderCrystal.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java.patch
@@ -1,45 +1,44 @@
---- a/net/minecraft/world/entity/boss/enderdragon/EntityEnderCrystal.java
-+++ b/net/minecraft/world/entity/boss/enderdragon/EntityEnderCrystal.java
-@@ -20,6 +20,12 @@
- import net.minecraft.world.level.block.BlockFireAbstract;
- import net.minecraft.world.level.dimension.end.EnderDragonBattle;
- 
+--- a/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java
++++ b/net/minecraft/world/entity/boss/enderdragon/EndCrystal.java
+@@ -19,6 +19,11 @@
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.block.BaseFireBlock;
+ import net.minecraft.world.level.dimension.end.EndDragonFight;
 +// CraftBukkit start
 +import org.bukkit.craftbukkit.event.CraftEventFactory;
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +import org.bukkit.event.entity.ExplosionPrimeEvent;
 +// CraftBukkit end
-+
- public class EntityEnderCrystal extends Entity {
  
-     private static final DataWatcherObject<Optional<BlockPosition>> DATA_BEAM_TARGET = DataWatcher.defineId(EntityEnderCrystal.class, DataWatcherRegistry.OPTIONAL_BLOCK_POS);
-@@ -57,7 +63,11 @@
-             BlockPosition blockposition = this.blockPosition();
+ public class EndCrystal extends Entity {
  
-             if (((WorldServer) this.level()).getDragonFight() != null && this.level().getBlockState(blockposition).isAir()) {
--                this.level().setBlockAndUpdate(blockposition, BlockFireAbstract.getState(this.level(), blockposition));
+@@ -57,7 +62,11 @@
+             BlockPos blockposition = this.blockPosition();
+ 
+             if (((ServerLevel) this.level()).getDragonFight() != null && this.level().getBlockState(blockposition).isAir()) {
+-                this.level().setBlockAndUpdate(blockposition, BaseFireBlock.getState(this.level(), blockposition));
 +                // CraftBukkit start
 +                if (!CraftEventFactory.callBlockIgniteEvent(this.level(), blockposition, this).isCancelled()) {
-+                    this.level().setBlockAndUpdate(blockposition, BlockFireAbstract.getState(this.level(), blockposition));
++                    this.level().setBlockAndUpdate(blockposition, BaseFireBlock.getState(this.level(), blockposition));
 +                }
 +                // CraftBukkit end
              }
          }
  
-@@ -99,12 +109,26 @@
+@@ -99,12 +108,26 @@
              return false;
          } else {
              if (!this.isRemoved()) {
 -                this.remove(Entity.RemovalReason.KILLED);
 +                // CraftBukkit start - All non-living entities need this
-+                if (CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f, false)) {
++                if (CraftEventFactory.handleNonLivingEntityDamageEvent(this, source, amount, false)) {
 +                    return false;
 +                }
 +                // CraftBukkit end
-                 if (!damagesource.is(DamageTypeTags.IS_EXPLOSION)) {
-                     DamageSource damagesource1 = damagesource.getEntity() != null ? this.damageSources().explosion(this, damagesource.getEntity()) : null;
+                 if (!source.is(DamageTypeTags.IS_EXPLOSION)) {
+                     DamageSource damagesource1 = source.getEntity() != null ? this.damageSources().explosion(this, source.getEntity()) : null;
  
--                    worldserver.explode(this, damagesource1, (ExplosionDamageCalculator) null, this.getX(), this.getY(), this.getZ(), 6.0F, false, World.a.BLOCK);
+-                    world.explode(this, damagesource1, (ExplosionDamageCalculator) null, this.getX(), this.getY(), this.getZ(), 6.0F, false, Level.ExplosionInteraction.BLOCK);
 +                    // CraftBukkit start
 +                    ExplosionPrimeEvent event = CraftEventFactory.callExplosionPrimeEvent(this, 6.0F, false);
 +                    if (event.isCancelled()) {
@@ -47,11 +46,11 @@
 +                    }
 +
 +                    this.remove(Entity.RemovalReason.KILLED, EntityRemoveEvent.Cause.EXPLODE); // CraftBukkit - add Bukkit remove cause
-+                    worldserver.explode(this, damagesource1, (ExplosionDamageCalculator) null, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), World.a.BLOCK);
++                    world.explode(this, damagesource1, (ExplosionDamageCalculator) null, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.BLOCK);
 +                } else {
 +                    this.remove(Entity.RemovalReason.KILLED, EntityRemoveEvent.Cause.DEATH); // CraftBukkit - add Bukkit remove cause
                  }
 +                // CraftBukkit end
  
-                 this.onDestroyedBy(worldserver, damagesource);
+                 this.onDestroyedBy(world, source);
              }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.patch b/paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java.patch
similarity index 56%
rename from paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java.patch
index d98583e7f2..0e4dc8d073 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java.patch
@@ -1,54 +1,71 @@
---- a/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java
-+++ b/net/minecraft/world/entity/boss/enderdragon/EntityEnderDragon.java
-@@ -52,6 +52,22 @@
- import net.minecraft.world.phys.Vec3D;
- import org.slf4j.Logger;
- 
+--- a/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
++++ b/net/minecraft/world/entity/boss/enderdragon/EnderDragon.java
+@@ -37,20 +37,35 @@
+ import net.minecraft.world.entity.boss.enderdragon.phases.EnderDragonPhaseManager;
+ import net.minecraft.world.entity.monster.Enemy;
+ import net.minecraft.world.entity.player.Player;
+-import net.minecraft.world.item.enchantment.EnchantmentHelper;
+ import net.minecraft.world.level.GameRules;
+ import net.minecraft.world.level.Level;
+-import net.minecraft.world.level.block.state.BlockState;
+-import net.minecraft.world.level.dimension.end.EndDragonFight;
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import net.minecraft.world.level.levelgen.Heightmap;
+ import net.minecraft.world.level.levelgen.feature.EndPodiumFeature;
+ import net.minecraft.world.level.pathfinder.BinaryHeap;
+ import net.minecraft.world.level.pathfinder.Node;
+ import net.minecraft.world.level.pathfinder.Path;
++import org.slf4j.Logger;
++
 +// CraftBukkit start
 +import net.minecraft.world.item.ItemStack;
++import net.minecraft.world.item.enchantment.EnchantmentHelper;
 +import net.minecraft.world.level.Explosion;
 +import net.minecraft.world.level.ServerExplosion;
 +import net.minecraft.world.level.block.Block;
-+import net.minecraft.world.level.block.entity.TileEntity;
++import net.minecraft.world.level.block.entity.BlockEntity;
++import net.minecraft.world.level.block.state.BlockState;
++import net.minecraft.world.level.dimension.end.EndDragonFight;
 +import net.minecraft.world.level.storage.loot.LootParams;
-+import net.minecraft.world.level.storage.loot.LootTableInfo;
-+import net.minecraft.world.level.storage.loot.parameters.LootContextParameters;
++import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
+ import net.minecraft.world.phys.AABB;
+ import net.minecraft.world.phys.Vec3;
+-import org.slf4j.Logger;
 +import org.bukkit.craftbukkit.block.CraftBlock;
 +import org.bukkit.event.entity.EntityExplodeEvent;
 +import org.bukkit.event.entity.EntityRegainHealthEvent;
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +import org.bukkit.craftbukkit.event.CraftEventFactory;
 +// CraftBukkit end
-+
- public class EntityEnderDragon extends EntityInsentient implements IMonster {
  
-     private static final Logger LOGGER = LogUtils.getLogger();
-@@ -88,6 +104,7 @@
-     private final PathPoint[] nodes;
+ public class EnderDragon extends Mob implements Enemy {
+ 
+@@ -88,6 +103,7 @@
+     private final Node[] nodes;
      private final int[] nodeAdjacency;
-     private final Path openSet;
+     private final BinaryHeap openSet;
 +    private final Explosion explosionSource; // CraftBukkit - reusable source for CraftTNTPrimed.getSource()
  
-     public EntityEnderDragon(EntityTypes<? extends EntityEnderDragon> entitytypes, World world) {
-         super(EntityTypes.ENDER_DRAGON, world);
-@@ -108,6 +125,7 @@
+     public EnderDragon(EntityType<? extends EnderDragon> entitytypes, Level world) {
+         super(EntityType.ENDER_DRAGON, world);
+@@ -108,6 +124,7 @@
          this.setHealth(this.getMaxHealth());
          this.noPhysics = true;
-         this.phaseManager = new DragonControllerManager(this);
-+        this.explosionSource = new ServerExplosion(world.getMinecraftWorld(), this, null, null, new Vec3D(Double.NaN, Double.NaN, Double.NaN), Float.NaN, true, Explosion.Effect.DESTROY); // CraftBukkit
+         this.phaseManager = new EnderDragonPhaseManager(this);
++        this.explosionSource = new ServerExplosion(world.getMinecraftWorld(), this, null, null, new Vec3(Double.NaN, Double.NaN, Double.NaN), Float.NaN, true, Explosion.BlockInteraction.DESTROY); // CraftBukkit
      }
  
-     public void setDragonFight(EnderDragonBattle enderdragonbattle) {
-@@ -218,7 +236,7 @@
+     public void setDragonFight(EndDragonFight fight) {
+@@ -218,7 +235,7 @@
  
-                     Vec3D vec3d1 = idragoncontroller.getFlyTargetLocation();
+                     Vec3 vec3d1 = idragoncontroller.getFlyTargetLocation();
  
 -                    if (vec3d1 != null) {
-+                    if (vec3d1 != null && idragoncontroller.getPhase() != DragonControllerPhase.HOVERING) { // CraftBukkit - Don't move when hovering
++                    if (vec3d1 != null && idragoncontroller.getPhase() != EnderDragonPhase.HOVERING) { // CraftBukkit - Don't move when hovering
                          double d0 = vec3d1.x - this.getX();
                          double d1 = vec3d1.y - this.getY();
                          double d2 = vec3d1.z - this.getZ();
-@@ -379,7 +397,14 @@
+@@ -379,7 +396,14 @@
              if (this.nearestCrystal.isRemoved()) {
                  this.nearestCrystal = null;
              } else if (this.tickCount % 10 == 0 && this.getHealth() < this.getMaxHealth()) {
@@ -64,8 +81,8 @@
              }
          }
  
-@@ -458,6 +483,9 @@
-         int j1 = MathHelper.floor(axisalignedbb.maxZ);
+@@ -458,6 +482,9 @@
+         int j1 = Mth.floor(box.maxZ);
          boolean flag = false;
          boolean flag1 = false;
 +        // CraftBukkit start - Create a list to hold all the destroyed blocks
@@ -74,30 +91,31 @@
  
          for (int k1 = i; k1 <= l; ++k1) {
              for (int l1 = j; l1 <= i1; ++l1) {
-@@ -467,7 +495,11 @@
+@@ -467,14 +494,61 @@
  
-                     if (!iblockdata.isAir() && !iblockdata.is(TagsBlock.DRAGON_TRANSPARENT)) {
-                         if (worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && !iblockdata.is(TagsBlock.DRAGON_IMMUNE)) {
--                            flag1 = worldserver.removeBlock(blockposition, false) || flag1;
+                     if (!iblockdata.isAir() && !iblockdata.is(BlockTags.DRAGON_TRANSPARENT)) {
+                         if (world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && !iblockdata.is(BlockTags.DRAGON_IMMUNE)) {
+-                            flag1 = world.removeBlock(blockposition, false) || flag1;
 +                            // CraftBukkit start - Add blocks to list rather than destroying them
 +                            // flag1 = worldserver.removeBlock(blockposition, false) || flag1;
 +                            flag1 = true;
-+                            destroyedBlocks.add(CraftBlock.at(worldserver, blockposition));
++                            destroyedBlocks.add(CraftBlock.at(world, blockposition));
 +                            // CraftBukkit end
                          } else {
                              flag = true;
                          }
-@@ -476,6 +508,49 @@
-             }
-         }
- 
+                     }
++                }
++            }
++        }
++
 +        // CraftBukkit start - Set off an EntityExplodeEvent for the dragon exploding all these blocks
 +        // SPIGOT-4882: don't fire event if nothing hit
 +        if (!flag1) {
 +            return flag;
 +        }
 +
-+        EntityExplodeEvent event = CraftEventFactory.callEntityExplodeEvent(this, destroyedBlocks, 0F, explosionSource.getBlockInteraction());
++        EntityExplodeEvent event = CraftEventFactory.callEntityExplodeEvent(this, destroyedBlocks, 0F, this.explosionSource.getBlockInteraction());
 +        if (event.isCancelled()) {
 +            // This flag literally means 'Dragon hit something hard' (Obsidian, White Stone or Bedrock) and will cause the dragon to slow down.
 +            // We should consider adding an event extension for it, or perhaps returning true if the event is cancelled.
@@ -105,71 +123,70 @@
 +        } else if (event.getYield() == 0F) {
 +            // Yield zero ==> no drops
 +            for (org.bukkit.block.Block block : event.blockList()) {
-+                this.level().removeBlock(new BlockPosition(block.getX(), block.getY(), block.getZ()), false);
++                this.level().removeBlock(new BlockPos(block.getX(), block.getY(), block.getZ()), false);
 +            }
 +        } else {
 +            for (org.bukkit.block.Block block : event.blockList()) {
 +                org.bukkit.Material blockId = block.getType();
 +                if (blockId.isAir()) {
 +                    continue;
-+                }
+                 }
 +
 +                CraftBlock craftBlock = ((CraftBlock) block);
-+                BlockPosition blockposition = craftBlock.getPosition();
++                BlockPos blockposition = craftBlock.getPosition();
 +
 +                Block nmsBlock = craftBlock.getNMS().getBlock();
-+                if (nmsBlock.dropFromExplosion(explosionSource)) {
-+                    TileEntity tileentity = craftBlock.getNMS().hasBlockEntity() ? this.level().getBlockEntity(blockposition) : null;
-+                    LootParams.a loottableinfo_builder = (new LootParams.a((WorldServer) this.level())).withParameter(LootContextParameters.ORIGIN, Vec3D.atCenterOf(blockposition)).withParameter(LootContextParameters.TOOL, ItemStack.EMPTY).withParameter(LootContextParameters.EXPLOSION_RADIUS, 1.0F / event.getYield()).withOptionalParameter(LootContextParameters.BLOCK_ENTITY, tileentity);
++                if (nmsBlock.dropFromExplosion(this.explosionSource)) {
++                    BlockEntity tileentity = craftBlock.getNMS().hasBlockEntity() ? this.level().getBlockEntity(blockposition) : null;
++                    LootParams.Builder loottableinfo_builder = (new LootParams.Builder((ServerLevel) this.level())).withParameter(LootContextParams.ORIGIN, Vec3.atCenterOf(blockposition)).withParameter(LootContextParams.TOOL, ItemStack.EMPTY).withParameter(LootContextParams.EXPLOSION_RADIUS, 1.0F / event.getYield()).withOptionalParameter(LootContextParams.BLOCK_ENTITY, tileentity);
 +
 +                    craftBlock.getNMS().getDrops(loottableinfo_builder).forEach((itemstack) -> {
 +                        Block.popResource(this.level(), blockposition, itemstack);
 +                    });
-+                    craftBlock.getNMS().spawnAfterBreak((WorldServer) this.level(), blockposition, ItemStack.EMPTY, false);
++                    craftBlock.getNMS().spawnAfterBreak((ServerLevel) this.level(), blockposition, ItemStack.EMPTY, false);
 +                }
-+                nmsBlock.wasExploded((WorldServer) this.level(), blockposition, explosionSource);
++                nmsBlock.wasExploded((ServerLevel) this.level(), blockposition, this.explosionSource);
 +
 +                this.level().removeBlock(blockposition, false);
-+            }
-+        }
+             }
+         }
 +        // CraftBukkit end
-+
-         if (flag1) {
-             BlockPosition blockposition1 = new BlockPosition(i + this.random.nextInt(l - i + 1), j + this.random.nextInt(i1 - j + 1), k + this.random.nextInt(j1 - k + 1));
  
-@@ -531,7 +606,7 @@
+         if (flag1) {
+             BlockPos blockposition1 = new BlockPos(i + this.random.nextInt(l - i + 1), j + this.random.nextInt(i1 - j + 1), k + this.random.nextInt(j1 - k + 1));
+@@ -531,14 +605,29 @@
  
      @Override
-     public void kill(WorldServer worldserver) {
+     public void kill(ServerLevel world) {
 -        this.remove(Entity.RemovalReason.KILLED);
 +        this.remove(Entity.RemovalReason.KILLED, EntityRemoveEvent.Cause.DEATH); // CraftBukkit - add Bukkit remove cause
          this.gameEvent(GameEvent.ENTITY_DIE);
          if (this.dragonFight != null) {
              this.dragonFight.updateDragon(this);
-@@ -540,6 +615,21 @@
- 
-     }
- 
+             this.dragonFight.setDragonKilled(this);
++        }
++
++    }
++
 +    // CraftBukkit start - SPIGOT-2420: Special case, the ender dragon drops 12000 xp for the first kill and 500 xp for every other kill and this over time.
 +    @Override
-+    public int getExpReward(WorldServer worldserver, Entity entity) {
++    public int getExpReward(ServerLevel worldserver, Entity entity) {
 +        // CraftBukkit - Moved from #tickDeath method
 +        boolean flag = worldserver.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT);
 +        short short0 = 500;
 +
 +        if (this.dragonFight != null && !this.dragonFight.hasPreviouslyKilledDragon()) {
 +            short0 = 12000;
-+        }
-+
+         }
+ 
 +        return flag ? short0 : 0;
-+    }
+     }
 +    // CraftBukkit end
-+
+ 
      @Override
      protected void tickDeath() {
-         if (this.dragonFight != null) {
-@@ -555,16 +645,21 @@
-             this.level().addParticle(Particles.EXPLOSION_EMITTER, this.getX() + (double) f, this.getY() + 2.0D + (double) f1, this.getZ() + (double) f2, 0.0D, 0.0D, 0.0D);
+@@ -555,16 +644,21 @@
+             this.level().addParticle(ParticleTypes.EXPLOSION_EMITTER, this.getX() + (double) f, this.getY() + 2.0D + (double) f1, this.getZ() + (double) f2, 0.0D, 0.0D, 0.0D);
          }
  
 +        // CraftBukkit start - SPIGOT-2420: Moved up to #getExpReward method
@@ -180,27 +197,27 @@
              short0 = 12000;
          }
 +        */
-+        int short0 = expToDrop;
++        int short0 = this.expToDrop;
 +        // CraftBukkit end
  
-         World world = this.level();
+         Level world = this.level();
  
-         if (world instanceof WorldServer worldserver) {
+         if (world instanceof ServerLevel worldserver) {
 -            if (this.dragonDeathTime > 150 && this.dragonDeathTime % 5 == 0 && worldserver.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
 +            if (this.dragonDeathTime > 150 && this.dragonDeathTime % 5 == 0 && true) {  // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp
-                 EntityExperienceOrb.award(worldserver, this.position(), MathHelper.floor((float) short0 * 0.08F));
+                 ExperienceOrb.award(worldserver, this.position(), Mth.floor((float) short0 * 0.08F));
              }
  
-@@ -592,7 +687,7 @@
-             if (world1 instanceof WorldServer) {
-                 WorldServer worldserver1 = (WorldServer) world1;
+@@ -592,7 +686,7 @@
+             if (world1 instanceof ServerLevel) {
+                 ServerLevel worldserver1 = (ServerLevel) world1;
  
 -                if (worldserver1.getGameRules().getBoolean(GameRules.RULE_DOMOBLOOT)) {
 +                if (true) { // CraftBukkit - SPIGOT-2420: Already checked for the game rule when calculating the xp
-                     EntityExperienceOrb.award(worldserver1, this.position(), MathHelper.floor((float) short0 * 0.2F));
+                     ExperienceOrb.award(worldserver1, this.position(), Mth.floor((float) short0 * 0.2F));
                  }
  
-@@ -600,7 +695,7 @@
+@@ -600,7 +694,7 @@
                      this.dragonFight.setDragonKilled(this);
                  }
  
@@ -209,21 +226,21 @@
                  this.gameEvent(GameEvent.ENTITY_DIE);
              }
          }
-@@ -814,6 +909,7 @@
-         super.addAdditionalSaveData(nbttagcompound);
-         nbttagcompound.putInt("DragonPhase", this.phaseManager.getCurrentPhase().getPhase().getId());
-         nbttagcompound.putInt("DragonDeathTime", this.dragonDeathTime);
-+        nbttagcompound.putInt("Bukkit.expToDrop", expToDrop); // CraftBukkit - SPIGOT-2420: The ender dragon drops xp over time which can also happen between server starts
+@@ -814,6 +908,7 @@
+         super.addAdditionalSaveData(nbt);
+         nbt.putInt("DragonPhase", this.phaseManager.getCurrentPhase().getPhase().getId());
+         nbt.putInt("DragonDeathTime", this.dragonDeathTime);
++        nbt.putInt("Bukkit.expToDrop", this.expToDrop); // CraftBukkit - SPIGOT-2420: The ender dragon drops xp over time which can also happen between server starts
      }
  
      @Override
-@@ -827,6 +923,11 @@
-             this.dragonDeathTime = nbttagcompound.getInt("DragonDeathTime");
+@@ -827,6 +922,11 @@
+             this.dragonDeathTime = nbt.getInt("DragonDeathTime");
          }
  
 +        // CraftBukkit start - SPIGOT-2420: The ender dragon drops xp over time which can also happen between server starts
-+        if (nbttagcompound.contains("Bukkit.expToDrop")) {
-+            this.expToDrop = nbttagcompound.getInt("Bukkit.expToDrop");
++        if (nbt.contains("Bukkit.expToDrop")) {
++            this.expToDrop = nbt.getInt("Bukkit.expToDrop");
 +        }
 +        // CraftBukkit end
      }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/phases/DragonControllerLandedFlame.patch b/paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/phases/DragonControllerLandedFlame.patch
deleted file mode 100644
index b38a3a09c1..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/phases/DragonControllerLandedFlame.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonControllerLandedFlame.java
-+++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonControllerLandedFlame.java
-@@ -11,6 +11,10 @@
- import net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+// CraftBukkit end
-+
- public class DragonControllerLandedFlame extends AbstractDragonControllerLanded {
- 
-     private static final int FLAME_DURATION = 200;
-@@ -100,7 +104,7 @@
-     @Override
-     public void end() {
-         if (this.flame != null) {
--            this.flame.discard();
-+            this.flame.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
-             this.flame = null;
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java.patch
new file mode 100644
index 0000000000..7278a610de
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java.patch
@@ -0,0 +1,21 @@
+--- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java
++++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonSittingFlamingPhase.java
+@@ -10,6 +10,9 @@
+ import net.minecraft.world.entity.AreaEffectCloud;
+ import net.minecraft.world.entity.boss.enderdragon.EnderDragon;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import org.bukkit.event.entity.EntityRemoveEvent;
++// CraftBukkit end
+ 
+ public class DragonSittingFlamingPhase extends AbstractDragonSittingPhase {
+ 
+@@ -100,7 +103,7 @@
+     @Override
+     public void end() {
+         if (this.flame != null) {
+-            this.flame.discard();
++            this.flame.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
+             this.flame = null;
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/phases/DragonControllerManager.patch b/paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/phases/EnderDragonPhaseManager.java.patch
similarity index 60%
rename from paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/phases/DragonControllerManager.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/phases/EnderDragonPhaseManager.java.patch
index 21603a23d6..d39507da58 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/phases/DragonControllerManager.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/boss/enderdragon/phases/EnderDragonPhaseManager.java.patch
@@ -1,7 +1,7 @@
---- a/net/minecraft/world/entity/boss/enderdragon/phases/DragonControllerManager.java
-+++ b/net/minecraft/world/entity/boss/enderdragon/phases/DragonControllerManager.java
+--- a/net/minecraft/world/entity/boss/enderdragon/phases/EnderDragonPhaseManager.java
++++ b/net/minecraft/world/entity/boss/enderdragon/phases/EnderDragonPhaseManager.java
 @@ -5,6 +5,11 @@
- import net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon;
+ import net.minecraft.world.entity.boss.enderdragon.EnderDragon;
  import org.slf4j.Logger;
  
 +// CraftBukkit start
@@ -9,7 +9,7 @@
 +import org.bukkit.event.entity.EnderDragonChangePhaseEvent;
 +// CraftBukkit end
 +
- public class DragonControllerManager {
+ public class EnderDragonPhaseManager {
  
      private static final Logger LOGGER = LogUtils.getLogger();
 @@ -24,6 +29,19 @@
@@ -20,20 +20,20 @@
 +            EnderDragonChangePhaseEvent event = new EnderDragonChangePhaseEvent(
 +                    (CraftEnderDragon) this.dragon.getBukkitEntity(),
 +                    (this.currentPhase == null) ? null : CraftEnderDragon.getBukkitPhase(this.currentPhase.getPhase()),
-+                    CraftEnderDragon.getBukkitPhase(dragoncontrollerphase)
++                    CraftEnderDragon.getBukkitPhase(type)
 +            );
 +            this.dragon.level().getCraftServer().getPluginManager().callEvent(event);
 +            if (event.isCancelled()) {
 +                return;
 +            }
-+            dragoncontrollerphase = CraftEnderDragon.getMinecraftPhase(event.getNewPhase());
++            type = CraftEnderDragon.getMinecraftPhase(event.getNewPhase());
 +            // CraftBukkit end
 +
-             this.currentPhase = this.getPhase(dragoncontrollerphase);
+             this.currentPhase = this.getPhase(type);
              if (!this.dragon.level().isClientSide) {
-                 this.dragon.getEntityData().set(EntityEnderDragon.DATA_PHASE, dragoncontrollerphase.getId());
+                 this.dragon.getEntityData().set(EnderDragon.DATA_PHASE, type.getId());
 @@ -45,6 +63,6 @@
-             this.phases[i] = dragoncontrollerphase.createInstance(this.dragon);
+             this.phases[i] = type.createInstance(this.dragon);
          }
  
 -        return this.phases[i];
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/boss/wither/EntityWither.patch b/paper-server/patches/sources/net/minecraft/world/entity/boss/wither/WitherBoss.java.patch
similarity index 54%
rename from paper-server/patches/sources/net/minecraft/world/entity/boss/wither/EntityWither.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/boss/wither/WitherBoss.java.patch
index d814839e75..79099a6e18 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/boss/wither/EntityWither.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/boss/wither/WitherBoss.java.patch
@@ -1,45 +1,64 @@
---- a/net/minecraft/world/entity/boss/wither/EntityWither.java
-+++ b/net/minecraft/world/entity/boss/wither/EntityWither.java
-@@ -57,6 +57,18 @@
- import net.minecraft.world.level.block.state.IBlockData;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import net.minecraft.network.protocol.game.PacketPlayOutWorldEvent;
+--- a/net/minecraft/world/entity/boss/wither/WitherBoss.java
++++ b/net/minecraft/world/entity/boss/wither/WitherBoss.java
+@@ -10,14 +10,10 @@
+ import net.minecraft.core.particles.ParticleTypes;
+ import net.minecraft.nbt.CompoundTag;
+ import net.minecraft.network.chat.Component;
++import net.minecraft.network.protocol.game.ClientboundLevelEventPacket;
+ import net.minecraft.network.syncher.EntityDataAccessor;
+ import net.minecraft.network.syncher.EntityDataSerializers;
+ import net.minecraft.network.syncher.SynchedEntityData;
+-import net.minecraft.server.level.ServerBossEvent;
+-import net.minecraft.server.level.ServerLevel;
+-import net.minecraft.server.level.ServerPlayer;
+-import net.minecraft.sounds.SoundEvent;
+-import net.minecraft.sounds.SoundEvents;
+ import net.minecraft.tags.BlockTags;
+ import net.minecraft.tags.DamageTypeTags;
+ import net.minecraft.tags.EntityTypeTags;
+@@ -54,8 +50,21 @@
+ import net.minecraft.world.level.GameRules;
+ import net.minecraft.world.level.ItemLike;
+ import net.minecraft.world.level.Level;
 +import net.minecraft.server.MinecraftServer;
-+import net.minecraft.server.level.WorldServer;
++import net.minecraft.server.level.ServerBossEvent;
++import net.minecraft.server.level.ServerLevel;
++import net.minecraft.server.level.ServerPlayer;
++import net.minecraft.sounds.SoundEvent;
++import net.minecraft.sounds.SoundEvents;
 +import net.minecraft.world.level.block.Blocks;
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.phys.Vec3;
 +import org.bukkit.craftbukkit.event.CraftEventFactory;
 +import org.bukkit.event.entity.EntityRegainHealthEvent;
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +import org.bukkit.event.entity.EntityTargetEvent;
 +import org.bukkit.event.entity.ExplosionPrimeEvent;
 +// CraftBukkit end
-+
- public class EntityWither extends EntityMonster implements IRangedEntity {
  
-     private static final DataWatcherObject<Integer> DATA_TARGET_A = DataWatcher.defineId(EntityWither.class, DataWatcherRegistry.INT);
-@@ -252,15 +264,40 @@
+ public class WitherBoss extends Monster implements RangedAttackMob {
+ 
+@@ -252,15 +261,40 @@
              i = this.getInvulnerableTicks() - 1;
              this.bossEvent.setProgress(1.0F - (float) i / 220.0F);
              if (i <= 0) {
--                worldserver.explode(this, this.getX(), this.getEyeY(), this.getZ(), 7.0F, false, World.a.MOB);
+-                world.explode(this, this.getX(), this.getEyeY(), this.getZ(), 7.0F, false, Level.ExplosionInteraction.MOB);
 +                // CraftBukkit start
 +                // worldserver.explode(this, this.getX(), this.getEyeY(), this.getZ(), 7.0F, false, World.a.MOB);
 +                ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), 7.0F, false);
-+                worldserver.getCraftServer().getPluginManager().callEvent(event);
++                world.getCraftServer().getPluginManager().callEvent(event);
 +
 +                if (!event.isCancelled()) {
-+                    worldserver.explode(this, this.getX(), this.getEyeY(), this.getZ(), event.getRadius(), event.getFire(), World.a.MOB);
++                    world.explode(this, this.getX(), this.getEyeY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB);
 +                }
 +                // CraftBukkit end
 +
                  if (!this.isSilent()) {
--                    worldserver.globalLevelEvent(1023, this.blockPosition(), 0);
+-                    world.globalLevelEvent(1023, this.blockPosition(), 0);
 +                    // CraftBukkit start - Use relative location for far away sounds
 +                    // worldserver.globalLevelEvent(1023, new BlockPosition(this), 0);
-+                    int viewDistance = worldserver.getCraftServer().getViewDistance() * 16;
-+                    for (EntityPlayer player : (List<EntityPlayer>) MinecraftServer.getServer().getPlayerList().players) {
++                    int viewDistance = world.getCraftServer().getViewDistance() * 16;
++                    for (ServerPlayer player : (List<ServerPlayer>) MinecraftServer.getServer().getPlayerList().players) {
 +                        double deltaX = this.getX() - player.getX();
 +                        double deltaZ = this.getZ() - player.getZ();
 +                        double distanceSquared = deltaX * deltaX + deltaZ * deltaZ;
@@ -47,9 +66,9 @@
 +                            double deltaLength = Math.sqrt(distanceSquared);
 +                            double relativeX = player.getX() + (deltaX / deltaLength) * viewDistance;
 +                            double relativeZ = player.getZ() + (deltaZ / deltaLength) * viewDistance;
-+                            player.connection.send(new PacketPlayOutWorldEvent(1023, new BlockPosition((int) relativeX, (int) this.getY(), (int) relativeZ), 0, true));
++                            player.connection.send(new ClientboundLevelEventPacket(1023, new BlockPos((int) relativeX, (int) this.getY(), (int) relativeZ), 0, true));
 +                        } else {
-+                            player.connection.send(new PacketPlayOutWorldEvent(1023, this.blockPosition(), 0, true));
++                            player.connection.send(new ClientboundLevelEventPacket(1023, this.blockPosition(), 0, true));
 +                        }
 +                    }
 +                    // CraftBukkit end
@@ -63,27 +82,27 @@
              }
  
          } else {
-@@ -305,6 +342,7 @@
+@@ -305,6 +339,7 @@
                          if (!list.isEmpty()) {
-                             EntityLiving entityliving1 = (EntityLiving) list.get(this.random.nextInt(list.size()));
+                             LivingEntity entityliving1 = (LivingEntity) list.get(this.random.nextInt(list.size()));
  
 +                            if (CraftEventFactory.callEntityTargetLivingEvent(this, entityliving1, EntityTargetEvent.TargetReason.CLOSEST_ENTITY).isCancelled()) continue; // CraftBukkit
                              this.setAlternativeTarget(i, entityliving1.getId());
                          }
                      }
-@@ -331,6 +369,11 @@
-                         IBlockData iblockdata = worldserver.getBlockState(blockposition);
+@@ -331,6 +366,11 @@
+                         BlockState iblockdata = world.getBlockState(blockposition);
  
-                         if (canDestroy(iblockdata)) {
+                         if (WitherBoss.canDestroy(iblockdata)) {
 +                            // CraftBukkit start
 +                            if (!CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, Blocks.AIR.defaultBlockState())) {
 +                                continue;
 +                            }
 +                            // CraftBukkit end
-                             flag = worldserver.destroyBlock(blockposition, true, this) || flag;
+                             flag = world.destroyBlock(blockposition, true, this) || flag;
                          }
                      }
-@@ -342,7 +385,7 @@
+@@ -342,7 +382,7 @@
              }
  
              if (this.tickCount % 20 == 0) {
@@ -92,10 +111,10 @@
              }
  
              this.bossEvent.setProgress(this.getHealth() / this.getMaxHealth());
-@@ -499,7 +542,7 @@
+@@ -499,7 +539,7 @@
      @Override
      public void checkDespawn() {
-         if (this.level().getDifficulty() == EnumDifficulty.PEACEFUL && this.shouldDespawnInPeaceful()) {
+         if (this.level().getDifficulty() == Difficulty.PEACEFUL && this.shouldDespawnInPeaceful()) {
 -            this.discard();
 +            this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
          } else {
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/decoration/ArmorStand.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/decoration/ArmorStand.java.patch
new file mode 100644
index 0000000000..237b687e0d
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/decoration/ArmorStand.java.patch
@@ -0,0 +1,348 @@
+--- a/net/minecraft/world/entity/decoration/ArmorStand.java
++++ b/net/minecraft/world/entity/decoration/ArmorStand.java
+@@ -25,7 +25,6 @@
+ import net.minecraft.world.entity.Entity;
+ import net.minecraft.world.entity.EntityDimensions;
+ import net.minecraft.world.entity.EntityType;
+-import net.minecraft.world.entity.EquipmentSlot;
+ import net.minecraft.world.entity.HumanoidArm;
+ import net.minecraft.world.entity.LightningBolt;
+ import net.minecraft.world.entity.LivingEntity;
+@@ -33,7 +32,6 @@
+ import net.minecraft.world.entity.Pose;
+ import net.minecraft.world.entity.ai.attributes.AttributeSupplier;
+ import net.minecraft.world.entity.ai.attributes.Attributes;
+-import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.entity.vehicle.AbstractMinecart;
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.item.Items;
+@@ -47,6 +45,14 @@
+ import net.minecraft.world.level.material.PushReaction;
+ import net.minecraft.world.phys.AABB;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import org.bukkit.event.entity.EntityRemoveEvent;
++import org.bukkit.inventory.EquipmentSlot;
++import org.bukkit.craftbukkit.CraftEquipmentSlot;
++import org.bukkit.craftbukkit.inventory.CraftItemStack;
++import org.bukkit.entity.Player;
++import org.bukkit.event.player.PlayerArmorStandManipulateEvent;
++// CraftBukkit end
+ 
+ public class ArmorStand extends LivingEntity {
+ 
+@@ -123,7 +129,14 @@
+         return createLivingAttributes().add(Attributes.STEP_HEIGHT, 0.0D);
+     }
+ 
++    // CraftBukkit start - SPIGOT-3607, SPIGOT-3637
+     @Override
++    public float getBukkitYaw() {
++        return this.getYRot();
++    }
++    // CraftBukkit end
++
++    @Override
+     public void refreshDimensions() {
+         double d0 = this.getX();
+         double d1 = this.getY();
+@@ -165,7 +178,7 @@
+     }
+ 
+     @Override
+-    public ItemStack getItemBySlot(EquipmentSlot slot) {
++    public ItemStack getItemBySlot(net.minecraft.world.entity.EquipmentSlot slot) {
+         switch (slot.getType()) {
+             case HAND:
+                 return (ItemStack) this.handItems.get(slot.getIndex());
+@@ -177,19 +190,26 @@
+     }
+ 
+     @Override
+-    public boolean canUseSlot(EquipmentSlot slot) {
+-        return slot != EquipmentSlot.BODY && !this.isDisabled(slot);
++    public boolean canUseSlot(net.minecraft.world.entity.EquipmentSlot slot) {
++        return slot != net.minecraft.world.entity.EquipmentSlot.BODY && !this.isDisabled(slot);
+     }
+ 
+     @Override
+-    public void setItemSlot(EquipmentSlot slot, ItemStack stack) {
+-        this.verifyEquippedItem(stack);
+-        switch (slot.getType()) {
++    public void setItemSlot(net.minecraft.world.entity.EquipmentSlot slot, ItemStack stack) {
++        // CraftBukkit start
++        this.setItemSlot(slot, stack, false);
++    }
++
++    @Override
++    public void setItemSlot(net.minecraft.world.entity.EquipmentSlot enumitemslot, ItemStack itemstack, boolean silent) {
++        // CraftBukkit end
++        this.verifyEquippedItem(itemstack);
++        switch (enumitemslot.getType()) {
+             case HAND:
+-                this.onEquipItem(slot, (ItemStack) this.handItems.set(slot.getIndex(), stack), stack);
++                this.onEquipItem(enumitemslot, (ItemStack) this.handItems.set(enumitemslot.getIndex(), itemstack), itemstack, silent); // CraftBukkit
+                 break;
+             case HUMANOID_ARMOR:
+-                this.onEquipItem(slot, (ItemStack) this.armorItems.set(slot.getIndex(), stack), stack);
++                this.onEquipItem(enumitemslot, (ItemStack) this.armorItems.set(enumitemslot.getIndex(), itemstack), itemstack, silent); // CraftBukkit
+         }
+ 
+     }
+@@ -341,7 +361,7 @@
+     }
+ 
+     @Override
+-    public InteractionResult interactAt(Player player, Vec3 hitPos, InteractionHand hand) {
++    public InteractionResult interactAt(net.minecraft.world.entity.player.Player player, Vec3 hitPos, InteractionHand hand) {
+         ItemStack itemstack = player.getItemInHand(hand);
+ 
+         if (!this.isMarker() && !itemstack.is(Items.NAME_TAG)) {
+@@ -350,11 +370,11 @@
+             } else if (player.level().isClientSide) {
+                 return InteractionResult.SUCCESS_SERVER;
+             } else {
+-                EquipmentSlot enumitemslot = this.getEquipmentSlotForItem(itemstack);
++                net.minecraft.world.entity.EquipmentSlot enumitemslot = this.getEquipmentSlotForItem(itemstack);
+ 
+                 if (itemstack.isEmpty()) {
+-                    EquipmentSlot enumitemslot1 = this.getClickedSlot(hitPos);
+-                    EquipmentSlot enumitemslot2 = this.isDisabled(enumitemslot1) ? enumitemslot : enumitemslot1;
++                    net.minecraft.world.entity.EquipmentSlot enumitemslot1 = this.getClickedSlot(hitPos);
++                    net.minecraft.world.entity.EquipmentSlot enumitemslot2 = this.isDisabled(enumitemslot1) ? enumitemslot : enumitemslot1;
+ 
+                     if (this.hasItemInSlot(enumitemslot2) && this.swapItem(player, enumitemslot2, itemstack, hand)) {
+                         return InteractionResult.SUCCESS_SERVER;
+@@ -364,7 +384,7 @@
+                         return InteractionResult.FAIL;
+                     }
+ 
+-                    if (enumitemslot.getType() == EquipmentSlot.Type.HAND && !this.showArms()) {
++                    if (enumitemslot.getType() == net.minecraft.world.entity.EquipmentSlot.Type.HAND && !this.showArms()) {
+                         return InteractionResult.FAIL;
+                     }
+ 
+@@ -380,39 +400,57 @@
+         }
+     }
+ 
+-    private EquipmentSlot getClickedSlot(Vec3 hitPos) {
+-        EquipmentSlot enumitemslot = EquipmentSlot.MAINHAND;
++    private net.minecraft.world.entity.EquipmentSlot getClickedSlot(Vec3 hitPos) {
++        net.minecraft.world.entity.EquipmentSlot enumitemslot = net.minecraft.world.entity.EquipmentSlot.MAINHAND;
+         boolean flag = this.isSmall();
+         double d0 = hitPos.y / (double) (this.getScale() * this.getAgeScale());
+-        EquipmentSlot enumitemslot1 = EquipmentSlot.FEET;
++        net.minecraft.world.entity.EquipmentSlot enumitemslot1 = net.minecraft.world.entity.EquipmentSlot.FEET;
+ 
+         if (d0 >= 0.1D && d0 < 0.1D + (flag ? 0.8D : 0.45D) && this.hasItemInSlot(enumitemslot1)) {
+-            enumitemslot = EquipmentSlot.FEET;
+-        } else if (d0 >= 0.9D + (flag ? 0.3D : 0.0D) && d0 < 0.9D + (flag ? 1.0D : 0.7D) && this.hasItemInSlot(EquipmentSlot.CHEST)) {
+-            enumitemslot = EquipmentSlot.CHEST;
+-        } else if (d0 >= 0.4D && d0 < 0.4D + (flag ? 1.0D : 0.8D) && this.hasItemInSlot(EquipmentSlot.LEGS)) {
+-            enumitemslot = EquipmentSlot.LEGS;
+-        } else if (d0 >= 1.6D && this.hasItemInSlot(EquipmentSlot.HEAD)) {
+-            enumitemslot = EquipmentSlot.HEAD;
+-        } else if (!this.hasItemInSlot(EquipmentSlot.MAINHAND) && this.hasItemInSlot(EquipmentSlot.OFFHAND)) {
+-            enumitemslot = EquipmentSlot.OFFHAND;
++            enumitemslot = net.minecraft.world.entity.EquipmentSlot.FEET;
++        } else if (d0 >= 0.9D + (flag ? 0.3D : 0.0D) && d0 < 0.9D + (flag ? 1.0D : 0.7D) && this.hasItemInSlot(net.minecraft.world.entity.EquipmentSlot.CHEST)) {
++            enumitemslot = net.minecraft.world.entity.EquipmentSlot.CHEST;
++        } else if (d0 >= 0.4D && d0 < 0.4D + (flag ? 1.0D : 0.8D) && this.hasItemInSlot(net.minecraft.world.entity.EquipmentSlot.LEGS)) {
++            enumitemslot = net.minecraft.world.entity.EquipmentSlot.LEGS;
++        } else if (d0 >= 1.6D && this.hasItemInSlot(net.minecraft.world.entity.EquipmentSlot.HEAD)) {
++            enumitemslot = net.minecraft.world.entity.EquipmentSlot.HEAD;
++        } else if (!this.hasItemInSlot(net.minecraft.world.entity.EquipmentSlot.MAINHAND) && this.hasItemInSlot(net.minecraft.world.entity.EquipmentSlot.OFFHAND)) {
++            enumitemslot = net.minecraft.world.entity.EquipmentSlot.OFFHAND;
+         }
+ 
+         return enumitemslot;
+     }
+ 
+-    public boolean isDisabled(EquipmentSlot slot) {
+-        return (this.disabledSlots & 1 << slot.getFilterBit(0)) != 0 || slot.getType() == EquipmentSlot.Type.HAND && !this.showArms();
++    public boolean isDisabled(net.minecraft.world.entity.EquipmentSlot slot) {
++        return (this.disabledSlots & 1 << slot.getFilterBit(0)) != 0 || slot.getType() == net.minecraft.world.entity.EquipmentSlot.Type.HAND && !this.showArms();
+     }
+ 
+-    private boolean swapItem(Player player, EquipmentSlot slot, ItemStack stack, InteractionHand hand) {
++    private boolean swapItem(net.minecraft.world.entity.player.Player player, net.minecraft.world.entity.EquipmentSlot slot, ItemStack stack, InteractionHand hand) {
+         ItemStack itemstack1 = this.getItemBySlot(slot);
+ 
+         if (!itemstack1.isEmpty() && (this.disabledSlots & 1 << slot.getFilterBit(8)) != 0) {
+             return false;
+         } else if (itemstack1.isEmpty() && (this.disabledSlots & 1 << slot.getFilterBit(16)) != 0) {
+             return false;
+-        } else if (player.hasInfiniteMaterials() && itemstack1.isEmpty() && !stack.isEmpty()) {
++            // CraftBukkit start
++        } else {
++            org.bukkit.inventory.ItemStack armorStandItem = CraftItemStack.asCraftMirror(itemstack1);
++            org.bukkit.inventory.ItemStack playerHeldItem = CraftItemStack.asCraftMirror(stack);
++
++            Player player1 = (Player) player.getBukkitEntity();
++            org.bukkit.entity.ArmorStand self = (org.bukkit.entity.ArmorStand) this.getBukkitEntity();
++
++            EquipmentSlot slot1 = CraftEquipmentSlot.getSlot(slot);
++            EquipmentSlot hand1 = CraftEquipmentSlot.getHand(hand);
++            PlayerArmorStandManipulateEvent armorStandManipulateEvent = new PlayerArmorStandManipulateEvent(player1, self, playerHeldItem, armorStandItem, slot1, hand1);
++            this.level().getCraftServer().getPluginManager().callEvent(armorStandManipulateEvent);
++
++            if (armorStandManipulateEvent.isCancelled()) {
++                return true;
++            }
++
++        if (player.hasInfiniteMaterials() && itemstack1.isEmpty() && !stack.isEmpty()) {
++            // CraftBukkit end
+             this.setItemSlot(slot, stack.copyWithCount(1));
+             return true;
+         } else if (!stack.isEmpty() && stack.getCount() > 1) {
+@@ -427,6 +465,7 @@
+             player.setItemInHand(hand, itemstack1);
+             return true;
+         }
++        } // CraftBukkit
+     }
+ 
+     @Override
+@@ -436,12 +475,22 @@
+         } else if (!world.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && source.getEntity() instanceof Mob) {
+             return false;
+         } else if (source.is(DamageTypeTags.BYPASSES_INVULNERABILITY)) {
+-            this.kill(world);
++            // CraftBukkit start
++            if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, source, amount)) {
++                return false;
++            }
++            this.kill(world, source); // CraftBukkit
++            // CraftBukkit end
+             return false;
+-        } else if (!this.isInvulnerableTo(world, source) && !this.invisible && !this.isMarker()) {
++        } else if (!this.isInvulnerableTo(world, source) && (true || !this.invisible) && !this.isMarker()) { // CraftBukkit
++            // CraftBukkit start
++            if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, source, amount, true, this.invisible)) {
++                return false;
++            }
++            // CraftBukkit end
+             if (source.is(DamageTypeTags.IS_EXPLOSION)) {
+                 this.brokenByAnything(world, source);
+-                this.kill(world);
++                this.kill(world, source); // CraftBukkit
+                 return false;
+             } else if (source.is(DamageTypeTags.IGNITES_ARMOR_STANDS)) {
+                 if (this.isOnFire()) {
+@@ -463,8 +512,8 @@
+                 } else {
+                     Entity entity = source.getEntity();
+ 
+-                    if (entity instanceof Player) {
+-                        Player entityhuman = (Player) entity;
++                    if (entity instanceof net.minecraft.world.entity.player.Player) {
++                        net.minecraft.world.entity.player.Player entityhuman = (net.minecraft.world.entity.player.Player) entity;
+ 
+                         if (!entityhuman.getAbilities().mayBuild) {
+                             return false;
+@@ -474,7 +523,7 @@
+                     if (source.isCreativePlayer()) {
+                         this.playBrokenSound();
+                         this.showBreakingParticles();
+-                        this.kill(world);
++                        this.kill(world, source); // CraftBukkit
+                         return true;
+                     } else {
+                         long i = world.getGameTime();
+@@ -486,7 +535,7 @@
+                         } else {
+                             this.brokenByPlayer(world, source);
+                             this.showBreakingParticles();
+-                            this.kill(world);
++                            this.discard(EntityRemoveEvent.Cause.DEATH); // CraftBukkit - SPIGOT-4890: remain as this.discard() since above damagesource method will call death event
+                         }
+ 
+                         return true;
+@@ -536,7 +585,7 @@
+         f1 -= amount;
+         if (f1 <= 0.5F) {
+             this.brokenByAnything(world, damageSource);
+-            this.kill(world);
++            this.kill(world, damageSource); // CraftBukkit
+         } else {
+             this.setHealth(f1);
+             this.gameEvent(GameEvent.ENTITY_DAMAGE, damageSource.getEntity());
+@@ -548,13 +597,13 @@
+         ItemStack itemstack = new ItemStack(Items.ARMOR_STAND);
+ 
+         itemstack.set(DataComponents.CUSTOM_NAME, this.getCustomName());
+-        Block.popResource(this.level(), this.blockPosition(), itemstack);
++        this.drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); // CraftBukkit - add to drops
+         this.brokenByAnything(world, damageSource);
+     }
+ 
+     private void brokenByAnything(ServerLevel world, DamageSource damageSource) {
+         this.playBrokenSound();
+-        this.dropAllDeathLoot(world, damageSource);
++        // this.dropAllDeathLoot(worldserver, damagesource); // CraftBukkit - moved down
+ 
+         ItemStack itemstack;
+         int i;
+@@ -562,7 +611,7 @@
+         for (i = 0; i < this.handItems.size(); ++i) {
+             itemstack = (ItemStack) this.handItems.get(i);
+             if (!itemstack.isEmpty()) {
+-                Block.popResource(this.level(), this.blockPosition().above(), itemstack);
++                this.drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); // CraftBukkit - add to drops
+                 this.handItems.set(i, ItemStack.EMPTY);
+             }
+         }
+@@ -570,15 +619,16 @@
+         for (i = 0; i < this.armorItems.size(); ++i) {
+             itemstack = (ItemStack) this.armorItems.get(i);
+             if (!itemstack.isEmpty()) {
+-                Block.popResource(this.level(), this.blockPosition().above(), itemstack);
++                this.drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); // CraftBukkit - add to drops
+                 this.armorItems.set(i, ItemStack.EMPTY);
+             }
+         }
++        this.dropAllDeathLoot(world, damageSource); // CraftBukkit - moved from above
+ 
+     }
+ 
+     private void playBrokenSound() {
+-        this.level().playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.ARMOR_STAND_BREAK, this.getSoundSource(), 1.0F, 1.0F);
++        this.level().playSound((net.minecraft.world.entity.player.Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.ARMOR_STAND_BREAK, this.getSoundSource(), 1.0F, 1.0F);
+     }
+ 
+     @Override
+@@ -664,9 +714,23 @@
+         return this.isSmall();
+     }
+ 
++    // CraftBukkit start
+     @Override
++    public boolean shouldDropExperience() {
++        return true; // MC-157395, SPIGOT-5193 even baby (small) armor stands should drop
++    }
++    // CraftBukkit end
++
++    @Override
+     public void kill(ServerLevel world) {
+-        this.remove(Entity.RemovalReason.KILLED);
++        // CraftBukkit start - pass DamageSource for kill
++        this.kill(world, null);
++    }
++
++    public void kill(ServerLevel worldserver, DamageSource damageSource) {
++        org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, (damageSource == null ? this.damageSources().genericKill() : damageSource), this.drops); // CraftBukkit - call event
++        this.remove(Entity.RemovalReason.KILLED, EntityRemoveEvent.Cause.DEATH); // CraftBukkit - add Bukkit remove cause
++        // CraftBukkit end
+         this.gameEvent(GameEvent.ENTITY_DIE);
+     }
+ 
+@@ -788,7 +852,7 @@
+ 
+     @Override
+     public boolean skipAttackInteraction(Entity attacker) {
+-        return attacker instanceof Player && !this.level().mayInteract((Player) attacker, this.blockPosition());
++        return attacker instanceof net.minecraft.world.entity.player.Player && !this.level().mayInteract((net.minecraft.world.entity.player.Player) attacker, this.blockPosition());
+     }
+ 
+     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/decoration/BlockAttachedEntity.patch b/paper-server/patches/sources/net/minecraft/world/entity/decoration/BlockAttachedEntity.java.patch
similarity index 61%
rename from paper-server/patches/sources/net/minecraft/world/entity/decoration/BlockAttachedEntity.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/decoration/BlockAttachedEntity.java.patch
index 27d3b35bb5..57331b11fa 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/decoration/BlockAttachedEntity.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/decoration/BlockAttachedEntity.java.patch
@@ -1,28 +1,42 @@
 --- a/net/minecraft/world/entity/decoration/BlockAttachedEntity.java
 +++ b/net/minecraft/world/entity/decoration/BlockAttachedEntity.java
-@@ -18,6 +18,15 @@
- import net.minecraft.world.phys.Vec3D;
- import org.slf4j.Logger;
+@@ -2,9 +2,6 @@
  
+ import com.mojang.logging.LogUtils;
+ import javax.annotation.Nullable;
+-import net.minecraft.core.BlockPos;
+-import net.minecraft.nbt.CompoundTag;
+-import net.minecraft.server.level.ServerLevel;
+ import net.minecraft.world.damagesource.DamageSource;
+ import net.minecraft.world.entity.Entity;
+ import net.minecraft.world.entity.EntityType;
+@@ -15,8 +12,19 @@
+ import net.minecraft.world.level.Explosion;
+ import net.minecraft.world.level.GameRules;
+ import net.minecraft.world.level.Level;
++import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.phys.Vec3;
+ import org.slf4j.Logger;
++import net.minecraft.core.BlockPos;
++import net.minecraft.nbt.CompoundTag;
++import net.minecraft.server.level.ServerLevel;
 +// CraftBukkit start
 +import net.minecraft.tags.DamageTypeTags;
-+import net.minecraft.world.level.block.state.IBlockData;
 +import org.bukkit.entity.Hanging;
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +import org.bukkit.event.hanging.HangingBreakByEntityEvent;
 +import org.bukkit.event.hanging.HangingBreakEvent;
 +// CraftBukkit end
-+
+ 
  public abstract class BlockAttachedEntity extends Entity {
  
-     private static final Logger LOGGER = LogUtils.getLogger();
-@@ -44,7 +53,25 @@
+@@ -44,7 +52,25 @@
              if (this.checkInterval++ == 100) {
                  this.checkInterval = 0;
                  if (!this.isRemoved() && !this.survives()) {
 -                    this.discard();
 +                    // CraftBukkit start - fire break events
-+                    IBlockData material = this.level().getBlockState(this.blockPosition());
++                    BlockState material = this.level().getBlockState(this.blockPosition());
 +                    HangingBreakEvent.RemoveCause cause;
 +
 +                    if (!material.isAir()) {
@@ -43,17 +57,17 @@
                      this.dropItem(worldserver, (Entity) null);
                  }
              }
-@@ -81,6 +108,22 @@
+@@ -81,6 +107,22 @@
              return false;
          } else {
              if (!this.isRemoved()) {
 +                // CraftBukkit start - fire break events
-+                Entity damager = (damagesource.isDirect()) ? damagesource.getDirectEntity() : damagesource.getEntity();
++                Entity damager = (source.isDirect()) ? source.getDirectEntity() : source.getEntity();
 +                HangingBreakEvent event;
 +                if (damager != null) {
-+                    event = new HangingBreakByEntityEvent((Hanging) this.getBukkitEntity(), damager.getBukkitEntity(), damagesource.is(DamageTypeTags.IS_EXPLOSION) ? HangingBreakEvent.RemoveCause.EXPLOSION : HangingBreakEvent.RemoveCause.ENTITY);
++                    event = new HangingBreakByEntityEvent((Hanging) this.getBukkitEntity(), damager.getBukkitEntity(), source.is(DamageTypeTags.IS_EXPLOSION) ? HangingBreakEvent.RemoveCause.EXPLOSION : HangingBreakEvent.RemoveCause.ENTITY);
 +                } else {
-+                    event = new HangingBreakEvent((Hanging) this.getBukkitEntity(), damagesource.is(DamageTypeTags.IS_EXPLOSION) ? HangingBreakEvent.RemoveCause.EXPLOSION : HangingBreakEvent.RemoveCause.DEFAULT);
++                    event = new HangingBreakEvent((Hanging) this.getBukkitEntity(), source.is(DamageTypeTags.IS_EXPLOSION) ? HangingBreakEvent.RemoveCause.EXPLOSION : HangingBreakEvent.RemoveCause.DEFAULT);
 +                }
 +
 +                this.level().getCraftServer().getPluginManager().callEvent(event);
@@ -63,13 +77,13 @@
 +                }
 +                // CraftBukkit end
 +
-                 this.kill(worldserver);
+                 this.kill(world);
                  this.markHurt();
-                 this.dropItem(worldserver, damagesource.getEntity());
-@@ -101,6 +144,16 @@
+                 this.dropItem(world, source.getEntity());
+@@ -101,6 +143,16 @@
  
-         if (world instanceof WorldServer worldserver) {
-             if (!this.isRemoved() && vec3d.lengthSqr() > 0.0D) {
+         if (world instanceof ServerLevel worldserver) {
+             if (!this.isRemoved() && movement.lengthSqr() > 0.0D) {
 +                // CraftBukkit start - fire break events
 +                // TODO - Does this need its own cause? Seems to only be triggered by pistons
 +                HangingBreakEvent event = new HangingBreakEvent((Hanging) this.getBukkitEntity(), HangingBreakEvent.RemoveCause.PHYSICS);
@@ -83,28 +97,29 @@
                  this.kill(worldserver);
                  this.dropItem(worldserver, (Entity) null);
              }
-@@ -113,7 +166,7 @@
-         World world = this.level();
+@@ -113,7 +165,7 @@
+         Level world = this.level();
  
-         if (world instanceof WorldServer worldserver) {
--            if (!this.isRemoved() && d0 * d0 + d1 * d1 + d2 * d2 > 0.0D) {
-+            if (false && !this.isRemoved() && d0 * d0 + d1 * d1 + d2 * d2 > 0.0D) { // CraftBukkit - not needed
+         if (world instanceof ServerLevel worldserver) {
+-            if (!this.isRemoved() && deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ > 0.0D) {
++            if (false && !this.isRemoved() && deltaX * deltaX + deltaY * deltaY + deltaZ * deltaZ > 0.0D) { // CraftBukkit - not needed
                  this.kill(worldserver);
                  this.dropItem(worldserver, (Entity) null);
              }
-@@ -121,6 +174,15 @@
+@@ -121,7 +173,16 @@
  
      }
  
 +    // CraftBukkit start - selectively save tile position
-+    @Override
-+    public void addAdditionalSaveData(NBTTagCompound nbttagcompound, boolean includeAll) {
+     @Override
++    public void addAdditionalSaveData(CompoundTag nbttagcompound, boolean includeAll) {
 +        if (includeAll) {
-+            addAdditionalSaveData(nbttagcompound);
++            this.addAdditionalSaveData(nbttagcompound);
 +        }
 +    }
 +    // CraftBukkit end
 +
-     @Override
-     public void addAdditionalSaveData(NBTTagCompound nbttagcompound) {
-         BlockPosition blockposition = this.getPos();
++    @Override
+     public void addAdditionalSaveData(CompoundTag nbt) {
+         BlockPos blockposition = this.getPos();
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/decoration/EntityArmorStand.patch b/paper-server/patches/sources/net/minecraft/world/entity/decoration/EntityArmorStand.patch
deleted file mode 100644
index 1594547064..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/decoration/EntityArmorStand.patch
+++ /dev/null
@@ -1,207 +0,0 @@
---- a/net/minecraft/world/entity/decoration/EntityArmorStand.java
-+++ b/net/minecraft/world/entity/decoration/EntityArmorStand.java
-@@ -48,6 +48,16 @@
- import net.minecraft.world.phys.AxisAlignedBB;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+import org.bukkit.inventory.EquipmentSlot;
-+import org.bukkit.craftbukkit.CraftEquipmentSlot;
-+import org.bukkit.craftbukkit.inventory.CraftItemStack;
-+import org.bukkit.entity.ArmorStand;
-+import org.bukkit.entity.Player;
-+import org.bukkit.event.player.PlayerArmorStandManipulateEvent;
-+// CraftBukkit end
-+
- public class EntityArmorStand extends EntityLiving {
- 
-     public static final int WOBBLE_TIME = 5;
-@@ -123,6 +133,13 @@
-         return createLivingAttributes().add(GenericAttributes.STEP_HEIGHT, 0.0D);
-     }
- 
-+    // CraftBukkit start - SPIGOT-3607, SPIGOT-3637
-+    @Override
-+    public float getBukkitYaw() {
-+        return this.getYRot();
-+    }
-+    // CraftBukkit end
-+
-     @Override
-     public void refreshDimensions() {
-         double d0 = this.getX();
-@@ -183,13 +200,20 @@
- 
-     @Override
-     public void setItemSlot(EnumItemSlot enumitemslot, ItemStack itemstack) {
-+        // CraftBukkit start
-+        this.setItemSlot(enumitemslot, itemstack, false);
-+    }
-+
-+    @Override
-+    public void setItemSlot(EnumItemSlot enumitemslot, ItemStack itemstack, boolean silent) {
-+        // CraftBukkit end
-         this.verifyEquippedItem(itemstack);
-         switch (enumitemslot.getType()) {
-             case HAND:
--                this.onEquipItem(enumitemslot, (ItemStack) this.handItems.set(enumitemslot.getIndex(), itemstack), itemstack);
-+                this.onEquipItem(enumitemslot, (ItemStack) this.handItems.set(enumitemslot.getIndex(), itemstack), itemstack, silent); // CraftBukkit
-                 break;
-             case HUMANOID_ARMOR:
--                this.onEquipItem(enumitemslot, (ItemStack) this.armorItems.set(enumitemslot.getIndex(), itemstack), itemstack);
-+                this.onEquipItem(enumitemslot, (ItemStack) this.armorItems.set(enumitemslot.getIndex(), itemstack), itemstack, silent); // CraftBukkit
-         }
- 
-     }
-@@ -412,7 +436,25 @@
-             return false;
-         } else if (itemstack1.isEmpty() && (this.disabledSlots & 1 << enumitemslot.getFilterBit(16)) != 0) {
-             return false;
--        } else if (entityhuman.hasInfiniteMaterials() && itemstack1.isEmpty() && !itemstack.isEmpty()) {
-+            // CraftBukkit start
-+        } else {
-+            org.bukkit.inventory.ItemStack armorStandItem = CraftItemStack.asCraftMirror(itemstack1);
-+            org.bukkit.inventory.ItemStack playerHeldItem = CraftItemStack.asCraftMirror(itemstack);
-+
-+            Player player = (Player) entityhuman.getBukkitEntity();
-+            ArmorStand self = (ArmorStand) this.getBukkitEntity();
-+
-+            EquipmentSlot slot = CraftEquipmentSlot.getSlot(enumitemslot);
-+            EquipmentSlot hand = CraftEquipmentSlot.getHand(enumhand);
-+            PlayerArmorStandManipulateEvent armorStandManipulateEvent = new PlayerArmorStandManipulateEvent(player, self, playerHeldItem, armorStandItem, slot, hand);
-+            this.level().getCraftServer().getPluginManager().callEvent(armorStandManipulateEvent);
-+
-+            if (armorStandManipulateEvent.isCancelled()) {
-+                return true;
-+            }
-+
-+        if (entityhuman.hasInfiniteMaterials() && itemstack1.isEmpty() && !itemstack.isEmpty()) {
-+            // CraftBukkit end
-             this.setItemSlot(enumitemslot, itemstack.copyWithCount(1));
-             return true;
-         } else if (!itemstack.isEmpty() && itemstack.getCount() > 1) {
-@@ -427,6 +469,7 @@
-             entityhuman.setItemInHand(enumhand, itemstack1);
-             return true;
-         }
-+        } // CraftBukkit
-     }
- 
-     @Override
-@@ -436,12 +479,22 @@
-         } else if (!worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) && damagesource.getEntity() instanceof EntityInsentient) {
-             return false;
-         } else if (damagesource.is(DamageTypeTags.BYPASSES_INVULNERABILITY)) {
--            this.kill(worldserver);
-+            // CraftBukkit start
-+            if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f)) {
-+                return false;
-+            }
-+            this.kill(worldserver, damagesource); // CraftBukkit
-+            // CraftBukkit end
-             return false;
--        } else if (!this.isInvulnerableTo(worldserver, damagesource) && !this.invisible && !this.isMarker()) {
-+        } else if (!this.isInvulnerableTo(worldserver, damagesource) && (true || !this.invisible) && !this.isMarker()) { // CraftBukkit
-+            // CraftBukkit start
-+            if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f, true, this.invisible)) {
-+                return false;
-+            }
-+            // CraftBukkit end
-             if (damagesource.is(DamageTypeTags.IS_EXPLOSION)) {
-                 this.brokenByAnything(worldserver, damagesource);
--                this.kill(worldserver);
-+                this.kill(worldserver, damagesource); // CraftBukkit
-                 return false;
-             } else if (damagesource.is(DamageTypeTags.IGNITES_ARMOR_STANDS)) {
-                 if (this.isOnFire()) {
-@@ -474,7 +527,7 @@
-                     if (damagesource.isCreativePlayer()) {
-                         this.playBrokenSound();
-                         this.showBreakingParticles();
--                        this.kill(worldserver);
-+                        this.kill(worldserver, damagesource); // CraftBukkit
-                         return true;
-                     } else {
-                         long i = worldserver.getGameTime();
-@@ -486,7 +539,7 @@
-                         } else {
-                             this.brokenByPlayer(worldserver, damagesource);
-                             this.showBreakingParticles();
--                            this.kill(worldserver);
-+                            this.discard(EntityRemoveEvent.Cause.DEATH); // CraftBukkit - SPIGOT-4890: remain as this.discard() since above damagesource method will call death event
-                         }
- 
-                         return true;
-@@ -536,7 +589,7 @@
-         f1 -= f;
-         if (f1 <= 0.5F) {
-             this.brokenByAnything(worldserver, damagesource);
--            this.kill(worldserver);
-+            this.kill(worldserver, damagesource); // CraftBukkit
-         } else {
-             this.setHealth(f1);
-             this.gameEvent(GameEvent.ENTITY_DAMAGE, damagesource.getEntity());
-@@ -548,13 +601,13 @@
-         ItemStack itemstack = new ItemStack(Items.ARMOR_STAND);
- 
-         itemstack.set(DataComponents.CUSTOM_NAME, this.getCustomName());
--        Block.popResource(this.level(), this.blockPosition(), itemstack);
-+        drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); // CraftBukkit - add to drops
-         this.brokenByAnything(worldserver, damagesource);
-     }
- 
-     private void brokenByAnything(WorldServer worldserver, DamageSource damagesource) {
-         this.playBrokenSound();
--        this.dropAllDeathLoot(worldserver, damagesource);
-+        // this.dropAllDeathLoot(worldserver, damagesource); // CraftBukkit - moved down
- 
-         ItemStack itemstack;
-         int i;
-@@ -562,7 +615,7 @@
-         for (i = 0; i < this.handItems.size(); ++i) {
-             itemstack = (ItemStack) this.handItems.get(i);
-             if (!itemstack.isEmpty()) {
--                Block.popResource(this.level(), this.blockPosition().above(), itemstack);
-+                drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); // CraftBukkit - add to drops
-                 this.handItems.set(i, ItemStack.EMPTY);
-             }
-         }
-@@ -570,10 +623,11 @@
-         for (i = 0; i < this.armorItems.size(); ++i) {
-             itemstack = (ItemStack) this.armorItems.get(i);
-             if (!itemstack.isEmpty()) {
--                Block.popResource(this.level(), this.blockPosition().above(), itemstack);
-+                drops.add(org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack)); // CraftBukkit - add to drops
-                 this.armorItems.set(i, ItemStack.EMPTY);
-             }
-         }
-+        this.dropAllDeathLoot(worldserver, damagesource); // CraftBukkit - moved from above
- 
-     }
- 
-@@ -664,9 +718,23 @@
-         return this.isSmall();
-     }
- 
-+    // CraftBukkit start
-+    @Override
-+    public boolean shouldDropExperience() {
-+        return true; // MC-157395, SPIGOT-5193 even baby (small) armor stands should drop
-+    }
-+    // CraftBukkit end
-+
-     @Override
-     public void kill(WorldServer worldserver) {
--        this.remove(Entity.RemovalReason.KILLED);
-+        // CraftBukkit start - pass DamageSource for kill
-+        this.kill(worldserver, null);
-+    }
-+
-+    public void kill(WorldServer worldserver, DamageSource damageSource) {
-+        org.bukkit.craftbukkit.event.CraftEventFactory.callEntityDeathEvent(this, (damageSource == null ? this.damageSources().genericKill() : damageSource), drops); // CraftBukkit - call event
-+        this.remove(Entity.RemovalReason.KILLED, EntityRemoveEvent.Cause.DEATH); // CraftBukkit - add Bukkit remove cause
-+        // CraftBukkit end
-         this.gameEvent(GameEvent.ENTITY_DIE);
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/decoration/EntityItemFrame.patch b/paper-server/patches/sources/net/minecraft/world/entity/decoration/EntityItemFrame.patch
deleted file mode 100644
index 26a8dd92d6..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/decoration/EntityItemFrame.patch
+++ /dev/null
@@ -1,48 +0,0 @@
---- a/net/minecraft/world/entity/decoration/EntityItemFrame.java
-+++ b/net/minecraft/world/entity/decoration/EntityItemFrame.java
-@@ -91,6 +91,12 @@
- 
-     @Override
-     protected AxisAlignedBB calculateBoundingBox(BlockPosition blockposition, EnumDirection enumdirection) {
-+        // CraftBukkit start - break out BB calc into own method
-+        return calculateBoundingBoxStatic(blockposition, enumdirection);
-+    }
-+
-+    public static AxisAlignedBB calculateBoundingBoxStatic(BlockPosition blockposition, EnumDirection enumdirection) {
-+        // CraftBukkit end
-         float f = 0.46875F;
-         Vec3D vec3d = Vec3D.atCenterOf(blockposition).relative(enumdirection, -0.46875D);
-         EnumDirection.EnumAxis enumdirection_enumaxis = enumdirection.getAxis();
-@@ -155,6 +161,11 @@
-             if (this.isInvulnerableToBase(damagesource)) {
-                 return false;
-             } else if (this.shouldDamageDropItem(damagesource)) {
-+                // CraftBukkit start - fire EntityDamageEvent
-+                if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f, false) || this.isRemoved()) {
-+                    return true;
-+                }
-+                // CraftBukkit end
-                 this.dropItem(worldserver, damagesource.getEntity(), false);
-                 this.gameEvent(GameEvent.BLOCK_CHANGE, damagesource.getEntity());
-                 this.playSound(this.getRemoveItemSound(), 1.0F, 1.0F);
-@@ -267,13 +278,19 @@
-     }
- 
-     public void setItem(ItemStack itemstack, boolean flag) {
-+        // CraftBukkit start
-+        this.setItem(itemstack, flag, true);
-+    }
-+
-+    public void setItem(ItemStack itemstack, boolean flag, boolean playSound) {
-+        // CraftBukkit end
-         if (!itemstack.isEmpty()) {
-             itemstack = itemstack.copyWithCount(1);
-         }
- 
-         this.onItemChanged(itemstack);
-         this.getEntityData().set(EntityItemFrame.DATA_ITEM, itemstack);
--        if (!itemstack.isEmpty()) {
-+        if (!itemstack.isEmpty() && playSound) { // CraftBukkit
-             this.playSound(this.getAddItemSound(), 1.0F, 1.0F);
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/decoration/EntityPainting.patch b/paper-server/patches/sources/net/minecraft/world/entity/decoration/EntityPainting.patch
deleted file mode 100644
index ac5b3f26bd..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/decoration/EntityPainting.patch
+++ /dev/null
@@ -1,51 +0,0 @@
---- a/net/minecraft/world/entity/decoration/EntityPainting.java
-+++ b/net/minecraft/world/entity/decoration/EntityPainting.java
-@@ -72,7 +72,7 @@
-     public static Optional<EntityPainting> create(World world, BlockPosition blockposition, EnumDirection enumdirection) {
-         EntityPainting entitypainting = new EntityPainting(world, blockposition);
-         List<Holder<PaintingVariant>> list = new ArrayList();
--        Iterable iterable = world.registryAccess().lookupOrThrow(Registries.PAINTING_VARIANT).getTagOrEmpty(PaintingVariantTags.PLACEABLE);
-+        Iterable<Holder<PaintingVariant>> iterable = world.registryAccess().lookupOrThrow(Registries.PAINTING_VARIANT).getTagOrEmpty(PaintingVariantTags.PLACEABLE); // CraftBukkit - decompile error
- 
-         Objects.requireNonNull(list);
-         iterable.forEach(list::add);
-@@ -138,22 +138,32 @@
- 
-     @Override
-     protected AxisAlignedBB calculateBoundingBox(BlockPosition blockposition, EnumDirection enumdirection) {
-+        // CraftBukkit start
-+        PaintingVariant paintingvariant = (PaintingVariant) this.getVariant().value();
-+        return calculateBoundingBoxStatic(blockposition, enumdirection, paintingvariant.width(), paintingvariant.height());
-+    }
-+
-+    public static AxisAlignedBB calculateBoundingBoxStatic(BlockPosition blockposition, EnumDirection enumdirection, int width, int height) {
-+        // CraftBukkit end
-         float f = 0.46875F;
-         Vec3D vec3d = Vec3D.atCenterOf(blockposition).relative(enumdirection, -0.46875D);
--        PaintingVariant paintingvariant = (PaintingVariant) this.getVariant().value();
--        double d0 = this.offsetForPaintingSize(paintingvariant.width());
--        double d1 = this.offsetForPaintingSize(paintingvariant.height());
-+        // CraftBukkit start
-+        double d0 = offsetForPaintingSize(width);
-+        double d1 = offsetForPaintingSize(height);
-+        // CraftBukkit end
-         EnumDirection enumdirection1 = enumdirection.getCounterClockWise();
-         Vec3D vec3d1 = vec3d.relative(enumdirection1, d0).relative(EnumDirection.UP, d1);
-         EnumDirection.EnumAxis enumdirection_enumaxis = enumdirection.getAxis();
--        double d2 = enumdirection_enumaxis == EnumDirection.EnumAxis.X ? 0.0625D : (double) paintingvariant.width();
--        double d3 = (double) paintingvariant.height();
--        double d4 = enumdirection_enumaxis == EnumDirection.EnumAxis.Z ? 0.0625D : (double) paintingvariant.width();
-+        // CraftBukkit start
-+        double d2 = enumdirection_enumaxis == EnumDirection.EnumAxis.X ? 0.0625D : (double) width;
-+        double d3 = (double) height;
-+        double d4 = enumdirection_enumaxis == EnumDirection.EnumAxis.Z ? 0.0625D : (double) width;
-+        // CraftBukkit end
- 
-         return AxisAlignedBB.ofSize(vec3d1, d2, d3, d4);
-     }
- 
--    private double offsetForPaintingSize(int i) {
-+    private static double offsetForPaintingSize(int i) { // CraftBukkit - static
-         return i % 2 == 0 ? 0.5D : 0.0D;
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/decoration/ItemFrame.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/decoration/ItemFrame.java.patch
new file mode 100644
index 0000000000..9ab163c222
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/decoration/ItemFrame.java.patch
@@ -0,0 +1,62 @@
+--- a/net/minecraft/world/entity/decoration/ItemFrame.java
++++ b/net/minecraft/world/entity/decoration/ItemFrame.java
+@@ -91,9 +91,15 @@
+ 
+     @Override
+     protected AABB calculateBoundingBox(BlockPos pos, Direction side) {
++        // CraftBukkit start - break out BB calc into own method
++        return ItemFrame.calculateBoundingBoxStatic(pos, side);
++    }
++
++    public static AABB calculateBoundingBoxStatic(BlockPos blockposition, Direction enumdirection) {
++        // CraftBukkit end
+         float f = 0.46875F;
+-        Vec3 vec3d = Vec3.atCenterOf(pos).relative(side, -0.46875D);
+-        Direction.Axis enumdirection_enumaxis = side.getAxis();
++        Vec3 vec3d = Vec3.atCenterOf(blockposition).relative(enumdirection, -0.46875D);
++        Direction.Axis enumdirection_enumaxis = enumdirection.getAxis();
+         double d0 = enumdirection_enumaxis == Direction.Axis.X ? 0.0625D : 0.75D;
+         double d1 = enumdirection_enumaxis == Direction.Axis.Y ? 0.0625D : 0.75D;
+         double d2 = enumdirection_enumaxis == Direction.Axis.Z ? 0.0625D : 0.75D;
+@@ -155,6 +161,11 @@
+             if (this.isInvulnerableToBase(source)) {
+                 return false;
+             } else if (this.shouldDamageDropItem(source)) {
++                // CraftBukkit start - fire EntityDamageEvent
++                if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, source, amount, false) || this.isRemoved()) {
++                    return true;
++                }
++                // CraftBukkit end
+                 this.dropItem(world, source.getEntity(), false);
+                 this.gameEvent(GameEvent.BLOCK_CHANGE, source.getEntity());
+                 this.playSound(this.getRemoveItemSound(), 1.0F, 1.0F);
+@@ -267,17 +278,23 @@
+     }
+ 
+     public void setItem(ItemStack value, boolean update) {
+-        if (!value.isEmpty()) {
+-            value = value.copyWithCount(1);
++        // CraftBukkit start
++        this.setItem(value, update, true);
++    }
++
++    public void setItem(ItemStack itemstack, boolean flag, boolean playSound) {
++        // CraftBukkit end
++        if (!itemstack.isEmpty()) {
++            itemstack = itemstack.copyWithCount(1);
+         }
+ 
+-        this.onItemChanged(value);
+-        this.getEntityData().set(ItemFrame.DATA_ITEM, value);
+-        if (!value.isEmpty()) {
++        this.onItemChanged(itemstack);
++        this.getEntityData().set(ItemFrame.DATA_ITEM, itemstack);
++        if (!itemstack.isEmpty() && playSound) { // CraftBukkit
+             this.playSound(this.getAddItemSound(), 1.0F, 1.0F);
+         }
+ 
+-        if (update && this.pos != null) {
++        if (flag && this.pos != null) {
+             this.level().updateNeighbourForOutputSignal(this.pos, Blocks.AIR);
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/decoration/EntityLeash.patch b/paper-server/patches/sources/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java.patch
similarity index 59%
rename from paper-server/patches/sources/net/minecraft/world/entity/decoration/EntityLeash.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java.patch
index ea827c1f59..413ff7ba00 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/decoration/EntityLeash.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java.patch
@@ -1,27 +1,35 @@
---- a/net/minecraft/world/entity/decoration/EntityLeash.java
-+++ b/net/minecraft/world/entity/decoration/EntityLeash.java
-@@ -27,6 +27,13 @@
- import net.minecraft.world.phys.AxisAlignedBB;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import net.minecraft.network.protocol.game.PacketPlayOutAttachEntity;
-+import net.minecraft.server.level.EntityPlayer;
+--- a/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java
++++ b/net/minecraft/world/entity/decoration/LeashFenceKnotEntity.java
+@@ -8,9 +8,11 @@
+ import net.minecraft.network.protocol.Packet;
+ import net.minecraft.network.protocol.game.ClientGamePacketListener;
+ import net.minecraft.network.protocol.game.ClientboundAddEntityPacket;
++import net.minecraft.network.protocol.game.ClientboundSetEntityLinkPacket;
+ import net.minecraft.network.syncher.SynchedEntityData;
+ import net.minecraft.server.level.ServerEntity;
+ import net.minecraft.server.level.ServerLevel;
++import net.minecraft.server.level.ServerPlayer;
+ import net.minecraft.sounds.SoundEvents;
+ import net.minecraft.tags.BlockTags;
+ import net.minecraft.world.InteractionHand;
+@@ -26,6 +28,9 @@
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import net.minecraft.world.phys.AABB;
+ import net.minecraft.world.phys.Vec3;
 +import org.bukkit.craftbukkit.event.CraftEventFactory;
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +// CraftBukkit end
-+
- public class EntityLeash extends BlockAttachedEntity {
  
-     public static final double OFFSET_Y = 0.375D;
-@@ -85,6 +92,15 @@
+ public class LeashFenceKnotEntity extends BlockAttachedEntity {
+ 
+@@ -85,6 +90,15 @@
                  Leashable leashable = (Leashable) iterator.next();
  
-                 if (leashable.getLeashHolder() == entityhuman) {
+                 if (leashable.getLeashHolder() == player) {
 +                    // CraftBukkit start
 +                    if (leashable instanceof Entity leashed) {
-+                        if (CraftEventFactory.callPlayerLeashEntityEvent(leashed, this, entityhuman, enumhand).isCancelled()) {
-+                            ((EntityPlayer) entityhuman).connection.send(new PacketPlayOutAttachEntity(leashed, leashable.getLeashHolder()));
++                        if (CraftEventFactory.callPlayerLeashEntityEvent(leashed, this, player, hand).isCancelled()) {
++                            ((ServerPlayer) player).connection.send(new ClientboundSetEntityLinkPacket(leashed, leashable.getLeashHolder()));
 +                            flag = true; // Also set true when the event is cancelled otherwise it tries to unleash the entities
 +                            continue;
 +                        }
@@ -30,17 +38,17 @@
                      leashable.setLeashedTo(this, true);
                      flag = true;
                  }
-@@ -93,18 +109,38 @@
+@@ -93,18 +107,38 @@
              boolean flag1 = false;
  
              if (!flag) {
 -                this.discard();
--                if (entityhuman.getAbilities().instabuild) {
+-                if (player.getAbilities().instabuild) {
 +                // CraftBukkit start - Move below
 +                // this.discard();
 +                boolean die = true;
 +                // CraftBukkit end
-+                if (true || entityhuman.getAbilities().instabuild) { // CraftBukkit - Process for non-creative as well
++                if (true || player.getAbilities().instabuild) { // CraftBukkit - Process for non-creative as well
                      Iterator iterator1 = list.iterator();
  
                      while (iterator1.hasNext()) {
@@ -50,12 +58,12 @@
 -                            leashable1.removeLeash();
 +                            // CraftBukkit start
 +                            if (leashable1 instanceof Entity leashed) {
-+                                if (CraftEventFactory.callPlayerUnleashEntityEvent(leashed, entityhuman, enumhand).isCancelled()) {
++                                if (CraftEventFactory.callPlayerUnleashEntityEvent(leashed, player, hand).isCancelled()) {
 +                                    die = false;
 +                                    continue;
 +                                }
 +                            }
-+                            if (entityhuman.getAbilities().instabuild){
++                            if (player.getAbilities().instabuild){
 +                                leashable1.removeLeash();
 +                            } else {
 +                                leashable1.dropLeash();
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/decoration/Painting.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/decoration/Painting.java.patch
new file mode 100644
index 0000000000..122466b765
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/decoration/Painting.java.patch
@@ -0,0 +1,54 @@
+--- a/net/minecraft/world/entity/decoration/Painting.java
++++ b/net/minecraft/world/entity/decoration/Painting.java
+@@ -72,7 +72,7 @@
+     public static Optional<Painting> create(Level world, BlockPos pos, Direction facing) {
+         Painting entitypainting = new Painting(world, pos);
+         List<Holder<PaintingVariant>> list = new ArrayList();
+-        Iterable iterable = world.registryAccess().lookupOrThrow(Registries.PAINTING_VARIANT).getTagOrEmpty(PaintingVariantTags.PLACEABLE);
++        Iterable<Holder<PaintingVariant>> iterable = world.registryAccess().lookupOrThrow(Registries.PAINTING_VARIANT).getTagOrEmpty(PaintingVariantTags.PLACEABLE); // CraftBukkit - decompile error
+ 
+         Objects.requireNonNull(list);
+         iterable.forEach(list::add);
+@@ -138,22 +138,32 @@
+ 
+     @Override
+     protected AABB calculateBoundingBox(BlockPos pos, Direction side) {
+-        float f = 0.46875F;
+-        Vec3 vec3d = Vec3.atCenterOf(pos).relative(side, -0.46875D);
++        // CraftBukkit start
+         PaintingVariant paintingvariant = (PaintingVariant) this.getVariant().value();
+-        double d0 = this.offsetForPaintingSize(paintingvariant.width());
+-        double d1 = this.offsetForPaintingSize(paintingvariant.height());
+-        Direction enumdirection1 = side.getCounterClockWise();
++        return Painting.calculateBoundingBoxStatic(pos, side, paintingvariant.width(), paintingvariant.height());
++    }
++
++    public static AABB calculateBoundingBoxStatic(BlockPos blockposition, Direction enumdirection, int width, int height) {
++        // CraftBukkit end
++        float f = 0.46875F;
++        Vec3 vec3d = Vec3.atCenterOf(blockposition).relative(enumdirection, -0.46875D);
++        // CraftBukkit start
++        double d0 = Painting.offsetForPaintingSize(width);
++        double d1 = Painting.offsetForPaintingSize(height);
++        // CraftBukkit end
++        Direction enumdirection1 = enumdirection.getCounterClockWise();
+         Vec3 vec3d1 = vec3d.relative(enumdirection1, d0).relative(Direction.UP, d1);
+-        Direction.Axis enumdirection_enumaxis = side.getAxis();
+-        double d2 = enumdirection_enumaxis == Direction.Axis.X ? 0.0625D : (double) paintingvariant.width();
+-        double d3 = (double) paintingvariant.height();
+-        double d4 = enumdirection_enumaxis == Direction.Axis.Z ? 0.0625D : (double) paintingvariant.width();
++        Direction.Axis enumdirection_enumaxis = enumdirection.getAxis();
++        // CraftBukkit start
++        double d2 = enumdirection_enumaxis == Direction.Axis.X ? 0.0625D : (double) width;
++        double d3 = (double) height;
++        double d4 = enumdirection_enumaxis == Direction.Axis.Z ? 0.0625D : (double) width;
++        // CraftBukkit end
+ 
+         return AABB.ofSize(vec3d1, d2, d3, d4);
+     }
+ 
+-    private double offsetForPaintingSize(int length) {
++    private static double offsetForPaintingSize(int length) { // CraftBukkit - static
+         return length % 2 == 0 ? 0.5D : 0.0D;
+     }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/item/EntityFallingBlock.patch b/paper-server/patches/sources/net/minecraft/world/entity/item/FallingBlockEntity.java.patch
similarity index 69%
rename from paper-server/patches/sources/net/minecraft/world/entity/item/EntityFallingBlock.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/item/FallingBlockEntity.java.patch
index 183c3b9570..da4d2151e8 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/item/EntityFallingBlock.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/item/FallingBlockEntity.java.patch
@@ -1,7 +1,7 @@
---- a/net/minecraft/world/entity/item/EntityFallingBlock.java
-+++ b/net/minecraft/world/entity/item/EntityFallingBlock.java
+--- a/net/minecraft/world/entity/item/FallingBlockEntity.java
++++ b/net/minecraft/world/entity/item/FallingBlockEntity.java
 @@ -52,6 +52,11 @@
- import net.minecraft.world.phys.Vec3D;
+ import net.minecraft.world.phys.Vec3;
  import org.slf4j.Logger;
  
 +// CraftBukkit start;
@@ -9,24 +9,26 @@
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +// CraftBukkit end
 +
- public class EntityFallingBlock extends Entity {
+ public class FallingBlockEntity extends Entity {
  
      private static final Logger LOGGER = LogUtils.getLogger();
 @@ -87,10 +92,17 @@
      }
  
-     public static EntityFallingBlock fall(World world, BlockPosition blockposition, IBlockData iblockdata) {
+     public static FallingBlockEntity fall(Level world, BlockPos pos, BlockState state) {
+-        FallingBlockEntity entityfallingblock = new FallingBlockEntity(world, (double) pos.getX() + 0.5D, (double) pos.getY(), (double) pos.getZ() + 0.5D, state.hasProperty(BlockStateProperties.WATERLOGGED) ? (BlockState) state.setValue(BlockStateProperties.WATERLOGGED, false) : state);
 +        // CraftBukkit start
-+        return fall(world, blockposition, iblockdata, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT);
++        return FallingBlockEntity.fall(world, pos, state, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT);
 +    }
-+
-+    public static EntityFallingBlock fall(World world, BlockPosition blockposition, IBlockData iblockdata, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) {
-+        // CraftBukkit end
-         EntityFallingBlock entityfallingblock = new EntityFallingBlock(world, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, iblockdata.hasProperty(BlockProperties.WATERLOGGED) ? (IBlockData) iblockdata.setValue(BlockProperties.WATERLOGGED, false) : iblockdata);
-+        if (!CraftEventFactory.callEntityChangeBlockEvent(entityfallingblock, blockposition, iblockdata.getFluidState().createLegacyBlock())) return entityfallingblock; // CraftBukkit
  
-         world.setBlock(blockposition, iblockdata.getFluidState().createLegacyBlock(), 3);
+-        world.setBlock(pos, state.getFluidState().createLegacyBlock(), 3);
 -        world.addFreshEntity(entityfallingblock);
++    public static FallingBlockEntity fall(Level world, BlockPos blockposition, BlockState iblockdata, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason spawnReason) {
++        // CraftBukkit end
++        FallingBlockEntity entityfallingblock = new FallingBlockEntity(world, (double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, iblockdata.hasProperty(BlockStateProperties.WATERLOGGED) ? (BlockState) iblockdata.setValue(BlockStateProperties.WATERLOGGED, false) : iblockdata);
++        if (!CraftEventFactory.callEntityChangeBlockEvent(entityfallingblock, blockposition, iblockdata.getFluidState().createLegacyBlock())) return entityfallingblock; // CraftBukkit
++
++        world.setBlock(blockposition, iblockdata.getFluidState().createLegacyBlock(), 3);
 +        world.addFreshEntity(entityfallingblock, spawnReason); // CraftBukkit
          return entityfallingblock;
      }
@@ -41,16 +43,16 @@
              Block block = this.blockState.getBlock();
  
 @@ -174,7 +186,7 @@
-                                 this.spawnAtLocation(worldserver, (IMaterial) block);
+                                 this.spawnAtLocation(worldserver, (ItemLike) block);
                              }
  
 -                            this.discard();
 +                            this.discard(EntityRemoveEvent.Cause.DROP); // CraftBukkit - add Bukkit remove cause
                          }
                      } else {
-                         IBlockData iblockdata = this.level().getBlockState(blockposition);
+                         BlockState iblockdata = this.level().getBlockState(blockposition);
 @@ -191,9 +203,15 @@
-                                         this.blockState = (IBlockData) this.blockState.setValue(BlockProperties.WATERLOGGED, true);
+                                         this.blockState = (BlockState) this.blockState.setValue(BlockStateProperties.WATERLOGGED, true);
                                      }
  
 +                                    // CraftBukkit start
@@ -60,7 +62,7 @@
 +                                    }
 +                                    // CraftBukkit end
                                      if (this.level().setBlock(blockposition, this.blockState, 3)) {
-                                         ((WorldServer) this.level()).getChunkSource().chunkMap.broadcast(this, new PacketPlayOutBlockChange(blockposition, this.level().getBlockState(blockposition)));
+                                         ((ServerLevel) this.level()).getChunkSource().chunkMap.broadcast(this, new ClientboundBlockUpdatePacket(blockposition, this.level().getBlockState(blockposition)));
 -                                        this.discard();
 +                                        this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
                                          if (block instanceof Fallable) {
@@ -73,14 +75,14 @@
 -                                        this.discard();
 +                                        this.discard(EntityRemoveEvent.Cause.DROP); // CraftBukkit - add Bukkit remove cause
                                          this.callOnBrokenAfterFall(block, blockposition);
-                                         this.spawnAtLocation(worldserver, (IMaterial) block);
+                                         this.spawnAtLocation(worldserver, (ItemLike) block);
                                      }
                                  } else {
 -                                    this.discard();
 +                                    this.discard(EntityRemoveEvent.Cause.DROP); // CraftBukkit - add Bukkit remove cause
                                      if (this.dropItem && worldserver.getGameRules().getBoolean(GameRules.RULE_DOENTITYDROPS)) {
                                          this.callOnBrokenAfterFall(block, blockposition);
-                                         this.spawnAtLocation(worldserver, (IMaterial) block);
+                                         this.spawnAtLocation(worldserver, (ItemLike) block);
                                      }
                                  }
                              } else {
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/item/EntityItem.patch b/paper-server/patches/sources/net/minecraft/world/entity/item/ItemEntity.java.patch
similarity index 58%
rename from paper-server/patches/sources/net/minecraft/world/entity/item/EntityItem.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/item/ItemEntity.java.patch
index 7dac6e9b40..4f490795db 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/item/EntityItem.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/item/ItemEntity.java.patch
@@ -1,30 +1,68 @@
---- a/net/minecraft/world/entity/item/EntityItem.java
-+++ b/net/minecraft/world/entity/item/EntityItem.java
-@@ -34,6 +34,15 @@
+--- a/net/minecraft/world/entity/item/ItemEntity.java
++++ b/net/minecraft/world/entity/item/ItemEntity.java
+@@ -5,18 +5,6 @@
+ import java.util.Objects;
+ import java.util.UUID;
+ import javax.annotation.Nullable;
+-import net.minecraft.core.BlockPos;
+-import net.minecraft.nbt.CompoundTag;
+-import net.minecraft.network.chat.Component;
+-import net.minecraft.network.syncher.EntityDataAccessor;
+-import net.minecraft.network.syncher.EntityDataSerializers;
+-import net.minecraft.network.syncher.SynchedEntityData;
+-import net.minecraft.server.level.ServerLevel;
+-import net.minecraft.sounds.SoundSource;
+-import net.minecraft.stats.Stats;
+-import net.minecraft.tags.FluidTags;
+-import net.minecraft.tags.ItemTags;
+-import net.minecraft.util.Mth;
+ import net.minecraft.world.damagesource.DamageSource;
+ import net.minecraft.world.entity.Entity;
+ import net.minecraft.world.entity.EntityType;
+@@ -24,7 +12,6 @@
+ import net.minecraft.world.entity.MoverType;
+ import net.minecraft.world.entity.SlotAccess;
+ import net.minecraft.world.entity.TraceableEntity;
+-import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.item.Item;
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.level.Explosion;
+@@ -33,6 +20,26 @@
+ import net.minecraft.world.level.gameevent.GameEvent;
  import net.minecraft.world.level.portal.TeleportTransition;
- import net.minecraft.world.phys.Vec3D;
- 
+ import net.minecraft.world.phys.Vec3;
++import net.minecraft.core.BlockPos;
++import net.minecraft.nbt.CompoundTag;
++import net.minecraft.network.chat.Component;
++import net.minecraft.network.syncher.EntityDataAccessor;
++import net.minecraft.network.syncher.EntityDataSerializers;
++import net.minecraft.network.syncher.SynchedEntityData;
 +// CraftBukkit start
 +import net.minecraft.server.MinecraftServer;
++import net.minecraft.server.level.ServerLevel;
++import net.minecraft.sounds.SoundSource;
++import net.minecraft.stats.Stats;
++import net.minecraft.tags.FluidTags;
++import net.minecraft.tags.ItemTags;
++import net.minecraft.util.Mth;
 +import org.bukkit.craftbukkit.event.CraftEventFactory;
 +import org.bukkit.entity.Player;
 +import org.bukkit.event.entity.EntityPickupItemEvent;
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +import org.bukkit.event.player.PlayerPickupItemEvent;
 +// CraftBukkit end
-+
- public class EntityItem extends Entity implements TraceableEntity {
  
-     private static final DataWatcherObject<ItemStack> DATA_ITEM = DataWatcher.defineId(EntityItem.class, DataWatcherRegistry.ITEM_STACK);
-@@ -52,6 +61,7 @@
+ public class ItemEntity extends Entity implements TraceableEntity {
+ 
+@@ -52,6 +59,7 @@
      @Nullable
      public UUID target;
      public final float bobOffs;
 +    private int lastTick = MinecraftServer.currentTick - 1; // CraftBukkit
  
-     public EntityItem(EntityTypes<? extends EntityItem> entitytypes, World world) {
-         super(entitytypes, world);
-@@ -133,12 +143,15 @@
+     public ItemEntity(EntityType<? extends ItemEntity> type, Level world) {
+         super(type, world);
+@@ -133,12 +141,15 @@
      @Override
      public void tick() {
          if (this.getItem().isEmpty()) {
@@ -44,7 +82,7 @@
  
              this.xo = this.getX();
              this.yo = this.getY();
-@@ -188,9 +201,11 @@
+@@ -188,9 +199,11 @@
                  this.mergeWithNeighbours();
              }
  
@@ -56,7 +94,7 @@
  
              this.hasImpulse |= this.updateInWaterStateAndDoFluidPushing();
              if (!this.level().isClientSide) {
-@@ -202,7 +217,13 @@
+@@ -202,7 +215,13 @@
              }
  
              if (!this.level().isClientSide && this.age >= 6000) {
@@ -71,36 +109,36 @@
              }
  
          }
-@@ -287,11 +308,16 @@
+@@ -287,11 +306,16 @@
      }
  
-     private static void merge(EntityItem entityitem, ItemStack itemstack, EntityItem entityitem1, ItemStack itemstack1) {
+     private static void merge(ItemEntity targetEntity, ItemStack targetStack, ItemEntity sourceEntity, ItemStack sourceStack) {
 +        // CraftBukkit start
-+        if (!CraftEventFactory.callItemMergeEvent(entityitem1, entityitem)) {
++        if (!CraftEventFactory.callItemMergeEvent(sourceEntity, targetEntity)) {
 +            return;
 +        }
 +        // CraftBukkit end
-         merge(entityitem, itemstack, itemstack1);
-         entityitem.pickupDelay = Math.max(entityitem.pickupDelay, entityitem1.pickupDelay);
-         entityitem.age = Math.min(entityitem.age, entityitem1.age);
-         if (itemstack1.isEmpty()) {
--            entityitem1.discard();
-+            entityitem1.discard(EntityRemoveEvent.Cause.MERGE); // CraftBukkit - add Bukkit remove cause);
+         ItemEntity.merge(targetEntity, targetStack, sourceStack);
+         targetEntity.pickupDelay = Math.max(targetEntity.pickupDelay, sourceEntity.pickupDelay);
+         targetEntity.age = Math.min(targetEntity.age, sourceEntity.age);
+         if (sourceStack.isEmpty()) {
+-            sourceEntity.discard();
++            sourceEntity.discard(EntityRemoveEvent.Cause.MERGE); // CraftBukkit - add Bukkit remove cause);
          }
  
      }
-@@ -320,12 +346,17 @@
-         } else if (!this.getItem().canBeHurtBy(damagesource)) {
+@@ -320,12 +344,17 @@
+         } else if (!this.getItem().canBeHurtBy(source)) {
              return false;
          } else {
 +            // CraftBukkit start
-+            if (CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f)) {
++            if (CraftEventFactory.handleNonLivingEntityDamageEvent(this, source, amount)) {
 +                return false;
 +            }
 +            // CraftBukkit end
              this.markHurt();
-             this.health = (int) ((float) this.health - f);
-             this.gameEvent(GameEvent.ENTITY_DAMAGE, damagesource.getEntity());
+             this.health = (int) ((float) this.health - amount);
+             this.gameEvent(GameEvent.ENTITY_DAMAGE, source.getEntity());
              if (this.health <= 0) {
                  this.getItem().onDestroyed(this);
 -                this.discard();
@@ -108,7 +146,7 @@
              }
  
              return true;
-@@ -382,7 +413,7 @@
+@@ -382,22 +411,62 @@
          }
  
          if (this.getItem().isEmpty()) {
@@ -117,18 +155,23 @@
          }
  
      }
-@@ -394,10 +425,50 @@
+ 
+     @Override
+-    public void playerTouch(Player player) {
++    public void playerTouch(net.minecraft.world.entity.player.Player player) {
+         if (!this.level().isClientSide) {
+             ItemStack itemstack = this.getItem();
              Item item = itemstack.getItem();
              int i = itemstack.getCount();
  
 +            // CraftBukkit start - fire PlayerPickupItemEvent
-+            int canHold = entityhuman.getInventory().canHold(itemstack);
++            int canHold = player.getInventory().canHold(itemstack);
 +            int remaining = i - canHold;
 +
 +            if (this.pickupDelay <= 0 && canHold > 0) {
 +                itemstack.setCount(canHold);
 +                // Call legacy event
-+                PlayerPickupItemEvent playerEvent = new PlayerPickupItemEvent((Player) entityhuman.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining);
++                PlayerPickupItemEvent playerEvent = new PlayerPickupItemEvent((Player) player.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining);
 +                playerEvent.setCancelled(!playerEvent.getPlayer().getCanPickupItems());
 +                this.level().getCraftServer().getPluginManager().callEvent(playerEvent);
 +                if (playerEvent.isCancelled()) {
@@ -137,7 +180,7 @@
 +                }
 +
 +                // Call newer event afterwards
-+                EntityPickupItemEvent entityEvent = new EntityPickupItemEvent((Player) entityhuman.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining);
++                EntityPickupItemEvent entityEvent = new EntityPickupItemEvent((Player) player.getBukkitEntity(), (org.bukkit.entity.Item) this.getBukkitEntity(), remaining);
 +                entityEvent.setCancelled(!entityEvent.getEntity().getCanPickupItems());
 +                this.level().getCraftServer().getPluginManager().callEvent(entityEvent);
 +                if (entityEvent.isCancelled()) {
@@ -161,8 +204,8 @@
 +            }
 +            // CraftBukkit end
 +
-             if (this.pickupDelay == 0 && (this.target == null || this.target.equals(entityhuman.getUUID())) && entityhuman.getInventory().add(itemstack)) {
-                 entityhuman.take(this, i);
+             if (this.pickupDelay == 0 && (this.target == null || this.target.equals(player.getUUID())) && player.getInventory().add(itemstack)) {
+                 player.take(this, i);
                  if (itemstack.isEmpty()) {
 -                    this.discard();
 +                    this.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/item/EntityTNTPrimed.patch b/paper-server/patches/sources/net/minecraft/world/entity/item/PrimedTnt.java.patch
similarity index 62%
rename from paper-server/patches/sources/net/minecraft/world/entity/item/EntityTNTPrimed.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/item/PrimedTnt.java.patch
index d4ea5a67de..507f2700ac 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/item/EntityTNTPrimed.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/item/PrimedTnt.java.patch
@@ -1,7 +1,7 @@
---- a/net/minecraft/world/entity/item/EntityTNTPrimed.java
-+++ b/net/minecraft/world/entity/item/EntityTNTPrimed.java
+--- a/net/minecraft/world/entity/item/PrimedTnt.java
++++ b/net/minecraft/world/entity/item/PrimedTnt.java
 @@ -27,6 +27,12 @@
- import net.minecraft.world.level.material.Fluid;
+ import net.minecraft.world.level.material.FluidState;
  import net.minecraft.world.level.portal.TeleportTransition;
  
 +// CraftBukkit start;
@@ -10,17 +10,17 @@
 +import org.bukkit.event.entity.ExplosionPrimeEvent;
 +// CraftBukkit end
 +
- public class EntityTNTPrimed extends Entity implements TraceableEntity {
+ public class PrimedTnt extends Entity implements TraceableEntity {
  
-     private static final DataWatcherObject<Integer> DATA_FUSE_ID = DataWatcher.defineId(EntityTNTPrimed.class, DataWatcherRegistry.INT);
+     private static final EntityDataAccessor<Integer> DATA_FUSE_ID = SynchedEntityData.defineId(PrimedTnt.class, EntityDataSerializers.INT);
 @@ -51,6 +57,7 @@
-     public EntityLiving owner;
+     public LivingEntity owner;
      private boolean usedPortal;
      public float explosionPower;
 +    public boolean isIncendiary = false; // CraftBukkit - add field
  
-     public EntityTNTPrimed(EntityTypes<? extends EntityTNTPrimed> entitytypes, World world) {
-         super(entitytypes, world);
+     public PrimedTnt(EntityType<? extends PrimedTnt> type, Level world) {
+         super(type, world);
 @@ -107,10 +114,13 @@
  
          this.setFuse(i);
@@ -40,13 +40,13 @@
      }
  
      private void explode() {
--        this.level().explode(this, Explosion.getDefaultDamageSource(this.level(), this), this.usedPortal ? EntityTNTPrimed.USED_PORTAL_DAMAGE_CALCULATOR : null, this.getX(), this.getY(0.0625D), this.getZ(), this.explosionPower, false, World.a.TNT);
+-        this.level().explode(this, Explosion.getDefaultDamageSource(this.level(), this), this.usedPortal ? PrimedTnt.USED_PORTAL_DAMAGE_CALCULATOR : null, this.getX(), this.getY(0.0625D), this.getZ(), this.explosionPower, false, Level.ExplosionInteraction.TNT);
 +        // CraftBukkit start
 +        ExplosionPrimeEvent event = CraftEventFactory.callExplosionPrimeEvent((org.bukkit.entity.Explosive) this.getBukkitEntity());
 +        if (event.isCancelled()) {
 +            return;
 +        }
-+        this.level().explode(this, Explosion.getDefaultDamageSource(this.level(), this), this.usedPortal ? EntityTNTPrimed.USED_PORTAL_DAMAGE_CALCULATOR : null, this.getX(), this.getY(0.0625D), this.getZ(), event.getRadius(), event.getFire(), World.a.TNT);
++        this.level().explode(this, Explosion.getDefaultDamageSource(this.level(), this), this.usedPortal ? PrimedTnt.USED_PORTAL_DAMAGE_CALCULATOR : null, this.getX(), this.getY(0.0625D), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.TNT);
 +        // CraftBukkit end
      }
  
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/AbstractSkeleton.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/AbstractSkeleton.java.patch
new file mode 100644
index 0000000000..c04eb5e81b
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/AbstractSkeleton.java.patch
@@ -0,0 +1,21 @@
+--- a/net/minecraft/world/entity/monster/AbstractSkeleton.java
++++ b/net/minecraft/world/entity/monster/AbstractSkeleton.java
+@@ -209,7 +209,17 @@
+         Level world = this.level();
+ 
+         if (world instanceof ServerLevel worldserver) {
+-            Projectile.spawnProjectileUsingShoot(entityarrow, worldserver, itemstack1, d0, d1 + d3 * 0.20000000298023224D, d2, 1.6F, (float) (14 - worldserver.getDifficulty().getId() * 4));
++            // CraftBukkit start
++            org.bukkit.event.entity.EntityShootBowEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityShootBowEvent(this, this.getMainHandItem(), null, entityarrow, net.minecraft.world.InteractionHand.MAIN_HAND, 0.8F, true);
++            if (event.isCancelled()) {
++                event.getProjectile().remove();
++                return;
++            }
++
++            if (event.getProjectile() == entityarrow.getBukkitEntity()) {
++                Projectile.spawnProjectileUsingShoot(entityarrow, worldserver, itemstack1, d0, d1 + d3 * 0.20000000298023224D, d2, 1.6F, (float) (14 - worldserver.getDifficulty().getId() * 4));
++            }
++            // CraftBukkit end
+         }
+ 
+         this.playSound(SoundEvents.SKELETON_SHOOT, 1.0F, 1.0F / (this.getRandom().nextFloat() * 0.4F + 0.8F));
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/Bogged.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Bogged.java.patch
new file mode 100644
index 0000000000..476ef98adf
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Bogged.java.patch
@@ -0,0 +1,15 @@
+--- a/net/minecraft/world/entity/monster/Bogged.java
++++ b/net/minecraft/world/entity/monster/Bogged.java
+@@ -79,6 +79,12 @@
+             if (world instanceof ServerLevel) {
+                 ServerLevel worldserver = (ServerLevel) world;
+ 
++                // CraftBukkit start
++                if (!org.bukkit.craftbukkit.event.CraftEventFactory.handlePlayerShearEntityEvent(player, this, itemstack, hand)) {
++                    this.getEntityData().markDirty(Bogged.DATA_SHEARED); // CraftBukkit - mark dirty to restore sheared state to clients
++                    return InteractionResult.PASS;
++                }
++                // CraftBukkit end
+                 this.shear(worldserver, SoundSource.PLAYERS, itemstack);
+                 this.gameEvent(GameEvent.SHEAR, player);
+                 itemstack.hurtAndBreak(1, player, getSlotForHand(hand));
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/Bogged.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Bogged.patch
deleted file mode 100644
index 8a45b0e819..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/Bogged.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/net/minecraft/world/entity/monster/Bogged.java
-+++ b/net/minecraft/world/entity/monster/Bogged.java
-@@ -79,6 +79,12 @@
-             if (world instanceof WorldServer) {
-                 WorldServer worldserver = (WorldServer) world;
- 
-+                // CraftBukkit start
-+                if (!org.bukkit.craftbukkit.event.CraftEventFactory.handlePlayerShearEntityEvent(entityhuman, this, itemstack, enumhand)) {
-+                    this.getEntityData().markDirty(Bogged.DATA_SHEARED); // CraftBukkit - mark dirty to restore sheared state to clients
-+                    return EnumInteractionResult.PASS;
-+                }
-+                // CraftBukkit end
-                 this.shear(worldserver, SoundCategory.PLAYERS, itemstack);
-                 this.gameEvent(GameEvent.SHEAR, entityhuman);
-                 itemstack.hurtAndBreak(1, entityhuman, getSlotForHand(enumhand));
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/CaveSpider.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/CaveSpider.java.patch
new file mode 100644
index 0000000000..c2449e2257
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/CaveSpider.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/entity/monster/CaveSpider.java
++++ b/net/minecraft/world/entity/monster/CaveSpider.java
+@@ -40,7 +40,7 @@
+                 }
+ 
+                 if (b0 > 0) {
+-                    ((LivingEntity) target).addEffect(new MobEffectInstance(MobEffects.POISON, b0 * 20, 0), this);
++                    ((LivingEntity) target).addEffect(new MobEffectInstance(MobEffects.POISON, b0 * 20, 0), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
+                 }
+             }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityCreeper.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Creeper.java.patch
similarity index 58%
rename from paper-server/patches/sources/net/minecraft/world/entity/monster/EntityCreeper.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/monster/Creeper.java.patch
index 158cbcb19d..0c69a72a9a 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityCreeper.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Creeper.java.patch
@@ -1,7 +1,7 @@
---- a/net/minecraft/world/entity/monster/EntityCreeper.java
-+++ b/net/minecraft/world/entity/monster/EntityCreeper.java
+--- a/net/minecraft/world/entity/monster/Creeper.java
++++ b/net/minecraft/world/entity/monster/Creeper.java
 @@ -42,6 +42,13 @@
- import net.minecraft.world.level.World;
+ import net.minecraft.world.level.Level;
  import net.minecraft.world.level.gameevent.GameEvent;
  
 +// CraftBukkit start;
@@ -11,51 +11,50 @@
 +import org.bukkit.event.entity.ExplosionPrimeEvent;
 +// CraftBukkit end
 +
- public class EntityCreeper extends EntityMonster {
+ public class Creeper extends Monster {
  
-     private static final DataWatcherObject<Integer> DATA_SWELL_DIR = DataWatcher.defineId(EntityCreeper.class, DataWatcherRegistry.INT);
+     private static final EntityDataAccessor<Integer> DATA_SWELL_DIR = SynchedEntityData.defineId(Creeper.class, EntityDataSerializers.INT);
 @@ -52,6 +59,7 @@
      public int maxSwell = 30;
      public int explosionRadius = 3;
      private int droppedSkulls;
 +    public Entity entityIgniter; // CraftBukkit
  
-     public EntityCreeper(EntityTypes<? extends EntityCreeper> entitytypes, World world) {
-         super(entitytypes, world);
-@@ -214,9 +222,20 @@
+     public Creeper(EntityType<? extends Creeper> type, Level world) {
+         super(type, world);
+@@ -214,8 +222,19 @@
      @Override
-     public void thunderHit(WorldServer worldserver, EntityLightning entitylightning) {
-         super.thunderHit(worldserver, entitylightning);
+     public void thunderHit(ServerLevel world, LightningBolt lightning) {
+         super.thunderHit(world, lightning);
 +        // CraftBukkit start
-+        if (CraftEventFactory.callCreeperPowerEvent(this, entitylightning, org.bukkit.event.entity.CreeperPowerEvent.PowerCause.LIGHTNING).isCancelled()) {
++        if (CraftEventFactory.callCreeperPowerEvent(this, lightning, org.bukkit.event.entity.CreeperPowerEvent.PowerCause.LIGHTNING).isCancelled()) {
 +            return;
 +        }
 +        // CraftBukkit end
-         this.entityData.set(EntityCreeper.DATA_IS_POWERED, true);
+         this.entityData.set(Creeper.DATA_IS_POWERED, true);
      }
- 
++
 +    // CraftBukkit start
 +    public void setPowered(boolean powered) {
-+        this.entityData.set(EntityCreeper.DATA_IS_POWERED, powered);
++        this.entityData.set(Creeper.DATA_IS_POWERED, powered);
 +    }
 +    // CraftBukkit end
-+
+ 
      @Override
-     protected EnumInteractionResult mobInteract(EntityHuman entityhuman, EnumHand enumhand) {
-         ItemStack itemstack = entityhuman.getItemInHand(enumhand);
+     protected InteractionResult mobInteract(Player player, InteractionHand hand) {
 @@ -226,8 +245,9 @@
  
-             this.level().playSound(entityhuman, this.getX(), this.getY(), this.getZ(), soundeffect, this.getSoundSource(), 1.0F, this.random.nextFloat() * 0.4F + 0.8F);
+             this.level().playSound(player, this.getX(), this.getY(), this.getZ(), soundeffect, this.getSoundSource(), 1.0F, this.random.nextFloat() * 0.4F + 0.8F);
              if (!this.level().isClientSide) {
-+                this.entityIgniter = entityhuman; // CraftBukkit
++                this.entityIgniter = player; // CraftBukkit
                  this.ignite();
 -                if (!itemstack.isDamageableItem()) {
 +                if (itemstack.getMaxDamage() == 0) { // CraftBukkit - fix MC-264285: unbreakable flint and steels are completely consumed when igniting a creeper
                      itemstack.shrink(1);
                  } else {
-                     itemstack.hurtAndBreak(1, entityhuman, getSlotForHand(enumhand));
+                     itemstack.hurtAndBreak(1, player, getSlotForHand(hand));
 @@ -246,11 +266,20 @@
-         if (world instanceof WorldServer worldserver) {
+         if (world instanceof ServerLevel worldserver) {
              float f = this.isPowered() ? 2.0F : 1.0F;
  
 +            // CraftBukkit start
@@ -63,15 +62,15 @@
 +            if (!event.isCancelled()) {
 +            // CraftBukkit end
              this.dead = true;
--            worldserver.explode(this, this.getX(), this.getY(), this.getZ(), (float) this.explosionRadius * f, World.a.MOB);
-+            worldserver.explode(this, net.minecraft.world.level.Explosion.getDefaultDamageSource(this.level(), this).customCausingEntityDamager(this.entityIgniter), null, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), World.a.MOB); // CraftBukkit
+-            worldserver.explode(this, this.getX(), this.getY(), this.getZ(), (float) this.explosionRadius * f, Level.ExplosionInteraction.MOB);
++            worldserver.explode(this, net.minecraft.world.level.Explosion.getDefaultDamageSource(this.level(), this).customCausingEntityDamager(this.entityIgniter), null, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB); // CraftBukkit
              this.spawnLingeringCloud();
              this.triggerOnDeathMobEffects(worldserver, Entity.RemovalReason.KILLED);
 -            this.discard();
 +            this.discard(EntityRemoveEvent.Cause.EXPLODE); // CraftBukkit - add Bukkit remove cause
 +            // CraftBukkit start
 +            } else {
-+                swell = 0;
++                this.swell = 0;
 +            }
 +            // CraftBukkit end
          }
@@ -79,14 +78,14 @@
      }
 @@ -261,6 +290,7 @@
          if (!collection.isEmpty()) {
-             EntityAreaEffectCloud entityareaeffectcloud = new EntityAreaEffectCloud(this.level(), this.getX(), this.getY(), this.getZ());
+             AreaEffectCloud entityareaeffectcloud = new AreaEffectCloud(this.level(), this.getX(), this.getY(), this.getZ());
  
 +            entityareaeffectcloud.setOwner(this); // CraftBukkit
              entityareaeffectcloud.setRadius(2.5F);
              entityareaeffectcloud.setRadiusOnUse(-0.5F);
              entityareaeffectcloud.setWaitTime(10);
 @@ -274,7 +304,7 @@
-                 entityareaeffectcloud.addEffect(new MobEffect(mobeffect));
+                 entityareaeffectcloud.addEffect(new MobEffectInstance(mobeffect));
              }
  
 -            this.level().addFreshEntity(entityareaeffectcloud);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/ElderGuardian.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/ElderGuardian.java.patch
new file mode 100644
index 0000000000..4561cf780f
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/ElderGuardian.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/entity/monster/ElderGuardian.java
++++ b/net/minecraft/world/entity/monster/ElderGuardian.java
+@@ -67,7 +67,7 @@
+         super.customServerAiStep(world);
+         if ((this.tickCount + this.getId()) % 1200 == 0) {
+             MobEffectInstance mobeffect = new MobEffectInstance(MobEffects.DIG_SLOWDOWN, 6000, 2);
+-            List<ServerPlayer> list = MobEffectUtil.addEffectToPlayersAround(world, this, this.position(), 50.0D, mobeffect, 1200);
++            List<ServerPlayer> list = MobEffectUtil.addEffectToPlayersAround(world, this, this.position(), 50.0D, mobeffect, 1200, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
+ 
+             list.forEach((entityplayer) -> {
+                 entityplayer.connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.GUARDIAN_ELDER_EFFECT, this.isSilent() ? 0.0F : 1.0F));
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityEnderman.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/EnderMan.java.patch
similarity index 54%
rename from paper-server/patches/sources/net/minecraft/world/entity/monster/EntityEnderman.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/monster/EnderMan.java.patch
index a8a1cf4063..167d63cd43 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityEnderman.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/EnderMan.java.patch
@@ -1,63 +1,66 @@
---- a/net/minecraft/world/entity/monster/EntityEnderman.java
-+++ b/net/minecraft/world/entity/monster/EntityEnderman.java
-@@ -69,6 +69,11 @@
- import net.minecraft.world.phys.MovingObjectPositionBlock;
- import net.minecraft.world.phys.Vec3D;
- 
+--- a/net/minecraft/world/entity/monster/EnderMan.java
++++ b/net/minecraft/world/entity/monster/EnderMan.java
+@@ -68,6 +68,10 @@
+ import net.minecraft.world.phys.AABB;
+ import net.minecraft.world.phys.BlockHitResult;
+ import net.minecraft.world.phys.Vec3;
 +// CraftBukkit start;
 +import org.bukkit.craftbukkit.event.CraftEventFactory;
 +import org.bukkit.event.entity.EntityTargetEvent;
 +// CraftBukkit end
-+
- public class EntityEnderman extends EntityMonster implements IEntityAngerable {
  
-     private static final MinecraftKey SPEED_MODIFIER_ATTACKING_ID = MinecraftKey.withDefaultNamespace("attacking");
-@@ -112,7 +117,17 @@
+ public class EnderMan extends Monster implements NeutralMob {
+ 
+@@ -112,10 +116,20 @@
  
      @Override
-     public void setTarget(@Nullable EntityLiving entityliving) {
--        super.setTarget(entityliving);
+     public void setTarget(@Nullable LivingEntity target) {
+-        super.setTarget(target);
 +        // CraftBukkit start - fire event
-+        setTarget(entityliving, EntityTargetEvent.TargetReason.UNKNOWN, true);
++        this.setTarget(target, EntityTargetEvent.TargetReason.UNKNOWN, true);
 +    }
 +
 +    @Override
-+    public boolean setTarget(EntityLiving entityliving, EntityTargetEvent.TargetReason reason, boolean fireEvent) {
++    public boolean setTarget(LivingEntity entityliving, EntityTargetEvent.TargetReason reason, boolean fireEvent) {
 +        if (!super.setTarget(entityliving, reason, fireEvent)) {
 +            return false;
 +        }
-+        entityliving = getTarget();
++        entityliving = this.getTarget();
 +        // CraftBukkit end
-         AttributeModifiable attributemodifiable = this.getAttribute(GenericAttributes.MOVEMENT_SPEED);
+         AttributeInstance attributemodifiable = this.getAttribute(Attributes.MOVEMENT_SPEED);
  
-         if (entityliving == null) {
-@@ -127,6 +142,7 @@
-                 attributemodifiable.addTransientModifier(EntityEnderman.SPEED_MODIFIER_ATTACKING);
+-        if (target == null) {
++        if (entityliving == null) {
+             this.targetChangeTime = 0;
+             this.entityData.set(EnderMan.DATA_CREEPY, false);
+             this.entityData.set(EnderMan.DATA_STARED_AT, false);
+@@ -127,6 +141,7 @@
+                 attributemodifiable.addTransientModifier(EnderMan.SPEED_MODIFIER_ATTACKING);
              }
          }
 +        return true;
  
      }
  
-@@ -465,9 +481,11 @@
+@@ -465,9 +480,11 @@
              if (iblockdata2 != null) {
                  iblockdata2 = Block.updateFromNeighbourShapes(iblockdata2, this.enderman.level(), blockposition);
                  if (this.canPlaceBlock(world, blockposition, iblockdata2, iblockdata, iblockdata1, blockposition1)) {
 +                    if (CraftEventFactory.callEntityChangeBlockEvent(this.enderman, blockposition, iblockdata2)) { // CraftBukkit - Place event
                      world.setBlock(blockposition, iblockdata2, 3);
-                     world.gameEvent((Holder) GameEvent.BLOCK_PLACE, blockposition, GameEvent.a.of(this.enderman, iblockdata2));
-                     this.enderman.setCarriedBlock((IBlockData) null);
+                     world.gameEvent((Holder) GameEvent.BLOCK_PLACE, blockposition, GameEvent.Context.of(this.enderman, iblockdata2));
+                     this.enderman.setCarriedBlock((BlockState) null);
 +                    } // CraftBukkit
                  }
  
              }
-@@ -506,9 +524,11 @@
+@@ -506,9 +523,11 @@
              boolean flag = movingobjectpositionblock.getBlockPos().equals(blockposition);
  
-             if (iblockdata.is(TagsBlock.ENDERMAN_HOLDABLE) && flag) {
+             if (iblockdata.is(BlockTags.ENDERMAN_HOLDABLE) && flag) {
 +                if (CraftEventFactory.callEntityChangeBlockEvent(this.enderman, blockposition, Blocks.AIR.defaultBlockState())) { // CraftBukkit - Place event
                  world.removeBlock(blockposition, false);
-                 world.gameEvent((Holder) GameEvent.BLOCK_DESTROY, blockposition, GameEvent.a.of(this.enderman, iblockdata));
+                 world.gameEvent((Holder) GameEvent.BLOCK_DESTROY, blockposition, GameEvent.Context.of(this.enderman, iblockdata));
                  this.enderman.setCarriedBlock(iblockdata.getBlock().defaultBlockState());
 +                } // CraftBukkit
              }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/Endermite.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Endermite.java.patch
new file mode 100644
index 0000000000..9a32ade2bd
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Endermite.java.patch
@@ -0,0 +1,21 @@
+--- a/net/minecraft/world/entity/monster/Endermite.java
++++ b/net/minecraft/world/entity/monster/Endermite.java
+@@ -24,6 +24,9 @@
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.LevelAccessor;
+ import net.minecraft.world.level.block.state.BlockState;
++// CraftBukkit start
++import org.bukkit.event.entity.EntityRemoveEvent;
++// CraftBukkit end
+ 
+ public class Endermite extends Monster {
+ 
+@@ -113,7 +116,7 @@
+             }
+ 
+             if (this.life >= 2400) {
+-                this.discard();
++                this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
+             }
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityCaveSpider.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityCaveSpider.patch
deleted file mode 100644
index f70d92bc93..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityCaveSpider.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/entity/monster/EntityCaveSpider.java
-+++ b/net/minecraft/world/entity/monster/EntityCaveSpider.java
-@@ -40,7 +40,7 @@
-                 }
- 
-                 if (b0 > 0) {
--                    ((EntityLiving) entity).addEffect(new MobEffect(MobEffects.POISON, b0 * 20, 0), this);
-+                    ((EntityLiving) entity).addEffect(new MobEffect(MobEffects.POISON, b0 * 20, 0), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
-                 }
-             }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityEndermite.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityEndermite.patch
deleted file mode 100644
index 6ba9863189..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityEndermite.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/net/minecraft/world/entity/monster/EntityEndermite.java
-+++ b/net/minecraft/world/entity/monster/EntityEndermite.java
-@@ -25,6 +25,10 @@
- import net.minecraft.world.level.World;
- import net.minecraft.world.level.block.state.IBlockData;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+// CraftBukkit end
-+
- public class EntityEndermite extends EntityMonster {
- 
-     private static final int MAX_LIFE = 2400;
-@@ -113,7 +117,7 @@
-             }
- 
-             if (this.life >= 2400) {
--                this.discard();
-+                this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
-             }
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityGuardian.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityGuardian.patch
deleted file mode 100644
index 9090b0c463..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityGuardian.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- a/net/minecraft/world/entity/monster/EntityGuardian.java
-+++ b/net/minecraft/world/entity/monster/EntityGuardian.java
-@@ -60,6 +60,7 @@
-     private boolean clientSideTouchedGround;
-     @Nullable
-     public PathfinderGoalRandomStroll randomStrollGoal;
-+    public EntityGuardian.PathfinderGoalGuardianAttack guardianAttackGoal; // CraftBukkit - add field
- 
-     public EntityGuardian(EntityTypes<? extends EntityGuardian> entitytypes, World world) {
-         super(entitytypes, world);
-@@ -75,7 +76,7 @@
-         PathfinderGoalMoveTowardsRestriction pathfindergoalmovetowardsrestriction = new PathfinderGoalMoveTowardsRestriction(this, 1.0D);
- 
-         this.randomStrollGoal = new PathfinderGoalRandomStroll(this, 1.0D, 80);
--        this.goalSelector.addGoal(4, new EntityGuardian.PathfinderGoalGuardianAttack(this));
-+        this.goalSelector.addGoal(4, guardianAttackGoal = new EntityGuardian.PathfinderGoalGuardianAttack(this)); // CraftBukkit - assign field
-         this.goalSelector.addGoal(5, pathfindergoalmovetowardsrestriction);
-         this.goalSelector.addGoal(7, this.randomStrollGoal);
-         this.goalSelector.addGoal(8, new PathfinderGoalLookAtPlayer(this, EntityHuman.class, 8.0F));
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityGuardianElder.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityGuardianElder.patch
deleted file mode 100644
index a3cce2e704..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityGuardianElder.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/entity/monster/EntityGuardianElder.java
-+++ b/net/minecraft/world/entity/monster/EntityGuardianElder.java
-@@ -67,7 +67,7 @@
-         super.customServerAiStep(worldserver);
-         if ((this.tickCount + this.getId()) % 1200 == 0) {
-             MobEffect mobeffect = new MobEffect(MobEffects.DIG_SLOWDOWN, 6000, 2);
--            List<EntityPlayer> list = MobEffectUtil.addEffectToPlayersAround(worldserver, this, this.position(), 50.0D, mobeffect, 1200);
-+            List<EntityPlayer> list = MobEffectUtil.addEffectToPlayersAround(worldserver, this, this.position(), 50.0D, mobeffect, 1200, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
- 
-             list.forEach((entityplayer) -> {
-                 entityplayer.connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.GUARDIAN_ELDER_EFFECT, this.isSilent() ? 0.0F : 1.0F));
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityIllagerIllusioner.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityIllagerIllusioner.patch
deleted file mode 100644
index 6bcb758d38..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityIllagerIllusioner.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/net/minecraft/world/entity/monster/EntityIllagerIllusioner.java
-+++ b/net/minecraft/world/entity/monster/EntityIllagerIllusioner.java
-@@ -218,7 +218,7 @@
- 
-         @Override
-         protected void performSpellCasting() {
--            EntityIllagerIllusioner.this.addEffect(new MobEffect(MobEffects.INVISIBILITY, 1200));
-+            EntityIllagerIllusioner.this.addEffect(new MobEffect(MobEffects.INVISIBILITY, 1200), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ILLUSION); // CraftBukkit
-         }
- 
-         @Nullable
-@@ -269,7 +269,7 @@
- 
-         @Override
-         protected void performSpellCasting() {
--            EntityIllagerIllusioner.this.getTarget().addEffect(new MobEffect(MobEffects.BLINDNESS, 400), EntityIllagerIllusioner.this);
-+            EntityIllagerIllusioner.this.getTarget().addEffect(new MobEffect(MobEffects.BLINDNESS, 400), EntityIllagerIllusioner.this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
-         }
- 
-         @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityIllagerWizard.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityIllagerWizard.patch
deleted file mode 100644
index 0b26a80697..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityIllagerWizard.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- a/net/minecraft/world/entity/monster/EntityIllagerWizard.java
-+++ b/net/minecraft/world/entity/monster/EntityIllagerWizard.java
-@@ -18,6 +18,10 @@
- import net.minecraft.world.entity.ai.goal.PathfinderGoal;
- import net.minecraft.world.level.World;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+// CraftBukkit end
-+
- public abstract class EntityIllagerWizard extends EntityIllagerAbstract {
- 
-     private static final DataWatcherObject<Byte> DATA_SPELL_CASTING_ID = DataWatcher.defineId(EntityIllagerWizard.class, DataWatcherRegistry.BYTE);
-@@ -159,6 +163,11 @@
-         public void tick() {
-             --this.attackWarmupDelay;
-             if (this.attackWarmupDelay == 0) {
-+                // CraftBukkit start
-+                if (!CraftEventFactory.handleEntitySpellCastEvent(EntityIllagerWizard.this, this.getSpell())) {
-+                    return;
-+                }
-+                // CraftBukkit end
-                 this.performSpellCasting();
-                 EntityIllagerWizard.this.playSound(EntityIllagerWizard.this.getCastingSoundEvent(), 1.0F, 1.0F);
-             }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityPhantom.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityPhantom.patch
deleted file mode 100644
index 94a1d84868..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityPhantom.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- a/net/minecraft/world/entity/monster/EntityPhantom.java
-+++ b/net/minecraft/world/entity/monster/EntityPhantom.java
-@@ -522,14 +522,14 @@
-                 List<EntityHuman> list = worldserver.getNearbyPlayers(this.attackTargeting, EntityPhantom.this, EntityPhantom.this.getBoundingBox().inflate(16.0D, 64.0D, 16.0D));
- 
-                 if (!list.isEmpty()) {
--                    list.sort(Comparator.comparing(Entity::getY).reversed());
-+                    list.sort(Comparator.comparing((Entity e) -> { return e.getY(); }).reversed()); // CraftBukkit - decompile error
-                     Iterator iterator = list.iterator();
- 
-                     while (iterator.hasNext()) {
-                         EntityHuman entityhuman = (EntityHuman) iterator.next();
- 
-                         if (EntityPhantom.this.canAttack(worldserver, entityhuman, PathfinderTargetCondition.DEFAULT)) {
--                            EntityPhantom.this.setTarget(entityhuman);
-+                            EntityPhantom.this.setTarget(entityhuman, org.bukkit.event.entity.EntityTargetEvent.TargetReason.CLOSEST_PLAYER, true); // CraftBukkit - reason
-                             return true;
-                         }
-                     }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityPillager.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityPillager.patch
deleted file mode 100644
index 5a09874003..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityPillager.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/net/minecraft/world/entity/monster/EntityPillager.java
-+++ b/net/minecraft/world/entity/monster/EntityPillager.java
-@@ -53,6 +53,10 @@
- import net.minecraft.world.level.World;
- import net.minecraft.world.level.WorldAccess;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+// CraftBukkit end
-+
- public class EntityPillager extends EntityIllagerAbstract implements ICrossbow, InventoryCarrier {
- 
-     private static final DataWatcherObject<Boolean> IS_CHARGING_CROSSBOW = DataWatcher.defineId(EntityPillager.class, DataWatcherRegistry.BOOLEAN);
-@@ -206,7 +210,7 @@
-             ItemStack itemstack1 = this.inventory.addItem(itemstack);
- 
-             if (itemstack1.isEmpty()) {
--                entityitem.discard();
-+                entityitem.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
-             } else {
-                 itemstack.setCount(itemstack1.getCount());
-             }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntitySkeletonAbstract.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/EntitySkeletonAbstract.patch
deleted file mode 100644
index 3b3d0eb4e0..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntitySkeletonAbstract.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/net/minecraft/world/entity/monster/EntitySkeletonAbstract.java
-+++ b/net/minecraft/world/entity/monster/EntitySkeletonAbstract.java
-@@ -209,7 +209,17 @@
-         World world = this.level();
- 
-         if (world instanceof WorldServer worldserver) {
--            IProjectile.spawnProjectileUsingShoot(entityarrow, worldserver, itemstack1, d0, d1 + d3 * 0.20000000298023224D, d2, 1.6F, (float) (14 - worldserver.getDifficulty().getId() * 4));
-+            // CraftBukkit start
-+            org.bukkit.event.entity.EntityShootBowEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityShootBowEvent(this, this.getMainHandItem(), null, entityarrow, net.minecraft.world.EnumHand.MAIN_HAND, 0.8F, true);
-+            if (event.isCancelled()) {
-+                event.getProjectile().remove();
-+                return;
-+            }
-+
-+            if (event.getProjectile() == entityarrow.getBukkitEntity()) {
-+                IProjectile.spawnProjectileUsingShoot(entityarrow, worldserver, itemstack1, d0, d1 + d3 * 0.20000000298023224D, d2, 1.6F, (float) (14 - worldserver.getDifficulty().getId() * 4));
-+            }
-+            // CraftBukkit end
-         }
- 
-         this.playSound(SoundEffects.SKELETON_SHOOT, 1.0F, 1.0F / (this.getRandom().nextFloat() * 0.4F + 0.8F));
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntitySkeletonWither.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/EntitySkeletonWither.patch
deleted file mode 100644
index b34685d97a..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntitySkeletonWither.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/entity/monster/EntitySkeletonWither.java
-+++ b/net/minecraft/world/entity/monster/EntitySkeletonWither.java
-@@ -110,7 +110,7 @@
-             return false;
-         } else {
-             if (entity instanceof EntityLiving) {
--                ((EntityLiving) entity).addEffect(new MobEffect(MobEffects.WITHER, 200), this);
-+                ((EntityLiving) entity).addEffect(new MobEffect(MobEffects.WITHER, 200), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
-             }
- 
-             return true;
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntitySpider.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/EntitySpider.patch
deleted file mode 100644
index 128d325fae..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntitySpider.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/entity/monster/EntitySpider.java
-+++ b/net/minecraft/world/entity/monster/EntitySpider.java
-@@ -172,7 +172,7 @@
-             Holder<MobEffectList> holder = entityspider_groupdataspider.effect;
- 
-             if (holder != null) {
--                this.addEffect(new MobEffect(holder, -1));
-+                this.addEffect(new MobEffect(holder, -1), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.SPIDER_SPAWN); // CraftBukkit
-             }
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityVex.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityVex.patch
deleted file mode 100644
index 4f8bf90a96..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityVex.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/entity/monster/EntityVex.java
-+++ b/net/minecraft/world/entity/monster/EntityVex.java
-@@ -381,7 +381,7 @@
- 
-         @Override
-         public void start() {
--            EntityVex.this.setTarget(EntityVex.this.owner.getTarget());
-+            EntityVex.this.setTarget(EntityVex.this.owner.getTarget(), org.bukkit.event.entity.EntityTargetEvent.TargetReason.OWNER_ATTACKED_TARGET, true); // CraftBukkit
-             super.start();
-         }
-     }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityZombie.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityZombie.patch
deleted file mode 100644
index 1eed7427bf..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityZombie.patch
+++ /dev/null
@@ -1,146 +0,0 @@
---- a/net/minecraft/world/entity/monster/EntityZombie.java
-+++ b/net/minecraft/world/entity/monster/EntityZombie.java
-@@ -67,6 +67,15 @@
- import net.minecraft.world.level.block.Blocks;
- import net.minecraft.world.level.block.state.IBlockData;
- 
-+// CraftBukkit start
-+import net.minecraft.server.MinecraftServer;
-+import org.bukkit.entity.Zombie;
-+import org.bukkit.event.entity.CreatureSpawnEvent;
-+import org.bukkit.event.entity.EntityCombustByEntityEvent;
-+import org.bukkit.event.entity.EntityTargetEvent;
-+import org.bukkit.event.entity.EntityTransformEvent;
-+// CraftBukkit end
-+
- public class EntityZombie extends EntityMonster {
- 
-     private static final MinecraftKey SPEED_MODIFIER_BABY_ID = MinecraftKey.withDefaultNamespace("baby");
-@@ -91,6 +100,7 @@
-     private boolean canBreakDoors;
-     private int inWaterTime;
-     public int conversionTime;
-+    private int lastTick = MinecraftServer.currentTick; // CraftBukkit - add field
- 
-     public EntityZombie(EntityTypes<? extends EntityZombie> entitytypes, World world) {
-         super(entitytypes, world);
-@@ -203,7 +213,10 @@
-     public void tick() {
-         if (!this.level().isClientSide && this.isAlive() && !this.isNoAi()) {
-             if (this.isUnderWaterConverting()) {
--                --this.conversionTime;
-+                // CraftBukkit start - Use wall time instead of ticks for conversion
-+                int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
-+                this.conversionTime -= elapsedTicks;
-+                // CraftBukkit end
-                 if (this.conversionTime < 0) {
-                     this.doUnderWaterConversion();
-                 }
-@@ -220,6 +233,7 @@
-         }
- 
-         super.tick();
-+        this.lastTick = MinecraftServer.currentTick; // CraftBukkit
-     }
- 
-     @Override
-@@ -254,6 +268,7 @@
-     }
- 
-     public void startUnderWaterConversion(int i) {
-+        this.lastTick = MinecraftServer.currentTick; // CraftBukkit
-         this.conversionTime = i;
-         this.getEntityData().set(EntityZombie.DATA_DROWNED_CONVERSION_ID, true);
-     }
-@@ -267,26 +282,39 @@
-     }
- 
-     protected void convertToZombieType(EntityTypes<? extends EntityZombie> entitytypes) {
--        this.convertTo(entitytypes, ConversionParams.single(this, true, true), (entityzombie) -> {
-+        EntityZombie converted = this.convertTo(entitytypes, ConversionParams.single(this, true, true), (entityzombie) -> { // CraftBukkit
-             entityzombie.handleAttributes(entityzombie.level().getCurrentDifficultyAt(entityzombie.blockPosition()).getSpecialMultiplier());
--        });
-+        // CraftBukkit start
-+        }, EntityTransformEvent.TransformReason.DROWNED, CreatureSpawnEvent.SpawnReason.DROWNED);
-+        if (converted == null) {
-+            ((Zombie) getBukkitEntity()).setConversionTime(-1); // CraftBukkit - SPIGOT-5208: End conversion to stop event spam
-+        }
-+        // CraftBukkit end
-     }
- 
-     @VisibleForTesting
-     public boolean convertVillagerToZombieVillager(WorldServer worldserver, EntityVillager entityvillager) {
-+        // CraftBukkit start
-+        return convertVillagerToZombieVillager(worldserver, entityvillager, this.blockPosition(), this.isSilent(), EntityTransformEvent.TransformReason.INFECTION, CreatureSpawnEvent.SpawnReason.INFECTION) != null;
-+    }
-+
-+    public static EntityZombieVillager convertVillagerToZombieVillager(WorldServer worldserver, EntityVillager entityvillager, net.minecraft.core.BlockPosition blockPosition, boolean silent, EntityTransformEvent.TransformReason transformReason, CreatureSpawnEvent.SpawnReason spawnReason) {
-+        // CraftBukkit end
-         EntityZombieVillager entityzombievillager = (EntityZombieVillager) entityvillager.convertTo(EntityTypes.ZOMBIE_VILLAGER, ConversionParams.single(entityvillager, true, true), (entityzombievillager1) -> {
-             entityzombievillager1.finalizeSpawn(worldserver, worldserver.getCurrentDifficultyAt(entityzombievillager1.blockPosition()), EntitySpawnReason.CONVERSION, new EntityZombie.GroupDataZombie(false, true));
-             entityzombievillager1.setVillagerData(entityvillager.getVillagerData());
-             entityzombievillager1.setGossips((NBTBase) entityvillager.getGossips().store(DynamicOpsNBT.INSTANCE));
-             entityzombievillager1.setTradeOffers(entityvillager.getOffers().copy());
-             entityzombievillager1.setVillagerXp(entityvillager.getVillagerXp());
--            if (!this.isSilent()) {
--                worldserver.levelEvent((EntityHuman) null, 1026, this.blockPosition(), 0);
-+            // CraftBukkit start
-+            if (!silent) {
-+                worldserver.levelEvent((EntityHuman) null, 1026, blockPosition, 0);
-             }
- 
--        });
-+        }, transformReason, spawnReason);
- 
--        return entityzombievillager != null;
-+        return entityzombievillager;
-+        // CraftBukkit end
-     }
- 
-     protected boolean isSunSensitive() {
-@@ -324,9 +352,9 @@
-                     if (EntityPositionTypes.isSpawnPositionOk(entitytypes, worldserver, blockposition) && EntityPositionTypes.checkSpawnRules(entitytypes, worldserver, EntitySpawnReason.REINFORCEMENT, blockposition, worldserver.random)) {
-                         entityzombie.setPos((double) i1, (double) j1, (double) k1);
-                         if (!worldserver.hasNearbyAlivePlayer((double) i1, (double) j1, (double) k1, 7.0D) && worldserver.isUnobstructed(entityzombie) && worldserver.noCollision((Entity) entityzombie) && (entityzombie.canSpawnInLiquids() || !worldserver.containsAnyLiquid(entityzombie.getBoundingBox()))) {
--                            entityzombie.setTarget(entityliving);
-+                            entityzombie.setTarget(entityliving, EntityTargetEvent.TargetReason.REINFORCEMENT_TARGET, true); // CraftBukkit
-                             entityzombie.finalizeSpawn(worldserver, worldserver.getCurrentDifficultyAt(entityzombie.blockPosition()), EntitySpawnReason.REINFORCEMENT, (GroupDataEntity) null);
--                            worldserver.addFreshEntityWithPassengers(entityzombie);
-+                            worldserver.addFreshEntityWithPassengers(entityzombie, CreatureSpawnEvent.SpawnReason.REINFORCEMENTS); // CraftBukkit
-                             AttributeModifiable attributemodifiable = this.getAttribute(GenericAttributes.SPAWN_REINFORCEMENTS_CHANCE);
-                             AttributeModifier attributemodifier = attributemodifiable.getModifier(EntityZombie.REINFORCEMENT_CALLER_CHARGE_ID);
-                             double d0 = attributemodifier != null ? attributemodifier.amount() : 0.0D;
-@@ -352,7 +380,14 @@
-             float f = this.level().getCurrentDifficultyAt(this.blockPosition()).getEffectiveDifficulty();
- 
-             if (this.getMainHandItem().isEmpty() && this.isOnFire() && this.random.nextFloat() < f * 0.3F) {
--                entity.igniteForSeconds((float) (2 * (int) f));
-+                // CraftBukkit start
-+                EntityCombustByEntityEvent event = new EntityCombustByEntityEvent(this.getBukkitEntity(), entity.getBukkitEntity(), (float) (2 * (int) f)); // PAIL: fixme
-+                this.level().getCraftServer().getPluginManager().callEvent(event);
-+
-+                if (!event.isCancelled()) {
-+                    entity.igniteForSeconds(event.getDuration(), false);
-+                }
-+                // CraftBukkit end
-             }
-         }
- 
-@@ -385,7 +420,7 @@
- 
-     @Override
-     public EntityTypes<? extends EntityZombie> getType() {
--        return super.getType();
-+        return (EntityTypes<? extends EntityZombie>) super.getType(); // CraftBukkit - decompile error
-     }
- 
-     protected boolean canSpawnInLiquids() {
-@@ -496,7 +531,7 @@
-                             entitychicken1.finalizeSpawn(worldaccess, difficultydamagescaler, EntitySpawnReason.JOCKEY, (GroupDataEntity) null);
-                             entitychicken1.setChickenJockey(true);
-                             this.startRiding(entitychicken1);
--                            worldaccess.addFreshEntity(entitychicken1);
-+                            worldaccess.addFreshEntity(entitychicken1, CreatureSpawnEvent.SpawnReason.MOUNT); // CraftBukkit
-                         }
-                     }
-                 }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityZombieHusk.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityZombieHusk.patch
deleted file mode 100644
index ae2ac43bcf..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityZombieHusk.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/entity/monster/EntityZombieHusk.java
-+++ b/net/minecraft/world/entity/monster/EntityZombieHusk.java
-@@ -59,7 +59,7 @@
-         if (flag && this.getMainHandItem().isEmpty() && entity instanceof EntityLiving) {
-             float f = this.level().getCurrentDifficultyAt(this.blockPosition()).getEffectiveDifficulty();
- 
--            ((EntityLiving) entity).addEffect(new MobEffect(MobEffects.HUNGER, 140 * (int) f), this);
-+            ((EntityLiving) entity).addEffect(new MobEffect(MobEffects.HUNGER, 140 * (int) f), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
-         }
- 
-         return flag;
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityZombieVillager.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityZombieVillager.patch
deleted file mode 100644
index 96e3b9c0e2..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityZombieVillager.patch
+++ /dev/null
@@ -1,108 +0,0 @@
---- a/net/minecraft/world/entity/monster/EntityZombieVillager.java
-+++ b/net/minecraft/world/entity/monster/EntityZombieVillager.java
-@@ -52,6 +52,14 @@
- import net.minecraft.world.level.block.state.IBlockData;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import net.minecraft.server.MinecraftServer;
-+import net.minecraft.world.entity.npc.EntityVillager;
-+import org.bukkit.entity.ZombieVillager;
-+import org.bukkit.event.entity.CreatureSpawnEvent;
-+import org.bukkit.event.entity.EntityTransformEvent;
-+// CraftBukkit end
-+
- public class EntityZombieVillager extends EntityZombie implements VillagerDataHolder {
- 
-     private static final Logger LOGGER = LogUtils.getLogger();
-@@ -69,6 +77,7 @@
-     @Nullable
-     private MerchantRecipeList tradeOffers;
-     private int villagerXp;
-+    private int lastTick = MinecraftServer.currentTick; // CraftBukkit - add field
- 
-     public EntityZombieVillager(EntityTypes<? extends EntityZombieVillager> entitytypes, World world) {
-         super(entitytypes, world);
-@@ -87,7 +96,7 @@
-     @Override
-     public void addAdditionalSaveData(NBTTagCompound nbttagcompound) {
-         super.addAdditionalSaveData(nbttagcompound);
--        DataResult dataresult = VillagerData.CODEC.encodeStart(DynamicOpsNBT.INSTANCE, this.getVillagerData());
-+        DataResult<NBTBase> dataresult = VillagerData.CODEC.encodeStart(DynamicOpsNBT.INSTANCE, this.getVillagerData()); // CraftBukkit - decompile error
-         Logger logger = EntityZombieVillager.LOGGER;
- 
-         Objects.requireNonNull(logger);
-@@ -122,7 +131,7 @@
-         }
- 
-         if (nbttagcompound.contains("Offers")) {
--            DataResult dataresult1 = MerchantRecipeList.CODEC.parse(this.registryAccess().createSerializationContext(DynamicOpsNBT.INSTANCE), nbttagcompound.get("Offers"));
-+            DataResult<MerchantRecipeList> dataresult1 = MerchantRecipeList.CODEC.parse(this.registryAccess().createSerializationContext(DynamicOpsNBT.INSTANCE), nbttagcompound.get("Offers")); // CraftBukkit - decompile error
-             Logger logger1 = EntityZombieVillager.LOGGER;
- 
-             Objects.requireNonNull(logger1);
-@@ -149,6 +158,10 @@
-     public void tick() {
-         if (!this.level().isClientSide && this.isAlive() && this.isConverting()) {
-             int i = this.getConversionProgress();
-+            // CraftBukkit start - Use wall time instead of ticks for villager conversion
-+            int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
-+            i *= elapsedTicks;
-+            // CraftBukkit end
- 
-             this.villagerConversionTime -= i;
-             if (this.villagerConversionTime <= 0) {
-@@ -157,6 +170,7 @@
-         }
- 
-         super.tick();
-+        this.lastTick = MinecraftServer.currentTick; // CraftBukkit
-     }
- 
-     @Override
-@@ -197,8 +211,10 @@
-         this.conversionStarter = uuid;
-         this.villagerConversionTime = i;
-         this.getEntityData().set(EntityZombieVillager.DATA_CONVERTING_ID, true);
--        this.removeEffect(MobEffects.WEAKNESS);
--        this.addEffect(new MobEffect(MobEffects.DAMAGE_BOOST, i, Math.min(this.level().getDifficulty().getId() - 1, 0)));
-+        // CraftBukkit start
-+        this.removeEffect(MobEffects.WEAKNESS, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.CONVERSION);
-+        this.addEffect(new MobEffect(MobEffects.DAMAGE_BOOST, i, Math.min(this.level().getDifficulty().getId() - 1, 0)), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.CONVERSION);
-+        // CraftBukkit end
-         this.level().broadcastEntityEvent(this, (byte) 16);
-     }
- 
-@@ -215,10 +231,11 @@
-     }
- 
-     private void finishConversion(WorldServer worldserver) {
--        this.convertTo(EntityTypes.VILLAGER, ConversionParams.single(this, false, false), (entityvillager) -> {
-+        EntityVillager converted = this.convertTo(EntityTypes.VILLAGER, ConversionParams.single(this, false, false), (entityvillager) -> { // CraftBukkit
-             Iterator iterator = this.dropPreservedEquipment(worldserver, (itemstack) -> {
-                 return !EnchantmentManager.has(itemstack, EnchantmentEffectComponents.PREVENT_ARMOR_CHANGE);
-             }).iterator();
-+            this.forceDrops = false; // CraftBukkit
- 
-             while (iterator.hasNext()) {
-                 EnumItemSlot enumitemslot = (EnumItemSlot) iterator.next();
-@@ -248,12 +265,16 @@
-                 }
-             }
- 
--            entityvillager.addEffect(new MobEffect(MobEffects.CONFUSION, 200, 0));
-+            entityvillager.addEffect(new MobEffect(MobEffects.CONFUSION, 200, 0), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.CONVERSION); // CraftBukkit
-             if (!this.isSilent()) {
-                 worldserver.levelEvent((EntityHuman) null, 1027, this.blockPosition(), 0);
-             }
--
--        });
-+        // CraftBukkit start
-+        }, EntityTransformEvent.TransformReason.CURED, CreatureSpawnEvent.SpawnReason.CURED);
-+        if (converted == null) {
-+            ((ZombieVillager) getBukkitEntity()).setConversionTime(-1); // SPIGOT-5208: End conversion to stop event spam
-+        }
-+        // CraftBukkit end
-     }
- 
-     @VisibleForTesting
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityEvoker.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Evoker.java.patch
similarity index 73%
rename from paper-server/patches/sources/net/minecraft/world/entity/monster/EntityEvoker.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/monster/Evoker.java.patch
index 5a03340201..d8921518a6 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityEvoker.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Evoker.java.patch
@@ -1,11 +1,11 @@
---- a/net/minecraft/world/entity/monster/EntityEvoker.java
-+++ b/net/minecraft/world/entity/monster/EntityEvoker.java
+--- a/net/minecraft/world/entity/monster/Evoker.java
++++ b/net/minecraft/world/entity/monster/Evoker.java
 @@ -212,7 +212,7 @@
                          worldserver.getScoreboard().addPlayerToTeam(entityvex.getScoreboardName(), scoreboardteam);
                      }
  
 -                    worldserver.addFreshEntityWithPassengers(entityvex);
 +                    worldserver.addFreshEntityWithPassengers(entityvex, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPELL); // CraftBukkit - Add SpawnReason
-                     worldserver.gameEvent((Holder) GameEvent.ENTITY_PLACE, blockposition, GameEvent.a.of((Entity) EntityEvoker.this));
+                     worldserver.gameEvent((Holder) GameEvent.ENTITY_PLACE, blockposition, GameEvent.Context.of((Entity) Evoker.this));
                  }
              }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityGhast.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Ghast.java.patch
similarity index 64%
rename from paper-server/patches/sources/net/minecraft/world/entity/monster/EntityGhast.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/monster/Ghast.java.patch
index 69f630ae83..75afd666d6 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityGhast.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Ghast.java.patch
@@ -1,8 +1,8 @@
---- a/net/minecraft/world/entity/monster/EntityGhast.java
-+++ b/net/minecraft/world/entity/monster/EntityGhast.java
+--- a/net/minecraft/world/entity/monster/Ghast.java
++++ b/net/minecraft/world/entity/monster/Ghast.java
 @@ -333,6 +333,8 @@
  
-                         EntityLargeFireball entitylargefireball = new EntityLargeFireball(world, this.ghast, vec3d1.normalize(), this.ghast.getExplosionPower());
+                         LargeFireball entitylargefireball = new LargeFireball(world, this.ghast, vec3d1.normalize(), this.ghast.getExplosionPower());
  
 +                        // CraftBukkit - set bukkitYield when setting explosionpower
 +                        entitylargefireball.bukkitYield = entitylargefireball.explosionPower = this.ghast.getExplosionPower();
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/Guardian.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Guardian.java.patch
new file mode 100644
index 0000000000..078be667c0
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Guardian.java.patch
@@ -0,0 +1,19 @@
+--- a/net/minecraft/world/entity/monster/Guardian.java
++++ b/net/minecraft/world/entity/monster/Guardian.java
+@@ -60,6 +60,7 @@
+     private boolean clientSideTouchedGround;
+     @Nullable
+     public RandomStrollGoal randomStrollGoal;
++    public Guardian.GuardianAttackGoal guardianAttackGoal; // CraftBukkit - add field
+ 
+     public Guardian(EntityType<? extends Guardian> type, Level world) {
+         super(type, world);
+@@ -75,7 +76,7 @@
+         MoveTowardsRestrictionGoal pathfindergoalmovetowardsrestriction = new MoveTowardsRestrictionGoal(this, 1.0D);
+ 
+         this.randomStrollGoal = new RandomStrollGoal(this, 1.0D, 80);
+-        this.goalSelector.addGoal(4, new Guardian.GuardianAttackGoal(this));
++        this.goalSelector.addGoal(4, this.guardianAttackGoal = new Guardian.GuardianAttackGoal(this)); // CraftBukkit - assign field
+         this.goalSelector.addGoal(5, pathfindergoalmovetowardsrestriction);
+         this.goalSelector.addGoal(7, this.randomStrollGoal);
+         this.goalSelector.addGoal(8, new LookAtPlayerGoal(this, Player.class, 8.0F));
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/Husk.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Husk.java.patch
new file mode 100644
index 0000000000..0df55d8f37
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Husk.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/entity/monster/Husk.java
++++ b/net/minecraft/world/entity/monster/Husk.java
+@@ -59,7 +59,7 @@
+         if (flag && this.getMainHandItem().isEmpty() && target instanceof LivingEntity) {
+             float f = this.level().getCurrentDifficultyAt(this.blockPosition()).getEffectiveDifficulty();
+ 
+-            ((LivingEntity) target).addEffect(new MobEffectInstance(MobEffects.HUNGER, 140 * (int) f), this);
++            ((LivingEntity) target).addEffect(new MobEffectInstance(MobEffects.HUNGER, 140 * (int) f), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
+         }
+ 
+         return flag;
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/Illusioner.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Illusioner.java.patch
new file mode 100644
index 0000000000..5fb9fa4e67
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Illusioner.java.patch
@@ -0,0 +1,20 @@
+--- a/net/minecraft/world/entity/monster/Illusioner.java
++++ b/net/minecraft/world/entity/monster/Illusioner.java
+@@ -218,7 +218,7 @@
+ 
+         @Override
+         protected void performSpellCasting() {
+-            Illusioner.this.addEffect(new MobEffectInstance(MobEffects.INVISIBILITY, 1200));
++            Illusioner.this.addEffect(new MobEffectInstance(MobEffects.INVISIBILITY, 1200), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ILLUSION); // CraftBukkit
+         }
+ 
+         @Nullable
+@@ -269,7 +269,7 @@
+ 
+         @Override
+         protected void performSpellCasting() {
+-            Illusioner.this.getTarget().addEffect(new MobEffectInstance(MobEffects.BLINDNESS, 400), Illusioner.this);
++            Illusioner.this.getTarget().addEffect(new MobEffectInstance(MobEffects.BLINDNESS, 400), Illusioner.this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
+         }
+ 
+         @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/Phantom.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Phantom.java.patch
new file mode 100644
index 0000000000..bbdd8a6748
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Phantom.java.patch
@@ -0,0 +1,19 @@
+--- a/net/minecraft/world/entity/monster/Phantom.java
++++ b/net/minecraft/world/entity/monster/Phantom.java
+@@ -522,14 +522,14 @@
+                 List<Player> list = worldserver.getNearbyPlayers(this.attackTargeting, Phantom.this, Phantom.this.getBoundingBox().inflate(16.0D, 64.0D, 16.0D));
+ 
+                 if (!list.isEmpty()) {
+-                    list.sort(Comparator.comparing(Entity::getY).reversed());
++                    list.sort(Comparator.comparing((Entity e) -> { return e.getY(); }).reversed()); // CraftBukkit - decompile error
+                     Iterator iterator = list.iterator();
+ 
+                     while (iterator.hasNext()) {
+                         Player entityhuman = (Player) iterator.next();
+ 
+                         if (Phantom.this.canAttack(worldserver, entityhuman, TargetingConditions.DEFAULT)) {
+-                            Phantom.this.setTarget(entityhuman);
++                            Phantom.this.setTarget(entityhuman, org.bukkit.event.entity.EntityTargetEvent.TargetReason.CLOSEST_PLAYER, true); // CraftBukkit - reason
+                             return true;
+                         }
+                     }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/Pillager.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Pillager.java.patch
new file mode 100644
index 0000000000..43bd8b72e6
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Pillager.java.patch
@@ -0,0 +1,21 @@
+--- a/net/minecraft/world/entity/monster/Pillager.java
++++ b/net/minecraft/world/entity/monster/Pillager.java
+@@ -52,6 +52,9 @@
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.LevelReader;
+ import net.minecraft.world.level.ServerLevelAccessor;
++// CraftBukkit start
++import org.bukkit.event.entity.EntityRemoveEvent;
++// CraftBukkit end
+ 
+ public class Pillager extends AbstractIllager implements CrossbowAttackMob, InventoryCarrier {
+ 
+@@ -206,7 +209,7 @@
+             ItemStack itemstack1 = this.inventory.addItem(itemstack);
+ 
+             if (itemstack1.isEmpty()) {
+-                itemEntity.discard();
++                itemEntity.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
+             } else {
+                 itemstack.setCount(itemstack1.getCount());
+             }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityRavager.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Ravager.java.patch
similarity index 59%
rename from paper-server/patches/sources/net/minecraft/world/entity/monster/EntityRavager.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/monster/Ravager.java.patch
index 886c966a0f..13dc27be23 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityRavager.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Ravager.java.patch
@@ -1,20 +1,19 @@
---- a/net/minecraft/world/entity/monster/EntityRavager.java
-+++ b/net/minecraft/world/entity/monster/EntityRavager.java
-@@ -43,6 +43,10 @@
- import net.minecraft.world.phys.AxisAlignedBB;
- import net.minecraft.world.phys.Vec3D;
- 
+--- a/net/minecraft/world/entity/monster/Ravager.java
++++ b/net/minecraft/world/entity/monster/Ravager.java
+@@ -42,6 +42,9 @@
+ import net.minecraft.world.level.pathfinder.PathType;
+ import net.minecraft.world.phys.AABB;
+ import net.minecraft.world.phys.Vec3;
 +// CraftBukkit start
 +import org.bukkit.craftbukkit.event.CraftEventFactory;
 +// CraftBukkit end
-+
- public class EntityRavager extends EntityRaider {
  
-     private static final Predicate<Entity> ROAR_TARGET_WITH_GRIEFING = (entity) -> {
-@@ -158,6 +162,11 @@
+ public class Ravager extends Raider {
+ 
+@@ -158,6 +161,11 @@
                          Block block = iblockdata.getBlock();
  
-                         if (block instanceof BlockLeaves) {
+                         if (block instanceof LeavesBlock) {
 +                            // CraftBukkit start
 +                            if (!CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, net.minecraft.world.level.block.Blocks.AIR.defaultBlockState())) {
 +                                continue;
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityShulker.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Shulker.java.patch
similarity index 70%
rename from paper-server/patches/sources/net/minecraft/world/entity/monster/EntityShulker.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/monster/Shulker.java.patch
index 611d16c842..80542d3785 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityShulker.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Shulker.java.patch
@@ -1,20 +1,20 @@
---- a/net/minecraft/world/entity/monster/EntityShulker.java
-+++ b/net/minecraft/world/entity/monster/EntityShulker.java
-@@ -59,6 +59,12 @@
- import net.minecraft.world.phys.Vec3D;
+--- a/net/minecraft/world/entity/monster/Shulker.java
++++ b/net/minecraft/world/entity/monster/Shulker.java
+@@ -58,6 +58,12 @@
+ import net.minecraft.world.phys.AABB;
+ import net.minecraft.world.phys.Vec3;
  import org.joml.Vector3f;
- 
++
 +// CraftBukkit start
 +import org.bukkit.craftbukkit.util.CraftLocation;
 +import org.bukkit.event.entity.EntityTeleportEvent;
 +import org.bukkit.craftbukkit.event.CraftEventFactory;
 +// CraftBukkit end
-+
- public class EntityShulker extends EntityGolem implements VariantHolder<Optional<EnumColor>>, IMonster {
  
-     private static final MinecraftKey COVERED_ARMOR_MODIFIER_ID = MinecraftKey.withDefaultNamespace("covered");
+ public class Shulker extends AbstractGolem implements VariantHolder<Optional<DyeColor>>, Enemy {
+ 
 @@ -402,6 +408,14 @@
-                     EnumDirection enumdirection = this.findAttachableSurface(blockposition1);
+                     Direction enumdirection = this.findAttachableSurface(blockposition1);
  
                      if (enumdirection != null) {
 +                        // CraftBukkit start
@@ -27,7 +27,7 @@
 +                        // CraftBukkit end
                          this.unRide();
                          this.setAttachFace(enumdirection);
-                         this.playSound(SoundEffects.SHULKER_TELEPORT, 1.0F, 1.0F);
+                         this.playSound(SoundEvents.SHULKER_TELEPORT, 1.0F, 1.0F);
 @@ -472,7 +486,7 @@
                  if (entityshulker != null) {
                      entityshulker.setVariant(this.getVariant());
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntitySilverfish.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Silverfish.java.patch
similarity index 62%
rename from paper-server/patches/sources/net/minecraft/world/entity/monster/EntitySilverfish.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/monster/Silverfish.java.patch
index e2516beaaa..949f780c92 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntitySilverfish.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Silverfish.java.patch
@@ -1,21 +1,20 @@
---- a/net/minecraft/world/entity/monster/EntitySilverfish.java
-+++ b/net/minecraft/world/entity/monster/EntitySilverfish.java
-@@ -31,6 +31,11 @@
- import net.minecraft.world.level.block.BlockMonsterEggs;
- import net.minecraft.world.level.block.state.IBlockData;
- 
+--- a/net/minecraft/world/entity/monster/Silverfish.java
++++ b/net/minecraft/world/entity/monster/Silverfish.java
+@@ -30,6 +30,10 @@
+ import net.minecraft.world.level.block.Block;
+ import net.minecraft.world.level.block.InfestedBlock;
+ import net.minecraft.world.level.block.state.BlockState;
 +// CraftBukkit start
 +import org.bukkit.craftbukkit.event.CraftEventFactory;
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +// CraftBukkit end
-+
- public class EntitySilverfish extends EntityMonster {
  
-     @Nullable
-@@ -160,6 +165,11 @@
+ public class Silverfish extends Monster {
+ 
+@@ -160,6 +164,11 @@
                              Block block = iblockdata.getBlock();
  
-                             if (block instanceof BlockMonsterEggs) {
+                             if (block instanceof InfestedBlock) {
 +                                // CraftBukkit start
 +                                if (!CraftEventFactory.callEntityChangeBlockEvent(this.silverfish, blockposition1, net.minecraft.world.level.block.Blocks.AIR.defaultBlockState())) {
 +                                    continue;
@@ -24,16 +23,16 @@
                                  if (getServerLevel(world).getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
                                      world.destroyBlock(blockposition1, true, this.silverfish);
                                  } else {
-@@ -229,9 +239,14 @@
-                 IBlockData iblockdata = world.getBlockState(blockposition);
+@@ -229,9 +238,14 @@
+                 BlockState iblockdata = world.getBlockState(blockposition);
  
-                 if (BlockMonsterEggs.isCompatibleHostBlock(iblockdata)) {
+                 if (InfestedBlock.isCompatibleHostBlock(iblockdata)) {
 +                    // CraftBukkit start
-+                    if (!CraftEventFactory.callEntityChangeBlockEvent(this.mob, blockposition, BlockMonsterEggs.infestedStateByHost(iblockdata))) {
++                    if (!CraftEventFactory.callEntityChangeBlockEvent(this.mob, blockposition, InfestedBlock.infestedStateByHost(iblockdata))) {
 +                        return;
 +                    }
 +                    // CraftBukkit end
-                     world.setBlock(blockposition, BlockMonsterEggs.infestedStateByHost(iblockdata), 3);
+                     world.setBlock(blockposition, InfestedBlock.infestedStateByHost(iblockdata), 3);
                      this.mob.spawnAnim();
 -                    this.mob.discard();
 +                    this.mob.discard(EntityRemoveEvent.Cause.ENTER_BLOCK); // CraftBukkit - add Bukkit remove cause
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntitySkeleton.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Skeleton.java.patch
similarity index 55%
rename from paper-server/patches/sources/net/minecraft/world/entity/monster/EntitySkeleton.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/monster/Skeleton.java.patch
index ddc3ae31ae..8be9303de5 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntitySkeleton.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Skeleton.java.patch
@@ -1,7 +1,7 @@
---- a/net/minecraft/world/entity/monster/EntitySkeleton.java
-+++ b/net/minecraft/world/entity/monster/EntitySkeleton.java
+--- a/net/minecraft/world/entity/monster/Skeleton.java
++++ b/net/minecraft/world/entity/monster/Skeleton.java
 @@ -99,7 +99,7 @@
-                 this.level().levelEvent((EntityHuman) null, 1048, this.blockPosition(), 0);
+                 this.level().levelEvent((Player) null, 1048, this.blockPosition(), 0);
              }
  
 -        });
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntitySlime.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Slime.java.patch
similarity index 69%
rename from paper-server/patches/sources/net/minecraft/world/entity/monster/EntitySlime.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/monster/Slime.java.patch
index 73994c5c62..ae69b0dcf3 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntitySlime.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Slime.java.patch
@@ -1,9 +1,9 @@
---- a/net/minecraft/world/entity/monster/EntitySlime.java
-+++ b/net/minecraft/world/entity/monster/EntitySlime.java
-@@ -47,6 +47,15 @@
- import net.minecraft.world.phys.Vec3D;
- import net.minecraft.world.scores.ScoreboardTeam;
- 
+--- a/net/minecraft/world/entity/monster/Slime.java
++++ b/net/minecraft/world/entity/monster/Slime.java
+@@ -46,6 +46,14 @@
+ import net.minecraft.world.level.levelgen.WorldgenRandom;
+ import net.minecraft.world.phys.Vec3;
+ import net.minecraft.world.scores.PlayerTeam;
 +// CraftBukkit start
 +import java.util.ArrayList;
 +import java.util.List;
@@ -12,22 +12,21 @@
 +import org.bukkit.event.entity.EntityTransformEvent;
 +import org.bukkit.event.entity.SlimeSplitEvent;
 +// CraftBukkit end
-+
- public class EntitySlime extends EntityInsentient implements IMonster {
  
-     private static final DataWatcherObject<Integer> ID_SIZE = DataWatcher.defineId(EntitySlime.class, DataWatcherRegistry.INT);
-@@ -197,11 +206,18 @@
+ public class Slime extends Mob implements Enemy {
+ 
+@@ -197,11 +205,18 @@
  
      @Override
-     public EntityTypes<? extends EntitySlime> getType() {
+     public EntityType<? extends Slime> getType() {
 -        return super.getType();
-+        return (EntityTypes<? extends EntitySlime>) super.getType(); // CraftBukkit - decompile error
++        return (EntityType<? extends Slime>) super.getType(); // CraftBukkit - decompile error
      }
  
      @Override
-     public void remove(Entity.RemovalReason entity_removalreason) {
+     public void remove(Entity.RemovalReason reason) {
 +        // CraftBukkit start - add Bukkit remove cause
-+        this.remove(entity_removalreason, null);
++        this.remove(reason, null);
 +    }
 +
 +    @Override
@@ -36,10 +35,11 @@
          int i = this.getSize();
  
          if (!this.level().isClientSide && i > 1 && this.isDeadOrDying()) {
-@@ -211,18 +227,45 @@
+@@ -210,19 +225,46 @@
+             int j = i / 2;
              int k = 2 + this.random.nextInt(3);
-             ScoreboardTeam scoreboardteam = this.getTeam();
- 
+             PlayerTeam scoreboardteam = this.getTeam();
++
 +            // CraftBukkit start
 +            SlimeSplitEvent event = new SlimeSplitEvent((org.bukkit.entity.Slime) this.getBukkitEntity(), k);
 +            this.level().getCraftServer().getPluginManager().callEvent(event);
@@ -50,15 +50,15 @@
 +                super.remove(entity_removalreason, cause); // CraftBukkit - add Bukkit remove cause
 +                return;
 +            }
-+            List<EntityLiving> slimes = new ArrayList<>(j);
++            List<LivingEntity> slimes = new ArrayList<>(j);
 +            // CraftBukkit end
-+
+ 
              for (int l = 0; l < k; ++l) {
                  float f2 = ((float) (l % 2) - 0.5F) * f1;
                  float f3 = ((float) (l / 2) - 0.5F) * f1;
  
 -                this.convertTo(this.getType(), new ConversionParams(ConversionType.SPLIT_ON_DEATH, false, false, scoreboardteam), EntitySpawnReason.TRIGGERED, (entityslime) -> {
-+                EntitySlime converted = this.convertTo(this.getType(), new ConversionParams(ConversionType.SPLIT_ON_DEATH, false, false, scoreboardteam), EntitySpawnReason.TRIGGERED, (entityslime) -> { // CraftBukkit
++                Slime converted = this.convertTo(this.getType(), new ConversionParams(ConversionType.SPLIT_ON_DEATH, false, false, scoreboardteam), EntitySpawnReason.TRIGGERED, (entityslime) -> { // CraftBukkit
                      entityslime.setSize(j, true);
                      entityslime.moveTo(this.getX() + (double) f2, this.getY() + 0.5D, this.getZ() + (double) f3, this.random.nextFloat() * 360.0F, 0.0F);
 -                });
@@ -68,19 +68,19 @@
 +                    slimes.add(converted);
 +                }
 +                // CraftBukkit end
-+            }
+             }
 +            // CraftBukkit start
 +            if (CraftEventFactory.callEntityTransformEvent(this, slimes, EntityTransformEvent.TransformReason.SPLIT).isCancelled()) {
 +                super.remove(entity_removalreason, cause); // CraftBukkit - add Bukkit remove cause
 +                return;
-             }
-+            for (EntityLiving living : slimes) {
++            }
++            for (LivingEntity living : slimes) {
 +                this.level().addFreshEntity(living, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SLIME_SPLIT); // CraftBukkit - SpawnReason
 +            }
 +            // CraftBukkit end
          }
  
--        super.remove(entity_removalreason);
+-        super.remove(reason);
 +        super.remove(entity_removalreason, cause); // CraftBukkit - add Bukkit remove cause
      }
  
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/SpellcasterIllager.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/SpellcasterIllager.java.patch
new file mode 100644
index 0000000000..7e02fcf3a8
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/SpellcasterIllager.java.patch
@@ -0,0 +1,24 @@
+--- a/net/minecraft/world/entity/monster/SpellcasterIllager.java
++++ b/net/minecraft/world/entity/monster/SpellcasterIllager.java
+@@ -17,6 +17,9 @@
+ import net.minecraft.world.entity.LivingEntity;
+ import net.minecraft.world.entity.ai.goal.Goal;
+ import net.minecraft.world.level.Level;
++// CraftBukkit start
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++// CraftBukkit end
+ 
+ public abstract class SpellcasterIllager extends AbstractIllager {
+ 
+@@ -159,6 +162,11 @@
+         public void tick() {
+             --this.attackWarmupDelay;
+             if (this.attackWarmupDelay == 0) {
++                // CraftBukkit start
++                if (!CraftEventFactory.handleEntitySpellCastEvent(SpellcasterIllager.this, this.getSpell())) {
++                    return;
++                }
++                // CraftBukkit end
+                 this.performSpellCasting();
+                 SpellcasterIllager.this.playSound(SpellcasterIllager.this.getCastingSoundEvent(), 1.0F, 1.0F);
+             }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/Spider.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Spider.java.patch
new file mode 100644
index 0000000000..cc9ec522f2
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Spider.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/entity/monster/Spider.java
++++ b/net/minecraft/world/entity/monster/Spider.java
+@@ -172,7 +172,7 @@
+             Holder<MobEffect> holder = entityspider_groupdataspider.effect;
+ 
+             if (holder != null) {
+-                this.addEffect(new MobEffectInstance(holder, -1));
++                this.addEffect(new MobEffectInstance(holder, -1), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.SPIDER_SPAWN); // CraftBukkit
+             }
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityStrider.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Strider.java.patch
similarity index 81%
rename from paper-server/patches/sources/net/minecraft/world/entity/monster/EntityStrider.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/monster/Strider.java.patch
index a17b5b266e..fbc85b5bbe 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityStrider.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Strider.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/world/entity/monster/EntityStrider.java
-+++ b/net/minecraft/world/entity/monster/EntityStrider.java
+--- a/net/minecraft/world/entity/monster/Strider.java
++++ b/net/minecraft/world/entity/monster/Strider.java
 @@ -350,7 +350,14 @@
  
              boolean flag2 = flag1;
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/Vex.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Vex.java.patch
new file mode 100644
index 0000000000..2ddefc395f
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Vex.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/entity/monster/Vex.java
++++ b/net/minecraft/world/entity/monster/Vex.java
+@@ -381,7 +381,7 @@
+ 
+         @Override
+         public void start() {
+-            Vex.this.setTarget(Vex.this.owner.getTarget());
++            Vex.this.setTarget(Vex.this.owner.getTarget(), org.bukkit.event.entity.EntityTargetEvent.TargetReason.OWNER_ATTACKED_TARGET, true); // CraftBukkit
+             super.start();
+         }
+     }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityWitch.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Witch.java.patch
similarity index 82%
rename from paper-server/patches/sources/net/minecraft/world/entity/monster/EntityWitch.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/monster/Witch.java.patch
index d0b562f1f3..14e7128bd1 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityWitch.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Witch.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/world/entity/monster/EntityWitch.java
-+++ b/net/minecraft/world/entity/monster/EntityWitch.java
+--- a/net/minecraft/world/entity/monster/Witch.java
++++ b/net/minecraft/world/entity/monster/Witch.java
 @@ -126,7 +126,7 @@
                      PotionContents potioncontents = (PotionContents) itemstack.get(DataComponents.POTION_CONTENTS);
  
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/WitherSkeleton.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/WitherSkeleton.java.patch
new file mode 100644
index 0000000000..8ebfeaa886
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/WitherSkeleton.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/entity/monster/WitherSkeleton.java
++++ b/net/minecraft/world/entity/monster/WitherSkeleton.java
+@@ -110,7 +110,7 @@
+             return false;
+         } else {
+             if (target instanceof LivingEntity) {
+-                ((LivingEntity) target).addEffect(new MobEffectInstance(MobEffects.WITHER, 200), this);
++                ((LivingEntity) target).addEffect(new MobEffectInstance(MobEffects.WITHER, 200), this, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
+             }
+ 
+             return true;
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/Zombie.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/Zombie.java.patch
new file mode 100644
index 0000000000..074a649511
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/Zombie.java.patch
@@ -0,0 +1,183 @@
+--- a/net/minecraft/world/entity/monster/Zombie.java
++++ b/net/minecraft/world/entity/monster/Zombie.java
+@@ -6,19 +6,6 @@
+ import java.util.List;
+ import java.util.function.Predicate;
+ import javax.annotation.Nullable;
+-import net.minecraft.core.BlockPos;
+-import net.minecraft.nbt.CompoundTag;
+-import net.minecraft.nbt.NbtOps;
+-import net.minecraft.nbt.Tag;
+-import net.minecraft.network.syncher.EntityDataAccessor;
+-import net.minecraft.network.syncher.EntityDataSerializers;
+-import net.minecraft.network.syncher.SynchedEntityData;
+-import net.minecraft.resources.ResourceLocation;
+-import net.minecraft.server.level.ServerLevel;
+-import net.minecraft.sounds.SoundEvent;
+-import net.minecraft.sounds.SoundEvents;
+-import net.minecraft.sounds.SoundSource;
+-import net.minecraft.tags.FluidTags;
+ import net.minecraft.util.Mth;
+ import net.minecraft.util.RandomSource;
+ import net.minecraft.world.Difficulty;
+@@ -66,6 +53,26 @@
+ import net.minecraft.world.level.ServerLevelAccessor;
+ import net.minecraft.world.level.block.Blocks;
+ import net.minecraft.world.level.block.state.BlockState;
++import net.minecraft.core.BlockPos;
++import net.minecraft.nbt.CompoundTag;
++import net.minecraft.nbt.NbtOps;
++import net.minecraft.nbt.Tag;
++import net.minecraft.network.syncher.EntityDataAccessor;
++import net.minecraft.network.syncher.EntityDataSerializers;
++import net.minecraft.network.syncher.SynchedEntityData;
++import net.minecraft.resources.ResourceLocation;
++// CraftBukkit start
++import net.minecraft.server.MinecraftServer;
++import net.minecraft.server.level.ServerLevel;
++import net.minecraft.sounds.SoundEvent;
++import net.minecraft.sounds.SoundEvents;
++import net.minecraft.sounds.SoundSource;
++import net.minecraft.tags.FluidTags;
++import org.bukkit.event.entity.CreatureSpawnEvent;
++import org.bukkit.event.entity.EntityCombustByEntityEvent;
++import org.bukkit.event.entity.EntityTargetEvent;
++import org.bukkit.event.entity.EntityTransformEvent;
++// CraftBukkit end
+ 
+ public class Zombie extends Monster {
+ 
+@@ -91,6 +98,7 @@
+     private boolean canBreakDoors;
+     private int inWaterTime;
+     public int conversionTime;
++    private int lastTick = MinecraftServer.currentTick; // CraftBukkit - add field
+ 
+     public Zombie(EntityType<? extends Zombie> type, Level world) {
+         super(type, world);
+@@ -203,7 +211,10 @@
+     public void tick() {
+         if (!this.level().isClientSide && this.isAlive() && !this.isNoAi()) {
+             if (this.isUnderWaterConverting()) {
+-                --this.conversionTime;
++                // CraftBukkit start - Use wall time instead of ticks for conversion
++                int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
++                this.conversionTime -= elapsedTicks;
++                // CraftBukkit end
+                 if (this.conversionTime < 0) {
+                     this.doUnderWaterConversion();
+                 }
+@@ -220,6 +231,7 @@
+         }
+ 
+         super.tick();
++        this.lastTick = MinecraftServer.currentTick; // CraftBukkit
+     }
+ 
+     @Override
+@@ -254,6 +266,7 @@
+     }
+ 
+     public void startUnderWaterConversion(int ticksUntilWaterConversion) {
++        this.lastTick = MinecraftServer.currentTick; // CraftBukkit
+         this.conversionTime = ticksUntilWaterConversion;
+         this.getEntityData().set(Zombie.DATA_DROWNED_CONVERSION_ID, true);
+     }
+@@ -267,26 +280,39 @@
+     }
+ 
+     protected void convertToZombieType(EntityType<? extends Zombie> entityType) {
+-        this.convertTo(entityType, ConversionParams.single(this, true, true), (entityzombie) -> {
++        Zombie converted = this.convertTo(entityType, ConversionParams.single(this, true, true), (entityzombie) -> { // CraftBukkit
+             entityzombie.handleAttributes(entityzombie.level().getCurrentDifficultyAt(entityzombie.blockPosition()).getSpecialMultiplier());
+-        });
++        // CraftBukkit start
++        }, EntityTransformEvent.TransformReason.DROWNED, CreatureSpawnEvent.SpawnReason.DROWNED);
++        if (converted == null) {
++            ((org.bukkit.entity.Zombie) this.getBukkitEntity()).setConversionTime(-1); // CraftBukkit - SPIGOT-5208: End conversion to stop event spam
++        }
++        // CraftBukkit end
+     }
+ 
+     @VisibleForTesting
+     public boolean convertVillagerToZombieVillager(ServerLevel world, Villager villager) {
+-        ZombieVillager entityzombievillager = (ZombieVillager) villager.convertTo(EntityType.ZOMBIE_VILLAGER, ConversionParams.single(villager, true, true), (entityzombievillager1) -> {
+-            entityzombievillager1.finalizeSpawn(world, world.getCurrentDifficultyAt(entityzombievillager1.blockPosition()), EntitySpawnReason.CONVERSION, new Zombie.ZombieGroupData(false, true));
+-            entityzombievillager1.setVillagerData(villager.getVillagerData());
+-            entityzombievillager1.setGossips((Tag) villager.getGossips().store(NbtOps.INSTANCE));
+-            entityzombievillager1.setTradeOffers(villager.getOffers().copy());
+-            entityzombievillager1.setVillagerXp(villager.getVillagerXp());
+-            if (!this.isSilent()) {
+-                world.levelEvent((Player) null, 1026, this.blockPosition(), 0);
++        // CraftBukkit start
++        return Zombie.convertVillagerToZombieVillager(world, villager, this.blockPosition(), this.isSilent(), EntityTransformEvent.TransformReason.INFECTION, CreatureSpawnEvent.SpawnReason.INFECTION) != null;
++    }
++
++    public static ZombieVillager convertVillagerToZombieVillager(ServerLevel worldserver, Villager entityvillager, net.minecraft.core.BlockPos blockPosition, boolean silent, EntityTransformEvent.TransformReason transformReason, CreatureSpawnEvent.SpawnReason spawnReason) {
++        // CraftBukkit end
++        ZombieVillager entityzombievillager = (ZombieVillager) entityvillager.convertTo(EntityType.ZOMBIE_VILLAGER, ConversionParams.single(entityvillager, true, true), (entityzombievillager1) -> {
++            entityzombievillager1.finalizeSpawn(worldserver, worldserver.getCurrentDifficultyAt(entityzombievillager1.blockPosition()), EntitySpawnReason.CONVERSION, new Zombie.ZombieGroupData(false, true));
++            entityzombievillager1.setVillagerData(entityvillager.getVillagerData());
++            entityzombievillager1.setGossips((Tag) entityvillager.getGossips().store(NbtOps.INSTANCE));
++            entityzombievillager1.setTradeOffers(entityvillager.getOffers().copy());
++            entityzombievillager1.setVillagerXp(entityvillager.getVillagerXp());
++            // CraftBukkit start
++            if (!silent) {
++                worldserver.levelEvent((Player) null, 1026, blockPosition, 0);
+             }
+ 
+-        });
++        }, transformReason, spawnReason);
+ 
+-        return entityzombievillager != null;
++        return entityzombievillager;
++        // CraftBukkit end
+     }
+ 
+     public boolean isSunSensitive() {
+@@ -324,9 +350,9 @@
+                     if (SpawnPlacements.isSpawnPositionOk(entitytypes, world, blockposition) && SpawnPlacements.checkSpawnRules(entitytypes, world, EntitySpawnReason.REINFORCEMENT, blockposition, world.random)) {
+                         entityzombie.setPos((double) i1, (double) j1, (double) k1);
+                         if (!world.hasNearbyAlivePlayer((double) i1, (double) j1, (double) k1, 7.0D) && world.isUnobstructed(entityzombie) && world.noCollision((Entity) entityzombie) && (entityzombie.canSpawnInLiquids() || !world.containsAnyLiquid(entityzombie.getBoundingBox()))) {
+-                            entityzombie.setTarget(entityliving);
++                            entityzombie.setTarget(entityliving, EntityTargetEvent.TargetReason.REINFORCEMENT_TARGET, true); // CraftBukkit
+                             entityzombie.finalizeSpawn(world, world.getCurrentDifficultyAt(entityzombie.blockPosition()), EntitySpawnReason.REINFORCEMENT, (SpawnGroupData) null);
+-                            world.addFreshEntityWithPassengers(entityzombie);
++                            world.addFreshEntityWithPassengers(entityzombie, CreatureSpawnEvent.SpawnReason.REINFORCEMENTS); // CraftBukkit
+                             AttributeInstance attributemodifiable = this.getAttribute(Attributes.SPAWN_REINFORCEMENTS_CHANCE);
+                             AttributeModifier attributemodifier = attributemodifiable.getModifier(Zombie.REINFORCEMENT_CALLER_CHARGE_ID);
+                             double d0 = attributemodifier != null ? attributemodifier.amount() : 0.0D;
+@@ -352,7 +378,14 @@
+             float f = this.level().getCurrentDifficultyAt(this.blockPosition()).getEffectiveDifficulty();
+ 
+             if (this.getMainHandItem().isEmpty() && this.isOnFire() && this.random.nextFloat() < f * 0.3F) {
+-                target.igniteForSeconds((float) (2 * (int) f));
++                // CraftBukkit start
++                EntityCombustByEntityEvent event = new EntityCombustByEntityEvent(this.getBukkitEntity(), target.getBukkitEntity(), (float) (2 * (int) f)); // PAIL: fixme
++                this.level().getCraftServer().getPluginManager().callEvent(event);
++
++                if (!event.isCancelled()) {
++                    target.igniteForSeconds(event.getDuration(), false);
++                }
++                // CraftBukkit end
+             }
+         }
+ 
+@@ -385,7 +418,7 @@
+ 
+     @Override
+     public EntityType<? extends Zombie> getType() {
+-        return super.getType();
++        return (EntityType<? extends Zombie>) super.getType(); // CraftBukkit - decompile error
+     }
+ 
+     protected boolean canSpawnInLiquids() {
+@@ -496,7 +529,7 @@
+                             entitychicken1.finalizeSpawn(world, difficulty, EntitySpawnReason.JOCKEY, (SpawnGroupData) null);
+                             entitychicken1.setChickenJockey(true);
+                             this.startRiding(entitychicken1);
+-                            world.addFreshEntity(entitychicken1);
++                            world.addFreshEntity(entitychicken1, CreatureSpawnEvent.SpawnReason.MOUNT); // CraftBukkit
+                         }
+                     }
+                 }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/ZombieVillager.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/ZombieVillager.java.patch
new file mode 100644
index 0000000000..afdd5098bb
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/ZombieVillager.java.patch
@@ -0,0 +1,129 @@
+--- a/net/minecraft/world/entity/monster/ZombieVillager.java
++++ b/net/minecraft/world/entity/monster/ZombieVillager.java
+@@ -18,10 +18,6 @@
+ import net.minecraft.network.syncher.EntityDataAccessor;
+ import net.minecraft.network.syncher.EntityDataSerializers;
+ import net.minecraft.network.syncher.SynchedEntityData;
+-import net.minecraft.server.level.ServerLevel;
+-import net.minecraft.server.level.ServerPlayer;
+-import net.minecraft.sounds.SoundEvent;
+-import net.minecraft.sounds.SoundEvents;
+ import net.minecraft.world.DifficultyInstance;
+ import net.minecraft.world.InteractionHand;
+ import net.minecraft.world.InteractionResult;
+@@ -35,6 +31,7 @@
+ import net.minecraft.world.entity.SlotAccess;
+ import net.minecraft.world.entity.SpawnGroupData;
+ import net.minecraft.world.entity.ai.village.ReputationEventType;
++import net.minecraft.world.entity.npc.Villager;
+ import net.minecraft.world.entity.npc.VillagerData;
+ import net.minecraft.world.entity.npc.VillagerDataHolder;
+ import net.minecraft.world.entity.npc.VillagerProfession;
+@@ -52,6 +49,16 @@
+ import net.minecraft.world.level.block.state.BlockState;
+ import org.slf4j.Logger;
+ 
++// CraftBukkit start
++import net.minecraft.server.MinecraftServer;
++import net.minecraft.server.level.ServerLevel;
++import net.minecraft.server.level.ServerPlayer;
++import net.minecraft.sounds.SoundEvent;
++import net.minecraft.sounds.SoundEvents;
++import org.bukkit.event.entity.CreatureSpawnEvent;
++import org.bukkit.event.entity.EntityTransformEvent;
++// CraftBukkit end
++
+ public class ZombieVillager extends Zombie implements VillagerDataHolder {
+ 
+     private static final Logger LOGGER = LogUtils.getLogger();
+@@ -69,6 +76,7 @@
+     @Nullable
+     private MerchantOffers tradeOffers;
+     private int villagerXp;
++    private int lastTick = MinecraftServer.currentTick; // CraftBukkit - add field
+ 
+     public ZombieVillager(EntityType<? extends ZombieVillager> type, Level world) {
+         super(type, world);
+@@ -87,7 +95,7 @@
+     @Override
+     public void addAdditionalSaveData(CompoundTag nbt) {
+         super.addAdditionalSaveData(nbt);
+-        DataResult dataresult = VillagerData.CODEC.encodeStart(NbtOps.INSTANCE, this.getVillagerData());
++        DataResult<Tag> dataresult = VillagerData.CODEC.encodeStart(NbtOps.INSTANCE, this.getVillagerData()); // CraftBukkit - decompile error
+         Logger logger = ZombieVillager.LOGGER;
+ 
+         Objects.requireNonNull(logger);
+@@ -122,7 +130,7 @@
+         }
+ 
+         if (nbt.contains("Offers")) {
+-            DataResult dataresult1 = MerchantOffers.CODEC.parse(this.registryAccess().createSerializationContext(NbtOps.INSTANCE), nbt.get("Offers"));
++            DataResult<MerchantOffers> dataresult1 = MerchantOffers.CODEC.parse(this.registryAccess().createSerializationContext(NbtOps.INSTANCE), nbt.get("Offers")); // CraftBukkit - decompile error
+             Logger logger1 = ZombieVillager.LOGGER;
+ 
+             Objects.requireNonNull(logger1);
+@@ -149,6 +157,10 @@
+     public void tick() {
+         if (!this.level().isClientSide && this.isAlive() && this.isConverting()) {
+             int i = this.getConversionProgress();
++            // CraftBukkit start - Use wall time instead of ticks for villager conversion
++            int elapsedTicks = MinecraftServer.currentTick - this.lastTick;
++            i *= elapsedTicks;
++            // CraftBukkit end
+ 
+             this.villagerConversionTime -= i;
+             if (this.villagerConversionTime <= 0) {
+@@ -157,6 +169,7 @@
+         }
+ 
+         super.tick();
++        this.lastTick = MinecraftServer.currentTick; // CraftBukkit
+     }
+ 
+     @Override
+@@ -197,8 +210,10 @@
+         this.conversionStarter = uuid;
+         this.villagerConversionTime = delay;
+         this.getEntityData().set(ZombieVillager.DATA_CONVERTING_ID, true);
+-        this.removeEffect(MobEffects.WEAKNESS);
+-        this.addEffect(new MobEffectInstance(MobEffects.DAMAGE_BOOST, delay, Math.min(this.level().getDifficulty().getId() - 1, 0)));
++        // CraftBukkit start
++        this.removeEffect(MobEffects.WEAKNESS, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.CONVERSION);
++        this.addEffect(new MobEffectInstance(MobEffects.DAMAGE_BOOST, delay, Math.min(this.level().getDifficulty().getId() - 1, 0)), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.CONVERSION);
++        // CraftBukkit end
+         this.level().broadcastEntityEvent(this, (byte) 16);
+     }
+ 
+@@ -215,10 +230,11 @@
+     }
+ 
+     private void finishConversion(ServerLevel world) {
+-        this.convertTo(EntityType.VILLAGER, ConversionParams.single(this, false, false), (entityvillager) -> {
++        Villager converted = this.convertTo(EntityType.VILLAGER, ConversionParams.single(this, false, false), (entityvillager) -> { // CraftBukkit
+             Iterator iterator = this.dropPreservedEquipment(world, (itemstack) -> {
+                 return !EnchantmentHelper.has(itemstack, EnchantmentEffectComponents.PREVENT_ARMOR_CHANGE);
+             }).iterator();
++            this.forceDrops = false; // CraftBukkit
+ 
+             while (iterator.hasNext()) {
+                 EquipmentSlot enumitemslot = (EquipmentSlot) iterator.next();
+@@ -248,12 +264,16 @@
+                 }
+             }
+ 
+-            entityvillager.addEffect(new MobEffectInstance(MobEffects.CONFUSION, 200, 0));
++            entityvillager.addEffect(new MobEffectInstance(MobEffects.CONFUSION, 200, 0), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.CONVERSION); // CraftBukkit
+             if (!this.isSilent()) {
+                 world.levelEvent((Player) null, 1027, this.blockPosition(), 0);
+             }
+-
+-        });
++        // CraftBukkit start
++        }, EntityTransformEvent.TransformReason.CURED, CreatureSpawnEvent.SpawnReason.CURED);
++        if (converted == null) {
++            ((org.bukkit.entity.ZombieVillager) this.getBukkitEntity()).setConversionTime(-1); // SPIGOT-5208: End conversion to stop event spam
++        }
++        // CraftBukkit end
+     }
+ 
+     @VisibleForTesting
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityPigZombie.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/ZombifiedPiglin.java.patch
similarity index 56%
rename from paper-server/patches/sources/net/minecraft/world/entity/monster/EntityPigZombie.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/monster/ZombifiedPiglin.java.patch
index f0a0fd531d..8e7a5e1729 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/EntityPigZombie.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/ZombifiedPiglin.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/world/entity/monster/EntityPigZombie.java
-+++ b/net/minecraft/world/entity/monster/EntityPigZombie.java
+--- a/net/minecraft/world/entity/monster/ZombifiedPiglin.java
++++ b/net/minecraft/world/entity/monster/ZombifiedPiglin.java
 @@ -149,7 +149,7 @@
          }).filter((entitypigzombie) -> {
              return !entitypigzombie.isAlliedTo((Entity) this.getTarget());
@@ -9,29 +9,34 @@
          });
      }
  
-@@ -158,7 +158,7 @@
+@@ -158,22 +158,31 @@
      }
  
      @Override
--    public void setTarget(@Nullable EntityLiving entityliving) {
-+    public boolean setTarget(@Nullable EntityLiving entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fireEvent) { // CraftBukkit - signature
-         if (this.getTarget() == null && entityliving != null) {
-             this.playFirstAngerSoundIn = EntityPigZombie.FIRST_ANGER_SOUND_DELAY.sample(this.random);
-             this.ticksUntilNextAlert = EntityPigZombie.ALERT_INTERVAL.sample(this.random);
-@@ -168,12 +168,21 @@
-             this.setLastHurtByPlayer((EntityHuman) entityliving);
+-    public void setTarget(@Nullable LivingEntity target) {
+-        if (this.getTarget() == null && target != null) {
++    public boolean setTarget(@Nullable LivingEntity entityliving, org.bukkit.event.entity.EntityTargetEvent.TargetReason reason, boolean fireEvent) { // CraftBukkit - signature
++        if (this.getTarget() == null && entityliving != null) {
+             this.playFirstAngerSoundIn = ZombifiedPiglin.FIRST_ANGER_SOUND_DELAY.sample(this.random);
+             this.ticksUntilNextAlert = ZombifiedPiglin.ALERT_INTERVAL.sample(this.random);
          }
  
--        super.setTarget(entityliving);
+-        if (target instanceof Player) {
+-            this.setLastHurtByPlayer((Player) target);
++        if (entityliving instanceof Player) {
++            this.setLastHurtByPlayer((Player) entityliving);
+         }
+ 
+-        super.setTarget(target);
 +        return super.setTarget(entityliving, reason, fireEvent); // CraftBukkit
      }
  
      @Override
      public void startPersistentAngerTimer() {
--        this.setRemainingPersistentAngerTime(EntityPigZombie.PERSISTENT_ANGER_TIME.sample(this.random));
+-        this.setRemainingPersistentAngerTime(ZombifiedPiglin.PERSISTENT_ANGER_TIME.sample(this.random));
 +        // CraftBukkit start
-+        Entity entity = ((WorldServer) this.level()).getEntity(getPersistentAngerTarget());
-+        org.bukkit.event.entity.PigZombieAngerEvent event = new org.bukkit.event.entity.PigZombieAngerEvent((org.bukkit.entity.PigZombie) this.getBukkitEntity(), (entity == null) ? null : entity.getBukkitEntity(), EntityPigZombie.PERSISTENT_ANGER_TIME.sample(this.random));
++        Entity entity = ((ServerLevel) this.level()).getEntity(this.getPersistentAngerTarget());
++        org.bukkit.event.entity.PigZombieAngerEvent event = new org.bukkit.event.entity.PigZombieAngerEvent((org.bukkit.entity.PigZombie) this.getBukkitEntity(), (entity == null) ? null : entity.getBukkitEntity(), ZombifiedPiglin.PERSISTENT_ANGER_TIME.sample(this.random));
 +        this.level().getCraftServer().getPluginManager().callEvent(event);
 +        if (event.isCancelled()) {
 +            this.setPersistentAngerTarget(null);
@@ -41,4 +46,4 @@
 +        // CraftBukkit end
      }
  
-     public static boolean checkZombifiedPiglinSpawnRules(EntityTypes<EntityPigZombie> entitytypes, GeneratorAccess generatoraccess, EntitySpawnReason entityspawnreason, BlockPosition blockposition, RandomSource randomsource) {
+     public static boolean checkZombifiedPiglinSpawnRules(EntityType<ZombifiedPiglin> type, LevelAccessor world, EntitySpawnReason spawnReason, BlockPos pos, RandomSource random) {
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/breeze/Breeze.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/breeze/Breeze.java.patch
new file mode 100644
index 0000000000..b3c69c8fbb
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/breeze/Breeze.java.patch
@@ -0,0 +1,19 @@
+--- a/net/minecraft/world/entity/monster/breeze/Breeze.java
++++ b/net/minecraft/world/entity/monster/breeze/Breeze.java
+@@ -77,7 +77,7 @@
+ 
+     @Override
+     public Brain<Breeze> getBrain() {
+-        return super.getBrain();
++        return (Brain<Breeze>) super.getBrain(); // CraftBukkit - decompile error
+     }
+ 
+     @Override
+@@ -252,6 +252,7 @@
+ 
+     @Override
+     public boolean canAttackType(EntityType<?> type) {
++        if (this.getTarget() != null) return this.getTarget().getType() == type; // SPIGOT-7957: Allow attack if target from brain was set
+         return type == EntityType.PLAYER || type == EntityType.IRON_GOLEM;
+     }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/breeze/Breeze.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/breeze/Breeze.patch
deleted file mode 100644
index 2050f356f6..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/breeze/Breeze.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- a/net/minecraft/world/entity/monster/breeze/Breeze.java
-+++ b/net/minecraft/world/entity/monster/breeze/Breeze.java
-@@ -77,7 +77,7 @@
- 
-     @Override
-     public BehaviorController<Breeze> getBrain() {
--        return super.getBrain();
-+        return (BehaviorController<Breeze>) super.getBrain(); // CraftBukkit - decompile error
-     }
- 
-     @Override
-@@ -252,6 +252,7 @@
- 
-     @Override
-     public boolean canAttackType(EntityTypes<?> entitytypes) {
-+        if (this.getTarget() != null) return this.getTarget().getType() == entitytypes; // SPIGOT-7957: Allow attack if target from brain was set
-         return entitytypes == EntityTypes.PLAYER || entitytypes == EntityTypes.IRON_GOLEM;
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/creaking/Creaking.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/creaking/Creaking.java.patch
similarity index 55%
rename from paper-server/patches/sources/net/minecraft/world/entity/monster/creaking/Creaking.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/monster/creaking/Creaking.java.patch
index 80e612bda4..796c6a353e 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/creaking/Creaking.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/creaking/Creaking.java.patch
@@ -3,9 +3,9 @@
 @@ -206,7 +206,7 @@
  
      @Override
-     public BehaviorController<Creaking> getBrain() {
+     public Brain<Creaking> getBrain() {
 -        return super.getBrain();
-+        return (BehaviorController<Creaking>) super.getBrain(); // CraftBukkit - decompile error
++        return (Brain<Creaking>) super.getBrain(); // CraftBukkit - decompile error
      }
  
      @Override
@@ -17,22 +17,22 @@
 +        this.remove(Entity.RemovalReason.DISCARDED, null); // CraftBukkit - add Bukkit remove cause
      }
  
-     public void creakingDeathEffects(DamageSource damagesource) {
+     public void creakingDeathEffects(DamageSource damageSource) {
 @@ -476,7 +476,7 @@
  
      @Override
-     protected SoundEffect getHurtSound(DamageSource damagesource) {
--        return this.isHeartBound() ? SoundEffects.CREAKING_SWAY : super.getHurtSound(damagesource);
-+        return SoundEffects.CREAKING_SWAY;
+     protected SoundEvent getHurtSound(DamageSource source) {
+-        return this.isHeartBound() ? SoundEvents.CREAKING_SWAY : super.getHurtSound(source);
++        return SoundEvents.CREAKING_SWAY;
      }
  
      @Override
 @@ -549,7 +549,7 @@
      }
  
-     public void activate(EntityHuman entityhuman) {
--        this.getBrain().setMemory(MemoryModuleType.ATTACK_TARGET, (Object) entityhuman);
-+        this.getBrain().setMemory(MemoryModuleType.ATTACK_TARGET, entityhuman); // CraftBukkit - decompile error
+     public void activate(Player player) {
+-        this.getBrain().setMemory(MemoryModuleType.ATTACK_TARGET, (Object) player);
++        this.getBrain().setMemory(MemoryModuleType.ATTACK_TARGET, player); // CraftBukkit - decompile error
          this.gameEvent(GameEvent.ENTITY_ACTION);
-         this.makeSound(SoundEffects.CREAKING_ACTIVATE);
+         this.makeSound(SoundEvents.CREAKING_ACTIVATE);
          this.setIsActive(true);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/hoglin/EntityHoglin.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/hoglin/Hoglin.java.patch
similarity index 68%
rename from paper-server/patches/sources/net/minecraft/world/entity/monster/hoglin/EntityHoglin.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/monster/hoglin/Hoglin.java.patch
index 84d7e913f8..15431f40e0 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/hoglin/EntityHoglin.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/hoglin/Hoglin.java.patch
@@ -1,28 +1,28 @@
---- a/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java
-+++ b/net/minecraft/world/entity/monster/hoglin/EntityHoglin.java
+--- a/net/minecraft/world/entity/monster/hoglin/Hoglin.java
++++ b/net/minecraft/world/entity/monster/hoglin/Hoglin.java
 @@ -63,7 +63,8 @@
      public int timeInOverworld;
      public boolean cannotBeHunted;
-     protected static final ImmutableList<? extends SensorType<? extends Sensor<? super EntityHoglin>>> SENSOR_TYPES = ImmutableList.of(SensorType.NEAREST_LIVING_ENTITIES, SensorType.NEAREST_PLAYERS, SensorType.NEAREST_ADULT, SensorType.HOGLIN_SPECIFIC_SENSOR);
+     protected static final ImmutableList<? extends SensorType<? extends Sensor<? super Hoglin>>> SENSOR_TYPES = ImmutableList.of(SensorType.NEAREST_LIVING_ENTITIES, SensorType.NEAREST_PLAYERS, SensorType.NEAREST_ADULT, SensorType.HOGLIN_SPECIFIC_SENSOR);
 -    protected static final ImmutableList<? extends MemoryModuleType<?>> MEMORY_TYPES = ImmutableList.of(MemoryModuleType.BREED_TARGET, MemoryModuleType.NEAREST_LIVING_ENTITIES, MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES, MemoryModuleType.NEAREST_VISIBLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_ATTACKABLE_PLAYER, MemoryModuleType.LOOK_TARGET, MemoryModuleType.WALK_TARGET, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.PATH, MemoryModuleType.ATTACK_TARGET, MemoryModuleType.ATTACK_COOLING_DOWN, MemoryModuleType.NEAREST_VISIBLE_ADULT_PIGLIN, new MemoryModuleType[]{MemoryModuleType.AVOID_TARGET, MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, MemoryModuleType.NEAREST_VISIBLE_ADULT_HOGLINS, MemoryModuleType.NEAREST_VISIBLE_ADULT, MemoryModuleType.NEAREST_REPELLENT, MemoryModuleType.PACIFIED, MemoryModuleType.IS_PANICKING});
 +    // CraftBukkit - decompile error
 +    protected static final ImmutableList<? extends MemoryModuleType<?>> MEMORY_TYPES = ImmutableList.<MemoryModuleType<?>>of(MemoryModuleType.BREED_TARGET, MemoryModuleType.NEAREST_LIVING_ENTITIES, MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES, MemoryModuleType.NEAREST_VISIBLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_ATTACKABLE_PLAYER, MemoryModuleType.LOOK_TARGET, MemoryModuleType.WALK_TARGET, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.PATH, MemoryModuleType.ATTACK_TARGET, MemoryModuleType.ATTACK_COOLING_DOWN, MemoryModuleType.NEAREST_VISIBLE_ADULT_PIGLIN, new MemoryModuleType[]{MemoryModuleType.AVOID_TARGET, MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, MemoryModuleType.NEAREST_VISIBLE_ADULT_HOGLINS, MemoryModuleType.NEAREST_VISIBLE_ADULT, MemoryModuleType.NEAREST_REPELLENT, MemoryModuleType.PACIFIED, MemoryModuleType.IS_PANICKING});
  
-     public EntityHoglin(EntityTypes<? extends EntityHoglin> entitytypes, World world) {
-         super(entitytypes, world);
+     public Hoglin(EntityType<? extends Hoglin> type, Level world) {
+         super(type, world);
 @@ -134,7 +135,7 @@
  
      @Override
-     public BehaviorController<EntityHoglin> getBrain() {
+     public Brain<Hoglin> getBrain() {
 -        return super.getBrain();
-+        return (BehaviorController<EntityHoglin>) super.getBrain(); // CraftBukkit - decompile error
++        return (Brain<Hoglin>) super.getBrain(); // CraftBukkit - decompile error
      }
  
      @Override
 @@ -242,7 +243,7 @@
      private void finishConversion() {
-         this.convertTo(EntityTypes.ZOGLIN, ConversionParams.single(this, true, false), (entityzoglin) -> {
-             entityzoglin.addEffect(new MobEffect(MobEffects.CONFUSION, 200, 0));
+         this.convertTo(EntityType.ZOGLIN, ConversionParams.single(this, true, false), (entityzoglin) -> {
+             entityzoglin.addEffect(new MobEffectInstance(MobEffects.CONFUSION, 200, 0));
 -        });
 +        }, org.bukkit.event.entity.EntityTransformEvent.TransformReason.PIGLIN_ZOMBIFIED, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.PIGLIN_ZOMBIFIED); // CraftBukkit - add spawn and transform reasons
      }
@@ -31,9 +31,9 @@
 @@ -326,7 +327,7 @@
  
      @Override
-     protected SoundEffect getAmbientSound() {
--        return this.level().isClientSide ? null : (SoundEffect) HoglinAI.getSoundForCurrentActivity(this).orElse((Object) null);
-+        return this.level().isClientSide ? null : (SoundEffect) HoglinAI.getSoundForCurrentActivity(this).orElse(null); // CraftBukkit - decompile error
+     protected SoundEvent getAmbientSound() {
+-        return this.level().isClientSide ? null : (SoundEvent) HoglinAi.getSoundForCurrentActivity(this).orElse((Object) null);
++        return this.level().isClientSide ? null : (SoundEvent) HoglinAi.getSoundForCurrentActivity(this).orElse(null); // CraftBukkit - decompile error
      }
  
      @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java.patch
new file mode 100644
index 0000000000..d2f50d3274
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java
++++ b/net/minecraft/world/entity/monster/piglin/AbstractPiglin.java
+@@ -102,7 +102,7 @@
+     protected void finishConversion(ServerLevel world) {
+         this.convertTo(EntityType.ZOMBIFIED_PIGLIN, ConversionParams.single(this, true, true), (entitypigzombie) -> {
+             entitypigzombie.addEffect(new MobEffectInstance(MobEffects.CONFUSION, 200, 0));
+-        });
++        }, org.bukkit.event.entity.EntityTransformEvent.TransformReason.PIGLIN_ZOMBIFIED, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.PIGLIN_ZOMBIFIED); // CraftBukkit - add spawn and transform reasons
+     }
+ 
+     public boolean isAdult() {
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/EntityPiglin.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/EntityPiglin.patch
deleted file mode 100644
index 3e139a4f32..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/EntityPiglin.patch
+++ /dev/null
@@ -1,96 +0,0 @@
---- a/net/minecraft/world/entity/monster/piglin/EntityPiglin.java
-+++ b/net/minecraft/world/entity/monster/piglin/EntityPiglin.java
-@@ -60,6 +60,18 @@
- import net.minecraft.world.level.block.Blocks;
- import net.minecraft.world.level.block.state.IBlockData;
- 
-+// CraftBukkit start
-+import java.util.stream.Collectors;
-+import java.util.HashSet;
-+import java.util.Set;
-+import net.minecraft.core.registries.BuiltInRegistries;
-+import net.minecraft.nbt.NBTTagList;
-+import net.minecraft.nbt.NBTTagString;
-+import net.minecraft.nbt.NBTBase;
-+import net.minecraft.resources.MinecraftKey;
-+import net.minecraft.world.item.Item;
-+// CraftBukkit end
-+
- public class EntityPiglin extends EntityPiglinAbstract implements ICrossbow, InventoryCarrier {
- 
-     private static final DataWatcherObject<Boolean> DATA_BABY_ID = DataWatcher.defineId(EntityPiglin.class, DataWatcherRegistry.BOOLEAN);
-@@ -79,6 +91,10 @@
-     public boolean cannotHunt;
-     protected static final ImmutableList<SensorType<? extends Sensor<? super EntityPiglin>>> SENSOR_TYPES = ImmutableList.of(SensorType.NEAREST_LIVING_ENTITIES, SensorType.NEAREST_PLAYERS, SensorType.NEAREST_ITEMS, SensorType.HURT_BY, SensorType.PIGLIN_SPECIFIC_SENSOR);
-     protected static final ImmutableList<MemoryModuleType<?>> MEMORY_TYPES = ImmutableList.of(MemoryModuleType.LOOK_TARGET, MemoryModuleType.DOORS_TO_CLOSE, MemoryModuleType.NEAREST_LIVING_ENTITIES, MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES, MemoryModuleType.NEAREST_VISIBLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_ATTACKABLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_ADULT_PIGLINS, MemoryModuleType.NEARBY_ADULT_PIGLINS, MemoryModuleType.NEAREST_VISIBLE_WANTED_ITEM, MemoryModuleType.ITEM_PICKUP_COOLDOWN_TICKS, MemoryModuleType.HURT_BY, MemoryModuleType.HURT_BY_ENTITY, new MemoryModuleType[]{MemoryModuleType.WALK_TARGET, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.ATTACK_TARGET, MemoryModuleType.ATTACK_COOLING_DOWN, MemoryModuleType.INTERACTION_TARGET, MemoryModuleType.PATH, MemoryModuleType.ANGRY_AT, MemoryModuleType.UNIVERSAL_ANGER, MemoryModuleType.AVOID_TARGET, MemoryModuleType.ADMIRING_ITEM, MemoryModuleType.TIME_TRYING_TO_REACH_ADMIRE_ITEM, MemoryModuleType.ADMIRING_DISABLED, MemoryModuleType.DISABLE_WALK_TO_ADMIRE_ITEM, MemoryModuleType.CELEBRATE_LOCATION, MemoryModuleType.DANCING, MemoryModuleType.HUNTED_RECENTLY, MemoryModuleType.NEAREST_VISIBLE_BABY_HOGLIN, MemoryModuleType.NEAREST_VISIBLE_NEMESIS, MemoryModuleType.NEAREST_VISIBLE_ZOMBIFIED, MemoryModuleType.RIDE_TARGET, MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, MemoryModuleType.NEAREST_VISIBLE_HUNTABLE_HOGLIN, MemoryModuleType.NEAREST_TARGETABLE_PLAYER_NOT_WEARING_GOLD, MemoryModuleType.NEAREST_PLAYER_HOLDING_WANTED_ITEM, MemoryModuleType.ATE_RECENTLY, MemoryModuleType.NEAREST_REPELLENT});
-+    // CraftBukkit start - Custom bartering and interest list
-+    public Set<Item> allowedBarterItems = new HashSet<>();
-+    public Set<Item> interestItems = new HashSet<>();
-+    // CraftBukkit end
- 
-     public EntityPiglin(EntityTypes<? extends EntityPiglinAbstract> entitytypes, World world) {
-         super(entitytypes, world);
-@@ -97,6 +113,14 @@
-         }
- 
-         this.writeInventoryToTag(nbttagcompound, this.registryAccess());
-+        // CraftBukkit start
-+        NBTTagList barterList = new NBTTagList();
-+        allowedBarterItems.stream().map(BuiltInRegistries.ITEM::getKey).map(MinecraftKey::toString).map(NBTTagString::valueOf).forEach(barterList::add);
-+        nbttagcompound.put("Bukkit.BarterList", barterList);
-+        NBTTagList interestList = new NBTTagList();
-+        interestItems.stream().map(BuiltInRegistries.ITEM::getKey).map(MinecraftKey::toString).map(NBTTagString::valueOf).forEach(interestList::add);
-+        nbttagcompound.put("Bukkit.InterestList", interestList);
-+        // CraftBukkit end
-     }
- 
-     @Override
-@@ -105,6 +129,10 @@
-         this.setBaby(nbttagcompound.getBoolean("IsBaby"));
-         this.setCannotHunt(nbttagcompound.getBoolean("CannotHunt"));
-         this.readInventoryFromTag(nbttagcompound, this.registryAccess());
-+        // CraftBukkit start
-+        this.allowedBarterItems = nbttagcompound.getList("Bukkit.BarterList", 8).stream().map(NBTBase::getAsString).map(MinecraftKey::tryParse).map(BuiltInRegistries.ITEM::getValue).collect(Collectors.toCollection(HashSet::new));
-+        this.interestItems = nbttagcompound.getList("Bukkit.InterestList", 8).stream().map(NBTBase::getAsString).map(MinecraftKey::tryParse).map(BuiltInRegistries.ITEM::getValue).collect(Collectors.toCollection(HashSet::new));
-+        // CraftBukkit end
-     }
- 
-     @VisibleForDebug
-@@ -224,7 +252,7 @@
- 
-     @Override
-     public BehaviorController<EntityPiglin> getBrain() {
--        return super.getBrain();
-+        return (BehaviorController<EntityPiglin>) super.getBrain(); // CraftBukkit - Decompile error
-     }
- 
-     @Override
-@@ -374,7 +402,7 @@
-     }
- 
-     protected void holdInOffHand(ItemStack itemstack) {
--        if (itemstack.is(PiglinAI.BARTERING_ITEM)) {
-+        if (itemstack.is(PiglinAI.BARTERING_ITEM) || allowedBarterItems.contains(itemstack.getItem())) { // CraftBukkit - Changes to accept custom payment items
-             this.setItemSlot(EnumItemSlot.OFFHAND, itemstack);
-             this.setGuaranteedDrop(EnumItemSlot.OFFHAND);
-         } else {
-@@ -401,8 +429,8 @@
-             return false;
-         } else {
-             TagKey<Item> tagkey = this.getPreferredWeaponType();
--            boolean flag = PiglinAI.isLovedItem(itemstack) || tagkey != null && itemstack.is(tagkey);
--            boolean flag1 = PiglinAI.isLovedItem(itemstack1) || tagkey != null && itemstack1.is(tagkey);
-+            boolean flag = PiglinAI.isLovedItem(itemstack, this) || tagkey != null && itemstack.is(tagkey); // CraftBukkit
-+            boolean flag1 = PiglinAI.isLovedItem(itemstack1, this) || tagkey != null && itemstack1.is(tagkey); // CraftBukkit
- 
-             return flag && !flag1 ? true : (!flag && flag1 ? false : super.canReplaceCurrentItem(itemstack, itemstack1, enumitemslot));
-         }
-@@ -431,7 +459,7 @@
- 
-     @Override
-     protected SoundEffect getAmbientSound() {
--        return this.level().isClientSide ? null : (SoundEffect) PiglinAI.getSoundForCurrentActivity(this).orElse((Object) null);
-+        return this.level().isClientSide ? null : (SoundEffect) PiglinAI.getSoundForCurrentActivity(this).orElse(null); // CraftBukkit - Decompile error
-     }
- 
-     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/EntityPiglinAbstract.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/EntityPiglinAbstract.patch
deleted file mode 100644
index 85d6ba91eb..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/EntityPiglinAbstract.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/entity/monster/piglin/EntityPiglinAbstract.java
-+++ b/net/minecraft/world/entity/monster/piglin/EntityPiglinAbstract.java
-@@ -102,7 +102,7 @@
-     protected void finishConversion(WorldServer worldserver) {
-         this.convertTo(EntityTypes.ZOMBIFIED_PIGLIN, ConversionParams.single(this, true, true), (entitypigzombie) -> {
-             entitypigzombie.addEffect(new MobEffect(MobEffects.CONFUSION, 200, 0));
--        });
-+        }, org.bukkit.event.entity.EntityTransformEvent.TransformReason.PIGLIN_ZOMBIFIED, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.PIGLIN_ZOMBIFIED); // CraftBukkit - add spawn and transform reasons
-     }
- 
-     public boolean isAdult() {
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/Piglin.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/Piglin.java.patch
new file mode 100644
index 0000000000..b54002067c
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/Piglin.java.patch
@@ -0,0 +1,119 @@
+--- a/net/minecraft/world/entity/monster/piglin/Piglin.java
++++ b/net/minecraft/world/entity/monster/piglin/Piglin.java
+@@ -4,15 +4,6 @@
+ import com.mojang.serialization.Dynamic;
+ import java.util.List;
+ import javax.annotation.Nullable;
+-import net.minecraft.core.BlockPos;
+-import net.minecraft.nbt.CompoundTag;
+-import net.minecraft.network.syncher.EntityDataAccessor;
+-import net.minecraft.network.syncher.EntityDataSerializers;
+-import net.minecraft.network.syncher.SynchedEntityData;
+-import net.minecraft.resources.ResourceLocation;
+-import net.minecraft.server.level.ServerLevel;
+-import net.minecraft.sounds.SoundEvent;
+-import net.minecraft.sounds.SoundEvents;
+ import net.minecraft.tags.ItemTags;
+ import net.minecraft.tags.TagKey;
+ import net.minecraft.util.RandomSource;
+@@ -59,6 +50,25 @@
+ import net.minecraft.world.level.ServerLevelAccessor;
+ import net.minecraft.world.level.block.Blocks;
+ import net.minecraft.world.level.block.state.BlockState;
++// CraftBukkit start
++import java.util.stream.Collectors;
++import java.util.HashSet;
++import java.util.Set;
++import net.minecraft.core.BlockPos;
++import net.minecraft.core.registries.BuiltInRegistries;
++import net.minecraft.nbt.CompoundTag;
++import net.minecraft.nbt.ListTag;
++import net.minecraft.nbt.StringTag;
++import net.minecraft.nbt.Tag;
++import net.minecraft.network.syncher.EntityDataAccessor;
++import net.minecraft.network.syncher.EntityDataSerializers;
++import net.minecraft.network.syncher.SynchedEntityData;
++import net.minecraft.resources.ResourceLocation;
++import net.minecraft.server.level.ServerLevel;
++import net.minecraft.sounds.SoundEvent;
++import net.minecraft.sounds.SoundEvents;
++import net.minecraft.world.item.Item;
++// CraftBukkit end
+ 
+ public class Piglin extends AbstractPiglin implements CrossbowAttackMob, InventoryCarrier {
+ 
+@@ -79,6 +89,10 @@
+     public boolean cannotHunt;
+     protected static final ImmutableList<SensorType<? extends Sensor<? super Piglin>>> SENSOR_TYPES = ImmutableList.of(SensorType.NEAREST_LIVING_ENTITIES, SensorType.NEAREST_PLAYERS, SensorType.NEAREST_ITEMS, SensorType.HURT_BY, SensorType.PIGLIN_SPECIFIC_SENSOR);
+     protected static final ImmutableList<MemoryModuleType<?>> MEMORY_TYPES = ImmutableList.of(MemoryModuleType.LOOK_TARGET, MemoryModuleType.DOORS_TO_CLOSE, MemoryModuleType.NEAREST_LIVING_ENTITIES, MemoryModuleType.NEAREST_VISIBLE_LIVING_ENTITIES, MemoryModuleType.NEAREST_VISIBLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_ATTACKABLE_PLAYER, MemoryModuleType.NEAREST_VISIBLE_ADULT_PIGLINS, MemoryModuleType.NEARBY_ADULT_PIGLINS, MemoryModuleType.NEAREST_VISIBLE_WANTED_ITEM, MemoryModuleType.ITEM_PICKUP_COOLDOWN_TICKS, MemoryModuleType.HURT_BY, MemoryModuleType.HURT_BY_ENTITY, new MemoryModuleType[]{MemoryModuleType.WALK_TARGET, MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE, MemoryModuleType.ATTACK_TARGET, MemoryModuleType.ATTACK_COOLING_DOWN, MemoryModuleType.INTERACTION_TARGET, MemoryModuleType.PATH, MemoryModuleType.ANGRY_AT, MemoryModuleType.UNIVERSAL_ANGER, MemoryModuleType.AVOID_TARGET, MemoryModuleType.ADMIRING_ITEM, MemoryModuleType.TIME_TRYING_TO_REACH_ADMIRE_ITEM, MemoryModuleType.ADMIRING_DISABLED, MemoryModuleType.DISABLE_WALK_TO_ADMIRE_ITEM, MemoryModuleType.CELEBRATE_LOCATION, MemoryModuleType.DANCING, MemoryModuleType.HUNTED_RECENTLY, MemoryModuleType.NEAREST_VISIBLE_BABY_HOGLIN, MemoryModuleType.NEAREST_VISIBLE_NEMESIS, MemoryModuleType.NEAREST_VISIBLE_ZOMBIFIED, MemoryModuleType.RIDE_TARGET, MemoryModuleType.VISIBLE_ADULT_PIGLIN_COUNT, MemoryModuleType.VISIBLE_ADULT_HOGLIN_COUNT, MemoryModuleType.NEAREST_VISIBLE_HUNTABLE_HOGLIN, MemoryModuleType.NEAREST_TARGETABLE_PLAYER_NOT_WEARING_GOLD, MemoryModuleType.NEAREST_PLAYER_HOLDING_WANTED_ITEM, MemoryModuleType.ATE_RECENTLY, MemoryModuleType.NEAREST_REPELLENT});
++    // CraftBukkit start - Custom bartering and interest list
++    public Set<Item> allowedBarterItems = new HashSet<>();
++    public Set<Item> interestItems = new HashSet<>();
++    // CraftBukkit end
+ 
+     public Piglin(EntityType<? extends AbstractPiglin> type, Level world) {
+         super(type, world);
+@@ -97,6 +111,14 @@
+         }
+ 
+         this.writeInventoryToTag(nbt, this.registryAccess());
++        // CraftBukkit start
++        ListTag barterList = new ListTag();
++        this.allowedBarterItems.stream().map(BuiltInRegistries.ITEM::getKey).map(ResourceLocation::toString).map(StringTag::valueOf).forEach(barterList::add);
++        nbt.put("Bukkit.BarterList", barterList);
++        ListTag interestList = new ListTag();
++        this.interestItems.stream().map(BuiltInRegistries.ITEM::getKey).map(ResourceLocation::toString).map(StringTag::valueOf).forEach(interestList::add);
++        nbt.put("Bukkit.InterestList", interestList);
++        // CraftBukkit end
+     }
+ 
+     @Override
+@@ -105,6 +127,10 @@
+         this.setBaby(nbt.getBoolean("IsBaby"));
+         this.setCannotHunt(nbt.getBoolean("CannotHunt"));
+         this.readInventoryFromTag(nbt, this.registryAccess());
++        // CraftBukkit start
++        this.allowedBarterItems = nbt.getList("Bukkit.BarterList", 8).stream().map(Tag::getAsString).map(ResourceLocation::tryParse).map(BuiltInRegistries.ITEM::getValue).collect(Collectors.toCollection(HashSet::new));
++        this.interestItems = nbt.getList("Bukkit.InterestList", 8).stream().map(Tag::getAsString).map(ResourceLocation::tryParse).map(BuiltInRegistries.ITEM::getValue).collect(Collectors.toCollection(HashSet::new));
++        // CraftBukkit end
+     }
+ 
+     @VisibleForDebug
+@@ -224,7 +250,7 @@
+ 
+     @Override
+     public Brain<Piglin> getBrain() {
+-        return super.getBrain();
++        return (Brain<Piglin>) super.getBrain(); // CraftBukkit - Decompile error
+     }
+ 
+     @Override
+@@ -374,7 +400,7 @@
+     }
+ 
+     protected void holdInOffHand(ItemStack stack) {
+-        if (stack.is(PiglinAi.BARTERING_ITEM)) {
++        if (stack.is(PiglinAi.BARTERING_ITEM) || this.allowedBarterItems.contains(stack.getItem())) { // CraftBukkit - Changes to accept custom payment items
+             this.setItemSlot(EquipmentSlot.OFFHAND, stack);
+             this.setGuaranteedDrop(EquipmentSlot.OFFHAND);
+         } else {
+@@ -401,8 +427,8 @@
+             return false;
+         } else {
+             TagKey<Item> tagkey = this.getPreferredWeaponType();
+-            boolean flag = PiglinAi.isLovedItem(newStack) || tagkey != null && newStack.is(tagkey);
+-            boolean flag1 = PiglinAi.isLovedItem(currentStack) || tagkey != null && currentStack.is(tagkey);
++            boolean flag = PiglinAi.isLovedItem(newStack, this) || tagkey != null && newStack.is(tagkey); // CraftBukkit
++            boolean flag1 = PiglinAi.isLovedItem(currentStack, this) || tagkey != null && currentStack.is(tagkey); // CraftBukkit
+ 
+             return flag && !flag1 ? true : (!flag && flag1 ? false : super.canReplaceCurrentItem(newStack, currentStack, slot));
+         }
+@@ -431,7 +457,7 @@
+ 
+     @Override
+     protected SoundEvent getAmbientSound() {
+-        return this.level().isClientSide ? null : (SoundEvent) PiglinAi.getSoundForCurrentActivity(this).orElse((Object) null);
++        return this.level().isClientSide ? null : (SoundEvent) PiglinAi.getSoundForCurrentActivity(this).orElse(null); // CraftBukkit - Decompile error
+     }
+ 
+     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/PiglinAI.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/PiglinAI.patch
deleted file mode 100644
index 26aa77840c..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/PiglinAI.patch
+++ /dev/null
@@ -1,174 +0,0 @@
---- a/net/minecraft/world/entity/monster/piglin/PiglinAI.java
-+++ b/net/minecraft/world/entity/monster/piglin/PiglinAI.java
-@@ -72,6 +72,14 @@
- import net.minecraft.world.level.storage.loot.parameters.LootContextParameters;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import java.util.stream.Collectors;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.craftbukkit.inventory.CraftItemStack;
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+import org.bukkit.event.entity.PiglinBarterEvent;
-+// CraftBukkit end
-+
- public class PiglinAI {
- 
-     public static final int REPELLENT_DETECTION_RANGE_HORIZONTAL = 8;
-@@ -166,7 +174,8 @@
-     }
- 
-     private static void initRideHoglinActivity(BehaviorController<EntityPiglin> behaviorcontroller) {
--        behaviorcontroller.addActivityAndRemoveMemoryWhenStopped(Activity.RIDE, 10, ImmutableList.of(BehaviorStartRiding.create(0.8F), BehaviorLookTarget.create(PiglinAI::isPlayerHoldingLovedItem, 8.0F), BehaviorBuilder.sequence(BehaviorBuilder.triggerIf(Entity::isPassenger), TriggerGate.triggerOneShuffled(ImmutableList.builder().addAll(createLookBehaviors()).add(Pair.of(BehaviorBuilder.triggerIf((entitypiglin) -> {
-+        // CraftBukkit - decompile error
-+        behaviorcontroller.addActivityAndRemoveMemoryWhenStopped(Activity.RIDE, 10, ImmutableList.of(BehaviorStartRiding.create(0.8F), BehaviorLookTarget.create(PiglinAI::isPlayerHoldingLovedItem, 8.0F), BehaviorBuilder.sequence(BehaviorBuilder.triggerIf(Entity::isPassenger), TriggerGate.triggerOneShuffled(ImmutableList.<Pair<? extends net.minecraft.world.entity.ai.behavior.declarative.Trigger<? super EntityLiving>, Integer>>builder().addAll(createLookBehaviors()).add(Pair.of(BehaviorBuilder.triggerIf((entitypiglin) -> {
-             return true;
-         }), 1)).build())), BehaviorStopRiding.create(8, PiglinAI::wantsToStopRiding)), MemoryModuleType.RIDE_TARGET);
-     }
-@@ -176,7 +185,7 @@
-     }
- 
-     private static BehaviorGateSingle<EntityLiving> createIdleLookBehaviors() {
--        return new BehaviorGateSingle<>(ImmutableList.builder().addAll(createLookBehaviors()).add(Pair.of(new BehaviorNop(30, 60), 1)).build());
-+        return new BehaviorGateSingle<>(ImmutableList.<Pair<? extends BehaviorControl<? super EntityLiving>, Integer>>builder().addAll(createLookBehaviors()).add(Pair.of(new BehaviorNop(30, 60), 1)).build()); // CraftBukkit - decompile error
-     }
- 
-     private static BehaviorGateSingle<EntityPiglin> createIdleMovementBehaviors() {
-@@ -197,13 +206,13 @@
- 
-     protected static void updateActivity(EntityPiglin entitypiglin) {
-         BehaviorController<EntityPiglin> behaviorcontroller = entitypiglin.getBrain();
--        Activity activity = (Activity) behaviorcontroller.getActiveNonCoreActivity().orElse((Object) null);
-+        Activity activity = (Activity) behaviorcontroller.getActiveNonCoreActivity().orElse(null); // CraftBukkit - decompile error
- 
-         behaviorcontroller.setActiveActivityToFirstValid(ImmutableList.of(Activity.ADMIRE_ITEM, Activity.FIGHT, Activity.AVOID, Activity.CELEBRATE, Activity.RIDE, Activity.IDLE));
--        Activity activity1 = (Activity) behaviorcontroller.getActiveNonCoreActivity().orElse((Object) null);
-+        Activity activity1 = (Activity) behaviorcontroller.getActiveNonCoreActivity().orElse(null); // CraftBukkit - decompile error
- 
-         if (activity != activity1) {
--            Optional optional = getSoundForCurrentActivity(entitypiglin);
-+            Optional<SoundEffect> optional = getSoundForCurrentActivity(entitypiglin); // CraftBukkit - decompile error
- 
-             Objects.requireNonNull(entitypiglin);
-             optional.ifPresent(entitypiglin::makeSound);
-@@ -235,23 +244,27 @@
-         stopWalking(entitypiglin);
-         ItemStack itemstack;
- 
--        if (entityitem.getItem().is(Items.GOLD_NUGGET)) {
-+        // CraftBukkit start
-+        if (entityitem.getItem().is(Items.GOLD_NUGGET) && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPickupItemEvent(entitypiglin, entityitem, 0, false).isCancelled()) {
-             entitypiglin.take(entityitem, entityitem.getItem().getCount());
-             itemstack = entityitem.getItem();
--            entityitem.discard();
--        } else {
-+            entityitem.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
-+        } else if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPickupItemEvent(entitypiglin, entityitem, entityitem.getItem().getCount() - 1, false).isCancelled()) {
-             entitypiglin.take(entityitem, 1);
-             itemstack = removeOneItemFromItemEntity(entityitem);
-+        } else {
-+            return;
-         }
-+        // CraftBukkit end
- 
--        if (isLovedItem(itemstack)) {
-+        if (isLovedItem(itemstack, entitypiglin)) { // CraftBukkit - Changes to allow for custom payment in bartering
-             entitypiglin.getBrain().eraseMemory(MemoryModuleType.TIME_TRYING_TO_REACH_ADMIRE_ITEM);
-             holdInOffhand(worldserver, entitypiglin, itemstack);
-             admireGoldItem(entitypiglin);
-         } else if (isFood(itemstack) && !hasEatenRecently(entitypiglin)) {
-             eat(entitypiglin);
-         } else {
--            boolean flag = !entitypiglin.equipItemIfPossible(worldserver, itemstack).equals(ItemStack.EMPTY);
-+            boolean flag = !entitypiglin.equipItemIfPossible(worldserver, itemstack, entityitem).equals(ItemStack.EMPTY); // CraftBukkit
- 
-             if (!flag) {
-                 putInInventory(entitypiglin, itemstack);
-@@ -272,7 +285,7 @@
-         ItemStack itemstack1 = itemstack.split(1);
- 
-         if (itemstack.isEmpty()) {
--            entityitem.discard();
-+            entityitem.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
-         } else {
-             entityitem.setItem(itemstack);
-         }
-@@ -287,9 +300,14 @@
-         boolean flag1;
- 
-         if (entitypiglin.isAdult()) {
--            flag1 = isBarterCurrency(itemstack);
-+            flag1 = isBarterCurrency(itemstack, entitypiglin); // CraftBukkit - Changes to allow custom payment for bartering
-             if (flag && flag1) {
--                throwItems(entitypiglin, getBarterResponseItems(entitypiglin));
-+                // CraftBukkit start
-+                PiglinBarterEvent event = CraftEventFactory.callPiglinBarterEvent(entitypiglin, getBarterResponseItems(entitypiglin), itemstack);
-+                if (!event.isCancelled()) {
-+                    throwItems(entitypiglin, event.getOutcome().stream().map(CraftItemStack::asNMSCopy).collect(Collectors.toList()));
-+                }
-+                // CraftBukkit end
-             } else if (!flag1) {
-                 boolean flag2 = !entitypiglin.equipItemIfPossible(worldserver, itemstack).isEmpty();
- 
-@@ -302,7 +320,7 @@
-             if (!flag1) {
-                 ItemStack itemstack1 = entitypiglin.getMainHandItem();
- 
--                if (isLovedItem(itemstack1)) {
-+                if (isLovedItem(itemstack1, entitypiglin)) { // CraftBukkit - Changes to allow for custom payment in bartering
-                     putInInventory(entitypiglin, itemstack1);
-                 } else {
-                     throwItems(entitypiglin, Collections.singletonList(itemstack1));
-@@ -379,7 +397,7 @@
-             return false;
-         } else if (isAdmiringDisabled(entitypiglin) && entitypiglin.getBrain().hasMemoryValue(MemoryModuleType.ATTACK_TARGET)) {
-             return false;
--        } else if (isBarterCurrency(itemstack)) {
-+        } else if (isBarterCurrency(itemstack, entitypiglin)) { // CraftBukkit
-             return isNotHoldingLovedItemInOffHand(entitypiglin);
-         } else {
-             boolean flag = entitypiglin.canAddToInventory(itemstack);
-@@ -388,6 +406,12 @@
-         }
-     }
- 
-+    // CraftBukkit start - Added method to allow checking for custom payment items
-+    protected static boolean isLovedItem(ItemStack itemstack, EntityPiglin piglin) {
-+        return isLovedItem(itemstack) || (piglin.interestItems.contains(itemstack.getItem()) || piglin.allowedBarterItems.contains(itemstack.getItem()));
-+    }
-+    // CraftBukkit end
-+
-     protected static boolean isLovedItem(ItemStack itemstack) {
-         return itemstack.is(TagsItem.PIGLIN_LOVED);
-     }
-@@ -481,7 +505,7 @@
-     }
- 
-     protected static boolean canAdmire(EntityPiglin entitypiglin, ItemStack itemstack) {
--        return !isAdmiringDisabled(entitypiglin) && !isAdmiringItem(entitypiglin) && entitypiglin.isAdult() && isBarterCurrency(itemstack);
-+        return !isAdmiringDisabled(entitypiglin) && !isAdmiringItem(entitypiglin) && entitypiglin.isAdult() && isBarterCurrency(itemstack, entitypiglin); // CraftBukkit
-     }
- 
-     protected static void wasHurtBy(WorldServer worldserver, EntityPiglin entitypiglin, EntityLiving entityliving) {
-@@ -735,6 +759,12 @@
-         return entitypiglin.getBrain().hasMemoryValue(MemoryModuleType.ADMIRING_ITEM);
-     }
- 
-+    // CraftBukkit start - Changes to allow custom payment for bartering
-+    private static boolean isBarterCurrency(ItemStack itemstack, EntityPiglin piglin) {
-+        return isBarterCurrency(itemstack) || piglin.allowedBarterItems.contains(itemstack.getItem());
-+    }
-+    // CraftBukkit end
-+
-     private static boolean isBarterCurrency(ItemStack itemstack) {
-         return itemstack.is(PiglinAI.BARTERING_ITEM);
-     }
-@@ -772,7 +802,7 @@
-     }
- 
-     private static boolean isNotHoldingLovedItemInOffHand(EntityPiglin entitypiglin) {
--        return entitypiglin.getOffhandItem().isEmpty() || !isLovedItem(entitypiglin.getOffhandItem());
-+        return entitypiglin.getOffhandItem().isEmpty() || !isLovedItem(entitypiglin.getOffhandItem(), entitypiglin); // CraftBukkit - Changes to allow custom payment for bartering
-     }
- 
-     public static boolean isZombified(EntityTypes<?> entitytypes) {
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/PiglinAi.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/PiglinAi.java.patch
new file mode 100644
index 0000000000..cc6a96ef0a
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/piglin/PiglinAi.java.patch
@@ -0,0 +1,174 @@
+--- a/net/minecraft/world/entity/monster/piglin/PiglinAi.java
++++ b/net/minecraft/world/entity/monster/piglin/PiglinAi.java
+@@ -71,6 +71,13 @@
+ import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets;
+ import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import java.util.stream.Collectors;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.craftbukkit.inventory.CraftItemStack;
++import org.bukkit.event.entity.EntityRemoveEvent;
++import org.bukkit.event.entity.PiglinBarterEvent;
++// CraftBukkit end
+ 
+ public class PiglinAi {
+ 
+@@ -166,7 +173,8 @@
+     }
+ 
+     private static void initRideHoglinActivity(Brain<Piglin> brain) {
+-        brain.addActivityAndRemoveMemoryWhenStopped(Activity.RIDE, 10, ImmutableList.of(Mount.create(0.8F), SetEntityLookTarget.create(PiglinAi::isPlayerHoldingLovedItem, 8.0F), BehaviorBuilder.sequence(BehaviorBuilder.triggerIf(Entity::isPassenger), TriggerGate.triggerOneShuffled(ImmutableList.builder().addAll(PiglinAi.createLookBehaviors()).add(Pair.of(BehaviorBuilder.triggerIf((entitypiglin) -> {
++        // CraftBukkit - decompile error
++        brain.addActivityAndRemoveMemoryWhenStopped(Activity.RIDE, 10, ImmutableList.of(Mount.create(0.8F), SetEntityLookTarget.create(PiglinAi::isPlayerHoldingLovedItem, 8.0F), BehaviorBuilder.sequence(BehaviorBuilder.triggerIf(Entity::isPassenger), TriggerGate.triggerOneShuffled(ImmutableList.<Pair<? extends net.minecraft.world.entity.ai.behavior.declarative.Trigger<? super LivingEntity>, Integer>>builder().addAll(PiglinAi.createLookBehaviors()).add(Pair.of(BehaviorBuilder.triggerIf((entitypiglin) -> {
+             return true;
+         }), 1)).build())), DismountOrSkipMounting.create(8, PiglinAi::wantsToStopRiding)), MemoryModuleType.RIDE_TARGET);
+     }
+@@ -176,7 +184,7 @@
+     }
+ 
+     private static RunOne<LivingEntity> createIdleLookBehaviors() {
+-        return new RunOne<>(ImmutableList.builder().addAll(PiglinAi.createLookBehaviors()).add(Pair.of(new DoNothing(30, 60), 1)).build());
++        return new RunOne<>(ImmutableList.<Pair<? extends BehaviorControl<? super LivingEntity>, Integer>>builder().addAll(PiglinAi.createLookBehaviors()).add(Pair.of(new DoNothing(30, 60), 1)).build()); // CraftBukkit - decompile error
+     }
+ 
+     private static RunOne<Piglin> createIdleMovementBehaviors() {
+@@ -197,13 +205,13 @@
+ 
+     protected static void updateActivity(Piglin piglin) {
+         Brain<Piglin> behaviorcontroller = piglin.getBrain();
+-        Activity activity = (Activity) behaviorcontroller.getActiveNonCoreActivity().orElse((Object) null);
++        Activity activity = (Activity) behaviorcontroller.getActiveNonCoreActivity().orElse(null); // CraftBukkit - decompile error
+ 
+         behaviorcontroller.setActiveActivityToFirstValid(ImmutableList.of(Activity.ADMIRE_ITEM, Activity.FIGHT, Activity.AVOID, Activity.CELEBRATE, Activity.RIDE, Activity.IDLE));
+-        Activity activity1 = (Activity) behaviorcontroller.getActiveNonCoreActivity().orElse((Object) null);
++        Activity activity1 = (Activity) behaviorcontroller.getActiveNonCoreActivity().orElse(null); // CraftBukkit - decompile error
+ 
+         if (activity != activity1) {
+-            Optional optional = PiglinAi.getSoundForCurrentActivity(piglin);
++            Optional<SoundEvent> optional = PiglinAi.getSoundForCurrentActivity(piglin); // CraftBukkit - decompile error
+ 
+             Objects.requireNonNull(piglin);
+             optional.ifPresent(piglin::makeSound);
+@@ -235,23 +243,27 @@
+         PiglinAi.stopWalking(piglin);
+         ItemStack itemstack;
+ 
+-        if (itemEntity.getItem().is(Items.GOLD_NUGGET)) {
++        // CraftBukkit start
++        if (itemEntity.getItem().is(Items.GOLD_NUGGET) && !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPickupItemEvent(piglin, itemEntity, 0, false).isCancelled()) {
+             piglin.take(itemEntity, itemEntity.getItem().getCount());
+             itemstack = itemEntity.getItem();
+-            itemEntity.discard();
+-        } else {
++            itemEntity.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
++        } else if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPickupItemEvent(piglin, itemEntity, itemEntity.getItem().getCount() - 1, false).isCancelled()) {
+             piglin.take(itemEntity, 1);
+             itemstack = PiglinAi.removeOneItemFromItemEntity(itemEntity);
++        } else {
++            return;
+         }
++        // CraftBukkit end
+ 
+-        if (PiglinAi.isLovedItem(itemstack)) {
++        if (PiglinAi.isLovedItem(itemstack, piglin)) { // CraftBukkit - Changes to allow for custom payment in bartering
+             piglin.getBrain().eraseMemory(MemoryModuleType.TIME_TRYING_TO_REACH_ADMIRE_ITEM);
+             PiglinAi.holdInOffhand(world, piglin, itemstack);
+             PiglinAi.admireGoldItem(piglin);
+         } else if (PiglinAi.isFood(itemstack) && !PiglinAi.hasEatenRecently(piglin)) {
+             PiglinAi.eat(piglin);
+         } else {
+-            boolean flag = !piglin.equipItemIfPossible(world, itemstack).equals(ItemStack.EMPTY);
++            boolean flag = !piglin.equipItemIfPossible(world, itemstack, itemEntity).equals(ItemStack.EMPTY); // CraftBukkit
+ 
+             if (!flag) {
+                 PiglinAi.putInInventory(piglin, itemstack);
+@@ -272,7 +284,7 @@
+         ItemStack itemstack1 = itemstack.split(1);
+ 
+         if (itemstack.isEmpty()) {
+-            stack.discard();
++            stack.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
+         } else {
+             stack.setItem(itemstack);
+         }
+@@ -287,9 +299,14 @@
+         boolean flag1;
+ 
+         if (piglin.isAdult()) {
+-            flag1 = PiglinAi.isBarterCurrency(itemstack);
++            flag1 = PiglinAi.isBarterCurrency(itemstack, piglin); // CraftBukkit - Changes to allow custom payment for bartering
+             if (barter && flag1) {
+-                PiglinAi.throwItems(piglin, PiglinAi.getBarterResponseItems(piglin));
++                // CraftBukkit start
++                PiglinBarterEvent event = CraftEventFactory.callPiglinBarterEvent(piglin, PiglinAi.getBarterResponseItems(piglin), itemstack);
++                if (!event.isCancelled()) {
++                    PiglinAi.throwItems(piglin, event.getOutcome().stream().map(CraftItemStack::asNMSCopy).collect(Collectors.toList()));
++                }
++                // CraftBukkit end
+             } else if (!flag1) {
+                 boolean flag2 = !piglin.equipItemIfPossible(world, itemstack).isEmpty();
+ 
+@@ -302,7 +319,7 @@
+             if (!flag1) {
+                 ItemStack itemstack1 = piglin.getMainHandItem();
+ 
+-                if (PiglinAi.isLovedItem(itemstack1)) {
++                if (PiglinAi.isLovedItem(itemstack1, piglin)) { // CraftBukkit - Changes to allow for custom payment in bartering
+                     PiglinAi.putInInventory(piglin, itemstack1);
+                 } else {
+                     PiglinAi.throwItems(piglin, Collections.singletonList(itemstack1));
+@@ -379,14 +396,20 @@
+             return false;
+         } else if (PiglinAi.isAdmiringDisabled(piglin) && piglin.getBrain().hasMemoryValue(MemoryModuleType.ATTACK_TARGET)) {
+             return false;
+-        } else if (PiglinAi.isBarterCurrency(stack)) {
++        } else if (PiglinAi.isBarterCurrency(stack, piglin)) { // CraftBukkit
+             return PiglinAi.isNotHoldingLovedItemInOffHand(piglin);
+         } else {
+             boolean flag = piglin.canAddToInventory(stack);
+ 
+             return stack.is(Items.GOLD_NUGGET) ? flag : (PiglinAi.isFood(stack) ? !PiglinAi.hasEatenRecently(piglin) && flag : (!PiglinAi.isLovedItem(stack) ? piglin.canReplaceCurrentItem(stack) : PiglinAi.isNotHoldingLovedItemInOffHand(piglin) && flag));
+         }
++    }
++
++    // CraftBukkit start - Added method to allow checking for custom payment items
++    protected static boolean isLovedItem(ItemStack itemstack, Piglin piglin) {
++        return PiglinAi.isLovedItem(itemstack) || (piglin.interestItems.contains(itemstack.getItem()) || piglin.allowedBarterItems.contains(itemstack.getItem()));
+     }
++    // CraftBukkit end
+ 
+     protected static boolean isLovedItem(ItemStack stack) {
+         return stack.is(ItemTags.PIGLIN_LOVED);
+@@ -481,7 +504,7 @@
+     }
+ 
+     protected static boolean canAdmire(Piglin piglin, ItemStack nearbyItems) {
+-        return !PiglinAi.isAdmiringDisabled(piglin) && !PiglinAi.isAdmiringItem(piglin) && piglin.isAdult() && PiglinAi.isBarterCurrency(nearbyItems);
++        return !PiglinAi.isAdmiringDisabled(piglin) && !PiglinAi.isAdmiringItem(piglin) && piglin.isAdult() && PiglinAi.isBarterCurrency(nearbyItems, piglin); // CraftBukkit
+     }
+ 
+     protected static void wasHurtBy(ServerLevel world, Piglin piglin, LivingEntity attacker) {
+@@ -733,7 +756,13 @@
+ 
+     private static boolean isAdmiringItem(Piglin entity) {
+         return entity.getBrain().hasMemoryValue(MemoryModuleType.ADMIRING_ITEM);
++    }
++
++    // CraftBukkit start - Changes to allow custom payment for bartering
++    private static boolean isBarterCurrency(ItemStack itemstack, Piglin piglin) {
++        return PiglinAi.isBarterCurrency(itemstack) || piglin.allowedBarterItems.contains(itemstack.getItem());
+     }
++    // CraftBukkit end
+ 
+     private static boolean isBarterCurrency(ItemStack stack) {
+         return stack.is(PiglinAi.BARTERING_ITEM);
+@@ -772,7 +801,7 @@
+     }
+ 
+     private static boolean isNotHoldingLovedItemInOffHand(Piglin piglin) {
+-        return piglin.getOffhandItem().isEmpty() || !PiglinAi.isLovedItem(piglin.getOffhandItem());
++        return piglin.getOffhandItem().isEmpty() || !PiglinAi.isLovedItem(piglin.getOffhandItem(), piglin); // CraftBukkit - Changes to allow custom payment for bartering
+     }
+ 
+     public static boolean isZombified(EntityType<?> entityType) {
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/warden/Warden.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/warden/Warden.java.patch
new file mode 100644
index 0000000000..094d839026
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/monster/warden/Warden.java.patch
@@ -0,0 +1,43 @@
+--- a/net/minecraft/world/entity/monster/warden/Warden.java
++++ b/net/minecraft/world/entity/monster/warden/Warden.java
+@@ -375,7 +375,7 @@
+ 
+     @Override
+     public Brain<Warden> getBrain() {
+-        return super.getBrain();
++        return (Brain<Warden>) super.getBrain(); // CraftBukkit - decompile error
+     }
+ 
+     @Override
+@@ -412,7 +412,7 @@
+     public static void applyDarknessAround(ServerLevel world, Vec3 pos, @Nullable Entity entity, int range) {
+         MobEffectInstance mobeffect = new MobEffectInstance(MobEffects.DARKNESS, 260, 0, false, false);
+ 
+-        MobEffectUtil.addEffectToPlayersAround(world, entity, pos, (double) range, mobeffect, 200);
++        MobEffectUtil.addEffectToPlayersAround(world, entity, pos, range, mobeffect, 200, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.WARDEN); // CraftBukkit - Add EntityPotionEffectEvent.Cause
+     }
+ 
+     @Override
+@@ -547,7 +547,7 @@
+ 
+     public void setAttackTarget(LivingEntity target) {
+         this.getBrain().eraseMemory(MemoryModuleType.ROAR_TARGET);
+-        this.getBrain().setMemory(MemoryModuleType.ATTACK_TARGET, (Object) target);
++        this.getBrain().setMemory(MemoryModuleType.ATTACK_TARGET, target); // CraftBukkit - decompile error
+         this.getBrain().eraseMemory(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE);
+         SonicBoom.setCooldown(this, 200);
+     }
+@@ -582,11 +582,11 @@
+ 
+     @Override
+     protected PathNavigation createNavigation(Level world) {
+-        return new GroundPathNavigation(this, this, world) {
++        return new GroundPathNavigation(this, world) { // CraftBukkit - decompile error
+             @Override
+             protected PathFinder createPathFinder(int range) {
+                 this.nodeEvaluator = new WalkNodeEvaluator();
+-                return new PathFinder(this, this.nodeEvaluator, range) {
++                return new PathFinder(this.nodeEvaluator, range) { // CraftBukkit - decompile error
+                     @Override
+                     protected float distance(Node a, Node b) {
+                         return a.distanceToXZ(b);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/monster/warden/Warden.patch b/paper-server/patches/sources/net/minecraft/world/entity/monster/warden/Warden.patch
deleted file mode 100644
index ca1bdf194d..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/monster/warden/Warden.patch
+++ /dev/null
@@ -1,43 +0,0 @@
---- a/net/minecraft/world/entity/monster/warden/Warden.java
-+++ b/net/minecraft/world/entity/monster/warden/Warden.java
-@@ -375,7 +375,7 @@
- 
-     @Override
-     public BehaviorController<Warden> getBrain() {
--        return super.getBrain();
-+        return (BehaviorController<Warden>) super.getBrain(); // CraftBukkit - decompile error
-     }
- 
-     @Override
-@@ -412,7 +412,7 @@
-     public static void applyDarknessAround(WorldServer worldserver, Vec3D vec3d, @Nullable Entity entity, int i) {
-         MobEffect mobeffect = new MobEffect(MobEffects.DARKNESS, 260, 0, false, false);
- 
--        MobEffectUtil.addEffectToPlayersAround(worldserver, entity, vec3d, (double) i, mobeffect, 200);
-+        MobEffectUtil.addEffectToPlayersAround(worldserver, entity, vec3d, i, mobeffect, 200, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.WARDEN); // CraftBukkit - Add EntityPotionEffectEvent.Cause
-     }
- 
-     @Override
-@@ -547,7 +547,7 @@
- 
-     public void setAttackTarget(EntityLiving entityliving) {
-         this.getBrain().eraseMemory(MemoryModuleType.ROAR_TARGET);
--        this.getBrain().setMemory(MemoryModuleType.ATTACK_TARGET, (Object) entityliving);
-+        this.getBrain().setMemory(MemoryModuleType.ATTACK_TARGET, entityliving); // CraftBukkit - decompile error
-         this.getBrain().eraseMemory(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE);
-         SonicBoom.setCooldown(this, 200);
-     }
-@@ -582,11 +582,11 @@
- 
-     @Override
-     protected NavigationAbstract createNavigation(World world) {
--        return new Navigation(this, this, world) {
-+        return new Navigation(this, world) { // CraftBukkit - decompile error
-             @Override
-             protected Pathfinder createPathFinder(int i) {
-                 this.nodeEvaluator = new PathfinderNormal();
--                return new Pathfinder(this, this.nodeEvaluator, i) {
-+                return new Pathfinder(this.nodeEvaluator, i) { // CraftBukkit - decompile error
-                     @Override
-                     protected float distance(PathPoint pathpoint, PathPoint pathpoint1) {
-                         return pathpoint.distanceToXZ(pathpoint1);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/npc/AbstractVillager.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/npc/AbstractVillager.java.patch
new file mode 100644
index 0000000000..ffa2d446de
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/npc/AbstractVillager.java.patch
@@ -0,0 +1,60 @@
+--- a/net/minecraft/world/entity/npc/AbstractVillager.java
++++ b/net/minecraft/world/entity/npc/AbstractVillager.java
+@@ -40,8 +40,21 @@
+ import net.minecraft.world.phys.Vec3;
+ import org.slf4j.Logger;
+ 
++// CraftBukkit start
++import org.bukkit.Bukkit;
++import org.bukkit.craftbukkit.inventory.CraftMerchant;
++import org.bukkit.craftbukkit.inventory.CraftMerchantRecipe;
++import org.bukkit.event.entity.VillagerAcquireTradeEvent;
++// CraftBukkit end
++
+ public abstract class AbstractVillager extends AgeableMob implements InventoryCarrier, Npc, Merchant {
+ 
++    // CraftBukkit start
++    @Override
++    public CraftMerchant getCraftMerchant() {
++        return (org.bukkit.craftbukkit.entity.CraftAbstractVillager) this.getBukkitEntity();
++    }
++    // CraftBukkit end
+     private static final EntityDataAccessor<Integer> DATA_UNHAPPY_COUNTER = SynchedEntityData.defineId(AbstractVillager.class, EntityDataSerializers.INT);
+     private static final Logger LOGGER = LogUtils.getLogger();
+     public static final int VILLAGER_SLOT_OFFSET = 300;
+@@ -50,7 +63,7 @@
+     private Player tradingPlayer;
+     @Nullable
+     protected MerchantOffers offers;
+-    private final SimpleContainer inventory = new SimpleContainer(8);
++    private final SimpleContainer inventory = new SimpleContainer(8, (org.bukkit.craftbukkit.entity.CraftAbstractVillager) this.getBukkitEntity()); // CraftBukkit add argument
+ 
+     public AbstractVillager(EntityType<? extends AbstractVillager> type, Level world) {
+         super(type, world);
+@@ -179,7 +192,7 @@
+     public void readAdditionalSaveData(CompoundTag nbt) {
+         super.readAdditionalSaveData(nbt);
+         if (nbt.contains("Offers")) {
+-            DataResult dataresult = MerchantOffers.CODEC.parse(this.registryAccess().createSerializationContext(NbtOps.INSTANCE), nbt.get("Offers"));
++            DataResult<MerchantOffers> dataresult = MerchantOffers.CODEC.parse(this.registryAccess().createSerializationContext(NbtOps.INSTANCE), nbt.get("Offers")); // CraftBukkit - decompile error
+             Logger logger = AbstractVillager.LOGGER;
+ 
+             Objects.requireNonNull(logger);
+@@ -246,7 +259,16 @@
+             MerchantOffer merchantrecipe = ((VillagerTrades.ItemListing) arraylist.remove(this.random.nextInt(arraylist.size()))).getOffer(this, this.random);
+ 
+             if (merchantrecipe != null) {
+-                recipeList.add(merchantrecipe);
++                // CraftBukkit start
++                VillagerAcquireTradeEvent event = new VillagerAcquireTradeEvent((org.bukkit.entity.AbstractVillager) this.getBukkitEntity(), merchantrecipe.asBukkit());
++                // Suppress during worldgen
++                if (this.valid) {
++                    Bukkit.getPluginManager().callEvent(event);
++                }
++                if (!event.isCancelled()) {
++                    recipeList.add(CraftMerchantRecipe.fromBukkit(event.getRecipe()).toMinecraft());
++                }
++                // CraftBukkit end
+                 ++j;
+             }
+         }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/npc/EntityVillager.patch b/paper-server/patches/sources/net/minecraft/world/entity/npc/EntityVillager.patch
deleted file mode 100644
index 8bb9958567..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/npc/EntityVillager.patch
+++ /dev/null
@@ -1,120 +0,0 @@
---- a/net/minecraft/world/entity/npc/EntityVillager.java
-+++ b/net/minecraft/world/entity/npc/EntityVillager.java
-@@ -93,6 +93,15 @@
- import net.minecraft.world.phys.AxisAlignedBB;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import org.bukkit.Bukkit;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.entity.Villager;
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+import org.bukkit.event.entity.EntityTransformEvent;
-+import org.bukkit.event.entity.VillagerReplenishTradeEvent;
-+// CraftBukkit end
-+
- public class EntityVillager extends EntityVillagerAbstract implements ReputationHandler, VillagerDataHolder {
- 
-     private static final Logger LOGGER = LogUtils.getLogger();
-@@ -150,7 +159,7 @@
- 
-     @Override
-     public BehaviorController<EntityVillager> getBrain() {
--        return super.getBrain();
-+        return (BehaviorController<EntityVillager>) super.getBrain(); // CraftBukkit - decompile error
-     }
- 
-     @Override
-@@ -235,7 +244,7 @@
-                     this.increaseProfessionLevelOnUpdate = false;
-                 }
- 
--                this.addEffect(new MobEffect(MobEffects.REGENERATION, 200, 0));
-+                this.addEffect(new MobEffect(MobEffects.REGENERATION, 200, 0), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.VILLAGER_TRADE); // CraftBukkit
-             }
-         }
- 
-@@ -360,7 +369,13 @@
-         while (iterator.hasNext()) {
-             MerchantRecipe merchantrecipe = (MerchantRecipe) iterator.next();
- 
--            merchantrecipe.resetUses();
-+            // CraftBukkit start
-+            VillagerReplenishTradeEvent event = new VillagerReplenishTradeEvent((Villager) this.getBukkitEntity(), merchantrecipe.asBukkit());
-+            Bukkit.getPluginManager().callEvent(event);
-+            if (!event.isCancelled()) {
-+                merchantrecipe.resetUses();
-+            }
-+            // CraftBukkit end
-         }
- 
-         this.resendOffersToTradingPlayer();
-@@ -429,7 +444,13 @@
-             while (iterator.hasNext()) {
-                 MerchantRecipe merchantrecipe = (MerchantRecipe) iterator.next();
- 
--                merchantrecipe.resetUses();
-+                // CraftBukkit start
-+                VillagerReplenishTradeEvent event = new VillagerReplenishTradeEvent((Villager) this.getBukkitEntity(), merchantrecipe.asBukkit());
-+                Bukkit.getPluginManager().callEvent(event);
-+                if (!event.isCancelled()) {
-+                    merchantrecipe.resetUses();
-+                }
-+                // CraftBukkit end
-             }
-         }
- 
-@@ -489,7 +510,7 @@
-     @Override
-     public void addAdditionalSaveData(NBTTagCompound nbttagcompound) {
-         super.addAdditionalSaveData(nbttagcompound);
--        DataResult dataresult = VillagerData.CODEC.encodeStart(DynamicOpsNBT.INSTANCE, this.getVillagerData());
-+        DataResult<NBTBase> dataresult = VillagerData.CODEC.encodeStart(DynamicOpsNBT.INSTANCE, this.getVillagerData()); // CraftBukkit - decompile error
-         Logger logger = EntityVillager.LOGGER;
- 
-         Objects.requireNonNull(logger);
-@@ -512,7 +533,7 @@
-     public void readAdditionalSaveData(NBTTagCompound nbttagcompound) {
-         super.readAdditionalSaveData(nbttagcompound);
-         if (nbttagcompound.contains("VillagerData", 10)) {
--            DataResult dataresult = VillagerData.CODEC.parse(DynamicOpsNBT.INSTANCE, nbttagcompound.get("VillagerData"));
-+            DataResult<VillagerData> dataresult = VillagerData.CODEC.parse(new Dynamic(DynamicOpsNBT.INSTANCE, nbttagcompound.get("VillagerData")));
-             Logger logger = EntityVillager.LOGGER;
- 
-             Objects.requireNonNull(logger);
-@@ -808,7 +829,7 @@
-                 entitywitch1.finalizeSpawn(worldserver, worldserver.getCurrentDifficultyAt(entitywitch1.blockPosition()), EntitySpawnReason.CONVERSION, (GroupDataEntity) null);
-                 entitywitch1.setPersistenceRequired();
-                 this.releaseAllPois();
--            });
-+            }, EntityTransformEvent.TransformReason.LIGHTNING, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.LIGHTNING); // CraftBukkit
- 
-             if (entitywitch == null) {
-                 super.thunderHit(worldserver, entitylightning);
-@@ -906,7 +927,7 @@
-             }).limit(5L).toList();
- 
-             if (list1.size() >= j) {
--                if (!SpawnUtil.trySpawnMob(EntityTypes.IRON_GOLEM, EntitySpawnReason.MOB_SUMMONED, worldserver, this.blockPosition(), 10, 8, 6, SpawnUtil.a.LEGACY_IRON_GOLEM, false).isEmpty()) {
-+                if (!SpawnUtil.trySpawnMob(EntityTypes.IRON_GOLEM, EntitySpawnReason.MOB_SUMMONED, worldserver, this.blockPosition(), 10, 8, 6, SpawnUtil.a.LEGACY_IRON_GOLEM, false, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.VILLAGE_DEFENSE).isEmpty()) { // CraftBukkit
-                     list.forEach(SensorGolemLastSeen::golemDetected);
-                 }
-             }
-@@ -963,7 +984,7 @@
-     @Override
-     public void startSleeping(BlockPosition blockposition) {
-         super.startSleeping(blockposition);
--        this.brain.setMemory(MemoryModuleType.LAST_SLEPT, (Object) this.level().getGameTime());
-+        this.brain.setMemory(MemoryModuleType.LAST_SLEPT, this.level().getGameTime()); // CraftBukkit - decompile error
-         this.brain.eraseMemory(MemoryModuleType.WALK_TARGET);
-         this.brain.eraseMemory(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE);
-     }
-@@ -971,7 +992,7 @@
-     @Override
-     public void stopSleeping() {
-         super.stopSleeping();
--        this.brain.setMemory(MemoryModuleType.LAST_WOKEN, (Object) this.level().getGameTime());
-+        this.brain.setMemory(MemoryModuleType.LAST_WOKEN, this.level().getGameTime()); // CraftBukkit - decompile error
-     }
- 
-     private boolean golemSpawnConditionsMet(long i) {
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/npc/EntityVillagerAbstract.patch b/paper-server/patches/sources/net/minecraft/world/entity/npc/EntityVillagerAbstract.patch
deleted file mode 100644
index dbdfbb05dc..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/npc/EntityVillagerAbstract.patch
+++ /dev/null
@@ -1,61 +0,0 @@
---- a/net/minecraft/world/entity/npc/EntityVillagerAbstract.java
-+++ b/net/minecraft/world/entity/npc/EntityVillagerAbstract.java
-@@ -40,8 +40,22 @@
- import net.minecraft.world.phys.Vec3D;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import org.bukkit.Bukkit;
-+import org.bukkit.craftbukkit.inventory.CraftMerchant;
-+import org.bukkit.craftbukkit.inventory.CraftMerchantRecipe;
-+import org.bukkit.entity.AbstractVillager;
-+import org.bukkit.event.entity.VillagerAcquireTradeEvent;
-+// CraftBukkit end
-+
- public abstract class EntityVillagerAbstract extends EntityAgeable implements InventoryCarrier, NPC, IMerchant {
- 
-+    // CraftBukkit start
-+    @Override
-+    public CraftMerchant getCraftMerchant() {
-+        return (org.bukkit.craftbukkit.entity.CraftAbstractVillager) getBukkitEntity();
-+    }
-+    // CraftBukkit end
-     private static final DataWatcherObject<Integer> DATA_UNHAPPY_COUNTER = DataWatcher.defineId(EntityVillagerAbstract.class, DataWatcherRegistry.INT);
-     private static final Logger LOGGER = LogUtils.getLogger();
-     public static final int VILLAGER_SLOT_OFFSET = 300;
-@@ -50,7 +64,7 @@
-     private EntityHuman tradingPlayer;
-     @Nullable
-     protected MerchantRecipeList offers;
--    private final InventorySubcontainer inventory = new InventorySubcontainer(8);
-+    private final InventorySubcontainer inventory = new InventorySubcontainer(8, (org.bukkit.craftbukkit.entity.CraftAbstractVillager) this.getBukkitEntity()); // CraftBukkit add argument
- 
-     public EntityVillagerAbstract(EntityTypes<? extends EntityVillagerAbstract> entitytypes, World world) {
-         super(entitytypes, world);
-@@ -179,7 +193,7 @@
-     public void readAdditionalSaveData(NBTTagCompound nbttagcompound) {
-         super.readAdditionalSaveData(nbttagcompound);
-         if (nbttagcompound.contains("Offers")) {
--            DataResult dataresult = MerchantRecipeList.CODEC.parse(this.registryAccess().createSerializationContext(DynamicOpsNBT.INSTANCE), nbttagcompound.get("Offers"));
-+            DataResult<MerchantRecipeList> dataresult = MerchantRecipeList.CODEC.parse(this.registryAccess().createSerializationContext(DynamicOpsNBT.INSTANCE), nbttagcompound.get("Offers")); // CraftBukkit - decompile error
-             Logger logger = EntityVillagerAbstract.LOGGER;
- 
-             Objects.requireNonNull(logger);
-@@ -246,7 +260,16 @@
-             MerchantRecipe merchantrecipe = ((VillagerTrades.IMerchantRecipeOption) arraylist.remove(this.random.nextInt(arraylist.size()))).getOffer(this, this.random);
- 
-             if (merchantrecipe != null) {
--                merchantrecipelist.add(merchantrecipe);
-+                // CraftBukkit start
-+                VillagerAcquireTradeEvent event = new VillagerAcquireTradeEvent((AbstractVillager) getBukkitEntity(), merchantrecipe.asBukkit());
-+                // Suppress during worldgen
-+                if (this.valid) {
-+                    Bukkit.getPluginManager().callEvent(event);
-+                }
-+                if (!event.isCancelled()) {
-+                    merchantrecipelist.add(CraftMerchantRecipe.fromBukkit(event.getRecipe()).toMinecraft());
-+                }
-+                // CraftBukkit end
-                 ++j;
-             }
-         }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/npc/InventoryCarrier.patch b/paper-server/patches/sources/net/minecraft/world/entity/npc/InventoryCarrier.java.patch
similarity index 61%
rename from paper-server/patches/sources/net/minecraft/world/entity/npc/InventoryCarrier.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/npc/InventoryCarrier.java.patch
index fb8c49757d..d6c445bea3 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/npc/InventoryCarrier.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/npc/InventoryCarrier.java.patch
@@ -1,7 +1,7 @@
 --- a/net/minecraft/world/entity/npc/InventoryCarrier.java
 +++ b/net/minecraft/world/entity/npc/InventoryCarrier.java
 @@ -8,6 +8,10 @@
- import net.minecraft.world.entity.item.EntityItem;
+ import net.minecraft.world.entity.item.ItemEntity;
  import net.minecraft.world.item.ItemStack;
  
 +// CraftBukkit start
@@ -16,20 +16,20 @@
              }
  
 +            // CraftBukkit start
-+            ItemStack remaining = new InventorySubcontainer(inventorysubcontainer).addItem(itemstack);
-+            if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPickupItemEvent(entityinsentient, entityitem, remaining.getCount(), false).isCancelled()) {
++            ItemStack remaining = new SimpleContainer(inventorysubcontainer).addItem(itemstack);
++            if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPickupItemEvent(entity, item, remaining.getCount(), false).isCancelled()) {
 +                return;
 +            }
 +            // CraftBukkit end
 +
-             entityinsentient.onItemPickup(entityitem);
+             entity.onItemPickup(item);
              int i = itemstack.getCount();
              ItemStack itemstack1 = inventorysubcontainer.addItem(itemstack);
  
-             entityinsentient.take(entityitem, i - itemstack1.getCount());
+             entity.take(item, i - itemstack1.getCount());
              if (itemstack1.isEmpty()) {
--                entityitem.discard();
-+                entityitem.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
+-                item.discard();
++                item.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
              } else {
                  itemstack.setCount(itemstack1.getCount());
              }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/npc/MobSpawnerTrader.patch b/paper-server/patches/sources/net/minecraft/world/entity/npc/MobSpawnerTrader.patch
deleted file mode 100644
index e4987a51d4..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/npc/MobSpawnerTrader.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/net/minecraft/world/entity/npc/MobSpawnerTrader.java
-+++ b/net/minecraft/world/entity/npc/MobSpawnerTrader.java
-@@ -110,7 +110,7 @@
-                     return false;
-                 }
- 
--                EntityVillagerTrader entityvillagertrader = (EntityVillagerTrader) EntityTypes.WANDERING_TRADER.spawn(worldserver, blockposition2, EntitySpawnReason.EVENT);
-+                EntityVillagerTrader entityvillagertrader = (EntityVillagerTrader) EntityTypes.WANDERING_TRADER.spawn(worldserver, blockposition2, EntitySpawnReason.EVENT, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit
- 
-                 if (entityvillagertrader != null) {
-                     for (int i = 0; i < 2; ++i) {
-@@ -118,7 +118,7 @@
-                     }
- 
-                     this.serverLevelData.setWanderingTraderId(entityvillagertrader.getUUID());
--                    entityvillagertrader.setDespawnDelay(48000);
-+                    // entityvillagertrader.setDespawnDelay(48000); // CraftBukkit - moved to EntityVillagerTrader constructor. This lets the value be modified by plugins on CreatureSpawnEvent
-                     entityvillagertrader.setWanderTarget(blockposition1);
-                     entityvillagertrader.restrictTo(blockposition1, 16);
-                     return true;
-@@ -133,7 +133,7 @@
-         BlockPosition blockposition = this.findSpawnPositionNear(worldserver, entityvillagertrader.blockPosition(), i);
- 
-         if (blockposition != null) {
--            EntityLlamaTrader entityllamatrader = (EntityLlamaTrader) EntityTypes.TRADER_LLAMA.spawn(worldserver, blockposition, EntitySpawnReason.EVENT);
-+            EntityLlamaTrader entityllamatrader = (EntityLlamaTrader) EntityTypes.TRADER_LLAMA.spawn(worldserver, blockposition, EntitySpawnReason.EVENT, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit
- 
-             if (entityllamatrader != null) {
-                 entityllamatrader.setLeashedTo(entityvillagertrader, true);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/npc/Villager.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/npc/Villager.java.patch
new file mode 100644
index 0000000000..6d6fcf7eac
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/npc/Villager.java.patch
@@ -0,0 +1,119 @@
+--- a/net/minecraft/world/entity/npc/Villager.java
++++ b/net/minecraft/world/entity/npc/Villager.java
+@@ -93,6 +93,14 @@
+ import net.minecraft.world.phys.AABB;
+ import org.slf4j.Logger;
+ 
++// CraftBukkit start
++import org.bukkit.Bukkit;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.event.entity.EntityRemoveEvent;
++import org.bukkit.event.entity.EntityTransformEvent;
++import org.bukkit.event.entity.VillagerReplenishTradeEvent;
++// CraftBukkit end
++
+ public class Villager extends AbstractVillager implements ReputationEventHandler, VillagerDataHolder {
+ 
+     private static final Logger LOGGER = LogUtils.getLogger();
+@@ -150,7 +158,7 @@
+ 
+     @Override
+     public Brain<Villager> getBrain() {
+-        return super.getBrain();
++        return (Brain<Villager>) super.getBrain(); // CraftBukkit - decompile error
+     }
+ 
+     @Override
+@@ -235,7 +243,7 @@
+                     this.increaseProfessionLevelOnUpdate = false;
+                 }
+ 
+-                this.addEffect(new MobEffectInstance(MobEffects.REGENERATION, 200, 0));
++                this.addEffect(new MobEffectInstance(MobEffects.REGENERATION, 200, 0), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.VILLAGER_TRADE); // CraftBukkit
+             }
+         }
+ 
+@@ -360,7 +368,13 @@
+         while (iterator.hasNext()) {
+             MerchantOffer merchantrecipe = (MerchantOffer) iterator.next();
+ 
+-            merchantrecipe.resetUses();
++            // CraftBukkit start
++            VillagerReplenishTradeEvent event = new VillagerReplenishTradeEvent((org.bukkit.entity.Villager) this.getBukkitEntity(), merchantrecipe.asBukkit());
++            Bukkit.getPluginManager().callEvent(event);
++            if (!event.isCancelled()) {
++                merchantrecipe.resetUses();
++            }
++            // CraftBukkit end
+         }
+ 
+         this.resendOffersToTradingPlayer();
+@@ -429,7 +443,13 @@
+             while (iterator.hasNext()) {
+                 MerchantOffer merchantrecipe = (MerchantOffer) iterator.next();
+ 
+-                merchantrecipe.resetUses();
++                // CraftBukkit start
++                VillagerReplenishTradeEvent event = new VillagerReplenishTradeEvent((org.bukkit.entity.Villager) this.getBukkitEntity(), merchantrecipe.asBukkit());
++                Bukkit.getPluginManager().callEvent(event);
++                if (!event.isCancelled()) {
++                    merchantrecipe.resetUses();
++                }
++                // CraftBukkit end
+             }
+         }
+ 
+@@ -489,7 +509,7 @@
+     @Override
+     public void addAdditionalSaveData(CompoundTag nbt) {
+         super.addAdditionalSaveData(nbt);
+-        DataResult dataresult = VillagerData.CODEC.encodeStart(NbtOps.INSTANCE, this.getVillagerData());
++        DataResult<Tag> dataresult = VillagerData.CODEC.encodeStart(NbtOps.INSTANCE, this.getVillagerData()); // CraftBukkit - decompile error
+         Logger logger = Villager.LOGGER;
+ 
+         Objects.requireNonNull(logger);
+@@ -512,7 +532,7 @@
+     public void readAdditionalSaveData(CompoundTag nbt) {
+         super.readAdditionalSaveData(nbt);
+         if (nbt.contains("VillagerData", 10)) {
+-            DataResult dataresult = VillagerData.CODEC.parse(NbtOps.INSTANCE, nbt.get("VillagerData"));
++            DataResult<VillagerData> dataresult = VillagerData.CODEC.parse(new Dynamic(NbtOps.INSTANCE, nbt.get("VillagerData")));
+             Logger logger = Villager.LOGGER;
+ 
+             Objects.requireNonNull(logger);
+@@ -808,7 +828,7 @@
+                 entitywitch1.finalizeSpawn(world, world.getCurrentDifficultyAt(entitywitch1.blockPosition()), EntitySpawnReason.CONVERSION, (SpawnGroupData) null);
+                 entitywitch1.setPersistenceRequired();
+                 this.releaseAllPois();
+-            });
++            }, EntityTransformEvent.TransformReason.LIGHTNING, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.LIGHTNING); // CraftBukkit
+ 
+             if (entitywitch == null) {
+                 super.thunderHit(world, lightning);
+@@ -906,7 +926,7 @@
+             }).limit(5L).toList();
+ 
+             if (list1.size() >= requiredCount) {
+-                if (!SpawnUtil.trySpawnMob(EntityType.IRON_GOLEM, EntitySpawnReason.MOB_SUMMONED, world, this.blockPosition(), 10, 8, 6, SpawnUtil.Strategy.LEGACY_IRON_GOLEM, false).isEmpty()) {
++                if (!SpawnUtil.trySpawnMob(EntityType.IRON_GOLEM, EntitySpawnReason.MOB_SUMMONED, world, this.blockPosition(), 10, 8, 6, SpawnUtil.Strategy.LEGACY_IRON_GOLEM, false, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.VILLAGE_DEFENSE).isEmpty()) { // CraftBukkit
+                     list.forEach(GolemSensor::golemDetected);
+                 }
+             }
+@@ -963,7 +983,7 @@
+     @Override
+     public void startSleeping(BlockPos pos) {
+         super.startSleeping(pos);
+-        this.brain.setMemory(MemoryModuleType.LAST_SLEPT, (Object) this.level().getGameTime());
++        this.brain.setMemory(MemoryModuleType.LAST_SLEPT, this.level().getGameTime()); // CraftBukkit - decompile error
+         this.brain.eraseMemory(MemoryModuleType.WALK_TARGET);
+         this.brain.eraseMemory(MemoryModuleType.CANT_REACH_WALK_TARGET_SINCE);
+     }
+@@ -971,7 +991,7 @@
+     @Override
+     public void stopSleeping() {
+         super.stopSleeping();
+-        this.brain.setMemory(MemoryModuleType.LAST_WOKEN, (Object) this.level().getGameTime());
++        this.brain.setMemory(MemoryModuleType.LAST_WOKEN, this.level().getGameTime()); // CraftBukkit - decompile error
+     }
+ 
+     private boolean golemSpawnConditionsMet(long worldTime) {
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/npc/EntityVillagerTrader.patch b/paper-server/patches/sources/net/minecraft/world/entity/npc/WanderingTrader.java.patch
similarity index 65%
rename from paper-server/patches/sources/net/minecraft/world/entity/npc/EntityVillagerTrader.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/npc/WanderingTrader.java.patch
index 24ade5e534..8b6cac6fae 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/npc/EntityVillagerTrader.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/npc/WanderingTrader.java.patch
@@ -1,9 +1,10 @@
---- a/net/minecraft/world/entity/npc/EntityVillagerTrader.java
-+++ b/net/minecraft/world/entity/npc/EntityVillagerTrader.java
-@@ -48,6 +48,14 @@
- import net.minecraft.world.phys.Vec3D;
+--- a/net/minecraft/world/entity/npc/WanderingTrader.java
++++ b/net/minecraft/world/entity/npc/WanderingTrader.java
+@@ -48,8 +48,16 @@
+ import net.minecraft.world.phys.Vec3;
  import org.apache.commons.lang3.tuple.Pair;
  
+-public class WanderingTrader extends AbstractVillager implements Consumable.OverrideConsumeSound {
 +// CraftBukkit start
 +import org.bukkit.Bukkit;
 +import org.bukkit.craftbukkit.inventory.CraftMerchantRecipe;
@@ -11,25 +12,27 @@
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +import org.bukkit.event.entity.VillagerAcquireTradeEvent;
 +// CraftBukkit end
-+
- public class EntityVillagerTrader extends EntityVillagerAbstract implements Consumable.b {
  
++public class WanderingTrader extends net.minecraft.world.entity.npc.AbstractVillager implements Consumable.OverrideConsumeSound {
++
      private static final int NUMBER_OF_TRADE_OFFERS = 5;
+     @Nullable
+     private BlockPos wanderTarget;
 @@ -57,6 +65,7 @@
  
-     public EntityVillagerTrader(EntityTypes<? extends EntityVillagerTrader> entitytypes, World world) {
-         super(entitytypes, world);
+     public WanderingTrader(EntityType<? extends WanderingTrader> type, Level world) {
+         super(type, world);
 +        this.setDespawnDelay(48000); // CraftBukkit - set default from MobSpawnerTrader
      }
  
      @Override
 @@ -137,7 +146,16 @@
-                 MerchantRecipe merchantrecipe = villagertrades_imerchantrecipeoption.getOffer(this, this.random);
+                 MerchantOffer merchantrecipe = villagertrades_imerchantrecipeoption.getOffer(this, this.random);
  
                  if (merchantrecipe != null) {
 -                    merchantrecipelist.add(merchantrecipe);
 +                    // CraftBukkit start
-+                    VillagerAcquireTradeEvent event = new VillagerAcquireTradeEvent((AbstractVillager) getBukkitEntity(), merchantrecipe.asBukkit());
++                    VillagerAcquireTradeEvent event = new VillagerAcquireTradeEvent((AbstractVillager) this.getBukkitEntity(), merchantrecipe.asBukkit());
 +                    // Suppress during worldgen
 +                    if (this.valid) {
 +                        Bukkit.getPluginManager().callEvent(event);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/npc/WanderingTraderSpawner.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/npc/WanderingTraderSpawner.java.patch
new file mode 100644
index 0000000000..a729d40bce
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/npc/WanderingTraderSpawner.java.patch
@@ -0,0 +1,29 @@
+--- a/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
++++ b/net/minecraft/world/entity/npc/WanderingTraderSpawner.java
+@@ -110,7 +110,7 @@
+                     return false;
+                 }
+ 
+-                WanderingTrader entityvillagertrader = (WanderingTrader) EntityType.WANDERING_TRADER.spawn(world, blockposition2, EntitySpawnReason.EVENT);
++                WanderingTrader entityvillagertrader = (WanderingTrader) EntityType.WANDERING_TRADER.spawn(world, blockposition2, EntitySpawnReason.EVENT, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit
+ 
+                 if (entityvillagertrader != null) {
+                     for (int i = 0; i < 2; ++i) {
+@@ -118,7 +118,7 @@
+                     }
+ 
+                     this.serverLevelData.setWanderingTraderId(entityvillagertrader.getUUID());
+-                    entityvillagertrader.setDespawnDelay(48000);
++                    // entityvillagertrader.setDespawnDelay(48000); // CraftBukkit - moved to EntityVillagerTrader constructor. This lets the value be modified by plugins on CreatureSpawnEvent
+                     entityvillagertrader.setWanderTarget(blockposition1);
+                     entityvillagertrader.restrictTo(blockposition1, 16);
+                     return true;
+@@ -133,7 +133,7 @@
+         BlockPos blockposition = this.findSpawnPositionNear(world, wanderingTrader.blockPosition(), range);
+ 
+         if (blockposition != null) {
+-            TraderLlama entityllamatrader = (TraderLlama) EntityType.TRADER_LLAMA.spawn(world, blockposition, EntitySpawnReason.EVENT);
++            TraderLlama entityllamatrader = (TraderLlama) EntityType.TRADER_LLAMA.spawn(world, blockposition, EntitySpawnReason.EVENT, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit
+ 
+             if (entityllamatrader != null) {
+                 entityllamatrader.setLeashedTo(wanderingTrader, true);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/player/EntityHuman.patch b/paper-server/patches/sources/net/minecraft/world/entity/player/EntityHuman.patch
deleted file mode 100644
index 5827903e3d..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/player/EntityHuman.patch
+++ /dev/null
@@ -1,435 +0,0 @@
---- a/net/minecraft/world/entity/player/EntityHuman.java
-+++ b/net/minecraft/world/entity/player/EntityHuman.java
-@@ -119,6 +119,19 @@
- import net.minecraft.world.scores.ScoreboardTeam;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import net.minecraft.nbt.NBTBase;
-+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.craftbukkit.util.CraftVector;
-+import org.bukkit.entity.Player;
-+import org.bukkit.event.entity.CreatureSpawnEvent;
-+import org.bukkit.event.entity.EntityDamageEvent;
-+import org.bukkit.event.entity.EntityExhaustionEvent;
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+import org.bukkit.event.player.PlayerVelocityEvent;
-+// CraftBukkit end
-+
- public abstract class EntityHuman extends EntityLiving {
- 
-     private static final Logger LOGGER = LogUtils.getLogger();
-@@ -139,7 +152,8 @@
-     private static final int CURRENT_IMPULSE_CONTEXT_RESET_GRACE_TIME_TICKS = 40;
-     public static final Vec3D DEFAULT_VEHICLE_ATTACHMENT = new Vec3D(0.0D, 0.6D, 0.0D);
-     public static final EntitySize STANDING_DIMENSIONS = EntitySize.scalable(0.6F, 1.8F).withEyeHeight(1.62F).withAttachments(EntityAttachments.builder().attach(EntityAttachment.VEHICLE, EntityHuman.DEFAULT_VEHICLE_ATTACHMENT));
--    private static final Map<EntityPose, EntitySize> POSES = ImmutableMap.builder().put(EntityPose.STANDING, EntityHuman.STANDING_DIMENSIONS).put(EntityPose.SLEEPING, EntityHuman.SLEEPING_DIMENSIONS).put(EntityPose.FALL_FLYING, EntitySize.scalable(0.6F, 0.6F).withEyeHeight(0.4F)).put(EntityPose.SWIMMING, EntitySize.scalable(0.6F, 0.6F).withEyeHeight(0.4F)).put(EntityPose.SPIN_ATTACK, EntitySize.scalable(0.6F, 0.6F).withEyeHeight(0.4F)).put(EntityPose.CROUCHING, EntitySize.scalable(0.6F, 1.5F).withEyeHeight(1.27F).withAttachments(EntityAttachments.builder().attach(EntityAttachment.VEHICLE, EntityHuman.DEFAULT_VEHICLE_ATTACHMENT))).put(EntityPose.DYING, EntitySize.fixed(0.2F, 0.2F).withEyeHeight(1.62F)).build();
-+    // CraftBukkit - decompile error
-+    private static final Map<EntityPose, EntitySize> POSES = ImmutableMap.<EntityPose, EntitySize>builder().put(EntityPose.STANDING, EntityHuman.STANDING_DIMENSIONS).put(EntityPose.SLEEPING, EntityHuman.SLEEPING_DIMENSIONS).put(EntityPose.FALL_FLYING, EntitySize.scalable(0.6F, 0.6F).withEyeHeight(0.4F)).put(EntityPose.SWIMMING, EntitySize.scalable(0.6F, 0.6F).withEyeHeight(0.4F)).put(EntityPose.SPIN_ATTACK, EntitySize.scalable(0.6F, 0.6F).withEyeHeight(0.4F)).put(EntityPose.CROUCHING, EntitySize.scalable(0.6F, 1.5F).withEyeHeight(1.27F).withAttachments(EntityAttachments.builder().attach(EntityAttachment.VEHICLE, EntityHuman.DEFAULT_VEHICLE_ATTACHMENT))).put(EntityPose.DYING, EntitySize.fixed(0.2F, 0.2F).withEyeHeight(1.62F)).build();
-     private static final DataWatcherObject<Float> DATA_PLAYER_ABSORPTION_ID = DataWatcher.defineId(EntityHuman.class, DataWatcherRegistry.FLOAT);
-     private static final DataWatcherObject<Integer> DATA_SCORE_ID = DataWatcher.defineId(EntityHuman.class, DataWatcherRegistry.INT);
-     protected static final DataWatcherObject<Byte> DATA_PLAYER_MODE_CUSTOMISATION = DataWatcher.defineId(EntityHuman.class, DataWatcherRegistry.BYTE);
-@@ -149,7 +163,7 @@
-     public static final int CLIENT_LOADED_TIMEOUT_TIME = 60;
-     private long timeEntitySatOnShoulder;
-     final PlayerInventory inventory = new PlayerInventory(this);
--    protected InventoryEnderChest enderChestInventory = new InventoryEnderChest();
-+    protected InventoryEnderChest enderChestInventory = new InventoryEnderChest(this); // CraftBukkit - add "this" to constructor
-     public final ContainerPlayer inventoryMenu;
-     public Container containerMenu;
-     protected FoodMetaData foodData = new FoodMetaData();
-@@ -189,6 +203,16 @@
-     private boolean ignoreFallDamageFromCurrentImpulse;
-     private int currentImpulseContextResetGraceTime;
- 
-+    // CraftBukkit start
-+    public boolean fauxSleeping;
-+    public int oldLevel = -1;
-+
-+    @Override
-+    public CraftHumanEntity getBukkitEntity() {
-+        return (CraftHumanEntity) super.getBukkitEntity();
-+    }
-+    // CraftBukkit end
-+
-     public EntityHuman(World world, BlockPosition blockposition, float f, GameProfile gameprofile) {
-         super(EntityTypes.PLAYER, world);
-         this.lastItemInMainHand = ItemStack.EMPTY;
-@@ -353,7 +377,7 @@
-     }
- 
-     private void turtleHelmetTick() {
--        this.addEffect(new MobEffect(MobEffects.WATER_BREATHING, 200, 0, false, false, true));
-+        this.addEffect(new MobEffect(MobEffects.WATER_BREATHING, 200, 0, false, false, true), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.TURTLE_HELMET); // CraftBukkit
-     }
- 
-     private boolean isEquipped(Item item) {
-@@ -523,8 +547,14 @@
-     public void rideTick() {
-         if (!this.level().isClientSide && this.wantsToStopRiding() && this.isPassenger()) {
-             this.stopRiding();
--            this.setShiftKeyDown(false);
--        } else {
-+            // CraftBukkit start - SPIGOT-7316: no longer passenger, dismount and return
-+            if (!this.isPassenger()) {
-+                this.setShiftKeyDown(false);
-+                return;
-+            }
-+        }
-+        {
-+            // CraftBukkit end
-             super.rideTick();
-             this.oBob = this.bob;
-             this.bob = 0.0F;
-@@ -719,6 +749,13 @@
- 
-     @Nullable
-     public EntityItem drop(ItemStack itemstack, boolean flag, boolean flag1) {
-+        // CraftBukkit start - SPIGOT-2942: Add boolean to call event
-+        return drop(itemstack, flag, flag1, true);
-+    }
-+
-+    @Nullable
-+    public EntityItem drop(ItemStack itemstack, boolean flag, boolean flag1, boolean callEvent) {
-+        // CraftBukkit end
-         if (!itemstack.isEmpty() && this.level().isClientSide) {
-             this.swing(EnumHand.MAIN_HAND);
-         }
-@@ -809,7 +846,7 @@
-         }
- 
-         if (nbttagcompound.contains("LastDeathLocation", 10)) {
--            DataResult dataresult = GlobalPos.CODEC.parse(DynamicOpsNBT.INSTANCE, nbttagcompound.get("LastDeathLocation"));
-+            DataResult<GlobalPos> dataresult = GlobalPos.CODEC.parse(DynamicOpsNBT.INSTANCE, nbttagcompound.get("LastDeathLocation")); // CraftBukkit - decompile error
-             Logger logger = EntityHuman.LOGGER;
- 
-             Objects.requireNonNull(logger);
-@@ -817,7 +854,7 @@
-         }
- 
-         if (nbttagcompound.contains("current_explosion_impact_pos", 9)) {
--            DataResult dataresult1 = Vec3D.CODEC.parse(DynamicOpsNBT.INSTANCE, nbttagcompound.get("current_explosion_impact_pos"));
-+            DataResult<Vec3D> dataresult1 = Vec3D.CODEC.parse(DynamicOpsNBT.INSTANCE, nbttagcompound.get("current_explosion_impact_pos")); // CraftBukkit - decompile error
-             Logger logger1 = EntityHuman.LOGGER;
- 
-             Objects.requireNonNull(logger1);
-@@ -854,7 +891,7 @@
-         }
- 
-         this.getLastDeathLocation().flatMap((globalpos) -> {
--            DataResult dataresult = GlobalPos.CODEC.encodeStart(DynamicOpsNBT.INSTANCE, globalpos);
-+            DataResult<NBTBase> dataresult = GlobalPos.CODEC.encodeStart(DynamicOpsNBT.INSTANCE, globalpos); // CraftBukkit - decompile error
-             Logger logger = EntityHuman.LOGGER;
- 
-             Objects.requireNonNull(logger);
-@@ -886,10 +923,10 @@
-             if (this.isDeadOrDying()) {
-                 return false;
-             } else {
--                this.removeEntitiesOnShoulder();
-+                // this.removeEntitiesOnShoulder(); // CraftBukkit - moved down
-                 if (damagesource.scalesWithDifficulty()) {
-                     if (worldserver.getDifficulty() == EnumDifficulty.PEACEFUL) {
--                        f = 0.0F;
-+                        return false; // CraftBukkit - f = 0.0f -> return false
-                     }
- 
-                     if (worldserver.getDifficulty() == EnumDifficulty.EASY) {
-@@ -901,7 +938,13 @@
-                     }
-                 }
- 
--                return f == 0.0F ? false : super.hurtServer(worldserver, damagesource, f);
-+                // CraftBukkit start - Don't filter out 0 damage
-+                boolean damaged = super.hurtServer(worldserver, damagesource, f);
-+                if (damaged) {
-+                    this.removeEntitiesOnShoulder();
-+                }
-+                return damaged;
-+                // CraftBukkit end
-             }
-         }
-     }
-@@ -923,10 +966,29 @@
-     }
- 
-     public boolean canHarmPlayer(EntityHuman entityhuman) {
--        ScoreboardTeam scoreboardteam = this.getTeam();
--        ScoreboardTeam scoreboardteam1 = entityhuman.getTeam();
-+        // CraftBukkit start - Change to check OTHER player's scoreboard team according to API
-+        // To summarize this method's logic, it's "Can parameter hurt this"
-+        org.bukkit.scoreboard.Team team;
-+        if (entityhuman instanceof EntityPlayer) {
-+            EntityPlayer thatPlayer = (EntityPlayer) entityhuman;
-+            team = thatPlayer.getBukkitEntity().getScoreboard().getPlayerTeam(thatPlayer.getBukkitEntity());
-+            if (team == null || team.allowFriendlyFire()) {
-+                return true;
-+            }
-+        } else {
-+            // This should never be called, but is implemented anyway
-+            org.bukkit.OfflinePlayer thisPlayer = entityhuman.level().getCraftServer().getOfflinePlayer(entityhuman.getScoreboardName());
-+            team = entityhuman.level().getCraftServer().getScoreboardManager().getMainScoreboard().getPlayerTeam(thisPlayer);
-+            if (team == null || team.allowFriendlyFire()) {
-+                return true;
-+            }
-+        }
- 
--        return scoreboardteam == null ? true : (!scoreboardteam.isAlliedTo(scoreboardteam1) ? true : scoreboardteam.isAllowFriendlyFire());
-+        if (this instanceof EntityPlayer) {
-+            return !team.hasPlayer(((EntityPlayer) this).getBukkitEntity());
-+        }
-+        return !team.hasPlayer(this.level().getCraftServer().getOfflinePlayer(this.getScoreboardName()));
-+        // CraftBukkit end
-     }
- 
-     @Override
-@@ -966,8 +1028,13 @@
-         }
-     }
- 
-+    // CraftBukkit start
-     @Override
--    protected void actuallyHurt(WorldServer worldserver, DamageSource damagesource, float f) {
-+    protected boolean actuallyHurt(WorldServer worldserver, DamageSource damagesource, float f, EntityDamageEvent event) { // void -> boolean
-+        if (true) {
-+            return super.actuallyHurt(worldserver, damagesource, f, event);
-+        }
-+        // CraftBukkit end
-         if (!this.isInvulnerableTo(worldserver, damagesource)) {
-             f = this.getDamageAfterArmorAbsorb(damagesource, f);
-             f = this.getDamageAfterMagicAbsorb(damagesource, f);
-@@ -982,7 +1049,7 @@
-             }
- 
-             if (f != 0.0F) {
--                this.causeFoodExhaustion(damagesource.getFoodExhaustion());
-+                this.causeFoodExhaustion(damagesource.getFoodExhaustion(), EntityExhaustionEvent.ExhaustionReason.DAMAGED); // CraftBukkit - EntityExhaustionEvent
-                 this.getCombatTracker().recordDamage(damagesource, f);
-                 this.setHealth(this.getHealth() - f);
-                 if (f < 3.4028235E37F) {
-@@ -992,6 +1059,7 @@
-                 this.gameEvent(GameEvent.ENTITY_DAMAGE);
-             }
-         }
-+        return false; // CraftBukkit
-     }
- 
-     public boolean isTextFilteringEnabled() {
-@@ -1144,10 +1212,15 @@
- 
-                 f *= 0.2F + f2 * f2 * 0.8F;
-                 f1 *= f2;
--                this.resetAttackStrengthTicker();
-+                // this.resetAttackStrengthTicker(); // CraftBukkit - Moved to EntityLiving to reset the cooldown after the damage is dealt
-                 if (entity.getType().is(TagsEntity.REDIRECTABLE_PROJECTILE) && entity instanceof IProjectile) {
-                     IProjectile iprojectile = (IProjectile) entity;
- 
-+                    // CraftBukkit start
-+                    if (CraftEventFactory.handleNonLivingEntityDamageEvent(entity, damagesource, f1, false)) {
-+                        return;
-+                    }
-+                    // CraftBukkit end
-                     if (iprojectile.deflect(ProjectileDeflection.AIM_DEFLECT, this, this, true)) {
-                         this.level().playSound((EntityHuman) null, this.getX(), this.getY(), this.getZ(), SoundEffects.PLAYER_ATTACK_NODAMAGE, this.getSoundSource());
-                         return;
-@@ -1223,8 +1296,13 @@
-                                 if (entityliving2 != this && entityliving2 != entity && !this.isAlliedTo((Entity) entityliving2) && (!(entityliving2 instanceof EntityArmorStand) || !((EntityArmorStand) entityliving2).isMarker()) && this.distanceToSqr((Entity) entityliving2) < 9.0D) {
-                                     float f7 = this.getEnchantedDamage(entityliving2, f6, damagesource) * f2;
- 
-+                                    // CraftBukkit start - Only apply knockback if the damage hits
-+                                    if (!entityliving2.hurtServer((WorldServer) this.level(), this.damageSources().playerAttack(this).sweep(), f7)) {
-+                                        continue;
-+                                    }
-+                                    // CraftBukkit end
-                                     entityliving2.knockback(0.4000000059604645D, (double) MathHelper.sin(this.getYRot() * 0.017453292F), (double) (-MathHelper.cos(this.getYRot() * 0.017453292F)));
--                                    entityliving2.hurt(damagesource, f7);
-+                                    // entityliving2.hurt(damagesource, f7); // CraftBukkit - moved up
-                                     World world = this.level();
- 
-                                     if (world instanceof WorldServer) {
-@@ -1240,9 +1318,26 @@
-                         }
- 
-                         if (entity instanceof EntityPlayer && entity.hurtMarked) {
-+                            // CraftBukkit start - Add Velocity Event
-+                            boolean cancelled = false;
-+                            Player player = (Player) entity.getBukkitEntity();
-+                            org.bukkit.util.Vector velocity = CraftVector.toBukkit(vec3d);
-+
-+                            PlayerVelocityEvent event = new PlayerVelocityEvent(player, velocity.clone());
-+                            this.level().getCraftServer().getPluginManager().callEvent(event);
-+
-+                            if (event.isCancelled()) {
-+                                cancelled = true;
-+                            } else if (!velocity.equals(event.getVelocity())) {
-+                                player.setVelocity(event.getVelocity());
-+                            }
-+
-+                            if (!cancelled) {
-                             ((EntityPlayer) entity).connection.send(new PacketPlayOutEntityVelocity(entity));
-                             entity.hurtMarked = false;
-                             entity.setDeltaMovement(vec3d);
-+                            }
-+                            // CraftBukkit end
-                         }
- 
-                         if (flag2) {
-@@ -1308,9 +1403,14 @@
-                             }
-                         }
- 
--                        this.causeFoodExhaustion(0.1F);
-+                        this.causeFoodExhaustion(0.1F, EntityExhaustionEvent.ExhaustionReason.ATTACK); // CraftBukkit - EntityExhaustionEvent
-                     } else {
-                         this.level().playSound((EntityHuman) null, this.getX(), this.getY(), this.getZ(), SoundEffects.PLAYER_ATTACK_NODAMAGE, this.getSoundSource(), 1.0F, 1.0F);
-+                        // CraftBukkit start - resync on cancelled event
-+                        if (this instanceof EntityPlayer) {
-+                            ((EntityPlayer) this).getBukkitEntity().updateInventory();
-+                        }
-+                        // CraftBukkit end
-                     }
-                 }
- 
-@@ -1351,7 +1451,14 @@
- 
-     @Override
-     public void remove(Entity.RemovalReason entity_removalreason) {
--        super.remove(entity_removalreason);
-+        // CraftBukkit start - add Bukkit remove cause
-+        this.remove(entity_removalreason, null);
-+    }
-+
-+    @Override
-+    public void remove(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) {
-+        super.remove(entity_removalreason, cause);
-+        // CraftBukkit end
-         this.inventoryMenu.removed(this);
-         if (this.containerMenu != null && this.hasContainerOpen()) {
-             this.doCloseContainer();
-@@ -1391,6 +1498,12 @@
-     }
- 
-     public Either<EntityHuman.EnumBedResult, Unit> startSleepInBed(BlockPosition blockposition) {
-+        // CraftBukkit start
-+        return this.startSleepInBed(blockposition, false);
-+    }
-+
-+    public Either<EntityHuman.EnumBedResult, Unit> startSleepInBed(BlockPosition blockposition, boolean force) {
-+        // CraftBukkit end
-         this.startSleeping(blockposition);
-         this.sleepCounter = 0;
-         return Either.right(Unit.INSTANCE);
-@@ -1545,12 +1658,24 @@
-     }
- 
-     public void startFallFlying() {
--        this.setSharedFlag(7, true);
-+        // CraftBukkit start
-+        if (!org.bukkit.craftbukkit.event.CraftEventFactory.callToggleGlideEvent(this, true).isCancelled()) {
-+            this.setSharedFlag(7, true);
-+        } else {
-+            // SPIGOT-5542: must toggle like below
-+            this.setSharedFlag(7, true);
-+            this.setSharedFlag(7, false);
-+        }
-+        // CraftBukkit end
-     }
- 
-     public void stopFallFlying() {
-+        // CraftBukkit start
-+        if (!org.bukkit.craftbukkit.event.CraftEventFactory.callToggleGlideEvent(this, false).isCancelled()) {
-         this.setSharedFlag(7, true);
-         this.setSharedFlag(7, false);
-+        }
-+        // CraftBukkit end
-     }
- 
-     @Override
-@@ -1665,10 +1790,21 @@
-         return this.experienceLevel >= 30 ? 112 + (this.experienceLevel - 30) * 9 : (this.experienceLevel >= 15 ? 37 + (this.experienceLevel - 15) * 5 : 7 + this.experienceLevel * 2);
-     }
- 
-+    // CraftBukkit start
-     public void causeFoodExhaustion(float f) {
-+        this.causeFoodExhaustion(f, EntityExhaustionEvent.ExhaustionReason.UNKNOWN);
-+    }
-+
-+    public void causeFoodExhaustion(float f, EntityExhaustionEvent.ExhaustionReason reason) {
-+        // CraftBukkit end
-         if (!this.abilities.invulnerable) {
-             if (!this.level().isClientSide) {
--                this.foodData.addExhaustion(f);
-+                // CraftBukkit start
-+                EntityExhaustionEvent event = CraftEventFactory.callPlayerExhaustionEvent(this, reason, f);
-+                if (!event.isCancelled()) {
-+                    this.foodData.addExhaustion(event.getExhaustion());
-+                }
-+                // CraftBukkit end
-             }
- 
-         }
-@@ -1748,13 +1884,20 @@
- 
-     @Override
-     public void setItemSlot(EnumItemSlot enumitemslot, ItemStack itemstack) {
-+        // CraftBukkit start
-+        setItemSlot(enumitemslot, itemstack, false);
-+    }
-+
-+    @Override
-+    public void setItemSlot(EnumItemSlot enumitemslot, ItemStack itemstack, boolean silent) {
-+        // CraftBukkit end
-         this.verifyEquippedItem(itemstack);
-         if (enumitemslot == EnumItemSlot.MAINHAND) {
--            this.onEquipItem(enumitemslot, (ItemStack) this.inventory.items.set(this.inventory.selected, itemstack), itemstack);
-+            this.onEquipItem(enumitemslot, (ItemStack) this.inventory.items.set(this.inventory.selected, itemstack), itemstack, silent); // CraftBukkit
-         } else if (enumitemslot == EnumItemSlot.OFFHAND) {
--            this.onEquipItem(enumitemslot, (ItemStack) this.inventory.offhand.set(0, itemstack), itemstack);
-+            this.onEquipItem(enumitemslot, (ItemStack) this.inventory.offhand.set(0, itemstack), itemstack, silent); // CraftBukkit
-         } else if (enumitemslot.getType() == EnumItemSlot.Function.HUMANOID_ARMOR) {
--            this.onEquipItem(enumitemslot, (ItemStack) this.inventory.armor.set(enumitemslot.getIndex(), itemstack), itemstack);
-+            this.onEquipItem(enumitemslot, (ItemStack) this.inventory.armor.set(enumitemslot.getIndex(), itemstack), itemstack, silent); // CraftBukkit
-         }
- 
-     }
-@@ -1798,26 +1941,31 @@
- 
-     protected void removeEntitiesOnShoulder() {
-         if (this.timeEntitySatOnShoulder + 20L < this.level().getGameTime()) {
--            this.respawnEntityOnShoulder(this.getShoulderEntityLeft());
--            this.setShoulderEntityLeft(new NBTTagCompound());
--            this.respawnEntityOnShoulder(this.getShoulderEntityRight());
--            this.setShoulderEntityRight(new NBTTagCompound());
-+            // CraftBukkit start
-+            if (this.respawnEntityOnShoulder(this.getShoulderEntityLeft())) {
-+                this.setShoulderEntityLeft(new NBTTagCompound());
-+            }
-+            if (this.respawnEntityOnShoulder(this.getShoulderEntityRight())) {
-+                this.setShoulderEntityRight(new NBTTagCompound());
-+            }
-+            // CraftBukkit end
-         }
- 
-     }
- 
--    private void respawnEntityOnShoulder(NBTTagCompound nbttagcompound) {
-+    private boolean respawnEntityOnShoulder(NBTTagCompound nbttagcompound) { // CraftBukkit void->boolean
-         if (!this.level().isClientSide && !nbttagcompound.isEmpty()) {
--            EntityTypes.create(nbttagcompound, this.level(), EntitySpawnReason.LOAD).ifPresent((entity) -> {
-+            return EntityTypes.create(nbttagcompound, this.level(), EntitySpawnReason.LOAD).map((entity) -> { // CraftBukkit
-                 if (entity instanceof EntityTameableAnimal) {
-                     ((EntityTameableAnimal) entity).setOwnerUUID(this.uuid);
-                 }
- 
-                 entity.setPos(this.getX(), this.getY() + 0.699999988079071D, this.getZ());
--                ((WorldServer) this.level()).addWithUUID(entity);
--            });
-+                return ((WorldServer) this.level()).addWithUUID(entity, CreatureSpawnEvent.SpawnReason.SHOULDER_ENTITY); // CraftBukkit
-+            }).orElse(true); // CraftBukkit
-         }
- 
-+        return true; // CraftBukkit
-     }
- 
-     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/player/PlayerInventory.patch b/paper-server/patches/sources/net/minecraft/world/entity/player/Inventory.java.patch
similarity index 73%
rename from paper-server/patches/sources/net/minecraft/world/entity/player/PlayerInventory.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/player/Inventory.java.patch
index 1746368ea0..1ab445eb99 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/player/PlayerInventory.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/player/Inventory.java.patch
@@ -1,29 +1,29 @@
---- a/net/minecraft/world/entity/player/PlayerInventory.java
-+++ b/net/minecraft/world/entity/player/PlayerInventory.java
-@@ -24,6 +24,13 @@
+--- a/net/minecraft/world/entity/player/Inventory.java
++++ b/net/minecraft/world/entity/player/Inventory.java
+@@ -23,6 +23,12 @@
+ import net.minecraft.world.item.Item;
  import net.minecraft.world.item.ItemStack;
- import net.minecraft.world.level.block.state.IBlockData;
- 
+ import net.minecraft.world.level.block.state.BlockState;
 +// CraftBukkit start
 +import java.util.ArrayList;
 +import org.bukkit.Location;
 +import org.bukkit.craftbukkit.entity.CraftHumanEntity;
 +import org.bukkit.entity.HumanEntity;
 +// CraftBukkit end
-+
- public class PlayerInventory implements IInventory, INamableTileEntity {
  
-     public static final int POP_TIME_DURATION = 5;
-@@ -39,6 +46,54 @@
-     public final EntityHuman player;
+ public class Inventory implements Container, Nameable {
+ 
+@@ -38,7 +44,55 @@
+     public int selected;
+     public final Player player;
      private int timesChanged;
- 
++
 +    // CraftBukkit start - add fields and methods
 +    public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
 +    private int maxStack = MAX_STACK;
 +
 +    public List<ItemStack> getContents() {
-+        List<ItemStack> combined = new ArrayList<ItemStack>(items.size() + armor.size() + offhand.size());
++        List<ItemStack> combined = new ArrayList<ItemStack>(this.items.size() + this.armor.size() + this.offhand.size());
 +        for (List<net.minecraft.world.item.ItemStack> sub : this.compartments) {
 +            combined.addAll(sub);
 +        }
@@ -36,41 +36,41 @@
 +    }
 +
 +    public void onOpen(CraftHumanEntity who) {
-+        transaction.add(who);
++        this.transaction.add(who);
 +    }
 +
 +    public void onClose(CraftHumanEntity who) {
-+        transaction.remove(who);
++        this.transaction.remove(who);
 +    }
 +
 +    public List<HumanEntity> getViewers() {
-+        return transaction;
++        return this.transaction;
 +    }
 +
 +    public org.bukkit.inventory.InventoryHolder getOwner() {
 +        return this.player.getBukkitEntity();
 +    }
-+
+ 
 +    @Override
 +    public int getMaxStackSize() {
-+        return maxStack;
++        return this.maxStack;
 +    }
 +
 +    public void setMaxStackSize(int size) {
-+        maxStack = size;
++        this.maxStack = size;
 +    }
 +
 +    @Override
 +    public Location getLocation() {
-+        return player.getBukkitEntity().getLocation();
++        return this.player.getBukkitEntity().getLocation();
 +    }
 +    // CraftBukkit end
 +
-     public PlayerInventory(EntityHuman entityhuman) {
+     public Inventory(Player player) {
          this.items = NonNullList.withSize(36, ItemStack.EMPTY);
          this.armor = NonNullList.withSize(4, ItemStack.EMPTY);
-@@ -59,6 +114,28 @@
-         return !itemstack.isEmpty() && ItemStack.isSameItemSameComponents(itemstack, itemstack1) && itemstack.isStackable() && itemstack.getCount() < this.getMaxStackSize(itemstack);
+@@ -59,6 +113,28 @@
+         return !existingStack.isEmpty() && ItemStack.isSameItemSameComponents(existingStack, stack) && existingStack.isStackable() && existingStack.getCount() < this.getMaxStackSize(existingStack);
      }
  
 +    // CraftBukkit start - Watch method above! :D
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/player/Player.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/player/Player.java.patch
new file mode 100644
index 0000000000..263e4e1800
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/player/Player.java.patch
@@ -0,0 +1,462 @@
+--- a/net/minecraft/world/entity/player/Player.java
++++ b/net/minecraft/world/entity/player/Player.java
+@@ -118,6 +118,15 @@
+ import net.minecraft.world.scores.PlayerTeam;
+ import net.minecraft.world.scores.Scoreboard;
+ import org.slf4j.Logger;
++import org.bukkit.craftbukkit.entity.CraftHumanEntity;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.craftbukkit.util.CraftVector;
++import org.bukkit.event.entity.CreatureSpawnEvent;
++import org.bukkit.event.entity.EntityDamageEvent;
++import org.bukkit.event.entity.EntityExhaustionEvent;
++import org.bukkit.event.entity.EntityRemoveEvent;
++import org.bukkit.event.player.PlayerVelocityEvent;
++// CraftBukkit end
+ 
+ public abstract class Player extends LivingEntity {
+ 
+@@ -139,7 +148,8 @@
+     private static final int CURRENT_IMPULSE_CONTEXT_RESET_GRACE_TIME_TICKS = 40;
+     public static final Vec3 DEFAULT_VEHICLE_ATTACHMENT = new Vec3(0.0D, 0.6D, 0.0D);
+     public static final EntityDimensions STANDING_DIMENSIONS = EntityDimensions.scalable(0.6F, 1.8F).withEyeHeight(1.62F).withAttachments(EntityAttachments.builder().attach(EntityAttachment.VEHICLE, Player.DEFAULT_VEHICLE_ATTACHMENT));
+-    private static final Map<Pose, EntityDimensions> POSES = ImmutableMap.builder().put(Pose.STANDING, Player.STANDING_DIMENSIONS).put(Pose.SLEEPING, Player.SLEEPING_DIMENSIONS).put(Pose.FALL_FLYING, EntityDimensions.scalable(0.6F, 0.6F).withEyeHeight(0.4F)).put(Pose.SWIMMING, EntityDimensions.scalable(0.6F, 0.6F).withEyeHeight(0.4F)).put(Pose.SPIN_ATTACK, EntityDimensions.scalable(0.6F, 0.6F).withEyeHeight(0.4F)).put(Pose.CROUCHING, EntityDimensions.scalable(0.6F, 1.5F).withEyeHeight(1.27F).withAttachments(EntityAttachments.builder().attach(EntityAttachment.VEHICLE, Player.DEFAULT_VEHICLE_ATTACHMENT))).put(Pose.DYING, EntityDimensions.fixed(0.2F, 0.2F).withEyeHeight(1.62F)).build();
++    // CraftBukkit - decompile error
++    private static final Map<Pose, EntityDimensions> POSES = ImmutableMap.<Pose, EntityDimensions>builder().put(Pose.STANDING, Player.STANDING_DIMENSIONS).put(Pose.SLEEPING, Player.SLEEPING_DIMENSIONS).put(Pose.FALL_FLYING, EntityDimensions.scalable(0.6F, 0.6F).withEyeHeight(0.4F)).put(Pose.SWIMMING, EntityDimensions.scalable(0.6F, 0.6F).withEyeHeight(0.4F)).put(Pose.SPIN_ATTACK, EntityDimensions.scalable(0.6F, 0.6F).withEyeHeight(0.4F)).put(Pose.CROUCHING, EntityDimensions.scalable(0.6F, 1.5F).withEyeHeight(1.27F).withAttachments(EntityAttachments.builder().attach(EntityAttachment.VEHICLE, Player.DEFAULT_VEHICLE_ATTACHMENT))).put(Pose.DYING, EntityDimensions.fixed(0.2F, 0.2F).withEyeHeight(1.62F)).build();
+     private static final EntityDataAccessor<Float> DATA_PLAYER_ABSORPTION_ID = SynchedEntityData.defineId(Player.class, EntityDataSerializers.FLOAT);
+     private static final EntityDataAccessor<Integer> DATA_SCORE_ID = SynchedEntityData.defineId(Player.class, EntityDataSerializers.INT);
+     public static final EntityDataAccessor<Byte> DATA_PLAYER_MODE_CUSTOMISATION = SynchedEntityData.defineId(Player.class, EntityDataSerializers.BYTE);
+@@ -149,7 +159,7 @@
+     public static final int CLIENT_LOADED_TIMEOUT_TIME = 60;
+     private long timeEntitySatOnShoulder;
+     final Inventory inventory = new Inventory(this);
+-    protected PlayerEnderChestContainer enderChestInventory = new PlayerEnderChestContainer();
++    protected PlayerEnderChestContainer enderChestInventory = new PlayerEnderChestContainer(this); // CraftBukkit - add "this" to constructor
+     public final InventoryMenu inventoryMenu;
+     public AbstractContainerMenu containerMenu;
+     protected FoodData foodData = new FoodData();
+@@ -188,7 +198,17 @@
+     public Entity currentExplosionCause;
+     private boolean ignoreFallDamageFromCurrentImpulse;
+     private int currentImpulseContextResetGraceTime;
++
++    // CraftBukkit start
++    public boolean fauxSleeping;
++    public int oldLevel = -1;
+ 
++    @Override
++    public CraftHumanEntity getBukkitEntity() {
++        return (CraftHumanEntity) super.getBukkitEntity();
++    }
++    // CraftBukkit end
++
+     public Player(Level world, BlockPos pos, float yaw, GameProfile gameProfile) {
+         super(EntityType.PLAYER, world);
+         this.lastItemInMainHand = ItemStack.EMPTY;
+@@ -353,7 +373,7 @@
+     }
+ 
+     private void turtleHelmetTick() {
+-        this.addEffect(new MobEffectInstance(MobEffects.WATER_BREATHING, 200, 0, false, false, true));
++        this.addEffect(new MobEffectInstance(MobEffects.WATER_BREATHING, 200, 0, false, false, true), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.TURTLE_HELMET); // CraftBukkit
+     }
+ 
+     private boolean isEquipped(Item item) {
+@@ -523,8 +543,14 @@
+     public void rideTick() {
+         if (!this.level().isClientSide && this.wantsToStopRiding() && this.isPassenger()) {
+             this.stopRiding();
+-            this.setShiftKeyDown(false);
+-        } else {
++            // CraftBukkit start - SPIGOT-7316: no longer passenger, dismount and return
++            if (!this.isPassenger()) {
++                this.setShiftKeyDown(false);
++                return;
++            }
++        }
++        {
++            // CraftBukkit end
+             super.rideTick();
+             this.oBob = this.bob;
+             this.bob = 0.0F;
+@@ -719,7 +745,14 @@
+ 
+     @Nullable
+     public ItemEntity drop(ItemStack stack, boolean throwRandomly, boolean retainOwnership) {
+-        if (!stack.isEmpty() && this.level().isClientSide) {
++        // CraftBukkit start - SPIGOT-2942: Add boolean to call event
++        return this.drop(stack, throwRandomly, retainOwnership, true);
++    }
++
++    @Nullable
++    public ItemEntity drop(ItemStack itemstack, boolean flag, boolean flag1, boolean callEvent) {
++        // CraftBukkit end
++        if (!itemstack.isEmpty() && this.level().isClientSide) {
+             this.swing(InteractionHand.MAIN_HAND);
+         }
+ 
+@@ -809,7 +842,7 @@
+         }
+ 
+         if (nbt.contains("LastDeathLocation", 10)) {
+-            DataResult dataresult = GlobalPos.CODEC.parse(NbtOps.INSTANCE, nbt.get("LastDeathLocation"));
++            DataResult<GlobalPos> dataresult = GlobalPos.CODEC.parse(NbtOps.INSTANCE, nbt.get("LastDeathLocation")); // CraftBukkit - decompile error
+             Logger logger = Player.LOGGER;
+ 
+             Objects.requireNonNull(logger);
+@@ -817,7 +850,7 @@
+         }
+ 
+         if (nbt.contains("current_explosion_impact_pos", 9)) {
+-            DataResult dataresult1 = Vec3.CODEC.parse(NbtOps.INSTANCE, nbt.get("current_explosion_impact_pos"));
++            DataResult<Vec3> dataresult1 = Vec3.CODEC.parse(NbtOps.INSTANCE, nbt.get("current_explosion_impact_pos")); // CraftBukkit - decompile error
+             Logger logger1 = Player.LOGGER;
+ 
+             Objects.requireNonNull(logger1);
+@@ -854,7 +887,7 @@
+         }
+ 
+         this.getLastDeathLocation().flatMap((globalpos) -> {
+-            DataResult dataresult = GlobalPos.CODEC.encodeStart(NbtOps.INSTANCE, globalpos);
++            DataResult<Tag> dataresult = GlobalPos.CODEC.encodeStart(NbtOps.INSTANCE, globalpos); // CraftBukkit - decompile error
+             Logger logger = Player.LOGGER;
+ 
+             Objects.requireNonNull(logger);
+@@ -886,10 +919,10 @@
+             if (this.isDeadOrDying()) {
+                 return false;
+             } else {
+-                this.removeEntitiesOnShoulder();
++                // this.removeEntitiesOnShoulder(); // CraftBukkit - moved down
+                 if (source.scalesWithDifficulty()) {
+                     if (world.getDifficulty() == Difficulty.PEACEFUL) {
+-                        amount = 0.0F;
++                        return false; // CraftBukkit - f = 0.0f -> return false
+                     }
+ 
+                     if (world.getDifficulty() == Difficulty.EASY) {
+@@ -901,7 +934,13 @@
+                     }
+                 }
+ 
+-                return amount == 0.0F ? false : super.hurtServer(world, source, amount);
++                // CraftBukkit start - Don't filter out 0 damage
++                boolean damaged = super.hurtServer(world, source, amount);
++                if (damaged) {
++                    this.removeEntitiesOnShoulder();
++                }
++                return damaged;
++                // CraftBukkit end
+             }
+         }
+     }
+@@ -923,10 +962,29 @@
+     }
+ 
+     public boolean canHarmPlayer(Player player) {
+-        PlayerTeam scoreboardteam = this.getTeam();
+-        PlayerTeam scoreboardteam1 = player.getTeam();
++        // CraftBukkit start - Change to check OTHER player's scoreboard team according to API
++        // To summarize this method's logic, it's "Can parameter hurt this"
++        org.bukkit.scoreboard.Team team;
++        if (player instanceof ServerPlayer) {
++            ServerPlayer thatPlayer = (ServerPlayer) player;
++            team = thatPlayer.getBukkitEntity().getScoreboard().getPlayerTeam(thatPlayer.getBukkitEntity());
++            if (team == null || team.allowFriendlyFire()) {
++                return true;
++            }
++        } else {
++            // This should never be called, but is implemented anyway
++            org.bukkit.OfflinePlayer thisPlayer = player.level().getCraftServer().getOfflinePlayer(player.getScoreboardName());
++            team = player.level().getCraftServer().getScoreboardManager().getMainScoreboard().getPlayerTeam(thisPlayer);
++            if (team == null || team.allowFriendlyFire()) {
++                return true;
++            }
++        }
+ 
+-        return scoreboardteam == null ? true : (!scoreboardteam.isAlliedTo(scoreboardteam1) ? true : scoreboardteam.isAllowFriendlyFire());
++        if (this instanceof ServerPlayer) {
++            return !team.hasPlayer(((ServerPlayer) this).getBukkitEntity());
++        }
++        return !team.hasPlayer(this.level().getCraftServer().getOfflinePlayer(this.getScoreboardName()));
++        // CraftBukkit end
+     }
+ 
+     @Override
+@@ -966,32 +1024,38 @@
+         }
+     }
+ 
++    // CraftBukkit start
+     @Override
+-    protected void actuallyHurt(ServerLevel world, DamageSource source, float amount) {
+-        if (!this.isInvulnerableTo(world, source)) {
+-            amount = this.getDamageAfterArmorAbsorb(source, amount);
+-            amount = this.getDamageAfterMagicAbsorb(source, amount);
+-            float f1 = amount;
++    protected boolean actuallyHurt(ServerLevel worldserver, DamageSource damagesource, float f, EntityDamageEvent event) { // void -> boolean
++        if (true) {
++            return super.actuallyHurt(worldserver, damagesource, f, event);
++        }
++        // CraftBukkit end
++        if (!this.isInvulnerableTo(worldserver, damagesource)) {
++            f = this.getDamageAfterArmorAbsorb(damagesource, f);
++            f = this.getDamageAfterMagicAbsorb(damagesource, f);
++            float f1 = f;
+ 
+-            amount = Math.max(amount - this.getAbsorptionAmount(), 0.0F);
+-            this.setAbsorptionAmount(this.getAbsorptionAmount() - (f1 - amount));
+-            float f2 = f1 - amount;
++            f = Math.max(f - this.getAbsorptionAmount(), 0.0F);
++            this.setAbsorptionAmount(this.getAbsorptionAmount() - (f1 - f));
++            float f2 = f1 - f;
+ 
+             if (f2 > 0.0F && f2 < 3.4028235E37F) {
+                 this.awardStat(Stats.DAMAGE_ABSORBED, Math.round(f2 * 10.0F));
+             }
+ 
+-            if (amount != 0.0F) {
+-                this.causeFoodExhaustion(source.getFoodExhaustion());
+-                this.getCombatTracker().recordDamage(source, amount);
+-                this.setHealth(this.getHealth() - amount);
+-                if (amount < 3.4028235E37F) {
+-                    this.awardStat(Stats.DAMAGE_TAKEN, Math.round(amount * 10.0F));
++            if (f != 0.0F) {
++                this.causeFoodExhaustion(damagesource.getFoodExhaustion(), EntityExhaustionEvent.ExhaustionReason.DAMAGED); // CraftBukkit - EntityExhaustionEvent
++                this.getCombatTracker().recordDamage(damagesource, f);
++                this.setHealth(this.getHealth() - f);
++                if (f < 3.4028235E37F) {
++                    this.awardStat(Stats.DAMAGE_TAKEN, Math.round(f * 10.0F));
+                 }
+ 
+                 this.gameEvent(GameEvent.ENTITY_DAMAGE);
+             }
+         }
++        return false; // CraftBukkit
+     }
+ 
+     public boolean isTextFilteringEnabled() {
+@@ -1144,10 +1208,15 @@
+ 
+                 f *= 0.2F + f2 * f2 * 0.8F;
+                 f1 *= f2;
+-                this.resetAttackStrengthTicker();
++                // this.resetAttackStrengthTicker(); // CraftBukkit - Moved to EntityLiving to reset the cooldown after the damage is dealt
+                 if (target.getType().is(EntityTypeTags.REDIRECTABLE_PROJECTILE) && target instanceof Projectile) {
+                     Projectile iprojectile = (Projectile) target;
+ 
++                    // CraftBukkit start
++                    if (CraftEventFactory.handleNonLivingEntityDamageEvent(target, damagesource, f1, false)) {
++                        return;
++                    }
++                    // CraftBukkit end
+                     if (iprojectile.deflect(ProjectileDeflection.AIM_DEFLECT, this, this, true)) {
+                         this.level().playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_NODAMAGE, this.getSoundSource());
+                         return;
+@@ -1223,8 +1292,13 @@
+                                 if (entityliving2 != this && entityliving2 != target && !this.isAlliedTo((Entity) entityliving2) && (!(entityliving2 instanceof ArmorStand) || !((ArmorStand) entityliving2).isMarker()) && this.distanceToSqr((Entity) entityliving2) < 9.0D) {
+                                     float f7 = this.getEnchantedDamage(entityliving2, f6, damagesource) * f2;
+ 
++                                    // CraftBukkit start - Only apply knockback if the damage hits
++                                    if (!entityliving2.hurtServer((ServerLevel) this.level(), this.damageSources().playerAttack(this).sweep(), f7)) {
++                                        continue;
++                                    }
++                                    // CraftBukkit end
+                                     entityliving2.knockback(0.4000000059604645D, (double) Mth.sin(this.getYRot() * 0.017453292F), (double) (-Mth.cos(this.getYRot() * 0.017453292F)));
+-                                    entityliving2.hurt(damagesource, f7);
++                                    // entityliving2.hurt(damagesource, f7); // CraftBukkit - moved up
+                                     Level world = this.level();
+ 
+                                     if (world instanceof ServerLevel) {
+@@ -1240,9 +1314,26 @@
+                         }
+ 
+                         if (target instanceof ServerPlayer && target.hurtMarked) {
++                            // CraftBukkit start - Add Velocity Event
++                            boolean cancelled = false;
++                            org.bukkit.entity.Player player = (org.bukkit.entity.Player) target.getBukkitEntity();
++                            org.bukkit.util.Vector velocity = CraftVector.toBukkit(vec3d);
++
++                            PlayerVelocityEvent event = new PlayerVelocityEvent(player, velocity.clone());
++                            this.level().getCraftServer().getPluginManager().callEvent(event);
++
++                            if (event.isCancelled()) {
++                                cancelled = true;
++                            } else if (!velocity.equals(event.getVelocity())) {
++                                player.setVelocity(event.getVelocity());
++                            }
++
++                            if (!cancelled) {
+                             ((ServerPlayer) target).connection.send(new ClientboundSetEntityMotionPacket(target));
+                             target.hurtMarked = false;
+                             target.setDeltaMovement(vec3d);
++                            }
++                            // CraftBukkit end
+                         }
+ 
+                         if (flag2) {
+@@ -1308,9 +1399,14 @@
+                             }
+                         }
+ 
+-                        this.causeFoodExhaustion(0.1F);
++                        this.causeFoodExhaustion(0.1F, EntityExhaustionEvent.ExhaustionReason.ATTACK); // CraftBukkit - EntityExhaustionEvent
+                     } else {
+                         this.level().playSound((Player) null, this.getX(), this.getY(), this.getZ(), SoundEvents.PLAYER_ATTACK_NODAMAGE, this.getSoundSource(), 1.0F, 1.0F);
++                        // CraftBukkit start - resync on cancelled event
++                        if (this instanceof ServerPlayer) {
++                            ((ServerPlayer) this).getBukkitEntity().updateInventory();
++                        }
++                        // CraftBukkit end
+                     }
+                 }
+ 
+@@ -1351,7 +1447,14 @@
+ 
+     @Override
+     public void remove(Entity.RemovalReason reason) {
+-        super.remove(reason);
++        // CraftBukkit start - add Bukkit remove cause
++        this.remove(reason, null);
++    }
++
++    @Override
++    public void remove(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) {
++        super.remove(entity_removalreason, cause);
++        // CraftBukkit end
+         this.inventoryMenu.removed(this);
+         if (this.containerMenu != null && this.hasContainerOpen()) {
+             this.doCloseContainer();
+@@ -1391,7 +1494,13 @@
+     }
+ 
+     public Either<Player.BedSleepingProblem, Unit> startSleepInBed(BlockPos pos) {
+-        this.startSleeping(pos);
++        // CraftBukkit start
++        return this.startSleepInBed(pos, false);
++    }
++
++    public Either<Player.BedSleepingProblem, Unit> startSleepInBed(BlockPos blockposition, boolean force) {
++        // CraftBukkit end
++        this.startSleeping(blockposition);
+         this.sleepCounter = 0;
+         return Either.right(Unit.INSTANCE);
+     }
+@@ -1545,12 +1654,24 @@
+     }
+ 
+     public void startFallFlying() {
+-        this.setSharedFlag(7, true);
++        // CraftBukkit start
++        if (!org.bukkit.craftbukkit.event.CraftEventFactory.callToggleGlideEvent(this, true).isCancelled()) {
++            this.setSharedFlag(7, true);
++        } else {
++            // SPIGOT-5542: must toggle like below
++            this.setSharedFlag(7, true);
++            this.setSharedFlag(7, false);
++        }
++        // CraftBukkit end
+     }
+ 
+     public void stopFallFlying() {
++        // CraftBukkit start
++        if (!org.bukkit.craftbukkit.event.CraftEventFactory.callToggleGlideEvent(this, false).isCancelled()) {
+         this.setSharedFlag(7, true);
+         this.setSharedFlag(7, false);
++        }
++        // CraftBukkit end
+     }
+ 
+     @Override
+@@ -1665,10 +1786,21 @@
+         return this.experienceLevel >= 30 ? 112 + (this.experienceLevel - 30) * 9 : (this.experienceLevel >= 15 ? 37 + (this.experienceLevel - 15) * 5 : 7 + this.experienceLevel * 2);
+     }
+ 
++    // CraftBukkit start
+     public void causeFoodExhaustion(float exhaustion) {
++        this.causeFoodExhaustion(exhaustion, EntityExhaustionEvent.ExhaustionReason.UNKNOWN);
++    }
++
++    public void causeFoodExhaustion(float f, EntityExhaustionEvent.ExhaustionReason reason) {
++        // CraftBukkit end
+         if (!this.abilities.invulnerable) {
+             if (!this.level().isClientSide) {
+-                this.foodData.addExhaustion(exhaustion);
++                // CraftBukkit start
++                EntityExhaustionEvent event = CraftEventFactory.callPlayerExhaustionEvent(this, reason, f);
++                if (!event.isCancelled()) {
++                    this.foodData.addExhaustion(event.getExhaustion());
++                }
++                // CraftBukkit end
+             }
+ 
+         }
+@@ -1748,13 +1880,20 @@
+ 
+     @Override
+     public void setItemSlot(EquipmentSlot slot, ItemStack stack) {
+-        this.verifyEquippedItem(stack);
+-        if (slot == EquipmentSlot.MAINHAND) {
+-            this.onEquipItem(slot, (ItemStack) this.inventory.items.set(this.inventory.selected, stack), stack);
+-        } else if (slot == EquipmentSlot.OFFHAND) {
+-            this.onEquipItem(slot, (ItemStack) this.inventory.offhand.set(0, stack), stack);
+-        } else if (slot.getType() == EquipmentSlot.Type.HUMANOID_ARMOR) {
+-            this.onEquipItem(slot, (ItemStack) this.inventory.armor.set(slot.getIndex(), stack), stack);
++        // CraftBukkit start
++        this.setItemSlot(slot, stack, false);
++    }
++
++    @Override
++    public void setItemSlot(EquipmentSlot enumitemslot, ItemStack itemstack, boolean silent) {
++        // CraftBukkit end
++        this.verifyEquippedItem(itemstack);
++        if (enumitemslot == EquipmentSlot.MAINHAND) {
++            this.onEquipItem(enumitemslot, (ItemStack) this.inventory.items.set(this.inventory.selected, itemstack), itemstack, silent); // CraftBukkit
++        } else if (enumitemslot == EquipmentSlot.OFFHAND) {
++            this.onEquipItem(enumitemslot, (ItemStack) this.inventory.offhand.set(0, itemstack), itemstack, silent); // CraftBukkit
++        } else if (enumitemslot.getType() == EquipmentSlot.Type.HUMANOID_ARMOR) {
++            this.onEquipItem(enumitemslot, (ItemStack) this.inventory.armor.set(enumitemslot.getIndex(), itemstack), itemstack, silent); // CraftBukkit
+         }
+ 
+     }
+@@ -1798,26 +1937,31 @@
+ 
+     public void removeEntitiesOnShoulder() {
+         if (this.timeEntitySatOnShoulder + 20L < this.level().getGameTime()) {
+-            this.respawnEntityOnShoulder(this.getShoulderEntityLeft());
+-            this.setShoulderEntityLeft(new CompoundTag());
+-            this.respawnEntityOnShoulder(this.getShoulderEntityRight());
+-            this.setShoulderEntityRight(new CompoundTag());
++            // CraftBukkit start
++            if (this.respawnEntityOnShoulder(this.getShoulderEntityLeft())) {
++                this.setShoulderEntityLeft(new CompoundTag());
++            }
++            if (this.respawnEntityOnShoulder(this.getShoulderEntityRight())) {
++                this.setShoulderEntityRight(new CompoundTag());
++            }
++            // CraftBukkit end
+         }
+ 
+     }
+ 
+-    private void respawnEntityOnShoulder(CompoundTag entityNbt) {
+-        if (!this.level().isClientSide && !entityNbt.isEmpty()) {
+-            EntityType.create(entityNbt, this.level(), EntitySpawnReason.LOAD).ifPresent((entity) -> {
++    private boolean respawnEntityOnShoulder(CompoundTag nbttagcompound) { // CraftBukkit void->boolean
++        if (!this.level().isClientSide && !nbttagcompound.isEmpty()) {
++            return EntityType.create(nbttagcompound, this.level(), EntitySpawnReason.LOAD).map((entity) -> { // CraftBukkit
+                 if (entity instanceof TamableAnimal) {
+                     ((TamableAnimal) entity).setOwnerUUID(this.uuid);
+                 }
+ 
+                 entity.setPos(this.getX(), this.getY() + 0.699999988079071D, this.getZ());
+-                ((ServerLevel) this.level()).addWithUUID(entity);
+-            });
++                return ((ServerLevel) this.level()).addWithUUID(entity, CreatureSpawnEvent.SpawnReason.SHOULDER_ENTITY); // CraftBukkit
++            }).orElse(true); // CraftBukkit
+         }
+ 
++        return true; // CraftBukkit
+     }
+ 
+     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityArrow.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/AbstractArrow.java.patch
similarity index 57%
rename from paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityArrow.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/projectile/AbstractArrow.java.patch
index a63d42d3bc..283001e049 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityArrow.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/AbstractArrow.java.patch
@@ -1,55 +1,85 @@
---- a/net/minecraft/world/entity/projectile/EntityArrow.java
-+++ b/net/minecraft/world/entity/projectile/EntityArrow.java
-@@ -51,6 +51,13 @@
- import net.minecraft.world.phys.Vec3D;
+--- a/net/minecraft/world/entity/projectile/AbstractArrow.java
++++ b/net/minecraft/world/entity/projectile/AbstractArrow.java
+@@ -36,6 +36,7 @@
+ import net.minecraft.world.entity.OminousItemSpawner;
+ import net.minecraft.world.entity.SlotAccess;
+ import net.minecraft.world.entity.ai.attributes.Attributes;
++import net.minecraft.world.entity.item.ItemEntity;
+ import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.item.Item;
+ import net.minecraft.world.item.ItemStack;
+@@ -50,6 +51,10 @@
+ import net.minecraft.world.phys.HitResult;
+ import net.minecraft.world.phys.Vec3;
  import net.minecraft.world.phys.shapes.VoxelShape;
- 
-+// CraftBukkit start
-+import net.minecraft.world.entity.item.EntityItem;
 +import org.bukkit.event.entity.EntityCombustByEntityEvent;
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +import org.bukkit.event.player.PlayerPickupArrowEvent;
 +// CraftBukkit end
-+
- public abstract class EntityArrow extends IProjectile {
  
-     private static final double ARROW_BASE_DAMAGE = 2.0D;
-@@ -88,7 +95,14 @@
+ public abstract class AbstractArrow extends Projectile {
+ 
+@@ -88,23 +93,30 @@
      }
  
-     protected EntityArrow(EntityTypes<? extends EntityArrow> entitytypes, double d0, double d1, double d2, World world, ItemStack itemstack, @Nullable ItemStack itemstack1) {
+     protected AbstractArrow(EntityType<? extends AbstractArrow> type, double x, double y, double z, Level world, ItemStack stack, @Nullable ItemStack weapon) {
+-        this(type, world);
+-        this.pickupItemStack = stack.copy();
+-        this.setCustomName((Component) stack.get(DataComponents.CUSTOM_NAME));
+-        Unit unit = (Unit) stack.remove(DataComponents.INTANGIBLE_PROJECTILE);
 +        // CraftBukkit start - handle the owner before the rest of things
-+        this(entitytypes, d0, d1, d2, world, itemstack, itemstack1, null);
++        this(type, x, y, z, world, stack, weapon, null);
 +    }
-+
-+    protected EntityArrow(EntityTypes<? extends EntityArrow> entitytypes, double d0, double d1, double d2, World world, ItemStack itemstack, @Nullable ItemStack itemstack1, @Nullable EntityLiving ownerEntity) {
-         this(entitytypes, world);
+ 
++    protected AbstractArrow(EntityType<? extends AbstractArrow> entitytypes, double d0, double d1, double d2, Level world, ItemStack itemstack, @Nullable ItemStack itemstack1, @Nullable LivingEntity ownerEntity) {
++        this(entitytypes, world);
 +        this.setOwner(ownerEntity);
 +        // CraftBukkit end
-         this.pickupItemStack = itemstack.copy();
-         this.setCustomName((IChatBaseComponent) itemstack.get(DataComponents.CUSTOM_NAME));
-         Unit unit = (Unit) itemstack.remove(DataComponents.INTANGIBLE_PROJECTILE);
-@@ -114,8 +128,8 @@
++        this.pickupItemStack = itemstack.copy();
++        this.setCustomName((Component) itemstack.get(DataComponents.CUSTOM_NAME));
++        Unit unit = (Unit) itemstack.remove(DataComponents.INTANGIBLE_PROJECTILE);
++
+         if (unit != null) {
+             this.pickup = AbstractArrow.Pickup.CREATIVE_ONLY;
+         }
+ 
+-        this.setPos(x, y, z);
+-        if (weapon != null && world instanceof ServerLevel worldserver) {
+-            if (weapon.isEmpty()) {
++        this.setPos(d0, d1, d2);
++        if (itemstack1 != null && world instanceof ServerLevel worldserver) {
++            if (itemstack1.isEmpty()) {
+                 throw new IllegalArgumentException("Invalid weapon firing an arrow");
+             }
+ 
+-            this.firedFromWeapon = weapon.copy();
+-            int i = EnchantmentHelper.getPiercingCount(worldserver, weapon, this.pickupItemStack);
++            this.firedFromWeapon = itemstack1.copy();
++            int i = EnchantmentHelper.getPiercingCount(worldserver, itemstack1, this.pickupItemStack);
+ 
+             if (i > 0) {
+                 this.setPierceLevel((byte) i);
+@@ -114,8 +126,8 @@
      }
  
-     protected EntityArrow(EntityTypes<? extends EntityArrow> entitytypes, EntityLiving entityliving, World world, ItemStack itemstack, @Nullable ItemStack itemstack1) {
--        this(entitytypes, entityliving.getX(), entityliving.getEyeY() - 0.10000000149011612D, entityliving.getZ(), world, itemstack, itemstack1);
--        this.setOwner(entityliving);
-+        this(entitytypes, entityliving.getX(), entityliving.getEyeY() - 0.10000000149011612D, entityliving.getZ(), world, itemstack, itemstack1, entityliving); // CraftBukkit
+     protected AbstractArrow(EntityType<? extends AbstractArrow> type, LivingEntity owner, Level world, ItemStack stack, @Nullable ItemStack shotFrom) {
+-        this(type, owner.getX(), owner.getEyeY() - 0.10000000149011612D, owner.getZ(), world, stack, shotFrom);
+-        this.setOwner(owner);
++        this(type, owner.getX(), owner.getEyeY() - 0.10000000149011612D, owner.getZ(), world, stack, shotFrom, owner); // CraftBukkit
 +        // this.setOwner(entityliving); // SPIGOT-7744 - Moved to the above constructor
      }
  
-     public void setSoundEvent(SoundEffect soundeffect) {
-@@ -282,7 +296,7 @@
+     public void setSoundEvent(SoundEvent sound) {
+@@ -282,7 +294,7 @@
  
                  if (movingobjectpositionentity == null) {
-                     if (this.isAlive() && movingobjectpositionblock.getType() != MovingObjectPosition.EnumMovingObjectType.MISS) {
--                        this.hitTargetOrDeflectSelf(movingobjectpositionblock);
-+                        this.preHitTargetOrDeflectSelf(movingobjectpositionblock); // CraftBukkit - projectile hit event
+                     if (this.isAlive() && blockHitResult.getType() != HitResult.Type.MISS) {
+-                        this.hitTargetOrDeflectSelf(blockHitResult);
++                        this.preHitTargetOrDeflectSelf(blockHitResult); // CraftBukkit - projectile hit event
                          this.hasImpulse = true;
                      }
                  } else {
-@@ -290,7 +304,7 @@
+@@ -290,7 +302,7 @@
                          continue;
                      }
  
@@ -58,7 +88,7 @@
  
                      this.hasImpulse = true;
                      if (this.getPierceLevel() > 0 && projectiledeflection == ProjectileDeflection.NONE) {
-@@ -357,7 +371,7 @@
+@@ -357,7 +369,7 @@
      protected void tickDespawn() {
          ++this.life;
          if (this.life >= 1200) {
@@ -67,7 +97,7 @@
          }
  
      }
-@@ -423,7 +437,7 @@
+@@ -423,7 +435,7 @@
              }
  
              if (this.piercingIgnoreEntityIds.size() >= this.getPierceLevel() + 1) {
@@ -76,7 +106,7 @@
                  return;
              }
  
-@@ -444,7 +458,13 @@
+@@ -444,7 +456,13 @@
          int k = entity.getRemainingFireTicks();
  
          if (this.isOnFire() && !flag) {
@@ -91,7 +121,7 @@
          }
  
          if (entity.hurtOrSimulate(damagesource, (float) i)) {
-@@ -490,7 +510,7 @@
+@@ -490,7 +508,7 @@
  
              this.playSound(this.soundEvent, 1.0F, 1.2F / (this.random.nextFloat() * 0.2F + 0.9F));
              if (this.getPierceLevel() <= 0) {
@@ -100,7 +130,7 @@
              }
          } else {
              entity.setRemainingFireTicks(k);
-@@ -506,7 +526,7 @@
+@@ -506,7 +524,7 @@
                          this.spawnAtLocation(worldserver2, this.getPickupItem(), 0.1F);
                      }
  
@@ -109,16 +139,16 @@
                  }
              }
          }
-@@ -675,7 +695,7 @@
+@@ -675,7 +693,7 @@
          }
  
-         if (nbttagcompound.contains("weapon", 10)) {
--            this.firedFromWeapon = (ItemStack) ItemStack.parse(this.registryAccess(), nbttagcompound.getCompound("weapon")).orElse((Object) null);
-+            this.firedFromWeapon = (ItemStack) ItemStack.parse(this.registryAccess(), nbttagcompound.getCompound("weapon")).orElse(null); // CraftBukkit - decompile error
+         if (nbt.contains("weapon", 10)) {
+-            this.firedFromWeapon = (ItemStack) ItemStack.parse(this.registryAccess(), nbt.getCompound("weapon")).orElse((Object) null);
++            this.firedFromWeapon = (ItemStack) ItemStack.parse(this.registryAccess(), nbt.getCompound("weapon")).orElse(null); // CraftBukkit - decompile error
          } else {
              this.firedFromWeapon = null;
          }
-@@ -688,34 +708,31 @@
+@@ -688,34 +706,31 @@
          Entity entity1 = entity;
          byte b0 = 0;
  
@@ -165,16 +195,16 @@
          }
  
          this.pickup = entityarrow_pickupstatus;
-@@ -724,9 +741,24 @@
+@@ -724,9 +739,24 @@
      @Override
-     public void playerTouch(EntityHuman entityhuman) {
+     public void playerTouch(Player player) {
          if (!this.level().isClientSide && (this.isInGround() || this.isNoPhysics()) && this.shakeTime <= 0) {
--            if (this.tryPickup(entityhuman)) {
+-            if (this.tryPickup(player)) {
 +            // CraftBukkit start
 +            ItemStack itemstack = this.getPickupItem();
-+            if (this.pickup == PickupStatus.ALLOWED && !itemstack.isEmpty() && entityhuman.getInventory().canHold(itemstack) > 0) {
-+                EntityItem item = new EntityItem(this.level(), this.getX(), this.getY(), this.getZ(), itemstack);
-+                PlayerPickupArrowEvent event = new PlayerPickupArrowEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), new org.bukkit.craftbukkit.entity.CraftItem(this.level().getCraftServer(), item), (org.bukkit.entity.AbstractArrow) this.getBukkitEntity());
++            if (this.pickup == Pickup.ALLOWED && !itemstack.isEmpty() && player.getInventory().canHold(itemstack) > 0) {
++                ItemEntity item = new ItemEntity(this.level(), this.getX(), this.getY(), this.getZ(), itemstack);
++                PlayerPickupArrowEvent event = new PlayerPickupArrowEvent((org.bukkit.entity.Player) player.getBukkitEntity(), new org.bukkit.craftbukkit.entity.CraftItem(this.level().getCraftServer(), item), (org.bukkit.entity.AbstractArrow) this.getBukkitEntity());
 +                // event.setCancelled(!entityhuman.canPickUpLoot); TODO
 +                this.level().getCraftServer().getPluginManager().callEvent(event);
 +
@@ -184,9 +214,9 @@
 +                itemstack = item.getItem();
 +            }
 +
-+            if ((this.pickup == EntityArrow.PickupStatus.ALLOWED && entityhuman.getInventory().add(itemstack)) || (this.pickup == EntityArrow.PickupStatus.CREATIVE_ONLY && entityhuman.getAbilities().instabuild)) {
++            if ((this.pickup == AbstractArrow.Pickup.ALLOWED && player.getInventory().add(itemstack)) || (this.pickup == AbstractArrow.Pickup.CREATIVE_ONLY && player.getAbilities().instabuild)) {
 +                // CraftBukkit end
-                 entityhuman.take(this, 1);
+                 player.take(this, 1);
 -                this.discard();
 +                this.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
              }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityFireball.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java.patch
similarity index 54%
rename from paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityFireball.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java.patch
index 3be5bee50f..b53dd9f069 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityFireball.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java.patch
@@ -1,14 +1,14 @@
---- a/net/minecraft/world/entity/projectile/EntityFireball.java
-+++ b/net/minecraft/world/entity/projectile/EntityFireball.java
-@@ -15,11 +15,17 @@
- import net.minecraft.world.phys.MovingObjectPosition;
- import net.minecraft.world.phys.Vec3D;
- 
+--- a/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java
++++ b/net/minecraft/world/entity/projectile/AbstractHurtingProjectile.java
+@@ -14,12 +14,17 @@
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.phys.HitResult;
+ import net.minecraft.world.phys.Vec3;
 +// CraftBukkit start
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +// CraftBukkit end
-+
- public abstract class EntityFireball extends IProjectile {
+ 
+ public abstract class AbstractHurtingProjectile extends Projectile {
  
      public static final double INITAL_ACCELERATION_POWER = 0.1D;
      public static final double DEFLECTION_SCALE = 0.5D;
@@ -16,21 +16,21 @@
 +    public float bukkitYield = 1; // CraftBukkit
 +    public boolean isIncendiary = true; // CraftBukkit
  
-     protected EntityFireball(EntityTypes<? extends EntityFireball> entitytypes, World world) {
-         super(entitytypes, world);
-@@ -69,7 +75,7 @@
+     protected AbstractHurtingProjectile(EntityType<? extends AbstractHurtingProjectile> type, Level world) {
+         super(type, world);
+@@ -69,7 +74,7 @@
  
          this.applyInertia();
          if (!this.level().isClientSide && (entity != null && entity.isRemoved() || !this.level().hasChunkAt(this.blockPosition()))) {
 -            this.discard();
 +            this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
          } else {
-             MovingObjectPosition movingobjectposition = ProjectileHelper.getHitResultOnMoveVector(this, this::canHitEntity, this.getClipType());
-             Vec3D vec3d;
-@@ -89,7 +95,7 @@
+             HitResult movingobjectposition = ProjectileUtil.getHitResultOnMoveVector(this, this::canHitEntity, this.getClipType());
+             Vec3 vec3d;
+@@ -89,7 +94,7 @@
              }
  
-             if (movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS && this.isAlive()) {
+             if (movingobjectposition.getType() != HitResult.Type.MISS && this.isAlive()) {
 -                this.hitTargetOrDeflectSelf(movingobjectposition);
 +                this.preHitTargetOrDeflectSelf(movingobjectposition); // CraftBukkit - projectile hit event
              }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/Arrow.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/Arrow.java.patch
new file mode 100644
index 0000000000..c19bed3b4d
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/Arrow.java.patch
@@ -0,0 +1,20 @@
+--- a/net/minecraft/world/entity/projectile/Arrow.java
++++ b/net/minecraft/world/entity/projectile/Arrow.java
+@@ -119,7 +119,7 @@
+                 mobeffect = (MobEffectInstance) iterator.next();
+                 target.addEffect(new MobEffectInstance(mobeffect.getEffect(), Math.max(mobeffect.mapDuration((i) -> {
+                     return i / 8;
+-                }), 1), mobeffect.getAmplifier(), mobeffect.isAmbient(), mobeffect.isVisible()), entity);
++                }), 1), mobeffect.getAmplifier(), mobeffect.isAmbient(), mobeffect.isVisible()), entity, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ARROW); // CraftBukkit
+             }
+         }
+ 
+@@ -127,7 +127,7 @@
+ 
+         while (iterator.hasNext()) {
+             mobeffect = (MobEffectInstance) iterator.next();
+-            target.addEffect(mobeffect, entity);
++            target.addEffect(mobeffect, entity, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ARROW); // CraftBukkit
+         }
+ 
+     }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityDragonFireball.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/DragonFireball.java.patch
similarity index 52%
rename from paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityDragonFireball.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/projectile/DragonFireball.java.patch
index 806f5d1e16..fcda283001 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityDragonFireball.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/DragonFireball.java.patch
@@ -1,17 +1,16 @@
---- a/net/minecraft/world/entity/projectile/EntityDragonFireball.java
-+++ b/net/minecraft/world/entity/projectile/EntityDragonFireball.java
-@@ -15,6 +15,10 @@
- import net.minecraft.world.phys.MovingObjectPositionEntity;
- import net.minecraft.world.phys.Vec3D;
- 
+--- a/net/minecraft/world/entity/projectile/DragonFireball.java
++++ b/net/minecraft/world/entity/projectile/DragonFireball.java
+@@ -14,6 +14,9 @@
+ import net.minecraft.world.phys.EntityHitResult;
+ import net.minecraft.world.phys.HitResult;
+ import net.minecraft.world.phys.Vec3;
 +// CraftBukkit start
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +// CraftBukkit end
-+
- public class EntityDragonFireball extends EntityFireball {
  
-     public static final float SPLASH_RANGE = 4.0F;
-@@ -61,7 +65,7 @@
+ public class DragonFireball extends AbstractHurtingProjectile {
+ 
+@@ -61,7 +64,7 @@
  
                  this.level().levelEvent(2006, this.blockPosition(), this.isSilent() ? -1 : 1);
                  this.level().addFreshEntity(entityareaeffectcloud);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityEvokerFangs.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityEvokerFangs.patch
deleted file mode 100644
index fbf2bafb58..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityEvokerFangs.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- a/net/minecraft/world/entity/projectile/EntityEvokerFangs.java
-+++ b/net/minecraft/world/entity/projectile/EntityEvokerFangs.java
-@@ -17,6 +17,10 @@
- import net.minecraft.world.item.enchantment.EnchantmentManager;
- import net.minecraft.world.level.World;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+// CraftBukkit end
-+
- public class EntityEvokerFangs extends Entity implements TraceableEntity {
- 
-     public static final int ATTACK_DURATION = 20;
-@@ -121,7 +125,7 @@
-             }
- 
-             if (--this.lifeTicks < 0) {
--                this.discard();
-+                this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
-             }
-         }
- 
-@@ -132,7 +136,7 @@
- 
-         if (entityliving.isAlive() && !entityliving.isInvulnerable() && entityliving != entityliving1) {
-             if (entityliving1 == null) {
--                entityliving.hurt(this.damageSources().magic(), 6.0F);
-+                entityliving.hurt(this.damageSources().magic().customEntityDamager(this), 6.0F); // CraftBukkit
-             } else {
-                 if (entityliving1.isAlliedTo((Entity) entityliving)) {
-                     return;
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityFireballFireball.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityFireballFireball.patch
deleted file mode 100644
index 0c681a09f5..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityFireballFireball.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/net/minecraft/world/entity/projectile/EntityFireballFireball.java
-+++ b/net/minecraft/world/entity/projectile/EntityFireballFireball.java
-@@ -61,7 +61,12 @@
-     public void readAdditionalSaveData(NBTTagCompound nbttagcompound) {
-         super.readAdditionalSaveData(nbttagcompound);
-         if (nbttagcompound.contains("Item", 10)) {
--            this.setItem((ItemStack) ItemStack.parse(this.registryAccess(), nbttagcompound.getCompound("Item")).orElse(this.getDefaultItem()));
-+            // CraftBukkit start - SPIGOT-5474 probably came from bugged earlier versions
-+            ItemStack itemstack = (ItemStack) ItemStack.parse(this.registryAccess(), nbttagcompound.getCompound("Item")).orElse(this.getDefaultItem());
-+            if (!itemstack.isEmpty()) {
-+                this.setItem(itemstack);
-+            }
-+            // CraftBukkit end
-         } else {
-             this.setItem(this.getDefaultItem());
-         }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityLargeFireball.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityLargeFireball.patch
deleted file mode 100644
index abd100daf3..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityLargeFireball.patch
+++ /dev/null
@@ -1,56 +0,0 @@
---- a/net/minecraft/world/entity/projectile/EntityLargeFireball.java
-+++ b/net/minecraft/world/entity/projectile/EntityLargeFireball.java
-@@ -13,17 +13,24 @@
- import net.minecraft.world.phys.MovingObjectPositionEntity;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+import org.bukkit.event.entity.ExplosionPrimeEvent;
-+// CraftBukkit end
-+
- public class EntityLargeFireball extends EntityFireballFireball {
- 
-     public int explosionPower = 1;
- 
-     public EntityLargeFireball(EntityTypes<? extends EntityLargeFireball> entitytypes, World world) {
-         super(entitytypes, world);
-+        isIncendiary = (world instanceof WorldServer worldserver) && worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING); // CraftBukkit
-     }
- 
-     public EntityLargeFireball(World world, EntityLiving entityliving, Vec3D vec3d, int i) {
-         super(EntityTypes.FIREBALL, entityliving, vec3d, world);
-         this.explosionPower = i;
-+        isIncendiary = (world instanceof WorldServer worldserver) && worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING); // CraftBukkit
-     }
- 
-     @Override
-@@ -34,8 +41,16 @@
-         if (world instanceof WorldServer worldserver) {
-             boolean flag = worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING);
- 
--            this.level().explode(this, this.getX(), this.getY(), this.getZ(), (float) this.explosionPower, flag, World.a.MOB);
--            this.discard();
-+            // CraftBukkit start - fire ExplosionPrimeEvent
-+            ExplosionPrimeEvent event = new ExplosionPrimeEvent((org.bukkit.entity.Explosive) this.getBukkitEntity());
-+            this.level().getCraftServer().getPluginManager().callEvent(event);
-+
-+            if (!event.isCancelled()) {
-+                // give 'this' instead of (Entity) null so we know what causes the damage
-+                this.level().explode(this, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), World.a.MOB);
-+            }
-+            // CraftBukkit end
-+            this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
-         }
- 
-     }
-@@ -65,7 +80,8 @@
-     public void readAdditionalSaveData(NBTTagCompound nbttagcompound) {
-         super.readAdditionalSaveData(nbttagcompound);
-         if (nbttagcompound.contains("ExplosionPower", 99)) {
--            this.explosionPower = nbttagcompound.getByte("ExplosionPower");
-+            // CraftBukkit - set bukkitYield when setting explosionpower
-+            bukkitYield = this.explosionPower = nbttagcompound.getByte("ExplosionPower");
-         }
- 
-     }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityPotion.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityPotion.patch
deleted file mode 100644
index fce143ac0b..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityPotion.patch
+++ /dev/null
@@ -1,178 +0,0 @@
---- a/net/minecraft/world/entity/projectile/EntityPotion.java
-+++ b/net/minecraft/world/entity/projectile/EntityPotion.java
-@@ -35,6 +35,18 @@
- import net.minecraft.world.phys.MovingObjectPositionBlock;
- import net.minecraft.world.phys.MovingObjectPositionEntity;
- 
-+// CraftBukkit start
-+import java.util.HashMap;
-+import java.util.Map;
-+import net.minecraft.server.level.EntityPlayer;
-+import net.minecraft.world.effect.MobEffects;
-+import net.minecraft.world.level.block.Blocks;
-+import org.bukkit.craftbukkit.entity.CraftLivingEntity;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.entity.LivingEntity;
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+// CraftBukkit end
-+
- public class EntityPotion extends EntityProjectileThrowable {
- 
-     public static final double SPLASH_RANGE = 4.0D;
-@@ -101,18 +113,18 @@
- 
-             if (potioncontents.is(Potions.WATER)) {
-                 this.applyWater(worldserver);
--            } else if (potioncontents.hasEffects()) {
-+            } else if (true || potioncontents.hasEffects()) { // CraftBukkit - Call event even if no effects to apply
-                 if (this.isLingering()) {
--                    this.makeAreaOfEffectCloud(potioncontents);
-+                    this.makeAreaOfEffectCloud(potioncontents, movingobjectposition); // CraftBukkit - Pass MovingObjectPosition
-                 } else {
--                    this.applySplash(worldserver, potioncontents.getAllEffects(), movingobjectposition.getType() == MovingObjectPosition.EnumMovingObjectType.ENTITY ? ((MovingObjectPositionEntity) movingobjectposition).getEntity() : null);
-+                    this.applySplash(worldserver, potioncontents.getAllEffects(), movingobjectposition.getType() == MovingObjectPosition.EnumMovingObjectType.ENTITY ? ((MovingObjectPositionEntity) movingobjectposition).getEntity() : null, movingobjectposition); // CraftBukkit - Pass MovingObjectPosition
-                 }
-             }
- 
-             int i = potioncontents.potion().isPresent() && ((PotionRegistry) ((Holder) potioncontents.potion().get()).value()).hasInstantEffects() ? 2007 : 2002;
- 
-             worldserver.levelEvent(i, this.blockPosition(), potioncontents.getColor());
--            this.discard();
-+            this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
-         }
-     }
- 
-@@ -147,9 +159,10 @@
- 
-     }
- 
--    private void applySplash(WorldServer worldserver, Iterable<MobEffect> iterable, @Nullable Entity entity) {
-+    private void applySplash(WorldServer worldserver, Iterable<MobEffect> iterable, @Nullable Entity entity, MovingObjectPosition position) { // CraftBukkit - Pass MovingObjectPosition
-         AxisAlignedBB axisalignedbb = this.getBoundingBox().inflate(4.0D, 2.0D, 4.0D);
-         List<EntityLiving> list = worldserver.getEntitiesOfClass(EntityLiving.class, axisalignedbb);
-+        Map<LivingEntity, Double> affected = new HashMap<LivingEntity, Double>(); // CraftBukkit
- 
-         if (!list.isEmpty()) {
-             Entity entity1 = this.getEffectSource();
-@@ -170,24 +183,50 @@
-                             d1 = 1.0D - Math.sqrt(d0) / 4.0D;
-                         }
- 
--                        Iterator iterator1 = iterable.iterator();
-+                        // CraftBukkit start
-+                        affected.put((LivingEntity) entityliving.getBukkitEntity(), d1);
-+                    }
-+                }
-+            }
-+        }
- 
--                        while (iterator1.hasNext()) {
--                            MobEffect mobeffect = (MobEffect) iterator1.next();
--                            Holder<MobEffectList> holder = mobeffect.getEffect();
-+        org.bukkit.event.entity.PotionSplashEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPotionSplashEvent(this, position, affected);
-+        if (!event.isCancelled() && list != null && !list.isEmpty()) { // do not process effects if there are no effects to process
-+            Entity entity1 = this.getEffectSource();
-+            for (LivingEntity victim : event.getAffectedEntities()) {
-+                if (!(victim instanceof CraftLivingEntity)) {
-+                    continue;
-+                }
- 
--                            if (((MobEffectList) holder.value()).isInstantenous()) {
--                                ((MobEffectList) holder.value()).applyInstantenousEffect(worldserver, this, this.getOwner(), entityliving, mobeffect.getAmplifier(), d1);
--                            } else {
--                                int i = mobeffect.mapDuration((j) -> {
--                                    return (int) (d1 * (double) j + 0.5D);
--                                });
--                                MobEffect mobeffect1 = new MobEffect(holder, i, mobeffect.getAmplifier(), mobeffect.isAmbient(), mobeffect.isVisible());
-+                EntityLiving entityliving = ((CraftLivingEntity) victim).getHandle();
-+                double d1 = event.getIntensity(victim);
-+                // CraftBukkit end
- 
--                                if (!mobeffect1.endsWithin(20)) {
--                                    entityliving.addEffect(mobeffect1, entity1);
--                                }
--                            }
-+                Iterator iterator1 = iterable.iterator();
-+
-+                while (iterator1.hasNext()) {
-+                    MobEffect mobeffect = (MobEffect) iterator1.next();
-+                    Holder<MobEffectList> holder = mobeffect.getEffect();
-+                    // CraftBukkit start - Abide by PVP settings - for players only!
-+                    if (!this.level().pvpMode && this.getOwner() instanceof EntityPlayer && entityliving instanceof EntityPlayer && entityliving != this.getOwner()) {
-+                        MobEffectList mobeffectlist = (MobEffectList) holder.value();
-+                        if (mobeffectlist == MobEffects.MOVEMENT_SLOWDOWN || mobeffectlist == MobEffects.DIG_SLOWDOWN || mobeffectlist == MobEffects.HARM || mobeffectlist == MobEffects.BLINDNESS
-+                                || mobeffectlist == MobEffects.HUNGER || mobeffectlist == MobEffects.WEAKNESS || mobeffectlist == MobEffects.POISON) {
-+                            continue;
-+                        }
-+                    }
-+                    // CraftBukkit end
-+
-+                    if (((MobEffectList) holder.value()).isInstantenous()) {
-+                        ((MobEffectList) holder.value()).applyInstantenousEffect(worldserver, this, this.getOwner(), entityliving, mobeffect.getAmplifier(), d1);
-+                    } else {
-+                        int i = mobeffect.mapDuration((j) -> {
-+                            return (int) (d1 * (double) j + 0.5D);
-+                        });
-+                        MobEffect mobeffect1 = new MobEffect(holder, i, mobeffect.getAmplifier(), mobeffect.isAmbient(), mobeffect.isVisible());
-+
-+                        if (!mobeffect1.endsWithin(20)) {
-+                            entityliving.addEffect(mobeffect1, entity1, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.POTION_SPLASH); // CraftBukkit
-                         }
-                     }
-                 }
-@@ -196,7 +235,7 @@
- 
-     }
- 
--    private void makeAreaOfEffectCloud(PotionContents potioncontents) {
-+    private void makeAreaOfEffectCloud(PotionContents potioncontents, MovingObjectPosition position) { // CraftBukkit - Pass MovingObjectPosition
-         EntityAreaEffectCloud entityareaeffectcloud = new EntityAreaEffectCloud(this.level(), this.getX(), this.getY(), this.getZ());
-         Entity entity = this.getOwner();
- 
-@@ -209,7 +248,14 @@
-         entityareaeffectcloud.setWaitTime(10);
-         entityareaeffectcloud.setRadiusPerTick(-entityareaeffectcloud.getRadius() / (float) entityareaeffectcloud.getDuration());
-         entityareaeffectcloud.setPotionContents(potioncontents);
--        this.level().addFreshEntity(entityareaeffectcloud);
-+        // CraftBukkit start
-+        org.bukkit.event.entity.LingeringPotionSplashEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callLingeringPotionSplashEvent(this, position, entityareaeffectcloud);
-+        if (!(event.isCancelled() || entityareaeffectcloud.isRemoved())) {
-+            this.level().addFreshEntity(entityareaeffectcloud);
-+        } else {
-+            entityareaeffectcloud.discard(null); // CraftBukkit - add Bukkit remove cause
-+        }
-+        // CraftBukkit end
-     }
- 
-     public boolean isLingering() {
-@@ -220,13 +266,25 @@
-         IBlockData iblockdata = this.level().getBlockState(blockposition);
- 
-         if (iblockdata.is(TagsBlock.FIRE)) {
--            this.level().destroyBlock(blockposition, false, this);
-+            // CraftBukkit start
-+            if (CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, Blocks.AIR.defaultBlockState())) {
-+                this.level().destroyBlock(blockposition, false, this);
-+            }
-+            // CraftBukkit end
-         } else if (AbstractCandleBlock.isLit(iblockdata)) {
--            AbstractCandleBlock.extinguish((EntityHuman) null, iblockdata, this.level(), blockposition);
-+            // CraftBukkit start
-+            if (CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, iblockdata.setValue(AbstractCandleBlock.LIT, false))) {
-+                AbstractCandleBlock.extinguish((EntityHuman) null, iblockdata, this.level(), blockposition);
-+            }
-+            // CraftBukkit end
-         } else if (BlockCampfire.isLitCampfire(iblockdata)) {
--            this.level().levelEvent((EntityHuman) null, 1009, blockposition, 0);
--            BlockCampfire.dowse(this.getOwner(), this.level(), blockposition, iblockdata);
--            this.level().setBlockAndUpdate(blockposition, (IBlockData) iblockdata.setValue(BlockCampfire.LIT, false));
-+            // CraftBukkit start
-+            if (CraftEventFactory.callEntityChangeBlockEvent(this, blockposition, iblockdata.setValue(BlockCampfire.LIT, false))) {
-+                this.level().levelEvent((EntityHuman) null, 1009, blockposition, 0);
-+                BlockCampfire.dowse(this.getOwner(), this.level(), blockposition, iblockdata);
-+                this.level().setBlockAndUpdate(blockposition, (IBlockData) iblockdata.setValue(BlockCampfire.LIT, false));
-+            }
-+            // CraftBukkit end
-         }
- 
-     }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityProjectileThrowable.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityProjectileThrowable.patch
deleted file mode 100644
index 8ddb29fd1e..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityProjectileThrowable.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/net/minecraft/world/entity/projectile/EntityProjectileThrowable.java
-+++ b/net/minecraft/world/entity/projectile/EntityProjectileThrowable.java
-@@ -34,6 +34,12 @@
- 
-     protected abstract Item getDefaultItem();
- 
-+    // CraftBukkit start
-+    public Item getDefaultItemPublic() {
-+        return getDefaultItem();
-+    }
-+    // CraftBukkit end
-+
-     @Override
-     public ItemStack getItem() {
-         return (ItemStack) this.getEntityData().get(EntityProjectileThrowable.DATA_ITEM_STACK);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityShulkerBullet.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityShulkerBullet.patch
deleted file mode 100644
index a42348eabc..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityShulkerBullet.patch
+++ /dev/null
@@ -1,101 +0,0 @@
---- a/net/minecraft/world/entity/projectile/EntityShulkerBullet.java
-+++ b/net/minecraft/world/entity/projectile/EntityShulkerBullet.java
-@@ -32,6 +32,10 @@
- import net.minecraft.world.phys.MovingObjectPositionEntity;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+// CraftBukkit end
-+
- public class EntityShulkerBullet extends IProjectile {
- 
-     private static final double SPEED = 0.15D;
-@@ -60,8 +64,21 @@
-         this.finalTarget = entity;
-         this.currentMoveDirection = EnumDirection.UP;
-         this.selectNextMoveDirection(enumdirection_enumaxis);
-+        projectileSource = (org.bukkit.entity.LivingEntity) entityliving.getBukkitEntity(); // CraftBukkit
-+    }
-+
-+    // CraftBukkit start
-+    public Entity getTarget() {
-+        return this.finalTarget;
-     }
- 
-+    public void setTarget(Entity e) {
-+        this.finalTarget = e;
-+        this.currentMoveDirection = EnumDirection.UP;
-+        this.selectNextMoveDirection(EnumDirection.EnumAxis.X);
-+    }
-+    // CraftBukkit end
-+
-     @Override
-     public SoundCategory getSoundSource() {
-         return SoundCategory.HOSTILE;
-@@ -194,7 +211,7 @@
-     @Override
-     public void checkDespawn() {
-         if (this.level().getDifficulty() == EnumDifficulty.PEACEFUL) {
--            this.discard();
-+            this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
-         }
- 
-     }
-@@ -239,7 +256,7 @@
-         }
- 
-         if (movingobjectposition != null && this.isAlive() && movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS) {
--            this.hitTargetOrDeflectSelf(movingobjectposition);
-+            this.preHitTargetOrDeflectSelf(movingobjectposition); // CraftBukkit - projectile hit event
-         }
- 
-         ProjectileHelper.rotateTowardsMovement(this, 0.5F);
-@@ -312,7 +329,7 @@
-             if (entity instanceof EntityLiving) {
-                 EntityLiving entityliving1 = (EntityLiving) entity;
- 
--                entityliving1.addEffect(new MobEffect(MobEffects.LEVITATION, 200), (Entity) MoreObjects.firstNonNull(entity1, this));
-+                entityliving1.addEffect(new MobEffect(MobEffects.LEVITATION, 200), (Entity) MoreObjects.firstNonNull(entity1, this), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
-             }
-         }
- 
-@@ -326,14 +343,20 @@
-     }
- 
-     private void destroy() {
--        this.discard();
-+        // CraftBukkit start - add Bukkit remove cause
-+        this.destroy(null);
-+    }
-+
-+    private void destroy(EntityRemoveEvent.Cause cause) {
-+        this.discard(cause);
-+        // CraftBukkit end
-         this.level().gameEvent((Holder) GameEvent.ENTITY_DAMAGE, this.position(), GameEvent.a.of((Entity) this));
-     }
- 
-     @Override
-     protected void onHit(MovingObjectPosition movingobjectposition) {
-         super.onHit(movingobjectposition);
--        this.destroy();
-+        this.destroy(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
-     }
- 
-     @Override
-@@ -348,9 +371,14 @@
- 
-     @Override
-     public boolean hurtServer(WorldServer worldserver, DamageSource damagesource, float f) {
-+        // CraftBukkit start
-+        if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, damagesource, f, false)) {
-+            return false;
-+        }
-+        // CraftBukkit end
-         this.playSound(SoundEffects.SHULKER_BULLET_HURT, 1.0F, 1.0F);
-         worldserver.sendParticles(Particles.CRIT, this.getX(), this.getY(), this.getZ(), 15, 0.2D, 0.2D, 0.2D, 0.0D);
--        this.destroy();
-+        this.destroy(EntityRemoveEvent.Cause.DEATH); // CraftBukkit - add Bukkit remove cause
-         return true;
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntitySnowball.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntitySnowball.patch
deleted file mode 100644
index e4596932fa..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntitySnowball.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/net/minecraft/world/entity/projectile/EntitySnowball.java
-+++ b/net/minecraft/world/entity/projectile/EntitySnowball.java
-@@ -14,6 +14,10 @@
- import net.minecraft.world.phys.MovingObjectPosition;
- import net.minecraft.world.phys.MovingObjectPositionEntity;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+// CraftBukkit end
-+
- public class EntitySnowball extends EntityProjectileThrowable {
- 
-     public EntitySnowball(EntityTypes<? extends EntitySnowball> entitytypes, World world) {
-@@ -65,7 +69,7 @@
-         super.onHit(movingobjectposition);
-         if (!this.level().isClientSide) {
-             this.level().broadcastEntityEvent(this, (byte) 3);
--            this.discard();
-+            this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
-         }
- 
-     }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntitySpectralArrow.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntitySpectralArrow.patch
deleted file mode 100644
index 292ce8948a..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntitySpectralArrow.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/entity/projectile/EntitySpectralArrow.java
-+++ b/net/minecraft/world/entity/projectile/EntitySpectralArrow.java
-@@ -41,7 +41,7 @@
-         super.doPostHurtEffects(entityliving);
-         MobEffect mobeffect = new MobEffect(MobEffects.GLOWING, this.duration, 0);
- 
--        entityliving.addEffect(mobeffect, this.getEffectSource());
-+        entityliving.addEffect(mobeffect, this.getEffectSource(), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ARROW); // CraftBukkit
-     }
- 
-     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityThrownTrident.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityThrownTrident.patch
deleted file mode 100644
index 15f4e7f0f9..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityThrownTrident.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- a/net/minecraft/world/entity/projectile/EntityThrownTrident.java
-+++ b/net/minecraft/world/entity/projectile/EntityThrownTrident.java
-@@ -24,6 +24,10 @@
- import net.minecraft.world.phys.MovingObjectPositionEntity;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+// CraftBukkit end
-+
- public class EntityThrownTrident extends EntityArrow {
- 
-     private static final DataWatcherObject<Byte> ID_LOYALTY = DataWatcher.defineId(EntityThrownTrident.class, DataWatcherRegistry.BYTE);
-@@ -76,10 +80,10 @@
-                     }
-                 }
- 
--                this.discard();
-+                this.discard(EntityRemoveEvent.Cause.DROP); // CraftBukkit - add Bukkit remove cause
-             } else {
-                 if (!(entity instanceof EntityHuman) && this.position().distanceTo(entity.getEyePosition()) < (double) entity.getBbWidth() + 1.0D) {
--                    this.discard();
-+                    this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
-                     return;
-                 }
- 
-@@ -137,7 +141,7 @@
- 
-             world = this.level();
-             if (world instanceof WorldServer) {
--                worldserver = (WorldServer) world;
-+                WorldServer worldserver = (WorldServer) world; // CraftBukkit - decompile error
-                 EnchantmentManager.doPostAttackEffectsWithItemSourceOnBreak(worldserver, entity, damagesource, this.getWeaponItem(), (item) -> {
-                     this.kill(worldserver);
-                 });
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityTippedArrow.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityTippedArrow.patch
deleted file mode 100644
index 49b008c6d3..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityTippedArrow.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/net/minecraft/world/entity/projectile/EntityTippedArrow.java
-+++ b/net/minecraft/world/entity/projectile/EntityTippedArrow.java
-@@ -119,7 +119,7 @@
-                 mobeffect = (MobEffect) iterator.next();
-                 entityliving.addEffect(new MobEffect(mobeffect.getEffect(), Math.max(mobeffect.mapDuration((i) -> {
-                     return i / 8;
--                }), 1), mobeffect.getAmplifier(), mobeffect.isAmbient(), mobeffect.isVisible()), entity);
-+                }), 1), mobeffect.getAmplifier(), mobeffect.isAmbient(), mobeffect.isVisible()), entity, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ARROW); // CraftBukkit
-             }
-         }
- 
-@@ -127,7 +127,7 @@
- 
-         while (iterator.hasNext()) {
-             mobeffect = (MobEffect) iterator.next();
--            entityliving.addEffect(mobeffect, entity);
-+            entityliving.addEffect(mobeffect, entity, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ARROW); // CraftBukkit
-         }
- 
-     }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EvokerFangs.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/EvokerFangs.java.patch
new file mode 100644
index 0000000000..22b4caea72
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/EvokerFangs.java.patch
@@ -0,0 +1,30 @@
+--- a/net/minecraft/world/entity/projectile/EvokerFangs.java
++++ b/net/minecraft/world/entity/projectile/EvokerFangs.java
+@@ -16,6 +16,9 @@
+ import net.minecraft.world.entity.TraceableEntity;
+ import net.minecraft.world.item.enchantment.EnchantmentHelper;
+ import net.minecraft.world.level.Level;
++// CraftBukkit start
++import org.bukkit.event.entity.EntityRemoveEvent;
++// CraftBukkit end
+ 
+ public class EvokerFangs extends Entity implements TraceableEntity {
+ 
+@@ -121,7 +124,7 @@
+             }
+ 
+             if (--this.lifeTicks < 0) {
+-                this.discard();
++                this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
+             }
+         }
+ 
+@@ -132,7 +135,7 @@
+ 
+         if (target.isAlive() && !target.isInvulnerable() && target != entityliving1) {
+             if (entityliving1 == null) {
+-                target.hurt(this.damageSources().magic(), 6.0F);
++                target.hurt(this.damageSources().magic().customEntityDamager(this), 6.0F); // CraftBukkit
+             } else {
+                 if (entityliving1.isAlliedTo((Entity) target)) {
+                     return;
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityEnderSignal.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/EyeOfEnder.java.patch
similarity index 52%
rename from paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityEnderSignal.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/projectile/EyeOfEnder.java.patch
index 04ffd2f1bd..4a8aafdae3 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityEnderSignal.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/EyeOfEnder.java.patch
@@ -1,32 +1,31 @@
---- a/net/minecraft/world/entity/projectile/EntityEnderSignal.java
-+++ b/net/minecraft/world/entity/projectile/EntityEnderSignal.java
-@@ -18,6 +18,10 @@
- import net.minecraft.world.level.World;
- import net.minecraft.world.phys.Vec3D;
- 
+--- a/net/minecraft/world/entity/projectile/EyeOfEnder.java
++++ b/net/minecraft/world/entity/projectile/EyeOfEnder.java
+@@ -17,6 +17,9 @@
+ import net.minecraft.world.item.Items;
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.phys.Vec3;
 +// CraftBukkit start
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +// CraftBukkit end
-+
- public class EntityEnderSignal extends Entity implements ItemSupplier {
  
-     private static final float MIN_CAMERA_DISTANCE_SQUARED = 12.25F;
-@@ -153,7 +157,7 @@
+ public class EyeOfEnder extends Entity implements ItemSupplier {
+ 
+@@ -153,7 +156,7 @@
              ++this.life;
              if (this.life > 80 && !this.level().isClientSide) {
-                 this.playSound(SoundEffects.ENDER_EYE_DEATH, 1.0F, 1.0F);
+                 this.playSound(SoundEvents.ENDER_EYE_DEATH, 1.0F, 1.0F);
 -                this.discard();
 +                this.discard(this.surviveAfterDeath ? EntityRemoveEvent.Cause.DROP : EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
                  if (this.surviveAfterDeath) {
-                     this.level().addFreshEntity(new EntityItem(this.level(), this.getX(), this.getY(), this.getZ(), this.getItem()));
+                     this.level().addFreshEntity(new ItemEntity(this.level(), this.getX(), this.getY(), this.getZ(), this.getItem()));
                  } else {
-@@ -174,7 +178,12 @@
+@@ -174,7 +177,12 @@
      @Override
-     public void readAdditionalSaveData(NBTTagCompound nbttagcompound) {
-         if (nbttagcompound.contains("Item", 10)) {
--            this.setItem((ItemStack) ItemStack.parse(this.registryAccess(), nbttagcompound.getCompound("Item")).orElse(this.getDefaultItem()));
+     public void readAdditionalSaveData(CompoundTag nbt) {
+         if (nbt.contains("Item", 10)) {
+-            this.setItem((ItemStack) ItemStack.parse(this.registryAccess(), nbt.getCompound("Item")).orElse(this.getDefaultItem()));
 +            // CraftBukkit start - SPIGOT-6103 summon, see also SPIGOT-5474
-+            ItemStack itemstack = (ItemStack) ItemStack.parse(this.registryAccess(), nbttagcompound.getCompound("Item")).orElse(this.getDefaultItem());
++            ItemStack itemstack = (ItemStack) ItemStack.parse(this.registryAccess(), nbt.getCompound("Item")).orElse(this.getDefaultItem());
 +            if (!itemstack.isEmpty()) {
 +                this.setItem(itemstack);
 +            }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/Fireball.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/Fireball.java.patch
new file mode 100644
index 0000000000..6cc358f744
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/Fireball.java.patch
@@ -0,0 +1,16 @@
+--- a/net/minecraft/world/entity/projectile/Fireball.java
++++ b/net/minecraft/world/entity/projectile/Fireball.java
+@@ -61,7 +61,12 @@
+     public void readAdditionalSaveData(CompoundTag nbt) {
+         super.readAdditionalSaveData(nbt);
+         if (nbt.contains("Item", 10)) {
+-            this.setItem((ItemStack) ItemStack.parse(this.registryAccess(), nbt.getCompound("Item")).orElse(this.getDefaultItem()));
++            // CraftBukkit start - SPIGOT-5474 probably came from bugged earlier versions
++            ItemStack itemstack = (ItemStack) ItemStack.parse(this.registryAccess(), nbt.getCompound("Item")).orElse(this.getDefaultItem());
++            if (!itemstack.isEmpty()) {
++                this.setItem(itemstack);
++            }
++            // CraftBukkit end
+         } else {
+             this.setItem(this.getDefaultItem());
+         }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityFireworks.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/FireworkRocketEntity.java.patch
similarity index 60%
rename from paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityFireworks.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/projectile/FireworkRocketEntity.java.patch
index 82af90e23c..aa8f8c19cf 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityFireworks.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/FireworkRocketEntity.java.patch
@@ -1,28 +1,27 @@
---- a/net/minecraft/world/entity/projectile/EntityFireworks.java
-+++ b/net/minecraft/world/entity/projectile/EntityFireworks.java
-@@ -33,6 +33,10 @@
- import net.minecraft.world.phys.MovingObjectPositionEntity;
- import net.minecraft.world.phys.Vec3D;
- 
+--- a/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
++++ b/net/minecraft/world/entity/projectile/FireworkRocketEntity.java
+@@ -32,6 +32,9 @@
+ import net.minecraft.world.phys.EntityHitResult;
+ import net.minecraft.world.phys.HitResult;
+ import net.minecraft.world.phys.Vec3;
 +// CraftBukkit start
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +// CraftBukkit end
-+
- public class EntityFireworks extends IProjectile implements ItemSupplier {
  
-     public static final DataWatcherObject<ItemStack> DATA_ID_FIREWORKS_ITEM = DataWatcher.defineId(EntityFireworks.class, DataWatcherRegistry.ITEM_STACK);
-@@ -152,7 +156,7 @@
+ public class FireworkRocketEntity extends Projectile implements ItemSupplier {
+ 
+@@ -152,7 +155,7 @@
          }
  
-         if (!this.noPhysics && this.isAlive() && movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS) {
+         if (!this.noPhysics && this.isAlive() && movingobjectposition.getType() != HitResult.Type.MISS) {
 -            this.hitTargetOrDeflectSelf(movingobjectposition);
 +            this.preHitTargetOrDeflectSelf(movingobjectposition); // CraftBukkit - projectile hit event
              this.hasImpulse = true;
          }
  
-@@ -172,7 +176,11 @@
-             if (world instanceof WorldServer) {
-                 WorldServer worldserver = (WorldServer) world;
+@@ -172,7 +175,11 @@
+             if (world instanceof ServerLevel) {
+                 ServerLevel worldserver = (ServerLevel) world;
  
 -                this.explode(worldserver);
 +                // CraftBukkit start
@@ -33,19 +32,19 @@
              }
          }
  
-@@ -182,7 +190,7 @@
-         worldserver.broadcastEntityEvent(this, (byte) 17);
+@@ -182,7 +189,7 @@
+         world.broadcastEntityEvent(this, (byte) 17);
          this.gameEvent(GameEvent.EXPLODE, this.getOwner());
-         this.dealExplosionDamage(worldserver);
+         this.dealExplosionDamage(world);
 -        this.discard();
 +        this.discard(EntityRemoveEvent.Cause.EXPLODE); // CraftBukkit - add Bukkit remove cause
      }
  
      @Override
-@@ -191,7 +199,11 @@
-         World world = this.level();
+@@ -191,7 +198,11 @@
+         Level world = this.level();
  
-         if (world instanceof WorldServer worldserver) {
+         if (world instanceof ServerLevel worldserver) {
 -            this.explode(worldserver);
 +            // CraftBukkit start
 +            if (!org.bukkit.craftbukkit.event.CraftEventFactory.callFireworkExplodeEvent(this).isCancelled()) {
@@ -55,9 +54,9 @@
          }
  
      }
-@@ -205,7 +217,11 @@
+@@ -205,7 +216,11 @@
  
-         if (world instanceof WorldServer worldserver) {
+         if (world instanceof ServerLevel worldserver) {
              if (this.hasExplosion()) {
 -                this.explode(worldserver);
 +                // CraftBukkit start
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityFishingHook.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/FishingHook.java.patch
similarity index 57%
rename from paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityFishingHook.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/projectile/FishingHook.java.patch
index 48be1a5e00..fda0fd767e 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityFishingHook.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/FishingHook.java.patch
@@ -1,7 +1,15 @@
---- a/net/minecraft/world/entity/projectile/EntityFishingHook.java
-+++ b/net/minecraft/world/entity/projectile/EntityFishingHook.java
-@@ -47,6 +47,13 @@
- import net.minecraft.world.phys.Vec3D;
+--- a/net/minecraft/world/entity/projectile/FishingHook.java
++++ b/net/minecraft/world/entity/projectile/FishingHook.java
+@@ -29,7 +29,6 @@
+ import net.minecraft.world.entity.ExperienceOrb;
+ import net.minecraft.world.entity.MoverType;
+ import net.minecraft.world.entity.item.ItemEntity;
+-import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.item.Items;
+ import net.minecraft.world.level.Level;
+@@ -47,6 +46,13 @@
+ import net.minecraft.world.phys.Vec3;
  import org.slf4j.Logger;
  
 +// CraftBukkit start
@@ -11,10 +19,10 @@
 +import org.bukkit.event.player.PlayerFishEvent;
 +// CraftBukkit end
 +
- public class EntityFishingHook extends IProjectile {
+ public class FishingHook extends Projectile {
  
      private static final Logger LOGGER = LogUtils.getLogger();
-@@ -68,6 +75,18 @@
+@@ -68,6 +74,18 @@
      private final int luck;
      private final int lureSpeed;
  
@@ -30,11 +38,24 @@
 +    public boolean skyInfluenced = true;
 +    // CraftBukkit end
 +
-     private EntityFishingHook(EntityTypes<? extends EntityFishingHook> entitytypes, World world, int i, int j) {
-         super(entitytypes, world);
+     private FishingHook(EntityType<? extends FishingHook> type, Level world, int luckBonus, int waitTimeReductionTicks) {
+         super(type, world);
          this.syncronizedRandom = RandomSource.create();
-@@ -152,12 +171,12 @@
-         EntityHuman entityhuman = this.getPlayerOwner();
+@@ -81,7 +99,7 @@
+         this(type, world, 0, 0);
+     }
+ 
+-    public FishingHook(Player thrower, Level world, int luckBonus, int waitTimeReductionTicks) {
++    public FishingHook(net.minecraft.world.entity.player.Player thrower, Level world, int luckBonus, int waitTimeReductionTicks) {
+         this(EntityType.FISHING_BOBBER, world, luckBonus, waitTimeReductionTicks);
+         this.setOwner(thrower);
+         float f = thrower.getXRot();
+@@ -149,15 +167,15 @@
+     public void tick() {
+         this.syncronizedRandom.setSeed(this.getUUID().getLeastSignificantBits() ^ this.level().getGameTime());
+         super.tick();
+-        Player entityhuman = this.getPlayerOwner();
++        net.minecraft.world.entity.player.Player entityhuman = this.getPlayerOwner();
  
          if (entityhuman == null) {
 -            this.discard();
@@ -48,8 +69,17 @@
                      return;
                  }
              } else {
-@@ -259,7 +278,7 @@
-         if (!entityhuman.isRemoved() && entityhuman.isAlive() && (flag || flag1) && this.distanceToSqr((Entity) entityhuman) <= 1024.0D) {
+@@ -250,7 +268,7 @@
+         }
+     }
+ 
+-    private boolean shouldStopFishing(Player player) {
++    private boolean shouldStopFishing(net.minecraft.world.entity.player.Player player) {
+         ItemStack itemstack = player.getMainHandItem();
+         ItemStack itemstack1 = player.getOffhandItem();
+         boolean flag = itemstack.is(Items.FISHING_ROD);
+@@ -259,7 +277,7 @@
+         if (!player.isRemoved() && player.isAlive() && (flag || flag1) && this.distanceToSqr((Entity) player) <= 1024.0D) {
              return false;
          } else {
 -            this.discard();
@@ -57,18 +87,18 @@
              return true;
          }
      }
-@@ -267,7 +286,7 @@
+@@ -267,7 +285,7 @@
      private void checkCollision() {
-         MovingObjectPosition movingobjectposition = ProjectileHelper.getHitResultOnMoveVector(this, this::canHitEntity);
+         HitResult movingobjectposition = ProjectileUtil.getHitResultOnMoveVector(this, this::canHitEntity);
  
 -        this.hitTargetOrDeflectSelf(movingobjectposition);
 +        this.preHitTargetOrDeflectSelf(movingobjectposition); // CraftBukkit - projectile hit event
      }
  
      @Override
-@@ -300,11 +319,11 @@
+@@ -300,11 +318,11 @@
          int i = 1;
-         BlockPosition blockposition1 = blockposition.above();
+         BlockPos blockposition1 = pos.above();
  
 -        if (this.random.nextFloat() < 0.25F && this.level().isRainingAt(blockposition1)) {
 +        if (this.rainInfluenced && this.random.nextFloat() < 0.25F && this.level().isRainingAt(blockposition1)) { // CraftBukkit
@@ -80,10 +110,10 @@
              --i;
          }
  
-@@ -314,6 +333,10 @@
+@@ -314,6 +332,10 @@
                  this.timeUntilLured = 0;
                  this.timeUntilHooked = 0;
-                 this.getEntityData().set(EntityFishingHook.DATA_BITING, false);
+                 this.getEntityData().set(FishingHook.DATA_BITING, false);
 +                // CraftBukkit start
 +                PlayerFishEvent playerFishEvent = new PlayerFishEvent((Player) this.getPlayerOwner().getBukkitEntity(), null, (FishHook) this.getBukkitEntity(), PlayerFishEvent.State.FAILED_ATTEMPT);
 +                this.level().getCraftServer().getPluginManager().callEvent(playerFishEvent);
@@ -91,8 +121,8 @@
              }
          } else {
              float f;
-@@ -347,6 +370,13 @@
-                         worldserver.sendParticles(Particles.FISHING, d0, d1, d2, 0, (double) (-f4), 0.01D, (double) f3, 1.0D);
+@@ -347,6 +369,13 @@
+                         worldserver.sendParticles(ParticleTypes.FISHING, d0, d1, d2, 0, (double) (-f4), 0.01D, (double) f3, 1.0D);
                      }
                  } else {
 +                    // CraftBukkit start
@@ -102,31 +132,38 @@
 +                        return;
 +                    }
 +                    // CraftBukkit end
-                     this.playSound(SoundEffects.FISHING_BOBBER_SPLASH, 0.25F, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F);
+                     this.playSound(SoundEvents.FISHING_BOBBER_SPLASH, 0.25F, 1.0F + (this.random.nextFloat() - this.random.nextFloat()) * 0.4F);
                      double d3 = this.getY() + 0.5D;
  
-@@ -379,12 +409,16 @@
+@@ -379,12 +408,16 @@
                  }
  
                  if (this.timeUntilLured <= 0) {
--                    this.fishAngle = MathHelper.nextFloat(this.random, 0.0F, 360.0F);
--                    this.timeUntilHooked = MathHelper.nextInt(this.random, 20, 80);
+-                    this.fishAngle = Mth.nextFloat(this.random, 0.0F, 360.0F);
+-                    this.timeUntilHooked = Mth.nextInt(this.random, 20, 80);
 +                    // CraftBukkit start - logic to modify fishing wait time, lure time, and lure angle
-+                    this.fishAngle = MathHelper.nextFloat(this.random, this.minLureAngle, this.maxLureAngle);
-+                    this.timeUntilHooked = MathHelper.nextInt(this.random, this.minLureTime, this.maxLureTime);
++                    this.fishAngle = Mth.nextFloat(this.random, this.minLureAngle, this.maxLureAngle);
++                    this.timeUntilHooked = Mth.nextInt(this.random, this.minLureTime, this.maxLureTime);
 +                    // CraftBukkit end
                  }
              } else {
--                this.timeUntilLured = MathHelper.nextInt(this.random, 100, 600);
+-                this.timeUntilLured = Mth.nextInt(this.random, 100, 600);
 -                this.timeUntilLured -= this.lureSpeed;
 +                // CraftBukkit start - logic to modify fishing wait time
-+                this.timeUntilLured = MathHelper.nextInt(this.random, this.minWaitTime, this.maxWaitTime);
++                this.timeUntilLured = Mth.nextInt(this.random, this.minWaitTime, this.maxWaitTime);
 +                this.timeUntilLured -= (this.applyLure) ? this.lureSpeed : 0;
 +                // CraftBukkit end
              }
          }
  
-@@ -452,6 +486,14 @@
+@@ -446,12 +479,20 @@
+     public void readAdditionalSaveData(CompoundTag nbt) {}
+ 
+     public int retrieve(ItemStack usedItem) {
+-        Player entityhuman = this.getPlayerOwner();
++        net.minecraft.world.entity.player.Player entityhuman = this.getPlayerOwner();
+ 
+         if (!this.level().isClientSide && entityhuman != null && !this.shouldStopFishing(entityhuman)) {
              int i = 0;
  
              if (this.hookedIn != null) {
@@ -139,12 +176,12 @@
 +                }
 +                // CraftBukkit end
                  this.pullEntity(this.hookedIn);
-                 CriterionTriggers.FISHING_ROD_HOOKED.trigger((EntityPlayer) entityhuman, itemstack, this, Collections.emptyList());
+                 CriteriaTriggers.FISHING_ROD_HOOKED.trigger((ServerPlayer) entityhuman, usedItem, this, Collections.emptyList());
                  this.level().broadcastEntityEvent(this, (byte) 31);
-@@ -467,6 +509,15 @@
+@@ -467,6 +508,15 @@
                  while (iterator.hasNext()) {
                      ItemStack itemstack1 = (ItemStack) iterator.next();
-                     EntityItem entityitem = new EntityItem(this.level(), this.getX(), this.getY(), this.getZ(), itemstack1);
+                     ItemEntity entityitem = new ItemEntity(this.level(), this.getX(), this.getY(), this.getZ(), itemstack1);
 +                    // CraftBukkit start
 +                    PlayerFishEvent playerFishEvent = new PlayerFishEvent((Player) entityhuman.getBukkitEntity(), entityitem.getBukkitEntity(), (FishHook) this.getBukkitEntity(), PlayerFishEvent.State.CAUGHT_FISH);
 +                    playerFishEvent.setExpToDrop(this.random.nextInt(6) + 1);
@@ -157,20 +194,20 @@
                      double d0 = entityhuman.getX() - this.getX();
                      double d1 = entityhuman.getY() - this.getY();
                      double d2 = entityhuman.getZ() - this.getZ();
-@@ -474,7 +525,11 @@
+@@ -474,7 +524,11 @@
  
                      entityitem.setDeltaMovement(d0 * 0.1D, d1 * 0.1D + Math.sqrt(Math.sqrt(d0 * d0 + d1 * d1 + d2 * d2)) * 0.08D, d2 * 0.1D);
                      this.level().addFreshEntity(entityitem);
--                    entityhuman.level().addFreshEntity(new EntityExperienceOrb(entityhuman.level(), entityhuman.getX(), entityhuman.getY() + 0.5D, entityhuman.getZ() + 0.5D, this.random.nextInt(6) + 1));
+-                    entityhuman.level().addFreshEntity(new ExperienceOrb(entityhuman.level(), entityhuman.getX(), entityhuman.getY() + 0.5D, entityhuman.getZ() + 0.5D, this.random.nextInt(6) + 1));
 +                    // CraftBukkit start - this.random.nextInt(6) + 1 -> playerFishEvent.getExpToDrop()
 +                    if (playerFishEvent.getExpToDrop() > 0) {
-+                        entityhuman.level().addFreshEntity(new EntityExperienceOrb(entityhuman.level(), entityhuman.getX(), entityhuman.getY() + 0.5D, entityhuman.getZ() + 0.5D, playerFishEvent.getExpToDrop()));
++                        entityhuman.level().addFreshEntity(new ExperienceOrb(entityhuman.level(), entityhuman.getX(), entityhuman.getY() + 0.5D, entityhuman.getZ() + 0.5D, playerFishEvent.getExpToDrop()));
 +                    }
 +                    // CraftBukkit end
-                     if (itemstack1.is(TagsItem.FISHES)) {
-                         entityhuman.awardStat(StatisticList.FISH_CAUGHT, 1);
+                     if (itemstack1.is(ItemTags.FISHES)) {
+                         entityhuman.awardStat(Stats.FISH_CAUGHT, 1);
                      }
-@@ -484,10 +539,27 @@
+@@ -484,10 +538,27 @@
              }
  
              if (this.onGround()) {
@@ -199,27 +236,58 @@
              return i;
          } else {
              return 0;
-@@ -520,8 +592,15 @@
+@@ -496,7 +567,7 @@
  
      @Override
-     public void remove(Entity.RemovalReason entity_removalreason) {
+     public void handleEntityEvent(byte status) {
+-        if (status == 31 && this.level().isClientSide && this.hookedIn instanceof Player && ((Player) this.hookedIn).isLocalPlayer()) {
++        if (status == 31 && this.level().isClientSide && this.hookedIn instanceof net.minecraft.world.entity.player.Player && ((net.minecraft.world.entity.player.Player) this.hookedIn).isLocalPlayer()) {
+             this.pullEntity(this.hookedIn);
+         }
+ 
+@@ -520,8 +591,15 @@
+ 
+     @Override
+     public void remove(Entity.RemovalReason reason) {
 +        // CraftBukkit start - add Bukkit remove cause
-+        this.remove(entity_removalreason, null);
++        this.remove(reason, null);
 +    }
 +
 +    @Override
 +    public void remove(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) {
 +        // CraftBukkit end
-         this.updateOwnerInfo((EntityFishingHook) null);
--        super.remove(entity_removalreason);
+         this.updateOwnerInfo((FishingHook) null);
+-        super.remove(reason);
 +        super.remove(entity_removalreason, cause); // CraftBukkit - add Bukkit remove cause
      }
  
      @Override
-@@ -575,7 +654,7 @@
-             int i = packetplayoutspawnentity.getData();
+@@ -536,7 +614,7 @@
+     }
  
-             EntityFishingHook.LOGGER.error("Failed to recreate fishing hook on client. {} (id: {}) is not a valid owner.", this.level().getEntity(i), i);
+     private void updateOwnerInfo(@Nullable FishingHook fishingBobber) {
+-        Player entityhuman = this.getPlayerOwner();
++        net.minecraft.world.entity.player.Player entityhuman = this.getPlayerOwner();
+ 
+         if (entityhuman != null) {
+             entityhuman.fishing = fishingBobber;
+@@ -545,10 +623,10 @@
+     }
+ 
+     @Nullable
+-    public Player getPlayerOwner() {
++    public net.minecraft.world.entity.player.Player getPlayerOwner() {
+         Entity entity = this.getOwner();
+ 
+-        return entity instanceof Player ? (Player) entity : null;
++        return entity instanceof net.minecraft.world.entity.player.Player ? (net.minecraft.world.entity.player.Player) entity : null;
+     }
+ 
+     @Nullable
+@@ -575,7 +653,7 @@
+             int i = packet.getData();
+ 
+             FishingHook.LOGGER.error("Failed to recreate fishing hook on client. {} (id: {}) is not a valid owner.", this.level().getEntity(i), i);
 -            this.discard();
 +            this.discard(null); // CraftBukkit - add Bukkit remove cause
          }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/IProjectile.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/IProjectile.patch
deleted file mode 100644
index b4c0be0b32..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/IProjectile.patch
+++ /dev/null
@@ -1,71 +0,0 @@
---- a/net/minecraft/world/entity/projectile/IProjectile.java
-+++ b/net/minecraft/world/entity/projectile/IProjectile.java
-@@ -36,6 +36,10 @@
- import net.minecraft.world.phys.MovingObjectPositionEntity;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import org.bukkit.projectiles.ProjectileSource;
-+// CraftBukkit end
-+
- public abstract class IProjectile extends Entity implements TraceableEntity {
- 
-     @Nullable
-@@ -47,6 +51,10 @@
-     @Nullable
-     private Entity lastDeflectedBy;
- 
-+    // CraftBukkit start
-+    private boolean hitCancelled = false;
-+    // CraftBukkit end
-+
-     IProjectile(EntityTypes<? extends IProjectile> entitytypes, World world) {
-         super(entitytypes, world);
-     }
-@@ -56,6 +64,7 @@
-             this.ownerUUID = entity.getUUID();
-             this.cachedOwner = entity;
-         }
-+        this.projectileSource = (entity != null && entity.getBukkitEntity() instanceof ProjectileSource) ? (ProjectileSource) entity.getBukkitEntity() : null; // CraftBukkit
- 
-     }
- 
-@@ -213,7 +222,7 @@
- 
-     public static <T extends IProjectile> T spawnProjectile(T t0, WorldServer worldserver, ItemStack itemstack, Consumer<T> consumer) {
-         consumer.accept(t0);
--        worldserver.addFreshEntity(t0);
-+        if (worldserver.addFreshEntity(t0)) // CraftBukkit
-         t0.applyOnProjectileSpawned(worldserver, itemstack);
-         return t0;
-     }
-@@ -232,6 +241,17 @@
- 
-     }
- 
-+    // CraftBukkit start - call projectile hit event
-+    protected ProjectileDeflection preHitTargetOrDeflectSelf(MovingObjectPosition movingobjectposition) {
-+        org.bukkit.event.entity.ProjectileHitEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition);
-+        this.hitCancelled = event != null && event.isCancelled();
-+        if (movingobjectposition.getType() == MovingObjectPosition.EnumMovingObjectType.BLOCK || !this.hitCancelled) {
-+            return this.hitTargetOrDeflectSelf(movingobjectposition);
-+        }
-+        return ProjectileDeflection.NONE;
-+    }
-+    // CraftBukkit end
-+
-     protected ProjectileDeflection hitTargetOrDeflectSelf(MovingObjectPosition movingobjectposition) {
-         if (movingobjectposition.getType() == MovingObjectPosition.EnumMovingObjectType.ENTITY) {
-             MovingObjectPositionEntity movingobjectpositionentity = (MovingObjectPositionEntity) movingobjectposition;
-@@ -309,6 +329,11 @@
-     protected void onHitEntity(MovingObjectPositionEntity movingobjectpositionentity) {}
- 
-     protected void onHitBlock(MovingObjectPositionBlock movingobjectpositionblock) {
-+        // CraftBukkit start - cancellable hit event
-+        if (hitCancelled) {
-+            return;
-+        }
-+        // CraftBukkit end
-         IBlockData iblockdata = this.level().getBlockState(movingobjectpositionblock.getBlockPos());
- 
-         iblockdata.onProjectileHit(this.level(), iblockdata, movingobjectpositionblock, this);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/LargeFireball.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/LargeFireball.java.patch
new file mode 100644
index 0000000000..494d25292d
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/LargeFireball.java.patch
@@ -0,0 +1,56 @@
+--- a/net/minecraft/world/entity/projectile/LargeFireball.java
++++ b/net/minecraft/world/entity/projectile/LargeFireball.java
+@@ -12,6 +12,10 @@
+ import net.minecraft.world.phys.EntityHitResult;
+ import net.minecraft.world.phys.HitResult;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import org.bukkit.event.entity.EntityRemoveEvent;
++import org.bukkit.event.entity.ExplosionPrimeEvent;
++// CraftBukkit end
+ 
+ public class LargeFireball extends Fireball {
+ 
+@@ -19,11 +23,13 @@
+ 
+     public LargeFireball(EntityType<? extends LargeFireball> type, Level world) {
+         super(type, world);
++        this.isIncendiary = (world instanceof ServerLevel worldserver) && worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING); // CraftBukkit
+     }
+ 
+     public LargeFireball(Level world, LivingEntity owner, Vec3 velocity, int explosionPower) {
+         super(EntityType.FIREBALL, owner, velocity, world);
+         this.explosionPower = explosionPower;
++        this.isIncendiary = (world instanceof ServerLevel worldserver) && worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING); // CraftBukkit
+     }
+ 
+     @Override
+@@ -34,8 +40,16 @@
+         if (world instanceof ServerLevel worldserver) {
+             boolean flag = worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING);
+ 
+-            this.level().explode(this, this.getX(), this.getY(), this.getZ(), (float) this.explosionPower, flag, Level.ExplosionInteraction.MOB);
+-            this.discard();
++            // CraftBukkit start - fire ExplosionPrimeEvent
++            ExplosionPrimeEvent event = new ExplosionPrimeEvent((org.bukkit.entity.Explosive) this.getBukkitEntity());
++            this.level().getCraftServer().getPluginManager().callEvent(event);
++
++            if (!event.isCancelled()) {
++                // give 'this' instead of (Entity) null so we know what causes the damage
++                this.level().explode(this, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB);
++            }
++            // CraftBukkit end
++            this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
+         }
+ 
+     }
+@@ -65,7 +79,8 @@
+     public void readAdditionalSaveData(CompoundTag nbt) {
+         super.readAdditionalSaveData(nbt);
+         if (nbt.contains("ExplosionPower", 99)) {
+-            this.explosionPower = nbt.getByte("ExplosionPower");
++            // CraftBukkit - set bukkitYield when setting explosionpower
++            this.bukkitYield = this.explosionPower = nbt.getByte("ExplosionPower");
+         }
+ 
+     }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityLlamaSpit.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/LlamaSpit.java.patch
similarity index 57%
rename from paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityLlamaSpit.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/projectile/LlamaSpit.java.patch
index 17a9a26530..370c83f5da 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityLlamaSpit.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/LlamaSpit.java.patch
@@ -1,29 +1,28 @@
---- a/net/minecraft/world/entity/projectile/EntityLlamaSpit.java
-+++ b/net/minecraft/world/entity/projectile/EntityLlamaSpit.java
-@@ -18,6 +18,10 @@
- import net.minecraft.world.phys.MovingObjectPositionEntity;
- import net.minecraft.world.phys.Vec3D;
- 
+--- a/net/minecraft/world/entity/projectile/LlamaSpit.java
++++ b/net/minecraft/world/entity/projectile/LlamaSpit.java
+@@ -17,6 +17,9 @@
+ import net.minecraft.world.phys.EntityHitResult;
+ import net.minecraft.world.phys.HitResult;
+ import net.minecraft.world.phys.Vec3;
 +// CraftBukkit start
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +// CraftBukkit end
-+
- public class EntityLlamaSpit extends IProjectile {
  
-     public EntityLlamaSpit(EntityTypes<? extends EntityLlamaSpit> entitytypes, World world) {
-@@ -41,7 +45,7 @@
-         Vec3D vec3d = this.getDeltaMovement();
-         MovingObjectPosition movingobjectposition = ProjectileHelper.getHitResultOnMoveVector(this, this::canHitEntity);
+ public class LlamaSpit extends Projectile {
+ 
+@@ -41,7 +44,7 @@
+         Vec3 vec3d = this.getDeltaMovement();
+         HitResult movingobjectposition = ProjectileUtil.getHitResultOnMoveVector(this, this::canHitEntity);
  
 -        this.hitTargetOrDeflectSelf(movingobjectposition);
 +        this.preHitTargetOrDeflectSelf(movingobjectposition); // CraftBukkit - projectile hit event
          double d0 = this.getX() + vec3d.x;
          double d1 = this.getY() + vec3d.y;
          double d2 = this.getZ() + vec3d.z;
-@@ -50,9 +54,9 @@
+@@ -50,9 +53,9 @@
          float f = 0.99F;
  
-         if (this.level().getBlockStates(this.getBoundingBox()).noneMatch(BlockBase.BlockData::isAir)) {
+         if (this.level().getBlockStates(this.getBoundingBox()).noneMatch(BlockBehaviour.BlockStateBase::isAir)) {
 -            this.discard();
 +            this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
          } else if (this.isInWaterOrBubble()) {
@@ -32,9 +31,9 @@
          } else {
              this.setDeltaMovement(vec3d.scale(0.9900000095367432D));
              this.applyGravity();
-@@ -83,7 +87,7 @@
-     protected void onHitBlock(MovingObjectPositionBlock movingobjectpositionblock) {
-         super.onHitBlock(movingobjectpositionblock);
+@@ -83,7 +86,7 @@
+     protected void onHitBlock(BlockHitResult blockHitResult) {
+         super.onHitBlock(blockHitResult);
          if (!this.level().isClientSide) {
 -            this.discard();
 +            this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/Projectile.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/Projectile.java.patch
new file mode 100644
index 0000000000..fa08deb05c
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/Projectile.java.patch
@@ -0,0 +1,71 @@
+--- a/net/minecraft/world/entity/projectile/Projectile.java
++++ b/net/minecraft/world/entity/projectile/Projectile.java
+@@ -35,6 +35,9 @@
+ import net.minecraft.world.phys.EntityHitResult;
+ import net.minecraft.world.phys.HitResult;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import org.bukkit.projectiles.ProjectileSource;
++// CraftBukkit end
+ 
+ public abstract class Projectile extends Entity implements TraceableEntity {
+ 
+@@ -47,6 +50,10 @@
+     @Nullable
+     private Entity lastDeflectedBy;
+ 
++    // CraftBukkit start
++    protected boolean hitCancelled = false;
++    // CraftBukkit end
++
+     Projectile(EntityType<? extends Projectile> type, Level world) {
+         super(type, world);
+     }
+@@ -56,6 +63,7 @@
+             this.ownerUUID = entity.getUUID();
+             this.cachedOwner = entity;
+         }
++        this.projectileSource = (entity != null && entity.getBukkitEntity() instanceof ProjectileSource) ? (ProjectileSource) entity.getBukkitEntity() : null; // CraftBukkit
+ 
+     }
+ 
+@@ -213,7 +221,7 @@
+ 
+     public static <T extends Projectile> T spawnProjectile(T projectile, ServerLevel world, ItemStack projectileStack, Consumer<T> beforeSpawn) {
+         beforeSpawn.accept(projectile);
+-        world.addFreshEntity(projectile);
++        if (world.addFreshEntity(projectile)) // CraftBukkit
+         projectile.applyOnProjectileSpawned(world, projectileStack);
+         return projectile;
+     }
+@@ -230,7 +238,18 @@
+             }
+         }
+ 
++    }
++
++    // CraftBukkit start - call projectile hit event
++    protected ProjectileDeflection preHitTargetOrDeflectSelf(HitResult movingobjectposition) {
++        org.bukkit.event.entity.ProjectileHitEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callProjectileHitEvent(this, movingobjectposition);
++        this.hitCancelled = event != null && event.isCancelled();
++        if (movingobjectposition.getType() == HitResult.Type.BLOCK || !this.hitCancelled) {
++            return this.hitTargetOrDeflectSelf(movingobjectposition);
++        }
++        return ProjectileDeflection.NONE;
+     }
++    // CraftBukkit end
+ 
+     protected ProjectileDeflection hitTargetOrDeflectSelf(HitResult hitResult) {
+         if (hitResult.getType() == HitResult.Type.ENTITY) {
+@@ -309,6 +328,11 @@
+     protected void onHitEntity(EntityHitResult entityHitResult) {}
+ 
+     protected void onHitBlock(BlockHitResult blockHitResult) {
++        // CraftBukkit start - cancellable hit event
++        if (this.hitCancelled) {
++            return;
++        }
++        // CraftBukkit end
+         BlockState iblockdata = this.level().getBlockState(blockHitResult.getBlockPos());
+ 
+         iblockdata.onProjectileHit(this.level(), iblockdata, blockHitResult, this);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/ShulkerBullet.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/ShulkerBullet.java.patch
new file mode 100644
index 0000000000..bac5f4b417
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/ShulkerBullet.java.patch
@@ -0,0 +1,100 @@
+--- a/net/minecraft/world/entity/projectile/ShulkerBullet.java
++++ b/net/minecraft/world/entity/projectile/ShulkerBullet.java
+@@ -31,6 +31,9 @@
+ import net.minecraft.world.phys.EntityHitResult;
+ import net.minecraft.world.phys.HitResult;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import org.bukkit.event.entity.EntityRemoveEvent;
++// CraftBukkit end
+ 
+ public class ShulkerBullet extends Projectile {
+ 
+@@ -60,8 +63,21 @@
+         this.finalTarget = target;
+         this.currentMoveDirection = Direction.UP;
+         this.selectNextMoveDirection(axis);
++        this.projectileSource = (org.bukkit.entity.LivingEntity) owner.getBukkitEntity(); // CraftBukkit
+     }
+ 
++    // CraftBukkit start
++    public Entity getTarget() {
++        return this.finalTarget;
++    }
++
++    public void setTarget(Entity e) {
++        this.finalTarget = e;
++        this.currentMoveDirection = Direction.UP;
++        this.selectNextMoveDirection(Direction.Axis.X);
++    }
++    // CraftBukkit end
++
+     @Override
+     public SoundSource getSoundSource() {
+         return SoundSource.HOSTILE;
+@@ -194,7 +210,7 @@
+     @Override
+     public void checkDespawn() {
+         if (this.level().getDifficulty() == Difficulty.PEACEFUL) {
+-            this.discard();
++            this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
+         }
+ 
+     }
+@@ -239,7 +255,7 @@
+         }
+ 
+         if (movingobjectposition != null && this.isAlive() && movingobjectposition.getType() != HitResult.Type.MISS) {
+-            this.hitTargetOrDeflectSelf(movingobjectposition);
++            this.preHitTargetOrDeflectSelf(movingobjectposition); // CraftBukkit - projectile hit event
+         }
+ 
+         ProjectileUtil.rotateTowardsMovement(this, 0.5F);
+@@ -312,7 +328,7 @@
+             if (entity instanceof LivingEntity) {
+                 LivingEntity entityliving1 = (LivingEntity) entity;
+ 
+-                entityliving1.addEffect(new MobEffectInstance(MobEffects.LEVITATION, 200), (Entity) MoreObjects.firstNonNull(entity1, this));
++                entityliving1.addEffect(new MobEffectInstance(MobEffects.LEVITATION, 200), (Entity) MoreObjects.firstNonNull(entity1, this), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
+             }
+         }
+ 
+@@ -326,14 +342,20 @@
+     }
+ 
+     private void destroy() {
+-        this.discard();
++        // CraftBukkit start - add Bukkit remove cause
++        this.destroy(null);
++    }
++
++    private void destroy(EntityRemoveEvent.Cause cause) {
++        this.discard(cause);
++        // CraftBukkit end
+         this.level().gameEvent((Holder) GameEvent.ENTITY_DAMAGE, this.position(), GameEvent.Context.of((Entity) this));
+     }
+ 
+     @Override
+     protected void onHit(HitResult hitResult) {
+         super.onHit(hitResult);
+-        this.destroy();
++        this.destroy(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
+     }
+ 
+     @Override
+@@ -348,9 +370,14 @@
+ 
+     @Override
+     public boolean hurtServer(ServerLevel world, DamageSource source, float amount) {
++        // CraftBukkit start
++        if (org.bukkit.craftbukkit.event.CraftEventFactory.handleNonLivingEntityDamageEvent(this, source, amount, false)) {
++            return false;
++        }
++        // CraftBukkit end
+         this.playSound(SoundEvents.SHULKER_BULLET_HURT, 1.0F, 1.0F);
+         world.sendParticles(ParticleTypes.CRIT, this.getX(), this.getY(), this.getZ(), 15, 0.2D, 0.2D, 0.2D, 0.0D);
+-        this.destroy();
++        this.destroy(EntityRemoveEvent.Cause.DEATH); // CraftBukkit - add Bukkit remove cause
+         return true;
+     }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntitySmallFireball.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/SmallFireball.java.patch
similarity index 53%
rename from paper-server/patches/sources/net/minecraft/world/entity/projectile/EntitySmallFireball.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/projectile/SmallFireball.java.patch
index a975722179..65522ba256 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntitySmallFireball.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/SmallFireball.java.patch
@@ -1,30 +1,29 @@
---- a/net/minecraft/world/entity/projectile/EntitySmallFireball.java
-+++ b/net/minecraft/world/entity/projectile/EntitySmallFireball.java
-@@ -16,6 +16,11 @@
- import net.minecraft.world.phys.MovingObjectPositionEntity;
- import net.minecraft.world.phys.Vec3D;
- 
+--- a/net/minecraft/world/entity/projectile/SmallFireball.java
++++ b/net/minecraft/world/entity/projectile/SmallFireball.java
+@@ -15,6 +15,10 @@
+ import net.minecraft.world.phys.EntityHitResult;
+ import net.minecraft.world.phys.HitResult;
+ import net.minecraft.world.phys.Vec3;
 +// CraftBukkit start
 +import org.bukkit.event.entity.EntityCombustByEntityEvent;
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +// CraftBukkit end
-+
- public class EntitySmallFireball extends EntityFireballFireball {
  
-     public EntitySmallFireball(EntityTypes<? extends EntitySmallFireball> entitytypes, World world) {
-@@ -24,6 +29,11 @@
+ public class SmallFireball extends Fireball {
  
-     public EntitySmallFireball(World world, EntityLiving entityliving, Vec3D vec3d) {
-         super(EntityTypes.SMALL_FIREBALL, entityliving, vec3d, world);
+@@ -24,6 +28,11 @@
+ 
+     public SmallFireball(Level world, LivingEntity owner, Vec3 velocity) {
+         super(EntityType.SMALL_FIREBALL, owner, velocity, world);
 +        // CraftBukkit start
-+        if (this.getOwner() != null && this.getOwner() instanceof EntityInsentient) {
-+            isIncendiary = (world instanceof WorldServer worldserver) && worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING);
++        if (this.getOwner() != null && this.getOwner() instanceof Mob) {
++            this.isIncendiary = (world instanceof ServerLevel worldserver) && worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING);
 +        }
 +        // CraftBukkit end
      }
  
-     public EntitySmallFireball(World world, double d0, double d1, double d2, Vec3D vec3d) {
-@@ -40,7 +50,14 @@
+     public SmallFireball(Level world, double x, double y, double z, Vec3 velocity) {
+@@ -40,7 +49,14 @@
              Entity entity1 = this.getOwner();
              int i = entity.getRemainingFireTicks();
  
@@ -40,22 +39,22 @@
              DamageSource damagesource = this.damageSources().fireball(this, entity1);
  
              if (!entity.hurtServer(worldserver, damagesource, 5.0F)) {
-@@ -60,10 +77,10 @@
-         if (world instanceof WorldServer worldserver) {
+@@ -60,10 +76,10 @@
+         if (world instanceof ServerLevel worldserver) {
              Entity entity = this.getOwner();
  
--            if (!(entity instanceof EntityInsentient) || worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
-+            if (isIncendiary) { // CraftBukkit
-                 BlockPosition blockposition = movingobjectpositionblock.getBlockPos().relative(movingobjectpositionblock.getDirection());
+-            if (!(entity instanceof Mob) || worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
++            if (this.isIncendiary) { // CraftBukkit
+                 BlockPos blockposition = blockHitResult.getBlockPos().relative(blockHitResult.getDirection());
  
 -                if (this.level().isEmptyBlock(blockposition)) {
 +                if (this.level().isEmptyBlock(blockposition) && !org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(this.level(), blockposition, this).isCancelled()) { // CraftBukkit
-                     this.level().setBlockAndUpdate(blockposition, BlockFireAbstract.getState(this.level(), blockposition));
+                     this.level().setBlockAndUpdate(blockposition, BaseFireBlock.getState(this.level(), blockposition));
                  }
              }
-@@ -75,7 +92,7 @@
-     protected void onHit(MovingObjectPosition movingobjectposition) {
-         super.onHit(movingobjectposition);
+@@ -75,7 +91,7 @@
+     protected void onHit(HitResult hitResult) {
+         super.onHit(hitResult);
          if (!this.level().isClientSide) {
 -            this.discard();
 +            this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/Snowball.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/Snowball.java.patch
new file mode 100644
index 0000000000..8d2ce7e8d8
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/Snowball.java.patch
@@ -0,0 +1,21 @@
+--- a/net/minecraft/world/entity/projectile/Snowball.java
++++ b/net/minecraft/world/entity/projectile/Snowball.java
+@@ -13,6 +13,9 @@
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.phys.EntityHitResult;
+ import net.minecraft.world.phys.HitResult;
++// CraftBukkit start
++import org.bukkit.event.entity.EntityRemoveEvent;
++// CraftBukkit end
+ 
+ public class Snowball extends ThrowableItemProjectile {
+ 
+@@ -65,7 +68,7 @@
+         super.onHit(hitResult);
+         if (!this.level().isClientSide) {
+             this.level().broadcastEntityEvent(this, (byte) 3);
+-            this.discard();
++            this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
+         }
+ 
+     }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/SpectralArrow.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/SpectralArrow.java.patch
new file mode 100644
index 0000000000..629d60da70
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/SpectralArrow.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/entity/projectile/SpectralArrow.java
++++ b/net/minecraft/world/entity/projectile/SpectralArrow.java
+@@ -41,7 +41,7 @@
+         super.doPostHurtEffects(target);
+         MobEffectInstance mobeffect = new MobEffectInstance(MobEffects.GLOWING, this.duration, 0);
+ 
+-        target.addEffect(mobeffect, this.getEffectSource());
++        target.addEffect(mobeffect, this.getEffectSource(), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ARROW); // CraftBukkit
+     }
+ 
+     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrowableItemProjectile.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrowableItemProjectile.java.patch
new file mode 100644
index 0000000000..6471dbc99e
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrowableItemProjectile.java.patch
@@ -0,0 +1,15 @@
+--- a/net/minecraft/world/entity/projectile/ThrowableItemProjectile.java
++++ b/net/minecraft/world/entity/projectile/ThrowableItemProjectile.java
+@@ -34,6 +34,12 @@
+ 
+     protected abstract Item getDefaultItem();
+ 
++    // CraftBukkit start
++    public Item getDefaultItemPublic() {
++        return this.getDefaultItem();
++    }
++    // CraftBukkit end
++
+     @Override
+     public ItemStack getItem() {
+         return (ItemStack) this.getEntityData().get(ThrowableItemProjectile.DATA_ITEM_STACK);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityProjectile.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrowableProjectile.java.patch
similarity index 52%
rename from paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityProjectile.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrowableProjectile.java.patch
index d6b202b2f3..db8a43fd04 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityProjectile.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrowableProjectile.java.patch
@@ -1,9 +1,9 @@
---- a/net/minecraft/world/entity/projectile/EntityProjectile.java
-+++ b/net/minecraft/world/entity/projectile/EntityProjectile.java
+--- a/net/minecraft/world/entity/projectile/ThrowableProjectile.java
++++ b/net/minecraft/world/entity/projectile/ThrowableProjectile.java
 @@ -63,7 +63,7 @@
          this.applyEffectsFromBlocks();
          super.tick();
-         if (movingobjectposition.getType() != MovingObjectPosition.EnumMovingObjectType.MISS && this.isAlive()) {
+         if (movingobjectposition.getType() != HitResult.Type.MISS && this.isAlive()) {
 -            this.hitTargetOrDeflectSelf(movingobjectposition);
 +            this.preHitTargetOrDeflectSelf(movingobjectposition); // CraftBukkit - projectile hit event
          }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityEgg.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownEgg.java.patch
similarity index 57%
rename from paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityEgg.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownEgg.java.patch
index 025e842e52..190a34a377 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityEgg.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownEgg.java.patch
@@ -1,25 +1,56 @@
---- a/net/minecraft/world/entity/projectile/EntityEgg.java
-+++ b/net/minecraft/world/entity/projectile/EntityEgg.java
-@@ -14,6 +14,16 @@
- import net.minecraft.world.phys.MovingObjectPosition;
- import net.minecraft.world.phys.MovingObjectPositionEntity;
+--- a/net/minecraft/world/entity/projectile/ThrownEgg.java
++++ b/net/minecraft/world/entity/projectile/ThrownEgg.java
+@@ -1,33 +1,39 @@
+ package net.minecraft.world.entity.projectile;
  
-+// CraftBukkit start
-+import net.minecraft.server.level.EntityPlayer;
+-import net.minecraft.core.particles.ItemParticleOption;
+-import net.minecraft.core.particles.ParticleTypes;
+-import net.minecraft.world.entity.EntityDimensions;
+ import net.minecraft.world.entity.EntitySpawnReason;
+-import net.minecraft.world.entity.EntityType;
+ import net.minecraft.world.entity.LivingEntity;
+-import net.minecraft.world.entity.animal.Chicken;
+ import net.minecraft.world.item.Item;
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.item.Items;
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.phys.EntityHitResult;
+ import net.minecraft.world.phys.HitResult;
++import net.minecraft.core.particles.ItemParticleOption;
++import net.minecraft.core.particles.ParticleTypes;
++import net.minecraft.server.level.ServerPlayer;
 +import net.minecraft.world.entity.Entity;
++import net.minecraft.world.entity.EntityDimensions;
 +import org.bukkit.entity.Ageable;
 +import org.bukkit.entity.EntityType;
 +import org.bukkit.entity.Player;
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +import org.bukkit.event.player.PlayerEggThrowEvent;
 +// CraftBukkit end
-+
- public class EntityEgg extends EntityProjectileThrowable {
  
-     private static final EntitySize ZERO_SIZED_DIMENSIONS = EntitySize.fixed(0.0F, 0.0F);
-@@ -52,30 +62,58 @@
-     protected void onHit(MovingObjectPosition movingobjectposition) {
-         super.onHit(movingobjectposition);
+ public class ThrownEgg extends ThrowableItemProjectile {
+ 
+     private static final EntityDimensions ZERO_SIZED_DIMENSIONS = EntityDimensions.fixed(0.0F, 0.0F);
+ 
+-    public ThrownEgg(EntityType<? extends ThrownEgg> type, Level world) {
++    public ThrownEgg(net.minecraft.world.entity.EntityType<? extends ThrownEgg> type, Level world) {
+         super(type, world);
+     }
+ 
+     public ThrownEgg(Level world, LivingEntity owner, ItemStack stack) {
+-        super(EntityType.EGG, owner, world, stack);
++        super(net.minecraft.world.entity.EntityType.EGG, owner, world, stack);
+     }
+ 
+     public ThrownEgg(Level world, double x, double y, double z, ItemStack stack) {
+-        super(EntityType.EGG, x, y, z, world, stack);
++        super(net.minecraft.world.entity.EntityType.EGG, x, y, z, world, stack);
+     }
+ 
+     @Override
+@@ -52,30 +58,58 @@
+     protected void onHit(HitResult hitResult) {
+         super.onHit(hitResult);
          if (!this.level().isClientSide) {
 -            if (this.random.nextInt(8) == 0) {
 +            // CraftBukkit start
@@ -39,7 +70,7 @@
 +                if (!hatching) {
 +                    b0 = 0;
 +                }
-+                if (shooter instanceof EntityPlayer) {
++                if (shooter instanceof ServerPlayer) {
 +                    PlayerEggThrowEvent event = new PlayerEggThrowEvent((Player) shooter.getBukkitEntity(), (org.bukkit.entity.Egg) this.getBukkitEntity(), hatching, b0, hatchingType);
 +                    this.level().getCraftServer().getPluginManager().callEvent(event);
 +
@@ -54,7 +85,7 @@
 +                // CraftBukkit end
 +
                  for (int i = 0; i < b0; ++i) {
--                    EntityChicken entitychicken = (EntityChicken) EntityTypes.CHICKEN.create(this.level(), EntitySpawnReason.TRIGGERED);
+-                    Chicken entitychicken = (Chicken) EntityType.CHICKEN.create(this.level(), EntitySpawnReason.TRIGGERED);
 +                    Entity entitychicken = this.level().getWorld().makeEntity(new org.bukkit.Location(this.level().getWorld(), this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F), hatchingType.getEntityClass()); // CraftBukkit
  
                      if (entitychicken != null) {
@@ -65,7 +96,7 @@
 +                        }
 +                        // CraftBukkit end
                          entitychicken.moveTo(this.getX(), this.getY(), this.getZ(), this.getYRot(), 0.0F);
-                         if (!entitychicken.fudgePositionAfterSizeChange(EntityEgg.ZERO_SIZED_DIMENSIONS)) {
+                         if (!entitychicken.fudgePositionAfterSizeChange(ThrownEgg.ZERO_SIZED_DIMENSIONS)) {
                              break;
                          }
  
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityEnderPearl.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownEnderpearl.java.patch
similarity index 63%
rename from paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityEnderPearl.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownEnderpearl.java.patch
index cebde2d249..b80080c890 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityEnderPearl.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownEnderpearl.java.patch
@@ -1,32 +1,34 @@
---- a/net/minecraft/world/entity/projectile/EntityEnderPearl.java
-+++ b/net/minecraft/world/entity/projectile/EntityEnderPearl.java
-@@ -29,6 +29,13 @@
- import net.minecraft.world.phys.MovingObjectPositionEntity;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import net.minecraft.world.level.dimension.WorldDimension;
+--- a/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
++++ b/net/minecraft/world/entity/projectile/ThrownEnderpearl.java
+@@ -24,10 +24,15 @@
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.block.Blocks;
+ import net.minecraft.world.level.block.state.BlockState;
++import net.minecraft.world.level.dimension.LevelStem;
+ import net.minecraft.world.level.portal.TeleportTransition;
+ import net.minecraft.world.phys.EntityHitResult;
+ import net.minecraft.world.phys.HitResult;
+ import net.minecraft.world.phys.Vec3;
 +import org.bukkit.event.entity.CreatureSpawnEvent;
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +import org.bukkit.event.player.PlayerTeleportEvent;
 +// CraftBukkit end
-+
- public class EntityEnderPearl extends EntityProjectileThrowable {
  
-     private long ticketTimer = 0L;
-@@ -140,12 +147,19 @@
-                         EntityPlayer entityplayer = (EntityPlayer) entity;
+ public class ThrownEnderpearl extends ThrowableItemProjectile {
+ 
+@@ -140,12 +145,19 @@
+                         ServerPlayer entityplayer = (ServerPlayer) entity;
  
                          if (entityplayer.connection.isAcceptingMessages()) {
 +                            // CraftBukkit start
-+                            EntityPlayer entityplayer1 = entityplayer.teleport(new TeleportTransition(worldserver, vec3d, Vec3D.ZERO, 0.0F, 0.0F, Relative.union(Relative.ROTATION, Relative.DELTA), TeleportTransition.DO_NOTHING, PlayerTeleportEvent.TeleportCause.ENDER_PEARL));
++                            ServerPlayer entityplayer1 = entityplayer.teleport(new TeleportTransition(worldserver, vec3d, Vec3.ZERO, 0.0F, 0.0F, Relative.union(Relative.ROTATION, Relative.DELTA), TeleportTransition.DO_NOTHING, PlayerTeleportEvent.TeleportCause.ENDER_PEARL));
 +                            if (entityplayer1 == null) {
 +                                this.discard(EntityRemoveEvent.Cause.HIT);
 +                                return;
 +                            }
 +                            // CraftBukkit end
                              if (this.random.nextFloat() < 0.05F && worldserver.getGameRules().getBoolean(GameRules.RULE_DOMOBSPAWNING)) {
-                                 EntityEndermite entityendermite = (EntityEndermite) EntityTypes.ENDERMITE.create(worldserver, EntitySpawnReason.TRIGGERED);
+                                 Endermite entityendermite = (Endermite) EntityType.ENDERMITE.create(worldserver, EntitySpawnReason.TRIGGERED);
  
                                  if (entityendermite != null) {
                                      entityendermite.moveTo(entity.getX(), entity.getY(), entity.getZ(), entity.getYRot(), entity.getXRot());
@@ -35,11 +37,11 @@
                                  }
                              }
  
-@@ -153,12 +167,12 @@
+@@ -153,12 +165,12 @@
                                  entity.setPortalCooldown();
                              }
  
--                            EntityPlayer entityplayer1 = entityplayer.teleport(new TeleportTransition(worldserver, vec3d, Vec3D.ZERO, 0.0F, 0.0F, Relative.union(Relative.ROTATION, Relative.DELTA), TeleportTransition.DO_NOTHING));
+-                            ServerPlayer entityplayer1 = entityplayer.teleport(new TeleportTransition(worldserver, vec3d, Vec3.ZERO, 0.0F, 0.0F, Relative.union(Relative.ROTATION, Relative.DELTA), TeleportTransition.DO_NOTHING));
 +                            // EntityPlayer entityplayer1 = entityplayer.teleport(new TeleportTransition(worldserver, vec3d, Vec3D.ZERO, 0.0F, 0.0F, Relative.union(Relative.ROTATION, Relative.DELTA), TeleportTransition.DO_NOTHING)); // CraftBukkit - moved up
  
                              if (entityplayer1 != null) {
@@ -50,7 +52,7 @@
                              }
  
                              this.playSound(worldserver, vec3d);
-@@ -173,11 +187,11 @@
+@@ -173,11 +185,11 @@
                          this.playSound(worldserver, vec3d);
                      }
  
@@ -64,21 +66,21 @@
                  return;
              }
          }
-@@ -210,7 +224,7 @@
+@@ -210,7 +222,7 @@
              entity = this.getOwner();
-             if (entity instanceof EntityPlayer entityplayer) {
+             if (entity instanceof ServerPlayer entityplayer) {
                  if (!entity.isAlive() && entityplayer.serverLevel().getGameRules().getBoolean(GameRules.RULE_ENDER_PEARLS_VANISH_ON_DEATH)) {
 -                    this.discard();
 +                    this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
                      break label30;
                  }
              }
-@@ -248,7 +262,7 @@
+@@ -248,7 +260,7 @@
  
      @Override
-     public boolean canTeleport(World world, World world1) {
--        if (world.dimension() == World.END && world1.dimension() == World.OVERWORLD) {
-+        if (world.getTypeKey() == WorldDimension.END && world1.getTypeKey() == WorldDimension.OVERWORLD) { // CraftBukkit
+     public boolean canTeleport(Level from, Level to) {
+-        if (from.dimension() == Level.END && to.dimension() == Level.OVERWORLD) {
++        if (from.getTypeKey() == LevelStem.END && to.getTypeKey() == LevelStem.OVERWORLD) { // CraftBukkit
              Entity entity = this.getOwner();
  
-             if (entity instanceof EntityPlayer) {
+             if (entity instanceof ServerPlayer) {
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityThrownExpBottle.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java.patch
similarity index 55%
rename from paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityThrownExpBottle.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java.patch
index 99263bbaab..9818d0cce1 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityThrownExpBottle.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java.patch
@@ -1,34 +1,33 @@
---- a/net/minecraft/world/entity/projectile/EntityThrownExpBottle.java
-+++ b/net/minecraft/world/entity/projectile/EntityThrownExpBottle.java
-@@ -10,6 +10,10 @@
- import net.minecraft.world.level.World;
- import net.minecraft.world.phys.MovingObjectPosition;
- 
+--- a/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java
++++ b/net/minecraft/world/entity/projectile/ThrownExperienceBottle.java
+@@ -9,6 +9,9 @@
+ import net.minecraft.world.item.Items;
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.phys.HitResult;
 +// CraftBukkit start
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +// CraftBukkit end
-+
- public class EntityThrownExpBottle extends EntityProjectileThrowable {
  
-     public EntityThrownExpBottle(EntityTypes<? extends EntityThrownExpBottle> entitytypes, World world) {
-@@ -38,11 +42,20 @@
-     protected void onHit(MovingObjectPosition movingobjectposition) {
-         super.onHit(movingobjectposition);
-         if (this.level() instanceof WorldServer) {
+ public class ThrownExperienceBottle extends ThrowableItemProjectile {
+ 
+@@ -38,11 +41,20 @@
+     protected void onHit(HitResult hitResult) {
+         super.onHit(hitResult);
+         if (this.level() instanceof ServerLevel) {
 -            this.level().levelEvent(2002, this.blockPosition(), -13083194);
 +            // CraftBukkit - moved to after event
 +            // this.level().levelEvent(2002, this.blockPosition(), -13083194);
              int i = 3 + this.level().random.nextInt(5) + this.level().random.nextInt(5);
  
 +            // CraftBukkit start
-+            org.bukkit.event.entity.ExpBottleEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callExpBottleEvent(this, movingobjectposition, i);
++            org.bukkit.event.entity.ExpBottleEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callExpBottleEvent(this, hitResult, i);
 +            i = event.getExperience();
 +            if (event.getShowEffect()) {
 +                this.level().levelEvent(2002, this.blockPosition(), -13083194);
 +            }
 +            // CraftBukkit end
 +
-             EntityExperienceOrb.award((WorldServer) this.level(), this.position(), i);
+             ExperienceOrb.award((ServerLevel) this.level(), this.position(), i);
 -            this.discard();
 +            this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
          }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownPotion.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownPotion.java.patch
new file mode 100644
index 0000000000..78d6c5996e
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownPotion.java.patch
@@ -0,0 +1,250 @@
+--- a/net/minecraft/world/entity/projectile/ThrownPotion.java
++++ b/net/minecraft/world/entity/projectile/ThrownPotion.java
+@@ -10,6 +10,7 @@
+ import net.minecraft.core.Holder;
+ import net.minecraft.core.component.DataComponents;
+ import net.minecraft.server.level.ServerLevel;
++import net.minecraft.server.level.ServerPlayer;
+ import net.minecraft.tags.BlockTags;
+ import net.minecraft.world.damagesource.DamageSource;
+ import net.minecraft.world.effect.MobEffect;
+@@ -17,7 +18,6 @@
+ import net.minecraft.world.entity.AreaEffectCloud;
+ import net.minecraft.world.entity.Entity;
+ import net.minecraft.world.entity.EntityType;
+-import net.minecraft.world.entity.LivingEntity;
+ import net.minecraft.world.entity.animal.axolotl.Axolotl;
+ import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.item.Item;
+@@ -28,18 +28,28 @@
+ import net.minecraft.world.item.alchemy.Potions;
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.block.AbstractCandleBlock;
++// CraftBukkit start
++import java.util.HashMap;
++import java.util.Map;
++import net.minecraft.world.effect.MobEffects;
++import net.minecraft.world.level.block.Blocks;
+ import net.minecraft.world.level.block.CampfireBlock;
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.phys.AABB;
+ import net.minecraft.world.phys.BlockHitResult;
+ import net.minecraft.world.phys.EntityHitResult;
+ import net.minecraft.world.phys.HitResult;
++import org.bukkit.craftbukkit.entity.CraftLivingEntity;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.entity.LivingEntity;
++import org.bukkit.event.entity.EntityRemoveEvent;
++// CraftBukkit end
+ 
+ public class ThrownPotion extends ThrowableItemProjectile {
+ 
+     public static final double SPLASH_RANGE = 4.0D;
+     private static final double SPLASH_RANGE_SQ = 16.0D;
+-    public static final Predicate<LivingEntity> WATER_SENSITIVE_OR_ON_FIRE = (entityliving) -> {
++    public static final Predicate<net.minecraft.world.entity.LivingEntity> WATER_SENSITIVE_OR_ON_FIRE = (entityliving) -> {
+         return entityliving.isSensitiveToWater() || entityliving.isOnFire();
+     };
+ 
+@@ -47,7 +57,7 @@
+         super(type, world);
+     }
+ 
+-    public ThrownPotion(Level world, LivingEntity owner, ItemStack stack) {
++    public ThrownPotion(Level world, net.minecraft.world.entity.LivingEntity owner, ItemStack stack) {
+         super(EntityType.POTION, owner, world, stack);
+     }
+ 
+@@ -101,28 +111,28 @@
+ 
+             if (potioncontents.is(Potions.WATER)) {
+                 this.applyWater(worldserver);
+-            } else if (potioncontents.hasEffects()) {
++            } else if (true || potioncontents.hasEffects()) { // CraftBukkit - Call event even if no effects to apply
+                 if (this.isLingering()) {
+-                    this.makeAreaOfEffectCloud(potioncontents);
++                    this.makeAreaOfEffectCloud(potioncontents, hitResult); // CraftBukkit - Pass MovingObjectPosition
+                 } else {
+-                    this.applySplash(worldserver, potioncontents.getAllEffects(), hitResult.getType() == HitResult.Type.ENTITY ? ((EntityHitResult) hitResult).getEntity() : null);
++                    this.applySplash(worldserver, potioncontents.getAllEffects(), hitResult.getType() == HitResult.Type.ENTITY ? ((EntityHitResult) hitResult).getEntity() : null, hitResult); // CraftBukkit - Pass MovingObjectPosition
+                 }
+             }
+ 
+             int i = potioncontents.potion().isPresent() && ((Potion) ((Holder) potioncontents.potion().get()).value()).hasInstantEffects() ? 2007 : 2002;
+ 
+             worldserver.levelEvent(i, this.blockPosition(), potioncontents.getColor());
+-            this.discard();
++            this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
+         }
+     }
+ 
+     private void applyWater(ServerLevel world) {
+         AABB axisalignedbb = this.getBoundingBox().inflate(4.0D, 2.0D, 4.0D);
+-        List<LivingEntity> list = this.level().getEntitiesOfClass(LivingEntity.class, axisalignedbb, ThrownPotion.WATER_SENSITIVE_OR_ON_FIRE);
++        List<net.minecraft.world.entity.LivingEntity> list = this.level().getEntitiesOfClass(net.minecraft.world.entity.LivingEntity.class, axisalignedbb, ThrownPotion.WATER_SENSITIVE_OR_ON_FIRE);
+         Iterator iterator = list.iterator();
+ 
+         while (iterator.hasNext()) {
+-            LivingEntity entityliving = (LivingEntity) iterator.next();
++            net.minecraft.world.entity.LivingEntity entityliving = (net.minecraft.world.entity.LivingEntity) iterator.next();
+             double d0 = this.distanceToSqr((Entity) entityliving);
+ 
+             if (d0 < 16.0D) {
+@@ -147,16 +157,17 @@
+ 
+     }
+ 
+-    private void applySplash(ServerLevel world, Iterable<MobEffectInstance> effects, @Nullable Entity entity) {
++    private void applySplash(ServerLevel worldserver, Iterable<MobEffectInstance> iterable, @Nullable Entity entity, HitResult position) { // CraftBukkit - Pass MovingObjectPosition
+         AABB axisalignedbb = this.getBoundingBox().inflate(4.0D, 2.0D, 4.0D);
+-        List<LivingEntity> list = world.getEntitiesOfClass(LivingEntity.class, axisalignedbb);
++        List<net.minecraft.world.entity.LivingEntity> list = worldserver.getEntitiesOfClass(net.minecraft.world.entity.LivingEntity.class, axisalignedbb);
++        Map<LivingEntity, Double> affected = new HashMap<LivingEntity, Double>(); // CraftBukkit
+ 
+         if (!list.isEmpty()) {
+             Entity entity1 = this.getEffectSource();
+             Iterator iterator = list.iterator();
+ 
+             while (iterator.hasNext()) {
+-                LivingEntity entityliving = (LivingEntity) iterator.next();
++                net.minecraft.world.entity.LivingEntity entityliving = (net.minecraft.world.entity.LivingEntity) iterator.next();
+ 
+                 if (entityliving.isAffectedByPotions()) {
+                     double d0 = this.distanceToSqr((Entity) entityliving);
+@@ -170,37 +181,63 @@
+                             d1 = 1.0D - Math.sqrt(d0) / 4.0D;
+                         }
+ 
+-                        Iterator iterator1 = effects.iterator();
++                        // CraftBukkit start
++                        affected.put((LivingEntity) entityliving.getBukkitEntity(), d1);
++                    }
++                }
++            }
++        }
+ 
+-                        while (iterator1.hasNext()) {
+-                            MobEffectInstance mobeffect = (MobEffectInstance) iterator1.next();
+-                            Holder<MobEffect> holder = mobeffect.getEffect();
++        org.bukkit.event.entity.PotionSplashEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPotionSplashEvent(this, position, affected);
++        if (!event.isCancelled() && list != null && !list.isEmpty()) { // do not process effects if there are no effects to process
++            Entity entity1 = this.getEffectSource();
++            for (LivingEntity victim : event.getAffectedEntities()) {
++                if (!(victim instanceof CraftLivingEntity)) {
++                    continue;
++                }
+ 
+-                            if (((MobEffect) holder.value()).isInstantenous()) {
+-                                ((MobEffect) holder.value()).applyInstantenousEffect(world, this, this.getOwner(), entityliving, mobeffect.getAmplifier(), d1);
+-                            } else {
+-                                int i = mobeffect.mapDuration((j) -> {
+-                                    return (int) (d1 * (double) j + 0.5D);
+-                                });
+-                                MobEffectInstance mobeffect1 = new MobEffectInstance(holder, i, mobeffect.getAmplifier(), mobeffect.isAmbient(), mobeffect.isVisible());
++                net.minecraft.world.entity.LivingEntity entityliving = ((CraftLivingEntity) victim).getHandle();
++                double d1 = event.getIntensity(victim);
++                // CraftBukkit end
+ 
+-                                if (!mobeffect1.endsWithin(20)) {
+-                                    entityliving.addEffect(mobeffect1, entity1);
+-                                }
+-                            }
++                Iterator iterator1 = iterable.iterator();
++
++                while (iterator1.hasNext()) {
++                    MobEffectInstance mobeffect = (MobEffectInstance) iterator1.next();
++                    Holder<MobEffect> holder = mobeffect.getEffect();
++                    // CraftBukkit start - Abide by PVP settings - for players only!
++                    if (!this.level().pvpMode && this.getOwner() instanceof ServerPlayer && entityliving instanceof ServerPlayer && entityliving != this.getOwner()) {
++                        MobEffect mobeffectlist = (MobEffect) holder.value();
++                        if (mobeffectlist == MobEffects.MOVEMENT_SLOWDOWN || mobeffectlist == MobEffects.DIG_SLOWDOWN || mobeffectlist == MobEffects.HARM || mobeffectlist == MobEffects.BLINDNESS
++                                || mobeffectlist == MobEffects.HUNGER || mobeffectlist == MobEffects.WEAKNESS || mobeffectlist == MobEffects.POISON) {
++                            continue;
+                         }
+                     }
++                    // CraftBukkit end
++
++                    if (((MobEffect) holder.value()).isInstantenous()) {
++                        ((MobEffect) holder.value()).applyInstantenousEffect(worldserver, this, this.getOwner(), entityliving, mobeffect.getAmplifier(), d1);
++                    } else {
++                        int i = mobeffect.mapDuration((j) -> {
++                            return (int) (d1 * (double) j + 0.5D);
++                        });
++                        MobEffectInstance mobeffect1 = new MobEffectInstance(holder, i, mobeffect.getAmplifier(), mobeffect.isAmbient(), mobeffect.isVisible());
++
++                        if (!mobeffect1.endsWithin(20)) {
++                            entityliving.addEffect(mobeffect1, entity1, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.POTION_SPLASH); // CraftBukkit
++                        }
++                    }
+                 }
+             }
+         }
+ 
+     }
+ 
+-    private void makeAreaOfEffectCloud(PotionContents potion) {
++    private void makeAreaOfEffectCloud(PotionContents potioncontents, HitResult position) { // CraftBukkit - Pass MovingObjectPosition
+         AreaEffectCloud entityareaeffectcloud = new AreaEffectCloud(this.level(), this.getX(), this.getY(), this.getZ());
+         Entity entity = this.getOwner();
+ 
+-        if (entity instanceof LivingEntity entityliving) {
++        if (entity instanceof net.minecraft.world.entity.LivingEntity entityliving) {
+             entityareaeffectcloud.setOwner(entityliving);
+         }
+ 
+@@ -208,8 +245,15 @@
+         entityareaeffectcloud.setRadiusOnUse(-0.5F);
+         entityareaeffectcloud.setWaitTime(10);
+         entityareaeffectcloud.setRadiusPerTick(-entityareaeffectcloud.getRadius() / (float) entityareaeffectcloud.getDuration());
+-        entityareaeffectcloud.setPotionContents(potion);
+-        this.level().addFreshEntity(entityareaeffectcloud);
++        entityareaeffectcloud.setPotionContents(potioncontents);
++        // CraftBukkit start
++        org.bukkit.event.entity.LingeringPotionSplashEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callLingeringPotionSplashEvent(this, position, entityareaeffectcloud);
++        if (!(event.isCancelled() || entityareaeffectcloud.isRemoved())) {
++            this.level().addFreshEntity(entityareaeffectcloud);
++        } else {
++            entityareaeffectcloud.discard(null); // CraftBukkit - add Bukkit remove cause
++        }
++        // CraftBukkit end
+     }
+ 
+     public boolean isLingering() {
+@@ -220,19 +264,31 @@
+         BlockState iblockdata = this.level().getBlockState(pos);
+ 
+         if (iblockdata.is(BlockTags.FIRE)) {
+-            this.level().destroyBlock(pos, false, this);
++            // CraftBukkit start
++            if (CraftEventFactory.callEntityChangeBlockEvent(this, pos, Blocks.AIR.defaultBlockState())) {
++                this.level().destroyBlock(pos, false, this);
++            }
++            // CraftBukkit end
+         } else if (AbstractCandleBlock.isLit(iblockdata)) {
+-            AbstractCandleBlock.extinguish((Player) null, iblockdata, this.level(), pos);
++            // CraftBukkit start
++            if (CraftEventFactory.callEntityChangeBlockEvent(this, pos, iblockdata.setValue(AbstractCandleBlock.LIT, false))) {
++                AbstractCandleBlock.extinguish((Player) null, iblockdata, this.level(), pos);
++            }
++            // CraftBukkit end
+         } else if (CampfireBlock.isLitCampfire(iblockdata)) {
+-            this.level().levelEvent((Player) null, 1009, pos, 0);
+-            CampfireBlock.dowse(this.getOwner(), this.level(), pos, iblockdata);
+-            this.level().setBlockAndUpdate(pos, (BlockState) iblockdata.setValue(CampfireBlock.LIT, false));
++            // CraftBukkit start
++            if (CraftEventFactory.callEntityChangeBlockEvent(this, pos, iblockdata.setValue(CampfireBlock.LIT, false))) {
++                this.level().levelEvent((Player) null, 1009, pos, 0);
++                CampfireBlock.dowse(this.getOwner(), this.level(), pos, iblockdata);
++                this.level().setBlockAndUpdate(pos, (BlockState) iblockdata.setValue(CampfireBlock.LIT, false));
++            }
++            // CraftBukkit end
+         }
+ 
+     }
+ 
+     @Override
+-    public DoubleDoubleImmutablePair calculateHorizontalHurtKnockbackDirection(LivingEntity target, DamageSource source) {
++    public DoubleDoubleImmutablePair calculateHorizontalHurtKnockbackDirection(net.minecraft.world.entity.LivingEntity target, DamageSource source) {
+         double d0 = target.position().x - this.position().x;
+         double d1 = target.position().z - this.position().z;
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownTrident.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownTrident.java.patch
new file mode 100644
index 0000000000..f49bdcfd6d
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/ThrownTrident.java.patch
@@ -0,0 +1,34 @@
+--- a/net/minecraft/world/entity/projectile/ThrownTrident.java
++++ b/net/minecraft/world/entity/projectile/ThrownTrident.java
+@@ -23,6 +23,9 @@
+ import net.minecraft.world.phys.BlockHitResult;
+ import net.minecraft.world.phys.EntityHitResult;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import org.bukkit.event.entity.EntityRemoveEvent;
++// CraftBukkit end
+ 
+ public class ThrownTrident extends AbstractArrow {
+ 
+@@ -76,10 +79,10 @@
+                     }
+                 }
+ 
+-                this.discard();
++                this.discard(EntityRemoveEvent.Cause.DROP); // CraftBukkit - add Bukkit remove cause
+             } else {
+                 if (!(entity instanceof Player) && this.position().distanceTo(entity.getEyePosition()) < (double) entity.getBbWidth() + 1.0D) {
+-                    this.discard();
++                    this.discard(EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - add Bukkit remove cause
+                     return;
+                 }
+ 
+@@ -137,7 +140,7 @@
+ 
+             world = this.level();
+             if (world instanceof ServerLevel) {
+-                worldserver = (ServerLevel) world;
++                ServerLevel worldserver = (ServerLevel) world; // CraftBukkit - decompile error
+                 EnchantmentHelper.doPostAttackEffectsWithItemSourceOnBreak(worldserver, entity, damagesource, this.getWeaponItem(), (item) -> {
+                     this.kill(worldserver);
+                 });
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityWitherSkull.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/WitherSkull.java.patch
similarity index 52%
rename from paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityWitherSkull.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/projectile/WitherSkull.java.patch
index d03789ba01..d671698548 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/EntityWitherSkull.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/WitherSkull.java.patch
@@ -1,40 +1,39 @@
---- a/net/minecraft/world/entity/projectile/EntityWitherSkull.java
-+++ b/net/minecraft/world/entity/projectile/EntityWitherSkull.java
-@@ -24,6 +24,11 @@
- import net.minecraft.world.phys.MovingObjectPositionEntity;
- import net.minecraft.world.phys.Vec3D;
- 
+--- a/net/minecraft/world/entity/projectile/WitherSkull.java
++++ b/net/minecraft/world/entity/projectile/WitherSkull.java
+@@ -23,6 +23,10 @@
+ import net.minecraft.world.phys.EntityHitResult;
+ import net.minecraft.world.phys.HitResult;
+ import net.minecraft.world.phys.Vec3;
 +// CraftBukkit start
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +import org.bukkit.event.entity.ExplosionPrimeEvent;
 +// CraftBukkit end
-+
- public class EntityWitherSkull extends EntityFireball {
  
-     private static final DataWatcherObject<Boolean> DATA_DANGEROUS = DataWatcher.defineId(EntityWitherSkull.class, DataWatcherRegistry.BOOLEAN);
-@@ -69,7 +74,7 @@
+ public class WitherSkull extends AbstractHurtingProjectile {
+ 
+@@ -69,7 +73,7 @@
                      if (entity.isAlive()) {
-                         EnchantmentManager.doPostAttackEffects(worldserver, entity, damagesource);
+                         EnchantmentHelper.doPostAttackEffects(worldserver, entity, damagesource);
                      } else {
 -                        entityliving.heal(5.0F);
 +                        entityliving.heal(5.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.WITHER); // CraftBukkit
                      }
                  }
              } else {
-@@ -86,7 +91,7 @@
+@@ -86,7 +90,7 @@
                  }
  
                  if (b0 > 0) {
--                    entityliving.addEffect(new MobEffect(MobEffects.WITHER, 20 * b0, 1), this.getEffectSource());
-+                    entityliving.addEffect(new MobEffect(MobEffects.WITHER, 20 * b0, 1), this.getEffectSource(), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
+-                    entityliving.addEffect(new MobEffectInstance(MobEffects.WITHER, 20 * b0, 1), this.getEffectSource());
++                    entityliving.addEffect(new MobEffectInstance(MobEffects.WITHER, 20 * b0, 1), this.getEffectSource(), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
                  }
              }
  
-@@ -97,8 +102,16 @@
-     protected void onHit(MovingObjectPosition movingobjectposition) {
-         super.onHit(movingobjectposition);
+@@ -97,8 +101,16 @@
+     protected void onHit(HitResult hitResult) {
+         super.onHit(hitResult);
          if (!this.level().isClientSide) {
--            this.level().explode(this, this.getX(), this.getY(), this.getZ(), 1.0F, false, World.a.MOB);
+-            this.level().explode(this, this.getX(), this.getY(), this.getZ(), 1.0F, false, Level.ExplosionInteraction.MOB);
 -            this.discard();
 +            // CraftBukkit start
 +            // this.level().explode(this, this.getX(), this.getY(), this.getZ(), 1.0F, false, World.a.MOB);
@@ -42,7 +41,7 @@
 +            this.level().getCraftServer().getPluginManager().callEvent(event);
 +
 +            if (!event.isCancelled()) {
-+                this.level().explode(this, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), World.a.MOB);
++                this.level().explode(this, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.MOB);
 +            }
 +            // CraftBukkit end
 +            this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.patch b/paper-server/patches/sources/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java.patch
similarity index 57%
rename from paper-server/patches/sources/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java.patch
index 1a127fc307..ef15dd2322 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java.patch
@@ -1,18 +1,17 @@
 --- a/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java
 +++ b/net/minecraft/world/entity/projectile/windcharge/AbstractWindCharge.java
-@@ -25,6 +25,10 @@
- import net.minecraft.world.phys.MovingObjectPositionEntity;
- import net.minecraft.world.phys.Vec3D;
- 
+@@ -24,6 +24,9 @@
+ import net.minecraft.world.phys.EntityHitResult;
+ import net.minecraft.world.phys.HitResult;
+ import net.minecraft.world.phys.Vec3;
 +// CraftBukkit start
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +// CraftBukkit end
-+
- public abstract class AbstractWindCharge extends EntityFireball implements ItemSupplier {
  
-     public static final ExplosionDamageCalculator EXPLOSION_DAMAGE_CALCULATOR = new SimpleExplosionDamageCalculator(true, false, Optional.empty(), BuiltInRegistries.BLOCK.get(TagsBlock.BLOCKS_WIND_CHARGE_EXPLOSIONS).map(Function.identity()));
-@@ -111,7 +115,7 @@
-             Vec3D vec3d1 = movingobjectpositionblock.getLocation().add(vec3d);
+ public abstract class AbstractWindCharge extends AbstractHurtingProjectile implements ItemSupplier {
+ 
+@@ -111,7 +114,7 @@
+             Vec3 vec3d1 = blockHitResult.getLocation().add(vec3d);
  
              this.explode(vec3d1);
 -            this.discard();
@@ -20,16 +19,16 @@
          }
  
      }
-@@ -120,7 +124,7 @@
-     protected void onHit(MovingObjectPosition movingobjectposition) {
-         super.onHit(movingobjectposition);
+@@ -120,7 +123,7 @@
+     protected void onHit(HitResult hitResult) {
+         super.onHit(hitResult);
          if (!this.level().isClientSide) {
 -            this.discard();
 +            this.discard(EntityRemoveEvent.Cause.HIT); // CraftBukkit - add Bukkit remove cause
          }
  
      }
-@@ -155,7 +159,7 @@
+@@ -155,7 +158,7 @@
      public void tick() {
          if (!this.level().isClientSide && this.getBlockY() > this.level().getMaxY() + 30) {
              this.explode(this.position());
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/raid/EntityRaider.patch b/paper-server/patches/sources/net/minecraft/world/entity/raid/EntityRaider.patch
deleted file mode 100644
index d38532195a..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/raid/EntityRaider.patch
+++ /dev/null
@@ -1,49 +0,0 @@
---- a/net/minecraft/world/entity/raid/EntityRaider.java
-+++ b/net/minecraft/world/entity/raid/EntityRaider.java
-@@ -41,6 +41,10 @@
- import net.minecraft.world.level.pathfinder.PathEntity;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+// CraftBukkit end
-+
- public abstract class EntityRaider extends EntityMonsterPatrolling {
- 
-     protected static final DataWatcherObject<Boolean> IS_CELEBRATING = DataWatcher.defineId(EntityRaider.class, DataWatcherRegistry.BOOLEAN);
-@@ -236,7 +240,7 @@
-             this.onItemPickup(entityitem);
-             this.setItemSlot(enumitemslot, itemstack);
-             this.take(entityitem, itemstack.getCount());
--            entityitem.discard();
-+            entityitem.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
-             this.getCurrentRaid().setLeader(this.getWave(), this);
-             this.setPatrolLeader(true);
-         } else {
-@@ -290,7 +294,7 @@
-         @Nullable
-         private EntityItem pursuedBannerItemEntity;
- 
--        public b(final EntityRaider entityraider) {
-+        public b(final T entityraider) { // CraftBukkit - decompile error
-             this.mob = entityraider;
-             this.setFlags(EnumSet.of(PathfinderGoal.Type.MOVE));
-         }
-@@ -547,7 +551,7 @@
-             while (iterator.hasNext()) {
-                 EntityRaider entityraider = (EntityRaider) iterator.next();
- 
--                entityraider.setTarget(this.mob.getTarget());
-+                entityraider.setTarget(this.mob.getTarget(), org.bukkit.event.entity.EntityTargetEvent.TargetReason.FOLLOW_LEADER, true); // CraftBukkit
-             }
- 
-         }
-@@ -564,7 +568,7 @@
-                 while (iterator.hasNext()) {
-                     EntityRaider entityraider = (EntityRaider) iterator.next();
- 
--                    entityraider.setTarget(entityliving);
-+                    entityraider.setTarget(this.mob.getTarget(), org.bukkit.event.entity.EntityTargetEvent.TargetReason.FOLLOW_LEADER, true); // CraftBukkit
-                     entityraider.setAggressive(true);
-                 }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/raid/Raid.patch b/paper-server/patches/sources/net/minecraft/world/entity/raid/Raid.java.patch
similarity index 74%
rename from paper-server/patches/sources/net/minecraft/world/entity/raid/Raid.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/raid/Raid.java.patch
index cff0acd8fa..708692a149 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/raid/Raid.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/raid/Raid.java.patch
@@ -1,22 +1,23 @@
 --- a/net/minecraft/world/entity/raid/Raid.java
 +++ b/net/minecraft/world/entity/raid/Raid.java
-@@ -177,6 +177,12 @@
-         return this.status == Raid.Status.LOSS;
-     }
+@@ -175,7 +175,13 @@
  
+     public boolean isLoss() {
+         return this.status == Raid.RaidStatus.LOSS;
++    }
++
 +    // CraftBukkit start
 +    public boolean isInProgress() {
-+        return this.status == Status.ONGOING;
-+    }
++        return this.status == RaidStatus.ONGOING;
+     }
 +    // CraftBukkit end
-+
+ 
      public float getTotalHealth() {
          return this.totalHealth;
-     }
 @@ -281,6 +287,7 @@
  
                  this.active = this.level.hasChunkAt(this.center);
-                 if (this.level.getDifficulty() == EnumDifficulty.PEACEFUL) {
+                 if (this.level.getDifficulty() == Difficulty.PEACEFUL) {
 +                    org.bukkit.craftbukkit.event.CraftEventFactory.callRaidStopEvent(this, org.bukkit.event.raid.RaidStopEvent.Reason.PEACE); // CraftBukkit
                      this.stop();
                      return;
@@ -24,7 +25,7 @@
 @@ -300,13 +307,16 @@
                  if (!this.level.isVillage(this.center)) {
                      if (this.groupsSpawned > 0) {
-                         this.status = Raid.Status.LOSS;
+                         this.status = Raid.RaidStatus.LOSS;
 +                        org.bukkit.craftbukkit.event.CraftEventFactory.callRaidFinishEvent(this, new java.util.ArrayList<>()); // CraftBukkit
                      } else {
 +                        org.bukkit.craftbukkit.event.CraftEventFactory.callRaidStopEvent(this, org.bukkit.event.raid.RaidStopEvent.Reason.NOT_IN_VILLAGE); // CraftBukkit
@@ -47,7 +48,7 @@
                          break;
                      }
 @@ -386,6 +397,7 @@
-                         this.status = Raid.Status.VICTORY;
+                         this.status = Raid.RaidStatus.VICTORY;
                          Iterator iterator = this.heroesOfTheVillage.iterator();
  
 +                        List<org.bukkit.entity.Player> winners = new java.util.ArrayList<>(); // CraftBukkit
@@ -56,8 +57,8 @@
                              Entity entity = this.level.getEntity(uuid);
 @@ -400,10 +412,12 @@
  
-                                         entityplayer.awardStat(StatisticList.RAID_WIN);
-                                         CriterionTriggers.RAID_WIN.trigger(entityplayer);
+                                         entityplayer.awardStat(Stats.RAID_WIN);
+                                         CriteriaTriggers.RAID_WIN.trigger(entityplayer);
 +                                        winners.add(entityplayer.getBukkitEntity()); // CraftBukkit
                                      }
                                  }
@@ -80,11 +81,11 @@
          int k = 0;
  
 +        // CraftBukkit start
-+        EntityRaider leader = null;
-+        List<EntityRaider> raiders = new java.util.ArrayList<>();
++        Raider leader = null;
++        List<Raider> raiders = new java.util.ArrayList<>();
 +        // CraftBukkit end
          while (k < j) {
-             Raid.Wave raid_wave = araid_wave[k];
+             Raid.RaiderType raid_wave = araid_wave[k];
              int l = this.getDefaultNumSpawns(raid_wave, i, flag1) + this.getPotentialBonusSpawns(raid_wave, this.random, i, difficultydamagescaler, flag1);
 @@ -559,9 +578,11 @@
                              entityraider.setPatrolLeader(true);
@@ -93,14 +94,14 @@
 +                            leader = entityraider; // CraftBukkit
                          }
  
-                         this.joinRaid(i, entityraider, blockposition, false);
+                         this.joinRaid(i, entityraider, pos, false);
 +                        raiders.add(entityraider); // CraftBukkit
-                         if (raid_wave.entityType == EntityTypes.RAVAGER) {
-                             EntityRaider entityraider1 = null;
+                         if (raid_wave.entityType == EntityType.RAVAGER) {
+                             Raider entityraider1 = null;
  
 @@ -580,6 +601,7 @@
-                                 this.joinRaid(i, entityraider1, blockposition, false);
-                                 entityraider1.moveTo(blockposition, 0.0F, 0.0F);
+                                 this.joinRaid(i, entityraider1, pos, false);
+                                 entityraider1.moveTo(pos, 0.0F, 0.0F);
                                  entityraider1.startRiding(entityraider);
 +                                raiders.add(entityraider); // CraftBukkit
                              }
@@ -113,13 +114,13 @@
 +        org.bukkit.craftbukkit.event.CraftEventFactory.callRaidSpawnWaveEvent(this, leader, raiders); // CraftBukkit
      }
  
-     public void joinRaid(int i, EntityRaider entityraider, @Nullable BlockPosition blockposition, boolean flag) {
+     public void joinRaid(int wave, Raider raider, @Nullable BlockPos pos, boolean existing) {
 @@ -612,7 +635,7 @@
-                 entityraider.finalizeSpawn(this.level, this.level.getCurrentDifficultyAt(blockposition), EntitySpawnReason.EVENT, (GroupDataEntity) null);
-                 entityraider.applyRaidBuffs(this.level, i, false);
-                 entityraider.setOnGround(true);
--                this.level.addFreshEntityWithPassengers(entityraider);
-+                this.level.addFreshEntityWithPassengers(entityraider, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.RAID); // CraftBukkit
+                 raider.finalizeSpawn(this.level, this.level.getCurrentDifficultyAt(pos), EntitySpawnReason.EVENT, (SpawnGroupData) null);
+                 raider.applyRaidBuffs(this.level, wave, false);
+                 raider.setOnGround(true);
+-                this.level.addFreshEntityWithPassengers(raider);
++                this.level.addFreshEntityWithPassengers(raider, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.RAID); // CraftBukkit
              }
          }
  
@@ -128,11 +129,11 @@
      }
  
 +    // CraftBukkit start - a method to get all raiders
-+    public java.util.Collection<EntityRaider> getRaiders() {
++    public java.util.Collection<Raider> getRaiders() {
 +        return this.groupRaiderMap.values().stream().flatMap(Set::stream).collect(java.util.stream.Collectors.toSet());
 +    }
 +    // CraftBukkit end
 +
-     private static enum Status {
+     private static enum RaidStatus {
  
          ONGOING, VICTORY, LOSS, STOPPED;
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/raid/Raider.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/raid/Raider.java.patch
new file mode 100644
index 0000000000..9035153406
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/raid/Raider.java.patch
@@ -0,0 +1,57 @@
+--- a/net/minecraft/world/entity/raid/Raider.java
++++ b/net/minecraft/world/entity/raid/Raider.java
+@@ -40,6 +40,9 @@
+ import net.minecraft.world.level.ServerLevelAccessor;
+ import net.minecraft.world.level.pathfinder.Path;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import org.bukkit.event.entity.EntityRemoveEvent;
++// CraftBukkit end
+ 
+ public abstract class Raider extends PatrollingMonster {
+ 
+@@ -236,7 +239,7 @@
+             this.onItemPickup(itemEntity);
+             this.setItemSlot(enumitemslot, itemstack);
+             this.take(itemEntity, itemstack.getCount());
+-            itemEntity.discard();
++            itemEntity.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
+             this.getCurrentRaid().setLeader(this.getWave(), this);
+             this.setPatrolLeader(true);
+         } else {
+@@ -290,7 +293,7 @@
+         @Nullable
+         private ItemEntity pursuedBannerItemEntity;
+ 
+-        public ObtainRaidLeaderBannerGoal(final Raider entityraider) {
++        public ObtainRaidLeaderBannerGoal(final T entityraider) { // CraftBukkit - decompile error
+             this.mob = entityraider;
+             this.setFlags(EnumSet.of(Goal.Flag.MOVE));
+         }
+@@ -518,7 +521,7 @@
+         }
+     }
+ 
+-    protected static class HoldGroundAttackGoal extends Goal {
++    public static class HoldGroundAttackGoal extends Goal {
+ 
+         private final Raider mob;
+         private final float hostileRadiusSqr;
+@@ -547,7 +550,7 @@
+             while (iterator.hasNext()) {
+                 Raider entityraider = (Raider) iterator.next();
+ 
+-                entityraider.setTarget(this.mob.getTarget());
++                entityraider.setTarget(this.mob.getTarget(), org.bukkit.event.entity.EntityTargetEvent.TargetReason.FOLLOW_LEADER, true); // CraftBukkit
+             }
+ 
+         }
+@@ -564,7 +567,7 @@
+                 while (iterator.hasNext()) {
+                     Raider entityraider = (Raider) iterator.next();
+ 
+-                    entityraider.setTarget(entityliving);
++                    entityraider.setTarget(this.mob.getTarget(), org.bukkit.event.entity.EntityTargetEvent.TargetReason.FOLLOW_LEADER, true); // CraftBukkit
+                     entityraider.setAggressive(true);
+                 }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/raid/PersistentRaid.patch b/paper-server/patches/sources/net/minecraft/world/entity/raid/Raids.java.patch
similarity index 70%
rename from paper-server/patches/sources/net/minecraft/world/entity/raid/PersistentRaid.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/raid/Raids.java.patch
index dc16854e76..b787b60fa1 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/raid/PersistentRaid.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/raid/Raids.java.patch
@@ -1,8 +1,8 @@
---- a/net/minecraft/world/entity/raid/PersistentRaid.java
-+++ b/net/minecraft/world/entity/raid/PersistentRaid.java
+--- a/net/minecraft/world/entity/raid/Raids.java
++++ b/net/minecraft/world/entity/raid/Raids.java
 @@ -115,11 +115,23 @@
  
-                 Raid raid = this.getOrCreateRaid(entityplayer.serverLevel(), blockposition2);
+                 Raid raid = this.getOrCreateRaid(player.serverLevel(), blockposition2);
  
 +                /* CraftBukkit - moved down
                  if (!raid.isStarted() && !this.raidMap.containsKey(raid.getId())) {
@@ -13,8 +13,8 @@
 -                if (!raid.isStarted() || raid.getRaidOmenLevel() < raid.getMaxRaidOmenLevel()) {
 +                if (!raid.isStarted() || (raid.isInProgress() && raid.getRaidOmenLevel() < raid.getMaxRaidOmenLevel())) { // CraftBukkit - fixed a bug with raid: players could add up Bad Omen level even when the raid had finished
 +                    // CraftBukkit start
-+                    if (!org.bukkit.craftbukkit.event.CraftEventFactory.callRaidTriggerEvent(raid, entityplayer)) {
-+                        entityplayer.removeEffect(net.minecraft.world.effect.MobEffects.RAID_OMEN);
++                    if (!org.bukkit.craftbukkit.event.CraftEventFactory.callRaidTriggerEvent(raid, player)) {
++                        player.removeEffect(net.minecraft.world.effect.MobEffects.RAID_OMEN);
 +                        return null;
 +                    }
 +
@@ -22,6 +22,6 @@
 +                        this.raidMap.put(raid.getId(), raid);
 +                    }
 +                    // CraftBukkit end
-                     raid.absorbRaidOmen(entityplayer);
+                     raid.absorbRaidOmen(player);
                  }
  
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/vehicle/AbstractBoat.patch b/paper-server/patches/sources/net/minecraft/world/entity/vehicle/AbstractBoat.java.patch
similarity index 79%
rename from paper-server/patches/sources/net/minecraft/world/entity/vehicle/AbstractBoat.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/vehicle/AbstractBoat.java.patch
index bc5ef3553c..ed8aa40790 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/vehicle/AbstractBoat.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/vehicle/AbstractBoat.java.patch
@@ -1,9 +1,9 @@
 --- a/net/minecraft/world/entity/vehicle/AbstractBoat.java
 +++ b/net/minecraft/world/entity/vehicle/AbstractBoat.java
-@@ -48,6 +48,15 @@
+@@ -47,6 +47,14 @@
+ import net.minecraft.world.phys.shapes.BooleanOp;
+ import net.minecraft.world.phys.shapes.Shapes;
  import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapes;
- 
 +// CraftBukkit start
 +import org.bukkit.Location;
 +import org.bukkit.craftbukkit.util.CraftLocation;
@@ -12,12 +12,11 @@
 +import org.bukkit.event.vehicle.VehicleEntityCollisionEvent;
 +import org.bukkit.event.vehicle.VehicleMoveEvent;
 +// CraftBukkit end
-+
+ 
  public abstract class AbstractBoat extends VehicleEntity implements Leashable {
  
-     private static final DataWatcherObject<Boolean> DATA_ID_PADDLE_LEFT = DataWatcher.defineId(AbstractBoat.class, DataWatcherRegistry.BOOLEAN);
-@@ -87,6 +96,14 @@
-     private Leashable.a leashData;
+@@ -87,6 +95,14 @@
+     private Leashable.LeashData leashData;
      private final Supplier<Item> dropItem;
  
 +    // CraftBukkit start
@@ -28,10 +27,10 @@
 +    public boolean landBoats = false;
 +    // CraftBukkit end
 +
-     public AbstractBoat(EntityTypes<? extends AbstractBoat> entitytypes, World world, Supplier<Item> supplier) {
-         super(entitytypes, world);
-         this.dropItem = supplier;
-@@ -182,9 +199,29 @@
+     public AbstractBoat(EntityType<? extends AbstractBoat> type, Level world, Supplier<Item> itemSupplier) {
+         super(type, world);
+         this.dropItem = itemSupplier;
+@@ -182,9 +198,29 @@
      public void push(Entity entity) {
          if (entity instanceof AbstractBoat) {
              if (entity.getBoundingBox().minY < this.getBoundingBox().maxY) {
@@ -61,7 +60,7 @@
              super.push(entity);
          }
  
-@@ -247,6 +284,7 @@
+@@ -247,6 +283,7 @@
          return this.getDirection().getClockWise();
      }
  
@@ -69,8 +68,8 @@
      @Override
      public void tick() {
          this.oldStatus = this.status;
-@@ -287,6 +325,21 @@
-             this.setDeltaMovement(Vec3D.ZERO);
+@@ -287,6 +324,21 @@
+             this.setDeltaMovement(Vec3.ZERO);
          }
  
 +        // CraftBukkit start
@@ -82,31 +81,32 @@
 +
 +        server.getPluginManager().callEvent(new org.bukkit.event.vehicle.VehicleUpdateEvent(vehicle));
 +
-+        if (lastLocation != null && !lastLocation.equals(to)) {
-+            VehicleMoveEvent event = new VehicleMoveEvent(vehicle, lastLocation, to);
++        if (this.lastLocation != null && !this.lastLocation.equals(to)) {
++            VehicleMoveEvent event = new VehicleMoveEvent(vehicle, this.lastLocation, to);
 +            server.getPluginManager().callEvent(event);
 +        }
-+        lastLocation = vehicle.getLocation();
++        this.lastLocation = vehicle.getLocation();
 +        // CraftBukkit end
          this.applyEffectsFromBlocks();
          this.applyEffectsFromBlocks();
          this.tickBubbleColumn();
-@@ -790,11 +843,18 @@
+@@ -790,11 +842,18 @@
  
      @Override
-     public void remove(Entity.RemovalReason entity_removalreason) {
+     public void remove(Entity.RemovalReason reason) {
+-        if (!this.level().isClientSide && reason.shouldDestroy() && this.isLeashed()) {
 +        // CraftBukkit start - add Bukkit remove cause
-+        this.remove(entity_removalreason, null);
++        this.remove(reason, null);
 +    }
 +
 +    @Override
 +    public void remove(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) {
 +        // CraftBukkit end
-         if (!this.level().isClientSide && entity_removalreason.shouldDestroy() && this.isLeashed()) {
++        if (!this.level().isClientSide && entity_removalreason.shouldDestroy() && this.isLeashed()) {
              this.dropLeash();
          }
  
--        super.remove(entity_removalreason);
+-        super.remove(reason);
 +        super.remove(entity_removalreason, cause); // CraftBukkit - add Bukkit remove cause
      }
  
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/vehicle/AbstractChestBoat.patch b/paper-server/patches/sources/net/minecraft/world/entity/vehicle/AbstractChestBoat.java.patch
similarity index 73%
rename from paper-server/patches/sources/net/minecraft/world/entity/vehicle/AbstractChestBoat.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/vehicle/AbstractChestBoat.java.patch
index 5b6e2c7ab9..8547e83551 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/vehicle/AbstractChestBoat.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/vehicle/AbstractChestBoat.java.patch
@@ -19,26 +19,27 @@
 @@ -70,11 +79,18 @@
  
      @Override
-     public void remove(Entity.RemovalReason entity_removalreason) {
+     public void remove(Entity.RemovalReason reason) {
+-        if (!this.level().isClientSide && reason.shouldDestroy()) {
 +        // CraftBukkit start - add Bukkit remove cause
-+        this.remove(entity_removalreason, null);
++        this.remove(reason, null);
 +    }
 +
 +    @Override
 +    public void remove(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) {
 +        // CraftBukkit end
-         if (!this.level().isClientSide && entity_removalreason.shouldDestroy()) {
-             InventoryUtils.dropContents(this.level(), (Entity) this, (IInventory) this);
++        if (!this.level().isClientSide && entity_removalreason.shouldDestroy()) {
+             Containers.dropContents(this.level(), (Entity) this, (Container) this);
          }
  
--        super.remove(entity_removalreason);
+-        super.remove(reason);
 +        super.remove(entity_removalreason, cause); // CraftBukkit - add Bukkit remove cause
      }
  
      @Override
 @@ -212,4 +228,51 @@
-     public void stopOpen(EntityHuman entityhuman) {
-         this.level().gameEvent((Holder) GameEvent.CONTAINER_CLOSE, this.position(), GameEvent.a.of((Entity) entityhuman));
+     public void stopOpen(Player player) {
+         this.level().gameEvent((Holder) GameEvent.CONTAINER_CLOSE, this.position(), GameEvent.Context.of((Entity) player));
      }
 +
 +    // CraftBukkit start
@@ -52,39 +53,39 @@
 +
 +    @Override
 +    public void onOpen(CraftHumanEntity who) {
-+        transaction.add(who);
++        this.transaction.add(who);
 +    }
 +
 +    @Override
 +    public void onClose(CraftHumanEntity who) {
-+        transaction.remove(who);
++        this.transaction.remove(who);
 +    }
 +
 +    @Override
 +    public List<HumanEntity> getViewers() {
-+        return transaction;
++        return this.transaction;
 +    }
 +
 +    @Override
 +    public InventoryHolder getOwner() {
-+        org.bukkit.entity.Entity entity = getBukkitEntity();
++        org.bukkit.entity.Entity entity = this.getBukkitEntity();
 +        if (entity instanceof InventoryHolder) return (InventoryHolder) entity;
 +        return null;
 +    }
 +
 +    @Override
 +    public int getMaxStackSize() {
-+        return maxStack;
++        return this.maxStack;
 +    }
 +
 +    @Override
 +    public void setMaxStackSize(int size) {
-+        maxStack = size;
++        this.maxStack = size;
 +    }
 +
 +    @Override
 +    public Location getLocation() {
-+        return getBukkitEntity().getLocation();
++        return this.getBukkitEntity().getLocation();
 +    }
 +    // CraftBukkit end
  }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.patch b/paper-server/patches/sources/net/minecraft/world/entity/vehicle/AbstractMinecart.java.patch
similarity index 63%
rename from paper-server/patches/sources/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/vehicle/AbstractMinecart.java.patch
index 0401e0ece4..13d6c99c04 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/vehicle/AbstractMinecart.java.patch
@@ -1,9 +1,9 @@
---- a/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.java
-+++ b/net/minecraft/world/entity/vehicle/EntityMinecartAbstract.java
-@@ -43,6 +43,14 @@
- import net.minecraft.world.phys.AxisAlignedBB;
- import net.minecraft.world.phys.Vec3D;
- 
+--- a/net/minecraft/world/entity/vehicle/AbstractMinecart.java
++++ b/net/minecraft/world/entity/vehicle/AbstractMinecart.java
+@@ -42,6 +42,13 @@
+ import net.minecraft.world.level.block.state.properties.RailShape;
+ import net.minecraft.world.phys.AABB;
+ import net.minecraft.world.phys.Vec3;
 +// CraftBukkit start
 +import org.bukkit.Location;
 +import org.bukkit.craftbukkit.util.CraftLocation;
@@ -11,12 +11,11 @@
 +import org.bukkit.event.vehicle.VehicleEntityCollisionEvent;
 +import org.bukkit.util.Vector;
 +// CraftBukkit end
-+
- public abstract class EntityMinecartAbstract extends VehicleEntity {
  
-     private static final Vec3D LOWERED_PASSENGER_ATTACHMENT = new Vec3D(0.0D, 0.0D, 0.0D);
-@@ -76,6 +84,17 @@
-         enummap.put(BlockPropertyTrackPosition.NORTH_EAST, Pair.of(baseblockposition2, baseblockposition1));
+ public abstract class AbstractMinecart extends VehicleEntity {
+ 
+@@ -76,6 +83,17 @@
+         enummap.put(RailShape.NORTH_EAST, Pair.of(baseblockposition2, baseblockposition1));
      });
  
 +    // CraftBukkit start
@@ -30,19 +29,19 @@
 +    public Double maxSpeed;
 +    // CraftBukkit end
 +
-     protected EntityMinecartAbstract(EntityTypes<?> entitytypes, World world) {
-         super(entitytypes, world);
+     protected AbstractMinecart(EntityType<?> type, Level world) {
+         super(type, world);
          this.blocksBuilding = true;
-@@ -101,7 +120,7 @@
+@@ -101,7 +119,7 @@
  
      @Nullable
-     public static <T extends EntityMinecartAbstract> T createMinecart(World world, double d0, double d1, double d2, EntityTypes<T> entitytypes, EntitySpawnReason entityspawnreason, ItemStack itemstack, @Nullable EntityHuman entityhuman) {
--        T t0 = (EntityMinecartAbstract) entitytypes.create(world, entityspawnreason);
-+        T t0 = (T) entitytypes.create(world, entityspawnreason); // CraftBukkit - decompile error
+     public static <T extends AbstractMinecart> T createMinecart(Level world, double x, double y, double z, EntityType<T> type, EntitySpawnReason reason, ItemStack stack, @Nullable Player player) {
+-        T t0 = (AbstractMinecart) type.create(world, reason);
++        T t0 = (T) type.create(world, reason); // CraftBukkit - decompile error
  
          if (t0 != null) {
-             t0.setInitialPos(d0, d1, d2);
-@@ -262,6 +281,14 @@
+             t0.setInitialPos(x, y, z);
+@@ -262,6 +280,14 @@
  
      @Override
      public void tick() {
@@ -57,7 +56,7 @@
          if (this.getHurtTime() > 0) {
              this.setHurtTime(this.getHurtTime() - 1);
          }
-@@ -271,8 +298,20 @@
+@@ -271,8 +297,20 @@
          }
  
          this.checkBelowWorld();
@@ -79,26 +78,26 @@
          this.updateInWaterStateAndDoFluidPushing();
          if (this.isInLava()) {
              this.lavaHurt();
-@@ -385,12 +424,16 @@
+@@ -385,12 +423,16 @@
  
-         this.setDeltaMovement(MathHelper.clamp(vec3d.x, -d0, d0), vec3d.y, MathHelper.clamp(vec3d.z, -d0, d0));
+         this.setDeltaMovement(Mth.clamp(vec3d.x, -d0, d0), vec3d.y, Mth.clamp(vec3d.z, -d0, d0));
          if (this.onGround()) {
 -            this.setDeltaMovement(this.getDeltaMovement().scale(0.5D));
 +            // CraftBukkit start - replace magic numbers with our variables
-+            this.setDeltaMovement(new Vec3D(this.getDeltaMovement().x * this.derailedX, this.getDeltaMovement().y * this.derailedY, this.getDeltaMovement().z * this.derailedZ));
++            this.setDeltaMovement(new Vec3(this.getDeltaMovement().x * this.derailedX, this.getDeltaMovement().y * this.derailedY, this.getDeltaMovement().z * this.derailedZ));
 +            // CraftBukkit end
          }
  
-         this.move(EnumMoveType.SELF, this.getDeltaMovement());
+         this.move(MoverType.SELF, this.getDeltaMovement());
          if (!this.onGround()) {
 -            this.setDeltaMovement(this.getDeltaMovement().scale(0.95D));
 +            // CraftBukkit start - replace magic numbers with our variables
-+            this.setDeltaMovement(new Vec3D(this.getDeltaMovement().x * this.flyingX, this.getDeltaMovement().y * this.flyingY, this.getDeltaMovement().z * this.flyingZ));
++            this.setDeltaMovement(new Vec3(this.getDeltaMovement().x * this.flyingX, this.getDeltaMovement().y * this.flyingY, this.getDeltaMovement().z * this.flyingZ));
 +            // CraftBukkit end
          }
  
      }
-@@ -521,6 +564,14 @@
+@@ -521,6 +563,14 @@
          if (!this.level().isClientSide) {
              if (!entity.noPhysics && !this.noPhysics) {
                  if (!this.hasPassenger(entity)) {
@@ -113,30 +112,30 @@
                      double d0 = entity.getX() - this.getX();
                      double d1 = entity.getZ() - this.getZ();
                      double d2 = d0 * d0 + d1 * d1;
-@@ -645,4 +696,26 @@
+@@ -645,4 +695,26 @@
      public boolean isFurnace() {
          return false;
      }
 +
 +    // CraftBukkit start - Methods for getting and setting flying and derailed velocity modifiers
 +    public Vector getFlyingVelocityMod() {
-+        return new Vector(flyingX, flyingY, flyingZ);
++        return new Vector(this.flyingX, this.flyingY, this.flyingZ);
 +    }
 +
 +    public void setFlyingVelocityMod(Vector flying) {
-+        flyingX = flying.getX();
-+        flyingY = flying.getY();
-+        flyingZ = flying.getZ();
++        this.flyingX = flying.getX();
++        this.flyingY = flying.getY();
++        this.flyingZ = flying.getZ();
 +    }
 +
 +    public Vector getDerailedVelocityMod() {
-+        return new Vector(derailedX, derailedY, derailedZ);
++        return new Vector(this.derailedX, this.derailedY, this.derailedZ);
 +    }
 +
 +    public void setDerailedVelocityMod(Vector derailed) {
-+        derailedX = derailed.getX();
-+        derailedY = derailed.getY();
-+        derailedZ = derailed.getZ();
++        this.derailedX = derailed.getX();
++        this.derailedY = derailed.getY();
++        this.derailedZ = derailed.getZ();
 +    }
 +    // CraftBukkit end
  }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/vehicle/EntityMinecartContainer.patch b/paper-server/patches/sources/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java.patch
similarity index 61%
rename from paper-server/patches/sources/net/minecraft/world/entity/vehicle/EntityMinecartContainer.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java.patch
index 4966dee1ee..3a4e5c2172 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/vehicle/EntityMinecartContainer.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java.patch
@@ -1,9 +1,9 @@
---- a/net/minecraft/world/entity/vehicle/EntityMinecartContainer.java
-+++ b/net/minecraft/world/entity/vehicle/EntityMinecartContainer.java
-@@ -21,6 +21,15 @@
+--- a/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
++++ b/net/minecraft/world/entity/vehicle/AbstractMinecartContainer.java
+@@ -20,6 +20,14 @@
+ import net.minecraft.world.level.Level;
  import net.minecraft.world.level.storage.loot.LootTable;
- import net.minecraft.world.phys.Vec3D;
- 
+ import net.minecraft.world.phys.Vec3;
 +// CraftBukkit start
 +import java.util.List;
 +import org.bukkit.Location;
@@ -12,11 +12,10 @@
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +import org.bukkit.inventory.InventoryHolder;
 +// CraftBukkit end
-+
- public abstract class EntityMinecartContainer extends EntityMinecartAbstract implements ContainerEntity {
  
-     private NonNullList<ItemStack> itemStacks;
-@@ -28,9 +37,50 @@
+ public abstract class AbstractMinecartContainer extends AbstractMinecart implements ContainerEntity {
+ 
+@@ -28,9 +36,50 @@
      public ResourceKey<LootTable> lootTable;
      public long lootTableSeed;
  
@@ -29,61 +28,62 @@
 +    }
 +
 +    public void onOpen(CraftHumanEntity who) {
-+        transaction.add(who);
++        this.transaction.add(who);
 +    }
 +
 +    public void onClose(CraftHumanEntity who) {
-+        transaction.remove(who);
++        this.transaction.remove(who);
 +    }
 +
 +    public List<HumanEntity> getViewers() {
-+        return transaction;
++        return this.transaction;
 +    }
 +
 +    public InventoryHolder getOwner() {
-+        org.bukkit.entity.Entity cart = getBukkitEntity();
++        org.bukkit.entity.Entity cart = this.getBukkitEntity();
 +        if(cart instanceof InventoryHolder) return (InventoryHolder) cart;
 +        return null;
 +    }
 +
 +    @Override
 +    public int getMaxStackSize() {
-+        return maxStack;
++        return this.maxStack;
 +    }
 +
 +    public void setMaxStackSize(int size) {
-+        maxStack = size;
++        this.maxStack = size;
 +    }
 +
 +    @Override
 +    public Location getLocation() {
-+        return getBukkitEntity().getLocation();
++        return this.getBukkitEntity().getLocation();
 +    }
 +    // CraftBukkit end
 +
-     protected EntityMinecartContainer(EntityTypes<?> entitytypes, World world) {
-         super(entitytypes, world);
+     protected AbstractMinecartContainer(EntityType<?> type, Level world) {
+         super(type, world);
 -        this.itemStacks = NonNullList.withSize(36, ItemStack.EMPTY);
 +        this.itemStacks = NonNullList.withSize(this.getContainerSize(), ItemStack.EMPTY); // CraftBukkit - SPIGOT-3513
      }
  
      @Override
-@@ -74,11 +124,18 @@
+@@ -74,11 +123,18 @@
  
      @Override
-     public void remove(Entity.RemovalReason entity_removalreason) {
+     public void remove(Entity.RemovalReason reason) {
+-        if (!this.level().isClientSide && reason.shouldDestroy()) {
 +        // CraftBukkit start - add Bukkit remove cause
-+        this.remove(entity_removalreason, null);
++        this.remove(reason, null);
 +    }
 +
 +    @Override
 +    public void remove(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) {
 +        // CraftBukkit end
-         if (!this.level().isClientSide && entity_removalreason.shouldDestroy()) {
-             InventoryUtils.dropContents(this.level(), (Entity) this, (IInventory) this);
++        if (!this.level().isClientSide && entity_removalreason.shouldDestroy()) {
+             Containers.dropContents(this.level(), (Entity) this, (Container) this);
          }
  
--        super.remove(entity_removalreason);
+-        super.remove(reason);
 +        super.remove(entity_removalreason, cause); // CraftBukkit - add Bukkit remove cause
      }
  
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/vehicle/EntityMinecartCommandBlock.patch b/paper-server/patches/sources/net/minecraft/world/entity/vehicle/EntityMinecartCommandBlock.patch
deleted file mode 100644
index 3d8ea2b73a..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/entity/vehicle/EntityMinecartCommandBlock.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/net/minecraft/world/entity/vehicle/EntityMinecartCommandBlock.java
-+++ b/net/minecraft/world/entity/vehicle/EntityMinecartCommandBlock.java
-@@ -135,5 +135,12 @@
-         public boolean isValid() {
-             return !EntityMinecartCommandBlock.this.isRemoved();
-         }
-+
-+        // CraftBukkit start
-+        @Override
-+        public org.bukkit.command.CommandSender getBukkitSender(CommandListenerWrapper wrapper) {
-+            return (org.bukkit.craftbukkit.entity.CraftMinecartCommand) EntityMinecartCommandBlock.this.getBukkitEntity();
-+        }
-+        // CraftBukkit end
-     }
- }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/vehicle/MinecartCommandBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/entity/vehicle/MinecartCommandBlock.java.patch
new file mode 100644
index 0000000000..10b864315b
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/entity/vehicle/MinecartCommandBlock.java.patch
@@ -0,0 +1,15 @@
+--- a/net/minecraft/world/entity/vehicle/MinecartCommandBlock.java
++++ b/net/minecraft/world/entity/vehicle/MinecartCommandBlock.java
+@@ -135,5 +135,12 @@
+         public boolean isValid() {
+             return !MinecartCommandBlock.this.isRemoved();
+         }
++
++        // CraftBukkit start
++        @Override
++        public org.bukkit.command.CommandSender getBukkitSender(CommandSourceStack wrapper) {
++            return (org.bukkit.craftbukkit.entity.CraftMinecartCommand) MinecartCommandBlock.this.getBukkitEntity();
++        }
++        // CraftBukkit end
+     }
+ }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/vehicle/EntityMinecartTNT.patch b/paper-server/patches/sources/net/minecraft/world/entity/vehicle/MinecartTNT.java.patch
similarity index 54%
rename from paper-server/patches/sources/net/minecraft/world/entity/vehicle/EntityMinecartTNT.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/vehicle/MinecartTNT.java.patch
index 0adf2b5f87..f255ea88dc 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/vehicle/EntityMinecartTNT.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/vehicle/MinecartTNT.java.patch
@@ -1,39 +1,38 @@
---- a/net/minecraft/world/entity/vehicle/EntityMinecartTNT.java
-+++ b/net/minecraft/world/entity/vehicle/EntityMinecartTNT.java
-@@ -26,6 +26,11 @@
- import net.minecraft.world.level.block.state.IBlockData;
- import net.minecraft.world.level.material.Fluid;
- 
+--- a/net/minecraft/world/entity/vehicle/MinecartTNT.java
++++ b/net/minecraft/world/entity/vehicle/MinecartTNT.java
+@@ -25,6 +25,10 @@
+ import net.minecraft.world.level.block.Blocks;
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.level.material.FluidState;
 +// CraftBukkit start
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +import org.bukkit.event.entity.ExplosionPrimeEvent;
 +// CraftBukkit end
-+
- public class EntityMinecartTNT extends EntityMinecartAbstract {
  
-     private static final byte EVENT_PRIME = 10;
-@@ -37,6 +42,7 @@
+ public class MinecartTNT extends AbstractMinecart {
+ 
+@@ -37,6 +41,7 @@
      public int fuse = -1;
      public float explosionPowerBase = 4.0F;
      public float explosionSpeedFactor = 1.0F;
 +    public boolean isIncendiary = false; // CraftBukkit - add field
  
-     public EntityMinecartTNT(EntityTypes<? extends EntityMinecartTNT> entitytypes, World world) {
-         super(entitytypes, world);
-@@ -117,8 +123,16 @@
-         if (world instanceof WorldServer worldserver) {
-             double d1 = Math.min(Math.sqrt(d0), 5.0D);
+     public MinecartTNT(EntityType<? extends MinecartTNT> type, Level world) {
+         super(type, world);
+@@ -117,8 +122,16 @@
+         if (world instanceof ServerLevel worldserver) {
+             double d1 = Math.min(Math.sqrt(power), 5.0D);
  
--            worldserver.explode(this, damagesource, (ExplosionDamageCalculator) null, this.getX(), this.getY(), this.getZ(), (float) ((double) this.explosionPowerBase + (double) this.explosionSpeedFactor * this.random.nextDouble() * 1.5D * d1), false, World.a.TNT);
+-            worldserver.explode(this, damageSource, (ExplosionDamageCalculator) null, this.getX(), this.getY(), this.getZ(), (float) ((double) this.explosionPowerBase + (double) this.explosionSpeedFactor * this.random.nextDouble() * 1.5D * d1), false, Level.ExplosionInteraction.TNT);
 -            this.discard();
 +            // CraftBukkit start
 +            ExplosionPrimeEvent event = new ExplosionPrimeEvent(this.getBukkitEntity(), (float) ((double) this.explosionPowerBase + (double) this.explosionSpeedFactor * this.random.nextDouble() * 1.5D * d1), this.isIncendiary);
 +            worldserver.getCraftServer().getPluginManager().callEvent(event);
 +            if (event.isCancelled()) {
-+                fuse = -1;
++                this.fuse = -1;
 +                return;
 +            }
-+            worldserver.explode(this, damagesource, (ExplosionDamageCalculator) null, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), World.a.TNT);
++            worldserver.explode(this, damageSource, (ExplosionDamageCalculator) null, this.getX(), this.getY(), this.getZ(), event.getRadius(), event.getFire(), Level.ExplosionInteraction.TNT);
 +            // CraftBukkit end
 +            this.discard(EntityRemoveEvent.Cause.EXPLODE); // CraftBukkit - add Bukkit remove cause
          }
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/vehicle/NewMinecartBehavior.patch b/paper-server/patches/sources/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java.patch
similarity index 76%
rename from paper-server/patches/sources/net/minecraft/world/entity/vehicle/NewMinecartBehavior.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java.patch
index c384676e80..689dd5c249 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/vehicle/NewMinecartBehavior.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java.patch
@@ -1,31 +1,30 @@
 --- a/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java
 +++ b/net/minecraft/world/entity/vehicle/NewMinecartBehavior.java
-@@ -28,6 +28,11 @@
- import net.minecraft.world.phys.AxisAlignedBB;
- import net.minecraft.world.phys.Vec3D;
- 
+@@ -27,6 +27,10 @@
+ import net.minecraft.world.level.block.state.properties.RailShape;
+ import net.minecraft.world.phys.AABB;
+ import net.minecraft.world.phys.Vec3;
 +// CraftBukkit start
 +import org.bukkit.entity.Vehicle;
 +import org.bukkit.event.vehicle.VehicleEntityCollisionEvent;
 +// CraftBukkit end
-+
+ 
  public class NewMinecartBehavior extends MinecartBehavior {
  
-     public static final int POS_ROT_LERP_TICKS = 3;
-@@ -516,6 +521,12 @@
+@@ -516,6 +520,12 @@
  
      @Override
-     public double getMaxSpeed(WorldServer worldserver) {
+     public double getMaxSpeed(ServerLevel world) {
 +        // CraftBukkit start
 +        Double maxSpeed = this.minecart.maxSpeed;
 +        if (maxSpeed != null) {
 +            return (this.minecart.isInWater() ? maxSpeed / 2.0D : maxSpeed);
 +        }
 +        // CraftBukkit end
-         return (double) worldserver.getGameRules().getInt(GameRules.RULE_MINECART_MAX_SPEED) * (this.minecart.isInWater() ? 0.5D : 1.0D) / 20.0D;
+         return (double) world.getGameRules().getInt(GameRules.RULE_MINECART_MAX_SPEED) * (this.minecart.isInWater() ? 0.5D : 1.0D) / 20.0D;
      }
  
-@@ -544,7 +555,7 @@
+@@ -544,7 +554,7 @@
  
      @Override
      public double getSlowdownFactor() {
@@ -34,10 +33,10 @@
      }
  
      @Override
-@@ -571,6 +582,14 @@
+@@ -571,6 +581,14 @@
                      Entity entity = (Entity) iterator.next();
  
-                     if (!(entity instanceof EntityHuman) && !(entity instanceof EntityIronGolem) && !(entity instanceof EntityMinecartAbstract) && !this.minecart.isVehicle() && !entity.isPassenger()) {
+                     if (!(entity instanceof Player) && !(entity instanceof IronGolem) && !(entity instanceof AbstractMinecart) && !this.minecart.isVehicle() && !entity.isPassenger()) {
 +                        // CraftBukkit start
 +                        VehicleEntityCollisionEvent collisionEvent = new VehicleEntityCollisionEvent((Vehicle) this.minecart.getBukkitEntity(), entity.getBukkitEntity());
 +                        this.level().getCraftServer().getPluginManager().callEvent(collisionEvent);
@@ -49,10 +48,10 @@
                          boolean flag = entity.startRiding(this.minecart);
  
                          if (flag) {
-@@ -597,6 +616,16 @@
+@@ -597,6 +615,16 @@
                      Entity entity = (Entity) iterator.next();
  
-                     if (entity instanceof EntityHuman || entity instanceof EntityIronGolem || entity instanceof EntityMinecartAbstract || this.minecart.isVehicle() || entity.isPassenger()) {
+                     if (entity instanceof Player || entity instanceof IronGolem || entity instanceof AbstractMinecart || this.minecart.isVehicle() || entity.isPassenger()) {
 +                        // CraftBukkit start
 +                        if (!this.minecart.isPassengerOfSameVehicle(entity)) {
 +                            VehicleEntityCollisionEvent collisionEvent = new VehicleEntityCollisionEvent((Vehicle) this.minecart.getBukkitEntity(), entity.getBukkitEntity());
@@ -66,10 +65,10 @@
                          entity.push((Entity) this.minecart);
                          flag = true;
                      }
-@@ -609,6 +638,14 @@
+@@ -609,6 +637,14 @@
                  Entity entity1 = (Entity) iterator1.next();
  
-                 if (!this.minecart.hasPassenger(entity1) && entity1.isPushable() && entity1 instanceof EntityMinecartAbstract) {
+                 if (!this.minecart.hasPassenger(entity1) && entity1.isPushable() && entity1 instanceof AbstractMinecart) {
 +                    // CraftBukkit start
 +                    VehicleEntityCollisionEvent collisionEvent = new VehicleEntityCollisionEvent((Vehicle) this.minecart.getBukkitEntity(), entity1.getBukkitEntity());
 +                    this.level().getCraftServer().getPluginManager().callEvent(collisionEvent);
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/vehicle/OldMinecartBehavior.patch b/paper-server/patches/sources/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java.patch
similarity index 83%
rename from paper-server/patches/sources/net/minecraft/world/entity/vehicle/OldMinecartBehavior.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java.patch
index e250c27928..67506888ef 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/vehicle/OldMinecartBehavior.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java.patch
@@ -1,21 +1,20 @@
 --- a/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java
 +++ b/net/minecraft/world/entity/vehicle/OldMinecartBehavior.java
-@@ -25,6 +25,11 @@
- import net.minecraft.world.phys.AxisAlignedBB;
- import net.minecraft.world.phys.Vec3D;
- 
+@@ -24,6 +24,10 @@
+ import net.minecraft.world.level.block.state.properties.RailShape;
+ import net.minecraft.world.phys.AABB;
+ import net.minecraft.world.phys.Vec3;
 +// CraftBukkit start
 +import org.bukkit.entity.Vehicle;
 +import org.bukkit.event.vehicle.VehicleEntityCollisionEvent;
 +// CraftBukkit end
-+
+ 
  public class OldMinecartBehavior extends MinecartBehavior {
  
-     private static final double MINECART_RIDABLE_THRESHOLD = 0.01D;
-@@ -454,8 +459,26 @@
+@@ -454,8 +458,26 @@
                      Entity entity = (Entity) iterator.next();
  
-                     if (!(entity instanceof EntityHuman) && !(entity instanceof EntityIronGolem) && !(entity instanceof EntityMinecartAbstract) && !this.minecart.isVehicle() && !entity.isPassenger()) {
+                     if (!(entity instanceof Player) && !(entity instanceof IronGolem) && !(entity instanceof AbstractMinecart) && !this.minecart.isVehicle() && !entity.isPassenger()) {
 +                        // CraftBukkit start
 +                        VehicleEntityCollisionEvent collisionEvent = new VehicleEntityCollisionEvent((Vehicle) this.minecart.getBukkitEntity(), entity.getBukkitEntity());
 +                        this.level().getCraftServer().getPluginManager().callEvent(collisionEvent);
@@ -39,10 +38,10 @@
                          entity.push((Entity) this.minecart);
                      }
                  }
-@@ -467,6 +490,14 @@
+@@ -467,6 +489,14 @@
                  Entity entity1 = (Entity) iterator1.next();
  
-                 if (!this.minecart.hasPassenger(entity1) && entity1.isPushable() && entity1 instanceof EntityMinecartAbstract) {
+                 if (!this.minecart.hasPassenger(entity1) && entity1.isPushable() && entity1 instanceof AbstractMinecart) {
 +                    // CraftBukkit start
 +                    VehicleEntityCollisionEvent collisionEvent = new VehicleEntityCollisionEvent((Vehicle) this.minecart.getBukkitEntity(), entity1.getBukkitEntity());
 +                    this.level().getCraftServer().getPluginManager().callEvent(collisionEvent);
@@ -54,10 +53,10 @@
                      entity1.push((Entity) this.minecart);
                  }
              }
-@@ -487,11 +518,17 @@
+@@ -487,11 +517,17 @@
  
      @Override
-     public double getMaxSpeed(WorldServer worldserver) {
+     public double getMaxSpeed(ServerLevel world) {
 +        // CraftBukkit start
 +        Double maxSpeed = this.minecart.maxSpeed;
 +        if (maxSpeed != null) {
diff --git a/paper-server/patches/sources/net/minecraft/world/entity/vehicle/VehicleEntity.patch b/paper-server/patches/sources/net/minecraft/world/entity/vehicle/VehicleEntity.java.patch
similarity index 82%
rename from paper-server/patches/sources/net/minecraft/world/entity/vehicle/VehicleEntity.patch
rename to paper-server/patches/sources/net/minecraft/world/entity/vehicle/VehicleEntity.java.patch
index 7f20fdff30..10fce15f79 100644
--- a/paper-server/patches/sources/net/minecraft/world/entity/vehicle/VehicleEntity.patch
+++ b/paper-server/patches/sources/net/minecraft/world/entity/vehicle/VehicleEntity.java.patch
@@ -1,7 +1,7 @@
 --- a/net/minecraft/world/entity/vehicle/VehicleEntity.java
 +++ b/net/minecraft/world/entity/vehicle/VehicleEntity.java
 @@ -17,6 +17,13 @@
- import net.minecraft.world.level.World;
+ import net.minecraft.world.level.Level;
  import net.minecraft.world.level.gameevent.GameEvent;
  
 +// CraftBukkit start
@@ -13,29 +13,29 @@
 +
  public abstract class VehicleEntity extends Entity {
  
-     protected static final DataWatcherObject<Integer> DATA_ID_HURT = DataWatcher.defineId(VehicleEntity.class, DataWatcherRegistry.INT);
+     protected static final EntityDataAccessor<Integer> DATA_ID_HURT = SynchedEntityData.defineId(VehicleEntity.class, EntityDataSerializers.INT);
 @@ -40,6 +47,18 @@
              return false;
          } else {
              boolean flag;
 +            // CraftBukkit start
 +            Vehicle vehicle = (Vehicle) this.getBukkitEntity();
-+            org.bukkit.entity.Entity attacker = (damagesource.getEntity() == null) ? null : damagesource.getEntity().getBukkitEntity();
++            org.bukkit.entity.Entity attacker = (source.getEntity() == null) ? null : source.getEntity().getBukkitEntity();
 +
-+            VehicleDamageEvent event = new VehicleDamageEvent(vehicle, attacker, (double) f);
++            VehicleDamageEvent event = new VehicleDamageEvent(vehicle, attacker, (double) amount);
 +            this.level().getCraftServer().getPluginManager().callEvent(event);
 +
 +            if (event.isCancelled()) {
 +                return false;
 +            }
-+            f = (float) event.getDamage();
++            amount = (float) event.getDamage();
 +            // CraftBukkit end
              label32:
              {
                  this.setHurtDir(-this.getHurtDir());
 @@ -65,9 +84,27 @@
  
-             if ((flag1 || this.getDamage() <= 40.0F) && !this.shouldSourceDestroy(damagesource)) {
+             if ((flag1 || this.getDamage() <= 40.0F) && !this.shouldSourceDestroy(source)) {
                  if (flag1) {
 -                    this.discard();
 +                    // CraftBukkit start
@@ -59,6 +59,6 @@
 +                    return true;
 +                }
 +                // CraftBukkit end
-                 this.destroy(worldserver, damagesource);
+                 this.destroy(world, source);
              }
  
diff --git a/paper-server/patches/sources/net/minecraft/world/food/FoodData.java.patch b/paper-server/patches/sources/net/minecraft/world/food/FoodData.java.patch
new file mode 100644
index 0000000000..e9b9982dab
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/food/FoodData.java.patch
@@ -0,0 +1,101 @@
+--- a/net/minecraft/world/food/FoodData.java
++++ b/net/minecraft/world/food/FoodData.java
+@@ -1,11 +1,14 @@
+ package net.minecraft.world.food;
+ 
++import net.minecraft.world.level.GameRules;
+ import net.minecraft.nbt.CompoundTag;
++import net.minecraft.network.protocol.game.ClientboundSetHealthPacket;
+ import net.minecraft.server.level.ServerLevel;
+ import net.minecraft.server.level.ServerPlayer;
+ import net.minecraft.util.Mth;
+ import net.minecraft.world.Difficulty;
+-import net.minecraft.world.level.GameRules;
++import net.minecraft.world.item.ItemStack;
++// CraftBukkit end
+ 
+ public class FoodData {
+ 
+@@ -13,6 +16,11 @@
+     public float saturationLevel = 5.0F;
+     public float exhaustionLevel;
+     private int tickTimer;
++    // CraftBukkit start
++    public int saturatedRegenRate = 10;
++    public int unsaturatedRegenRate = 80;
++    public int starvationRate = 80;
++    // CraftBukkit end
+ 
+     public FoodData() {}
+ 
+@@ -29,6 +37,20 @@
+         this.add(foodComponent.nutrition(), foodComponent.saturation());
+     }
+ 
++    // CraftBukkit start
++    public void eat(FoodProperties foodinfo, ItemStack itemstack, ServerPlayer entityplayer) {
++        int oldFoodLevel = this.foodLevel;
++
++        org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callFoodLevelChangeEvent(entityplayer, foodinfo.nutrition() + oldFoodLevel, itemstack);
++
++        if (!event.isCancelled()) {
++            this.add(event.getFoodLevel() - oldFoodLevel, foodinfo.saturation());
++        }
++
++        entityplayer.getBukkitEntity().sendHealthUpdate();
++    }
++    // CraftBukkit end
++
+     public void tick(ServerPlayer player) {
+         ServerLevel worldserver = player.serverLevel();
+         Difficulty enumdifficulty = worldserver.getDifficulty();
+@@ -38,7 +60,15 @@
+             if (this.saturationLevel > 0.0F) {
+                 this.saturationLevel = Math.max(this.saturationLevel - 1.0F, 0.0F);
+             } else if (enumdifficulty != Difficulty.PEACEFUL) {
+-                this.foodLevel = Math.max(this.foodLevel - 1, 0);
++                // CraftBukkit start
++                org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callFoodLevelChangeEvent(player, Math.max(this.foodLevel - 1, 0));
++
++                if (!event.isCancelled()) {
++                    this.foodLevel = event.getFoodLevel();
++                }
++
++                player.connection.send(new ClientboundSetHealthPacket(player.getBukkitEntity().getScaledHealth(), this.foodLevel, this.saturationLevel));
++                // CraftBukkit end
+             }
+         }
+ 
+@@ -46,23 +76,25 @@
+ 
+         if (flag && this.saturationLevel > 0.0F && player.isHurt() && this.foodLevel >= 20) {
+             ++this.tickTimer;
+-            if (this.tickTimer >= 10) {
++            if (this.tickTimer >= this.saturatedRegenRate) { // CraftBukkit
+                 float f = Math.min(this.saturationLevel, 6.0F);
+ 
+-                player.heal(f / 6.0F);
+-                this.addExhaustion(f);
++                player.heal(f / 6.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED); // CraftBukkit - added RegainReason
++                // this.addExhaustion(f); CraftBukkit - EntityExhaustionEvent
++                player.causeFoodExhaustion(f, org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.REGEN); // CraftBukkit - EntityExhaustionEvent
+                 this.tickTimer = 0;
+             }
+         } else if (flag && this.foodLevel >= 18 && player.isHurt()) {
+             ++this.tickTimer;
+-            if (this.tickTimer >= 80) {
+-                player.heal(1.0F);
+-                this.addExhaustion(6.0F);
++            if (this.tickTimer >= this.unsaturatedRegenRate) { // CraftBukkit - add regen rate manipulation
++                player.heal(1.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED); // CraftBukkit - added RegainReason
++                // this.addExhaustion(6.0F); CraftBukkit - EntityExhaustionEvent
++                player.causeFoodExhaustion(6.0f, org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.REGEN); // CraftBukkit - EntityExhaustionEvent
+                 this.tickTimer = 0;
+             }
+         } else if (this.foodLevel <= 0) {
+             ++this.tickTimer;
+-            if (this.tickTimer >= 80) {
++            if (this.tickTimer >= this.starvationRate) { // CraftBukkit - add regen rate manipulation
+                 if (player.getHealth() > 10.0F || enumdifficulty == Difficulty.HARD || player.getHealth() > 1.0F && enumdifficulty == Difficulty.NORMAL) {
+                     player.hurtServer(worldserver, player.damageSources().starve(), 1.0F);
+                 }
diff --git a/paper-server/patches/sources/net/minecraft/world/food/FoodInfo.patch b/paper-server/patches/sources/net/minecraft/world/food/FoodInfo.patch
deleted file mode 100644
index 294900c931..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/food/FoodInfo.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/net/minecraft/world/food/FoodInfo.java
-+++ b/net/minecraft/world/food/FoodInfo.java
-@@ -18,6 +18,10 @@
- import net.minecraft.world.item.component.ConsumableListener;
- import net.minecraft.world.level.World;
- 
-+// CraftBukkit start
-+import net.minecraft.server.level.EntityPlayer;
-+// CraftBukkit end
-+
- public record FoodInfo(int nutrition, float saturation, boolean canAlwaysEat) implements ConsumableListener {
- 
-     public static final Codec<FoodInfo> DIRECT_CODEC = RecordCodecBuilder.create((instance) -> {
-@@ -31,7 +35,7 @@
- 
-         world.playSound((EntityHuman) null, entityliving.getX(), entityliving.getY(), entityliving.getZ(), (SoundEffect) consumable.sound().value(), SoundCategory.NEUTRAL, 1.0F, randomsource.triangle(1.0F, 0.4F));
-         if (entityliving instanceof EntityHuman entityhuman) {
--            entityhuman.getFoodData().eat(this);
-+            entityhuman.getFoodData().eat(this, itemstack, (EntityPlayer) entityhuman); // CraftBukkit
-             world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.PLAYER_BURP, SoundCategory.PLAYERS, 0.5F, MathHelper.randomBetween(randomsource, 0.9F, 1.0F));
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/food/FoodMetaData.patch b/paper-server/patches/sources/net/minecraft/world/food/FoodMetaData.patch
deleted file mode 100644
index dc73325ee0..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/food/FoodMetaData.patch
+++ /dev/null
@@ -1,96 +0,0 @@
---- a/net/minecraft/world/food/FoodMetaData.java
-+++ b/net/minecraft/world/food/FoodMetaData.java
-@@ -7,12 +7,22 @@
- import net.minecraft.world.EnumDifficulty;
- import net.minecraft.world.level.GameRules;
- 
-+// CraftBukkit start
-+import net.minecraft.network.protocol.game.PacketPlayOutUpdateHealth;
-+import net.minecraft.world.item.ItemStack;
-+// CraftBukkit end
-+
- public class FoodMetaData {
- 
-     public int foodLevel = 20;
-     public float saturationLevel = 5.0F;
-     public float exhaustionLevel;
-     private int tickTimer;
-+    // CraftBukkit start
-+    public int saturatedRegenRate = 10;
-+    public int unsaturatedRegenRate = 80;
-+    public int starvationRate = 80;
-+    // CraftBukkit end
- 
-     public FoodMetaData() {}
- 
-@@ -29,6 +39,20 @@
-         this.add(foodinfo.nutrition(), foodinfo.saturation());
-     }
- 
-+    // CraftBukkit start
-+    public void eat(FoodInfo foodinfo, ItemStack itemstack, EntityPlayer entityplayer) {
-+        int oldFoodLevel = foodLevel;
-+
-+        org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callFoodLevelChangeEvent(entityplayer, foodinfo.nutrition() + oldFoodLevel, itemstack);
-+
-+        if (!event.isCancelled()) {
-+            this.add(event.getFoodLevel() - oldFoodLevel, foodinfo.saturation());
-+        }
-+
-+        entityplayer.getBukkitEntity().sendHealthUpdate();
-+    }
-+    // CraftBukkit end
-+
-     public void tick(EntityPlayer entityplayer) {
-         WorldServer worldserver = entityplayer.serverLevel();
-         EnumDifficulty enumdifficulty = worldserver.getDifficulty();
-@@ -38,7 +62,15 @@
-             if (this.saturationLevel > 0.0F) {
-                 this.saturationLevel = Math.max(this.saturationLevel - 1.0F, 0.0F);
-             } else if (enumdifficulty != EnumDifficulty.PEACEFUL) {
--                this.foodLevel = Math.max(this.foodLevel - 1, 0);
-+                // CraftBukkit start
-+                org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callFoodLevelChangeEvent(entityplayer, Math.max(this.foodLevel - 1, 0));
-+
-+                if (!event.isCancelled()) {
-+                    this.foodLevel = event.getFoodLevel();
-+                }
-+
-+                entityplayer.connection.send(new PacketPlayOutUpdateHealth(entityplayer.getBukkitEntity().getScaledHealth(), this.foodLevel, this.saturationLevel));
-+                // CraftBukkit end
-             }
-         }
- 
-@@ -46,23 +78,25 @@
- 
-         if (flag && this.saturationLevel > 0.0F && entityplayer.isHurt() && this.foodLevel >= 20) {
-             ++this.tickTimer;
--            if (this.tickTimer >= 10) {
-+            if (this.tickTimer >= this.saturatedRegenRate) { // CraftBukkit
-                 float f = Math.min(this.saturationLevel, 6.0F);
- 
--                entityplayer.heal(f / 6.0F);
--                this.addExhaustion(f);
-+                entityplayer.heal(f / 6.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED); // CraftBukkit - added RegainReason
-+                // this.addExhaustion(f); CraftBukkit - EntityExhaustionEvent
-+                entityplayer.causeFoodExhaustion(f, org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.REGEN); // CraftBukkit - EntityExhaustionEvent
-                 this.tickTimer = 0;
-             }
-         } else if (flag && this.foodLevel >= 18 && entityplayer.isHurt()) {
-             ++this.tickTimer;
--            if (this.tickTimer >= 80) {
--                entityplayer.heal(1.0F);
--                this.addExhaustion(6.0F);
-+            if (this.tickTimer >= this.unsaturatedRegenRate) { // CraftBukkit - add regen rate manipulation
-+                entityplayer.heal(1.0F, org.bukkit.event.entity.EntityRegainHealthEvent.RegainReason.SATIATED); // CraftBukkit - added RegainReason
-+                // this.addExhaustion(6.0F); CraftBukkit - EntityExhaustionEvent
-+                entityplayer.causeFoodExhaustion(6.0f, org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.REGEN); // CraftBukkit - EntityExhaustionEvent
-                 this.tickTimer = 0;
-             }
-         } else if (this.foodLevel <= 0) {
-             ++this.tickTimer;
--            if (this.tickTimer >= 80) {
-+            if (this.tickTimer >= this.starvationRate) { // CraftBukkit - add regen rate manipulation
-                 if (entityplayer.getHealth() > 10.0F || enumdifficulty == EnumDifficulty.HARD || entityplayer.getHealth() > 1.0F && enumdifficulty == EnumDifficulty.NORMAL) {
-                     entityplayer.hurtServer(worldserver, entityplayer.damageSources().starve(), 1.0F);
-                 }
diff --git a/paper-server/patches/sources/net/minecraft/world/food/FoodProperties.java.patch b/paper-server/patches/sources/net/minecraft/world/food/FoodProperties.java.patch
new file mode 100644
index 0000000000..a8c85757de
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/food/FoodProperties.java.patch
@@ -0,0 +1,19 @@
+--- a/net/minecraft/world/food/FoodProperties.java
++++ b/net/minecraft/world/food/FoodProperties.java
+@@ -5,6 +5,7 @@
+ import net.minecraft.network.RegistryFriendlyByteBuf;
+ import net.minecraft.network.codec.ByteBufCodecs;
+ import net.minecraft.network.codec.StreamCodec;
++import net.minecraft.server.level.ServerPlayer;
+ import net.minecraft.sounds.SoundEvent;
+ import net.minecraft.sounds.SoundEvents;
+ import net.minecraft.sounds.SoundSource;
+@@ -31,7 +32,7 @@
+ 
+         world.playSound((Player) null, user.getX(), user.getY(), user.getZ(), (SoundEvent) consumable.sound().value(), SoundSource.NEUTRAL, 1.0F, randomsource.triangle(1.0F, 0.4F));
+         if (user instanceof Player entityhuman) {
+-            entityhuman.getFoodData().eat(this);
++            entityhuman.getFoodData().eat(this, stack, (ServerPlayer) entityhuman); // CraftBukkit
+             world.playSound((Player) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEvents.PLAYER_BURP, SoundSource.PLAYERS, 0.5F, Mth.randomBetween(randomsource, 0.9F, 1.0F));
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/Container.patch b/paper-server/patches/sources/net/minecraft/world/inventory/AbstractContainerMenu.java.patch
similarity index 75%
rename from paper-server/patches/sources/net/minecraft/world/inventory/Container.patch
rename to paper-server/patches/sources/net/minecraft/world/inventory/AbstractContainerMenu.java.patch
index 89229c657f..4d44eda685 100644
--- a/paper-server/patches/sources/net/minecraft/world/inventory/Container.patch
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/AbstractContainerMenu.java.patch
@@ -1,15 +1,22 @@
---- a/net/minecraft/world/inventory/Container.java
-+++ b/net/minecraft/world/inventory/Container.java
-@@ -35,6 +35,20 @@
- import net.minecraft.world.level.block.entity.TileEntity;
+--- a/net/minecraft/world/inventory/AbstractContainerMenu.java
++++ b/net/minecraft/world/inventory/AbstractContainerMenu.java
+@@ -21,6 +21,8 @@
+ import net.minecraft.ReportedException;
+ import net.minecraft.core.NonNullList;
+ import net.minecraft.core.registries.BuiltInRegistries;
++import net.minecraft.network.chat.Component;
++import net.minecraft.network.protocol.game.ClientboundContainerSetSlotPacket;
+ import net.minecraft.server.level.ServerPlayer;
+ import net.minecraft.util.Mth;
+ import net.minecraft.world.Container;
+@@ -35,6 +37,18 @@
+ import net.minecraft.world.level.block.entity.BlockEntity;
  import org.slf4j.Logger;
  
 +// CraftBukkit start
 +import com.google.common.base.Preconditions;
 +import java.util.HashMap;
 +import java.util.Map;
-+import net.minecraft.network.chat.IChatBaseComponent;
-+import net.minecraft.network.protocol.game.PacketPlayOutSetSlot;
 +import org.bukkit.craftbukkit.inventory.CraftInventory;
 +import org.bukkit.craftbukkit.inventory.CraftItemStack;
 +import org.bukkit.event.Event.Result;
@@ -18,37 +25,37 @@
 +import org.bukkit.inventory.InventoryView;
 +// CraftBukkit end
 +
- public abstract class Container {
+ public abstract class AbstractContainerMenu {
  
      private static final Logger LOGGER = LogUtils.getLogger();
-@@ -67,6 +81,27 @@
+@@ -66,6 +80,27 @@
+     @Nullable
      private ContainerSynchronizer synchronizer;
      private boolean suppressRemoteUpdates;
- 
++
 +    // CraftBukkit start
 +    public boolean checkReachable = true;
 +    public abstract InventoryView getBukkitView();
-+    public void transferTo(Container other, org.bukkit.craftbukkit.entity.CraftHumanEntity player) {
++    public void transferTo(AbstractContainerMenu other, org.bukkit.craftbukkit.entity.CraftHumanEntity player) {
 +        InventoryView source = this.getBukkitView(), destination = other.getBukkitView();
 +        ((CraftInventory) source.getTopInventory()).getInventory().onClose(player);
 +        ((CraftInventory) source.getBottomInventory()).getInventory().onClose(player);
 +        ((CraftInventory) destination.getTopInventory()).getInventory().onOpen(player);
 +        ((CraftInventory) destination.getBottomInventory()).getInventory().onOpen(player);
 +    }
-+    private IChatBaseComponent title;
-+    public final IChatBaseComponent getTitle() {
++    private Component title;
++    public final Component getTitle() {
 +        Preconditions.checkState(this.title != null, "Title not set");
 +        return this.title;
 +    }
-+    public final void setTitle(IChatBaseComponent title) {
++    public final void setTitle(Component title) {
 +        Preconditions.checkState(this.title == null, "Title already set");
 +        this.title = title;
 +    }
 +    // CraftBukkit end
-+
-     protected Container(@Nullable Containers<?> containers, int i) {
+ 
+     protected AbstractContainerMenu(@Nullable MenuType<?> type, int syncId) {
          this.carried = ItemStack.EMPTY;
-         this.remoteSlots = NonNullList.create();
 @@ -192,6 +227,15 @@
  
      }
@@ -62,8 +69,8 @@
 +    }
 +    // CraftBukkit end
 +
-     public void removeSlotListener(ICrafting icrafting) {
-         this.containerListeners.remove(icrafting);
+     public void removeSlotListener(ContainerListener listener) {
+         this.containerListeners.remove(listener);
      }
 @@ -417,7 +461,7 @@
                  }
@@ -73,7 +80,7 @@
 +                    if (false && this.quickcraftSlots.size() == 1) { // CraftBukkit - treat everything as a drag since we are unable to easily call InventoryClickEvent instead
                          k = ((Slot) this.quickcraftSlots.iterator().next()).index;
                          this.resetQuickCraft();
-                         this.doClick(k, this.quickcraftType, InventoryClickType.PICKUP, entityhuman);
+                         this.doClick(k, this.quickcraftType, ClickType.PICKUP, player);
 @@ -433,6 +477,7 @@
                      l = this.getCarried().getCount();
                      Iterator iterator = this.quickcraftSlots.iterator();
@@ -83,7 +90,7 @@
                          Slot slot1 = (Slot) iterator.next();
                          ItemStack itemstack2 = this.getCarried();
 @@ -443,12 +488,48 @@
-                             int l1 = Math.min(getQuickCraftPlaceCount(this.quickcraftSlots, this.quickcraftType, itemstack1) + j1, k1);
+                             int l1 = Math.min(AbstractContainerMenu.getQuickCraftPlaceCount(this.quickcraftSlots, this.quickcraftType, itemstack1) + j1, k1);
  
                              l -= l1 - j1;
 -                            slot1.setByPlayer(itemstack1.copyWithCount(l1));
@@ -95,7 +102,7 @@
 -                    itemstack1.setCount(l);
 -                    this.setCarried(itemstack1);
 +                    // CraftBukkit start - InventoryDragEvent
-+                    InventoryView view = getBukkitView();
++                    InventoryView view = this.getBukkitView();
 +                    org.bukkit.inventory.ItemStack newcursor = CraftItemStack.asCraftMirror(itemstack1);
 +                    newcursor.setAmount(l);
 +                    Map<Integer, org.bukkit.inventory.ItemStack> eventmap = new HashMap<Integer, org.bukkit.inventory.ItemStack>();
@@ -108,7 +115,7 @@
 +                    this.setCarried(CraftItemStack.asNMSCopy(newcursor));
 +
 +                    InventoryDragEvent event = new InventoryDragEvent(view, (newcursor.getType() != org.bukkit.Material.AIR ? newcursor : null), CraftItemStack.asBukkitCopy(oldCursor), this.quickcraftType == 1, eventmap);
-+                    entityhuman.level().getCraftServer().getPluginManager().callEvent(event);
++                    player.level().getCraftServer().getPluginManager().callEvent(event);
 +
 +                    // Whether or not a change was made to the inventory that requires an update.
 +                    boolean needsUpdate = event.getResult() != Result.DEFAULT;
@@ -127,7 +134,7 @@
 +                        this.setCarried(oldCursor);
 +                    }
 +
-+                    if (needsUpdate && entityhuman instanceof EntityPlayer) {
++                    if (needsUpdate && player instanceof ServerPlayer) {
 +                        this.sendAllDataToRemote();
 +                    }
 +                    // CraftBukkit end
@@ -135,28 +142,28 @@
  
                  this.resetQuickCraft();
 @@ -466,8 +547,11 @@
-                 if (i == -999) {
+                 if (slotIndex == -999) {
                      if (!this.getCarried().isEmpty()) {
                          if (clickaction == ClickAction.PRIMARY) {
--                            entityhuman.drop(this.getCarried(), true);
+-                            player.drop(this.getCarried(), true);
 +                            // CraftBukkit start
 +                            ItemStack carried = this.getCarried();
                              this.setCarried(ItemStack.EMPTY);
-+                            entityhuman.drop(carried, true);
++                            player.drop(carried, true);
 +                            // CraftBukkit start
                          } else {
-                             entityhuman.drop(this.getCarried().split(1), true);
+                             player.drop(this.getCarried().split(1), true);
                          }
 @@ -530,6 +614,15 @@
                      }
  
                      slot.setChanged();
 +                    // CraftBukkit start - Make sure the client has the right slot contents
-+                    if (entityhuman instanceof EntityPlayer && slot.getMaxStackSize() != 64) {
-+                        ((EntityPlayer) entityhuman).connection.send(new PacketPlayOutSetSlot(this.containerId, this.incrementStateId(), slot.index, slot.getItem()));
++                    if (player instanceof ServerPlayer && slot.getMaxStackSize() != 64) {
++                        ((ServerPlayer) player).connection.send(new ClientboundContainerSetSlotPacket(this.containerId, this.incrementStateId(), slot.index, slot.getItem()));
 +                        // Updating a crafting inventory makes the client reset the result slot, have to send it again
 +                        if (this.getBukkitView().getType() == InventoryType.WORKBENCH || this.getBukkitView().getType() == InventoryType.CRAFTING) {
-+                            ((EntityPlayer) entityhuman).connection.send(new PacketPlayOutSetSlot(this.containerId, this.incrementStateId(), 0, this.getSlot(0).getItem()));
++                            ((ServerPlayer) player).connection.send(new ClientboundContainerSetSlotPacket(this.containerId, this.incrementStateId(), 0, this.getSlot(0).getItem()));
 +                        }
 +                    }
 +                    // CraftBukkit end
@@ -168,7 +175,7 @@
  
              if (!itemstack.isEmpty()) {
 +                this.setCarried(ItemStack.EMPTY); // CraftBukkit - SPIGOT-4556 - from below
-                 dropOrPlaceInInventory(entityhuman, itemstack);
+                 AbstractContainerMenu.dropOrPlaceInInventory(player, itemstack);
 -                this.setCarried(ItemStack.EMPTY);
 +                // this.setCarried(ItemStack.EMPTY); // CraftBukkit - moved up
              }
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/AbstractCraftingMenu.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/AbstractCraftingMenu.java.patch
new file mode 100644
index 0000000000..bda213246a
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/AbstractCraftingMenu.java.patch
@@ -0,0 +1,44 @@
+--- a/net/minecraft/world/inventory/AbstractCraftingMenu.java
++++ b/net/minecraft/world/inventory/AbstractCraftingMenu.java
+@@ -13,14 +13,17 @@
+ 
+     private final int width;
+     private final int height;
+-    public final CraftingContainer craftSlots;
++    public final TransientCraftingContainer craftSlots; // CraftBukkit
+     public final ResultContainer resultSlots = new ResultContainer();
+ 
+-    public AbstractCraftingMenu(MenuType<?> type, int syncId, int width, int height) {
+-        super(type, syncId);
+-        this.width = width;
+-        this.height = height;
+-        this.craftSlots = new TransientCraftingContainer(this, width, height);
++    public AbstractCraftingMenu(MenuType<?> containers, int i, int j, int k, Inventory playerInventory) { // CraftBukkit
++        super(containers, i);
++        this.width = j;
++        this.height = k;
++        // CraftBukkit start
++        this.craftSlots = new TransientCraftingContainer(this, j, k, playerInventory.player); // CraftBukkit - pass player
++        this.craftSlots.resultInventory = this.resultSlots; // CraftBukkit - let InventoryCrafting know about its result slot
++        // CraftBukkit end
+     }
+ 
+     protected Slot addResultSlot(Player player, int x, int y) {
+@@ -38,7 +41,7 @@
+ 
+     @Override
+     public RecipeBookMenu.PostPlaceAction handlePlacement(boolean craftAll, boolean creative, RecipeHolder<?> recipe, ServerLevel world, Inventory inventory) {
+-        RecipeHolder<CraftingRecipe> recipeholder1 = recipe;
++        RecipeHolder<CraftingRecipe> recipeholder1 = (RecipeHolder<CraftingRecipe>) recipe; // CraftBukkit - decompile error
+ 
+         this.beginPlacingRecipe();
+ 
+@@ -65,7 +68,7 @@
+                 }
+             }, this.width, this.height, list, list, inventory, recipeholder1, craftAll, creative);
+         } finally {
+-            this.finishPlacingRecipe(world, recipe);
++            this.finishPlacingRecipe(world, recipeholder1); // CraftBukkit - decompile error
+         }
+ 
+         return containerrecipebook_a;
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/AbstractCraftingMenu.patch b/paper-server/patches/sources/net/minecraft/world/inventory/AbstractCraftingMenu.patch
deleted file mode 100644
index d0ab6955ca..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/inventory/AbstractCraftingMenu.patch
+++ /dev/null
@@ -1,41 +0,0 @@
---- a/net/minecraft/world/inventory/AbstractCraftingMenu.java
-+++ b/net/minecraft/world/inventory/AbstractCraftingMenu.java
-@@ -13,14 +13,17 @@
- 
-     private final int width;
-     private final int height;
--    public final InventoryCrafting craftSlots;
-+    public final TransientCraftingContainer craftSlots; // CraftBukkit
-     public final InventoryCraftResult resultSlots = new InventoryCraftResult();
- 
--    public AbstractCraftingMenu(Containers<?> containers, int i, int j, int k) {
-+    public AbstractCraftingMenu(Containers<?> containers, int i, int j, int k, PlayerInventory playerInventory) { // CraftBukkit
-         super(containers, i);
-         this.width = j;
-         this.height = k;
--        this.craftSlots = new TransientCraftingContainer(this, j, k);
-+        // CraftBukkit start
-+        this.craftSlots = new TransientCraftingContainer(this, j, k, playerInventory.player); // CraftBukkit - pass player
-+        this.craftSlots.resultInventory = this.resultSlots; // CraftBukkit - let InventoryCrafting know about its result slot
-+        // CraftBukkit end
-     }
- 
-     protected Slot addResultSlot(EntityHuman entityhuman, int i, int j) {
-@@ -38,7 +41,7 @@
- 
-     @Override
-     public ContainerRecipeBook.a handlePlacement(boolean flag, boolean flag1, RecipeHolder<?> recipeholder, WorldServer worldserver, PlayerInventory playerinventory) {
--        RecipeHolder<RecipeCrafting> recipeholder1 = recipeholder;
-+        RecipeHolder<RecipeCrafting> recipeholder1 = (RecipeHolder<RecipeCrafting>) recipeholder; // CraftBukkit - decompile error
- 
-         this.beginPlacingRecipe();
- 
-@@ -65,7 +68,7 @@
-                 }
-             }, this.width, this.height, list, list, playerinventory, recipeholder1, flag, flag1);
-         } finally {
--            this.finishPlacingRecipe(worldserver, recipeholder);
-+            this.finishPlacingRecipe(worldserver, recipeholder1); // CraftBukkit - decompile error
-         }
- 
-         return containerrecipebook_a;
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/AbstractFurnaceMenu.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/AbstractFurnaceMenu.java.patch
new file mode 100644
index 0000000000..42a568418f
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/AbstractFurnaceMenu.java.patch
@@ -0,0 +1,60 @@
+--- a/net/minecraft/world/inventory/AbstractFurnaceMenu.java
++++ b/net/minecraft/world/inventory/AbstractFurnaceMenu.java
+@@ -17,6 +17,10 @@
+ import net.minecraft.world.item.crafting.RecipeType;
+ import net.minecraft.world.item.crafting.SingleRecipeInput;
+ import net.minecraft.world.level.Level;
++import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity;
++import org.bukkit.craftbukkit.inventory.CraftInventoryFurnace;
++import org.bukkit.craftbukkit.inventory.view.CraftFurnaceView;
++// CraftBukkit end
+ 
+ public abstract class AbstractFurnaceMenu extends RecipeBookMenu {
+ 
+@@ -36,6 +40,22 @@
+     private final RecipePropertySet acceptedInputs;
+     private final RecipeBookType recipeBookType;
+ 
++    // CraftBukkit start
++    private CraftFurnaceView bukkitEntity = null;
++    private Inventory player;
++
++    @Override
++    public CraftFurnaceView getBukkitView() {
++        if (this.bukkitEntity != null) {
++            return this.bukkitEntity;
++        }
++
++        CraftInventoryFurnace inventory = new CraftInventoryFurnace((AbstractFurnaceBlockEntity) this.container);
++        this.bukkitEntity = new CraftFurnaceView(this.player.player.getBukkitEntity(), inventory, this);
++        return this.bukkitEntity;
++    }
++    // CraftBukkit end
++
+     protected AbstractFurnaceMenu(MenuType<?> type, RecipeType<? extends AbstractCookingRecipe> recipeType, ResourceKey<RecipePropertySet> recipePropertySetKey, RecipeBookType category, int syncId, Inventory platerInventory) {
+         this(type, recipeType, recipePropertySetKey, category, syncId, platerInventory, new SimpleContainer(3), new SimpleContainerData(4));
+     }
+@@ -53,6 +73,7 @@
+         this.addSlot(new Slot(inventory, 0, 56, 17));
+         this.addSlot(new FurnaceFuelSlot(this, inventory, 1, 56, 53));
+         this.addSlot(new FurnaceResultSlot(platerInventory.player, inventory, 2, 116, 35));
++        this.player = platerInventory; // CraftBukkit - save player
+         this.addStandardInventorySlots(platerInventory, 8, 84);
+         this.addDataSlots(propertyDelegate);
+     }
+@@ -71,6 +92,7 @@
+ 
+     @Override
+     public boolean stillValid(Player player) {
++        if (!this.checkReachable) return true; // CraftBukkit
+         return this.container.stillValid(player);
+     }
+ 
+@@ -180,6 +202,6 @@
+             public boolean recipeMatches(RecipeHolder<AbstractCookingRecipe> entry) {
+                 return ((AbstractCookingRecipe) entry.value()).matches(new SingleRecipeInput(AbstractFurnaceMenu.this.container.getItem(0)), world);
+             }
+-        }, 1, 1, List.of(this.getSlot(0)), list, inventory, recipe, craftAll, creative);
++        }, 1, 1, List.of(this.getSlot(0)), list, inventory, (RecipeHolder<AbstractCookingRecipe>) recipe, craftAll, creative); // CraftBukkit - decompile error
+     }
+ }
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerAnvil.patch b/paper-server/patches/sources/net/minecraft/world/inventory/AnvilMenu.java.patch
similarity index 54%
rename from paper-server/patches/sources/net/minecraft/world/inventory/ContainerAnvil.patch
rename to paper-server/patches/sources/net/minecraft/world/inventory/AnvilMenu.java.patch
index 9bf68e92e0..cce3922d9d 100644
--- a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerAnvil.patch
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/AnvilMenu.java.patch
@@ -1,14 +1,14 @@
---- a/net/minecraft/world/inventory/ContainerAnvil.java
-+++ b/net/minecraft/world/inventory/ContainerAnvil.java
+--- a/net/minecraft/world/inventory/AnvilMenu.java
++++ b/net/minecraft/world/inventory/AnvilMenu.java
 @@ -21,6 +21,10 @@
- import net.minecraft.world.level.block.state.IBlockData;
+ import net.minecraft.world.level.block.state.BlockState;
  import org.slf4j.Logger;
  
 +// CraftBukkit start
 +import org.bukkit.craftbukkit.inventory.view.CraftAnvilView;
 +// CraftBukkit end
 +
- public class ContainerAnvil extends ContainerAnvilAbstract {
+ public class AnvilMenu extends ItemCombinerMenu {
  
      public static final int INPUT_SLOT = 0;
 @@ -45,6 +49,11 @@
@@ -21,14 +21,14 @@
 +    private CraftAnvilView bukkitEntity;
 +    // CraftBukkit end
  
-     public ContainerAnvil(int i, PlayerInventory playerinventory) {
-         this(i, playerinventory, ContainerAccess.NULL);
+     public AnvilMenu(int syncId, Inventory inventory) {
+         this(syncId, inventory, ContainerLevelAccess.NULL);
 @@ -72,7 +81,7 @@
  
      @Override
-     protected boolean mayPickup(EntityHuman entityhuman, boolean flag) {
--        return (entityhuman.hasInfiniteMaterials() || entityhuman.experienceLevel >= this.cost.get()) && this.cost.get() > 0;
-+        return (entityhuman.hasInfiniteMaterials() || entityhuman.experienceLevel >= this.cost.get()) && this.cost.get() > ContainerAnvil.DEFAULT_DENIED_COST && flag; // CraftBukkit - allow cost 0 like a free item
+     protected boolean mayPickup(Player player, boolean present) {
+-        return (player.hasInfiniteMaterials() || player.experienceLevel >= this.cost.get()) && this.cost.get() > 0;
++        return (player.hasInfiniteMaterials() || player.experienceLevel >= this.cost.get()) && this.cost.get() > AnvilMenu.DEFAULT_DENIED_COST && present; // CraftBukkit - allow cost 0 like a free item
      }
  
      @Override
@@ -37,18 +37,18 @@
          }
  
 -        this.cost.set(0);
-+        this.cost.set(DEFAULT_DENIED_COST); // CraftBukkit - use a variable for set a cost for denied item
++        this.cost.set(AnvilMenu.DEFAULT_DENIED_COST); // CraftBukkit - use a variable for set a cost for denied item
          this.inputSlots.setItem(0, ItemStack.EMPTY);
          this.access.execute((world, blockposition) -> {
-             IBlockData iblockdata = world.getBlockState(blockposition);
+             BlockState iblockdata = world.getBlockState(blockposition);
 @@ -143,8 +152,8 @@
                  if (itemstack1.isDamageableItem() && itemstack.isValidRepairItem(itemstack2)) {
                      k = Math.min(itemstack1.getDamageValue(), itemstack1.getMaxDamage() / 4);
                      if (k <= 0) {
 -                        this.resultSlots.setItem(0, ItemStack.EMPTY);
 -                        this.cost.set(0);
-+                        org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareAnvilEvent(getBukkitView(), ItemStack.EMPTY); // CraftBukkit
-+                        this.cost.set(DEFAULT_DENIED_COST); // CraftBukkit - use a variable for set a cost for denied item
++                        org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareAnvilEvent(this.getBukkitView(), ItemStack.EMPTY); // CraftBukkit
++                        this.cost.set(AnvilMenu.DEFAULT_DENIED_COST); // CraftBukkit - use a variable for set a cost for denied item
                          return;
                      }
  
@@ -58,8 +58,8 @@
                      if (!flag && (!itemstack1.is(itemstack2.getItem()) || !itemstack1.isDamageableItem())) {
 -                        this.resultSlots.setItem(0, ItemStack.EMPTY);
 -                        this.cost.set(0);
-+                        org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareAnvilEvent(getBukkitView(), ItemStack.EMPTY); // CraftBukkit
-+                        this.cost.set(DEFAULT_DENIED_COST); // CraftBukkit - use a variable for set a cost for denied item
++                        org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareAnvilEvent(this.getBukkitView(), ItemStack.EMPTY); // CraftBukkit
++                        this.cost.set(AnvilMenu.DEFAULT_DENIED_COST); // CraftBukkit - use a variable for set a cost for denied item
                          return;
                      }
  
@@ -69,8 +69,8 @@
                      if (flag2 && !flag1) {
 -                        this.resultSlots.setItem(0, ItemStack.EMPTY);
 -                        this.cost.set(0);
-+                        org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareAnvilEvent(getBukkitView(), ItemStack.EMPTY); // CraftBukkit
-+                        this.cost.set(DEFAULT_DENIED_COST); // CraftBukkit - use a variable for set a cost for denied item
++                        org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareAnvilEvent(this.getBukkitView(), ItemStack.EMPTY); // CraftBukkit
++                        this.cost.set(AnvilMenu.DEFAULT_DENIED_COST); // CraftBukkit - use a variable for set a cost for denied item
                          return;
                      }
                  }
@@ -80,35 +80,35 @@
              if (b0 == i && b0 > 0) {
 -                if (this.cost.get() >= 40) {
 -                    this.cost.set(39);
-+                if (this.cost.get() >= maximumRepairCost) { // CraftBukkit
-+                    this.cost.set(maximumRepairCost - 1); // CraftBukkit
++                if (this.cost.get() >= this.maximumRepairCost) { // CraftBukkit
++                    this.cost.set(this.maximumRepairCost - 1); // CraftBukkit
                  }
  
                  this.onlyRenaming = true;
              }
  
 -            if (this.cost.get() >= 40 && !this.player.getAbilities().instabuild) {
-+            if (this.cost.get() >= maximumRepairCost && !this.player.getAbilities().instabuild) { // CraftBukkit
++            if (this.cost.get() >= this.maximumRepairCost && !this.player.getAbilities().instabuild) { // CraftBukkit
                  itemstack1 = ItemStack.EMPTY;
              }
  
 @@ -285,12 +294,13 @@
-                 EnchantmentManager.setEnchantments(itemstack1, itemenchantments_a.toImmutable());
+                 EnchantmentHelper.setEnchantments(itemstack1, itemenchantments_a.toImmutable());
              }
  
 -            this.resultSlots.setItem(0, itemstack1);
-+            org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareAnvilEvent(getBukkitView(), itemstack1); // CraftBukkit
++            org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareAnvilEvent(this.getBukkitView(), itemstack1); // CraftBukkit
              this.broadcastChanges();
          } else {
 -            this.resultSlots.setItem(0, ItemStack.EMPTY);
 -            this.cost.set(0);
-+            org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareAnvilEvent(getBukkitView(), ItemStack.EMPTY); // CraftBukkit
-+            this.cost.set(DEFAULT_DENIED_COST); // CraftBukkit - use a variable for set a cost for denied item
++            org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareAnvilEvent(this.getBukkitView(), ItemStack.EMPTY); // CraftBukkit
++            this.cost.set(AnvilMenu.DEFAULT_DENIED_COST); // CraftBukkit - use a variable for set a cost for denied item
          }
-+        sendAllDataToRemote(); // CraftBukkit - SPIGOT-6686, SPIGOT-7931: Always send completed inventory to stay in sync with client
++        this.sendAllDataToRemote(); // CraftBukkit - SPIGOT-6686, SPIGOT-7931: Always send completed inventory to stay in sync with client
      }
  
-     public static int calculateIncreasedRepairCost(int i) {
+     public static int calculateIncreasedRepairCost(int cost) {
 @@ -329,4 +339,19 @@
      public int getCost() {
          return this.cost.get();
@@ -117,15 +117,15 @@
 +    // CraftBukkit start
 +    @Override
 +    public CraftAnvilView getBukkitView() {
-+        if (bukkitEntity != null) {
-+            return bukkitEntity;
++        if (this.bukkitEntity != null) {
++            return this.bukkitEntity;
 +        }
 +
 +        org.bukkit.craftbukkit.inventory.CraftInventoryAnvil inventory = new org.bukkit.craftbukkit.inventory.CraftInventoryAnvil(
-+                access.getLocation(), this.inputSlots, this.resultSlots);
-+        bukkitEntity = new CraftAnvilView(this.player.getBukkitEntity(), inventory, this);
-+        bukkitEntity.updateFromLegacy(inventory);
-+        return bukkitEntity;
++                this.access.getLocation(), this.inputSlots, this.resultSlots);
++        this.bukkitEntity = new CraftAnvilView(this.player.getBukkitEntity(), inventory, this);
++        this.bukkitEntity.updateFromLegacy(inventory);
++        return this.bukkitEntity;
 +    }
 +    // CraftBukkit end
  }
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/BeaconMenu.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/BeaconMenu.java.patch
new file mode 100644
index 0000000000..25078e5a27
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/BeaconMenu.java.patch
@@ -0,0 +1,74 @@
+--- a/net/minecraft/world/inventory/BeaconMenu.java
++++ b/net/minecraft/world/inventory/BeaconMenu.java
+@@ -8,10 +8,13 @@
+ import net.minecraft.world.Container;
+ import net.minecraft.world.SimpleContainer;
+ import net.minecraft.world.effect.MobEffect;
++import net.minecraft.world.entity.player.Inventory;
+ import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.block.Blocks;
++import org.bukkit.craftbukkit.inventory.view.CraftBeaconView;
++// CraftBukkit end
+ 
+ public class BeaconMenu extends AbstractContainerMenu {
+ 
+@@ -27,6 +30,10 @@
+     private final BeaconMenu.PaymentSlot paymentSlot;
+     private final ContainerLevelAccess access;
+     private final ContainerData beaconData;
++    // CraftBukkit start
++    private CraftBeaconView bukkitEntity = null;
++    private Inventory player;
++    // CraftBukkit end
+ 
+     public BeaconMenu(int syncId, Container inventory) {
+         this(syncId, inventory, new SimpleContainerData(3), ContainerLevelAccess.NULL);
+@@ -34,7 +41,8 @@
+ 
+     public BeaconMenu(int syncId, Container inventory, ContainerData propertyDelegate, ContainerLevelAccess context) {
+         super(MenuType.BEACON, syncId);
+-        this.beacon = new SimpleContainer(this, 1) {
++        this.player = (Inventory) inventory; // CraftBukkit - TODO: check this
++        this.beacon = new SimpleContainer(1) { // CraftBukkit - decompile error
+             @Override
+             public boolean canPlaceItem(int slot, ItemStack stack) {
+                 return stack.is(ItemTags.BEACON_PAYMENT_ITEMS);
+@@ -69,6 +77,7 @@
+ 
+     @Override
+     public boolean stillValid(Player player) {
++        if (!this.checkReachable) return true; // CraftBukkit
+         return stillValid(this.access, player, Blocks.BEACON);
+     }
+ 
+@@ -150,8 +159,8 @@
+ 
+     public void updateEffects(Optional<Holder<MobEffect>> primary, Optional<Holder<MobEffect>> secondary) {
+         if (this.paymentSlot.hasItem()) {
+-            this.beaconData.set(1, BeaconMenu.encodeEffect((Holder) primary.orElse((Object) null)));
+-            this.beaconData.set(2, BeaconMenu.encodeEffect((Holder) secondary.orElse((Object) null)));
++            this.beaconData.set(1, BeaconMenu.encodeEffect((Holder) primary.orElse(null)));// CraftBukkit - decompile error
++            this.beaconData.set(2, BeaconMenu.encodeEffect((Holder) secondary.orElse(null)));// CraftBukkit - decompile error
+             this.paymentSlot.remove(1);
+             this.access.execute(Level::blockEntityChanged);
+         }
+@@ -178,4 +187,17 @@
+             return 1;
+         }
+     }
++
++    // CraftBukkit start
++    @Override
++    public CraftBeaconView getBukkitView() {
++        if (this.bukkitEntity != null) {
++            return this.bukkitEntity;
++        }
++
++        org.bukkit.craftbukkit.inventory.CraftInventoryBeacon inventory = new org.bukkit.craftbukkit.inventory.CraftInventoryBeacon(this.beacon);
++        this.bukkitEntity = new CraftBeaconView(this.player.player.getBukkitEntity(), inventory, this);
++        return this.bukkitEntity;
++    }
++    // CraftBukkit end
+ }
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/BrewingStandMenu.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/BrewingStandMenu.java.patch
new file mode 100644
index 0000000000..0c1256203d
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/BrewingStandMenu.java.patch
@@ -0,0 +1,58 @@
+--- a/net/minecraft/world/inventory/BrewingStandMenu.java
++++ b/net/minecraft/world/inventory/BrewingStandMenu.java
+@@ -16,6 +16,10 @@
+ import net.minecraft.world.item.alchemy.Potion;
+ import net.minecraft.world.item.alchemy.PotionBrewing;
+ import net.minecraft.world.item.alchemy.PotionContents;
++// CraftBukkit start
++import org.bukkit.craftbukkit.inventory.CraftInventoryBrewer;
++import org.bukkit.craftbukkit.inventory.view.CraftBrewingStandView;
++// CraftBukkit end
+ 
+ public class BrewingStandMenu extends AbstractContainerMenu {
+ 
+@@ -35,12 +39,18 @@
+     public final ContainerData brewingStandData;
+     private final Slot ingredientSlot;
+ 
++    // CraftBukkit start
++    private CraftBrewingStandView bukkitEntity = null;
++    private Inventory player;
++    // CraftBukkit end
++
+     public BrewingStandMenu(int syncId, Inventory playerInventory) {
+         this(syncId, playerInventory, new SimpleContainer(5), new SimpleContainerData(2));
+     }
+ 
+     public BrewingStandMenu(int syncId, Inventory playerInventory, Container inventory, ContainerData propertyDelegate) {
+         super(MenuType.BREWING_STAND, syncId);
++        this.player = playerInventory; // CraftBukkit
+         checkContainerSize(inventory, 5);
+         checkContainerDataCount(propertyDelegate, 2);
+         this.brewingStand = inventory;
+@@ -58,6 +68,7 @@
+ 
+     @Override
+     public boolean stillValid(Player player) {
++        if (!this.checkReachable) return true; // CraftBukkit
+         return this.brewingStand.stillValid(player);
+     }
+ 
+@@ -198,4 +209,17 @@
+             return BrewingStandMenu.EMPTY_SLOT_FUEL;
+         }
+     }
++
++    // CraftBukkit start
++    @Override
++    public CraftBrewingStandView getBukkitView() {
++        if (this.bukkitEntity != null) {
++            return this.bukkitEntity;
++        }
++
++        CraftInventoryBrewer inventory = new CraftInventoryBrewer(this.brewingStand);
++        this.bukkitEntity = new CraftBrewingStandView(this.player.player.getBukkitEntity(), inventory, this);
++        return this.bukkitEntity;
++    }
++    // CraftBukkit end
+ }
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/CartographyTableMenu.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/CartographyTableMenu.java.patch
new file mode 100644
index 0000000000..0268e78208
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/CartographyTableMenu.java.patch
@@ -0,0 +1,129 @@
+--- a/net/minecraft/world/inventory/CartographyTableMenu.java
++++ b/net/minecraft/world/inventory/CartographyTableMenu.java
+@@ -6,16 +6,36 @@
+ import net.minecraft.world.Container;
+ import net.minecraft.world.SimpleContainer;
+ import net.minecraft.world.entity.player.Inventory;
+-import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.item.Items;
+ import net.minecraft.world.item.MapItem;
+ import net.minecraft.world.item.component.MapPostProcessing;
+ import net.minecraft.world.level.block.Blocks;
+ import net.minecraft.world.level.saveddata.maps.MapItemSavedData;
++// CraftBukkit start
++import org.bukkit.Location;
++import org.bukkit.craftbukkit.inventory.CraftInventoryCartography;
++import org.bukkit.craftbukkit.inventory.CraftInventoryView;
++import org.bukkit.entity.Player;
++// CraftBukkit end
+ 
+ public class CartographyTableMenu extends AbstractContainerMenu {
+ 
++    // CraftBukkit start
++    private CraftInventoryView bukkitEntity = null;
++    private Player player;
++
++    @Override
++    public CraftInventoryView getBukkitView() {
++        if (this.bukkitEntity != null) {
++            return this.bukkitEntity;
++        }
++
++        CraftInventoryCartography inventory = new CraftInventoryCartography(this.container, this.resultContainer);
++        this.bukkitEntity = new CraftInventoryView(this.player, inventory, this);
++        return this.bukkitEntity;
++    }
++    // CraftBukkit end
+     public static final int MAP_SLOT = 0;
+     public static final int ADDITIONAL_SLOT = 1;
+     public static final int RESULT_SLOT = 2;
+@@ -40,6 +60,13 @@
+                 CartographyTableMenu.this.slotsChanged(this);
+                 super.setChanged();
+             }
++
++            // CraftBukkit start
++            @Override
++            public Location getLocation() {
++                return context.getLocation();
++            }
++            // CraftBukkit end
+         };
+         this.resultContainer = new ResultContainer() {
+             @Override
+@@ -47,15 +74,22 @@
+                 CartographyTableMenu.this.slotsChanged(this);
+                 super.setChanged();
+             }
++
++            // CraftBukkit start
++            @Override
++            public Location getLocation() {
++                return context.getLocation();
++            }
++            // CraftBukkit end
+         };
+         this.access = context;
+-        this.addSlot(new Slot(this, this.container, 0, 15, 15) {
++        this.addSlot(new Slot(this.container, 0, 15, 15) { // CraftBukkit - decompile error
+             @Override
+             public boolean mayPlace(ItemStack stack) {
+                 return stack.has(DataComponents.MAP_ID);
+             }
+         });
+-        this.addSlot(new Slot(this, this.container, 1, 15, 52) {
++        this.addSlot(new Slot(this.container, 1, 15, 52) { // CraftBukkit - decompile error
+             @Override
+             public boolean mayPlace(ItemStack stack) {
+                 return stack.is(Items.PAPER) || stack.is(Items.MAP) || stack.is(Items.GLASS_PANE);
+@@ -68,7 +102,7 @@
+             }
+ 
+             @Override
+-            public void onTake(Player player, ItemStack stack) {
++            public void onTake(net.minecraft.world.entity.player.Player player, ItemStack stack) {
+                 ((Slot) CartographyTableMenu.this.slots.get(0)).remove(1);
+                 ((Slot) CartographyTableMenu.this.slots.get(1)).remove(1);
+                 stack.getItem().onCraftedBy(stack, player.level(), player);
+@@ -76,7 +110,7 @@
+                     long j = world.getGameTime();
+ 
+                     if (CartographyTableMenu.this.lastSoundTime != j) {
+-                        world.playSound((Player) null, blockposition, SoundEvents.UI_CARTOGRAPHY_TABLE_TAKE_RESULT, SoundSource.BLOCKS, 1.0F, 1.0F);
++                        world.playSound((net.minecraft.world.entity.player.Player) null, blockposition, SoundEvents.UI_CARTOGRAPHY_TABLE_TAKE_RESULT, SoundSource.BLOCKS, 1.0F, 1.0F);
+                         CartographyTableMenu.this.lastSoundTime = j;
+                     }
+ 
+@@ -85,10 +119,12 @@
+             }
+         });
+         this.addStandardInventorySlots(inventory, 8, 84);
++        this.player = (Player) inventory.player.getBukkitEntity(); // CraftBukkit
+     }
+ 
+     @Override
+-    public boolean stillValid(Player player) {
++    public boolean stillValid(net.minecraft.world.entity.player.Player player) {
++        if (!this.checkReachable) return true; // CraftBukkit
+         return stillValid(this.access, player, Blocks.CARTOGRAPHY_TABLE);
+     }
+ 
+@@ -147,7 +183,7 @@
+     }
+ 
+     @Override
+-    public ItemStack quickMoveStack(Player player, int slot) {
++    public ItemStack quickMoveStack(net.minecraft.world.entity.player.Player player, int slot) {
+         ItemStack itemstack = ItemStack.EMPTY;
+         Slot slot1 = (Slot) this.slots.get(slot);
+ 
+@@ -199,7 +235,7 @@
+     }
+ 
+     @Override
+-    public void removed(Player player) {
++    public void removed(net.minecraft.world.entity.player.Player player) {
+         super.removed(player);
+         this.resultContainer.removeItemNoUpdate(2);
+         this.access.execute((world, blockposition) -> {
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/ChestMenu.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/ChestMenu.java.patch
new file mode 100644
index 0000000000..8ba0e1a6a1
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/ChestMenu.java.patch
@@ -0,0 +1,64 @@
+--- a/net/minecraft/world/inventory/ChestMenu.java
++++ b/net/minecraft/world/inventory/ChestMenu.java
+@@ -1,16 +1,43 @@
+ package net.minecraft.world.inventory;
+ 
++import net.minecraft.world.CompoundContainer;
+ import net.minecraft.world.Container;
+ import net.minecraft.world.SimpleContainer;
+ import net.minecraft.world.entity.player.Inventory;
+ import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.item.ItemStack;
++import org.bukkit.craftbukkit.inventory.CraftInventory;
++import org.bukkit.craftbukkit.inventory.CraftInventoryView;
++// CraftBukkit end
+ 
+ public class ChestMenu extends AbstractContainerMenu {
+ 
+     private final Container container;
+     private final int containerRows;
++    // CraftBukkit start
++    private CraftInventoryView bukkitEntity = null;
++    private Inventory player;
+ 
++    @Override
++    public CraftInventoryView getBukkitView() {
++        if (this.bukkitEntity != null) {
++            return this.bukkitEntity;
++        }
++
++        CraftInventory inventory;
++        if (this.container instanceof Inventory) {
++            inventory = new org.bukkit.craftbukkit.inventory.CraftInventoryPlayer((Inventory) this.container);
++        } else if (this.container instanceof CompoundContainer) {
++            inventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest((CompoundContainer) this.container);
++        } else {
++            inventory = new CraftInventory(this.container);
++        }
++
++        this.bukkitEntity = new CraftInventoryView(this.player.player.getBukkitEntity(), inventory, this);
++        return this.bukkitEntity;
++    }
++    // CraftBukkit end
++
+     private ChestMenu(MenuType<?> type, int syncId, Inventory playerInventory, int rows) {
+         this(type, syncId, playerInventory, new SimpleContainer(9 * rows), rows);
+     }
+@@ -53,6 +80,9 @@
+         this.container = inventory;
+         this.containerRows = rows;
+         inventory.startOpen(playerInventory.player);
++        // CraftBukkit start - Save player
++        this.player = playerInventory;
++        // CraftBukkit end
+         boolean flag = true;
+ 
+         this.addChestGrid(inventory, 8, 18);
+@@ -72,6 +102,7 @@
+ 
+     @Override
+     public boolean stillValid(Player player) {
++        if (!this.checkReachable) return true; // CraftBukkit
+         return this.container.stillValid(player);
+     }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerAccess.patch b/paper-server/patches/sources/net/minecraft/world/inventory/ContainerAccess.patch
deleted file mode 100644
index 72e419a336..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerAccess.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- a/net/minecraft/world/inventory/ContainerAccess.java
-+++ b/net/minecraft/world/inventory/ContainerAccess.java
-@@ -8,6 +8,20 @@
- 
- public interface ContainerAccess {
- 
-+    // CraftBukkit start
-+    default World getWorld() {
-+        throw new UnsupportedOperationException("Not supported yet.");
-+    }
-+
-+    default BlockPosition getPosition() {
-+        throw new UnsupportedOperationException("Not supported yet.");
-+    }
-+
-+    default org.bukkit.Location getLocation() {
-+        return new org.bukkit.Location(getWorld().getWorld(), getPosition().getX(), getPosition().getY(), getPosition().getZ());
-+    }
-+    // CraftBukkit end
-+
-     ContainerAccess NULL = new ContainerAccess() {
-         @Override
-         public <T> Optional<T> evaluate(BiFunction<World, BlockPosition, T> bifunction) {
-@@ -17,6 +31,18 @@
- 
-     static ContainerAccess create(final World world, final BlockPosition blockposition) {
-         return new ContainerAccess() {
-+            // CraftBukkit start
-+            @Override
-+            public World getWorld() {
-+                return world;
-+            }
-+
-+            @Override
-+            public BlockPosition getPosition() {
-+                return blockposition;
-+            }
-+            // CraftBukkit end
-+
-             @Override
-             public <T> Optional<T> evaluate(BiFunction<World, BlockPosition, T> bifunction) {
-                 return Optional.of(bifunction.apply(world, blockposition));
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerBeacon.patch b/paper-server/patches/sources/net/minecraft/world/inventory/ContainerBeacon.patch
deleted file mode 100644
index b15494388c..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerBeacon.patch
+++ /dev/null
@@ -1,72 +0,0 @@
---- a/net/minecraft/world/inventory/ContainerBeacon.java
-+++ b/net/minecraft/world/inventory/ContainerBeacon.java
-@@ -13,6 +13,11 @@
- import net.minecraft.world.level.World;
- import net.minecraft.world.level.block.Blocks;
- 
-+// CraftBukkit start
-+import net.minecraft.world.entity.player.PlayerInventory;
-+import org.bukkit.craftbukkit.inventory.view.CraftBeaconView;
-+// CraftBukkit end
-+
- public class ContainerBeacon extends Container {
- 
-     private static final int PAYMENT_SLOT = 0;
-@@ -27,6 +32,10 @@
-     private final ContainerBeacon.SlotBeacon paymentSlot;
-     private final ContainerAccess access;
-     private final IContainerProperties beaconData;
-+    // CraftBukkit start
-+    private CraftBeaconView bukkitEntity = null;
-+    private PlayerInventory player;
-+    // CraftBukkit end
- 
-     public ContainerBeacon(int i, IInventory iinventory) {
-         this(i, iinventory, new ContainerProperties(3), ContainerAccess.NULL);
-@@ -34,7 +43,8 @@
- 
-     public ContainerBeacon(int i, IInventory iinventory, IContainerProperties icontainerproperties, ContainerAccess containeraccess) {
-         super(Containers.BEACON, i);
--        this.beacon = new InventorySubcontainer(this, 1) {
-+        player = (PlayerInventory) iinventory; // CraftBukkit - TODO: check this
-+        this.beacon = new InventorySubcontainer(1) { // CraftBukkit - decompile error
-             @Override
-             public boolean canPlaceItem(int j, ItemStack itemstack) {
-                 return itemstack.is(TagsItem.BEACON_PAYMENT_ITEMS);
-@@ -69,6 +79,7 @@
- 
-     @Override
-     public boolean stillValid(EntityHuman entityhuman) {
-+        if (!this.checkReachable) return true; // CraftBukkit
-         return stillValid(this.access, entityhuman, Blocks.BEACON);
-     }
- 
-@@ -150,8 +161,8 @@
- 
-     public void updateEffects(Optional<Holder<MobEffectList>> optional, Optional<Holder<MobEffectList>> optional1) {
-         if (this.paymentSlot.hasItem()) {
--            this.beaconData.set(1, encodeEffect((Holder) optional.orElse((Object) null)));
--            this.beaconData.set(2, encodeEffect((Holder) optional1.orElse((Object) null)));
-+            this.beaconData.set(1, encodeEffect((Holder) optional.orElse(null)));// CraftBukkit - decompile error
-+            this.beaconData.set(2, encodeEffect((Holder) optional1.orElse(null)));// CraftBukkit - decompile error
-             this.paymentSlot.remove(1);
-             this.access.execute(World::blockEntityChanged);
-         }
-@@ -178,4 +189,17 @@
-             return 1;
-         }
-     }
-+
-+    // CraftBukkit start
-+    @Override
-+    public CraftBeaconView getBukkitView() {
-+        if (bukkitEntity != null) {
-+            return bukkitEntity;
-+        }
-+
-+        org.bukkit.craftbukkit.inventory.CraftInventoryBeacon inventory = new org.bukkit.craftbukkit.inventory.CraftInventoryBeacon(this.beacon);
-+        bukkitEntity = new CraftBeaconView(this.player.player.getBukkitEntity(), inventory, this);
-+        return bukkitEntity;
-+    }
-+    // CraftBukkit end
- }
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerBrewingStand.patch b/paper-server/patches/sources/net/minecraft/world/inventory/ContainerBrewingStand.patch
deleted file mode 100644
index 8c31a1e8d1..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerBrewingStand.patch
+++ /dev/null
@@ -1,59 +0,0 @@
---- a/net/minecraft/world/inventory/ContainerBrewingStand.java
-+++ b/net/minecraft/world/inventory/ContainerBrewingStand.java
-@@ -17,6 +17,11 @@
- import net.minecraft.world.item.alchemy.PotionContents;
- import net.minecraft.world.item.alchemy.PotionRegistry;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.inventory.CraftInventoryBrewer;
-+import org.bukkit.craftbukkit.inventory.view.CraftBrewingStandView;
-+// CraftBukkit end
-+
- public class ContainerBrewingStand extends Container {
- 
-     static final MinecraftKey EMPTY_SLOT_FUEL = MinecraftKey.withDefaultNamespace("container/slot/brewing_fuel");
-@@ -35,12 +40,18 @@
-     private final IContainerProperties brewingStandData;
-     private final Slot ingredientSlot;
- 
-+    // CraftBukkit start
-+    private CraftBrewingStandView bukkitEntity = null;
-+    private PlayerInventory player;
-+    // CraftBukkit end
-+
-     public ContainerBrewingStand(int i, PlayerInventory playerinventory) {
-         this(i, playerinventory, new InventorySubcontainer(5), new ContainerProperties(2));
-     }
- 
-     public ContainerBrewingStand(int i, PlayerInventory playerinventory, IInventory iinventory, IContainerProperties icontainerproperties) {
-         super(Containers.BREWING_STAND, i);
-+        player = playerinventory; // CraftBukkit
-         checkContainerSize(iinventory, 5);
-         checkContainerDataCount(icontainerproperties, 2);
-         this.brewingStand = iinventory;
-@@ -58,6 +69,7 @@
- 
-     @Override
-     public boolean stillValid(EntityHuman entityhuman) {
-+        if (!this.checkReachable) return true; // CraftBukkit
-         return this.brewingStand.stillValid(entityhuman);
-     }
- 
-@@ -198,4 +210,17 @@
-             return ContainerBrewingStand.EMPTY_SLOT_FUEL;
-         }
-     }
-+
-+    // CraftBukkit start
-+    @Override
-+    public CraftBrewingStandView getBukkitView() {
-+        if (bukkitEntity != null) {
-+            return bukkitEntity;
-+        }
-+
-+        CraftInventoryBrewer inventory = new CraftInventoryBrewer(this.brewingStand);
-+        bukkitEntity = new CraftBrewingStandView(this.player.player.getBukkitEntity(), inventory, this);
-+        return bukkitEntity;
-+    }
-+    // CraftBukkit end
- }
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerCartography.patch b/paper-server/patches/sources/net/minecraft/world/inventory/ContainerCartography.patch
deleted file mode 100644
index 3872eb8c69..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerCartography.patch
+++ /dev/null
@@ -1,85 +0,0 @@
---- a/net/minecraft/world/inventory/ContainerCartography.java
-+++ b/net/minecraft/world/inventory/ContainerCartography.java
-@@ -14,8 +14,30 @@
- import net.minecraft.world.level.block.Blocks;
- import net.minecraft.world.level.saveddata.maps.WorldMap;
- 
-+// CraftBukkit start
-+import org.bukkit.Location;
-+import org.bukkit.craftbukkit.inventory.CraftInventoryCartography;
-+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
-+import org.bukkit.entity.Player;
-+// CraftBukkit end
-+
- public class ContainerCartography extends Container {
- 
-+    // CraftBukkit start
-+    private CraftInventoryView bukkitEntity = null;
-+    private Player player;
-+
-+    @Override
-+    public CraftInventoryView getBukkitView() {
-+        if (bukkitEntity != null) {
-+            return bukkitEntity;
-+        }
-+
-+        CraftInventoryCartography inventory = new CraftInventoryCartography(this.container, this.resultContainer);
-+        bukkitEntity = new CraftInventoryView(this.player, inventory, this);
-+        return bukkitEntity;
-+    }
-+    // CraftBukkit end
-     public static final int MAP_SLOT = 0;
-     public static final int ADDITIONAL_SLOT = 1;
-     public static final int RESULT_SLOT = 2;
-@@ -40,6 +62,13 @@
-                 ContainerCartography.this.slotsChanged(this);
-                 super.setChanged();
-             }
-+
-+            // CraftBukkit start
-+            @Override
-+            public Location getLocation() {
-+                return containeraccess.getLocation();
-+            }
-+            // CraftBukkit end
-         };
-         this.resultContainer = new InventoryCraftResult() {
-             @Override
-@@ -47,15 +76,22 @@
-                 ContainerCartography.this.slotsChanged(this);
-                 super.setChanged();
-             }
-+
-+            // CraftBukkit start
-+            @Override
-+            public Location getLocation() {
-+                return containeraccess.getLocation();
-+            }
-+            // CraftBukkit end
-         };
-         this.access = containeraccess;
--        this.addSlot(new Slot(this, this.container, 0, 15, 15) {
-+        this.addSlot(new Slot(this.container, 0, 15, 15) { // CraftBukkit - decompile error
-             @Override
-             public boolean mayPlace(ItemStack itemstack) {
-                 return itemstack.has(DataComponents.MAP_ID);
-             }
-         });
--        this.addSlot(new Slot(this, this.container, 1, 15, 52) {
-+        this.addSlot(new Slot(this.container, 1, 15, 52) { // CraftBukkit - decompile error
-             @Override
-             public boolean mayPlace(ItemStack itemstack) {
-                 return itemstack.is(Items.PAPER) || itemstack.is(Items.MAP) || itemstack.is(Items.GLASS_PANE);
-@@ -85,10 +121,12 @@
-             }
-         });
-         this.addStandardInventorySlots(playerinventory, 8, 84);
-+        player = (Player) playerinventory.player.getBukkitEntity(); // CraftBukkit
-     }
- 
-     @Override
-     public boolean stillValid(EntityHuman entityhuman) {
-+        if (!this.checkReachable) return true; // CraftBukkit
-         return stillValid(this.access, entityhuman, Blocks.CARTOGRAPHY_TABLE);
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerChest.patch b/paper-server/patches/sources/net/minecraft/world/inventory/ContainerChest.patch
deleted file mode 100644
index cdc889f17a..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerChest.patch
+++ /dev/null
@@ -1,60 +0,0 @@
---- a/net/minecraft/world/inventory/ContainerChest.java
-+++ b/net/minecraft/world/inventory/ContainerChest.java
-@@ -6,10 +6,39 @@
- import net.minecraft.world.entity.player.PlayerInventory;
- import net.minecraft.world.item.ItemStack;
- 
-+// CraftBukkit start
-+import net.minecraft.world.InventoryLargeChest;
-+import org.bukkit.craftbukkit.inventory.CraftInventory;
-+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
-+// CraftBukkit end
-+
- public class ContainerChest extends Container {
- 
-     private final IInventory container;
-     private final int containerRows;
-+    // CraftBukkit start
-+    private CraftInventoryView bukkitEntity = null;
-+    private PlayerInventory player;
-+
-+    @Override
-+    public CraftInventoryView getBukkitView() {
-+        if (bukkitEntity != null) {
-+            return bukkitEntity;
-+        }
-+
-+        CraftInventory inventory;
-+        if (this.container instanceof PlayerInventory) {
-+            inventory = new org.bukkit.craftbukkit.inventory.CraftInventoryPlayer((PlayerInventory) this.container);
-+        } else if (this.container instanceof InventoryLargeChest) {
-+            inventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest((InventoryLargeChest) this.container);
-+        } else {
-+            inventory = new CraftInventory(this.container);
-+        }
-+
-+        bukkitEntity = new CraftInventoryView(this.player.player.getBukkitEntity(), inventory, this);
-+        return bukkitEntity;
-+    }
-+    // CraftBukkit end
- 
-     private ContainerChest(Containers<?> containers, int i, PlayerInventory playerinventory, int j) {
-         this(containers, i, playerinventory, new InventorySubcontainer(9 * j), j);
-@@ -53,6 +82,9 @@
-         this.container = iinventory;
-         this.containerRows = j;
-         iinventory.startOpen(playerinventory.player);
-+        // CraftBukkit start - Save player
-+        this.player = playerinventory;
-+        // CraftBukkit end
-         boolean flag = true;
- 
-         this.addChestGrid(iinventory, 8, 18);
-@@ -72,6 +104,7 @@
- 
-     @Override
-     public boolean stillValid(EntityHuman entityhuman) {
-+        if (!this.checkReachable) return true; // CraftBukkit
-         return this.container.stillValid(entityhuman);
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerDispenser.patch b/paper-server/patches/sources/net/minecraft/world/inventory/ContainerDispenser.patch
deleted file mode 100644
index 682cb82ec5..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerDispenser.patch
+++ /dev/null
@@ -1,62 +0,0 @@
---- a/net/minecraft/world/inventory/ContainerDispenser.java
-+++ b/net/minecraft/world/inventory/ContainerDispenser.java
-@@ -6,6 +6,11 @@
- import net.minecraft.world.entity.player.PlayerInventory;
- import net.minecraft.world.item.ItemStack;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.inventory.CraftInventory;
-+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
-+// CraftBukkit end
-+
- public class ContainerDispenser extends Container {
- 
-     private static final int SLOT_COUNT = 9;
-@@ -14,6 +19,10 @@
-     private static final int USE_ROW_SLOT_START = 36;
-     private static final int USE_ROW_SLOT_END = 45;
-     public final IInventory dispenser;
-+    // CraftBukkit start
-+    private CraftInventoryView bukkitEntity = null;
-+    private PlayerInventory player;
-+    // CraftBukkit end
- 
-     public ContainerDispenser(int i, PlayerInventory playerinventory) {
-         this(i, playerinventory, new InventorySubcontainer(9));
-@@ -21,6 +30,10 @@
- 
-     public ContainerDispenser(int i, PlayerInventory playerinventory, IInventory iinventory) {
-         super(Containers.GENERIC_3x3, i);
-+        // CraftBukkit start - Save player
-+        this.player = playerinventory;
-+        // CraftBukkit end
-+
-         checkContainerSize(iinventory, 9);
-         this.dispenser = iinventory;
-         iinventory.startOpen(playerinventory.player);
-@@ -41,6 +54,7 @@
- 
-     @Override
-     public boolean stillValid(EntityHuman entityhuman) {
-+        if (!this.checkReachable) return true; // CraftBukkit
-         return this.dispenser.stillValid(entityhuman);
-     }
- 
-@@ -82,4 +96,17 @@
-         super.removed(entityhuman);
-         this.dispenser.stopOpen(entityhuman);
-     }
-+
-+    // CraftBukkit start
-+    @Override
-+    public CraftInventoryView getBukkitView() {
-+        if (bukkitEntity != null) {
-+            return bukkitEntity;
-+        }
-+
-+        CraftInventory inventory = new CraftInventory(this.dispenser);
-+        bukkitEntity = new CraftInventoryView(this.player.player.getBukkitEntity(), inventory, this);
-+        return bukkitEntity;
-+    }
-+    // CraftBukkit end
- }
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerFurnace.patch b/paper-server/patches/sources/net/minecraft/world/inventory/ContainerFurnace.patch
deleted file mode 100644
index 9720bf6a9f..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerFurnace.patch
+++ /dev/null
@@ -1,62 +0,0 @@
---- a/net/minecraft/world/inventory/ContainerFurnace.java
-+++ b/net/minecraft/world/inventory/ContainerFurnace.java
-@@ -18,6 +18,12 @@
- import net.minecraft.world.item.crafting.SingleRecipeInput;
- import net.minecraft.world.level.World;
- 
-+// CraftBukkit start
-+import net.minecraft.world.level.block.entity.TileEntityFurnace;
-+import org.bukkit.craftbukkit.inventory.CraftInventoryFurnace;
-+import org.bukkit.craftbukkit.inventory.view.CraftFurnaceView;
-+// CraftBukkit end
-+
- public abstract class ContainerFurnace extends ContainerRecipeBook {
- 
-     public static final int INGREDIENT_SLOT = 0;
-@@ -36,6 +42,22 @@
-     private final RecipePropertySet acceptedInputs;
-     private final RecipeBookType recipeBookType;
- 
-+    // CraftBukkit start
-+    private CraftFurnaceView bukkitEntity = null;
-+    private PlayerInventory player;
-+
-+    @Override
-+    public CraftFurnaceView getBukkitView() {
-+        if (bukkitEntity != null) {
-+            return bukkitEntity;
-+        }
-+
-+        CraftInventoryFurnace inventory = new CraftInventoryFurnace((TileEntityFurnace) this.container);
-+        bukkitEntity = new CraftFurnaceView(this.player.player.getBukkitEntity(), inventory, this);
-+        return bukkitEntity;
-+    }
-+    // CraftBukkit end
-+
-     protected ContainerFurnace(Containers<?> containers, Recipes<? extends RecipeCooking> recipes, ResourceKey<RecipePropertySet> resourcekey, RecipeBookType recipebooktype, int i, PlayerInventory playerinventory) {
-         this(containers, recipes, resourcekey, recipebooktype, i, playerinventory, new InventorySubcontainer(3), new ContainerProperties(4));
-     }
-@@ -53,6 +75,7 @@
-         this.addSlot(new Slot(iinventory, 0, 56, 17));
-         this.addSlot(new SlotFurnaceFuel(this, iinventory, 1, 56, 53));
-         this.addSlot(new SlotFurnaceResult(playerinventory.player, iinventory, 2, 116, 35));
-+        this.player = playerinventory; // CraftBukkit - save player
-         this.addStandardInventorySlots(playerinventory, 8, 84);
-         this.addDataSlots(icontainerproperties);
-     }
-@@ -71,6 +94,7 @@
- 
-     @Override
-     public boolean stillValid(EntityHuman entityhuman) {
-+        if (!this.checkReachable) return true; // CraftBukkit
-         return this.container.stillValid(entityhuman);
-     }
- 
-@@ -180,6 +204,6 @@
-             public boolean recipeMatches(RecipeHolder<RecipeCooking> recipeholder1) {
-                 return ((RecipeCooking) recipeholder1.value()).matches(new SingleRecipeInput(ContainerFurnace.this.container.getItem(0)), worldserver);
-             }
--        }, 1, 1, List.of(this.getSlot(0)), list, playerinventory, recipeholder, flag, flag1);
-+        }, 1, 1, List.of(this.getSlot(0)), list, playerinventory, (RecipeHolder<RecipeCooking>) recipeholder, flag, flag1); // CraftBukkit - decompile error
-     }
- }
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerGrindstone.patch b/paper-server/patches/sources/net/minecraft/world/inventory/ContainerGrindstone.patch
deleted file mode 100644
index 2ad13b2149..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerGrindstone.patch
+++ /dev/null
@@ -1,84 +0,0 @@
---- a/net/minecraft/world/inventory/ContainerGrindstone.java
-+++ b/net/minecraft/world/inventory/ContainerGrindstone.java
-@@ -20,8 +20,30 @@
- import net.minecraft.world.level.block.Blocks;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import org.bukkit.Location;
-+import org.bukkit.craftbukkit.inventory.CraftInventoryGrindstone;
-+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
-+import org.bukkit.entity.Player;
-+// CraftBukkit end
-+
- public class ContainerGrindstone extends Container {
- 
-+    // CraftBukkit start
-+    private CraftInventoryView bukkitEntity = null;
-+    private Player player;
-+
-+    @Override
-+    public CraftInventoryView getBukkitView() {
-+        if (bukkitEntity != null) {
-+            return bukkitEntity;
-+        }
-+
-+        CraftInventoryGrindstone inventory = new CraftInventoryGrindstone(this.repairSlots, this.resultSlots);
-+        bukkitEntity = new CraftInventoryView(this.player, inventory, this);
-+        return bukkitEntity;
-+    }
-+    // CraftBukkit end
-     public static final int MAX_NAME_LENGTH = 35;
-     public static final int INPUT_SLOT = 0;
-     public static final int ADDITIONAL_SLOT = 1;
-@@ -47,15 +69,22 @@
-                 super.setChanged();
-                 ContainerGrindstone.this.slotsChanged(this);
-             }
-+
-+            // CraftBukkit start
-+            @Override
-+            public Location getLocation() {
-+                return containeraccess.getLocation();
-+            }
-+            // CraftBukkit end
-         };
-         this.access = containeraccess;
--        this.addSlot(new Slot(this, this.repairSlots, 0, 49, 19) {
-+        this.addSlot(new Slot(this.repairSlots, 0, 49, 19) { // CraftBukkit - decompile error
-             @Override
-             public boolean mayPlace(ItemStack itemstack) {
-                 return itemstack.isDamageableItem() || EnchantmentManager.hasAnyEnchantments(itemstack);
-             }
-         });
--        this.addSlot(new Slot(this, this.repairSlots, 1, 49, 40) {
-+        this.addSlot(new Slot(this.repairSlots, 1, 49, 40) { // CraftBukkit - decompile error
-             @Override
-             public boolean mayPlace(ItemStack itemstack) {
-                 return itemstack.isDamageableItem() || EnchantmentManager.hasAnyEnchantments(itemstack);
-@@ -113,6 +142,7 @@
-             }
-         });
-         this.addStandardInventorySlots(playerinventory, 8, 84);
-+        player = (Player) playerinventory.player.getBukkitEntity(); // CraftBukkit
-     }
- 
-     @Override
-@@ -125,7 +155,8 @@
-     }
- 
-     private void createResult() {
--        this.resultSlots.setItem(0, this.computeResult(this.repairSlots.getItem(0), this.repairSlots.getItem(1)));
-+        org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareGrindstoneEvent(getBukkitView(), this.computeResult(this.repairSlots.getItem(0), this.repairSlots.getItem(1))); // CraftBukkit
-+        sendAllDataToRemote(); // CraftBukkit - SPIGOT-6686: Always send completed inventory to stay in sync with client
-         this.broadcastChanges();
-     }
- 
-@@ -227,6 +258,7 @@
- 
-     @Override
-     public boolean stillValid(EntityHuman entityhuman) {
-+        if (!this.checkReachable) return true; // CraftBukkit
-         return stillValid(this.access, entityhuman, Blocks.GRINDSTONE);
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerHopper.patch b/paper-server/patches/sources/net/minecraft/world/inventory/ContainerHopper.patch
deleted file mode 100644
index 4f0fd9ab09..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerHopper.patch
+++ /dev/null
@@ -1,51 +0,0 @@
---- a/net/minecraft/world/inventory/ContainerHopper.java
-+++ b/net/minecraft/world/inventory/ContainerHopper.java
-@@ -6,11 +6,32 @@
- import net.minecraft.world.entity.player.PlayerInventory;
- import net.minecraft.world.item.ItemStack;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.inventory.CraftInventory;
-+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
-+// CraftBukkit end
-+
- public class ContainerHopper extends Container {
- 
-     public static final int CONTAINER_SIZE = 5;
-     private final IInventory hopper;
- 
-+    // CraftBukkit start
-+    private CraftInventoryView bukkitEntity = null;
-+    private PlayerInventory player;
-+
-+    @Override
-+    public CraftInventoryView getBukkitView() {
-+        if (bukkitEntity != null) {
-+            return bukkitEntity;
-+        }
-+
-+        CraftInventory inventory = new CraftInventory(this.hopper);
-+        bukkitEntity = new CraftInventoryView(this.player.player.getBukkitEntity(), inventory, this);
-+        return bukkitEntity;
-+    }
-+    // CraftBukkit end
-+
-     public ContainerHopper(int i, PlayerInventory playerinventory) {
-         this(i, playerinventory, new InventorySubcontainer(5));
-     }
-@@ -18,6 +39,7 @@
-     public ContainerHopper(int i, PlayerInventory playerinventory, IInventory iinventory) {
-         super(Containers.HOPPER, i);
-         this.hopper = iinventory;
-+        this.player = playerinventory; // CraftBukkit - save player
-         checkContainerSize(iinventory, 5);
-         iinventory.startOpen(playerinventory.player);
- 
-@@ -30,6 +52,7 @@
- 
-     @Override
-     public boolean stillValid(EntityHuman entityhuman) {
-+        if (!this.checkReachable) return true; // CraftBukkit
-         return this.hopper.stillValid(entityhuman);
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerHorse.patch b/paper-server/patches/sources/net/minecraft/world/inventory/ContainerHorse.patch
deleted file mode 100644
index 9113652d4c..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerHorse.patch
+++ /dev/null
@@ -1,53 +0,0 @@
---- a/net/minecraft/world/inventory/ContainerHorse.java
-+++ b/net/minecraft/world/inventory/ContainerHorse.java
-@@ -11,6 +11,11 @@
- import net.minecraft.world.item.ItemStack;
- import net.minecraft.world.item.Items;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
-+import org.bukkit.inventory.InventoryView;
-+// CraftBukkit end
-+
- public class ContainerHorse extends Container {
- 
-     static final MinecraftKey SADDLE_SLOT_SPRITE = MinecraftKey.withDefaultNamespace("container/slot/saddle");
-@@ -22,13 +27,28 @@
-     private static final int SLOT_BODY_ARMOR = 1;
-     private static final int SLOT_HORSE_INVENTORY_START = 2;
- 
-+    // CraftBukkit start
-+    org.bukkit.craftbukkit.inventory.CraftInventoryView bukkitEntity;
-+    PlayerInventory player;
-+
-+    @Override
-+    public InventoryView getBukkitView() {
-+        if (bukkitEntity != null) {
-+            return bukkitEntity;
-+        }
-+
-+        return bukkitEntity = new CraftInventoryView(player.player.getBukkitEntity(), horseContainer.getOwner().getInventory(), this);
-+    }
-+
-     public ContainerHorse(int i, PlayerInventory playerinventory, IInventory iinventory, final EntityHorseAbstract entityhorseabstract, int j) {
-         super((Containers) null, i);
-+        player = playerinventory;
-+        // CraftBukkit end
-         this.horseContainer = iinventory;
-         this.armorContainer = entityhorseabstract.getBodyArmorAccess();
-         this.horse = entityhorseabstract;
-         iinventory.startOpen(playerinventory.player);
--        this.addSlot(new Slot(this, iinventory, 0, 8, 18) {
-+        this.addSlot(new Slot(iinventory, 0, 8, 18) { // CraftBukkit - decompile error
-             @Override
-             public boolean mayPlace(ItemStack itemstack) {
-                 return itemstack.is(Items.SADDLE) && !this.hasItem() && entityhorseabstract.isSaddleable();
-@@ -46,7 +66,7 @@
-         });
-         MinecraftKey minecraftkey = entityhorseabstract instanceof EntityLlama ? ContainerHorse.LLAMA_ARMOR_SLOT_SPRITE : ContainerHorse.ARMOR_SLOT_SPRITE;
- 
--        this.addSlot(new ArmorSlot(this, this.armorContainer, entityhorseabstract, EnumItemSlot.BODY, 0, 8, 36, minecraftkey) {
-+        this.addSlot(new ArmorSlot(this.armorContainer, entityhorseabstract, EnumItemSlot.BODY, 0, 8, 36, minecraftkey) { // CraftBukkit - decompile error
-             @Override
-             public boolean mayPlace(ItemStack itemstack) {
-                 return entityhorseabstract.isEquippableInSlot(itemstack, EnumItemSlot.BODY);
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerLectern.patch b/paper-server/patches/sources/net/minecraft/world/inventory/ContainerLectern.patch
deleted file mode 100644
index 5c2cf6b850..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerLectern.patch
+++ /dev/null
@@ -1,84 +0,0 @@
---- a/net/minecraft/world/inventory/ContainerLectern.java
-+++ b/net/minecraft/world/inventory/ContainerLectern.java
-@@ -5,8 +5,33 @@
- import net.minecraft.world.entity.player.EntityHuman;
- import net.minecraft.world.item.ItemStack;
- 
-+// CraftBukkit start
-+import net.minecraft.world.level.block.entity.TileEntityLectern.LecternInventory;
-+import net.minecraft.world.entity.player.PlayerInventory;
-+import org.bukkit.Bukkit;
-+import org.bukkit.craftbukkit.inventory.CraftInventoryLectern;
-+import org.bukkit.craftbukkit.inventory.view.CraftLecternView;
-+import org.bukkit.entity.Player;
-+import org.bukkit.event.player.PlayerTakeLecternBookEvent;
-+// CraftBukkit end
-+
- public class ContainerLectern extends Container {
- 
-+    // CraftBukkit start
-+    private CraftLecternView bukkitEntity = null;
-+    private Player player;
-+
-+    @Override
-+    public CraftLecternView getBukkitView() {
-+        if (bukkitEntity != null) {
-+            return bukkitEntity;
-+        }
-+
-+        CraftInventoryLectern inventory = new CraftInventoryLectern(this.lectern);
-+        bukkitEntity = new CraftLecternView(this.player, inventory, this);
-+        return bukkitEntity;
-+    }
-+    // CraftBukkit end
-     private static final int DATA_COUNT = 1;
-     private static final int SLOT_COUNT = 1;
-     public static final int BUTTON_PREV_PAGE = 1;
-@@ -16,11 +41,13 @@
-     private final IInventory lectern;
-     private final IContainerProperties lecternData;
- 
--    public ContainerLectern(int i) {
--        this(i, new InventorySubcontainer(1), new ContainerProperties(1));
-+    // CraftBukkit start - add player
-+    public ContainerLectern(int i, PlayerInventory playerinventory) {
-+        this(i, new InventorySubcontainer(1), new ContainerProperties(1), playerinventory);
-     }
- 
--    public ContainerLectern(int i, IInventory iinventory, IContainerProperties icontainerproperties) {
-+    public ContainerLectern(int i, IInventory iinventory, IContainerProperties icontainerproperties, PlayerInventory playerinventory) {
-+        // CraftBukkit end
-         super(Containers.LECTERN, i);
-         checkContainerSize(iinventory, 1);
-         checkContainerDataCount(icontainerproperties, 1);
-@@ -34,6 +61,7 @@
-             }
-         });
-         this.addDataSlots(icontainerproperties);
-+        player = (Player) playerinventory.player.getBukkitEntity(); // CraftBukkit
-     }
- 
-     @Override
-@@ -59,6 +87,13 @@
-                         return false;
-                     }
- 
-+                    // CraftBukkit start - Event for taking the book
-+                    PlayerTakeLecternBookEvent event = new PlayerTakeLecternBookEvent(player, ((CraftInventoryLectern) getBukkitView().getTopInventory()).getHolder());
-+                    Bukkit.getServer().getPluginManager().callEvent(event);
-+                    if (event.isCancelled()) {
-+                        return false;
-+                    }
-+                    // CraftBukkit end
-                     ItemStack itemstack = this.lectern.removeItemNoUpdate(0);
- 
-                     this.lectern.setChanged();
-@@ -86,6 +121,8 @@
- 
-     @Override
-     public boolean stillValid(EntityHuman entityhuman) {
-+        if (lectern instanceof LecternInventory && !((LecternInventory) lectern).getLectern().hasBook()) return false; // CraftBukkit
-+        if (!this.checkReachable) return true; // CraftBukkit
-         return this.lectern.stillValid(entityhuman);
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerLevelAccess.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/ContainerLevelAccess.java.patch
new file mode 100644
index 0000000000..d49f995251
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/ContainerLevelAccess.java.patch
@@ -0,0 +1,43 @@
+--- a/net/minecraft/world/inventory/ContainerLevelAccess.java
++++ b/net/minecraft/world/inventory/ContainerLevelAccess.java
+@@ -8,6 +8,20 @@
+ 
+ public interface ContainerLevelAccess {
+ 
++    // CraftBukkit start
++    default Level getWorld() {
++        throw new UnsupportedOperationException("Not supported yet.");
++    }
++
++    default BlockPos getPosition() {
++        throw new UnsupportedOperationException("Not supported yet.");
++    }
++
++    default org.bukkit.Location getLocation() {
++        return new org.bukkit.Location(this.getWorld().getWorld(), this.getPosition().getX(), this.getPosition().getY(), this.getPosition().getZ());
++    }
++    // CraftBukkit end
++
+     ContainerLevelAccess NULL = new ContainerLevelAccess() {
+         @Override
+         public <T> Optional<T> evaluate(BiFunction<Level, BlockPos, T> getter) {
+@@ -17,7 +31,19 @@
+ 
+     static ContainerLevelAccess create(final Level world, final BlockPos pos) {
+         return new ContainerLevelAccess() {
++            // CraftBukkit start
+             @Override
++            public Level getWorld() {
++                return world;
++            }
++
++            @Override
++            public BlockPos getPosition() {
++                return pos;
++            }
++            // CraftBukkit end
++
++            @Override
+             public <T> Optional<T> evaluate(BiFunction<Level, BlockPos, T> getter) {
+                 return Optional.of(getter.apply(world, pos));
+             }
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerLoom.patch b/paper-server/patches/sources/net/minecraft/world/inventory/ContainerLoom.patch
deleted file mode 100644
index ff61f6da0f..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerLoom.patch
+++ /dev/null
@@ -1,104 +0,0 @@
---- a/net/minecraft/world/inventory/ContainerLoom.java
-+++ b/net/minecraft/world/inventory/ContainerLoom.java
-@@ -23,8 +23,30 @@
- import net.minecraft.world.level.block.entity.BannerPatternLayers;
- import net.minecraft.world.level.block.entity.EnumBannerPatternType;
- 
-+// CraftBukkit start
-+import org.bukkit.Location;
-+import org.bukkit.craftbukkit.inventory.CraftInventoryLoom;
-+import org.bukkit.craftbukkit.inventory.view.CraftLoomView;
-+import org.bukkit.entity.Player;
-+// CraftBukkit end
-+
- public class ContainerLoom extends Container {
- 
-+    // CraftBukkit start
-+    private CraftLoomView bukkitEntity = null;
-+    private Player player;
-+
-+    @Override
-+    public CraftLoomView getBukkitView() {
-+        if (bukkitEntity != null) {
-+            return bukkitEntity;
-+        }
-+
-+        CraftInventoryLoom inventory = new CraftInventoryLoom(this.inputContainer, this.outputContainer);
-+        bukkitEntity = new CraftLoomView(this.player, inventory, this);
-+        return bukkitEntity;
-+    }
-+    // CraftBukkit end
-     private static final int PATTERN_NOT_SET = -1;
-     private static final int INV_SLOT_START = 4;
-     private static final int INV_SLOT_END = 31;
-@@ -60,6 +82,13 @@
-                 ContainerLoom.this.slotsChanged(this);
-                 ContainerLoom.this.slotUpdateListener.run();
-             }
-+
-+            // CraftBukkit start
-+            @Override
-+            public Location getLocation() {
-+                return containeraccess.getLocation();
-+            }
-+            // CraftBukkit end
-         };
-         this.outputContainer = new InventorySubcontainer(1) {
-             @Override
-@@ -67,21 +96,28 @@
-                 super.setChanged();
-                 ContainerLoom.this.slotUpdateListener.run();
-             }
-+
-+            // CraftBukkit start
-+            @Override
-+            public Location getLocation() {
-+                return containeraccess.getLocation();
-+            }
-+            // CraftBukkit end
-         };
-         this.access = containeraccess;
--        this.bannerSlot = this.addSlot(new Slot(this, this.inputContainer, 0, 13, 26) {
-+        this.bannerSlot = this.addSlot(new Slot(this.inputContainer, 0, 13, 26) { // CraftBukkit - decompile error
-             @Override
-             public boolean mayPlace(ItemStack itemstack) {
-                 return itemstack.getItem() instanceof ItemBanner;
-             }
-         });
--        this.dyeSlot = this.addSlot(new Slot(this, this.inputContainer, 1, 33, 26) {
-+        this.dyeSlot = this.addSlot(new Slot(this.inputContainer, 1, 33, 26) { // CraftBukkit - decompile error
-             @Override
-             public boolean mayPlace(ItemStack itemstack) {
-                 return itemstack.getItem() instanceof ItemDye;
-             }
-         });
--        this.patternSlot = this.addSlot(new Slot(this, this.inputContainer, 2, 23, 45) {
-+        this.patternSlot = this.addSlot(new Slot(this.inputContainer, 2, 23, 45) { // CraftBukkit - decompile error
-             @Override
-             public boolean mayPlace(ItemStack itemstack) {
-                 return itemstack.getItem() instanceof ItemBannerPattern;
-@@ -116,10 +152,12 @@
-         this.addStandardInventorySlots(playerinventory, 8, 84);
-         this.addDataSlot(this.selectedBannerPatternIndex);
-         this.patternGetter = playerinventory.player.registryAccess().lookupOrThrow(Registries.BANNER_PATTERN);
-+        player = (Player) playerinventory.player.getBukkitEntity(); // CraftBukkit
-     }
- 
-     @Override
-     public boolean stillValid(EntityHuman entityhuman) {
-+        if (!this.checkReachable) return true; // CraftBukkit
-         return stillValid(this.access, entityhuman, Blocks.LOOM);
-     }
- 
-@@ -294,6 +332,11 @@
-             EnumColor enumcolor = ((ItemDye) itemstack1.getItem()).getDyeColor();
- 
-             itemstack2.update(DataComponents.BANNER_PATTERNS, BannerPatternLayers.EMPTY, (bannerpatternlayers) -> {
-+                // CraftBukkit start
-+                if (bannerpatternlayers.layers().size() > 20) {
-+                    bannerpatternlayers = new BannerPatternLayers(List.copyOf(bannerpatternlayers.layers().subList(0, 20)));
-+                }
-+                // CraftBukkit end
-                 return (new BannerPatternLayers.a()).addAll(bannerpatternlayers).add(holder, enumcolor).build();
-             });
-         }
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerMerchant.patch b/paper-server/patches/sources/net/minecraft/world/inventory/ContainerMerchant.patch
deleted file mode 100644
index 6f8db52e2d..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerMerchant.patch
+++ /dev/null
@@ -1,48 +0,0 @@
---- a/net/minecraft/world/inventory/ContainerMerchant.java
-+++ b/net/minecraft/world/inventory/ContainerMerchant.java
-@@ -13,6 +13,8 @@
- import net.minecraft.world.item.trading.MerchantRecipe;
- import net.minecraft.world.item.trading.MerchantRecipeList;
- 
-+import org.bukkit.craftbukkit.inventory.view.CraftMerchantView; // CraftBukkit
-+
- public class ContainerMerchant extends Container {
- 
-     protected static final int PAYMENT1_SLOT = 0;
-@@ -32,6 +34,19 @@
-     private boolean showProgressBar;
-     private boolean canRestock;
- 
-+    // CraftBukkit start
-+    private CraftMerchantView bukkitEntity = null;
-+    private PlayerInventory player;
-+
-+    @Override
-+    public CraftMerchantView getBukkitView() {
-+        if (bukkitEntity == null) {
-+            bukkitEntity = new CraftMerchantView(this.player.player.getBukkitEntity(), new org.bukkit.craftbukkit.inventory.CraftInventoryMerchant(trader, tradeContainer), this, trader);
-+        }
-+        return bukkitEntity;
-+    }
-+    // CraftBukkit end
-+
-     public ContainerMerchant(int i, PlayerInventory playerinventory) {
-         this(i, playerinventory, new MerchantWrapper(playerinventory.player));
-     }
-@@ -43,6 +58,7 @@
-         this.addSlot(new Slot(this.tradeContainer, 0, 136, 37));
-         this.addSlot(new Slot(this.tradeContainer, 1, 162, 37));
-         this.addSlot(new SlotMerchantResult(playerinventory.player, imerchant, this.tradeContainer, 2, 220, 37));
-+        this.player = playerinventory; // CraftBukkit - save player
-         this.addStandardInventorySlots(playerinventory, 108, 84);
-     }
- 
-@@ -143,7 +159,7 @@
-     }
- 
-     private void playTradeSound() {
--        if (!this.trader.isClientSide()) {
-+        if (!this.trader.isClientSide() && this.trader instanceof Entity) { // CraftBukkit - SPIGOT-5035
-             Entity entity = (Entity) this.trader;
- 
-             entity.level().playLocalSound(entity.getX(), entity.getY(), entity.getZ(), this.trader.getNotifyTradeSound(), SoundCategory.NEUTRAL, 1.0F, 1.0F, false);
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerPlayer.patch b/paper-server/patches/sources/net/minecraft/world/inventory/ContainerPlayer.patch
deleted file mode 100644
index 35cd2ec5b2..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerPlayer.patch
+++ /dev/null
@@ -1,59 +0,0 @@
---- a/net/minecraft/world/inventory/ContainerPlayer.java
-+++ b/net/minecraft/world/inventory/ContainerPlayer.java
-@@ -12,6 +12,12 @@
- import net.minecraft.world.item.crafting.RecipeHolder;
- import net.minecraft.world.level.World;
- 
-+// CraftBukkit start
-+import net.minecraft.network.chat.IChatBaseComponent;
-+import org.bukkit.craftbukkit.inventory.CraftInventoryCrafting;
-+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
-+// CraftBukkit end
-+
- public class ContainerPlayer extends AbstractCraftingMenu {
- 
-     public static final int CONTAINER_ID = 0;
-@@ -38,9 +44,15 @@
-     private static final EnumItemSlot[] SLOT_IDS = new EnumItemSlot[]{EnumItemSlot.HEAD, EnumItemSlot.CHEST, EnumItemSlot.LEGS, EnumItemSlot.FEET};
-     public final boolean active;
-     private final EntityHuman owner;
-+    // CraftBukkit start
-+    private CraftInventoryView bukkitEntity = null;
-+    // CraftBukkit end
- 
-     public ContainerPlayer(PlayerInventory playerinventory, boolean flag, final EntityHuman entityhuman) {
--        super((Containers) null, 0, 2, 2);
-+        // CraftBukkit start
-+        super((Containers) null, 0, 2, 2, playerinventory); // CraftBukkit - save player
-+        setTitle(IChatBaseComponent.translatable("container.crafting")); // SPIGOT-4722: Allocate title for player inventory
-+        // CraftBukkit end
-         this.active = flag;
-         this.owner = entityhuman;
-         this.addResultSlot(entityhuman, 154, 28);
-@@ -54,7 +66,7 @@
-         }
- 
-         this.addStandardInventorySlots(playerinventory, 8, 84);
--        this.addSlot(new Slot(this, playerinventory, 40, 77, 62) {
-+        this.addSlot(new Slot(playerinventory, 40, 77, 62) { // CraftBukkit - decompile error
-             @Override
-             public void setByPlayer(ItemStack itemstack, ItemStack itemstack1) {
-                 entityhuman.onEquipItem(EnumItemSlot.OFFHAND, itemstack1, itemstack);
-@@ -190,4 +202,17 @@
-     protected EntityHuman owner() {
-         return this.owner;
-     }
-+
-+    // CraftBukkit start
-+    @Override
-+    public CraftInventoryView getBukkitView() {
-+        if (bukkitEntity != null) {
-+            return bukkitEntity;
-+        }
-+
-+        CraftInventoryCrafting inventory = new CraftInventoryCrafting(this.craftSlots, this.resultSlots);
-+        bukkitEntity = new CraftInventoryView(this.owner.getBukkitEntity(), inventory, this);
-+        return bukkitEntity;
-+    }
-+    // CraftBukkit end
- }
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerShulkerBox.patch b/paper-server/patches/sources/net/minecraft/world/inventory/ContainerShulkerBox.patch
deleted file mode 100644
index 5109b7b8e9..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerShulkerBox.patch
+++ /dev/null
@@ -1,48 +0,0 @@
---- a/net/minecraft/world/inventory/ContainerShulkerBox.java
-+++ b/net/minecraft/world/inventory/ContainerShulkerBox.java
-@@ -6,10 +6,29 @@
- import net.minecraft.world.entity.player.PlayerInventory;
- import net.minecraft.world.item.ItemStack;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.inventory.CraftInventory;
-+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
-+// CraftBukkit end
-+
- public class ContainerShulkerBox extends Container {
- 
-     private static final int CONTAINER_SIZE = 27;
-     private final IInventory container;
-+    // CraftBukkit start
-+    private CraftInventoryView bukkitEntity;
-+    private PlayerInventory player;
-+
-+    @Override
-+    public CraftInventoryView getBukkitView() {
-+        if (bukkitEntity != null) {
-+            return bukkitEntity;
-+        }
-+
-+        bukkitEntity = new CraftInventoryView(this.player.player.getBukkitEntity(), new CraftInventory(this.container), this);
-+        return bukkitEntity;
-+    }
-+    // CraftBukkit end
- 
-     public ContainerShulkerBox(int i, PlayerInventory playerinventory) {
-         this(i, playerinventory, new InventorySubcontainer(27));
-@@ -19,6 +38,7 @@
-         super(Containers.SHULKER_BOX, i);
-         checkContainerSize(iinventory, 27);
-         this.container = iinventory;
-+        this.player = playerinventory; // CraftBukkit - save player
-         iinventory.startOpen(playerinventory.player);
-         boolean flag = true;
-         boolean flag1 = true;
-@@ -34,6 +54,7 @@
- 
-     @Override
-     public boolean stillValid(EntityHuman entityhuman) {
-+        if (!this.checkReachable) return true; // CraftBukkit
-         return this.container.stillValid(entityhuman);
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerStonecutter.patch b/paper-server/patches/sources/net/minecraft/world/inventory/ContainerStonecutter.patch
deleted file mode 100644
index 88d269485e..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerStonecutter.patch
+++ /dev/null
@@ -1,77 +0,0 @@
---- a/net/minecraft/world/inventory/ContainerStonecutter.java
-+++ b/net/minecraft/world/inventory/ContainerStonecutter.java
-@@ -17,6 +17,13 @@
- import net.minecraft.world.level.World;
- import net.minecraft.world.level.block.Blocks;
- 
-+// CraftBukkit start
-+import org.bukkit.Location;
-+import org.bukkit.craftbukkit.inventory.CraftInventoryStonecutter;
-+import org.bukkit.craftbukkit.inventory.view.CraftStonecutterView;
-+import org.bukkit.entity.Player;
-+// CraftBukkit end
-+
- public class ContainerStonecutter extends Container {
- 
-     public static final int INPUT_SLOT = 0;
-@@ -36,6 +43,21 @@
-     Runnable slotUpdateListener;
-     public final IInventory container;
-     final InventoryCraftResult resultContainer;
-+    // CraftBukkit start
-+    private CraftStonecutterView bukkitEntity = null;
-+    private Player player;
-+
-+    @Override
-+    public CraftStonecutterView getBukkitView() {
-+        if (bukkitEntity != null) {
-+            return bukkitEntity;
-+        }
-+
-+        CraftInventoryStonecutter inventory = new CraftInventoryStonecutter(this.container, this.resultContainer);
-+        bukkitEntity = new CraftStonecutterView(this.player, inventory, this);
-+        return bukkitEntity;
-+    }
-+    // CraftBukkit end
- 
-     public ContainerStonecutter(int i, PlayerInventory playerinventory) {
-         this(i, playerinventory, ContainerAccess.NULL);
-@@ -55,6 +77,13 @@
-                 ContainerStonecutter.this.slotsChanged(this);
-                 ContainerStonecutter.this.slotUpdateListener.run();
-             }
-+
-+            // CraftBukkit start
-+            @Override
-+            public Location getLocation() {
-+                return containeraccess.getLocation();
-+            }
-+            // CraftBukkit end
-         };
-         this.resultContainer = new InventoryCraftResult();
-         this.access = containeraccess;
-@@ -94,6 +123,7 @@
-         });
-         this.addStandardInventorySlots(playerinventory, 8, 84);
-         this.addDataSlot(this.selectedRecipeIndex);
-+        player = (Player) playerinventory.player.getBukkitEntity(); // CraftBukkit
-     }
- 
-     public int getSelectedRecipeIndex() {
-@@ -114,6 +144,7 @@
- 
-     @Override
-     public boolean stillValid(EntityHuman entityhuman) {
-+        if (!this.checkReachable) return true; // CraftBukkit
-         return stillValid(this.access, entityhuman, Blocks.STONECUTTER);
-     }
- 
-@@ -158,7 +189,7 @@
-     }
- 
-     void setupResultSlot(int i) {
--        Optional optional;
-+        Optional<RecipeHolder<RecipeStonecutting>> optional; // CraftBukkit - decompile error
- 
-         if (!this.recipesForInput.isEmpty() && this.isValidRecipeIndex(i)) {
-             SelectableRecipe.a<RecipeStonecutting> selectablerecipe_a = (SelectableRecipe.a) this.recipesForInput.entries().get(i);
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerWorkbench.patch b/paper-server/patches/sources/net/minecraft/world/inventory/ContainerWorkbench.patch
deleted file mode 100644
index 4e456f854d..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerWorkbench.patch
+++ /dev/null
@@ -1,75 +0,0 @@
---- a/net/minecraft/world/inventory/ContainerWorkbench.java
-+++ b/net/minecraft/world/inventory/ContainerWorkbench.java
-@@ -16,6 +16,12 @@
- import net.minecraft.world.item.crafting.Recipes;
- import net.minecraft.world.level.block.Blocks;
- 
-+// CraftBukkit start
-+import net.minecraft.world.item.crafting.RecipeRepair;
-+import org.bukkit.craftbukkit.inventory.CraftInventoryCrafting;
-+import org.bukkit.craftbukkit.inventory.CraftInventoryView;
-+// CraftBukkit end
-+
- public class ContainerWorkbench extends AbstractCraftingMenu {
- 
-     private static final int CRAFTING_GRID_WIDTH = 3;
-@@ -31,13 +37,16 @@
-     public final ContainerAccess access;
-     private final EntityHuman player;
-     private boolean placingRecipe;
-+    // CraftBukkit start
-+    private CraftInventoryView bukkitEntity = null;
-+    // CraftBukkit end
- 
-     public ContainerWorkbench(int i, PlayerInventory playerinventory) {
-         this(i, playerinventory, ContainerAccess.NULL);
-     }
- 
-     public ContainerWorkbench(int i, PlayerInventory playerinventory, ContainerAccess containeraccess) {
--        super(Containers.CRAFTING, i, 3, 3);
-+        super(Containers.CRAFTING, i, 3, 3, playerinventory); // CraftBukkit - pass player
-         this.access = containeraccess;
-         this.player = playerinventory.player;
-         this.addResultSlot(this.player, 124, 35);
-@@ -50,6 +59,7 @@
-         EntityPlayer entityplayer = (EntityPlayer) entityhuman;
-         ItemStack itemstack = ItemStack.EMPTY;
-         Optional<RecipeHolder<RecipeCrafting>> optional = worldserver.getServer().getRecipeManager().getRecipeFor(Recipes.CRAFTING, craftinginput, worldserver, recipeholder);
-+        inventorycrafting.setCurrentRecipe(optional.orElse(null)); // CraftBukkit
- 
-         if (optional.isPresent()) {
-             RecipeHolder<RecipeCrafting> recipeholder1 = (RecipeHolder) optional.get();
-@@ -63,6 +73,7 @@
-                 }
-             }
-         }
-+        itemstack = org.bukkit.craftbukkit.event.CraftEventFactory.callPreCraftEvent(inventorycrafting, inventorycraftresult, itemstack, container.getBukkitView(), optional.map(RecipeHolder::value).orElse(null) instanceof RecipeRepair); // CraftBukkit
- 
-         inventorycraftresult.setItem(0, itemstack);
-         container.setRemoteSlot(0, itemstack);
-@@ -103,6 +114,7 @@
- 
-     @Override
-     public boolean stillValid(EntityHuman entityhuman) {
-+        if (!this.checkReachable) return true; // CraftBukkit
-         return stillValid(this.access, entityhuman, Blocks.CRAFTING_TABLE);
-     }
- 
-@@ -181,4 +193,17 @@
-     protected EntityHuman owner() {
-         return this.player;
-     }
-+
-+    // CraftBukkit start
-+    @Override
-+    public CraftInventoryView getBukkitView() {
-+        if (bukkitEntity != null) {
-+            return bukkitEntity;
-+        }
-+
-+        CraftInventoryCrafting inventory = new CraftInventoryCrafting(this.craftSlots, this.resultSlots);
-+        bukkitEntity = new CraftInventoryView(this.player.getBukkitEntity(), inventory, this);
-+        return bukkitEntity;
-+    }
-+    // CraftBukkit end
- }
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/Containers.patch b/paper-server/patches/sources/net/minecraft/world/inventory/Containers.patch
deleted file mode 100644
index 0febcbd231..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/inventory/Containers.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/net/minecraft/world/inventory/Containers.java
-+++ b/net/minecraft/world/inventory/Containers.java
-@@ -8,6 +8,10 @@
- import net.minecraft.world.flag.FeatureFlagSet;
- import net.minecraft.world.flag.FeatureFlags;
- 
-+// CraftBukkit start
-+import net.minecraft.world.entity.player.PlayerInventory;
-+// CraftBukkit end
-+
- public class Containers<T extends Container> implements FeatureElement {
- 
-     public static final Containers<ContainerChest> GENERIC_9x1 = register("generic_9x1", ContainerChest::oneRow);
-@@ -28,7 +32,7 @@
-     public static final Containers<ContainerGrindstone> GRINDSTONE = register("grindstone", ContainerGrindstone::new);
-     public static final Containers<ContainerHopper> HOPPER = register("hopper", ContainerHopper::new);
-     public static final Containers<ContainerLectern> LECTERN = register("lectern", (i, playerinventory) -> {
--        return new ContainerLectern(i);
-+        return new ContainerLectern(i, playerinventory); // CraftBukkit
-     });
-     public static final Containers<ContainerLoom> LOOM = register("loom", ContainerLoom::new);
-     public static final Containers<ContainerMerchant> MERCHANT = register("merchant", ContainerMerchant::new);
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/CrafterMenu.patch b/paper-server/patches/sources/net/minecraft/world/inventory/CrafterMenu.java.patch
similarity index 66%
rename from paper-server/patches/sources/net/minecraft/world/inventory/CrafterMenu.patch
rename to paper-server/patches/sources/net/minecraft/world/inventory/CrafterMenu.java.patch
index 0f552abaaa..e998f9ae45 100644
--- a/paper-server/patches/sources/net/minecraft/world/inventory/CrafterMenu.patch
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/CrafterMenu.java.patch
@@ -1,7 +1,7 @@
 --- a/net/minecraft/world/inventory/CrafterMenu.java
 +++ b/net/minecraft/world/inventory/CrafterMenu.java
 @@ -10,8 +10,27 @@
- import net.minecraft.world.item.crafting.RecipeCrafting;
+ import net.minecraft.world.item.crafting.CraftingRecipe;
  import net.minecraft.world.level.block.CrafterBlock;
  
 +// CraftBukkit start
@@ -9,20 +9,20 @@
 +import org.bukkit.craftbukkit.inventory.view.CraftCrafterView;
 +// CraftBukkit end
 +
- public class CrafterMenu extends Container implements ICrafting {
+ public class CrafterMenu extends AbstractContainerMenu implements ContainerListener {
  
 +    // CraftBukkit start
 +    private CraftCrafterView bukkitEntity = null;
 +
 +    @Override
 +    public CraftCrafterView getBukkitView() {
-+        if (bukkitEntity != null) {
-+            return bukkitEntity;
++        if (this.bukkitEntity != null) {
++            return this.bukkitEntity;
 +        }
 +
 +        CraftInventoryCrafter inventory = new CraftInventoryCrafter(this.container, this.resultContainer);
-+        bukkitEntity = new CraftCrafterView(this.player.getBukkitEntity(), inventory, this);
-+        return bukkitEntity;
++        this.bukkitEntity = new CraftCrafterView(this.player.getBukkitEntity(), inventory, this);
++        return this.bukkitEntity;
 +    }
 +    // CraftBukkit end
      protected static final int SLOT_COUNT = 9;
@@ -31,8 +31,8 @@
 @@ -106,6 +125,7 @@
  
      @Override
-     public boolean stillValid(EntityHuman entityhuman) {
+     public boolean stillValid(Player player) {
 +        if (!this.checkReachable) return true; // CraftBukkit
-         return this.container.stillValid(entityhuman);
+         return this.container.stillValid(player);
      }
  
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/InventoryCrafting.patch b/paper-server/patches/sources/net/minecraft/world/inventory/CraftingContainer.java.patch
similarity index 75%
rename from paper-server/patches/sources/net/minecraft/world/inventory/InventoryCrafting.patch
rename to paper-server/patches/sources/net/minecraft/world/inventory/CraftingContainer.java.patch
index 32f823c9fa..0c5babe735 100644
--- a/paper-server/patches/sources/net/minecraft/world/inventory/InventoryCrafting.patch
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/CraftingContainer.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/world/inventory/InventoryCrafting.java
-+++ b/net/minecraft/world/inventory/InventoryCrafting.java
+--- a/net/minecraft/world/inventory/CraftingContainer.java
++++ b/net/minecraft/world/inventory/CraftingContainer.java
 @@ -5,6 +5,10 @@
  import net.minecraft.world.item.ItemStack;
  import net.minecraft.world.item.crafting.CraftingInput;
@@ -8,7 +8,7 @@
 +import net.minecraft.world.item.crafting.RecipeHolder;
 +// CraftBukkit end
 +
- public interface InventoryCrafting extends IInventory, AutoRecipeOutput {
+ public interface CraftingContainer extends Container, StackedContentsCompatible {
  
      int getWidth();
 @@ -13,6 +17,15 @@
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/CraftingMenu.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/CraftingMenu.java.patch
new file mode 100644
index 0000000000..9f0941d40b
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/CraftingMenu.java.patch
@@ -0,0 +1,74 @@
+--- a/net/minecraft/world/inventory/CraftingMenu.java
++++ b/net/minecraft/world/inventory/CraftingMenu.java
+@@ -14,7 +14,11 @@
+ import net.minecraft.world.item.crafting.CraftingRecipe;
+ import net.minecraft.world.item.crafting.RecipeHolder;
+ import net.minecraft.world.item.crafting.RecipeType;
++import net.minecraft.world.item.crafting.RepairItemRecipe;
+ import net.minecraft.world.level.block.Blocks;
++import org.bukkit.craftbukkit.inventory.CraftInventoryCrafting;
++import org.bukkit.craftbukkit.inventory.CraftInventoryView;
++// CraftBukkit end
+ 
+ public class CraftingMenu extends AbstractCraftingMenu {
+ 
+@@ -31,13 +35,16 @@
+     public final ContainerLevelAccess access;
+     private final Player player;
+     private boolean placingRecipe;
++    // CraftBukkit start
++    private CraftInventoryView bukkitEntity = null;
++    // CraftBukkit end
+ 
+     public CraftingMenu(int syncId, Inventory playerInventory) {
+         this(syncId, playerInventory, ContainerLevelAccess.NULL);
+     }
+ 
+     public CraftingMenu(int syncId, Inventory playerInventory, ContainerLevelAccess context) {
+-        super(MenuType.CRAFTING, syncId, 3, 3);
++        super(MenuType.CRAFTING, syncId, 3, 3, playerInventory); // CraftBukkit - pass player
+         this.access = context;
+         this.player = playerInventory.player;
+         this.addResultSlot(this.player, 124, 35);
+@@ -50,6 +57,7 @@
+         ServerPlayer entityplayer = (ServerPlayer) player;
+         ItemStack itemstack = ItemStack.EMPTY;
+         Optional<RecipeHolder<CraftingRecipe>> optional = world.getServer().getRecipeManager().getRecipeFor(RecipeType.CRAFTING, craftinginput, world, recipe);
++        craftingInventory.setCurrentRecipe(optional.orElse(null)); // CraftBukkit
+ 
+         if (optional.isPresent()) {
+             RecipeHolder<CraftingRecipe> recipeholder1 = (RecipeHolder) optional.get();
+@@ -63,6 +71,7 @@
+                 }
+             }
+         }
++        itemstack = org.bukkit.craftbukkit.event.CraftEventFactory.callPreCraftEvent(craftingInventory, resultInventory, itemstack, handler.getBukkitView(), optional.map(RecipeHolder::value).orElse(null) instanceof RepairItemRecipe); // CraftBukkit
+ 
+         resultInventory.setItem(0, itemstack);
+         handler.setRemoteSlot(0, itemstack);
+@@ -103,6 +112,7 @@
+ 
+     @Override
+     public boolean stillValid(Player player) {
++        if (!this.checkReachable) return true; // CraftBukkit
+         return stillValid(this.access, player, Blocks.CRAFTING_TABLE);
+     }
+ 
+@@ -181,4 +191,17 @@
+     protected Player owner() {
+         return this.player;
+     }
++
++    // CraftBukkit start
++    @Override
++    public CraftInventoryView getBukkitView() {
++        if (this.bukkitEntity != null) {
++            return this.bukkitEntity;
++        }
++
++        CraftInventoryCrafting inventory = new CraftInventoryCrafting(this.craftSlots, this.resultSlots);
++        this.bukkitEntity = new CraftInventoryView(this.player.getBukkitEntity(), inventory, this);
++        return this.bukkitEntity;
++    }
++    // CraftBukkit end
+ }
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/DispenserMenu.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/DispenserMenu.java.patch
new file mode 100644
index 0000000000..18ed7c2049
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/DispenserMenu.java.patch
@@ -0,0 +1,62 @@
+--- a/net/minecraft/world/inventory/DispenserMenu.java
++++ b/net/minecraft/world/inventory/DispenserMenu.java
+@@ -6,6 +6,11 @@
+ import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.item.ItemStack;
+ 
++// CraftBukkit start
++import org.bukkit.craftbukkit.inventory.CraftInventory;
++import org.bukkit.craftbukkit.inventory.CraftInventoryView;
++// CraftBukkit end
++
+ public class DispenserMenu extends AbstractContainerMenu {
+ 
+     private static final int SLOT_COUNT = 9;
+@@ -14,6 +19,10 @@
+     private static final int USE_ROW_SLOT_START = 36;
+     private static final int USE_ROW_SLOT_END = 45;
+     public final Container dispenser;
++    // CraftBukkit start
++    private CraftInventoryView bukkitEntity = null;
++    private Inventory player;
++    // CraftBukkit end
+ 
+     public DispenserMenu(int syncId, Inventory playerInventory) {
+         this(syncId, playerInventory, new SimpleContainer(9));
+@@ -21,6 +30,10 @@
+ 
+     public DispenserMenu(int syncId, Inventory playerInventory, Container inventory) {
+         super(MenuType.GENERIC_3x3, syncId);
++        // CraftBukkit start - Save player
++        this.player = playerInventory;
++        // CraftBukkit end
++
+         checkContainerSize(inventory, 9);
+         this.dispenser = inventory;
+         inventory.startOpen(playerInventory.player);
+@@ -41,6 +54,7 @@
+ 
+     @Override
+     public boolean stillValid(Player player) {
++        if (!this.checkReachable) return true; // CraftBukkit
+         return this.dispenser.stillValid(player);
+     }
+ 
+@@ -82,4 +96,17 @@
+         super.removed(player);
+         this.dispenser.stopOpen(player);
+     }
++
++    // CraftBukkit start
++    @Override
++    public CraftInventoryView getBukkitView() {
++        if (this.bukkitEntity != null) {
++            return this.bukkitEntity;
++        }
++
++        CraftInventory inventory = new CraftInventory(this.dispenser);
++        this.bukkitEntity = new CraftInventoryView(this.player.player.getBukkitEntity(), inventory, this);
++        return this.bukkitEntity;
++    }
++    // CraftBukkit end
+ }
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerEnchantTable.patch b/paper-server/patches/sources/net/minecraft/world/inventory/EnchantmentMenu.java.patch
similarity index 56%
rename from paper-server/patches/sources/net/minecraft/world/inventory/ContainerEnchantTable.patch
rename to paper-server/patches/sources/net/minecraft/world/inventory/EnchantmentMenu.java.patch
index 1b01560110..4c042c3cc9 100644
--- a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerEnchantTable.patch
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/EnchantmentMenu.java.patch
@@ -1,9 +1,17 @@
---- a/net/minecraft/world/inventory/ContainerEnchantTable.java
-+++ b/net/minecraft/world/inventory/ContainerEnchantTable.java
-@@ -30,6 +30,19 @@
- import net.minecraft.world.level.block.BlockEnchantmentTable;
+--- a/net/minecraft/world/inventory/EnchantmentMenu.java
++++ b/net/minecraft/world/inventory/EnchantmentMenu.java
+@@ -21,7 +21,6 @@
+ import net.minecraft.world.Container;
+ import net.minecraft.world.SimpleContainer;
+ import net.minecraft.world.entity.player.Inventory;
+-import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.item.Items;
+ import net.minecraft.world.item.enchantment.Enchantment;
+@@ -29,6 +28,18 @@
+ import net.minecraft.world.item.enchantment.EnchantmentInstance;
  import net.minecraft.world.level.block.Blocks;
- 
+ import net.minecraft.world.level.block.EnchantingTableBlock;
 +// CraftBukkit start
 +import java.util.Map;
 +import org.bukkit.Location;
@@ -16,11 +24,10 @@
 +import org.bukkit.event.enchantment.PrepareItemEnchantEvent;
 +import org.bukkit.entity.Player;
 +// CraftBukkit end
-+
- public class ContainerEnchantTable extends Container {
  
-     static final MinecraftKey EMPTY_SLOT_LAPIS_LAZULI = MinecraftKey.withDefaultNamespace("container/slot/lapis_lazuli");
-@@ -40,6 +53,10 @@
+ public class EnchantmentMenu extends AbstractContainerMenu {
+ 
+@@ -40,6 +51,10 @@
      public final int[] costs;
      public final int[] enchantClue;
      public final int[] levelClue;
@@ -29,26 +36,26 @@
 +    private Player player;
 +    // CraftBukkit end
  
-     public ContainerEnchantTable(int i, PlayerInventory playerinventory) {
-         this(i, playerinventory, ContainerAccess.NULL);
-@@ -53,6 +70,13 @@
+     public EnchantmentMenu(int syncId, Inventory playerInventory) {
+         this(syncId, playerInventory, ContainerLevelAccess.NULL);
+@@ -53,6 +68,13 @@
                  super.setChanged();
-                 ContainerEnchantTable.this.slotsChanged(this);
+                 EnchantmentMenu.this.slotsChanged(this);
              }
 +
 +            // CraftBukkit start
 +            @Override
 +            public Location getLocation() {
-+                return containeraccess.getLocation();
++                return context.getLocation();
 +            }
 +            // CraftBukkit end
          };
          this.random = RandomSource.create();
-         this.enchantmentSeed = ContainerProperty.standalone();
-@@ -60,13 +84,13 @@
+         this.enchantmentSeed = DataSlot.standalone();
+@@ -60,13 +82,13 @@
          this.enchantClue = new int[]{-1, -1, -1};
          this.levelClue = new int[]{-1, -1, -1};
-         this.access = containeraccess;
+         this.access = context;
 -        this.addSlot(new Slot(this, this.enchantSlots, 0, 15, 47) {
 +        this.addSlot(new Slot(this.enchantSlots, 0, 15, 47) { // CraftBukkit - decompile error
              @Override
@@ -59,28 +66,28 @@
 -        this.addSlot(new Slot(this, this.enchantSlots, 1, 35, 47) {
 +        this.addSlot(new Slot(this.enchantSlots, 1, 35, 47) { // CraftBukkit - decompile error
              @Override
-             public boolean mayPlace(ItemStack itemstack) {
-                 return itemstack.is(Items.LAPIS_LAZULI);
-@@ -88,6 +112,9 @@
-         this.addDataSlot(ContainerProperty.shared(this.levelClue, 0));
-         this.addDataSlot(ContainerProperty.shared(this.levelClue, 1));
-         this.addDataSlot(ContainerProperty.shared(this.levelClue, 2));
+             public boolean mayPlace(ItemStack stack) {
+                 return stack.is(Items.LAPIS_LAZULI);
+@@ -88,6 +110,9 @@
+         this.addDataSlot(DataSlot.shared(this.levelClue, 0));
+         this.addDataSlot(DataSlot.shared(this.levelClue, 1));
+         this.addDataSlot(DataSlot.shared(this.levelClue, 2));
 +        // CraftBukkit start
-+        player = (Player) playerinventory.player.getBukkitEntity();
++        this.player = (Player) playerInventory.player.getBukkitEntity();
 +        // CraftBukkit end
      }
  
      @Override
-@@ -95,7 +122,7 @@
-         if (iinventory == this.enchantSlots) {
-             ItemStack itemstack = iinventory.getItem(0);
+@@ -95,7 +120,7 @@
+         if (inventory == this.enchantSlots) {
+             ItemStack itemstack = inventory.getItem(0);
  
 -            if (!itemstack.isEmpty() && itemstack.isEnchantable()) {
 +            if (!itemstack.isEmpty()) { // CraftBukkit - relax condition
                  this.access.execute((world, blockposition) -> {
-                     Registry<Holder<Enchantment>> registry = world.registryAccess().lookupOrThrow(Registries.ENCHANTMENT).asHolderIdMap();
+                     IdMap<Holder<Enchantment>> registry = world.registryAccess().lookupOrThrow(Registries.ENCHANTMENT).asHolderIdMap();
                      int i = 0;
-@@ -135,6 +162,41 @@
+@@ -135,6 +160,41 @@
                          }
                      }
  
@@ -92,7 +99,7 @@
 +                        offers[j] = (enchantment != null) ? new EnchantmentOffer(enchantment, this.levelClue[j], this.costs[j]) : null;
 +                    }
 +
-+                    PrepareItemEnchantEvent event = new PrepareItemEnchantEvent(player, this.getBukkitView(), access.getLocation().getBlock(), item, offers, i);
++                    PrepareItemEnchantEvent event = new PrepareItemEnchantEvent(this.player, this.getBukkitView(), this.access.getLocation().getBlock(), item, offers, i);
 +                    event.setCancelled(!itemstack.isEnchantable());
 +                    world.getCraftServer().getPluginManager().callEvent(event);
 +
@@ -122,29 +129,38 @@
                      this.broadcastChanges();
                  });
              } else {
-@@ -162,21 +224,46 @@
+@@ -149,7 +209,7 @@
+     }
+ 
+     @Override
+-    public boolean clickMenuButton(Player player, int id) {
++    public boolean clickMenuButton(net.minecraft.world.entity.player.Player player, int id) {
+         if (id >= 0 && id < this.costs.length) {
+             ItemStack itemstack = this.enchantSlots.getItem(0);
+             ItemStack itemstack1 = this.enchantSlots.getItem(1);
+@@ -162,21 +222,46 @@
                      ItemStack itemstack2 = itemstack;
-                     List<WeightedRandomEnchant> list = this.getEnchantmentList(world.registryAccess(), itemstack, i, this.costs[i]);
+                     List<EnchantmentInstance> list = this.getEnchantmentList(world.registryAccess(), itemstack, id, this.costs[id]);
  
 -                    if (!list.isEmpty()) {
--                        entityhuman.onEnchantmentPerformed(itemstack, j);
+-                        player.onEnchantmentPerformed(itemstack, j);
 +                    // CraftBukkit start
-+                    Registry<Holder<Enchantment>> registry = world.registryAccess().lookupOrThrow(Registries.ENCHANTMENT).asHolderIdMap();
++                    IdMap<Holder<Enchantment>> registry = world.registryAccess().lookupOrThrow(Registries.ENCHANTMENT).asHolderIdMap();
 +                    if (true || !list.isEmpty()) {
 +                        // entityhuman.onEnchantmentPerformed(itemstack, j); // Moved down
 +                        Map<org.bukkit.enchantments.Enchantment, Integer> enchants = new java.util.HashMap<org.bukkit.enchantments.Enchantment, Integer>();
-+                        for (WeightedRandomEnchant instance : list) {
++                        for (EnchantmentInstance instance : list) {
 +                            enchants.put(CraftEnchantment.minecraftHolderToBukkit(instance.enchantment), instance.level);
 +                        }
 +                        CraftItemStack item = CraftItemStack.asCraftMirror(itemstack2);
 +
-+                        org.bukkit.enchantments.Enchantment hintedEnchantment = CraftEnchantment.minecraftHolderToBukkit(registry.byId(enchantClue[i]));
-+                        int hintedEnchantmentLevel = levelClue[i];
-+                        EnchantItemEvent event = new EnchantItemEvent((Player) entityhuman.getBukkitEntity(), this.getBukkitView(), access.getLocation().getBlock(), item, this.costs[i], enchants, hintedEnchantment, hintedEnchantmentLevel, i);
++                        org.bukkit.enchantments.Enchantment hintedEnchantment = CraftEnchantment.minecraftHolderToBukkit(registry.byId(this.enchantClue[id]));
++                        int hintedEnchantmentLevel = this.levelClue[id];
++                        EnchantItemEvent event = new EnchantItemEvent((Player) player.getBukkitEntity(), this.getBukkitView(), this.access.getLocation().getBlock(), item, this.costs[id], enchants, hintedEnchantment, hintedEnchantmentLevel, id);
 +                        world.getCraftServer().getPluginManager().callEvent(event);
 +
 +                        int level = event.getExpLevelCost();
-+                        if (event.isCancelled() || (level > entityhuman.experienceLevel && !entityhuman.getAbilities().instabuild) || event.getEnchantsToAdd().isEmpty()) {
++                        if (event.isCancelled() || (level > player.experienceLevel && !player.getAbilities().instabuild) || event.getEnchantsToAdd().isEmpty()) {
 +                            return;
 +                        }
 +                        // CraftBukkit end
@@ -154,9 +170,6 @@
                          }
  
 -                        Iterator iterator = list.iterator();
--
--                        while (iterator.hasNext()) {
--                            WeightedRandomEnchant weightedrandomenchant = (WeightedRandomEnchant) iterator.next();
 +                        // CraftBukkit start
 +                        for (Map.Entry<org.bukkit.enchantments.Enchantment, Integer> entry : event.getEnchantsToAdd().entrySet()) {
 +                            Holder<Enchantment> nms = CraftEnchantment.bukkitToMinecraftHolder(entry.getKey());
@@ -164,26 +177,55 @@
 +                                continue;
 +                            }
  
-+                            WeightedRandomEnchant weightedrandomenchant = new WeightedRandomEnchant(nms, entry.getValue());
+-                        while (iterator.hasNext()) {
+-                            EnchantmentInstance weightedrandomenchant = (EnchantmentInstance) iterator.next();
+-
++                            EnchantmentInstance weightedrandomenchant = new EnchantmentInstance(nms, entry.getValue());
                              itemstack2.enchant(weightedrandomenchant.enchantment, weightedrandomenchant.level);
                          }
  
-+                        entityhuman.onEnchantmentPerformed(itemstack, j);
++                        player.onEnchantmentPerformed(itemstack, j);
 +                        // CraftBukkit end
 +
 +                        // CraftBukkit - TODO: let plugins change this
-                         itemstack1.consume(j, entityhuman);
+                         itemstack1.consume(j, player);
                          if (itemstack1.isEmpty()) {
                              this.enchantSlots.setItem(1, ItemStack.EMPTY);
-@@ -243,6 +330,7 @@
+@@ -190,7 +275,7 @@
+                         this.enchantSlots.setChanged();
+                         this.enchantmentSeed.set(player.getEnchantmentSeed());
+                         this.slotsChanged(this.enchantSlots);
+-                        world.playSound((Player) null, blockposition, SoundEvents.ENCHANTMENT_TABLE_USE, SoundSource.BLOCKS, 1.0F, world.random.nextFloat() * 0.1F + 0.9F);
++                        world.playSound((net.minecraft.world.entity.player.Player) null, blockposition, SoundEvents.ENCHANTMENT_TABLE_USE, SoundSource.BLOCKS, 1.0F, world.random.nextFloat() * 0.1F + 0.9F);
+                     }
  
-     @Override
-     public boolean stillValid(EntityHuman entityhuman) {
-+        if (!this.checkReachable) return true; // CraftBukkit
-         return stillValid(this.access, entityhuman, Blocks.ENCHANTING_TABLE);
+                 });
+@@ -234,7 +319,7 @@
      }
  
-@@ -293,4 +381,17 @@
+     @Override
+-    public void removed(Player player) {
++    public void removed(net.minecraft.world.entity.player.Player player) {
+         super.removed(player);
+         this.access.execute((world, blockposition) -> {
+             this.clearContainer(player, this.enchantSlots);
+@@ -242,12 +327,13 @@
+     }
+ 
+     @Override
+-    public boolean stillValid(Player player) {
++    public boolean stillValid(net.minecraft.world.entity.player.Player player) {
++        if (!this.checkReachable) return true; // CraftBukkit
+         return stillValid(this.access, player, Blocks.ENCHANTING_TABLE);
+     }
+ 
+     @Override
+-    public ItemStack quickMoveStack(Player player, int slot) {
++    public ItemStack quickMoveStack(net.minecraft.world.entity.player.Player player, int slot) {
+         ItemStack itemstack = ItemStack.EMPTY;
+         Slot slot1 = (Slot) this.slots.get(slot);
+ 
+@@ -293,4 +379,17 @@
  
          return itemstack;
      }
@@ -191,13 +233,13 @@
 +    // CraftBukkit start
 +    @Override
 +    public CraftEnchantmentView getBukkitView() {
-+        if (bukkitEntity != null) {
-+            return bukkitEntity;
++        if (this.bukkitEntity != null) {
++            return this.bukkitEntity;
 +        }
 +
 +        CraftInventoryEnchanting inventory = new CraftInventoryEnchanting(this.enchantSlots);
-+        bukkitEntity = new CraftEnchantmentView(this.player, inventory, this);
-+        return bukkitEntity;
++        this.bukkitEntity = new CraftEnchantmentView(this.player, inventory, this);
++        return this.bukkitEntity;
 +    }
 +    // CraftBukkit end
  }
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/FurnaceResultSlot.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/FurnaceResultSlot.java.patch
new file mode 100644
index 0000000000..488614cbf6
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/FurnaceResultSlot.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/inventory/FurnaceResultSlot.java
++++ b/net/minecraft/world/inventory/FurnaceResultSlot.java
+@@ -51,7 +51,7 @@
+             Container iinventory = this.container;
+ 
+             if (iinventory instanceof AbstractFurnaceBlockEntity tileentityfurnace) {
+-                tileentityfurnace.awardUsedRecipesAndPopExperience(entityplayer);
++                tileentityfurnace.awardUsedRecipesAndPopExperience(entityplayer, stack, this.removeCount); // CraftBukkit
+             }
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/GrindstoneMenu.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/GrindstoneMenu.java.patch
new file mode 100644
index 0000000000..50d59c0ca8
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/GrindstoneMenu.java.patch
@@ -0,0 +1,119 @@
+--- a/net/minecraft/world/inventory/GrindstoneMenu.java
++++ b/net/minecraft/world/inventory/GrindstoneMenu.java
+@@ -10,7 +10,6 @@
+ import net.minecraft.world.SimpleContainer;
+ import net.minecraft.world.entity.ExperienceOrb;
+ import net.minecraft.world.entity.player.Inventory;
+-import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.item.Items;
+ import net.minecraft.world.item.enchantment.Enchantment;
+@@ -19,9 +18,30 @@
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.block.Blocks;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import org.bukkit.Location;
++import org.bukkit.craftbukkit.inventory.CraftInventoryGrindstone;
++import org.bukkit.craftbukkit.inventory.CraftInventoryView;
++import org.bukkit.entity.Player;
++// CraftBukkit end
+ 
+ public class GrindstoneMenu extends AbstractContainerMenu {
+ 
++    // CraftBukkit start
++    private CraftInventoryView bukkitEntity = null;
++    private Player player;
++
++    @Override
++    public CraftInventoryView getBukkitView() {
++        if (this.bukkitEntity != null) {
++            return this.bukkitEntity;
++        }
++
++        CraftInventoryGrindstone inventory = new CraftInventoryGrindstone(this.repairSlots, this.resultSlots);
++        this.bukkitEntity = new CraftInventoryView(this.player, inventory, this);
++        return this.bukkitEntity;
++    }
++    // CraftBukkit end
+     public static final int MAX_NAME_LENGTH = 35;
+     public static final int INPUT_SLOT = 0;
+     public static final int ADDITIONAL_SLOT = 1;
+@@ -46,16 +66,23 @@
+             public void setChanged() {
+                 super.setChanged();
+                 GrindstoneMenu.this.slotsChanged(this);
++            }
++
++            // CraftBukkit start
++            @Override
++            public Location getLocation() {
++                return context.getLocation();
+             }
++            // CraftBukkit end
+         };
+         this.access = context;
+-        this.addSlot(new Slot(this, this.repairSlots, 0, 49, 19) {
++        this.addSlot(new Slot(this.repairSlots, 0, 49, 19) { // CraftBukkit - decompile error
+             @Override
+             public boolean mayPlace(ItemStack stack) {
+                 return stack.isDamageableItem() || EnchantmentHelper.hasAnyEnchantments(stack);
+             }
+         });
+-        this.addSlot(new Slot(this, this.repairSlots, 1, 49, 40) {
++        this.addSlot(new Slot(this.repairSlots, 1, 49, 40) { // CraftBukkit - decompile error
+             @Override
+             public boolean mayPlace(ItemStack stack) {
+                 return stack.isDamageableItem() || EnchantmentHelper.hasAnyEnchantments(stack);
+@@ -68,7 +95,7 @@
+             }
+ 
+             @Override
+-            public void onTake(Player player, ItemStack stack) {
++            public void onTake(net.minecraft.world.entity.player.Player player, ItemStack stack) {
+                 context.execute((world, blockposition) -> {
+                     if (world instanceof ServerLevel) {
+                         ExperienceOrb.award((ServerLevel) world, Vec3.atCenterOf(blockposition), this.getExperienceAmount(world));
+@@ -113,6 +140,7 @@
+             }
+         });
+         this.addStandardInventorySlots(playerInventory, 8, 84);
++        this.player = (Player) playerInventory.player.getBukkitEntity(); // CraftBukkit
+     }
+ 
+     @Override
+@@ -125,7 +153,8 @@
+     }
+ 
+     private void createResult() {
+-        this.resultSlots.setItem(0, this.computeResult(this.repairSlots.getItem(0), this.repairSlots.getItem(1)));
++        org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareGrindstoneEvent(this.getBukkitView(), this.computeResult(this.repairSlots.getItem(0), this.repairSlots.getItem(1))); // CraftBukkit
++        this.sendAllDataToRemote(); // CraftBukkit - SPIGOT-6686: Always send completed inventory to stay in sync with client
+         this.broadcastChanges();
+     }
+ 
+@@ -218,7 +247,7 @@
+     }
+ 
+     @Override
+-    public void removed(Player player) {
++    public void removed(net.minecraft.world.entity.player.Player player) {
+         super.removed(player);
+         this.access.execute((world, blockposition) -> {
+             this.clearContainer(player, this.repairSlots);
+@@ -226,12 +255,13 @@
+     }
+ 
+     @Override
+-    public boolean stillValid(Player player) {
++    public boolean stillValid(net.minecraft.world.entity.player.Player player) {
++        if (!this.checkReachable) return true; // CraftBukkit
+         return stillValid(this.access, player, Blocks.GRINDSTONE);
+     }
+ 
+     @Override
+-    public ItemStack quickMoveStack(Player player, int slot) {
++    public ItemStack quickMoveStack(net.minecraft.world.entity.player.Player player, int slot) {
+         ItemStack itemstack = ItemStack.EMPTY;
+         Slot slot1 = (Slot) this.slots.get(slot);
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/HopperMenu.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/HopperMenu.java.patch
new file mode 100644
index 0000000000..2174c38e81
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/HopperMenu.java.patch
@@ -0,0 +1,51 @@
+--- a/net/minecraft/world/inventory/HopperMenu.java
++++ b/net/minecraft/world/inventory/HopperMenu.java
+@@ -6,11 +6,32 @@
+ import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.item.ItemStack;
+ 
++// CraftBukkit start
++import org.bukkit.craftbukkit.inventory.CraftInventory;
++import org.bukkit.craftbukkit.inventory.CraftInventoryView;
++// CraftBukkit end
++
+ public class HopperMenu extends AbstractContainerMenu {
+ 
+     public static final int CONTAINER_SIZE = 5;
+     private final Container hopper;
+ 
++    // CraftBukkit start
++    private CraftInventoryView bukkitEntity = null;
++    private Inventory player;
++
++    @Override
++    public CraftInventoryView getBukkitView() {
++        if (this.bukkitEntity != null) {
++            return this.bukkitEntity;
++        }
++
++        CraftInventory inventory = new CraftInventory(this.hopper);
++        this.bukkitEntity = new CraftInventoryView(this.player.player.getBukkitEntity(), inventory, this);
++        return this.bukkitEntity;
++    }
++    // CraftBukkit end
++
+     public HopperMenu(int syncId, Inventory playerInventory) {
+         this(syncId, playerInventory, new SimpleContainer(5));
+     }
+@@ -18,6 +39,7 @@
+     public HopperMenu(int syncId, Inventory playerInventory, Container inventory) {
+         super(MenuType.HOPPER, syncId);
+         this.hopper = inventory;
++        this.player = playerInventory; // CraftBukkit - save player
+         checkContainerSize(inventory, 5);
+         inventory.startOpen(playerInventory.player);
+ 
+@@ -30,6 +52,7 @@
+ 
+     @Override
+     public boolean stillValid(Player player) {
++        if (!this.checkReachable) return true; // CraftBukkit
+         return this.hopper.stillValid(player);
+     }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/HorseInventoryMenu.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/HorseInventoryMenu.java.patch
new file mode 100644
index 0000000000..2657cf4ccb
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/HorseInventoryMenu.java.patch
@@ -0,0 +1,53 @@
+--- a/net/minecraft/world/inventory/HorseInventoryMenu.java
++++ b/net/minecraft/world/inventory/HorseInventoryMenu.java
+@@ -11,6 +11,11 @@
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.item.Items;
+ 
++// CraftBukkit start
++import org.bukkit.craftbukkit.inventory.CraftInventoryView;
++import org.bukkit.inventory.InventoryView;
++// CraftBukkit end
++
+ public class HorseInventoryMenu extends AbstractContainerMenu {
+ 
+     static final ResourceLocation SADDLE_SLOT_SPRITE = ResourceLocation.withDefaultNamespace("container/slot/saddle");
+@@ -22,13 +27,28 @@
+     public static final int SLOT_BODY_ARMOR = 1;
+     private static final int SLOT_HORSE_INVENTORY_START = 2;
+ 
++    // CraftBukkit start
++    org.bukkit.craftbukkit.inventory.CraftInventoryView bukkitEntity;
++    Inventory player;
++
++    @Override
++    public InventoryView getBukkitView() {
++        if (this.bukkitEntity != null) {
++            return this.bukkitEntity;
++        }
++
++        return this.bukkitEntity = new CraftInventoryView(this.player.player.getBukkitEntity(), this.horseContainer.getOwner().getInventory(), this);
++    }
++
+     public HorseInventoryMenu(int syncId, Inventory playerInventory, Container inventory, final AbstractHorse entity, int slotColumnCount) {
+         super((MenuType) null, syncId);
++        this.player = playerInventory;
++        // CraftBukkit end
+         this.horseContainer = inventory;
+         this.armorContainer = entity.getBodyArmorAccess();
+         this.horse = entity;
+         inventory.startOpen(playerInventory.player);
+-        this.addSlot(new Slot(this, inventory, 0, 8, 18) {
++        this.addSlot(new Slot(inventory, 0, 8, 18) { // CraftBukkit - decompile error
+             @Override
+             public boolean mayPlace(ItemStack stack) {
+                 return stack.is(Items.SADDLE) && !this.hasItem() && entity.isSaddleable();
+@@ -46,7 +66,7 @@
+         });
+         ResourceLocation minecraftkey = entity instanceof Llama ? HorseInventoryMenu.LLAMA_ARMOR_SLOT_SPRITE : HorseInventoryMenu.ARMOR_SLOT_SPRITE;
+ 
+-        this.addSlot(new ArmorSlot(this, this.armorContainer, entity, EquipmentSlot.BODY, 0, 8, 36, minecraftkey) {
++        this.addSlot(new ArmorSlot(this.armorContainer, entity, EquipmentSlot.BODY, 0, 8, 36, minecraftkey) { // CraftBukkit - decompile error
+             @Override
+             public boolean mayPlace(ItemStack stack) {
+                 return entity.isEquippableInSlot(stack, EquipmentSlot.BODY);
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/InventoryEnderChest.patch b/paper-server/patches/sources/net/minecraft/world/inventory/InventoryEnderChest.patch
deleted file mode 100644
index ba63be9d9b..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/inventory/InventoryEnderChest.patch
+++ /dev/null
@@ -1,36 +0,0 @@
---- a/net/minecraft/world/inventory/InventoryEnderChest.java
-+++ b/net/minecraft/world/inventory/InventoryEnderChest.java
-@@ -9,13 +9,32 @@
- import net.minecraft.world.item.ItemStack;
- import net.minecraft.world.level.block.entity.TileEntityEnderChest;
- 
-+// CraftBukkit start
-+import org.bukkit.Location;
-+import org.bukkit.craftbukkit.util.CraftLocation;
-+import org.bukkit.inventory.InventoryHolder;
-+// CraftBukkit end
-+
- public class InventoryEnderChest extends InventorySubcontainer {
- 
-     @Nullable
-     private TileEntityEnderChest activeChest;
-+    // CraftBukkit start
-+    private final EntityHuman owner;
- 
--    public InventoryEnderChest() {
-+    public InventoryHolder getBukkitOwner() {
-+        return owner.getBukkitEntity();
-+    }
-+
-+    @Override
-+    public Location getLocation() {
-+        return this.activeChest != null ? CraftLocation.toBukkit(this.activeChest.getBlockPos(), this.activeChest.getLevel().getWorld()) : null;
-+    }
-+
-+    public InventoryEnderChest(EntityHuman owner) {
-         super(27);
-+        this.owner = owner;
-+        // CraftBukkit end
-     }
- 
-     public void setActiveChest(TileEntityEnderChest tileentityenderchest) {
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/InventoryMenu.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/InventoryMenu.java.patch
new file mode 100644
index 0000000000..78a5d31f7d
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/InventoryMenu.java.patch
@@ -0,0 +1,64 @@
+--- a/net/minecraft/world/inventory/InventoryMenu.java
++++ b/net/minecraft/world/inventory/InventoryMenu.java
+@@ -2,6 +2,7 @@
+ 
+ import java.util.List;
+ import java.util.Map;
++import net.minecraft.network.chat.Component;
+ import net.minecraft.resources.ResourceLocation;
+ import net.minecraft.server.level.ServerLevel;
+ import net.minecraft.world.Container;
+@@ -11,6 +12,9 @@
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.item.crafting.RecipeHolder;
+ import net.minecraft.world.level.Level;
++import org.bukkit.craftbukkit.inventory.CraftInventoryCrafting;
++import org.bukkit.craftbukkit.inventory.CraftInventoryView;
++// CraftBukkit end
+ 
+ public class InventoryMenu extends AbstractCraftingMenu {
+ 
+@@ -38,9 +42,15 @@
+     private static final EquipmentSlot[] SLOT_IDS = new EquipmentSlot[]{EquipmentSlot.HEAD, EquipmentSlot.CHEST, EquipmentSlot.LEGS, EquipmentSlot.FEET};
+     public final boolean active;
+     private final Player owner;
++    // CraftBukkit start
++    private CraftInventoryView bukkitEntity = null;
++    // CraftBukkit end
+ 
+     public InventoryMenu(Inventory inventory, boolean onServer, final Player owner) {
+-        super((MenuType) null, 0, 2, 2);
++        // CraftBukkit start
++        super((MenuType) null, 0, 2, 2, inventory); // CraftBukkit - save player
++        this.setTitle(Component.translatable("container.crafting")); // SPIGOT-4722: Allocate title for player inventory
++        // CraftBukkit end
+         this.active = onServer;
+         this.owner = owner;
+         this.addResultSlot(owner, 154, 28);
+@@ -54,7 +64,7 @@
+         }
+ 
+         this.addStandardInventorySlots(inventory, 8, 84);
+-        this.addSlot(new Slot(this, inventory, 40, 77, 62) {
++        this.addSlot(new Slot(inventory, 40, 77, 62) { // CraftBukkit - decompile error
+             @Override
+             public void setByPlayer(ItemStack stack, ItemStack previousStack) {
+                 owner.onEquipItem(EquipmentSlot.OFFHAND, previousStack, stack);
+@@ -190,4 +200,17 @@
+     protected Player owner() {
+         return this.owner;
+     }
++
++    // CraftBukkit start
++    @Override
++    public CraftInventoryView getBukkitView() {
++        if (this.bukkitEntity != null) {
++            return this.bukkitEntity;
++        }
++
++        CraftInventoryCrafting inventory = new CraftInventoryCrafting(this.craftSlots, this.resultSlots);
++        this.bukkitEntity = new CraftInventoryView(this.owner.getBukkitEntity(), inventory, this);
++        return this.bukkitEntity;
++    }
++    // CraftBukkit end
+ }
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/InventoryMerchant.patch b/paper-server/patches/sources/net/minecraft/world/inventory/InventoryMerchant.patch
deleted file mode 100644
index a2dec8965d..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/inventory/InventoryMerchant.patch
+++ /dev/null
@@ -1,66 +0,0 @@
---- a/net/minecraft/world/inventory/InventoryMerchant.java
-+++ b/net/minecraft/world/inventory/InventoryMerchant.java
-@@ -11,6 +11,16 @@
- import net.minecraft.world.item.trading.MerchantRecipe;
- import net.minecraft.world.item.trading.MerchantRecipeList;
- 
-+// CraftBukkit start
-+import java.util.List;
-+import net.minecraft.world.entity.npc.EntityVillager;
-+import net.minecraft.world.entity.npc.EntityVillagerAbstract;
-+import org.bukkit.Location;
-+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
-+import org.bukkit.craftbukkit.entity.CraftAbstractVillager;
-+import org.bukkit.entity.HumanEntity;
-+// CraftBukkit end
-+
- public class InventoryMerchant implements IInventory {
- 
-     private final IMerchant merchant;
-@@ -20,6 +30,46 @@
-     public int selectionHint;
-     private int futureXp;
- 
-+    // CraftBukkit start - add fields and methods
-+    public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
-+    private int maxStack = MAX_STACK;
-+
-+    public List<ItemStack> getContents() {
-+        return this.itemStacks;
-+    }
-+
-+    public void onOpen(CraftHumanEntity who) {
-+        transaction.add(who);
-+    }
-+
-+    public void onClose(CraftHumanEntity who) {
-+        transaction.remove(who);
-+        merchant.setTradingPlayer((EntityHuman) null); // SPIGOT-4860
-+    }
-+
-+    public List<HumanEntity> getViewers() {
-+        return transaction;
-+    }
-+
-+    @Override
-+    public int getMaxStackSize() {
-+        return maxStack;
-+    }
-+
-+    public void setMaxStackSize(int i) {
-+        maxStack = i;
-+    }
-+
-+    public org.bukkit.inventory.InventoryHolder getOwner() {
-+        return (merchant instanceof EntityVillagerAbstract) ? (CraftAbstractVillager) ((EntityVillagerAbstract) this.merchant).getBukkitEntity() : null;
-+    }
-+
-+    @Override
-+    public Location getLocation() {
-+        return (merchant instanceof EntityVillager) ? ((EntityVillager) this.merchant).getBukkitEntity().getLocation() : null;
-+    }
-+    // CraftBukkit end
-+
-     public InventoryMerchant(IMerchant imerchant) {
-         this.itemStacks = NonNullList.withSize(3, ItemStack.EMPTY);
-         this.merchant = imerchant;
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerAnvilAbstract.patch b/paper-server/patches/sources/net/minecraft/world/inventory/ItemCombinerMenu.java.patch
similarity index 61%
rename from paper-server/patches/sources/net/minecraft/world/inventory/ContainerAnvilAbstract.patch
rename to paper-server/patches/sources/net/minecraft/world/inventory/ItemCombinerMenu.java.patch
index 204c7d1c05..b8a7523ade 100644
--- a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerAnvilAbstract.patch
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/ItemCombinerMenu.java.patch
@@ -1,19 +1,19 @@
---- a/net/minecraft/world/inventory/ContainerAnvilAbstract.java
-+++ b/net/minecraft/world/inventory/ContainerAnvilAbstract.java
+--- a/net/minecraft/world/inventory/ItemCombinerMenu.java
++++ b/net/minecraft/world/inventory/ItemCombinerMenu.java
 @@ -50,7 +50,7 @@
          while (iterator.hasNext()) {
-             final ItemCombinerMenuSlotDefinition.b itemcombinermenuslotdefinition_b = (ItemCombinerMenuSlotDefinition.b) iterator.next();
+             final ItemCombinerMenuSlotDefinition.SlotDefinition itemcombinermenuslotdefinition_b = (ItemCombinerMenuSlotDefinition.SlotDefinition) iterator.next();
  
 -            this.addSlot(new Slot(this, this.inputSlots, itemcombinermenuslotdefinition_b.slotIndex(), itemcombinermenuslotdefinition_b.x(), itemcombinermenuslotdefinition_b.y()) {
 +            this.addSlot(new Slot(this.inputSlots, itemcombinermenuslotdefinition_b.slotIndex(), itemcombinermenuslotdefinition_b.x(), itemcombinermenuslotdefinition_b.y()) { // CraftBukkit - decompile error
                  @Override
-                 public boolean mayPlace(ItemStack itemstack) {
-                     return itemcombinermenuslotdefinition_b.mayPlace().test(itemstack);
+                 public boolean mayPlace(ItemStack stack) {
+                     return itemcombinermenuslotdefinition_b.mayPlace().test(stack);
 @@ -110,6 +110,7 @@
  
      @Override
-     public boolean stillValid(EntityHuman entityhuman) {
+     public boolean stillValid(Player player) {
 +        if (!this.checkReachable) return true; // CraftBukkit
          return (Boolean) this.access.evaluate((world, blockposition) -> {
-             return !this.isValidBlock(world.getBlockState(blockposition)) ? false : entityhuman.canInteractWithBlock(blockposition, 4.0D);
+             return !this.isValidBlock(world.getBlockState(blockposition)) ? false : player.canInteractWithBlock(blockposition, 4.0D);
          }, true);
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/LecternMenu.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/LecternMenu.java.patch
new file mode 100644
index 0000000000..b78c3d8418
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/LecternMenu.java.patch
@@ -0,0 +1,114 @@
+--- a/net/minecraft/world/inventory/LecternMenu.java
++++ b/net/minecraft/world/inventory/LecternMenu.java
+@@ -2,11 +2,33 @@
+ 
+ import net.minecraft.world.Container;
+ import net.minecraft.world.SimpleContainer;
+-import net.minecraft.world.entity.player.Player;
++import net.minecraft.world.entity.player.Inventory;
+ import net.minecraft.world.item.ItemStack;
++import net.minecraft.world.level.block.entity.LecternBlockEntity.LecternInventory;
++import org.bukkit.Bukkit;
++import org.bukkit.craftbukkit.inventory.CraftInventoryLectern;
++import org.bukkit.craftbukkit.inventory.view.CraftLecternView;
++import org.bukkit.entity.Player;
++import org.bukkit.event.player.PlayerTakeLecternBookEvent;
++// CraftBukkit end
+ 
+ public class LecternMenu extends AbstractContainerMenu {
+ 
++    // CraftBukkit start
++    private CraftLecternView bukkitEntity = null;
++    private Player player;
++
++    @Override
++    public CraftLecternView getBukkitView() {
++        if (this.bukkitEntity != null) {
++            return this.bukkitEntity;
++        }
++
++        CraftInventoryLectern inventory = new CraftInventoryLectern(this.lectern);
++        this.bukkitEntity = new CraftLecternView(this.player, inventory, this);
++        return this.bukkitEntity;
++    }
++    // CraftBukkit end
+     private static final int DATA_COUNT = 1;
+     private static final int SLOT_COUNT = 1;
+     public static final int BUTTON_PREV_PAGE = 1;
+@@ -16,28 +38,31 @@
+     private final Container lectern;
+     private final ContainerData lecternData;
+ 
+-    public LecternMenu(int syncId) {
+-        this(syncId, new SimpleContainer(1), new SimpleContainerData(1));
++    // CraftBukkit start - add player
++    public LecternMenu(int i, Inventory playerinventory) {
++        this(i, new SimpleContainer(1), new SimpleContainerData(1), playerinventory);
+     }
+ 
+-    public LecternMenu(int syncId, Container inventory, ContainerData propertyDelegate) {
+-        super(MenuType.LECTERN, syncId);
+-        checkContainerSize(inventory, 1);
+-        checkContainerDataCount(propertyDelegate, 1);
+-        this.lectern = inventory;
+-        this.lecternData = propertyDelegate;
+-        this.addSlot(new Slot(inventory, 0, 0, 0) {
++    public LecternMenu(int i, Container iinventory, ContainerData icontainerproperties, Inventory playerinventory) {
++        // CraftBukkit end
++        super(MenuType.LECTERN, i);
++        checkContainerSize(iinventory, 1);
++        checkContainerDataCount(icontainerproperties, 1);
++        this.lectern = iinventory;
++        this.lecternData = icontainerproperties;
++        this.addSlot(new Slot(iinventory, 0, 0, 0) {
+             @Override
+             public void setChanged() {
+                 super.setChanged();
+                 LecternMenu.this.slotsChanged(this.container);
+             }
+         });
+-        this.addDataSlots(propertyDelegate);
++        this.addDataSlots(icontainerproperties);
++        this.player = (Player) playerinventory.player.getBukkitEntity(); // CraftBukkit
+     }
+ 
+     @Override
+-    public boolean clickMenuButton(Player player, int id) {
++    public boolean clickMenuButton(net.minecraft.world.entity.player.Player player, int id) {
+         int j;
+ 
+         if (id >= 100) {
+@@ -59,6 +84,13 @@
+                         return false;
+                     }
+ 
++                    // CraftBukkit start - Event for taking the book
++                    PlayerTakeLecternBookEvent event = new PlayerTakeLecternBookEvent(this.player, ((CraftInventoryLectern) this.getBukkitView().getTopInventory()).getHolder());
++                    Bukkit.getServer().getPluginManager().callEvent(event);
++                    if (event.isCancelled()) {
++                        return false;
++                    }
++                    // CraftBukkit end
+                     ItemStack itemstack = this.lectern.removeItemNoUpdate(0);
+ 
+                     this.lectern.setChanged();
+@@ -74,7 +106,7 @@
+     }
+ 
+     @Override
+-    public ItemStack quickMoveStack(Player player, int slot) {
++    public ItemStack quickMoveStack(net.minecraft.world.entity.player.Player player, int slot) {
+         return ItemStack.EMPTY;
+     }
+ 
+@@ -85,7 +117,9 @@
+     }
+ 
+     @Override
+-    public boolean stillValid(Player player) {
++    public boolean stillValid(net.minecraft.world.entity.player.Player player) {
++        if (this.lectern instanceof LecternInventory && !((LecternInventory) this.lectern).getLectern().hasBook()) return false; // CraftBukkit
++        if (!this.checkReachable) return true; // CraftBukkit
+         return this.lectern.stillValid(player);
+     }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/LoomMenu.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/LoomMenu.java.patch
new file mode 100644
index 0000000000..4baee1c932
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/LoomMenu.java.patch
@@ -0,0 +1,155 @@
+--- a/net/minecraft/world/inventory/LoomMenu.java
++++ b/net/minecraft/world/inventory/LoomMenu.java
+@@ -12,7 +12,6 @@
+ import net.minecraft.world.Container;
+ import net.minecraft.world.SimpleContainer;
+ import net.minecraft.world.entity.player.Inventory;
+-import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.item.BannerItem;
+ import net.minecraft.world.item.BannerPatternItem;
+ import net.minecraft.world.item.DyeColor;
+@@ -22,9 +21,30 @@
+ import net.minecraft.world.level.block.Blocks;
+ import net.minecraft.world.level.block.entity.BannerPattern;
+ import net.minecraft.world.level.block.entity.BannerPatternLayers;
++// CraftBukkit start
++import org.bukkit.Location;
++import org.bukkit.craftbukkit.inventory.CraftInventoryLoom;
++import org.bukkit.craftbukkit.inventory.view.CraftLoomView;
++import org.bukkit.entity.Player;
++// CraftBukkit end
+ 
+ public class LoomMenu extends AbstractContainerMenu {
+ 
++    // CraftBukkit start
++    private CraftLoomView bukkitEntity = null;
++    private Player player;
++
++    @Override
++    public CraftLoomView getBukkitView() {
++        if (this.bukkitEntity != null) {
++            return this.bukkitEntity;
++        }
++
++        CraftInventoryLoom inventory = new CraftInventoryLoom(this.inputContainer, this.outputContainer);
++        this.bukkitEntity = new CraftLoomView(this.player, inventory, this);
++        return this.bukkitEntity;
++    }
++    // CraftBukkit end
+     private static final int PATTERN_NOT_SET = -1;
+     private static final int INV_SLOT_START = 4;
+     private static final int INV_SLOT_END = 31;
+@@ -60,6 +80,13 @@
+                 LoomMenu.this.slotsChanged(this);
+                 LoomMenu.this.slotUpdateListener.run();
+             }
++
++            // CraftBukkit start
++            @Override
++            public Location getLocation() {
++                return context.getLocation();
++            }
++            // CraftBukkit end
+         };
+         this.outputContainer = new SimpleContainer(1) {
+             @Override
+@@ -67,21 +94,28 @@
+                 super.setChanged();
+                 LoomMenu.this.slotUpdateListener.run();
+             }
++
++            // CraftBukkit start
++            @Override
++            public Location getLocation() {
++                return context.getLocation();
++            }
++            // CraftBukkit end
+         };
+         this.access = context;
+-        this.bannerSlot = this.addSlot(new Slot(this, this.inputContainer, 0, 13, 26) {
++        this.bannerSlot = this.addSlot(new Slot(this.inputContainer, 0, 13, 26) { // CraftBukkit - decompile error
+             @Override
+             public boolean mayPlace(ItemStack stack) {
+                 return stack.getItem() instanceof BannerItem;
+             }
+         });
+-        this.dyeSlot = this.addSlot(new Slot(this, this.inputContainer, 1, 33, 26) {
++        this.dyeSlot = this.addSlot(new Slot(this.inputContainer, 1, 33, 26) { // CraftBukkit - decompile error
+             @Override
+             public boolean mayPlace(ItemStack stack) {
+                 return stack.getItem() instanceof DyeItem;
+             }
+         });
+-        this.patternSlot = this.addSlot(new Slot(this, this.inputContainer, 2, 23, 45) {
++        this.patternSlot = this.addSlot(new Slot(this.inputContainer, 2, 23, 45) { // CraftBukkit - decompile error
+             @Override
+             public boolean mayPlace(ItemStack stack) {
+                 return stack.getItem() instanceof BannerPatternItem;
+@@ -94,7 +128,7 @@
+             }
+ 
+             @Override
+-            public void onTake(Player player, ItemStack stack) {
++            public void onTake(net.minecraft.world.entity.player.Player player, ItemStack stack) {
+                 LoomMenu.this.bannerSlot.remove(1);
+                 LoomMenu.this.dyeSlot.remove(1);
+                 if (!LoomMenu.this.bannerSlot.hasItem() || !LoomMenu.this.dyeSlot.hasItem()) {
+@@ -105,7 +139,7 @@
+                     long j = world.getGameTime();
+ 
+                     if (LoomMenu.this.lastSoundTime != j) {
+-                        world.playSound((Player) null, blockposition, SoundEvents.UI_LOOM_TAKE_RESULT, SoundSource.BLOCKS, 1.0F, 1.0F);
++                        world.playSound((net.minecraft.world.entity.player.Player) null, blockposition, SoundEvents.UI_LOOM_TAKE_RESULT, SoundSource.BLOCKS, 1.0F, 1.0F);
+                         LoomMenu.this.lastSoundTime = j;
+                     }
+ 
+@@ -116,15 +150,17 @@
+         this.addStandardInventorySlots(playerInventory, 8, 84);
+         this.addDataSlot(this.selectedBannerPatternIndex);
+         this.patternGetter = playerInventory.player.registryAccess().lookupOrThrow(Registries.BANNER_PATTERN);
++        this.player = (Player) playerInventory.player.getBukkitEntity(); // CraftBukkit
+     }
+ 
+     @Override
+-    public boolean stillValid(Player player) {
++    public boolean stillValid(net.minecraft.world.entity.player.Player player) {
++        if (!this.checkReachable) return true; // CraftBukkit
+         return stillValid(this.access, player, Blocks.LOOM);
+     }
+ 
+     @Override
+-    public boolean clickMenuButton(Player player, int id) {
++    public boolean clickMenuButton(net.minecraft.world.entity.player.Player player, int id) {
+         if (id >= 0 && id < this.selectablePatterns.size()) {
+             this.selectedBannerPatternIndex.set(id);
+             this.setupResultSlot((Holder) this.selectablePatterns.get(id));
+@@ -222,7 +258,7 @@
+     }
+ 
+     @Override
+-    public ItemStack quickMoveStack(Player player, int slot) {
++    public ItemStack quickMoveStack(net.minecraft.world.entity.player.Player player, int slot) {
+         ItemStack itemstack = ItemStack.EMPTY;
+         Slot slot1 = (Slot) this.slots.get(slot);
+ 
+@@ -277,7 +313,7 @@
+     }
+ 
+     @Override
+-    public void removed(Player player) {
++    public void removed(net.minecraft.world.entity.player.Player player) {
+         super.removed(player);
+         this.access.execute((world, blockposition) -> {
+             this.clearContainer(player, this.inputContainer);
+@@ -294,6 +330,11 @@
+             DyeColor enumcolor = ((DyeItem) itemstack1.getItem()).getDyeColor();
+ 
+             itemstack2.update(DataComponents.BANNER_PATTERNS, BannerPatternLayers.EMPTY, (bannerpatternlayers) -> {
++                // CraftBukkit start
++                if (bannerpatternlayers.layers().size() > 20) {
++                    bannerpatternlayers = new BannerPatternLayers(List.copyOf(bannerpatternlayers.layers().subList(0, 20)));
++                }
++                // CraftBukkit end
+                 return (new BannerPatternLayers.Builder()).addAll(bannerpatternlayers).add(pattern, enumcolor).build();
+             });
+         }
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/MenuType.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/MenuType.java.patch
new file mode 100644
index 0000000000..ac3dc03175
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/MenuType.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/inventory/MenuType.java
++++ b/net/minecraft/world/inventory/MenuType.java
+@@ -28,7 +28,7 @@
+     public static final MenuType<GrindstoneMenu> GRINDSTONE = MenuType.register("grindstone", GrindstoneMenu::new);
+     public static final MenuType<HopperMenu> HOPPER = MenuType.register("hopper", HopperMenu::new);
+     public static final MenuType<LecternMenu> LECTERN = MenuType.register("lectern", (i, playerinventory) -> {
+-        return new LecternMenu(i);
++        return new LecternMenu(i, playerinventory); // CraftBukkit
+     });
+     public static final MenuType<LoomMenu> LOOM = MenuType.register("loom", LoomMenu::new);
+     public static final MenuType<MerchantMenu> MERCHANT = MenuType.register("merchant", MerchantMenu::new);
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/MerchantContainer.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/MerchantContainer.java.patch
new file mode 100644
index 0000000000..99b7708701
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/MerchantContainer.java.patch
@@ -0,0 +1,70 @@
+--- a/net/minecraft/world/inventory/MerchantContainer.java
++++ b/net/minecraft/world/inventory/MerchantContainer.java
+@@ -5,11 +5,20 @@
+ import net.minecraft.core.NonNullList;
+ import net.minecraft.world.Container;
+ import net.minecraft.world.ContainerHelper;
++import net.minecraft.world.entity.npc.AbstractVillager;
++import net.minecraft.world.entity.npc.Villager;
+ import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.item.trading.Merchant;
+ import net.minecraft.world.item.trading.MerchantOffer;
+ import net.minecraft.world.item.trading.MerchantOffers;
++// CraftBukkit start
++import java.util.List;
++import org.bukkit.Location;
++import org.bukkit.craftbukkit.entity.CraftHumanEntity;
++import org.bukkit.craftbukkit.entity.CraftAbstractVillager;
++import org.bukkit.entity.HumanEntity;
++// CraftBukkit end
+ 
+ public class MerchantContainer implements Container {
+ 
+@@ -20,6 +29,46 @@
+     public int selectionHint;
+     private int futureXp;
+ 
++    // CraftBukkit start - add fields and methods
++    public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
++    private int maxStack = MAX_STACK;
++
++    public List<ItemStack> getContents() {
++        return this.itemStacks;
++    }
++
++    public void onOpen(CraftHumanEntity who) {
++        this.transaction.add(who);
++    }
++
++    public void onClose(CraftHumanEntity who) {
++        this.transaction.remove(who);
++        this.merchant.setTradingPlayer((Player) null); // SPIGOT-4860
++    }
++
++    public List<HumanEntity> getViewers() {
++        return this.transaction;
++    }
++
++    @Override
++    public int getMaxStackSize() {
++        return this.maxStack;
++    }
++
++    public void setMaxStackSize(int i) {
++        this.maxStack = i;
++    }
++
++    public org.bukkit.inventory.InventoryHolder getOwner() {
++        return (this.merchant instanceof AbstractVillager) ? (CraftAbstractVillager) ((AbstractVillager) this.merchant).getBukkitEntity() : null;
++    }
++
++    @Override
++    public Location getLocation() {
++        return (this.merchant instanceof Villager) ? ((Villager) this.merchant).getBukkitEntity().getLocation() : null;
++    }
++    // CraftBukkit end
++
+     public MerchantContainer(Merchant merchant) {
+         this.itemStacks = NonNullList.withSize(3, ItemStack.EMPTY);
+         this.merchant = merchant;
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/MerchantMenu.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/MerchantMenu.java.patch
new file mode 100644
index 0000000000..952b7d0e0d
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/MerchantMenu.java.patch
@@ -0,0 +1,47 @@
+--- a/net/minecraft/world/inventory/MerchantMenu.java
++++ b/net/minecraft/world/inventory/MerchantMenu.java
+@@ -12,6 +12,7 @@
+ import net.minecraft.world.item.trading.Merchant;
+ import net.minecraft.world.item.trading.MerchantOffer;
+ import net.minecraft.world.item.trading.MerchantOffers;
++import org.bukkit.craftbukkit.inventory.view.CraftMerchantView; // CraftBukkit
+ 
+ public class MerchantMenu extends AbstractContainerMenu {
+ 
+@@ -32,6 +33,19 @@
+     private boolean showProgressBar;
+     private boolean canRestock;
+ 
++    // CraftBukkit start
++    private CraftMerchantView bukkitEntity = null;
++    private Inventory player;
++
++    @Override
++    public CraftMerchantView getBukkitView() {
++        if (this.bukkitEntity == null) {
++            this.bukkitEntity = new CraftMerchantView(this.player.player.getBukkitEntity(), new org.bukkit.craftbukkit.inventory.CraftInventoryMerchant(this.trader, this.tradeContainer), this, this.trader);
++        }
++        return this.bukkitEntity;
++    }
++    // CraftBukkit end
++
+     public MerchantMenu(int syncId, Inventory playerInventory) {
+         this(syncId, playerInventory, new ClientSideMerchant(playerInventory.player));
+     }
+@@ -43,6 +57,7 @@
+         this.addSlot(new Slot(this.tradeContainer, 0, 136, 37));
+         this.addSlot(new Slot(this.tradeContainer, 1, 162, 37));
+         this.addSlot(new MerchantResultSlot(playerInventory.player, merchant, this.tradeContainer, 2, 220, 37));
++        this.player = playerInventory; // CraftBukkit - save player
+         this.addStandardInventorySlots(playerInventory, 108, 84);
+     }
+ 
+@@ -143,7 +158,7 @@
+     }
+ 
+     private void playTradeSound() {
+-        if (!this.trader.isClientSide()) {
++        if (!this.trader.isClientSide() && this.trader instanceof Entity) { // CraftBukkit - SPIGOT-5035
+             Entity entity = (Entity) this.trader;
+ 
+             entity.level().playLocalSound(entity.getX(), entity.getY(), entity.getZ(), this.trader.getNotifyTradeSound(), SoundSource.NEUTRAL, 1.0F, 1.0F, false);
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/PlayerEnderChestContainer.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/PlayerEnderChestContainer.java.patch
new file mode 100644
index 0000000000..e83e892d8e
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/PlayerEnderChestContainer.java.patch
@@ -0,0 +1,36 @@
+--- a/net/minecraft/world/inventory/PlayerEnderChestContainer.java
++++ b/net/minecraft/world/inventory/PlayerEnderChestContainer.java
+@@ -8,14 +8,32 @@
+ import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.level.block.entity.EnderChestBlockEntity;
++// CraftBukkit start
++import org.bukkit.Location;
++import org.bukkit.craftbukkit.util.CraftLocation;
++import org.bukkit.inventory.InventoryHolder;
++// CraftBukkit end
+ 
+ public class PlayerEnderChestContainer extends SimpleContainer {
+ 
+     @Nullable
+     private EnderChestBlockEntity activeChest;
++    // CraftBukkit start
++    private final Player owner;
+ 
+-    public PlayerEnderChestContainer() {
++    public InventoryHolder getBukkitOwner() {
++        return this.owner.getBukkitEntity();
++    }
++
++    @Override
++    public Location getLocation() {
++        return this.activeChest != null ? CraftLocation.toBukkit(this.activeChest.getBlockPos(), this.activeChest.getLevel().getWorld()) : null;
++    }
++
++    public PlayerEnderChestContainer(Player owner) {
+         super(27);
++        this.owner = owner;
++        // CraftBukkit end
+     }
+ 
+     public void setActiveChest(EnderChestBlockEntity blockEntity) {
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/InventoryCraftResult.patch b/paper-server/patches/sources/net/minecraft/world/inventory/ResultContainer.java.patch
similarity index 81%
rename from paper-server/patches/sources/net/minecraft/world/inventory/InventoryCraftResult.patch
rename to paper-server/patches/sources/net/minecraft/world/inventory/ResultContainer.java.patch
index 8b0b0e9540..f0ecbe2239 100644
--- a/paper-server/patches/sources/net/minecraft/world/inventory/InventoryCraftResult.patch
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/ResultContainer.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/world/inventory/InventoryCraftResult.java
-+++ b/net/minecraft/world/inventory/InventoryCraftResult.java
+--- a/net/minecraft/world/inventory/ResultContainer.java
++++ b/net/minecraft/world/inventory/ResultContainer.java
 @@ -9,12 +9,51 @@
  import net.minecraft.world.item.ItemStack;
  import net.minecraft.world.item.crafting.RecipeHolder;
@@ -10,7 +10,7 @@
 +import org.bukkit.entity.HumanEntity;
 +// CraftBukkit end
 +
- public class InventoryCraftResult implements IInventory, RecipeCraftingHolder {
+ public class ResultContainer implements Container, RecipeCraftingHolder {
  
      private final NonNullList<ItemStack> itemStacks;
      @Nullable
@@ -36,11 +36,11 @@
 +
 +    @Override
 +    public int getMaxStackSize() {
-+        return maxStack;
++        return this.maxStack;
 +    }
 +
 +    public void setMaxStackSize(int size) {
-+        maxStack = size;
++        this.maxStack = size;
 +    }
 +
 +    @Override
@@ -49,6 +49,6 @@
 +    }
 +    // CraftBukkit end
 +
-     public InventoryCraftResult() {
+     public ResultContainer() {
          this.itemStacks = NonNullList.withSize(1, ItemStack.EMPTY);
      }
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/ShulkerBoxMenu.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/ShulkerBoxMenu.java.patch
new file mode 100644
index 0000000000..4efe4724bc
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/ShulkerBoxMenu.java.patch
@@ -0,0 +1,49 @@
+--- a/net/minecraft/world/inventory/ShulkerBoxMenu.java
++++ b/net/minecraft/world/inventory/ShulkerBoxMenu.java
+@@ -6,11 +6,30 @@
+ import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.item.ItemStack;
+ 
++// CraftBukkit start
++import org.bukkit.craftbukkit.inventory.CraftInventory;
++import org.bukkit.craftbukkit.inventory.CraftInventoryView;
++// CraftBukkit end
++
+ public class ShulkerBoxMenu extends AbstractContainerMenu {
+ 
+     private static final int CONTAINER_SIZE = 27;
+     private final Container container;
++    // CraftBukkit start
++    private CraftInventoryView bukkitEntity;
++    private Inventory player;
+ 
++    @Override
++    public CraftInventoryView getBukkitView() {
++        if (this.bukkitEntity != null) {
++            return this.bukkitEntity;
++        }
++
++        this.bukkitEntity = new CraftInventoryView(this.player.player.getBukkitEntity(), new CraftInventory(this.container), this);
++        return this.bukkitEntity;
++    }
++    // CraftBukkit end
++
+     public ShulkerBoxMenu(int syncId, Inventory playerInventory) {
+         this(syncId, playerInventory, new SimpleContainer(27));
+     }
+@@ -19,6 +38,7 @@
+         super(MenuType.SHULKER_BOX, syncId);
+         checkContainerSize(inventory, 27);
+         this.container = inventory;
++        this.player = playerInventory; // CraftBukkit - save player
+         inventory.startOpen(playerInventory.player);
+         boolean flag = true;
+         boolean flag1 = true;
+@@ -34,6 +54,7 @@
+ 
+     @Override
+     public boolean stillValid(Player player) {
++        if (!this.checkReachable) return true; // CraftBukkit
+         return this.container.stillValid(player);
+     }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/SlotFurnaceResult.patch b/paper-server/patches/sources/net/minecraft/world/inventory/SlotFurnaceResult.patch
deleted file mode 100644
index f8a6dc26a6..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/inventory/SlotFurnaceResult.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/inventory/SlotFurnaceResult.java
-+++ b/net/minecraft/world/inventory/SlotFurnaceResult.java
-@@ -51,7 +51,7 @@
-             IInventory iinventory = this.container;
- 
-             if (iinventory instanceof TileEntityFurnace tileentityfurnace) {
--                tileentityfurnace.awardUsedRecipesAndPopExperience(entityplayer);
-+                tileentityfurnace.awardUsedRecipesAndPopExperience(entityplayer, itemstack, this.removeCount); // CraftBukkit
-             }
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerSmithing.patch b/paper-server/patches/sources/net/minecraft/world/inventory/SmithingMenu.java.patch
similarity index 59%
rename from paper-server/patches/sources/net/minecraft/world/inventory/ContainerSmithing.patch
rename to paper-server/patches/sources/net/minecraft/world/inventory/SmithingMenu.java.patch
index 39be79fcec..8bcdc6dadc 100644
--- a/paper-server/patches/sources/net/minecraft/world/inventory/ContainerSmithing.patch
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/SmithingMenu.java.patch
@@ -1,45 +1,44 @@
---- a/net/minecraft/world/inventory/ContainerSmithing.java
-+++ b/net/minecraft/world/inventory/ContainerSmithing.java
-@@ -18,6 +18,8 @@
+--- a/net/minecraft/world/inventory/SmithingMenu.java
++++ b/net/minecraft/world/inventory/SmithingMenu.java
+@@ -17,6 +17,7 @@
+ import net.minecraft.world.level.Level;
  import net.minecraft.world.level.block.Blocks;
- import net.minecraft.world.level.block.state.IBlockData;
- 
+ import net.minecraft.world.level.block.state.BlockState;
 +import org.bukkit.craftbukkit.inventory.CraftInventoryView; // CraftBukkit
-+
- public class ContainerSmithing extends ContainerAnvilAbstract {
  
-     public static final int TEMPLATE_SLOT = 0;
-@@ -34,6 +36,9 @@
+ public class SmithingMenu extends ItemCombinerMenu {
+ 
+@@ -34,6 +35,9 @@
      private final RecipePropertySet templateItemTest;
      private final RecipePropertySet additionItemTest;
-     private final ContainerProperty hasRecipeError;
+     private final DataSlot hasRecipeError;
 +    // CraftBukkit start
 +    private CraftInventoryView bukkitEntity;
 +    // CraftBukkit end
  
-     public ContainerSmithing(int i, PlayerInventory playerinventory) {
-         this(i, playerinventory, ContainerAccess.NULL);
-@@ -117,7 +122,7 @@
+     public SmithingMenu(int syncId, Inventory playerInventory) {
+         this(syncId, playerInventory, ContainerLevelAccess.NULL);
+@@ -117,7 +121,7 @@
      public void createResult() {
          SmithingRecipeInput smithingrecipeinput = this.createRecipeInput();
-         World world = this.level;
+         Level world = this.level;
 -        Optional optional;
 +        Optional<RecipeHolder<SmithingRecipe>> optional; // CraftBukkit - decompile error
  
-         if (world instanceof WorldServer worldserver) {
-             optional = worldserver.recipeAccess().getRecipeFor(Recipes.SMITHING, smithingrecipeinput, worldserver);
-@@ -129,7 +134,9 @@
+         if (world instanceof ServerLevel worldserver) {
+             optional = worldserver.recipeAccess().getRecipeFor(RecipeType.SMITHING, smithingrecipeinput, worldserver);
+@@ -129,7 +133,9 @@
              ItemStack itemstack = ((SmithingRecipe) recipeholder.value()).assemble(smithingrecipeinput, this.level.registryAccess());
  
              this.resultSlots.setRecipeUsed(recipeholder);
 -            this.resultSlots.setItem(0, itemstack);
 +            // CraftBukkit start
-+            org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareSmithingEvent(getBukkitView(), itemstack);
++            org.bukkit.craftbukkit.event.CraftEventFactory.callPrepareSmithingEvent(this.getBukkitView(), itemstack);
 +            // CraftBukkit end
          }, () -> {
              this.resultSlots.setRecipeUsed((RecipeHolder) null);
              this.resultSlots.setItem(0, ItemStack.EMPTY);
-@@ -149,4 +156,18 @@
+@@ -149,4 +155,18 @@
      public boolean hasRecipeError() {
          return this.hasRecipeError.get() > 0;
      }
@@ -47,14 +46,14 @@
 +    // CraftBukkit start
 +    @Override
 +    public CraftInventoryView getBukkitView() {
-+        if (bukkitEntity != null) {
-+            return bukkitEntity;
++        if (this.bukkitEntity != null) {
++            return this.bukkitEntity;
 +        }
 +
 +        org.bukkit.craftbukkit.inventory.CraftInventory inventory = new org.bukkit.craftbukkit.inventory.CraftInventorySmithing(
-+                access.getLocation(), this.inputSlots, this.resultSlots);
-+        bukkitEntity = new CraftInventoryView(this.player.getBukkitEntity(), inventory, this);
-+        return bukkitEntity;
++                this.access.getLocation(), this.inputSlots, this.resultSlots);
++        this.bukkitEntity = new CraftInventoryView(this.player.getBukkitEntity(), inventory, this);
++        return this.bukkitEntity;
 +    }
 +    // CraftBukkit end
  }
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/StonecutterMenu.java.patch b/paper-server/patches/sources/net/minecraft/world/inventory/StonecutterMenu.java.patch
new file mode 100644
index 0000000000..24ec9e2240
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/StonecutterMenu.java.patch
@@ -0,0 +1,129 @@
+--- a/net/minecraft/world/inventory/StonecutterMenu.java
++++ b/net/minecraft/world/inventory/StonecutterMenu.java
+@@ -7,7 +7,6 @@
+ import net.minecraft.world.Container;
+ import net.minecraft.world.SimpleContainer;
+ import net.minecraft.world.entity.player.Inventory;
+-import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.item.Item;
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.item.crafting.RecipeHolder;
+@@ -17,6 +16,13 @@
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.block.Blocks;
+ 
++// CraftBukkit start
++import org.bukkit.Location;
++import org.bukkit.craftbukkit.inventory.CraftInventoryStonecutter;
++import org.bukkit.craftbukkit.inventory.view.CraftStonecutterView;
++import org.bukkit.entity.Player;
++// CraftBukkit end
++
+ public class StonecutterMenu extends AbstractContainerMenu {
+ 
+     public static final int INPUT_SLOT = 0;
+@@ -36,6 +42,21 @@
+     Runnable slotUpdateListener;
+     public final Container container;
+     final ResultContainer resultContainer;
++    // CraftBukkit start
++    private CraftStonecutterView bukkitEntity = null;
++    private Player player;
++
++    @Override
++    public CraftStonecutterView getBukkitView() {
++        if (this.bukkitEntity != null) {
++            return this.bukkitEntity;
++        }
++
++        CraftInventoryStonecutter inventory = new CraftInventoryStonecutter(this.container, this.resultContainer);
++        this.bukkitEntity = new CraftStonecutterView(this.player, inventory, this);
++        return this.bukkitEntity;
++    }
++    // CraftBukkit end
+ 
+     public StonecutterMenu(int syncId, Inventory playerInventory) {
+         this(syncId, playerInventory, ContainerLevelAccess.NULL);
+@@ -55,6 +76,13 @@
+                 StonecutterMenu.this.slotsChanged(this);
+                 StonecutterMenu.this.slotUpdateListener.run();
+             }
++
++            // CraftBukkit start
++            @Override
++            public Location getLocation() {
++                return context.getLocation();
++            }
++            // CraftBukkit end
+         };
+         this.resultContainer = new ResultContainer();
+         this.access = context;
+@@ -67,7 +95,7 @@
+             }
+ 
+             @Override
+-            public void onTake(Player player, ItemStack stack) {
++            public void onTake(net.minecraft.world.entity.player.Player player, ItemStack stack) {
+                 stack.onCraftedBy(player.level(), player, stack.getCount());
+                 StonecutterMenu.this.resultContainer.awardUsedRecipes(player, this.getRelevantItems());
+                 ItemStack itemstack1 = StonecutterMenu.this.inputSlot.remove(1);
+@@ -80,7 +108,7 @@
+                     long j = world.getGameTime();
+ 
+                     if (StonecutterMenu.this.lastSoundTime != j) {
+-                        world.playSound((Player) null, blockposition, SoundEvents.UI_STONECUTTER_TAKE_RESULT, SoundSource.BLOCKS, 1.0F, 1.0F);
++                        world.playSound((net.minecraft.world.entity.player.Player) null, blockposition, SoundEvents.UI_STONECUTTER_TAKE_RESULT, SoundSource.BLOCKS, 1.0F, 1.0F);
+                         StonecutterMenu.this.lastSoundTime = j;
+                     }
+ 
+@@ -94,6 +122,7 @@
+         });
+         this.addStandardInventorySlots(playerInventory, 8, 84);
+         this.addDataSlot(this.selectedRecipeIndex);
++        this.player = (Player) playerInventory.player.getBukkitEntity(); // CraftBukkit
+     }
+ 
+     public int getSelectedRecipeIndex() {
+@@ -113,12 +142,13 @@
+     }
+ 
+     @Override
+-    public boolean stillValid(Player player) {
++    public boolean stillValid(net.minecraft.world.entity.player.Player player) {
++        if (!this.checkReachable) return true; // CraftBukkit
+         return stillValid(this.access, player, Blocks.STONECUTTER);
+     }
+ 
+     @Override
+-    public boolean clickMenuButton(Player player, int id) {
++    public boolean clickMenuButton(net.minecraft.world.entity.player.Player player, int id) {
+         if (this.selectedRecipeIndex.get() == id) {
+             return false;
+         } else {
+@@ -158,7 +188,7 @@
+     }
+ 
+     void setupResultSlot(int selectedId) {
+-        Optional optional;
++        Optional<RecipeHolder<StonecutterRecipe>> optional; // CraftBukkit - decompile error
+ 
+         if (!this.recipesForInput.isEmpty() && this.isValidRecipeIndex(selectedId)) {
+             SelectableRecipe.SingleInputEntry<StonecutterRecipe> selectablerecipe_a = (SelectableRecipe.SingleInputEntry) this.recipesForInput.entries().get(selectedId);
+@@ -193,7 +223,7 @@
+     }
+ 
+     @Override
+-    public ItemStack quickMoveStack(Player player, int slot) {
++    public ItemStack quickMoveStack(net.minecraft.world.entity.player.Player player, int slot) {
+         ItemStack itemstack = ItemStack.EMPTY;
+         Slot slot1 = (Slot) this.slots.get(slot);
+ 
+@@ -246,7 +276,7 @@
+     }
+ 
+     @Override
+-    public void removed(Player player) {
++    public void removed(net.minecraft.world.entity.player.Player player) {
+         super.removed(player);
+         this.resultContainer.removeItemNoUpdate(1);
+         this.access.execute((world, blockposition) -> {
diff --git a/paper-server/patches/sources/net/minecraft/world/inventory/TransientCraftingContainer.patch b/paper-server/patches/sources/net/minecraft/world/inventory/TransientCraftingContainer.java.patch
similarity index 56%
rename from paper-server/patches/sources/net/minecraft/world/inventory/TransientCraftingContainer.patch
rename to paper-server/patches/sources/net/minecraft/world/inventory/TransientCraftingContainer.java.patch
index 7c539ac590..67ed6a0fb4 100644
--- a/paper-server/patches/sources/net/minecraft/world/inventory/TransientCraftingContainer.patch
+++ b/paper-server/patches/sources/net/minecraft/world/inventory/TransientCraftingContainer.java.patch
@@ -1,12 +1,17 @@
 --- a/net/minecraft/world/inventory/TransientCraftingContainer.java
 +++ b/net/minecraft/world/inventory/TransientCraftingContainer.java
-@@ -8,6 +8,16 @@
+@@ -3,11 +3,21 @@
+ import java.util.Iterator;
+ import java.util.List;
+ import net.minecraft.core.NonNullList;
++import net.minecraft.world.Container;
+ import net.minecraft.world.ContainerHelper;
+ import net.minecraft.world.entity.player.Player;
  import net.minecraft.world.entity.player.StackedItemContents;
  import net.minecraft.world.item.ItemStack;
  
 +// CraftBukkit start
 +import java.util.List;
-+import net.minecraft.world.IInventory;
 +import net.minecraft.world.item.crafting.RecipeHolder;
 +import org.bukkit.Location;
 +import org.bukkit.craftbukkit.entity.CraftHumanEntity;
@@ -14,18 +19,18 @@
 +import org.bukkit.event.inventory.InventoryType;
 +// CraftBukkit end
 +
- public class TransientCraftingContainer implements InventoryCrafting {
+ public class TransientCraftingContainer implements CraftingContainer {
  
      private final NonNullList<ItemStack> items;
 @@ -15,6 +25,68 @@
      private final int height;
-     private final Container menu;
+     private final AbstractContainerMenu menu;
  
 +    // CraftBukkit start - add fields
 +    public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
 +    private RecipeHolder<?> currentRecipe;
-+    public IInventory resultInventory;
-+    private EntityHuman owner;
++    public Container resultInventory;
++    private Player owner;
 +    private int maxStack = MAX_STACK;
 +
 +    public List<ItemStack> getContents() {
@@ -33,43 +38,43 @@
 +    }
 +
 +    public void onOpen(CraftHumanEntity who) {
-+        transaction.add(who);
++        this.transaction.add(who);
 +    }
 +
 +    public InventoryType getInvType() {
-+        return items.size() == 4 ? InventoryType.CRAFTING : InventoryType.WORKBENCH;
++        return this.items.size() == 4 ? InventoryType.CRAFTING : InventoryType.WORKBENCH;
 +    }
 +
 +    public void onClose(CraftHumanEntity who) {
-+        transaction.remove(who);
++        this.transaction.remove(who);
 +    }
 +
 +    public List<HumanEntity> getViewers() {
-+        return transaction;
++        return this.transaction;
 +    }
 +
 +    public org.bukkit.inventory.InventoryHolder getOwner() {
-+        return (owner == null) ? null : owner.getBukkitEntity();
++        return (this.owner == null) ? null : this.owner.getBukkitEntity();
 +    }
 +
 +    @Override
 +    public int getMaxStackSize() {
-+        return maxStack;
++        return this.maxStack;
 +    }
 +
 +    public void setMaxStackSize(int size) {
-+        maxStack = size;
-+        resultInventory.setMaxStackSize(size);
++        this.maxStack = size;
++        this.resultInventory.setMaxStackSize(size);
 +    }
 +
 +    @Override
 +    public Location getLocation() {
-+        return menu instanceof ContainerWorkbench ? ((ContainerWorkbench) menu).access.getLocation() : owner.getBukkitEntity().getLocation();
++        return this.menu instanceof CraftingMenu ? ((CraftingMenu) this.menu).access.getLocation() : this.owner.getBukkitEntity().getLocation();
 +    }
 +
 +    @Override
 +    public RecipeHolder<?> getCurrentRecipe() {
-+        return currentRecipe;
++        return this.currentRecipe;
 +    }
 +
 +    @Override
@@ -77,12 +82,12 @@
 +        this.currentRecipe = currentRecipe;
 +    }
 +
-+    public TransientCraftingContainer(Container container, int i, int j, EntityHuman player) {
++    public TransientCraftingContainer(AbstractContainerMenu container, int i, int j, Player player) {
 +        this(container, i, j);
 +        this.owner = player;
 +    }
 +    // CraftBukkit end
 +
-     public TransientCraftingContainer(Container container, int i, int j) {
-         this(container, i, j, NonNullList.withSize(i * j, ItemStack.EMPTY));
+     public TransientCraftingContainer(AbstractContainerMenu handler, int width, int height) {
+         this(handler, width, height, NonNullList.withSize(width * height, ItemStack.EMPTY));
      }
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ArmorStandItem.java.patch b/paper-server/patches/sources/net/minecraft/world/item/ArmorStandItem.java.patch
new file mode 100644
index 0000000000..e54a0d54ab
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/ArmorStandItem.java.patch
@@ -0,0 +1,14 @@
+--- a/net/minecraft/world/item/ArmorStandItem.java
++++ b/net/minecraft/world/item/ArmorStandItem.java
+@@ -53,6 +53,11 @@
+                     float f = (float) Mth.floor((Mth.wrapDegrees(context.getRotation() - 180.0F) + 22.5F) / 45.0F) * 45.0F;
+ 
+                     entityarmorstand.moveTo(entityarmorstand.getX(), entityarmorstand.getY(), entityarmorstand.getZ(), f, 0.0F);
++                    // CraftBukkit start
++                    if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPlaceEvent(context, entityarmorstand).isCancelled()) {
++                        return InteractionResult.FAIL;
++                    }
++                    // CraftBukkit end
+                     worldserver.addFreshEntityWithPassengers(entityarmorstand);
+                     world.playSound((Player) null, entityarmorstand.getX(), entityarmorstand.getY(), entityarmorstand.getZ(), SoundEvents.ARMOR_STAND_PLACE, SoundSource.BLOCKS, 0.75F, 0.8F);
+                     entityarmorstand.gameEvent(GameEvent.ENTITY_PLACE, context.getPlayer());
diff --git a/paper-server/patches/sources/net/minecraft/world/item/BlockItem.java.patch b/paper-server/patches/sources/net/minecraft/world/item/BlockItem.java.patch
new file mode 100644
index 0000000000..99dc10ca00
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/BlockItem.java.patch
@@ -0,0 +1,83 @@
+--- a/net/minecraft/world/item/BlockItem.java
++++ b/net/minecraft/world/item/BlockItem.java
+@@ -10,9 +10,9 @@
+ import net.minecraft.core.registries.Registries;
+ import net.minecraft.nbt.CompoundTag;
+ import net.minecraft.network.chat.Component;
++import net.minecraft.server.level.ServerLevel;
+ import net.minecraft.server.level.ServerPlayer;
+ import net.minecraft.sounds.SoundEvent;
+-import net.minecraft.sounds.SoundSource;
+ import net.minecraft.world.InteractionResult;
+ import net.minecraft.world.entity.item.ItemEntity;
+ import net.minecraft.world.entity.player.Player;
+@@ -31,6 +31,10 @@
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import net.minecraft.world.phys.shapes.CollisionContext;
++import org.bukkit.craftbukkit.block.CraftBlock;
++import org.bukkit.craftbukkit.block.data.CraftBlockData;
++import org.bukkit.event.block.BlockCanBuildEvent;
++// CraftBukkit end
+ 
+ public class BlockItem extends Item {
+ 
+@@ -62,6 +66,12 @@
+                 return InteractionResult.FAIL;
+             } else {
+                 BlockState iblockdata = this.getPlacementState(blockactioncontext1);
++                // CraftBukkit start - special case for handling block placement with water lilies and snow buckets
++                org.bukkit.block.BlockState blockstate = null;
++                if (this instanceof PlaceOnWaterBlockItem || this instanceof SolidBucketItem) {
++                    blockstate = org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(blockactioncontext1.getLevel(), blockactioncontext1.getClickedPos());
++                }
++                // CraftBukkit end
+ 
+                 if (iblockdata == null) {
+                     return InteractionResult.FAIL;
+@@ -79,6 +89,19 @@
+                         this.updateCustomBlockEntityTag(blockposition, world, entityhuman, itemstack, iblockdata1);
+                         BlockItem.updateBlockEntityComponents(world, blockposition, itemstack);
+                         iblockdata1.getBlock().setPlacedBy(world, blockposition, iblockdata1, entityhuman, itemstack);
++                        // CraftBukkit start
++                        if (blockstate != null) {
++                            org.bukkit.event.block.BlockPlaceEvent placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPlaceEvent((ServerLevel) world, entityhuman, blockactioncontext1.getHand(), blockstate, blockposition.getX(), blockposition.getY(), blockposition.getZ());
++                            if (placeEvent != null && (placeEvent.isCancelled() || !placeEvent.canBuild())) {
++                                blockstate.update(true, false);
++
++                                if (this instanceof SolidBucketItem) {
++                                    ((ServerPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541
++                                }
++                                return InteractionResult.FAIL;
++                            }
++                        }
++                        // CraftBukkit end
+                         if (entityhuman instanceof ServerPlayer) {
+                             CriteriaTriggers.PLACED_BLOCK.trigger((ServerPlayer) entityhuman, blockposition, itemstack);
+                         }
+@@ -86,7 +109,7 @@
+ 
+                     SoundType soundeffecttype = iblockdata1.getSoundType();
+ 
+-                    world.playSound(entityhuman, blockposition, this.getPlaceSound(iblockdata1), SoundSource.BLOCKS, (soundeffecttype.getVolume() + 1.0F) / 2.0F, soundeffecttype.getPitch() * 0.8F);
++                    // world.playSound(entityhuman, blockposition, this.getPlaceSound(iblockdata1), SoundCategory.BLOCKS, (soundeffecttype.getVolume() + 1.0F) / 2.0F, soundeffecttype.getPitch() * 0.8F);
+                     world.gameEvent((Holder) GameEvent.BLOCK_PLACE, blockposition, GameEvent.Context.of(entityhuman, iblockdata1));
+                     itemstack.consume(1, entityhuman);
+                     return InteractionResult.SUCCESS;
+@@ -144,8 +167,15 @@
+     protected boolean canPlace(BlockPlaceContext context, BlockState state) {
+         Player entityhuman = context.getPlayer();
+         CollisionContext voxelshapecollision = entityhuman == null ? CollisionContext.empty() : CollisionContext.of(entityhuman);
++        // CraftBukkit start - store default return
++        boolean defaultReturn = (!this.mustSurvive() || state.canSurvive(context.getLevel(), context.getClickedPos())) && context.getLevel().isUnobstructed(state, context.getClickedPos(), voxelshapecollision);
++        org.bukkit.entity.Player player = (context.getPlayer() instanceof ServerPlayer) ? (org.bukkit.entity.Player) context.getPlayer().getBukkitEntity() : null;
+ 
+-        return (!this.mustSurvive() || state.canSurvive(context.getLevel(), context.getClickedPos())) && context.getLevel().isUnobstructed(state, context.getClickedPos(), voxelshapecollision);
++        BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(context.getLevel(), context.getClickedPos()), player, CraftBlockData.fromData(state), defaultReturn);
++        context.getLevel().getCraftServer().getPluginManager().callEvent(event);
++
++        return event.isBuildable();
++        // CraftBukkit end
+     }
+ 
+     protected boolean mustSurvive() {
diff --git a/paper-server/patches/sources/net/minecraft/world/item/BoatItem.java.patch b/paper-server/patches/sources/net/minecraft/world/item/BoatItem.java.patch
new file mode 100644
index 0000000000..c8502fcea3
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/BoatItem.java.patch
@@ -0,0 +1,33 @@
+--- a/net/minecraft/world/item/BoatItem.java
++++ b/net/minecraft/world/item/BoatItem.java
+@@ -58,6 +58,13 @@
+             }
+ 
+             if (movingobjectpositionblock.getType() == HitResult.Type.BLOCK) {
++                // CraftBukkit start - Boat placement
++                org.bukkit.event.player.PlayerInteractEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(user, org.bukkit.event.block.Action.RIGHT_CLICK_BLOCK, movingobjectpositionblock.getBlockPos(), movingobjectpositionblock.getDirection(), itemstack, false, hand, movingobjectpositionblock.getLocation());
++
++                if (event.isCancelled()) {
++                    return InteractionResult.PASS;
++                }
++                // CraftBukkit end
+                 AbstractBoat abstractboat = this.getBoat(world, movingobjectpositionblock, itemstack, user);
+ 
+                 if (abstractboat == null) {
+@@ -68,7 +75,15 @@
+                         return InteractionResult.FAIL;
+                     } else {
+                         if (!world.isClientSide) {
+-                            world.addFreshEntity(abstractboat);
++                            // CraftBukkit start
++                            if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPlaceEvent(world, movingobjectpositionblock.getBlockPos(), movingobjectpositionblock.getDirection(), user, abstractboat, hand).isCancelled()) {
++                                return InteractionResult.FAIL;
++                            }
++
++                            if (!world.addFreshEntity(abstractboat)) {
++                                return InteractionResult.PASS;
++                            }
++                            // CraftBukkit end
+                             world.gameEvent((Entity) user, (Holder) GameEvent.ENTITY_PLACE, movingobjectpositionblock.getLocation());
+                             itemstack.consume(1, user);
+                         }
diff --git a/paper-server/patches/sources/net/minecraft/world/item/BoneMealItem.java.patch b/paper-server/patches/sources/net/minecraft/world/item/BoneMealItem.java.patch
new file mode 100644
index 0000000000..4cf7f7eebf
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/BoneMealItem.java.patch
@@ -0,0 +1,41 @@
+--- a/net/minecraft/world/item/BoneMealItem.java
++++ b/net/minecraft/world/item/BoneMealItem.java
+@@ -35,24 +35,30 @@
+ 
+     @Override
+     public InteractionResult useOn(UseOnContext context) {
+-        Level world = context.getLevel();
+-        BlockPos blockposition = context.getClickedPos();
+-        BlockPos blockposition1 = blockposition.relative(context.getClickedFace());
++        // CraftBukkit start - extract bonemeal application logic to separate, static method
++        return BoneMealItem.applyBonemeal(context);
++    }
+ 
+-        if (BoneMealItem.growCrop(context.getItemInHand(), world, blockposition)) {
++    public static InteractionResult applyBonemeal(UseOnContext itemactioncontext) {
++        // CraftBukkit end
++        Level world = itemactioncontext.getLevel();
++        BlockPos blockposition = itemactioncontext.getClickedPos();
++        BlockPos blockposition1 = blockposition.relative(itemactioncontext.getClickedFace());
++
++        if (BoneMealItem.growCrop(itemactioncontext.getItemInHand(), world, blockposition)) {
+             if (!world.isClientSide) {
+-                context.getPlayer().gameEvent(GameEvent.ITEM_INTERACT_FINISH);
++                if (itemactioncontext.getPlayer() != null) itemactioncontext.getPlayer().gameEvent(GameEvent.ITEM_INTERACT_FINISH); // CraftBukkit - SPIGOT-7518
+                 world.levelEvent(1505, blockposition, 15);
+             }
+ 
+             return InteractionResult.SUCCESS;
+         } else {
+             BlockState iblockdata = world.getBlockState(blockposition);
+-            boolean flag = iblockdata.isFaceSturdy(world, blockposition, context.getClickedFace());
++            boolean flag = iblockdata.isFaceSturdy(world, blockposition, itemactioncontext.getClickedFace());
+ 
+-            if (flag && BoneMealItem.growWaterPlant(context.getItemInHand(), world, blockposition1, context.getClickedFace())) {
++            if (flag && BoneMealItem.growWaterPlant(itemactioncontext.getItemInHand(), world, blockposition1, itemactioncontext.getClickedFace())) {
+                 if (!world.isClientSide) {
+-                    context.getPlayer().gameEvent(GameEvent.ITEM_INTERACT_FINISH);
++                    if (itemactioncontext.getPlayer() != null) itemactioncontext.getPlayer().gameEvent(GameEvent.ITEM_INTERACT_FINISH); // CraftBukkit - SPIGOT-7518
+                     world.levelEvent(1505, blockposition1, 15);
+                 }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/item/BucketItem.java.patch b/paper-server/patches/sources/net/minecraft/world/item/BucketItem.java.patch
new file mode 100644
index 0000000000..115172f093
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/BucketItem.java.patch
@@ -0,0 +1,148 @@
+--- a/net/minecraft/world/item/BucketItem.java
++++ b/net/minecraft/world/item/BucketItem.java
+@@ -6,6 +6,8 @@
+ import net.minecraft.core.Direction;
+ import net.minecraft.core.Holder;
+ import net.minecraft.core.particles.ParticleTypes;
++import net.minecraft.network.protocol.game.ClientboundBlockUpdatePacket;
++import net.minecraft.server.level.ServerLevel;
+ import net.minecraft.server.level.ServerPlayer;
+ import net.minecraft.sounds.SoundEvent;
+ import net.minecraft.sounds.SoundEvents;
+@@ -29,6 +31,12 @@
+ import net.minecraft.world.level.material.Fluids;
+ import net.minecraft.world.phys.BlockHitResult;
+ import net.minecraft.world.phys.HitResult;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.craftbukkit.inventory.CraftItemStack;
++import org.bukkit.craftbukkit.util.DummyGeneratorAccess;
++import org.bukkit.event.player.PlayerBucketEmptyEvent;
++import org.bukkit.event.player.PlayerBucketFillEvent;
++// CraftBukkit end
+ 
+ public class BucketItem extends Item implements DispensibleContainerItem {
+ 
+@@ -63,7 +71,18 @@
+ 
+                     if (block instanceof BucketPickup) {
+                         BucketPickup ifluidsource = (BucketPickup) block;
++                        // CraftBukkit start
++                        ItemStack dummyFluid = ifluidsource.pickupBlock(user, DummyGeneratorAccess.INSTANCE, blockposition, iblockdata);
++                        if (dummyFluid.isEmpty()) return InteractionResult.FAIL; // Don't fire event if the bucket won't be filled.
++                        PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent((ServerLevel) world, user, blockposition, blockposition, movingobjectpositionblock.getDirection(), itemstack, dummyFluid.getItem(), hand);
+ 
++                        if (event.isCancelled()) {
++                            ((ServerPlayer) user).connection.send(new ClientboundBlockUpdatePacket(world, blockposition)); // SPIGOT-5163 (see PlayerInteractManager)
++                            ((ServerPlayer) user).getBukkitEntity().updateInventory(); // SPIGOT-4541
++                            return InteractionResult.FAIL;
++                        }
++                        // CraftBukkit end
++
+                         itemstack1 = ifluidsource.pickupBlock(user, world, blockposition, iblockdata);
+                         if (!itemstack1.isEmpty()) {
+                             user.awardStat(Stats.ITEM_USED.get(this));
+@@ -71,7 +90,7 @@
+                                 user.playSound(soundeffect, 1.0F, 1.0F);
+                             });
+                             world.gameEvent((Entity) user, (Holder) GameEvent.FLUID_PICKUP, blockposition);
+-                            ItemStack itemstack2 = ItemUtils.createFilledResult(itemstack, user, itemstack1);
++                            ItemStack itemstack2 = ItemUtils.createFilledResult(itemstack, user, CraftItemStack.asNMSCopy(event.getItemStack())); // CraftBukkit
+ 
+                             if (!world.isClientSide) {
+                                 CriteriaTriggers.FILLED_BUCKET.trigger((ServerPlayer) user, itemstack1);
+@@ -86,7 +105,7 @@
+                     iblockdata = world.getBlockState(blockposition);
+                     BlockPos blockposition2 = iblockdata.getBlock() instanceof LiquidBlockContainer && this.content == Fluids.WATER ? blockposition : blockposition1;
+ 
+-                    if (this.emptyContents(user, world, blockposition2, movingobjectpositionblock)) {
++                    if (this.emptyContents(user, world, blockposition2, movingobjectpositionblock, movingobjectpositionblock.getDirection(), blockposition, itemstack, hand)) { // CraftBukkit
+                         this.checkExtraContent(user, world, itemstack, blockposition2);
+                         if (user instanceof ServerPlayer) {
+                             CriteriaTriggers.PLACED_BLOCK.trigger((ServerPlayer) user, blockposition2, itemstack);
+@@ -114,6 +133,12 @@
+ 
+     @Override
+     public boolean emptyContents(@Nullable Player player, Level world, BlockPos pos, @Nullable BlockHitResult hitResult) {
++        // CraftBukkit start
++        return this.emptyContents(player, world, pos, hitResult, null, null, null, InteractionHand.MAIN_HAND);
++    }
++
++    public boolean emptyContents(Player entityhuman, Level world, BlockPos blockposition, @Nullable BlockHitResult movingobjectpositionblock, Direction enumdirection, BlockPos clicked, ItemStack itemstack, InteractionHand enumhand) {
++        // CraftBukkit end
+         Fluid fluidtype = this.content;
+ 
+         if (!(fluidtype instanceof FlowingFluid fluidtypeflowing)) {
+@@ -126,7 +151,7 @@
+             boolean flag1;
+             label70:
+             {
+-                iblockdata = world.getBlockState(pos);
++                iblockdata = world.getBlockState(blockposition);
+                 block = iblockdata.getBlock();
+                 flag = iblockdata.canBeReplaced(this.content);
+                 if (!iblockdata.isAir() && !flag) {
+@@ -134,7 +159,7 @@
+                     {
+                         if (block instanceof LiquidBlockContainer) {
+                             ifluidcontainer = (LiquidBlockContainer) block;
+-                            if (ifluidcontainer.canPlaceLiquid(player, world, pos, iblockdata, this.content)) {
++                            if (ifluidcontainer.canPlaceLiquid(entityhuman, world, blockposition, iblockdata, this.content)) {
+                                 break label67;
+                             }
+                         }
+@@ -149,14 +174,24 @@
+ 
+             boolean flag2 = flag1;
+ 
++            // CraftBukkit start
++            if (flag2 && entityhuman != null) {
++                PlayerBucketEmptyEvent event = CraftEventFactory.callPlayerBucketEmptyEvent((ServerLevel) world, entityhuman, blockposition, clicked, enumdirection, itemstack, enumhand);
++                if (event.isCancelled()) {
++                    ((ServerPlayer) entityhuman).connection.send(new ClientboundBlockUpdatePacket(world, blockposition)); // SPIGOT-4238: needed when looking through entity
++                    ((ServerPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541
++                    return false;
++                }
++            }
++            // CraftBukkit end
+             if (!flag2) {
+-                return hitResult != null && this.emptyContents(player, world, hitResult.getBlockPos().relative(hitResult.getDirection()), (BlockHitResult) null);
++                return movingobjectpositionblock != null && this.emptyContents(entityhuman, world, movingobjectpositionblock.getBlockPos().relative(movingobjectpositionblock.getDirection()), (BlockHitResult) null, enumdirection, clicked, itemstack, enumhand); // CraftBukkit
+             } else if (world.dimensionType().ultraWarm() && this.content.is(FluidTags.WATER)) {
+-                int i = pos.getX();
+-                int j = pos.getY();
+-                int k = pos.getZ();
++                int i = blockposition.getX();
++                int j = blockposition.getY();
++                int k = blockposition.getZ();
+ 
+-                world.playSound(player, pos, SoundEvents.FIRE_EXTINGUISH, SoundSource.BLOCKS, 0.5F, 2.6F + (world.random.nextFloat() - world.random.nextFloat()) * 0.8F);
++                world.playSound(entityhuman, blockposition, SoundEvents.FIRE_EXTINGUISH, SoundSource.BLOCKS, 0.5F, 2.6F + (world.random.nextFloat() - world.random.nextFloat()) * 0.8F);
+ 
+                 for (int l = 0; l < 8; ++l) {
+                     world.addParticle(ParticleTypes.LARGE_SMOKE, (double) i + Math.random(), (double) j + Math.random(), (double) k + Math.random(), 0.0D, 0.0D, 0.0D);
+@@ -167,20 +202,20 @@
+                 if (block instanceof LiquidBlockContainer) {
+                     ifluidcontainer = (LiquidBlockContainer) block;
+                     if (this.content == Fluids.WATER) {
+-                        ifluidcontainer.placeLiquid(world, pos, iblockdata, fluidtypeflowing.getSource(false));
+-                        this.playEmptySound(player, world, pos);
++                        ifluidcontainer.placeLiquid(world, blockposition, iblockdata, fluidtypeflowing.getSource(false));
++                        this.playEmptySound(entityhuman, world, blockposition);
+                         return true;
+                     }
+                 }
+ 
+                 if (!world.isClientSide && flag && !iblockdata.liquid()) {
+-                    world.destroyBlock(pos, true);
++                    world.destroyBlock(blockposition, true);
+                 }
+ 
+-                if (!world.setBlock(pos, this.content.defaultFluidState().createLegacyBlock(), 11) && !iblockdata.getFluidState().isSource()) {
++                if (!world.setBlock(blockposition, this.content.defaultFluidState().createLegacyBlock(), 11) && !iblockdata.getFluidState().isSource()) {
+                     return false;
+                 } else {
+-                    this.playEmptySound(player, world, pos);
++                    this.playEmptySound(entityhuman, world, blockposition);
+                     return true;
+                 }
+             }
diff --git a/paper-server/patches/sources/net/minecraft/world/item/DebugStickItem.java.patch b/paper-server/patches/sources/net/minecraft/world/item/DebugStickItem.java.patch
new file mode 100644
index 0000000000..5ecf01e96f
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/DebugStickItem.java.patch
@@ -0,0 +1,16 @@
+--- a/net/minecraft/world/item/DebugStickItem.java
++++ b/net/minecraft/world/item/DebugStickItem.java
+@@ -1,3 +1,4 @@
++// mc-dev import
+ package net.minecraft.world.item;
+ 
+ import java.util.Collection;
+@@ -92,7 +93,7 @@
+     }
+ 
+     private static <T extends Comparable<T>> BlockState cycleState(BlockState state, Property<T> property, boolean inverse) {
+-        return (BlockState) state.setValue(property, (Comparable) DebugStickItem.getRelative(property.getPossibleValues(), state.getValue(property), inverse));
++        return (BlockState) state.setValue(property, DebugStickItem.getRelative(property.getPossibleValues(), state.getValue(property), inverse)); // CraftBukkit - decompile error
+     }
+ 
+     private static <T> T getRelative(Iterable<T> elements, @Nullable T current, boolean inverse) {
diff --git a/paper-server/patches/sources/net/minecraft/world/item/DyeItem.java.patch b/paper-server/patches/sources/net/minecraft/world/item/DyeItem.java.patch
new file mode 100644
index 0000000000..ca96f3388a
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/DyeItem.java.patch
@@ -0,0 +1,29 @@
+--- a/net/minecraft/world/item/DyeItem.java
++++ b/net/minecraft/world/item/DyeItem.java
+@@ -12,6 +12,7 @@
+ import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.block.entity.SignBlockEntity;
++import org.bukkit.event.entity.SheepDyeWoolEvent; // CraftBukkit
+ 
+ public class DyeItem extends Item implements SignApplicator {
+ 
+@@ -30,7 +31,17 @@
+             if (entitysheep.isAlive() && !entitysheep.isSheared() && entitysheep.getColor() != this.dyeColor) {
+                 entitysheep.level().playSound(user, (Entity) entitysheep, SoundEvents.DYE_USE, SoundSource.PLAYERS, 1.0F, 1.0F);
+                 if (!user.level().isClientSide) {
+-                    entitysheep.setColor(this.dyeColor);
++                    // CraftBukkit start
++                    byte bColor = (byte) this.dyeColor.getId();
++                    SheepDyeWoolEvent event = new SheepDyeWoolEvent((org.bukkit.entity.Sheep) entitysheep.getBukkitEntity(), org.bukkit.DyeColor.getByWoolData(bColor), (org.bukkit.entity.Player) user.getBukkitEntity());
++                    entitysheep.level().getCraftServer().getPluginManager().callEvent(event);
++
++                    if (event.isCancelled()) {
++                        return InteractionResult.PASS;
++                    }
++
++                    entitysheep.setColor(DyeColor.byId((byte) event.getColor().getWoolData()));
++                    // CraftBukkit end
+                     stack.shrink(1);
+                 }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/item/EggItem.java.patch b/paper-server/patches/sources/net/minecraft/world/item/EggItem.java.patch
new file mode 100644
index 0000000000..fc7ca8b41e
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/EggItem.java.patch
@@ -0,0 +1,23 @@
+--- a/net/minecraft/world/item/EggItem.java
++++ b/net/minecraft/world/item/EggItem.java
+@@ -25,10 +25,18 @@
+     public InteractionResult use(Level world, Player user, InteractionHand hand) {
+         ItemStack itemstack = user.getItemInHand(hand);
+ 
+-        world.playSound((Player) null, user.getX(), user.getY(), user.getZ(), SoundEvents.EGG_THROW, SoundSource.PLAYERS, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
++        // world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.EGG_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F)); // CraftBukkit - moved down
+         if (world instanceof ServerLevel worldserver) {
+-            Projectile.spawnProjectileFromRotation(ThrownEgg::new, worldserver, itemstack, user, 0.0F, EggItem.PROJECTILE_SHOOT_POWER, 1.0F);
++            // CraftBukkit start
++            if (Projectile.spawnProjectileFromRotation(ThrownEgg::new, worldserver, itemstack, user, 0.0F, EggItem.PROJECTILE_SHOOT_POWER, 1.0F).isRemoved()) {
++                if (user instanceof net.minecraft.server.level.ServerPlayer) {
++                    ((net.minecraft.server.level.ServerPlayer) user).getBukkitEntity().updateInventory();
++                }
++                return InteractionResult.FAIL;
++            }
++            // CraftBukkit end
+         }
++        world.playSound((Player) null, user.getX(), user.getY(), user.getZ(), SoundEvents.EGG_THROW, SoundSource.PLAYERS, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
+ 
+         user.awardStat(Stats.ITEM_USED.get(this));
+         itemstack.consume(1, user);
diff --git a/paper-server/patches/sources/net/minecraft/world/item/EndCrystalItem.java.patch b/paper-server/patches/sources/net/minecraft/world/item/EndCrystalItem.java.patch
new file mode 100644
index 0000000000..d9f548e749
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/EndCrystalItem.java.patch
@@ -0,0 +1,14 @@
+--- a/net/minecraft/world/item/EndCrystalItem.java
++++ b/net/minecraft/world/item/EndCrystalItem.java
+@@ -47,6 +47,11 @@
+                         EndCrystal entityendercrystal = new EndCrystal(world, d0 + 0.5D, d1, d2 + 0.5D);
+ 
+                         entityendercrystal.setShowBottom(false);
++                        // CraftBukkit start
++                        if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPlaceEvent(context, entityendercrystal).isCancelled()) {
++                            return InteractionResult.FAIL;
++                        }
++                        // CraftBukkit end
+                         world.addFreshEntity(entityendercrystal);
+                         world.gameEvent((Entity) context.getPlayer(), (Holder) GameEvent.ENTITY_PLACE, blockposition1);
+                         EndDragonFight enderdragonbattle = ((ServerLevel) world).getDragonFight();
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemEnderEye.patch b/paper-server/patches/sources/net/minecraft/world/item/EnderEyeItem.java.patch
similarity index 53%
rename from paper-server/patches/sources/net/minecraft/world/item/ItemEnderEye.patch
rename to paper-server/patches/sources/net/minecraft/world/item/EnderEyeItem.java.patch
index 7549f81705..3eec9b6ef0 100644
--- a/paper-server/patches/sources/net/minecraft/world/item/ItemEnderEye.patch
+++ b/paper-server/patches/sources/net/minecraft/world/item/EnderEyeItem.java.patch
@@ -1,15 +1,15 @@
---- a/net/minecraft/world/item/ItemEnderEye.java
-+++ b/net/minecraft/world/item/ItemEnderEye.java
+--- a/net/minecraft/world/item/EnderEyeItem.java
++++ b/net/minecraft/world/item/EnderEyeItem.java
 @@ -99,7 +99,11 @@
                  entityendersignal.setItem(itemstack);
                  entityendersignal.signalTo(blockposition);
-                 world.gameEvent((Holder) GameEvent.PROJECTILE_SHOOT, entityendersignal.position(), GameEvent.a.of((Entity) entityhuman));
+                 world.gameEvent((Holder) GameEvent.PROJECTILE_SHOOT, entityendersignal.position(), GameEvent.Context.of((Entity) user));
 -                world.addFreshEntity(entityendersignal);
 +                // CraftBukkit start
 +                if (!world.addFreshEntity(entityendersignal)) {
-+                    return EnumInteractionResult.FAIL;
++                    return InteractionResult.FAIL;
 +                }
 +                // CraftBukkit end
-                 if (entityhuman instanceof EntityPlayer) {
-                     EntityPlayer entityplayer = (EntityPlayer) entityhuman;
+                 if (user instanceof ServerPlayer) {
+                     ServerPlayer entityplayer = (ServerPlayer) user;
  
diff --git a/paper-server/patches/sources/net/minecraft/world/item/EnderpearlItem.java.patch b/paper-server/patches/sources/net/minecraft/world/item/EnderpearlItem.java.patch
new file mode 100644
index 0000000000..eee0a6ec83
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/EnderpearlItem.java.patch
@@ -0,0 +1,22 @@
+--- a/net/minecraft/world/item/EnderpearlItem.java
++++ b/net/minecraft/world/item/EnderpearlItem.java
+@@ -23,10 +23,17 @@
+     public InteractionResult use(Level world, Player user, InteractionHand hand) {
+         ItemStack itemstack = user.getItemInHand(hand);
+ 
+-        world.playSound((Player) null, user.getX(), user.getY(), user.getZ(), SoundEvents.ENDER_PEARL_THROW, SoundSource.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
+         if (world instanceof ServerLevel worldserver) {
+-            Projectile.spawnProjectileFromRotation(ThrownEnderpearl::new, worldserver, itemstack, user, 0.0F, EnderpearlItem.PROJECTILE_SHOOT_POWER, 1.0F);
++            // CraftBukkit start
++            if (Projectile.spawnProjectileFromRotation(ThrownEnderpearl::new, worldserver, itemstack, user, 0.0F, EnderpearlItem.PROJECTILE_SHOOT_POWER, 1.0F).isRemoved()) {
++                if (user instanceof net.minecraft.server.level.ServerPlayer) {
++                    ((net.minecraft.server.level.ServerPlayer) user).getBukkitEntity().updateInventory();
++                }
++                return InteractionResult.FAIL;
++            }
+         }
++        world.playSound((Player) null, user.getX(), user.getY(), user.getZ(), SoundEvents.ENDER_PEARL_THROW, SoundSource.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
++        // CraftBukkit end
+ 
+         user.awardStat(Stats.ITEM_USED.get(this));
+         itemstack.consume(1, user);
diff --git a/paper-server/patches/sources/net/minecraft/world/item/FireChargeItem.java.patch b/paper-server/patches/sources/net/minecraft/world/item/FireChargeItem.java.patch
new file mode 100644
index 0000000000..ee72808622
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/FireChargeItem.java.patch
@@ -0,0 +1,31 @@
+--- a/net/minecraft/world/item/FireChargeItem.java
++++ b/net/minecraft/world/item/FireChargeItem.java
+@@ -40,12 +40,28 @@
+         if (!CampfireBlock.canLight(iblockdata) && !CandleBlock.canLight(iblockdata) && !CandleCakeBlock.canLight(iblockdata)) {
+             blockposition = blockposition.relative(context.getClickedFace());
+             if (BaseFireBlock.canBePlacedAt(world, blockposition, context.getHorizontalDirection())) {
++                // CraftBukkit start - fire BlockIgniteEvent
++                if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, blockposition, org.bukkit.event.block.BlockIgniteEvent.IgniteCause.FIREBALL, context.getPlayer()).isCancelled()) {
++                    if (!context.getPlayer().getAbilities().instabuild) {
++                        context.getItemInHand().shrink(1);
++                    }
++                    return InteractionResult.PASS;
++                }
++                // CraftBukkit end
+                 this.playSound(world, blockposition);
+                 world.setBlockAndUpdate(blockposition, BaseFireBlock.getState(world, blockposition));
+                 world.gameEvent((Entity) context.getPlayer(), (Holder) GameEvent.BLOCK_PLACE, blockposition);
+                 flag = true;
+             }
+         } else {
++            // CraftBukkit start - fire BlockIgniteEvent
++            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, blockposition, org.bukkit.event.block.BlockIgniteEvent.IgniteCause.FIREBALL, context.getPlayer()).isCancelled()) {
++                if (!context.getPlayer().getAbilities().instabuild) {
++                    context.getItemInHand().shrink(1);
++                }
++                return InteractionResult.PASS;
++            }
++            // CraftBukkit end
+             this.playSound(world, blockposition);
+             world.setBlockAndUpdate(blockposition, (BlockState) iblockdata.setValue(BlockStateProperties.LIT, true));
+             world.gameEvent((Entity) context.getPlayer(), (Holder) GameEvent.BLOCK_CHANGE, blockposition);
diff --git a/paper-server/patches/sources/net/minecraft/world/item/FishingRodItem.java.patch b/paper-server/patches/sources/net/minecraft/world/item/FishingRodItem.java.patch
new file mode 100644
index 0000000000..763a4455ae
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/FishingRodItem.java.patch
@@ -0,0 +1,41 @@
+--- a/net/minecraft/world/item/FishingRodItem.java
++++ b/net/minecraft/world/item/FishingRodItem.java
+@@ -14,6 +14,11 @@
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.gameevent.GameEvent;
+ 
++// CraftBukkit start
++import org.bukkit.event.player.PlayerFishEvent;
++import org.bukkit.craftbukkit.CraftEquipmentSlot;
++// CraftBukkit end
++
+ public class FishingRodItem extends Item {
+ 
+     public FishingRodItem(Item.Properties settings) {
+@@ -34,13 +39,24 @@
+             world.playSound((Player) null, user.getX(), user.getY(), user.getZ(), SoundEvents.FISHING_BOBBER_RETRIEVE, SoundSource.NEUTRAL, 1.0F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
+             user.gameEvent(GameEvent.ITEM_INTERACT_FINISH);
+         } else {
+-            world.playSound((Player) null, user.getX(), user.getY(), user.getZ(), SoundEvents.FISHING_BOBBER_THROW, SoundSource.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
++            // world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.FISHING_BOBBER_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
+             if (world instanceof ServerLevel) {
+                 ServerLevel worldserver = (ServerLevel) world;
+                 int j = (int) (EnchantmentHelper.getFishingTimeReduction(worldserver, itemstack, user) * 20.0F);
+                 int k = EnchantmentHelper.getFishingLuckBonus(worldserver, itemstack, user);
+ 
+-                Projectile.spawnProjectile(new FishingHook(user, world, k, j), worldserver, itemstack);
++                // CraftBukkit start
++                FishingHook entityfishinghook = new FishingHook(user, world, k, j);
++                PlayerFishEvent playerFishEvent = new PlayerFishEvent((org.bukkit.entity.Player) user.getBukkitEntity(), null, (org.bukkit.entity.FishHook) entityfishinghook.getBukkitEntity(), CraftEquipmentSlot.getHand(hand), PlayerFishEvent.State.FISHING);
++                world.getCraftServer().getPluginManager().callEvent(playerFishEvent);
++
++                if (playerFishEvent.isCancelled()) {
++                    user.fishing = null;
++                    return InteractionResult.PASS;
++                }
++                world.playSound((Player) null, user.getX(), user.getY(), user.getZ(), SoundEvents.FISHING_BOBBER_THROW, SoundSource.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
++                Projectile.spawnProjectile(entityfishinghook, worldserver, itemstack);
++                // CraftBukkit end
+             }
+ 
+             user.awardStat(Stats.ITEM_USED.get(this));
diff --git a/paper-server/patches/sources/net/minecraft/world/item/FlintAndSteelItem.java.patch b/paper-server/patches/sources/net/minecraft/world/item/FlintAndSteelItem.java.patch
new file mode 100644
index 0000000000..0d633ff507
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/FlintAndSteelItem.java.patch
@@ -0,0 +1,28 @@
+--- a/net/minecraft/world/item/FlintAndSteelItem.java
++++ b/net/minecraft/world/item/FlintAndSteelItem.java
+@@ -37,6 +37,12 @@
+             BlockPos blockposition1 = blockposition.relative(context.getClickedFace());
+ 
+             if (BaseFireBlock.canBePlacedAt(world, blockposition1, context.getHorizontalDirection())) {
++                // CraftBukkit start - Store the clicked block
++                if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, blockposition1, org.bukkit.event.block.BlockIgniteEvent.IgniteCause.FLINT_AND_STEEL, entityhuman).isCancelled()) {
++                    context.getItemInHand().hurtAndBreak(1, entityhuman, LivingEntity.getSlotForHand(context.getHand()));
++                    return InteractionResult.PASS;
++                }
++                // CraftBukkit end
+                 world.playSound(entityhuman, blockposition1, SoundEvents.FLINTANDSTEEL_USE, SoundSource.BLOCKS, 1.0F, world.getRandom().nextFloat() * 0.4F + 0.8F);
+                 BlockState iblockdata1 = BaseFireBlock.getState(world, blockposition1);
+ 
+@@ -54,6 +60,12 @@
+                 return InteractionResult.FAIL;
+             }
+         } else {
++            // CraftBukkit start - Store the clicked block
++            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, blockposition, org.bukkit.event.block.BlockIgniteEvent.IgniteCause.FLINT_AND_STEEL, entityhuman).isCancelled()) {
++                context.getItemInHand().hurtAndBreak(1, entityhuman, LivingEntity.getSlotForHand(context.getHand()));
++                return InteractionResult.PASS;
++            }
++            // CraftBukkit end
+             world.playSound(entityhuman, blockposition, SoundEvents.FLINTANDSTEEL_USE, SoundSource.BLOCKS, 1.0F, world.getRandom().nextFloat() * 0.4F + 0.8F);
+             world.setBlock(blockposition, (BlockState) iblockdata.setValue(BlockStateProperties.LIT, true), 11);
+             world.gameEvent((Entity) entityhuman, (Holder) GameEvent.BLOCK_CHANGE, blockposition);
diff --git a/paper-server/patches/sources/net/minecraft/world/item/HangingEntityItem.java.patch b/paper-server/patches/sources/net/minecraft/world/item/HangingEntityItem.java.patch
new file mode 100644
index 0000000000..79e498f9a5
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/HangingEntityItem.java.patch
@@ -0,0 +1,67 @@
+--- a/net/minecraft/world/item/HangingEntityItem.java
++++ b/net/minecraft/world/item/HangingEntityItem.java
+@@ -19,12 +19,16 @@
+ import net.minecraft.world.entity.decoration.ItemFrame;
+ import net.minecraft.world.entity.decoration.Painting;
+ import net.minecraft.world.entity.decoration.PaintingVariant;
+-import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.item.component.CustomData;
+ import net.minecraft.world.item.context.UseOnContext;
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.gameevent.GameEvent;
+ 
++// CraftBukkit start
++import org.bukkit.entity.Player;
++import org.bukkit.event.hanging.HangingPlaceEvent;
++// CraftBukkit end
++
+ public class HangingEntityItem extends Item {
+ 
+     private static final Component TOOLTIP_RANDOM_VARIANT = Component.translatable("painting.random").withStyle(ChatFormatting.GRAY);
+@@ -40,7 +44,7 @@
+         BlockPos blockposition = context.getClickedPos();
+         Direction enumdirection = context.getClickedFace();
+         BlockPos blockposition1 = blockposition.relative(enumdirection);
+-        Player entityhuman = context.getPlayer();
++        net.minecraft.world.entity.player.Player entityhuman = context.getPlayer();
+         ItemStack itemstack = context.getItemInHand();
+ 
+         if (entityhuman != null && !this.mayPlace(entityhuman, enumdirection, itemstack, blockposition1)) {
+@@ -75,6 +79,19 @@
+ 
+             if (((HangingEntity) object).survives()) {
+                 if (!world.isClientSide) {
++                    // CraftBukkit start - fire HangingPlaceEvent
++                    Player who = (context.getPlayer() == null) ? null : (Player) context.getPlayer().getBukkitEntity();
++                    org.bukkit.block.Block blockClicked = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
++                    org.bukkit.block.BlockFace blockFace = org.bukkit.craftbukkit.block.CraftBlock.notchToBlockFace(enumdirection);
++                    org.bukkit.inventory.EquipmentSlot hand = org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(context.getHand());
++
++                    HangingPlaceEvent event = new HangingPlaceEvent((org.bukkit.entity.Hanging) ((HangingEntity) object).getBukkitEntity(), who, blockClicked, blockFace, hand, org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack));
++                    world.getCraftServer().getPluginManager().callEvent(event);
++
++                    if (event.isCancelled()) {
++                        return InteractionResult.FAIL;
++                    }
++                    // CraftBukkit end
+                     ((HangingEntity) object).playPlacementSound();
+                     world.gameEvent((Entity) entityhuman, (Holder) GameEvent.ENTITY_PLACE, ((HangingEntity) object).position());
+                     world.addFreshEntity((Entity) object);
+@@ -88,7 +105,7 @@
+         }
+     }
+ 
+-    protected boolean mayPlace(Player player, Direction side, ItemStack stack, BlockPos pos) {
++    protected boolean mayPlace(net.minecraft.world.entity.player.Player player, Direction side, ItemStack stack, BlockPos pos) {
+         return !side.getAxis().isVertical() && player.mayUseItemAt(pos, side, stack);
+     }
+ 
+@@ -102,7 +119,7 @@
+ 
+             if (!customdata.isEmpty()) {
+                 customdata.read(holderlookup_a.createSerializationContext(NbtOps.INSTANCE), Painting.VARIANT_MAP_CODEC).result().ifPresentOrElse((holder) -> {
+-                    Optional optional = ((PaintingVariant) holder.value()).title();
++                    Optional<Component> optional = ((PaintingVariant) holder.value()).title(); // CraftBukkit - decompile error
+ 
+                     Objects.requireNonNull(tooltip);
+                     optional.ifPresent(tooltip::add);
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemArmorStand.patch b/paper-server/patches/sources/net/minecraft/world/item/ItemArmorStand.patch
deleted file mode 100644
index 6069029c14..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/ItemArmorStand.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/net/minecraft/world/item/ItemArmorStand.java
-+++ b/net/minecraft/world/item/ItemArmorStand.java
-@@ -53,6 +53,11 @@
-                     float f = (float) MathHelper.floor((MathHelper.wrapDegrees(itemactioncontext.getRotation() - 180.0F) + 22.5F) / 45.0F) * 45.0F;
- 
-                     entityarmorstand.moveTo(entityarmorstand.getX(), entityarmorstand.getY(), entityarmorstand.getZ(), f, 0.0F);
-+                    // CraftBukkit start
-+                    if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPlaceEvent(itemactioncontext, entityarmorstand).isCancelled()) {
-+                        return EnumInteractionResult.FAIL;
-+                    }
-+                    // CraftBukkit end
-                     worldserver.addFreshEntityWithPassengers(entityarmorstand);
-                     world.playSound((EntityHuman) null, entityarmorstand.getX(), entityarmorstand.getY(), entityarmorstand.getZ(), SoundEffects.ARMOR_STAND_PLACE, SoundCategory.BLOCKS, 0.75F, 0.8F);
-                     entityarmorstand.gameEvent(GameEvent.ENTITY_PLACE, itemactioncontext.getPlayer());
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemBlock.patch b/paper-server/patches/sources/net/minecraft/world/item/ItemBlock.patch
deleted file mode 100644
index 9669523947..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/ItemBlock.patch
+++ /dev/null
@@ -1,75 +0,0 @@
---- a/net/minecraft/world/item/ItemBlock.java
-+++ b/net/minecraft/world/item/ItemBlock.java
-@@ -32,6 +32,13 @@
- import net.minecraft.world.level.gameevent.GameEvent;
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- 
-+// CraftBukkit start
-+import net.minecraft.server.level.WorldServer;
-+import org.bukkit.craftbukkit.block.CraftBlock;
-+import org.bukkit.craftbukkit.block.data.CraftBlockData;
-+import org.bukkit.event.block.BlockCanBuildEvent;
-+// CraftBukkit end
-+
- public class ItemBlock extends Item {
- 
-     /** @deprecated */
-@@ -62,6 +69,12 @@
-                 return EnumInteractionResult.FAIL;
-             } else {
-                 IBlockData iblockdata = this.getPlacementState(blockactioncontext1);
-+                // CraftBukkit start - special case for handling block placement with water lilies and snow buckets
-+                org.bukkit.block.BlockState blockstate = null;
-+                if (this instanceof PlaceOnWaterBlockItem || this instanceof SolidBucketItem) {
-+                    blockstate = org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(blockactioncontext1.getLevel(), blockactioncontext1.getClickedPos());
-+                }
-+                // CraftBukkit end
- 
-                 if (iblockdata == null) {
-                     return EnumInteractionResult.FAIL;
-@@ -79,6 +92,19 @@
-                         this.updateCustomBlockEntityTag(blockposition, world, entityhuman, itemstack, iblockdata1);
-                         updateBlockEntityComponents(world, blockposition, itemstack);
-                         iblockdata1.getBlock().setPlacedBy(world, blockposition, iblockdata1, entityhuman, itemstack);
-+                        // CraftBukkit start
-+                        if (blockstate != null) {
-+                            org.bukkit.event.block.BlockPlaceEvent placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPlaceEvent((WorldServer) world, entityhuman, blockactioncontext1.getHand(), blockstate, blockposition.getX(), blockposition.getY(), blockposition.getZ());
-+                            if (placeEvent != null && (placeEvent.isCancelled() || !placeEvent.canBuild())) {
-+                                blockstate.update(true, false);
-+
-+                                if (this instanceof SolidBucketItem) {
-+                                    ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541
-+                                }
-+                                return EnumInteractionResult.FAIL;
-+                            }
-+                        }
-+                        // CraftBukkit end
-                         if (entityhuman instanceof EntityPlayer) {
-                             CriterionTriggers.PLACED_BLOCK.trigger((EntityPlayer) entityhuman, blockposition, itemstack);
-                         }
-@@ -86,7 +112,7 @@
- 
-                     SoundEffectType soundeffecttype = iblockdata1.getSoundType();
- 
--                    world.playSound(entityhuman, blockposition, this.getPlaceSound(iblockdata1), SoundCategory.BLOCKS, (soundeffecttype.getVolume() + 1.0F) / 2.0F, soundeffecttype.getPitch() * 0.8F);
-+                    // world.playSound(entityhuman, blockposition, this.getPlaceSound(iblockdata1), SoundCategory.BLOCKS, (soundeffecttype.getVolume() + 1.0F) / 2.0F, soundeffecttype.getPitch() * 0.8F);
-                     world.gameEvent((Holder) GameEvent.BLOCK_PLACE, blockposition, GameEvent.a.of(entityhuman, iblockdata1));
-                     itemstack.consume(1, entityhuman);
-                     return EnumInteractionResult.SUCCESS;
-@@ -144,8 +170,15 @@
-     protected boolean canPlace(BlockActionContext blockactioncontext, IBlockData iblockdata) {
-         EntityHuman entityhuman = blockactioncontext.getPlayer();
-         VoxelShapeCollision voxelshapecollision = entityhuman == null ? VoxelShapeCollision.empty() : VoxelShapeCollision.of(entityhuman);
-+        // CraftBukkit start - store default return
-+        boolean defaultReturn = (!this.mustSurvive() || iblockdata.canSurvive(blockactioncontext.getLevel(), blockactioncontext.getClickedPos())) && blockactioncontext.getLevel().isUnobstructed(iblockdata, blockactioncontext.getClickedPos(), voxelshapecollision);
-+        org.bukkit.entity.Player player = (blockactioncontext.getPlayer() instanceof EntityPlayer) ? (org.bukkit.entity.Player) blockactioncontext.getPlayer().getBukkitEntity() : null;
- 
--        return (!this.mustSurvive() || iblockdata.canSurvive(blockactioncontext.getLevel(), blockactioncontext.getClickedPos())) && blockactioncontext.getLevel().isUnobstructed(iblockdata, blockactioncontext.getClickedPos(), voxelshapecollision);
-+        BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(blockactioncontext.getLevel(), blockactioncontext.getClickedPos()), player, CraftBlockData.fromData(iblockdata), defaultReturn);
-+        blockactioncontext.getLevel().getCraftServer().getPluginManager().callEvent(event);
-+
-+        return event.isBuildable();
-+        // CraftBukkit end
-     }
- 
-     protected boolean mustSurvive() {
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemBlockWallable.patch b/paper-server/patches/sources/net/minecraft/world/item/ItemBlockWallable.patch
deleted file mode 100644
index f1eec80670..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/ItemBlockWallable.patch
+++ /dev/null
@@ -1,36 +0,0 @@
---- a/net/minecraft/world/item/ItemBlockWallable.java
-+++ b/net/minecraft/world/item/ItemBlockWallable.java
-@@ -10,6 +10,12 @@
- import net.minecraft.world.level.block.Block;
- import net.minecraft.world.level.block.state.IBlockData;
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
-+// CraftBukkit start
-+import net.minecraft.server.level.EntityPlayer;
-+import org.bukkit.craftbukkit.block.CraftBlock;
-+import org.bukkit.craftbukkit.block.data.CraftBlockData;
-+import org.bukkit.event.block.BlockCanBuildEvent;
-+// CraftBukkit end
- 
- public class ItemBlockWallable extends ItemBlock {
- 
-@@ -49,7 +55,19 @@
-             }
-         }
- 
--        return iblockdata1 != null && world.isUnobstructed(iblockdata1, blockposition, VoxelShapeCollision.empty()) ? iblockdata1 : null;
-+        // CraftBukkit start
-+        if (iblockdata1 != null) {
-+            boolean defaultReturn = world.isUnobstructed(iblockdata1, blockposition, VoxelShapeCollision.empty());
-+            org.bukkit.entity.Player player = (blockactioncontext.getPlayer() instanceof EntityPlayer) ? (org.bukkit.entity.Player) blockactioncontext.getPlayer().getBukkitEntity() : null;
-+
-+            BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(world, blockposition), player, CraftBlockData.fromData(iblockdata1), defaultReturn);
-+            blockactioncontext.getLevel().getCraftServer().getPluginManager().callEvent(event);
-+
-+            return (event.isBuildable()) ? iblockdata1 : null;
-+        } else {
-+            return null;
-+        }
-+        // CraftBukkit end
-     }
- 
-     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemBoat.patch b/paper-server/patches/sources/net/minecraft/world/item/ItemBoat.patch
deleted file mode 100644
index 5ab0387a04..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/ItemBoat.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- a/net/minecraft/world/item/ItemBoat.java
-+++ b/net/minecraft/world/item/ItemBoat.java
-@@ -58,6 +58,13 @@
-             }
- 
-             if (movingobjectpositionblock.getType() == MovingObjectPosition.EnumMovingObjectType.BLOCK) {
-+                // CraftBukkit start - Boat placement
-+                org.bukkit.event.player.PlayerInteractEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(entityhuman, org.bukkit.event.block.Action.RIGHT_CLICK_BLOCK, movingobjectpositionblock.getBlockPos(), movingobjectpositionblock.getDirection(), itemstack, false, enumhand, movingobjectpositionblock.getLocation());
-+
-+                if (event.isCancelled()) {
-+                    return EnumInteractionResult.PASS;
-+                }
-+                // CraftBukkit end
-                 AbstractBoat abstractboat = this.getBoat(world, movingobjectpositionblock, itemstack, entityhuman);
- 
-                 if (abstractboat == null) {
-@@ -68,7 +75,15 @@
-                         return EnumInteractionResult.FAIL;
-                     } else {
-                         if (!world.isClientSide) {
--                            world.addFreshEntity(abstractboat);
-+                            // CraftBukkit start
-+                            if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPlaceEvent(world, movingobjectpositionblock.getBlockPos(), movingobjectpositionblock.getDirection(), entityhuman, abstractboat, enumhand).isCancelled()) {
-+                                return EnumInteractionResult.FAIL;
-+                            }
-+
-+                            if (!world.addFreshEntity(abstractboat)) {
-+                                return EnumInteractionResult.PASS;
-+                            }
-+                            // CraftBukkit end
-                             world.gameEvent((Entity) entityhuman, (Holder) GameEvent.ENTITY_PLACE, movingobjectpositionblock.getLocation());
-                             itemstack.consume(1, entityhuman);
-                         }
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemBoneMeal.patch b/paper-server/patches/sources/net/minecraft/world/item/ItemBoneMeal.patch
deleted file mode 100644
index f658c4a4e6..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/ItemBoneMeal.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- a/net/minecraft/world/item/ItemBoneMeal.java
-+++ b/net/minecraft/world/item/ItemBoneMeal.java
-@@ -35,13 +35,19 @@
- 
-     @Override
-     public EnumInteractionResult useOn(ItemActionContext itemactioncontext) {
-+        // CraftBukkit start - extract bonemeal application logic to separate, static method
-+        return applyBonemeal(itemactioncontext);
-+    }
-+
-+    public static EnumInteractionResult applyBonemeal(ItemActionContext itemactioncontext) {
-+        // CraftBukkit end
-         World world = itemactioncontext.getLevel();
-         BlockPosition blockposition = itemactioncontext.getClickedPos();
-         BlockPosition blockposition1 = blockposition.relative(itemactioncontext.getClickedFace());
- 
-         if (growCrop(itemactioncontext.getItemInHand(), world, blockposition)) {
-             if (!world.isClientSide) {
--                itemactioncontext.getPlayer().gameEvent(GameEvent.ITEM_INTERACT_FINISH);
-+                if (itemactioncontext.getPlayer() != null) itemactioncontext.getPlayer().gameEvent(GameEvent.ITEM_INTERACT_FINISH); // CraftBukkit - SPIGOT-7518
-                 world.levelEvent(1505, blockposition, 15);
-             }
- 
-@@ -52,7 +58,7 @@
- 
-             if (flag && growWaterPlant(itemactioncontext.getItemInHand(), world, blockposition1, itemactioncontext.getClickedFace())) {
-                 if (!world.isClientSide) {
--                    itemactioncontext.getPlayer().gameEvent(GameEvent.ITEM_INTERACT_FINISH);
-+                    if (itemactioncontext.getPlayer() != null) itemactioncontext.getPlayer().gameEvent(GameEvent.ITEM_INTERACT_FINISH); // CraftBukkit - SPIGOT-7518
-                     world.levelEvent(1505, blockposition1, 15);
-                 }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemBucket.patch b/paper-server/patches/sources/net/minecraft/world/item/ItemBucket.patch
deleted file mode 100644
index 63994725b4..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/ItemBucket.patch
+++ /dev/null
@@ -1,88 +0,0 @@
---- a/net/minecraft/world/item/ItemBucket.java
-+++ b/net/minecraft/world/item/ItemBucket.java
-@@ -30,6 +30,16 @@
- import net.minecraft.world.phys.MovingObjectPosition;
- import net.minecraft.world.phys.MovingObjectPositionBlock;
- 
-+// CraftBukkit start
-+import net.minecraft.network.protocol.game.PacketPlayOutBlockChange;
-+import net.minecraft.server.level.WorldServer;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.craftbukkit.inventory.CraftItemStack;
-+import org.bukkit.craftbukkit.util.DummyGeneratorAccess;
-+import org.bukkit.event.player.PlayerBucketEmptyEvent;
-+import org.bukkit.event.player.PlayerBucketFillEvent;
-+// CraftBukkit end
-+
- public class ItemBucket extends Item implements DispensibleContainerItem {
- 
-     public final FluidType content;
-@@ -63,6 +73,17 @@
- 
-                     if (block instanceof IFluidSource) {
-                         IFluidSource ifluidsource = (IFluidSource) block;
-+                        // CraftBukkit start
-+                        ItemStack dummyFluid = ifluidsource.pickupBlock(entityhuman, DummyGeneratorAccess.INSTANCE, blockposition, iblockdata);
-+                        if (dummyFluid.isEmpty()) return EnumInteractionResult.FAIL; // Don't fire event if the bucket won't be filled.
-+                        PlayerBucketFillEvent event = CraftEventFactory.callPlayerBucketFillEvent((WorldServer) world, entityhuman, blockposition, blockposition, movingobjectpositionblock.getDirection(), itemstack, dummyFluid.getItem(), enumhand);
-+
-+                        if (event.isCancelled()) {
-+                            ((EntityPlayer) entityhuman).connection.send(new PacketPlayOutBlockChange(world, blockposition)); // SPIGOT-5163 (see PlayerInteractManager)
-+                            ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541
-+                            return EnumInteractionResult.FAIL;
-+                        }
-+                        // CraftBukkit end
- 
-                         itemstack1 = ifluidsource.pickupBlock(entityhuman, world, blockposition, iblockdata);
-                         if (!itemstack1.isEmpty()) {
-@@ -71,7 +92,7 @@
-                                 entityhuman.playSound(soundeffect, 1.0F, 1.0F);
-                             });
-                             world.gameEvent((Entity) entityhuman, (Holder) GameEvent.FLUID_PICKUP, blockposition);
--                            ItemStack itemstack2 = ItemLiquidUtil.createFilledResult(itemstack, entityhuman, itemstack1);
-+                            ItemStack itemstack2 = ItemLiquidUtil.createFilledResult(itemstack, entityhuman, CraftItemStack.asNMSCopy(event.getItemStack())); // CraftBukkit
- 
-                             if (!world.isClientSide) {
-                                 CriterionTriggers.FILLED_BUCKET.trigger((EntityPlayer) entityhuman, itemstack1);
-@@ -86,7 +107,7 @@
-                     iblockdata = world.getBlockState(blockposition);
-                     BlockPosition blockposition2 = iblockdata.getBlock() instanceof IFluidContainer && this.content == FluidTypes.WATER ? blockposition : blockposition1;
- 
--                    if (this.emptyContents(entityhuman, world, blockposition2, movingobjectpositionblock)) {
-+                    if (this.emptyContents(entityhuman, world, blockposition2, movingobjectpositionblock, movingobjectpositionblock.getDirection(), blockposition, itemstack, enumhand)) { // CraftBukkit
-                         this.checkExtraContent(entityhuman, world, itemstack, blockposition2);
-                         if (entityhuman instanceof EntityPlayer) {
-                             CriterionTriggers.PLACED_BLOCK.trigger((EntityPlayer) entityhuman, blockposition2, itemstack);
-@@ -114,6 +135,12 @@
- 
-     @Override
-     public boolean emptyContents(@Nullable EntityHuman entityhuman, World world, BlockPosition blockposition, @Nullable MovingObjectPositionBlock movingobjectpositionblock) {
-+        // CraftBukkit start
-+        return emptyContents(entityhuman, world, blockposition, movingobjectpositionblock, null, null, null, EnumHand.MAIN_HAND);
-+    }
-+
-+    public boolean emptyContents(EntityHuman entityhuman, World world, BlockPosition blockposition, @Nullable MovingObjectPositionBlock movingobjectpositionblock, EnumDirection enumdirection, BlockPosition clicked, ItemStack itemstack, EnumHand enumhand) {
-+        // CraftBukkit end
-         FluidType fluidtype = this.content;
- 
-         if (!(fluidtype instanceof FluidTypeFlowing fluidtypeflowing)) {
-@@ -149,8 +176,18 @@
- 
-             boolean flag2 = flag1;
- 
-+            // CraftBukkit start
-+            if (flag2 && entityhuman != null) {
-+                PlayerBucketEmptyEvent event = CraftEventFactory.callPlayerBucketEmptyEvent((WorldServer) world, entityhuman, blockposition, clicked, enumdirection, itemstack, enumhand);
-+                if (event.isCancelled()) {
-+                    ((EntityPlayer) entityhuman).connection.send(new PacketPlayOutBlockChange(world, blockposition)); // SPIGOT-4238: needed when looking through entity
-+                    ((EntityPlayer) entityhuman).getBukkitEntity().updateInventory(); // SPIGOT-4541
-+                    return false;
-+                }
-+            }
-+            // CraftBukkit end
-             if (!flag2) {
--                return movingobjectpositionblock != null && this.emptyContents(entityhuman, world, movingobjectpositionblock.getBlockPos().relative(movingobjectpositionblock.getDirection()), (MovingObjectPositionBlock) null);
-+                return movingobjectpositionblock != null && this.emptyContents(entityhuman, world, movingobjectpositionblock.getBlockPos().relative(movingobjectpositionblock.getDirection()), (MovingObjectPositionBlock) null, enumdirection, clicked, itemstack, enumhand); // CraftBukkit
-             } else if (world.dimensionType().ultraWarm() && this.content.is(TagsFluid.WATER)) {
-                 int i = blockposition.getX();
-                 int j = blockposition.getY();
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemDebugStick.patch b/paper-server/patches/sources/net/minecraft/world/item/ItemDebugStick.patch
deleted file mode 100644
index d871cc165f..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/ItemDebugStick.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/net/minecraft/world/item/ItemDebugStick.java
-+++ b/net/minecraft/world/item/ItemDebugStick.java
-@@ -1,3 +1,4 @@
-+// mc-dev import
- package net.minecraft.world.item;
- 
- import java.util.Collection;
-@@ -92,7 +93,7 @@
-     }
- 
-     private static <T extends Comparable<T>> IBlockData cycleState(IBlockData iblockdata, IBlockState<T> iblockstate, boolean flag) {
--        return (IBlockData) iblockdata.setValue(iblockstate, (Comparable) getRelative(iblockstate.getPossibleValues(), iblockdata.getValue(iblockstate), flag));
-+        return (IBlockData) iblockdata.setValue(iblockstate, getRelative(iblockstate.getPossibleValues(), iblockdata.getValue(iblockstate), flag)); // CraftBukkit - decompile error
-     }
- 
-     private static <T> T getRelative(Iterable<T> iterable, @Nullable T t0, boolean flag) {
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemDye.patch b/paper-server/patches/sources/net/minecraft/world/item/ItemDye.patch
deleted file mode 100644
index 41737c92c6..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/ItemDye.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/net/minecraft/world/item/ItemDye.java
-+++ b/net/minecraft/world/item/ItemDye.java
-@@ -13,6 +13,8 @@
- import net.minecraft.world.level.World;
- import net.minecraft.world.level.block.entity.TileEntitySign;
- 
-+import org.bukkit.event.entity.SheepDyeWoolEvent; // CraftBukkit
-+
- public class ItemDye extends Item implements SignApplicator {
- 
-     private static final Map<EnumColor, ItemDye> ITEM_BY_COLOR = Maps.newEnumMap(EnumColor.class);
-@@ -30,7 +32,17 @@
-             if (entitysheep.isAlive() && !entitysheep.isSheared() && entitysheep.getColor() != this.dyeColor) {
-                 entitysheep.level().playSound(entityhuman, (Entity) entitysheep, SoundEffects.DYE_USE, SoundCategory.PLAYERS, 1.0F, 1.0F);
-                 if (!entityhuman.level().isClientSide) {
--                    entitysheep.setColor(this.dyeColor);
-+                    // CraftBukkit start
-+                    byte bColor = (byte) this.dyeColor.getId();
-+                    SheepDyeWoolEvent event = new SheepDyeWoolEvent((org.bukkit.entity.Sheep) entitysheep.getBukkitEntity(), org.bukkit.DyeColor.getByWoolData(bColor), (org.bukkit.entity.Player) entityhuman.getBukkitEntity());
-+                    entitysheep.level().getCraftServer().getPluginManager().callEvent(event);
-+
-+                    if (event.isCancelled()) {
-+                        return EnumInteractionResult.PASS;
-+                    }
-+
-+                    entitysheep.setColor(EnumColor.byId((byte) event.getColor().getWoolData()));
-+                    // CraftBukkit end
-                     itemstack.shrink(1);
-                 }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemEgg.patch b/paper-server/patches/sources/net/minecraft/world/item/ItemEgg.patch
deleted file mode 100644
index 29a269378f..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/ItemEgg.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/net/minecraft/world/item/ItemEgg.java
-+++ b/net/minecraft/world/item/ItemEgg.java
-@@ -25,10 +25,18 @@
-     public EnumInteractionResult use(World world, EntityHuman entityhuman, EnumHand enumhand) {
-         ItemStack itemstack = entityhuman.getItemInHand(enumhand);
- 
--        world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.EGG_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
-+        // world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.EGG_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F)); // CraftBukkit - moved down
-         if (world instanceof WorldServer worldserver) {
--            IProjectile.spawnProjectileFromRotation(EntityEgg::new, worldserver, itemstack, entityhuman, 0.0F, ItemEgg.PROJECTILE_SHOOT_POWER, 1.0F);
-+            // CraftBukkit start
-+            if (IProjectile.spawnProjectileFromRotation(EntityEgg::new, worldserver, itemstack, entityhuman, 0.0F, ItemEgg.PROJECTILE_SHOOT_POWER, 1.0F).isRemoved()) {
-+                if (entityhuman instanceof net.minecraft.server.level.EntityPlayer) {
-+                    ((net.minecraft.server.level.EntityPlayer) entityhuman).getBukkitEntity().updateInventory();
-+                }
-+                return EnumInteractionResult.FAIL;
-+            }
-+            // CraftBukkit end
-         }
-+        world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.EGG_THROW, SoundCategory.PLAYERS, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
- 
-         entityhuman.awardStat(StatisticList.ITEM_USED.get(this));
-         itemstack.consume(1, entityhuman);
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemEndCrystal.patch b/paper-server/patches/sources/net/minecraft/world/item/ItemEndCrystal.patch
deleted file mode 100644
index 0981092fb3..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/ItemEndCrystal.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/net/minecraft/world/item/ItemEndCrystal.java
-+++ b/net/minecraft/world/item/ItemEndCrystal.java
-@@ -47,6 +47,11 @@
-                         EntityEnderCrystal entityendercrystal = new EntityEnderCrystal(world, d0 + 0.5D, d1, d2 + 0.5D);
- 
-                         entityendercrystal.setShowBottom(false);
-+                        // CraftBukkit start
-+                        if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPlaceEvent(itemactioncontext, entityendercrystal).isCancelled()) {
-+                            return EnumInteractionResult.FAIL;
-+                        }
-+                        // CraftBukkit end
-                         world.addFreshEntity(entityendercrystal);
-                         world.gameEvent((Entity) itemactioncontext.getPlayer(), (Holder) GameEvent.ENTITY_PLACE, blockposition1);
-                         EnderDragonBattle enderdragonbattle = ((WorldServer) world).getDragonFight();
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemEnderPearl.patch b/paper-server/patches/sources/net/minecraft/world/item/ItemEnderPearl.patch
deleted file mode 100644
index 32f38cf3cc..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/ItemEnderPearl.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/net/minecraft/world/item/ItemEnderPearl.java
-+++ b/net/minecraft/world/item/ItemEnderPearl.java
-@@ -23,10 +23,17 @@
-     public EnumInteractionResult use(World world, EntityHuman entityhuman, EnumHand enumhand) {
-         ItemStack itemstack = entityhuman.getItemInHand(enumhand);
- 
--        world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.ENDER_PEARL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
-         if (world instanceof WorldServer worldserver) {
--            IProjectile.spawnProjectileFromRotation(EntityEnderPearl::new, worldserver, itemstack, entityhuman, 0.0F, ItemEnderPearl.PROJECTILE_SHOOT_POWER, 1.0F);
-+            // CraftBukkit start
-+            if (IProjectile.spawnProjectileFromRotation(EntityEnderPearl::new, worldserver, itemstack, entityhuman, 0.0F, ItemEnderPearl.PROJECTILE_SHOOT_POWER, 1.0F).isRemoved()) {
-+                if (entityhuman instanceof net.minecraft.server.level.EntityPlayer) {
-+                    ((net.minecraft.server.level.EntityPlayer) entityhuman).getBukkitEntity().updateInventory();
-+                }
-+                return EnumInteractionResult.FAIL;
-+            }
-         }
-+        world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.ENDER_PEARL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
-+        // CraftBukkit end
- 
-         entityhuman.awardStat(StatisticList.ITEM_USED.get(this));
-         itemstack.consume(1, entityhuman);
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemFireball.patch b/paper-server/patches/sources/net/minecraft/world/item/ItemFireball.patch
deleted file mode 100644
index 5244137025..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/ItemFireball.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- a/net/minecraft/world/item/ItemFireball.java
-+++ b/net/minecraft/world/item/ItemFireball.java
-@@ -40,12 +40,28 @@
-         if (!BlockCampfire.canLight(iblockdata) && !CandleBlock.canLight(iblockdata) && !CandleCakeBlock.canLight(iblockdata)) {
-             blockposition = blockposition.relative(itemactioncontext.getClickedFace());
-             if (BlockFireAbstract.canBePlacedAt(world, blockposition, itemactioncontext.getHorizontalDirection())) {
-+                // CraftBukkit start - fire BlockIgniteEvent
-+                if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, blockposition, org.bukkit.event.block.BlockIgniteEvent.IgniteCause.FIREBALL, itemactioncontext.getPlayer()).isCancelled()) {
-+                    if (!itemactioncontext.getPlayer().getAbilities().instabuild) {
-+                        itemactioncontext.getItemInHand().shrink(1);
-+                    }
-+                    return EnumInteractionResult.PASS;
-+                }
-+                // CraftBukkit end
-                 this.playSound(world, blockposition);
-                 world.setBlockAndUpdate(blockposition, BlockFireAbstract.getState(world, blockposition));
-                 world.gameEvent((Entity) itemactioncontext.getPlayer(), (Holder) GameEvent.BLOCK_PLACE, blockposition);
-                 flag = true;
-             }
-         } else {
-+            // CraftBukkit start - fire BlockIgniteEvent
-+            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, blockposition, org.bukkit.event.block.BlockIgniteEvent.IgniteCause.FIREBALL, itemactioncontext.getPlayer()).isCancelled()) {
-+                if (!itemactioncontext.getPlayer().getAbilities().instabuild) {
-+                    itemactioncontext.getItemInHand().shrink(1);
-+                }
-+                return EnumInteractionResult.PASS;
-+            }
-+            // CraftBukkit end
-             this.playSound(world, blockposition);
-             world.setBlockAndUpdate(blockposition, (IBlockData) iblockdata.setValue(BlockProperties.LIT, true));
-             world.gameEvent((Entity) itemactioncontext.getPlayer(), (Holder) GameEvent.BLOCK_CHANGE, blockposition);
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemFishingRod.patch b/paper-server/patches/sources/net/minecraft/world/item/ItemFishingRod.patch
deleted file mode 100644
index e75d434c7a..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/ItemFishingRod.patch
+++ /dev/null
@@ -1,41 +0,0 @@
---- a/net/minecraft/world/item/ItemFishingRod.java
-+++ b/net/minecraft/world/item/ItemFishingRod.java
-@@ -14,6 +14,11 @@
- import net.minecraft.world.level.World;
- import net.minecraft.world.level.gameevent.GameEvent;
- 
-+// CraftBukkit start
-+import org.bukkit.event.player.PlayerFishEvent;
-+import org.bukkit.craftbukkit.CraftEquipmentSlot;
-+// CraftBukkit end
-+
- public class ItemFishingRod extends Item {
- 
-     public ItemFishingRod(Item.Info item_info) {
-@@ -34,13 +39,24 @@
-             world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.FISHING_BOBBER_RETRIEVE, SoundCategory.NEUTRAL, 1.0F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
-             entityhuman.gameEvent(GameEvent.ITEM_INTERACT_FINISH);
-         } else {
--            world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.FISHING_BOBBER_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
-+            // world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.FISHING_BOBBER_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
-             if (world instanceof WorldServer) {
-                 WorldServer worldserver = (WorldServer) world;
-                 int j = (int) (EnchantmentManager.getFishingTimeReduction(worldserver, itemstack, entityhuman) * 20.0F);
-                 int k = EnchantmentManager.getFishingLuckBonus(worldserver, itemstack, entityhuman);
- 
--                IProjectile.spawnProjectile(new EntityFishingHook(entityhuman, world, k, j), worldserver, itemstack);
-+                // CraftBukkit start
-+                EntityFishingHook entityfishinghook = new EntityFishingHook(entityhuman, world, k, j);
-+                PlayerFishEvent playerFishEvent = new PlayerFishEvent((org.bukkit.entity.Player) entityhuman.getBukkitEntity(), null, (org.bukkit.entity.FishHook) entityfishinghook.getBukkitEntity(), CraftEquipmentSlot.getHand(enumhand), PlayerFishEvent.State.FISHING);
-+                world.getCraftServer().getPluginManager().callEvent(playerFishEvent);
-+
-+                if (playerFishEvent.isCancelled()) {
-+                    entityhuman.fishing = null;
-+                    return EnumInteractionResult.PASS;
-+                }
-+                world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.FISHING_BOBBER_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
-+                IProjectile.spawnProjectile(entityfishinghook, worldserver, itemstack);
-+                // CraftBukkit end
-             }
- 
-             entityhuman.awardStat(StatisticList.ITEM_USED.get(this));
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemFlintAndSteel.patch b/paper-server/patches/sources/net/minecraft/world/item/ItemFlintAndSteel.patch
deleted file mode 100644
index 2c70693655..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/ItemFlintAndSteel.patch
+++ /dev/null
@@ -1,28 +0,0 @@
---- a/net/minecraft/world/item/ItemFlintAndSteel.java
-+++ b/net/minecraft/world/item/ItemFlintAndSteel.java
-@@ -37,6 +37,12 @@
-             BlockPosition blockposition1 = blockposition.relative(itemactioncontext.getClickedFace());
- 
-             if (BlockFireAbstract.canBePlacedAt(world, blockposition1, itemactioncontext.getHorizontalDirection())) {
-+                // CraftBukkit start - Store the clicked block
-+                if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, blockposition1, org.bukkit.event.block.BlockIgniteEvent.IgniteCause.FLINT_AND_STEEL, entityhuman).isCancelled()) {
-+                    itemactioncontext.getItemInHand().hurtAndBreak(1, entityhuman, EntityLiving.getSlotForHand(itemactioncontext.getHand()));
-+                    return EnumInteractionResult.PASS;
-+                }
-+                // CraftBukkit end
-                 world.playSound(entityhuman, blockposition1, SoundEffects.FLINTANDSTEEL_USE, SoundCategory.BLOCKS, 1.0F, world.getRandom().nextFloat() * 0.4F + 0.8F);
-                 IBlockData iblockdata1 = BlockFireAbstract.getState(world, blockposition1);
- 
-@@ -54,6 +60,12 @@
-                 return EnumInteractionResult.FAIL;
-             }
-         } else {
-+            // CraftBukkit start - Store the clicked block
-+            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, blockposition, org.bukkit.event.block.BlockIgniteEvent.IgniteCause.FLINT_AND_STEEL, entityhuman).isCancelled()) {
-+                itemactioncontext.getItemInHand().hurtAndBreak(1, entityhuman, EntityLiving.getSlotForHand(itemactioncontext.getHand()));
-+                return EnumInteractionResult.PASS;
-+            }
-+            // CraftBukkit end
-             world.playSound(entityhuman, blockposition, SoundEffects.FLINTANDSTEEL_USE, SoundCategory.BLOCKS, 1.0F, world.getRandom().nextFloat() * 0.4F + 0.8F);
-             world.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockProperties.LIT, true), 11);
-             world.gameEvent((Entity) entityhuman, (Holder) GameEvent.BLOCK_CHANGE, blockposition);
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemHanging.patch b/paper-server/patches/sources/net/minecraft/world/item/ItemHanging.patch
deleted file mode 100644
index 5dcb4a2844..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/ItemHanging.patch
+++ /dev/null
@@ -1,43 +0,0 @@
---- a/net/minecraft/world/item/ItemHanging.java
-+++ b/net/minecraft/world/item/ItemHanging.java
-@@ -25,6 +25,11 @@
- import net.minecraft.world.level.World;
- import net.minecraft.world.level.gameevent.GameEvent;
- 
-+// CraftBukkit start
-+import org.bukkit.entity.Player;
-+import org.bukkit.event.hanging.HangingPlaceEvent;
-+// CraftBukkit end
-+
- public class ItemHanging extends Item {
- 
-     private static final IChatBaseComponent TOOLTIP_RANDOM_VARIANT = IChatBaseComponent.translatable("painting.random").withStyle(EnumChatFormat.GRAY);
-@@ -75,6 +80,19 @@
- 
-             if (((EntityHanging) object).survives()) {
-                 if (!world.isClientSide) {
-+                    // CraftBukkit start - fire HangingPlaceEvent
-+                    Player who = (itemactioncontext.getPlayer() == null) ? null : (Player) itemactioncontext.getPlayer().getBukkitEntity();
-+                    org.bukkit.block.Block blockClicked = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
-+                    org.bukkit.block.BlockFace blockFace = org.bukkit.craftbukkit.block.CraftBlock.notchToBlockFace(enumdirection);
-+                    org.bukkit.inventory.EquipmentSlot hand = org.bukkit.craftbukkit.CraftEquipmentSlot.getHand(itemactioncontext.getHand());
-+
-+                    HangingPlaceEvent event = new HangingPlaceEvent((org.bukkit.entity.Hanging) ((EntityHanging) object).getBukkitEntity(), who, blockClicked, blockFace, hand, org.bukkit.craftbukkit.inventory.CraftItemStack.asBukkitCopy(itemstack));
-+                    world.getCraftServer().getPluginManager().callEvent(event);
-+
-+                    if (event.isCancelled()) {
-+                        return EnumInteractionResult.FAIL;
-+                    }
-+                    // CraftBukkit end
-                     ((EntityHanging) object).playPlacementSound();
-                     world.gameEvent((Entity) entityhuman, (Holder) GameEvent.ENTITY_PLACE, ((EntityHanging) object).position());
-                     world.addFreshEntity((Entity) object);
-@@ -102,7 +120,7 @@
- 
-             if (!customdata.isEmpty()) {
-                 customdata.read(holderlookup_a.createSerializationContext(DynamicOpsNBT.INSTANCE), EntityPainting.VARIANT_MAP_CODEC).result().ifPresentOrElse((holder) -> {
--                    Optional optional = ((PaintingVariant) holder.value()).title();
-+                    Optional<IChatBaseComponent> optional = ((PaintingVariant) holder.value()).title(); // CraftBukkit - decompile error
- 
-                     Objects.requireNonNull(list);
-                     optional.ifPresent(list::add);
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemMinecart.patch b/paper-server/patches/sources/net/minecraft/world/item/ItemMinecart.patch
deleted file mode 100644
index f5a66c7ae4..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/ItemMinecart.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/net/minecraft/world/item/ItemMinecart.java
-+++ b/net/minecraft/world/item/ItemMinecart.java
-@@ -67,7 +67,12 @@
-                 if (world instanceof WorldServer) {
-                     WorldServer worldserver = (WorldServer) world;
- 
--                    worldserver.addFreshEntity(entityminecartabstract);
-+                    // CraftBukkit start
-+                    if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPlaceEvent(itemactioncontext, entityminecartabstract).isCancelled()) {
-+                        return EnumInteractionResult.FAIL;
-+                    }
-+                    // CraftBukkit end
-+                    if (!worldserver.addFreshEntity(entityminecartabstract)) return EnumInteractionResult.PASS; // CraftBukkit
-                     worldserver.gameEvent((Holder) GameEvent.ENTITY_PLACE, blockposition, GameEvent.a.of(itemactioncontext.getPlayer(), worldserver.getBlockState(blockposition.below())));
-                 }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemMonsterEgg.patch b/paper-server/patches/sources/net/minecraft/world/item/ItemMonsterEgg.patch
deleted file mode 100644
index c76355cfd4..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/ItemMonsterEgg.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/net/minecraft/world/item/ItemMonsterEgg.java
-+++ b/net/minecraft/world/item/ItemMonsterEgg.java
-@@ -176,10 +176,10 @@
-                     return Optional.empty();
-                 } else {
-                     ((EntityInsentient) object).moveTo(vec3d.x(), vec3d.y(), vec3d.z(), 0.0F, 0.0F);
--                    worldserver.addFreshEntityWithPassengers((Entity) object);
-+                    worldserver.addFreshEntityWithPassengers((Entity) object, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG); // CraftBukkit
-                     ((EntityInsentient) object).setCustomName((IChatBaseComponent) itemstack.get(DataComponents.CUSTOM_NAME));
-                     itemstack.consume(1, entityhuman);
--                    return Optional.of(object);
-+                    return Optional.of((EntityInsentient) object); // CraftBukkit - decompile error
-                 }
-             }
-         }
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemProjectileWeapon.patch b/paper-server/patches/sources/net/minecraft/world/item/ItemProjectileWeapon.patch
deleted file mode 100644
index 8b56069605..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/ItemProjectileWeapon.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- a/net/minecraft/world/item/ItemProjectileWeapon.java
-+++ b/net/minecraft/world/item/ItemProjectileWeapon.java
-@@ -54,9 +54,25 @@
-                 float f6 = f4 + f5 * (float) ((i + 1) / 2) * f3;
- 
-                 f5 = -f5;
--                IProjectile.spawnProjectile(this.createProjectile(worldserver, entityliving, itemstack, itemstack1, flag), worldserver, itemstack1, (iprojectile) -> {
--                    this.shootProjectile(entityliving, iprojectile, i, f, f1, f6, entityliving1);
--                });
-+                // CraftBukkit start
-+                IProjectile iprojectile = this.createProjectile(worldserver, entityliving, itemstack, itemstack1, flag);
-+                this.shootProjectile(entityliving, iprojectile, i, f, f1, f6, entityliving1);
-+
-+                org.bukkit.event.entity.EntityShootBowEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityShootBowEvent(entityliving, itemstack, itemstack1, iprojectile, enumhand, f, true);
-+                if (event.isCancelled()) {
-+                    event.getProjectile().remove();
-+                    return;
-+                }
-+
-+                if (event.getProjectile() == iprojectile.getBukkitEntity()) {
-+                    if (IProjectile.spawnProjectile(iprojectile, worldserver, itemstack1).isRemoved()) {
-+                        if (entityliving instanceof net.minecraft.server.level.EntityPlayer) {
-+                            ((net.minecraft.server.level.EntityPlayer) entityliving).getBukkitEntity().updateInventory();
-+                        }
-+                        return;
-+                    }
-+                }
-+                // CraftBukkit end
-                 itemstack.hurtAndBreak(this.getDurabilityUse(itemstack1), entityliving, EntityLiving.getSlotForHand(enumhand));
-                 if (itemstack.isEmpty()) {
-                     break;
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemSign.patch b/paper-server/patches/sources/net/minecraft/world/item/ItemSign.patch
deleted file mode 100644
index a972332727..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/ItemSign.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/net/minecraft/world/item/ItemSign.java
-+++ b/net/minecraft/world/item/ItemSign.java
-@@ -13,6 +13,8 @@
- 
- public class ItemSign extends ItemBlockWallable {
- 
-+    public static BlockPosition openSign; // CraftBukkit
-+
-     public ItemSign(Block block, Block block1, Item.Info item_info) {
-         super(block, block1, EnumDirection.DOWN, item_info);
-     }
-@@ -35,7 +37,10 @@
-                 if (block instanceof BlockSign) {
-                     BlockSign blocksign = (BlockSign) block;
- 
--                    blocksign.openTextEdit(entityhuman, tileentitysign, true);
-+                    // CraftBukkit start - SPIGOT-4678
-+                    // blocksign.openTextEdit(entityhuman, tileentitysign, true);
-+                    ItemSign.openSign = blockposition;
-+                    // CraftBukkit end
-                 }
-             }
-         }
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemSnowball.patch b/paper-server/patches/sources/net/minecraft/world/item/ItemSnowball.patch
deleted file mode 100644
index 1bbc3503dc..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/ItemSnowball.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- a/net/minecraft/world/item/ItemSnowball.java
-+++ b/net/minecraft/world/item/ItemSnowball.java
-@@ -25,13 +25,21 @@
-     public EnumInteractionResult use(World world, EntityHuman entityhuman, EnumHand enumhand) {
-         ItemStack itemstack = entityhuman.getItemInHand(enumhand);
- 
--        world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
-+        // CraftBukkit start - moved down
-+        // world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
-         if (world instanceof WorldServer worldserver) {
--            IProjectile.spawnProjectileFromRotation(EntitySnowball::new, worldserver, itemstack, entityhuman, 0.0F, ItemSnowball.PROJECTILE_SHOOT_POWER, 1.0F);
-+            if (IProjectile.spawnProjectileFromRotation(EntitySnowball::new, worldserver, itemstack, entityhuman, 0.0F, ItemSnowball.PROJECTILE_SHOOT_POWER, 1.0F).isAlive()) {
-+                itemstack.consume(1, entityhuman);
-+
-+                world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
-+            } else if (entityhuman instanceof net.minecraft.server.level.EntityPlayer) {
-+                ((net.minecraft.server.level.EntityPlayer) entityhuman).getBukkitEntity().updateInventory();
-+            }
-+            // CraftBukkit end
-         }
- 
-         entityhuman.awardStat(StatisticList.ITEM_USED.get(this));
--        itemstack.consume(1, entityhuman);
-+        // itemstack.consume(1, entityhuman); // CraftBukkit - moved up
-         return EnumInteractionResult.SUCCESS;
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemStack.java.patch b/paper-server/patches/sources/net/minecraft/world/item/ItemStack.java.patch
new file mode 100644
index 0000000000..a26d0d041e
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/ItemStack.java.patch
@@ -0,0 +1,510 @@
+--- a/net/minecraft/world/item/ItemStack.java
++++ b/net/minecraft/world/item/ItemStack.java
+@@ -23,6 +23,7 @@
+ import net.minecraft.ChatFormatting;
+ import net.minecraft.advancements.CriteriaTriggers;
+ import net.minecraft.core.BlockPos;
++import net.minecraft.core.Direction;
+ import net.minecraft.core.Holder;
+ import net.minecraft.core.HolderLookup;
+ import net.minecraft.core.HolderSet;
+@@ -46,10 +47,12 @@
+ import net.minecraft.network.chat.MutableComponent;
+ import net.minecraft.network.codec.ByteBufCodecs;
+ import net.minecraft.network.codec.StreamCodec;
++import net.minecraft.network.protocol.game.ClientboundBlockUpdatePacket;
+ import net.minecraft.resources.RegistryOps;
+ import net.minecraft.server.level.ServerLevel;
+ import net.minecraft.server.level.ServerPlayer;
+ import net.minecraft.sounds.SoundEvent;
++import net.minecraft.sounds.SoundSource;
+ import net.minecraft.stats.Stats;
+ import net.minecraft.tags.TagKey;
+ import net.minecraft.util.ExtraCodecs;
+@@ -70,7 +73,6 @@
+ import net.minecraft.world.entity.ai.attributes.Attributes;
+ import net.minecraft.world.entity.decoration.ItemFrame;
+ import net.minecraft.world.entity.item.ItemEntity;
+-import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.flag.FeatureFlagSet;
+ import net.minecraft.world.inventory.ClickAction;
+ import net.minecraft.world.inventory.Slot;
+@@ -88,26 +90,53 @@
+ import net.minecraft.world.item.enchantment.EnchantmentHelper;
+ import net.minecraft.world.item.enchantment.ItemEnchantments;
+ import net.minecraft.world.item.enchantment.Repairable;
+-import net.minecraft.world.level.ItemLike;
+-import net.minecraft.world.level.Level;
+-import net.minecraft.world.level.block.state.BlockState;
+-import net.minecraft.world.level.block.state.pattern.BlockInWorld;
+ import net.minecraft.world.level.saveddata.maps.MapId;
+ import org.apache.commons.lang3.mutable.MutableBoolean;
+ import org.slf4j.Logger;
++
++// CraftBukkit start
++import java.util.Map;
++import java.util.Objects;
++import net.minecraft.world.level.ItemLike;
++import net.minecraft.world.level.Level;
++import net.minecraft.world.level.block.BaseEntityBlock;
++import net.minecraft.world.level.block.BedBlock;
++import net.minecraft.world.level.block.Blocks;
++import net.minecraft.world.level.block.SaplingBlock;
++import net.minecraft.world.level.block.SignBlock;
++import net.minecraft.world.level.block.SoundType;
++import net.minecraft.world.level.block.WitherSkullBlock;
++import net.minecraft.world.level.block.entity.BlockEntity;
++import net.minecraft.world.level.block.entity.SignBlockEntity;
++import net.minecraft.world.level.block.entity.SkullBlockEntity;
++import net.minecraft.world.level.block.state.pattern.BlockInWorld;
++import net.minecraft.world.level.gameevent.GameEvent;
++import org.bukkit.Location;
++import org.bukkit.TreeType;
++import org.bukkit.block.BlockState;
++import org.bukkit.craftbukkit.block.CapturedBlockState;
++import org.bukkit.craftbukkit.block.CraftBlock;
++import org.bukkit.craftbukkit.block.CraftBlockState;
++import org.bukkit.craftbukkit.inventory.CraftItemStack;
++import org.bukkit.craftbukkit.util.CraftLocation;
++import org.bukkit.entity.Player;
++import org.bukkit.event.block.BlockFertilizeEvent;
++import org.bukkit.event.player.PlayerItemDamageEvent;
++import org.bukkit.event.world.StructureGrowEvent;
++// CraftBukkit end
+ 
+ public final class ItemStack implements DataComponentHolder {
+ 
+     private static final List<Component> OP_NBT_WARNING = List.of(Component.translatable("item.op_warning.line1").withStyle(ChatFormatting.RED, ChatFormatting.BOLD), Component.translatable("item.op_warning.line2").withStyle(ChatFormatting.RED), Component.translatable("item.op_warning.line3").withStyle(ChatFormatting.RED));
+     public static final Codec<ItemStack> CODEC = Codec.lazyInitialized(() -> {
+-        return RecordCodecBuilder.create((instance) -> {
++        return RecordCodecBuilder.<ItemStack>create((instance) -> { // CraftBukkit - decompile error
+             return instance.group(Item.CODEC.fieldOf("id").forGetter(ItemStack::getItemHolder), ExtraCodecs.intRange(1, 99).fieldOf("count").orElse(1).forGetter(ItemStack::getCount), DataComponentPatch.CODEC.optionalFieldOf("components", DataComponentPatch.EMPTY).forGetter((itemstack) -> {
+                 return itemstack.components.asPatch();
+             })).apply(instance, ItemStack::new);
+         });
+     });
+     public static final Codec<ItemStack> SINGLE_ITEM_CODEC = Codec.lazyInitialized(() -> {
+-        return RecordCodecBuilder.create((instance) -> {
++        return RecordCodecBuilder.<ItemStack>create((instance) -> { // CraftBukkit - decompile error
+             return instance.group(Item.CODEC.fieldOf("id").forGetter(ItemStack::getItemHolder), DataComponentPatch.CODEC.optionalFieldOf("components", DataComponentPatch.EMPTY).forGetter((itemstack) -> {
+                 return itemstack.components.asPatch();
+             })).apply(instance, (holder, datacomponentpatch) -> {
+@@ -132,19 +161,25 @@
+             if (i <= 0) {
+                 return ItemStack.EMPTY;
+             } else {
+-                Holder<Item> holder = (Holder) null.ITEM_STREAM_CODEC.decode(registryfriendlybytebuf);
++                Holder<Item> holder = (Holder) ITEM_STREAM_CODEC.decode(registryfriendlybytebuf); // CraftBukkit - decompile error
+                 DataComponentPatch datacomponentpatch = (DataComponentPatch) DataComponentPatch.STREAM_CODEC.decode(registryfriendlybytebuf);
+ 
+-                return new ItemStack(holder, i, datacomponentpatch);
++                // CraftBukkit start
++                ItemStack itemstack = new ItemStack(holder, i, datacomponentpatch);
++                if (!datacomponentpatch.isEmpty()) {
++                    CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack));
++                }
++                return itemstack;
++                // CraftBukkit end
+             }
+         }
+ 
+         public void encode(RegistryFriendlyByteBuf registryfriendlybytebuf, ItemStack itemstack) {
+-            if (itemstack.isEmpty()) {
++            if (itemstack.isEmpty() || itemstack.getItem() == null) { // CraftBukkit - NPE fix itemstack.getItem()
+                 registryfriendlybytebuf.writeVarInt(0);
+             } else {
+                 registryfriendlybytebuf.writeVarInt(itemstack.getCount());
+-                null.ITEM_STREAM_CODEC.encode(registryfriendlybytebuf, itemstack.getItemHolder());
++                ITEM_STREAM_CODEC.encode(registryfriendlybytebuf, itemstack.getItemHolder()); // CraftBukkit - decompile error
+                 DataComponentPatch.STREAM_CODEC.encode(registryfriendlybytebuf, itemstack.components.asPatch());
+             }
+         }
+@@ -187,7 +222,7 @@
+ 
+         return dataresult.isError() ? dataresult.map((unit) -> {
+             return stack;
+-        }) : (stack.getCount() > stack.getMaxStackSize() ? DataResult.error(() -> {
++        }) : (stack.getCount() > stack.getMaxStackSize() ? DataResult.<ItemStack>error(() -> { // CraftBukkit - decompile error
+             int i = stack.getCount();
+ 
+             return "Item stack with stack size of " + i + " was larger than maximum: " + stack.getMaxStackSize();
+@@ -294,8 +329,9 @@
+                 j = itemstack.getMaxStackSize();
+             } while (i <= j);
+ 
++            int finalI = i, finalJ = j; // CraftBukkit - decompile error
+             return DataResult.error(() -> {
+-                return "Item stack with count of " + i + " was larger than maximum: " + j;
++                return "Item stack with count of " + finalI + " was larger than maximum: " + finalJ; // CraftBukkit - decompile error
+             });
+         }
+     }
+@@ -370,32 +406,190 @@
+     }
+ 
+     public InteractionResult useOn(UseOnContext context) {
+-        Player entityhuman = context.getPlayer();
++        net.minecraft.world.entity.player.Player entityhuman = context.getPlayer();
+         BlockPos blockposition = context.getClickedPos();
+ 
+         if (entityhuman != null && !entityhuman.getAbilities().mayBuild && !this.canPlaceOnBlockInAdventureMode(new BlockInWorld(context.getLevel(), blockposition, false))) {
+             return InteractionResult.PASS;
+         } else {
+             Item item = this.getItem();
+-            InteractionResult enuminteractionresult = item.useOn(context);
++            // CraftBukkit start - handle all block place event logic here
++            DataComponentPatch oldData = this.components.asPatch();
++            int oldCount = this.getCount();
++            ServerLevel world = (ServerLevel) context.getLevel();
+ 
++            if (!(item instanceof BucketItem || item instanceof SolidBucketItem)) { // if not bucket
++                world.captureBlockStates = true;
++                // special case bonemeal
++                if (item == Items.BONE_MEAL) {
++                    world.captureTreeGeneration = true;
++                }
++            }
++            InteractionResult enuminteractionresult;
++            try {
++                enuminteractionresult = item.useOn(context);
++            } finally {
++                world.captureBlockStates = false;
++            }
++            DataComponentPatch newData = this.components.asPatch();
++            int newCount = this.getCount();
++            this.setCount(oldCount);
++            this.restorePatch(oldData);
++            if (enuminteractionresult.consumesAction() && world.captureTreeGeneration && world.capturedBlockStates.size() > 0) {
++                world.captureTreeGeneration = false;
++                Location location = CraftLocation.toBukkit(blockposition, world.getWorld());
++                TreeType treeType = SaplingBlock.treeType;
++                SaplingBlock.treeType = null;
++                List<CraftBlockState> blocks = new java.util.ArrayList<>(world.capturedBlockStates.values());
++                world.capturedBlockStates.clear();
++                StructureGrowEvent structureEvent = null;
++                if (treeType != null) {
++                    boolean isBonemeal = this.getItem() == Items.BONE_MEAL;
++                    structureEvent = new StructureGrowEvent(location, treeType, isBonemeal, (Player) entityhuman.getBukkitEntity(), (List< BlockState>) (List<? extends BlockState>) blocks);
++                    org.bukkit.Bukkit.getPluginManager().callEvent(structureEvent);
++                }
++
++                BlockFertilizeEvent fertilizeEvent = new BlockFertilizeEvent(CraftBlock.at(world, blockposition), (Player) entityhuman.getBukkitEntity(), (List< BlockState>) (List<? extends BlockState>) blocks);
++                fertilizeEvent.setCancelled(structureEvent != null && structureEvent.isCancelled());
++                org.bukkit.Bukkit.getPluginManager().callEvent(fertilizeEvent);
++
++                if (!fertilizeEvent.isCancelled()) {
++                    // Change the stack to its new contents if it hasn't been tampered with.
++                    if (this.getCount() == oldCount && Objects.equals(this.components.asPatch(), oldData)) {
++                        this.restorePatch(newData);
++                        this.setCount(newCount);
++                    }
++                    for (CraftBlockState blockstate : blocks) {
++                        // SPIGOT-7572 - Move fix for SPIGOT-7248 to CapturedBlockState, to allow bees in bee nest
++                        CapturedBlockState.setBlockState(blockstate);
++                    }
++                    entityhuman.awardStat(Stats.ITEM_USED.get(item)); // SPIGOT-7236 - award stat
++                }
++
++                SignItem.openSign = null; // SPIGOT-6758 - Reset on early return
++                return enuminteractionresult;
++            }
++            world.captureTreeGeneration = false;
++
+             if (entityhuman != null && enuminteractionresult instanceof InteractionResult.Success) {
+                 InteractionResult.Success enuminteractionresult_d = (InteractionResult.Success) enuminteractionresult;
+ 
+                 if (enuminteractionresult_d.wasItemInteraction()) {
+-                    entityhuman.awardStat(Stats.ITEM_USED.get(item));
++                    InteractionHand enumhand = context.getHand();
++                    org.bukkit.event.block.BlockPlaceEvent placeEvent = null;
++                    List<BlockState> blocks = new java.util.ArrayList<>(world.capturedBlockStates.values());
++                    world.capturedBlockStates.clear();
++                    if (blocks.size() > 1) {
++                        placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockMultiPlaceEvent(world, entityhuman, enumhand, blocks, blockposition.getX(), blockposition.getY(), blockposition.getZ());
++                    } else if (blocks.size() == 1) {
++                        placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPlaceEvent(world, entityhuman, enumhand, blocks.get(0), blockposition.getX(), blockposition.getY(), blockposition.getZ());
++                    }
++
++                    if (placeEvent != null && (placeEvent.isCancelled() || !placeEvent.canBuild())) {
++                        enuminteractionresult = InteractionResult.FAIL; // cancel placement
++                        // PAIL: Remove this when MC-99075 fixed
++                        placeEvent.getPlayer().updateInventory();
++                        // revert back all captured blocks
++                        world.preventPoiUpdated = true; // CraftBukkit - SPIGOT-5710
++                        for (BlockState blockstate : blocks) {
++                            blockstate.update(true, false);
++                        }
++                        world.preventPoiUpdated = false;
++
++                        // Brute force all possible updates
++                        BlockPos placedPos = ((CraftBlock) placeEvent.getBlock()).getPosition();
++                        for (Direction dir : Direction.values()) {
++                            ((ServerPlayer) entityhuman).connection.send(new ClientboundBlockUpdatePacket(world, placedPos.relative(dir)));
++                        }
++                        SignItem.openSign = null; // SPIGOT-6758 - Reset on early return
++                    } else {
++                        // Change the stack to its new contents if it hasn't been tampered with.
++                        if (this.getCount() == oldCount && Objects.equals(this.components.asPatch(), oldData)) {
++                            this.restorePatch(newData);
++                            this.setCount(newCount);
++                        }
++
++                        for (Map.Entry<BlockPos, BlockEntity> e : world.capturedTileEntities.entrySet()) {
++                            world.setBlockEntity(e.getValue());
++                        }
++
++                        for (BlockState blockstate : blocks) {
++                            int updateFlag = ((CraftBlockState) blockstate).getFlag();
++                            net.minecraft.world.level.block.state.BlockState oldBlock = ((CraftBlockState) blockstate).getHandle();
++                            BlockPos newblockposition = ((CraftBlockState) blockstate).getPosition();
++                            net.minecraft.world.level.block.state.BlockState block = world.getBlockState(newblockposition);
++
++                            if (!(block.getBlock() instanceof BaseEntityBlock)) { // Containers get placed automatically
++                                block.onPlace(world, newblockposition, oldBlock, true, context);
++                            }
++
++                            world.notifyAndUpdatePhysics(newblockposition, null, oldBlock, block, world.getBlockState(newblockposition), updateFlag, 512); // send null chunk as chunk.k() returns false by this point
++                        }
++
++                        if (this.item == Items.WITHER_SKELETON_SKULL) { // Special case skulls to allow wither spawns to be cancelled
++                            BlockPos bp = blockposition;
++                            if (!world.getBlockState(blockposition).canBeReplaced()) {
++                                if (!world.getBlockState(blockposition).isSolid()) {
++                                    bp = null;
++                                } else {
++                                    bp = bp.relative(context.getClickedFace());
++                                }
++                            }
++                            if (bp != null) {
++                                BlockEntity te = world.getBlockEntity(bp);
++                                if (te instanceof SkullBlockEntity) {
++                                    WitherSkullBlock.checkSpawn(world, bp, (SkullBlockEntity) te);
++                                }
++                            }
++                        }
++
++                        // SPIGOT-4678
++                        if (this.item instanceof SignItem && SignItem.openSign != null) {
++                            try {
++                                if (world.getBlockEntity(SignItem.openSign) instanceof SignBlockEntity tileentitysign) {
++                                    if (world.getBlockState(SignItem.openSign).getBlock() instanceof SignBlock blocksign) {
++                                        blocksign.openTextEdit(entityhuman, tileentitysign, true, org.bukkit.event.player.PlayerSignOpenEvent.Cause.PLACE); // Craftbukkit
++                                    }
++                                }
++                            } finally {
++                                SignItem.openSign = null;
++                            }
++                        }
++
++                        // SPIGOT-7315: Moved from BlockBed#setPlacedBy
++                        if (placeEvent != null && this.item instanceof BedItem) {
++                            BlockPos position = ((CraftBlock) placeEvent.getBlock()).getPosition();
++                            net.minecraft.world.level.block.state.BlockState blockData = world.getBlockState(position);
++
++                            if (blockData.getBlock() instanceof BedBlock) {
++                                world.blockUpdated(position, Blocks.AIR);
++                                blockData.updateNeighbourShapes(world, position, 3);
++                            }
++                        }
++
++                        // SPIGOT-1288 - play sound stripped from ItemBlock
++                        if (this.item instanceof BlockItem) {
++                            SoundType soundeffecttype = ((BlockItem) this.item).getBlock().defaultBlockState().getSoundType(); // TODO: not strictly correct, however currently only affects decorated pots
++                            world.playSound(entityhuman, blockposition, soundeffecttype.getPlaceSound(), SoundSource.BLOCKS, (soundeffecttype.getVolume() + 1.0F) / 2.0F, soundeffecttype.getPitch() * 0.8F);
++                        }
++
++                        entityhuman.awardStat(Stats.ITEM_USED.get(item));
++                    }
+                 }
+             }
++            world.capturedTileEntities.clear();
++            world.capturedBlockStates.clear();
++            // CraftBukkit end
+ 
+             return enuminteractionresult;
+         }
+     }
+ 
+-    public float getDestroySpeed(BlockState state) {
++    public float getDestroySpeed(net.minecraft.world.level.block.state.BlockState state) {
+         return this.getItem().getDestroySpeed(this, state);
+     }
+ 
+-    public InteractionResult use(Level world, Player user, InteractionHand hand) {
++    public InteractionResult use(Level world, net.minecraft.world.entity.player.Player user, InteractionHand hand) {
+         ItemStack itemstack = this.copy();
+         boolean flag = this.getUseDuration(user) <= 0;
+         InteractionResult enuminteractionresult = this.getItem().use(world, user, hand);
+@@ -492,7 +686,22 @@
+ 
+     public void hurtAndBreak(int amount, ServerLevel world, @Nullable ServerPlayer player, Consumer<Item> breakCallback) {
+         int j = this.processDurabilityChange(amount, world, player);
++        // CraftBukkit start
++        if (player != null) {
++            PlayerItemDamageEvent event = new PlayerItemDamageEvent(player.getBukkitEntity(), CraftItemStack.asCraftMirror(this), j);
++            event.getPlayer().getServer().getPluginManager().callEvent(event);
+ 
++            if (j != event.getDamage() || event.isCancelled()) {
++                event.getPlayer().updateInventory();
++            }
++            if (event.isCancelled()) {
++                return;
++            }
++
++            j = event.getDamage();
++        }
++        // CraftBukkit end
++
+         if (j != 0) {
+             this.applyDamage(this.getDamageValue() + j, player, breakCallback);
+         }
+@@ -511,6 +720,11 @@
+         this.setDamageValue(damage);
+         if (this.isBroken()) {
+             Item item = this.getItem();
++            // CraftBukkit start - Check for item breaking
++            if (this.count == 1 && player != null) {
++                org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemBreakEvent(player, this);
++            }
++            // CraftBukkit end
+ 
+             this.shrink(1);
+             breakCallback.accept(item);
+@@ -518,7 +732,7 @@
+ 
+     }
+ 
+-    public void hurtWithoutBreaking(int amount, Player player) {
++    public void hurtWithoutBreaking(int amount, net.minecraft.world.entity.player.Player player) {
+         if (player instanceof ServerPlayer entityplayer) {
+             int j = this.processDurabilityChange(amount, entityplayer.serverLevel(), entityplayer);
+ 
+@@ -580,11 +794,11 @@
+         return this.getItem().getBarColor(this);
+     }
+ 
+-    public boolean overrideStackedOnOther(Slot slot, ClickAction clickType, Player player) {
++    public boolean overrideStackedOnOther(Slot slot, ClickAction clickType, net.minecraft.world.entity.player.Player player) {
+         return this.getItem().overrideStackedOnOther(this, slot, clickType, player);
+     }
+ 
+-    public boolean overrideOtherStackedOnMe(ItemStack stack, Slot slot, ClickAction clickType, Player player, SlotAccess cursorStackReference) {
++    public boolean overrideOtherStackedOnMe(ItemStack stack, Slot slot, ClickAction clickType, net.minecraft.world.entity.player.Player player, SlotAccess cursorStackReference) {
+         return this.getItem().overrideOtherStackedOnMe(this, stack, slot, clickType, player, cursorStackReference);
+     }
+ 
+@@ -592,8 +806,8 @@
+         Item item = this.getItem();
+ 
+         if (item.hurtEnemy(this, target, user)) {
+-            if (user instanceof Player) {
+-                Player entityhuman = (Player) user;
++            if (user instanceof net.minecraft.world.entity.player.Player) {
++                net.minecraft.world.entity.player.Player entityhuman = (net.minecraft.world.entity.player.Player) user;
+ 
+                 entityhuman.awardStat(Stats.ITEM_USED.get(item));
+             }
+@@ -608,7 +822,7 @@
+         this.getItem().postHurtEnemy(this, target, user);
+     }
+ 
+-    public void mineBlock(Level world, BlockState state, BlockPos pos, Player miner) {
++    public void mineBlock(Level world, net.minecraft.world.level.block.state.BlockState state, BlockPos pos, net.minecraft.world.entity.player.Player miner) {
+         Item item = this.getItem();
+ 
+         if (item.mineBlock(this, world, state, pos, miner)) {
+@@ -617,11 +831,11 @@
+ 
+     }
+ 
+-    public boolean isCorrectToolForDrops(BlockState state) {
++    public boolean isCorrectToolForDrops(net.minecraft.world.level.block.state.BlockState state) {
+         return this.getItem().isCorrectToolForDrops(this, state);
+     }
+ 
+-    public InteractionResult interactLivingEntity(Player user, LivingEntity entity, InteractionHand hand) {
++    public InteractionResult interactLivingEntity(net.minecraft.world.entity.player.Player user, LivingEntity entity, InteractionHand hand) {
+         return this.getItem().interactLivingEntity(this, user, entity, hand);
+     }
+ 
+@@ -736,7 +950,7 @@
+ 
+     }
+ 
+-    public void onCraftedBy(Level world, Player player, int amount) {
++    public void onCraftedBy(Level world, net.minecraft.world.entity.player.Player player, int amount) {
+         player.awardStat(Stats.ITEM_CRAFTED.get(this.getItem()), amount);
+         this.getItem().onCraftedBy(this, world, player);
+     }
+@@ -770,6 +984,12 @@
+         return this.getItem().useOnRelease(this);
+     }
+ 
++    // CraftBukkit start
++    public void restorePatch(DataComponentPatch datacomponentpatch) {
++        this.components.restorePatch(datacomponentpatch);
++    }
++    // CraftBukkit end
++
+     @Nullable
+     public <T> T set(DataComponentType<? super T> type, @Nullable T value) {
+         return this.components.set(type, value);
+@@ -858,7 +1078,7 @@
+     }
+ 
+     private <T extends TooltipProvider> void addToTooltip(DataComponentType<T> componentType, Item.TooltipContext context, Consumer<Component> textConsumer, TooltipFlag type) {
+-        T t0 = (TooltipProvider) this.get(componentType);
++        T t0 = (T) this.get(componentType); // CraftBukkit - decompile error
+ 
+         if (t0 != null) {
+             t0.addToTooltip(context, textConsumer, type);
+@@ -866,7 +1086,7 @@
+ 
+     }
+ 
+-    public List<Component> getTooltipLines(Item.TooltipContext context, @Nullable Player player, TooltipFlag type) {
++    public List<Component> getTooltipLines(Item.TooltipContext context, @Nullable net.minecraft.world.entity.player.Player player, TooltipFlag type) {
+         boolean flag = this.getItem().shouldPrintOpWarning(this, player);
+ 
+         if (!type.isCreative() && this.has(DataComponents.HIDE_TOOLTIP)) {
+@@ -941,7 +1161,7 @@
+         }
+     }
+ 
+-    private void addAttributeTooltips(Consumer<Component> textConsumer, @Nullable Player player) {
++    private void addAttributeTooltips(Consumer<Component> textConsumer, @Nullable net.minecraft.world.entity.player.Player player) {
+         ItemAttributeModifiers itemattributemodifiers = (ItemAttributeModifiers) this.getOrDefault(DataComponents.ATTRIBUTE_MODIFIERS, ItemAttributeModifiers.EMPTY);
+ 
+         if (itemattributemodifiers.showInTooltip()) {
+@@ -966,7 +1186,7 @@
+         }
+     }
+ 
+-    private void addModifierTooltip(Consumer<Component> textConsumer, @Nullable Player player, Holder<Attribute> attribute, AttributeModifier modifier) {
++    private void addModifierTooltip(Consumer<Component> textConsumer, @Nullable net.minecraft.world.entity.player.Player player, Holder<Attribute> attribute, AttributeModifier modifier) {
+         double d0 = modifier.amount();
+         boolean flag = false;
+ 
+@@ -1091,6 +1311,13 @@
+         EnchantmentHelper.forEachModifier(this, slot, attributeModifierConsumer);
+     }
+ 
++    // CraftBukkit start
++    @Deprecated
++    public void setItem(Item item) {
++        this.item = item;
++    }
++    // CraftBukkit end
++
+     public Component getDisplayName() {
+         MutableComponent ichatmutablecomponent = Component.empty().append(this.getHoverName());
+ 
+@@ -1153,7 +1380,7 @@
+     }
+ 
+     public void consume(int amount, @Nullable LivingEntity entity) {
+-        if (entity == null || !entity.hasInfiniteMaterials()) {
++        if ((entity == null || !entity.hasInfiniteMaterials()) && this != ItemStack.EMPTY) { // CraftBukkit
+             this.shrink(amount);
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemStack.patch b/paper-server/patches/sources/net/minecraft/world/item/ItemStack.patch
deleted file mode 100644
index 5cb394abff..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/ItemStack.patch
+++ /dev/null
@@ -1,362 +0,0 @@
---- a/net/minecraft/world/item/ItemStack.java
-+++ b/net/minecraft/world/item/ItemStack.java
-@@ -96,18 +96,52 @@
- import org.apache.commons.lang3.mutable.MutableBoolean;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import java.util.Map;
-+import java.util.Objects;
-+import net.minecraft.core.EnumDirection;
-+import net.minecraft.nbt.DynamicOpsNBT;
-+import net.minecraft.network.protocol.game.PacketPlayOutBlockChange;
-+import net.minecraft.server.level.WorldServer;
-+import net.minecraft.sounds.SoundCategory;
-+import net.minecraft.world.level.block.BlockBed;
-+import net.minecraft.world.level.block.Blocks;
-+import net.minecraft.world.level.block.BlockSapling;
-+import net.minecraft.world.level.block.BlockSign;
-+import net.minecraft.world.level.block.BlockTileEntity;
-+import net.minecraft.world.level.block.BlockWitherSkull;
-+import net.minecraft.world.level.block.SoundEffectType;
-+import net.minecraft.world.level.block.entity.TileEntity;
-+import net.minecraft.world.level.block.entity.TileEntityJukeBox;
-+import net.minecraft.world.level.block.entity.TileEntitySign;
-+import net.minecraft.world.level.block.entity.TileEntitySkull;
-+import net.minecraft.world.level.gameevent.GameEvent;
-+import org.bukkit.Location;
-+import org.bukkit.TreeType;
-+import org.bukkit.block.BlockState;
-+import org.bukkit.craftbukkit.block.CapturedBlockState;
-+import org.bukkit.craftbukkit.block.CraftBlock;
-+import org.bukkit.craftbukkit.block.CraftBlockState;
-+import org.bukkit.craftbukkit.inventory.CraftItemStack;
-+import org.bukkit.craftbukkit.util.CraftLocation;
-+import org.bukkit.entity.Player;
-+import org.bukkit.event.block.BlockFertilizeEvent;
-+import org.bukkit.event.player.PlayerItemDamageEvent;
-+import org.bukkit.event.world.StructureGrowEvent;
-+// CraftBukkit end
-+
- public final class ItemStack implements DataComponentHolder {
- 
-     private static final List<IChatBaseComponent> OP_NBT_WARNING = List.of(IChatBaseComponent.translatable("item.op_warning.line1").withStyle(EnumChatFormat.RED, EnumChatFormat.BOLD), IChatBaseComponent.translatable("item.op_warning.line2").withStyle(EnumChatFormat.RED), IChatBaseComponent.translatable("item.op_warning.line3").withStyle(EnumChatFormat.RED));
-     public static final Codec<ItemStack> CODEC = Codec.lazyInitialized(() -> {
--        return RecordCodecBuilder.create((instance) -> {
-+        return RecordCodecBuilder.<ItemStack>create((instance) -> { // CraftBukkit - decompile error
-             return instance.group(Item.CODEC.fieldOf("id").forGetter(ItemStack::getItemHolder), ExtraCodecs.intRange(1, 99).fieldOf("count").orElse(1).forGetter(ItemStack::getCount), DataComponentPatch.CODEC.optionalFieldOf("components", DataComponentPatch.EMPTY).forGetter((itemstack) -> {
-                 return itemstack.components.asPatch();
-             })).apply(instance, ItemStack::new);
-         });
-     });
-     public static final Codec<ItemStack> SINGLE_ITEM_CODEC = Codec.lazyInitialized(() -> {
--        return RecordCodecBuilder.create((instance) -> {
-+        return RecordCodecBuilder.<ItemStack>create((instance) -> { // CraftBukkit - decompile error
-             return instance.group(Item.CODEC.fieldOf("id").forGetter(ItemStack::getItemHolder), DataComponentPatch.CODEC.optionalFieldOf("components", DataComponentPatch.EMPTY).forGetter((itemstack) -> {
-                 return itemstack.components.asPatch();
-             })).apply(instance, (holder, datacomponentpatch) -> {
-@@ -132,19 +166,25 @@
-             if (i <= 0) {
-                 return ItemStack.EMPTY;
-             } else {
--                Holder<Item> holder = (Holder) null.ITEM_STREAM_CODEC.decode(registryfriendlybytebuf);
-+                Holder<Item> holder = (Holder) ITEM_STREAM_CODEC.decode(registryfriendlybytebuf); // CraftBukkit - decompile error
-                 DataComponentPatch datacomponentpatch = (DataComponentPatch) DataComponentPatch.STREAM_CODEC.decode(registryfriendlybytebuf);
- 
--                return new ItemStack(holder, i, datacomponentpatch);
-+                // CraftBukkit start
-+                ItemStack itemstack = new ItemStack(holder, i, datacomponentpatch);
-+                if (!datacomponentpatch.isEmpty()) {
-+                    CraftItemStack.setItemMeta(itemstack, CraftItemStack.getItemMeta(itemstack));
-+                }
-+                return itemstack;
-+                // CraftBukkit end
-             }
-         }
- 
-         public void encode(RegistryFriendlyByteBuf registryfriendlybytebuf, ItemStack itemstack) {
--            if (itemstack.isEmpty()) {
-+            if (itemstack.isEmpty() || itemstack.getItem() == null) { // CraftBukkit - NPE fix itemstack.getItem()
-                 registryfriendlybytebuf.writeVarInt(0);
-             } else {
-                 registryfriendlybytebuf.writeVarInt(itemstack.getCount());
--                null.ITEM_STREAM_CODEC.encode(registryfriendlybytebuf, itemstack.getItemHolder());
-+                ITEM_STREAM_CODEC.encode(registryfriendlybytebuf, itemstack.getItemHolder()); // CraftBukkit - decompile error
-                 DataComponentPatch.STREAM_CODEC.encode(registryfriendlybytebuf, itemstack.components.asPatch());
-             }
-         }
-@@ -187,7 +227,7 @@
- 
-         return dataresult.isError() ? dataresult.map((unit) -> {
-             return itemstack;
--        }) : (itemstack.getCount() > itemstack.getMaxStackSize() ? DataResult.error(() -> {
-+        }) : (itemstack.getCount() > itemstack.getMaxStackSize() ? DataResult.<ItemStack>error(() -> { // CraftBukkit - decompile error
-             int i = itemstack.getCount();
- 
-             return "Item stack with stack size of " + i + " was larger than maximum: " + itemstack.getMaxStackSize();
-@@ -294,8 +334,9 @@
-                 j = itemstack.getMaxStackSize();
-             } while (i <= j);
- 
-+            int finalI = i, finalJ = j; // CraftBukkit - decompile error
-             return DataResult.error(() -> {
--                return "Item stack with count of " + i + " was larger than maximum: " + j;
-+                return "Item stack with count of " + finalI + " was larger than maximum: " + finalJ; // CraftBukkit - decompile error
-             });
-         }
-     }
-@@ -377,15 +418,173 @@
-             return EnumInteractionResult.PASS;
-         } else {
-             Item item = this.getItem();
--            EnumInteractionResult enuminteractionresult = item.useOn(itemactioncontext);
-+            // CraftBukkit start - handle all block place event logic here
-+            DataComponentPatch oldData = this.components.asPatch();
-+            int oldCount = this.getCount();
-+            WorldServer world = (WorldServer) itemactioncontext.getLevel();
-+
-+            if (!(item instanceof ItemBucket || item instanceof SolidBucketItem)) { // if not bucket
-+                world.captureBlockStates = true;
-+                // special case bonemeal
-+                if (item == Items.BONE_MEAL) {
-+                    world.captureTreeGeneration = true;
-+                }
-+            }
-+            EnumInteractionResult enuminteractionresult;
-+            try {
-+                enuminteractionresult = item.useOn(itemactioncontext);
-+            } finally {
-+                world.captureBlockStates = false;
-+            }
-+            DataComponentPatch newData = this.components.asPatch();
-+            int newCount = this.getCount();
-+            this.setCount(oldCount);
-+            this.restorePatch(oldData);
-+            if (enuminteractionresult.consumesAction() && world.captureTreeGeneration && world.capturedBlockStates.size() > 0) {
-+                world.captureTreeGeneration = false;
-+                Location location = CraftLocation.toBukkit(blockposition, world.getWorld());
-+                TreeType treeType = BlockSapling.treeType;
-+                BlockSapling.treeType = null;
-+                List<CraftBlockState> blocks = new java.util.ArrayList<>(world.capturedBlockStates.values());
-+                world.capturedBlockStates.clear();
-+                StructureGrowEvent structureEvent = null;
-+                if (treeType != null) {
-+                    boolean isBonemeal = getItem() == Items.BONE_MEAL;
-+                    structureEvent = new StructureGrowEvent(location, treeType, isBonemeal, (Player) entityhuman.getBukkitEntity(), (List< BlockState>) (List<? extends BlockState>) blocks);
-+                    org.bukkit.Bukkit.getPluginManager().callEvent(structureEvent);
-+                }
-+
-+                BlockFertilizeEvent fertilizeEvent = new BlockFertilizeEvent(CraftBlock.at(world, blockposition), (Player) entityhuman.getBukkitEntity(), (List< BlockState>) (List<? extends BlockState>) blocks);
-+                fertilizeEvent.setCancelled(structureEvent != null && structureEvent.isCancelled());
-+                org.bukkit.Bukkit.getPluginManager().callEvent(fertilizeEvent);
-+
-+                if (!fertilizeEvent.isCancelled()) {
-+                    // Change the stack to its new contents if it hasn't been tampered with.
-+                    if (this.getCount() == oldCount && Objects.equals(this.components.asPatch(), oldData)) {
-+                        this.restorePatch(newData);
-+                        this.setCount(newCount);
-+                    }
-+                    for (CraftBlockState blockstate : blocks) {
-+                        // SPIGOT-7572 - Move fix for SPIGOT-7248 to CapturedBlockState, to allow bees in bee nest
-+                        CapturedBlockState.setBlockState(blockstate);
-+                    }
-+                    entityhuman.awardStat(StatisticList.ITEM_USED.get(item)); // SPIGOT-7236 - award stat
-+                }
-+
-+                ItemSign.openSign = null; // SPIGOT-6758 - Reset on early return
-+                return enuminteractionresult;
-+            }
-+            world.captureTreeGeneration = false;
- 
-             if (entityhuman != null && enuminteractionresult instanceof EnumInteractionResult.d) {
-                 EnumInteractionResult.d enuminteractionresult_d = (EnumInteractionResult.d) enuminteractionresult;
- 
-                 if (enuminteractionresult_d.wasItemInteraction()) {
--                    entityhuman.awardStat(StatisticList.ITEM_USED.get(item));
-+                    EnumHand enumhand = itemactioncontext.getHand();
-+                    org.bukkit.event.block.BlockPlaceEvent placeEvent = null;
-+                    List<BlockState> blocks = new java.util.ArrayList<>(world.capturedBlockStates.values());
-+                    world.capturedBlockStates.clear();
-+                    if (blocks.size() > 1) {
-+                        placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockMultiPlaceEvent(world, entityhuman, enumhand, blocks, blockposition.getX(), blockposition.getY(), blockposition.getZ());
-+                    } else if (blocks.size() == 1) {
-+                        placeEvent = org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPlaceEvent(world, entityhuman, enumhand, blocks.get(0), blockposition.getX(), blockposition.getY(), blockposition.getZ());
-+                    }
-+
-+                    if (placeEvent != null && (placeEvent.isCancelled() || !placeEvent.canBuild())) {
-+                        enuminteractionresult = EnumInteractionResult.FAIL; // cancel placement
-+                        // PAIL: Remove this when MC-99075 fixed
-+                        placeEvent.getPlayer().updateInventory();
-+                        // revert back all captured blocks
-+                        world.preventPoiUpdated = true; // CraftBukkit - SPIGOT-5710
-+                        for (BlockState blockstate : blocks) {
-+                            blockstate.update(true, false);
-+                        }
-+                        world.preventPoiUpdated = false;
-+
-+                        // Brute force all possible updates
-+                        BlockPosition placedPos = ((CraftBlock) placeEvent.getBlock()).getPosition();
-+                        for (EnumDirection dir : EnumDirection.values()) {
-+                            ((EntityPlayer) entityhuman).connection.send(new PacketPlayOutBlockChange(world, placedPos.relative(dir)));
-+                        }
-+                        ItemSign.openSign = null; // SPIGOT-6758 - Reset on early return
-+                    } else {
-+                        // Change the stack to its new contents if it hasn't been tampered with.
-+                        if (this.getCount() == oldCount && Objects.equals(this.components.asPatch(), oldData)) {
-+                            this.restorePatch(newData);
-+                            this.setCount(newCount);
-+                        }
-+
-+                        for (Map.Entry<BlockPosition, TileEntity> e : world.capturedTileEntities.entrySet()) {
-+                            world.setBlockEntity(e.getValue());
-+                        }
-+
-+                        for (BlockState blockstate : blocks) {
-+                            int updateFlag = ((CraftBlockState) blockstate).getFlag();
-+                            IBlockData oldBlock = ((CraftBlockState) blockstate).getHandle();
-+                            BlockPosition newblockposition = ((CraftBlockState) blockstate).getPosition();
-+                            IBlockData block = world.getBlockState(newblockposition);
-+
-+                            if (!(block.getBlock() instanceof BlockTileEntity)) { // Containers get placed automatically
-+                                block.onPlace(world, newblockposition, oldBlock, true, itemactioncontext);
-+                            }
-+
-+                            world.notifyAndUpdatePhysics(newblockposition, null, oldBlock, block, world.getBlockState(newblockposition), updateFlag, 512); // send null chunk as chunk.k() returns false by this point
-+                        }
-+
-+                        if (this.item == Items.WITHER_SKELETON_SKULL) { // Special case skulls to allow wither spawns to be cancelled
-+                            BlockPosition bp = blockposition;
-+                            if (!world.getBlockState(blockposition).canBeReplaced()) {
-+                                if (!world.getBlockState(blockposition).isSolid()) {
-+                                    bp = null;
-+                                } else {
-+                                    bp = bp.relative(itemactioncontext.getClickedFace());
-+                                }
-+                            }
-+                            if (bp != null) {
-+                                TileEntity te = world.getBlockEntity(bp);
-+                                if (te instanceof TileEntitySkull) {
-+                                    BlockWitherSkull.checkSpawn(world, bp, (TileEntitySkull) te);
-+                                }
-+                            }
-+                        }
-+
-+                        // SPIGOT-4678
-+                        if (this.item instanceof ItemSign && ItemSign.openSign != null) {
-+                            try {
-+                                if (world.getBlockEntity(ItemSign.openSign) instanceof TileEntitySign tileentitysign) {
-+                                    if (world.getBlockState(ItemSign.openSign).getBlock() instanceof BlockSign blocksign) {
-+                                        blocksign.openTextEdit(entityhuman, tileentitysign, true, org.bukkit.event.player.PlayerSignOpenEvent.Cause.PLACE); // Craftbukkit
-+                                    }
-+                                }
-+                            } finally {
-+                                ItemSign.openSign = null;
-+                            }
-+                        }
-+
-+                        // SPIGOT-7315: Moved from BlockBed#setPlacedBy
-+                        if (placeEvent != null && this.item instanceof ItemBed) {
-+                            BlockPosition position = ((CraftBlock) placeEvent.getBlock()).getPosition();
-+                            IBlockData blockData = world.getBlockState(position);
-+
-+                            if (blockData.getBlock() instanceof BlockBed) {
-+                                world.blockUpdated(position, Blocks.AIR);
-+                                blockData.updateNeighbourShapes(world, position, 3);
-+                            }
-+                        }
-+
-+                        // SPIGOT-1288 - play sound stripped from ItemBlock
-+                        if (this.item instanceof ItemBlock) {
-+                            SoundEffectType soundeffecttype = ((ItemBlock) this.item).getBlock().defaultBlockState().getSoundType(); // TODO: not strictly correct, however currently only affects decorated pots
-+                            world.playSound(entityhuman, blockposition, soundeffecttype.getPlaceSound(), SoundCategory.BLOCKS, (soundeffecttype.getVolume() + 1.0F) / 2.0F, soundeffecttype.getPitch() * 0.8F);
-+                        }
-+
-+                        entityhuman.awardStat(StatisticList.ITEM_USED.get(item));
-+                    }
-                 }
-             }
-+            world.capturedTileEntities.clear();
-+            world.capturedBlockStates.clear();
-+            // CraftBukkit end
- 
-             return enuminteractionresult;
-         }
-@@ -492,6 +691,21 @@
- 
-     public void hurtAndBreak(int i, WorldServer worldserver, @Nullable EntityPlayer entityplayer, Consumer<Item> consumer) {
-         int j = this.processDurabilityChange(i, worldserver, entityplayer);
-+        // CraftBukkit start
-+        if (entityplayer != null) {
-+            PlayerItemDamageEvent event = new PlayerItemDamageEvent(entityplayer.getBukkitEntity(), CraftItemStack.asCraftMirror(this), j);
-+            event.getPlayer().getServer().getPluginManager().callEvent(event);
-+
-+            if (j != event.getDamage() || event.isCancelled()) {
-+                event.getPlayer().updateInventory();
-+            }
-+            if (event.isCancelled()) {
-+                return;
-+            }
-+
-+            j = event.getDamage();
-+        }
-+        // CraftBukkit end
- 
-         if (j != 0) {
-             this.applyDamage(this.getDamageValue() + j, entityplayer, consumer);
-@@ -511,6 +725,11 @@
-         this.setDamageValue(i);
-         if (this.isBroken()) {
-             Item item = this.getItem();
-+            // CraftBukkit start - Check for item breaking
-+            if (this.count == 1 && entityplayer != null) {
-+                org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerItemBreakEvent(entityplayer, this);
-+            }
-+            // CraftBukkit end
- 
-             this.shrink(1);
-             consumer.accept(item);
-@@ -770,6 +989,12 @@
-         return this.getItem().useOnRelease(this);
-     }
- 
-+    // CraftBukkit start
-+    public void restorePatch(DataComponentPatch datacomponentpatch) {
-+        this.components.restorePatch(datacomponentpatch);
-+    }
-+    // CraftBukkit end
-+
-     @Nullable
-     public <T> T set(DataComponentType<? super T> datacomponenttype, @Nullable T t0) {
-         return this.components.set(datacomponenttype, t0);
-@@ -858,7 +1083,7 @@
-     }
- 
-     private <T extends TooltipProvider> void addToTooltip(DataComponentType<T> datacomponenttype, Item.b item_b, Consumer<IChatBaseComponent> consumer, TooltipFlag tooltipflag) {
--        T t0 = (TooltipProvider) this.get(datacomponenttype);
-+        T t0 = (T) this.get(datacomponenttype); // CraftBukkit - decompile error
- 
-         if (t0 != null) {
-             t0.addToTooltip(item_b, consumer, tooltipflag);
-@@ -1091,6 +1316,13 @@
-         EnchantmentManager.forEachModifier(this, enumitemslot, biconsumer);
-     }
- 
-+    // CraftBukkit start
-+    @Deprecated
-+    public void setItem(Item item) {
-+        this.item = item;
-+    }
-+    // CraftBukkit end
-+
-     public IChatBaseComponent getDisplayName() {
-         IChatMutableComponent ichatmutablecomponent = IChatBaseComponent.empty().append(this.getHoverName());
- 
-@@ -1153,7 +1385,7 @@
-     }
- 
-     public void consume(int i, @Nullable EntityLiving entityliving) {
--        if (entityliving == null || !entityliving.hasInfiniteMaterials()) {
-+        if ((entityliving == null || !entityliving.hasInfiniteMaterials()) && this != ItemStack.EMPTY) { // CraftBukkit
-             this.shrink(i);
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemLeash.patch b/paper-server/patches/sources/net/minecraft/world/item/LeadItem.java.patch
similarity index 52%
rename from paper-server/patches/sources/net/minecraft/world/item/ItemLeash.patch
rename to paper-server/patches/sources/net/minecraft/world/item/LeadItem.java.patch
index 38caf51bfa..e45ad43774 100644
--- a/paper-server/patches/sources/net/minecraft/world/item/ItemLeash.patch
+++ b/paper-server/patches/sources/net/minecraft/world/item/LeadItem.java.patch
@@ -1,36 +1,37 @@
---- a/net/minecraft/world/item/ItemLeash.java
-+++ b/net/minecraft/world/item/ItemLeash.java
-@@ -19,6 +19,12 @@
+--- a/net/minecraft/world/item/LeadItem.java
++++ b/net/minecraft/world/item/LeadItem.java
+@@ -18,6 +18,11 @@
+ import net.minecraft.world.level.block.state.BlockState;
  import net.minecraft.world.level.gameevent.GameEvent;
- import net.minecraft.world.phys.AxisAlignedBB;
- 
+ import net.minecraft.world.phys.AABB;
 +// CraftBukkit start
 +import org.bukkit.craftbukkit.CraftEquipmentSlot;
 +import org.bukkit.craftbukkit.block.CraftBlock;
 +import org.bukkit.event.hanging.HangingPlaceEvent;
 +// CraftBukkit end
-+
- public class ItemLeash extends Item {
  
-     public ItemLeash(Item.Info item_info) {
-@@ -35,14 +41,14 @@
-             EntityHuman entityhuman = itemactioncontext.getPlayer();
+ public class LeadItem extends Item {
+ 
+@@ -35,37 +40,70 @@
+             Player entityhuman = context.getPlayer();
  
              if (!world.isClientSide && entityhuman != null) {
--                return bindPlayerMobs(entityhuman, world, blockposition);
-+                return bindPlayerMobs(entityhuman, world, blockposition, itemactioncontext.getHand()); // CraftBukkit - Pass hand
+-                return LeadItem.bindPlayerMobs(entityhuman, world, blockposition);
++                return LeadItem.bindPlayerMobs(entityhuman, world, blockposition, context.getHand()); // CraftBukkit - Pass hand
              }
          }
  
-         return EnumInteractionResult.PASS;
+         return InteractionResult.PASS;
      }
  
--    public static EnumInteractionResult bindPlayerMobs(EntityHuman entityhuman, World world, BlockPosition blockposition) {
-+    public static EnumInteractionResult bindPlayerMobs(EntityHuman entityhuman, World world, BlockPosition blockposition, net.minecraft.world.EnumHand enumhand) { // CraftBukkit - Add EnumHand
-         EntityLeash entityleash = null;
-         List<Leashable> list = leashableInArea(world, blockposition, (leashable) -> {
-             return leashable.getLeashHolder() == entityhuman;
-@@ -50,22 +56,55 @@
+-    public static InteractionResult bindPlayerMobs(Player player, Level world, BlockPos pos) {
++    public static InteractionResult bindPlayerMobs(Player entityhuman, Level world, BlockPos blockposition, net.minecraft.world.InteractionHand enumhand) { // CraftBukkit - Add EnumHand
+         LeashFenceKnotEntity entityleash = null;
+-        List<Leashable> list = LeadItem.leashableInArea(world, pos, (leashable) -> {
+-            return leashable.getLeashHolder() == player;
++        List<Leashable> list = LeadItem.leashableInArea(world, blockposition, (leashable) -> {
++            return leashable.getLeashHolder() == entityhuman;
+         });
  
          Leashable leashable;
  
@@ -38,7 +39,8 @@
 +        for (Iterator iterator = list.iterator(); iterator.hasNext();) { // CraftBukkit - handle setLeashedTo at end of loop
              leashable = (Leashable) iterator.next();
              if (entityleash == null) {
-                 entityleash = EntityLeash.getOrCreateKnot(world, blockposition);
+-                entityleash = LeashFenceKnotEntity.getOrCreateKnot(world, pos);
++                entityleash = LeashFenceKnotEntity.getOrCreateKnot(world, blockposition);
 +
 +                // CraftBukkit start - fire HangingPlaceEvent
 +                org.bukkit.inventory.EquipmentSlot hand = CraftEquipmentSlot.getHand(enumhand);
@@ -47,7 +49,7 @@
 +
 +                if (event.isCancelled()) {
 +                    entityleash.discard(null); // CraftBukkit - add Bukkit remove cause
-+                    return EnumInteractionResult.PASS;
++                    return InteractionResult.PASS;
 +                }
 +                // CraftBukkit end
                  entityleash.playPlacementSound();
@@ -66,24 +68,25 @@
          }
  
          if (!list.isEmpty()) {
-             world.gameEvent((Holder) GameEvent.BLOCK_ATTACH, blockposition, GameEvent.a.of((Entity) entityhuman));
-             return EnumInteractionResult.SUCCESS_SERVER;
+-            world.gameEvent((Holder) GameEvent.BLOCK_ATTACH, pos, GameEvent.Context.of((Entity) player));
++            world.gameEvent((Holder) GameEvent.BLOCK_ATTACH, blockposition, GameEvent.Context.of((Entity) entityhuman));
+             return InteractionResult.SUCCESS_SERVER;
          } else {
 +            // CraftBukkit start- remove leash if we do not leash any entity because of the cancelled event
 +            if (entityleash != null) {
 +                entityleash.discard(null);
 +            }
 +            // CraftBukkit end
-             return EnumInteractionResult.PASS;
+             return InteractionResult.PASS;
          }
      }
  
 +    // CraftBukkit start
-+    public static EnumInteractionResult bindPlayerMobs(EntityHuman entityhuman, World world, BlockPosition blockposition) {
-+        return bindPlayerMobs(entityhuman, world, blockposition, net.minecraft.world.EnumHand.MAIN_HAND);
++    public static InteractionResult bindPlayerMobs(Player player, Level world, BlockPos pos) {
++        return LeadItem.bindPlayerMobs(player, world, pos, net.minecraft.world.InteractionHand.MAIN_HAND);
 +    }
 +    // CraftBukkit end
 +
-     public static List<Leashable> leashableInArea(World world, BlockPosition blockposition, Predicate<Leashable> predicate) {
+     public static List<Leashable> leashableInArea(Level world, BlockPos pos, Predicate<Leashable> predicate) {
          double d0 = 7.0D;
-         int i = blockposition.getX();
+         int i = pos.getX();
diff --git a/paper-server/patches/sources/net/minecraft/world/item/MinecartItem.java.patch b/paper-server/patches/sources/net/minecraft/world/item/MinecartItem.java.patch
new file mode 100644
index 0000000000..e04ca4357f
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/MinecartItem.java.patch
@@ -0,0 +1,16 @@
+--- a/net/minecraft/world/item/MinecartItem.java
++++ b/net/minecraft/world/item/MinecartItem.java
+@@ -67,7 +67,12 @@
+                 if (world instanceof ServerLevel) {
+                     ServerLevel worldserver = (ServerLevel) world;
+ 
+-                    worldserver.addFreshEntity(entityminecartabstract);
++                    // CraftBukkit start
++                    if (org.bukkit.craftbukkit.event.CraftEventFactory.callEntityPlaceEvent(context, entityminecartabstract).isCancelled()) {
++                        return InteractionResult.FAIL;
++                    }
++                    // CraftBukkit end
++                    if (!worldserver.addFreshEntity(entityminecartabstract)) return InteractionResult.PASS; // CraftBukkit
+                     worldserver.gameEvent((Holder) GameEvent.ENTITY_PLACE, blockposition, GameEvent.Context.of(context.getPlayer(), worldserver.getBlockState(blockposition.below())));
+                 }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ProjectileWeaponItem.java.patch b/paper-server/patches/sources/net/minecraft/world/item/ProjectileWeaponItem.java.patch
new file mode 100644
index 0000000000..888c931898
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/ProjectileWeaponItem.java.patch
@@ -0,0 +1,31 @@
+--- a/net/minecraft/world/item/ProjectileWeaponItem.java
++++ b/net/minecraft/world/item/ProjectileWeaponItem.java
+@@ -54,9 +54,25 @@
+                 float f6 = f4 + f5 * (float) ((i + 1) / 2) * f3;
+ 
+                 f5 = -f5;
+-                Projectile.spawnProjectile(this.createProjectile(world, shooter, stack, itemstack1, critical), world, itemstack1, (iprojectile) -> {
+-                    this.shootProjectile(shooter, iprojectile, i, speed, divergence, f6, target);
+-                });
++                // CraftBukkit start
++                Projectile iprojectile = this.createProjectile(world, shooter, stack, itemstack1, critical);
++                this.shootProjectile(shooter, iprojectile, i, speed, divergence, f6, target);
++
++                org.bukkit.event.entity.EntityShootBowEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callEntityShootBowEvent(shooter, stack, itemstack1, iprojectile, hand, speed, true);
++                if (event.isCancelled()) {
++                    event.getProjectile().remove();
++                    return;
++                }
++
++                if (event.getProjectile() == iprojectile.getBukkitEntity()) {
++                    if (Projectile.spawnProjectile(iprojectile, world, itemstack1).isRemoved()) {
++                        if (shooter instanceof net.minecraft.server.level.ServerPlayer) {
++                            ((net.minecraft.server.level.ServerPlayer) shooter).getBukkitEntity().updateInventory();
++                        }
++                        return;
++                    }
++                }
++                // CraftBukkit end
+                 stack.hurtAndBreak(this.getDurabilityUse(itemstack1), shooter, LivingEntity.getSlotForHand(hand));
+                 if (stack.isEmpty()) {
+                     break;
diff --git a/paper-server/patches/sources/net/minecraft/world/item/SignItem.java.patch b/paper-server/patches/sources/net/minecraft/world/item/SignItem.java.patch
new file mode 100644
index 0000000000..50c0cdf7d1
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/SignItem.java.patch
@@ -0,0 +1,23 @@
+--- a/net/minecraft/world/item/SignItem.java
++++ b/net/minecraft/world/item/SignItem.java
+@@ -13,6 +13,8 @@
+ 
+ public class SignItem extends StandingAndWallBlockItem {
+ 
++    public static BlockPos openSign; // CraftBukkit
++
+     public SignItem(Block standingBlock, Block wallBlock, Item.Properties settings) {
+         super(standingBlock, wallBlock, Direction.DOWN, settings);
+     }
+@@ -35,7 +37,10 @@
+                 if (block instanceof SignBlock) {
+                     SignBlock blocksign = (SignBlock) block;
+ 
+-                    blocksign.openTextEdit(player, tileentitysign, true);
++                    // CraftBukkit start - SPIGOT-4678
++                    // blocksign.openTextEdit(entityhuman, tileentitysign, true);
++                    SignItem.openSign = pos;
++                    // CraftBukkit end
+                 }
+             }
+         }
diff --git a/paper-server/patches/sources/net/minecraft/world/item/SnowballItem.java.patch b/paper-server/patches/sources/net/minecraft/world/item/SnowballItem.java.patch
new file mode 100644
index 0000000000..04698a94b1
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/SnowballItem.java.patch
@@ -0,0 +1,27 @@
+--- a/net/minecraft/world/item/SnowballItem.java
++++ b/net/minecraft/world/item/SnowballItem.java
+@@ -25,13 +25,21 @@
+     public InteractionResult use(Level world, Player user, InteractionHand hand) {
+         ItemStack itemstack = user.getItemInHand(hand);
+ 
+-        world.playSound((Player) null, user.getX(), user.getY(), user.getZ(), SoundEvents.SNOWBALL_THROW, SoundSource.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
++        // CraftBukkit start - moved down
++        // world.playSound((EntityHuman) null, entityhuman.getX(), entityhuman.getY(), entityhuman.getZ(), SoundEffects.SNOWBALL_THROW, SoundCategory.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
+         if (world instanceof ServerLevel worldserver) {
+-            Projectile.spawnProjectileFromRotation(Snowball::new, worldserver, itemstack, user, 0.0F, SnowballItem.PROJECTILE_SHOOT_POWER, 1.0F);
++            if (Projectile.spawnProjectileFromRotation(Snowball::new, worldserver, itemstack, user, 0.0F, SnowballItem.PROJECTILE_SHOOT_POWER, 1.0F).isAlive()) {
++                itemstack.consume(1, user);
++
++                world.playSound((Player) null, user.getX(), user.getY(), user.getZ(), SoundEvents.SNOWBALL_THROW, SoundSource.NEUTRAL, 0.5F, 0.4F / (world.getRandom().nextFloat() * 0.4F + 0.8F));
++            } else if (user instanceof net.minecraft.server.level.ServerPlayer) {
++                ((net.minecraft.server.level.ServerPlayer) user).getBukkitEntity().updateInventory();
++            }
++            // CraftBukkit end
+         }
+ 
+         user.awardStat(Stats.ITEM_USED.get(this));
+-        itemstack.consume(1, user);
++        // itemstack.consume(1, entityhuman); // CraftBukkit - moved up
+         return InteractionResult.SUCCESS;
+     }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/item/SpawnEggItem.java.patch b/paper-server/patches/sources/net/minecraft/world/item/SpawnEggItem.java.patch
new file mode 100644
index 0000000000..b05a8530c5
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/SpawnEggItem.java.patch
@@ -0,0 +1,15 @@
+--- a/net/minecraft/world/item/SpawnEggItem.java
++++ b/net/minecraft/world/item/SpawnEggItem.java
+@@ -176,10 +176,10 @@
+                     return Optional.empty();
+                 } else {
+                     ((Mob) object).moveTo(pos.x(), pos.y(), pos.z(), 0.0F, 0.0F);
+-                    world.addFreshEntityWithPassengers((Entity) object);
++                    world.addFreshEntityWithPassengers((Entity) object, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER_EGG); // CraftBukkit
+                     ((Mob) object).setCustomName((Component) stack.get(DataComponents.CUSTOM_NAME));
+                     stack.consume(1, user);
+-                    return Optional.of(object);
++                    return Optional.of((Mob) object); // CraftBukkit - decompile error
+                 }
+             }
+         }
diff --git a/paper-server/patches/sources/net/minecraft/world/item/StandingAndWallBlockItem.java.patch b/paper-server/patches/sources/net/minecraft/world/item/StandingAndWallBlockItem.java.patch
new file mode 100644
index 0000000000..4f831f8e2b
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/StandingAndWallBlockItem.java.patch
@@ -0,0 +1,41 @@
+--- a/net/minecraft/world/item/StandingAndWallBlockItem.java
++++ b/net/minecraft/world/item/StandingAndWallBlockItem.java
+@@ -4,12 +4,17 @@
+ import javax.annotation.Nullable;
+ import net.minecraft.core.BlockPos;
+ import net.minecraft.core.Direction;
++import net.minecraft.server.level.ServerPlayer;
+ import net.minecraft.world.item.context.BlockPlaceContext;
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.LevelReader;
+ import net.minecraft.world.level.block.Block;
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.phys.shapes.CollisionContext;
++import org.bukkit.craftbukkit.block.CraftBlock;
++import org.bukkit.craftbukkit.block.data.CraftBlockData;
++import org.bukkit.event.block.BlockCanBuildEvent;
++// CraftBukkit end
+ 
+ public class StandingAndWallBlockItem extends BlockItem {
+ 
+@@ -49,7 +54,19 @@
+             }
+         }
+ 
+-        return iblockdata1 != null && world.isUnobstructed(iblockdata1, blockposition, CollisionContext.empty()) ? iblockdata1 : null;
++        // CraftBukkit start
++        if (iblockdata1 != null) {
++            boolean defaultReturn = world.isUnobstructed(iblockdata1, blockposition, CollisionContext.empty());
++            org.bukkit.entity.Player player = (context.getPlayer() instanceof ServerPlayer) ? (org.bukkit.entity.Player) context.getPlayer().getBukkitEntity() : null;
++
++            BlockCanBuildEvent event = new BlockCanBuildEvent(CraftBlock.at(world, blockposition), player, CraftBlockData.fromData(iblockdata1), defaultReturn);
++            context.getLevel().getCraftServer().getPluginManager().callEvent(event);
++
++            return (event.isBuildable()) ? iblockdata1 : null;
++        } else {
++            return null;
++        }
++        // CraftBukkit end
+     }
+ 
+     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/item/ItemTrident.patch b/paper-server/patches/sources/net/minecraft/world/item/TridentItem.java.patch
similarity index 54%
rename from paper-server/patches/sources/net/minecraft/world/item/ItemTrident.patch
rename to paper-server/patches/sources/net/minecraft/world/item/TridentItem.java.patch
index ec20c66e6b..72573d5324 100644
--- a/paper-server/patches/sources/net/minecraft/world/item/ItemTrident.patch
+++ b/paper-server/patches/sources/net/minecraft/world/item/TridentItem.java.patch
@@ -1,33 +1,33 @@
---- a/net/minecraft/world/item/ItemTrident.java
-+++ b/net/minecraft/world/item/ItemTrident.java
+--- a/net/minecraft/world/item/TridentItem.java
++++ b/net/minecraft/world/item/TridentItem.java
 @@ -86,9 +86,19 @@
-                     if (world instanceof WorldServer) {
-                         WorldServer worldserver = (WorldServer) world;
+                     if (world instanceof ServerLevel) {
+                         ServerLevel worldserver = (ServerLevel) world;
  
--                        itemstack.hurtWithoutBreaking(1, entityhuman);
+-                        stack.hurtWithoutBreaking(1, entityhuman);
 +                        // itemstack.hurtWithoutBreaking(1, entityhuman); // CraftBukkit - moved down
                          if (f == 0.0F) {
-                             EntityThrownTrident entitythrowntrident = (EntityThrownTrident) IProjectile.spawnProjectileFromRotation(EntityThrownTrident::new, worldserver, itemstack, entityhuman, 0.0F, 2.5F, 1.0F);
+                             ThrownTrident entitythrowntrident = (ThrownTrident) Projectile.spawnProjectileFromRotation(ThrownTrident::new, worldserver, stack, entityhuman, 0.0F, 2.5F, 1.0F);
 +                            // CraftBukkit start
 +                            if (entitythrowntrident.isRemoved()) {
-+                                if (entityhuman instanceof net.minecraft.server.level.EntityPlayer) {
-+                                    ((net.minecraft.server.level.EntityPlayer) entityhuman).getBukkitEntity().updateInventory();
++                                if (entityhuman instanceof net.minecraft.server.level.ServerPlayer) {
++                                    ((net.minecraft.server.level.ServerPlayer) entityhuman).getBukkitEntity().updateInventory();
 +                                }
 +                                return false;
 +                            }
-+                            itemstack.hurtWithoutBreaking(1, entityhuman);
-+                            entitythrowntrident.pickupItemStack = itemstack.copy(); // SPIGOT-4511 update since damage call moved
++                            stack.hurtWithoutBreaking(1, entityhuman);
++                            entitythrowntrident.pickupItemStack = stack.copy(); // SPIGOT-4511 update since damage call moved
 +                            // CraftBukkit end
  
                              if (entityhuman.hasInfiniteMaterials()) {
-                                 entitythrowntrident.pickup = EntityArrow.PickupStatus.CREATIVE_ONLY;
+                                 entitythrowntrident.pickup = AbstractArrow.Pickup.CREATIVE_ONLY;
 @@ -98,6 +108,10 @@
  
-                             world.playSound((EntityHuman) null, (Entity) entitythrowntrident, (SoundEffect) holder.value(), SoundCategory.PLAYERS, 1.0F, 1.0F);
+                             world.playSound((Player) null, (Entity) entitythrowntrident, (SoundEvent) holder.value(), SoundSource.PLAYERS, 1.0F, 1.0F);
                              return true;
 +                            // CraftBukkit start - SPIGOT-5458 also need in this branch :(
 +                        } else {
-+                            itemstack.hurtWithoutBreaking(1, entityhuman);
++                            stack.hurtWithoutBreaking(1, entityhuman);
 +                            // CraftBukkkit end
                          }
                      }
@@ -36,7 +36,7 @@
                          f3 *= f / f6;
                          f4 *= f / f6;
                          f5 *= f / f6;
-+                        org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerRiptideEvent(entityhuman, itemstack, f3, f4, f5); // CraftBukkit
++                        org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerRiptideEvent(entityhuman, stack, f3, f4, f5); // CraftBukkit
                          entityhuman.push((double) f3, (double) f4, (double) f5);
-                         entityhuman.startAutoSpinAttack(20, 8.0F, itemstack);
+                         entityhuman.startAutoSpinAttack(20, 8.0F, stack);
                          if (entityhuman.onGround()) {
diff --git a/paper-server/patches/sources/net/minecraft/world/item/alchemy/PotionContents.java.patch b/paper-server/patches/sources/net/minecraft/world/item/alchemy/PotionContents.java.patch
new file mode 100644
index 0000000000..163fbb5056
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/alchemy/PotionContents.java.patch
@@ -0,0 +1,20 @@
+--- a/net/minecraft/world/item/alchemy/PotionContents.java
++++ b/net/minecraft/world/item/alchemy/PotionContents.java
+@@ -93,7 +93,7 @@
+     }
+ 
+     public PotionContents withEffectAdded(MobEffectInstance customEffect) {
+-        return new PotionContents(this.potion, this.customColor, Util.copyAndAdd(this.customEffects, (Object) customEffect), this.customName);
++        return new PotionContents(this.potion, this.customColor, Util.copyAndAdd(this.customEffects, customEffect), this.customName); // CraftBukkit - decompile error
+     }
+ 
+     public int getColor() {
+@@ -172,7 +172,7 @@
+                 if (((MobEffect) mobeffect.getEffect().value()).isInstantenous()) {
+                     ((MobEffect) mobeffect.getEffect().value()).applyInstantenousEffect(worldserver, entityhuman2, entityhuman2, user, mobeffect.getAmplifier(), 1.0D);
+                 } else {
+-                    user.addEffect(mobeffect);
++                    user.addEffect(mobeffect, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.POTION_DRINK); // CraftBukkit
+                 }
+ 
+             });
diff --git a/paper-server/patches/sources/net/minecraft/world/item/alchemy/PotionContents.patch b/paper-server/patches/sources/net/minecraft/world/item/alchemy/PotionContents.patch
deleted file mode 100644
index 63fdb46f42..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/alchemy/PotionContents.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/net/minecraft/world/item/alchemy/PotionContents.java
-+++ b/net/minecraft/world/item/alchemy/PotionContents.java
-@@ -93,7 +93,7 @@
-     }
- 
-     public PotionContents withEffectAdded(MobEffect mobeffect) {
--        return new PotionContents(this.potion, this.customColor, SystemUtils.copyAndAdd(this.customEffects, (Object) mobeffect), this.customName);
-+        return new PotionContents(this.potion, this.customColor, SystemUtils.copyAndAdd(this.customEffects, mobeffect), this.customName); // CraftBukkit - decompile error
-     }
- 
-     public int getColor() {
-@@ -172,7 +172,7 @@
-                 if (((MobEffectList) mobeffect.getEffect().value()).isInstantenous()) {
-                     ((MobEffectList) mobeffect.getEffect().value()).applyInstantenousEffect(worldserver, entityhuman2, entityhuman2, entityliving, mobeffect.getAmplifier(), 1.0D);
-                 } else {
--                    entityliving.addEffect(mobeffect);
-+                    entityliving.addEffect(mobeffect, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.POTION_DRINK); // CraftBukkit
-                 }
- 
-             });
diff --git a/paper-server/patches/sources/net/minecraft/world/item/component/Consumable.patch b/paper-server/patches/sources/net/minecraft/world/item/component/Consumable.java.patch
similarity index 63%
rename from paper-server/patches/sources/net/minecraft/world/item/component/Consumable.patch
rename to paper-server/patches/sources/net/minecraft/world/item/component/Consumable.java.patch
index 67770c3264..8420f1012f 100644
--- a/paper-server/patches/sources/net/minecraft/world/item/component/Consumable.patch
+++ b/paper-server/patches/sources/net/minecraft/world/item/component/Consumable.java.patch
@@ -1,7 +1,7 @@
 --- a/net/minecraft/world/item/component/Consumable.java
 +++ b/net/minecraft/world/item/component/Consumable.java
 @@ -29,6 +29,11 @@
- import net.minecraft.world.level.World;
+ import net.minecraft.world.level.Level;
  import net.minecraft.world.level.gameevent.GameEvent;
  
 +// CraftBukkit start
@@ -9,36 +9,36 @@
 +import org.bukkit.event.entity.EntityPotionEffectEvent;
 +// CraftBukkit end
 +
- public record Consumable(float consumeSeconds, ItemUseAnimation animation, Holder<SoundEffect> sound, boolean hasConsumeParticles, List<ConsumeEffect> onConsumeEffects) {
+ public record Consumable(float consumeSeconds, ItemUseAnimation animation, Holder<SoundEvent> sound, boolean hasConsumeParticles, List<ConsumeEffect> onConsumeEffects) {
  
      public static final float DEFAULT_CONSUME_SECONDS = 1.6F;
 @@ -69,8 +74,19 @@
-             consumablelistener.onConsume(world, entityliving, itemstack, this);
+             consumablelistener.onConsume(world, user, stack, this);
          });
          if (!world.isClientSide) {
 +            // CraftBukkit start
 +            EntityPotionEffectEvent.Cause cause;
-+            if (itemstack.is(Items.MILK_BUCKET)) {
++            if (stack.is(Items.MILK_BUCKET)) {
 +                cause = EntityPotionEffectEvent.Cause.MILK;
-+            } else if (itemstack.is(Items.POTION)) {
++            } else if (stack.is(Items.POTION)) {
 +                cause = EntityPotionEffectEvent.Cause.POTION_DRINK;
 +            } else {
 +                cause = EntityPotionEffectEvent.Cause.FOOD;
 +            }
 +
              this.onConsumeEffects.forEach((consumeeffect) -> {
--                consumeeffect.apply(world, itemstack, entityliving);
-+                consumeeffect.apply(world, itemstack, entityliving, cause);
+-                consumeeffect.apply(world, stack, user);
++                consumeeffect.apply(world, stack, user, cause);
 +                // CraftBukkit end
              });
          }
  
 @@ -79,6 +95,15 @@
-         return itemstack;
+         return stack;
      }
  
 +    // CraftBukkit start
-+    public void cancelUsingItem(net.minecraft.server.level.EntityPlayer entityplayer, ItemStack itemstack) {
++    public void cancelUsingItem(net.minecraft.server.level.ServerPlayer entityplayer, ItemStack itemstack) {
 +        itemstack.getAllOfType(ConsumableListener.class).forEach((consumablelistener) -> {
 +            consumablelistener.cancelUsingItem(entityplayer, itemstack);
 +        });
@@ -46,6 +46,6 @@
 +    }
 +    // CraftBukkit end
 +
-     public boolean canConsume(EntityLiving entityliving, ItemStack itemstack) {
-         FoodInfo foodinfo = (FoodInfo) itemstack.get(DataComponents.FOOD);
+     public boolean canConsume(LivingEntity user, ItemStack stack) {
+         FoodProperties foodinfo = (FoodProperties) stack.get(DataComponents.FOOD);
  
diff --git a/paper-server/patches/sources/net/minecraft/world/item/component/ConsumableListener.java.patch b/paper-server/patches/sources/net/minecraft/world/item/component/ConsumableListener.java.patch
new file mode 100644
index 0000000000..5d14084425
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/component/ConsumableListener.java.patch
@@ -0,0 +1,9 @@
+--- a/net/minecraft/world/item/component/ConsumableListener.java
++++ b/net/minecraft/world/item/component/ConsumableListener.java
+@@ -7,4 +7,6 @@
+ public interface ConsumableListener {
+ 
+     void onConsume(Level world, LivingEntity user, ItemStack stack, Consumable consumable);
++
++    default void cancelUsingItem(net.minecraft.server.level.ServerPlayer entityplayer, ItemStack itemstack) {} // CraftBukkit
+ }
diff --git a/paper-server/patches/sources/net/minecraft/world/item/component/ConsumableListener.patch b/paper-server/patches/sources/net/minecraft/world/item/component/ConsumableListener.patch
deleted file mode 100644
index d3e222f45c..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/component/ConsumableListener.patch
+++ /dev/null
@@ -1,9 +0,0 @@
---- a/net/minecraft/world/item/component/ConsumableListener.java
-+++ b/net/minecraft/world/item/component/ConsumableListener.java
-@@ -7,4 +7,6 @@
- public interface ConsumableListener {
- 
-     void onConsume(World world, EntityLiving entityliving, ItemStack itemstack, Consumable consumable);
-+
-+    default void cancelUsingItem(net.minecraft.server.level.EntityPlayer entityplayer, ItemStack itemstack) {} // CraftBukkit
- }
diff --git a/paper-server/patches/sources/net/minecraft/world/item/component/DeathProtection.patch b/paper-server/patches/sources/net/minecraft/world/item/component/DeathProtection.java.patch
similarity index 76%
rename from paper-server/patches/sources/net/minecraft/world/item/component/DeathProtection.patch
rename to paper-server/patches/sources/net/minecraft/world/item/component/DeathProtection.java.patch
index 14197c4bd0..8516839b42 100644
--- a/paper-server/patches/sources/net/minecraft/world/item/component/DeathProtection.patch
+++ b/paper-server/patches/sources/net/minecraft/world/item/component/DeathProtection.java.patch
@@ -15,8 +15,8 @@
          while (iterator.hasNext()) {
              ConsumeEffect consumeeffect = (ConsumeEffect) iterator.next();
  
--            consumeeffect.apply(entityliving.level(), itemstack, entityliving);
-+            consumeeffect.apply(entityliving.level(), itemstack, entityliving, EntityPotionEffectEvent.Cause.TOTEM); // CraftBukkit
+-            consumeeffect.apply(entity.level(), stack, entity);
++            consumeeffect.apply(entity.level(), stack, entity, EntityPotionEffectEvent.Cause.TOTEM); // CraftBukkit
          }
  
      }
diff --git a/paper-server/patches/sources/net/minecraft/world/item/component/SuspiciousStewEffects.java.patch b/paper-server/patches/sources/net/minecraft/world/item/component/SuspiciousStewEffects.java.patch
new file mode 100644
index 0000000000..3578ba2d3a
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/component/SuspiciousStewEffects.java.patch
@@ -0,0 +1,28 @@
+--- a/net/minecraft/world/item/component/SuspiciousStewEffects.java
++++ b/net/minecraft/world/item/component/SuspiciousStewEffects.java
+@@ -29,7 +29,7 @@
+     public static final StreamCodec<RegistryFriendlyByteBuf, SuspiciousStewEffects> STREAM_CODEC = SuspiciousStewEffects.Entry.STREAM_CODEC.apply(ByteBufCodecs.list()).map(SuspiciousStewEffects::new, SuspiciousStewEffects::effects);
+ 
+     public SuspiciousStewEffects withEffectAdded(SuspiciousStewEffects.Entry stewEffect) {
+-        return new SuspiciousStewEffects(Util.copyAndAdd(this.effects, (Object) stewEffect));
++        return new SuspiciousStewEffects(Util.copyAndAdd(this.effects, stewEffect)); // CraftBukkit - decompile error
+     }
+ 
+     @Override
+@@ -44,7 +44,16 @@
+ 
+     }
+ 
++    // CraftBukkit start
+     @Override
++    public void cancelUsingItem(net.minecraft.server.level.ServerPlayer entityplayer, ItemStack itemstack) {
++        for (SuspiciousStewEffects.Entry suspicioussteweffects_a : this.effects) {
++            entityplayer.connection.send(new net.minecraft.network.protocol.game.ClientboundRemoveMobEffectPacket(entityplayer.getId(), suspicioussteweffects_a.effect()));
++        }
++    }
++    // CraftBukkit end
++
++    @Override
+     public void addToTooltip(Item.TooltipContext context, Consumer<Component> tooltip, TooltipFlag type) {
+         if (type.isCreative()) {
+             List<MobEffectInstance> list = new ArrayList();
diff --git a/paper-server/patches/sources/net/minecraft/world/item/component/SuspiciousStewEffects.patch b/paper-server/patches/sources/net/minecraft/world/item/component/SuspiciousStewEffects.patch
deleted file mode 100644
index b8ba7b7f0f..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/component/SuspiciousStewEffects.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- a/net/minecraft/world/item/component/SuspiciousStewEffects.java
-+++ b/net/minecraft/world/item/component/SuspiciousStewEffects.java
-@@ -29,7 +29,7 @@
-     public static final StreamCodec<RegistryFriendlyByteBuf, SuspiciousStewEffects> STREAM_CODEC = SuspiciousStewEffects.a.STREAM_CODEC.apply(ByteBufCodecs.list()).map(SuspiciousStewEffects::new, SuspiciousStewEffects::effects);
- 
-     public SuspiciousStewEffects withEffectAdded(SuspiciousStewEffects.a suspicioussteweffects_a) {
--        return new SuspiciousStewEffects(SystemUtils.copyAndAdd(this.effects, (Object) suspicioussteweffects_a));
-+        return new SuspiciousStewEffects(SystemUtils.copyAndAdd(this.effects, suspicioussteweffects_a)); // CraftBukkit - decompile error
-     }
- 
-     @Override
-@@ -44,6 +44,15 @@
- 
-     }
- 
-+    // CraftBukkit start
-+    @Override
-+    public void cancelUsingItem(net.minecraft.server.level.EntityPlayer entityplayer, ItemStack itemstack) {
-+        for (SuspiciousStewEffects.a suspicioussteweffects_a : this.effects) {
-+            entityplayer.connection.send(new net.minecraft.network.protocol.game.PacketPlayOutRemoveEntityEffect(entityplayer.getId(), suspicioussteweffects_a.effect()));
-+        }
-+    }
-+    // CraftBukkit end
-+
-     @Override
-     public void addToTooltip(Item.b item_b, Consumer<IChatBaseComponent> consumer, TooltipFlag tooltipflag) {
-         if (tooltipflag.isCreative()) {
diff --git a/paper-server/patches/sources/net/minecraft/world/item/consume_effects/ApplyStatusEffectsConsumeEffect.java.patch b/paper-server/patches/sources/net/minecraft/world/item/consume_effects/ApplyStatusEffectsConsumeEffect.java.patch
new file mode 100644
index 0000000000..2551be5478
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/consume_effects/ApplyStatusEffectsConsumeEffect.java.patch
@@ -0,0 +1,32 @@
+--- a/net/minecraft/world/item/consume_effects/ApplyStatusEffectsConsumeEffect.java
++++ b/net/minecraft/world/item/consume_effects/ApplyStatusEffectsConsumeEffect.java
+@@ -12,6 +12,9 @@
+ import net.minecraft.world.entity.LivingEntity;
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.level.Level;
++// CraftBukkit start
++import org.bukkit.event.entity.EntityPotionEffectEvent;
++// CraftBukkit end
+ 
+ public record ApplyStatusEffectsConsumeEffect(List<MobEffectInstance> effects, float probability) implements ConsumeEffect {
+ 
+@@ -38,8 +41,8 @@
+     }
+ 
+     @Override
+-    public boolean apply(Level world, ItemStack stack, LivingEntity user) {
+-        if (user.getRandom().nextFloat() >= this.probability) {
++    public boolean apply(Level world, ItemStack itemstack, LivingEntity entityliving, EntityPotionEffectEvent.Cause cause) { // CraftBukkit
++        if (entityliving.getRandom().nextFloat() >= this.probability) {
+             return false;
+         } else {
+             boolean flag = false;
+@@ -48,7 +51,7 @@
+             while (iterator.hasNext()) {
+                 MobEffectInstance mobeffect = (MobEffectInstance) iterator.next();
+ 
+-                if (user.addEffect(new MobEffectInstance(mobeffect))) {
++                if (entityliving.addEffect(new MobEffectInstance(mobeffect), cause)) { // CraftBukkit
+                     flag = true;
+                 }
+             }
diff --git a/paper-server/patches/sources/net/minecraft/world/item/consume_effects/ApplyStatusEffectsConsumeEffect.patch b/paper-server/patches/sources/net/minecraft/world/item/consume_effects/ApplyStatusEffectsConsumeEffect.patch
deleted file mode 100644
index 2b3e144706..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/consume_effects/ApplyStatusEffectsConsumeEffect.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- a/net/minecraft/world/item/consume_effects/ApplyStatusEffectsConsumeEffect.java
-+++ b/net/minecraft/world/item/consume_effects/ApplyStatusEffectsConsumeEffect.java
-@@ -13,6 +13,10 @@
- import net.minecraft.world.item.ItemStack;
- import net.minecraft.world.level.World;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.EntityPotionEffectEvent;
-+// CraftBukkit end
-+
- public record ApplyStatusEffectsConsumeEffect(List<MobEffect> effects, float probability) implements ConsumeEffect {
- 
-     public static final MapCodec<ApplyStatusEffectsConsumeEffect> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
-@@ -38,7 +42,7 @@
-     }
- 
-     @Override
--    public boolean apply(World world, ItemStack itemstack, EntityLiving entityliving) {
-+    public boolean apply(World world, ItemStack itemstack, EntityLiving entityliving, EntityPotionEffectEvent.Cause cause) { // CraftBukkit
-         if (entityliving.getRandom().nextFloat() >= this.probability) {
-             return false;
-         } else {
-@@ -48,7 +52,7 @@
-             while (iterator.hasNext()) {
-                 MobEffect mobeffect = (MobEffect) iterator.next();
- 
--                if (entityliving.addEffect(new MobEffect(mobeffect))) {
-+                if (entityliving.addEffect(new MobEffect(mobeffect), cause)) { // CraftBukkit
-                     flag = true;
-                 }
-             }
diff --git a/paper-server/patches/sources/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.patch b/paper-server/patches/sources/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java.patch
similarity index 54%
rename from paper-server/patches/sources/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.patch
rename to paper-server/patches/sources/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java.patch
index 50d8037bb5..35168c5339 100644
--- a/paper-server/patches/sources/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.patch
+++ b/paper-server/patches/sources/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java.patch
@@ -1,24 +1,23 @@
 --- a/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java
 +++ b/net/minecraft/world/item/consume_effects/ClearAllStatusEffectsConsumeEffect.java
-@@ -7,6 +7,10 @@
+@@ -6,6 +6,9 @@
+ import net.minecraft.world.entity.LivingEntity;
  import net.minecraft.world.item.ItemStack;
- import net.minecraft.world.level.World;
- 
+ import net.minecraft.world.level.Level;
 +// CraftBukkit start
 +import org.bukkit.event.entity.EntityPotionEffectEvent;
 +// CraftBukkit end
-+
+ 
  public record ClearAllStatusEffectsConsumeEffect() implements ConsumeEffect {
  
-     public static final ClearAllStatusEffectsConsumeEffect INSTANCE = new ClearAllStatusEffectsConsumeEffect();
-@@ -19,7 +23,9 @@
+@@ -19,7 +22,9 @@
      }
  
      @Override
--    public boolean apply(World world, ItemStack itemstack, EntityLiving entityliving) {
--        return entityliving.removeAllEffects();
+-    public boolean apply(Level world, ItemStack stack, LivingEntity user) {
+-        return user.removeAllEffects();
 +    // CraftBukkit start
-+    public boolean apply(World world, ItemStack itemstack, EntityLiving entityliving, EntityPotionEffectEvent.Cause cause) {
++    public boolean apply(Level world, ItemStack itemstack, LivingEntity entityliving, EntityPotionEffectEvent.Cause cause) {
 +        return entityliving.removeAllEffects(cause);
 +        // CraftBukkit end
      }
diff --git a/paper-server/patches/sources/net/minecraft/world/item/consume_effects/ConsumeEffect.java.patch b/paper-server/patches/sources/net/minecraft/world/item/consume_effects/ConsumeEffect.java.patch
new file mode 100644
index 0000000000..c5d56842c7
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/consume_effects/ConsumeEffect.java.patch
@@ -0,0 +1,30 @@
+--- a/net/minecraft/world/item/consume_effects/ConsumeEffect.java
++++ b/net/minecraft/world/item/consume_effects/ConsumeEffect.java
+@@ -11,6 +11,9 @@
+ import net.minecraft.world.entity.LivingEntity;
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.level.Level;
++// CraftBukkit start
++import org.bukkit.event.entity.EntityPotionEffectEvent;
++// CraftBukkit end
+ 
+ public interface ConsumeEffect {
+ 
+@@ -19,8 +22,16 @@
+ 
+     ConsumeEffect.Type<? extends ConsumeEffect> getType();
+ 
+-    boolean apply(Level world, ItemStack stack, LivingEntity user);
++    // CraftBukkit start
++    default boolean apply(Level world, ItemStack stack, LivingEntity user) {
++        return this.apply(world, stack, user, EntityPotionEffectEvent.Cause.UNKNOWN);
++    }
+ 
++    default boolean apply(Level world, ItemStack itemstack, LivingEntity entityliving, EntityPotionEffectEvent.Cause cause) {
++        return this.apply(world, itemstack, entityliving);
++    }
++    // CraftBukkit end
++
+     public static record Type<T extends ConsumeEffect>(MapCodec<T> codec, StreamCodec<RegistryFriendlyByteBuf, T> streamCodec) {
+ 
+         public static final ConsumeEffect.Type<ApplyStatusEffectsConsumeEffect> APPLY_EFFECTS = register("apply_effects", ApplyStatusEffectsConsumeEffect.CODEC, ApplyStatusEffectsConsumeEffect.STREAM_CODEC);
diff --git a/paper-server/patches/sources/net/minecraft/world/item/consume_effects/ConsumeEffect.patch b/paper-server/patches/sources/net/minecraft/world/item/consume_effects/ConsumeEffect.patch
deleted file mode 100644
index d85f91059c..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/consume_effects/ConsumeEffect.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/net/minecraft/world/item/consume_effects/ConsumeEffect.java
-+++ b/net/minecraft/world/item/consume_effects/ConsumeEffect.java
-@@ -12,6 +12,10 @@
- import net.minecraft.world.item.ItemStack;
- import net.minecraft.world.level.World;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.EntityPotionEffectEvent;
-+// CraftBukkit end
-+
- public interface ConsumeEffect {
- 
-     Codec<ConsumeEffect> CODEC = BuiltInRegistries.CONSUME_EFFECT_TYPE.byNameCodec().dispatch(ConsumeEffect::getType, ConsumeEffect.a::codec);
-@@ -19,7 +23,15 @@
- 
-     ConsumeEffect.a<? extends ConsumeEffect> getType();
- 
--    boolean apply(World world, ItemStack itemstack, EntityLiving entityliving);
-+    // CraftBukkit start
-+    default boolean apply(World world, ItemStack itemstack, EntityLiving entityliving) {
-+        return this.apply(world, itemstack, entityliving, EntityPotionEffectEvent.Cause.UNKNOWN);
-+    }
-+
-+    default boolean apply(World world, ItemStack itemstack, EntityLiving entityliving, EntityPotionEffectEvent.Cause cause) {
-+        return this.apply(world, itemstack, entityliving);
-+    }
-+    // CraftBukkit end
- 
-     public static record a<T extends ConsumeEffect>(MapCodec<T> codec, StreamCodec<RegistryFriendlyByteBuf, T> streamCodec) {
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/item/consume_effects/RemoveStatusEffectsConsumeEffect.patch b/paper-server/patches/sources/net/minecraft/world/item/consume_effects/RemoveStatusEffectsConsumeEffect.java.patch
similarity index 53%
rename from paper-server/patches/sources/net/minecraft/world/item/consume_effects/RemoveStatusEffectsConsumeEffect.patch
rename to paper-server/patches/sources/net/minecraft/world/item/consume_effects/RemoveStatusEffectsConsumeEffect.java.patch
index 4e7586f72a..c5eacaef69 100644
--- a/paper-server/patches/sources/net/minecraft/world/item/consume_effects/RemoveStatusEffectsConsumeEffect.patch
+++ b/paper-server/patches/sources/net/minecraft/world/item/consume_effects/RemoveStatusEffectsConsumeEffect.java.patch
@@ -1,29 +1,28 @@
 --- a/net/minecraft/world/item/consume_effects/RemoveStatusEffectsConsumeEffect.java
 +++ b/net/minecraft/world/item/consume_effects/RemoveStatusEffectsConsumeEffect.java
-@@ -15,6 +15,10 @@
+@@ -14,6 +14,9 @@
+ import net.minecraft.world.entity.LivingEntity;
  import net.minecraft.world.item.ItemStack;
- import net.minecraft.world.level.World;
- 
+ import net.minecraft.world.level.Level;
 +// CraftBukkit start
 +import org.bukkit.event.entity.EntityPotionEffectEvent;
 +// CraftBukkit end
-+
- public record RemoveStatusEffectsConsumeEffect(HolderSet<MobEffectList> effects) implements ConsumeEffect {
  
-     public static final MapCodec<RemoveStatusEffectsConsumeEffect> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
-@@ -32,14 +36,14 @@
+ public record RemoveStatusEffectsConsumeEffect(HolderSet<MobEffect> effects) implements ConsumeEffect {
+ 
+@@ -32,14 +35,14 @@
      }
  
      @Override
--    public boolean apply(World world, ItemStack itemstack, EntityLiving entityliving) {
-+    public boolean apply(World world, ItemStack itemstack, EntityLiving entityliving, EntityPotionEffectEvent.Cause cause) { // CraftBukkit
+-    public boolean apply(Level world, ItemStack stack, LivingEntity user) {
++    public boolean apply(Level world, ItemStack itemstack, LivingEntity entityliving, EntityPotionEffectEvent.Cause cause) { // CraftBukkit
          boolean flag = false;
          Iterator iterator = this.effects.iterator();
  
          while (iterator.hasNext()) {
-             Holder<MobEffectList> holder = (Holder) iterator.next();
+             Holder<MobEffect> holder = (Holder) iterator.next();
  
--            if (entityliving.removeEffect(holder)) {
+-            if (user.removeEffect(holder)) {
 +            if (entityliving.removeEffect(holder, cause)) { // CraftBukkit
                  flag = true;
              }
diff --git a/paper-server/patches/sources/net/minecraft/world/item/consume_effects/TeleportRandomlyConsumeEffect.patch b/paper-server/patches/sources/net/minecraft/world/item/consume_effects/TeleportRandomlyConsumeEffect.java.patch
similarity index 56%
rename from paper-server/patches/sources/net/minecraft/world/item/consume_effects/TeleportRandomlyConsumeEffect.patch
rename to paper-server/patches/sources/net/minecraft/world/item/consume_effects/TeleportRandomlyConsumeEffect.java.patch
index b8af6a41f5..b419363bd1 100644
--- a/paper-server/patches/sources/net/minecraft/world/item/consume_effects/TeleportRandomlyConsumeEffect.patch
+++ b/paper-server/patches/sources/net/minecraft/world/item/consume_effects/TeleportRandomlyConsumeEffect.java.patch
@@ -2,11 +2,11 @@
 +++ b/net/minecraft/world/item/consume_effects/TeleportRandomlyConsumeEffect.java
 @@ -53,7 +53,16 @@
  
-             Vec3D vec3d = entityliving.position();
+             Vec3 vec3d = user.position();
  
--            if (entityliving.randomTeleport(d0, d1, d2, true)) {
+-            if (user.randomTeleport(d0, d1, d2, true)) {
 +            // CraftBukkit start - handle canceled status of teleport event
-+            java.util.Optional<Boolean> status = entityliving.randomTeleport(d0, d1, d2, true, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.CHORUS_FRUIT);
++            java.util.Optional<Boolean> status = user.randomTeleport(d0, d1, d2, true, org.bukkit.event.player.PlayerTeleportEvent.TeleportCause.CHORUS_FRUIT);
 +
 +            if (!status.isPresent()) {
 +                // teleport event was canceled, no more tries
@@ -15,6 +15,6 @@
 +
 +            if (status.get()) {
 +                // CraftBukkit end
-                 world.gameEvent((Holder) GameEvent.TELEPORT, vec3d, GameEvent.a.of((Entity) entityliving));
-                 SoundEffect soundeffect;
-                 SoundCategory soundcategory;
+                 world.gameEvent((Holder) GameEvent.TELEPORT, vec3d, GameEvent.Context.of((Entity) user));
+                 SoundEvent soundeffect;
+                 SoundSource soundcategory;
diff --git a/paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeBlasting.patch b/paper-server/patches/sources/net/minecraft/world/item/crafting/BlastingRecipe.java.patch
similarity index 74%
rename from paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeBlasting.patch
rename to paper-server/patches/sources/net/minecraft/world/item/crafting/BlastingRecipe.java.patch
index 3adff4ba81..26a37bbc25 100644
--- a/paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeBlasting.patch
+++ b/paper-server/patches/sources/net/minecraft/world/item/crafting/BlastingRecipe.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/world/item/crafting/RecipeBlasting.java
-+++ b/net/minecraft/world/item/crafting/RecipeBlasting.java
+--- a/net/minecraft/world/item/crafting/BlastingRecipe.java
++++ b/net/minecraft/world/item/crafting/BlastingRecipe.java
 @@ -4,6 +4,14 @@
  import net.minecraft.world.item.ItemStack;
  import net.minecraft.world.item.Items;
@@ -12,9 +12,9 @@
 +import org.bukkit.inventory.Recipe;
 +// CraftBukkit end
 +
- public class RecipeBlasting extends RecipeCooking {
+ public class BlastingRecipe extends AbstractCookingRecipe {
  
-     public RecipeBlasting(String s, CookingBookCategory cookingbookcategory, RecipeItemStack recipeitemstack, ItemStack itemstack, float f, int i) {
+     public BlastingRecipe(String group, CookingBookCategory category, Ingredient ingredient, ItemStack result, float experience, int cookingTime) {
 @@ -43,4 +51,17 @@
  
          return recipebookcategory;
diff --git a/paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeCampfire.patch b/paper-server/patches/sources/net/minecraft/world/item/crafting/CampfireCookingRecipe.java.patch
similarity index 73%
rename from paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeCampfire.patch
rename to paper-server/patches/sources/net/minecraft/world/item/crafting/CampfireCookingRecipe.java.patch
index 17887eef2f..039e214990 100644
--- a/paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeCampfire.patch
+++ b/paper-server/patches/sources/net/minecraft/world/item/crafting/CampfireCookingRecipe.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/world/item/crafting/RecipeCampfire.java
-+++ b/net/minecraft/world/item/crafting/RecipeCampfire.java
+--- a/net/minecraft/world/item/crafting/CampfireCookingRecipe.java
++++ b/net/minecraft/world/item/crafting/CampfireCookingRecipe.java
 @@ -4,6 +4,14 @@
  import net.minecraft.world.item.ItemStack;
  import net.minecraft.world.item.Items;
@@ -12,9 +12,9 @@
 +import org.bukkit.inventory.Recipe;
 +// CraftBukkit end
 +
- public class RecipeCampfire extends RecipeCooking {
+ public class CampfireCookingRecipe extends AbstractCookingRecipe {
  
-     public RecipeCampfire(String s, CookingBookCategory cookingbookcategory, RecipeItemStack recipeitemstack, ItemStack itemstack, float f, int i) {
+     public CampfireCookingRecipe(String group, CookingBookCategory category, Ingredient ingredient, ItemStack result, float experience, int cookingTime) {
 @@ -29,4 +37,17 @@
      public RecipeBookCategory recipeBookCategory() {
          return RecipeBookCategories.CAMPFIRE;
diff --git a/paper-server/patches/sources/net/minecraft/world/item/crafting/CraftingManager.patch b/paper-server/patches/sources/net/minecraft/world/item/crafting/CraftingManager.patch
deleted file mode 100644
index 82f29fa191..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/crafting/CraftingManager.patch
+++ /dev/null
@@ -1,93 +0,0 @@
---- a/net/minecraft/world/item/crafting/CraftingManager.java
-+++ b/net/minecraft/world/item/crafting/CraftingManager.java
-@@ -39,6 +39,11 @@
- import net.minecraft.world.level.World;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import java.util.Collections;
-+import net.minecraft.server.MinecraftServer;
-+// CraftBukkit end
-+
- public class CraftingManager extends ResourceDataAbstract<RecipeMap> implements RecipeAccess {
- 
-     private static final Logger LOGGER = LogUtils.getLogger();
-@@ -111,7 +116,25 @@
-         CraftingManager.LOGGER.info("Loaded {} recipes", recipemap.values().size());
-     }
- 
-+    // CraftBukkit start
-+    public void addRecipe(RecipeHolder<?> irecipe) {
-+        this.recipes.addRecipe(irecipe);
-+        finalizeRecipeLoading();
-+    }
-+
-+    private FeatureFlagSet featureflagset;
-+
-+    public void finalizeRecipeLoading() {
-+        if (featureflagset != null) {
-+            finalizeRecipeLoading(featureflagset);
-+
-+            MinecraftServer.getServer().getPlayerList().reloadRecipes();
-+        }
-+    }
-+
-     public void finalizeRecipeLoading(FeatureFlagSet featureflagset) {
-+        this.featureflagset = featureflagset;
-+        // CraftBukkit end
-         List<SelectableRecipe.a<RecipeStonecutting>> list = new ArrayList();
-         List<CraftingManager.b> list1 = CraftingManager.RECIPE_PROPERTY_SETS.entrySet().stream().map((entry) -> {
-             return new CraftingManager.b((ResourceKey) entry.getKey(), (CraftingManager.c) entry.getValue());
-@@ -130,7 +153,7 @@
-                     RecipeStonecutting recipestonecutting = (RecipeStonecutting) irecipe;
- 
-                     if (isIngredientEnabled(featureflagset, recipestonecutting.input()) && recipestonecutting.resultDisplay().isEnabled(featureflagset)) {
--                        list.add(new SelectableRecipe.a<>(recipestonecutting.input(), new SelectableRecipe<>(recipestonecutting.resultDisplay(), Optional.of(recipeholder))));
-+                        list.add(new SelectableRecipe.a<RecipeStonecutting>(recipestonecutting.input(), new SelectableRecipe<>(recipestonecutting.resultDisplay(), Optional.of((RecipeHolder<RecipeStonecutting>) recipeholder)))); // CraftBukkit - decompile error
-                     }
-                 }
- 
-@@ -172,7 +195,10 @@
-     }
- 
-     public <I extends RecipeInput, T extends IRecipe<I>> Optional<RecipeHolder<T>> getRecipeFor(Recipes<T> recipes, I i0, World world) {
--        return this.recipes.getRecipesFor(recipes, i0, world).findFirst();
-+        // CraftBukkit start
-+        List<RecipeHolder<T>> list = this.recipes.getRecipesFor(recipes, i0, world).toList();
-+        return (list.isEmpty()) ? Optional.empty() : Optional.of(list.getLast()); // CraftBukkit - SPIGOT-4638: last recipe gets priority
-+        // CraftBukkit end
-     }
- 
-     public Optional<RecipeHolder<?>> byKey(ResourceKey<IRecipe<?>> resourcekey) {
-@@ -183,7 +209,7 @@
-     private <T extends IRecipe<?>> RecipeHolder<T> byKeyTyped(Recipes<T> recipes, ResourceKey<IRecipe<?>> resourcekey) {
-         RecipeHolder<?> recipeholder = this.recipes.byKey(resourcekey);
- 
--        return recipeholder != null && recipeholder.value().getType().equals(recipes) ? recipeholder : null;
-+        return recipeholder != null && recipeholder.value().getType().equals(recipes) ? (RecipeHolder) recipeholder : null; // CraftBukkit - decompile error
-     }
- 
-     public Map<ResourceKey<RecipePropertySet>, RecipePropertySet> getSynchronizedItemProperties() {
-@@ -231,6 +257,22 @@
-         return new RecipeHolder<>(resourcekey, irecipe);
-     }
- 
-+    // CraftBukkit start
-+    public boolean removeRecipe(ResourceKey<IRecipe<?>> mcKey) {
-+        boolean removed = this.recipes.removeRecipe(mcKey);
-+        if (removed) {
-+            finalizeRecipeLoading();
-+        }
-+
-+        return removed;
-+    }
-+
-+    public void clearRecipes() {
-+        this.recipes = RecipeMap.create(Collections.emptyList());
-+        finalizeRecipeLoading();
-+    }
-+    // CraftBukkit end
-+
-     public static <I extends RecipeInput, T extends IRecipe<I>> CraftingManager.a<I, T> createCheck(final Recipes<T> recipes) {
-         return new CraftingManager.a<I, T>() {
-             @Nullable
diff --git a/paper-server/patches/sources/net/minecraft/world/item/crafting/IRecipeComplex.patch b/paper-server/patches/sources/net/minecraft/world/item/crafting/CustomRecipe.java.patch
similarity index 59%
rename from paper-server/patches/sources/net/minecraft/world/item/crafting/IRecipeComplex.patch
rename to paper-server/patches/sources/net/minecraft/world/item/crafting/CustomRecipe.java.patch
index 911c079072..773c84fb8b 100644
--- a/paper-server/patches/sources/net/minecraft/world/item/crafting/IRecipeComplex.patch
+++ b/paper-server/patches/sources/net/minecraft/world/item/crafting/CustomRecipe.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/world/item/crafting/IRecipeComplex.java
-+++ b/net/minecraft/world/item/crafting/IRecipeComplex.java
+--- a/net/minecraft/world/item/crafting/CustomRecipe.java
++++ b/net/minecraft/world/item/crafting/CustomRecipe.java
 @@ -8,6 +8,15 @@
  import net.minecraft.network.RegistryFriendlyByteBuf;
  import net.minecraft.network.codec.StreamCodec;
@@ -13,12 +13,12 @@
 +import org.bukkit.inventory.Recipe;
 +// CraftBukkit end
 +
- public abstract class IRecipeComplex implements RecipeCrafting {
+ public abstract class CustomRecipe implements CraftingRecipe {
  
      private final CraftingBookCategory category;
 @@ -34,6 +43,19 @@
      @Override
-     public abstract RecipeSerializer<? extends IRecipeComplex> getSerializer();
+     public abstract RecipeSerializer<? extends CustomRecipe> getSerializer();
  
 +    // CraftBukkit start
 +    @Override
@@ -33,22 +33,22 @@
 +    }
 +    // CraftBukkit end
 +
-     public static class Serializer<T extends RecipeCrafting> implements RecipeSerializer<T> {
+     public static class Serializer<T extends CraftingRecipe> implements RecipeSerializer<T> {
  
          private final MapCodec<T> codec;
 @@ -41,13 +63,13 @@
  
-         public Serializer(IRecipeComplex.Serializer.Factory<T> irecipecomplex_serializer_factory) {
+         public Serializer(CustomRecipe.Serializer.Factory<T> factory) {
              this.codec = RecordCodecBuilder.mapCodec((instance) -> {
--                P1 p1 = instance.group(CraftingBookCategory.CODEC.fieldOf("category").orElse(CraftingBookCategory.MISC).forGetter(RecipeCrafting::category));
-+                P1<RecordCodecBuilder.Mu<T>, CraftingBookCategory> p1 = instance.group(CraftingBookCategory.CODEC.fieldOf("category").orElse(CraftingBookCategory.MISC).forGetter(RecipeCrafting::category)); // CraftBukkit - decompile error
+-                P1 p1 = instance.group(CraftingBookCategory.CODEC.fieldOf("category").orElse(CraftingBookCategory.MISC).forGetter(CraftingRecipe::category));
++                P1<RecordCodecBuilder.Mu<T>, CraftingBookCategory> p1 = instance.group(CraftingBookCategory.CODEC.fieldOf("category").orElse(CraftingBookCategory.MISC).forGetter(CraftingRecipe::category)); // CraftBukkit - decompile error
  
-                 Objects.requireNonNull(irecipecomplex_serializer_factory);
-                 return p1.apply(instance, irecipecomplex_serializer_factory::create);
+                 Objects.requireNonNull(factory);
+                 return p1.apply(instance, factory::create);
              });
              StreamCodec streamcodec = CraftingBookCategory.STREAM_CODEC;
--            Function function = RecipeCrafting::category;
-+            Function<RecipeCrafting, CraftingBookCategory> function = RecipeCrafting::category; // CraftBukkit - decompile error
+-            Function function = CraftingRecipe::category;
++            Function<CraftingRecipe, CraftingBookCategory> function = CraftingRecipe::category; // CraftBukkit - decompile error
  
-             Objects.requireNonNull(irecipecomplex_serializer_factory);
-             this.streamCodec = StreamCodec.composite(streamcodec, function, irecipecomplex_serializer_factory::create);
+             Objects.requireNonNull(factory);
+             this.streamCodec = StreamCodec.composite(streamcodec, function, factory::create);
diff --git a/paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeItemStack.patch b/paper-server/patches/sources/net/minecraft/world/item/crafting/Ingredient.java.patch
similarity index 61%
rename from paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeItemStack.patch
rename to paper-server/patches/sources/net/minecraft/world/item/crafting/Ingredient.java.patch
index bf6a66a895..1d00386837 100644
--- a/paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeItemStack.patch
+++ b/paper-server/patches/sources/net/minecraft/world/item/crafting/Ingredient.java.patch
@@ -1,25 +1,24 @@
---- a/net/minecraft/world/item/crafting/RecipeItemStack.java
-+++ b/net/minecraft/world/item/crafting/RecipeItemStack.java
-@@ -21,6 +21,11 @@
+--- a/net/minecraft/world/item/crafting/Ingredient.java
++++ b/net/minecraft/world/item/crafting/Ingredient.java
+@@ -20,6 +20,10 @@
+ import net.minecraft.world.item.Items;
  import net.minecraft.world.item.crafting.display.SlotDisplay;
- import net.minecraft.world.level.IMaterial;
- 
+ import net.minecraft.world.level.ItemLike;
 +// CraftBukkit start
 +import java.util.List;
 +import javax.annotation.Nullable;
 +// CraftBukkit end
-+
- public final class RecipeItemStack implements AutoRecipeStackManager.a<Holder<Item>>, Predicate<ItemStack> {
  
-     public static final StreamCodec<RegistryFriendlyByteBuf, RecipeItemStack> CONTENTS_STREAM_CODEC = ByteBufCodecs.holderSet(Registries.ITEM).map(RecipeItemStack::new, (recipeitemstack) -> {
-@@ -38,6 +43,24 @@
+ public final class Ingredient implements StackedContents.IngredientInfo<Holder<Item>>, Predicate<ItemStack> {
+ 
+@@ -38,7 +42,25 @@
          return recipeitemstack.values;
      });
      private final HolderSet<Item> values;
 +    // CraftBukkit start
 +    @Nullable
 +    private List<ItemStack> itemStacks;
-+
+ 
 +    public boolean isExact() {
 +        return this.itemStacks != null;
 +    }
@@ -28,16 +27,17 @@
 +        return this.itemStacks;
 +    }
 +
-+    public static RecipeItemStack ofStacks(List<ItemStack> stacks) {
-+        RecipeItemStack recipe = RecipeItemStack.of(stacks.stream().map(ItemStack::getItem));
++    public static Ingredient ofStacks(List<ItemStack> stacks) {
++        Ingredient recipe = Ingredient.of(stacks.stream().map(ItemStack::getItem));
 +        recipe.itemStacks = stacks;
 +        return recipe;
 +    }
 +    // CraftBukkit end
- 
-     private RecipeItemStack(HolderSet<Item> holderset) {
-         holderset.unwrap().ifRight((list) -> {
-@@ -70,6 +93,17 @@
++
+     private Ingredient(HolderSet<Item> entries) {
+         entries.unwrap().ifRight((list) -> {
+             if (list.isEmpty()) {
+@@ -70,6 +92,17 @@
      }
  
      public boolean test(ItemStack itemstack) {
@@ -55,10 +55,10 @@
          return itemstack.is(this.values);
      }
  
-@@ -79,7 +113,7 @@
+@@ -79,7 +112,7 @@
  
      public boolean equals(Object object) {
-         if (object instanceof RecipeItemStack recipeitemstack) {
+         if (object instanceof Ingredient recipeitemstack) {
 -            return Objects.equals(this.values, recipeitemstack.values);
 +            return Objects.equals(this.values, recipeitemstack.values) && Objects.equals(this.itemStacks, recipeitemstack.itemStacks); // CraftBukkit
          } else {
diff --git a/paper-server/patches/sources/net/minecraft/world/item/crafting/IRecipe.patch b/paper-server/patches/sources/net/minecraft/world/item/crafting/Recipe.java.patch
similarity index 61%
rename from paper-server/patches/sources/net/minecraft/world/item/crafting/IRecipe.patch
rename to paper-server/patches/sources/net/minecraft/world/item/crafting/Recipe.java.patch
index 4d92b7060a..ad97a94316 100644
--- a/paper-server/patches/sources/net/minecraft/world/item/crafting/IRecipe.patch
+++ b/paper-server/patches/sources/net/minecraft/world/item/crafting/Recipe.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/world/item/crafting/IRecipe.java
-+++ b/net/minecraft/world/item/crafting/IRecipe.java
+--- a/net/minecraft/world/item/crafting/Recipe.java
++++ b/net/minecraft/world/item/crafting/Recipe.java
 @@ -44,4 +44,6 @@
      }
  
diff --git a/paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeHolder.java.patch b/paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeHolder.java.patch
new file mode 100644
index 0000000000..818a4d266e
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeHolder.java.patch
@@ -0,0 +1,26 @@
+--- a/net/minecraft/world/item/crafting/RecipeHolder.java
++++ b/net/minecraft/world/item/crafting/RecipeHolder.java
+@@ -5,10 +5,21 @@
+ import net.minecraft.network.codec.StreamCodec;
+ import net.minecraft.resources.ResourceKey;
+ 
+-public record RecipeHolder<T extends Recipe<?>>(ResourceKey<Recipe<?>> id, T value) {
++// CraftBukkit start
++import org.bukkit.craftbukkit.util.CraftNamespacedKey;
++import org.bukkit.inventory.Recipe;
++// CraftBukkit end
+ 
+-    public static final StreamCodec<RegistryFriendlyByteBuf, RecipeHolder<?>> STREAM_CODEC = StreamCodec.composite(ResourceKey.streamCodec(Registries.RECIPE), RecipeHolder::id, Recipe.STREAM_CODEC, RecipeHolder::value, RecipeHolder::new);
++public record RecipeHolder<T extends net.minecraft.world.item.crafting.Recipe<?>>(ResourceKey<net.minecraft.world.item.crafting.Recipe<?>> id, T value) {
+ 
++    // CraftBukkit start
++    public final Recipe toBukkitRecipe() {
++        return this.value.toBukkitRecipe(CraftNamespacedKey.fromMinecraft(this.id.location()));
++    }
++    // CraftBukkit end
++
++    public static final StreamCodec<RegistryFriendlyByteBuf, RecipeHolder<?>> STREAM_CODEC = StreamCodec.composite(ResourceKey.streamCodec(Registries.RECIPE), RecipeHolder::id, net.minecraft.world.item.crafting.Recipe.STREAM_CODEC, RecipeHolder::value, RecipeHolder::new);
++
+     public boolean equals(Object object) {
+         if (this == object) {
+             return true;
diff --git a/paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeHolder.patch b/paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeHolder.patch
deleted file mode 100644
index e6d62f7081..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeHolder.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/net/minecraft/world/item/crafting/RecipeHolder.java
-+++ b/net/minecraft/world/item/crafting/RecipeHolder.java
-@@ -5,8 +5,19 @@
- import net.minecraft.network.codec.StreamCodec;
- import net.minecraft.resources.ResourceKey;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.util.CraftNamespacedKey;
-+import org.bukkit.inventory.Recipe;
-+// CraftBukkit end
-+
- public record RecipeHolder<T extends IRecipe<?>>(ResourceKey<IRecipe<?>> id, T value) {
- 
-+    // CraftBukkit start
-+    public final Recipe toBukkitRecipe() {
-+        return this.value.toBukkitRecipe(CraftNamespacedKey.fromMinecraft(this.id.location()));
-+    }
-+    // CraftBukkit end
-+
-     public static final StreamCodec<RegistryFriendlyByteBuf, RecipeHolder<?>> STREAM_CODEC = StreamCodec.composite(ResourceKey.streamCodec(Registries.RECIPE), RecipeHolder::id, IRecipe.STREAM_CODEC, RecipeHolder::value, RecipeHolder::new);
- 
-     public boolean equals(Object object) {
diff --git a/paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeManager.java.patch b/paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeManager.java.patch
new file mode 100644
index 0000000000..946cf370ee
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeManager.java.patch
@@ -0,0 +1,112 @@
+--- a/net/minecraft/world/item/crafting/RecipeManager.java
++++ b/net/minecraft/world/item/crafting/RecipeManager.java
+@@ -26,11 +26,6 @@
+ import net.minecraft.resources.FileToIdConverter;
+ import net.minecraft.resources.ResourceKey;
+ import net.minecraft.resources.ResourceLocation;
+-import net.minecraft.server.level.ServerLevel;
+-import net.minecraft.server.packs.resources.ResourceManager;
+-import net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener;
+-import net.minecraft.server.packs.resources.SimplePreparableReloadListener;
+-import net.minecraft.util.profiling.ProfilerFiller;
+ import net.minecraft.world.flag.FeatureFlagSet;
+ import net.minecraft.world.item.Item;
+ import net.minecraft.world.item.crafting.display.RecipeDisplay;
+@@ -39,6 +34,16 @@
+ import net.minecraft.world.level.Level;
+ import org.slf4j.Logger;
+ 
++// CraftBukkit start
++import java.util.Collections;
++import net.minecraft.server.MinecraftServer;
++// CraftBukkit end
++import net.minecraft.server.level.ServerLevel;
++import net.minecraft.server.packs.resources.ResourceManager;
++import net.minecraft.server.packs.resources.SimpleJsonResourceReloadListener;
++import net.minecraft.server.packs.resources.SimplePreparableReloadListener;
++import net.minecraft.util.profiling.ProfilerFiller;
++
+ public class RecipeManager extends SimplePreparableReloadListener<RecipeMap> implements RecipeAccess {
+ 
+     private static final Logger LOGGER = LogUtils.getLogger();
+@@ -109,9 +114,27 @@
+     protected void apply(RecipeMap prepared, ResourceManager manager, ProfilerFiller profiler) {
+         this.recipes = prepared;
+         RecipeManager.LOGGER.info("Loaded {} recipes", prepared.values().size());
++    }
++
++    // CraftBukkit start
++    public void addRecipe(RecipeHolder<?> irecipe) {
++        this.recipes.addRecipe(irecipe);
++        this.finalizeRecipeLoading();
++    }
++
++    private FeatureFlagSet featureflagset;
++
++    public void finalizeRecipeLoading() {
++        if (this.featureflagset != null) {
++            this.finalizeRecipeLoading(this.featureflagset);
++
++            MinecraftServer.getServer().getPlayerList().reloadRecipes();
++        }
+     }
+ 
+     public void finalizeRecipeLoading(FeatureFlagSet features) {
++        this.featureflagset = features;
++        // CraftBukkit end
+         List<SelectableRecipe.SingleInputEntry<StonecutterRecipe>> list = new ArrayList();
+         List<RecipeManager.IngredientCollector> list1 = RecipeManager.RECIPE_PROPERTY_SETS.entrySet().stream().map((entry) -> {
+             return new RecipeManager.IngredientCollector((ResourceKey) entry.getKey(), (RecipeManager.IngredientExtractor) entry.getValue());
+@@ -130,7 +153,7 @@
+                     StonecutterRecipe recipestonecutting = (StonecutterRecipe) irecipe;
+ 
+                     if (RecipeManager.isIngredientEnabled(features, recipestonecutting.input()) && recipestonecutting.resultDisplay().isEnabled(features)) {
+-                        list.add(new SelectableRecipe.SingleInputEntry<>(recipestonecutting.input(), new SelectableRecipe<>(recipestonecutting.resultDisplay(), Optional.of(recipeholder))));
++                        list.add(new SelectableRecipe.SingleInputEntry<StonecutterRecipe>(recipestonecutting.input(), new SelectableRecipe<>(recipestonecutting.resultDisplay(), Optional.of((RecipeHolder<StonecutterRecipe>) recipeholder)))); // CraftBukkit - decompile error
+                     }
+                 }
+ 
+@@ -172,7 +195,10 @@
+     }
+ 
+     public <I extends RecipeInput, T extends Recipe<I>> Optional<RecipeHolder<T>> getRecipeFor(RecipeType<T> type, I input, Level world) {
+-        return this.recipes.getRecipesFor(type, input, world).findFirst();
++        // CraftBukkit start
++        List<RecipeHolder<T>> list = this.recipes.getRecipesFor(type, input, world).toList();
++        return (list.isEmpty()) ? Optional.empty() : Optional.of(list.getLast()); // CraftBukkit - SPIGOT-4638: last recipe gets priority
++        // CraftBukkit end
+     }
+ 
+     public Optional<RecipeHolder<?>> byKey(ResourceKey<Recipe<?>> key) {
+@@ -183,7 +209,7 @@
+     private <T extends Recipe<?>> RecipeHolder<T> byKeyTyped(RecipeType<T> type, ResourceKey<Recipe<?>> key) {
+         RecipeHolder<?> recipeholder = this.recipes.byKey(key);
+ 
+-        return recipeholder != null && recipeholder.value().getType().equals(type) ? recipeholder : null;
++        return recipeholder != null && recipeholder.value().getType().equals(type) ? (RecipeHolder) recipeholder : null; // CraftBukkit - decompile error
+     }
+ 
+     public Map<ResourceKey<RecipePropertySet>, RecipePropertySet> getSynchronizedItemProperties() {
+@@ -231,6 +257,22 @@
+         return new RecipeHolder<>(key, irecipe);
+     }
+ 
++    // CraftBukkit start
++    public boolean removeRecipe(ResourceKey<Recipe<?>> mcKey) {
++        boolean removed = this.recipes.removeRecipe(mcKey);
++        if (removed) {
++            this.finalizeRecipeLoading();
++        }
++
++        return removed;
++    }
++
++    public void clearRecipes() {
++        this.recipes = RecipeMap.create(Collections.emptyList());
++        this.finalizeRecipeLoading();
++    }
++    // CraftBukkit end
++
+     public static <I extends RecipeInput, T extends Recipe<I>> RecipeManager.CachedCheck<I, T> createCheck(final RecipeType<T> type) {
+         return new RecipeManager.CachedCheck<I, T>() {
+             @Nullable
diff --git a/paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeMap.patch b/paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeMap.java.patch
similarity index 66%
rename from paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeMap.patch
rename to paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeMap.java.patch
index 7a21b05a74..bd0b6a1be6 100644
--- a/paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeMap.patch
+++ b/paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeMap.java.patch
@@ -1,40 +1,39 @@
 --- a/net/minecraft/world/item/crafting/RecipeMap.java
 +++ b/net/minecraft/world/item/crafting/RecipeMap.java
-@@ -12,6 +12,11 @@
+@@ -11,6 +11,10 @@
+ import javax.annotation.Nullable;
  import net.minecraft.resources.ResourceKey;
- import net.minecraft.world.level.World;
- 
+ import net.minecraft.world.level.Level;
 +// CraftBukkit start
 +import com.google.common.collect.LinkedHashMultimap;
 +import com.google.common.collect.Maps;
 +// CraftBukkit end
-+
+ 
  public class RecipeMap {
  
-     public static final RecipeMap EMPTY = new RecipeMap(ImmutableMultimap.of(), Map.of());
-@@ -35,11 +40,39 @@
+@@ -35,11 +39,39 @@
              com_google_common_collect_immutablemap_builder.put(recipeholder.id(), recipeholder);
          }
  
 -        return new RecipeMap(builder.build(), com_google_common_collect_immutablemap_builder.build());
 +        // CraftBukkit start - mutable
 +        return new RecipeMap(LinkedHashMultimap.create(builder.build()), Maps.newHashMap(com_google_common_collect_immutablemap_builder.build()));
-+    }
-+
+     }
+ 
 +    public void addRecipe(RecipeHolder<?> irecipe) {
 +        Collection<RecipeHolder<?>> map = this.byType.get(irecipe.value().getType());
 +
-+        if (byKey.containsKey(irecipe.id())) {
++        if (this.byKey.containsKey(irecipe.id())) {
 +            throw new IllegalStateException("Duplicate recipe ignored with ID " + irecipe.id());
 +        } else {
 +            map.add(irecipe);
-+            byKey.put(irecipe.id(), irecipe);
++            this.byKey.put(irecipe.id(), irecipe);
 +        }
-     }
- 
-+    public boolean removeRecipe(ResourceKey<IRecipe<?>> mcKey) {
++    }
++
++    public boolean removeRecipe(ResourceKey<Recipe<?>> mcKey) {
 +        boolean removed = false;
-+        Iterator<RecipeHolder<?>> iter = byType.values().iterator();
++        Iterator<RecipeHolder<?>> iter = this.byType.values().iterator();
 +        while (iter.hasNext()) {
 +            RecipeHolder<?> recipe = iter.next();
 +            if (recipe.id().equals(mcKey)) {
@@ -42,15 +41,15 @@
 +                removed = true;
 +            }
 +        }
-+        removed |= byKey.remove(mcKey) != null;
++        removed |= this.byKey.remove(mcKey) != null;
 +
 +        return removed;
 +    }
 +    // CraftBukkit end
 +
-     public <I extends RecipeInput, T extends IRecipe<I>> Collection<RecipeHolder<T>> byType(Recipes<T> recipes) {
--        return this.byType.get(recipes);
-+        return (Collection) this.byType.get(recipes); // CraftBukkit - decompile error
+     public <I extends RecipeInput, T extends Recipe<I>> Collection<RecipeHolder<T>> byType(RecipeType<T> type) {
+-        return this.byType.get(type);
++        return (Collection) this.byType.get(type); // CraftBukkit - decompile error
      }
  
      public Collection<RecipeHolder<?>> values() {
diff --git a/paper-server/patches/sources/net/minecraft/world/item/crafting/ShapedRecipes.patch b/paper-server/patches/sources/net/minecraft/world/item/crafting/ShapedRecipe.java.patch
similarity index 80%
rename from paper-server/patches/sources/net/minecraft/world/item/crafting/ShapedRecipes.patch
rename to paper-server/patches/sources/net/minecraft/world/item/crafting/ShapedRecipe.java.patch
index 26816fcf72..bbd6d81b4b 100644
--- a/paper-server/patches/sources/net/minecraft/world/item/crafting/ShapedRecipes.patch
+++ b/paper-server/patches/sources/net/minecraft/world/item/crafting/ShapedRecipe.java.patch
@@ -1,9 +1,9 @@
---- a/net/minecraft/world/item/crafting/ShapedRecipes.java
-+++ b/net/minecraft/world/item/crafting/ShapedRecipes.java
-@@ -17,6 +17,14 @@
+--- a/net/minecraft/world/item/crafting/ShapedRecipe.java
++++ b/net/minecraft/world/item/crafting/ShapedRecipe.java
+@@ -16,6 +16,13 @@
+ import net.minecraft.world.item.crafting.display.ShapedCraftingRecipeDisplay;
  import net.minecraft.world.item.crafting.display.SlotDisplay;
- import net.minecraft.world.level.World;
- 
+ import net.minecraft.world.level.Level;
 +// CraftBukkit start
 +import org.bukkit.NamespacedKey;
 +import org.bukkit.craftbukkit.inventory.CraftItemStack;
@@ -11,16 +11,15 @@
 +import org.bukkit.craftbukkit.inventory.CraftShapedRecipe;
 +import org.bukkit.inventory.RecipeChoice;
 +// CraftBukkit end
-+
- public class ShapedRecipes implements RecipeCrafting {
  
-     final ShapedRecipePattern pattern;
-@@ -39,6 +47,68 @@
-         this(s, craftingbookcategory, shapedrecipepattern, itemstack, true);
+ public class ShapedRecipe implements CraftingRecipe {
+ 
+@@ -39,7 +46,69 @@
+         this(group, category, raw, result, true);
      }
  
 +    // CraftBukkit start
-+    @Override
+     @Override
 +    public org.bukkit.inventory.ShapedRecipe toBukkitRecipe(NamespacedKey id) {
 +        CraftItemStack result = CraftItemStack.asCraftMirror(this.result);
 +        CraftShapedRecipe recipe = new CraftShapedRecipe(id, result, this);
@@ -69,7 +68,7 @@
 +            break;
 +        }
 +        char c = 'a';
-+        for (Optional<RecipeItemStack> list : this.pattern.ingredients()) {
++        for (Optional<Ingredient> list : this.pattern.ingredients()) {
 +            RecipeChoice choice = CraftRecipe.toBukkit(list);
 +            if (choice != null) {
 +                recipe.setIngredient(c, choice);
@@ -81,6 +80,7 @@
 +    }
 +    // CraftBukkit end
 +
-     @Override
-     public RecipeSerializer<? extends ShapedRecipes> getSerializer() {
++    @Override
+     public RecipeSerializer<? extends ShapedRecipe> getSerializer() {
          return RecipeSerializer.SHAPED_RECIPE;
+     }
diff --git a/paper-server/patches/sources/net/minecraft/world/item/crafting/ShapelessRecipes.patch b/paper-server/patches/sources/net/minecraft/world/item/crafting/ShapelessRecipe.java.patch
similarity index 65%
rename from paper-server/patches/sources/net/minecraft/world/item/crafting/ShapelessRecipes.patch
rename to paper-server/patches/sources/net/minecraft/world/item/crafting/ShapelessRecipe.java.patch
index 1045293ac2..167de63903 100644
--- a/paper-server/patches/sources/net/minecraft/world/item/crafting/ShapelessRecipes.patch
+++ b/paper-server/patches/sources/net/minecraft/world/item/crafting/ShapelessRecipe.java.patch
@@ -1,39 +1,39 @@
---- a/net/minecraft/world/item/crafting/ShapelessRecipes.java
-+++ b/net/minecraft/world/item/crafting/ShapelessRecipes.java
-@@ -17,6 +17,13 @@
+--- a/net/minecraft/world/item/crafting/ShapelessRecipe.java
++++ b/net/minecraft/world/item/crafting/ShapelessRecipe.java
+@@ -16,6 +16,12 @@
+ import net.minecraft.world.item.crafting.display.ShapelessCraftingRecipeDisplay;
  import net.minecraft.world.item.crafting.display.SlotDisplay;
- import net.minecraft.world.level.World;
- 
+ import net.minecraft.world.level.Level;
 +// CraftBukkit start
 +import org.bukkit.NamespacedKey;
 +import org.bukkit.craftbukkit.inventory.CraftItemStack;
 +import org.bukkit.craftbukkit.inventory.CraftRecipe;
 +import org.bukkit.craftbukkit.inventory.CraftShapelessRecipe;
 +// CraftBukkit end
-+
- public class ShapelessRecipes implements RecipeCrafting {
  
-     final String group;
-@@ -33,6 +40,22 @@
-         this.ingredients = list;
+ public class ShapelessRecipe implements CraftingRecipe {
+ 
+@@ -33,7 +39,23 @@
+         this.ingredients = ingredients;
      }
  
 +    // CraftBukkit start
 +    @SuppressWarnings("unchecked")
-+    @Override
+     @Override
 +    public org.bukkit.inventory.ShapelessRecipe toBukkitRecipe(NamespacedKey id) {
 +        CraftItemStack result = CraftItemStack.asCraftMirror(this.result);
 +        CraftShapelessRecipe recipe = new CraftShapelessRecipe(id, result, this);
 +        recipe.setGroup(this.group);
 +        recipe.setCategory(CraftRecipe.getCategory(this.category()));
 +
-+        for (RecipeItemStack list : this.ingredients) {
++        for (Ingredient list : this.ingredients) {
 +            recipe.addIngredient(CraftRecipe.toBukkit(list));
 +        }
 +        return recipe;
 +    }
 +    // CraftBukkit end
 +
-     @Override
-     public RecipeSerializer<ShapelessRecipes> getSerializer() {
++    @Override
+     public RecipeSerializer<ShapelessRecipe> getSerializer() {
          return RecipeSerializer.SHAPELESS_RECIPE;
+     }
diff --git a/paper-server/patches/sources/net/minecraft/world/item/crafting/FurnaceRecipe.patch b/paper-server/patches/sources/net/minecraft/world/item/crafting/SmeltingRecipe.java.patch
similarity index 74%
rename from paper-server/patches/sources/net/minecraft/world/item/crafting/FurnaceRecipe.patch
rename to paper-server/patches/sources/net/minecraft/world/item/crafting/SmeltingRecipe.java.patch
index d69f2a7b64..4b26fa911a 100644
--- a/paper-server/patches/sources/net/minecraft/world/item/crafting/FurnaceRecipe.patch
+++ b/paper-server/patches/sources/net/minecraft/world/item/crafting/SmeltingRecipe.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/world/item/crafting/FurnaceRecipe.java
-+++ b/net/minecraft/world/item/crafting/FurnaceRecipe.java
+--- a/net/minecraft/world/item/crafting/SmeltingRecipe.java
++++ b/net/minecraft/world/item/crafting/SmeltingRecipe.java
 @@ -4,6 +4,14 @@
  import net.minecraft.world.item.ItemStack;
  import net.minecraft.world.item.Items;
@@ -12,9 +12,9 @@
 +import org.bukkit.inventory.Recipe;
 +// CraftBukkit end
 +
- public class FurnaceRecipe extends RecipeCooking {
+ public class SmeltingRecipe extends AbstractCookingRecipe {
  
-     public FurnaceRecipe(String s, CookingBookCategory cookingbookcategory, RecipeItemStack recipeitemstack, ItemStack itemstack, float f, int i) {
+     public SmeltingRecipe(String group, CookingBookCategory category, Ingredient ingredient, ItemStack result, float experience, int cookingTime) {
 @@ -45,4 +53,17 @@
  
          return recipebookcategory;
diff --git a/paper-server/patches/sources/net/minecraft/world/item/crafting/SmithingTransformRecipe.patch b/paper-server/patches/sources/net/minecraft/world/item/crafting/SmithingTransformRecipe.java.patch
similarity index 73%
rename from paper-server/patches/sources/net/minecraft/world/item/crafting/SmithingTransformRecipe.patch
rename to paper-server/patches/sources/net/minecraft/world/item/crafting/SmithingTransformRecipe.java.patch
index 5594867ed5..ef826babe2 100644
--- a/paper-server/patches/sources/net/minecraft/world/item/crafting/SmithingTransformRecipe.patch
+++ b/paper-server/patches/sources/net/minecraft/world/item/crafting/SmithingTransformRecipe.java.patch
@@ -14,9 +14,9 @@
 +
  public class SmithingTransformRecipe implements SmithingRecipe {
  
-     final Optional<RecipeItemStack> template;
+     final Optional<Ingredient> template;
 @@ -71,6 +79,17 @@
-         return List.of(new SmithingRecipeDisplay(RecipeItemStack.optionalIngredientToDisplay(this.template), RecipeItemStack.optionalIngredientToDisplay(this.base), RecipeItemStack.optionalIngredientToDisplay(this.addition), new SlotDisplay.f(this.result), new SlotDisplay.d(Items.SMITHING_TABLE)));
+         return List.of(new SmithingRecipeDisplay(Ingredient.optionalIngredientToDisplay(this.template), Ingredient.optionalIngredientToDisplay(this.base), Ingredient.optionalIngredientToDisplay(this.addition), new SlotDisplay.ItemStackSlotDisplay(this.result), new SlotDisplay.ItemSlotDisplay(Items.SMITHING_TABLE)));
      }
  
 +    // CraftBukkit start
@@ -30,6 +30,6 @@
 +    }
 +    // CraftBukkit end
 +
-     public static class a implements RecipeSerializer<SmithingTransformRecipe> {
+     public static class Serializer implements RecipeSerializer<SmithingTransformRecipe> {
  
          private static final MapCodec<SmithingTransformRecipe> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
diff --git a/paper-server/patches/sources/net/minecraft/world/item/crafting/SmithingTrimRecipe.patch b/paper-server/patches/sources/net/minecraft/world/item/crafting/SmithingTrimRecipe.java.patch
similarity index 78%
rename from paper-server/patches/sources/net/minecraft/world/item/crafting/SmithingTrimRecipe.patch
rename to paper-server/patches/sources/net/minecraft/world/item/crafting/SmithingTrimRecipe.java.patch
index 3b2a1c61e9..a44cda5c4c 100644
--- a/paper-server/patches/sources/net/minecraft/world/item/crafting/SmithingTrimRecipe.patch
+++ b/paper-server/patches/sources/net/minecraft/world/item/crafting/SmithingTrimRecipe.java.patch
@@ -13,9 +13,9 @@
 +
  public class SmithingTrimRecipe implements SmithingRecipe {
  
-     final Optional<RecipeItemStack> template;
+     final Optional<Ingredient> template;
 @@ -97,6 +104,13 @@
-         return List.of(new SmithingRecipeDisplay(slotdisplay2, slotdisplay, slotdisplay1, new SlotDisplay.g(slotdisplay, slotdisplay1, slotdisplay2), new SlotDisplay.d(Items.SMITHING_TABLE)));
+         return List.of(new SmithingRecipeDisplay(slotdisplay2, slotdisplay, slotdisplay1, new SlotDisplay.SmithingTrimDemoSlotDisplay(slotdisplay, slotdisplay1, slotdisplay2), new SlotDisplay.ItemSlotDisplay(Items.SMITHING_TABLE)));
      }
  
 +    // CraftBukkit start
@@ -25,6 +25,6 @@
 +    }
 +    // CraftBukkit end
 +
-     public static class a implements RecipeSerializer<SmithingTrimRecipe> {
+     public static class Serializer implements RecipeSerializer<SmithingTrimRecipe> {
  
          private static final MapCodec<SmithingTrimRecipe> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
diff --git a/paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeSmoking.patch b/paper-server/patches/sources/net/minecraft/world/item/crafting/SmokingRecipe.java.patch
similarity index 75%
rename from paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeSmoking.patch
rename to paper-server/patches/sources/net/minecraft/world/item/crafting/SmokingRecipe.java.patch
index d168b47569..7c099a0fca 100644
--- a/paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeSmoking.patch
+++ b/paper-server/patches/sources/net/minecraft/world/item/crafting/SmokingRecipe.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/world/item/crafting/RecipeSmoking.java
-+++ b/net/minecraft/world/item/crafting/RecipeSmoking.java
+--- a/net/minecraft/world/item/crafting/SmokingRecipe.java
++++ b/net/minecraft/world/item/crafting/SmokingRecipe.java
 @@ -4,6 +4,14 @@
  import net.minecraft.world.item.ItemStack;
  import net.minecraft.world.item.Items;
@@ -12,9 +12,9 @@
 +import org.bukkit.inventory.Recipe;
 +// CraftBukkit end
 +
- public class RecipeSmoking extends RecipeCooking {
+ public class SmokingRecipe extends AbstractCookingRecipe {
  
-     public RecipeSmoking(String s, CookingBookCategory cookingbookcategory, RecipeItemStack recipeitemstack, ItemStack itemstack, float f, int i) {
+     public SmokingRecipe(String group, CookingBookCategory category, Ingredient ingredient, ItemStack result, float experience, int cookingTime) {
 @@ -29,4 +37,17 @@
      public RecipeBookCategory recipeBookCategory() {
          return RecipeBookCategories.SMOKER_FOOD;
diff --git a/paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeStonecutting.patch b/paper-server/patches/sources/net/minecraft/world/item/crafting/StonecutterRecipe.java.patch
similarity index 77%
rename from paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeStonecutting.patch
rename to paper-server/patches/sources/net/minecraft/world/item/crafting/StonecutterRecipe.java.patch
index 41726d8c86..fd7dc9145c 100644
--- a/paper-server/patches/sources/net/minecraft/world/item/crafting/RecipeStonecutting.patch
+++ b/paper-server/patches/sources/net/minecraft/world/item/crafting/StonecutterRecipe.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/world/item/crafting/RecipeStonecutting.java
-+++ b/net/minecraft/world/item/crafting/RecipeStonecutting.java
+--- a/net/minecraft/world/item/crafting/StonecutterRecipe.java
++++ b/net/minecraft/world/item/crafting/StonecutterRecipe.java
 @@ -7,6 +7,14 @@
  import net.minecraft.world.item.crafting.display.SlotDisplay;
  import net.minecraft.world.item.crafting.display.StonecutterRecipeDisplay;
@@ -12,9 +12,9 @@
 +import org.bukkit.inventory.Recipe;
 +// CraftBukkit end
 +
- public class RecipeStonecutting extends RecipeSingleItem {
+ public class StonecutterRecipe extends SingleItemRecipe {
  
-     public RecipeStonecutting(String s, RecipeItemStack recipeitemstack, ItemStack itemstack) {
+     public StonecutterRecipe(String group, Ingredient ingredient, ItemStack result) {
 @@ -36,4 +44,16 @@
      public RecipeBookCategory recipeBookCategory() {
          return RecipeBookCategories.STONECUTTER;
diff --git a/paper-server/patches/sources/net/minecraft/world/item/crafting/TransmuteRecipe.patch b/paper-server/patches/sources/net/minecraft/world/item/crafting/TransmuteRecipe.java.patch
similarity index 74%
rename from paper-server/patches/sources/net/minecraft/world/item/crafting/TransmuteRecipe.patch
rename to paper-server/patches/sources/net/minecraft/world/item/crafting/TransmuteRecipe.java.patch
index b650fe6196..7cc6f6f6d9 100644
--- a/paper-server/patches/sources/net/minecraft/world/item/crafting/TransmuteRecipe.patch
+++ b/paper-server/patches/sources/net/minecraft/world/item/crafting/TransmuteRecipe.java.patch
@@ -1,9 +1,9 @@
 --- a/net/minecraft/world/item/crafting/TransmuteRecipe.java
 +++ b/net/minecraft/world/item/crafting/TransmuteRecipe.java
-@@ -20,6 +20,14 @@
- import net.minecraft.world.level.IMaterial;
- import net.minecraft.world.level.World;
- 
+@@ -19,6 +19,13 @@
+ import net.minecraft.world.item.crafting.display.SlotDisplay;
+ import net.minecraft.world.level.ItemLike;
+ import net.minecraft.world.level.Level;
 +// CraftBukkit start
 +import org.bukkit.NamespacedKey;
 +import org.bukkit.craftbukkit.inventory.CraftItemType;
@@ -11,21 +11,21 @@
 +import org.bukkit.craftbukkit.inventory.CraftTransmuteRecipe;
 +import org.bukkit.inventory.Recipe;
 +// CraftBukkit end
-+
- public class TransmuteRecipe implements RecipeCrafting {
  
-     final String group;
-@@ -84,6 +92,13 @@
-         return List.of(new ShapelessCraftingRecipeDisplay(List.of(this.input.display(), this.material.display()), new SlotDisplay.d(this.result), new SlotDisplay.d(Items.CRAFTING_TABLE)));
+ public class TransmuteRecipe implements CraftingRecipe {
+ 
+@@ -84,7 +91,14 @@
+         return List.of(new ShapelessCraftingRecipeDisplay(List.of(this.input.display(), this.material.display()), new SlotDisplay.ItemSlotDisplay(this.result), new SlotDisplay.ItemSlotDisplay(Items.CRAFTING_TABLE)));
      }
  
 +    // CraftBukkit start
-+    @Override
+     @Override
 +    public Recipe toBukkitRecipe(NamespacedKey id) {
 +        return new CraftTransmuteRecipe(id, CraftItemType.minecraftToBukkit(this.result.value()), CraftRecipe.toBukkit(this.input), CraftRecipe.toBukkit(this.material));
 +    }
 +    // CraftBukkit end
 +
-     @Override
++    @Override
      public RecipeSerializer<TransmuteRecipe> getSerializer() {
          return RecipeSerializer.TRANSMUTE;
+     }
diff --git a/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/ApplyMobEffect.java.patch b/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/ApplyMobEffect.java.patch
new file mode 100644
index 0000000000..abe8774935
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/ApplyMobEffect.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/item/enchantment/effects/ApplyMobEffect.java
++++ b/net/minecraft/world/item/enchantment/effects/ApplyMobEffect.java
+@@ -34,7 +34,7 @@
+                 int j = Math.round(Mth.randomBetween(randomsource, this.minDuration.calculate(level), this.maxDuration.calculate(level)) * 20.0F);
+                 int k = Math.max(0, Math.round(Mth.randomBetween(randomsource, this.minAmplifier.calculate(level), this.maxAmplifier.calculate(level))));
+ 
+-                entityliving.addEffect(new MobEffectInstance((Holder) optional.get(), j, k));
++                entityliving.addEffect(new MobEffectInstance((Holder) optional.get(), j, k), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
+             }
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/ApplyMobEffect.patch b/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/ApplyMobEffect.patch
deleted file mode 100644
index 1a7d62e54b..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/ApplyMobEffect.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/item/enchantment/effects/ApplyMobEffect.java
-+++ b/net/minecraft/world/item/enchantment/effects/ApplyMobEffect.java
-@@ -34,7 +34,7 @@
-                 int j = Math.round(MathHelper.randomBetween(randomsource, this.minDuration.calculate(i), this.maxDuration.calculate(i)) * 20.0F);
-                 int k = Math.max(0, Math.round(MathHelper.randomBetween(randomsource, this.minAmplifier.calculate(i), this.maxAmplifier.calculate(i))));
- 
--                entityliving.addEffect(new MobEffect((Holder) optional.get(), j, k));
-+                entityliving.addEffect(new MobEffect((Holder) optional.get(), j, k), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.ATTACK); // CraftBukkit
-             }
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/Ignite.patch b/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/Ignite.java.patch
similarity index 56%
rename from paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/Ignite.patch
rename to paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/Ignite.java.patch
index 47e9f71afa..80efcc0872 100644
--- a/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/Ignite.patch
+++ b/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/Ignite.java.patch
@@ -1,28 +1,27 @@
 --- a/net/minecraft/world/item/enchantment/effects/Ignite.java
 +++ b/net/minecraft/world/item/enchantment/effects/Ignite.java
-@@ -8,6 +8,11 @@
+@@ -7,6 +7,10 @@
+ import net.minecraft.world.item.enchantment.EnchantedItemInUse;
  import net.minecraft.world.item.enchantment.LevelBasedValue;
- import net.minecraft.world.phys.Vec3D;
- 
+ import net.minecraft.world.phys.Vec3;
 +// CraftBukkit start
 +import org.bukkit.event.entity.EntityCombustByEntityEvent;
 +import org.bukkit.event.entity.EntityCombustEvent;
 +// CraftBukkit end
-+
+ 
  public record Ignite(LevelBasedValue duration) implements EnchantmentEntityEffect {
  
-     public static final MapCodec<Ignite> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
-@@ -18,7 +23,21 @@
+@@ -18,7 +22,21 @@
  
      @Override
-     public void apply(WorldServer worldserver, int i, EnchantedItemInUse enchantediteminuse, Entity entity, Vec3D vec3d) {
--        entity.igniteForSeconds(this.duration.calculate(i));
+     public void apply(ServerLevel world, int level, EnchantedItemInUse context, Entity user, Vec3 pos) {
+-        user.igniteForSeconds(this.duration.calculate(level));
 +        // CraftBukkit start - Call a combust event when somebody hits with a fire enchanted item
 +        EntityCombustEvent entityCombustEvent;
-+        if (enchantediteminuse.owner() != null) {
-+            entityCombustEvent = new EntityCombustByEntityEvent(enchantediteminuse.owner().getBukkitEntity(), entity.getBukkitEntity(), this.duration.calculate(i));
++        if (context.owner() != null) {
++            entityCombustEvent = new EntityCombustByEntityEvent(context.owner().getBukkitEntity(), user.getBukkitEntity(), this.duration.calculate(level));
 +        } else {
-+            entityCombustEvent = new EntityCombustEvent(entity.getBukkitEntity(), this.duration.calculate(i));
++            entityCombustEvent = new EntityCombustEvent(user.getBukkitEntity(), this.duration.calculate(level));
 +        }
 +
 +        org.bukkit.Bukkit.getPluginManager().callEvent(entityCombustEvent);
@@ -30,7 +29,7 @@
 +            return;
 +        }
 +
-+        entity.igniteForSeconds(entityCombustEvent.getDuration(), false);
++        user.igniteForSeconds(entityCombustEvent.getDuration(), false);
 +        // CraftBukkit end
      }
  
diff --git a/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/ReplaceBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/ReplaceBlock.java.patch
new file mode 100644
index 0000000000..78dc09a7de
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/ReplaceBlock.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/item/enchantment/effects/ReplaceBlock.java
++++ b/net/minecraft/world/item/enchantment/effects/ReplaceBlock.java
+@@ -26,7 +26,7 @@
+ 
+         if ((Boolean) this.predicate.map((blockpredicate) -> {
+             return blockpredicate.test(world, blockposition);
+-        }).orElse(true) && world.setBlockAndUpdate(blockposition, this.blockState.getState(user.getRandom(), blockposition))) {
++        }).orElse(true) && org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition, this.blockState.getState(user.getRandom(), blockposition), user)) { // CraftBukkit - Call EntityBlockFormEvent
+             this.triggerGameEvent.ifPresent((holder) -> {
+                 world.gameEvent(user, holder, blockposition);
+             });
diff --git a/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/ReplaceBlock.patch b/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/ReplaceBlock.patch
deleted file mode 100644
index 9135b466fe..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/ReplaceBlock.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/item/enchantment/effects/ReplaceBlock.java
-+++ b/net/minecraft/world/item/enchantment/effects/ReplaceBlock.java
-@@ -26,7 +26,7 @@
- 
-         if ((Boolean) this.predicate.map((blockpredicate) -> {
-             return blockpredicate.test(worldserver, blockposition);
--        }).orElse(true) && worldserver.setBlockAndUpdate(blockposition, this.blockState.getState(entity.getRandom(), blockposition))) {
-+        }).orElse(true) && org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(worldserver, blockposition, this.blockState.getState(entity.getRandom(), blockposition), entity)) { // CraftBukkit - Call EntityBlockFormEvent
-             this.triggerGameEvent.ifPresent((holder) -> {
-                 worldserver.gameEvent(entity, holder, blockposition);
-             });
diff --git a/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/ReplaceDisk.java.patch b/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/ReplaceDisk.java.patch
new file mode 100644
index 0000000000..2a0ad9e549
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/ReplaceDisk.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/item/enchantment/effects/ReplaceDisk.java
++++ b/net/minecraft/world/item/enchantment/effects/ReplaceDisk.java
+@@ -37,7 +37,7 @@
+ 
+             if (blockposition1.distToCenterSqr(pos.x(), (double) blockposition1.getY() + 0.5D, pos.z()) < (double) Mth.square(j) && (Boolean) this.predicate.map((blockpredicate) -> {
+                 return blockpredicate.test(world, blockposition1);
+-            }).orElse(true) && world.setBlockAndUpdate(blockposition1, this.blockState.getState(randomsource, blockposition1))) {
++            }).orElse(true) && org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition1,  this.blockState.getState(randomsource, blockposition1), user)) { // CraftBukkit - Call EntityBlockFormEvent for Frost Walker
+                 this.triggerGameEvent.ifPresent((holder) -> {
+                     world.gameEvent(user, holder, blockposition1);
+                 });
diff --git a/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/ReplaceDisk.patch b/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/ReplaceDisk.patch
deleted file mode 100644
index 350911b209..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/ReplaceDisk.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/item/enchantment/effects/ReplaceDisk.java
-+++ b/net/minecraft/world/item/enchantment/effects/ReplaceDisk.java
-@@ -37,7 +37,7 @@
- 
-             if (blockposition1.distToCenterSqr(vec3d.x(), (double) blockposition1.getY() + 0.5D, vec3d.z()) < (double) MathHelper.square(j) && (Boolean) this.predicate.map((blockpredicate) -> {
-                 return blockpredicate.test(worldserver, blockposition1);
--            }).orElse(true) && worldserver.setBlockAndUpdate(blockposition1, this.blockState.getState(randomsource, blockposition1))) {
-+            }).orElse(true) && org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(worldserver, blockposition1,  this.blockState.getState(randomsource, blockposition1), entity)) { // CraftBukkit - Call EntityBlockFormEvent for Frost Walker
-                 this.triggerGameEvent.ifPresent((holder) -> {
-                     worldserver.gameEvent(entity, holder, blockposition1);
-                 });
diff --git a/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java.patch b/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java.patch
new file mode 100644
index 0000000000..8ae0ac6d6e
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java.patch
@@ -0,0 +1,35 @@
+--- a/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java
++++ b/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java
+@@ -19,6 +19,11 @@
+ import net.minecraft.world.item.enchantment.EnchantedItemInUse;
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import net.minecraft.world.item.Items;
++import org.bukkit.event.entity.CreatureSpawnEvent;
++import org.bukkit.event.weather.LightningStrikeEvent;
++// CraftBukkit end
+ 
+ public record SummonEntityEffect(HolderSet<EntityType<?>> entityTypes, boolean joinTeam) implements EnchantmentEntityEffect {
+ 
+@@ -34,7 +39,7 @@
+             Optional<Holder<EntityType<?>>> optional = this.entityTypes().getRandomElement(world.getRandom());
+ 
+             if (!optional.isEmpty()) {
+-                Entity entity1 = ((EntityType) ((Holder) optional.get()).value()).spawn(world, blockposition, EntitySpawnReason.TRIGGERED);
++                Entity entity1 = ((EntityType) ((Holder) optional.get()).value()).create(world, null, blockposition, EntitySpawnReason.TRIGGERED, false, false); // CraftBukkit
+ 
+                 if (entity1 != null) {
+                     if (entity1 instanceof LightningBolt) {
+@@ -46,6 +51,11 @@
+ 
+                             entitylightning.setCause(entityplayer);
+                         }
++                        // CraftBukkit start
++                        world.strikeLightning(entity1, (context.itemStack().getItem() == Items.TRIDENT) ? LightningStrikeEvent.Cause.TRIDENT : LightningStrikeEvent.Cause.ENCHANTMENT);
++                    } else {
++                        world.addFreshEntityWithPassengers(entity1, CreatureSpawnEvent.SpawnReason.ENCHANTMENT);
++                        // CraftBukkit end
+                     }
+ 
+                     if (this.joinTeam && user.getTeam() != null) {
diff --git a/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.patch b/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.patch
deleted file mode 100644
index 7243a83ea8..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.patch
+++ /dev/null
@@ -1,36 +0,0 @@
---- a/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java
-+++ b/net/minecraft/world/item/enchantment/effects/SummonEntityEffect.java
-@@ -20,6 +20,12 @@
- import net.minecraft.world.level.World;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import net.minecraft.world.item.Items;
-+import org.bukkit.event.entity.CreatureSpawnEvent;
-+import org.bukkit.event.weather.LightningStrikeEvent;
-+// CraftBukkit end
-+
- public record SummonEntityEffect(HolderSet<EntityTypes<?>> entityTypes, boolean joinTeam) implements EnchantmentEntityEffect {
- 
-     public static final MapCodec<SummonEntityEffect> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
-@@ -34,7 +40,7 @@
-             Optional<Holder<EntityTypes<?>>> optional = this.entityTypes().getRandomElement(worldserver.getRandom());
- 
-             if (!optional.isEmpty()) {
--                Entity entity1 = ((EntityTypes) ((Holder) optional.get()).value()).spawn(worldserver, blockposition, EntitySpawnReason.TRIGGERED);
-+                Entity entity1 = ((EntityTypes) ((Holder) optional.get()).value()).create(worldserver, null, blockposition, EntitySpawnReason.TRIGGERED, false, false); // CraftBukkit
- 
-                 if (entity1 != null) {
-                     if (entity1 instanceof EntityLightning) {
-@@ -46,6 +52,11 @@
- 
-                             entitylightning.setCause(entityplayer);
-                         }
-+                        // CraftBukkit start
-+                        worldserver.strikeLightning(entity1, (enchantediteminuse.itemStack().getItem() == Items.TRIDENT) ? LightningStrikeEvent.Cause.TRIDENT : LightningStrikeEvent.Cause.ENCHANTMENT);
-+                    } else {
-+                        worldserver.addFreshEntityWithPassengers(entity1, CreatureSpawnEvent.SpawnReason.ENCHANTMENT);
-+                        // CraftBukkit end
-                     }
- 
-                     if (this.joinTeam && entity.getTeam() != null) {
diff --git a/paper-server/patches/sources/net/minecraft/world/item/trading/IMerchant.patch b/paper-server/patches/sources/net/minecraft/world/item/trading/IMerchant.patch
deleted file mode 100644
index 86c4e4db67..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/trading/IMerchant.patch
+++ /dev/null
@@ -1,9 +0,0 @@
---- a/net/minecraft/world/item/trading/IMerchant.java
-+++ b/net/minecraft/world/item/trading/IMerchant.java
-@@ -54,4 +54,6 @@
-     boolean isClientSide();
- 
-     boolean stillValid(EntityHuman entityhuman);
-+
-+    org.bukkit.craftbukkit.inventory.CraftMerchant getCraftMerchant(); // CraftBukkit
- }
diff --git a/paper-server/patches/sources/net/minecraft/world/item/trading/Merchant.java.patch b/paper-server/patches/sources/net/minecraft/world/item/trading/Merchant.java.patch
new file mode 100644
index 0000000000..0b840aa76b
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/trading/Merchant.java.patch
@@ -0,0 +1,9 @@
+--- a/net/minecraft/world/item/trading/Merchant.java
++++ b/net/minecraft/world/item/trading/Merchant.java
+@@ -54,4 +54,6 @@
+     boolean isClientSide();
+ 
+     boolean stillValid(Player player);
++
++    org.bukkit.craftbukkit.inventory.CraftMerchant getCraftMerchant(); // CraftBukkit
+ }
diff --git a/paper-server/patches/sources/net/minecraft/world/item/trading/MerchantOffer.java.patch b/paper-server/patches/sources/net/minecraft/world/item/trading/MerchantOffer.java.patch
new file mode 100644
index 0000000000..a199c6a05a
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/item/trading/MerchantOffer.java.patch
@@ -0,0 +1,44 @@
+--- a/net/minecraft/world/item/trading/MerchantOffer.java
++++ b/net/minecraft/world/item/trading/MerchantOffer.java
+@@ -8,6 +8,8 @@
+ import net.minecraft.util.Mth;
+ import net.minecraft.world.item.ItemStack;
+ 
++import org.bukkit.craftbukkit.inventory.CraftMerchantRecipe; // CraftBukkit
++
+ public class MerchantOffer {
+ 
+     public static final Codec<MerchantOffer> CODEC = RecordCodecBuilder.create((instance) -> {
+@@ -44,7 +46,19 @@
+     public int demand;
+     public float priceMultiplier;
+     public int xp;
++    // CraftBukkit start
++    private CraftMerchantRecipe bukkitHandle;
+ 
++    public CraftMerchantRecipe asBukkit() {
++        return (this.bukkitHandle == null) ? this.bukkitHandle = new CraftMerchantRecipe(this) : this.bukkitHandle;
++    }
++
++    public MerchantOffer(ItemCost baseCostA, Optional<ItemCost> costB, ItemStack result, int uses, int maxUses, int experience, float priceMultiplier, int demand, CraftMerchantRecipe bukkit) {
++        this(baseCostA, costB, result, uses, maxUses, experience, priceMultiplier, demand);
++        this.bukkitHandle = bukkit;
++    }
++    // CraftBukkit end
++
+     private MerchantOffer(ItemCost firstBuyItem, Optional<ItemCost> secondBuyItem, ItemStack sellItem, int uses, int maxUses, boolean rewardingPlayerExperience, int specialPrice, int demandBonus, float priceMultiplier, int merchantExperience) {
+         this.baseCostA = firstBuyItem;
+         this.costB = secondBuyItem;
+@@ -185,7 +199,11 @@
+         if (!this.satisfiedBy(firstBuyStack, secondBuyStack)) {
+             return false;
+         } else {
+-            firstBuyStack.shrink(this.getCostA().getCount());
++            // CraftBukkit start
++            if (!this.getCostA().isEmpty()) {
++                firstBuyStack.shrink(this.getCostA().getCount());
++            }
++            // CraftBukkit end
+             if (!this.getCostB().isEmpty()) {
+                 secondBuyStack.shrink(this.getCostB().getCount());
+             }
diff --git a/paper-server/patches/sources/net/minecraft/world/item/trading/MerchantRecipe.patch b/paper-server/patches/sources/net/minecraft/world/item/trading/MerchantRecipe.patch
deleted file mode 100644
index 9b92e485a9..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/item/trading/MerchantRecipe.patch
+++ /dev/null
@@ -1,43 +0,0 @@
---- a/net/minecraft/world/item/trading/MerchantRecipe.java
-+++ b/net/minecraft/world/item/trading/MerchantRecipe.java
-@@ -8,6 +8,8 @@
- import net.minecraft.util.MathHelper;
- import net.minecraft.world.item.ItemStack;
- 
-+import org.bukkit.craftbukkit.inventory.CraftMerchantRecipe; // CraftBukkit
-+
- public class MerchantRecipe {
- 
-     public static final Codec<MerchantRecipe> CODEC = RecordCodecBuilder.create((instance) -> {
-@@ -44,6 +46,18 @@
-     public int demand;
-     public float priceMultiplier;
-     public int xp;
-+    // CraftBukkit start
-+    private CraftMerchantRecipe bukkitHandle;
-+
-+    public CraftMerchantRecipe asBukkit() {
-+        return (bukkitHandle == null) ? bukkitHandle = new CraftMerchantRecipe(this) : bukkitHandle;
-+    }
-+
-+    public MerchantRecipe(ItemCost baseCostA, Optional<ItemCost> costB, ItemStack result, int uses, int maxUses, int experience, float priceMultiplier, int demand, CraftMerchantRecipe bukkit) {
-+        this(baseCostA, costB, result, uses, maxUses, experience, priceMultiplier, demand);
-+        this.bukkitHandle = bukkit;
-+    }
-+    // CraftBukkit end
- 
-     private MerchantRecipe(ItemCost itemcost, Optional<ItemCost> optional, ItemStack itemstack, int i, int j, boolean flag, int k, int l, float f, int i1) {
-         this.baseCostA = itemcost;
-@@ -185,7 +199,11 @@
-         if (!this.satisfiedBy(itemstack, itemstack1)) {
-             return false;
-         } else {
--            itemstack.shrink(this.getCostA().getCount());
-+            // CraftBukkit start
-+            if (!this.getCostA().isEmpty()) {
-+                itemstack.shrink(this.getCostA().getCount());
-+            }
-+            // CraftBukkit end
-             if (!this.getCostB().isEmpty()) {
-                 itemstack1.shrink(this.getCostB().getCount());
-             }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/CommandBlockListenerAbstract.patch b/paper-server/patches/sources/net/minecraft/world/level/BaseCommandBlock.java.patch
similarity index 63%
rename from paper-server/patches/sources/net/minecraft/world/level/CommandBlockListenerAbstract.patch
rename to paper-server/patches/sources/net/minecraft/world/level/BaseCommandBlock.java.patch
index f3c4982ba8..c68ecd1ff9 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/CommandBlockListenerAbstract.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/BaseCommandBlock.java.patch
@@ -1,15 +1,15 @@
---- a/net/minecraft/world/level/CommandBlockListenerAbstract.java
-+++ b/net/minecraft/world/level/CommandBlockListenerAbstract.java
+--- a/net/minecraft/world/level/BaseCommandBlock.java
++++ b/net/minecraft/world/level/BaseCommandBlock.java
 @@ -33,6 +33,10 @@
      private String command = "";
      @Nullable
-     private IChatBaseComponent customName;
+     private Component customName;
 +    // CraftBukkit start
 +    @Override
-+    public abstract org.bukkit.command.CommandSender getBukkitSender(CommandListenerWrapper wrapper);
++    public abstract org.bukkit.command.CommandSender getBukkitSender(CommandSourceStack wrapper);
 +    // CraftBukkit end
  
-     public CommandBlockListenerAbstract() {}
+     public BaseCommandBlock() {}
  
 @@ -132,7 +136,7 @@
  
@@ -19,4 +19,4 @@
 +                        minecraftserver.getCommands().dispatchServerCommand(commandlistenerwrapper, this.command); // CraftBukkit
                      } catch (Throwable throwable) {
                          CrashReport crashreport = CrashReport.forThrowable(throwable, "Executing command block");
-                         CrashReportSystemDetails crashreportsystemdetails = crashreport.addCategory("Command to be executed");
+                         CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Command to be executed");
diff --git a/paper-server/patches/sources/net/minecraft/world/level/BaseSpawner.java.patch b/paper-server/patches/sources/net/minecraft/world/level/BaseSpawner.java.patch
new file mode 100644
index 0000000000..22fbd3abb1
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/BaseSpawner.java.patch
@@ -0,0 +1,31 @@
+--- a/net/minecraft/world/level/BaseSpawner.java
++++ b/net/minecraft/world/level/BaseSpawner.java
+@@ -54,6 +54,7 @@
+ 
+     public void setEntityId(EntityType<?> type, @Nullable Level world, RandomSource random, BlockPos pos) {
+         this.getOrCreateNextSpawnData(world, random, pos).getEntityToSpawn().putString("id", BuiltInRegistries.ENTITY_TYPE.getKey(type).toString());
++        this.spawnPotentials = SimpleWeightedRandomList.empty(); // CraftBukkit - SPIGOT-3496, MC-92282
+     }
+ 
+     public boolean isNearPlayer(Level world, BlockPos pos) {
+@@ -157,13 +158,18 @@
+                                 ((Mob) entity).finalizeSpawn(world, world.getCurrentDifficultyAt(entity.blockPosition()), EntitySpawnReason.SPAWNER, (SpawnGroupData) null);
+                             }
+ 
+-                            Optional optional1 = mobspawnerdata.getEquipment();
++                            Optional<net.minecraft.world.entity.EquipmentTable> optional1 = mobspawnerdata.getEquipment(); // CraftBukkit - decompile error
+ 
+                             Objects.requireNonNull(entityinsentient);
+                             optional1.ifPresent(entityinsentient::equip);
+                         }
+ 
+-                        if (!world.tryAddFreshEntityWithPassengers(entity)) {
++                        // CraftBukkit start
++                        if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, pos).isCancelled()) {
++                            continue;
++                        }
++                        if (!world.tryAddFreshEntityWithPassengers(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER)) {
++                            // CraftBukkit end
+                             this.delay(world, pos);
+                             return;
+                         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/BlockGetter.java.patch b/paper-server/patches/sources/net/minecraft/world/level/BlockGetter.java.patch
new file mode 100644
index 0000000000..dcbfc705a3
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/BlockGetter.java.patch
@@ -0,0 +1,44 @@
+--- a/net/minecraft/world/level/BlockGetter.java
++++ b/net/minecraft/world/level/BlockGetter.java
+@@ -31,7 +31,7 @@
+     default <T extends BlockEntity> Optional<T> getBlockEntity(BlockPos pos, BlockEntityType<T> type) {
+         BlockEntity tileentity = this.getBlockEntity(pos);
+ 
+-        return tileentity != null && tileentity.getType() == type ? Optional.of(tileentity) : Optional.empty();
++        return tileentity != null && tileentity.getType() == type ? (Optional<T>) Optional.of(tileentity) : Optional.empty(); // CraftBukkit - decompile error
+     }
+ 
+     BlockState getBlockState(BlockPos pos);
+@@ -59,8 +59,8 @@
+         });
+     }
+ 
+-    default BlockHitResult clip(ClipContext context) {
+-        return (BlockHitResult) BlockGetter.traverseBlocks(context.getFrom(), context.getTo(), context, (raytrace1, blockposition) -> {
++    // CraftBukkit start - moved block handling into separate method for use by Block#rayTrace
++    default BlockHitResult clip(ClipContext raytrace1, BlockPos blockposition) {
+             BlockState iblockdata = this.getBlockState(blockposition);
+             FluidState fluid = this.getFluidState(blockposition);
+             Vec3 vec3d = raytrace1.getFrom();
+@@ -73,6 +73,12 @@
+             double d1 = movingobjectpositionblock1 == null ? Double.MAX_VALUE : raytrace1.getFrom().distanceToSqr(movingobjectpositionblock1.getLocation());
+ 
+             return d0 <= d1 ? movingobjectpositionblock : movingobjectpositionblock1;
++    }
++    // CraftBukkit end
++
++    default BlockHitResult clip(ClipContext context) {
++        return (BlockHitResult) BlockGetter.traverseBlocks(context.getFrom(), context.getTo(), context, (raytrace1, blockposition) -> {
++            return this.clip(raytrace1, blockposition); // CraftBukkit - moved into separate method
+         }, (raytrace1) -> {
+             Vec3 vec3d = raytrace1.getFrom().subtract(raytrace1.getTo());
+ 
+@@ -145,7 +151,7 @@
+                 double d13 = d10 * (i1 > 0 ? 1.0D - Mth.frac(d4) : Mth.frac(d4));
+                 double d14 = d11 * (j1 > 0 ? 1.0D - Mth.frac(d5) : Mth.frac(d5));
+ 
+-                Object object;
++                T object; // CraftBukkit - decompile error
+ 
+                 do {
+                     if (d12 > 1.0D && d13 > 1.0D && d14 > 1.0D) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/ClipContext.java.patch b/paper-server/patches/sources/net/minecraft/world/level/ClipContext.java.patch
new file mode 100644
index 0000000000..20d8ff1d94
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/ClipContext.java.patch
@@ -0,0 +1,20 @@
+--- a/net/minecraft/world/level/ClipContext.java
++++ b/net/minecraft/world/level/ClipContext.java
+@@ -22,7 +22,7 @@
+     private final CollisionContext collisionContext;
+ 
+     public ClipContext(Vec3 start, Vec3 end, ClipContext.Block shapeType, ClipContext.Fluid fluidHandling, Entity entity) {
+-        this(start, end, shapeType, fluidHandling, CollisionContext.of(entity));
++        this(start, end, shapeType, fluidHandling, (entity == null) ? CollisionContext.empty() : CollisionContext.of(entity)); // CraftBukkit
+     }
+ 
+     public ClipContext(Vec3 start, Vec3 end, ClipContext.Block shapeType, ClipContext.Fluid fluidHandling, CollisionContext shapeContext) {
+@@ -79,7 +79,7 @@
+ 
+         private final Predicate<FluidState> canPick;
+ 
+-        private Fluid(final Predicate predicate) {
++        private Fluid(final Predicate<FluidState> predicate) { // CraftBukkit - decompile error
+             this.canPick = predicate;
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/GameRules.java.patch b/paper-server/patches/sources/net/minecraft/world/level/GameRules.java.patch
new file mode 100644
index 0000000000..fb6733373b
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/GameRules.java.patch
@@ -0,0 +1,237 @@
+--- a/net/minecraft/world/level/GameRules.java
++++ b/net/minecraft/world/level/GameRules.java
+@@ -58,7 +58,7 @@
+     public static final GameRules.Key<GameRules.BooleanValue> RULE_SENDCOMMANDFEEDBACK = GameRules.register("sendCommandFeedback", GameRules.Category.CHAT, GameRules.BooleanValue.create(true));
+     public static final GameRules.Key<GameRules.BooleanValue> RULE_REDUCEDDEBUGINFO = GameRules.register("reducedDebugInfo", GameRules.Category.MISC, GameRules.BooleanValue.create(false, (minecraftserver, gamerules_gameruleboolean) -> {
+         int i = gamerules_gameruleboolean.get() ? 22 : 23;
+-        Iterator iterator = minecraftserver.getPlayerList().getPlayers().iterator();
++        Iterator iterator = minecraftserver.players().iterator(); // CraftBukkit - per-world
+ 
+         while (iterator.hasNext()) {
+             ServerPlayer entityplayer = (ServerPlayer) iterator.next();
+@@ -74,7 +74,7 @@
+     public static final GameRules.Key<GameRules.IntegerValue> RULE_MAX_ENTITY_CRAMMING = GameRules.register("maxEntityCramming", GameRules.Category.MOBS, GameRules.IntegerValue.create(24));
+     public static final GameRules.Key<GameRules.BooleanValue> RULE_WEATHER_CYCLE = GameRules.register("doWeatherCycle", GameRules.Category.UPDATES, GameRules.BooleanValue.create(true));
+     public static final GameRules.Key<GameRules.BooleanValue> RULE_LIMITED_CRAFTING = GameRules.register("doLimitedCrafting", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false, (minecraftserver, gamerules_gameruleboolean) -> {
+-        Iterator iterator = minecraftserver.getPlayerList().getPlayers().iterator();
++        Iterator iterator = minecraftserver.players().iterator(); // CraftBukkit - per-world
+ 
+         while (iterator.hasNext()) {
+             ServerPlayer entityplayer = (ServerPlayer) iterator.next();
+@@ -90,7 +90,7 @@
+     public static final GameRules.Key<GameRules.BooleanValue> RULE_DISABLE_RAIDS = GameRules.register("disableRaids", GameRules.Category.MOBS, GameRules.BooleanValue.create(false));
+     public static final GameRules.Key<GameRules.BooleanValue> RULE_DOINSOMNIA = GameRules.register("doInsomnia", GameRules.Category.SPAWNING, GameRules.BooleanValue.create(true));
+     public static final GameRules.Key<GameRules.BooleanValue> RULE_DO_IMMEDIATE_RESPAWN = GameRules.register("doImmediateRespawn", GameRules.Category.PLAYER, GameRules.BooleanValue.create(false, (minecraftserver, gamerules_gameruleboolean) -> {
+-        Iterator iterator = minecraftserver.getPlayerList().getPlayers().iterator();
++        Iterator iterator = minecraftserver.players().iterator(); // CraftBukkit - per-world
+ 
+         while (iterator.hasNext()) {
+             ServerPlayer entityplayer = (ServerPlayer) iterator.next();
+@@ -123,7 +123,7 @@
+     public static final GameRules.Key<GameRules.IntegerValue> RULE_MINECART_MAX_SPEED = GameRules.register("minecartMaxSpeed", GameRules.Category.MISC, GameRules.IntegerValue.create(8, 1, 1000, FeatureFlagSet.of(FeatureFlags.MINECART_IMPROVEMENTS), (minecraftserver, gamerules_gameruleint) -> {
+     }));
+     public static final GameRules.Key<GameRules.IntegerValue> RULE_SPAWN_CHUNK_RADIUS = GameRules.register("spawnChunkRadius", GameRules.Category.MISC, GameRules.IntegerValue.create(2, 0, 32, FeatureFlagSet.of(), (minecraftserver, gamerules_gameruleint) -> {
+-        ServerLevel worldserver = minecraftserver.overworld();
++        ServerLevel worldserver = minecraftserver; // CraftBukkit - per-world
+ 
+         worldserver.setDefaultSpawnPos(worldserver.getSharedSpawnPos(), worldserver.getSharedSpawnAngle());
+     }));
+@@ -164,7 +164,7 @@
+     }
+ 
+     public <T extends GameRules.Value<T>> T getRule(GameRules.Key<T> key) {
+-        T t0 = (GameRules.Value) this.rules.get(key);
++        T t0 = (T) this.rules.get(key); // CraftBukkit - decompile error
+ 
+         if (t0 == null) {
+             throw new IllegalArgumentException("Tried to access invalid game rule");
+@@ -184,7 +184,7 @@
+ 
+     private void loadFromTag(DynamicLike<?> values) {
+         this.rules.forEach((gamerules_gamerulekey, gamerules_gamerulevalue) -> {
+-            DataResult dataresult = values.get(gamerules_gamerulekey.id).asString();
++            DataResult<String> dataresult = values.get(gamerules_gamerulekey.id).asString(); // CraftBukkit - decompile error
+ 
+             Objects.requireNonNull(gamerules_gamerulevalue);
+             dataresult.ifSuccess(gamerules_gamerulevalue::deserialize);
+@@ -205,22 +205,22 @@
+ 
+     private <T extends GameRules.Value<T>> void callVisitorCap(GameRules.GameRuleTypeVisitor visitor, GameRules.Key<?> key, GameRules.Type<?> type) {
+         if (type.requiredFeatures.isSubsetOf(this.enabledFeatures)) {
+-            visitor.visit(key, type);
+-            type.callVisitor(visitor, key);
++            visitor.visit((GameRules.Key<T>) key, (GameRules.Type<T>) type); // CraftBukkit - decompile error
++            ((GameRules.Type<T>) type).callVisitor(visitor, (GameRules.Key<T>) key); // CraftBukkit - decompile error
+         }
+ 
+     }
+ 
+-    public void assignFrom(GameRules rules, @Nullable MinecraftServer server) {
+-        rules.rules.keySet().forEach((gamerules_gamerulekey) -> {
+-            this.assignCap(gamerules_gamerulekey, rules, server);
++    public void assignFrom(GameRules gamerules, @Nullable ServerLevel minecraftserver) { // CraftBukkit - per-world
++        gamerules.rules.keySet().forEach((gamerules_gamerulekey) -> {
++            this.assignCap(gamerules_gamerulekey, gamerules, minecraftserver);
+         });
+     }
+ 
+-    private <T extends GameRules.Value<T>> void assignCap(GameRules.Key<T> key, GameRules rules, @Nullable MinecraftServer server) {
+-        T t0 = rules.getRule(key);
++    private <T extends GameRules.Value<T>> void assignCap(GameRules.Key<T> gamerules_gamerulekey, GameRules gamerules, @Nullable ServerLevel minecraftserver) { // CraftBukkit - per-world
++        T t0 = gamerules.getRule(gamerules_gamerulekey);
+ 
+-        this.getRule(key).setFrom(t0, server);
++        this.getRule(gamerules_gamerulekey).setFrom(t0, minecraftserver);
+     }
+ 
+     public boolean getBoolean(GameRules.Key<GameRules.BooleanValue> rule) {
+@@ -285,11 +285,11 @@
+ 
+         final Supplier<ArgumentType<?>> argument;
+         private final Function<GameRules.Type<T>, T> constructor;
+-        final BiConsumer<MinecraftServer, T> callback;
++        final BiConsumer<ServerLevel, T> callback; // CraftBukkit - per-world
+         private final GameRules.VisitorCaller<T> visitorCaller;
+         final FeatureFlagSet requiredFeatures;
+ 
+-        Type(Supplier<ArgumentType<?>> argumentType, Function<GameRules.Type<T>, T> ruleFactory, BiConsumer<MinecraftServer, T> changeCallback, GameRules.VisitorCaller<T> ruleAcceptor, FeatureFlagSet requiredFeatures) {
++        Type(Supplier<ArgumentType<?>> argumentType, Function<GameRules.Type<T>, T> ruleFactory, BiConsumer<ServerLevel, T> changeCallback, GameRules.VisitorCaller<T> ruleAcceptor, FeatureFlagSet requiredFeatures) { // CraftBukkit - per-world
+             this.argument = argumentType;
+             this.constructor = ruleFactory;
+             this.callback = changeCallback;
+@@ -302,7 +302,7 @@
+         }
+ 
+         public T createRule() {
+-            return (GameRules.Value) this.constructor.apply(this);
++            return this.constructor.apply(this); // CraftBukkit - decompile error
+         }
+ 
+         public void callVisitor(GameRules.GameRuleTypeVisitor consumer, GameRules.Key<T> key) {
+@@ -326,17 +326,17 @@
+ 
+         public void setFromArgument(CommandContext<CommandSourceStack> context, String name) {
+             this.updateFromArgument(context, name);
+-            this.onChanged(((CommandSourceStack) context.getSource()).getServer());
++            this.onChanged(((CommandSourceStack) context.getSource()).getLevel()); // CraftBukkit - per-world
+         }
+ 
+-        public void onChanged(@Nullable MinecraftServer server) {
+-            if (server != null) {
+-                this.type.callback.accept(server, this.getSelf());
++        public void onChanged(@Nullable ServerLevel minecraftserver) { // CraftBukkit - per-world
++            if (minecraftserver != null) {
++                this.type.callback.accept(minecraftserver, this.getSelf());
+             }
+ 
+         }
+ 
+-        protected abstract void deserialize(String value);
++        public abstract void deserialize(String value); // PAIL - private->public
+ 
+         public abstract String serialize();
+ 
+@@ -350,7 +350,7 @@
+ 
+         protected abstract T copy();
+ 
+-        public abstract void setFrom(T rule, @Nullable MinecraftServer server);
++        public abstract void setFrom(T t0, @Nullable ServerLevel minecraftserver); // CraftBukkit - per-world
+     }
+ 
+     public interface GameRuleTypeVisitor {
+@@ -366,7 +366,7 @@
+ 
+         private boolean value;
+ 
+-        static GameRules.Type<GameRules.BooleanValue> create(boolean initialValue, BiConsumer<MinecraftServer, GameRules.BooleanValue> changeCallback) {
++        static GameRules.Type<GameRules.BooleanValue> create(boolean initialValue, BiConsumer<ServerLevel, GameRules.BooleanValue> changeCallback) { // CraftBukkit - per-world
+             return new GameRules.Type<>(BoolArgumentType::bool, (gamerules_gameruledefinition) -> {
+                 return new GameRules.BooleanValue(gamerules_gameruledefinition, initialValue);
+             }, changeCallback, GameRules.GameRuleTypeVisitor::visitBoolean, FeatureFlagSet.of());
+@@ -391,9 +391,9 @@
+             return this.value;
+         }
+ 
+-        public void set(boolean value, @Nullable MinecraftServer server) {
+-            this.value = value;
+-            this.onChanged(server);
++        public void set(boolean flag, @Nullable ServerLevel minecraftserver) { // CraftBukkit - per-world
++            this.value = flag;
++            this.onChanged(minecraftserver);
+         }
+ 
+         @Override
+@@ -402,7 +402,7 @@
+         }
+ 
+         @Override
+-        protected void deserialize(String value) {
++        public void deserialize(String value) { // PAIL - protected->public
+             this.value = Boolean.parseBoolean(value);
+         }
+ 
+@@ -421,9 +421,9 @@
+             return new GameRules.BooleanValue(this.type, this.value);
+         }
+ 
+-        public void setFrom(GameRules.BooleanValue rule, @Nullable MinecraftServer server) {
+-            this.value = rule.value;
+-            this.onChanged(server);
++        public void setFrom(GameRules.BooleanValue gamerules_gameruleboolean, @Nullable ServerLevel minecraftserver) { // CraftBukkit - per-world
++            this.value = gamerules_gameruleboolean.value;
++            this.onChanged(minecraftserver);
+         }
+     }
+ 
+@@ -431,13 +431,13 @@
+ 
+         private int value;
+ 
+-        private static GameRules.Type<GameRules.IntegerValue> create(int initialValue, BiConsumer<MinecraftServer, GameRules.IntegerValue> changeCallback) {
++        private static GameRules.Type<GameRules.IntegerValue> create(int initialValue, BiConsumer<ServerLevel, GameRules.IntegerValue> changeCallback) { // CraftBukkit - per-world
+             return new GameRules.Type<>(IntegerArgumentType::integer, (gamerules_gameruledefinition) -> {
+                 return new GameRules.IntegerValue(gamerules_gameruledefinition, initialValue);
+             }, changeCallback, GameRules.GameRuleTypeVisitor::visitInteger, FeatureFlagSet.of());
+         }
+ 
+-        static GameRules.Type<GameRules.IntegerValue> create(int initialValue, int min, int max, FeatureFlagSet requiredFeatures, BiConsumer<MinecraftServer, GameRules.IntegerValue> changeCallback) {
++        static GameRules.Type<GameRules.IntegerValue> create(int initialValue, int min, int max, FeatureFlagSet requiredFeatures, BiConsumer<ServerLevel, GameRules.IntegerValue> changeCallback) { // CraftBukkit - per-world
+             return new GameRules.Type<>(() -> {
+                 return IntegerArgumentType.integer(min, max);
+             }, (gamerules_gameruledefinition) -> {
+@@ -464,9 +464,9 @@
+             return this.value;
+         }
+ 
+-        public void set(int value, @Nullable MinecraftServer server) {
+-            this.value = value;
+-            this.onChanged(server);
++        public void set(int i, @Nullable ServerLevel minecraftserver) { // CraftBukkit - per-world
++            this.value = i;
++            this.onChanged(minecraftserver);
+         }
+ 
+         @Override
+@@ -475,7 +475,7 @@
+         }
+ 
+         @Override
+-        protected void deserialize(String value) {
++        public void deserialize(String value) { // PAIL - protected->public
+             this.value = IntegerValue.safeParse(value);
+         }
+ 
+@@ -517,9 +517,9 @@
+             return new GameRules.IntegerValue(this.type, this.value);
+         }
+ 
+-        public void setFrom(GameRules.IntegerValue rule, @Nullable MinecraftServer server) {
+-            this.value = rule.value;
+-            this.onChanged(server);
++        public void setFrom(GameRules.IntegerValue gamerules_gameruleint, @Nullable ServerLevel minecraftserver) { // CraftBukkit - per-world
++            this.value = gamerules_gameruleint.value;
++            this.onChanged(minecraftserver);
+         }
+     }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/GameRules.patch b/paper-server/patches/sources/net/minecraft/world/level/GameRules.patch
deleted file mode 100644
index c239883925..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/GameRules.patch
+++ /dev/null
@@ -1,212 +0,0 @@
---- a/net/minecraft/world/level/GameRules.java
-+++ b/net/minecraft/world/level/GameRules.java
-@@ -58,7 +58,7 @@
-     public static final GameRules.GameRuleKey<GameRules.GameRuleBoolean> RULE_SENDCOMMANDFEEDBACK = register("sendCommandFeedback", GameRules.GameRuleCategory.CHAT, GameRules.GameRuleBoolean.create(true));
-     public static final GameRules.GameRuleKey<GameRules.GameRuleBoolean> RULE_REDUCEDDEBUGINFO = register("reducedDebugInfo", GameRules.GameRuleCategory.MISC, GameRules.GameRuleBoolean.create(false, (minecraftserver, gamerules_gameruleboolean) -> {
-         int i = gamerules_gameruleboolean.get() ? 22 : 23;
--        Iterator iterator = minecraftserver.getPlayerList().getPlayers().iterator();
-+        Iterator iterator = minecraftserver.players().iterator(); // CraftBukkit - per-world
- 
-         while (iterator.hasNext()) {
-             EntityPlayer entityplayer = (EntityPlayer) iterator.next();
-@@ -74,7 +74,7 @@
-     public static final GameRules.GameRuleKey<GameRules.GameRuleInt> RULE_MAX_ENTITY_CRAMMING = register("maxEntityCramming", GameRules.GameRuleCategory.MOBS, GameRules.GameRuleInt.create(24));
-     public static final GameRules.GameRuleKey<GameRules.GameRuleBoolean> RULE_WEATHER_CYCLE = register("doWeatherCycle", GameRules.GameRuleCategory.UPDATES, GameRules.GameRuleBoolean.create(true));
-     public static final GameRules.GameRuleKey<GameRules.GameRuleBoolean> RULE_LIMITED_CRAFTING = register("doLimitedCrafting", GameRules.GameRuleCategory.PLAYER, GameRules.GameRuleBoolean.create(false, (minecraftserver, gamerules_gameruleboolean) -> {
--        Iterator iterator = minecraftserver.getPlayerList().getPlayers().iterator();
-+        Iterator iterator = minecraftserver.players().iterator(); // CraftBukkit - per-world
- 
-         while (iterator.hasNext()) {
-             EntityPlayer entityplayer = (EntityPlayer) iterator.next();
-@@ -90,7 +90,7 @@
-     public static final GameRules.GameRuleKey<GameRules.GameRuleBoolean> RULE_DISABLE_RAIDS = register("disableRaids", GameRules.GameRuleCategory.MOBS, GameRules.GameRuleBoolean.create(false));
-     public static final GameRules.GameRuleKey<GameRules.GameRuleBoolean> RULE_DOINSOMNIA = register("doInsomnia", GameRules.GameRuleCategory.SPAWNING, GameRules.GameRuleBoolean.create(true));
-     public static final GameRules.GameRuleKey<GameRules.GameRuleBoolean> RULE_DO_IMMEDIATE_RESPAWN = register("doImmediateRespawn", GameRules.GameRuleCategory.PLAYER, GameRules.GameRuleBoolean.create(false, (minecraftserver, gamerules_gameruleboolean) -> {
--        Iterator iterator = minecraftserver.getPlayerList().getPlayers().iterator();
-+        Iterator iterator = minecraftserver.players().iterator(); // CraftBukkit - per-world
- 
-         while (iterator.hasNext()) {
-             EntityPlayer entityplayer = (EntityPlayer) iterator.next();
-@@ -123,7 +123,7 @@
-     public static final GameRules.GameRuleKey<GameRules.GameRuleInt> RULE_MINECART_MAX_SPEED = register("minecartMaxSpeed", GameRules.GameRuleCategory.MISC, GameRules.GameRuleInt.create(8, 1, 1000, FeatureFlagSet.of(FeatureFlags.MINECART_IMPROVEMENTS), (minecraftserver, gamerules_gameruleint) -> {
-     }));
-     public static final GameRules.GameRuleKey<GameRules.GameRuleInt> RULE_SPAWN_CHUNK_RADIUS = register("spawnChunkRadius", GameRules.GameRuleCategory.MISC, GameRules.GameRuleInt.create(2, 0, 32, FeatureFlagSet.of(), (minecraftserver, gamerules_gameruleint) -> {
--        WorldServer worldserver = minecraftserver.overworld();
-+        WorldServer worldserver = minecraftserver; // CraftBukkit - per-world
- 
-         worldserver.setDefaultSpawnPos(worldserver.getSharedSpawnPos(), worldserver.getSharedSpawnAngle());
-     }));
-@@ -164,7 +164,7 @@
-     }
- 
-     public <T extends GameRules.GameRuleValue<T>> T getRule(GameRules.GameRuleKey<T> gamerules_gamerulekey) {
--        T t0 = (GameRules.GameRuleValue) this.rules.get(gamerules_gamerulekey);
-+        T t0 = (T) this.rules.get(gamerules_gamerulekey); // CraftBukkit - decompile error
- 
-         if (t0 == null) {
-             throw new IllegalArgumentException("Tried to access invalid game rule");
-@@ -184,7 +184,7 @@
- 
-     private void loadFromTag(DynamicLike<?> dynamiclike) {
-         this.rules.forEach((gamerules_gamerulekey, gamerules_gamerulevalue) -> {
--            DataResult dataresult = dynamiclike.get(gamerules_gamerulekey.id).asString();
-+            DataResult<String> dataresult = dynamiclike.get(gamerules_gamerulekey.id).asString(); // CraftBukkit - decompile error
- 
-             Objects.requireNonNull(gamerules_gamerulevalue);
-             dataresult.ifSuccess(gamerules_gamerulevalue::deserialize);
-@@ -205,19 +205,19 @@
- 
-     private <T extends GameRules.GameRuleValue<T>> void callVisitorCap(GameRules.GameRuleVisitor gamerules_gamerulevisitor, GameRules.GameRuleKey<?> gamerules_gamerulekey, GameRules.GameRuleDefinition<?> gamerules_gameruledefinition) {
-         if (gamerules_gameruledefinition.requiredFeatures.isSubsetOf(this.enabledFeatures)) {
--            gamerules_gamerulevisitor.visit(gamerules_gamerulekey, gamerules_gameruledefinition);
--            gamerules_gameruledefinition.callVisitor(gamerules_gamerulevisitor, gamerules_gamerulekey);
-+            gamerules_gamerulevisitor.visit((GameRules.GameRuleKey<T>) gamerules_gamerulekey, (GameRules.GameRuleDefinition<T>) gamerules_gameruledefinition); // CraftBukkit - decompile error
-+            ((GameRules.GameRuleDefinition<T>) gamerules_gameruledefinition).callVisitor(gamerules_gamerulevisitor, (GameRules.GameRuleKey<T>) gamerules_gamerulekey); // CraftBukkit - decompile error
-         }
- 
-     }
- 
--    public void assignFrom(GameRules gamerules, @Nullable MinecraftServer minecraftserver) {
-+    public void assignFrom(GameRules gamerules, @Nullable WorldServer minecraftserver) { // CraftBukkit - per-world
-         gamerules.rules.keySet().forEach((gamerules_gamerulekey) -> {
-             this.assignCap(gamerules_gamerulekey, gamerules, minecraftserver);
-         });
-     }
- 
--    private <T extends GameRules.GameRuleValue<T>> void assignCap(GameRules.GameRuleKey<T> gamerules_gamerulekey, GameRules gamerules, @Nullable MinecraftServer minecraftserver) {
-+    private <T extends GameRules.GameRuleValue<T>> void assignCap(GameRules.GameRuleKey<T> gamerules_gamerulekey, GameRules gamerules, @Nullable WorldServer minecraftserver) { // CraftBukkit - per-world
-         T t0 = gamerules.getRule(gamerules_gamerulekey);
- 
-         this.getRule(gamerules_gamerulekey).setFrom(t0, minecraftserver);
-@@ -285,11 +285,11 @@
- 
-         final Supplier<ArgumentType<?>> argument;
-         private final Function<GameRules.GameRuleDefinition<T>, T> constructor;
--        final BiConsumer<MinecraftServer, T> callback;
-+        final BiConsumer<WorldServer, T> callback; // CraftBukkit - per-world
-         private final GameRules.h<T> visitorCaller;
-         final FeatureFlagSet requiredFeatures;
- 
--        GameRuleDefinition(Supplier<ArgumentType<?>> supplier, Function<GameRules.GameRuleDefinition<T>, T> function, BiConsumer<MinecraftServer, T> biconsumer, GameRules.h<T> gamerules_h, FeatureFlagSet featureflagset) {
-+        GameRuleDefinition(Supplier<ArgumentType<?>> supplier, Function<GameRules.GameRuleDefinition<T>, T> function, BiConsumer<WorldServer, T> biconsumer, GameRules.h<T> gamerules_h, FeatureFlagSet featureflagset) { // CraftBukkit - per-world
-             this.argument = supplier;
-             this.constructor = function;
-             this.callback = biconsumer;
-@@ -302,7 +302,7 @@
-         }
- 
-         public T createRule() {
--            return (GameRules.GameRuleValue) this.constructor.apply(this);
-+            return this.constructor.apply(this); // CraftBukkit - decompile error
-         }
- 
-         public void callVisitor(GameRules.GameRuleVisitor gamerules_gamerulevisitor, GameRules.GameRuleKey<T> gamerules_gamerulekey) {
-@@ -326,17 +326,17 @@
- 
-         public void setFromArgument(CommandContext<CommandListenerWrapper> commandcontext, String s) {
-             this.updateFromArgument(commandcontext, s);
--            this.onChanged(((CommandListenerWrapper) commandcontext.getSource()).getServer());
-+            this.onChanged(((CommandListenerWrapper) commandcontext.getSource()).getLevel()); // CraftBukkit - per-world
-         }
- 
--        public void onChanged(@Nullable MinecraftServer minecraftserver) {
-+        public void onChanged(@Nullable WorldServer minecraftserver) { // CraftBukkit - per-world
-             if (minecraftserver != null) {
-                 this.type.callback.accept(minecraftserver, this.getSelf());
-             }
- 
-         }
- 
--        protected abstract void deserialize(String s);
-+        public abstract void deserialize(String s); // PAIL - private->public
- 
-         public abstract String serialize();
- 
-@@ -350,7 +350,7 @@
- 
-         protected abstract T copy();
- 
--        public abstract void setFrom(T t0, @Nullable MinecraftServer minecraftserver);
-+        public abstract void setFrom(T t0, @Nullable WorldServer minecraftserver); // CraftBukkit - per-world
-     }
- 
-     public interface GameRuleVisitor {
-@@ -366,7 +366,7 @@
- 
-         private boolean value;
- 
--        static GameRules.GameRuleDefinition<GameRules.GameRuleBoolean> create(boolean flag, BiConsumer<MinecraftServer, GameRules.GameRuleBoolean> biconsumer) {
-+        static GameRules.GameRuleDefinition<GameRules.GameRuleBoolean> create(boolean flag, BiConsumer<WorldServer, GameRules.GameRuleBoolean> biconsumer) { // CraftBukkit - per-world
-             return new GameRules.GameRuleDefinition<>(BoolArgumentType::bool, (gamerules_gameruledefinition) -> {
-                 return new GameRules.GameRuleBoolean(gamerules_gameruledefinition, flag);
-             }, biconsumer, GameRules.GameRuleVisitor::visitBoolean, FeatureFlagSet.of());
-@@ -391,7 +391,7 @@
-             return this.value;
-         }
- 
--        public void set(boolean flag, @Nullable MinecraftServer minecraftserver) {
-+        public void set(boolean flag, @Nullable WorldServer minecraftserver) { // CraftBukkit - per-world
-             this.value = flag;
-             this.onChanged(minecraftserver);
-         }
-@@ -402,7 +402,7 @@
-         }
- 
-         @Override
--        protected void deserialize(String s) {
-+        public void deserialize(String s) { // PAIL - protected->public
-             this.value = Boolean.parseBoolean(s);
-         }
- 
-@@ -421,7 +421,7 @@
-             return new GameRules.GameRuleBoolean(this.type, this.value);
-         }
- 
--        public void setFrom(GameRules.GameRuleBoolean gamerules_gameruleboolean, @Nullable MinecraftServer minecraftserver) {
-+        public void setFrom(GameRules.GameRuleBoolean gamerules_gameruleboolean, @Nullable WorldServer minecraftserver) { // CraftBukkit - per-world
-             this.value = gamerules_gameruleboolean.value;
-             this.onChanged(minecraftserver);
-         }
-@@ -431,13 +431,13 @@
- 
-         private int value;
- 
--        private static GameRules.GameRuleDefinition<GameRules.GameRuleInt> create(int i, BiConsumer<MinecraftServer, GameRules.GameRuleInt> biconsumer) {
-+        private static GameRules.GameRuleDefinition<GameRules.GameRuleInt> create(int i, BiConsumer<WorldServer, GameRules.GameRuleInt> biconsumer) { // CraftBukkit - per-world
-             return new GameRules.GameRuleDefinition<>(IntegerArgumentType::integer, (gamerules_gameruledefinition) -> {
-                 return new GameRules.GameRuleInt(gamerules_gameruledefinition, i);
-             }, biconsumer, GameRules.GameRuleVisitor::visitInteger, FeatureFlagSet.of());
-         }
- 
--        static GameRules.GameRuleDefinition<GameRules.GameRuleInt> create(int i, int j, int k, FeatureFlagSet featureflagset, BiConsumer<MinecraftServer, GameRules.GameRuleInt> biconsumer) {
-+        static GameRules.GameRuleDefinition<GameRules.GameRuleInt> create(int i, int j, int k, FeatureFlagSet featureflagset, BiConsumer<WorldServer, GameRules.GameRuleInt> biconsumer) { // CraftBukkit - per-world
-             return new GameRules.GameRuleDefinition<>(() -> {
-                 return IntegerArgumentType.integer(j, k);
-             }, (gamerules_gameruledefinition) -> {
-@@ -464,7 +464,7 @@
-             return this.value;
-         }
- 
--        public void set(int i, @Nullable MinecraftServer minecraftserver) {
-+        public void set(int i, @Nullable WorldServer minecraftserver) { // CraftBukkit - per-world
-             this.value = i;
-             this.onChanged(minecraftserver);
-         }
-@@ -475,7 +475,7 @@
-         }
- 
-         @Override
--        protected void deserialize(String s) {
-+        public void deserialize(String s) { // PAIL - protected->public
-             this.value = safeParse(s);
-         }
- 
-@@ -517,7 +517,7 @@
-             return new GameRules.GameRuleInt(this.type, this.value);
-         }
- 
--        public void setFrom(GameRules.GameRuleInt gamerules_gameruleint, @Nullable MinecraftServer minecraftserver) {
-+        public void setFrom(GameRules.GameRuleInt gamerules_gameruleint, @Nullable WorldServer minecraftserver) { // CraftBukkit - per-world
-             this.value = gamerules_gameruleint.value;
-             this.onChanged(minecraftserver);
-         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/GeneratorAccess.patch b/paper-server/patches/sources/net/minecraft/world/level/GeneratorAccess.patch
deleted file mode 100644
index ff57d08fb9..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/GeneratorAccess.patch
+++ /dev/null
@@ -1,9 +0,0 @@
---- a/net/minecraft/world/level/GeneratorAccess.java
-+++ b/net/minecraft/world/level/GeneratorAccess.java
-@@ -101,4 +101,6 @@
-     default void gameEvent(ResourceKey<GameEvent> resourcekey, BlockPosition blockposition, GameEvent.a gameevent_a) {
-         this.gameEvent((Holder) this.registryAccess().lookupOrThrow(Registries.GAME_EVENT).getOrThrow(resourcekey), blockposition, gameevent_a);
-     }
-+
-+    net.minecraft.server.level.WorldServer getMinecraftWorld(); // CraftBukkit
- }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/IBlockAccess.patch b/paper-server/patches/sources/net/minecraft/world/level/IBlockAccess.patch
deleted file mode 100644
index 0e30f8b40a..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/IBlockAccess.patch
+++ /dev/null
@@ -1,44 +0,0 @@
---- a/net/minecraft/world/level/IBlockAccess.java
-+++ b/net/minecraft/world/level/IBlockAccess.java
-@@ -31,7 +31,7 @@
-     default <T extends TileEntity> Optional<T> getBlockEntity(BlockPosition blockposition, TileEntityTypes<T> tileentitytypes) {
-         TileEntity tileentity = this.getBlockEntity(blockposition);
- 
--        return tileentity != null && tileentity.getType() == tileentitytypes ? Optional.of(tileentity) : Optional.empty();
-+        return tileentity != null && tileentity.getType() == tileentitytypes ? (Optional<T>) Optional.of(tileentity) : Optional.empty(); // CraftBukkit - decompile error
-     }
- 
-     IBlockData getBlockState(BlockPosition blockposition);
-@@ -59,8 +59,8 @@
-         });
-     }
- 
--    default MovingObjectPositionBlock clip(RayTrace raytrace) {
--        return (MovingObjectPositionBlock) traverseBlocks(raytrace.getFrom(), raytrace.getTo(), raytrace, (raytrace1, blockposition) -> {
-+    // CraftBukkit start - moved block handling into separate method for use by Block#rayTrace
-+    default MovingObjectPositionBlock clip(RayTrace raytrace1, BlockPosition blockposition) {
-             IBlockData iblockdata = this.getBlockState(blockposition);
-             Fluid fluid = this.getFluidState(blockposition);
-             Vec3D vec3d = raytrace1.getFrom();
-@@ -73,6 +73,12 @@
-             double d1 = movingobjectpositionblock1 == null ? Double.MAX_VALUE : raytrace1.getFrom().distanceToSqr(movingobjectpositionblock1.getLocation());
- 
-             return d0 <= d1 ? movingobjectpositionblock : movingobjectpositionblock1;
-+    }
-+    // CraftBukkit end
-+
-+    default MovingObjectPositionBlock clip(RayTrace raytrace) {
-+        return (MovingObjectPositionBlock) traverseBlocks(raytrace.getFrom(), raytrace.getTo(), raytrace, (raytrace1, blockposition) -> {
-+            return this.clip(raytrace1, blockposition); // CraftBukkit - moved into separate method
-         }, (raytrace1) -> {
-             Vec3D vec3d = raytrace1.getFrom().subtract(raytrace1.getTo());
- 
-@@ -145,7 +151,7 @@
-                 double d13 = d10 * (i1 > 0 ? 1.0D - MathHelper.frac(d4) : MathHelper.frac(d4));
-                 double d14 = d11 * (j1 > 0 ? 1.0D - MathHelper.frac(d5) : MathHelper.frac(d5));
- 
--                Object object;
-+                T object; // CraftBukkit - decompile error
- 
-                 do {
-                     if (d12 > 1.0D && d13 > 1.0D && d14 > 1.0D) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/Level.java.patch b/paper-server/patches/sources/net/minecraft/world/level/Level.java.patch
new file mode 100644
index 0000000000..3e9884077b
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/Level.java.patch
@@ -0,0 +1,395 @@
+--- a/net/minecraft/world/level/Level.java
++++ b/net/minecraft/world/level/Level.java
+@@ -27,6 +27,7 @@
+ import net.minecraft.resources.ResourceLocation;
+ import net.minecraft.server.MinecraftServer;
+ import net.minecraft.server.level.FullChunkStatus;
++import net.minecraft.server.level.ServerLevel;
+ import net.minecraft.sounds.SoundEvent;
+ import net.minecraft.sounds.SoundEvents;
+ import net.minecraft.sounds.SoundSource;
+@@ -43,6 +44,7 @@
+ import net.minecraft.world.entity.Entity;
+ import net.minecraft.world.entity.boss.EnderDragonPart;
+ import net.minecraft.world.entity.boss.enderdragon.EnderDragon;
++import net.minecraft.world.entity.item.ItemEntity;
+ import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.item.alchemy.PotionBrewing;
+@@ -57,12 +59,14 @@
+ import net.minecraft.world.level.block.entity.FuelValues;
+ import net.minecraft.world.level.block.entity.TickingBlockEntity;
+ import net.minecraft.world.level.block.state.BlockState;
++import net.minecraft.world.level.border.BorderChangeListener;
+ import net.minecraft.world.level.border.WorldBorder;
+ import net.minecraft.world.level.chunk.ChunkAccess;
+ import net.minecraft.world.level.chunk.ChunkSource;
+ import net.minecraft.world.level.chunk.LevelChunk;
+ import net.minecraft.world.level.chunk.status.ChunkStatus;
+ import net.minecraft.world.level.dimension.DimensionType;
++import net.minecraft.world.level.dimension.LevelStem;
+ import net.minecraft.world.level.entity.EntityTypeTest;
+ import net.minecraft.world.level.entity.LevelEntityGetter;
+ import net.minecraft.world.level.gameevent.GameEvent;
+@@ -81,6 +85,24 @@
+ import net.minecraft.world.phys.Vec3;
+ import net.minecraft.world.scores.Scoreboard;
+ 
++// CraftBukkit start
++import java.util.HashMap;
++import java.util.Map;
++import net.minecraft.network.protocol.game.ClientboundSetBorderCenterPacket;
++import net.minecraft.network.protocol.game.ClientboundSetBorderLerpSizePacket;
++import net.minecraft.network.protocol.game.ClientboundSetBorderSizePacket;
++import net.minecraft.network.protocol.game.ClientboundSetBorderWarningDelayPacket;
++import net.minecraft.network.protocol.game.ClientboundSetBorderWarningDistancePacket;
++import org.bukkit.Bukkit;
++import org.bukkit.craftbukkit.CraftServer;
++import org.bukkit.craftbukkit.CraftWorld;
++import org.bukkit.craftbukkit.block.CapturedBlockState;
++import org.bukkit.craftbukkit.block.data.CraftBlockData;
++import org.bukkit.craftbukkit.util.CraftSpawnCategory;
++import org.bukkit.entity.SpawnCategory;
++import org.bukkit.event.block.BlockPhysicsEvent;
++// CraftBukkit end
++
+ public abstract class Level implements LevelAccessor, AutoCloseable {
+ 
+     public static final Codec<ResourceKey<Level>> RESOURCE_KEY_CODEC = ResourceKey.codec(Registries.DIMENSION);
+@@ -121,23 +143,58 @@
+     private final DamageSources damageSources;
+     private long subTickCount;
+ 
+-    protected Level(WritableLevelData properties, ResourceKey<Level> registryRef, RegistryAccess registryManager, Holder<DimensionType> dimensionEntry, boolean isClient, boolean debugWorld, long seed, int maxChainedNeighborUpdates) {
+-        this.levelData = properties;
+-        this.dimensionTypeRegistration = dimensionEntry;
+-        final DimensionType dimensionmanager = (DimensionType) dimensionEntry.value();
++    // CraftBukkit start Added the following
++    private final CraftWorld world;
++    public boolean pvpMode;
++    public org.bukkit.generator.ChunkGenerator generator;
+ 
+-        this.dimension = registryRef;
+-        this.isClientSide = isClient;
++    public boolean preventPoiUpdated = false; // CraftBukkit - SPIGOT-5710
++    public boolean captureBlockStates = false;
++    public boolean captureTreeGeneration = false;
++    public Map<BlockPos, CapturedBlockState> capturedBlockStates = new java.util.LinkedHashMap<>();
++    public Map<BlockPos, BlockEntity> capturedTileEntities = new HashMap<>();
++    public List<ItemEntity> captureDrops;
++    public final it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<SpawnCategory> ticksPerSpawnCategory = new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>();
++    public boolean populating;
++
++    public CraftWorld getWorld() {
++        return this.world;
++    }
++
++    public CraftServer getCraftServer() {
++        return (CraftServer) Bukkit.getServer();
++    }
++
++    public abstract ResourceKey<LevelStem> getTypeKey();
++
++    protected Level(WritableLevelData worlddatamutable, ResourceKey<Level> resourcekey, RegistryAccess iregistrycustom, Holder<DimensionType> holder, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env) {
++        this.generator = gen;
++        this.world = new CraftWorld((ServerLevel) this, gen, biomeProvider, env);
++
++        // CraftBukkit Ticks things
++        for (SpawnCategory spawnCategory : SpawnCategory.values()) {
++            if (CraftSpawnCategory.isValidForLimits(spawnCategory)) {
++                this.ticksPerSpawnCategory.put(spawnCategory, (long) this.getCraftServer().getTicksPerSpawns(spawnCategory));
++            }
++        }
++
++        // CraftBukkit end
++        this.levelData = worlddatamutable;
++        this.dimensionTypeRegistration = holder;
++        final DimensionType dimensionmanager = (DimensionType) holder.value();
++
++        this.dimension = resourcekey;
++        this.isClientSide = flag;
+         if (dimensionmanager.coordinateScale() != 1.0D) {
+-            this.worldBorder = new WorldBorder(this) {
++            this.worldBorder = new WorldBorder() { // CraftBukkit - decompile error
+                 @Override
+                 public double getCenterX() {
+-                    return super.getCenterX() / dimensionmanager.coordinateScale();
++                    return super.getCenterX(); // CraftBukkit
+                 }
+ 
+                 @Override
+                 public double getCenterZ() {
+-                    return super.getCenterZ() / dimensionmanager.coordinateScale();
++                    return super.getCenterZ(); // CraftBukkit
+                 }
+             };
+         } else {
+@@ -145,11 +202,47 @@
+         }
+ 
+         this.thread = Thread.currentThread();
+-        this.biomeManager = new BiomeManager(this, seed);
+-        this.isDebug = debugWorld;
+-        this.neighborUpdater = new CollectingNeighborUpdater(this, maxChainedNeighborUpdates);
+-        this.registryAccess = registryManager;
+-        this.damageSources = new DamageSources(registryManager);
++        this.biomeManager = new BiomeManager(this, i);
++        this.isDebug = flag1;
++        this.neighborUpdater = new CollectingNeighborUpdater(this, j);
++        this.registryAccess = iregistrycustom;
++        this.damageSources = new DamageSources(iregistrycustom);
++        // CraftBukkit start
++        this.getWorldBorder().world = (ServerLevel) this;
++        // From PlayerList.setPlayerFileData
++        this.getWorldBorder().addListener(new BorderChangeListener() {
++            @Override
++            public void onBorderSizeSet(WorldBorder border, double size) {
++                Level.this.getCraftServer().getHandle().broadcastAll(new ClientboundSetBorderSizePacket(border), border.world);
++            }
++
++            @Override
++            public void onBorderSizeLerping(WorldBorder border, double fromSize, double toSize, long time) {
++                Level.this.getCraftServer().getHandle().broadcastAll(new ClientboundSetBorderLerpSizePacket(border), border.world);
++            }
++
++            @Override
++            public void onBorderCenterSet(WorldBorder border, double centerX, double centerZ) {
++                Level.this.getCraftServer().getHandle().broadcastAll(new ClientboundSetBorderCenterPacket(border), border.world);
++            }
++
++            @Override
++            public void onBorderSetWarningTime(WorldBorder border, int warningTime) {
++                Level.this.getCraftServer().getHandle().broadcastAll(new ClientboundSetBorderWarningDelayPacket(border), border.world);
++            }
++
++            @Override
++            public void onBorderSetWarningBlocks(WorldBorder border, int warningBlockDistance) {
++                Level.this.getCraftServer().getHandle().broadcastAll(new ClientboundSetBorderWarningDistancePacket(border), border.world);
++            }
++
++            @Override
++            public void onBorderSetDamagePerBlock(WorldBorder border, double damagePerBlock) {}
++
++            @Override
++            public void onBorderSetDamageSafeZOne(WorldBorder border, double safeZoneRadius) {}
++        });
++        // CraftBukkit end
+     }
+ 
+     @Override
+@@ -207,6 +300,18 @@
+ 
+     @Override
+     public boolean setBlock(BlockPos pos, BlockState state, int flags, int maxUpdateDepth) {
++        // CraftBukkit start - tree generation
++        if (this.captureTreeGeneration) {
++            CapturedBlockState blockstate = this.capturedBlockStates.get(pos);
++            if (blockstate == null) {
++                blockstate = CapturedBlockState.getTreeBlockState(this, pos, flags);
++                this.capturedBlockStates.put(pos.immutable(), blockstate);
++            }
++            blockstate.setData(state);
++            blockstate.setFlag(flags);
++            return true;
++        }
++        // CraftBukkit end
+         if (this.isOutsideBuildHeight(pos)) {
+             return false;
+         } else if (!this.isClientSide && this.isDebug()) {
+@@ -214,44 +319,117 @@
+         } else {
+             LevelChunk chunk = this.getChunkAt(pos);
+             Block block = state.getBlock();
+-            BlockState iblockdata1 = chunk.setBlockState(pos, state, (flags & 64) != 0);
++
++            // CraftBukkit start - capture blockstates
++            boolean captured = false;
++            if (this.captureBlockStates && !this.capturedBlockStates.containsKey(pos)) {
++                CapturedBlockState blockstate = CapturedBlockState.getBlockState(this, pos, flags);
++                this.capturedBlockStates.put(pos.immutable(), blockstate);
++                captured = true;
++            }
++            // CraftBukkit end
+ 
++            BlockState iblockdata1 = chunk.setBlockState(pos, state, (flags & 64) != 0, (flags & 1024) == 0); // CraftBukkit custom NO_PLACE flag
++
+             if (iblockdata1 == null) {
++                // CraftBukkit start - remove blockstate if failed (or the same)
++                if (this.captureBlockStates && captured) {
++                    this.capturedBlockStates.remove(pos);
++                }
++                // CraftBukkit end
+                 return false;
+             } else {
+                 BlockState iblockdata2 = this.getBlockState(pos);
+ 
+-                if (iblockdata2 == state) {
++                /*
++                if (iblockdata2 == iblockdata) {
+                     if (iblockdata1 != iblockdata2) {
+-                        this.setBlocksDirty(pos, iblockdata1, iblockdata2);
++                        this.setBlocksDirty(blockposition, iblockdata1, iblockdata2);
+                     }
+ 
+-                    if ((flags & 2) != 0 && (!this.isClientSide || (flags & 4) == 0) && (this.isClientSide || chunk.getFullStatus() != null && chunk.getFullStatus().isOrAfter(FullChunkStatus.BLOCK_TICKING))) {
+-                        this.sendBlockUpdated(pos, iblockdata1, state, flags);
++                    if ((i & 2) != 0 && (!this.isClientSide || (i & 4) == 0) && (this.isClientSide || chunk.getFullStatus() != null && chunk.getFullStatus().isOrAfter(FullChunkStatus.BLOCK_TICKING))) {
++                        this.sendBlockUpdated(blockposition, iblockdata1, iblockdata, i);
+                     }
+ 
+-                    if ((flags & 1) != 0) {
+-                        this.blockUpdated(pos, iblockdata1.getBlock());
+-                        if (!this.isClientSide && state.hasAnalogOutputSignal()) {
+-                            this.updateNeighbourForOutputSignal(pos, block);
++                    if ((i & 1) != 0) {
++                        this.blockUpdated(blockposition, iblockdata1.getBlock());
++                        if (!this.isClientSide && iblockdata.hasAnalogOutputSignal()) {
++                            this.updateNeighbourForOutputSignal(blockposition, block);
+                         }
+                     }
+ 
+-                    if ((flags & 16) == 0 && maxUpdateDepth > 0) {
+-                        int k = flags & -34;
++                    if ((i & 16) == 0 && j > 0) {
++                        int k = i & -34;
+ 
+-                        iblockdata1.updateIndirectNeighbourShapes(this, pos, k, maxUpdateDepth - 1);
+-                        state.updateNeighbourShapes(this, pos, k, maxUpdateDepth - 1);
+-                        state.updateIndirectNeighbourShapes(this, pos, k, maxUpdateDepth - 1);
++                        iblockdata1.updateIndirectNeighbourShapes(this, blockposition, k, j - 1);
++                        iblockdata.updateNeighbourShapes(this, blockposition, k, j - 1);
++                        iblockdata.updateIndirectNeighbourShapes(this, blockposition, k, j - 1);
+                     }
+ 
+-                    this.onBlockStateChange(pos, iblockdata1, iblockdata2);
++                    this.onBlockStateChange(blockposition, iblockdata1, iblockdata2);
+                 }
++                */
+ 
++                // CraftBukkit start
++                if (!this.captureBlockStates) { // Don't notify clients or update physics while capturing blockstates
++                    // Modularize client and physic updates
++                    this.notifyAndUpdatePhysics(pos, chunk, iblockdata1, state, iblockdata2, flags, maxUpdateDepth);
++                }
++                // CraftBukkit end
++
+                 return true;
++            }
++        }
++    }
++
++    // CraftBukkit start - Split off from above in order to directly send client and physic updates
++    public void notifyAndUpdatePhysics(BlockPos blockposition, LevelChunk chunk, BlockState oldBlock, BlockState newBlock, BlockState actualBlock, int i, int j) {
++        BlockState iblockdata = newBlock;
++        BlockState iblockdata1 = oldBlock;
++        BlockState iblockdata2 = actualBlock;
++        if (iblockdata2 == iblockdata) {
++            if (iblockdata1 != iblockdata2) {
++                this.setBlocksDirty(blockposition, iblockdata1, iblockdata2);
++            }
++
++            if ((i & 2) != 0 && (!this.isClientSide || (i & 4) == 0) && (this.isClientSide || chunk == null || (chunk.getFullStatus() != null && chunk.getFullStatus().isOrAfter(FullChunkStatus.BLOCK_TICKING)))) { // allow chunk to be null here as chunk.isReady() is false when we send our notification during block placement
++                this.sendBlockUpdated(blockposition, iblockdata1, iblockdata, i);
++            }
++
++            if ((i & 1) != 0) {
++                this.blockUpdated(blockposition, iblockdata1.getBlock());
++                if (!this.isClientSide && iblockdata.hasAnalogOutputSignal()) {
++                    this.updateNeighbourForOutputSignal(blockposition, newBlock.getBlock());
++                }
+             }
++
++            if ((i & 16) == 0 && j > 0) {
++                int k = i & -34;
++
++                // CraftBukkit start
++                iblockdata1.updateIndirectNeighbourShapes(this, blockposition, k, j - 1); // Don't call an event for the old block to limit event spam
++                CraftWorld world = ((ServerLevel) this).getWorld();
++                if (world != null) {
++                    BlockPhysicsEvent event = new BlockPhysicsEvent(world.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), CraftBlockData.fromData(iblockdata));
++                    this.getCraftServer().getPluginManager().callEvent(event);
++
++                    if (event.isCancelled()) {
++                        return;
++                    }
++                }
++                // CraftBukkit end
++                iblockdata.updateNeighbourShapes(this, blockposition, k, j - 1);
++                iblockdata.updateIndirectNeighbourShapes(this, blockposition, k, j - 1);
++            }
++
++            // CraftBukkit start - SPIGOT-5710
++            if (!this.preventPoiUpdated) {
++                this.onBlockStateChange(blockposition, iblockdata1, iblockdata2);
++            }
++            // CraftBukkit end
+         }
+     }
++    // CraftBukkit end
+ 
+     public void onBlockStateChange(BlockPos pos, BlockState oldBlock, BlockState newBlock) {}
+ 
+@@ -340,6 +518,14 @@
+ 
+     @Override
+     public BlockState getBlockState(BlockPos pos) {
++        // CraftBukkit start - tree generation
++        if (this.captureTreeGeneration) {
++            CapturedBlockState previous = this.capturedBlockStates.get(pos);
++            if (previous != null) {
++                return previous.getHandle();
++            }
++        }
++        // CraftBukkit end
+         if (this.isOutsideBuildHeight(pos)) {
+             return Blocks.VOID_AIR.defaultBlockState();
+         } else {
+@@ -510,13 +696,29 @@
+     @Nullable
+     @Override
+     public BlockEntity getBlockEntity(BlockPos pos) {
+-        return this.isOutsideBuildHeight(pos) ? null : (!this.isClientSide && Thread.currentThread() != this.thread ? null : this.getChunkAt(pos).getBlockEntity(pos, LevelChunk.EntityCreationType.IMMEDIATE));
++        // CraftBukkit start
++        return this.getBlockEntity(pos, true);
+     }
+ 
++    @Nullable
++    public BlockEntity getBlockEntity(BlockPos blockposition, boolean validate) {
++        if (this.capturedTileEntities.containsKey(blockposition)) {
++            return this.capturedTileEntities.get(blockposition);
++        }
++        // CraftBukkit end
++        return this.isOutsideBuildHeight(blockposition) ? null : (!this.isClientSide && Thread.currentThread() != this.thread ? null : this.getChunkAt(blockposition).getBlockEntity(blockposition, LevelChunk.EntityCreationType.IMMEDIATE));
++    }
++
+     public void setBlockEntity(BlockEntity blockEntity) {
+         BlockPos blockposition = blockEntity.getBlockPos();
+ 
+         if (!this.isOutsideBuildHeight(blockposition)) {
++            // CraftBukkit start
++            if (this.captureBlockStates) {
++                this.capturedTileEntities.put(blockposition.immutable(), blockEntity);
++                return;
++            }
++            // CraftBukkit end
+             this.getChunkAt(blockposition).addAndRegisterBlockEntity(blockEntity);
+         }
+     }
+@@ -643,7 +845,7 @@
+ 
+                 for (int k = 0; k < j; ++k) {
+                     EnderDragonPart entitycomplexpart = aentitycomplexpart[k];
+-                    T t0 = (Entity) filter.tryCast(entitycomplexpart);
++                    T t0 = filter.tryCast(entitycomplexpart); // CraftBukkit - decompile error
+ 
+                     if (t0 != null && predicate.test(t0)) {
+                         result.add(t0);
+@@ -912,7 +1114,7 @@
+ 
+     public static enum ExplosionInteraction implements StringRepresentable {
+ 
+-        NONE("none"), BLOCK("block"), MOB("mob"), TNT("tnt"), TRIGGER("trigger");
++        NONE("none"), BLOCK("block"), MOB("mob"), TNT("tnt"), TRIGGER("trigger"), STANDARD("standard"); // CraftBukkit - Add STANDARD which will always use Explosion.Effect.DESTROY
+ 
+         public static final Codec<Level.ExplosionInteraction> CODEC = StringRepresentable.fromEnum(Level.ExplosionInteraction::values);
+         private final String id;
diff --git a/paper-server/patches/sources/net/minecraft/world/level/LevelAccessor.java.patch b/paper-server/patches/sources/net/minecraft/world/level/LevelAccessor.java.patch
new file mode 100644
index 0000000000..7c0828c3ad
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/LevelAccessor.java.patch
@@ -0,0 +1,9 @@
+--- a/net/minecraft/world/level/LevelAccessor.java
++++ b/net/minecraft/world/level/LevelAccessor.java
+@@ -101,4 +101,6 @@
+     default void gameEvent(ResourceKey<GameEvent> event, BlockPos pos, GameEvent.Context emitter) {
+         this.gameEvent((Holder) this.registryAccess().lookupOrThrow(Registries.GAME_EVENT).getOrThrow(event), pos, emitter);
+     }
++
++    net.minecraft.server.level.ServerLevel getMinecraftWorld(); // CraftBukkit
+ }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/IWorldWriter.patch b/paper-server/patches/sources/net/minecraft/world/level/LevelWriter.java.patch
similarity index 75%
rename from paper-server/patches/sources/net/minecraft/world/level/IWorldWriter.patch
rename to paper-server/patches/sources/net/minecraft/world/level/LevelWriter.java.patch
index 29fe1cde21..3008822ea1 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/IWorldWriter.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/LevelWriter.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/world/level/IWorldWriter.java
-+++ b/net/minecraft/world/level/IWorldWriter.java
+--- a/net/minecraft/world/level/LevelWriter.java
++++ b/net/minecraft/world/level/LevelWriter.java
 @@ -28,4 +28,10 @@
      default boolean addFreshEntity(Entity entity) {
          return false;
diff --git a/paper-server/patches/sources/net/minecraft/world/level/MobSpawnerAbstract.patch b/paper-server/patches/sources/net/minecraft/world/level/MobSpawnerAbstract.patch
deleted file mode 100644
index 7e6badc7e0..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/MobSpawnerAbstract.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- a/net/minecraft/world/level/MobSpawnerAbstract.java
-+++ b/net/minecraft/world/level/MobSpawnerAbstract.java
-@@ -54,6 +54,7 @@
- 
-     public void setEntityId(EntityTypes<?> entitytypes, @Nullable World world, RandomSource randomsource, BlockPosition blockposition) {
-         this.getOrCreateNextSpawnData(world, randomsource, blockposition).getEntityToSpawn().putString("id", BuiltInRegistries.ENTITY_TYPE.getKey(entitytypes).toString());
-+        this.spawnPotentials = SimpleWeightedRandomList.empty(); // CraftBukkit - SPIGOT-3496, MC-92282
-     }
- 
-     private boolean isNearPlayer(World world, BlockPosition blockposition) {
-@@ -157,13 +158,18 @@
-                                 ((EntityInsentient) entity).finalizeSpawn(worldserver, worldserver.getCurrentDifficultyAt(entity.blockPosition()), EntitySpawnReason.SPAWNER, (GroupDataEntity) null);
-                             }
- 
--                            Optional optional1 = mobspawnerdata.getEquipment();
-+                            Optional<net.minecraft.world.entity.EquipmentTable> optional1 = mobspawnerdata.getEquipment(); // CraftBukkit - decompile error
- 
-                             Objects.requireNonNull(entityinsentient);
-                             optional1.ifPresent(entityinsentient::equip);
-                         }
- 
--                        if (!worldserver.tryAddFreshEntityWithPassengers(entity)) {
-+                        // CraftBukkit start
-+                        if (org.bukkit.craftbukkit.event.CraftEventFactory.callSpawnerSpawnEvent(entity, blockposition).isCancelled()) {
-+                            continue;
-+                        }
-+                        if (!worldserver.tryAddFreshEntityWithPassengers(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.SPAWNER)) {
-+                            // CraftBukkit end
-                             this.delay(worldserver, blockposition);
-                             return;
-                         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/NaturalSpawner.java.patch b/paper-server/patches/sources/net/minecraft/world/level/NaturalSpawner.java.patch
new file mode 100644
index 0000000000..f26460ed82
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/NaturalSpawner.java.patch
@@ -0,0 +1,95 @@
+--- a/net/minecraft/world/level/NaturalSpawner.java
++++ b/net/minecraft/world/level/NaturalSpawner.java
+@@ -47,8 +47,13 @@
+ import net.minecraft.world.level.levelgen.structure.Structure;
+ import net.minecraft.world.level.levelgen.structure.structures.NetherFortressStructure;
+ import net.minecraft.world.level.material.FluidState;
++import net.minecraft.world.level.storage.LevelData;
+ import net.minecraft.world.phys.Vec3;
+ import org.slf4j.Logger;
++import org.bukkit.craftbukkit.util.CraftSpawnCategory;
++import org.bukkit.entity.SpawnCategory;
++import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
++// CraftBukkit end
+ 
+ public final class NaturalSpawner {
+ 
+@@ -107,15 +112,31 @@
+         return (Biome) chunk.getNoiseBiome(QuartPos.fromBlock(pos.getX()), QuartPos.fromBlock(pos.getY()), QuartPos.fromBlock(pos.getZ())).value();
+     }
+ 
+-    public static List<MobCategory> getFilteredSpawningCategories(NaturalSpawner.SpawnState info, boolean spawnAnimals, boolean spawnMonsters, boolean rare) {
++    // CraftBukkit start - add server
++    public static List<MobCategory> getFilteredSpawningCategories(NaturalSpawner.SpawnState spawnercreature_d, boolean flag, boolean flag1, boolean flag2, ServerLevel worldserver) {
++        LevelData worlddata = worldserver.getLevelData(); // CraftBukkit - Other mob type spawn tick rate
++        // CraftBukkit end
+         List<MobCategory> list = new ArrayList(NaturalSpawner.SPAWNING_CATEGORIES.length);
+         MobCategory[] aenumcreaturetype = NaturalSpawner.SPAWNING_CATEGORIES;
+         int i = aenumcreaturetype.length;
+ 
+         for (int j = 0; j < i; ++j) {
+             MobCategory enumcreaturetype = aenumcreaturetype[j];
++            // CraftBukkit start - Use per-world spawn limits
++            boolean spawnThisTick = true;
++            int limit = enumcreaturetype.getMaxInstancesPerChunk();
++            SpawnCategory spawnCategory = CraftSpawnCategory.toBukkit(enumcreaturetype);
++            if (CraftSpawnCategory.isValidForLimits(spawnCategory)) {
++                spawnThisTick = worldserver.ticksPerSpawnCategory.getLong(spawnCategory) != 0 && worlddata.getGameTime() % worldserver.ticksPerSpawnCategory.getLong(spawnCategory) == 0;
++                limit = worldserver.getWorld().getSpawnLimit(spawnCategory);
++            }
+ 
+-            if ((spawnAnimals || !enumcreaturetype.isFriendly()) && (spawnMonsters || enumcreaturetype.isFriendly()) && (rare || !enumcreaturetype.isPersistent()) && info.canSpawnForCategoryGlobal(enumcreaturetype)) {
++            if (!spawnThisTick || limit == 0) {
++                continue;
++            }
++
++            if ((flag || !enumcreaturetype.isFriendly()) && (flag1 || enumcreaturetype.isFriendly()) && (flag2 || !enumcreaturetype.isPersistent()) && spawnercreature_d.canSpawnForCategoryGlobal(enumcreaturetype, limit)) {
++                // CraftBukkit end
+                 list.add(enumcreaturetype);
+             }
+         }
+@@ -217,10 +238,15 @@
+                                         entityinsentient.moveTo(d0, (double) i, d1, world.random.nextFloat() * 360.0F, 0.0F);
+                                         if (NaturalSpawner.isValidPositionForMob(world, entityinsentient, d2)) {
+                                             groupdataentity = entityinsentient.finalizeSpawn(world, world.getCurrentDifficultyAt(entityinsentient.blockPosition()), EntitySpawnReason.NATURAL, groupdataentity);
+-                                            ++j;
+-                                            ++k1;
+-                                            world.addFreshEntityWithPassengers(entityinsentient);
+-                                            runner.run(entityinsentient, chunk);
++                                            // CraftBukkit start
++                                            // SPIGOT-7045: Give ocelot babies back their special spawn reason. Note: This is the only modification required as ocelots count as monsters which means they only spawn during normal chunk ticking and do not spawn during chunk generation as starter mobs.
++                                            world.addFreshEntityWithPassengers(entityinsentient, (entityinsentient instanceof net.minecraft.world.entity.animal.Ocelot && !((org.bukkit.entity.Ageable) entityinsentient.getBukkitEntity()).isAdult()) ? SpawnReason.OCELOT_BABY : SpawnReason.NATURAL);
++                                            if (!entityinsentient.isRemoved()) {
++                                                ++j;
++                                                ++k1;
++                                                runner.run(entityinsentient, chunk);
++                                            }
++                                            // CraftBukkit end
+                                             if (j >= entityinsentient.getMaxSpawnClusterSize()) {
+                                                 return;
+                                             }
+@@ -369,7 +395,7 @@
+ 
+                                     if (entityinsentient.checkSpawnRules(world, EntitySpawnReason.CHUNK_GENERATION) && entityinsentient.checkSpawnObstruction(world)) {
+                                         groupdataentity = entityinsentient.finalizeSpawn(world, world.getCurrentDifficultyAt(entityinsentient.blockPosition()), EntitySpawnReason.CHUNK_GENERATION, groupdataentity);
+-                                        world.addFreshEntityWithPassengers(entityinsentient);
++                                        world.addFreshEntityWithPassengers(entityinsentient, SpawnReason.CHUNK_GEN); // CraftBukkit
+                                         flag = true;
+                                     }
+                                 }
+@@ -482,10 +508,12 @@
+             return this.unmodifiableMobCategoryCounts;
+         }
+ 
+-        boolean canSpawnForCategoryGlobal(MobCategory group) {
+-            int i = group.getMaxInstancesPerChunk() * this.spawnableChunkCount / NaturalSpawner.MAGIC_NUMBER;
++        // CraftBukkit start
++        boolean canSpawnForCategoryGlobal(MobCategory enumcreaturetype, int limit) {
++            int i = limit * this.spawnableChunkCount / NaturalSpawner.MAGIC_NUMBER;
++            // CraftBukkit end
+ 
+-            return this.mobCategoryCounts.getInt(group) < i;
++            return this.mobCategoryCounts.getInt(enumcreaturetype) < i;
+         }
+ 
+         boolean canSpawnForCategoryLocal(MobCategory group, ChunkPos chunkPos) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/RayTrace.patch b/paper-server/patches/sources/net/minecraft/world/level/RayTrace.patch
deleted file mode 100644
index 24e96e0442..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/RayTrace.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/net/minecraft/world/level/RayTrace.java
-+++ b/net/minecraft/world/level/RayTrace.java
-@@ -22,7 +22,7 @@
-     private final VoxelShapeCollision collisionContext;
- 
-     public RayTrace(Vec3D vec3d, Vec3D vec3d1, RayTrace.BlockCollisionOption raytrace_blockcollisionoption, RayTrace.FluidCollisionOption raytrace_fluidcollisionoption, Entity entity) {
--        this(vec3d, vec3d1, raytrace_blockcollisionoption, raytrace_fluidcollisionoption, VoxelShapeCollision.of(entity));
-+        this(vec3d, vec3d1, raytrace_blockcollisionoption, raytrace_fluidcollisionoption, (entity == null) ? VoxelShapeCollision.empty() : VoxelShapeCollision.of(entity)); // CraftBukkit
-     }
- 
-     public RayTrace(Vec3D vec3d, Vec3D vec3d1, RayTrace.BlockCollisionOption raytrace_blockcollisionoption, RayTrace.FluidCollisionOption raytrace_fluidcollisionoption, VoxelShapeCollision voxelshapecollision) {
-@@ -79,7 +79,7 @@
- 
-         private final Predicate<Fluid> canPick;
- 
--        private FluidCollisionOption(final Predicate predicate) {
-+        private FluidCollisionOption(final Predicate<Fluid> predicate) { // CraftBukkit - decompile error
-             this.canPick = predicate;
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/ServerExplosion.patch b/paper-server/patches/sources/net/minecraft/world/level/ServerExplosion.java.patch
similarity index 58%
rename from paper-server/patches/sources/net/minecraft/world/level/ServerExplosion.patch
rename to paper-server/patches/sources/net/minecraft/world/level/ServerExplosion.java.patch
index 424ef5419e..6f2b9013c4 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/ServerExplosion.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/ServerExplosion.java.patch
@@ -1,48 +1,59 @@
 --- a/net/minecraft/world/level/ServerExplosion.java
 +++ b/net/minecraft/world/level/ServerExplosion.java
-@@ -35,6 +35,17 @@
- import net.minecraft.world.phys.MovingObjectPosition;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import net.minecraft.world.entity.boss.EntityComplexPart;
-+import net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon;
+@@ -22,18 +22,27 @@
+ import net.minecraft.world.entity.EntityType;
+ import net.minecraft.world.entity.LivingEntity;
+ import net.minecraft.world.entity.ai.attributes.Attributes;
++import net.minecraft.world.entity.boss.EnderDragonPart;
++import net.minecraft.world.entity.boss.enderdragon.EnderDragon;
+ import net.minecraft.world.entity.item.ItemEntity;
+ import net.minecraft.world.entity.item.PrimedTnt;
+ import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.level.block.BaseFireBlock;
+ import net.minecraft.world.level.block.Block;
+-import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import net.minecraft.world.level.material.FluidState;
+ import net.minecraft.world.phys.AABB;
+ import net.minecraft.world.phys.HitResult;
+ import net.minecraft.world.phys.Vec3;
 +import net.minecraft.world.level.block.Blocks;
++import net.minecraft.world.level.block.state.BlockState;
 +import org.bukkit.craftbukkit.event.CraftEventFactory;
 +import org.bukkit.craftbukkit.util.CraftLocation;
 +import org.bukkit.event.entity.EntityExplodeEvent;
 +import org.bukkit.Location;
 +import org.bukkit.event.block.BlockExplodeEvent;
 +// CraftBukkit end
-+
+ 
  public class ServerExplosion implements Explosion {
  
-     private static final ExplosionDamageCalculator EXPLOSION_DAMAGE_CALCULATOR = new ExplosionDamageCalculator();
-@@ -50,16 +61,21 @@
+@@ -50,16 +59,21 @@
      private final DamageSource damageSource;
      private final ExplosionDamageCalculator damageCalculator;
-     private final Map<EntityHuman, Vec3D> hitPlayers = new HashMap();
+     private final Map<Player, Vec3> hitPlayers = new HashMap();
 +    // CraftBukkit - add field
 +    public boolean wasCanceled = false;
 +    public float yield;
 +    // CraftBukkit end
  
-     public ServerExplosion(WorldServer worldserver, @Nullable Entity entity, @Nullable DamageSource damagesource, @Nullable ExplosionDamageCalculator explosiondamagecalculator, Vec3D vec3d, float f, boolean flag, Explosion.Effect explosion_effect) {
-         this.level = worldserver;
+     public ServerExplosion(ServerLevel world, @Nullable Entity entity, @Nullable DamageSource damageSource, @Nullable ExplosionDamageCalculator behavior, Vec3 pos, float power, boolean createFire, Explosion.BlockInteraction destructionType) {
+         this.level = world;
          this.source = entity;
--        this.radius = f;
-+        this.radius = (float) Math.max(f, 0.0); // CraftBukkit - clamp bad values
-         this.center = vec3d;
-         this.fire = flag;
-         this.blockInteraction = explosion_effect;
-         this.damageSource = damagesource == null ? worldserver.damageSources().explosion(this) : damagesource;
-         this.damageCalculator = explosiondamagecalculator == null ? this.makeDamageCalculator(entity) : explosiondamagecalculator;
-+        this.yield = this.blockInteraction == Explosion.Effect.DESTROY_WITH_DECAY ? 1.0F / this.radius : 1.0F; // CraftBukkit
+-        this.radius = power;
++        this.radius = (float) Math.max(power, 0.0); // CraftBukkit - clamp bad values
+         this.center = pos;
+         this.fire = createFire;
+         this.blockInteraction = destructionType;
+         this.damageSource = damageSource == null ? world.damageSources().explosion(this) : damageSource;
+         this.damageCalculator = behavior == null ? this.makeDamageCalculator(entity) : behavior;
++        this.yield = this.blockInteraction == Explosion.BlockInteraction.DESTROY_WITH_DECAY ? 1.0F / this.radius : 1.0F; // CraftBukkit
      }
  
      private ExplosionDamageCalculator makeDamageCalculator(@Nullable Entity entity) {
-@@ -195,7 +211,35 @@
-                         float f2 = !flag && f1 == 0.0F ? 0.0F : getSeenPercent(this.center, entity);
+@@ -195,7 +209,35 @@
+                         float f2 = !flag && f1 == 0.0F ? 0.0F : ServerExplosion.getSeenPercent(this.center, entity);
  
                          if (flag) {
 -                            entity.hurtServer(this.level, this.damageSource, this.damageCalculator.getEntityDamageAmount(this, entity, f2));
@@ -54,14 +65,14 @@
 +                            // - Damaging ComplexEntityPart while forward the damage to EntityEnderDragon
 +                            // - Damaging EntityEnderDragon does nothing
 +                            // - EntityEnderDragon hitbock always covers the other parts and is therefore always present
-+                            if (entity instanceof EntityComplexPart) {
++                            if (entity instanceof EnderDragonPart) {
 +                                continue;
 +                            }
 +
 +                            entity.lastDamageCancelled = false;
 +
-+                            if (entity instanceof EntityEnderDragon) {
-+                                for (EntityComplexPart entityComplexPart : ((EntityEnderDragon) entity).subEntities) {
++                            if (entity instanceof EnderDragon) {
++                                for (EnderDragonPart entityComplexPart : ((EnderDragon) entity).subEntities) {
 +                                    // Calculate damage separately for each EntityComplexPart
 +                                    if (list.contains(entityComplexPart)) {
 +                                        entityComplexPart.hurtServer(this.level, this.damageSource, this.damageCalculator.getEntityDamageAmount(this, entity, f2));
@@ -78,35 +89,35 @@
                          }
  
                          double d5 = (1.0D - d0) * (double) f2 * (double) f1;
-@@ -214,6 +258,17 @@
+@@ -214,6 +256,17 @@
                          d3 *= d6;
-                         Vec3D vec3d = new Vec3D(d1, d2, d3);
+                         Vec3 vec3d = new Vec3(d1, d2, d3);
  
 +                        // CraftBukkit start - Call EntityKnockbackEvent
-+                        if (entity instanceof EntityLiving) {
-+                            Vec3D result = entity.getDeltaMovement().add(vec3d);
-+                            org.bukkit.event.entity.EntityKnockbackEvent event = CraftEventFactory.callEntityKnockbackEvent((org.bukkit.craftbukkit.entity.CraftLivingEntity) entity.getBukkitEntity(), source, org.bukkit.event.entity.EntityKnockbackEvent.KnockbackCause.EXPLOSION, d6, vec3d, result.x, result.y, result.z);
++                        if (entity instanceof LivingEntity) {
++                            Vec3 result = entity.getDeltaMovement().add(vec3d);
++                            org.bukkit.event.entity.EntityKnockbackEvent event = CraftEventFactory.callEntityKnockbackEvent((org.bukkit.craftbukkit.entity.CraftLivingEntity) entity.getBukkitEntity(), this.source, org.bukkit.event.entity.EntityKnockbackEvent.KnockbackCause.EXPLOSION, d6, vec3d, result.x, result.y, result.z);
 +
 +                            // SPIGOT-7640: Need to subtract entity movement from the event result,
 +                            // since the code below (the setDeltaMovement call as well as the hitPlayers map)
 +                            // want the vector to be the relative velocity will the event provides the absolute velocity
-+                            vec3d = (event.isCancelled()) ? Vec3D.ZERO : new Vec3D(event.getFinalKnockback().getX(), event.getFinalKnockback().getY(), event.getFinalKnockback().getZ()).subtract(entity.getDeltaMovement());
++                            vec3d = (event.isCancelled()) ? Vec3.ZERO : new Vec3(event.getFinalKnockback().getX(), event.getFinalKnockback().getY(), event.getFinalKnockback().getZ()).subtract(entity.getDeltaMovement());
 +                        }
 +                        // CraftBukkit end
                          entity.push(vec3d);
-                         if (entity instanceof EntityHuman) {
-                             EntityHuman entityhuman = (EntityHuman) entity;
-@@ -235,10 +290,62 @@
-         List<ServerExplosion.a> list1 = new ArrayList();
+                         if (entity instanceof Player) {
+                             Player entityhuman = (Player) entity;
+@@ -235,10 +288,62 @@
+         List<ServerExplosion.StackCollector> list1 = new ArrayList();
  
-         SystemUtils.shuffle(list, this.level.random);
+         Util.shuffle(positions, this.level.random);
 +        // CraftBukkit start
 +        org.bukkit.World bworld = this.level.getWorld();
 +        Location location = CraftLocation.toBukkit(this.center, bworld);
 +
 +        List<org.bukkit.block.Block> blockList = new ObjectArrayList<>();
-+        for (int i1 = list.size() - 1; i1 >= 0; i1--) {
-+            BlockPosition cpos = list.get(i1);
++        for (int i1 = positions.size() - 1; i1 >= 0; i1--) {
++            BlockPos cpos = positions.get(i1);
 +            org.bukkit.block.Block bblock = bworld.getBlockAt(cpos.getX(), cpos.getY(), cpos.getZ());
 +            if (!bblock.getType().isAir()) {
 +                blockList.add(bblock);
@@ -116,40 +127,40 @@
 +        List<org.bukkit.block.Block> bukkitBlocks;
 +
 +        if (this.source != null) {
-+            EntityExplodeEvent event = CraftEventFactory.callEntityExplodeEvent(this.source, blockList, this.yield, getBlockInteraction());
++            EntityExplodeEvent event = CraftEventFactory.callEntityExplodeEvent(this.source, blockList, this.yield, this.getBlockInteraction());
 +            this.wasCanceled = event.isCancelled();
 +            bukkitBlocks = event.blockList();
 +            this.yield = event.getYield();
 +        } else {
 +            org.bukkit.block.Block block = location.getBlock();
-+            org.bukkit.block.BlockState blockState = (damageSource.getDirectBlockState() != null) ? damageSource.getDirectBlockState() : block.getState();
-+            BlockExplodeEvent event = CraftEventFactory.callBlockExplodeEvent(block, blockState, blockList, this.yield, getBlockInteraction());
++            org.bukkit.block.BlockState blockState = (this.damageSource.getDirectBlockState() != null) ? this.damageSource.getDirectBlockState() : block.getState();
++            BlockExplodeEvent event = CraftEventFactory.callBlockExplodeEvent(block, blockState, blockList, this.yield, this.getBlockInteraction());
 +            this.wasCanceled = event.isCancelled();
 +            bukkitBlocks = event.blockList();
 +            this.yield = event.getYield();
 +        }
 +
-+        list.clear();
++        positions.clear();
 +
 +        for (org.bukkit.block.Block bblock : bukkitBlocks) {
-+            BlockPosition coords = new BlockPosition(bblock.getX(), bblock.getY(), bblock.getZ());
-+            list.add(coords);
++            BlockPos coords = new BlockPos(bblock.getX(), bblock.getY(), bblock.getZ());
++            positions.add(coords);
 +        }
 +
 +        if (this.wasCanceled) {
 +            return;
 +        }
 +        // CraftBukkit end
-         Iterator iterator = list.iterator();
+         Iterator iterator = positions.iterator();
  
          while (iterator.hasNext()) {
-             BlockPosition blockposition = (BlockPosition) iterator.next();
+             BlockPos blockposition = (BlockPos) iterator.next();
 +            // CraftBukkit start - TNTPrimeEvent
-+            IBlockData iblockdata = this.level.getBlockState(blockposition);
++            BlockState iblockdata = this.level.getBlockState(blockposition);
 +            Block block = iblockdata.getBlock();
-+            if (block instanceof net.minecraft.world.level.block.BlockTNT) {
-+                Entity sourceEntity = source == null ? null : source;
-+                BlockPosition sourceBlock = sourceEntity == null ? BlockPosition.containing(this.center) : null;
++            if (block instanceof net.minecraft.world.level.block.TntBlock) {
++                Entity sourceEntity = this.source == null ? null : this.source;
++                BlockPos sourceBlock = sourceEntity == null ? BlockPos.containing(this.center) : null;
 +                if (!CraftEventFactory.callTNTPrimeEvent(this.level, blockposition, org.bukkit.event.block.TNTPrimeEvent.PrimeCause.EXPLOSION, sourceEntity, sourceBlock)) {
 +                    this.level.sendBlockUpdated(blockposition, Blocks.AIR.defaultBlockState(), iblockdata, 3); // Update the block on the client
 +                    continue;
@@ -158,15 +169,15 @@
 +            // CraftBukkit end
  
              this.level.getBlockState(blockposition).onExplosionHit(this.level, blockposition, this, (itemstack, blockposition1) -> {
-                 addOrAppendStack(list1, itemstack, blockposition1);
-@@ -262,13 +369,22 @@
-             BlockPosition blockposition = (BlockPosition) iterator.next();
+                 ServerExplosion.addOrAppendStack(list1, itemstack, blockposition1);
+@@ -262,13 +367,22 @@
+             BlockPos blockposition = (BlockPos) iterator.next();
  
              if (this.level.random.nextInt(3) == 0 && this.level.getBlockState(blockposition).isAir() && this.level.getBlockState(blockposition.below()).isSolidRender()) {
--                this.level.setBlockAndUpdate(blockposition, BlockFireAbstract.getState(this.level, blockposition));
+-                this.level.setBlockAndUpdate(blockposition, BaseFireBlock.getState(this.level, blockposition));
 +                // CraftBukkit start - Ignition by explosion
 +                if (!org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(this.level, blockposition, this).isCancelled()) {
-+                    this.level.setBlockAndUpdate(blockposition, BlockFireAbstract.getState(this.level, blockposition));
++                    this.level.setBlockAndUpdate(blockposition, BaseFireBlock.getState(this.level, blockposition));
 +                }
 +                // CraftBukkit end
              }
@@ -181,13 +192,13 @@
 +        }
 +        // CraftBukkit end
          this.level.gameEvent(this.source, (Holder) GameEvent.EXPLODE, this.center);
-         List<BlockPosition> list = this.calculateExplodedPositions();
+         List<BlockPos> list = this.calculateExplodedPositions();
  
-@@ -288,6 +404,7 @@
+@@ -288,6 +402,7 @@
      }
  
-     private static void addOrAppendStack(List<ServerExplosion.a> list, ItemStack itemstack, BlockPosition blockposition) {
-+        if (itemstack.isEmpty()) return; // CraftBukkit - SPIGOT-5425
-         Iterator iterator = list.iterator();
+     private static void addOrAppendStack(List<ServerExplosion.StackCollector> droppedItemsOut, ItemStack item, BlockPos pos) {
++        if (item.isEmpty()) return; // CraftBukkit - SPIGOT-5425
+         Iterator iterator = droppedItemsOut.iterator();
  
          do {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/WorldAccess.patch b/paper-server/patches/sources/net/minecraft/world/level/ServerLevelAccessor.java.patch
similarity index 72%
rename from paper-server/patches/sources/net/minecraft/world/level/WorldAccess.patch
rename to paper-server/patches/sources/net/minecraft/world/level/ServerLevelAccessor.java.patch
index 46d84cb1c3..2c482ebee0 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/WorldAccess.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/ServerLevelAccessor.java.patch
@@ -1,21 +1,21 @@
---- a/net/minecraft/world/level/WorldAccess.java
-+++ b/net/minecraft/world/level/WorldAccess.java
+--- a/net/minecraft/world/level/ServerLevelAccessor.java
++++ b/net/minecraft/world/level/ServerLevelAccessor.java
 @@ -8,6 +8,17 @@
-     WorldServer getLevel();
+     ServerLevel getLevel();
  
      default void addFreshEntityWithPassengers(Entity entity) {
 -        entity.getSelfAndPassengers().forEach(this::addFreshEntity);
 +        // CraftBukkit start
 +        this.addFreshEntityWithPassengers(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.DEFAULT);
-+    }
+     }
 +
 +    default void addFreshEntityWithPassengers(Entity entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason reason) {
 +        entity.getSelfAndPassengers().forEach((e) -> this.addFreshEntity(e, reason));
-     }
++    }
 +
 +    @Override
-+    default WorldServer getMinecraftWorld() {
-+        return getLevel();
++    default ServerLevel getMinecraftWorld() {
++        return this.getLevel();
 +    }
 +    // CraftBukkit end
  }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/SpawnerCreature.patch b/paper-server/patches/sources/net/minecraft/world/level/SpawnerCreature.patch
deleted file mode 100644
index d2b2e265e2..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/SpawnerCreature.patch
+++ /dev/null
@@ -1,92 +0,0 @@
---- a/net/minecraft/world/level/SpawnerCreature.java
-+++ b/net/minecraft/world/level/SpawnerCreature.java
-@@ -50,6 +50,13 @@
- import net.minecraft.world.phys.Vec3D;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import net.minecraft.world.level.storage.WorldData;
-+import org.bukkit.craftbukkit.util.CraftSpawnCategory;
-+import org.bukkit.entity.SpawnCategory;
-+import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
-+// CraftBukkit end
-+
- public final class SpawnerCreature {
- 
-     private static final Logger LOGGER = LogUtils.getLogger();
-@@ -107,15 +114,31 @@
-         return (BiomeBase) ichunkaccess.getNoiseBiome(QuartPos.fromBlock(blockposition.getX()), QuartPos.fromBlock(blockposition.getY()), QuartPos.fromBlock(blockposition.getZ())).value();
-     }
- 
--    public static List<EnumCreatureType> getFilteredSpawningCategories(SpawnerCreature.d spawnercreature_d, boolean flag, boolean flag1, boolean flag2) {
-+    // CraftBukkit start - add server
-+    public static List<EnumCreatureType> getFilteredSpawningCategories(SpawnerCreature.d spawnercreature_d, boolean flag, boolean flag1, boolean flag2, WorldServer worldserver) {
-+        WorldData worlddata = worldserver.getLevelData(); // CraftBukkit - Other mob type spawn tick rate
-+        // CraftBukkit end
-         List<EnumCreatureType> list = new ArrayList(SpawnerCreature.SPAWNING_CATEGORIES.length);
-         EnumCreatureType[] aenumcreaturetype = SpawnerCreature.SPAWNING_CATEGORIES;
-         int i = aenumcreaturetype.length;
- 
-         for (int j = 0; j < i; ++j) {
-             EnumCreatureType enumcreaturetype = aenumcreaturetype[j];
-+            // CraftBukkit start - Use per-world spawn limits
-+            boolean spawnThisTick = true;
-+            int limit = enumcreaturetype.getMaxInstancesPerChunk();
-+            SpawnCategory spawnCategory = CraftSpawnCategory.toBukkit(enumcreaturetype);
-+            if (CraftSpawnCategory.isValidForLimits(spawnCategory)) {
-+                spawnThisTick = worldserver.ticksPerSpawnCategory.getLong(spawnCategory) != 0 && worlddata.getGameTime() % worldserver.ticksPerSpawnCategory.getLong(spawnCategory) == 0;
-+                limit = worldserver.getWorld().getSpawnLimit(spawnCategory);
-+            }
- 
--            if ((flag || !enumcreaturetype.isFriendly()) && (flag1 || enumcreaturetype.isFriendly()) && (flag2 || !enumcreaturetype.isPersistent()) && spawnercreature_d.canSpawnForCategoryGlobal(enumcreaturetype)) {
-+            if (!spawnThisTick || limit == 0) {
-+                continue;
-+            }
-+
-+            if ((flag || !enumcreaturetype.isFriendly()) && (flag1 || enumcreaturetype.isFriendly()) && (flag2 || !enumcreaturetype.isPersistent()) && spawnercreature_d.canSpawnForCategoryGlobal(enumcreaturetype, limit)) {
-+                // CraftBukkit end
-                 list.add(enumcreaturetype);
-             }
-         }
-@@ -217,10 +240,15 @@
-                                         entityinsentient.moveTo(d0, (double) i, d1, worldserver.random.nextFloat() * 360.0F, 0.0F);
-                                         if (isValidPositionForMob(worldserver, entityinsentient, d2)) {
-                                             groupdataentity = entityinsentient.finalizeSpawn(worldserver, worldserver.getCurrentDifficultyAt(entityinsentient.blockPosition()), EntitySpawnReason.NATURAL, groupdataentity);
--                                            ++j;
--                                            ++k1;
--                                            worldserver.addFreshEntityWithPassengers(entityinsentient);
--                                            spawnercreature_a.run(entityinsentient, ichunkaccess);
-+                                            // CraftBukkit start
-+                                            // SPIGOT-7045: Give ocelot babies back their special spawn reason. Note: This is the only modification required as ocelots count as monsters which means they only spawn during normal chunk ticking and do not spawn during chunk generation as starter mobs.
-+                                            worldserver.addFreshEntityWithPassengers(entityinsentient, (entityinsentient instanceof net.minecraft.world.entity.animal.EntityOcelot && !((org.bukkit.entity.Ageable) entityinsentient.getBukkitEntity()).isAdult()) ? SpawnReason.OCELOT_BABY : SpawnReason.NATURAL);
-+                                            if (!entityinsentient.isRemoved()) {
-+                                                ++j;
-+                                                ++k1;
-+                                                spawnercreature_a.run(entityinsentient, ichunkaccess);
-+                                            }
-+                                            // CraftBukkit end
-                                             if (j >= entityinsentient.getMaxSpawnClusterSize()) {
-                                                 return;
-                                             }
-@@ -369,7 +397,7 @@
- 
-                                     if (entityinsentient.checkSpawnRules(worldaccess, EntitySpawnReason.CHUNK_GENERATION) && entityinsentient.checkSpawnObstruction(worldaccess)) {
-                                         groupdataentity = entityinsentient.finalizeSpawn(worldaccess, worldaccess.getCurrentDifficultyAt(entityinsentient.blockPosition()), EntitySpawnReason.CHUNK_GENERATION, groupdataentity);
--                                        worldaccess.addFreshEntityWithPassengers(entityinsentient);
-+                                        worldaccess.addFreshEntityWithPassengers(entityinsentient, SpawnReason.CHUNK_GEN); // CraftBukkit
-                                         flag = true;
-                                     }
-                                 }
-@@ -482,8 +510,10 @@
-             return this.unmodifiableMobCategoryCounts;
-         }
- 
--        boolean canSpawnForCategoryGlobal(EnumCreatureType enumcreaturetype) {
--            int i = enumcreaturetype.getMaxInstancesPerChunk() * this.spawnableChunkCount / SpawnerCreature.MAGIC_NUMBER;
-+        // CraftBukkit start
-+        boolean canSpawnForCategoryGlobal(EnumCreatureType enumcreaturetype, int limit) {
-+            int i = limit * this.spawnableChunkCount / SpawnerCreature.MAGIC_NUMBER;
-+            // CraftBukkit end
- 
-             return this.mobCategoryCounts.getInt(enumcreaturetype) < i;
-         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/World.patch b/paper-server/patches/sources/net/minecraft/world/level/World.patch
deleted file mode 100644
index 37e1193dd7..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/World.patch
+++ /dev/null
@@ -1,320 +0,0 @@
---- a/net/minecraft/world/level/World.java
-+++ b/net/minecraft/world/level/World.java
-@@ -81,6 +81,28 @@
- import net.minecraft.world.phys.Vec3D;
- import net.minecraft.world.scores.Scoreboard;
- 
-+// CraftBukkit start
-+import java.util.HashMap;
-+import java.util.Map;
-+import net.minecraft.network.protocol.game.ClientboundSetBorderCenterPacket;
-+import net.minecraft.network.protocol.game.ClientboundSetBorderLerpSizePacket;
-+import net.minecraft.network.protocol.game.ClientboundSetBorderSizePacket;
-+import net.minecraft.network.protocol.game.ClientboundSetBorderWarningDelayPacket;
-+import net.minecraft.network.protocol.game.ClientboundSetBorderWarningDistancePacket;
-+import net.minecraft.server.level.WorldServer;
-+import net.minecraft.world.entity.item.EntityItem;
-+import net.minecraft.world.level.border.IWorldBorderListener;
-+import net.minecraft.world.level.dimension.WorldDimension;
-+import org.bukkit.Bukkit;
-+import org.bukkit.craftbukkit.CraftServer;
-+import org.bukkit.craftbukkit.CraftWorld;
-+import org.bukkit.craftbukkit.block.CapturedBlockState;
-+import org.bukkit.craftbukkit.block.data.CraftBlockData;
-+import org.bukkit.craftbukkit.util.CraftSpawnCategory;
-+import org.bukkit.entity.SpawnCategory;
-+import org.bukkit.event.block.BlockPhysicsEvent;
-+// CraftBukkit end
-+
- public abstract class World implements GeneratorAccess, AutoCloseable {
- 
-     public static final Codec<ResourceKey<World>> RESOURCE_KEY_CODEC = ResourceKey.codec(Registries.DIMENSION);
-@@ -121,7 +143,42 @@
-     private final DamageSources damageSources;
-     private long subTickCount;
- 
--    protected World(WorldDataMutable worlddatamutable, ResourceKey<World> resourcekey, IRegistryCustom iregistrycustom, Holder<DimensionManager> holder, boolean flag, boolean flag1, long i, int j) {
-+    // CraftBukkit start Added the following
-+    private final CraftWorld world;
-+    public boolean pvpMode;
-+    public org.bukkit.generator.ChunkGenerator generator;
-+
-+    public boolean preventPoiUpdated = false; // CraftBukkit - SPIGOT-5710
-+    public boolean captureBlockStates = false;
-+    public boolean captureTreeGeneration = false;
-+    public Map<BlockPosition, CapturedBlockState> capturedBlockStates = new java.util.LinkedHashMap<>();
-+    public Map<BlockPosition, TileEntity> capturedTileEntities = new HashMap<>();
-+    public List<EntityItem> captureDrops;
-+    public final it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<SpawnCategory> ticksPerSpawnCategory = new it.unimi.dsi.fastutil.objects.Object2LongOpenHashMap<>();
-+    public boolean populating;
-+
-+    public CraftWorld getWorld() {
-+        return this.world;
-+    }
-+
-+    public CraftServer getCraftServer() {
-+        return (CraftServer) Bukkit.getServer();
-+    }
-+
-+    public abstract ResourceKey<WorldDimension> getTypeKey();
-+
-+    protected World(WorldDataMutable worlddatamutable, ResourceKey<World> resourcekey, IRegistryCustom iregistrycustom, Holder<DimensionManager> holder, boolean flag, boolean flag1, long i, int j, org.bukkit.generator.ChunkGenerator gen, org.bukkit.generator.BiomeProvider biomeProvider, org.bukkit.World.Environment env) {
-+        this.generator = gen;
-+        this.world = new CraftWorld((WorldServer) this, gen, biomeProvider, env);
-+
-+        // CraftBukkit Ticks things
-+        for (SpawnCategory spawnCategory : SpawnCategory.values()) {
-+            if (CraftSpawnCategory.isValidForLimits(spawnCategory)) {
-+                this.ticksPerSpawnCategory.put(spawnCategory, (long) this.getCraftServer().getTicksPerSpawns(spawnCategory));
-+            }
-+        }
-+
-+        // CraftBukkit end
-         this.levelData = worlddatamutable;
-         this.dimensionTypeRegistration = holder;
-         final DimensionManager dimensionmanager = (DimensionManager) holder.value();
-@@ -129,15 +186,15 @@
-         this.dimension = resourcekey;
-         this.isClientSide = flag;
-         if (dimensionmanager.coordinateScale() != 1.0D) {
--            this.worldBorder = new WorldBorder(this) {
-+            this.worldBorder = new WorldBorder() { // CraftBukkit - decompile error
-                 @Override
-                 public double getCenterX() {
--                    return super.getCenterX() / dimensionmanager.coordinateScale();
-+                    return super.getCenterX(); // CraftBukkit
-                 }
- 
-                 @Override
-                 public double getCenterZ() {
--                    return super.getCenterZ() / dimensionmanager.coordinateScale();
-+                    return super.getCenterZ(); // CraftBukkit
-                 }
-             };
-         } else {
-@@ -150,6 +207,42 @@
-         this.neighborUpdater = new CollectingNeighborUpdater(this, j);
-         this.registryAccess = iregistrycustom;
-         this.damageSources = new DamageSources(iregistrycustom);
-+        // CraftBukkit start
-+        getWorldBorder().world = (WorldServer) this;
-+        // From PlayerList.setPlayerFileData
-+        getWorldBorder().addListener(new IWorldBorderListener() {
-+            @Override
-+            public void onBorderSizeSet(WorldBorder worldborder, double d0) {
-+                getCraftServer().getHandle().broadcastAll(new ClientboundSetBorderSizePacket(worldborder), worldborder.world);
-+            }
-+
-+            @Override
-+            public void onBorderSizeLerping(WorldBorder worldborder, double d0, double d1, long i) {
-+                getCraftServer().getHandle().broadcastAll(new ClientboundSetBorderLerpSizePacket(worldborder), worldborder.world);
-+            }
-+
-+            @Override
-+            public void onBorderCenterSet(WorldBorder worldborder, double d0, double d1) {
-+                getCraftServer().getHandle().broadcastAll(new ClientboundSetBorderCenterPacket(worldborder), worldborder.world);
-+            }
-+
-+            @Override
-+            public void onBorderSetWarningTime(WorldBorder worldborder, int i) {
-+                getCraftServer().getHandle().broadcastAll(new ClientboundSetBorderWarningDelayPacket(worldborder), worldborder.world);
-+            }
-+
-+            @Override
-+            public void onBorderSetWarningBlocks(WorldBorder worldborder, int i) {
-+                getCraftServer().getHandle().broadcastAll(new ClientboundSetBorderWarningDistancePacket(worldborder), worldborder.world);
-+            }
-+
-+            @Override
-+            public void onBorderSetDamagePerBlock(WorldBorder worldborder, double d0) {}
-+
-+            @Override
-+            public void onBorderSetDamageSafeZOne(WorldBorder worldborder, double d0) {}
-+        });
-+        // CraftBukkit end
-     }
- 
-     @Override
-@@ -207,6 +300,18 @@
- 
-     @Override
-     public boolean setBlock(BlockPosition blockposition, IBlockData iblockdata, int i, int j) {
-+        // CraftBukkit start - tree generation
-+        if (this.captureTreeGeneration) {
-+            CapturedBlockState blockstate = capturedBlockStates.get(blockposition);
-+            if (blockstate == null) {
-+                blockstate = CapturedBlockState.getTreeBlockState(this, blockposition, i);
-+                this.capturedBlockStates.put(blockposition.immutable(), blockstate);
-+            }
-+            blockstate.setData(iblockdata);
-+            blockstate.setFlag(i);
-+            return true;
-+        }
-+        // CraftBukkit end
-         if (this.isOutsideBuildHeight(blockposition)) {
-             return false;
-         } else if (!this.isClientSide && this.isDebug()) {
-@@ -214,13 +319,29 @@
-         } else {
-             Chunk chunk = this.getChunkAt(blockposition);
-             Block block = iblockdata.getBlock();
--            IBlockData iblockdata1 = chunk.setBlockState(blockposition, iblockdata, (i & 64) != 0);
-+
-+            // CraftBukkit start - capture blockstates
-+            boolean captured = false;
-+            if (this.captureBlockStates && !this.capturedBlockStates.containsKey(blockposition)) {
-+                CapturedBlockState blockstate = CapturedBlockState.getBlockState(this, blockposition, i);
-+                this.capturedBlockStates.put(blockposition.immutable(), blockstate);
-+                captured = true;
-+            }
-+            // CraftBukkit end
-+
-+            IBlockData iblockdata1 = chunk.setBlockState(blockposition, iblockdata, (i & 64) != 0, (i & 1024) == 0); // CraftBukkit custom NO_PLACE flag
- 
-             if (iblockdata1 == null) {
-+                // CraftBukkit start - remove blockstate if failed (or the same)
-+                if (this.captureBlockStates && captured) {
-+                    this.capturedBlockStates.remove(blockposition);
-+                }
-+                // CraftBukkit end
-                 return false;
-             } else {
-                 IBlockData iblockdata2 = this.getBlockState(blockposition);
- 
-+                /*
-                 if (iblockdata2 == iblockdata) {
-                     if (iblockdata1 != iblockdata2) {
-                         this.setBlocksDirty(blockposition, iblockdata1, iblockdata2);
-@@ -247,12 +368,69 @@
- 
-                     this.onBlockStateChange(blockposition, iblockdata1, iblockdata2);
-                 }
-+                */
-+
-+                // CraftBukkit start
-+                if (!this.captureBlockStates) { // Don't notify clients or update physics while capturing blockstates
-+                    // Modularize client and physic updates
-+                    notifyAndUpdatePhysics(blockposition, chunk, iblockdata1, iblockdata, iblockdata2, i, j);
-+                }
-+                // CraftBukkit end
- 
-                 return true;
-             }
-         }
-     }
- 
-+    // CraftBukkit start - Split off from above in order to directly send client and physic updates
-+    public void notifyAndUpdatePhysics(BlockPosition blockposition, Chunk chunk, IBlockData oldBlock, IBlockData newBlock, IBlockData actualBlock, int i, int j) {
-+        IBlockData iblockdata = newBlock;
-+        IBlockData iblockdata1 = oldBlock;
-+        IBlockData iblockdata2 = actualBlock;
-+        if (iblockdata2 == iblockdata) {
-+            if (iblockdata1 != iblockdata2) {
-+                this.setBlocksDirty(blockposition, iblockdata1, iblockdata2);
-+            }
-+
-+            if ((i & 2) != 0 && (!this.isClientSide || (i & 4) == 0) && (this.isClientSide || chunk == null || (chunk.getFullStatus() != null && chunk.getFullStatus().isOrAfter(FullChunkStatus.BLOCK_TICKING)))) { // allow chunk to be null here as chunk.isReady() is false when we send our notification during block placement
-+                this.sendBlockUpdated(blockposition, iblockdata1, iblockdata, i);
-+            }
-+
-+            if ((i & 1) != 0) {
-+                this.blockUpdated(blockposition, iblockdata1.getBlock());
-+                if (!this.isClientSide && iblockdata.hasAnalogOutputSignal()) {
-+                    this.updateNeighbourForOutputSignal(blockposition, newBlock.getBlock());
-+                }
-+            }
-+
-+            if ((i & 16) == 0 && j > 0) {
-+                int k = i & -34;
-+
-+                // CraftBukkit start
-+                iblockdata1.updateIndirectNeighbourShapes(this, blockposition, k, j - 1); // Don't call an event for the old block to limit event spam
-+                CraftWorld world = ((WorldServer) this).getWorld();
-+                if (world != null) {
-+                    BlockPhysicsEvent event = new BlockPhysicsEvent(world.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), CraftBlockData.fromData(iblockdata));
-+                    this.getCraftServer().getPluginManager().callEvent(event);
-+
-+                    if (event.isCancelled()) {
-+                        return;
-+                    }
-+                }
-+                // CraftBukkit end
-+                iblockdata.updateNeighbourShapes(this, blockposition, k, j - 1);
-+                iblockdata.updateIndirectNeighbourShapes(this, blockposition, k, j - 1);
-+            }
-+
-+            // CraftBukkit start - SPIGOT-5710
-+            if (!preventPoiUpdated) {
-+                this.onBlockStateChange(blockposition, iblockdata1, iblockdata2);
-+            }
-+            // CraftBukkit end
-+        }
-+    }
-+    // CraftBukkit end
-+
-     public void onBlockStateChange(BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1) {}
- 
-     @Override
-@@ -340,6 +518,14 @@
- 
-     @Override
-     public IBlockData getBlockState(BlockPosition blockposition) {
-+        // CraftBukkit start - tree generation
-+        if (captureTreeGeneration) {
-+            CapturedBlockState previous = capturedBlockStates.get(blockposition);
-+            if (previous != null) {
-+                return previous.getHandle();
-+            }
-+        }
-+        // CraftBukkit end
-         if (this.isOutsideBuildHeight(blockposition)) {
-             return Blocks.VOID_AIR.defaultBlockState();
-         } else {
-@@ -510,6 +696,16 @@
-     @Nullable
-     @Override
-     public TileEntity getBlockEntity(BlockPosition blockposition) {
-+        // CraftBukkit start
-+        return getBlockEntity(blockposition, true);
-+    }
-+
-+    @Nullable
-+    public TileEntity getBlockEntity(BlockPosition blockposition, boolean validate) {
-+        if (capturedTileEntities.containsKey(blockposition)) {
-+            return capturedTileEntities.get(blockposition);
-+        }
-+        // CraftBukkit end
-         return this.isOutsideBuildHeight(blockposition) ? null : (!this.isClientSide && Thread.currentThread() != this.thread ? null : this.getChunkAt(blockposition).getBlockEntity(blockposition, Chunk.EnumTileEntityState.IMMEDIATE));
-     }
- 
-@@ -517,6 +713,12 @@
-         BlockPosition blockposition = tileentity.getBlockPos();
- 
-         if (!this.isOutsideBuildHeight(blockposition)) {
-+            // CraftBukkit start
-+            if (captureBlockStates) {
-+                capturedTileEntities.put(blockposition.immutable(), tileentity);
-+                return;
-+            }
-+            // CraftBukkit end
-             this.getChunkAt(blockposition).addAndRegisterBlockEntity(tileentity);
-         }
-     }
-@@ -643,7 +845,7 @@
- 
-                 for (int k = 0; k < j; ++k) {
-                     EntityComplexPart entitycomplexpart = aentitycomplexpart[k];
--                    T t0 = (Entity) entitytypetest.tryCast(entitycomplexpart);
-+                    T t0 = entitytypetest.tryCast(entitycomplexpart); // CraftBukkit - decompile error
- 
-                     if (t0 != null && predicate.test(t0)) {
-                         list.add(t0);
-@@ -912,7 +1114,7 @@
- 
-     public static enum a implements INamable {
- 
--        NONE("none"), BLOCK("block"), MOB("mob"), TNT("tnt"), TRIGGER("trigger");
-+        NONE("none"), BLOCK("block"), MOB("mob"), TNT("tnt"), TRIGGER("trigger"), STANDARD("standard"); // CraftBukkit - Add STANDARD which will always use Explosion.Effect.DESTROY
- 
-         public static final Codec<World.a> CODEC = INamable.fromEnum(World.a::values);
-         private final String id;
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/AbstractCandleBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/AbstractCandleBlock.java.patch
new file mode 100644
index 0000000000..2c42f4cb51
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/AbstractCandleBlock.java.patch
@@ -0,0 +1,14 @@
+--- a/net/minecraft/world/level/block/AbstractCandleBlock.java
++++ b/net/minecraft/world/level/block/AbstractCandleBlock.java
+@@ -47,6 +47,11 @@
+     @Override
+     protected void onProjectileHit(Level world, BlockState state, BlockHitResult hit, Projectile projectile) {
+         if (!world.isClientSide && projectile.isOnFire() && this.canBeLit(state)) {
++            // CraftBukkit start
++            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, hit.getBlockPos(), projectile).isCancelled()) {
++                return;
++            }
++            // CraftBukkit end
+             AbstractCandleBlock.setLit(world, state, hit.getBlockPos(), true);
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/AbstractCandleBlock.patch b/paper-server/patches/sources/net/minecraft/world/level/block/AbstractCandleBlock.patch
deleted file mode 100644
index a11c361b84..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/AbstractCandleBlock.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/net/minecraft/world/level/block/AbstractCandleBlock.java
-+++ b/net/minecraft/world/level/block/AbstractCandleBlock.java
-@@ -47,6 +47,11 @@
-     @Override
-     protected void onProjectileHit(World world, IBlockData iblockdata, MovingObjectPositionBlock movingobjectpositionblock, IProjectile iprojectile) {
-         if (!world.isClientSide && iprojectile.isOnFire() && this.canBeLit(iblockdata)) {
-+            // CraftBukkit start
-+            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, movingobjectpositionblock.getBlockPos(), iprojectile).isCancelled()) {
-+                return;
-+            }
-+            // CraftBukkit end
-             setLit(world, iblockdata, movingobjectpositionblock.getBlockPos(), true);
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BambooSaplingBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BambooSaplingBlock.java.patch
new file mode 100644
index 0000000000..9c470c3248
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/BambooSaplingBlock.java.patch
@@ -0,0 +1,10 @@
+--- a/net/minecraft/world/level/block/BambooSaplingBlock.java
++++ b/net/minecraft/world/level/block/BambooSaplingBlock.java
+@@ -87,6 +87,6 @@
+     }
+ 
+     protected void growBamboo(Level world, BlockPos pos) {
+-        world.setBlock(pos.above(), (BlockState) Blocks.BAMBOO.defaultBlockState().setValue(BambooStalkBlock.LEAVES, BambooLeaves.SMALL), 3);
++        org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, pos, pos.above(), (BlockState) Blocks.BAMBOO.defaultBlockState().setValue(BambooStalkBlock.LEAVES, BambooLeaves.SMALL), 3); // CraftBukkit - BlockSpreadEvent
+     }
+ }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BambooStalkBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BambooStalkBlock.java.patch
new file mode 100644
index 0000000000..56388a35ef
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/BambooStalkBlock.java.patch
@@ -0,0 +1,48 @@
+--- a/net/minecraft/world/level/block/BambooStalkBlock.java
++++ b/net/minecraft/world/level/block/BambooStalkBlock.java
+@@ -183,7 +183,7 @@
+             BlockPos blockposition1 = pos.above(i);
+             BlockState iblockdata1 = world.getBlockState(blockposition1);
+ 
+-            if (k >= 16 || (Integer) iblockdata1.getValue(BambooStalkBlock.STAGE) == 1 || !world.isEmptyBlock(blockposition1.above())) {
++            if (k >= 16 || !iblockdata1.is(Blocks.BAMBOO) || (Integer) iblockdata1.getValue(BambooStalkBlock.STAGE) == 1 || !world.isEmptyBlock(blockposition1.above())) { // CraftBukkit - If the BlockSpreadEvent was cancelled, we have no bamboo here
+                 return;
+             }
+ 
+@@ -204,14 +204,18 @@
+         BlockPos blockposition1 = pos.below(2);
+         BlockState iblockdata2 = world.getBlockState(blockposition1);
+         BambooLeaves blockpropertybamboosize = BambooLeaves.NONE;
++        boolean shouldUpdateOthers = false; // CraftBukkit
+ 
+         if (height >= 1) {
+             if (iblockdata1.is(Blocks.BAMBOO) && iblockdata1.getValue(BambooStalkBlock.LEAVES) != BambooLeaves.NONE) {
+                 if (iblockdata1.is(Blocks.BAMBOO) && iblockdata1.getValue(BambooStalkBlock.LEAVES) != BambooLeaves.NONE) {
+                     blockpropertybamboosize = BambooLeaves.LARGE;
+                     if (iblockdata2.is(Blocks.BAMBOO)) {
+-                        world.setBlock(pos.below(), (BlockState) iblockdata1.setValue(BambooStalkBlock.LEAVES, BambooLeaves.SMALL), 3);
+-                        world.setBlock(blockposition1, (BlockState) iblockdata2.setValue(BambooStalkBlock.LEAVES, BambooLeaves.NONE), 3);
++                        // CraftBukkit start - moved down
++                        // world.setBlock(blockposition.below(), (IBlockData) iblockdata1.setValue(BlockBamboo.LEAVES, BlockPropertyBambooSize.SMALL), 3);
++                        // world.setBlock(blockposition1, (IBlockData) iblockdata2.setValue(BlockBamboo.LEAVES, BlockPropertyBambooSize.NONE), 3);
++                        shouldUpdateOthers = true;
++                        // CraftBukkit end
+                     }
+                 }
+             } else {
+@@ -222,7 +226,14 @@
+         int j = (Integer) state.getValue(BambooStalkBlock.AGE) != 1 && !iblockdata2.is(Blocks.BAMBOO) ? 0 : 1;
+         int k = (height < 11 || random.nextFloat() >= 0.25F) && height != 15 ? 0 : 1;
+ 
+-        world.setBlock(pos.above(), (BlockState) ((BlockState) ((BlockState) this.defaultBlockState().setValue(BambooStalkBlock.AGE, j)).setValue(BambooStalkBlock.LEAVES, blockpropertybamboosize)).setValue(BambooStalkBlock.STAGE, k), 3);
++        // CraftBukkit start
++        if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, pos, pos.above(), (BlockState) ((BlockState) ((BlockState) this.defaultBlockState().setValue(BambooStalkBlock.AGE, j)).setValue(BambooStalkBlock.LEAVES, blockpropertybamboosize)).setValue(BambooStalkBlock.STAGE, k), 3)) {
++            if (shouldUpdateOthers) {
++                world.setBlock(pos.below(), (BlockState) iblockdata1.setValue(BambooStalkBlock.LEAVES, BambooLeaves.SMALL), 3);
++                world.setBlock(blockposition1, (BlockState) iblockdata2.setValue(BambooStalkBlock.LEAVES, BambooLeaves.NONE), 3);
++            }
++        }
++        // CraftBukkit end
+     }
+ 
+     protected int getHeightAboveUpToMax(BlockGetter world, BlockPos pos) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BaseFireBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BaseFireBlock.java.patch
new file mode 100644
index 0000000000..3d8c047d5d
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/BaseFireBlock.java.patch
@@ -0,0 +1,73 @@
+--- a/net/minecraft/world/level/block/BaseFireBlock.java
++++ b/net/minecraft/world/level/block/BaseFireBlock.java
+@@ -12,6 +12,7 @@
+ import net.minecraft.world.entity.Entity;
+ import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.item.context.BlockPlaceContext;
++import net.minecraft.world.item.context.UseOnContext;
+ import net.minecraft.world.level.BlockGetter;
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.block.state.BlockBehaviour;
+@@ -137,7 +138,14 @@
+             }
+ 
+             if (entity.getRemainingFireTicks() >= 0) {
+-                entity.igniteForSeconds(8.0F);
++                // CraftBukkit start
++                org.bukkit.event.entity.EntityCombustEvent event = new org.bukkit.event.entity.EntityCombustByBlockEvent(org.bukkit.craftbukkit.block.CraftBlock.at(world, pos), entity.getBukkitEntity(), 8.0F);
++                world.getCraftServer().getPluginManager().callEvent(event);
++
++                if (!event.isCancelled()) {
++                    entity.igniteForSeconds(event.getDuration(), false);
++                }
++                // CraftBukkit end
+             }
+         }
+ 
+@@ -146,26 +154,26 @@
+     }
+ 
+     @Override
+-    protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) {
+-        if (!oldState.is(state.getBlock())) {
++    protected void onPlace(BlockState iblockdata, Level world, BlockPos blockposition, BlockState iblockdata1, boolean flag, UseOnContext context) { // CraftBukkit - context
++        if (!iblockdata1.is(iblockdata.getBlock())) {
+             if (BaseFireBlock.inPortalDimension(world)) {
+-                Optional<PortalShape> optional = PortalShape.findEmptyPortalShape(world, pos, Direction.Axis.X);
++                Optional<PortalShape> optional = PortalShape.findEmptyPortalShape(world, blockposition, Direction.Axis.X);
+ 
+                 if (optional.isPresent()) {
+-                    ((PortalShape) optional.get()).createPortalBlocks(world);
++                    ((PortalShape) optional.get()).createPortalBlocks(world, (context == null) ? null : context.getPlayer()); // CraftBukkit - player
+                     return;
+                 }
+             }
+ 
+-            if (!state.canSurvive(world, pos)) {
+-                world.removeBlock(pos, false);
++            if (!iblockdata.canSurvive(world, blockposition)) {
++                this.fireExtinguished(world, blockposition); // CraftBukkit - fuel block broke
+             }
+ 
+         }
+     }
+ 
+     private static boolean inPortalDimension(Level world) {
+-        return world.dimension() == Level.OVERWORLD || world.dimension() == Level.NETHER;
++        return world.getTypeKey() == net.minecraft.world.level.dimension.LevelStem.OVERWORLD || world.getTypeKey() == net.minecraft.world.level.dimension.LevelStem.NETHER; // CraftBukkit - getTypeKey()
+     }
+ 
+     @Override
+@@ -213,4 +221,12 @@
+             }
+         }
+     }
++
++    // CraftBukkit start
++    protected void fireExtinguished(net.minecraft.world.level.LevelAccessor world, BlockPos position) {
++        if (!org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, position, Blocks.AIR.defaultBlockState()).isCancelled()) {
++            world.removeBlock(position, false);
++        }
++    }
++    // CraftBukkit end
+ }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BasePressurePlateBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BasePressurePlateBlock.java.patch
new file mode 100644
index 0000000000..0a52ac3818
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/BasePressurePlateBlock.java.patch
@@ -0,0 +1,48 @@
+--- a/net/minecraft/world/level/block/BasePressurePlateBlock.java
++++ b/net/minecraft/world/level/block/BasePressurePlateBlock.java
+@@ -22,6 +22,7 @@
+ import net.minecraft.world.phys.AABB;
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
+ 
+ public abstract class BasePressurePlateBlock extends Block {
+ 
+@@ -91,6 +92,19 @@
+         boolean flag = output > 0;
+         boolean flag1 = j > 0;
+ 
++        // CraftBukkit start - Interact Pressure Plate
++        org.bukkit.World bworld = world.getWorld();
++        org.bukkit.plugin.PluginManager manager = world.getCraftServer().getPluginManager();
++
++        if (flag != flag1) {
++            BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(bworld.getBlockAt(pos.getX(), pos.getY(), pos.getZ()), output, j);
++            manager.callEvent(eventRedstone);
++
++            flag1 = eventRedstone.getNewCurrent() > 0;
++            j = eventRedstone.getNewCurrent();
++        }
++        // CraftBukkit end
++
+         if (output != j) {
+             BlockState iblockdata1 = this.setSignalForState(state, j);
+ 
+@@ -145,9 +159,15 @@
+     }
+ 
+     protected static int getEntityCount(Level world, AABB box, Class<? extends Entity> entityClass) {
+-        return world.getEntitiesOfClass(entityClass, box, EntitySelector.NO_SPECTATORS.and((entity) -> {
++        // CraftBukkit start
++        return BasePressurePlateBlock.getEntities(world, box, entityClass).size();
++    }
++
++    protected static <T extends Entity> java.util.List<T> getEntities(Level world, AABB axisalignedbb, Class<T> oclass) {
++        // CraftBukkit end
++        return world.getEntitiesOfClass(oclass, axisalignedbb, EntitySelector.NO_SPECTATORS.and((entity) -> {
+             return !entity.isIgnoringBlockTriggers();
+-        })).size();
++        })); // CraftBukkit
+     }
+ 
+     protected abstract int getSignalStrength(Level world, BlockPos pos);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockBed.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BedBlock.java.patch
similarity index 50%
rename from paper-server/patches/sources/net/minecraft/world/level/block/BlockBed.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/BedBlock.java.patch
index cbeb65ab02..dbf5cec248 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockBed.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/BedBlock.java.patch
@@ -1,73 +1,73 @@
---- a/net/minecraft/world/level/block/BlockBed.java
-+++ b/net/minecraft/world/level/block/BlockBed.java
+--- a/net/minecraft/world/level/block/BedBlock.java
++++ b/net/minecraft/world/level/block/BedBlock.java
 @@ -95,7 +95,8 @@
                  }
              }
  
--            if (!canSetSpawn(world)) {
+-            if (!BedBlock.canSetSpawn(world)) {
 +            // CraftBukkit - moved world and biome check into EntityHuman
-+            if (false && !canSetSpawn(world)) {
-                 world.removeBlock(blockposition, false);
-                 BlockPosition blockposition1 = blockposition.relative(((EnumDirection) iblockdata.getValue(BlockBed.FACING)).getOpposite());
++            if (false && !BedBlock.canSetSpawn(world)) {
+                 world.removeBlock(pos, false);
+                 BlockPos blockposition1 = pos.relative(((Direction) state.getValue(BedBlock.FACING)).getOpposite());
  
 @@ -114,7 +115,16 @@
  
-                 return EnumInteractionResult.SUCCESS_SERVER;
+                 return InteractionResult.SUCCESS_SERVER;
              } else {
 +                // CraftBukkit start
-+                IBlockData finaliblockdata = iblockdata;
-+                BlockPosition finalblockposition = blockposition;
++                BlockState finaliblockdata = state;
++                BlockPos finalblockposition = pos;
 +                // CraftBukkit end
-                 entityhuman.startSleepInBed(blockposition).ifLeft((entityhuman_enumbedresult) -> {
+                 player.startSleepInBed(pos).ifLeft((entityhuman_enumbedresult) -> {
 +                    // CraftBukkit start - handling bed explosion from below here
 +                    if (!world.dimensionType().bedWorks()) {
 +                        this.explodeBed(finaliblockdata, world, finalblockposition);
 +                    } else
 +                    // CraftBukkit end
                      if (entityhuman_enumbedresult.getMessage() != null) {
-                         entityhuman.displayClientMessage(entityhuman_enumbedresult.getMessage(), true);
+                         player.displayClientMessage(entityhuman_enumbedresult.getMessage(), true);
                      }
 @@ -125,8 +135,30 @@
          }
      }
  
 +    // CraftBukkit start
-+    private EnumInteractionResult explodeBed(IBlockData iblockdata, World world, BlockPosition blockposition) {
++    private InteractionResult explodeBed(BlockState iblockdata, Level world, BlockPos blockposition) {
 +        {
 +            {
 +                org.bukkit.block.BlockState blockState = org.bukkit.craftbukkit.block.CraftBlock.at(world, blockposition).getState(); // CraftBukkit - capture BlockState before remove block
 +                world.removeBlock(blockposition, false);
-+                BlockPosition blockposition1 = blockposition.relative(((EnumDirection) iblockdata.getValue(BlockBed.FACING)).getOpposite());
++                BlockPos blockposition1 = blockposition.relative(((Direction) iblockdata.getValue(BedBlock.FACING)).getOpposite());
 +
 +                if (world.getBlockState(blockposition1).getBlock() == this) {
 +                    world.removeBlock(blockposition1, false);
 +                }
 +
-+                Vec3D vec3d = blockposition.getCenter();
++                Vec3 vec3d = blockposition.getCenter();
 +
-+                world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d, blockState), (ExplosionDamageCalculator) null, vec3d, 5.0F, true, World.a.BLOCK); // CraftBukkit - add state
-+                return EnumInteractionResult.SUCCESS;
++                world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d, blockState), (ExplosionDamageCalculator) null, vec3d, 5.0F, true, Level.ExplosionInteraction.BLOCK); // CraftBukkit - add state
++                return InteractionResult.SUCCESS;
 +            }
 +        }
 +    }
 +    // CraftBukkit end
 +
-     public static boolean canSetSpawn(World world) {
+     public static boolean canSetSpawn(Level world) {
 -        return world.dimensionType().bedWorks();
 +        // CraftBukkit - moved world and biome check into EntityHuman
 +        return true || world.dimensionType().bedWorks();
      }
  
-     private boolean kickVillagerOutOfBed(World world, BlockPosition blockposition) {
+     private boolean kickVillagerOutOfBed(Level world, BlockPos pos) {
 @@ -320,6 +352,11 @@
-             BlockPosition blockposition1 = blockposition.relative((EnumDirection) iblockdata.getValue(BlockBed.FACING));
+             BlockPos blockposition1 = pos.relative((Direction) state.getValue(BedBlock.FACING));
  
-             world.setBlock(blockposition1, (IBlockData) iblockdata.setValue(BlockBed.PART, BlockPropertyBedPart.HEAD), 3);
+             world.setBlock(blockposition1, (BlockState) state.setValue(BedBlock.PART, BedPart.HEAD), 3);
 +            // CraftBukkit start - SPIGOT-7315: Don't updated if we capture block states
 +            if (world.captureBlockStates) {
 +                return;
 +            }
 +            // CraftBukkit end
-             world.blockUpdated(blockposition, Blocks.AIR);
-             iblockdata.updateNeighbourShapes(world, blockposition, 3);
+             world.blockUpdated(pos, Blocks.AIR);
+             state.updateNeighbourShapes(world, pos, 3);
          }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockBeehive.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BeehiveBlock.java.patch
similarity index 50%
rename from paper-server/patches/sources/net/minecraft/world/level/block/BlockBeehive.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/BeehiveBlock.java.patch
index 181c4a8700..37eb9c635c 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockBeehive.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/BeehiveBlock.java.patch
@@ -1,8 +1,8 @@
---- a/net/minecraft/world/level/block/BlockBeehive.java
-+++ b/net/minecraft/world/level/block/BlockBeehive.java
+--- a/net/minecraft/world/level/block/BeehiveBlock.java
++++ b/net/minecraft/world/level/block/BeehiveBlock.java
 @@ -133,7 +133,7 @@
                  if (entitybee.getTarget() == null) {
-                     EntityHuman entityhuman = (EntityHuman) SystemUtils.getRandom(list1, world.random);
+                     Player entityhuman = (Player) Util.getRandom(list1, world.random);
  
 -                    entitybee.setTarget(entityhuman);
 +                    entitybee.setTarget(entityhuman, org.bukkit.event.entity.EntityTargetEvent.TargetReason.CLOSEST_PLAYER, true); // CraftBukkit
@@ -13,17 +13,17 @@
                          ItemStack itemstack = new ItemStack(this);
  
                          itemstack.applyComponents(tileentitybeehive.collectComponents());
--                        itemstack.set(DataComponents.BLOCK_STATE, BlockItemStateProperties.EMPTY.with(BlockBeehive.HONEY_LEVEL, (Comparable) i));
-+                        itemstack.set(DataComponents.BLOCK_STATE, BlockItemStateProperties.EMPTY.with(BlockBeehive.HONEY_LEVEL, i)); // CraftBukkit - decompile error
-                         EntityItem entityitem = new EntityItem(world, (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), itemstack);
+-                        itemstack.set(DataComponents.BLOCK_STATE, BlockItemStateProperties.EMPTY.with(BeehiveBlock.HONEY_LEVEL, (Comparable) i));
++                        itemstack.set(DataComponents.BLOCK_STATE, BlockItemStateProperties.EMPTY.with(BeehiveBlock.HONEY_LEVEL, i)); // CraftBukkit - decompile error
+                         ItemEntity entityitem = new ItemEntity(world, (double) pos.getX(), (double) pos.getY(), (double) pos.getZ(), itemstack);
  
                          entityitem.setDefaultPickUpDelay();
 @@ -332,7 +332,7 @@
-         ItemStack itemstack = super.getCloneItemStack(iworldreader, blockposition, iblockdata, flag);
+         ItemStack itemstack = super.getCloneItemStack(world, pos, state, includeData);
  
-         if (flag) {
--            itemstack.set(DataComponents.BLOCK_STATE, BlockItemStateProperties.EMPTY.with(BlockBeehive.HONEY_LEVEL, (Comparable) ((Integer) iblockdata.getValue(BlockBeehive.HONEY_LEVEL))));
-+            itemstack.set(DataComponents.BLOCK_STATE, BlockItemStateProperties.EMPTY.with(BlockBeehive.HONEY_LEVEL, ((Integer) iblockdata.getValue(BlockBeehive.HONEY_LEVEL)))); // CraftBukkit - decompile error
+         if (includeData) {
+-            itemstack.set(DataComponents.BLOCK_STATE, BlockItemStateProperties.EMPTY.with(BeehiveBlock.HONEY_LEVEL, (Comparable) ((Integer) state.getValue(BeehiveBlock.HONEY_LEVEL))));
++            itemstack.set(DataComponents.BLOCK_STATE, BlockItemStateProperties.EMPTY.with(BeehiveBlock.HONEY_LEVEL, ((Integer) state.getValue(BeehiveBlock.HONEY_LEVEL)))); // CraftBukkit - decompile error
          }
  
          return itemstack;
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BellBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BellBlock.java.patch
new file mode 100644
index 0000000000..d677bbedab
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/BellBlock.java.patch
@@ -0,0 +1,14 @@
+--- a/net/minecraft/world/level/block/BellBlock.java
++++ b/net/minecraft/world/level/block/BellBlock.java
+@@ -148,6 +148,11 @@
+             if (direction == null) {
+                 direction = (Direction) world.getBlockState(pos).getValue(BellBlock.FACING);
+             }
++            // CraftBukkit start
++            if (!org.bukkit.craftbukkit.event.CraftEventFactory.handleBellRingEvent(world, pos, direction, entity)) {
++                return false;
++            }
++            // CraftBukkit end
+ 
+             ((BellBlockEntity) tileentity).onHit(direction);
+             world.playSound((Player) null, pos, SoundEvents.BELL_BLOCK, SoundSource.BLOCKS, 2.0F, 1.0F);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BigDripleafBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BigDripleafBlock.java.patch
new file mode 100644
index 0000000000..f1e4f569d3
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/BigDripleafBlock.java.patch
@@ -0,0 +1,113 @@
+--- a/net/minecraft/world/level/block/BigDripleafBlock.java
++++ b/net/minecraft/world/level/block/BigDripleafBlock.java
+@@ -44,6 +44,10 @@
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.Shapes;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++// CraftBukkit start
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.event.entity.EntityInteractEvent;
++// CraftBukkit end
+ 
+ public class BigDripleafBlock extends HorizontalDirectionalBlock implements BonemealableBlock, SimpleWaterloggedBlock {
+ 
+@@ -119,7 +123,7 @@
+ 
+     @Override
+     protected void onProjectileHit(Level world, BlockState state, BlockHitResult hit, Projectile projectile) {
+-        this.setTiltAndScheduleTick(state, world, hit.getBlockPos(), Tilt.FULL, SoundEvents.BIG_DRIPLEAF_TILT_DOWN);
++        this.setTiltAndScheduleTick(state, world, hit.getBlockPos(), Tilt.FULL, SoundEvents.BIG_DRIPLEAF_TILT_DOWN, projectile); // CraftBukkit
+     }
+ 
+     @Override
+@@ -178,7 +182,20 @@
+     protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) {
+         if (!world.isClientSide) {
+             if (state.getValue(BigDripleafBlock.TILT) == Tilt.NONE && BigDripleafBlock.canEntityTilt(pos, entity) && !world.hasNeighborSignal(pos)) {
+-                this.setTiltAndScheduleTick(state, world, pos, Tilt.UNSTABLE, (SoundEvent) null);
++                // CraftBukkit start - tilt dripleaf
++                org.bukkit.event.Cancellable cancellable;
++                if (entity instanceof Player) {
++                    cancellable = CraftEventFactory.callPlayerInteractEvent((Player) entity, org.bukkit.event.block.Action.PHYSICAL, pos, null, null, null);
++                } else {
++                    cancellable = new EntityInteractEvent(entity.getBukkitEntity(), world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()));
++                    world.getCraftServer().getPluginManager().callEvent((EntityInteractEvent) cancellable);
++                }
++
++                if (cancellable.isCancelled()) {
++                    return;
++                }
++                this.setTiltAndScheduleTick(state, world, pos, Tilt.UNSTABLE, (SoundEvent) null, entity);
++                // CraftBukkit end
+             }
+ 
+         }
+@@ -192,9 +209,9 @@
+             Tilt tilt = (Tilt) state.getValue(BigDripleafBlock.TILT);
+ 
+             if (tilt == Tilt.UNSTABLE) {
+-                this.setTiltAndScheduleTick(state, world, pos, Tilt.PARTIAL, SoundEvents.BIG_DRIPLEAF_TILT_DOWN);
++                this.setTiltAndScheduleTick(state, world, pos, Tilt.PARTIAL, SoundEvents.BIG_DRIPLEAF_TILT_DOWN, null); // CraftBukkit
+             } else if (tilt == Tilt.PARTIAL) {
+-                this.setTiltAndScheduleTick(state, world, pos, Tilt.FULL, SoundEvents.BIG_DRIPLEAF_TILT_DOWN);
++                this.setTiltAndScheduleTick(state, world, pos, Tilt.FULL, SoundEvents.BIG_DRIPLEAF_TILT_DOWN, null); // CraftBukkit
+             } else if (tilt == Tilt.FULL) {
+                 BigDripleafBlock.resetTilt(state, world, pos);
+             }
+@@ -220,36 +237,46 @@
+         return entity.onGround() && entity.position().y > (double) ((float) pos.getY() + 0.6875F);
+     }
+ 
+-    private void setTiltAndScheduleTick(BlockState state, Level world, BlockPos pos, Tilt tilt, @Nullable SoundEvent sound) {
+-        BigDripleafBlock.setTilt(state, world, pos, tilt);
+-        if (sound != null) {
+-            BigDripleafBlock.playTiltSound(world, pos, sound);
++    // CraftBukkit start
++    private void setTiltAndScheduleTick(BlockState iblockdata, Level world, BlockPos blockposition, Tilt tilt, @Nullable SoundEvent soundeffect, @Nullable Entity entity) {
++        if (!BigDripleafBlock.setTilt(iblockdata, world, blockposition, tilt, entity)) return;
++        // CraftBukkit end
++        if (soundeffect != null) {
++            BigDripleafBlock.playTiltSound(world, blockposition, soundeffect);
+         }
+ 
+         int i = BigDripleafBlock.DELAY_UNTIL_NEXT_TILT_STATE.getInt(tilt);
+ 
+         if (i != -1) {
+-            world.scheduleTick(pos, (Block) this, i);
++            world.scheduleTick(blockposition, (Block) this, i);
+         }
+ 
+     }
+ 
+     private static void resetTilt(BlockState state, Level world, BlockPos pos) {
+-        BigDripleafBlock.setTilt(state, world, pos, Tilt.NONE);
++        BigDripleafBlock.setTilt(state, world, pos, Tilt.NONE, null); // CraftBukkit
+         if (state.getValue(BigDripleafBlock.TILT) != Tilt.NONE) {
+             BigDripleafBlock.playTiltSound(world, pos, SoundEvents.BIG_DRIPLEAF_TILT_UP);
+         }
+ 
+     }
+ 
+-    private static void setTilt(BlockState state, Level world, BlockPos pos, Tilt tilt) {
+-        Tilt tilt1 = (Tilt) state.getValue(BigDripleafBlock.TILT);
++    // CraftBukkit start
++    private static boolean setTilt(BlockState iblockdata, Level world, BlockPos blockposition, Tilt tilt, @Nullable Entity entity) {
++        if (entity != null) {
++            if (!CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, iblockdata.setValue(BigDripleafBlock.TILT, tilt))) {
++                return false;
++            }
++        }
++        // CraftBukkit end
++        Tilt tilt1 = (Tilt) iblockdata.getValue(BigDripleafBlock.TILT);
+ 
+-        world.setBlock(pos, (BlockState) state.setValue(BigDripleafBlock.TILT, tilt), 2);
++        world.setBlock(blockposition, (BlockState) iblockdata.setValue(BigDripleafBlock.TILT, tilt), 2);
+         if (tilt.causesVibration() && tilt != tilt1) {
+-            world.gameEvent((Entity) null, (Holder) GameEvent.BLOCK_CHANGE, pos);
++            world.gameEvent((Entity) null, (Holder) GameEvent.BLOCK_CHANGE, blockposition);
+         }
+ 
++        return true; // CraftBukkit
+     }
+ 
+     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BigDripleafBlock.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BigDripleafBlock.patch
deleted file mode 100644
index 791bcfe2cb..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BigDripleafBlock.patch
+++ /dev/null
@@ -1,102 +0,0 @@
---- a/net/minecraft/world/level/block/BigDripleafBlock.java
-+++ b/net/minecraft/world/level/block/BigDripleafBlock.java
-@@ -45,6 +45,11 @@
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- import net.minecraft.world.phys.shapes.VoxelShapes;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.event.entity.EntityInteractEvent;
-+// CraftBukkit end
-+
- public class BigDripleafBlock extends BlockFacingHorizontal implements IBlockFragilePlantElement, IBlockWaterlogged {
- 
-     public static final MapCodec<BigDripleafBlock> CODEC = simpleCodec(BigDripleafBlock::new);
-@@ -119,7 +124,7 @@
- 
-     @Override
-     protected void onProjectileHit(World world, IBlockData iblockdata, MovingObjectPositionBlock movingobjectpositionblock, IProjectile iprojectile) {
--        this.setTiltAndScheduleTick(iblockdata, world, movingobjectpositionblock.getBlockPos(), Tilt.FULL, SoundEffects.BIG_DRIPLEAF_TILT_DOWN);
-+        this.setTiltAndScheduleTick(iblockdata, world, movingobjectpositionblock.getBlockPos(), Tilt.FULL, SoundEffects.BIG_DRIPLEAF_TILT_DOWN, iprojectile); // CraftBukkit
-     }
- 
-     @Override
-@@ -178,7 +183,20 @@
-     protected void entityInside(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
-         if (!world.isClientSide) {
-             if (iblockdata.getValue(BigDripleafBlock.TILT) == Tilt.NONE && canEntityTilt(blockposition, entity) && !world.hasNeighborSignal(blockposition)) {
--                this.setTiltAndScheduleTick(iblockdata, world, blockposition, Tilt.UNSTABLE, (SoundEffect) null);
-+                // CraftBukkit start - tilt dripleaf
-+                org.bukkit.event.Cancellable cancellable;
-+                if (entity instanceof EntityHuman) {
-+                    cancellable = CraftEventFactory.callPlayerInteractEvent((EntityHuman) entity, org.bukkit.event.block.Action.PHYSICAL, blockposition, null, null, null);
-+                } else {
-+                    cancellable = new EntityInteractEvent(entity.getBukkitEntity(), world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
-+                    world.getCraftServer().getPluginManager().callEvent((EntityInteractEvent) cancellable);
-+                }
-+
-+                if (cancellable.isCancelled()) {
-+                    return;
-+                }
-+                this.setTiltAndScheduleTick(iblockdata, world, blockposition, Tilt.UNSTABLE, (SoundEffect) null, entity);
-+                // CraftBukkit end
-             }
- 
-         }
-@@ -192,9 +210,9 @@
-             Tilt tilt = (Tilt) iblockdata.getValue(BigDripleafBlock.TILT);
- 
-             if (tilt == Tilt.UNSTABLE) {
--                this.setTiltAndScheduleTick(iblockdata, worldserver, blockposition, Tilt.PARTIAL, SoundEffects.BIG_DRIPLEAF_TILT_DOWN);
-+                this.setTiltAndScheduleTick(iblockdata, worldserver, blockposition, Tilt.PARTIAL, SoundEffects.BIG_DRIPLEAF_TILT_DOWN, null); // CraftBukkit
-             } else if (tilt == Tilt.PARTIAL) {
--                this.setTiltAndScheduleTick(iblockdata, worldserver, blockposition, Tilt.FULL, SoundEffects.BIG_DRIPLEAF_TILT_DOWN);
-+                this.setTiltAndScheduleTick(iblockdata, worldserver, blockposition, Tilt.FULL, SoundEffects.BIG_DRIPLEAF_TILT_DOWN, null); // CraftBukkit
-             } else if (tilt == Tilt.FULL) {
-                 resetTilt(iblockdata, worldserver, blockposition);
-             }
-@@ -220,8 +238,10 @@
-         return entity.onGround() && entity.position().y > (double) ((float) blockposition.getY() + 0.6875F);
-     }
- 
--    private void setTiltAndScheduleTick(IBlockData iblockdata, World world, BlockPosition blockposition, Tilt tilt, @Nullable SoundEffect soundeffect) {
--        setTilt(iblockdata, world, blockposition, tilt);
-+    // CraftBukkit start
-+    private void setTiltAndScheduleTick(IBlockData iblockdata, World world, BlockPosition blockposition, Tilt tilt, @Nullable SoundEffect soundeffect, @Nullable Entity entity) {
-+        if (!setTilt(iblockdata, world, blockposition, tilt, entity)) return;
-+        // CraftBukkit end
-         if (soundeffect != null) {
-             playTiltSound(world, blockposition, soundeffect);
-         }
-@@ -235,14 +255,21 @@
-     }
- 
-     private static void resetTilt(IBlockData iblockdata, World world, BlockPosition blockposition) {
--        setTilt(iblockdata, world, blockposition, Tilt.NONE);
-+        setTilt(iblockdata, world, blockposition, Tilt.NONE, null); // CraftBukkit
-         if (iblockdata.getValue(BigDripleafBlock.TILT) != Tilt.NONE) {
-             playTiltSound(world, blockposition, SoundEffects.BIG_DRIPLEAF_TILT_UP);
-         }
- 
-     }
- 
--    private static void setTilt(IBlockData iblockdata, World world, BlockPosition blockposition, Tilt tilt) {
-+    // CraftBukkit start
-+    private static boolean setTilt(IBlockData iblockdata, World world, BlockPosition blockposition, Tilt tilt, @Nullable Entity entity) {
-+        if (entity != null) {
-+            if (!CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, iblockdata.setValue(BigDripleafBlock.TILT, tilt))) {
-+                return false;
-+            }
-+        }
-+        // CraftBukkit end
-         Tilt tilt1 = (Tilt) iblockdata.getValue(BigDripleafBlock.TILT);
- 
-         world.setBlock(blockposition, (IBlockData) iblockdata.setValue(BigDripleafBlock.TILT, tilt), 2);
-@@ -250,6 +277,7 @@
-             world.gameEvent((Entity) null, (Holder) GameEvent.BLOCK_CHANGE, blockposition);
-         }
- 
-+        return true; // CraftBukkit
-     }
- 
-     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/Block.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/Block.java.patch
new file mode 100644
index 0000000000..9c6a87013a
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/Block.java.patch
@@ -0,0 +1,53 @@
+--- a/net/minecraft/world/level/block/Block.java
++++ b/net/minecraft/world/level/block/Block.java
+@@ -340,7 +340,13 @@
+                 ItemEntity entityitem = (ItemEntity) itemEntitySupplier.get();
+ 
+                 entityitem.setDefaultPickUpDelay();
+-                world.addFreshEntity(entityitem);
++                // CraftBukkit start
++                if (world.captureDrops != null) {
++                    world.captureDrops.add(entityitem);
++                } else {
++                    world.addFreshEntity(entityitem);
++                }
++                // CraftBukkit end
+                 return;
+             }
+         }
+@@ -369,7 +375,7 @@
+ 
+     public void playerDestroy(Level world, Player player, BlockPos pos, BlockState state, @Nullable BlockEntity blockEntity, ItemStack tool) {
+         player.awardStat(Stats.BLOCK_MINED.get(this));
+-        player.causeFoodExhaustion(0.005F);
++        player.causeFoodExhaustion(0.005F, org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.BLOCK_MINED); // CraftBukkit - EntityExhaustionEvent
+         Block.dropResources(state, world, pos, blockEntity, player, tool);
+     }
+ 
+@@ -490,15 +496,23 @@
+         return this.builtInRegistryHolder;
+     }
+ 
+-    protected void tryDropExperience(ServerLevel world, BlockPos pos, ItemStack tool, IntProvider experience) {
+-        int i = EnchantmentHelper.processBlockExperience(world, tool, experience.sample(world.getRandom()));
++    // CraftBukkit start
++    protected int tryDropExperience(ServerLevel worldserver, BlockPos blockposition, ItemStack itemstack, IntProvider intprovider) {
++        int i = EnchantmentHelper.processBlockExperience(worldserver, itemstack, intprovider.sample(worldserver.getRandom()));
+ 
+         if (i > 0) {
+-            this.popExperience(world, pos, i);
++            // this.popExperience(worldserver, blockposition, i);
++            return i;
+         }
+ 
++        return 0;
+     }
+ 
++    public int getExpDrop(BlockState iblockdata, ServerLevel worldserver, BlockPos blockposition, ItemStack itemstack, boolean flag) {
++        return 0;
++    }
++    // CraftBukkit end
++
+     private static record ShapePairKey(VoxelShape first, VoxelShape second) {
+ 
+         public boolean equals(Object object) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/Block.patch b/paper-server/patches/sources/net/minecraft/world/level/block/Block.patch
deleted file mode 100644
index 883f508361..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/Block.patch
+++ /dev/null
@@ -1,52 +0,0 @@
---- a/net/minecraft/world/level/block/Block.java
-+++ b/net/minecraft/world/level/block/Block.java
-@@ -340,7 +340,13 @@
-                 EntityItem entityitem = (EntityItem) supplier.get();
- 
-                 entityitem.setDefaultPickUpDelay();
--                world.addFreshEntity(entityitem);
-+                // CraftBukkit start
-+                if (world.captureDrops != null) {
-+                    world.captureDrops.add(entityitem);
-+                } else {
-+                    world.addFreshEntity(entityitem);
-+                }
-+                // CraftBukkit end
-                 return;
-             }
-         }
-@@ -369,7 +375,7 @@
- 
-     public void playerDestroy(World world, EntityHuman entityhuman, BlockPosition blockposition, IBlockData iblockdata, @Nullable TileEntity tileentity, ItemStack itemstack) {
-         entityhuman.awardStat(StatisticList.BLOCK_MINED.get(this));
--        entityhuman.causeFoodExhaustion(0.005F);
-+        entityhuman.causeFoodExhaustion(0.005F, org.bukkit.event.entity.EntityExhaustionEvent.ExhaustionReason.BLOCK_MINED); // CraftBukkit - EntityExhaustionEvent
-         dropResources(iblockdata, world, blockposition, tileentity, entityhuman, itemstack);
-     }
- 
-@@ -490,15 +496,23 @@
-         return this.builtInRegistryHolder;
-     }
- 
--    protected void tryDropExperience(WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack, IntProvider intprovider) {
-+    // CraftBukkit start
-+    protected int tryDropExperience(WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack, IntProvider intprovider) {
-         int i = EnchantmentManager.processBlockExperience(worldserver, itemstack, intprovider.sample(worldserver.getRandom()));
- 
-         if (i > 0) {
--            this.popExperience(worldserver, blockposition, i);
-+            // this.popExperience(worldserver, blockposition, i);
-+            return i;
-         }
- 
-+        return 0;
-     }
- 
-+    public int getExpDrop(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack, boolean flag) {
-+        return 0;
-+    }
-+    // CraftBukkit end
-+
-     private static record a(VoxelShape first, VoxelShape second) {
- 
-         public boolean equals(Object object) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockBamboo.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockBamboo.patch
deleted file mode 100644
index b18e8d3716..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockBamboo.patch
+++ /dev/null
@@ -1,48 +0,0 @@
---- a/net/minecraft/world/level/block/BlockBamboo.java
-+++ b/net/minecraft/world/level/block/BlockBamboo.java
-@@ -183,7 +183,7 @@
-             BlockPosition blockposition1 = blockposition.above(i);
-             IBlockData iblockdata1 = worldserver.getBlockState(blockposition1);
- 
--            if (k >= 16 || (Integer) iblockdata1.getValue(BlockBamboo.STAGE) == 1 || !worldserver.isEmptyBlock(blockposition1.above())) {
-+            if (k >= 16 || !iblockdata1.is(Blocks.BAMBOO) || (Integer) iblockdata1.getValue(BlockBamboo.STAGE) == 1 || !worldserver.isEmptyBlock(blockposition1.above())) { // CraftBukkit - If the BlockSpreadEvent was cancelled, we have no bamboo here
-                 return;
-             }
- 
-@@ -204,14 +204,18 @@
-         BlockPosition blockposition1 = blockposition.below(2);
-         IBlockData iblockdata2 = world.getBlockState(blockposition1);
-         BlockPropertyBambooSize blockpropertybamboosize = BlockPropertyBambooSize.NONE;
-+        boolean shouldUpdateOthers = false; // CraftBukkit
- 
-         if (i >= 1) {
-             if (iblockdata1.is(Blocks.BAMBOO) && iblockdata1.getValue(BlockBamboo.LEAVES) != BlockPropertyBambooSize.NONE) {
-                 if (iblockdata1.is(Blocks.BAMBOO) && iblockdata1.getValue(BlockBamboo.LEAVES) != BlockPropertyBambooSize.NONE) {
-                     blockpropertybamboosize = BlockPropertyBambooSize.LARGE;
-                     if (iblockdata2.is(Blocks.BAMBOO)) {
--                        world.setBlock(blockposition.below(), (IBlockData) iblockdata1.setValue(BlockBamboo.LEAVES, BlockPropertyBambooSize.SMALL), 3);
--                        world.setBlock(blockposition1, (IBlockData) iblockdata2.setValue(BlockBamboo.LEAVES, BlockPropertyBambooSize.NONE), 3);
-+                        // CraftBukkit start - moved down
-+                        // world.setBlock(blockposition.below(), (IBlockData) iblockdata1.setValue(BlockBamboo.LEAVES, BlockPropertyBambooSize.SMALL), 3);
-+                        // world.setBlock(blockposition1, (IBlockData) iblockdata2.setValue(BlockBamboo.LEAVES, BlockPropertyBambooSize.NONE), 3);
-+                        shouldUpdateOthers = true;
-+                        // CraftBukkit end
-                     }
-                 }
-             } else {
-@@ -222,7 +226,14 @@
-         int j = (Integer) iblockdata.getValue(BlockBamboo.AGE) != 1 && !iblockdata2.is(Blocks.BAMBOO) ? 0 : 1;
-         int k = (i < 11 || randomsource.nextFloat() >= 0.25F) && i != 15 ? 0 : 1;
- 
--        world.setBlock(blockposition.above(), (IBlockData) ((IBlockData) ((IBlockData) this.defaultBlockState().setValue(BlockBamboo.AGE, j)).setValue(BlockBamboo.LEAVES, blockpropertybamboosize)).setValue(BlockBamboo.STAGE, k), 3);
-+        // CraftBukkit start
-+        if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, blockposition, blockposition.above(), (IBlockData) ((IBlockData) ((IBlockData) this.defaultBlockState().setValue(BlockBamboo.AGE, j)).setValue(BlockBamboo.LEAVES, blockpropertybamboosize)).setValue(BlockBamboo.STAGE, k), 3)) {
-+            if (shouldUpdateOthers) {
-+                world.setBlock(blockposition.below(), (IBlockData) iblockdata1.setValue(BlockBamboo.LEAVES, BlockPropertyBambooSize.SMALL), 3);
-+                world.setBlock(blockposition1, (IBlockData) iblockdata2.setValue(BlockBamboo.LEAVES, BlockPropertyBambooSize.NONE), 3);
-+            }
-+        }
-+        // CraftBukkit end
-     }
- 
-     protected int getHeightAboveUpToMax(IBlockAccess iblockaccess, BlockPosition blockposition) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockBambooSapling.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockBambooSapling.patch
deleted file mode 100644
index 9bfc7a5cb3..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockBambooSapling.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/net/minecraft/world/level/block/BlockBambooSapling.java
-+++ b/net/minecraft/world/level/block/BlockBambooSapling.java
-@@ -87,6 +87,6 @@
-     }
- 
-     protected void growBamboo(World world, BlockPosition blockposition) {
--        world.setBlock(blockposition.above(), (IBlockData) Blocks.BAMBOO.defaultBlockState().setValue(BlockBamboo.LEAVES, BlockPropertyBambooSize.SMALL), 3);
-+        org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, blockposition, blockposition.above(), (IBlockData) Blocks.BAMBOO.defaultBlockState().setValue(BlockBamboo.LEAVES, BlockPropertyBambooSize.SMALL), 3); // CraftBukkit - BlockSpreadEvent
-     }
- }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockBell.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockBell.patch
deleted file mode 100644
index cdf7e1e8b9..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockBell.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/net/minecraft/world/level/block/BlockBell.java
-+++ b/net/minecraft/world/level/block/BlockBell.java
-@@ -148,6 +148,11 @@
-             if (enumdirection == null) {
-                 enumdirection = (EnumDirection) world.getBlockState(blockposition).getValue(BlockBell.FACING);
-             }
-+            // CraftBukkit start
-+            if (!org.bukkit.craftbukkit.event.CraftEventFactory.handleBellRingEvent(world, blockposition, enumdirection, entity)) {
-+                return false;
-+            }
-+            // CraftBukkit end
- 
-             ((TileEntityBell) tileentity).onHit(enumdirection);
-             world.playSound((EntityHuman) null, blockposition, SoundEffects.BELL_BLOCK, SoundCategory.BLOCKS, 2.0F, 1.0F);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockButtonAbstract.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockButtonAbstract.patch
deleted file mode 100644
index 5000b862d0..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockButtonAbstract.patch
+++ /dev/null
@@ -1,72 +0,0 @@
---- a/net/minecraft/world/level/block/BlockButtonAbstract.java
-+++ b/net/minecraft/world/level/block/BlockButtonAbstract.java
-@@ -35,6 +35,11 @@
- import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- 
-+// CraftBukkit start
-+import org.bukkit.event.block.BlockRedstoneEvent;
-+import org.bukkit.event.entity.EntityInteractEvent;
-+// CraftBukkit end
-+
- public class BlockButtonAbstract extends BlockAttachable {
- 
-     public static final MapCodec<BlockButtonAbstract> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
-@@ -126,6 +131,19 @@
-         if ((Boolean) iblockdata.getValue(BlockButtonAbstract.POWERED)) {
-             return EnumInteractionResult.CONSUME;
-         } else {
-+            // CraftBukkit start
-+            boolean powered = ((Boolean) iblockdata.getValue(POWERED));
-+            org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
-+            int old = (powered) ? 15 : 0;
-+            int current = (!powered) ? 15 : 0;
-+
-+            BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, old, current);
-+            world.getCraftServer().getPluginManager().callEvent(eventRedstone);
-+
-+            if ((eventRedstone.getNewCurrent() > 0) != (!powered)) {
-+                return EnumInteractionResult.SUCCESS;
-+            }
-+            // CraftBukkit end
-             this.press(iblockdata, world, blockposition, entityhuman);
-             return EnumInteractionResult.SUCCESS;
-         }
-@@ -197,11 +215,36 @@
-     }
- 
-     protected void checkPressed(IBlockData iblockdata, World world, BlockPosition blockposition) {
--        EntityArrow entityarrow = this.type.canButtonBeActivatedByArrows() ? (EntityArrow) world.getEntitiesOfClass(EntityArrow.class, iblockdata.getShape(world, blockposition).bounds().move(blockposition)).stream().findFirst().orElse((Object) null) : null;
-+        EntityArrow entityarrow = this.type.canButtonBeActivatedByArrows() ? (EntityArrow) world.getEntitiesOfClass(EntityArrow.class, iblockdata.getShape(world, blockposition).bounds().move(blockposition)).stream().findFirst().orElse(null) : null; // CraftBukkit - decompile error
-         boolean flag = entityarrow != null;
-         boolean flag1 = (Boolean) iblockdata.getValue(BlockButtonAbstract.POWERED);
- 
-+        // CraftBukkit start - Call interact event when arrows turn on wooden buttons
-+        if (flag1 != flag && flag) {
-+            org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
-+            EntityInteractEvent event = new EntityInteractEvent(entityarrow.getBukkitEntity(), block);
-+            world.getCraftServer().getPluginManager().callEvent(event);
-+
-+            if (event.isCancelled()) {
-+                return;
-+            }
-+        }
-+        // CraftBukkit end
-+
-         if (flag != flag1) {
-+            // CraftBukkit start
-+            boolean powered = flag1;
-+            org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
-+            int old = (powered) ? 15 : 0;
-+            int current = (!powered) ? 15 : 0;
-+
-+            BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, old, current);
-+            world.getCraftServer().getPluginManager().callEvent(eventRedstone);
-+
-+            if ((flag && eventRedstone.getNewCurrent() <= 0) || (!flag && eventRedstone.getNewCurrent() > 0)) {
-+                return;
-+            }
-+            // CraftBukkit end
-             world.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockButtonAbstract.POWERED, flag), 3);
-             this.updateNeighbours(iblockdata, world, blockposition);
-             this.playSound((EntityHuman) null, world, blockposition, flag);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockCactus.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockCactus.patch
deleted file mode 100644
index b7357ae0e2..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockCactus.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/net/minecraft/world/level/block/BlockCactus.java
-+++ b/net/minecraft/world/level/block/BlockCactus.java
-@@ -23,6 +23,8 @@
- import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- 
-+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
-+
- public class BlockCactus extends Block {
- 
-     public static final MapCodec<BlockCactus> CODEC = simpleCodec(BlockCactus::new);
-@@ -65,7 +67,7 @@
-                 int j = (Integer) iblockdata.getValue(BlockCactus.AGE);
- 
-                 if (j == 15) {
--                    worldserver.setBlockAndUpdate(blockposition1, this.defaultBlockState());
-+                    CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition1, this.defaultBlockState()); // CraftBukkit
-                     IBlockData iblockdata1 = (IBlockData) iblockdata.setValue(BlockCactus.AGE, 0);
- 
-                     worldserver.setBlock(blockposition, iblockdata1, 4);
-@@ -120,7 +122,7 @@
- 
-     @Override
-     protected void entityInside(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
--        entity.hurt(world.damageSources().cactus(), 1.0F);
-+        entity.hurt(world.damageSources().cactus().directBlock(world, blockposition), 1.0F); // CraftBukkit
-     }
- 
-     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockCake.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockCake.patch
deleted file mode 100644
index 85c0511550..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockCake.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/net/minecraft/world/level/block/BlockCake.java
-+++ b/net/minecraft/world/level/block/BlockCake.java
-@@ -98,7 +98,18 @@
-             return EnumInteractionResult.PASS;
-         } else {
-             entityhuman.awardStat(StatisticList.EAT_CAKE_SLICE);
--            entityhuman.getFoodData().eat(2, 0.1F);
-+            // CraftBukkit start
-+            // entityhuman.getFoodData().eat(2, 0.1F);
-+            int oldFoodLevel = entityhuman.getFoodData().foodLevel;
-+
-+            org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callFoodLevelChangeEvent(entityhuman, 2 + oldFoodLevel);
-+
-+            if (!event.isCancelled()) {
-+                entityhuman.getFoodData().eat(event.getFoodLevel() - oldFoodLevel, 0.1F);
-+            }
-+
-+            ((net.minecraft.server.level.EntityPlayer) entityhuman).getBukkitEntity().sendHealthUpdate();
-+            // CraftBukkit end
-             int i = (Integer) iblockdata.getValue(BlockCake.BITES);
- 
-             generatoraccess.gameEvent((Entity) entityhuman, (Holder) GameEvent.EAT, blockposition);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockCampfire.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockCampfire.patch
deleted file mode 100644
index b1895f817a..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockCampfire.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/net/minecraft/world/level/block/BlockCampfire.java
-+++ b/net/minecraft/world/level/block/BlockCampfire.java
-@@ -113,7 +113,7 @@
-     @Override
-     protected void entityInside(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
-         if ((Boolean) iblockdata.getValue(BlockCampfire.LIT) && entity instanceof EntityLiving) {
--            entity.hurt(world.damageSources().campfire(), (float) this.fireDamage);
-+            entity.hurt(world.damageSources().campfire().directBlock(world, blockposition), (float) this.fireDamage); // CraftBukkit
-         }
- 
-         super.entityInside(iblockdata, world, blockposition, entity);
-@@ -219,6 +219,11 @@
- 
-         if (world instanceof WorldServer worldserver) {
-             if (iprojectile.isOnFire() && iprojectile.mayInteract(worldserver, blockposition) && !(Boolean) iblockdata.getValue(BlockCampfire.LIT) && !(Boolean) iblockdata.getValue(BlockCampfire.WATERLOGGED)) {
-+                // CraftBukkit start
-+                if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, blockposition, iprojectile).isCancelled()) {
-+                    return;
-+                }
-+                // CraftBukkit end
-                 world.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockProperties.LIT, true), 11);
-             }
-         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockCauldron.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockCauldron.patch
deleted file mode 100644
index 37c8b5f25f..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockCauldron.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/net/minecraft/world/level/block/BlockCauldron.java
-+++ b/net/minecraft/world/level/block/BlockCauldron.java
-@@ -13,6 +13,10 @@
- import net.minecraft.world.level.material.FluidType;
- import net.minecraft.world.level.material.FluidTypes;
- 
-+// CraftBukkit start
-+import org.bukkit.event.block.CauldronLevelChangeEvent;
-+// CraftBukkit end
-+
- public class BlockCauldron extends AbstractCauldronBlock {
- 
-     public static final MapCodec<BlockCauldron> CODEC = simpleCodec(BlockCauldron::new);
-@@ -62,13 +66,11 @@
- 
-         if (fluidtype == FluidTypes.WATER) {
-             iblockdata1 = Blocks.WATER_CAULDRON.defaultBlockState();
--            world.setBlockAndUpdate(blockposition, iblockdata1);
--            world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, blockposition, GameEvent.a.of(iblockdata1));
-+            LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, iblockdata1, null, CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL); // CraftBukkit
-             world.levelEvent(1047, blockposition, 0);
-         } else if (fluidtype == FluidTypes.LAVA) {
-             iblockdata1 = Blocks.LAVA_CAULDRON.defaultBlockState();
--            world.setBlockAndUpdate(blockposition, iblockdata1);
--            world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, blockposition, GameEvent.a.of(iblockdata1));
-+            LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, iblockdata1, null, CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL); // CraftBukkit
-             world.levelEvent(1046, blockposition, 0);
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockChest.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockChest.patch
deleted file mode 100644
index 6c31f92f11..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockChest.patch
+++ /dev/null
@@ -1,92 +0,0 @@
---- a/net/minecraft/world/level/block/BlockChest.java
-+++ b/net/minecraft/world/level/block/BlockChest.java
-@@ -91,24 +91,7 @@
-         public Optional<ITileInventory> acceptDouble(final TileEntityChest tileentitychest, final TileEntityChest tileentitychest1) {
-             final InventoryLargeChest inventorylargechest = new InventoryLargeChest(tileentitychest, tileentitychest1);
- 
--            return Optional.of(new ITileInventory(this) {
--                @Nullable
--                @Override
--                public Container createMenu(int i, PlayerInventory playerinventory, EntityHuman entityhuman) {
--                    if (tileentitychest.canOpen(entityhuman) && tileentitychest1.canOpen(entityhuman)) {
--                        tileentitychest.unpackLootTable(playerinventory.player);
--                        tileentitychest1.unpackLootTable(playerinventory.player);
--                        return ContainerChest.sixRows(i, playerinventory, inventorylargechest);
--                    } else {
--                        return null;
--                    }
--                }
--
--                @Override
--                public IChatBaseComponent getDisplayName() {
--                    return (IChatBaseComponent) (tileentitychest.hasCustomName() ? tileentitychest.getDisplayName() : (tileentitychest1.hasCustomName() ? tileentitychest1.getDisplayName() : IChatBaseComponent.translatable("container.chestDouble")));
--                }
--            });
-+            return Optional.of(new DoubleInventory(tileentitychest, tileentitychest1, inventorylargechest)); // CraftBukkit // CraftBukkit - decompile error
-         }
- 
-         public Optional<ITileInventory> acceptSingle(TileEntityChest tileentitychest) {
-@@ -121,6 +104,38 @@
-         }
-     };
- 
-+    // CraftBukkit start
-+    public static class DoubleInventory implements ITileInventory {
-+
-+        private final TileEntityChest tileentitychest;
-+        private final TileEntityChest tileentitychest1;
-+        public final InventoryLargeChest inventorylargechest;
-+
-+        public DoubleInventory(TileEntityChest tileentitychest, TileEntityChest tileentitychest1, InventoryLargeChest inventorylargechest) {
-+            this.tileentitychest = tileentitychest;
-+            this.tileentitychest1 = tileentitychest1;
-+            this.inventorylargechest = inventorylargechest;
-+        }
-+
-+        @Nullable
-+        @Override
-+        public Container createMenu(int i, PlayerInventory playerinventory, EntityHuman entityhuman) {
-+            if (tileentitychest.canOpen(entityhuman) && tileentitychest1.canOpen(entityhuman)) {
-+                tileentitychest.unpackLootTable(playerinventory.player);
-+                tileentitychest1.unpackLootTable(playerinventory.player);
-+                return ContainerChest.sixRows(i, playerinventory, inventorylargechest);
-+            } else {
-+                return null;
-+            }
-+        }
-+
-+        @Override
-+        public IChatBaseComponent getDisplayName() {
-+            return (IChatBaseComponent) (tileentitychest.hasCustomName() ? tileentitychest.getDisplayName() : (tileentitychest1.hasCustomName() ? tileentitychest1.getDisplayName() : IChatBaseComponent.translatable("container.chestDouble")));
-+        }
-+    };
-+    // CraftBukkit end
-+
-     @Override
-     public MapCodec<? extends BlockChest> codec() {
-         return BlockChest.CODEC;
-@@ -257,7 +272,7 @@
- 
-     @Override
-     public DoubleBlockFinder.Result<? extends TileEntityChest> combine(IBlockData iblockdata, World world, BlockPosition blockposition, boolean flag) {
--        BiPredicate bipredicate;
-+        BiPredicate<GeneratorAccess, BlockPosition> bipredicate; // CraftBukkit - decompile error
- 
-         if (flag) {
-             bipredicate = (generatoraccess, blockposition1) -> {
-@@ -273,7 +288,14 @@
-     @Nullable
-     @Override
-     protected ITileInventory getMenuProvider(IBlockData iblockdata, World world, BlockPosition blockposition) {
--        return (ITileInventory) ((Optional) this.combine(iblockdata, world, blockposition, false).apply(BlockChest.MENU_PROVIDER_COMBINER)).orElse((Object) null);
-+        // CraftBukkit start
-+        return getMenuProvider(iblockdata, world, blockposition, false);
-+    }
-+
-+    @Nullable
-+    public ITileInventory getMenuProvider(IBlockData iblockdata, World world, BlockPosition blockposition, boolean ignoreObstructions) {
-+        return (ITileInventory) ((Optional) this.combine(iblockdata, world, blockposition, ignoreObstructions).apply(BlockChest.MENU_PROVIDER_COMBINER)).orElse((Object) null);
-+        // CraftBukkit end
-     }
- 
-     public static DoubleBlockFinder.Combiner<TileEntityChest, Float2FloatFunction> opennessCombiner(final LidBlockEntity lidblockentity) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockChorusFlower.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockChorusFlower.patch
deleted file mode 100644
index 04cac1d358..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockChorusFlower.patch
+++ /dev/null
@@ -1,73 +0,0 @@
---- a/net/minecraft/world/level/block/BlockChorusFlower.java
-+++ b/net/minecraft/world/level/block/BlockChorusFlower.java
-@@ -23,6 +23,8 @@
- import net.minecraft.world.phys.MovingObjectPositionBlock;
- import net.minecraft.world.phys.shapes.VoxelShape;
- 
-+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
-+
- public class BlockChorusFlower extends Block {
- 
-     public static final MapCodec<BlockChorusFlower> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
-@@ -103,8 +105,12 @@
-                 }
- 
-                 if (flag && allNeighborsEmpty(worldserver, blockposition1, (EnumDirection) null) && worldserver.isEmptyBlock(blockposition.above(2))) {
--                    worldserver.setBlock(blockposition, BlockChorusFruit.getStateWithConnections(worldserver, blockposition, this.plant.defaultBlockState()), 2);
--                    this.placeGrownFlower(worldserver, blockposition1, i);
-+                    // CraftBukkit start - add event
-+                    if (CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition1, this.defaultBlockState().setValue(BlockChorusFlower.AGE, Integer.valueOf(i)), 2)) {
-+                        worldserver.setBlock(blockposition, BlockChorusFruit.getStateWithConnections(worldserver, blockposition, this.plant.defaultBlockState()), 2);
-+                        this.placeGrownFlower(worldserver, blockposition1, i);
-+                    }
-+                    // CraftBukkit end
-                 } else if (i < 4) {
-                     j = randomsource.nextInt(4);
-                     if (flag1) {
-@@ -118,18 +124,30 @@
-                         BlockPosition blockposition2 = blockposition.relative(enumdirection);
- 
-                         if (worldserver.isEmptyBlock(blockposition2) && worldserver.isEmptyBlock(blockposition2.below()) && allNeighborsEmpty(worldserver, blockposition2, enumdirection.getOpposite())) {
--                            this.placeGrownFlower(worldserver, blockposition2, i + 1);
--                            flag2 = true;
-+                            // CraftBukkit start - add event
-+                            if (CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition2, this.defaultBlockState().setValue(BlockChorusFlower.AGE, Integer.valueOf(i + 1)), 2)) {
-+                                this.placeGrownFlower(worldserver, blockposition2, i + 1);
-+                                flag2 = true;
-+                            }
-+                            // CraftBukkit end
-                         }
-                     }
- 
-                     if (flag2) {
-                         worldserver.setBlock(blockposition, BlockChorusFruit.getStateWithConnections(worldserver, blockposition, this.plant.defaultBlockState()), 2);
-                     } else {
--                        this.placeDeadFlower(worldserver, blockposition);
-+                        // CraftBukkit start - add event
-+                        if (CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, this.defaultBlockState().setValue(BlockChorusFlower.AGE, Integer.valueOf(5)), 2)) {
-+                            this.placeDeadFlower(worldserver, blockposition);
-+                        }
-+                        // CraftBukkit end
-                     }
-                 } else {
--                    this.placeDeadFlower(worldserver, blockposition);
-+                    // CraftBukkit start - add event
-+                    if (CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, this.defaultBlockState().setValue(BlockChorusFlower.AGE, Integer.valueOf(5)), 2)) {
-+                        this.placeDeadFlower(worldserver, blockposition);
-+                    }
-+                    // CraftBukkit end
-                 }
- 
-             }
-@@ -267,6 +285,11 @@
- 
-         if (world instanceof WorldServer worldserver) {
-             if (iprojectile.mayInteract(worldserver, blockposition) && iprojectile.mayBreak(worldserver)) {
-+                // CraftBukkit
-+                if (!CraftEventFactory.callEntityChangeBlockEvent(iprojectile, blockposition, Blocks.AIR.defaultBlockState())) {
-+                    return;
-+                }
-+                // CraftBukkit end
-                 world.destroyBlock(blockposition, true, iprojectile);
-             }
-         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockCocoa.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockCocoa.patch
deleted file mode 100644
index 3e8d91fa13..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockCocoa.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/net/minecraft/world/level/block/BlockCocoa.java
-+++ b/net/minecraft/world/level/block/BlockCocoa.java
-@@ -21,6 +21,8 @@
- import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- 
-+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
-+
- public class BlockCocoa extends BlockFacingHorizontal implements IBlockFragilePlantElement {
- 
-     public static final MapCodec<BlockCocoa> CODEC = simpleCodec(BlockCocoa::new);
-@@ -61,7 +63,7 @@
-             int i = (Integer) iblockdata.getValue(BlockCocoa.AGE);
- 
-             if (i < 2) {
--                worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockCocoa.AGE, i + 1), 2);
-+                CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, (IBlockData) iblockdata.setValue(BlockCocoa.AGE, i + 1), 2); // CraftBukkkit
-             }
-         }
- 
-@@ -131,7 +133,7 @@
- 
-     @Override
-     public void performBonemeal(WorldServer worldserver, RandomSource randomsource, BlockPosition blockposition, IBlockData iblockdata) {
--        worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockCocoa.AGE, (Integer) iblockdata.getValue(BlockCocoa.AGE) + 1), 2);
-+        CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, (IBlockData) iblockdata.setValue(BlockCocoa.AGE, (Integer) iblockdata.getValue(BlockCocoa.AGE) + 1), 2); // CraftBukkit
-     }
- 
-     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockCommand.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockCommand.patch
deleted file mode 100644
index 3984b69d9a..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockCommand.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- a/net/minecraft/world/level/block/BlockCommand.java
-+++ b/net/minecraft/world/level/block/BlockCommand.java
-@@ -31,6 +31,8 @@
- import net.minecraft.world.phys.MovingObjectPositionBlock;
- import org.slf4j.Logger;
- 
-+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
-+
- public class BlockCommand extends BlockTileEntity implements GameMasterBlock {
- 
-     public static final MapCodec<BlockCommand> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
-@@ -78,6 +80,15 @@
- 
-     private void setPoweredAndUpdate(World world, BlockPosition blockposition, TileEntityCommand tileentitycommand, boolean flag) {
-         boolean flag1 = tileentitycommand.isPowered();
-+        // CraftBukkit start
-+        org.bukkit.block.Block bukkitBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
-+        int old = flag1 ? 15 : 0;
-+        int current = flag ? 15 : 0;
-+
-+        BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(bukkitBlock, old, current);
-+        world.getCraftServer().getPluginManager().callEvent(eventRedstone);
-+        flag = eventRedstone.getNewCurrent() > 0;
-+        // CraftBukkit end
- 
-         if (flag != flag1) {
-             tileentitycommand.setPowered(flag);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockComposter.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockComposter.patch
deleted file mode 100644
index c6903bbe80..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockComposter.patch
+++ /dev/null
@@ -1,116 +0,0 @@
---- a/net/minecraft/world/level/block/BlockComposter.java
-+++ b/net/minecraft/world/level/block/BlockComposter.java
-@@ -42,6 +42,11 @@
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- import net.minecraft.world.phys.shapes.VoxelShapes;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.inventory.CraftBlockInventoryHolder;
-+import org.bukkit.craftbukkit.util.DummyGeneratorAccess;
-+// CraftBukkit end
-+
- public class BlockComposter extends Block implements IInventoryHolder {
- 
-     public static final MapCodec<BlockComposter> CODEC = simpleCodec(BlockComposter::new);
-@@ -269,7 +274,14 @@
-         int i = (Integer) iblockdata.getValue(BlockComposter.LEVEL);
- 
-         if (i < 7 && BlockComposter.COMPOSTABLES.containsKey(itemstack.getItem())) {
--            IBlockData iblockdata1 = addItem(entity, iblockdata, worldserver, blockposition, itemstack);
-+            // CraftBukkit start
-+            double rand = worldserver.getRandom().nextDouble();
-+            IBlockData iblockdata1 = addItem(entity, iblockdata, DummyGeneratorAccess.INSTANCE, blockposition, itemstack, rand);
-+            if (iblockdata == iblockdata1 || !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, iblockdata1)) {
-+                return iblockdata;
-+            }
-+            iblockdata1 = addItem(entity, iblockdata, worldserver, blockposition, itemstack, rand);
-+            // CraftBukkit end
- 
-             itemstack.shrink(1);
-             return iblockdata1;
-@@ -279,6 +291,14 @@
-     }
- 
-     public static IBlockData extractProduce(Entity entity, IBlockData iblockdata, World world, BlockPosition blockposition) {
-+        // CraftBukkit start
-+        if (entity != null && !(entity instanceof EntityHuman)) {
-+            IBlockData iblockdata1 = empty(entity, iblockdata, DummyGeneratorAccess.INSTANCE, blockposition);
-+            if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, iblockdata1)) {
-+                return iblockdata;
-+            }
-+        }
-+        // CraftBukkit end
-         if (!world.isClientSide) {
-             Vec3D vec3d = Vec3D.atLowerCornerWithOffset(blockposition, 0.5D, 1.01D, 0.5D).offsetRandom(world.random, 0.7F);
-             EntityItem entityitem = new EntityItem(world, vec3d.x(), vec3d.y(), vec3d.z(), new ItemStack(Items.BONE_MEAL));
-@@ -302,10 +322,16 @@
-     }
- 
-     static IBlockData addItem(@Nullable Entity entity, IBlockData iblockdata, GeneratorAccess generatoraccess, BlockPosition blockposition, ItemStack itemstack) {
-+        // CraftBukkit start
-+        return addItem(entity, iblockdata, generatoraccess, blockposition, itemstack, generatoraccess.getRandom().nextDouble());
-+    }
-+
-+    static IBlockData addItem(@Nullable Entity entity, IBlockData iblockdata, GeneratorAccess generatoraccess, BlockPosition blockposition, ItemStack itemstack, double rand) {
-+        // CraftBukkit end
-         int i = (Integer) iblockdata.getValue(BlockComposter.LEVEL);
-         float f = BlockComposter.COMPOSTABLES.getFloat(itemstack.getItem());
- 
--        if ((i != 0 || f <= 0.0F) && generatoraccess.getRandom().nextDouble() >= (double) f) {
-+        if ((i != 0 || f <= 0.0F) && rand >= (double) f) {
-             return iblockdata;
-         } else {
-             int j = i + 1;
-@@ -354,7 +380,8 @@
-     public IWorldInventory getContainer(IBlockData iblockdata, GeneratorAccess generatoraccess, BlockPosition blockposition) {
-         int i = (Integer) iblockdata.getValue(BlockComposter.LEVEL);
- 
--        return (IWorldInventory) (i == 8 ? new BlockComposter.ContainerOutput(iblockdata, generatoraccess, blockposition, new ItemStack(Items.BONE_MEAL)) : (i < 7 ? new BlockComposter.ContainerInput(iblockdata, generatoraccess, blockposition) : new BlockComposter.ContainerEmpty()));
-+        // CraftBukkit - empty generatoraccess, blockposition
-+        return (IWorldInventory) (i == 8 ? new BlockComposter.ContainerOutput(iblockdata, generatoraccess, blockposition, new ItemStack(Items.BONE_MEAL)) : (i < 7 ? new BlockComposter.ContainerInput(iblockdata, generatoraccess, blockposition) : new BlockComposter.ContainerEmpty(generatoraccess, blockposition)));
-     }
- 
-     public static class ContainerOutput extends InventorySubcontainer implements IWorldInventory {
-@@ -369,6 +396,7 @@
-             this.state = iblockdata;
-             this.level = generatoraccess;
-             this.pos = blockposition;
-+            this.bukkitOwner = new CraftBlockInventoryHolder(generatoraccess, blockposition, this); // CraftBukkit
-         }
- 
-         @Override
-@@ -393,8 +421,15 @@
- 
-         @Override
-         public void setChanged() {
-+            // CraftBukkit start - allow putting items back (eg cancelled InventoryMoveItemEvent)
-+            if (this.isEmpty()) {
-             BlockComposter.empty((Entity) null, this.state, this.level, this.pos);
-             this.changed = true;
-+            } else {
-+                this.level.setBlock(this.pos, this.state, 3);
-+                this.changed = false;
-+            }
-+            // CraftBukkit end
-         }
-     }
- 
-@@ -407,6 +442,7 @@
- 
-         public ContainerInput(IBlockData iblockdata, GeneratorAccess generatoraccess, BlockPosition blockposition) {
-             super(1);
-+            this.bukkitOwner = new CraftBlockInventoryHolder(generatoraccess, blockposition, this); // CraftBukkit
-             this.state = iblockdata;
-             this.level = generatoraccess;
-             this.pos = blockposition;
-@@ -449,8 +485,9 @@
- 
-     public static class ContainerEmpty extends InventorySubcontainer implements IWorldInventory {
- 
--        public ContainerEmpty() {
-+        public ContainerEmpty(GeneratorAccess generatoraccess, BlockPosition blockposition) { // CraftBukkit
-             super(0);
-+            this.bukkitOwner = new CraftBlockInventoryHolder(generatoraccess, blockposition, this); // CraftBukkit
-         }
- 
-         @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockConcretePowder.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockConcretePowder.patch
deleted file mode 100644
index f828b830d0..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockConcretePowder.patch
+++ /dev/null
@@ -1,77 +0,0 @@
---- a/net/minecraft/world/level/block/BlockConcretePowder.java
-+++ b/net/minecraft/world/level/block/BlockConcretePowder.java
-@@ -16,6 +16,12 @@
- import net.minecraft.world.level.block.state.BlockBase;
- import net.minecraft.world.level.block.state.IBlockData;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.block.CraftBlockState;
-+import org.bukkit.craftbukkit.block.CraftBlockStates;
-+import org.bukkit.event.block.BlockFormEvent;
-+// CraftBukkit end
-+
- public class BlockConcretePowder extends BlockFalling {
- 
-     public static final MapCodec<BlockConcretePowder> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
-@@ -38,7 +44,7 @@
-     @Override
-     public void onLand(World world, BlockPosition blockposition, IBlockData iblockdata, IBlockData iblockdata1, EntityFallingBlock entityfallingblock) {
-         if (shouldSolidify(world, blockposition, iblockdata1)) {
--            world.setBlock(blockposition, this.concrete.defaultBlockState(), 3);
-+            org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition, this.concrete.defaultBlockState(), 3); // CraftBukkit
-         }
- 
-     }
-@@ -49,7 +55,24 @@
-         BlockPosition blockposition = blockactioncontext.getClickedPos();
-         IBlockData iblockdata = world.getBlockState(blockposition);
- 
--        return shouldSolidify(world, blockposition, iblockdata) ? this.concrete.defaultBlockState() : super.getStateForPlacement(blockactioncontext);
-+        // CraftBukkit start
-+        if (!shouldSolidify(world, blockposition, iblockdata)) {
-+            return super.getStateForPlacement(blockactioncontext);
-+        }
-+
-+        // TODO: An event factory call for methods like this
-+        CraftBlockState blockState = CraftBlockStates.getBlockState(world, blockposition);
-+        blockState.setData(this.concrete.defaultBlockState());
-+
-+        BlockFormEvent event = new BlockFormEvent(blockState.getBlock(), blockState);
-+        world.getServer().server.getPluginManager().callEvent(event);
-+
-+        if (!event.isCancelled()) {
-+            return blockState.getHandle();
-+        }
-+
-+        return super.getStateForPlacement(blockactioncontext);
-+        // CraftBukkit end
-     }
- 
-     private static boolean shouldSolidify(IBlockAccess iblockaccess, BlockPosition blockposition, IBlockData iblockdata) {
-@@ -85,7 +108,25 @@
- 
-     @Override
-     protected IBlockData updateShape(IBlockData iblockdata, IWorldReader iworldreader, ScheduledTickAccess scheduledtickaccess, BlockPosition blockposition, EnumDirection enumdirection, BlockPosition blockposition1, IBlockData iblockdata1, RandomSource randomsource) {
--        return touchesLiquid(iworldreader, blockposition) ? this.concrete.defaultBlockState() : super.updateShape(iblockdata, iworldreader, scheduledtickaccess, blockposition, enumdirection, blockposition1, iblockdata1, randomsource);
-+        // CraftBukkit start
-+        if (touchesLiquid(iworldreader, blockposition)) {
-+            // Suppress during worldgen
-+            if (!(iworldreader instanceof World world)) {
-+                return this.concrete.defaultBlockState();
-+            }
-+            CraftBlockState blockState = CraftBlockStates.getBlockState(world, blockposition);
-+            blockState.setData(this.concrete.defaultBlockState());
-+
-+            BlockFormEvent event = new BlockFormEvent(blockState.getBlock(), blockState);
-+            world.getCraftServer().getPluginManager().callEvent(event);
-+
-+            if (!event.isCancelled()) {
-+                return blockState.getHandle();
-+            }
-+        }
-+
-+        return super.updateShape(iblockdata, iworldreader, scheduledtickaccess, blockposition, enumdirection, blockposition1, iblockdata1, randomsource);
-+        // CraftBukkit end
-     }
- 
-     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockCoral.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockCoral.patch
deleted file mode 100644
index 17128dac88..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockCoral.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/net/minecraft/world/level/block/BlockCoral.java
-+++ b/net/minecraft/world/level/block/BlockCoral.java
-@@ -40,6 +40,11 @@
-     @Override
-     protected void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, RandomSource randomsource) {
-         if (!this.scanForWater(worldserver, blockposition)) {
-+            // CraftBukkit start
-+            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, this.deadBlock.defaultBlockState()).isCancelled()) {
-+                return;
-+            }
-+            // CraftBukkit end
-             worldserver.setBlock(blockposition, this.deadBlock.defaultBlockState(), 2);
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockCoralFan.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockCoralFan.patch
deleted file mode 100644
index d885679e85..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockCoralFan.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/net/minecraft/world/level/block/BlockCoralFan.java
-+++ b/net/minecraft/world/level/block/BlockCoralFan.java
-@@ -41,6 +41,11 @@
-     @Override
-     protected void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, RandomSource randomsource) {
-         if (!scanForWater(iblockdata, worldserver, blockposition)) {
-+            // CraftBukkit start
-+            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, this.deadBlock.defaultBlockState().setValue(BlockCoralFan.WATERLOGGED, false)).isCancelled()) {
-+                return;
-+            }
-+            // CraftBukkit end
-             worldserver.setBlock(blockposition, (IBlockData) this.deadBlock.defaultBlockState().setValue(BlockCoralFan.WATERLOGGED, false), 2);
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockCoralFanWall.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockCoralFanWall.patch
deleted file mode 100644
index 304e1b5381..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockCoralFanWall.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/net/minecraft/world/level/block/BlockCoralFanWall.java
-+++ b/net/minecraft/world/level/block/BlockCoralFanWall.java
-@@ -41,6 +41,11 @@
-     @Override
-     protected void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, RandomSource randomsource) {
-         if (!scanForWater(iblockdata, worldserver, blockposition)) {
-+            // CraftBukkit start
-+            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, this.deadBlock.defaultBlockState().setValue(BlockCoralFanWall.WATERLOGGED, false).setValue(BlockCoralFanWall.FACING, iblockdata.getValue(BlockCoralFanWall.FACING))).isCancelled()) {
-+                return;
-+            }
-+            // CraftBukkit end
-             worldserver.setBlock(blockposition, (IBlockData) ((IBlockData) this.deadBlock.defaultBlockState().setValue(BlockCoralFanWall.WATERLOGGED, false)).setValue(BlockCoralFanWall.FACING, (EnumDirection) iblockdata.getValue(BlockCoralFanWall.FACING)), 2);
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockCoralPlant.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockCoralPlant.patch
deleted file mode 100644
index 44e06a2491..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockCoralPlant.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/net/minecraft/world/level/block/BlockCoralPlant.java
-+++ b/net/minecraft/world/level/block/BlockCoralPlant.java
-@@ -46,6 +46,11 @@
-     @Override
-     protected void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, RandomSource randomsource) {
-         if (!scanForWater(iblockdata, worldserver, blockposition)) {
-+            // CraftBukkit start
-+            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, this.deadBlock.defaultBlockState().setValue(BlockCoralPlant.WATERLOGGED, false)).isCancelled()) {
-+                return;
-+            }
-+            // CraftBukkit end
-             worldserver.setBlock(blockposition, (IBlockData) this.deadBlock.defaultBlockState().setValue(BlockCoralPlant.WATERLOGGED, false), 2);
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockCrops.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockCrops.patch
deleted file mode 100644
index bf16556b8e..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockCrops.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- a/net/minecraft/world/level/block/BlockCrops.java
-+++ b/net/minecraft/world/level/block/BlockCrops.java
-@@ -22,6 +22,8 @@
- import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- 
-+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
-+
- public class BlockCrops extends BlockPlant implements IBlockFragilePlantElement {
- 
-     public static final MapCodec<BlockCrops> CODEC = simpleCodec(BlockCrops::new);
-@@ -83,7 +85,7 @@
-                 float f = getGrowthSpeed(this, worldserver, blockposition);
- 
-                 if (randomsource.nextInt((int) (25.0F / f) + 1) == 0) {
--                    worldserver.setBlock(blockposition, this.getStateForAge(i + 1), 2);
-+                    CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, this.getStateForAge(i + 1), 2); // CraftBukkit
-                 }
-             }
-         }
-@@ -98,7 +100,7 @@
-             i = j;
-         }
- 
--        world.setBlock(blockposition, this.getStateForAge(i), 2);
-+        CraftEventFactory.handleBlockGrowEvent(world, blockposition, this.getStateForAge(i), 2); // CraftBukkit
-     }
- 
-     protected int getBonemealAgeIncrease(World world) {
-@@ -161,7 +163,7 @@
-     @Override
-     protected void entityInside(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
-         if (world instanceof WorldServer worldserver) {
--            if (entity instanceof EntityRavager && worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
-+            if (entity instanceof EntityRavager && CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.defaultBlockState(), !worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING))) { // CraftBukkit
-                 worldserver.destroyBlock(blockposition, true, entity);
-             }
-         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockDaylightDetector.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockDaylightDetector.patch
deleted file mode 100644
index f15f2f15ff..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockDaylightDetector.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/net/minecraft/world/level/block/BlockDaylightDetector.java
-+++ b/net/minecraft/world/level/block/BlockDaylightDetector.java
-@@ -74,6 +74,7 @@
- 
-         i = MathHelper.clamp(i, 0, 15);
-         if ((Integer) iblockdata.getValue(BlockDaylightDetector.POWER) != i) {
-+            i = org.bukkit.craftbukkit.event.CraftEventFactory.callRedstoneChange(world, blockposition, ((Integer) iblockdata.getValue(POWER)), i).getNewCurrent(); // CraftBukkit - Call BlockRedstoneEvent
-             world.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockDaylightDetector.POWER, i), 3);
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockDiodeAbstract.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockDiodeAbstract.patch
deleted file mode 100644
index 1b54785c3c..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockDiodeAbstract.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/net/minecraft/world/level/block/BlockDiodeAbstract.java
-+++ b/net/minecraft/world/level/block/BlockDiodeAbstract.java
-@@ -24,6 +24,8 @@
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- import net.minecraft.world.ticks.TickListPriority;
- 
-+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
-+
- public abstract class BlockDiodeAbstract extends BlockFacingHorizontal {
- 
-     protected static final VoxelShape SHAPE = Block.box(0.0D, 0.0D, 0.0D, 16.0D, 2.0D, 16.0D);
-@@ -59,8 +61,18 @@
-             boolean flag1 = this.shouldTurnOn(worldserver, blockposition, iblockdata);
- 
-             if (flag && !flag1) {
-+                // CraftBukkit start
-+                if (CraftEventFactory.callRedstoneChange(worldserver, blockposition, 15, 0).getNewCurrent() != 0) {
-+                    return;
-+                }
-+                // CraftBukkit end
-                 worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockDiodeAbstract.POWERED, false), 2);
-             } else if (!flag) {
-+                // CraftBukkit start
-+                if (CraftEventFactory.callRedstoneChange(worldserver, blockposition, 0, 15).getNewCurrent() != 15) {
-+                    return;
-+                }
-+                // CraftBukkit end
-                 worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockDiodeAbstract.POWERED, true), 2);
-                 if (!flag1) {
-                     worldserver.scheduleTick(blockposition, (Block) this, this.getDelay(iblockdata), TickListPriority.VERY_HIGH);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockDirtSnowSpreadable.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockDirtSnowSpreadable.patch
deleted file mode 100644
index 9254168a75..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockDirtSnowSpreadable.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/net/minecraft/world/level/block/BlockDirtSnowSpreadable.java
-+++ b/net/minecraft/world/level/block/BlockDirtSnowSpreadable.java
-@@ -44,6 +44,11 @@
-     @Override
-     protected void randomTick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, RandomSource randomsource) {
-         if (!canBeGrass(iblockdata, worldserver, blockposition)) {
-+            // CraftBukkit start
-+            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, Blocks.DIRT.defaultBlockState()).isCancelled()) {
-+                return;
-+            }
-+            // CraftBukkit end
-             worldserver.setBlockAndUpdate(blockposition, Blocks.DIRT.defaultBlockState());
-         } else {
-             if (worldserver.getMaxLocalRawBrightness(blockposition.above()) >= 9) {
-@@ -53,7 +58,7 @@
-                     BlockPosition blockposition1 = blockposition.offset(randomsource.nextInt(3) - 1, randomsource.nextInt(5) - 3, randomsource.nextInt(3) - 1);
- 
-                     if (worldserver.getBlockState(blockposition1).is(Blocks.DIRT) && canPropagate(iblockdata1, worldserver, blockposition1)) {
--                        worldserver.setBlockAndUpdate(blockposition1, (IBlockData) iblockdata1.setValue(BlockDirtSnowSpreadable.SNOWY, isSnowySetting(worldserver.getBlockState(blockposition1.above()))));
-+                        org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition1, (IBlockData) iblockdata1.setValue(BlockDirtSnowSpreadable.SNOWY, isSnowySetting(worldserver.getBlockState(blockposition1.above())))); // CraftBukkit
-                     }
-                 }
-             }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockDispenser.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockDispenser.patch
deleted file mode 100644
index 8b0139e08a..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockDispenser.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- a/net/minecraft/world/level/block/BlockDispenser.java
-+++ b/net/minecraft/world/level/block/BlockDispenser.java
-@@ -52,6 +52,7 @@
-     private static final DispenseBehaviorItem DEFAULT_BEHAVIOR = new DispenseBehaviorItem();
-     public static final Map<Item, IDispenseBehavior> DISPENSER_REGISTRY = new IdentityHashMap();
-     private static final int TRIGGER_DURATION = 4;
-+    public static boolean eventFired = false; // CraftBukkit
- 
-     @Override
-     public MapCodec<? extends BlockDispenser> codec() {
-@@ -88,7 +89,7 @@
-     }
- 
-     public void dispenseFrom(WorldServer worldserver, IBlockData iblockdata, BlockPosition blockposition) {
--        TileEntityDispenser tileentitydispenser = (TileEntityDispenser) worldserver.getBlockEntity(blockposition, TileEntityTypes.DISPENSER).orElse((Object) null);
-+        TileEntityDispenser tileentitydispenser = (TileEntityDispenser) worldserver.getBlockEntity(blockposition, TileEntityTypes.DISPENSER).orElse(null); // CraftBukkit - decompile error
- 
-         if (tileentitydispenser == null) {
-             BlockDispenser.LOGGER.warn("Ignoring dispensing attempt for Dispenser without matching block entity at {}", blockposition);
-@@ -104,6 +105,7 @@
-                 IDispenseBehavior idispensebehavior = this.getDispenseMethod(worldserver, itemstack);
- 
-                 if (idispensebehavior != IDispenseBehavior.NOOP) {
-+                    eventFired = false; // CraftBukkit - reset event status
-                     tileentitydispenser.setItem(i, idispensebehavior.dispense(sourceblock, itemstack));
-                 }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockDoor.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockDoor.patch
deleted file mode 100644
index d62163d035..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockDoor.patch
+++ /dev/null
@@ -1,38 +0,0 @@
---- a/net/minecraft/world/level/block/BlockDoor.java
-+++ b/net/minecraft/world/level/block/BlockDoor.java
-@@ -39,6 +39,8 @@
- import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- 
-+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
-+
- public class BlockDoor extends Block {
- 
-     public static final MapCodec<BlockDoor> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
-@@ -222,9 +224,24 @@
- 
-     @Override
-     protected void neighborChanged(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, @Nullable Orientation orientation, boolean flag) {
--        boolean flag1 = world.hasNeighborSignal(blockposition) || world.hasNeighborSignal(blockposition.relative(iblockdata.getValue(BlockDoor.HALF) == BlockPropertyDoubleBlockHalf.LOWER ? EnumDirection.UP : EnumDirection.DOWN));
-+        // CraftBukkit start
-+        BlockPosition otherHalf = blockposition.relative(iblockdata.getValue(BlockDoor.HALF) == BlockPropertyDoubleBlockHalf.LOWER ? EnumDirection.UP : EnumDirection.DOWN);
- 
--        if (!this.defaultBlockState().is(block) && flag1 != (Boolean) iblockdata.getValue(BlockDoor.POWERED)) {
-+        org.bukkit.World bworld = world.getWorld();
-+        org.bukkit.block.Block bukkitBlock = bworld.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
-+        org.bukkit.block.Block blockTop = bworld.getBlockAt(otherHalf.getX(), otherHalf.getY(), otherHalf.getZ());
-+
-+        int power = bukkitBlock.getBlockPower();
-+        int powerTop = blockTop.getBlockPower();
-+        if (powerTop > power) power = powerTop;
-+        int oldPower = (Boolean) iblockdata.getValue(BlockDoor.POWERED) ? 15 : 0;
-+
-+        if (oldPower == 0 ^ power == 0) {
-+            BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(bukkitBlock, oldPower, power);
-+            world.getCraftServer().getPluginManager().callEvent(eventRedstone);
-+
-+            boolean flag1 = eventRedstone.getNewCurrent() > 0;
-+            // CraftBukkit end
-             if (flag1 != (Boolean) iblockdata.getValue(BlockDoor.OPEN)) {
-                 this.playSound((Entity) null, world, blockposition, flag1);
-                 world.gameEvent((Entity) null, (Holder) (flag1 ? GameEvent.BLOCK_OPEN : GameEvent.BLOCK_CLOSE), blockposition);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockDropper.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockDropper.patch
deleted file mode 100644
index 79049d7f23..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockDropper.patch
+++ /dev/null
@@ -1,58 +0,0 @@
---- a/net/minecraft/world/level/block/BlockDropper.java
-+++ b/net/minecraft/world/level/block/BlockDropper.java
-@@ -20,11 +20,17 @@
- import net.minecraft.world.level.block.state.IBlockData;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import net.minecraft.world.InventoryLargeChest;
-+import org.bukkit.craftbukkit.inventory.CraftItemStack;
-+import org.bukkit.event.inventory.InventoryMoveItemEvent;
-+// CraftBukkit end
-+
- public class BlockDropper extends BlockDispenser {
- 
-     private static final Logger LOGGER = LogUtils.getLogger();
-     public static final MapCodec<BlockDropper> CODEC = simpleCodec(BlockDropper::new);
--    private static final IDispenseBehavior DISPENSE_BEHAVIOUR = new DispenseBehaviorItem();
-+    private static final IDispenseBehavior DISPENSE_BEHAVIOUR = new DispenseBehaviorItem(true); // CraftBukkit
- 
-     @Override
-     public MapCodec<BlockDropper> codec() {
-@@ -47,7 +53,7 @@
- 
-     @Override
-     public void dispenseFrom(WorldServer worldserver, IBlockData iblockdata, BlockPosition blockposition) {
--        TileEntityDispenser tileentitydispenser = (TileEntityDispenser) worldserver.getBlockEntity(blockposition, TileEntityTypes.DROPPER).orElse((Object) null);
-+        TileEntityDispenser tileentitydispenser = (TileEntityDispenser) worldserver.getBlockEntity(blockposition, TileEntityTypes.DROPPER).orElse(null); // CraftBukkit - decompile error
- 
-         if (tileentitydispenser == null) {
-             BlockDropper.LOGGER.warn("Ignoring dispensing attempt for Dropper without matching block entity at {}", blockposition);
-@@ -68,8 +74,25 @@
-                     if (iinventory == null) {
-                         itemstack1 = BlockDropper.DISPENSE_BEHAVIOUR.dispense(sourceblock, itemstack);
-                     } else {
--                        itemstack1 = TileEntityHopper.addItem(tileentitydispenser, iinventory, itemstack.copyWithCount(1), enumdirection.getOpposite());
--                        if (itemstack1.isEmpty()) {
-+                        // CraftBukkit start - Fire event when pushing items into other inventories
-+                        CraftItemStack oitemstack = CraftItemStack.asCraftMirror(itemstack.copyWithCount(1));
-+
-+                        org.bukkit.inventory.Inventory destinationInventory;
-+                        // Have to special case large chests as they work oddly
-+                        if (iinventory instanceof InventoryLargeChest) {
-+                            destinationInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest((InventoryLargeChest) iinventory);
-+                        } else {
-+                            destinationInventory = iinventory.getOwner().getInventory();
-+                        }
-+
-+                        InventoryMoveItemEvent event = new InventoryMoveItemEvent(tileentitydispenser.getOwner().getInventory(), oitemstack, destinationInventory, true);
-+                        worldserver.getCraftServer().getPluginManager().callEvent(event);
-+                        if (event.isCancelled()) {
-+                            return;
-+                        }
-+                        itemstack1 = TileEntityHopper.addItem(tileentitydispenser, iinventory, CraftItemStack.asNMSCopy(event.getItem()), enumdirection.getOpposite());
-+                        if (event.getItem().equals(oitemstack) && itemstack1.isEmpty()) {
-+                            // CraftBukkit end
-                             itemstack1 = itemstack.copy();
-                             itemstack1.shrink(1);
-                         } else {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockEndGateway.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockEndGateway.patch
deleted file mode 100644
index d4318f235d..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockEndGateway.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/net/minecraft/world/level/block/BlockEndGateway.java
-+++ b/net/minecraft/world/level/block/BlockEndGateway.java
-@@ -23,6 +23,10 @@
- import net.minecraft.world.level.portal.TeleportTransition;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import org.bukkit.event.player.PlayerTeleportEvent;
-+// CraftBukkit end
-+
- public class BlockEndGateway extends BlockTileEntity implements Portal {
- 
-     public static final MapCodec<BlockEndGateway> CODEC = simpleCodec(BlockEndGateway::new);
-@@ -112,7 +116,7 @@
-         if (tileentity instanceof TileEntityEndGateway tileentityendgateway) {
-             Vec3D vec3d = tileentityendgateway.getPortalPosition(worldserver, blockposition);
- 
--            return vec3d == null ? null : (entity instanceof EntityEnderPearl ? new TeleportTransition(worldserver, vec3d, Vec3D.ZERO, 0.0F, 0.0F, Set.of(), TeleportTransition.PLACE_PORTAL_TICKET) : new TeleportTransition(worldserver, vec3d, Vec3D.ZERO, 0.0F, 0.0F, Relative.union(Relative.DELTA, Relative.ROTATION), TeleportTransition.PLACE_PORTAL_TICKET));
-+            return vec3d == null ? null : (entity instanceof EntityEnderPearl ? new TeleportTransition(worldserver, vec3d, Vec3D.ZERO, 0.0F, 0.0F, Set.of(), TeleportTransition.PLACE_PORTAL_TICKET, PlayerTeleportEvent.TeleportCause.END_GATEWAY) : new TeleportTransition(worldserver, vec3d, Vec3D.ZERO, 0.0F, 0.0F, Relative.union(Relative.DELTA, Relative.ROTATION), TeleportTransition.PLACE_PORTAL_TICKET, PlayerTeleportEvent.TeleportCause.END_GATEWAY)); // CraftBukkit
-         } else {
-             return null;
-         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockFenceGate.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockFenceGate.patch
deleted file mode 100644
index 9665e2b120..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockFenceGate.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/net/minecraft/world/level/block/BlockFenceGate.java
-+++ b/net/minecraft/world/level/block/BlockFenceGate.java
-@@ -173,6 +173,17 @@
-     protected void neighborChanged(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, @Nullable Orientation orientation, boolean flag) {
-         if (!world.isClientSide) {
-             boolean flag1 = world.hasNeighborSignal(blockposition);
-+            // CraftBukkit start
-+            boolean oldPowered = iblockdata.getValue(BlockFenceGate.POWERED);
-+            if (oldPowered != flag1) {
-+                int newPower = flag1 ? 15 : 0;
-+                int oldPower = oldPowered ? 15 : 0;
-+                org.bukkit.block.Block bukkitBlock = org.bukkit.craftbukkit.block.CraftBlock.at(world, blockposition);
-+                org.bukkit.event.block.BlockRedstoneEvent eventRedstone = new org.bukkit.event.block.BlockRedstoneEvent(bukkitBlock, oldPower, newPower);
-+                world.getCraftServer().getPluginManager().callEvent(eventRedstone);
-+                flag1 = eventRedstone.getNewCurrent() > 0;
-+            }
-+            // CraftBukkit end
- 
-             if ((Boolean) iblockdata.getValue(BlockFenceGate.POWERED) != flag1) {
-                 world.setBlock(blockposition, (IBlockData) ((IBlockData) iblockdata.setValue(BlockFenceGate.POWERED, flag1)).setValue(BlockFenceGate.OPEN, flag1), 2);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockFire.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockFire.patch
deleted file mode 100644
index beab20b976..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockFire.patch
+++ /dev/null
@@ -1,160 +0,0 @@
---- a/net/minecraft/world/level/block/BlockFire.java
-+++ b/net/minecraft/world/level/block/BlockFire.java
-@@ -29,6 +29,15 @@
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- import net.minecraft.world.phys.shapes.VoxelShapes;
- 
-+// CraftBukkit start
-+import net.minecraft.world.item.context.ItemActionContext;
-+import org.bukkit.craftbukkit.block.CraftBlockState;
-+import org.bukkit.craftbukkit.block.CraftBlockStates;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.event.block.BlockBurnEvent;
-+import org.bukkit.event.block.BlockFadeEvent;
-+// CraftBukkit end
-+
- public class BlockFire extends BlockFireAbstract {
- 
-     public static final MapCodec<BlockFire> CODEC = simpleCodec(BlockFire::new);
-@@ -100,7 +109,24 @@
- 
-     @Override
-     protected IBlockData updateShape(IBlockData iblockdata, IWorldReader iworldreader, ScheduledTickAccess scheduledtickaccess, BlockPosition blockposition, EnumDirection enumdirection, BlockPosition blockposition1, IBlockData iblockdata1, RandomSource randomsource) {
--        return this.canSurvive(iblockdata, iworldreader, blockposition) ? this.getStateWithAge(iworldreader, blockposition, (Integer) iblockdata.getValue(BlockFire.AGE)) : Blocks.AIR.defaultBlockState();
-+        // CraftBukkit start
-+        if (!this.canSurvive(iblockdata, iworldreader, blockposition)) {
-+            // Suppress during worldgen
-+            if (!(iworldreader instanceof World world)) {
-+                return Blocks.AIR.defaultBlockState();
-+            }
-+            CraftBlockState blockState = CraftBlockStates.getBlockState(world, blockposition);
-+            blockState.setData(Blocks.AIR.defaultBlockState());
-+
-+            BlockFadeEvent event = new BlockFadeEvent(blockState.getBlock(), blockState);
-+            world.getCraftServer().getPluginManager().callEvent(event);
-+
-+            if (!event.isCancelled()) {
-+                return blockState.getHandle();
-+            }
-+        }
-+        return this.getStateWithAge(iworldreader, blockposition, (Integer) iblockdata.getValue(BlockFire.AGE));
-+        // CraftBukkit end
-     }
- 
-     @Override
-@@ -149,7 +175,7 @@
-         worldserver.scheduleTick(blockposition, (Block) this, getFireTickDelay(worldserver.random));
-         if (worldserver.getGameRules().getBoolean(GameRules.RULE_DOFIRETICK)) {
-             if (!iblockdata.canSurvive(worldserver, blockposition)) {
--                worldserver.removeBlock(blockposition, false);
-+                fireExtinguished(worldserver, blockposition); // CraftBukkit - invalid place location
-             }
- 
-             IBlockData iblockdata1 = worldserver.getBlockState(blockposition.below());
-@@ -157,7 +183,7 @@
-             int i = (Integer) iblockdata.getValue(BlockFire.AGE);
- 
-             if (!flag && worldserver.isRaining() && this.isNearRain(worldserver, blockposition) && randomsource.nextFloat() < 0.2F + (float) i * 0.03F) {
--                worldserver.removeBlock(blockposition, false);
-+                fireExtinguished(worldserver, blockposition); // CraftBukkit - extinguished by rain
-             } else {
-                 int j = Math.min(15, i + randomsource.nextInt(3) / 2);
- 
-@@ -171,14 +197,14 @@
-                         BlockPosition blockposition1 = blockposition.below();
- 
-                         if (!worldserver.getBlockState(blockposition1).isFaceSturdy(worldserver, blockposition1, EnumDirection.UP) || i > 3) {
--                            worldserver.removeBlock(blockposition, false);
-+                            fireExtinguished(worldserver, blockposition); // CraftBukkit
-                         }
- 
-                         return;
-                     }
- 
-                     if (i == 15 && randomsource.nextInt(4) == 0 && !this.canBurn(worldserver.getBlockState(blockposition.below()))) {
--                        worldserver.removeBlock(blockposition, false);
-+                        fireExtinguished(worldserver, blockposition); // CraftBukkit
-                         return;
-                     }
-                 }
-@@ -186,12 +212,14 @@
-                 boolean flag1 = worldserver.getBiome(blockposition).is(BiomeTags.INCREASED_FIRE_BURNOUT);
-                 int k = flag1 ? -50 : 0;
- 
--                this.checkBurnOut(worldserver, blockposition.east(), 300 + k, randomsource, i);
--                this.checkBurnOut(worldserver, blockposition.west(), 300 + k, randomsource, i);
--                this.checkBurnOut(worldserver, blockposition.below(), 250 + k, randomsource, i);
--                this.checkBurnOut(worldserver, blockposition.above(), 250 + k, randomsource, i);
--                this.checkBurnOut(worldserver, blockposition.north(), 300 + k, randomsource, i);
--                this.checkBurnOut(worldserver, blockposition.south(), 300 + k, randomsource, i);
-+                // CraftBukkit start - add source blockposition to burn calls
-+                this.trySpread(worldserver, blockposition.east(), 300 + k, randomsource, i, blockposition);
-+                this.trySpread(worldserver, blockposition.west(), 300 + k, randomsource, i, blockposition);
-+                this.trySpread(worldserver, blockposition.below(), 250 + k, randomsource, i, blockposition);
-+                this.trySpread(worldserver, blockposition.above(), 250 + k, randomsource, i, blockposition);
-+                this.trySpread(worldserver, blockposition.north(), 300 + k, randomsource, i, blockposition);
-+                this.trySpread(worldserver, blockposition.south(), 300 + k, randomsource, i, blockposition);
-+                // CraftBukkit end
-                 BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition();
- 
-                 for (int l = -1; l <= 1; ++l) {
-@@ -217,7 +245,15 @@
-                                     if (i2 > 0 && randomsource.nextInt(k1) <= i2 && (!worldserver.isRaining() || !this.isNearRain(worldserver, blockposition_mutableblockposition))) {
-                                         int j2 = Math.min(15, i + randomsource.nextInt(5) / 4);
- 
--                                        worldserver.setBlock(blockposition_mutableblockposition, this.getStateWithAge(worldserver, blockposition_mutableblockposition, j2), 3);
-+                                        // CraftBukkit start - Call to stop spread of fire
-+                                        if (worldserver.getBlockState(blockposition_mutableblockposition).getBlock() != Blocks.FIRE) {
-+                                            if (CraftEventFactory.callBlockIgniteEvent(worldserver, blockposition_mutableblockposition, blockposition).isCancelled()) {
-+                                                continue;
-+                                            }
-+
-+                                            CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition_mutableblockposition, this.getStateWithAge(worldserver, blockposition_mutableblockposition, j2), 3); // CraftBukkit
-+                                        }
-+                                        // CraftBukkit end
-                                     }
-                                 }
-                             }
-@@ -241,12 +277,28 @@
-         return iblockdata.hasProperty(BlockProperties.WATERLOGGED) && (Boolean) iblockdata.getValue(BlockProperties.WATERLOGGED) ? 0 : this.igniteOdds.getInt(iblockdata.getBlock());
-     }
- 
--    private void checkBurnOut(World world, BlockPosition blockposition, int i, RandomSource randomsource, int j) {
-+    private void trySpread(World world, BlockPosition blockposition, int i, RandomSource randomsource, int j, BlockPosition sourceposition) { // CraftBukkit add sourceposition
-         int k = this.getBurnOdds(world.getBlockState(blockposition));
- 
-         if (randomsource.nextInt(i) < k) {
-             IBlockData iblockdata = world.getBlockState(blockposition);
- 
-+            // CraftBukkit start
-+            org.bukkit.block.Block theBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
-+            org.bukkit.block.Block sourceBlock = world.getWorld().getBlockAt(sourceposition.getX(), sourceposition.getY(), sourceposition.getZ());
-+
-+            BlockBurnEvent event = new BlockBurnEvent(theBlock, sourceBlock);
-+            world.getCraftServer().getPluginManager().callEvent(event);
-+
-+            if (event.isCancelled()) {
-+                return;
-+            }
-+
-+            if (iblockdata.getBlock() instanceof BlockTNT && !CraftEventFactory.callTNTPrimeEvent(world, blockposition, org.bukkit.event.block.TNTPrimeEvent.PrimeCause.FIRE, null, sourceposition)) {
-+                return;
-+            }
-+            // CraftBukkit end
-+
-             if (randomsource.nextInt(j + 10) < 5 && !world.isRainingAt(blockposition)) {
-                 int l = Math.min(j + randomsource.nextInt(5) / 4, 15);
- 
-@@ -310,8 +362,10 @@
-     }
- 
-     @Override
--    protected void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag) {
--        super.onPlace(iblockdata, world, blockposition, iblockdata1, flag);
-+    // CraftBukkit start - context
-+    protected void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag, ItemActionContext context) {
-+        super.onPlace(iblockdata, world, blockposition, iblockdata1, flag, context);
-+        // CraftBukkit end
-         world.scheduleTick(blockposition, (Block) this, getFireTickDelay(world.random));
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockFireAbstract.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockFireAbstract.patch
deleted file mode 100644
index 639176c455..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockFireAbstract.patch
+++ /dev/null
@@ -1,73 +0,0 @@
---- a/net/minecraft/world/level/block/BlockFireAbstract.java
-+++ b/net/minecraft/world/level/block/BlockFireAbstract.java
-@@ -20,6 +20,10 @@
- import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- 
-+// CraftBukkit start
-+import net.minecraft.world.item.context.ItemActionContext;
-+// CraftBukkit end
-+
- public abstract class BlockFireAbstract extends Block {
- 
-     private static final int SECONDS_ON_FIRE = 8;
-@@ -137,7 +141,14 @@
-             }
- 
-             if (entity.getRemainingFireTicks() >= 0) {
--                entity.igniteForSeconds(8.0F);
-+                // CraftBukkit start
-+                org.bukkit.event.entity.EntityCombustEvent event = new org.bukkit.event.entity.EntityCombustByBlockEvent(org.bukkit.craftbukkit.block.CraftBlock.at(world, blockposition), entity.getBukkitEntity(), 8.0F);
-+                world.getCraftServer().getPluginManager().callEvent(event);
-+
-+                if (!event.isCancelled()) {
-+                    entity.igniteForSeconds(event.getDuration(), false);
-+                }
-+                // CraftBukkit end
-             }
-         }
- 
-@@ -146,26 +157,26 @@
-     }
- 
-     @Override
--    protected void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag) {
-+    protected void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag, ItemActionContext context) { // CraftBukkit - context
-         if (!iblockdata1.is(iblockdata.getBlock())) {
-             if (inPortalDimension(world)) {
-                 Optional<BlockPortalShape> optional = BlockPortalShape.findEmptyPortalShape(world, blockposition, EnumDirection.EnumAxis.X);
- 
-                 if (optional.isPresent()) {
--                    ((BlockPortalShape) optional.get()).createPortalBlocks(world);
-+                    ((BlockPortalShape) optional.get()).createPortalBlocks(world, (context == null) ? null : context.getPlayer()); // CraftBukkit - player
-                     return;
-                 }
-             }
- 
-             if (!iblockdata.canSurvive(world, blockposition)) {
--                world.removeBlock(blockposition, false);
-+                fireExtinguished(world, blockposition); // CraftBukkit - fuel block broke
-             }
- 
-         }
-     }
- 
-     private static boolean inPortalDimension(World world) {
--        return world.dimension() == World.OVERWORLD || world.dimension() == World.NETHER;
-+        return world.getTypeKey() == net.minecraft.world.level.dimension.WorldDimension.OVERWORLD || world.getTypeKey() == net.minecraft.world.level.dimension.WorldDimension.NETHER; // CraftBukkit - getTypeKey()
-     }
- 
-     @Override
-@@ -213,4 +224,12 @@
-             }
-         }
-     }
-+
-+    // CraftBukkit start
-+    protected void fireExtinguished(net.minecraft.world.level.GeneratorAccess world, BlockPosition position) {
-+        if (!org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, position, Blocks.AIR.defaultBlockState()).isCancelled()) {
-+            world.removeBlock(position, false);
-+        }
-+    }
-+    // CraftBukkit end
- }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockFluids.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockFluids.patch
deleted file mode 100644
index db927b8cf7..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockFluids.patch
+++ /dev/null
@@ -1,36 +0,0 @@
---- a/net/minecraft/world/level/block/BlockFluids.java
-+++ b/net/minecraft/world/level/block/BlockFluids.java
-@@ -42,7 +42,7 @@
- public class BlockFluids extends Block implements IFluidSource {
- 
-     private static final Codec<FluidTypeFlowing> FLOWING_FLUID = BuiltInRegistries.FLUID.byNameCodec().comapFlatMap((fluidtype) -> {
--        DataResult dataresult;
-+        DataResult<FluidTypeFlowing> dataresult; // CraftBukkit - decompile error
- 
-         if (fluidtype instanceof FluidTypeFlowing fluidtypeflowing) {
-             dataresult = DataResult.success(fluidtypeflowing);
-@@ -175,14 +175,20 @@
-                 if (world.getFluidState(blockposition1).is(TagsFluid.WATER)) {
-                     Block block = world.getFluidState(blockposition).isSource() ? Blocks.OBSIDIAN : Blocks.COBBLESTONE;
- 
--                    world.setBlockAndUpdate(blockposition, block.defaultBlockState());
--                    this.fizz(world, blockposition);
-+                    // CraftBukkit start
-+                    if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition, block.defaultBlockState())) {
-+                        this.fizz(world, blockposition);
-+                    }
-+                    // CraftBukkit end
-                     return false;
-                 }
- 
-                 if (flag && world.getBlockState(blockposition1).is(Blocks.BLUE_ICE)) {
--                    world.setBlockAndUpdate(blockposition, Blocks.BASALT.defaultBlockState());
--                    this.fizz(world, blockposition);
-+                    // CraftBukkit start
-+                    if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, blockposition, Blocks.BASALT.defaultBlockState())) {
-+                        this.fizz(world, blockposition);
-+                    }
-+                    // CraftBukkit end
-                     return false;
-                 }
-             }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockFungi.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockFungi.patch
deleted file mode 100644
index 3f128a977a..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockFungi.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/net/minecraft/world/level/block/BlockFungi.java
-+++ b/net/minecraft/world/level/block/BlockFungi.java
-@@ -74,6 +74,13 @@
-     @Override
-     public void performBonemeal(WorldServer worldserver, RandomSource randomsource, BlockPosition blockposition, IBlockData iblockdata) {
-         this.getFeature(worldserver).ifPresent((holder) -> {
-+            // CraftBukkit start
-+            if (this == Blocks.WARPED_FUNGUS) {
-+                BlockSapling.treeType = org.bukkit.TreeType.WARPED_FUNGUS;
-+            } else if (this == Blocks.CRIMSON_FUNGUS) {
-+                BlockSapling.treeType = org.bukkit.TreeType.CRIMSON_FUNGUS;
-+            }
-+            // CraftBukkit end
-             ((WorldGenFeatureConfigured) holder.value()).place(worldserver, worldserver.getChunkSource().getGenerator(), randomsource, blockposition);
-         });
-     }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockGrassPath.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockGrassPath.patch
deleted file mode 100644
index b6d410b955..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockGrassPath.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/net/minecraft/world/level/block/BlockGrassPath.java
-+++ b/net/minecraft/world/level/block/BlockGrassPath.java
-@@ -51,6 +51,11 @@
- 
-     @Override
-     protected void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, RandomSource randomsource) {
-+        // CraftBukkit start - do not fade if the block is valid here
-+        if (iblockdata.canSurvive(worldserver, blockposition)) {
-+            return;
-+        }
-+        // CraftBukkit end
-         BlockSoil.turnToDirt((Entity) null, iblockdata, worldserver, blockposition);
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockGrowingTop.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockGrowingTop.patch
deleted file mode 100644
index 6421b07264..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockGrowingTop.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/level/block/BlockGrowingTop.java
-+++ b/net/minecraft/world/level/block/BlockGrowingTop.java
-@@ -48,7 +48,7 @@
-             BlockPosition blockposition1 = blockposition.relative(this.growthDirection);
- 
-             if (this.canGrowInto(worldserver.getBlockState(blockposition1))) {
--                worldserver.setBlockAndUpdate(blockposition1, this.getGrowIntoState(iblockdata, worldserver.random));
-+                org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition1, this.getGrowIntoState(iblockdata, worldserver.random)); // CraftBukkit
-             }
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockIce.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockIce.patch
deleted file mode 100644
index 4c22d943b1..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockIce.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/net/minecraft/world/level/block/BlockIce.java
-+++ b/net/minecraft/world/level/block/BlockIce.java
-@@ -60,6 +60,11 @@
-     }
- 
-     protected void melt(IBlockData iblockdata, World world, BlockPosition blockposition) {
-+        // CraftBukkit start
-+        if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, blockposition, world.dimensionType().ultraWarm() ? Blocks.AIR.defaultBlockState() : Blocks.WATER.defaultBlockState()).isCancelled()) {
-+            return;
-+        }
-+        // CraftBukkit end
-         if (world.dimensionType().ultraWarm()) {
-             world.removeBlock(blockposition, false);
-         } else {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockLeaves.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockLeaves.patch
deleted file mode 100644
index 31ae1d4895..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockLeaves.patch
+++ /dev/null
@@ -1,26 +0,0 @@
---- a/net/minecraft/world/level/block/BlockLeaves.java
-+++ b/net/minecraft/world/level/block/BlockLeaves.java
-@@ -27,6 +27,8 @@
- import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapes;
- 
-+import org.bukkit.event.block.LeavesDecayEvent; // CraftBukkit
-+
- public class BlockLeaves extends Block implements IBlockWaterlogged {
- 
-     public static final MapCodec<BlockLeaves> CODEC = simpleCodec(BlockLeaves::new);
-@@ -59,6 +61,14 @@
-     @Override
-     protected void randomTick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, RandomSource randomsource) {
-         if (this.decaying(iblockdata)) {
-+            // CraftBukkit start
-+            LeavesDecayEvent event = new LeavesDecayEvent(worldserver.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
-+            worldserver.getCraftServer().getPluginManager().callEvent(event);
-+
-+            if (event.isCancelled() || worldserver.getBlockState(blockposition).getBlock() != this) {
-+                return;
-+            }
-+            // CraftBukkit end
-             dropResources(iblockdata, worldserver, blockposition);
-             worldserver.removeBlock(blockposition, false);
-         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockLectern.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockLectern.patch
deleted file mode 100644
index 0ca61f9a60..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockLectern.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/net/minecraft/world/level/block/BlockLectern.java
-+++ b/net/minecraft/world/level/block/BlockLectern.java
-@@ -206,11 +206,12 @@
-     }
- 
-     private void popBook(IBlockData iblockdata, World world, BlockPosition blockposition) {
--        TileEntity tileentity = world.getBlockEntity(blockposition);
-+        TileEntity tileentity = world.getBlockEntity(blockposition, false); // CraftBukkit - don't validate, type may be changed already
- 
-         if (tileentity instanceof TileEntityLectern tileentitylectern) {
-             EnumDirection enumdirection = (EnumDirection) iblockdata.getValue(BlockLectern.FACING);
-             ItemStack itemstack = tileentitylectern.getBook().copy();
-+            if (itemstack.isEmpty()) return; // CraftBukkit - SPIGOT-5500
-             float f = 0.25F * (float) enumdirection.getStepX();
-             float f1 = 0.25F * (float) enumdirection.getStepZ();
-             EntityItem entityitem = new EntityItem(world, (double) blockposition.getX() + 0.5D + (double) f, (double) (blockposition.getY() + 1), (double) blockposition.getZ() + 0.5D + (double) f1, itemstack);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockLever.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockLever.patch
deleted file mode 100644
index 32219f9395..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockLever.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- a/net/minecraft/world/level/block/BlockLever.java
-+++ b/net/minecraft/world/level/block/BlockLever.java
-@@ -32,6 +32,8 @@
- import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- 
-+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
-+
- public class BlockLever extends BlockAttachable {
- 
-     public static final MapCodec<BlockLever> CODEC = simpleCodec(BlockLever::new);
-@@ -102,6 +104,20 @@
-                 makeParticle(iblockdata1, world, blockposition, 1.0F);
-             }
-         } else {
-+            // CraftBukkit start - Interact Lever
-+            boolean powered = iblockdata.getValue(BlockLever.POWERED); // Old powered state
-+            org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
-+            int old = (powered) ? 15 : 0;
-+            int current = (!powered) ? 15 : 0;
-+
-+            BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, old, current);
-+            world.getCraftServer().getPluginManager().callEvent(eventRedstone);
-+
-+            if ((eventRedstone.getNewCurrent() > 0) != (!powered)) {
-+                return EnumInteractionResult.SUCCESS;
-+            }
-+            // CraftBukkit end
-+
-             this.pull(iblockdata, world, blockposition, (EntityHuman) null);
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockMagma.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockMagma.patch
deleted file mode 100644
index 8c863e49d3..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockMagma.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/level/block/BlockMagma.java
-+++ b/net/minecraft/world/level/block/BlockMagma.java
-@@ -30,7 +30,7 @@
-     @Override
-     public void stepOn(World world, BlockPosition blockposition, IBlockData iblockdata, Entity entity) {
-         if (!entity.isSteppingCarefully() && entity instanceof EntityLiving) {
--            entity.hurt(world.damageSources().hotFloor(), 1.0F);
-+            entity.hurt(world.damageSources().hotFloor().directBlock(world, blockposition), 1.0F); // CraftBukkit
-         }
- 
-         super.stepOn(world, blockposition, iblockdata, entity);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockMobSpawner.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockMobSpawner.patch
deleted file mode 100644
index 99b013b051..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockMobSpawner.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- a/net/minecraft/world/level/block/BlockMobSpawner.java
-+++ b/net/minecraft/world/level/block/BlockMobSpawner.java
-@@ -45,12 +45,20 @@
-     @Override
-     protected void spawnAfterBreak(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack, boolean flag) {
-         super.spawnAfterBreak(iblockdata, worldserver, blockposition, itemstack, flag);
-+        // CraftBukkit start - Delegate to getExpDrop
-+    }
-+
-+    @Override
-+    public int getExpDrop(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack, boolean flag) {
-         if (flag) {
-             int i = 15 + worldserver.random.nextInt(15) + worldserver.random.nextInt(15);
- 
--            this.popExperience(worldserver, blockposition, i);
-+            // this.popExperience(worldserver, blockposition, i);
-+            return i;
-         }
- 
-+        return 0;
-+        // CraftBukkit end
-     }
- 
-     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockMonsterEggs.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockMonsterEggs.patch
deleted file mode 100644
index 894857deda..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockMonsterEggs.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/net/minecraft/world/level/block/BlockMonsterEggs.java
-+++ b/net/minecraft/world/level/block/BlockMonsterEggs.java
-@@ -20,6 +20,8 @@
- import net.minecraft.world.level.block.state.IBlockData;
- import net.minecraft.world.level.block.state.properties.IBlockState;
- 
-+import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; // CraftBukkit
-+
- public class BlockMonsterEggs extends Block {
- 
-     public static final MapCodec<BlockMonsterEggs> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
-@@ -54,7 +56,7 @@
- 
-         if (entitysilverfish != null) {
-             entitysilverfish.moveTo((double) blockposition.getX() + 0.5D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.5D, 0.0F, 0.0F);
--            worldserver.addFreshEntity(entitysilverfish);
-+            worldserver.addFreshEntity(entitysilverfish, SpawnReason.SILVERFISH_BLOCK); // CraftBukkit - add SpawnReason
-             entitysilverfish.spawnAnim();
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockMushroom.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockMushroom.patch
deleted file mode 100644
index fc6d233386..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockMushroom.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/net/minecraft/world/level/block/BlockMushroom.java
-+++ b/net/minecraft/world/level/block/BlockMushroom.java
-@@ -20,6 +20,10 @@
- import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- 
-+// CraftBukkit start
-+import org.bukkit.TreeType;
-+// CraftBukkit end
-+
- public class BlockMushroom extends BlockPlant implements IBlockFragilePlantElement {
- 
-     public static final MapCodec<BlockMushroom> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
-@@ -75,7 +79,7 @@
-             }
- 
-             if (worldserver.isEmptyBlock(blockposition2) && iblockdata.canSurvive(worldserver, blockposition2)) {
--                worldserver.setBlock(blockposition2, iblockdata, 2);
-+                org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition2, iblockdata, 2); // CraftBukkit
-             }
-         }
- 
-@@ -101,6 +105,7 @@
-             return false;
-         } else {
-             worldserver.removeBlock(blockposition, false);
-+            BlockSapling.treeType = (this == Blocks.BROWN_MUSHROOM) ? TreeType.BROWN_MUSHROOM : TreeType.RED_MUSHROOM; // CraftBukkit
-             if (((WorldGenFeatureConfigured) ((Holder) optional.get()).value()).place(worldserver, worldserver.getChunkSource().getGenerator(), randomsource, blockposition)) {
-                 return true;
-             } else {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockNetherWart.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockNetherWart.patch
deleted file mode 100644
index 3e9f116ef7..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockNetherWart.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/level/block/BlockNetherWart.java
-+++ b/net/minecraft/world/level/block/BlockNetherWart.java
-@@ -54,7 +54,7 @@
- 
-         if (i < 3 && randomsource.nextInt(10) == 0) {
-             iblockdata = (IBlockData) iblockdata.setValue(BlockNetherWart.AGE, i + 1);
--            worldserver.setBlock(blockposition, iblockdata, 2);
-+            org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, iblockdata, 2); // CraftBukkit
-         }
- 
-     }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockNote.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockNote.patch
deleted file mode 100644
index 74c8339fc9..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockNote.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/net/minecraft/world/level/block/BlockNote.java
-+++ b/net/minecraft/world/level/block/BlockNote.java
-@@ -85,6 +85,7 @@
-         if (flag1 != (Boolean) iblockdata.getValue(BlockNote.POWERED)) {
-             if (flag1) {
-                 this.playNote((Entity) null, iblockdata, world, blockposition);
-+                iblockdata = world.getBlockState(blockposition); // CraftBukkit - SPIGOT-5617: update in case changed in event
-             }
- 
-             world.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockNote.POWERED, flag1), 3);
-@@ -94,6 +95,12 @@
- 
-     private void playNote(@Nullable Entity entity, IBlockData iblockdata, World world, BlockPosition blockposition) {
-         if (((BlockPropertyInstrument) iblockdata.getValue(BlockNote.INSTRUMENT)).worksAboveNoteBlock() || world.getBlockState(blockposition.above()).isAir()) {
-+            // CraftBukkit start
-+            org.bukkit.event.block.NotePlayEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callNotePlayEvent(world, blockposition, iblockdata.getValue(BlockNote.INSTRUMENT), iblockdata.getValue(BlockNote.NOTE));
-+            if (event.isCancelled()) {
-+                return;
-+            }
-+            // CraftBukkit end
-             world.blockEvent(blockposition, this, 0, 0);
-             world.gameEvent(entity, (Holder) GameEvent.NOTE_BLOCK_PLAY, blockposition);
-         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockNylium.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockNylium.patch
deleted file mode 100644
index 244c15ed39..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockNylium.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/net/minecraft/world/level/block/BlockNylium.java
-+++ b/net/minecraft/world/level/block/BlockNylium.java
-@@ -41,6 +41,11 @@
-     @Override
-     protected void randomTick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, RandomSource randomsource) {
-         if (!canBeNylium(iblockdata, worldserver, blockposition)) {
-+            // CraftBukkit start
-+            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, Blocks.NETHERRACK.defaultBlockState()).isCancelled()) {
-+                return;
-+            }
-+            // CraftBukkit end
-             worldserver.setBlockAndUpdate(blockposition, Blocks.NETHERRACK.defaultBlockState());
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockObserver.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockObserver.patch
deleted file mode 100644
index b76c2f04f0..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockObserver.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/net/minecraft/world/level/block/BlockObserver.java
-+++ b/net/minecraft/world/level/block/BlockObserver.java
-@@ -18,6 +18,8 @@
- import net.minecraft.world.level.redstone.ExperimentalRedstoneUtils;
- import net.minecraft.world.level.redstone.Orientation;
- 
-+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
-+
- public class BlockObserver extends BlockDirectional {
- 
-     public static final MapCodec<BlockObserver> CODEC = simpleCodec(BlockObserver::new);
-@@ -51,8 +53,18 @@
-     @Override
-     protected void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, RandomSource randomsource) {
-         if ((Boolean) iblockdata.getValue(BlockObserver.POWERED)) {
-+            // CraftBukkit start
-+            if (CraftEventFactory.callRedstoneChange(worldserver, blockposition, 15, 0).getNewCurrent() != 0) {
-+                return;
-+            }
-+            // CraftBukkit end
-             worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockObserver.POWERED, false), 2);
-         } else {
-+            // CraftBukkit start
-+            if (CraftEventFactory.callRedstoneChange(worldserver, blockposition, 0, 15).getNewCurrent() != 15) {
-+                return;
-+            }
-+            // CraftBukkit end
-             worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockObserver.POWERED, true), 2);
-             worldserver.scheduleTick(blockposition, (Block) this, 2);
-         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockPlant.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockPlant.patch
deleted file mode 100644
index 274403a394..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockPlant.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/net/minecraft/world/level/block/BlockPlant.java
-+++ b/net/minecraft/world/level/block/BlockPlant.java
-@@ -12,6 +12,10 @@
- import net.minecraft.world.level.block.state.IBlockData;
- import net.minecraft.world.level.pathfinder.PathMode;
- 
-+// CraftBukkit start
-+import net.minecraft.world.level.World;
-+// CraftBukkit end
-+
- public abstract class BlockPlant extends Block {
- 
-     protected BlockPlant(BlockBase.Info blockbase_info) {
-@@ -27,7 +31,15 @@
- 
-     @Override
-     protected IBlockData updateShape(IBlockData iblockdata, IWorldReader iworldreader, ScheduledTickAccess scheduledtickaccess, BlockPosition blockposition, EnumDirection enumdirection, BlockPosition blockposition1, IBlockData iblockdata1, RandomSource randomsource) {
--        return !iblockdata.canSurvive(iworldreader, blockposition) ? Blocks.AIR.defaultBlockState() : super.updateShape(iblockdata, iworldreader, scheduledtickaccess, blockposition, enumdirection, blockposition1, iblockdata1, randomsource);
-+        // CraftBukkit start
-+        if (!iblockdata.canSurvive(iworldreader, blockposition)) {
-+            // Suppress during worldgen
-+            if (!(iworldreader instanceof World world) || !org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(world, blockposition).isCancelled()) {
-+                return Blocks.AIR.defaultBlockState();
-+            }
-+        }
-+        return super.updateShape(iblockdata, iworldreader, scheduledtickaccess, blockposition, enumdirection, blockposition1, iblockdata1, randomsource);
-+        // CraftBukkit end
-     }
- 
-     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockPortal.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockPortal.patch
deleted file mode 100644
index 70f5f61d95..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockPortal.patch
+++ /dev/null
@@ -1,115 +0,0 @@
---- a/net/minecraft/world/level/block/BlockPortal.java
-+++ b/net/minecraft/world/level/block/BlockPortal.java
-@@ -39,6 +39,15 @@
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import net.minecraft.world.level.dimension.WorldDimension;
-+import org.bukkit.craftbukkit.CraftWorld;
-+import org.bukkit.craftbukkit.event.CraftPortalEvent;
-+import org.bukkit.craftbukkit.util.CraftLocation;
-+import org.bukkit.event.entity.EntityPortalEnterEvent;
-+import org.bukkit.event.player.PlayerTeleportEvent;
-+// CraftBukkit end
-+
- public class BlockPortal extends Block implements Portal {
- 
-     public static final MapCodec<BlockPortal> CODEC = simpleCodec(BlockPortal::new);
-@@ -77,7 +86,8 @@
-             }
- 
-             if (worldserver.getBlockState(blockposition).isValidSpawn(worldserver, blockposition, EntityTypes.ZOMBIFIED_PIGLIN)) {
--                Entity entity = EntityTypes.ZOMBIFIED_PIGLIN.spawn(worldserver, blockposition.above(), EntitySpawnReason.STRUCTURE);
-+                // CraftBukkit - set spawn reason to NETHER_PORTAL
-+                Entity entity = EntityTypes.ZOMBIFIED_PIGLIN.spawn(worldserver, blockposition.above(), EntitySpawnReason.STRUCTURE, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NETHER_PORTAL);
- 
-                 if (entity != null) {
-                     entity.setPortalCooldown();
-@@ -104,6 +114,10 @@
-     @Override
-     protected void entityInside(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
-         if (entity.canUsePortal(false)) {
-+            // CraftBukkit start - Entity in portal
-+            EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), blockposition.getX(), blockposition.getY(), blockposition.getZ()));
-+            world.getCraftServer().getPluginManager().callEvent(event);
-+            // CraftBukkit end
-             entity.setAsInsidePortal(this, blockposition);
-         }
- 
-@@ -121,24 +135,34 @@
-     @Nullable
-     @Override
-     public TeleportTransition getPortalDestination(WorldServer worldserver, Entity entity, BlockPosition blockposition) {
--        ResourceKey<World> resourcekey = worldserver.dimension() == World.NETHER ? World.OVERWORLD : World.NETHER;
-+        // CraftBukkit start
-+        ResourceKey<World> resourcekey = worldserver.getTypeKey() == WorldDimension.NETHER ? World.OVERWORLD : World.NETHER;
-         WorldServer worldserver1 = worldserver.getServer().getLevel(resourcekey);
- 
-         if (worldserver1 == null) {
--            return null;
-+            return new TeleportTransition(PlayerTeleportEvent.TeleportCause.NETHER_PORTAL); // always fire event in case plugins wish to change it
-         } else {
--            boolean flag = worldserver1.dimension() == World.NETHER;
-+            boolean flag = worldserver1.getTypeKey() == WorldDimension.NETHER;
-+            // CraftBukkit end
-             WorldBorder worldborder = worldserver1.getWorldBorder();
-             double d0 = DimensionManager.getTeleportationScale(worldserver.dimensionType(), worldserver1.dimensionType());
-             BlockPosition blockposition1 = worldborder.clampToBounds(entity.getX() * d0, entity.getY(), entity.getZ() * d0);
-+            // CraftBukkit start
-+            CraftPortalEvent event = entity.callPortalEvent(entity, CraftLocation.toBukkit(blockposition1, worldserver1.getWorld()), PlayerTeleportEvent.TeleportCause.NETHER_PORTAL, flag ? 16 : 128, 16);
-+            if (event == null) {
-+                return null;
-+            }
-+            worldserver1 = ((CraftWorld) event.getTo().getWorld()).getHandle();
-+            worldborder = worldserver1.getWorldBorder();
-+            blockposition1 = worldborder.clampToBounds(event.getTo().getX(), event.getTo().getY(), event.getTo().getZ());
- 
--            return this.getExitPortal(worldserver1, entity, blockposition, blockposition1, flag, worldborder);
-+            return this.getExitPortal(worldserver1, entity, blockposition, blockposition1, flag, worldborder, event.getSearchRadius(), event.getCanCreatePortal(), event.getCreationRadius());
-         }
-     }
- 
-     @Nullable
--    private TeleportTransition getExitPortal(WorldServer worldserver, Entity entity, BlockPosition blockposition, BlockPosition blockposition1, boolean flag, WorldBorder worldborder) {
--        Optional<BlockPosition> optional = worldserver.getPortalForcer().findClosestPortalPosition(blockposition1, flag, worldborder);
-+    private TeleportTransition getExitPortal(WorldServer worldserver, Entity entity, BlockPosition blockposition, BlockPosition blockposition1, boolean flag, WorldBorder worldborder, int searchRadius, boolean canCreatePortal, int createRadius) {
-+        Optional<BlockPosition> optional = worldserver.getPortalForcer().findClosestPortalPosition(blockposition1, worldborder, searchRadius);
-         BlockUtil.Rectangle blockutil_rectangle;
-         TeleportTransition.a teleporttransition_a;
- 
-@@ -152,17 +176,22 @@
-             teleporttransition_a = TeleportTransition.PLAY_PORTAL_SOUND.then((entity1) -> {
-                 entity1.placePortalTicket(blockposition2);
-             });
--        } else {
-+        } else if (canCreatePortal) {
-             EnumDirection.EnumAxis enumdirection_enumaxis = (EnumDirection.EnumAxis) entity.level().getBlockState(blockposition).getOptionalValue(BlockPortal.AXIS).orElse(EnumDirection.EnumAxis.X);
--            Optional<BlockUtil.Rectangle> optional1 = worldserver.getPortalForcer().createPortal(blockposition1, enumdirection_enumaxis);
-+            Optional<BlockUtil.Rectangle> optional1 = worldserver.getPortalForcer().createPortal(blockposition1, enumdirection_enumaxis, entity, createRadius);
-+            // CraftBukkit end
- 
-             if (optional1.isEmpty()) {
--                BlockPortal.LOGGER.error("Unable to create a portal, likely target out of worldborder");
-+                // BlockPortal.LOGGER.error("Unable to create a portal, likely target out of worldborder"); // CraftBukkit
-                 return null;
-             }
- 
-             blockutil_rectangle = (BlockUtil.Rectangle) optional1.get();
-             teleporttransition_a = TeleportTransition.PLAY_PORTAL_SOUND.then(TeleportTransition.PLACE_PORTAL_TICKET);
-+            // CraftBukkit start
-+        } else {
-+            return null;
-+            // CraftBukkit end
-         }
- 
-         return getDimensionTransitionFromExit(entity, blockposition, blockutil_rectangle, worldserver, teleporttransition_a);
-@@ -203,7 +232,7 @@
-         Vec3D vec3d1 = new Vec3D((double) blockposition.getX() + (flag ? d2 : d4), (double) blockposition.getY() + d3, (double) blockposition.getZ() + (flag ? d4 : d2));
-         Vec3D vec3d2 = BlockPortalShape.findCollisionFreePosition(vec3d1, worldserver, entity, entitysize);
- 
--        return new TeleportTransition(worldserver, vec3d2, Vec3D.ZERO, (float) i, 0.0F, Relative.union(Relative.DELTA, Relative.ROTATION), teleporttransition_a);
-+        return new TeleportTransition(worldserver, vec3d2, Vec3D.ZERO, (float) i, 0.0F, Relative.union(Relative.DELTA, Relative.ROTATION), teleporttransition_a, PlayerTeleportEvent.TeleportCause.NETHER_PORTAL); // CraftBukkit
-     }
- 
-     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockPoweredRail.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockPoweredRail.patch
deleted file mode 100644
index 2870194ef8..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockPoweredRail.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- a/net/minecraft/world/level/block/BlockPoweredRail.java
-+++ b/net/minecraft/world/level/block/BlockPoweredRail.java
-@@ -12,6 +12,8 @@
- import net.minecraft.world.level.block.state.properties.BlockStateEnum;
- import net.minecraft.world.level.block.state.properties.IBlockState;
- 
-+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
-+
- public class BlockPoweredRail extends BlockMinecartTrackAbstract {
- 
-     public static final MapCodec<BlockPoweredRail> CODEC = simpleCodec(BlockPoweredRail::new);
-@@ -120,6 +122,13 @@
-         boolean flag1 = world.hasNeighborSignal(blockposition) || this.findPoweredRailSignal(world, blockposition, iblockdata, true, 0) || this.findPoweredRailSignal(world, blockposition, iblockdata, false, 0);
- 
-         if (flag1 != flag) {
-+            // CraftBukkit start
-+            int power = flag ? 15 : 0;
-+            int newPower = CraftEventFactory.callRedstoneChange(world, blockposition, power, 15 - power).getNewCurrent();
-+            if (newPower == power) {
-+                return;
-+            }
-+            // CraftBukkit end
-             world.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockPoweredRail.POWERED, flag1), 3);
-             world.updateNeighborsAt(blockposition.below(), this);
-             if (((BlockPropertyTrackPosition) iblockdata.getValue(BlockPoweredRail.SHAPE)).isSlope()) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockPressurePlateAbstract.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockPressurePlateAbstract.patch
deleted file mode 100644
index e429e95a7d..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockPressurePlateAbstract.patch
+++ /dev/null
@@ -1,48 +0,0 @@
---- a/net/minecraft/world/level/block/BlockPressurePlateAbstract.java
-+++ b/net/minecraft/world/level/block/BlockPressurePlateAbstract.java
-@@ -23,6 +23,8 @@
- import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- 
-+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
-+
- public abstract class BlockPressurePlateAbstract extends Block {
- 
-     protected static final VoxelShape PRESSED_AABB = Block.box(1.0D, 0.0D, 1.0D, 15.0D, 0.5D, 15.0D);
-@@ -91,6 +93,19 @@
-         boolean flag = i > 0;
-         boolean flag1 = j > 0;
- 
-+        // CraftBukkit start - Interact Pressure Plate
-+        org.bukkit.World bworld = world.getWorld();
-+        org.bukkit.plugin.PluginManager manager = world.getCraftServer().getPluginManager();
-+
-+        if (flag != flag1) {
-+            BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(bworld.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), i, j);
-+            manager.callEvent(eventRedstone);
-+
-+            flag1 = eventRedstone.getNewCurrent() > 0;
-+            j = eventRedstone.getNewCurrent();
-+        }
-+        // CraftBukkit end
-+
-         if (i != j) {
-             IBlockData iblockdata1 = this.setSignalForState(iblockdata, j);
- 
-@@ -145,9 +160,15 @@
-     }
- 
-     protected static int getEntityCount(World world, AxisAlignedBB axisalignedbb, Class<? extends Entity> oclass) {
-+        // CraftBukkit start
-+        return getEntities(world, axisalignedbb, oclass).size();
-+    }
-+
-+    protected static <T extends Entity> java.util.List<T> getEntities(World world, AxisAlignedBB axisalignedbb, Class<T> oclass) {
-+        // CraftBukkit end
-         return world.getEntitiesOfClass(oclass, axisalignedbb, IEntitySelector.NO_SPECTATORS.and((entity) -> {
-             return !entity.isIgnoringBlockTriggers();
--        })).size();
-+        })); // CraftBukkit
-     }
- 
-     protected abstract int getSignalStrength(World world, BlockPosition blockposition);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockPressurePlateWeighted.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockPressurePlateWeighted.patch
deleted file mode 100644
index 39a40e09dd..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockPressurePlateWeighted.patch
+++ /dev/null
@@ -1,43 +0,0 @@
---- a/net/minecraft/world/level/block/BlockPressurePlateWeighted.java
-+++ b/net/minecraft/world/level/block/BlockPressurePlateWeighted.java
-@@ -14,6 +14,11 @@
- import net.minecraft.world.level.block.state.properties.BlockSetType;
- import net.minecraft.world.level.block.state.properties.BlockStateInteger;
- 
-+// CraftBukkit start
-+import net.minecraft.world.entity.player.EntityHuman;
-+import org.bukkit.event.entity.EntityInteractEvent;
-+// CraftBukkit end
-+
- public class BlockPressurePlateWeighted extends BlockPressurePlateAbstract {
- 
-     public static final MapCodec<BlockPressurePlateWeighted> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
-@@ -39,7 +44,27 @@
- 
-     @Override
-     protected int getSignalStrength(World world, BlockPosition blockposition) {
--        int i = Math.min(getEntityCount(world, BlockPressurePlateWeighted.TOUCH_AABB.move(blockposition), Entity.class), this.maxWeight);
-+        // CraftBukkit start
-+        // int i = Math.min(getEntityCount(world, BlockPressurePlateWeighted.TOUCH_AABB.move(blockposition), Entity.class), this.maxWeight);
-+        int i = 0;
-+        for (Entity entity : getEntities(world, BlockPressurePlateWeighted.TOUCH_AABB.move(blockposition), Entity.class)) {
-+            org.bukkit.event.Cancellable cancellable;
-+
-+            if (entity instanceof EntityHuman) {
-+                cancellable = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent((EntityHuman) entity, org.bukkit.event.block.Action.PHYSICAL, blockposition, null, null, null);
-+            } else {
-+                cancellable = new EntityInteractEvent(entity.getBukkitEntity(), world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
-+                world.getCraftServer().getPluginManager().callEvent((EntityInteractEvent) cancellable);
-+            }
-+
-+            // We only want to block turning the plate on if all events are cancelled
-+            if (!cancellable.isCancelled()) {
-+                i++;
-+            }
-+        }
-+
-+        i = Math.min(i, this.maxWeight);
-+        // CraftBukkit end
- 
-         if (i > 0) {
-             float f = (float) Math.min(this.maxWeight, i) / (float) this.maxWeight;
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockPumpkinCarved.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockPumpkinCarved.patch
deleted file mode 100644
index c7033e7a12..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockPumpkinCarved.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/net/minecraft/world/level/block/BlockPumpkinCarved.java
-+++ b/net/minecraft/world/level/block/BlockPumpkinCarved.java
-@@ -25,6 +25,10 @@
- import net.minecraft.world.level.block.state.predicate.BlockStatePredicate;
- import net.minecraft.world.level.block.state.properties.BlockStateEnum;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
-+// CraftBukkit end
-+
- public class BlockPumpkinCarved extends BlockFacingHorizontal {
- 
-     public static final MapCodec<BlockPumpkinCarved> CODEC = simpleCodec(BlockPumpkinCarved::new);
-@@ -87,9 +91,14 @@
-     }
- 
-     private static void spawnGolemInWorld(World world, ShapeDetector.ShapeDetectorCollection shapedetector_shapedetectorcollection, Entity entity, BlockPosition blockposition) {
--        clearPatternBlocks(world, shapedetector_shapedetectorcollection);
-+        // clearPatternBlocks(world, shapedetector_shapedetectorcollection); // CraftBukkit - moved down
-         entity.moveTo((double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.05D, (double) blockposition.getZ() + 0.5D, 0.0F, 0.0F);
--        world.addFreshEntity(entity);
-+        // CraftBukkit start
-+        if (!world.addFreshEntity(entity, (entity.getType() == EntityTypes.SNOW_GOLEM) ? SpawnReason.BUILD_SNOWMAN : SpawnReason.BUILD_IRONGOLEM)) {
-+            return;
-+        }
-+        clearPatternBlocks(world, shapedetector_shapedetectorcollection); // CraftBukkit - from above
-+        // CraftBukkit end
-         Iterator iterator = world.getEntitiesOfClass(EntityPlayer.class, entity.getBoundingBox().inflate(5.0D)).iterator();
- 
-         while (iterator.hasNext()) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockRedstoneComparator.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockRedstoneComparator.patch
deleted file mode 100644
index dc9826b6d0..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockRedstoneComparator.patch
+++ /dev/null
@@ -1,40 +0,0 @@
---- a/net/minecraft/world/level/block/BlockRedstoneComparator.java
-+++ b/net/minecraft/world/level/block/BlockRedstoneComparator.java
-@@ -28,6 +28,8 @@
- import net.minecraft.world.phys.MovingObjectPositionBlock;
- import net.minecraft.world.ticks.TickListPriority;
- 
-+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
-+
- public class BlockRedstoneComparator extends BlockDiodeAbstract implements ITileEntity {
- 
-     public static final MapCodec<BlockRedstoneComparator> CODEC = simpleCodec(BlockRedstoneComparator::new);
-@@ -110,7 +112,8 @@
- 
-     @Nullable
-     private EntityItemFrame getItemFrame(World world, EnumDirection enumdirection, BlockPosition blockposition) {
--        List<EntityItemFrame> list = world.getEntitiesOfClass(EntityItemFrame.class, new AxisAlignedBB((double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), (double) (blockposition.getX() + 1), (double) (blockposition.getY() + 1), (double) (blockposition.getZ() + 1)), (entityitemframe) -> {
-+        // CraftBukkit - decompile error
-+        List<EntityItemFrame> list = world.getEntitiesOfClass(EntityItemFrame.class, new AxisAlignedBB((double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), (double) (blockposition.getX() + 1), (double) (blockposition.getY() + 1), (double) (blockposition.getZ() + 1)), (java.util.function.Predicate<EntityItemFrame>) (entityitemframe) -> {
-             return entityitemframe != null && entityitemframe.getDirection() == enumdirection;
-         });
- 
-@@ -163,8 +166,18 @@
-             boolean flag1 = (Boolean) iblockdata.getValue(BlockRedstoneComparator.POWERED);
- 
-             if (flag1 && !flag) {
-+                // CraftBukkit start
-+                if (CraftEventFactory.callRedstoneChange(world, blockposition, 15, 0).getNewCurrent() != 0) {
-+                    return;
-+                }
-+                // CraftBukkit end
-                 world.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockRedstoneComparator.POWERED, false), 2);
-             } else if (!flag1 && flag) {
-+                // CraftBukkit start
-+                if (CraftEventFactory.callRedstoneChange(world, blockposition, 0, 15).getNewCurrent() != 15) {
-+                    return;
-+                }
-+                // CraftBukkit end
-                 world.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockRedstoneComparator.POWERED, true), 2);
-             }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockRedstoneLamp.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockRedstoneLamp.patch
deleted file mode 100644
index c90e00522d..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockRedstoneLamp.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- a/net/minecraft/world/level/block/BlockRedstoneLamp.java
-+++ b/net/minecraft/world/level/block/BlockRedstoneLamp.java
-@@ -13,6 +13,8 @@
- import net.minecraft.world.level.block.state.properties.BlockStateBoolean;
- import net.minecraft.world.level.redstone.Orientation;
- 
-+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
-+
- public class BlockRedstoneLamp extends Block {
- 
-     public static final MapCodec<BlockRedstoneLamp> CODEC = simpleCodec(BlockRedstoneLamp::new);
-@@ -43,6 +45,11 @@
-                 if (flag1) {
-                     world.scheduleTick(blockposition, (Block) this, 4);
-                 } else {
-+                    // CraftBukkit start
-+                    if (CraftEventFactory.callRedstoneChange(world, blockposition, 0, 15).getNewCurrent() != 15) {
-+                        return;
-+                    }
-+                    // CraftBukkit end
-                     world.setBlock(blockposition, (IBlockData) iblockdata.cycle(BlockRedstoneLamp.LIT), 2);
-                 }
-             }
-@@ -53,6 +60,11 @@
-     @Override
-     protected void tick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, RandomSource randomsource) {
-         if ((Boolean) iblockdata.getValue(BlockRedstoneLamp.LIT) && !worldserver.hasNeighborSignal(blockposition)) {
-+            // CraftBukkit start
-+            if (CraftEventFactory.callRedstoneChange(worldserver, blockposition, 15, 0).getNewCurrent() != 0) {
-+                return;
-+            }
-+            // CraftBukkit end
-             worldserver.setBlock(blockposition, (IBlockData) iblockdata.cycle(BlockRedstoneLamp.LIT), 2);
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockRedstoneOre.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockRedstoneOre.patch
deleted file mode 100644
index 1bd1a91b4f..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockRedstoneOre.patch
+++ /dev/null
@@ -1,98 +0,0 @@
---- a/net/minecraft/world/level/block/BlockRedstoneOre.java
-+++ b/net/minecraft/world/level/block/BlockRedstoneOre.java
-@@ -21,6 +21,11 @@
- import net.minecraft.world.level.block.state.properties.BlockStateBoolean;
- import net.minecraft.world.phys.MovingObjectPositionBlock;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.event.entity.EntityInteractEvent;
-+// CraftBukkit end
-+
- public class BlockRedstoneOre extends Block {
- 
-     public static final MapCodec<BlockRedstoneOre> CODEC = simpleCodec(BlockRedstoneOre::new);
-@@ -38,14 +43,27 @@
- 
-     @Override
-     protected void attack(IBlockData iblockdata, World world, BlockPosition blockposition, EntityHuman entityhuman) {
--        interact(iblockdata, world, blockposition);
-+        interact(iblockdata, world, blockposition, entityhuman); // CraftBukkit - add entityhuman
-         super.attack(iblockdata, world, blockposition, entityhuman);
-     }
- 
-     @Override
-     public void stepOn(World world, BlockPosition blockposition, IBlockData iblockdata, Entity entity) {
-         if (!entity.isSteppingCarefully()) {
--            interact(iblockdata, world, blockposition);
-+            // CraftBukkit start
-+            if (entity instanceof EntityHuman) {
-+                org.bukkit.event.player.PlayerInteractEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent((EntityHuman) entity, org.bukkit.event.block.Action.PHYSICAL, blockposition, null, null, null);
-+                if (!event.isCancelled()) {
-+                    interact(world.getBlockState(blockposition), world, blockposition, entity); // add entity
-+                }
-+            } else {
-+                EntityInteractEvent event = new EntityInteractEvent(entity.getBukkitEntity(), world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
-+                world.getCraftServer().getPluginManager().callEvent(event);
-+                if (!event.isCancelled()) {
-+                    interact(world.getBlockState(blockposition), world, blockposition, entity); // add entity
-+                }
-+            }
-+            // CraftBukkit end
-         }
- 
-         super.stepOn(world, blockposition, iblockdata, entity);
-@@ -56,15 +74,20 @@
-         if (world.isClientSide) {
-             spawnParticles(world, blockposition);
-         } else {
--            interact(iblockdata, world, blockposition);
-+            interact(iblockdata, world, blockposition, entityhuman); // CraftBukkit - add entityhuman
-         }
- 
-         return (EnumInteractionResult) (itemstack.getItem() instanceof ItemBlock && (new BlockActionContext(entityhuman, enumhand, itemstack, movingobjectpositionblock)).canPlace() ? EnumInteractionResult.PASS : EnumInteractionResult.SUCCESS);
-     }
- 
--    private static void interact(IBlockData iblockdata, World world, BlockPosition blockposition) {
-+    private static void interact(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) { // CraftBukkit - add Entity
-         spawnParticles(world, blockposition);
-         if (!(Boolean) iblockdata.getValue(BlockRedstoneOre.LIT)) {
-+            // CraftBukkit start
-+            if (!CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, iblockdata.setValue(BlockRedstoneOre.LIT, true))) {
-+                return;
-+            }
-+            // CraftBukkit end
-             world.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockRedstoneOre.LIT, true), 3);
-         }
- 
-@@ -78,6 +101,11 @@
-     @Override
-     protected void randomTick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, RandomSource randomsource) {
-         if ((Boolean) iblockdata.getValue(BlockRedstoneOre.LIT)) {
-+            // CraftBukkit start
-+            if (CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, iblockdata.setValue(BlockRedstoneOre.LIT, false)).isCancelled()) {
-+                return;
-+            }
-+            // CraftBukkit end
-             worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockRedstoneOre.LIT, false), 3);
-         }
- 
-@@ -86,10 +114,17 @@
-     @Override
-     protected void spawnAfterBreak(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack, boolean flag) {
-         super.spawnAfterBreak(iblockdata, worldserver, blockposition, itemstack, flag);
-+        // CraftBukkit start - Delegated to getExpDrop
-+    }
-+
-+    @Override
-+    public int getExpDrop(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack, boolean flag) {
-         if (flag) {
--            this.tryDropExperience(worldserver, blockposition, itemstack, UniformInt.of(1, 5));
-+            return this.tryDropExperience(worldserver, blockposition, itemstack, UniformInt.of(1, 5));
-         }
- 
-+        return 0;
-+        // CraftBukkit end
-     }
- 
-     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockRedstoneTorch.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockRedstoneTorch.patch
deleted file mode 100644
index 8d82d10337..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockRedstoneTorch.patch
+++ /dev/null
@@ -1,52 +0,0 @@
---- a/net/minecraft/world/level/block/BlockRedstoneTorch.java
-+++ b/net/minecraft/world/level/block/BlockRedstoneTorch.java
-@@ -22,6 +22,8 @@
- import net.minecraft.world.level.redstone.ExperimentalRedstoneUtils;
- import net.minecraft.world.level.redstone.Orientation;
- 
-+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
-+
- public class BlockRedstoneTorch extends BaseTorchBlock {
- 
-     public static final MapCodec<BlockRedstoneTorch> CODEC = simpleCodec(BlockRedstoneTorch::new);
-@@ -85,8 +87,24 @@
-             list.remove(0);
-         }
- 
-+        // CraftBukkit start
-+        org.bukkit.plugin.PluginManager manager = worldserver.getCraftServer().getPluginManager();
-+        org.bukkit.block.Block block = worldserver.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
-+        int oldCurrent = ((Boolean) iblockdata.getValue(BlockRedstoneTorch.LIT)).booleanValue() ? 15 : 0;
-+
-+        BlockRedstoneEvent event = new BlockRedstoneEvent(block, oldCurrent, oldCurrent);
-+        // CraftBukkit end
-         if ((Boolean) iblockdata.getValue(BlockRedstoneTorch.LIT)) {
-             if (flag) {
-+                // CraftBukkit start
-+                if (oldCurrent != 0) {
-+                    event.setNewCurrent(0);
-+                    manager.callEvent(event);
-+                    if (event.getNewCurrent() != 0) {
-+                        return;
-+                    }
-+                }
-+                // CraftBukkit end
-                 worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockRedstoneTorch.LIT, false), 3);
-                 if (isToggledTooFrequently(worldserver, blockposition, true)) {
-                     worldserver.levelEvent(1502, blockposition, 0);
-@@ -94,6 +112,15 @@
-                 }
-             }
-         } else if (!flag && !isToggledTooFrequently(worldserver, blockposition, false)) {
-+            // CraftBukkit start
-+            if (oldCurrent != 15) {
-+                event.setNewCurrent(15);
-+                manager.callEvent(event);
-+                if (event.getNewCurrent() != 15) {
-+                    return;
-+                }
-+            }
-+            // CraftBukkit end
-             worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockRedstoneTorch.LIT, true), 3);
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockReed.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockReed.patch
deleted file mode 100644
index 332579a6d1..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockReed.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/level/block/BlockReed.java
-+++ b/net/minecraft/world/level/block/BlockReed.java
-@@ -63,7 +63,7 @@
-                 int j = (Integer) iblockdata.getValue(BlockReed.AGE);
- 
-                 if (j == 15) {
--                    worldserver.setBlockAndUpdate(blockposition.above(), this.defaultBlockState());
-+                    org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition.above(), this.defaultBlockState()); // CraftBukkit
-                     worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockReed.AGE, 0), 4);
-                 } else {
-                     worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockReed.AGE, j + 1), 4);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockRespawnAnchor.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockRespawnAnchor.patch
deleted file mode 100644
index 3dc1bbb4f1..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockRespawnAnchor.patch
+++ /dev/null
@@ -1,39 +0,0 @@
---- a/net/minecraft/world/level/block/BlockRespawnAnchor.java
-+++ b/net/minecraft/world/level/block/BlockRespawnAnchor.java
-@@ -88,7 +88,7 @@
-                 EntityPlayer entityplayer = (EntityPlayer) entityhuman;
- 
-                 if (entityplayer.getRespawnDimension() != world.dimension() || !blockposition.equals(entityplayer.getRespawnPosition())) {
--                    entityplayer.setRespawnPosition(world.dimension(), blockposition, 0.0F, false, true);
-+                    entityplayer.setRespawnPosition(world.dimension(), blockposition, 0.0F, false, true, org.bukkit.event.player.PlayerSpawnChangeEvent.Cause.RESPAWN_ANCHOR); // CraftBukkit
-                     world.playSound((EntityHuman) null, (double) blockposition.getX() + 0.5D, (double) blockposition.getY() + 0.5D, (double) blockposition.getZ() + 0.5D, SoundEffects.RESPAWN_ANCHOR_SET_SPAWN, SoundCategory.BLOCKS, 1.0F, 1.0F);
-                     return EnumInteractionResult.SUCCESS_SERVER;
-                 }
-@@ -127,15 +127,16 @@
-     }
- 
-     private void explode(IBlockData iblockdata, World world, final BlockPosition blockposition) {
-+        org.bukkit.block.BlockState blockState = org.bukkit.craftbukkit.block.CraftBlock.at(world, blockposition).getState(); // CraftBukkit - capture BlockState before remove block
-         world.removeBlock(blockposition, false);
--        Stream stream = EnumDirection.EnumDirectionLimit.HORIZONTAL.stream();
-+        Stream<EnumDirection> stream = EnumDirection.EnumDirectionLimit.HORIZONTAL.stream(); // CraftBukkit - decompile error
- 
-         Objects.requireNonNull(blockposition);
-         boolean flag = stream.map(blockposition::relative).anyMatch((blockposition1) -> {
-             return isWaterThatWouldFlow(blockposition1, world);
-         });
-         final boolean flag1 = flag || world.getFluidState(blockposition.above()).is(TagsFluid.WATER);
--        ExplosionDamageCalculator explosiondamagecalculator = new ExplosionDamageCalculator(this) {
-+        ExplosionDamageCalculator explosiondamagecalculator = new ExplosionDamageCalculator() { // CraftBukkit - decompile error
-             @Override
-             public Optional<Float> getBlockExplosionResistance(Explosion explosion, IBlockAccess iblockaccess, BlockPosition blockposition1, IBlockData iblockdata1, Fluid fluid) {
-                 return blockposition1.equals(blockposition) && flag1 ? Optional.of(Blocks.WATER.getExplosionResistance()) : super.getBlockExplosionResistance(explosion, iblockaccess, blockposition1, iblockdata1, fluid);
-@@ -143,7 +144,7 @@
-         };
-         Vec3D vec3d = blockposition.getCenter();
- 
--        world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d), explosiondamagecalculator, vec3d, 5.0F, true, World.a.BLOCK);
-+        world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d, blockState), explosiondamagecalculator, vec3d, 5.0F, true, World.a.BLOCK); // CraftBukkit - add state
-     }
- 
-     public static boolean canSetSpawn(World world) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockSapling.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockSapling.patch
deleted file mode 100644
index c31af8eb78..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockSapling.patch
+++ /dev/null
@@ -1,60 +0,0 @@
---- a/net/minecraft/world/level/block/BlockSapling.java
-+++ b/net/minecraft/world/level/block/BlockSapling.java
-@@ -17,6 +17,15 @@
- import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- 
-+// CraftBukkit start
-+import org.bukkit.Location;
-+import org.bukkit.TreeType;
-+import org.bukkit.block.BlockState;
-+import org.bukkit.craftbukkit.block.CapturedBlockState;
-+import org.bukkit.craftbukkit.util.CraftLocation;
-+import org.bukkit.event.world.StructureGrowEvent;
-+// CraftBukkit end
-+
- public class BlockSapling extends BlockPlant implements IBlockFragilePlantElement {
- 
-     public static final MapCodec<BlockSapling> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
-@@ -28,6 +37,7 @@
-     protected static final float AABB_OFFSET = 6.0F;
-     protected static final VoxelShape SHAPE = Block.box(2.0D, 0.0D, 2.0D, 14.0D, 12.0D, 14.0D);
-     protected final WorldGenTreeProvider treeGrower;
-+    public static TreeType treeType; // CraftBukkit
- 
-     @Override
-     public MapCodec<? extends BlockSapling> codec() {
-@@ -57,7 +67,32 @@
-         if ((Integer) iblockdata.getValue(BlockSapling.STAGE) == 0) {
-             worldserver.setBlock(blockposition, (IBlockData) iblockdata.cycle(BlockSapling.STAGE), 4);
-         } else {
--            this.treeGrower.growTree(worldserver, worldserver.getChunkSource().getGenerator(), blockposition, iblockdata, randomsource);
-+            // CraftBukkit start
-+            if (worldserver.captureTreeGeneration) {
-+                this.treeGrower.growTree(worldserver, worldserver.getChunkSource().getGenerator(), blockposition, iblockdata, randomsource);
-+            } else {
-+                worldserver.captureTreeGeneration = true;
-+                this.treeGrower.growTree(worldserver, worldserver.getChunkSource().getGenerator(), blockposition, iblockdata, randomsource);
-+                worldserver.captureTreeGeneration = false;
-+                if (worldserver.capturedBlockStates.size() > 0) {
-+                    TreeType treeType = BlockSapling.treeType;
-+                    BlockSapling.treeType = null;
-+                    Location location = CraftLocation.toBukkit(blockposition, worldserver.getWorld());
-+                    java.util.List<BlockState> blocks = new java.util.ArrayList<>(worldserver.capturedBlockStates.values());
-+                    worldserver.capturedBlockStates.clear();
-+                    StructureGrowEvent event = null;
-+                    if (treeType != null) {
-+                        event = new StructureGrowEvent(location, treeType, false, null, blocks);
-+                        org.bukkit.Bukkit.getPluginManager().callEvent(event);
-+                    }
-+                    if (event == null || !event.isCancelled()) {
-+                        for (BlockState blockstate : blocks) {
-+                            CapturedBlockState.setBlockState(blockstate);
-+                        }
-+                    }
-+                }
-+            }
-+            // CraftBukkit end
-         }
- 
-     }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockScaffolding.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockScaffolding.patch
deleted file mode 100644
index d151507de8..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockScaffolding.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/level/block/BlockScaffolding.java
-+++ b/net/minecraft/world/level/block/BlockScaffolding.java
-@@ -103,7 +103,7 @@
-         int i = getDistance(worldserver, blockposition);
-         IBlockData iblockdata1 = (IBlockData) ((IBlockData) iblockdata.setValue(BlockScaffolding.DISTANCE, i)).setValue(BlockScaffolding.BOTTOM, this.isBottom(worldserver, blockposition, i));
- 
--        if ((Integer) iblockdata1.getValue(BlockScaffolding.DISTANCE) == 7) {
-+        if ((Integer) iblockdata1.getValue(BlockScaffolding.DISTANCE) == 7 && !org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, Blocks.AIR.defaultBlockState()).isCancelled()) { // CraftBukkit - BlockFadeEvent
-             if ((Integer) iblockdata.getValue(BlockScaffolding.DISTANCE) == 7) {
-                 EntityFallingBlock.fall(worldserver, blockposition, iblockdata1);
-             } else {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockSign.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockSign.patch
deleted file mode 100644
index 677b87be0b..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockSign.patch
+++ /dev/null
@@ -1,35 +0,0 @@
---- a/net/minecraft/world/level/block/BlockSign.java
-+++ b/net/minecraft/world/level/block/BlockSign.java
-@@ -140,7 +140,7 @@
-             } else if (flag1) {
-                 return EnumInteractionResult.SUCCESS_SERVER;
-             } else if (!this.otherPlayerIsEditingSign(entityhuman, tileentitysign) && entityhuman.mayBuild() && this.hasEditableText(entityhuman, tileentitysign, flag)) {
--                this.openTextEdit(entityhuman, tileentitysign, flag);
-+                this.openTextEdit(entityhuman, tileentitysign, flag, org.bukkit.event.player.PlayerSignOpenEvent.Cause.INTERACT); // CraftBukkit
-                 return EnumInteractionResult.SUCCESS_SERVER;
-             } else {
-                 return EnumInteractionResult.PASS;
-@@ -186,6 +186,15 @@
-     }
- 
-     public void openTextEdit(EntityHuman entityhuman, TileEntitySign tileentitysign, boolean flag) {
-+        // Craftbukkit start
-+        openTextEdit(entityhuman, tileentitysign, flag, org.bukkit.event.player.PlayerSignOpenEvent.Cause.UNKNOWN);
-+    }
-+
-+    public void openTextEdit(EntityHuman entityhuman, TileEntitySign tileentitysign, boolean flag, org.bukkit.event.player.PlayerSignOpenEvent.Cause cause) {
-+        if (!org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerSignOpenEvent(entityhuman, tileentitysign, flag, cause)) {
-+            return;
-+        }
-+        // Craftbukkit end
-         tileentitysign.setAllowedPlayerEditor(entityhuman.getUUID());
-         entityhuman.openTextEdit(tileentitysign, flag);
-     }
-@@ -199,6 +208,6 @@
-     @Nullable
-     @Override
-     public <T extends TileEntity> BlockEntityTicker<T> getTicker(World world, IBlockData iblockdata, TileEntityTypes<T> tileentitytypes) {
--        return createTickerHelper(tileentitytypes, TileEntityTypes.SIGN, TileEntitySign::tick);
-+        return null; // Craftbukkit - remove unnecessary sign ticking
-     }
- }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockSnow.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockSnow.patch
deleted file mode 100644
index 17758fccc1..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockSnow.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/net/minecraft/world/level/block/BlockSnow.java
-+++ b/net/minecraft/world/level/block/BlockSnow.java
-@@ -99,6 +99,11 @@
-     @Override
-     protected void randomTick(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, RandomSource randomsource) {
-         if (worldserver.getBrightness(EnumSkyBlock.BLOCK, blockposition) > 11) {
-+            // CraftBukkit start
-+            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, Blocks.AIR.defaultBlockState()).isCancelled()) {
-+                return;
-+            }
-+            // CraftBukkit end
-             dropResources(iblockdata, worldserver, blockposition);
-             worldserver.removeBlock(blockposition, false);
-         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockSoil.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockSoil.patch
deleted file mode 100644
index 4f6c91e2d8..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockSoil.patch
+++ /dev/null
@@ -1,69 +0,0 @@
---- a/net/minecraft/world/level/block/BlockSoil.java
-+++ b/net/minecraft/world/level/block/BlockSoil.java
-@@ -30,6 +30,11 @@
- import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.EntityInteractEvent;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+// CraftBukkit end
-+
- public class BlockSoil extends Block {
- 
-     public static final MapCodec<BlockSoil> CODEC = simpleCodec(BlockSoil::new);
-@@ -92,28 +97,51 @@
- 
-         if (!isNearWater(worldserver, blockposition) && !worldserver.isRainingAt(blockposition.above())) {
-             if (i > 0) {
--                worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockSoil.MOISTURE, i - 1), 2);
-+                org.bukkit.craftbukkit.event.CraftEventFactory.handleMoistureChangeEvent(worldserver, blockposition, (IBlockData) iblockdata.setValue(BlockSoil.MOISTURE, i - 1), 2); // CraftBukkit
-             } else if (!shouldMaintainFarmland(worldserver, blockposition)) {
-                 turnToDirt((Entity) null, iblockdata, worldserver, blockposition);
-             }
-         } else if (i < 7) {
--            worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockSoil.MOISTURE, 7), 2);
-+            org.bukkit.craftbukkit.event.CraftEventFactory.handleMoistureChangeEvent(worldserver, blockposition, (IBlockData) iblockdata.setValue(BlockSoil.MOISTURE, 7), 2); // CraftBukkit
-         }
- 
-     }
- 
-     @Override
-     public void fallOn(World world, IBlockData iblockdata, BlockPosition blockposition, Entity entity, float f) {
-+        super.fallOn(world, iblockdata, blockposition, entity, f); // CraftBukkit - moved here as game rules / events shouldn't affect fall damage.
-         if (world instanceof WorldServer worldserver) {
-             if (world.random.nextFloat() < f - 0.5F && entity instanceof EntityLiving && (entity instanceof EntityHuman || worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) && entity.getBbWidth() * entity.getBbWidth() * entity.getBbHeight() > 0.512F) {
-+                // CraftBukkit start - Interact soil
-+                org.bukkit.event.Cancellable cancellable;
-+                if (entity instanceof EntityHuman) {
-+                    cancellable = CraftEventFactory.callPlayerInteractEvent((EntityHuman) entity, org.bukkit.event.block.Action.PHYSICAL, blockposition, null, null, null);
-+                } else {
-+                    cancellable = new EntityInteractEvent(entity.getBukkitEntity(), world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
-+                    world.getCraftServer().getPluginManager().callEvent((EntityInteractEvent) cancellable);
-+                }
-+
-+                if (cancellable.isCancelled()) {
-+                    return;
-+                }
-+
-+                if (!CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.DIRT.defaultBlockState())) {
-+                    return;
-+                }
-+                // CraftBukkit end
-                 turnToDirt(entity, iblockdata, world, blockposition);
-             }
-         }
- 
--        super.fallOn(world, iblockdata, blockposition, entity, f);
-+        // super.fallOn(world, iblockdata, blockposition, entity, f); // CraftBukkit - moved up
-     }
- 
-     public static void turnToDirt(@Nullable Entity entity, IBlockData iblockdata, World world, BlockPosition blockposition) {
-+        // CraftBukkit start
-+        if (CraftEventFactory.callBlockFadeEvent(world, blockposition, Blocks.DIRT.defaultBlockState()).isCancelled()) {
-+            return;
-+        }
-+        // CraftBukkit end
-         IBlockData iblockdata1 = pushEntitiesUp(iblockdata, Blocks.DIRT.defaultBlockState(), world, blockposition);
- 
-         world.setBlockAndUpdate(blockposition, iblockdata1);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockStem.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockStem.patch
deleted file mode 100644
index d1f2af0417..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockStem.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- a/net/minecraft/world/level/block/BlockStem.java
-+++ b/net/minecraft/world/level/block/BlockStem.java
-@@ -27,6 +27,8 @@
- import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- 
-+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
-+
- public class BlockStem extends BlockPlant implements IBlockFragilePlantElement {
- 
-     public static final MapCodec<BlockStem> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
-@@ -79,7 +81,7 @@
- 
-                 if (i < 7) {
-                     iblockdata = (IBlockData) iblockdata.setValue(BlockStem.AGE, i + 1);
--                    worldserver.setBlock(blockposition, iblockdata, 2);
-+                    CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, iblockdata, 2); // CraftBukkit
-                 } else {
-                     EnumDirection enumdirection = EnumDirection.EnumDirectionLimit.HORIZONTAL.getRandomDirection(randomsource);
-                     BlockPosition blockposition1 = blockposition.relative(enumdirection);
-@@ -91,7 +93,11 @@
-                         Optional<Block> optional1 = iregistry.getOptional(this.attachedStem);
- 
-                         if (optional.isPresent() && optional1.isPresent()) {
--                            worldserver.setBlockAndUpdate(blockposition1, ((Block) optional.get()).defaultBlockState());
-+                            // CraftBukkit start
-+                            if (!CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition1, ((Block) optional.get()).defaultBlockState())) {
-+                                return;
-+                            }
-+                            // CraftBukkit end
-                             worldserver.setBlockAndUpdate(blockposition, (IBlockData) ((Block) optional1.get()).defaultBlockState().setValue(BlockFacingHorizontal.FACING, enumdirection));
-                         }
-                     }
-@@ -121,7 +127,7 @@
-         int i = Math.min(7, (Integer) iblockdata.getValue(BlockStem.AGE) + MathHelper.nextInt(worldserver.random, 2, 5));
-         IBlockData iblockdata1 = (IBlockData) iblockdata.setValue(BlockStem.AGE, i);
- 
--        worldserver.setBlock(blockposition, iblockdata1, 2);
-+        CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, iblockdata1, 2); // CraftBukkit
-         if (i == 7) {
-             iblockdata1.randomTick(worldserver, blockposition, worldserver.random);
-         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockSweetBerryBush.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockSweetBerryBush.patch
deleted file mode 100644
index a2a2f3145f..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockSweetBerryBush.patch
+++ /dev/null
@@ -1,51 +0,0 @@
---- a/net/minecraft/world/level/block/BlockSweetBerryBush.java
-+++ b/net/minecraft/world/level/block/BlockSweetBerryBush.java
-@@ -29,6 +29,13 @@
- import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- 
-+// CraftBukkit start
-+import java.util.Collections;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.craftbukkit.inventory.CraftItemStack;
-+import org.bukkit.event.player.PlayerHarvestBlockEvent;
-+// CraftBukkit end
-+
- public class BlockSweetBerryBush extends BlockPlant implements IBlockFragilePlantElement {
- 
-     public static final MapCodec<BlockSweetBerryBush> CODEC = simpleCodec(BlockSweetBerryBush::new);
-@@ -70,7 +77,7 @@
-         if (i < 3 && randomsource.nextInt(5) == 0 && worldserver.getRawBrightness(blockposition.above(), 0) >= 9) {
-             IBlockData iblockdata1 = (IBlockData) iblockdata.setValue(BlockSweetBerryBush.AGE, i + 1);
- 
--            worldserver.setBlock(blockposition, iblockdata1, 2);
-+            if (!CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, iblockdata1, 2)) return; // CraftBukkit
-             worldserver.gameEvent((Holder) GameEvent.BLOCK_CHANGE, blockposition, GameEvent.a.of(iblockdata1));
-         }
- 
-@@ -91,7 +98,7 @@
-                         double d1 = Math.abs(vec3d.z());
- 
-                         if (d0 >= 0.003000000026077032D || d1 >= 0.003000000026077032D) {
--                            entity.hurtServer(worldserver, world.damageSources().sweetBerryBush(), 1.0F);
-+                            entity.hurtServer(worldserver, world.damageSources().sweetBerryBush().directBlock(world, blockposition), 1.0F); // CraftBukkit
-                         }
-                     }
- 
-@@ -118,7 +125,15 @@
-         if (i > 1) {
-             int j = 1 + world.random.nextInt(2);
- 
--            popResource(world, blockposition, new ItemStack(Items.SWEET_BERRIES, j + (flag ? 1 : 0)));
-+            // CraftBukkit start - useWithoutItem is always MAIN_HAND
-+            PlayerHarvestBlockEvent event = CraftEventFactory.callPlayerHarvestBlockEvent(world, blockposition, entityhuman, EnumHand.MAIN_HAND, Collections.singletonList(new ItemStack(Items.SWEET_BERRIES, j + (flag ? 1 : 0))));
-+            if (event.isCancelled()) {
-+                return EnumInteractionResult.SUCCESS; // We need to return a success either way, because making it PASS or FAIL will result in a bug where cancelling while harvesting w/ block in hand places block
-+            }
-+            for (org.bukkit.inventory.ItemStack itemStack : event.getItemsHarvested()) {
-+                popResource(world, blockposition, CraftItemStack.asNMSCopy(itemStack));
-+            }
-+            // CraftBukkit end
-             world.playSound((EntityHuman) null, blockposition, SoundEffects.SWEET_BERRY_BUSH_PICK_BERRIES, SoundCategory.BLOCKS, 1.0F, 0.8F + world.random.nextFloat() * 0.4F);
-             IBlockData iblockdata1 = (IBlockData) iblockdata.setValue(BlockSweetBerryBush.AGE, 1);
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockTNT.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockTNT.patch
deleted file mode 100644
index 9c74457272..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockTNT.patch
+++ /dev/null
@@ -1,65 +0,0 @@
---- a/net/minecraft/world/level/block/BlockTNT.java
-+++ b/net/minecraft/world/level/block/BlockTNT.java
-@@ -29,6 +29,11 @@
- import net.minecraft.world.level.redstone.Orientation;
- import net.minecraft.world.phys.MovingObjectPositionBlock;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.event.block.TNTPrimeEvent.PrimeCause;
-+// CraftBukkit end
-+
- public class BlockTNT extends Block {
- 
-     public static final MapCodec<BlockTNT> CODEC = simpleCodec(BlockTNT::new);
-@@ -47,7 +52,7 @@
-     @Override
-     protected void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag) {
-         if (!iblockdata1.is(iblockdata.getBlock())) {
--            if (world.hasNeighborSignal(blockposition)) {
-+            if (world.hasNeighborSignal(blockposition) && CraftEventFactory.callTNTPrimeEvent(world, blockposition, PrimeCause.REDSTONE, null, null)) { // CraftBukkit - TNTPrimeEvent
-                 explode(world, blockposition);
-                 world.removeBlock(blockposition, false);
-             }
-@@ -57,7 +62,7 @@
- 
-     @Override
-     protected void neighborChanged(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, @Nullable Orientation orientation, boolean flag) {
--        if (world.hasNeighborSignal(blockposition)) {
-+        if (world.hasNeighborSignal(blockposition) && CraftEventFactory.callTNTPrimeEvent(world, blockposition, PrimeCause.REDSTONE, null, null)) { // CraftBukkit - TNTPrimeEvent
-             explode(world, blockposition);
-             world.removeBlock(blockposition, false);
-         }
-@@ -66,7 +71,7 @@
- 
-     @Override
-     public IBlockData playerWillDestroy(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman) {
--        if (!world.isClientSide() && !entityhuman.isCreative() && (Boolean) iblockdata.getValue(BlockTNT.UNSTABLE)) {
-+        if (!world.isClientSide() && !entityhuman.isCreative() && (Boolean) iblockdata.getValue(BlockTNT.UNSTABLE) && CraftEventFactory.callTNTPrimeEvent(world, blockposition, PrimeCause.BLOCK_BREAK, entityhuman, null)) { // CraftBukkit - TNTPrimeEvent
-             explode(world, blockposition);
-         }
- 
-@@ -101,6 +106,11 @@
-         if (!itemstack.is(Items.FLINT_AND_STEEL) && !itemstack.is(Items.FIRE_CHARGE)) {
-             return super.useItemOn(itemstack, iblockdata, world, blockposition, entityhuman, enumhand, movingobjectpositionblock);
-         } else {
-+            // CraftBukkit start - TNTPrimeEvent
-+            if (!CraftEventFactory.callTNTPrimeEvent(world, blockposition, PrimeCause.PLAYER, entityhuman, null)) {
-+                return EnumInteractionResult.CONSUME;
-+            }
-+            // CraftBukkit end
-             explode(world, blockposition, entityhuman);
-             world.setBlock(blockposition, Blocks.AIR.defaultBlockState(), 11);
-             Item item = itemstack.getItem();
-@@ -123,6 +133,11 @@
-             Entity entity = iprojectile.getOwner();
- 
-             if (iprojectile.isOnFire() && iprojectile.mayInteract(worldserver, blockposition)) {
-+                // CraftBukkit start
-+                if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(iprojectile, blockposition, Blocks.AIR.defaultBlockState()) || !CraftEventFactory.callTNTPrimeEvent(world, blockposition, PrimeCause.PROJECTILE, iprojectile, null)) {
-+                    return;
-+                }
-+                // CraftBukkit end
-                 explode(world, blockposition, entity instanceof EntityLiving ? (EntityLiving) entity : null);
-                 world.removeBlock(blockposition, false);
-             }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockTallPlant.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockTallPlant.patch
deleted file mode 100644
index af55991d89..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockTallPlant.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/net/minecraft/world/level/block/BlockTallPlant.java
-+++ b/net/minecraft/world/level/block/BlockTallPlant.java
-@@ -103,6 +103,11 @@
-     }
- 
-     protected static void preventDropFromBottomPart(World world, BlockPosition blockposition, IBlockData iblockdata, EntityHuman entityhuman) {
-+        // CraftBukkit start
-+        if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(world, blockposition).isCancelled()) {
-+            return;
-+        }
-+        // CraftBukkit end
-         BlockPropertyDoubleBlockHalf blockpropertydoubleblockhalf = (BlockPropertyDoubleBlockHalf) iblockdata.getValue(BlockTallPlant.HALF);
- 
-         if (blockpropertydoubleblockhalf == BlockPropertyDoubleBlockHalf.UPPER) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockTrapdoor.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockTrapdoor.patch
deleted file mode 100644
index f9c7facd15..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockTrapdoor.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- a/net/minecraft/world/level/block/BlockTrapdoor.java
-+++ b/net/minecraft/world/level/block/BlockTrapdoor.java
-@@ -38,6 +38,8 @@
- import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- 
-+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
-+
- public class BlockTrapdoor extends BlockFacingHorizontal implements IBlockWaterlogged {
- 
-     public static final MapCodec<BlockTrapdoor> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
-@@ -143,6 +145,19 @@
-             boolean flag1 = world.hasNeighborSignal(blockposition);
- 
-             if (flag1 != (Boolean) iblockdata.getValue(BlockTrapdoor.POWERED)) {
-+                // CraftBukkit start
-+                org.bukkit.World bworld = world.getWorld();
-+                org.bukkit.block.Block bblock = bworld.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
-+
-+                int power = bblock.getBlockPower();
-+                int oldPower = (Boolean) iblockdata.getValue(OPEN) ? 15 : 0;
-+
-+                if (oldPower == 0 ^ power == 0 || block.defaultBlockState().isSignalSource()) {
-+                    BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(bblock, oldPower, power);
-+                    world.getCraftServer().getPluginManager().callEvent(eventRedstone);
-+                    flag1 = eventRedstone.getNewCurrent() > 0;
-+                }
-+                // CraftBukkit end
-                 if ((Boolean) iblockdata.getValue(BlockTrapdoor.OPEN) != flag1) {
-                     iblockdata = (IBlockData) iblockdata.setValue(BlockTrapdoor.OPEN, flag1);
-                     this.playSound((EntityHuman) null, world, blockposition, flag1);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockTripwireHook.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockTripwireHook.patch
deleted file mode 100644
index 01475895a5..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockTripwireHook.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/net/minecraft/world/level/block/BlockTripwireHook.java
-+++ b/net/minecraft/world/level/block/BlockTripwireHook.java
-@@ -32,6 +32,11 @@
- import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.block.CraftBlock;
-+import org.bukkit.event.block.BlockRedstoneEvent;
-+// CraftBukkit end
-+
- public class BlockTripwireHook extends Block {
- 
-     public static final MapCodec<BlockTripwireHook> CODEC = simpleCodec(BlockTripwireHook::new);
-@@ -176,6 +181,15 @@
-                 emitState(world, blockposition1, flag4, flag5, flag2, flag3);
-             }
- 
-+            // CraftBukkit start
-+            BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(CraftBlock.at(world, blockposition), 15, 0);
-+            world.getCraftServer().getPluginManager().callEvent(eventRedstone);
-+
-+            if (eventRedstone.getNewCurrent() > 0) {
-+                return;
-+            }
-+            // CraftBukkit end
-+
-             emitState(world, blockposition, flag4, flag5, flag2, flag3);
-             if (!flag) {
-                 world.setBlock(blockposition, (IBlockData) iblockdata3.setValue(BlockTripwireHook.FACING, enumdirection), 3);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockTurtleEgg.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockTurtleEgg.patch
deleted file mode 100644
index f9aedfa840..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockTurtleEgg.patch
+++ /dev/null
@@ -1,66 +0,0 @@
---- a/net/minecraft/world/level/block/BlockTurtleEgg.java
-+++ b/net/minecraft/world/level/block/BlockTurtleEgg.java
-@@ -32,6 +32,12 @@
- import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.EntityInteractEvent;
-+import org.bukkit.craftbukkit.block.CraftBlock;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+// CraftBukkit end
-+
- public class BlockTurtleEgg extends Block {
- 
-     public static final MapCodec<BlockTurtleEgg> CODEC = simpleCodec(BlockTurtleEgg::new);
-@@ -74,6 +80,19 @@
-     private void destroyEgg(World world, IBlockData iblockdata, BlockPosition blockposition, Entity entity, int i) {
-         if (iblockdata.is(Blocks.TURTLE_EGG) && world instanceof WorldServer worldserver) {
-             if (this.canDestroyEgg(worldserver, entity) && world.random.nextInt(i) == 0) {
-+                // CraftBukkit start - Step on eggs
-+                org.bukkit.event.Cancellable cancellable;
-+                if (entity instanceof EntityHuman) {
-+                    cancellable = CraftEventFactory.callPlayerInteractEvent((EntityHuman) entity, org.bukkit.event.block.Action.PHYSICAL, blockposition, null, null, null);
-+                } else {
-+                    cancellable = new EntityInteractEvent(entity.getBukkitEntity(), CraftBlock.at(worldserver, blockposition));
-+                    worldserver.getCraftServer().getPluginManager().callEvent((EntityInteractEvent) cancellable);
-+                }
-+
-+                if (cancellable.isCancelled()) {
-+                    return;
-+                }
-+                // CraftBukkit end
-                 this.decreaseEggs(worldserver, blockposition, iblockdata);
-             }
-         }
-@@ -100,10 +119,20 @@
-             int i = (Integer) iblockdata.getValue(BlockTurtleEgg.HATCH);
- 
-             if (i < 2) {
-+                // CraftBukkit start - Call BlockGrowEvent
-+                if (!CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, iblockdata.setValue(BlockTurtleEgg.HATCH, i + 1), 2)) {
-+                    return;
-+                }
-+                // CraftBukkit end
-                 worldserver.playSound((EntityHuman) null, blockposition, SoundEffects.TURTLE_EGG_CRACK, SoundCategory.BLOCKS, 0.7F, 0.9F + randomsource.nextFloat() * 0.2F);
--                worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockTurtleEgg.HATCH, i + 1), 2);
-+                // worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockTurtleEgg.HATCH, i + 1), 2); // CraftBukkit - handled above
-                 worldserver.gameEvent((Holder) GameEvent.BLOCK_CHANGE, blockposition, GameEvent.a.of(iblockdata));
-             } else {
-+                // CraftBukkit start - Call BlockFadeEvent
-+                if (CraftEventFactory.callBlockFadeEvent(worldserver, blockposition, Blocks.AIR.defaultBlockState()).isCancelled()) {
-+                    return;
-+                }
-+                // CraftBukkit end
-                 worldserver.playSound((EntityHuman) null, blockposition, SoundEffects.TURTLE_EGG_HATCH, SoundCategory.BLOCKS, 0.7F, 0.9F + randomsource.nextFloat() * 0.2F);
-                 worldserver.removeBlock(blockposition, false);
-                 worldserver.gameEvent((Holder) GameEvent.BLOCK_DESTROY, blockposition, GameEvent.a.of(iblockdata));
-@@ -116,7 +145,7 @@
-                         entityturtle.setAge(-24000);
-                         entityturtle.setHomePos(blockposition);
-                         entityturtle.moveTo((double) blockposition.getX() + 0.3D + (double) j * 0.2D, (double) blockposition.getY(), (double) blockposition.getZ() + 0.3D, 0.0F, 0.0F);
--                        worldserver.addFreshEntity(entityturtle);
-+                        worldserver.addFreshEntity(entityturtle, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.EGG); // CraftBukkit
-                     }
-                 }
-             }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockVine.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockVine.patch
deleted file mode 100644
index 7ebaef3b43..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockVine.patch
+++ /dev/null
@@ -1,71 +0,0 @@
---- a/net/minecraft/world/level/block/BlockVine.java
-+++ b/net/minecraft/world/level/block/BlockVine.java
-@@ -25,6 +25,8 @@
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- import net.minecraft.world.phys.shapes.VoxelShapes;
- 
-+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
-+
- public class BlockVine extends Block {
- 
-     public static final MapCodec<BlockVine> CODEC = simpleCodec(BlockVine::new);
-@@ -203,30 +205,34 @@
-                             BlockPosition blockposition3 = blockposition2.relative(enumdirection1);
-                             BlockPosition blockposition4 = blockposition2.relative(enumdirection2);
- 
-+                            // CraftBukkit start - Call BlockSpreadEvent
-+                            BlockPosition source = blockposition;
-+
-                             if (flag && isAcceptableNeighbour(worldserver, blockposition3, enumdirection1)) {
--                                worldserver.setBlock(blockposition2, (IBlockData) this.defaultBlockState().setValue(getPropertyForFace(enumdirection1), true), 2);
-+                                CraftEventFactory.handleBlockSpreadEvent(worldserver, source, blockposition2, (IBlockData) this.defaultBlockState().setValue(getPropertyForFace(enumdirection1), true), 2);
-                             } else if (flag1 && isAcceptableNeighbour(worldserver, blockposition4, enumdirection2)) {
--                                worldserver.setBlock(blockposition2, (IBlockData) this.defaultBlockState().setValue(getPropertyForFace(enumdirection2), true), 2);
-+                                CraftEventFactory.handleBlockSpreadEvent(worldserver, source, blockposition2, (IBlockData) this.defaultBlockState().setValue(getPropertyForFace(enumdirection2), true), 2);
-                             } else {
-                                 EnumDirection enumdirection3 = enumdirection.getOpposite();
- 
-                                 if (flag && worldserver.isEmptyBlock(blockposition3) && isAcceptableNeighbour(worldserver, blockposition.relative(enumdirection1), enumdirection3)) {
--                                    worldserver.setBlock(blockposition3, (IBlockData) this.defaultBlockState().setValue(getPropertyForFace(enumdirection3), true), 2);
-+                                    CraftEventFactory.handleBlockSpreadEvent(worldserver, source, blockposition3, (IBlockData) this.defaultBlockState().setValue(getPropertyForFace(enumdirection3), true), 2);
-                                 } else if (flag1 && worldserver.isEmptyBlock(blockposition4) && isAcceptableNeighbour(worldserver, blockposition.relative(enumdirection2), enumdirection3)) {
--                                    worldserver.setBlock(blockposition4, (IBlockData) this.defaultBlockState().setValue(getPropertyForFace(enumdirection3), true), 2);
-+                                    CraftEventFactory.handleBlockSpreadEvent(worldserver, source, blockposition4, (IBlockData) this.defaultBlockState().setValue(getPropertyForFace(enumdirection3), true), 2);
-                                 } else if ((double) randomsource.nextFloat() < 0.05D && isAcceptableNeighbour(worldserver, blockposition2.above(), EnumDirection.UP)) {
--                                    worldserver.setBlock(blockposition2, (IBlockData) this.defaultBlockState().setValue(BlockVine.UP, true), 2);
-+                                    CraftEventFactory.handleBlockSpreadEvent(worldserver, source, blockposition2, (IBlockData) this.defaultBlockState().setValue(BlockVine.UP, true), 2);
-                                 }
-+                                // CraftBukkit end
-                             }
-                         } else if (isAcceptableNeighbour(worldserver, blockposition2, enumdirection)) {
--                            worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(getPropertyForFace(enumdirection), true), 2);
-+                            CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, (IBlockData) iblockdata.setValue(getPropertyForFace(enumdirection), true), 2); // CraftBukkit
-                         }
- 
-                     }
-                 } else {
-                     if (enumdirection == EnumDirection.UP && blockposition.getY() < worldserver.getMaxY()) {
-                         if (this.canSupportAtFace(worldserver, blockposition, enumdirection)) {
--                            worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockVine.UP, true), 2);
-+                            CraftEventFactory.handleBlockGrowEvent(worldserver, blockposition, (IBlockData) iblockdata.setValue(BlockVine.UP, true), 2); // CraftBukkit
-                             return;
-                         }
- 
-@@ -246,7 +252,7 @@
-                             }
- 
-                             if (this.hasHorizontalConnection(iblockdata2)) {
--                                worldserver.setBlock(blockposition1, iblockdata2, 2);
-+                                CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition1, iblockdata2, 2); // CraftBukkit
-                             }
- 
-                             return;
-@@ -261,7 +267,7 @@
-                             IBlockData iblockdata4 = this.copyRandomFaces(iblockdata, iblockdata3, randomsource);
- 
-                             if (iblockdata3 != iblockdata4 && this.hasHorizontalConnection(iblockdata4)) {
--                                worldserver.setBlock(blockposition2, iblockdata4, 2);
-+                                CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition2, iblockdata4, 2); // CraftBukkit
-                             }
-                         }
-                     }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockWaterLily.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BlockWaterLily.patch
deleted file mode 100644
index 6423b8bbd9..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockWaterLily.patch
+++ /dev/null
@@ -1,25 +0,0 @@
---- a/net/minecraft/world/level/block/BlockWaterLily.java
-+++ b/net/minecraft/world/level/block/BlockWaterLily.java
-@@ -14,6 +14,10 @@
- import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+// CraftBukkit end
-+
- public class BlockWaterLily extends BlockPlant {
- 
-     public static final MapCodec<BlockWaterLily> CODEC = simpleCodec(BlockWaterLily::new);
-@@ -32,6 +36,11 @@
-     protected void entityInside(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
-         super.entityInside(iblockdata, world, blockposition, entity);
-         if (world instanceof WorldServer && entity instanceof AbstractBoat) {
-+            // CraftBukkit start
-+            if (!CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.defaultBlockState())) {
-+                return;
-+            }
-+            // CraftBukkit end
-             world.destroyBlock(new BlockPosition(blockposition), true, entity);
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BuddingAmethystBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BuddingAmethystBlock.java.patch
new file mode 100644
index 0000000000..55234c62ed
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/BuddingAmethystBlock.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/level/block/BuddingAmethystBlock.java
++++ b/net/minecraft/world/level/block/BuddingAmethystBlock.java
+@@ -45,7 +45,7 @@
+             if (block != null) {
+                 BlockState iblockdata2 = (BlockState) ((BlockState) block.defaultBlockState().setValue(AmethystClusterBlock.FACING, enumdirection)).setValue(AmethystClusterBlock.WATERLOGGED, iblockdata1.getFluidState().getType() == Fluids.WATER);
+ 
+-                world.setBlockAndUpdate(blockposition1, iblockdata2);
++                org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, pos, blockposition1, iblockdata2); // CraftBukkit
+             }
+ 
+         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BuddingAmethystBlock.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BuddingAmethystBlock.patch
deleted file mode 100644
index 9188275263..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BuddingAmethystBlock.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/level/block/BuddingAmethystBlock.java
-+++ b/net/minecraft/world/level/block/BuddingAmethystBlock.java
-@@ -45,7 +45,7 @@
-             if (block != null) {
-                 IBlockData iblockdata2 = (IBlockData) ((IBlockData) block.defaultBlockState().setValue(AmethystClusterBlock.FACING, enumdirection)).setValue(AmethystClusterBlock.WATERLOGGED, iblockdata1.getFluidState().getType() == FluidTypes.WATER);
- 
--                worldserver.setBlockAndUpdate(blockposition1, iblockdata2);
-+                org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition1, iblockdata2); // CraftBukkit
-             }
- 
-         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BushBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/BushBlock.java.patch
new file mode 100644
index 0000000000..495c9a958a
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/BushBlock.java.patch
@@ -0,0 +1,27 @@
+--- a/net/minecraft/world/level/block/BushBlock.java
++++ b/net/minecraft/world/level/block/BushBlock.java
+@@ -6,6 +6,7 @@
+ import net.minecraft.tags.BlockTags;
+ import net.minecraft.util.RandomSource;
+ import net.minecraft.world.level.BlockGetter;
++import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.LevelReader;
+ import net.minecraft.world.level.ScheduledTickAccess;
+ import net.minecraft.world.level.block.state.BlockBehaviour;
+@@ -27,7 +28,15 @@
+ 
+     @Override
+     protected BlockState updateShape(BlockState state, LevelReader world, ScheduledTickAccess tickView, BlockPos pos, Direction direction, BlockPos neighborPos, BlockState neighborState, RandomSource random) {
+-        return !state.canSurvive(world, pos) ? Blocks.AIR.defaultBlockState() : super.updateShape(state, world, tickView, pos, direction, neighborPos, neighborState, random);
++        // CraftBukkit start
++        if (!state.canSurvive(world, pos)) {
++            // Suppress during worldgen
++            if (!(world instanceof Level world1) || !org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(world1, pos).isCancelled()) {
++                return Blocks.AIR.defaultBlockState();
++            }
++        }
++        return super.updateShape(state, world, tickView, pos, direction, neighborPos, neighborState, random);
++        // CraftBukkit end
+     }
+ 
+     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/ButtonBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/ButtonBlock.java.patch
new file mode 100644
index 0000000000..b2f46f7ac3
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/ButtonBlock.java.patch
@@ -0,0 +1,71 @@
+--- a/net/minecraft/world/level/block/ButtonBlock.java
++++ b/net/minecraft/world/level/block/ButtonBlock.java
+@@ -34,6 +34,10 @@
+ import net.minecraft.world.phys.BlockHitResult;
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++// CraftBukkit start
++import org.bukkit.event.block.BlockRedstoneEvent;
++import org.bukkit.event.entity.EntityInteractEvent;
++// CraftBukkit end
+ 
+ public class ButtonBlock extends FaceAttachedHorizontalDirectionalBlock {
+ 
+@@ -126,6 +130,19 @@
+         if ((Boolean) state.getValue(ButtonBlock.POWERED)) {
+             return InteractionResult.CONSUME;
+         } else {
++            // CraftBukkit start
++            boolean powered = ((Boolean) state.getValue(ButtonBlock.POWERED));
++            org.bukkit.block.Block block = world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ());
++            int old = (powered) ? 15 : 0;
++            int current = (!powered) ? 15 : 0;
++
++            BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, old, current);
++            world.getCraftServer().getPluginManager().callEvent(eventRedstone);
++
++            if ((eventRedstone.getNewCurrent() > 0) != (!powered)) {
++                return InteractionResult.SUCCESS;
++            }
++            // CraftBukkit end
+             this.press(state, world, pos, player);
+             return InteractionResult.SUCCESS;
+         }
+@@ -197,11 +214,36 @@
+     }
+ 
+     protected void checkPressed(BlockState state, Level world, BlockPos pos) {
+-        AbstractArrow entityarrow = this.type.canButtonBeActivatedByArrows() ? (AbstractArrow) world.getEntitiesOfClass(AbstractArrow.class, state.getShape(world, pos).bounds().move(pos)).stream().findFirst().orElse((Object) null) : null;
++        AbstractArrow entityarrow = this.type.canButtonBeActivatedByArrows() ? (AbstractArrow) world.getEntitiesOfClass(AbstractArrow.class, state.getShape(world, pos).bounds().move(pos)).stream().findFirst().orElse(null) : null; // CraftBukkit - decompile error
+         boolean flag = entityarrow != null;
+         boolean flag1 = (Boolean) state.getValue(ButtonBlock.POWERED);
+ 
++        // CraftBukkit start - Call interact event when arrows turn on wooden buttons
++        if (flag1 != flag && flag) {
++            org.bukkit.block.Block block = world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ());
++            EntityInteractEvent event = new EntityInteractEvent(entityarrow.getBukkitEntity(), block);
++            world.getCraftServer().getPluginManager().callEvent(event);
++
++            if (event.isCancelled()) {
++                return;
++            }
++        }
++        // CraftBukkit end
++
+         if (flag != flag1) {
++            // CraftBukkit start
++            boolean powered = flag1;
++            org.bukkit.block.Block block = world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ());
++            int old = (powered) ? 15 : 0;
++            int current = (!powered) ? 15 : 0;
++
++            BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, old, current);
++            world.getCraftServer().getPluginManager().callEvent(eventRedstone);
++
++            if ((flag && eventRedstone.getNewCurrent() <= 0) || (!flag && eventRedstone.getNewCurrent() > 0)) {
++                return;
++            }
++            // CraftBukkit end
+             world.setBlock(pos, (BlockState) state.setValue(ButtonBlock.POWERED, flag), 3);
+             this.updateNeighbours(state, world, pos);
+             this.playSound((Player) null, world, pos, flag);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/CactusBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/CactusBlock.java.patch
new file mode 100644
index 0000000000..206249b0ba
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/CactusBlock.java.patch
@@ -0,0 +1,28 @@
+--- a/net/minecraft/world/level/block/CactusBlock.java
++++ b/net/minecraft/world/level/block/CactusBlock.java
+@@ -22,6 +22,7 @@
+ import net.minecraft.world.level.redstone.Orientation;
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
+ 
+ public class CactusBlock extends Block {
+ 
+@@ -65,7 +66,7 @@
+                 int j = (Integer) state.getValue(CactusBlock.AGE);
+ 
+                 if (j == 15) {
+-                    world.setBlockAndUpdate(blockposition1, this.defaultBlockState());
++                    CraftEventFactory.handleBlockGrowEvent(world, blockposition1, this.defaultBlockState()); // CraftBukkit
+                     BlockState iblockdata1 = (BlockState) state.setValue(CactusBlock.AGE, 0);
+ 
+                     world.setBlock(pos, iblockdata1, 4);
+@@ -120,7 +121,7 @@
+ 
+     @Override
+     protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) {
+-        entity.hurt(world.damageSources().cactus(), 1.0F);
++        entity.hurt(world.damageSources().cactus().directBlock(world, pos), 1.0F); // CraftBukkit
+     }
+ 
+     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/CakeBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/CakeBlock.java.patch
new file mode 100644
index 0000000000..0271477d21
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/CakeBlock.java.patch
@@ -0,0 +1,22 @@
+--- a/net/minecraft/world/level/block/CakeBlock.java
++++ b/net/minecraft/world/level/block/CakeBlock.java
+@@ -98,7 +98,18 @@
+             return InteractionResult.PASS;
+         } else {
+             player.awardStat(Stats.EAT_CAKE_SLICE);
+-            player.getFoodData().eat(2, 0.1F);
++            // CraftBukkit start
++            // entityhuman.getFoodData().eat(2, 0.1F);
++            int oldFoodLevel = player.getFoodData().foodLevel;
++
++            org.bukkit.event.entity.FoodLevelChangeEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callFoodLevelChangeEvent(player, 2 + oldFoodLevel);
++
++            if (!event.isCancelled()) {
++                player.getFoodData().eat(event.getFoodLevel() - oldFoodLevel, 0.1F);
++            }
++
++            ((net.minecraft.server.level.ServerPlayer) player).getBukkitEntity().sendHealthUpdate();
++            // CraftBukkit end
+             int i = (Integer) state.getValue(CakeBlock.BITES);
+ 
+             world.gameEvent((Entity) player, (Holder) GameEvent.EAT, pos);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/CampfireBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/CampfireBlock.java.patch
new file mode 100644
index 0000000000..5809b6e5e5
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/CampfireBlock.java.patch
@@ -0,0 +1,23 @@
+--- a/net/minecraft/world/level/block/CampfireBlock.java
++++ b/net/minecraft/world/level/block/CampfireBlock.java
+@@ -113,7 +113,7 @@
+     @Override
+     protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) {
+         if ((Boolean) state.getValue(CampfireBlock.LIT) && entity instanceof LivingEntity) {
+-            entity.hurt(world.damageSources().campfire(), (float) this.fireDamage);
++            entity.hurt(world.damageSources().campfire().directBlock(world, pos), (float) this.fireDamage); // CraftBukkit
+         }
+ 
+         super.entityInside(state, world, pos, entity);
+@@ -219,6 +219,11 @@
+ 
+         if (world instanceof ServerLevel worldserver) {
+             if (projectile.isOnFire() && projectile.mayInteract(worldserver, blockposition) && !(Boolean) state.getValue(CampfireBlock.LIT) && !(Boolean) state.getValue(CampfireBlock.WATERLOGGED)) {
++                // CraftBukkit start
++                if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, blockposition, projectile).isCancelled()) {
++                    return;
++                }
++                // CraftBukkit end
+                 world.setBlock(blockposition, (BlockState) state.setValue(BlockStateProperties.LIT, true), 11);
+             }
+         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch
new file mode 100644
index 0000000000..8b9fd76990
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/CarvedPumpkinBlock.java.patch
@@ -0,0 +1,29 @@
+--- a/net/minecraft/world/level/block/CarvedPumpkinBlock.java
++++ b/net/minecraft/world/level/block/CarvedPumpkinBlock.java
+@@ -24,6 +24,9 @@
+ import net.minecraft.world.level.block.state.pattern.BlockPatternBuilder;
+ import net.minecraft.world.level.block.state.predicate.BlockStatePredicate;
+ import net.minecraft.world.level.block.state.properties.EnumProperty;
++// CraftBukkit start
++import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
++// CraftBukkit end
+ 
+ public class CarvedPumpkinBlock extends HorizontalDirectionalBlock {
+ 
+@@ -87,9 +90,14 @@
+     }
+ 
+     private static void spawnGolemInWorld(Level world, BlockPattern.BlockPatternMatch patternResult, Entity entity, BlockPos pos) {
+-        CarvedPumpkinBlock.clearPatternBlocks(world, patternResult);
++        // 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);
+-        world.addFreshEntity(entity);
++        // CraftBukkit start
++        if (!world.addFreshEntity(entity, (entity.getType() == EntityType.SNOW_GOLEM) ? SpawnReason.BUILD_SNOWMAN : SpawnReason.BUILD_IRONGOLEM)) {
++            return;
++        }
++        CarvedPumpkinBlock.clearPatternBlocks(world, patternResult); // CraftBukkit - from above
++        // CraftBukkit end
+         Iterator iterator = world.getEntitiesOfClass(ServerPlayer.class, entity.getBoundingBox().inflate(5.0D)).iterator();
+ 
+         while (iterator.hasNext()) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/CauldronBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/CauldronBlock.java.patch
new file mode 100644
index 0000000000..f53d59cc95
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/CauldronBlock.java.patch
@@ -0,0 +1,28 @@
+--- a/net/minecraft/world/level/block/CauldronBlock.java
++++ b/net/minecraft/world/level/block/CauldronBlock.java
+@@ -12,6 +12,9 @@
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import net.minecraft.world.level.material.Fluid;
+ import net.minecraft.world.level.material.Fluids;
++// CraftBukkit start
++import org.bukkit.event.block.CauldronLevelChangeEvent;
++// CraftBukkit end
+ 
+ public class CauldronBlock extends AbstractCauldronBlock {
+ 
+@@ -62,13 +65,11 @@
+ 
+         if (fluid == Fluids.WATER) {
+             iblockdata1 = Blocks.WATER_CAULDRON.defaultBlockState();
+-            world.setBlockAndUpdate(pos, iblockdata1);
+-            world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(iblockdata1));
++            LayeredCauldronBlock.changeLevel(state, world, pos, iblockdata1, null, CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL); // CraftBukkit
+             world.levelEvent(1047, pos, 0);
+         } else if (fluid == Fluids.LAVA) {
+             iblockdata1 = Blocks.LAVA_CAULDRON.defaultBlockState();
+-            world.setBlockAndUpdate(pos, iblockdata1);
+-            world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(iblockdata1));
++            LayeredCauldronBlock.changeLevel(state, world, pos, iblockdata1, null, CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL); // CraftBukkit
+             world.levelEvent(1046, pos, 0);
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/CaveVines.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/CaveVines.java.patch
new file mode 100644
index 0000000000..b340d9c9cb
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/CaveVines.java.patch
@@ -0,0 +1,42 @@
+--- a/net/minecraft/world/level/block/CaveVines.java
++++ b/net/minecraft/world/level/block/CaveVines.java
+@@ -19,6 +19,13 @@
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import net.minecraft.world.phys.shapes.VoxelShape;
+ 
++// CraftBukkit start
++import java.util.Collections;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.craftbukkit.inventory.CraftItemStack;
++import org.bukkit.event.player.PlayerHarvestBlockEvent;
++// CraftBukkit end
++
+ public interface CaveVines {
+ 
+     VoxelShape SHAPE = Block.box(1.0D, 0.0D, 1.0D, 15.0D, 16.0D, 15.0D);
+@@ -26,7 +33,24 @@
+ 
+     static InteractionResult use(@Nullable Entity picker, BlockState state, Level world, BlockPos pos) {
+         if ((Boolean) state.getValue(CaveVines.BERRIES)) {
+-            Block.popResource(world, pos, new ItemStack(Items.GLOW_BERRIES, 1));
++            // CraftBukkit start
++            if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(picker, pos, (BlockState) state.setValue(CaveVines.BERRIES, false))) {
++                return InteractionResult.SUCCESS;
++            }
++
++            if (picker instanceof Player) {
++                PlayerHarvestBlockEvent event = CraftEventFactory.callPlayerHarvestBlockEvent(world, pos, (Player) picker, net.minecraft.world.InteractionHand.MAIN_HAND, Collections.singletonList(new ItemStack(Items.GLOW_BERRIES, 1)));
++                if (event.isCancelled()) {
++                    return InteractionResult.SUCCESS; // We need to return a success either way, because making it PASS or FAIL will result in a bug where cancelling while harvesting w/ block in hand places block
++                }
++                for (org.bukkit.inventory.ItemStack itemStack : event.getItemsHarvested()) {
++                    Block.popResource(world, pos, CraftItemStack.asNMSCopy(itemStack));
++                }
++            } else {
++                Block.popResource(world, pos, new ItemStack(Items.GLOW_BERRIES, 1));
++            }
++            // CraftBukkit end
++
+             float f = Mth.randomBetween(world.random, 0.8F, 1.2F);
+ 
+             world.playSound((Player) null, pos, SoundEvents.CAVE_VINES_PICK_BERRIES, SoundSource.BLOCKS, 1.0F, f);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/CaveVines.patch b/paper-server/patches/sources/net/minecraft/world/level/block/CaveVines.patch
deleted file mode 100644
index 1184f18f9d..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/CaveVines.patch
+++ /dev/null
@@ -1,42 +0,0 @@
---- a/net/minecraft/world/level/block/CaveVines.java
-+++ b/net/minecraft/world/level/block/CaveVines.java
-@@ -19,6 +19,13 @@
- import net.minecraft.world.level.gameevent.GameEvent;
- import net.minecraft.world.phys.shapes.VoxelShape;
- 
-+// CraftBukkit start
-+import java.util.Collections;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.craftbukkit.inventory.CraftItemStack;
-+import org.bukkit.event.player.PlayerHarvestBlockEvent;
-+// CraftBukkit end
-+
- public interface CaveVines {
- 
-     VoxelShape SHAPE = Block.box(1.0D, 0.0D, 1.0D, 15.0D, 16.0D, 15.0D);
-@@ -26,7 +33,24 @@
- 
-     static EnumInteractionResult use(@Nullable Entity entity, IBlockData iblockdata, World world, BlockPosition blockposition) {
-         if ((Boolean) iblockdata.getValue(CaveVines.BERRIES)) {
--            Block.popResource(world, blockposition, new ItemStack(Items.GLOW_BERRIES, 1));
-+            // CraftBukkit start
-+            if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, (IBlockData) iblockdata.setValue(CaveVines.BERRIES, false))) {
-+                return EnumInteractionResult.SUCCESS;
-+            }
-+
-+            if (entity instanceof EntityHuman) {
-+                PlayerHarvestBlockEvent event = CraftEventFactory.callPlayerHarvestBlockEvent(world, blockposition, (EntityHuman) entity, net.minecraft.world.EnumHand.MAIN_HAND, Collections.singletonList(new ItemStack(Items.GLOW_BERRIES, 1)));
-+                if (event.isCancelled()) {
-+                    return EnumInteractionResult.SUCCESS; // We need to return a success either way, because making it PASS or FAIL will result in a bug where cancelling while harvesting w/ block in hand places block
-+                }
-+                for (org.bukkit.inventory.ItemStack itemStack : event.getItemsHarvested()) {
-+                    Block.popResource(world, blockposition, CraftItemStack.asNMSCopy(itemStack));
-+                }
-+            } else {
-+                Block.popResource(world, blockposition, new ItemStack(Items.GLOW_BERRIES, 1));
-+            }
-+            // CraftBukkit end
-+
-             float f = MathHelper.randomBetween(world.random, 0.8F, 1.2F);
- 
-             world.playSound((EntityHuman) null, blockposition, SoundEffects.CAVE_VINES_PICK_BERRIES, SoundCategory.BLOCKS, 1.0F, f);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/CeilingHangingSignBlock.patch b/paper-server/patches/sources/net/minecraft/world/level/block/CeilingHangingSignBlock.java.patch
similarity index 51%
rename from paper-server/patches/sources/net/minecraft/world/level/block/CeilingHangingSignBlock.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/CeilingHangingSignBlock.java.patch
index 66912c1a49..b85ba5b3dc 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/CeilingHangingSignBlock.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/CeilingHangingSignBlock.java.patch
@@ -3,8 +3,8 @@
 @@ -159,6 +159,6 @@
      @Nullable
      @Override
-     public <T extends TileEntity> BlockEntityTicker<T> getTicker(World world, IBlockData iblockdata, TileEntityTypes<T> tileentitytypes) {
--        return createTickerHelper(tileentitytypes, TileEntityTypes.HANGING_SIGN, TileEntitySign::tick);
+     public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level world, BlockState state, BlockEntityType<T> type) {
+-        return createTickerHelper(type, BlockEntityType.HANGING_SIGN, SignBlockEntity::tick);
 +        return null; // Craftbukkit - remove unnecessary sign ticking
      }
  }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/ChangeOverTimeBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/ChangeOverTimeBlock.java.patch
new file mode 100644
index 0000000000..94b24017e5
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/ChangeOverTimeBlock.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/level/block/ChangeOverTimeBlock.java
++++ b/net/minecraft/world/level/block/ChangeOverTimeBlock.java
+@@ -20,7 +20,7 @@
+ 
+         if (random.nextFloat() < 0.05688889F) {
+             this.getNextState(state, world, pos, random).ifPresent((iblockdata1) -> {
+-                world.setBlockAndUpdate(pos, iblockdata1);
++                org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, pos, iblockdata1); // CraftBukkit
+             });
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/ChangeOverTimeBlock.patch b/paper-server/patches/sources/net/minecraft/world/level/block/ChangeOverTimeBlock.patch
deleted file mode 100644
index cb2cffd6c0..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/ChangeOverTimeBlock.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/level/block/ChangeOverTimeBlock.java
-+++ b/net/minecraft/world/level/block/ChangeOverTimeBlock.java
-@@ -20,7 +20,7 @@
- 
-         if (randomsource.nextFloat() < 0.05688889F) {
-             this.getNextState(iblockdata, worldserver, blockposition, randomsource).ifPresent((iblockdata1) -> {
--                worldserver.setBlockAndUpdate(blockposition, iblockdata1);
-+                org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(worldserver, blockposition, iblockdata1); // CraftBukkit
-             });
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/ChestBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/ChestBlock.java.patch
new file mode 100644
index 0000000000..844d9d8fa1
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/ChestBlock.java.patch
@@ -0,0 +1,96 @@
+--- a/net/minecraft/world/level/block/ChestBlock.java
++++ b/net/minecraft/world/level/block/ChestBlock.java
+@@ -91,24 +91,7 @@
+         public Optional<MenuProvider> acceptDouble(final ChestBlockEntity first, final ChestBlockEntity second) {
+             final CompoundContainer inventorylargechest = new CompoundContainer(first, second);
+ 
+-            return Optional.of(new MenuProvider(this) {
+-                @Nullable
+-                @Override
+-                public AbstractContainerMenu createMenu(int syncId, Inventory playerInventory, Player player) {
+-                    if (first.canOpen(player) && second.canOpen(player)) {
+-                        first.unpackLootTable(playerInventory.player);
+-                        second.unpackLootTable(playerInventory.player);
+-                        return ChestMenu.sixRows(syncId, playerInventory, inventorylargechest);
+-                    } else {
+-                        return null;
+-                    }
+-                }
+-
+-                @Override
+-                public Component getDisplayName() {
+-                    return (Component) (first.hasCustomName() ? first.getDisplayName() : (second.hasCustomName() ? second.getDisplayName() : Component.translatable("container.chestDouble")));
+-                }
+-            });
++            return Optional.of(new DoubleInventory(first, second, inventorylargechest)); // CraftBukkit // CraftBukkit - decompile error
+         }
+ 
+         public Optional<MenuProvider> acceptSingle(ChestBlockEntity single) {
+@@ -118,8 +101,40 @@
+         @Override
+         public Optional<MenuProvider> acceptNone() {
+             return Optional.empty();
++        }
++    };
++
++    // CraftBukkit start
++    public static class DoubleInventory implements MenuProvider {
++
++        private final ChestBlockEntity tileentitychest;
++        private final ChestBlockEntity tileentitychest1;
++        public final CompoundContainer inventorylargechest;
++
++        public DoubleInventory(ChestBlockEntity tileentitychest, ChestBlockEntity tileentitychest1, CompoundContainer inventorylargechest) {
++            this.tileentitychest = tileentitychest;
++            this.tileentitychest1 = tileentitychest1;
++            this.inventorylargechest = inventorylargechest;
++        }
++
++        @Nullable
++        @Override
++        public AbstractContainerMenu createMenu(int syncId, Inventory playerInventory, Player player) {
++            if (this.tileentitychest.canOpen(player) && this.tileentitychest1.canOpen(player)) {
++                this.tileentitychest.unpackLootTable(playerInventory.player);
++                this.tileentitychest1.unpackLootTable(playerInventory.player);
++                return ChestMenu.sixRows(syncId, playerInventory, this.inventorylargechest);
++            } else {
++                return null;
++            }
++        }
++
++        @Override
++        public Component getDisplayName() {
++            return (Component) (this.tileentitychest.hasCustomName() ? this.tileentitychest.getDisplayName() : (this.tileentitychest1.hasCustomName() ? this.tileentitychest1.getDisplayName() : Component.translatable("container.chestDouble")));
+         }
+     };
++    // CraftBukkit end
+ 
+     @Override
+     public MapCodec<? extends ChestBlock> codec() {
+@@ -257,7 +272,7 @@
+ 
+     @Override
+     public DoubleBlockCombiner.NeighborCombineResult<? extends ChestBlockEntity> combine(BlockState state, Level world, BlockPos pos, boolean ignoreBlocked) {
+-        BiPredicate bipredicate;
++        BiPredicate<LevelAccessor, BlockPos> bipredicate; // CraftBukkit - decompile error
+ 
+         if (ignoreBlocked) {
+             bipredicate = (generatoraccess, blockposition1) -> {
+@@ -273,9 +288,16 @@
+     @Nullable
+     @Override
+     public MenuProvider getMenuProvider(BlockState state, Level world, BlockPos pos) {
+-        return (MenuProvider) ((Optional) this.combine(state, world, pos, false).apply(ChestBlock.MENU_PROVIDER_COMBINER)).orElse((Object) null);
++        // CraftBukkit start
++        return this.getMenuProvider(state, world, pos, false);
+     }
+ 
++    @Nullable
++    public MenuProvider getMenuProvider(BlockState iblockdata, Level world, BlockPos blockposition, boolean ignoreObstructions) {
++        return (MenuProvider) ((Optional) this.combine(iblockdata, world, blockposition, ignoreObstructions).apply(ChestBlock.MENU_PROVIDER_COMBINER)).orElse((Object) null);
++        // CraftBukkit end
++    }
++
+     public static DoubleBlockCombiner.Combiner<ChestBlockEntity, Float2FloatFunction> opennessCombiner(final LidBlockEntity progress) {
+         return new DoubleBlockCombiner.Combiner<ChestBlockEntity, Float2FloatFunction>() {
+             public Float2FloatFunction acceptDouble(ChestBlockEntity first, ChestBlockEntity second) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/ChorusFlowerBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/ChorusFlowerBlock.java.patch
new file mode 100644
index 0000000000..3737ab608e
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/ChorusFlowerBlock.java.patch
@@ -0,0 +1,73 @@
+--- a/net/minecraft/world/level/block/ChorusFlowerBlock.java
++++ b/net/minecraft/world/level/block/ChorusFlowerBlock.java
+@@ -23,6 +23,8 @@
+ import net.minecraft.world.phys.BlockHitResult;
+ import net.minecraft.world.phys.shapes.VoxelShape;
+ 
++import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
++
+ public class ChorusFlowerBlock extends Block {
+ 
+     public static final MapCodec<ChorusFlowerBlock> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
+@@ -103,8 +105,12 @@
+                 }
+ 
+                 if (flag && ChorusFlowerBlock.allNeighborsEmpty(world, blockposition1, (Direction) null) && world.isEmptyBlock(pos.above(2))) {
+-                    world.setBlock(pos, ChorusPlantBlock.getStateWithConnections(world, pos, this.plant.defaultBlockState()), 2);
+-                    this.placeGrownFlower(world, blockposition1, i);
++                    // CraftBukkit start - add event
++                    if (CraftEventFactory.handleBlockSpreadEvent(world, pos, blockposition1, this.defaultBlockState().setValue(ChorusFlowerBlock.AGE, Integer.valueOf(i)), 2)) {
++                        world.setBlock(pos, ChorusPlantBlock.getStateWithConnections(world, pos, this.plant.defaultBlockState()), 2);
++                        this.placeGrownFlower(world, blockposition1, i);
++                    }
++                    // CraftBukkit end
+                 } else if (i < 4) {
+                     j = random.nextInt(4);
+                     if (flag1) {
+@@ -118,18 +124,30 @@
+                         BlockPos blockposition2 = pos.relative(enumdirection);
+ 
+                         if (world.isEmptyBlock(blockposition2) && world.isEmptyBlock(blockposition2.below()) && ChorusFlowerBlock.allNeighborsEmpty(world, blockposition2, enumdirection.getOpposite())) {
+-                            this.placeGrownFlower(world, blockposition2, i + 1);
+-                            flag2 = true;
++                            // CraftBukkit start - add event
++                            if (CraftEventFactory.handleBlockSpreadEvent(world, pos, blockposition2, this.defaultBlockState().setValue(ChorusFlowerBlock.AGE, Integer.valueOf(i + 1)), 2)) {
++                                this.placeGrownFlower(world, blockposition2, i + 1);
++                                flag2 = true;
++                            }
++                            // CraftBukkit end
+                         }
+                     }
+ 
+                     if (flag2) {
+                         world.setBlock(pos, ChorusPlantBlock.getStateWithConnections(world, pos, this.plant.defaultBlockState()), 2);
+                     } else {
+-                        this.placeDeadFlower(world, pos);
++                        // CraftBukkit start - add event
++                        if (CraftEventFactory.handleBlockGrowEvent(world, pos, this.defaultBlockState().setValue(ChorusFlowerBlock.AGE, Integer.valueOf(5)), 2)) {
++                            this.placeDeadFlower(world, pos);
++                        }
++                        // CraftBukkit end
+                     }
+                 } else {
+-                    this.placeDeadFlower(world, pos);
++                    // CraftBukkit start - add event
++                    if (CraftEventFactory.handleBlockGrowEvent(world, pos, this.defaultBlockState().setValue(ChorusFlowerBlock.AGE, Integer.valueOf(5)), 2)) {
++                        this.placeDeadFlower(world, pos);
++                    }
++                    // CraftBukkit end
+                 }
+ 
+             }
+@@ -267,6 +285,11 @@
+ 
+         if (world instanceof ServerLevel worldserver) {
+             if (projectile.mayInteract(worldserver, blockposition) && projectile.mayBreak(worldserver)) {
++                // CraftBukkit
++                if (!CraftEventFactory.callEntityChangeBlockEvent(projectile, blockposition, Blocks.AIR.defaultBlockState())) {
++                    return;
++                }
++                // CraftBukkit end
+                 world.destroyBlock(blockposition, true, projectile);
+             }
+         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/CocoaBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/CocoaBlock.java.patch
new file mode 100644
index 0000000000..d330ea5bcf
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/CocoaBlock.java.patch
@@ -0,0 +1,28 @@
+--- a/net/minecraft/world/level/block/CocoaBlock.java
++++ b/net/minecraft/world/level/block/CocoaBlock.java
+@@ -20,6 +20,7 @@
+ import net.minecraft.world.level.pathfinder.PathComputationType;
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
+ 
+ public class CocoaBlock extends HorizontalDirectionalBlock implements BonemealableBlock {
+ 
+@@ -61,7 +62,7 @@
+             int i = (Integer) state.getValue(CocoaBlock.AGE);
+ 
+             if (i < 2) {
+-                world.setBlock(pos, (BlockState) state.setValue(CocoaBlock.AGE, i + 1), 2);
++                CraftEventFactory.handleBlockGrowEvent(world, pos, (BlockState) state.setValue(CocoaBlock.AGE, i + 1), 2); // CraftBukkkit
+             }
+         }
+ 
+@@ -131,7 +132,7 @@
+ 
+     @Override
+     public void performBonemeal(ServerLevel world, RandomSource random, BlockPos pos, BlockState state) {
+-        world.setBlock(pos, (BlockState) state.setValue(CocoaBlock.AGE, (Integer) state.getValue(CocoaBlock.AGE) + 1), 2);
++        CraftEventFactory.handleBlockGrowEvent(world, pos, (BlockState) state.setValue(CocoaBlock.AGE, (Integer) state.getValue(CocoaBlock.AGE) + 1), 2); // CraftBukkit
+     }
+ 
+     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/CommandBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/CommandBlock.java.patch
new file mode 100644
index 0000000000..c91c7c27b9
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/CommandBlock.java.patch
@@ -0,0 +1,28 @@
+--- a/net/minecraft/world/level/block/CommandBlock.java
++++ b/net/minecraft/world/level/block/CommandBlock.java
+@@ -31,6 +31,8 @@
+ import net.minecraft.world.phys.BlockHitResult;
+ import org.slf4j.Logger;
+ 
++import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
++
+ public class CommandBlock extends BaseEntityBlock implements GameMasterBlock {
+ 
+     public static final MapCodec<CommandBlock> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
+@@ -78,7 +80,16 @@
+ 
+     private void setPoweredAndUpdate(Level world, BlockPos pos, CommandBlockEntity blockEntity, boolean powered) {
+         boolean flag1 = blockEntity.isPowered();
++        // CraftBukkit start
++        org.bukkit.block.Block bukkitBlock = world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ());
++        int old = flag1 ? 15 : 0;
++        int current = powered ? 15 : 0;
+ 
++        BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(bukkitBlock, old, current);
++        world.getCraftServer().getPluginManager().callEvent(eventRedstone);
++        powered = eventRedstone.getNewCurrent() > 0;
++        // CraftBukkit end
++
+         if (powered != flag1) {
+             blockEntity.setPowered(powered);
+             if (powered) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/ComparatorBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/ComparatorBlock.java.patch
new file mode 100644
index 0000000000..a59662f5c7
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/ComparatorBlock.java.patch
@@ -0,0 +1,39 @@
+--- a/net/minecraft/world/level/block/ComparatorBlock.java
++++ b/net/minecraft/world/level/block/ComparatorBlock.java
+@@ -27,6 +27,7 @@
+ import net.minecraft.world.phys.AABB;
+ import net.minecraft.world.phys.BlockHitResult;
+ import net.minecraft.world.ticks.TickPriority;
++import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
+ 
+ public class ComparatorBlock extends DiodeBlock implements EntityBlock {
+ 
+@@ -110,7 +111,8 @@
+ 
+     @Nullable
+     private ItemFrame getItemFrame(Level world, Direction facing, BlockPos pos) {
+-        List<ItemFrame> list = world.getEntitiesOfClass(ItemFrame.class, new AABB((double) pos.getX(), (double) pos.getY(), (double) pos.getZ(), (double) (pos.getX() + 1), (double) (pos.getY() + 1), (double) (pos.getZ() + 1)), (entityitemframe) -> {
++        // CraftBukkit - decompile error
++        List<ItemFrame> list = world.getEntitiesOfClass(ItemFrame.class, new AABB((double) pos.getX(), (double) pos.getY(), (double) pos.getZ(), (double) (pos.getX() + 1), (double) (pos.getY() + 1), (double) (pos.getZ() + 1)), (java.util.function.Predicate<ItemFrame>) (entityitemframe) -> {
+             return entityitemframe != null && entityitemframe.getDirection() == facing;
+         });
+ 
+@@ -163,8 +165,18 @@
+             boolean flag1 = (Boolean) state.getValue(ComparatorBlock.POWERED);
+ 
+             if (flag1 && !flag) {
++                // CraftBukkit start
++                if (CraftEventFactory.callRedstoneChange(world, pos, 15, 0).getNewCurrent() != 0) {
++                    return;
++                }
++                // CraftBukkit end
+                 world.setBlock(pos, (BlockState) state.setValue(ComparatorBlock.POWERED, false), 2);
+             } else if (!flag1 && flag) {
++                // CraftBukkit start
++                if (CraftEventFactory.callRedstoneChange(world, pos, 0, 15).getNewCurrent() != 15) {
++                    return;
++                }
++                // CraftBukkit end
+                 world.setBlock(pos, (BlockState) state.setValue(ComparatorBlock.POWERED, true), 2);
+             }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/ComposterBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/ComposterBlock.java.patch
new file mode 100644
index 0000000000..8c9d255eb0
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/ComposterBlock.java.patch
@@ -0,0 +1,131 @@
+--- a/net/minecraft/world/level/block/ComposterBlock.java
++++ b/net/minecraft/world/level/block/ComposterBlock.java
+@@ -41,6 +41,10 @@
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.Shapes;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++// CraftBukkit start
++import org.bukkit.craftbukkit.inventory.CraftBlockInventoryHolder;
++import org.bukkit.craftbukkit.util.DummyGeneratorAccess;
++// CraftBukkit end
+ 
+ public class ComposterBlock extends Block implements WorldlyContainerHolder {
+ 
+@@ -269,7 +273,14 @@
+         int i = (Integer) state.getValue(ComposterBlock.LEVEL);
+ 
+         if (i < 7 && ComposterBlock.COMPOSTABLES.containsKey(stack.getItem())) {
+-            BlockState iblockdata1 = ComposterBlock.addItem(user, state, world, pos, stack);
++            // CraftBukkit start
++            double rand = world.getRandom().nextDouble();
++            BlockState iblockdata1 = ComposterBlock.addItem(user, state, DummyGeneratorAccess.INSTANCE, pos, stack, rand);
++            if (state == iblockdata1 || !org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(user, pos, iblockdata1)) {
++                return state;
++            }
++            iblockdata1 = ComposterBlock.addItem(user, state, world, pos, stack, rand);
++            // CraftBukkit end
+ 
+             stack.shrink(1);
+             return iblockdata1;
+@@ -279,6 +290,14 @@
+     }
+ 
+     public static BlockState extractProduce(Entity user, BlockState state, Level world, BlockPos pos) {
++        // CraftBukkit start
++        if (user != null && !(user instanceof Player)) {
++            BlockState iblockdata1 = ComposterBlock.empty(user, state, DummyGeneratorAccess.INSTANCE, pos);
++            if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(user, pos, iblockdata1)) {
++                return state;
++            }
++        }
++        // CraftBukkit end
+         if (!world.isClientSide) {
+             Vec3 vec3d = Vec3.atLowerCornerWithOffset(pos, 0.5D, 1.01D, 0.5D).offsetRandom(world.random, 0.7F);
+             ItemEntity entityitem = new ItemEntity(world, vec3d.x(), vec3d.y(), vec3d.z(), new ItemStack(Items.BONE_MEAL));
+@@ -302,19 +321,25 @@
+     }
+ 
+     static BlockState addItem(@Nullable Entity user, BlockState state, LevelAccessor world, BlockPos pos, ItemStack stack) {
+-        int i = (Integer) state.getValue(ComposterBlock.LEVEL);
+-        float f = ComposterBlock.COMPOSTABLES.getFloat(stack.getItem());
++        // CraftBukkit start
++        return ComposterBlock.addItem(user, state, world, pos, stack, world.getRandom().nextDouble());
++    }
+ 
+-        if ((i != 0 || f <= 0.0F) && world.getRandom().nextDouble() >= (double) f) {
+-            return state;
++    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);
++        float f = ComposterBlock.COMPOSTABLES.getFloat(itemstack.getItem());
++
++        if ((i != 0 || f <= 0.0F) && rand >= (double) f) {
++            return iblockdata;
+         } else {
+             int j = i + 1;
+-            BlockState iblockdata1 = (BlockState) state.setValue(ComposterBlock.LEVEL, j);
++            BlockState iblockdata1 = (BlockState) iblockdata.setValue(ComposterBlock.LEVEL, j);
+ 
+-            world.setBlock(pos, iblockdata1, 3);
+-            world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(user, iblockdata1));
++            generatoraccess.setBlock(blockposition, iblockdata1, 3);
++            generatoraccess.gameEvent((Holder) GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of(entity, iblockdata1));
+             if (j == 7) {
+-                world.scheduleTick(pos, state.getBlock(), 20);
++                generatoraccess.scheduleTick(blockposition, iblockdata.getBlock(), 20);
+             }
+ 
+             return iblockdata1;
+@@ -354,7 +379,8 @@
+     public WorldlyContainer getContainer(BlockState state, LevelAccessor world, BlockPos pos) {
+         int i = (Integer) state.getValue(ComposterBlock.LEVEL);
+ 
+-        return (WorldlyContainer) (i == 8 ? new ComposterBlock.OutputContainer(state, world, pos, new ItemStack(Items.BONE_MEAL)) : (i < 7 ? new ComposterBlock.InputContainer(state, world, pos) : new ComposterBlock.EmptyContainer()));
++        // CraftBukkit - empty generatoraccess, blockposition
++        return (WorldlyContainer) (i == 8 ? new ComposterBlock.OutputContainer(state, world, pos, new ItemStack(Items.BONE_MEAL)) : (i < 7 ? new ComposterBlock.InputContainer(state, world, pos) : new ComposterBlock.EmptyContainer(world, pos)));
+     }
+ 
+     public static class OutputContainer extends SimpleContainer implements WorldlyContainer {
+@@ -369,6 +395,7 @@
+             this.state = state;
+             this.level = world;
+             this.pos = pos;
++            this.bukkitOwner = new CraftBlockInventoryHolder(world, pos, this); // CraftBukkit
+         }
+ 
+         @Override
+@@ -393,8 +420,15 @@
+ 
+         @Override
+         public void setChanged() {
++            // CraftBukkit start - allow putting items back (eg cancelled InventoryMoveItemEvent)
++            if (this.isEmpty()) {
+             ComposterBlock.empty((Entity) null, this.state, this.level, this.pos);
+             this.changed = true;
++            } else {
++                this.level.setBlock(this.pos, this.state, 3);
++                this.changed = false;
++            }
++            // CraftBukkit end
+         }
+     }
+ 
+@@ -407,6 +441,7 @@
+ 
+         public InputContainer(BlockState state, LevelAccessor world, BlockPos pos) {
+             super(1);
++            this.bukkitOwner = new CraftBlockInventoryHolder(world, pos, this); // CraftBukkit
+             this.state = state;
+             this.level = world;
+             this.pos = pos;
+@@ -449,8 +484,9 @@
+ 
+     public static class EmptyContainer extends SimpleContainer implements WorldlyContainer {
+ 
+-        public EmptyContainer() {
++        public EmptyContainer(LevelAccessor generatoraccess, BlockPos blockposition) { // CraftBukkit
+             super(0);
++            this.bukkitOwner = new CraftBlockInventoryHolder(generatoraccess, blockposition, this); // CraftBukkit
+         }
+ 
+         @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/ConcretePowderBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/ConcretePowderBlock.java.patch
new file mode 100644
index 0000000000..5778abe978
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/ConcretePowderBlock.java.patch
@@ -0,0 +1,76 @@
+--- a/net/minecraft/world/level/block/ConcretePowderBlock.java
++++ b/net/minecraft/world/level/block/ConcretePowderBlock.java
+@@ -15,6 +15,11 @@
+ import net.minecraft.world.level.ScheduledTickAccess;
+ import net.minecraft.world.level.block.state.BlockBehaviour;
+ import net.minecraft.world.level.block.state.BlockState;
++// CraftBukkit start
++import org.bukkit.craftbukkit.block.CraftBlockState;
++import org.bukkit.craftbukkit.block.CraftBlockStates;
++import org.bukkit.event.block.BlockFormEvent;
++// CraftBukkit end
+ 
+ public class ConcretePowderBlock extends FallingBlock {
+ 
+@@ -38,7 +43,7 @@
+     @Override
+     public void onLand(Level world, BlockPos pos, BlockState fallingBlockState, BlockState currentStateInPos, FallingBlockEntity fallingBlockEntity) {
+         if (ConcretePowderBlock.shouldSolidify(world, pos, currentStateInPos)) {
+-            world.setBlock(pos, this.concrete.defaultBlockState(), 3);
++            org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, pos, this.concrete.defaultBlockState(), 3); // CraftBukkit
+         }
+ 
+     }
+@@ -49,7 +54,24 @@
+         BlockPos blockposition = ctx.getClickedPos();
+         BlockState iblockdata = world.getBlockState(blockposition);
+ 
+-        return ConcretePowderBlock.shouldSolidify(world, blockposition, iblockdata) ? this.concrete.defaultBlockState() : super.getStateForPlacement(ctx);
++        // CraftBukkit start
++        if (!ConcretePowderBlock.shouldSolidify(world, blockposition, iblockdata)) {
++            return super.getStateForPlacement(ctx);
++        }
++
++        // TODO: An event factory call for methods like this
++        CraftBlockState blockState = CraftBlockStates.getBlockState(world, blockposition);
++        blockState.setData(this.concrete.defaultBlockState());
++
++        BlockFormEvent event = new BlockFormEvent(blockState.getBlock(), blockState);
++        world.getServer().server.getPluginManager().callEvent(event);
++
++        if (!event.isCancelled()) {
++            return blockState.getHandle();
++        }
++
++        return super.getStateForPlacement(ctx);
++        // CraftBukkit end
+     }
+ 
+     private static boolean shouldSolidify(BlockGetter world, BlockPos pos, BlockState state) {
+@@ -85,7 +107,25 @@
+ 
+     @Override
+     protected BlockState updateShape(BlockState state, LevelReader world, ScheduledTickAccess tickView, BlockPos pos, Direction direction, BlockPos neighborPos, BlockState neighborState, RandomSource random) {
+-        return ConcretePowderBlock.touchesLiquid(world, pos) ? this.concrete.defaultBlockState() : super.updateShape(state, world, tickView, pos, direction, neighborPos, neighborState, random);
++        // CraftBukkit start
++        if (ConcretePowderBlock.touchesLiquid(world, pos)) {
++            // Suppress during worldgen
++            if (!(world instanceof Level world1)) {
++                return this.concrete.defaultBlockState();
++            }
++            CraftBlockState blockState = CraftBlockStates.getBlockState(world1, pos);
++            blockState.setData(this.concrete.defaultBlockState());
++
++            BlockFormEvent event = new BlockFormEvent(blockState.getBlock(), blockState);
++            world1.getCraftServer().getPluginManager().callEvent(event);
++
++            if (!event.isCancelled()) {
++                return blockState.getHandle();
++            }
++        }
++
++        return super.updateShape(state, world, tickView, pos, direction, neighborPos, neighborState, random);
++        // CraftBukkit end
+     }
+ 
+     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/CoralBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/CoralBlock.java.patch
new file mode 100644
index 0000000000..389b3b96ec
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/CoralBlock.java.patch
@@ -0,0 +1,14 @@
+--- a/net/minecraft/world/level/block/CoralBlock.java
++++ b/net/minecraft/world/level/block/CoralBlock.java
+@@ -40,6 +40,11 @@
+     @Override
+     protected void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
+         if (!this.scanForWater(world, pos)) {
++            // CraftBukkit start
++            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, pos, this.deadBlock.defaultBlockState()).isCancelled()) {
++                return;
++            }
++            // CraftBukkit end
+             world.setBlock(pos, this.deadBlock.defaultBlockState(), 2);
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/CoralFanBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/CoralFanBlock.java.patch
new file mode 100644
index 0000000000..295f4f0049
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/CoralFanBlock.java.patch
@@ -0,0 +1,14 @@
+--- a/net/minecraft/world/level/block/CoralFanBlock.java
++++ b/net/minecraft/world/level/block/CoralFanBlock.java
+@@ -41,6 +41,11 @@
+     @Override
+     protected void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
+         if (!scanForWater(state, world, pos)) {
++            // CraftBukkit start
++            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, pos, this.deadBlock.defaultBlockState().setValue(CoralFanBlock.WATERLOGGED, false)).isCancelled()) {
++                return;
++            }
++            // CraftBukkit end
+             world.setBlock(pos, (BlockState) this.deadBlock.defaultBlockState().setValue(CoralFanBlock.WATERLOGGED, false), 2);
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/CoralPlantBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/CoralPlantBlock.java.patch
new file mode 100644
index 0000000000..bccf3cd4a0
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/CoralPlantBlock.java.patch
@@ -0,0 +1,14 @@
+--- a/net/minecraft/world/level/block/CoralPlantBlock.java
++++ b/net/minecraft/world/level/block/CoralPlantBlock.java
+@@ -46,6 +46,11 @@
+     @Override
+     protected void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
+         if (!scanForWater(state, world, pos)) {
++            // CraftBukkit start
++            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, pos, this.deadBlock.defaultBlockState().setValue(CoralPlantBlock.WATERLOGGED, false)).isCancelled()) {
++                return;
++            }
++            // CraftBukkit end
+             world.setBlock(pos, (BlockState) this.deadBlock.defaultBlockState().setValue(CoralPlantBlock.WATERLOGGED, false), 2);
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/CoralWallFanBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/CoralWallFanBlock.java.patch
new file mode 100644
index 0000000000..172e22d8b2
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/CoralWallFanBlock.java.patch
@@ -0,0 +1,14 @@
+--- a/net/minecraft/world/level/block/CoralWallFanBlock.java
++++ b/net/minecraft/world/level/block/CoralWallFanBlock.java
+@@ -41,6 +41,11 @@
+     @Override
+     protected void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
+         if (!scanForWater(state, world, pos)) {
++            // CraftBukkit start
++            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, pos, this.deadBlock.defaultBlockState().setValue(CoralWallFanBlock.WATERLOGGED, false).setValue(CoralWallFanBlock.FACING, state.getValue(CoralWallFanBlock.FACING))).isCancelled()) {
++                return;
++            }
++            // CraftBukkit end
+             world.setBlock(pos, (BlockState) ((BlockState) this.deadBlock.defaultBlockState().setValue(CoralWallFanBlock.WATERLOGGED, false)).setValue(CoralWallFanBlock.FACING, (Direction) state.getValue(CoralWallFanBlock.FACING)), 2);
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/CrafterBlock.patch b/paper-server/patches/sources/net/minecraft/world/level/block/CrafterBlock.java.patch
similarity index 57%
rename from paper-server/patches/sources/net/minecraft/world/level/block/CrafterBlock.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/CrafterBlock.java.patch
index fb402f84db..b3f1ac312a 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/CrafterBlock.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/CrafterBlock.java.patch
@@ -1,52 +1,57 @@
 --- a/net/minecraft/world/level/block/CrafterBlock.java
 +++ b/net/minecraft/world/level/block/CrafterBlock.java
-@@ -40,6 +40,15 @@
- import net.minecraft.world.phys.MovingObjectPositionBlock;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import net.minecraft.world.InventoryLargeChest;
+@@ -12,6 +12,7 @@
+ import net.minecraft.server.level.ServerLevel;
+ import net.minecraft.server.level.ServerPlayer;
+ import net.minecraft.util.RandomSource;
++import net.minecraft.world.CompoundContainer;
+ import net.minecraft.world.Container;
+ import net.minecraft.world.Containers;
+ import net.minecraft.world.InteractionResult;
+@@ -39,6 +40,12 @@
+ import net.minecraft.world.phys.AABB;
+ import net.minecraft.world.phys.BlockHitResult;
+ import net.minecraft.world.phys.Vec3;
 +import org.bukkit.craftbukkit.event.CraftEventFactory;
 +import org.bukkit.craftbukkit.inventory.CraftItemStack;
 +import org.bukkit.event.block.CrafterCraftEvent;
 +import org.bukkit.event.inventory.InventoryMoveItemEvent;
 +import org.bukkit.inventory.Inventory;
 +// CraftBukkit end
-+
- public class CrafterBlock extends BlockTileEntity {
  
-     public static final MapCodec<CrafterBlock> CODEC = simpleCodec(CrafterBlock::new);
-@@ -189,6 +198,13 @@
-                 RecipeHolder<RecipeCrafting> recipeholder = (RecipeHolder) optional.get();
-                 ItemStack itemstack = ((RecipeCrafting) recipeholder.value()).assemble(craftinginput, worldserver.registryAccess());
+ public class CrafterBlock extends BaseEntityBlock {
+ 
+@@ -189,6 +196,13 @@
+                 RecipeHolder<CraftingRecipe> recipeholder = (RecipeHolder) optional.get();
+                 ItemStack itemstack = ((CraftingRecipe) recipeholder.value()).assemble(craftinginput, world.registryAccess());
  
 +                // CraftBukkit start
-+                CrafterCraftEvent event = CraftEventFactory.callCrafterCraftEvent(blockposition, worldserver, crafterblockentity, itemstack, recipeholder);
++                CrafterCraftEvent event = CraftEventFactory.callCrafterCraftEvent(pos, world, crafterblockentity, itemstack, recipeholder);
 +                if (event.isCancelled()) {
 +                    return;
 +                }
 +                itemstack = CraftItemStack.asNMSCopy(event.getResult());
 +                // CraftBukkit end
                  if (itemstack.isEmpty()) {
-                     worldserver.levelEvent(1050, blockposition, 0);
+                     world.levelEvent(1050, pos, 0);
                  } else {
-@@ -227,7 +243,25 @@
-         ItemStack itemstack1 = itemstack.copy();
+@@ -227,7 +241,25 @@
+         ItemStack itemstack1 = stack.copy();
  
-         if (iinventory != null && (iinventory instanceof CrafterBlockEntity || itemstack.getCount() > iinventory.getMaxStackSize(itemstack))) {
+         if (iinventory != null && (iinventory instanceof CrafterBlockEntity || stack.getCount() > iinventory.getMaxStackSize(stack))) {
 +            // CraftBukkit start - InventoryMoveItemEvent
 +            CraftItemStack oitemstack = CraftItemStack.asCraftMirror(itemstack1);
 +
 +            Inventory destinationInventory;
 +            // Have to special case large chests as they work oddly
-+            if (iinventory instanceof InventoryLargeChest) {
-+                destinationInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest((InventoryLargeChest) iinventory);
++            if (iinventory instanceof CompoundContainer) {
++                destinationInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest((CompoundContainer) iinventory);
 +            } else {
 +                destinationInventory = iinventory.getOwner().getInventory();
 +            }
 +
-+            InventoryMoveItemEvent event = new InventoryMoveItemEvent(crafterblockentity.getOwner().getInventory(), oitemstack, destinationInventory, true);
-+            worldserver.getCraftServer().getPluginManager().callEvent(event);
++            InventoryMoveItemEvent event = new InventoryMoveItemEvent(blockEntity.getOwner().getInventory(), oitemstack, destinationInventory, true);
++            world.getCraftServer().getPluginManager().callEvent(event);
 +            itemstack1 = CraftItemStack.asNMSCopy(event.getItem());
              while (!itemstack1.isEmpty()) {
 +                if (event.isCancelled()) {
@@ -54,9 +59,9 @@
 +                }
 +                // CraftBukkit end
                  ItemStack itemstack2 = itemstack1.copyWithCount(1);
-                 ItemStack itemstack3 = TileEntityHopper.addItem(crafterblockentity, iinventory, itemstack2, enumdirection.getOpposite());
+                 ItemStack itemstack3 = HopperBlockEntity.addItem(blockEntity, iinventory, itemstack2, enumdirection.getOpposite());
  
-@@ -238,7 +272,25 @@
+@@ -238,7 +270,25 @@
                  itemstack1.shrink(1);
              }
          } else if (iinventory != null) {
@@ -65,14 +70,14 @@
 +
 +            Inventory destinationInventory;
 +            // Have to special case large chests as they work oddly
-+            if (iinventory instanceof InventoryLargeChest) {
-+                destinationInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest((InventoryLargeChest) iinventory);
++            if (iinventory instanceof CompoundContainer) {
++                destinationInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest((CompoundContainer) iinventory);
 +            } else {
 +                destinationInventory = iinventory.getOwner().getInventory();
 +            }
 +
-+            InventoryMoveItemEvent event = new InventoryMoveItemEvent(crafterblockentity.getOwner().getInventory(), oitemstack, destinationInventory, true);
-+            worldserver.getCraftServer().getPluginManager().callEvent(event);
++            InventoryMoveItemEvent event = new InventoryMoveItemEvent(blockEntity.getOwner().getInventory(), oitemstack, destinationInventory, true);
++            world.getCraftServer().getPluginManager().callEvent(event);
 +            itemstack1 = CraftItemStack.asNMSCopy(event.getItem());
              while (!itemstack1.isEmpty()) {
 +                if (event.isCancelled()) {
@@ -81,4 +86,4 @@
 +                // CraftBukkit end
                  int i = itemstack1.getCount();
  
-                 itemstack1 = TileEntityHopper.addItem(crafterblockentity, iinventory, itemstack1, enumdirection.getOpposite());
+                 itemstack1 = HopperBlockEntity.addItem(blockEntity, iinventory, itemstack1, enumdirection.getOpposite());
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/CropBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/CropBlock.java.patch
new file mode 100644
index 0000000000..d4ca1f405d
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/CropBlock.java.patch
@@ -0,0 +1,37 @@
+--- a/net/minecraft/world/level/block/CropBlock.java
++++ b/net/minecraft/world/level/block/CropBlock.java
+@@ -21,6 +21,7 @@
+ import net.minecraft.world.level.block.state.properties.IntegerProperty;
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
+ 
+ public class CropBlock extends BushBlock implements BonemealableBlock {
+ 
+@@ -83,7 +84,7 @@
+                 float f = CropBlock.getGrowthSpeed(this, world, pos);
+ 
+                 if (random.nextInt((int) (25.0F / f) + 1) == 0) {
+-                    world.setBlock(pos, this.getStateForAge(i + 1), 2);
++                    CraftEventFactory.handleBlockGrowEvent(world, pos, this.getStateForAge(i + 1), 2); // CraftBukkit
+                 }
+             }
+         }
+@@ -98,7 +99,7 @@
+             i = j;
+         }
+ 
+-        world.setBlock(pos, this.getStateForAge(i), 2);
++        CraftEventFactory.handleBlockGrowEvent(world, pos, this.getStateForAge(i), 2); // CraftBukkit
+     }
+ 
+     protected int getBonemealAgeIncrease(Level world) {
+@@ -161,7 +162,7 @@
+     @Override
+     protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) {
+         if (world instanceof ServerLevel worldserver) {
+-            if (entity instanceof Ravager && worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) {
++            if (entity instanceof Ravager && CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.AIR.defaultBlockState(), !worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING))) { // CraftBukkit
+                 worldserver.destroyBlock(pos, true, entity);
+             }
+         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/DaylightDetectorBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/DaylightDetectorBlock.java.patch
new file mode 100644
index 0000000000..4631339b55
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/DaylightDetectorBlock.java.patch
@@ -0,0 +1,10 @@
+--- a/net/minecraft/world/level/block/DaylightDetectorBlock.java
++++ b/net/minecraft/world/level/block/DaylightDetectorBlock.java
+@@ -74,6 +74,7 @@
+ 
+         i = Mth.clamp(i, 0, 15);
+         if ((Integer) state.getValue(DaylightDetectorBlock.POWER) != i) {
++            i = org.bukkit.craftbukkit.event.CraftEventFactory.callRedstoneChange(world, pos, ((Integer) state.getValue(DaylightDetectorBlock.POWER)), i).getNewCurrent(); // CraftBukkit - Call BlockRedstoneEvent
+             world.setBlock(pos, (BlockState) state.setValue(DaylightDetectorBlock.POWER, i), 3);
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/DecoratedPotBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/DecoratedPotBlock.java.patch
new file mode 100644
index 0000000000..6b148eba67
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/DecoratedPotBlock.java.patch
@@ -0,0 +1,14 @@
+--- a/net/minecraft/world/level/block/DecoratedPotBlock.java
++++ b/net/minecraft/world/level/block/DecoratedPotBlock.java
+@@ -240,6 +240,11 @@
+ 
+         if (world instanceof ServerLevel worldserver) {
+             if (projectile.mayInteract(worldserver, blockposition) && projectile.mayBreak(worldserver)) {
++                // CraftBukkit start - call EntityChangeBlockEvent
++                if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(projectile, blockposition, this.getFluidState(state).createLegacyBlock())) {
++                    return;
++                }
++                // CraftBukkit end
+                 world.setBlock(blockposition, (BlockState) state.setValue(DecoratedPotBlock.CRACKED, true), 4);
+                 world.destroyBlock(blockposition, true, projectile);
+             }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/DecoratedPotBlock.patch b/paper-server/patches/sources/net/minecraft/world/level/block/DecoratedPotBlock.patch
deleted file mode 100644
index a10aad16dd..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/DecoratedPotBlock.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/net/minecraft/world/level/block/DecoratedPotBlock.java
-+++ b/net/minecraft/world/level/block/DecoratedPotBlock.java
-@@ -240,6 +240,11 @@
- 
-         if (world instanceof WorldServer worldserver) {
-             if (iprojectile.mayInteract(worldserver, blockposition) && iprojectile.mayBreak(worldserver)) {
-+                // CraftBukkit start - call EntityChangeBlockEvent
-+                if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(iprojectile, blockposition, this.getFluidState(iblockdata).createLegacyBlock())) {
-+                    return;
-+                }
-+                // CraftBukkit end
-                 world.setBlock(blockposition, (IBlockData) iblockdata.setValue(DecoratedPotBlock.CRACKED, true), 4);
-                 world.destroyBlock(blockposition, true, iprojectile);
-             }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockMinecartDetector.patch b/paper-server/patches/sources/net/minecraft/world/level/block/DetectorRailBlock.java.patch
similarity index 50%
rename from paper-server/patches/sources/net/minecraft/world/level/block/BlockMinecartDetector.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/DetectorRailBlock.java.patch
index 0029fbfc6d..c5172657fa 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockMinecartDetector.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/DetectorRailBlock.java.patch
@@ -1,28 +1,28 @@
---- a/net/minecraft/world/level/block/BlockMinecartDetector.java
-+++ b/net/minecraft/world/level/block/BlockMinecartDetector.java
-@@ -27,6 +27,8 @@
+--- a/net/minecraft/world/level/block/DetectorRailBlock.java
++++ b/net/minecraft/world/level/block/DetectorRailBlock.java
+@@ -26,6 +26,7 @@
+ import net.minecraft.world.level.block.state.properties.RailShape;
  import net.minecraft.world.level.redstone.Orientation;
- import net.minecraft.world.phys.AxisAlignedBB;
- 
+ import net.minecraft.world.phys.AABB;
 +import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
-+
- public class BlockMinecartDetector extends BlockMinecartTrackAbstract {
  
-     public static final MapCodec<BlockMinecartDetector> CODEC = simpleCodec(BlockMinecartDetector::new);
-@@ -88,6 +90,16 @@
+ public class DetectorRailBlock extends BaseRailBlock {
+ 
+@@ -88,7 +89,17 @@
              }
  
-             IBlockData iblockdata1;
+             BlockState iblockdata1;
 +            // CraftBukkit start
 +            if (flag != flag1) {
-+                org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
-+
++                org.bukkit.block.Block block = world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ());
+ 
 +                BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, flag ? 15 : 0, flag1 ? 15 : 0);
 +                world.getCraftServer().getPluginManager().callEvent(eventRedstone);
 +
 +                flag1 = eventRedstone.getNewCurrent() > 0;
 +            }
 +            // CraftBukkit end
- 
++
              if (flag1 && !flag) {
-                 iblockdata1 = (IBlockData) iblockdata.setValue(BlockMinecartDetector.POWERED, true);
+                 iblockdata1 = (BlockState) state.setValue(DetectorRailBlock.POWERED, true);
+                 world.setBlock(pos, iblockdata1, 3);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/DiodeBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/DiodeBlock.java.patch
new file mode 100644
index 0000000000..91c2eb8ada
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/DiodeBlock.java.patch
@@ -0,0 +1,29 @@
+--- a/net/minecraft/world/level/block/DiodeBlock.java
++++ b/net/minecraft/world/level/block/DiodeBlock.java
+@@ -23,6 +23,7 @@
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.VoxelShape;
+ import net.minecraft.world.ticks.TickPriority;
++import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
+ 
+ public abstract class DiodeBlock extends HorizontalDirectionalBlock {
+ 
+@@ -59,8 +60,18 @@
+             boolean flag1 = this.shouldTurnOn(world, pos, state);
+ 
+             if (flag && !flag1) {
++                // CraftBukkit start
++                if (CraftEventFactory.callRedstoneChange(world, pos, 15, 0).getNewCurrent() != 0) {
++                    return;
++                }
++                // CraftBukkit end
+                 world.setBlock(pos, (BlockState) state.setValue(DiodeBlock.POWERED, false), 2);
+             } else if (!flag) {
++                // CraftBukkit start
++                if (CraftEventFactory.callRedstoneChange(world, pos, 0, 15).getNewCurrent() != 15) {
++                    return;
++                }
++                // CraftBukkit end
+                 world.setBlock(pos, (BlockState) state.setValue(DiodeBlock.POWERED, true), 2);
+                 if (!flag1) {
+                     world.scheduleTick(pos, (Block) this, this.getDelay(state), TickPriority.VERY_HIGH);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/DirtPathBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/DirtPathBlock.java.patch
new file mode 100644
index 0000000000..b394c4adfa
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/DirtPathBlock.java.patch
@@ -0,0 +1,14 @@
+--- a/net/minecraft/world/level/block/DirtPathBlock.java
++++ b/net/minecraft/world/level/block/DirtPathBlock.java
+@@ -51,6 +51,11 @@
+ 
+     @Override
+     protected void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
++        // CraftBukkit start - do not fade if the block is valid here
++        if (state.canSurvive(world, pos)) {
++            return;
++        }
++        // CraftBukkit end
+         FarmBlock.turnToDirt((Entity) null, state, world, pos);
+     }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/DispenserBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/DispenserBlock.java.patch
new file mode 100644
index 0000000000..70df1871a6
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/DispenserBlock.java.patch
@@ -0,0 +1,27 @@
+--- a/net/minecraft/world/level/block/DispenserBlock.java
++++ b/net/minecraft/world/level/block/DispenserBlock.java
+@@ -52,6 +52,7 @@
+     private static final DefaultDispenseItemBehavior DEFAULT_BEHAVIOR = new DefaultDispenseItemBehavior();
+     public static final Map<Item, DispenseItemBehavior> DISPENSER_REGISTRY = new IdentityHashMap();
+     private static final int TRIGGER_DURATION = 4;
++    public static boolean eventFired = false; // CraftBukkit
+ 
+     @Override
+     public MapCodec<? extends DispenserBlock> codec() {
+@@ -88,7 +89,7 @@
+     }
+ 
+     public void dispenseFrom(ServerLevel world, BlockState state, BlockPos pos) {
+-        DispenserBlockEntity tileentitydispenser = (DispenserBlockEntity) world.getBlockEntity(pos, BlockEntityType.DISPENSER).orElse((Object) null);
++        DispenserBlockEntity tileentitydispenser = (DispenserBlockEntity) world.getBlockEntity(pos, BlockEntityType.DISPENSER).orElse(null); // CraftBukkit - decompile error
+ 
+         if (tileentitydispenser == null) {
+             DispenserBlock.LOGGER.warn("Ignoring dispensing attempt for Dispenser without matching block entity at {}", pos);
+@@ -104,6 +105,7 @@
+                 DispenseItemBehavior idispensebehavior = this.getDispenseMethod(world, itemstack);
+ 
+                 if (idispensebehavior != DispenseItemBehavior.NOOP) {
++                    DispenserBlock.eventFired = false; // CraftBukkit - reset event status
+                     tileentitydispenser.setItem(i, idispensebehavior.dispense(sourceblock, itemstack));
+                 }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/DoorBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/DoorBlock.java.patch
new file mode 100644
index 0000000000..ea278f700f
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/DoorBlock.java.patch
@@ -0,0 +1,37 @@
+--- a/net/minecraft/world/level/block/DoorBlock.java
++++ b/net/minecraft/world/level/block/DoorBlock.java
+@@ -38,6 +38,7 @@
+ import net.minecraft.world.phys.Vec3;
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
+ 
+ public class DoorBlock extends Block {
+ 
+@@ -222,9 +223,24 @@
+ 
+     @Override
+     protected void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, @Nullable Orientation wireOrientation, boolean notify) {
+-        boolean flag1 = world.hasNeighborSignal(pos) || world.hasNeighborSignal(pos.relative(state.getValue(DoorBlock.HALF) == DoubleBlockHalf.LOWER ? Direction.UP : Direction.DOWN));
++        // CraftBukkit start
++        BlockPos otherHalf = pos.relative(state.getValue(DoorBlock.HALF) == DoubleBlockHalf.LOWER ? Direction.UP : Direction.DOWN);
+ 
+-        if (!this.defaultBlockState().is(sourceBlock) && flag1 != (Boolean) state.getValue(DoorBlock.POWERED)) {
++        org.bukkit.World bworld = world.getWorld();
++        org.bukkit.block.Block bukkitBlock = bworld.getBlockAt(pos.getX(), pos.getY(), pos.getZ());
++        org.bukkit.block.Block blockTop = bworld.getBlockAt(otherHalf.getX(), otherHalf.getY(), otherHalf.getZ());
++
++        int power = bukkitBlock.getBlockPower();
++        int powerTop = blockTop.getBlockPower();
++        if (powerTop > power) power = powerTop;
++        int oldPower = (Boolean) state.getValue(DoorBlock.POWERED) ? 15 : 0;
++
++        if (oldPower == 0 ^ power == 0) {
++            BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(bukkitBlock, oldPower, power);
++            world.getCraftServer().getPluginManager().callEvent(eventRedstone);
++
++            boolean flag1 = eventRedstone.getNewCurrent() > 0;
++            // CraftBukkit end
+             if (flag1 != (Boolean) state.getValue(DoorBlock.OPEN)) {
+                 this.playSound((Entity) null, world, pos, flag1);
+                 world.gameEvent((Entity) null, (Holder) (flag1 ? GameEvent.BLOCK_OPEN : GameEvent.BLOCK_CLOSE), pos);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/DoublePlantBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/DoublePlantBlock.java.patch
new file mode 100644
index 0000000000..a1fc02c3d4
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/DoublePlantBlock.java.patch
@@ -0,0 +1,14 @@
+--- a/net/minecraft/world/level/block/DoublePlantBlock.java
++++ b/net/minecraft/world/level/block/DoublePlantBlock.java
+@@ -103,6 +103,11 @@
+     }
+ 
+     protected static void preventDropFromBottomPart(Level world, BlockPos pos, BlockState state, Player player) {
++        // CraftBukkit start
++        if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockPhysicsEvent(world, pos).isCancelled()) {
++            return;
++        }
++        // CraftBukkit end
+         DoubleBlockHalf blockpropertydoubleblockhalf = (DoubleBlockHalf) state.getValue(DoublePlantBlock.HALF);
+ 
+         if (blockpropertydoubleblockhalf == DoubleBlockHalf.UPPER) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockDragonEgg.patch b/paper-server/patches/sources/net/minecraft/world/level/block/DragonEggBlock.java.patch
similarity index 53%
rename from paper-server/patches/sources/net/minecraft/world/level/block/BlockDragonEgg.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/DragonEggBlock.java.patch
index c7129ecff0..b73b669baf 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockDragonEgg.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/DragonEggBlock.java.patch
@@ -1,20 +1,19 @@
---- a/net/minecraft/world/level/block/BlockDragonEgg.java
-+++ b/net/minecraft/world/level/block/BlockDragonEgg.java
-@@ -16,6 +16,8 @@
+--- a/net/minecraft/world/level/block/DragonEggBlock.java
++++ b/net/minecraft/world/level/block/DragonEggBlock.java
+@@ -15,6 +15,7 @@
+ import net.minecraft.world.phys.BlockHitResult;
+ import net.minecraft.world.phys.shapes.CollisionContext;
  import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- 
 +import org.bukkit.event.block.BlockFromToEvent; // CraftBukkit
-+
- public class BlockDragonEgg extends BlockFalling {
  
-     public static final MapCodec<BlockDragonEgg> CODEC = simpleCodec(BlockDragonEgg::new);
-@@ -53,6 +55,18 @@
-             BlockPosition blockposition1 = blockposition.offset(world.random.nextInt(16) - world.random.nextInt(16), world.random.nextInt(8) - world.random.nextInt(8), world.random.nextInt(16) - world.random.nextInt(16));
+ public class DragonEggBlock extends FallingBlock {
+ 
+@@ -53,6 +54,18 @@
+             BlockPos blockposition1 = pos.offset(world.random.nextInt(16) - world.random.nextInt(16), world.random.nextInt(8) - world.random.nextInt(8), world.random.nextInt(16) - world.random.nextInt(16));
  
              if (world.getBlockState(blockposition1).isAir() && worldborder.isWithinBounds(blockposition1)) {
 +                // CraftBukkit start
-+                org.bukkit.block.Block from = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
++                org.bukkit.block.Block from = world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ());
 +                org.bukkit.block.Block to = world.getWorld().getBlockAt(blockposition1.getX(), blockposition1.getY(), blockposition1.getZ());
 +                BlockFromToEvent event = new BlockFromToEvent(from, to);
 +                org.bukkit.Bukkit.getPluginManager().callEvent(event);
@@ -23,7 +22,7 @@
 +                    return;
 +                }
 +
-+                blockposition1 = new BlockPosition(event.getToBlock().getX(), event.getToBlock().getY(), event.getToBlock().getZ());
++                blockposition1 = new BlockPos(event.getToBlock().getX(), event.getToBlock().getY(), event.getToBlock().getZ());
 +                // CraftBukkit end
                  if (world.isClientSide) {
                      for (int j = 0; j < 128; ++j) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/DropExperienceBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/DropExperienceBlock.java.patch
new file mode 100644
index 0000000000..4d0a4875d4
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/DropExperienceBlock.java.patch
@@ -0,0 +1,21 @@
+--- a/net/minecraft/world/level/block/DropExperienceBlock.java
++++ b/net/minecraft/world/level/block/DropExperienceBlock.java
+@@ -31,9 +31,16 @@
+     @Override
+     protected void spawnAfterBreak(BlockState state, ServerLevel world, BlockPos pos, ItemStack tool, boolean dropExperience) {
+         super.spawnAfterBreak(state, world, pos, tool, dropExperience);
+-        if (dropExperience) {
+-            this.tryDropExperience(world, pos, tool, this.xpRange);
++        // CraftBukkit start - Delegate to getExpDrop
++    }
++
++    @Override
++    public int getExpDrop(BlockState iblockdata, ServerLevel worldserver, BlockPos blockposition, ItemStack itemstack, boolean flag) {
++        if (flag) {
++            return this.tryDropExperience(worldserver, blockposition, itemstack, this.xpRange);
+         }
+ 
++        return 0;
++        // CraftBukkit end
+     }
+ }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/DropExperienceBlock.patch b/paper-server/patches/sources/net/minecraft/world/level/block/DropExperienceBlock.patch
deleted file mode 100644
index 6695cab721..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/DropExperienceBlock.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/net/minecraft/world/level/block/DropExperienceBlock.java
-+++ b/net/minecraft/world/level/block/DropExperienceBlock.java
-@@ -31,9 +31,16 @@
-     @Override
-     protected void spawnAfterBreak(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack, boolean flag) {
-         super.spawnAfterBreak(iblockdata, worldserver, blockposition, itemstack, flag);
-+        // CraftBukkit start - Delegate to getExpDrop
-+    }
-+
-+    @Override
-+    public int getExpDrop(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack, boolean flag) {
-         if (flag) {
--            this.tryDropExperience(worldserver, blockposition, itemstack, this.xpRange);
-+            return this.tryDropExperience(worldserver, blockposition, itemstack, this.xpRange);
-         }
- 
-+        return 0;
-+        // CraftBukkit end
-     }
- }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/DropperBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/DropperBlock.java.patch
new file mode 100644
index 0000000000..4012b1c469
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/DropperBlock.java.patch
@@ -0,0 +1,64 @@
+--- a/net/minecraft/world/level/block/DropperBlock.java
++++ b/net/minecraft/world/level/block/DropperBlock.java
+@@ -8,6 +8,7 @@
+ import net.minecraft.core.dispenser.DefaultDispenseItemBehavior;
+ import net.minecraft.core.dispenser.DispenseItemBehavior;
+ import net.minecraft.server.level.ServerLevel;
++import net.minecraft.world.CompoundContainer;
+ import net.minecraft.world.Container;
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.level.Level;
+@@ -19,12 +20,15 @@
+ import net.minecraft.world.level.block.state.BlockBehaviour;
+ import net.minecraft.world.level.block.state.BlockState;
+ import org.slf4j.Logger;
++import org.bukkit.craftbukkit.inventory.CraftItemStack;
++import org.bukkit.event.inventory.InventoryMoveItemEvent;
++// CraftBukkit end
+ 
+ public class DropperBlock extends DispenserBlock {
+ 
+     private static final Logger LOGGER = LogUtils.getLogger();
+     public static final MapCodec<DropperBlock> CODEC = simpleCodec(DropperBlock::new);
+-    private static final DispenseItemBehavior DISPENSE_BEHAVIOUR = new DefaultDispenseItemBehavior();
++    private static final DispenseItemBehavior DISPENSE_BEHAVIOUR = new DefaultDispenseItemBehavior(true); // CraftBukkit
+ 
+     @Override
+     public MapCodec<DropperBlock> codec() {
+@@ -47,7 +51,7 @@
+ 
+     @Override
+     public void dispenseFrom(ServerLevel world, BlockState state, BlockPos pos) {
+-        DispenserBlockEntity tileentitydispenser = (DispenserBlockEntity) world.getBlockEntity(pos, BlockEntityType.DROPPER).orElse((Object) null);
++        DispenserBlockEntity tileentitydispenser = (DispenserBlockEntity) world.getBlockEntity(pos, BlockEntityType.DROPPER).orElse(null); // CraftBukkit - decompile error
+ 
+         if (tileentitydispenser == null) {
+             DropperBlock.LOGGER.warn("Ignoring dispensing attempt for Dropper without matching block entity at {}", pos);
+@@ -68,8 +72,25 @@
+                     if (iinventory == null) {
+                         itemstack1 = DropperBlock.DISPENSE_BEHAVIOUR.dispense(sourceblock, itemstack);
+                     } else {
+-                        itemstack1 = HopperBlockEntity.addItem(tileentitydispenser, iinventory, itemstack.copyWithCount(1), enumdirection.getOpposite());
+-                        if (itemstack1.isEmpty()) {
++                        // CraftBukkit start - Fire event when pushing items into other inventories
++                        CraftItemStack oitemstack = CraftItemStack.asCraftMirror(itemstack.copyWithCount(1));
++
++                        org.bukkit.inventory.Inventory destinationInventory;
++                        // Have to special case large chests as they work oddly
++                        if (iinventory instanceof CompoundContainer) {
++                            destinationInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest((CompoundContainer) iinventory);
++                        } else {
++                            destinationInventory = iinventory.getOwner().getInventory();
++                        }
++
++                        InventoryMoveItemEvent event = new InventoryMoveItemEvent(tileentitydispenser.getOwner().getInventory(), oitemstack, destinationInventory, true);
++                        world.getCraftServer().getPluginManager().callEvent(event);
++                        if (event.isCancelled()) {
++                            return;
++                        }
++                        itemstack1 = HopperBlockEntity.addItem(tileentitydispenser, iinventory, CraftItemStack.asNMSCopy(event.getItem()), enumdirection.getOpposite());
++                        if (event.getItem().equals(oitemstack) && itemstack1.isEmpty()) {
++                            // CraftBukkit end
+                             itemstack1 = itemstack.copy();
+                             itemstack1.shrink(1);
+                         } else {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/EndGatewayBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/EndGatewayBlock.java.patch
new file mode 100644
index 0000000000..23e11ecf95
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/EndGatewayBlock.java.patch
@@ -0,0 +1,21 @@
+--- a/net/minecraft/world/level/block/EndGatewayBlock.java
++++ b/net/minecraft/world/level/block/EndGatewayBlock.java
+@@ -22,6 +22,9 @@
+ import net.minecraft.world.level.material.Fluid;
+ import net.minecraft.world.level.portal.TeleportTransition;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import org.bukkit.event.player.PlayerTeleportEvent;
++// CraftBukkit end
+ 
+ public class EndGatewayBlock extends BaseEntityBlock implements Portal {
+ 
+@@ -112,7 +115,7 @@
+         if (tileentity instanceof TheEndGatewayBlockEntity tileentityendgateway) {
+             Vec3 vec3d = tileentityendgateway.getPortalPosition(world, pos);
+ 
+-            return vec3d == null ? null : (entity instanceof ThrownEnderpearl ? new TeleportTransition(world, vec3d, Vec3.ZERO, 0.0F, 0.0F, Set.of(), TeleportTransition.PLACE_PORTAL_TICKET) : new TeleportTransition(world, vec3d, Vec3.ZERO, 0.0F, 0.0F, Relative.union(Relative.DELTA, Relative.ROTATION), TeleportTransition.PLACE_PORTAL_TICKET));
++            return vec3d == null ? null : (entity instanceof ThrownEnderpearl ? new TeleportTransition(world, vec3d, Vec3.ZERO, 0.0F, 0.0F, Set.of(), TeleportTransition.PLACE_PORTAL_TICKET, PlayerTeleportEvent.TeleportCause.END_GATEWAY) : new TeleportTransition(world, vec3d, Vec3.ZERO, 0.0F, 0.0F, Relative.union(Relative.DELTA, Relative.ROTATION), TeleportTransition.PLACE_PORTAL_TICKET, PlayerTeleportEvent.TeleportCause.END_GATEWAY)); // CraftBukkit
+         } else {
+             return null;
+         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockEnderPortal.patch b/paper-server/patches/sources/net/minecraft/world/level/block/EndPortalBlock.java.patch
similarity index 53%
rename from paper-server/patches/sources/net/minecraft/world/level/block/BlockEnderPortal.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/EndPortalBlock.java.patch
index 85f651ffb3..005cd154e3 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockEnderPortal.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/EndPortalBlock.java.patch
@@ -1,13 +1,18 @@
---- a/net/minecraft/world/level/block/BlockEnderPortal.java
-+++ b/net/minecraft/world/level/block/BlockEnderPortal.java
-@@ -26,6 +26,19 @@
+--- a/net/minecraft/world/level/block/EndPortalBlock.java
++++ b/net/minecraft/world/level/block/EndPortalBlock.java
+@@ -19,12 +19,23 @@
+ import net.minecraft.world.level.block.entity.TheEndPortalBlockEntity;
+ import net.minecraft.world.level.block.state.BlockBehaviour;
+ import net.minecraft.world.level.block.state.BlockState;
++import net.minecraft.world.level.dimension.LevelStem;
+ import net.minecraft.world.level.levelgen.feature.EndPlatformFeature;
+ import net.minecraft.world.level.material.Fluid;
+ import net.minecraft.world.level.portal.TeleportTransition;
+ import net.minecraft.world.phys.Vec3;
+ import net.minecraft.world.phys.shapes.CollisionContext;
  import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- 
 +// CraftBukkit start
 +import java.util.List;
-+import net.minecraft.server.level.EntityPlayer;
-+import net.minecraft.world.level.dimension.WorldDimension;
 +import org.bukkit.Location;
 +import org.bukkit.craftbukkit.CraftWorld;
 +import org.bukkit.craftbukkit.event.CraftPortalEvent;
@@ -16,47 +21,46 @@
 +import org.bukkit.event.player.PlayerRespawnEvent;
 +import org.bukkit.event.player.PlayerTeleportEvent;
 +// CraftBukkit end
-+
- public class BlockEnderPortal extends BlockTileEntity implements Portal {
  
-     public static final MapCodec<BlockEnderPortal> CODEC = simpleCodec(BlockEnderPortal::new);
-@@ -58,6 +71,10 @@
+ public class EndPortalBlock extends BaseEntityBlock implements Portal {
+ 
+@@ -58,6 +69,10 @@
      @Override
-     protected void entityInside(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
+     protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) {
          if (entity.canUsePortal(false)) {
 +            // CraftBukkit start - Entity in portal
-+            EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), blockposition.getX(), blockposition.getY(), blockposition.getZ()));
++            EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), pos.getX(), pos.getY(), pos.getZ()));
 +            world.getCraftServer().getPluginManager().callEvent(event);
 +            // CraftBukkit end
-             if (!world.isClientSide && world.dimension() == World.END && entity instanceof EntityPlayer) {
-                 EntityPlayer entityplayer = (EntityPlayer) entity;
+             if (!world.isClientSide && world.dimension() == Level.END && entity instanceof ServerPlayer) {
+                 ServerPlayer entityplayer = (ServerPlayer) entity;
  
-@@ -74,11 +91,11 @@
+@@ -74,11 +89,11 @@
  
      @Override
-     public TeleportTransition getPortalDestination(WorldServer worldserver, Entity entity, BlockPosition blockposition) {
--        ResourceKey<World> resourcekey = worldserver.dimension() == World.END ? World.OVERWORLD : World.END;
-+        ResourceKey<World> resourcekey = worldserver.getTypeKey() == WorldDimension.END ? World.OVERWORLD : World.END; // CraftBukkit - SPIGOT-6152: send back to main overworld in custom ends
-         WorldServer worldserver1 = worldserver.getServer().getLevel(resourcekey);
+     public TeleportTransition getPortalDestination(ServerLevel world, Entity entity, BlockPos pos) {
+-        ResourceKey<Level> resourcekey = world.dimension() == Level.END ? Level.OVERWORLD : Level.END;
++        ResourceKey<Level> resourcekey = world.getTypeKey() == LevelStem.END ? Level.OVERWORLD : Level.END; // CraftBukkit - SPIGOT-6152: send back to main overworld in custom ends
+         ServerLevel worldserver1 = world.getServer().getLevel(resourcekey);
  
          if (worldserver1 == null) {
 -            return null;
 +            return new TeleportTransition(PlayerTeleportEvent.TeleportCause.END_PORTAL); // CraftBukkit- always fire event in case plugins wish to change it
          } else {
-             boolean flag = resourcekey == World.END;
-             BlockPosition blockposition1 = flag ? WorldServer.END_SPAWN_POINT : worldserver1.getSharedSpawnPos();
-@@ -87,7 +104,7 @@
+             boolean flag = resourcekey == Level.END;
+             BlockPos blockposition1 = flag ? ServerLevel.END_SPAWN_POINT : worldserver1.getSharedSpawnPos();
+@@ -87,7 +102,7 @@
              Set set;
  
              if (flag) {
--                EndPlatformFeature.createEndPlatform(worldserver1, BlockPosition.containing(vec3d).below(), true);
-+                EndPlatformFeature.createEndPlatform(worldserver1, BlockPosition.containing(vec3d).below(), true, entity); // CraftBukkit
-                 f = EnumDirection.WEST.toYRot();
+-                EndPlatformFeature.createEndPlatform(worldserver1, BlockPos.containing(vec3d).below(), true);
++                EndPlatformFeature.createEndPlatform(worldserver1, BlockPos.containing(vec3d).below(), true, entity); // CraftBukkit
+                 f = Direction.WEST.toYRot();
                  set = Relative.union(Relative.DELTA, Set.of(Relative.X_ROT));
-                 if (entity instanceof EntityPlayer) {
-@@ -99,13 +116,21 @@
-                 if (entity instanceof EntityPlayer) {
-                     EntityPlayer entityplayer = (EntityPlayer) entity;
+                 if (entity instanceof ServerPlayer) {
+@@ -99,13 +114,21 @@
+                 if (entity instanceof ServerPlayer) {
+                     ServerPlayer entityplayer = (ServerPlayer) entity;
  
 -                    return entityplayer.findRespawnPositionAndUseSpawnBlock(false, TeleportTransition.DO_NOTHING);
 +                    return entityplayer.findRespawnPositionAndUseSpawnBlock(false, TeleportTransition.DO_NOTHING, PlayerRespawnEvent.RespawnReason.END_PORTAL); // CraftBukkit
@@ -65,7 +69,7 @@
                  vec3d = entity.adjustSpawnLocation(worldserver1, blockposition1).getBottomCenter();
              }
  
--            return new TeleportTransition(worldserver1, vec3d, Vec3D.ZERO, f, 0.0F, set, TeleportTransition.PLAY_PORTAL_SOUND.then(TeleportTransition.PLACE_PORTAL_TICKET));
+-            return new TeleportTransition(worldserver1, vec3d, Vec3.ZERO, f, 0.0F, set, TeleportTransition.PLAY_PORTAL_SOUND.then(TeleportTransition.PLACE_PORTAL_TICKET));
 +            // CraftBukkit start
 +            CraftPortalEvent event = entity.callPortalEvent(entity, CraftLocation.toBukkit(vec3d, worldserver1.getWorld(), f, entity.getXRot()), PlayerTeleportEvent.TeleportCause.END_PORTAL, 0, 0);
 +            if (event == null) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/FarmBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/FarmBlock.java.patch
new file mode 100644
index 0000000000..b802c6ae1f
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/FarmBlock.java.patch
@@ -0,0 +1,68 @@
+--- a/net/minecraft/world/level/block/FarmBlock.java
++++ b/net/minecraft/world/level/block/FarmBlock.java
+@@ -29,6 +29,10 @@
+ import net.minecraft.world.level.pathfinder.PathComputationType;
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++// CraftBukkit start
++import org.bukkit.event.entity.EntityInteractEvent;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++// CraftBukkit end
+ 
+ public class FarmBlock extends Block {
+ 
+@@ -92,28 +96,51 @@
+ 
+         if (!FarmBlock.isNearWater(world, pos) && !world.isRainingAt(pos.above())) {
+             if (i > 0) {
+-                world.setBlock(pos, (BlockState) state.setValue(FarmBlock.MOISTURE, i - 1), 2);
++                org.bukkit.craftbukkit.event.CraftEventFactory.handleMoistureChangeEvent(world, pos, (BlockState) state.setValue(FarmBlock.MOISTURE, i - 1), 2); // CraftBukkit
+             } else if (!FarmBlock.shouldMaintainFarmland(world, pos)) {
+                 FarmBlock.turnToDirt((Entity) null, state, world, pos);
+             }
+         } else if (i < 7) {
+-            world.setBlock(pos, (BlockState) state.setValue(FarmBlock.MOISTURE, 7), 2);
++            org.bukkit.craftbukkit.event.CraftEventFactory.handleMoistureChangeEvent(world, pos, (BlockState) state.setValue(FarmBlock.MOISTURE, 7), 2); // CraftBukkit
+         }
+ 
+     }
+ 
+     @Override
+     public void fallOn(Level world, BlockState state, BlockPos pos, Entity entity, float fallDistance) {
++        super.fallOn(world, state, pos, entity, fallDistance); // CraftBukkit - moved here as game rules / events shouldn't affect fall damage.
+         if (world instanceof ServerLevel worldserver) {
+             if (world.random.nextFloat() < fallDistance - 0.5F && entity instanceof LivingEntity && (entity instanceof Player || worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING)) && entity.getBbWidth() * entity.getBbWidth() * entity.getBbHeight() > 0.512F) {
++                // CraftBukkit start - Interact soil
++                org.bukkit.event.Cancellable cancellable;
++                if (entity instanceof Player) {
++                    cancellable = CraftEventFactory.callPlayerInteractEvent((Player) entity, org.bukkit.event.block.Action.PHYSICAL, pos, null, null, null);
++                } else {
++                    cancellable = new EntityInteractEvent(entity.getBukkitEntity(), world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()));
++                    world.getCraftServer().getPluginManager().callEvent((EntityInteractEvent) cancellable);
++                }
++
++                if (cancellable.isCancelled()) {
++                    return;
++                }
++
++                if (!CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.DIRT.defaultBlockState())) {
++                    return;
++                }
++                // CraftBukkit end
+                 FarmBlock.turnToDirt(entity, state, world, pos);
+             }
+         }
+ 
+-        super.fallOn(world, state, pos, entity, fallDistance);
++        // super.fallOn(world, iblockdata, blockposition, entity, f); // CraftBukkit - moved up
+     }
+ 
+     public static void turnToDirt(@Nullable Entity entity, BlockState state, Level world, BlockPos pos) {
++        // CraftBukkit start
++        if (CraftEventFactory.callBlockFadeEvent(world, pos, Blocks.DIRT.defaultBlockState()).isCancelled()) {
++            return;
++        }
++        // CraftBukkit end
+         BlockState iblockdata1 = pushEntitiesUp(state, Blocks.DIRT.defaultBlockState(), world, pos);
+ 
+         world.setBlockAndUpdate(pos, iblockdata1);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/FenceGateBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/FenceGateBlock.java.patch
new file mode 100644
index 0000000000..78872a0616
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/FenceGateBlock.java.patch
@@ -0,0 +1,20 @@
+--- a/net/minecraft/world/level/block/FenceGateBlock.java
++++ b/net/minecraft/world/level/block/FenceGateBlock.java
+@@ -173,6 +173,17 @@
+     protected void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, @Nullable Orientation wireOrientation, boolean notify) {
+         if (!world.isClientSide) {
+             boolean flag1 = world.hasNeighborSignal(pos);
++            // CraftBukkit start
++            boolean oldPowered = state.getValue(FenceGateBlock.POWERED);
++            if (oldPowered != flag1) {
++                int newPower = flag1 ? 15 : 0;
++                int oldPower = oldPowered ? 15 : 0;
++                org.bukkit.block.Block bukkitBlock = org.bukkit.craftbukkit.block.CraftBlock.at(world, pos);
++                org.bukkit.event.block.BlockRedstoneEvent eventRedstone = new org.bukkit.event.block.BlockRedstoneEvent(bukkitBlock, oldPower, newPower);
++                world.getCraftServer().getPluginManager().callEvent(eventRedstone);
++                flag1 = eventRedstone.getNewCurrent() > 0;
++            }
++            // CraftBukkit end
+ 
+             if ((Boolean) state.getValue(FenceGateBlock.POWERED) != flag1) {
+                 world.setBlock(pos, (BlockState) ((BlockState) state.setValue(FenceGateBlock.POWERED, flag1)).setValue(FenceGateBlock.OPEN, flag1), 2);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/FireBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/FireBlock.java.patch
new file mode 100644
index 0000000000..dbece02a47
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/FireBlock.java.patch
@@ -0,0 +1,187 @@
+--- a/net/minecraft/world/level/block/FireBlock.java
++++ b/net/minecraft/world/level/block/FireBlock.java
+@@ -14,6 +14,7 @@
+ import net.minecraft.tags.BiomeTags;
+ import net.minecraft.util.RandomSource;
+ import net.minecraft.world.item.context.BlockPlaceContext;
++import net.minecraft.world.item.context.UseOnContext;
+ import net.minecraft.world.level.BlockGetter;
+ import net.minecraft.world.level.GameRules;
+ import net.minecraft.world.level.Level;
+@@ -28,6 +29,12 @@
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.Shapes;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++import org.bukkit.craftbukkit.block.CraftBlockState;
++import org.bukkit.craftbukkit.block.CraftBlockStates;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.event.block.BlockBurnEvent;
++import org.bukkit.event.block.BlockFadeEvent;
++// CraftBukkit end
+ 
+ public class FireBlock extends BaseFireBlock {
+ 
+@@ -100,7 +107,24 @@
+ 
+     @Override
+     protected BlockState updateShape(BlockState state, LevelReader world, ScheduledTickAccess tickView, BlockPos pos, Direction direction, BlockPos neighborPos, BlockState neighborState, RandomSource random) {
+-        return this.canSurvive(state, world, pos) ? this.getStateWithAge(world, pos, (Integer) state.getValue(FireBlock.AGE)) : Blocks.AIR.defaultBlockState();
++        // CraftBukkit start
++        if (!this.canSurvive(state, world, pos)) {
++            // Suppress during worldgen
++            if (!(world instanceof Level world1)) {
++                return Blocks.AIR.defaultBlockState();
++            }
++            CraftBlockState blockState = CraftBlockStates.getBlockState(world1, pos);
++            blockState.setData(Blocks.AIR.defaultBlockState());
++
++            BlockFadeEvent event = new BlockFadeEvent(blockState.getBlock(), blockState);
++            world1.getCraftServer().getPluginManager().callEvent(event);
++
++            if (!event.isCancelled()) {
++                return blockState.getHandle();
++            }
++        }
++        return this.getStateWithAge(world, pos, (Integer) state.getValue(FireBlock.AGE));
++        // CraftBukkit end
+     }
+ 
+     @Override
+@@ -149,7 +173,7 @@
+         world.scheduleTick(pos, (Block) this, FireBlock.getFireTickDelay(world.random));
+         if (world.getGameRules().getBoolean(GameRules.RULE_DOFIRETICK)) {
+             if (!state.canSurvive(world, pos)) {
+-                world.removeBlock(pos, false);
++                this.fireExtinguished(world, pos); // CraftBukkit - invalid place location
+             }
+ 
+             BlockState iblockdata1 = world.getBlockState(pos.below());
+@@ -157,7 +181,7 @@
+             int i = (Integer) state.getValue(FireBlock.AGE);
+ 
+             if (!flag && world.isRaining() && this.isNearRain(world, pos) && random.nextFloat() < 0.2F + (float) i * 0.03F) {
+-                world.removeBlock(pos, false);
++                this.fireExtinguished(world, pos); // CraftBukkit - extinguished by rain
+             } else {
+                 int j = Math.min(15, i + random.nextInt(3) / 2);
+ 
+@@ -171,14 +195,14 @@
+                         BlockPos blockposition1 = pos.below();
+ 
+                         if (!world.getBlockState(blockposition1).isFaceSturdy(world, blockposition1, Direction.UP) || i > 3) {
+-                            world.removeBlock(pos, false);
++                            this.fireExtinguished(world, pos); // CraftBukkit
+                         }
+ 
+                         return;
+                     }
+ 
+                     if (i == 15 && random.nextInt(4) == 0 && !this.canBurn(world.getBlockState(pos.below()))) {
+-                        world.removeBlock(pos, false);
++                        this.fireExtinguished(world, pos); // CraftBukkit
+                         return;
+                     }
+                 }
+@@ -186,12 +210,14 @@
+                 boolean flag1 = world.getBiome(pos).is(BiomeTags.INCREASED_FIRE_BURNOUT);
+                 int k = flag1 ? -50 : 0;
+ 
+-                this.checkBurnOut(world, pos.east(), 300 + k, random, i);
+-                this.checkBurnOut(world, pos.west(), 300 + k, random, i);
+-                this.checkBurnOut(world, pos.below(), 250 + k, random, i);
+-                this.checkBurnOut(world, pos.above(), 250 + k, random, i);
+-                this.checkBurnOut(world, pos.north(), 300 + k, random, i);
+-                this.checkBurnOut(world, pos.south(), 300 + k, random, i);
++                // CraftBukkit start - add source blockposition to burn calls
++                this.trySpread(world, pos.east(), 300 + k, random, i, pos);
++                this.trySpread(world, pos.west(), 300 + k, random, i, pos);
++                this.trySpread(world, pos.below(), 250 + k, random, i, pos);
++                this.trySpread(world, pos.above(), 250 + k, random, i, pos);
++                this.trySpread(world, pos.north(), 300 + k, random, i, pos);
++                this.trySpread(world, pos.south(), 300 + k, random, i, pos);
++                // CraftBukkit end
+                 BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
+ 
+                 for (int l = -1; l <= 1; ++l) {
+@@ -217,7 +243,15 @@
+                                     if (i2 > 0 && random.nextInt(k1) <= i2 && (!world.isRaining() || !this.isNearRain(world, blockposition_mutableblockposition))) {
+                                         int j2 = Math.min(15, i + random.nextInt(5) / 4);
+ 
+-                                        world.setBlock(blockposition_mutableblockposition, this.getStateWithAge(world, blockposition_mutableblockposition, j2), 3);
++                                        // CraftBukkit start - Call to stop spread of fire
++                                        if (world.getBlockState(blockposition_mutableblockposition).getBlock() != Blocks.FIRE) {
++                                            if (CraftEventFactory.callBlockIgniteEvent(world, blockposition_mutableblockposition, pos).isCancelled()) {
++                                                continue;
++                                            }
++
++                                            CraftEventFactory.handleBlockSpreadEvent(world, pos, blockposition_mutableblockposition, this.getStateWithAge(world, blockposition_mutableblockposition, j2), 3); // CraftBukkit
++                                        }
++                                        // CraftBukkit end
+                                     }
+                                 }
+                             }
+@@ -241,24 +275,40 @@
+         return state.hasProperty(BlockStateProperties.WATERLOGGED) && (Boolean) state.getValue(BlockStateProperties.WATERLOGGED) ? 0 : this.igniteOdds.getInt(state.getBlock());
+     }
+ 
+-    private void checkBurnOut(Level world, BlockPos pos, int spreadFactor, RandomSource random, int currentAge) {
+-        int k = this.getBurnOdds(world.getBlockState(pos));
++    private void trySpread(Level world, BlockPos blockposition, int i, RandomSource randomsource, int j, BlockPos sourceposition) { // CraftBukkit add sourceposition
++        int k = this.getBurnOdds(world.getBlockState(blockposition));
+ 
+-        if (random.nextInt(spreadFactor) < k) {
+-            BlockState iblockdata = world.getBlockState(pos);
++        if (randomsource.nextInt(i) < k) {
++            BlockState iblockdata = world.getBlockState(blockposition);
+ 
+-            if (random.nextInt(currentAge + 10) < 5 && !world.isRainingAt(pos)) {
+-                int l = Math.min(currentAge + random.nextInt(5) / 4, 15);
++            // CraftBukkit start
++            org.bukkit.block.Block theBlock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
++            org.bukkit.block.Block sourceBlock = world.getWorld().getBlockAt(sourceposition.getX(), sourceposition.getY(), sourceposition.getZ());
+ 
+-                world.setBlock(pos, this.getStateWithAge(world, pos, l), 3);
++            BlockBurnEvent event = new BlockBurnEvent(theBlock, sourceBlock);
++            world.getCraftServer().getPluginManager().callEvent(event);
++
++            if (event.isCancelled()) {
++                return;
++            }
++
++            if (iblockdata.getBlock() instanceof TntBlock && !CraftEventFactory.callTNTPrimeEvent(world, blockposition, org.bukkit.event.block.TNTPrimeEvent.PrimeCause.FIRE, null, sourceposition)) {
++                return;
++            }
++            // CraftBukkit end
++
++            if (randomsource.nextInt(j + 10) < 5 && !world.isRainingAt(blockposition)) {
++                int l = Math.min(j + randomsource.nextInt(5) / 4, 15);
++
++                world.setBlock(blockposition, this.getStateWithAge(world, blockposition, l), 3);
+             } else {
+-                world.removeBlock(pos, false);
++                world.removeBlock(blockposition, false);
+             }
+ 
+             Block block = iblockdata.getBlock();
+ 
+             if (block instanceof TntBlock) {
+-                TntBlock.explode(world, pos);
++                TntBlock.explode(world, blockposition);
+             }
+         }
+ 
+@@ -310,9 +360,11 @@
+     }
+ 
+     @Override
+-    protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) {
+-        super.onPlace(state, world, pos, oldState, notify);
+-        world.scheduleTick(pos, (Block) this, FireBlock.getFireTickDelay(world.random));
++    // CraftBukkit start - context
++    protected void onPlace(BlockState iblockdata, Level world, BlockPos blockposition, BlockState iblockdata1, boolean flag, UseOnContext context) {
++        super.onPlace(iblockdata, world, blockposition, iblockdata1, flag, context);
++        // CraftBukkit end
++        world.scheduleTick(blockposition, (Block) this, FireBlock.getFireTickDelay(world.random));
+     }
+ 
+     private static int getFireTickDelay(RandomSource random) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/FungusBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/FungusBlock.java.patch
new file mode 100644
index 0000000000..6508c8df14
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/FungusBlock.java.patch
@@ -0,0 +1,16 @@
+--- a/net/minecraft/world/level/block/FungusBlock.java
++++ b/net/minecraft/world/level/block/FungusBlock.java
+@@ -74,6 +74,13 @@
+     @Override
+     public void performBonemeal(ServerLevel world, RandomSource random, BlockPos pos, BlockState state) {
+         this.getFeature(world).ifPresent((holder) -> {
++            // CraftBukkit start
++            if (this == Blocks.WARPED_FUNGUS) {
++                SaplingBlock.treeType = org.bukkit.TreeType.WARPED_FUNGUS;
++            } else if (this == Blocks.CRIMSON_FUNGUS) {
++                SaplingBlock.treeType = org.bukkit.TreeType.CRIMSON_FUNGUS;
++            }
++            // CraftBukkit end
+             ((ConfiguredFeature) holder.value()).place(world, world.getChunkSource().getGenerator(), random, pos);
+         });
+     }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/GrowingPlantHeadBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/GrowingPlantHeadBlock.java.patch
new file mode 100644
index 0000000000..042b294aae
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/GrowingPlantHeadBlock.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/level/block/GrowingPlantHeadBlock.java
++++ b/net/minecraft/world/level/block/GrowingPlantHeadBlock.java
+@@ -48,7 +48,7 @@
+             BlockPos blockposition1 = pos.relative(this.growthDirection);
+ 
+             if (this.canGrowInto(world.getBlockState(blockposition1))) {
+-                world.setBlockAndUpdate(blockposition1, this.getGrowIntoState(state, world.random));
++                org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, pos, blockposition1, this.getGrowIntoState(state, world.random)); // CraftBukkit
+             }
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/IceBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/IceBlock.java.patch
new file mode 100644
index 0000000000..3d51dab254
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/IceBlock.java.patch
@@ -0,0 +1,14 @@
+--- a/net/minecraft/world/level/block/IceBlock.java
++++ b/net/minecraft/world/level/block/IceBlock.java
+@@ -60,6 +60,11 @@
+     }
+ 
+     protected void melt(BlockState state, Level world, BlockPos pos) {
++        // CraftBukkit start
++        if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, pos, world.dimensionType().ultraWarm() ? Blocks.AIR.defaultBlockState() : Blocks.WATER.defaultBlockState()).isCancelled()) {
++            return;
++        }
++        // CraftBukkit end
+         if (world.dimensionType().ultraWarm()) {
+             world.removeBlock(pos, false);
+         } else {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/InfestedBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/InfestedBlock.java.patch
new file mode 100644
index 0000000000..49d54e7dd2
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/InfestedBlock.java.patch
@@ -0,0 +1,19 @@
+--- a/net/minecraft/world/level/block/InfestedBlock.java
++++ b/net/minecraft/world/level/block/InfestedBlock.java
+@@ -19,6 +19,7 @@
+ import net.minecraft.world.level.block.state.BlockBehaviour;
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.level.block.state.properties.Property;
++import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason; // CraftBukkit
+ 
+ public class InfestedBlock extends Block {
+ 
+@@ -54,7 +55,7 @@
+ 
+         if (entitysilverfish != null) {
+             entitysilverfish.moveTo((double) pos.getX() + 0.5D, (double) pos.getY(), (double) pos.getZ() + 0.5D, 0.0F, 0.0F);
+-            world.addFreshEntity(entitysilverfish);
++            world.addFreshEntity(entitysilverfish, SpawnReason.SILVERFISH_BLOCK); // CraftBukkit - add SpawnReason
+             entitysilverfish.spawnAnim();
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/LayeredCauldronBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/LayeredCauldronBlock.java.patch
new file mode 100644
index 0000000000..b90dea5eb0
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/LayeredCauldronBlock.java.patch
@@ -0,0 +1,107 @@
+--- a/net/minecraft/world/level/block/LayeredCauldronBlock.java
++++ b/net/minecraft/world/level/block/LayeredCauldronBlock.java
+@@ -17,6 +17,11 @@
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import net.minecraft.world.level.material.Fluid;
+ import net.minecraft.world.level.material.Fluids;
++// CraftBukkit start
++import org.bukkit.craftbukkit.block.CraftBlockState;
++import org.bukkit.craftbukkit.block.CraftBlockStates;
++import org.bukkit.event.block.CauldronLevelChangeEvent;
++// CraftBukkit end
+ 
+ public class LayeredCauldronBlock extends AbstractCauldronBlock {
+ 
+@@ -64,39 +69,67 @@
+     protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) {
+         if (world instanceof ServerLevel worldserver) {
+             if (entity.isOnFire() && this.isEntityInsideContent(state, pos, entity)) {
+-                entity.clearFire();
++                // CraftBukkit start - moved down
++                // entity.clearFire();
+                 if (entity.mayInteract(worldserver, pos)) {
+-                    this.handleEntityOnFireInside(state, world, pos);
++                    if (this.handleEntityOnFireInside(state, world, pos, entity)) {
++                        entity.clearFire();
++                    }
++                    // CraftBukkit end
+                 }
+             }
+         }
+ 
+     }
+ 
+-    private void handleEntityOnFireInside(BlockState state, Level world, BlockPos pos) {
++    // CraftBukkit start
++    private boolean handleEntityOnFireInside(BlockState iblockdata, Level world, BlockPos blockposition, Entity entity) {
+         if (this.precipitationType == Biome.Precipitation.SNOW) {
+-            LayeredCauldronBlock.lowerFillLevel((BlockState) Blocks.WATER_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, (Integer) state.getValue(LayeredCauldronBlock.LEVEL)), world, pos);
++            return LayeredCauldronBlock.lowerFillLevel((BlockState) Blocks.WATER_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, (Integer) iblockdata.getValue(LayeredCauldronBlock.LEVEL)), world, blockposition, entity, CauldronLevelChangeEvent.ChangeReason.EXTINGUISH);
+         } else {
+-            LayeredCauldronBlock.lowerFillLevel(state, world, pos);
++            return LayeredCauldronBlock.lowerFillLevel(iblockdata, world, blockposition, entity, CauldronLevelChangeEvent.ChangeReason.EXTINGUISH);
++            // CraftBukkit end
+         }
+ 
+     }
+ 
+     public static void lowerFillLevel(BlockState state, Level world, BlockPos pos) {
+-        int i = (Integer) state.getValue(LayeredCauldronBlock.LEVEL) - 1;
+-        BlockState iblockdata1 = i == 0 ? Blocks.CAULDRON.defaultBlockState() : (BlockState) state.setValue(LayeredCauldronBlock.LEVEL, i);
++        // CraftBukkit start
++        LayeredCauldronBlock.lowerFillLevel(state, world, pos, null, CauldronLevelChangeEvent.ChangeReason.UNKNOWN);
++    }
+ 
+-        world.setBlockAndUpdate(pos, iblockdata1);
+-        world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(iblockdata1));
++    public static boolean lowerFillLevel(BlockState iblockdata, Level world, BlockPos blockposition, Entity entity, CauldronLevelChangeEvent.ChangeReason reason) {
++        int i = (Integer) iblockdata.getValue(LayeredCauldronBlock.LEVEL) - 1;
++        BlockState iblockdata1 = i == 0 ? Blocks.CAULDRON.defaultBlockState() : (BlockState) iblockdata.setValue(LayeredCauldronBlock.LEVEL, i);
++
++        return LayeredCauldronBlock.changeLevel(iblockdata, world, blockposition, iblockdata1, entity, reason);
+     }
+ 
++    // CraftBukkit start
++    public static boolean changeLevel(BlockState iblockdata, Level world, BlockPos blockposition, BlockState newBlock, Entity entity, CauldronLevelChangeEvent.ChangeReason reason) {
++        CraftBlockState newState = CraftBlockStates.getBlockState(world, blockposition);
++        newState.setData(newBlock);
++
++        CauldronLevelChangeEvent event = new CauldronLevelChangeEvent(
++                world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()),
++                (entity == null) ? null : entity.getBukkitEntity(), reason, newState
++        );
++        world.getCraftServer().getPluginManager().callEvent(event);
++        if (event.isCancelled()) {
++            return false;
++        }
++        newState.update(true);
++        world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of(newBlock));
++        return true;
++    }
++    // CraftBukkit end
++
+     @Override
+     public void handlePrecipitation(BlockState state, Level world, BlockPos pos, Biome.Precipitation precipitation) {
+         if (CauldronBlock.shouldHandlePrecipitation(world, precipitation) && (Integer) state.getValue(LayeredCauldronBlock.LEVEL) != 3 && precipitation == this.precipitationType) {
+             BlockState iblockdata1 = (BlockState) state.cycle(LayeredCauldronBlock.LEVEL);
+ 
+-            world.setBlockAndUpdate(pos, iblockdata1);
+-            world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(iblockdata1));
++            LayeredCauldronBlock.changeLevel(state, world, pos, iblockdata1, null, CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL); // CraftBukkit
+         }
+     }
+ 
+@@ -115,8 +148,11 @@
+         if (!this.isFull(state)) {
+             BlockState iblockdata1 = (BlockState) state.setValue(LayeredCauldronBlock.LEVEL, (Integer) state.getValue(LayeredCauldronBlock.LEVEL) + 1);
+ 
+-            world.setBlockAndUpdate(pos, iblockdata1);
+-            world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(iblockdata1));
++            // CraftBukkit start
++            if (!LayeredCauldronBlock.changeLevel(state, world, pos, iblockdata1, null, CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL)) {
++                return;
++            }
++            // CraftBukkit end
+             world.levelEvent(1047, pos, 0);
+         }
+     }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/LayeredCauldronBlock.patch b/paper-server/patches/sources/net/minecraft/world/level/block/LayeredCauldronBlock.patch
deleted file mode 100644
index f2eebd0606..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/LayeredCauldronBlock.patch
+++ /dev/null
@@ -1,106 +0,0 @@
---- a/net/minecraft/world/level/block/LayeredCauldronBlock.java
-+++ b/net/minecraft/world/level/block/LayeredCauldronBlock.java
-@@ -18,6 +18,12 @@
- import net.minecraft.world.level.material.FluidType;
- import net.minecraft.world.level.material.FluidTypes;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.block.CraftBlockState;
-+import org.bukkit.craftbukkit.block.CraftBlockStates;
-+import org.bukkit.event.block.CauldronLevelChangeEvent;
-+// CraftBukkit end
-+
- public class LayeredCauldronBlock extends AbstractCauldronBlock {
- 
-     public static final MapCodec<LayeredCauldronBlock> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
-@@ -64,39 +70,67 @@
-     protected void entityInside(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
-         if (world instanceof WorldServer worldserver) {
-             if (entity.isOnFire() && this.isEntityInsideContent(iblockdata, blockposition, entity)) {
--                entity.clearFire();
-+                // CraftBukkit start - moved down
-+                // entity.clearFire();
-                 if (entity.mayInteract(worldserver, blockposition)) {
--                    this.handleEntityOnFireInside(iblockdata, world, blockposition);
-+                    if (this.handleEntityOnFireInside(iblockdata, world, blockposition, entity)) {
-+                        entity.clearFire();
-+                    }
-+                    // CraftBukkit end
-                 }
-             }
-         }
- 
-     }
- 
--    private void handleEntityOnFireInside(IBlockData iblockdata, World world, BlockPosition blockposition) {
-+    // CraftBukkit start
-+    private boolean handleEntityOnFireInside(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity) {
-         if (this.precipitationType == BiomeBase.Precipitation.SNOW) {
--            lowerFillLevel((IBlockData) Blocks.WATER_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, (Integer) iblockdata.getValue(LayeredCauldronBlock.LEVEL)), world, blockposition);
-+            return lowerFillLevel((IBlockData) Blocks.WATER_CAULDRON.defaultBlockState().setValue(LayeredCauldronBlock.LEVEL, (Integer) iblockdata.getValue(LayeredCauldronBlock.LEVEL)), world, blockposition, entity, CauldronLevelChangeEvent.ChangeReason.EXTINGUISH);
-         } else {
--            lowerFillLevel(iblockdata, world, blockposition);
-+            return lowerFillLevel(iblockdata, world, blockposition, entity, CauldronLevelChangeEvent.ChangeReason.EXTINGUISH);
-+            // CraftBukkit end
-         }
- 
-     }
- 
-     public static void lowerFillLevel(IBlockData iblockdata, World world, BlockPosition blockposition) {
-+        // CraftBukkit start
-+        lowerFillLevel(iblockdata, world, blockposition, null, CauldronLevelChangeEvent.ChangeReason.UNKNOWN);
-+    }
-+
-+    public static boolean lowerFillLevel(IBlockData iblockdata, World world, BlockPosition blockposition, Entity entity, CauldronLevelChangeEvent.ChangeReason reason) {
-         int i = (Integer) iblockdata.getValue(LayeredCauldronBlock.LEVEL) - 1;
-         IBlockData iblockdata1 = i == 0 ? Blocks.CAULDRON.defaultBlockState() : (IBlockData) iblockdata.setValue(LayeredCauldronBlock.LEVEL, i);
- 
--        world.setBlockAndUpdate(blockposition, iblockdata1);
--        world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, blockposition, GameEvent.a.of(iblockdata1));
-+        return changeLevel(iblockdata, world, blockposition, iblockdata1, entity, reason);
-     }
- 
-+    // CraftBukkit start
-+    public static boolean changeLevel(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData newBlock, Entity entity, CauldronLevelChangeEvent.ChangeReason reason) {
-+        CraftBlockState newState = CraftBlockStates.getBlockState(world, blockposition);
-+        newState.setData(newBlock);
-+
-+        CauldronLevelChangeEvent event = new CauldronLevelChangeEvent(
-+                world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()),
-+                (entity == null) ? null : entity.getBukkitEntity(), reason, newState
-+        );
-+        world.getCraftServer().getPluginManager().callEvent(event);
-+        if (event.isCancelled()) {
-+            return false;
-+        }
-+        newState.update(true);
-+        world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, blockposition, GameEvent.a.of(newBlock));
-+        return true;
-+    }
-+    // CraftBukkit end
-+
-     @Override
-     public void handlePrecipitation(IBlockData iblockdata, World world, BlockPosition blockposition, BiomeBase.Precipitation biomebase_precipitation) {
-         if (BlockCauldron.shouldHandlePrecipitation(world, biomebase_precipitation) && (Integer) iblockdata.getValue(LayeredCauldronBlock.LEVEL) != 3 && biomebase_precipitation == this.precipitationType) {
-             IBlockData iblockdata1 = (IBlockData) iblockdata.cycle(LayeredCauldronBlock.LEVEL);
- 
--            world.setBlockAndUpdate(blockposition, iblockdata1);
--            world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, blockposition, GameEvent.a.of(iblockdata1));
-+            changeLevel(iblockdata, world, blockposition, iblockdata1, null, CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL); // CraftBukkit
-         }
-     }
- 
-@@ -115,8 +149,11 @@
-         if (!this.isFull(iblockdata)) {
-             IBlockData iblockdata1 = (IBlockData) iblockdata.setValue(LayeredCauldronBlock.LEVEL, (Integer) iblockdata.getValue(LayeredCauldronBlock.LEVEL) + 1);
- 
--            world.setBlockAndUpdate(blockposition, iblockdata1);
--            world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, blockposition, GameEvent.a.of(iblockdata1));
-+            // CraftBukkit start
-+            if (!changeLevel(iblockdata, world, blockposition, iblockdata1, null, CauldronLevelChangeEvent.ChangeReason.NATURAL_FILL)) {
-+                return;
-+            }
-+            // CraftBukkit end
-             world.levelEvent(1047, blockposition, 0);
-         }
-     }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/LeavesBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/LeavesBlock.java.patch
new file mode 100644
index 0000000000..4e3cc600f3
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/LeavesBlock.java.patch
@@ -0,0 +1,25 @@
+--- a/net/minecraft/world/level/block/LeavesBlock.java
++++ b/net/minecraft/world/level/block/LeavesBlock.java
+@@ -26,6 +26,7 @@
+ import net.minecraft.world.level.material.Fluids;
+ import net.minecraft.world.phys.shapes.Shapes;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++import org.bukkit.event.block.LeavesDecayEvent; // CraftBukkit
+ 
+ public class LeavesBlock extends Block implements SimpleWaterloggedBlock {
+ 
+@@ -59,6 +60,14 @@
+     @Override
+     protected void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
+         if (this.decaying(state)) {
++            // CraftBukkit start
++            LeavesDecayEvent event = new LeavesDecayEvent(world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()));
++            world.getCraftServer().getPluginManager().callEvent(event);
++
++            if (event.isCancelled() || world.getBlockState(pos).getBlock() != this) {
++                return;
++            }
++            // CraftBukkit end
+             dropResources(state, world, pos);
+             world.removeBlock(pos, false);
+         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/LecternBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/LecternBlock.java.patch
new file mode 100644
index 0000000000..c8bf8cd74f
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/LecternBlock.java.patch
@@ -0,0 +1,16 @@
+--- a/net/minecraft/world/level/block/LecternBlock.java
++++ b/net/minecraft/world/level/block/LecternBlock.java
+@@ -206,11 +206,12 @@
+     }
+ 
+     private void popBook(BlockState state, Level world, BlockPos pos) {
+-        BlockEntity tileentity = world.getBlockEntity(pos);
++        BlockEntity tileentity = world.getBlockEntity(pos, false); // CraftBukkit - don't validate, type may be changed already
+ 
+         if (tileentity instanceof LecternBlockEntity tileentitylectern) {
+             Direction enumdirection = (Direction) state.getValue(LecternBlock.FACING);
+             ItemStack itemstack = tileentitylectern.getBook().copy();
++            if (itemstack.isEmpty()) return; // CraftBukkit - SPIGOT-5500
+             float f = 0.25F * (float) enumdirection.getStepX();
+             float f1 = 0.25F * (float) enumdirection.getStepZ();
+             ItemEntity entityitem = new ItemEntity(world, (double) pos.getX() + 0.5D + (double) f, (double) (pos.getY() + 1), (double) pos.getZ() + 0.5D + (double) f1, itemstack);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/LeverBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/LeverBlock.java.patch
new file mode 100644
index 0000000000..325443e6f3
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/LeverBlock.java.patch
@@ -0,0 +1,31 @@
+--- a/net/minecraft/world/level/block/LeverBlock.java
++++ b/net/minecraft/world/level/block/LeverBlock.java
+@@ -31,6 +31,7 @@
+ import net.minecraft.world.phys.BlockHitResult;
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
+ 
+ public class LeverBlock extends FaceAttachedHorizontalDirectionalBlock {
+ 
+@@ -102,6 +103,20 @@
+                 LeverBlock.makeParticle(iblockdata1, world, pos, 1.0F);
+             }
+         } else {
++            // CraftBukkit start - Interact Lever
++            boolean powered = state.getValue(LeverBlock.POWERED); // Old powered state
++            org.bukkit.block.Block block = world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ());
++            int old = (powered) ? 15 : 0;
++            int current = (!powered) ? 15 : 0;
++
++            BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(block, old, current);
++            world.getCraftServer().getPluginManager().callEvent(eventRedstone);
++
++            if ((eventRedstone.getNewCurrent() > 0) != (!powered)) {
++                return InteractionResult.SUCCESS;
++            }
++            // CraftBukkit end
++
+             this.pull(state, world, pos, (Player) null);
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/LightningRodBlock.patch b/paper-server/patches/sources/net/minecraft/world/level/block/LightningRodBlock.java.patch
similarity index 58%
rename from paper-server/patches/sources/net/minecraft/world/level/block/LightningRodBlock.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/LightningRodBlock.java.patch
index 8a36902c04..c97ad7d96c 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/LightningRodBlock.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/LightningRodBlock.java.patch
@@ -1,7 +1,7 @@
 --- a/net/minecraft/world/level/block/LightningRodBlock.java
 +++ b/net/minecraft/world/level/block/LightningRodBlock.java
 @@ -24,6 +24,11 @@
- import net.minecraft.world.level.material.FluidTypes;
+ import net.minecraft.world.level.material.Fluids;
  import net.minecraft.world.level.redstone.ExperimentalRedstoneUtils;
  
 +// CraftBukkit start
@@ -9,25 +9,25 @@
 +import org.bukkit.event.block.BlockRedstoneEvent;
 +// CraftBukkit end
 +
- public class LightningRodBlock extends RodBlock implements IBlockWaterlogged {
+ public class LightningRodBlock extends RodBlock implements SimpleWaterloggedBlock {
  
      public static final MapCodec<LightningRodBlock> CODEC = simpleCodec(LightningRodBlock::new);
 @@ -76,6 +81,18 @@
      }
  
-     public void onLightningStrike(IBlockData iblockdata, World world, BlockPosition blockposition) {
+     public void onLightningStrike(BlockState state, Level world, BlockPos pos) {
 +        // CraftBukkit start
-+        boolean powered = iblockdata.getValue(LightningRodBlock.POWERED);
++        boolean powered = state.getValue(LightningRodBlock.POWERED);
 +        int old = (powered) ? 15 : 0;
 +        int current = (!powered) ? 15 : 0;
 +
-+        BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(CraftBlock.at(world, blockposition), old, current);
++        BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(CraftBlock.at(world, pos), old, current);
 +        world.getCraftServer().getPluginManager().callEvent(eventRedstone);
 +
 +        if (eventRedstone.getNewCurrent() <= 0) {
 +            return;
 +        }
 +        // CraftBukkit end
-         world.setBlock(blockposition, (IBlockData) iblockdata.setValue(LightningRodBlock.POWERED, true), 3);
-         this.updateNeighbours(iblockdata, world, blockposition);
-         world.scheduleTick(blockposition, (Block) this, 8);
+         world.setBlock(pos, (BlockState) state.setValue(LightningRodBlock.POWERED, true), 3);
+         this.updateNeighbours(state, world, pos);
+         world.scheduleTick(pos, (Block) this, 8);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/LiquidBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/LiquidBlock.java.patch
new file mode 100644
index 0000000000..46df5baba5
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/LiquidBlock.java.patch
@@ -0,0 +1,36 @@
+--- a/net/minecraft/world/level/block/LiquidBlock.java
++++ b/net/minecraft/world/level/block/LiquidBlock.java
+@@ -42,7 +42,7 @@
+ public class LiquidBlock extends Block implements BucketPickup {
+ 
+     private static final Codec<FlowingFluid> FLOWING_FLUID = BuiltInRegistries.FLUID.byNameCodec().comapFlatMap((fluidtype) -> {
+-        DataResult dataresult;
++        DataResult<FlowingFluid> dataresult; // CraftBukkit - decompile error
+ 
+         if (fluidtype instanceof FlowingFluid fluidtypeflowing) {
+             dataresult = DataResult.success(fluidtypeflowing);
+@@ -175,14 +175,20 @@
+                 if (world.getFluidState(blockposition1).is(FluidTags.WATER)) {
+                     Block block = world.getFluidState(pos).isSource() ? Blocks.OBSIDIAN : Blocks.COBBLESTONE;
+ 
+-                    world.setBlockAndUpdate(pos, block.defaultBlockState());
+-                    this.fizz(world, pos);
++                    // CraftBukkit start
++                    if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, pos, block.defaultBlockState())) {
++                        this.fizz(world, pos);
++                    }
++                    // CraftBukkit end
+                     return false;
+                 }
+ 
+                 if (flag && world.getBlockState(blockposition1).is(Blocks.BLUE_ICE)) {
+-                    world.setBlockAndUpdate(pos, Blocks.BASALT.defaultBlockState());
+-                    this.fizz(world, pos);
++                    // CraftBukkit start
++                    if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world, pos, Blocks.BASALT.defaultBlockState())) {
++                        this.fizz(world, pos);
++                    }
++                    // CraftBukkit end
+                     return false;
+                 }
+             }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/MagmaBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/MagmaBlock.java.patch
new file mode 100644
index 0000000000..6febd2458e
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/MagmaBlock.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/level/block/MagmaBlock.java
++++ b/net/minecraft/world/level/block/MagmaBlock.java
+@@ -30,7 +30,7 @@
+     @Override
+     public void stepOn(Level world, BlockPos pos, BlockState state, Entity entity) {
+         if (!entity.isSteppingCarefully() && entity instanceof LivingEntity) {
+-            entity.hurt(world.damageSources().hotFloor(), 1.0F);
++            entity.hurt(world.damageSources().hotFloor().directBlock(world, pos), 1.0F); // CraftBukkit
+         }
+ 
+         super.stepOn(world, pos, state, entity);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/MultifaceSpreader.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/MultifaceSpreader.java.patch
new file mode 100644
index 0000000000..31dd40a615
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/MultifaceSpreader.java.patch
@@ -0,0 +1,43 @@
+--- a/net/minecraft/world/level/block/MultifaceSpreader.java
++++ b/net/minecraft/world/level/block/MultifaceSpreader.java
+@@ -156,7 +156,7 @@
+                     world.getChunk(growPos.pos()).markPosForPostprocessing(growPos.pos());
+                 }
+ 
+-                return world.setBlock(growPos.pos(), iblockdata1, 2);
++                return org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, growPos.source(), growPos.pos(), iblockdata1, 2); // CraftBukkit
+             } else {
+                 return false;
+             }
+@@ -174,19 +174,19 @@
+         SAME_POSITION {
+             @Override
+             public MultifaceSpreader.SpreadPos getSpreadPos(BlockPos pos, Direction newDirection, Direction oldDirection) {
+-                return new MultifaceSpreader.SpreadPos(pos, newDirection);
++                return new MultifaceSpreader.SpreadPos(pos, newDirection, pos); // CraftBukkit
+             }
+         },
+         SAME_PLANE {
+             @Override
+             public MultifaceSpreader.SpreadPos getSpreadPos(BlockPos pos, Direction newDirection, Direction oldDirection) {
+-                return new MultifaceSpreader.SpreadPos(pos.relative(newDirection), oldDirection);
++                return new MultifaceSpreader.SpreadPos(pos.relative(newDirection), oldDirection, pos); // CraftBukkit
+             }
+         },
+         WRAP_AROUND {
+             @Override
+             public MultifaceSpreader.SpreadPos getSpreadPos(BlockPos pos, Direction newDirection, Direction oldDirection) {
+-                return new MultifaceSpreader.SpreadPos(pos.relative(newDirection).relative(oldDirection), newDirection.getOpposite());
++                return new MultifaceSpreader.SpreadPos(pos.relative(newDirection).relative(oldDirection), newDirection.getOpposite(), pos); // CraftBukkit
+             }
+         };
+ 
+@@ -195,7 +195,7 @@
+         public abstract MultifaceSpreader.SpreadPos getSpreadPos(BlockPos pos, Direction newDirection, Direction oldDirection);
+     }
+ 
+-    public static record SpreadPos(BlockPos pos, Direction face) {
++    public static record SpreadPos(BlockPos pos, Direction face, BlockPos source) { // CraftBukkit
+ 
+     }
+ }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/MultifaceSpreader.patch b/paper-server/patches/sources/net/minecraft/world/level/block/MultifaceSpreader.patch
deleted file mode 100644
index 216e14a222..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/MultifaceSpreader.patch
+++ /dev/null
@@ -1,43 +0,0 @@
---- a/net/minecraft/world/level/block/MultifaceSpreader.java
-+++ b/net/minecraft/world/level/block/MultifaceSpreader.java
-@@ -156,7 +156,7 @@
-                     generatoraccess.getChunk(multifacespreader_c.pos()).markPosForPostprocessing(multifacespreader_c.pos());
-                 }
- 
--                return generatoraccess.setBlock(multifacespreader_c.pos(), iblockdata1, 2);
-+                return org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(generatoraccess, multifacespreader_c.source(), multifacespreader_c.pos(), iblockdata1, 2); // CraftBukkit
-             } else {
-                 return false;
-             }
-@@ -174,19 +174,19 @@
-         SAME_POSITION {
-             @Override
-             public MultifaceSpreader.c getSpreadPos(BlockPosition blockposition, EnumDirection enumdirection, EnumDirection enumdirection1) {
--                return new MultifaceSpreader.c(blockposition, enumdirection);
-+                return new MultifaceSpreader.c(blockposition, enumdirection, blockposition); // CraftBukkit
-             }
-         },
-         SAME_PLANE {
-             @Override
-             public MultifaceSpreader.c getSpreadPos(BlockPosition blockposition, EnumDirection enumdirection, EnumDirection enumdirection1) {
--                return new MultifaceSpreader.c(blockposition.relative(enumdirection), enumdirection1);
-+                return new MultifaceSpreader.c(blockposition.relative(enumdirection), enumdirection1, blockposition); // CraftBukkit
-             }
-         },
-         WRAP_AROUND {
-             @Override
-             public MultifaceSpreader.c getSpreadPos(BlockPosition blockposition, EnumDirection enumdirection, EnumDirection enumdirection1) {
--                return new MultifaceSpreader.c(blockposition.relative(enumdirection).relative(enumdirection1), enumdirection.getOpposite());
-+                return new MultifaceSpreader.c(blockposition.relative(enumdirection).relative(enumdirection1), enumdirection.getOpposite(), blockposition); // CraftBukkit
-             }
-         };
- 
-@@ -195,7 +195,7 @@
-         public abstract MultifaceSpreader.c getSpreadPos(BlockPosition blockposition, EnumDirection enumdirection, EnumDirection enumdirection1);
-     }
- 
--    public static record c(BlockPosition pos, EnumDirection face) {
-+    public static record c(BlockPosition pos, EnumDirection face, BlockPosition source) { // CraftBukkit
- 
-     }
- }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/MushroomBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/MushroomBlock.java.patch
new file mode 100644
index 0000000000..9260145b24
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/MushroomBlock.java.patch
@@ -0,0 +1,29 @@
+--- a/net/minecraft/world/level/block/MushroomBlock.java
++++ b/net/minecraft/world/level/block/MushroomBlock.java
+@@ -19,6 +19,9 @@
+ import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++// CraftBukkit start
++import org.bukkit.TreeType;
++// CraftBukkit end
+ 
+ public class MushroomBlock extends BushBlock implements BonemealableBlock {
+ 
+@@ -75,7 +78,7 @@
+             }
+ 
+             if (world.isEmptyBlock(blockposition2) && state.canSurvive(world, blockposition2)) {
+-                world.setBlock(blockposition2, state, 2);
++                org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, pos, blockposition2, state, 2); // CraftBukkit
+             }
+         }
+ 
+@@ -101,6 +104,7 @@
+             return false;
+         } else {
+             world.removeBlock(pos, false);
++            SaplingBlock.treeType = (this == Blocks.BROWN_MUSHROOM) ? TreeType.BROWN_MUSHROOM : TreeType.RED_MUSHROOM; // CraftBukkit
+             if (((ConfiguredFeature) ((Holder) optional.get()).value()).place(world, world.getChunkSource().getGenerator(), random, pos)) {
+                 return true;
+             } else {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/NetherPortalBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/NetherPortalBlock.java.patch
new file mode 100644
index 0000000000..f1dc332396
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/NetherPortalBlock.java.patch
@@ -0,0 +1,132 @@
+--- a/net/minecraft/world/level/block/NetherPortalBlock.java
++++ b/net/minecraft/world/level/block/NetherPortalBlock.java
+@@ -32,12 +32,19 @@
+ import net.minecraft.world.level.block.state.properties.EnumProperty;
+ import net.minecraft.world.level.border.WorldBorder;
+ import net.minecraft.world.level.dimension.DimensionType;
++import net.minecraft.world.level.dimension.LevelStem;
+ import net.minecraft.world.level.portal.PortalShape;
+ import net.minecraft.world.level.portal.TeleportTransition;
+ import net.minecraft.world.phys.Vec3;
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.VoxelShape;
+ import org.slf4j.Logger;
++import org.bukkit.craftbukkit.CraftWorld;
++import org.bukkit.craftbukkit.event.CraftPortalEvent;
++import org.bukkit.craftbukkit.util.CraftLocation;
++import org.bukkit.event.entity.EntityPortalEnterEvent;
++import org.bukkit.event.player.PlayerTeleportEvent;
++// CraftBukkit end
+ 
+ public class NetherPortalBlock extends Block implements Portal {
+ 
+@@ -77,7 +84,8 @@
+             }
+ 
+             if (world.getBlockState(pos).isValidSpawn(world, pos, EntityType.ZOMBIFIED_PIGLIN)) {
+-                Entity entity = EntityType.ZOMBIFIED_PIGLIN.spawn(world, pos.above(), EntitySpawnReason.STRUCTURE);
++                // CraftBukkit - set spawn reason to NETHER_PORTAL
++                Entity entity = EntityType.ZOMBIFIED_PIGLIN.spawn(world, pos.above(), EntitySpawnReason.STRUCTURE, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NETHER_PORTAL);
+ 
+                 if (entity != null) {
+                     entity.setPortalCooldown();
+@@ -104,6 +112,10 @@
+     @Override
+     protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) {
+         if (entity.canUsePortal(false)) {
++            // CraftBukkit start - Entity in portal
++            EntityPortalEnterEvent event = new EntityPortalEnterEvent(entity.getBukkitEntity(), new org.bukkit.Location(world.getWorld(), pos.getX(), pos.getY(), pos.getZ()));
++            world.getCraftServer().getPluginManager().callEvent(event);
++            // CraftBukkit end
+             entity.setAsInsidePortal(this, pos);
+         }
+ 
+@@ -121,51 +133,66 @@
+     @Nullable
+     @Override
+     public TeleportTransition getPortalDestination(ServerLevel world, Entity entity, BlockPos pos) {
+-        ResourceKey<Level> resourcekey = world.dimension() == Level.NETHER ? Level.OVERWORLD : Level.NETHER;
++        // CraftBukkit start
++        ResourceKey<Level> resourcekey = world.getTypeKey() == LevelStem.NETHER ? Level.OVERWORLD : Level.NETHER;
+         ServerLevel worldserver1 = world.getServer().getLevel(resourcekey);
+ 
+         if (worldserver1 == null) {
+-            return null;
++            return new TeleportTransition(PlayerTeleportEvent.TeleportCause.NETHER_PORTAL); // always fire event in case plugins wish to change it
+         } else {
+-            boolean flag = worldserver1.dimension() == Level.NETHER;
++            boolean flag = worldserver1.getTypeKey() == LevelStem.NETHER;
++            // CraftBukkit end
+             WorldBorder worldborder = worldserver1.getWorldBorder();
+             double d0 = DimensionType.getTeleportationScale(world.dimensionType(), worldserver1.dimensionType());
+             BlockPos blockposition1 = worldborder.clampToBounds(entity.getX() * d0, entity.getY(), entity.getZ() * d0);
++            // CraftBukkit start
++            CraftPortalEvent event = entity.callPortalEvent(entity, CraftLocation.toBukkit(blockposition1, worldserver1.getWorld()), PlayerTeleportEvent.TeleportCause.NETHER_PORTAL, flag ? 16 : 128, 16);
++            if (event == null) {
++                return null;
++            }
++            worldserver1 = ((CraftWorld) event.getTo().getWorld()).getHandle();
++            worldborder = worldserver1.getWorldBorder();
++            blockposition1 = worldborder.clampToBounds(event.getTo().getX(), event.getTo().getY(), event.getTo().getZ());
+ 
+-            return this.getExitPortal(worldserver1, entity, pos, blockposition1, flag, worldborder);
++            return this.getExitPortal(worldserver1, entity, pos, blockposition1, flag, worldborder, event.getSearchRadius(), event.getCanCreatePortal(), event.getCreationRadius());
+         }
+     }
+ 
+     @Nullable
+-    private TeleportTransition getExitPortal(ServerLevel world, Entity entity, BlockPos pos, BlockPos scaledPos, boolean inNether, WorldBorder worldBorder) {
+-        Optional<BlockPos> optional = world.getPortalForcer().findClosestPortalPosition(scaledPos, inNether, worldBorder);
++    private TeleportTransition getExitPortal(ServerLevel worldserver, Entity entity, BlockPos blockposition, BlockPos blockposition1, boolean flag, WorldBorder worldborder, int searchRadius, boolean canCreatePortal, int createRadius) {
++        Optional<BlockPos> optional = worldserver.getPortalForcer().findClosestPortalPosition(blockposition1, worldborder, searchRadius);
+         BlockUtil.FoundRectangle blockutil_rectangle;
+         TeleportTransition.PostTeleportTransition teleporttransition_a;
+ 
+         if (optional.isPresent()) {
+             BlockPos blockposition2 = (BlockPos) optional.get();
+-            BlockState iblockdata = world.getBlockState(blockposition2);
++            BlockState iblockdata = worldserver.getBlockState(blockposition2);
+ 
+             blockutil_rectangle = BlockUtil.getLargestRectangleAround(blockposition2, (Direction.Axis) iblockdata.getValue(BlockStateProperties.HORIZONTAL_AXIS), 21, Direction.Axis.Y, 21, (blockposition3) -> {
+-                return world.getBlockState(blockposition3) == iblockdata;
++                return worldserver.getBlockState(blockposition3) == iblockdata;
+             });
+             teleporttransition_a = TeleportTransition.PLAY_PORTAL_SOUND.then((entity1) -> {
+                 entity1.placePortalTicket(blockposition2);
+             });
+-        } else {
+-            Direction.Axis enumdirection_enumaxis = (Direction.Axis) entity.level().getBlockState(pos).getOptionalValue(NetherPortalBlock.AXIS).orElse(Direction.Axis.X);
+-            Optional<BlockUtil.FoundRectangle> optional1 = world.getPortalForcer().createPortal(scaledPos, enumdirection_enumaxis);
++        } else if (canCreatePortal) {
++            Direction.Axis enumdirection_enumaxis = (Direction.Axis) entity.level().getBlockState(blockposition).getOptionalValue(NetherPortalBlock.AXIS).orElse(Direction.Axis.X);
++            Optional<BlockUtil.FoundRectangle> optional1 = worldserver.getPortalForcer().createPortal(blockposition1, enumdirection_enumaxis, entity, createRadius);
++            // CraftBukkit end
+ 
+             if (optional1.isEmpty()) {
+-                NetherPortalBlock.LOGGER.error("Unable to create a portal, likely target out of worldborder");
++                // BlockPortal.LOGGER.error("Unable to create a portal, likely target out of worldborder"); // CraftBukkit
+                 return null;
+             }
+ 
+             blockutil_rectangle = (BlockUtil.FoundRectangle) optional1.get();
+             teleporttransition_a = TeleportTransition.PLAY_PORTAL_SOUND.then(TeleportTransition.PLACE_PORTAL_TICKET);
++            // CraftBukkit start
++        } else {
++            return null;
++            // CraftBukkit end
+         }
+ 
+-        return NetherPortalBlock.getDimensionTransitionFromExit(entity, pos, blockutil_rectangle, world, teleporttransition_a);
++        return NetherPortalBlock.getDimensionTransitionFromExit(entity, blockposition, blockutil_rectangle, worldserver, teleporttransition_a);
+     }
+ 
+     private static TeleportTransition getDimensionTransitionFromExit(Entity entity, BlockPos pos, BlockUtil.FoundRectangle exitPortalRectangle, ServerLevel world, TeleportTransition.PostTeleportTransition postDimensionTransition) {
+@@ -203,7 +230,7 @@
+         Vec3 vec3d1 = new Vec3((double) blockposition.getX() + (flag ? d2 : d4), (double) blockposition.getY() + d3, (double) blockposition.getZ() + (flag ? d4 : d2));
+         Vec3 vec3d2 = PortalShape.findCollisionFreePosition(vec3d1, world, entity, entitysize);
+ 
+-        return new TeleportTransition(world, vec3d2, Vec3.ZERO, (float) i, 0.0F, Relative.union(Relative.DELTA, Relative.ROTATION), postDimensionTransition);
++        return new TeleportTransition(world, vec3d2, Vec3.ZERO, (float) i, 0.0F, Relative.union(Relative.DELTA, Relative.ROTATION), postDimensionTransition, PlayerTeleportEvent.TeleportCause.NETHER_PORTAL); // CraftBukkit
+     }
+ 
+     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/NetherWartBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/NetherWartBlock.java.patch
new file mode 100644
index 0000000000..33c887cdf8
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/NetherWartBlock.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/level/block/NetherWartBlock.java
++++ b/net/minecraft/world/level/block/NetherWartBlock.java
+@@ -54,7 +54,7 @@
+ 
+         if (i < 3 && random.nextInt(10) == 0) {
+             state = (BlockState) state.setValue(NetherWartBlock.AGE, i + 1);
+-            world.setBlock(pos, state, 2);
++            org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(world, pos, state, 2); // CraftBukkit
+         }
+ 
+     }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/NoteBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/NoteBlock.java.patch
new file mode 100644
index 0000000000..df85e7b57b
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/NoteBlock.java.patch
@@ -0,0 +1,23 @@
+--- a/net/minecraft/world/level/block/NoteBlock.java
++++ b/net/minecraft/world/level/block/NoteBlock.java
+@@ -85,6 +85,7 @@
+         if (flag1 != (Boolean) state.getValue(NoteBlock.POWERED)) {
+             if (flag1) {
+                 this.playNote((Entity) null, state, world, pos);
++                state = world.getBlockState(pos); // CraftBukkit - SPIGOT-5617: update in case changed in event
+             }
+ 
+             world.setBlock(pos, (BlockState) state.setValue(NoteBlock.POWERED, flag1), 3);
+@@ -94,6 +95,12 @@
+ 
+     private void playNote(@Nullable Entity entity, BlockState state, Level world, BlockPos pos) {
+         if (((NoteBlockInstrument) state.getValue(NoteBlock.INSTRUMENT)).worksAboveNoteBlock() || world.getBlockState(pos.above()).isAir()) {
++            // CraftBukkit start
++            org.bukkit.event.block.NotePlayEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callNotePlayEvent(world, pos, state.getValue(NoteBlock.INSTRUMENT), state.getValue(NoteBlock.NOTE));
++            if (event.isCancelled()) {
++                return;
++            }
++            // CraftBukkit end
+             world.blockEvent(pos, this, 0, 0);
+             world.gameEvent(entity, (Holder) GameEvent.NOTE_BLOCK_PLAY, pos);
+         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/NyliumBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/NyliumBlock.java.patch
new file mode 100644
index 0000000000..cc4aae4d48
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/NyliumBlock.java.patch
@@ -0,0 +1,14 @@
+--- a/net/minecraft/world/level/block/NyliumBlock.java
++++ b/net/minecraft/world/level/block/NyliumBlock.java
+@@ -41,6 +41,11 @@
+     @Override
+     protected void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
+         if (!NyliumBlock.canBeNylium(state, world, pos)) {
++            // CraftBukkit start
++            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, pos, Blocks.NETHERRACK.defaultBlockState()).isCancelled()) {
++                return;
++            }
++            // CraftBukkit end
+             world.setBlockAndUpdate(pos, Blocks.NETHERRACK.defaultBlockState());
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/ObserverBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/ObserverBlock.java.patch
new file mode 100644
index 0000000000..0718f3ab29
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/ObserverBlock.java.patch
@@ -0,0 +1,30 @@
+--- a/net/minecraft/world/level/block/ObserverBlock.java
++++ b/net/minecraft/world/level/block/ObserverBlock.java
+@@ -18,6 +18,8 @@
+ import net.minecraft.world.level.redstone.ExperimentalRedstoneUtils;
+ import net.minecraft.world.level.redstone.Orientation;
+ 
++import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
++
+ public class ObserverBlock extends DirectionalBlock {
+ 
+     public static final MapCodec<ObserverBlock> CODEC = simpleCodec(ObserverBlock::new);
+@@ -51,8 +53,18 @@
+     @Override
+     protected void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
+         if ((Boolean) state.getValue(ObserverBlock.POWERED)) {
++            // CraftBukkit start
++            if (CraftEventFactory.callRedstoneChange(world, pos, 15, 0).getNewCurrent() != 0) {
++                return;
++            }
++            // CraftBukkit end
+             world.setBlock(pos, (BlockState) state.setValue(ObserverBlock.POWERED, false), 2);
+         } else {
++            // CraftBukkit start
++            if (CraftEventFactory.callRedstoneChange(world, pos, 0, 15).getNewCurrent() != 15) {
++                return;
++            }
++            // CraftBukkit end
+             world.setBlock(pos, (BlockState) state.setValue(ObserverBlock.POWERED, true), 2);
+             world.scheduleTick(pos, (Block) this, 2);
+         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/PointedDripstoneBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/PointedDripstoneBlock.java.patch
new file mode 100644
index 0000000000..14cd920419
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/PointedDripstoneBlock.java.patch
@@ -0,0 +1,81 @@
+--- a/net/minecraft/world/level/block/PointedDripstoneBlock.java
++++ b/net/minecraft/world/level/block/PointedDripstoneBlock.java
+@@ -136,6 +136,11 @@
+                 ServerLevel worldserver = (ServerLevel) world;
+ 
+                 if (projectile.mayInteract(worldserver, blockposition) && projectile.mayBreak(worldserver) && projectile instanceof ThrownTrident && projectile.getDeltaMovement().length() > 0.6D) {
++                    // CraftBukkit start
++                    if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(projectile, blockposition, Blocks.AIR.defaultBlockState())) {
++                        return;
++                    }
++                    // CraftBukkit end
+                     world.destroyBlock(blockposition, true);
+                 }
+             }
+@@ -146,7 +151,7 @@
+     @Override
+     public void fallOn(Level world, BlockState state, BlockPos pos, Entity entity, float fallDistance) {
+         if (state.getValue(PointedDripstoneBlock.TIP_DIRECTION) == Direction.UP && state.getValue(PointedDripstoneBlock.THICKNESS) == DripstoneThickness.TIP) {
+-            entity.causeFallDamage(fallDistance + 2.0F, 2.0F, world.damageSources().stalagmite());
++            entity.causeFallDamage(fallDistance + 2.0F, 2.0F, world.damageSources().stalagmite().directBlock(world, pos)); // CraftBukkit
+         } else {
+             super.fallOn(world, state, pos, entity, fallDistance);
+         }
+@@ -391,15 +396,15 @@
+         if (PointedDripstoneBlock.isUnmergedTipWithDirection(iblockdata, direction.getOpposite())) {
+             PointedDripstoneBlock.createMergedTips(iblockdata, world, blockposition1);
+         } else if (iblockdata.isAir() || iblockdata.is(Blocks.WATER)) {
+-            PointedDripstoneBlock.createDripstone(world, blockposition1, direction, DripstoneThickness.TIP);
++            PointedDripstoneBlock.createDripstone(world, blockposition1, direction, DripstoneThickness.TIP, pos); // CraftBukkit
+         }
+ 
+     }
+ 
+-    private static void createDripstone(LevelAccessor world, BlockPos pos, Direction direction, DripstoneThickness thickness) {
+-        BlockState iblockdata = (BlockState) ((BlockState) ((BlockState) Blocks.POINTED_DRIPSTONE.defaultBlockState().setValue(PointedDripstoneBlock.TIP_DIRECTION, direction)).setValue(PointedDripstoneBlock.THICKNESS, thickness)).setValue(PointedDripstoneBlock.WATERLOGGED, world.getFluidState(pos).getType() == Fluids.WATER);
++    private static void createDripstone(LevelAccessor generatoraccess, BlockPos blockposition, Direction enumdirection, DripstoneThickness dripstonethickness, BlockPos source) { // CraftBukkit
++        BlockState iblockdata = (BlockState) ((BlockState) ((BlockState) Blocks.POINTED_DRIPSTONE.defaultBlockState().setValue(PointedDripstoneBlock.TIP_DIRECTION, enumdirection)).setValue(PointedDripstoneBlock.THICKNESS, dripstonethickness)).setValue(PointedDripstoneBlock.WATERLOGGED, generatoraccess.getFluidState(blockposition).getType() == Fluids.WATER);
+ 
+-        world.setBlock(pos, iblockdata, 3);
++        org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(generatoraccess, source, blockposition, iblockdata, 3); // CraftBukkit
+     }
+ 
+     private static void createMergedTips(BlockState state, LevelAccessor world, BlockPos pos) {
+@@ -414,8 +419,8 @@
+             blockposition1 = pos.below();
+         }
+ 
+-        PointedDripstoneBlock.createDripstone(world, blockposition2, Direction.DOWN, DripstoneThickness.TIP_MERGE);
+-        PointedDripstoneBlock.createDripstone(world, blockposition1, Direction.UP, DripstoneThickness.TIP_MERGE);
++        PointedDripstoneBlock.createDripstone(world, blockposition2, Direction.DOWN, DripstoneThickness.TIP_MERGE, pos); // CraftBukkit
++        PointedDripstoneBlock.createDripstone(world, blockposition1, Direction.UP, DripstoneThickness.TIP_MERGE, pos); // CraftBukkit
+     }
+ 
+     public static void spawnDripParticle(Level world, BlockPos pos, BlockState state) {
+@@ -448,7 +453,7 @@
+ 
+             return (BlockPos) PointedDripstoneBlock.findBlockVertical(world, pos, enumdirection.getAxisDirection(), bipredicate, (iblockdata1) -> {
+                 return PointedDripstoneBlock.isTip(iblockdata1, allowMerged);
+-            }, range).orElse((Object) null);
++            }, range).orElse(null); // CraftBukkit - decompile error
+         }
+     }
+ 
+@@ -564,7 +569,7 @@
+             return PointedDripstoneBlock.canDripThrough(world, blockposition1, iblockdata);
+         };
+ 
+-        return (BlockPos) PointedDripstoneBlock.findBlockVertical(world, pos, Direction.DOWN.getAxisDirection(), bipredicate, predicate, 11).orElse((Object) null);
++        return (BlockPos) PointedDripstoneBlock.findBlockVertical(world, pos, Direction.DOWN.getAxisDirection(), bipredicate, predicate, 11).orElse(null); // CraftBukkit - decompile error
+     }
+ 
+     @Nullable
+@@ -573,7 +578,7 @@
+             return PointedDripstoneBlock.canDripThrough(world, blockposition1, iblockdata);
+         };
+ 
+-        return (BlockPos) PointedDripstoneBlock.findBlockVertical(world, pos, Direction.UP.getAxisDirection(), bipredicate, PointedDripstoneBlock::canDrip, 11).orElse((Object) null);
++        return (BlockPos) PointedDripstoneBlock.findBlockVertical(world, pos, Direction.UP.getAxisDirection(), bipredicate, PointedDripstoneBlock::canDrip, 11).orElse(null); // CraftBukkit - decompile error
+     }
+ 
+     public static Fluid getCauldronFillFluidType(ServerLevel world, BlockPos pos) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/PointedDripstoneBlock.patch b/paper-server/patches/sources/net/minecraft/world/level/block/PointedDripstoneBlock.patch
deleted file mode 100644
index 0ce0a1738f..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/PointedDripstoneBlock.patch
+++ /dev/null
@@ -1,80 +0,0 @@
---- a/net/minecraft/world/level/block/PointedDripstoneBlock.java
-+++ b/net/minecraft/world/level/block/PointedDripstoneBlock.java
-@@ -136,6 +136,11 @@
-                 WorldServer worldserver = (WorldServer) world;
- 
-                 if (iprojectile.mayInteract(worldserver, blockposition) && iprojectile.mayBreak(worldserver) && iprojectile instanceof EntityThrownTrident && iprojectile.getDeltaMovement().length() > 0.6D) {
-+                    // CraftBukkit start
-+                    if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(iprojectile, blockposition, Blocks.AIR.defaultBlockState())) {
-+                        return;
-+                    }
-+                    // CraftBukkit end
-                     world.destroyBlock(blockposition, true);
-                 }
-             }
-@@ -146,7 +151,7 @@
-     @Override
-     public void fallOn(World world, IBlockData iblockdata, BlockPosition blockposition, Entity entity, float f) {
-         if (iblockdata.getValue(PointedDripstoneBlock.TIP_DIRECTION) == EnumDirection.UP && iblockdata.getValue(PointedDripstoneBlock.THICKNESS) == DripstoneThickness.TIP) {
--            entity.causeFallDamage(f + 2.0F, 2.0F, world.damageSources().stalagmite());
-+            entity.causeFallDamage(f + 2.0F, 2.0F, world.damageSources().stalagmite().directBlock(world, blockposition)); // CraftBukkit
-         } else {
-             super.fallOn(world, iblockdata, blockposition, entity, f);
-         }
-@@ -391,15 +396,15 @@
-         if (isUnmergedTipWithDirection(iblockdata, enumdirection.getOpposite())) {
-             createMergedTips(iblockdata, worldserver, blockposition1);
-         } else if (iblockdata.isAir() || iblockdata.is(Blocks.WATER)) {
--            createDripstone(worldserver, blockposition1, enumdirection, DripstoneThickness.TIP);
-+            createDripstone(worldserver, blockposition1, enumdirection, DripstoneThickness.TIP, blockposition); // CraftBukkit
-         }
- 
-     }
- 
--    private static void createDripstone(GeneratorAccess generatoraccess, BlockPosition blockposition, EnumDirection enumdirection, DripstoneThickness dripstonethickness) {
-+    private static void createDripstone(GeneratorAccess generatoraccess, BlockPosition blockposition, EnumDirection enumdirection, DripstoneThickness dripstonethickness, BlockPosition source) { // CraftBukkit
-         IBlockData iblockdata = (IBlockData) ((IBlockData) ((IBlockData) Blocks.POINTED_DRIPSTONE.defaultBlockState().setValue(PointedDripstoneBlock.TIP_DIRECTION, enumdirection)).setValue(PointedDripstoneBlock.THICKNESS, dripstonethickness)).setValue(PointedDripstoneBlock.WATERLOGGED, generatoraccess.getFluidState(blockposition).getType() == FluidTypes.WATER);
- 
--        generatoraccess.setBlock(blockposition, iblockdata, 3);
-+        org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(generatoraccess, source, blockposition, iblockdata, 3); // CraftBukkit
-     }
- 
-     private static void createMergedTips(IBlockData iblockdata, GeneratorAccess generatoraccess, BlockPosition blockposition) {
-@@ -414,8 +419,8 @@
-             blockposition1 = blockposition.below();
-         }
- 
--        createDripstone(generatoraccess, blockposition2, EnumDirection.DOWN, DripstoneThickness.TIP_MERGE);
--        createDripstone(generatoraccess, blockposition1, EnumDirection.UP, DripstoneThickness.TIP_MERGE);
-+        createDripstone(generatoraccess, blockposition2, EnumDirection.DOWN, DripstoneThickness.TIP_MERGE, blockposition); // CraftBukkit
-+        createDripstone(generatoraccess, blockposition1, EnumDirection.UP, DripstoneThickness.TIP_MERGE, blockposition); // CraftBukkit
-     }
- 
-     public static void spawnDripParticle(World world, BlockPosition blockposition, IBlockData iblockdata) {
-@@ -448,7 +453,7 @@
- 
-             return (BlockPosition) findBlockVertical(generatoraccess, blockposition, enumdirection.getAxisDirection(), bipredicate, (iblockdata1) -> {
-                 return isTip(iblockdata1, flag);
--            }, i).orElse((Object) null);
-+            }, i).orElse(null); // CraftBukkit - decompile error
-         }
-     }
- 
-@@ -564,7 +569,7 @@
-             return canDripThrough(world, blockposition1, iblockdata);
-         };
- 
--        return (BlockPosition) findBlockVertical(world, blockposition, EnumDirection.DOWN.getAxisDirection(), bipredicate, predicate, 11).orElse((Object) null);
-+        return (BlockPosition) findBlockVertical(world, blockposition, EnumDirection.DOWN.getAxisDirection(), bipredicate, predicate, 11).orElse(null); // CraftBukkit - decompile error
-     }
- 
-     @Nullable
-@@ -573,7 +578,7 @@
-             return canDripThrough(world, blockposition1, iblockdata);
-         };
- 
--        return (BlockPosition) findBlockVertical(world, blockposition, EnumDirection.UP.getAxisDirection(), bipredicate, PointedDripstoneBlock::canDrip, 11).orElse((Object) null);
-+        return (BlockPosition) findBlockVertical(world, blockposition, EnumDirection.UP.getAxisDirection(), bipredicate, PointedDripstoneBlock::canDrip, 11).orElse(null); // CraftBukkit - decompile error
-     }
- 
-     public static FluidType getCauldronFillFluidType(WorldServer worldserver, BlockPosition blockposition) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/PowderSnowBlock.patch b/paper-server/patches/sources/net/minecraft/world/level/block/PowderSnowBlock.java.patch
similarity index 52%
rename from paper-server/patches/sources/net/minecraft/world/level/block/PowderSnowBlock.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/PowderSnowBlock.java.patch
index 54416b3685..9fea7666eb 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/PowderSnowBlock.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/PowderSnowBlock.java.patch
@@ -3,14 +3,14 @@
 @@ -73,7 +73,12 @@
  
          entity.setIsInPowderSnow(true);
-         if (world instanceof WorldServer worldserver) {
--            if (entity.isOnFire() && (worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) || entity instanceof EntityHuman) && entity.mayInteract(worldserver, blockposition)) {
+         if (world instanceof ServerLevel worldserver) {
+-            if (entity.isOnFire() && (worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) || entity instanceof Player) && entity.mayInteract(worldserver, pos)) {
 +            // CraftBukkit start
-+            if (entity.isOnFire() && entity.mayInteract(worldserver, blockposition)) {
-+                if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, Blocks.AIR.defaultBlockState(), !(worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) || entity instanceof EntityHuman))) {
++            if (entity.isOnFire() && entity.mayInteract(worldserver, pos)) {
++                if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.AIR.defaultBlockState(), !(worldserver.getGameRules().getBoolean(GameRules.RULE_MOBGRIEFING) || entity instanceof Player))) {
 +                    return;
 +                }
 +                // CraftBukkit end
-                 world.destroyBlock(blockposition, false);
+                 world.destroyBlock(pos, false);
              }
  
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/PoweredRailBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/PoweredRailBlock.java.patch
new file mode 100644
index 0000000000..e0443a21f6
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/PoweredRailBlock.java.patch
@@ -0,0 +1,24 @@
+--- a/net/minecraft/world/level/block/PoweredRailBlock.java
++++ b/net/minecraft/world/level/block/PoweredRailBlock.java
+@@ -11,6 +11,7 @@
+ import net.minecraft.world.level.block.state.properties.EnumProperty;
+ import net.minecraft.world.level.block.state.properties.Property;
+ import net.minecraft.world.level.block.state.properties.RailShape;
++import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
+ 
+ public class PoweredRailBlock extends BaseRailBlock {
+ 
+@@ -120,6 +121,13 @@
+         boolean flag1 = world.hasNeighborSignal(pos) || this.findPoweredRailSignal(world, pos, state, true, 0) || this.findPoweredRailSignal(world, pos, state, false, 0);
+ 
+         if (flag1 != flag) {
++            // CraftBukkit start
++            int power = flag ? 15 : 0;
++            int newPower = CraftEventFactory.callRedstoneChange(world, pos, power, 15 - power).getNewCurrent();
++            if (newPower == power) {
++                return;
++            }
++            // CraftBukkit end
+             world.setBlock(pos, (BlockState) state.setValue(PoweredRailBlock.POWERED, flag1), 3);
+             world.updateNeighborsAt(pos.below(), this);
+             if (((RailShape) state.getValue(PoweredRailBlock.SHAPE)).isSlope()) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockPressurePlateBinary.patch b/paper-server/patches/sources/net/minecraft/world/level/block/PressurePlateBlock.java.patch
similarity index 50%
rename from paper-server/patches/sources/net/minecraft/world/level/block/BlockPressurePlateBinary.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/PressurePlateBlock.java.patch
index 43f9df9d0c..4b6ba046eb 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockPressurePlateBinary.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/PressurePlateBlock.java.patch
@@ -1,42 +1,47 @@
---- a/net/minecraft/world/level/block/BlockPressurePlateBinary.java
-+++ b/net/minecraft/world/level/block/BlockPressurePlateBinary.java
-@@ -13,6 +13,11 @@
+--- a/net/minecraft/world/level/block/PressurePlateBlock.java
++++ b/net/minecraft/world/level/block/PressurePlateBlock.java
+@@ -5,6 +5,7 @@
+ import net.minecraft.core.BlockPos;
+ import net.minecraft.world.entity.Entity;
+ import net.minecraft.world.entity.LivingEntity;
++import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.block.state.BlockBehaviour;
+ import net.minecraft.world.level.block.state.BlockState;
+@@ -12,6 +13,8 @@
  import net.minecraft.world.level.block.state.properties.BlockSetType;
- import net.minecraft.world.level.block.state.properties.BlockStateBoolean;
- 
-+// CraftBukkit start
-+import net.minecraft.world.entity.player.EntityHuman;
+ import net.minecraft.world.level.block.state.properties.BlockStateProperties;
+ import net.minecraft.world.level.block.state.properties.BooleanProperty;
 +import org.bukkit.event.entity.EntityInteractEvent;
 +// CraftBukkit end
-+
- public class BlockPressurePlateBinary extends BlockPressurePlateAbstract {
  
-     public static final MapCodec<BlockPressurePlateBinary> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
-@@ -44,7 +49,7 @@
+ public class PressurePlateBlock extends BasePressurePlateBlock {
+ 
+@@ -44,7 +47,7 @@
  
      @Override
-     protected int getSignalStrength(World world, BlockPosition blockposition) {
+     protected int getSignalStrength(Level world, BlockPos pos) {
 -        Class oclass;
 +        Class<? extends Entity> oclass; // CraftBukkit
  
          switch (this.type.pressurePlateSensitivity()) {
              case EVERYTHING:
-@@ -59,7 +64,31 @@
+@@ -59,7 +62,31 @@
  
          Class<? extends Entity> oclass1 = oclass;
  
--        return getEntityCount(world, BlockPressurePlateBinary.TOUCH_AABB.move(blockposition), oclass1) > 0 ? 15 : 0;
+-        return getEntityCount(world, PressurePlateBlock.TOUCH_AABB.move(pos), oclass1) > 0 ? 15 : 0;
 +        // CraftBukkit start - Call interact event when turning on a pressure plate
-+        for (Entity entity : getEntities(world, BlockPressurePlateBinary.TOUCH_AABB.move(blockposition), oclass)) {
-+            if (this.getSignalForState(world.getBlockState(blockposition)) == 0) {
++        for (Entity entity : getEntities(world, PressurePlateBlock.TOUCH_AABB.move(pos), oclass)) {
++            if (this.getSignalForState(world.getBlockState(pos)) == 0) {
 +                org.bukkit.World bworld = world.getWorld();
 +                org.bukkit.plugin.PluginManager manager = world.getCraftServer().getPluginManager();
 +                org.bukkit.event.Cancellable cancellable;
 +
-+                if (entity instanceof EntityHuman) {
-+                    cancellable = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent((EntityHuman) entity, org.bukkit.event.block.Action.PHYSICAL, blockposition, null, null, null);
++                if (entity instanceof Player) {
++                    cancellable = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent((Player) entity, org.bukkit.event.block.Action.PHYSICAL, pos, null, null, null);
 +                } else {
-+                    cancellable = new EntityInteractEvent(entity.getBukkitEntity(), bworld.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
++                    cancellable = new EntityInteractEvent(entity.getBukkitEntity(), bworld.getBlockAt(pos.getX(), pos.getY(), pos.getZ()));
 +                    manager.callEvent((EntityInteractEvent) cancellable);
 +                }
 +
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/RedStoneOreBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/RedStoneOreBlock.java.patch
new file mode 100644
index 0000000000..29e5229732
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/RedStoneOreBlock.java.patch
@@ -0,0 +1,102 @@
+--- a/net/minecraft/world/level/block/RedStoneOreBlock.java
++++ b/net/minecraft/world/level/block/RedStoneOreBlock.java
+@@ -20,6 +20,10 @@
+ import net.minecraft.world.level.block.state.StateDefinition;
+ import net.minecraft.world.level.block.state.properties.BooleanProperty;
+ import net.minecraft.world.phys.BlockHitResult;
++// CraftBukkit start
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.event.entity.EntityInteractEvent;
++// CraftBukkit end
+ 
+ public class RedStoneOreBlock extends Block {
+ 
+@@ -38,14 +42,27 @@
+ 
+     @Override
+     protected void attack(BlockState state, Level world, BlockPos pos, Player player) {
+-        RedStoneOreBlock.interact(state, world, pos);
++        RedStoneOreBlock.interact(state, world, pos, player); // CraftBukkit - add entityhuman
+         super.attack(state, world, pos, player);
+     }
+ 
+     @Override
+     public void stepOn(Level world, BlockPos pos, BlockState state, Entity entity) {
+         if (!entity.isSteppingCarefully()) {
+-            RedStoneOreBlock.interact(state, world, pos);
++            // CraftBukkit start
++            if (entity instanceof Player) {
++                org.bukkit.event.player.PlayerInteractEvent event = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent((Player) entity, org.bukkit.event.block.Action.PHYSICAL, pos, null, null, null);
++                if (!event.isCancelled()) {
++                    RedStoneOreBlock.interact(world.getBlockState(pos), world, pos, entity); // add entity
++                }
++            } else {
++                EntityInteractEvent event = new EntityInteractEvent(entity.getBukkitEntity(), world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()));
++                world.getCraftServer().getPluginManager().callEvent(event);
++                if (!event.isCancelled()) {
++                    RedStoneOreBlock.interact(world.getBlockState(pos), world, pos, entity); // add entity
++                }
++            }
++            // CraftBukkit end
+         }
+ 
+         super.stepOn(world, pos, state, entity);
+@@ -56,16 +73,21 @@
+         if (world.isClientSide) {
+             RedStoneOreBlock.spawnParticles(world, pos);
+         } else {
+-            RedStoneOreBlock.interact(state, world, pos);
++            RedStoneOreBlock.interact(state, world, pos, player); // CraftBukkit - add entityhuman
+         }
+ 
+         return (InteractionResult) (stack.getItem() instanceof BlockItem && (new BlockPlaceContext(player, hand, stack, hit)).canPlace() ? InteractionResult.PASS : InteractionResult.SUCCESS);
+     }
+ 
+-    private static void interact(BlockState state, Level world, BlockPos pos) {
+-        RedStoneOreBlock.spawnParticles(world, pos);
+-        if (!(Boolean) state.getValue(RedStoneOreBlock.LIT)) {
+-            world.setBlock(pos, (BlockState) state.setValue(RedStoneOreBlock.LIT, true), 3);
++    private static void interact(BlockState iblockdata, Level world, BlockPos blockposition, Entity entity) { // CraftBukkit - add Entity
++        RedStoneOreBlock.spawnParticles(world, blockposition);
++        if (!(Boolean) iblockdata.getValue(RedStoneOreBlock.LIT)) {
++            // CraftBukkit start
++            if (!CraftEventFactory.callEntityChangeBlockEvent(entity, blockposition, iblockdata.setValue(RedStoneOreBlock.LIT, true))) {
++                return;
++            }
++            // CraftBukkit end
++            world.setBlock(blockposition, (BlockState) iblockdata.setValue(RedStoneOreBlock.LIT, true), 3);
+         }
+ 
+     }
+@@ -78,6 +100,11 @@
+     @Override
+     protected void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
+         if ((Boolean) state.getValue(RedStoneOreBlock.LIT)) {
++            // CraftBukkit start
++            if (CraftEventFactory.callBlockFadeEvent(world, pos, state.setValue(RedStoneOreBlock.LIT, false)).isCancelled()) {
++                return;
++            }
++            // CraftBukkit end
+             world.setBlock(pos, (BlockState) state.setValue(RedStoneOreBlock.LIT, false), 3);
+         }
+ 
+@@ -86,10 +113,17 @@
+     @Override
+     protected void spawnAfterBreak(BlockState state, ServerLevel world, BlockPos pos, ItemStack tool, boolean dropExperience) {
+         super.spawnAfterBreak(state, world, pos, tool, dropExperience);
+-        if (dropExperience) {
+-            this.tryDropExperience(world, pos, tool, UniformInt.of(1, 5));
++        // CraftBukkit start - Delegated to getExpDrop
++    }
++
++    @Override
++    public int getExpDrop(BlockState iblockdata, ServerLevel worldserver, BlockPos blockposition, ItemStack itemstack, boolean flag) {
++        if (flag) {
++            return this.tryDropExperience(worldserver, blockposition, itemstack, UniformInt.of(1, 5));
+         }
+ 
++        return 0;
++        // CraftBukkit end
+     }
+ 
+     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/RedstoneLampBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/RedstoneLampBlock.java.patch
new file mode 100644
index 0000000000..dc1b67c34c
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/RedstoneLampBlock.java.patch
@@ -0,0 +1,35 @@
+--- a/net/minecraft/world/level/block/RedstoneLampBlock.java
++++ b/net/minecraft/world/level/block/RedstoneLampBlock.java
+@@ -13,6 +13,8 @@
+ import net.minecraft.world.level.block.state.properties.BooleanProperty;
+ import net.minecraft.world.level.redstone.Orientation;
+ 
++import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
++
+ public class RedstoneLampBlock extends Block {
+ 
+     public static final MapCodec<RedstoneLampBlock> CODEC = simpleCodec(RedstoneLampBlock::new);
+@@ -43,6 +45,11 @@
+                 if (flag1) {
+                     world.scheduleTick(pos, (Block) this, 4);
+                 } else {
++                    // CraftBukkit start
++                    if (CraftEventFactory.callRedstoneChange(world, pos, 0, 15).getNewCurrent() != 15) {
++                        return;
++                    }
++                    // CraftBukkit end
+                     world.setBlock(pos, (BlockState) state.cycle(RedstoneLampBlock.LIT), 2);
+                 }
+             }
+@@ -53,6 +60,11 @@
+     @Override
+     protected void tick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
+         if ((Boolean) state.getValue(RedstoneLampBlock.LIT) && !world.hasNeighborSignal(pos)) {
++            // CraftBukkit start
++            if (CraftEventFactory.callRedstoneChange(world, pos, 15, 0).getNewCurrent() != 0) {
++                return;
++            }
++            // CraftBukkit end
+             world.setBlock(pos, (BlockState) state.cycle(RedstoneLampBlock.LIT), 2);
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/RedstoneTorchBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/RedstoneTorchBlock.java.patch
new file mode 100644
index 0000000000..bbf34c0df7
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/RedstoneTorchBlock.java.patch
@@ -0,0 +1,52 @@
+--- a/net/minecraft/world/level/block/RedstoneTorchBlock.java
++++ b/net/minecraft/world/level/block/RedstoneTorchBlock.java
+@@ -22,6 +22,8 @@
+ import net.minecraft.world.level.redstone.ExperimentalRedstoneUtils;
+ import net.minecraft.world.level.redstone.Orientation;
+ 
++import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
++
+ public class RedstoneTorchBlock extends BaseTorchBlock {
+ 
+     public static final MapCodec<RedstoneTorchBlock> CODEC = simpleCodec(RedstoneTorchBlock::new);
+@@ -85,8 +87,24 @@
+             list.remove(0);
+         }
+ 
++        // CraftBukkit start
++        org.bukkit.plugin.PluginManager manager = world.getCraftServer().getPluginManager();
++        org.bukkit.block.Block block = world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ());
++        int oldCurrent = ((Boolean) state.getValue(RedstoneTorchBlock.LIT)).booleanValue() ? 15 : 0;
++
++        BlockRedstoneEvent event = new BlockRedstoneEvent(block, oldCurrent, oldCurrent);
++        // CraftBukkit end
+         if ((Boolean) state.getValue(RedstoneTorchBlock.LIT)) {
+             if (flag) {
++                // CraftBukkit start
++                if (oldCurrent != 0) {
++                    event.setNewCurrent(0);
++                    manager.callEvent(event);
++                    if (event.getNewCurrent() != 0) {
++                        return;
++                    }
++                }
++                // CraftBukkit end
+                 world.setBlock(pos, (BlockState) state.setValue(RedstoneTorchBlock.LIT, false), 3);
+                 if (RedstoneTorchBlock.isToggledTooFrequently(world, pos, true)) {
+                     world.levelEvent(1502, pos, 0);
+@@ -94,6 +112,15 @@
+                 }
+             }
+         } else if (!flag && !RedstoneTorchBlock.isToggledTooFrequently(world, pos, false)) {
++            // CraftBukkit start
++            if (oldCurrent != 15) {
++                event.setNewCurrent(15);
++                manager.callEvent(event);
++                if (event.getNewCurrent() != 15) {
++                    return;
++                }
++            }
++            // CraftBukkit end
+             world.setBlock(pos, (BlockState) state.setValue(RedstoneTorchBlock.LIT, true), 3);
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/RespawnAnchorBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/RespawnAnchorBlock.java.patch
new file mode 100644
index 0000000000..22c28075e7
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/RespawnAnchorBlock.java.patch
@@ -0,0 +1,39 @@
+--- a/net/minecraft/world/level/block/RespawnAnchorBlock.java
++++ b/net/minecraft/world/level/block/RespawnAnchorBlock.java
+@@ -88,7 +88,7 @@
+                 ServerPlayer entityplayer = (ServerPlayer) player;
+ 
+                 if (entityplayer.getRespawnDimension() != world.dimension() || !pos.equals(entityplayer.getRespawnPosition())) {
+-                    entityplayer.setRespawnPosition(world.dimension(), pos, 0.0F, false, true);
++                    entityplayer.setRespawnPosition(world.dimension(), pos, 0.0F, false, true, org.bukkit.event.player.PlayerSpawnChangeEvent.Cause.RESPAWN_ANCHOR); // CraftBukkit
+                     world.playSound((Player) null, (double) pos.getX() + 0.5D, (double) pos.getY() + 0.5D, (double) pos.getZ() + 0.5D, SoundEvents.RESPAWN_ANCHOR_SET_SPAWN, SoundSource.BLOCKS, 1.0F, 1.0F);
+                     return InteractionResult.SUCCESS_SERVER;
+                 }
+@@ -127,15 +127,16 @@
+     }
+ 
+     private void explode(BlockState state, Level world, final BlockPos explodedPos) {
++        org.bukkit.block.BlockState blockState = org.bukkit.craftbukkit.block.CraftBlock.at(world, explodedPos).getState(); // CraftBukkit - capture BlockState before remove block
+         world.removeBlock(explodedPos, false);
+-        Stream stream = Direction.Plane.HORIZONTAL.stream();
++        Stream<Direction> stream = Direction.Plane.HORIZONTAL.stream(); // CraftBukkit - decompile error
+ 
+         Objects.requireNonNull(explodedPos);
+         boolean flag = stream.map(explodedPos::relative).anyMatch((blockposition1) -> {
+             return RespawnAnchorBlock.isWaterThatWouldFlow(blockposition1, world);
+         });
+         final boolean flag1 = flag || world.getFluidState(explodedPos.above()).is(FluidTags.WATER);
+-        ExplosionDamageCalculator explosiondamagecalculator = new ExplosionDamageCalculator(this) {
++        ExplosionDamageCalculator explosiondamagecalculator = new ExplosionDamageCalculator() { // CraftBukkit - decompile error
+             @Override
+             public Optional<Float> getBlockExplosionResistance(Explosion explosion, BlockGetter world, BlockPos pos, BlockState blockState, FluidState fluidState) {
+                 return pos.equals(explodedPos) && flag1 ? Optional.of(Blocks.WATER.getExplosionResistance()) : super.getBlockExplosionResistance(explosion, world, pos, blockState, fluidState);
+@@ -143,7 +144,7 @@
+         };
+         Vec3 vec3d = explodedPos.getCenter();
+ 
+-        world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d), explosiondamagecalculator, vec3d, 5.0F, true, Level.ExplosionInteraction.BLOCK);
++        world.explode((Entity) null, world.damageSources().badRespawnPointExplosion(vec3d, blockState), explosiondamagecalculator, vec3d, 5.0F, true, Level.ExplosionInteraction.BLOCK); // CraftBukkit - add state
+     }
+ 
+     public static boolean canSetSpawn(Level world) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/RootedDirtBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/RootedDirtBlock.java.patch
new file mode 100644
index 0000000000..de8d7301e4
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/RootedDirtBlock.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/level/block/RootedDirtBlock.java
++++ b/net/minecraft/world/level/block/RootedDirtBlock.java
+@@ -34,7 +34,7 @@
+ 
+     @Override
+     public void performBonemeal(ServerLevel world, RandomSource random, BlockPos pos, BlockState state) {
+-        world.setBlockAndUpdate(pos.below(), Blocks.HANGING_ROOTS.defaultBlockState());
++        org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, pos, pos.below(), Blocks.HANGING_ROOTS.defaultBlockState()); // CraftBukkit
+     }
+ 
+     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/RootedDirtBlock.patch b/paper-server/patches/sources/net/minecraft/world/level/block/RootedDirtBlock.patch
deleted file mode 100644
index bd12ce854a..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/RootedDirtBlock.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/level/block/RootedDirtBlock.java
-+++ b/net/minecraft/world/level/block/RootedDirtBlock.java
-@@ -34,7 +34,7 @@
- 
-     @Override
-     public void performBonemeal(WorldServer worldserver, RandomSource randomsource, BlockPosition blockposition, IBlockData iblockdata) {
--        worldserver.setBlockAndUpdate(blockposition.below(), Blocks.HANGING_ROOTS.defaultBlockState());
-+        org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(worldserver, blockposition, blockposition.below(), Blocks.HANGING_ROOTS.defaultBlockState()); // CraftBukkit
-     }
- 
-     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/SaplingBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/SaplingBlock.java.patch
new file mode 100644
index 0000000000..d2d4ec0d05
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/SaplingBlock.java.patch
@@ -0,0 +1,115 @@
+--- a/net/minecraft/world/level/block/SaplingBlock.java
++++ b/net/minecraft/world/level/block/SaplingBlock.java
+@@ -10,12 +10,19 @@
+ import net.minecraft.world.level.LevelReader;
+ import net.minecraft.world.level.block.grower.TreeGrower;
+ import net.minecraft.world.level.block.state.BlockBehaviour;
+-import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.level.block.state.StateDefinition;
+ import net.minecraft.world.level.block.state.properties.BlockStateProperties;
+ import net.minecraft.world.level.block.state.properties.IntegerProperty;
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++// CraftBukkit start
++import org.bukkit.Location;
++import org.bukkit.TreeType;
++import org.bukkit.block.BlockState;
++import org.bukkit.craftbukkit.block.CapturedBlockState;
++import org.bukkit.craftbukkit.util.CraftLocation;
++import org.bukkit.event.world.StructureGrowEvent;
++// CraftBukkit end
+ 
+ public class SaplingBlock extends BushBlock implements BonemealableBlock {
+ 
+@@ -28,6 +35,7 @@
+     protected static final float AABB_OFFSET = 6.0F;
+     protected static final VoxelShape SHAPE = Block.box(2.0D, 0.0D, 2.0D, 14.0D, 12.0D, 14.0D);
+     protected final TreeGrower treeGrower;
++    public static TreeType treeType; // CraftBukkit
+ 
+     @Override
+     public MapCodec<? extends SaplingBlock> codec() {
+@@ -37,48 +45,73 @@
+     protected SaplingBlock(TreeGrower generator, BlockBehaviour.Properties settings) {
+         super(settings);
+         this.treeGrower = generator;
+-        this.registerDefaultState((BlockState) ((BlockState) this.stateDefinition.any()).setValue(SaplingBlock.STAGE, 0));
++        this.registerDefaultState((net.minecraft.world.level.block.state.BlockState) ((net.minecraft.world.level.block.state.BlockState) this.stateDefinition.any()).setValue(SaplingBlock.STAGE, 0));
+     }
+ 
+     @Override
+-    protected VoxelShape getShape(BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) {
++    protected VoxelShape getShape(net.minecraft.world.level.block.state.BlockState state, BlockGetter world, BlockPos pos, CollisionContext context) {
+         return SaplingBlock.SHAPE;
+     }
+ 
+     @Override
+-    protected void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
++    protected void randomTick(net.minecraft.world.level.block.state.BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
+         if (world.getMaxLocalRawBrightness(pos.above()) >= 9 && random.nextInt(7) == 0) {
+             this.advanceTree(world, pos, state, random);
+         }
+ 
+     }
+ 
+-    public void advanceTree(ServerLevel world, BlockPos pos, BlockState state, RandomSource random) {
++    public void advanceTree(ServerLevel world, BlockPos pos, net.minecraft.world.level.block.state.BlockState state, RandomSource random) {
+         if ((Integer) state.getValue(SaplingBlock.STAGE) == 0) {
+-            world.setBlock(pos, (BlockState) state.cycle(SaplingBlock.STAGE), 4);
++            world.setBlock(pos, (net.minecraft.world.level.block.state.BlockState) state.cycle(SaplingBlock.STAGE), 4);
+         } else {
+-            this.treeGrower.growTree(world, world.getChunkSource().getGenerator(), pos, state, random);
++            // CraftBukkit start
++            if (world.captureTreeGeneration) {
++                this.treeGrower.growTree(world, world.getChunkSource().getGenerator(), pos, state, random);
++            } else {
++                world.captureTreeGeneration = true;
++                this.treeGrower.growTree(world, world.getChunkSource().getGenerator(), pos, state, random);
++                world.captureTreeGeneration = false;
++                if (world.capturedBlockStates.size() > 0) {
++                    TreeType treeType = SaplingBlock.treeType;
++                    SaplingBlock.treeType = null;
++                    Location location = CraftLocation.toBukkit(pos, world.getWorld());
++                    java.util.List<BlockState> blocks = new java.util.ArrayList<>(world.capturedBlockStates.values());
++                    world.capturedBlockStates.clear();
++                    StructureGrowEvent event = null;
++                    if (treeType != null) {
++                        event = new StructureGrowEvent(location, treeType, false, null, blocks);
++                        org.bukkit.Bukkit.getPluginManager().callEvent(event);
++                    }
++                    if (event == null || !event.isCancelled()) {
++                        for (BlockState blockstate : blocks) {
++                            CapturedBlockState.setBlockState(blockstate);
++                        }
++                    }
++                }
++            }
++            // CraftBukkit end
+         }
+ 
+     }
+ 
+     @Override
+-    public boolean isValidBonemealTarget(LevelReader world, BlockPos pos, BlockState state) {
++    public boolean isValidBonemealTarget(LevelReader world, BlockPos pos, net.minecraft.world.level.block.state.BlockState state) {
+         return true;
+     }
+ 
+     @Override
+-    public boolean isBonemealSuccess(Level world, RandomSource random, BlockPos pos, BlockState state) {
++    public boolean isBonemealSuccess(Level world, RandomSource random, BlockPos pos, net.minecraft.world.level.block.state.BlockState state) {
+         return (double) world.random.nextFloat() < 0.45D;
+     }
+ 
+     @Override
+-    public void performBonemeal(ServerLevel world, RandomSource random, BlockPos pos, BlockState state) {
++    public void performBonemeal(ServerLevel world, RandomSource random, BlockPos pos, net.minecraft.world.level.block.state.BlockState state) {
+         this.advanceTree(world, pos, state, random);
+     }
+ 
+     @Override
+-    protected void createBlockStateDefinition(StateDefinition.Builder<Block, BlockState> builder) {
++    protected void createBlockStateDefinition(StateDefinition.Builder<Block, net.minecraft.world.level.block.state.BlockState> builder) {
+         builder.add(SaplingBlock.STAGE);
+     }
+ }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/ScaffoldingBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/ScaffoldingBlock.java.patch
new file mode 100644
index 0000000000..9736b3492c
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/ScaffoldingBlock.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/level/block/ScaffoldingBlock.java
++++ b/net/minecraft/world/level/block/ScaffoldingBlock.java
+@@ -103,7 +103,7 @@
+         int i = ScaffoldingBlock.getDistance(world, pos);
+         BlockState iblockdata1 = (BlockState) ((BlockState) state.setValue(ScaffoldingBlock.DISTANCE, i)).setValue(ScaffoldingBlock.BOTTOM, this.isBottom(world, pos, i));
+ 
+-        if ((Integer) iblockdata1.getValue(ScaffoldingBlock.DISTANCE) == 7) {
++        if ((Integer) iblockdata1.getValue(ScaffoldingBlock.DISTANCE) == 7 && !org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, pos, Blocks.AIR.defaultBlockState()).isCancelled()) { // CraftBukkit - BlockFadeEvent
+             if ((Integer) state.getValue(ScaffoldingBlock.DISTANCE) == 7) {
+                 FallingBlockEntity.fall(world, pos, iblockdata1);
+             } else {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/SculkBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/SculkBlock.java.patch
new file mode 100644
index 0000000000..b7e23a6303
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/SculkBlock.java.patch
@@ -0,0 +1,16 @@
+--- a/net/minecraft/world/level/block/SculkBlock.java
++++ b/net/minecraft/world/level/block/SculkBlock.java
+@@ -43,8 +43,11 @@
+                     BlockPos blockposition2 = blockposition1.above();
+                     BlockState iblockdata = this.getRandomGrowthState(world, blockposition2, random, spreadManager.isWorldGeneration());
+ 
+-                    world.setBlock(blockposition2, iblockdata, 3);
+-                    world.playSound((Player) null, blockposition1, iblockdata.getSoundType().getPlaceSound(), SoundSource.BLOCKS, 1.0F, 1.0F);
++                    // CraftBukkit start - Call BlockSpreadEvent
++                    if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, catalystPos, blockposition2, iblockdata, 3)) {
++                        world.playSound((Player) null, blockposition1, iblockdata.getSoundType().getPlaceSound(), SoundSource.BLOCKS, 1.0F, 1.0F);
++                    }
++                    // CraftBukkit end
+                 }
+ 
+                 return Math.max(0, i - j);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/SculkBlock.patch b/paper-server/patches/sources/net/minecraft/world/level/block/SculkBlock.patch
deleted file mode 100644
index e6fd17eed5..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/SculkBlock.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/net/minecraft/world/level/block/SculkBlock.java
-+++ b/net/minecraft/world/level/block/SculkBlock.java
-@@ -43,8 +43,11 @@
-                     BlockPosition blockposition2 = blockposition1.above();
-                     IBlockData iblockdata = this.getRandomGrowthState(generatoraccess, blockposition2, randomsource, sculkspreader.isWorldGeneration());
- 
--                    generatoraccess.setBlock(blockposition2, iblockdata, 3);
--                    generatoraccess.playSound((EntityHuman) null, blockposition1, iblockdata.getSoundType().getPlaceSound(), SoundCategory.BLOCKS, 1.0F, 1.0F);
-+                    // CraftBukkit start - Call BlockSpreadEvent
-+                    if (org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(generatoraccess, blockposition, blockposition2, iblockdata, 3)) {
-+                        generatoraccess.playSound((EntityHuman) null, blockposition1, iblockdata.getSoundType().getPlaceSound(), SoundCategory.BLOCKS, 1.0F, 1.0F);
-+                    }
-+                    // CraftBukkit end
-                 }
- 
-                 return Math.max(0, i - j);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/SculkCatalystBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/SculkCatalystBlock.java.patch
new file mode 100644
index 0000000000..12314e3c0c
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/SculkCatalystBlock.java.patch
@@ -0,0 +1,21 @@
+--- a/net/minecraft/world/level/block/SculkCatalystBlock.java
++++ b/net/minecraft/world/level/block/SculkCatalystBlock.java
+@@ -63,9 +63,16 @@
+     @Override
+     protected void spawnAfterBreak(BlockState state, ServerLevel world, BlockPos pos, ItemStack tool, boolean dropExperience) {
+         super.spawnAfterBreak(state, world, pos, tool, dropExperience);
+-        if (dropExperience) {
+-            this.tryDropExperience(world, pos, tool, this.xpRange);
++        // CraftBukkit start - Delegate to getExpDrop
++    }
++
++    @Override
++    public int getExpDrop(BlockState iblockdata, ServerLevel worldserver, BlockPos blockposition, ItemStack itemstack, boolean flag) {
++        if (flag) {
++            return this.tryDropExperience(worldserver, blockposition, itemstack, this.xpRange);
+         }
+ 
++        return 0;
++        // CraftBukkit end
+     }
+ }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/SculkCatalystBlock.patch b/paper-server/patches/sources/net/minecraft/world/level/block/SculkCatalystBlock.patch
deleted file mode 100644
index 8c2b3aa355..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/SculkCatalystBlock.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/net/minecraft/world/level/block/SculkCatalystBlock.java
-+++ b/net/minecraft/world/level/block/SculkCatalystBlock.java
-@@ -63,9 +63,16 @@
-     @Override
-     protected void spawnAfterBreak(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack, boolean flag) {
-         super.spawnAfterBreak(iblockdata, worldserver, blockposition, itemstack, flag);
-+        // CraftBukkit start - Delegate to getExpDrop
-+    }
-+
-+    @Override
-+    public int getExpDrop(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack, boolean flag) {
-         if (flag) {
--            this.tryDropExperience(worldserver, blockposition, itemstack, this.xpRange);
-+            return this.tryDropExperience(worldserver, blockposition, itemstack, this.xpRange);
-         }
- 
-+        return 0;
-+        // CraftBukkit end
-     }
- }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/SculkSensorBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/SculkSensorBlock.java.patch
new file mode 100644
index 0000000000..c937fea7dd
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/SculkSensorBlock.java.patch
@@ -0,0 +1,83 @@
+--- a/net/minecraft/world/level/block/SculkSensorBlock.java
++++ b/net/minecraft/world/level/block/SculkSensorBlock.java
+@@ -43,6 +43,10 @@
+ import net.minecraft.world.level.pathfinder.PathComputationType;
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++// CraftBukkit start
++import org.bukkit.craftbukkit.block.CraftBlock;
++import org.bukkit.event.block.BlockRedstoneEvent;
++// CraftBukkit end
+ 
+ public class SculkSensorBlock extends BaseEntityBlock implements SimpleWaterloggedBlock {
+ 
+@@ -104,6 +108,18 @@
+     @Override
+     public void stepOn(Level world, BlockPos pos, BlockState state, Entity entity) {
+         if (!world.isClientSide() && SculkSensorBlock.canActivate(state) && entity.getType() != EntityType.WARDEN) {
++            // CraftBukkit start
++            org.bukkit.event.Cancellable cancellable;
++            if (entity instanceof Player) {
++                cancellable = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent((Player) entity, org.bukkit.event.block.Action.PHYSICAL, pos, null, null, null);
++            } else {
++                cancellable = new org.bukkit.event.entity.EntityInteractEvent(entity.getBukkitEntity(), world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()));
++                world.getCraftServer().getPluginManager().callEvent((org.bukkit.event.entity.EntityInteractEvent) cancellable);
++            }
++            if (cancellable.isCancelled()) {
++                return;
++            }
++            // CraftBukkit end
+             BlockEntity tileentity = world.getBlockEntity(pos);
+ 
+             if (tileentity instanceof SculkSensorBlockEntity) {
+@@ -202,6 +218,15 @@
+     }
+ 
+     public static void deactivate(Level world, BlockPos pos, BlockState state) {
++        // CraftBukkit start
++        BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(CraftBlock.at(world, pos), state.getValue(SculkSensorBlock.POWER), 0);
++        world.getCraftServer().getPluginManager().callEvent(eventRedstone);
++
++        if (eventRedstone.getNewCurrent() > 0) {
++            world.setBlock(pos, state.setValue(SculkSensorBlock.POWER, eventRedstone.getNewCurrent()), 3);
++            return;
++        }
++        // CraftBukkit end
+         world.setBlock(pos, (BlockState) ((BlockState) state.setValue(SculkSensorBlock.PHASE, SculkSensorPhase.COOLDOWN)).setValue(SculkSensorBlock.POWER, 0), 3);
+         world.scheduleTick(pos, state.getBlock(), 10);
+         SculkSensorBlock.updateNeighbours(world, pos, state);
+@@ -213,6 +238,15 @@
+     }
+ 
+     public void activate(@Nullable Entity sourceEntity, Level world, BlockPos pos, BlockState state, int power, int frequency) {
++        // CraftBukkit start
++        BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(CraftBlock.at(world, pos), state.getValue(SculkSensorBlock.POWER), power);
++        world.getCraftServer().getPluginManager().callEvent(eventRedstone);
++
++        if (eventRedstone.getNewCurrent() <= 0) {
++            return;
++        }
++        power = eventRedstone.getNewCurrent();
++        // CraftBukkit end
+         world.setBlock(pos, (BlockState) ((BlockState) state.setValue(SculkSensorBlock.PHASE, SculkSensorPhase.ACTIVE)).setValue(SculkSensorBlock.POWER, power), 3);
+         world.scheduleTick(pos, state.getBlock(), this.getActiveTicks());
+         SculkSensorBlock.updateNeighbours(world, pos, state);
+@@ -293,9 +327,16 @@
+     @Override
+     protected void spawnAfterBreak(BlockState state, ServerLevel world, BlockPos pos, ItemStack tool, boolean dropExperience) {
+         super.spawnAfterBreak(state, world, pos, tool, dropExperience);
+-        if (dropExperience) {
+-            this.tryDropExperience(world, pos, tool, ConstantInt.of(5));
++        // CraftBukkit start - Delegate to getExpDrop
++    }
++
++    @Override
++    public int getExpDrop(BlockState iblockdata, ServerLevel worldserver, BlockPos blockposition, ItemStack itemstack, boolean flag) {
++        if (flag) {
++            return this.tryDropExperience(worldserver, blockposition, itemstack, ConstantInt.of(5));
+         }
+ 
++        return 0;
++        // CraftBukkit end
+     }
+ }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/SculkSensorBlock.patch b/paper-server/patches/sources/net/minecraft/world/level/block/SculkSensorBlock.patch
deleted file mode 100644
index 7621da01e6..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/SculkSensorBlock.patch
+++ /dev/null
@@ -1,83 +0,0 @@
---- a/net/minecraft/world/level/block/SculkSensorBlock.java
-+++ b/net/minecraft/world/level/block/SculkSensorBlock.java
-@@ -44,6 +44,11 @@
- import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.block.CraftBlock;
-+import org.bukkit.event.block.BlockRedstoneEvent;
-+// CraftBukkit end
-+
- public class SculkSensorBlock extends BlockTileEntity implements IBlockWaterlogged {
- 
-     public static final MapCodec<SculkSensorBlock> CODEC = simpleCodec(SculkSensorBlock::new);
-@@ -104,6 +109,18 @@
-     @Override
-     public void stepOn(World world, BlockPosition blockposition, IBlockData iblockdata, Entity entity) {
-         if (!world.isClientSide() && canActivate(iblockdata) && entity.getType() != EntityTypes.WARDEN) {
-+            // CraftBukkit start
-+            org.bukkit.event.Cancellable cancellable;
-+            if (entity instanceof EntityHuman) {
-+                cancellable = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent((EntityHuman) entity, org.bukkit.event.block.Action.PHYSICAL, blockposition, null, null, null);
-+            } else {
-+                cancellable = new org.bukkit.event.entity.EntityInteractEvent(entity.getBukkitEntity(), world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()));
-+                world.getCraftServer().getPluginManager().callEvent((org.bukkit.event.entity.EntityInteractEvent) cancellable);
-+            }
-+            if (cancellable.isCancelled()) {
-+                return;
-+            }
-+            // CraftBukkit end
-             TileEntity tileentity = world.getBlockEntity(blockposition);
- 
-             if (tileentity instanceof SculkSensorBlockEntity) {
-@@ -202,6 +219,15 @@
-     }
- 
-     public static void deactivate(World world, BlockPosition blockposition, IBlockData iblockdata) {
-+        // CraftBukkit start
-+        BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(CraftBlock.at(world, blockposition), iblockdata.getValue(SculkSensorBlock.POWER), 0);
-+        world.getCraftServer().getPluginManager().callEvent(eventRedstone);
-+
-+        if (eventRedstone.getNewCurrent() > 0) {
-+            world.setBlock(blockposition, iblockdata.setValue(SculkSensorBlock.POWER, eventRedstone.getNewCurrent()), 3);
-+            return;
-+        }
-+        // CraftBukkit end
-         world.setBlock(blockposition, (IBlockData) ((IBlockData) iblockdata.setValue(SculkSensorBlock.PHASE, SculkSensorPhase.COOLDOWN)).setValue(SculkSensorBlock.POWER, 0), 3);
-         world.scheduleTick(blockposition, iblockdata.getBlock(), 10);
-         updateNeighbours(world, blockposition, iblockdata);
-@@ -213,6 +239,15 @@
-     }
- 
-     public void activate(@Nullable Entity entity, World world, BlockPosition blockposition, IBlockData iblockdata, int i, int j) {
-+        // CraftBukkit start
-+        BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(CraftBlock.at(world, blockposition), iblockdata.getValue(SculkSensorBlock.POWER), i);
-+        world.getCraftServer().getPluginManager().callEvent(eventRedstone);
-+
-+        if (eventRedstone.getNewCurrent() <= 0) {
-+            return;
-+        }
-+        i = eventRedstone.getNewCurrent();
-+        // CraftBukkit end
-         world.setBlock(blockposition, (IBlockData) ((IBlockData) iblockdata.setValue(SculkSensorBlock.PHASE, SculkSensorPhase.ACTIVE)).setValue(SculkSensorBlock.POWER, i), 3);
-         world.scheduleTick(blockposition, iblockdata.getBlock(), this.getActiveTicks());
-         updateNeighbours(world, blockposition, iblockdata);
-@@ -293,9 +328,16 @@
-     @Override
-     protected void spawnAfterBreak(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack, boolean flag) {
-         super.spawnAfterBreak(iblockdata, worldserver, blockposition, itemstack, flag);
-+        // CraftBukkit start - Delegate to getExpDrop
-+    }
-+
-+    @Override
-+    public int getExpDrop(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack, boolean flag) {
-         if (flag) {
--            this.tryDropExperience(worldserver, blockposition, itemstack, ConstantInt.of(5));
-+            return this.tryDropExperience(worldserver, blockposition, itemstack, ConstantInt.of(5));
-         }
- 
-+        return 0;
-+        // CraftBukkit end
-     }
- }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/SculkShriekerBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/SculkShriekerBlock.java.patch
new file mode 100644
index 0000000000..8c254d2936
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/SculkShriekerBlock.java.patch
@@ -0,0 +1,30 @@
+--- a/net/minecraft/world/level/block/SculkShriekerBlock.java
++++ b/net/minecraft/world/level/block/SculkShriekerBlock.java
+@@ -63,6 +63,7 @@
+             ServerPlayer entityplayer = SculkShriekerBlockEntity.tryGetPlayer(entity);
+ 
+             if (entityplayer != null) {
++                if (org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(entityplayer, org.bukkit.event.block.Action.PHYSICAL, pos, null, null, null).isCancelled()) return; // CraftBukkit
+                 worldserver.getBlockEntity(pos, BlockEntityType.SCULK_SHRIEKER).ifPresent((sculkshriekerblockentity) -> {
+                     sculkshriekerblockentity.tryShriek(worldserver, entityplayer);
+                 });
+@@ -140,10 +141,17 @@
+     @Override
+     protected void spawnAfterBreak(BlockState state, ServerLevel world, BlockPos pos, ItemStack tool, boolean dropExperience) {
+         super.spawnAfterBreak(state, world, pos, tool, dropExperience);
+-        if (dropExperience) {
+-            this.tryDropExperience(world, pos, tool, ConstantInt.of(5));
++        // CraftBukkit start - Delegate to getExpDrop
++    }
++
++    @Override
++    public int getExpDrop(BlockState iblockdata, ServerLevel worldserver, BlockPos blockposition, ItemStack itemstack, boolean flag) {
++        if (flag) {
++            return this.tryDropExperience(worldserver, blockposition, itemstack, ConstantInt.of(5));
+         }
+ 
++        return 0;
++        // CraftBukkit end
+     }
+ 
+     @Nullable
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/SculkShriekerBlock.patch b/paper-server/patches/sources/net/minecraft/world/level/block/SculkShriekerBlock.patch
deleted file mode 100644
index 57ab988569..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/SculkShriekerBlock.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/net/minecraft/world/level/block/SculkShriekerBlock.java
-+++ b/net/minecraft/world/level/block/SculkShriekerBlock.java
-@@ -63,6 +63,7 @@
-             EntityPlayer entityplayer = SculkShriekerBlockEntity.tryGetPlayer(entity);
- 
-             if (entityplayer != null) {
-+                if (org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent(entityplayer, org.bukkit.event.block.Action.PHYSICAL, blockposition, null, null, null).isCancelled()) return; // CraftBukkit
-                 worldserver.getBlockEntity(blockposition, TileEntityTypes.SCULK_SHRIEKER).ifPresent((sculkshriekerblockentity) -> {
-                     sculkshriekerblockentity.tryShriek(worldserver, entityplayer);
-                 });
-@@ -140,10 +141,17 @@
-     @Override
-     protected void spawnAfterBreak(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack, boolean flag) {
-         super.spawnAfterBreak(iblockdata, worldserver, blockposition, itemstack, flag);
-+        // CraftBukkit start - Delegate to getExpDrop
-+    }
-+
-+    @Override
-+    public int getExpDrop(IBlockData iblockdata, WorldServer worldserver, BlockPosition blockposition, ItemStack itemstack, boolean flag) {
-         if (flag) {
--            this.tryDropExperience(worldserver, blockposition, itemstack, ConstantInt.of(5));
-+            return this.tryDropExperience(worldserver, blockposition, itemstack, ConstantInt.of(5));
-         }
- 
-+        return 0;
-+        // CraftBukkit end
-     }
- 
-     @Nullable
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/SculkSpreader.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/SculkSpreader.java.patch
new file mode 100644
index 0000000000..ac78e04b92
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/SculkSpreader.java.patch
@@ -0,0 +1,80 @@
+--- a/net/minecraft/world/level/block/SculkSpreader.java
++++ b/net/minecraft/world/level/block/SculkSpreader.java
+@@ -30,6 +30,7 @@
+ import net.minecraft.core.Vec3i;
+ import net.minecraft.nbt.CompoundTag;
+ import net.minecraft.nbt.NbtOps;
++import net.minecraft.nbt.Tag;
+ import net.minecraft.server.level.ServerLevel;
+ import net.minecraft.sounds.SoundEvents;
+ import net.minecraft.sounds.SoundSource;
+@@ -37,9 +38,14 @@
+ import net.minecraft.tags.TagKey;
+ import net.minecraft.util.RandomSource;
+ import net.minecraft.world.entity.player.Player;
++import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.LevelAccessor;
+ import net.minecraft.world.level.block.state.BlockState;
+ import org.slf4j.Logger;
++import org.bukkit.Bukkit;
++import org.bukkit.craftbukkit.block.CraftBlock;
++import org.bukkit.event.block.SculkBloomEvent;
++// CraftBukkit end
+ 
+ public class SculkSpreader {
+ 
+@@ -57,6 +63,7 @@
+     private final int additionalDecayRate;
+     private List<SculkSpreader.ChargeCursor> cursors = new ArrayList();
+     private static final Logger LOGGER = LogUtils.getLogger();
++    public Level level; // CraftBukkit
+ 
+     public SculkSpreader(boolean worldGen, TagKey<Block> replaceableTag, int extraBlockChance, int maxDistance, int spreadChance, int decayChance) {
+         this.isWorldGeneration = worldGen;
+@@ -111,7 +118,7 @@
+     public void load(CompoundTag nbt) {
+         if (nbt.contains("cursors", 9)) {
+             this.cursors.clear();
+-            DataResult dataresult = SculkSpreader.ChargeCursor.CODEC.listOf().parse(new Dynamic(NbtOps.INSTANCE, nbt.getList("cursors", 10)));
++            DataResult<List<SculkSpreader.ChargeCursor>> dataresult = SculkSpreader.ChargeCursor.CODEC.listOf().parse(new Dynamic<>(NbtOps.INSTANCE, nbt.getList("cursors", 10))); // CraftBukkit - decompile error
+             Logger logger = SculkSpreader.LOGGER;
+ 
+             Objects.requireNonNull(logger);
+@@ -126,7 +133,7 @@
+     }
+ 
+     public void save(CompoundTag nbt) {
+-        DataResult dataresult = SculkSpreader.ChargeCursor.CODEC.listOf().encodeStart(NbtOps.INSTANCE, this.cursors);
++        DataResult<Tag> dataresult = SculkSpreader.ChargeCursor.CODEC.listOf().encodeStart(NbtOps.INSTANCE, this.cursors); // CraftBukkit - decompile error
+         Logger logger = SculkSpreader.LOGGER;
+ 
+         Objects.requireNonNull(logger);
+@@ -147,6 +154,19 @@
+ 
+     private void addCursor(SculkSpreader.ChargeCursor cursor) {
+         if (this.cursors.size() < 32) {
++            // CraftBukkit start
++            if (!this.isWorldGeneration()) { // CraftBukkit - SPIGOT-7475: Don't call event during world generation
++                CraftBlock bukkitBlock = CraftBlock.at(this.level, cursor.pos);
++                SculkBloomEvent event = new SculkBloomEvent(bukkitBlock, cursor.getCharge());
++                Bukkit.getPluginManager().callEvent(event);
++                if (event.isCancelled()) {
++                    return;
++                }
++
++                cursor.charge = event.getCharge();
++            }
++            // CraftBukkit end
++
+             this.cursors.add(cursor);
+         }
+     }
+@@ -244,7 +264,7 @@
+             this.charge = charge;
+             this.decayDelay = decay;
+             this.updateDelay = update;
+-            this.facings = (Set) faces.orElse((Object) null);
++            this.facings = (Set) faces.orElse(null); // CraftBukkit - decompile error
+         }
+ 
+         public ChargeCursor(BlockPos pos, int charge) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/SculkSpreader.patch b/paper-server/patches/sources/net/minecraft/world/level/block/SculkSpreader.patch
deleted file mode 100644
index 0a02154d46..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/SculkSpreader.patch
+++ /dev/null
@@ -1,72 +0,0 @@
---- a/net/minecraft/world/level/block/SculkSpreader.java
-+++ b/net/minecraft/world/level/block/SculkSpreader.java
-@@ -41,6 +41,14 @@
- import net.minecraft.world.level.block.state.IBlockData;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import net.minecraft.nbt.NBTBase;
-+import net.minecraft.world.level.World;
-+import org.bukkit.Bukkit;
-+import org.bukkit.craftbukkit.block.CraftBlock;
-+import org.bukkit.event.block.SculkBloomEvent;
-+// CraftBukkit end
-+
- public class SculkSpreader {
- 
-     public static final int MAX_GROWTH_RATE_RADIUS = 24;
-@@ -57,6 +65,7 @@
-     private final int additionalDecayRate;
-     private List<SculkSpreader.a> cursors = new ArrayList();
-     private static final Logger LOGGER = LogUtils.getLogger();
-+    public World level; // CraftBukkit
- 
-     public SculkSpreader(boolean flag, TagKey<Block> tagkey, int i, int j, int k, int l) {
-         this.isWorldGeneration = flag;
-@@ -111,7 +120,7 @@
-     public void load(NBTTagCompound nbttagcompound) {
-         if (nbttagcompound.contains("cursors", 9)) {
-             this.cursors.clear();
--            DataResult dataresult = SculkSpreader.a.CODEC.listOf().parse(new Dynamic(DynamicOpsNBT.INSTANCE, nbttagcompound.getList("cursors", 10)));
-+            DataResult<List<SculkSpreader.a>> dataresult = SculkSpreader.a.CODEC.listOf().parse(new Dynamic<>(DynamicOpsNBT.INSTANCE, nbttagcompound.getList("cursors", 10))); // CraftBukkit - decompile error
-             Logger logger = SculkSpreader.LOGGER;
- 
-             Objects.requireNonNull(logger);
-@@ -126,7 +135,7 @@
-     }
- 
-     public void save(NBTTagCompound nbttagcompound) {
--        DataResult dataresult = SculkSpreader.a.CODEC.listOf().encodeStart(DynamicOpsNBT.INSTANCE, this.cursors);
-+        DataResult<NBTBase> dataresult = SculkSpreader.a.CODEC.listOf().encodeStart(DynamicOpsNBT.INSTANCE, this.cursors); // CraftBukkit - decompile error
-         Logger logger = SculkSpreader.LOGGER;
- 
-         Objects.requireNonNull(logger);
-@@ -147,6 +156,19 @@
- 
-     private void addCursor(SculkSpreader.a sculkspreader_a) {
-         if (this.cursors.size() < 32) {
-+            // CraftBukkit start
-+            if (!isWorldGeneration()) { // CraftBukkit - SPIGOT-7475: Don't call event during world generation
-+                CraftBlock bukkitBlock = CraftBlock.at(level, sculkspreader_a.pos);
-+                SculkBloomEvent event = new SculkBloomEvent(bukkitBlock, sculkspreader_a.getCharge());
-+                Bukkit.getPluginManager().callEvent(event);
-+                if (event.isCancelled()) {
-+                    return;
-+                }
-+
-+                sculkspreader_a.charge = event.getCharge();
-+            }
-+            // CraftBukkit end
-+
-             this.cursors.add(sculkspreader_a);
-         }
-     }
-@@ -244,7 +266,7 @@
-             this.charge = i;
-             this.decayDelay = j;
-             this.updateDelay = k;
--            this.facings = (Set) optional.orElse((Object) null);
-+            this.facings = (Set) optional.orElse(null); // CraftBukkit - decompile error
-         }
- 
-         public a(BlockPosition blockposition, int i) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/SculkVeinBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/SculkVeinBlock.java.patch
new file mode 100644
index 0000000000..4d009bd7c1
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/SculkVeinBlock.java.patch
@@ -0,0 +1,60 @@
+--- a/net/minecraft/world/level/block/SculkVeinBlock.java
++++ b/net/minecraft/world/level/block/SculkVeinBlock.java
+@@ -101,28 +101,33 @@
+ 
+     @Override
+     public int attemptUseCharge(SculkSpreader.ChargeCursor cursor, LevelAccessor world, BlockPos catalystPos, RandomSource random, SculkSpreader spreadManager, boolean shouldConvertToBlock) {
+-        return shouldConvertToBlock && this.attemptPlaceSculk(spreadManager, world, cursor.getPos(), random) ? cursor.getCharge() - 1 : (random.nextInt(spreadManager.chargeDecayRate()) == 0 ? Mth.floor((float) cursor.getCharge() * 0.5F) : cursor.getCharge());
++        // CraftBukkit - add source block
++        return shouldConvertToBlock && this.attemptPlaceSculk(spreadManager, world, cursor.getPos(), random, catalystPos) ? cursor.getCharge() - 1 : (random.nextInt(spreadManager.chargeDecayRate()) == 0 ? Mth.floor((float) cursor.getCharge() * 0.5F) : cursor.getCharge());
+     }
+ 
+-    private boolean attemptPlaceSculk(SculkSpreader spreadManager, LevelAccessor world, BlockPos pos, RandomSource random) {
+-        BlockState iblockdata = world.getBlockState(pos);
+-        TagKey<Block> tagkey = spreadManager.replaceableBlocks();
+-        Iterator iterator = Direction.allShuffled(random).iterator();
++    private boolean attemptPlaceSculk(SculkSpreader sculkspreader, LevelAccessor generatoraccess, BlockPos blockposition, RandomSource randomsource, BlockPos sourceBlock) { // CraftBukkit
++        BlockState iblockdata = generatoraccess.getBlockState(blockposition);
++        TagKey<Block> tagkey = sculkspreader.replaceableBlocks();
++        Iterator iterator = Direction.allShuffled(randomsource).iterator();
+ 
+         while (iterator.hasNext()) {
+             Direction enumdirection = (Direction) iterator.next();
+ 
+             if (hasFace(iblockdata, enumdirection)) {
+-                BlockPos blockposition1 = pos.relative(enumdirection);
+-                BlockState iblockdata1 = world.getBlockState(blockposition1);
++                BlockPos blockposition1 = blockposition.relative(enumdirection);
++                BlockState iblockdata1 = generatoraccess.getBlockState(blockposition1);
+ 
+                 if (iblockdata1.is(tagkey)) {
+                     BlockState iblockdata2 = Blocks.SCULK.defaultBlockState();
+ 
+-                    world.setBlock(blockposition1, iblockdata2, 3);
+-                    Block.pushEntitiesUp(iblockdata1, iblockdata2, world, blockposition1);
+-                    world.playSound((Player) null, blockposition1, SoundEvents.SCULK_BLOCK_SPREAD, SoundSource.BLOCKS, 1.0F, 1.0F);
+-                    this.veinSpreader.spreadAll(iblockdata2, world, blockposition1, spreadManager.isWorldGeneration());
++                    // CraftBukkit start - Call BlockSpreadEvent
++                    if (!org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(generatoraccess, sourceBlock, blockposition1, iblockdata2, 3)) {
++                        return false;
++                    }
++                    // CraftBukkit end
++                    Block.pushEntitiesUp(iblockdata1, iblockdata2, generatoraccess, blockposition1);
++                    generatoraccess.playSound((Player) null, blockposition1, SoundEvents.SCULK_BLOCK_SPREAD, SoundSource.BLOCKS, 1.0F, 1.0F);
++                    this.veinSpreader.spreadAll(iblockdata2, generatoraccess, blockposition1, sculkspreader.isWorldGeneration());
+                     Direction enumdirection1 = enumdirection.getOpposite();
+                     Direction[] aenumdirection = SculkVeinBlock.DIRECTIONS;
+                     int i = aenumdirection.length;
+@@ -132,10 +137,10 @@
+ 
+                         if (enumdirection2 != enumdirection1) {
+                             BlockPos blockposition2 = blockposition1.relative(enumdirection2);
+-                            BlockState iblockdata3 = world.getBlockState(blockposition2);
++                            BlockState iblockdata3 = generatoraccess.getBlockState(blockposition2);
+ 
+                             if (iblockdata3.is((Block) this)) {
+-                                this.onDischarged(world, iblockdata3, blockposition2, random);
++                                this.onDischarged(generatoraccess, iblockdata3, blockposition2, randomsource);
+                             }
+                         }
+                     }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/SculkVeinBlock.patch b/paper-server/patches/sources/net/minecraft/world/level/block/SculkVeinBlock.patch
deleted file mode 100644
index 768898a5e6..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/SculkVeinBlock.patch
+++ /dev/null
@@ -1,29 +0,0 @@
---- a/net/minecraft/world/level/block/SculkVeinBlock.java
-+++ b/net/minecraft/world/level/block/SculkVeinBlock.java
-@@ -101,10 +101,11 @@
- 
-     @Override
-     public int attemptUseCharge(SculkSpreader.a sculkspreader_a, GeneratorAccess generatoraccess, BlockPosition blockposition, RandomSource randomsource, SculkSpreader sculkspreader, boolean flag) {
--        return flag && this.attemptPlaceSculk(sculkspreader, generatoraccess, sculkspreader_a.getPos(), randomsource) ? sculkspreader_a.getCharge() - 1 : (randomsource.nextInt(sculkspreader.chargeDecayRate()) == 0 ? MathHelper.floor((float) sculkspreader_a.getCharge() * 0.5F) : sculkspreader_a.getCharge());
-+        // CraftBukkit - add source block
-+        return flag && this.attemptPlaceSculk(sculkspreader, generatoraccess, sculkspreader_a.getPos(), randomsource, blockposition) ? sculkspreader_a.getCharge() - 1 : (randomsource.nextInt(sculkspreader.chargeDecayRate()) == 0 ? MathHelper.floor((float) sculkspreader_a.getCharge() * 0.5F) : sculkspreader_a.getCharge());
-     }
- 
--    private boolean attemptPlaceSculk(SculkSpreader sculkspreader, GeneratorAccess generatoraccess, BlockPosition blockposition, RandomSource randomsource) {
-+    private boolean attemptPlaceSculk(SculkSpreader sculkspreader, GeneratorAccess generatoraccess, BlockPosition blockposition, RandomSource randomsource, BlockPosition sourceBlock) { // CraftBukkit
-         IBlockData iblockdata = generatoraccess.getBlockState(blockposition);
-         TagKey<Block> tagkey = sculkspreader.replaceableBlocks();
-         Iterator iterator = EnumDirection.allShuffled(randomsource).iterator();
-@@ -119,7 +120,11 @@
-                 if (iblockdata1.is(tagkey)) {
-                     IBlockData iblockdata2 = Blocks.SCULK.defaultBlockState();
- 
--                    generatoraccess.setBlock(blockposition1, iblockdata2, 3);
-+                    // CraftBukkit start - Call BlockSpreadEvent
-+                    if (!org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(generatoraccess, sourceBlock, blockposition1, iblockdata2, 3)) {
-+                        return false;
-+                    }
-+                    // CraftBukkit end
-                     Block.pushEntitiesUp(iblockdata1, iblockdata2, generatoraccess, blockposition1);
-                     generatoraccess.playSound((EntityHuman) null, blockposition1, SoundEffects.SCULK_BLOCK_SPREAD, SoundCategory.BLOCKS, 1.0F, 1.0F);
-                     this.veinSpreader.spreadAll(iblockdata2, generatoraccess, blockposition1, sculkspreader.isWorldGeneration());
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/SignBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/SignBlock.java.patch
new file mode 100644
index 0000000000..f91c812082
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/SignBlock.java.patch
@@ -0,0 +1,41 @@
+--- a/net/minecraft/world/level/block/SignBlock.java
++++ b/net/minecraft/world/level/block/SignBlock.java
+@@ -140,7 +140,7 @@
+             } else if (flag1) {
+                 return InteractionResult.SUCCESS_SERVER;
+             } else if (!this.otherPlayerIsEditingSign(player, tileentitysign) && player.mayBuild() && this.hasEditableText(player, tileentitysign, flag)) {
+-                this.openTextEdit(player, tileentitysign, flag);
++                this.openTextEdit(player, tileentitysign, flag, org.bukkit.event.player.PlayerSignOpenEvent.Cause.INTERACT); // CraftBukkit
+                 return InteractionResult.SUCCESS_SERVER;
+             } else {
+                 return InteractionResult.PASS;
+@@ -186,10 +186,19 @@
+     }
+ 
+     public void openTextEdit(Player player, SignBlockEntity blockEntity, boolean front) {
+-        blockEntity.setAllowedPlayerEditor(player.getUUID());
+-        player.openTextEdit(blockEntity, front);
++        // Craftbukkit start
++        this.openTextEdit(player, blockEntity, front, org.bukkit.event.player.PlayerSignOpenEvent.Cause.UNKNOWN);
+     }
+ 
++    public void openTextEdit(Player entityhuman, SignBlockEntity tileentitysign, boolean flag, org.bukkit.event.player.PlayerSignOpenEvent.Cause cause) {
++        if (!org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerSignOpenEvent(entityhuman, tileentitysign, flag, cause)) {
++            return;
++        }
++        // Craftbukkit end
++        tileentitysign.setAllowedPlayerEditor(entityhuman.getUUID());
++        entityhuman.openTextEdit(tileentitysign, flag);
++    }
++
+     private boolean otherPlayerIsEditingSign(Player player, SignBlockEntity blockEntity) {
+         UUID uuid = blockEntity.getPlayerWhoMayEdit();
+ 
+@@ -199,6 +208,6 @@
+     @Nullable
+     @Override
+     public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level world, BlockState state, BlockEntityType<T> type) {
+-        return createTickerHelper(type, BlockEntityType.SIGN, SignBlockEntity::tick);
++        return null; // Craftbukkit - remove unnecessary sign ticking
+     }
+ }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/SnowLayerBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/SnowLayerBlock.java.patch
new file mode 100644
index 0000000000..5db7dbeea9
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/SnowLayerBlock.java.patch
@@ -0,0 +1,14 @@
+--- a/net/minecraft/world/level/block/SnowLayerBlock.java
++++ b/net/minecraft/world/level/block/SnowLayerBlock.java
+@@ -99,6 +99,11 @@
+     @Override
+     protected void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
+         if (world.getBrightness(LightLayer.BLOCK, pos) > 11) {
++            // CraftBukkit start
++            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, pos, Blocks.AIR.defaultBlockState()).isCancelled()) {
++                return;
++            }
++            // CraftBukkit end
+             dropResources(state, world, pos);
+             world.removeBlock(pos, false);
+         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/SpawnerBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/SpawnerBlock.java.patch
new file mode 100644
index 0000000000..8f4ea72cba
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/SpawnerBlock.java.patch
@@ -0,0 +1,26 @@
+--- a/net/minecraft/world/level/block/SpawnerBlock.java
++++ b/net/minecraft/world/level/block/SpawnerBlock.java
+@@ -45,12 +45,20 @@
+     @Override
+     protected void spawnAfterBreak(BlockState state, ServerLevel world, BlockPos pos, ItemStack tool, boolean dropExperience) {
+         super.spawnAfterBreak(state, world, pos, tool, dropExperience);
+-        if (dropExperience) {
+-            int i = 15 + world.random.nextInt(15) + world.random.nextInt(15);
++        // CraftBukkit start - Delegate to getExpDrop
++    }
+ 
+-            this.popExperience(world, pos, i);
++    @Override
++    public int getExpDrop(BlockState iblockdata, ServerLevel worldserver, BlockPos blockposition, ItemStack itemstack, boolean flag) {
++        if (flag) {
++            int i = 15 + worldserver.random.nextInt(15) + worldserver.random.nextInt(15);
++
++            // this.popExperience(worldserver, blockposition, i);
++            return i;
+         }
+ 
++        return 0;
++        // CraftBukkit end
+     }
+ 
+     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockSponge.patch b/paper-server/patches/sources/net/minecraft/world/level/block/SpongeBlock.java.patch
similarity index 54%
rename from paper-server/patches/sources/net/minecraft/world/level/block/BlockSponge.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/SpongeBlock.java.patch
index 485c397648..c77182c079 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockSponge.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/SpongeBlock.java.patch
@@ -1,7 +1,7 @@
---- a/net/minecraft/world/level/block/BlockSponge.java
-+++ b/net/minecraft/world/level/block/BlockSponge.java
+--- a/net/minecraft/world/level/block/SpongeBlock.java
++++ b/net/minecraft/world/level/block/SpongeBlock.java
 @@ -15,6 +15,13 @@
- import net.minecraft.world.level.material.Fluid;
+ import net.minecraft.world.level.material.FluidState;
  import net.minecraft.world.level.redstone.Orientation;
  
 +// CraftBukkit start
@@ -11,51 +11,51 @@
 +import org.bukkit.event.block.SpongeAbsorbEvent;
 +// CraftBukkit end
 +
- public class BlockSponge extends Block {
+ public class SpongeBlock extends Block {
  
-     public static final MapCodec<BlockSponge> CODEC = simpleCodec(BlockSponge::new);
+     public static final MapCodec<SpongeBlock> CODEC = simpleCodec(SpongeBlock::new);
 @@ -53,7 +60,8 @@
      }
  
-     private boolean removeWaterBreadthFirstSearch(World world, BlockPosition blockposition) {
--        return BlockPosition.breadthFirstTraversal(blockposition, 6, 65, (blockposition1, consumer) -> {
+     private boolean removeWaterBreadthFirstSearch(Level world, BlockPos pos) {
+-        return BlockPos.breadthFirstTraversal(pos, 6, 65, (blockposition1, consumer) -> {
 +        BlockStateListPopulator blockList = new BlockStateListPopulator(world); // CraftBukkit - Use BlockStateListPopulator
-+        BlockPosition.breadthFirstTraversal(blockposition, 6, 65, (blockposition1, consumer) -> {
-             EnumDirection[] aenumdirection = BlockSponge.ALL_DIRECTIONS;
++        BlockPos.breadthFirstTraversal(pos, 6, 65, (blockposition1, consumer) -> {
+             Direction[] aenumdirection = SpongeBlock.ALL_DIRECTIONS;
              int i = aenumdirection.length;
  
 @@ -67,8 +75,10 @@
-             if (blockposition1.equals(blockposition)) {
-                 return BlockPosition.b.ACCEPT;
+             if (blockposition1.equals(pos)) {
+                 return BlockPos.TraversalNodeStatus.ACCEPT;
              } else {
--                IBlockData iblockdata = world.getBlockState(blockposition1);
--                Fluid fluid = world.getFluidState(blockposition1);
+-                BlockState iblockdata = world.getBlockState(blockposition1);
+-                FluidState fluid = world.getFluidState(blockposition1);
 +                // CraftBukkit start
-+                IBlockData iblockdata = blockList.getBlockState(blockposition1);
-+                Fluid fluid = blockList.getFluidState(blockposition1);
++                BlockState iblockdata = blockList.getBlockState(blockposition1);
++                FluidState fluid = blockList.getFluidState(blockposition1);
 +                // CraftBukkit end
  
-                 if (!fluid.is(TagsFluid.WATER)) {
-                     return BlockPosition.b.SKIP;
+                 if (!fluid.is(FluidTags.WATER)) {
+                     return BlockPos.TraversalNodeStatus.SKIP;
 @@ -78,27 +88,64 @@
-                     if (block instanceof IFluidSource) {
-                         IFluidSource ifluidsource = (IFluidSource) block;
+                     if (block instanceof BucketPickup) {
+                         BucketPickup ifluidsource = (BucketPickup) block;
  
--                        if (!ifluidsource.pickupBlock((EntityHuman) null, world, blockposition1, iblockdata).isEmpty()) {
-+                        if (!ifluidsource.pickupBlock((EntityHuman) null, blockList, blockposition1, iblockdata).isEmpty()) { // CraftBukkit
-                             return BlockPosition.b.ACCEPT;
+-                        if (!ifluidsource.pickupBlock((Player) null, world, blockposition1, iblockdata).isEmpty()) {
++                        if (!ifluidsource.pickupBlock((Player) null, blockList, blockposition1, iblockdata).isEmpty()) { // CraftBukkit
+                             return BlockPos.TraversalNodeStatus.ACCEPT;
                          }
                      }
  
-                     if (iblockdata.getBlock() instanceof BlockFluids) {
+                     if (iblockdata.getBlock() instanceof LiquidBlock) {
 -                        world.setBlock(blockposition1, Blocks.AIR.defaultBlockState(), 3);
 +                        blockList.setBlock(blockposition1, Blocks.AIR.defaultBlockState(), 3); // CraftBukkit
                      } else {
                          if (!iblockdata.is(Blocks.KELP) && !iblockdata.is(Blocks.KELP_PLANT) && !iblockdata.is(Blocks.SEAGRASS) && !iblockdata.is(Blocks.TALL_SEAGRASS)) {
-                             return BlockPosition.b.SKIP;
+                             return BlockPos.TraversalNodeStatus.SKIP;
                          }
  
--                        TileEntity tileentity = iblockdata.hasBlockEntity() ? world.getBlockEntity(blockposition1) : null;
+-                        BlockEntity tileentity = iblockdata.hasBlockEntity() ? world.getBlockEntity(blockposition1) : null;
 +                        // CraftBukkit start
 +                        // TileEntity tileentity = iblockdata.hasBlockEntity() ? world.getBlockEntity(blockposition1) : null;
  
@@ -66,7 +66,7 @@
 +                        // CraftBukkit end
                      }
  
-                     return BlockPosition.b.ACCEPT;
+                     return BlockPos.TraversalNodeStatus.ACCEPT;
                  }
              }
 -        }) > 1;
@@ -74,7 +74,7 @@
 +        // CraftBukkit start
 +        List<CraftBlockState> blocks = blockList.getList(); // Is a clone
 +        if (!blocks.isEmpty()) {
-+            final org.bukkit.block.Block bblock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
++            final org.bukkit.block.Block bblock = world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ());
 +
 +            SpongeAbsorbEvent event = new SpongeAbsorbEvent(bblock, (List<org.bukkit.block.BlockState>) (List) blocks);
 +            world.getCraftServer().getPluginManager().callEvent(event);
@@ -84,17 +84,17 @@
 +            }
 +
 +            for (CraftBlockState block : blocks) {
-+                BlockPosition blockposition1 = block.getPosition();
-+                IBlockData iblockdata = world.getBlockState(blockposition1);
-+                Fluid fluid = world.getFluidState(blockposition1);
++                BlockPos blockposition1 = block.getPosition();
++                BlockState iblockdata = world.getBlockState(blockposition1);
++                FluidState fluid = world.getFluidState(blockposition1);
 +
-+                if (fluid.is(TagsFluid.WATER)) {
-+                    if (iblockdata.getBlock() instanceof IFluidSource && !((IFluidSource) iblockdata.getBlock()).pickupBlock((EntityHuman) null, blockList, blockposition1, iblockdata).isEmpty()) {
++                if (fluid.is(FluidTags.WATER)) {
++                    if (iblockdata.getBlock() instanceof BucketPickup && !((BucketPickup) iblockdata.getBlock()).pickupBlock((Player) null, blockList, blockposition1, iblockdata).isEmpty()) {
 +                        // NOP
-+                    } else if (iblockdata.getBlock() instanceof BlockFluids) {
++                    } else if (iblockdata.getBlock() instanceof LiquidBlock) {
 +                        // NOP
 +                    } else if (iblockdata.is(Blocks.KELP) || iblockdata.is(Blocks.KELP_PLANT) || iblockdata.is(Blocks.SEAGRASS) || iblockdata.is(Blocks.TALL_SEAGRASS)) {
-+                        TileEntity tileentity = iblockdata.hasBlockEntity() ? world.getBlockEntity(blockposition1) : null;
++                        BlockEntity tileentity = iblockdata.hasBlockEntity() ? world.getBlockEntity(blockposition1) : null;
 +
 +                        dropResources(iblockdata, world, blockposition1, tileentity);
 +                    }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java.patch
new file mode 100644
index 0000000000..8e0f4e799f
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java.patch
@@ -0,0 +1,23 @@
+--- a/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java
++++ b/net/minecraft/world/level/block/SpreadingSnowyDirtBlock.java
+@@ -44,6 +44,11 @@
+     @Override
+     protected void randomTick(BlockState state, ServerLevel world, BlockPos pos, RandomSource random) {
+         if (!SpreadingSnowyDirtBlock.canBeGrass(state, world, pos)) {
++            // CraftBukkit start
++            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockFadeEvent(world, pos, Blocks.DIRT.defaultBlockState()).isCancelled()) {
++                return;
++            }
++            // CraftBukkit end
+             world.setBlockAndUpdate(pos, Blocks.DIRT.defaultBlockState());
+         } else {
+             if (world.getMaxLocalRawBrightness(pos.above()) >= 9) {
+@@ -53,7 +58,7 @@
+                     BlockPos blockposition1 = pos.offset(random.nextInt(3) - 1, random.nextInt(5) - 3, random.nextInt(3) - 1);
+ 
+                     if (world.getBlockState(blockposition1).is(Blocks.DIRT) && SpreadingSnowyDirtBlock.canPropagate(iblockdata1, world, blockposition1)) {
+-                        world.setBlockAndUpdate(blockposition1, (BlockState) iblockdata1.setValue(SpreadingSnowyDirtBlock.SNOWY, isSnowySetting(world.getBlockState(blockposition1.above()))));
++                        org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockSpreadEvent(world, pos, blockposition1, (BlockState) iblockdata1.setValue(SpreadingSnowyDirtBlock.SNOWY, isSnowySetting(world.getBlockState(blockposition1.above())))); // CraftBukkit
+                     }
+                 }
+             }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/StemBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/StemBlock.java.patch
new file mode 100644
index 0000000000..4aac7cf266
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/StemBlock.java.patch
@@ -0,0 +1,41 @@
+--- a/net/minecraft/world/level/block/StemBlock.java
++++ b/net/minecraft/world/level/block/StemBlock.java
+@@ -26,6 +26,7 @@
+ import net.minecraft.world.level.block.state.properties.IntegerProperty;
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
+ 
+ public class StemBlock extends BushBlock implements BonemealableBlock {
+ 
+@@ -79,7 +80,7 @@
+ 
+                 if (i < 7) {
+                     state = (BlockState) state.setValue(StemBlock.AGE, i + 1);
+-                    world.setBlock(pos, state, 2);
++                    CraftEventFactory.handleBlockGrowEvent(world, pos, state, 2); // CraftBukkit
+                 } else {
+                     Direction enumdirection = Direction.Plane.HORIZONTAL.getRandomDirection(random);
+                     BlockPos blockposition1 = pos.relative(enumdirection);
+@@ -91,7 +92,11 @@
+                         Optional<Block> optional1 = iregistry.getOptional(this.attachedStem);
+ 
+                         if (optional.isPresent() && optional1.isPresent()) {
+-                            world.setBlockAndUpdate(blockposition1, ((Block) optional.get()).defaultBlockState());
++                            // CraftBukkit start
++                            if (!CraftEventFactory.handleBlockGrowEvent(world, blockposition1, ((Block) optional.get()).defaultBlockState())) {
++                                return;
++                            }
++                            // CraftBukkit end
+                             world.setBlockAndUpdate(pos, (BlockState) ((Block) optional1.get()).defaultBlockState().setValue(HorizontalDirectionalBlock.FACING, enumdirection));
+                         }
+                     }
+@@ -121,7 +126,7 @@
+         int i = Math.min(7, (Integer) state.getValue(StemBlock.AGE) + Mth.nextInt(world.random, 2, 5));
+         BlockState iblockdata1 = (BlockState) state.setValue(StemBlock.AGE, i);
+ 
+-        world.setBlock(pos, iblockdata1, 2);
++        CraftEventFactory.handleBlockGrowEvent(world, pos, iblockdata1, 2); // CraftBukkit
+         if (i == 7) {
+             iblockdata1.randomTick(world, pos, world.random);
+         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/SugarCaneBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/SugarCaneBlock.java.patch
new file mode 100644
index 0000000000..81984fbc44
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/SugarCaneBlock.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/level/block/SugarCaneBlock.java
++++ b/net/minecraft/world/level/block/SugarCaneBlock.java
+@@ -63,7 +63,7 @@
+                 int j = (Integer) state.getValue(SugarCaneBlock.AGE);
+ 
+                 if (j == 15) {
+-                    world.setBlockAndUpdate(pos.above(), this.defaultBlockState());
++                    org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockGrowEvent(world, pos.above(), this.defaultBlockState()); // CraftBukkit
+                     world.setBlock(pos, (BlockState) state.setValue(SugarCaneBlock.AGE, 0), 4);
+                 } else {
+                     world.setBlock(pos, (BlockState) state.setValue(SugarCaneBlock.AGE, j + 1), 4);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/SweetBerryBushBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/SweetBerryBushBlock.java.patch
new file mode 100644
index 0000000000..9cc5f5bd7b
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/SweetBerryBushBlock.java.patch
@@ -0,0 +1,50 @@
+--- a/net/minecraft/world/level/block/SweetBerryBushBlock.java
++++ b/net/minecraft/world/level/block/SweetBerryBushBlock.java
+@@ -28,6 +28,12 @@
+ import net.minecraft.world.phys.Vec3;
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++// CraftBukkit start
++import java.util.Collections;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.craftbukkit.inventory.CraftItemStack;
++import org.bukkit.event.player.PlayerHarvestBlockEvent;
++// CraftBukkit end
+ 
+ public class SweetBerryBushBlock extends BushBlock implements BonemealableBlock {
+ 
+@@ -70,7 +76,7 @@
+         if (i < 3 && random.nextInt(5) == 0 && world.getRawBrightness(pos.above(), 0) >= 9) {
+             BlockState iblockdata1 = (BlockState) state.setValue(SweetBerryBushBlock.AGE, i + 1);
+ 
+-            world.setBlock(pos, iblockdata1, 2);
++            if (!CraftEventFactory.handleBlockGrowEvent(world, pos, iblockdata1, 2)) return; // CraftBukkit
+             world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(iblockdata1));
+         }
+ 
+@@ -91,7 +97,7 @@
+                         double d1 = Math.abs(vec3d.z());
+ 
+                         if (d0 >= 0.003000000026077032D || d1 >= 0.003000000026077032D) {
+-                            entity.hurtServer(worldserver, world.damageSources().sweetBerryBush(), 1.0F);
++                            entity.hurtServer(worldserver, world.damageSources().sweetBerryBush().directBlock(world, pos), 1.0F); // CraftBukkit
+                         }
+                     }
+ 
+@@ -118,7 +124,15 @@
+         if (i > 1) {
+             int j = 1 + world.random.nextInt(2);
+ 
+-            popResource(world, pos, new ItemStack(Items.SWEET_BERRIES, j + (flag ? 1 : 0)));
++            // CraftBukkit start - useWithoutItem is always MAIN_HAND
++            PlayerHarvestBlockEvent event = CraftEventFactory.callPlayerHarvestBlockEvent(world, pos, player, InteractionHand.MAIN_HAND, Collections.singletonList(new ItemStack(Items.SWEET_BERRIES, j + (flag ? 1 : 0))));
++            if (event.isCancelled()) {
++                return InteractionResult.SUCCESS; // We need to return a success either way, because making it PASS or FAIL will result in a bug where cancelling while harvesting w/ block in hand places block
++            }
++            for (org.bukkit.inventory.ItemStack itemStack : event.getItemsHarvested()) {
++                popResource(world, pos, CraftItemStack.asNMSCopy(itemStack));
++            }
++            // CraftBukkit end
+             world.playSound((Player) null, pos, SoundEvents.SWEET_BERRY_BUSH_PICK_BERRIES, SoundSource.BLOCKS, 1.0F, 0.8F + world.random.nextFloat() * 0.4F);
+             BlockState iblockdata1 = (BlockState) state.setValue(SweetBerryBushBlock.AGE, 1);
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/TntBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/TntBlock.java.patch
new file mode 100644
index 0000000000..a2cfe8dd00
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/TntBlock.java.patch
@@ -0,0 +1,64 @@
+--- a/net/minecraft/world/level/block/TntBlock.java
++++ b/net/minecraft/world/level/block/TntBlock.java
+@@ -28,6 +28,10 @@
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import net.minecraft.world.level.redstone.Orientation;
+ import net.minecraft.world.phys.BlockHitResult;
++// CraftBukkit start
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.event.block.TNTPrimeEvent.PrimeCause;
++// CraftBukkit end
+ 
+ public class TntBlock extends Block {
+ 
+@@ -47,7 +51,7 @@
+     @Override
+     protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) {
+         if (!oldState.is(state.getBlock())) {
+-            if (world.hasNeighborSignal(pos)) {
++            if (world.hasNeighborSignal(pos) && CraftEventFactory.callTNTPrimeEvent(world, pos, PrimeCause.REDSTONE, null, null)) { // CraftBukkit - TNTPrimeEvent
+                 TntBlock.explode(world, pos);
+                 world.removeBlock(pos, false);
+             }
+@@ -57,7 +61,7 @@
+ 
+     @Override
+     protected void neighborChanged(BlockState state, Level world, BlockPos pos, Block sourceBlock, @Nullable Orientation wireOrientation, boolean notify) {
+-        if (world.hasNeighborSignal(pos)) {
++        if (world.hasNeighborSignal(pos) && CraftEventFactory.callTNTPrimeEvent(world, pos, PrimeCause.REDSTONE, null, null)) { // CraftBukkit - TNTPrimeEvent
+             TntBlock.explode(world, pos);
+             world.removeBlock(pos, false);
+         }
+@@ -66,7 +70,7 @@
+ 
+     @Override
+     public BlockState playerWillDestroy(Level world, BlockPos pos, BlockState state, Player player) {
+-        if (!world.isClientSide() && !player.isCreative() && (Boolean) state.getValue(TntBlock.UNSTABLE)) {
++        if (!world.isClientSide() && !player.isCreative() && (Boolean) state.getValue(TntBlock.UNSTABLE) && CraftEventFactory.callTNTPrimeEvent(world, pos, PrimeCause.BLOCK_BREAK, player, null)) { // CraftBukkit - TNTPrimeEvent
+             TntBlock.explode(world, pos);
+         }
+ 
+@@ -101,6 +105,11 @@
+         if (!stack.is(Items.FLINT_AND_STEEL) && !stack.is(Items.FIRE_CHARGE)) {
+             return super.useItemOn(stack, state, world, pos, player, hand, hit);
+         } else {
++            // CraftBukkit start - TNTPrimeEvent
++            if (!CraftEventFactory.callTNTPrimeEvent(world, pos, PrimeCause.PLAYER, player, null)) {
++                return InteractionResult.CONSUME;
++            }
++            // CraftBukkit end
+             TntBlock.explode(world, pos, player);
+             world.setBlock(pos, Blocks.AIR.defaultBlockState(), 11);
+             Item item = stack.getItem();
+@@ -123,6 +132,11 @@
+             Entity entity = projectile.getOwner();
+ 
+             if (projectile.isOnFire() && projectile.mayInteract(worldserver, blockposition)) {
++                // CraftBukkit start
++                if (!org.bukkit.craftbukkit.event.CraftEventFactory.callEntityChangeBlockEvent(projectile, blockposition, Blocks.AIR.defaultBlockState()) || !CraftEventFactory.callTNTPrimeEvent(world, blockposition, PrimeCause.PROJECTILE, projectile, null)) {
++                    return;
++                }
++                // CraftBukkit end
+                 TntBlock.explode(world, blockposition, entity instanceof LivingEntity ? (LivingEntity) entity : null);
+                 world.removeBlock(blockposition, false);
+             }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/TrapDoorBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/TrapDoorBlock.java.patch
new file mode 100644
index 0000000000..d4f9fb41ee
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/TrapDoorBlock.java.patch
@@ -0,0 +1,30 @@
+--- a/net/minecraft/world/level/block/TrapDoorBlock.java
++++ b/net/minecraft/world/level/block/TrapDoorBlock.java
+@@ -37,6 +37,7 @@
+ import net.minecraft.world.phys.BlockHitResult;
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
+ 
+ public class TrapDoorBlock extends HorizontalDirectionalBlock implements SimpleWaterloggedBlock {
+ 
+@@ -143,6 +144,19 @@
+             boolean flag1 = world.hasNeighborSignal(pos);
+ 
+             if (flag1 != (Boolean) state.getValue(TrapDoorBlock.POWERED)) {
++                // CraftBukkit start
++                org.bukkit.World bworld = world.getWorld();
++                org.bukkit.block.Block bblock = bworld.getBlockAt(pos.getX(), pos.getY(), pos.getZ());
++
++                int power = bblock.getBlockPower();
++                int oldPower = (Boolean) state.getValue(TrapDoorBlock.OPEN) ? 15 : 0;
++
++                if (oldPower == 0 ^ power == 0 || sourceBlock.defaultBlockState().isSignalSource()) {
++                    BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(bblock, oldPower, power);
++                    world.getCraftServer().getPluginManager().callEvent(eventRedstone);
++                    flag1 = eventRedstone.getNewCurrent() > 0;
++                }
++                // CraftBukkit end
+                 if ((Boolean) state.getValue(TrapDoorBlock.OPEN) != flag1) {
+                     state = (BlockState) state.setValue(TrapDoorBlock.OPEN, flag1);
+                     this.playSound((Player) null, world, pos, flag1);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockTripwire.patch b/paper-server/patches/sources/net/minecraft/world/level/block/TripWireBlock.java.patch
similarity index 61%
rename from paper-server/patches/sources/net/minecraft/world/level/block/BlockTripwire.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/TripWireBlock.java.patch
index bc230018b5..e217d61922 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockTripwire.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/TripWireBlock.java.patch
@@ -1,32 +1,31 @@
---- a/net/minecraft/world/level/block/BlockTripwire.java
-+++ b/net/minecraft/world/level/block/BlockTripwire.java
-@@ -29,6 +29,8 @@
+--- a/net/minecraft/world/level/block/TripWireBlock.java
++++ b/net/minecraft/world/level/block/TripWireBlock.java
+@@ -28,6 +28,7 @@
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import net.minecraft.world.phys.shapes.CollisionContext;
  import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- 
 +import org.bukkit.event.entity.EntityInteractEvent; // CraftBukkit
-+
- public class BlockTripwire extends Block {
  
-     public static final MapCodec<BlockTripwire> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
-@@ -179,6 +181,40 @@
+ public class TripWireBlock extends Block {
+ 
+@@ -179,6 +180,40 @@
              }
          }
  
 +        // CraftBukkit start - Call interact even when triggering connected tripwire
-+        if (flag != flag1 && flag1 && (Boolean)iblockdata.getValue(ATTACHED)) {
++        if (flag != flag1 && flag1 && (Boolean)iblockdata.getValue(TripWireBlock.ATTACHED)) {
 +            org.bukkit.World bworld = world.getWorld();
 +            org.bukkit.plugin.PluginManager manager = world.getCraftServer().getPluginManager();
-+            org.bukkit.block.Block block = bworld.getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
++            org.bukkit.block.Block block = bworld.getBlockAt(pos.getX(), pos.getY(), pos.getZ());
 +            boolean allowed = false;
 +
 +            // If all of the events are cancelled block the tripwire trigger, else allow
-+            for (Object object : list) {
++            for (Object object : entities) {
 +                if (object != null) {
 +                    org.bukkit.event.Cancellable cancellable;
 +
-+                    if (object instanceof EntityHuman) {
-+                        cancellable = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent((EntityHuman) object, org.bukkit.event.block.Action.PHYSICAL, blockposition, null, null, null);
++                    if (object instanceof Player) {
++                        cancellable = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent((Player) object, org.bukkit.event.block.Action.PHYSICAL, pos, null, null, null);
 +                    } else if (object instanceof Entity) {
 +                        cancellable = new EntityInteractEvent(((Entity) object).getBukkitEntity(), block);
 +                        manager.callEvent((EntityInteractEvent) cancellable);
@@ -48,5 +47,5 @@
 +        // CraftBukkit end
 +
          if (flag1 != flag) {
-             iblockdata = (IBlockData) iblockdata.setValue(BlockTripwire.POWERED, flag1);
-             world.setBlock(blockposition, iblockdata, 3);
+             iblockdata = (BlockState) iblockdata.setValue(TripWireBlock.POWERED, flag1);
+             world.setBlock(pos, iblockdata, 3);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/TripWireHookBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/TripWireHookBlock.java.patch
new file mode 100644
index 0000000000..ef0878b2e2
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/TripWireHookBlock.java.patch
@@ -0,0 +1,29 @@
+--- a/net/minecraft/world/level/block/TripWireHookBlock.java
++++ b/net/minecraft/world/level/block/TripWireHookBlock.java
+@@ -31,6 +31,10 @@
+ import net.minecraft.world.level.redstone.Orientation;
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++// CraftBukkit start
++import org.bukkit.craftbukkit.block.CraftBlock;
++import org.bukkit.event.block.BlockRedstoneEvent;
++// CraftBukkit end
+ 
+ public class TripWireHookBlock extends Block {
+ 
+@@ -176,6 +180,15 @@
+                 TripWireHookBlock.emitState(world, blockposition1, flag4, flag5, flag2, flag3);
+             }
+ 
++            // CraftBukkit start
++            BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(CraftBlock.at(world, pos), 15, 0);
++            world.getCraftServer().getPluginManager().callEvent(eventRedstone);
++
++            if (eventRedstone.getNewCurrent() > 0) {
++                return;
++            }
++            // CraftBukkit end
++
+             TripWireHookBlock.emitState(world, pos, flag4, flag5, flag2, flag3);
+             if (!flag) {
+                 world.setBlock(pos, (BlockState) iblockdata3.setValue(TripWireHookBlock.FACING, enumdirection), 3);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/TurtleEggBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/TurtleEggBlock.java.patch
new file mode 100644
index 0000000000..e8f6b56a7f
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/TurtleEggBlock.java.patch
@@ -0,0 +1,65 @@
+--- a/net/minecraft/world/level/block/TurtleEggBlock.java
++++ b/net/minecraft/world/level/block/TurtleEggBlock.java
+@@ -31,6 +31,11 @@
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++// CraftBukkit start
++import org.bukkit.event.entity.EntityInteractEvent;
++import org.bukkit.craftbukkit.block.CraftBlock;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++// CraftBukkit end
+ 
+ public class TurtleEggBlock extends Block {
+ 
+@@ -74,6 +79,19 @@
+     private void destroyEgg(Level world, BlockState state, BlockPos pos, Entity entity, int inverseChance) {
+         if (state.is(Blocks.TURTLE_EGG) && world instanceof ServerLevel worldserver) {
+             if (this.canDestroyEgg(worldserver, entity) && world.random.nextInt(inverseChance) == 0) {
++                // CraftBukkit start - Step on eggs
++                org.bukkit.event.Cancellable cancellable;
++                if (entity instanceof Player) {
++                    cancellable = CraftEventFactory.callPlayerInteractEvent((Player) entity, org.bukkit.event.block.Action.PHYSICAL, pos, null, null, null);
++                } else {
++                    cancellable = new EntityInteractEvent(entity.getBukkitEntity(), CraftBlock.at(worldserver, pos));
++                    worldserver.getCraftServer().getPluginManager().callEvent((EntityInteractEvent) cancellable);
++                }
++
++                if (cancellable.isCancelled()) {
++                    return;
++                }
++                // CraftBukkit end
+                 this.decreaseEggs(worldserver, pos, state);
+             }
+         }
+@@ -100,10 +118,20 @@
+             int i = (Integer) state.getValue(TurtleEggBlock.HATCH);
+ 
+             if (i < 2) {
++                // CraftBukkit start - Call BlockGrowEvent
++                if (!CraftEventFactory.handleBlockGrowEvent(world, pos, state.setValue(TurtleEggBlock.HATCH, i + 1), 2)) {
++                    return;
++                }
++                // CraftBukkit end
+                 world.playSound((Player) null, pos, SoundEvents.TURTLE_EGG_CRACK, SoundSource.BLOCKS, 0.7F, 0.9F + random.nextFloat() * 0.2F);
+-                world.setBlock(pos, (BlockState) state.setValue(TurtleEggBlock.HATCH, i + 1), 2);
++                // worldserver.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockTurtleEgg.HATCH, i + 1), 2); // CraftBukkit - handled above
+                 world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(state));
+             } else {
++                // CraftBukkit start - Call BlockFadeEvent
++                if (CraftEventFactory.callBlockFadeEvent(world, pos, Blocks.AIR.defaultBlockState()).isCancelled()) {
++                    return;
++                }
++                // CraftBukkit end
+                 world.playSound((Player) null, pos, SoundEvents.TURTLE_EGG_HATCH, SoundSource.BLOCKS, 0.7F, 0.9F + random.nextFloat() * 0.2F);
+                 world.removeBlock(pos, false);
+                 world.gameEvent((Holder) GameEvent.BLOCK_DESTROY, pos, GameEvent.Context.of(state));
+@@ -116,7 +144,7 @@
+                         entityturtle.setAge(-24000);
+                         entityturtle.setHomePos(pos);
+                         entityturtle.moveTo((double) pos.getX() + 0.3D + (double) j * 0.2D, (double) pos.getY(), (double) pos.getZ() + 0.3D, 0.0F, 0.0F);
+-                        world.addFreshEntity(entityturtle);
++                        world.addFreshEntity(entityturtle, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.EGG); // CraftBukkit
+                     }
+                 }
+             }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/VineBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/VineBlock.java.patch
new file mode 100644
index 0000000000..8ff0aff9aa
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/VineBlock.java.patch
@@ -0,0 +1,71 @@
+--- a/net/minecraft/world/level/block/VineBlock.java
++++ b/net/minecraft/world/level/block/VineBlock.java
+@@ -24,6 +24,7 @@
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.Shapes;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
+ 
+ public class VineBlock extends Block {
+ 
+@@ -203,30 +204,34 @@
+                             BlockPos blockposition3 = blockposition2.relative(enumdirection1);
+                             BlockPos blockposition4 = blockposition2.relative(enumdirection2);
+ 
++                            // CraftBukkit start - Call BlockSpreadEvent
++                            BlockPos source = pos;
++
+                             if (flag && VineBlock.isAcceptableNeighbour(world, blockposition3, enumdirection1)) {
+-                                world.setBlock(blockposition2, (BlockState) this.defaultBlockState().setValue(VineBlock.getPropertyForFace(enumdirection1), true), 2);
++                                CraftEventFactory.handleBlockSpreadEvent(world, source, blockposition2, (BlockState) this.defaultBlockState().setValue(VineBlock.getPropertyForFace(enumdirection1), true), 2);
+                             } else if (flag1 && VineBlock.isAcceptableNeighbour(world, blockposition4, enumdirection2)) {
+-                                world.setBlock(blockposition2, (BlockState) this.defaultBlockState().setValue(VineBlock.getPropertyForFace(enumdirection2), true), 2);
++                                CraftEventFactory.handleBlockSpreadEvent(world, source, blockposition2, (BlockState) this.defaultBlockState().setValue(VineBlock.getPropertyForFace(enumdirection2), true), 2);
+                             } else {
+                                 Direction enumdirection3 = enumdirection.getOpposite();
+ 
+                                 if (flag && world.isEmptyBlock(blockposition3) && VineBlock.isAcceptableNeighbour(world, pos.relative(enumdirection1), enumdirection3)) {
+-                                    world.setBlock(blockposition3, (BlockState) this.defaultBlockState().setValue(VineBlock.getPropertyForFace(enumdirection3), true), 2);
++                                    CraftEventFactory.handleBlockSpreadEvent(world, source, blockposition3, (BlockState) this.defaultBlockState().setValue(VineBlock.getPropertyForFace(enumdirection3), true), 2);
+                                 } else if (flag1 && world.isEmptyBlock(blockposition4) && VineBlock.isAcceptableNeighbour(world, pos.relative(enumdirection2), enumdirection3)) {
+-                                    world.setBlock(blockposition4, (BlockState) this.defaultBlockState().setValue(VineBlock.getPropertyForFace(enumdirection3), true), 2);
+-                                } else if ((double) random.nextFloat() < 0.05D && VineBlock.isAcceptableNeighbour(world, blockposition2.above(), Direction.UP)) {
+-                                    world.setBlock(blockposition2, (BlockState) this.defaultBlockState().setValue(VineBlock.UP, true), 2);
++                                    CraftEventFactory.handleBlockSpreadEvent(world, source, blockposition4, (BlockState) this.defaultBlockState().setValue(VineBlock.getPropertyForFace(enumdirection3), true), 2);
++                                } else if ((double) random.nextFloat() < 0.05D && VineBlock.isAcceptableNeighbour(world, blockposition2.above(), Direction.UP)) {
++                                    CraftEventFactory.handleBlockSpreadEvent(world, source, blockposition2, (BlockState) this.defaultBlockState().setValue(VineBlock.UP, true), 2);
+                                 }
++                                // CraftBukkit end
+                             }
+                         } else if (VineBlock.isAcceptableNeighbour(world, blockposition2, enumdirection)) {
+-                            world.setBlock(pos, (BlockState) state.setValue(VineBlock.getPropertyForFace(enumdirection), true), 2);
++                            CraftEventFactory.handleBlockGrowEvent(world, pos, (BlockState) state.setValue(VineBlock.getPropertyForFace(enumdirection), true), 2); // CraftBukkit
+                         }
+ 
+                     }
+                 } else {
+                     if (enumdirection == Direction.UP && pos.getY() < world.getMaxY()) {
+                         if (this.canSupportAtFace(world, pos, enumdirection)) {
+-                            world.setBlock(pos, (BlockState) state.setValue(VineBlock.UP, true), 2);
++                            CraftEventFactory.handleBlockGrowEvent(world, pos, (BlockState) state.setValue(VineBlock.UP, true), 2); // CraftBukkit
+                             return;
+                         }
+ 
+@@ -246,7 +251,7 @@
+                             }
+ 
+                             if (this.hasHorizontalConnection(iblockdata2)) {
+-                                world.setBlock(blockposition1, iblockdata2, 2);
++                                CraftEventFactory.handleBlockSpreadEvent(world, pos, blockposition1, iblockdata2, 2); // CraftBukkit
+                             }
+ 
+                             return;
+@@ -261,7 +266,7 @@
+                             BlockState iblockdata4 = this.copyRandomFaces(state, iblockdata3, random);
+ 
+                             if (iblockdata3 != iblockdata4 && this.hasHorizontalConnection(iblockdata4)) {
+-                                world.setBlock(blockposition2, iblockdata4, 2);
++                                CraftEventFactory.handleBlockSpreadEvent(world, pos, blockposition2, iblockdata4, 2); // CraftBukkit
+                             }
+                         }
+                     }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/WallHangingSignBlock.patch b/paper-server/patches/sources/net/minecraft/world/level/block/WallHangingSignBlock.java.patch
similarity index 51%
rename from paper-server/patches/sources/net/minecraft/world/level/block/WallHangingSignBlock.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/WallHangingSignBlock.java.patch
index 4fad718c22..73be8c6267 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/WallHangingSignBlock.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/WallHangingSignBlock.java.patch
@@ -3,8 +3,8 @@
 @@ -179,6 +179,6 @@
      @Nullable
      @Override
-     public <T extends TileEntity> BlockEntityTicker<T> getTicker(World world, IBlockData iblockdata, TileEntityTypes<T> tileentitytypes) {
--        return createTickerHelper(tileentitytypes, TileEntityTypes.HANGING_SIGN, TileEntitySign::tick);
+     public <T extends BlockEntity> BlockEntityTicker<T> getTicker(Level world, BlockState state, BlockEntityType<T> type) {
+-        return createTickerHelper(type, BlockEntityType.HANGING_SIGN, SignBlockEntity::tick);
 +        return null; // Craftbukkit - remove unnecessary sign ticking
      }
  }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/WaterlilyBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/WaterlilyBlock.java.patch
new file mode 100644
index 0000000000..e4dba66625
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/WaterlilyBlock.java.patch
@@ -0,0 +1,24 @@
+--- a/net/minecraft/world/level/block/WaterlilyBlock.java
++++ b/net/minecraft/world/level/block/WaterlilyBlock.java
+@@ -13,6 +13,9 @@
+ import net.minecraft.world.level.material.Fluids;
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++// CraftBukkit start
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++// CraftBukkit end
+ 
+ public class WaterlilyBlock extends BushBlock {
+ 
+@@ -32,6 +35,11 @@
+     protected void entityInside(BlockState state, Level world, BlockPos pos, Entity entity) {
+         super.entityInside(state, world, pos, entity);
+         if (world instanceof ServerLevel && entity instanceof AbstractBoat) {
++            // CraftBukkit start
++            if (!CraftEventFactory.callEntityChangeBlockEvent(entity, pos, Blocks.AIR.defaultBlockState())) {
++                return;
++            }
++            // CraftBukkit end
+             world.destroyBlock(new BlockPos(pos), true, entity);
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/WeightedPressurePlateBlock.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/WeightedPressurePlateBlock.java.patch
new file mode 100644
index 0000000000..67ce37fdf0
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/WeightedPressurePlateBlock.java.patch
@@ -0,0 +1,49 @@
+--- a/net/minecraft/world/level/block/WeightedPressurePlateBlock.java
++++ b/net/minecraft/world/level/block/WeightedPressurePlateBlock.java
+@@ -6,6 +6,7 @@
+ import net.minecraft.core.BlockPos;
+ import net.minecraft.util.Mth;
+ import net.minecraft.world.entity.Entity;
++import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.block.state.BlockBehaviour;
+ import net.minecraft.world.level.block.state.BlockState;
+@@ -13,6 +14,8 @@
+ import net.minecraft.world.level.block.state.properties.BlockSetType;
+ import net.minecraft.world.level.block.state.properties.BlockStateProperties;
+ import net.minecraft.world.level.block.state.properties.IntegerProperty;
++import org.bukkit.event.entity.EntityInteractEvent;
++// CraftBukkit end
+ 
+ public class WeightedPressurePlateBlock extends BasePressurePlateBlock {
+ 
+@@ -39,8 +42,28 @@
+ 
+     @Override
+     protected int getSignalStrength(Level world, BlockPos pos) {
+-        int i = Math.min(getEntityCount(world, WeightedPressurePlateBlock.TOUCH_AABB.move(pos), Entity.class), this.maxWeight);
++        // CraftBukkit start
++        // int i = Math.min(getEntityCount(world, BlockPressurePlateWeighted.TOUCH_AABB.move(blockposition), Entity.class), this.maxWeight);
++        int i = 0;
++        for (Entity entity : getEntities(world, WeightedPressurePlateBlock.TOUCH_AABB.move(pos), Entity.class)) {
++            org.bukkit.event.Cancellable cancellable;
+ 
++            if (entity instanceof Player) {
++                cancellable = org.bukkit.craftbukkit.event.CraftEventFactory.callPlayerInteractEvent((Player) entity, org.bukkit.event.block.Action.PHYSICAL, pos, null, null, null);
++            } else {
++                cancellable = new EntityInteractEvent(entity.getBukkitEntity(), world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()));
++                world.getCraftServer().getPluginManager().callEvent((EntityInteractEvent) cancellable);
++            }
++
++            // We only want to block turning the plate on if all events are cancelled
++            if (!cancellable.isCancelled()) {
++                i++;
++            }
++        }
++
++        i = Math.min(i, this.maxWeight);
++        // CraftBukkit end
++
+         if (i > 0) {
+             float f = (float) Math.min(this.maxWeight, i) / (float) this.maxWeight;
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockWitherRose.patch b/paper-server/patches/sources/net/minecraft/world/level/block/WitherRoseBlock.java.patch
similarity index 57%
rename from paper-server/patches/sources/net/minecraft/world/level/block/BlockWitherRose.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/WitherRoseBlock.java.patch
index cfe307b6d2..4883907d23 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockWitherRose.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/WitherRoseBlock.java.patch
@@ -1,8 +1,8 @@
---- a/net/minecraft/world/level/block/BlockWitherRose.java
-+++ b/net/minecraft/world/level/block/BlockWitherRose.java
+--- a/net/minecraft/world/level/block/WitherRoseBlock.java
++++ b/net/minecraft/world/level/block/WitherRoseBlock.java
 @@ -66,7 +66,7 @@
-         if (world instanceof WorldServer worldserver) {
-             if (world.getDifficulty() != EnumDifficulty.PEACEFUL && entity instanceof EntityLiving entityliving) {
+         if (world instanceof ServerLevel worldserver) {
+             if (world.getDifficulty() != Difficulty.PEACEFUL && entity instanceof LivingEntity entityliving) {
                  if (!entityliving.isInvulnerableTo(worldserver, world.damageSources().wither())) {
 -                    entityliving.addEffect(this.getBeeInteractionEffect());
 +                    entityliving.addEffect(this.getBeeInteractionEffect(), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.WITHER_ROSE); // CraftBukkit
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/BlockWitherSkull.patch b/paper-server/patches/sources/net/minecraft/world/level/block/WitherSkullBlock.java.patch
similarity index 57%
rename from paper-server/patches/sources/net/minecraft/world/level/block/BlockWitherSkull.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/WitherSkullBlock.java.patch
index 099a259f25..e34748cc0e 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/BlockWitherSkull.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/WitherSkullBlock.java.patch
@@ -1,50 +1,50 @@
---- a/net/minecraft/world/level/block/BlockWitherSkull.java
-+++ b/net/minecraft/world/level/block/BlockWitherSkull.java
+--- a/net/minecraft/world/level/block/WitherSkullBlock.java
++++ b/net/minecraft/world/level/block/WitherSkullBlock.java
 @@ -26,6 +26,10 @@
- import net.minecraft.world.level.block.state.pattern.ShapeDetectorBuilder;
+ import net.minecraft.world.level.block.state.pattern.BlockPatternBuilder;
  import net.minecraft.world.level.block.state.predicate.BlockStatePredicate;
  
 +// CraftBukkit start
 +import org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason;
 +// CraftBukkit end
 +
- public class BlockWitherSkull extends BlockSkull {
+ public class WitherSkullBlock extends SkullBlock {
  
-     public static final MapCodec<BlockWitherSkull> CODEC = simpleCodec(BlockWitherSkull::new);
+     public static final MapCodec<WitherSkullBlock> CODEC = simpleCodec(WitherSkullBlock::new);
 @@ -58,6 +62,7 @@
      }
  
-     public static void checkSpawn(World world, BlockPosition blockposition, TileEntitySkull tileentityskull) {
+     public static void checkSpawn(Level world, BlockPos pos, SkullBlockEntity blockEntity) {
 +        if (world.captureBlockStates) return; // CraftBukkit
          if (!world.isClientSide) {
-             IBlockData iblockdata = tileentityskull.getBlockState();
+             BlockState iblockdata = blockEntity.getBlockState();
              boolean flag = iblockdata.is(Blocks.WITHER_SKELETON_SKULL) || iblockdata.is(Blocks.WITHER_SKELETON_WALL_SKULL);
 @@ -69,12 +74,18 @@
-                     EntityWither entitywither = (EntityWither) EntityTypes.WITHER.create(world, EntitySpawnReason.TRIGGERED);
+                     WitherBoss entitywither = (WitherBoss) EntityType.WITHER.create(world, EntitySpawnReason.TRIGGERED);
  
                      if (entitywither != null) {
--                        BlockPumpkinCarved.clearPatternBlocks(world, shapedetector_shapedetectorcollection);
+-                        CarvedPumpkinBlock.clearPatternBlocks(world, shapedetector_shapedetectorcollection);
 +                        // BlockPumpkinCarved.clearPatternBlocks(world, shapedetector_shapedetectorcollection); // CraftBukkit - move down
-                         BlockPosition blockposition1 = shapedetector_shapedetectorcollection.getBlock(1, 2, 0).getPos();
+                         BlockPos blockposition1 = shapedetector_shapedetectorcollection.getBlock(1, 2, 0).getPos();
  
-                         entitywither.moveTo((double) blockposition1.getX() + 0.5D, (double) blockposition1.getY() + 0.55D, (double) blockposition1.getZ() + 0.5D, shapedetector_shapedetectorcollection.getForwards().getAxis() == EnumDirection.EnumAxis.X ? 0.0F : 90.0F, 0.0F);
-                         entitywither.yBodyRot = shapedetector_shapedetectorcollection.getForwards().getAxis() == EnumDirection.EnumAxis.X ? 0.0F : 90.0F;
+                         entitywither.moveTo((double) blockposition1.getX() + 0.5D, (double) blockposition1.getY() + 0.55D, (double) blockposition1.getZ() + 0.5D, shapedetector_shapedetectorcollection.getForwards().getAxis() == Direction.Axis.X ? 0.0F : 90.0F, 0.0F);
+                         entitywither.yBodyRot = shapedetector_shapedetectorcollection.getForwards().getAxis() == Direction.Axis.X ? 0.0F : 90.0F;
                          entitywither.makeInvulnerable();
 +                        // CraftBukkit start
 +                        if (!world.addFreshEntity(entitywither, SpawnReason.BUILD_WITHER)) {
 +                            return;
 +                        }
-+                        BlockPumpkinCarved.clearPatternBlocks(world, shapedetector_shapedetectorcollection); // CraftBukkit - from above
++                        CarvedPumpkinBlock.clearPatternBlocks(world, shapedetector_shapedetectorcollection); // CraftBukkit - from above
 +                        // CraftBukkit end
-                         Iterator iterator = world.getEntitiesOfClass(EntityPlayer.class, entitywither.getBoundingBox().inflate(50.0D)).iterator();
+                         Iterator iterator = world.getEntitiesOfClass(ServerPlayer.class, entitywither.getBoundingBox().inflate(50.0D)).iterator();
  
                          while (iterator.hasNext()) {
 @@ -83,7 +94,7 @@
-                             CriterionTriggers.SUMMONED_ENTITY.trigger(entityplayer, (Entity) entitywither);
+                             CriteriaTriggers.SUMMONED_ENTITY.trigger(entityplayer, (Entity) entitywither);
                          }
  
 -                        world.addFreshEntity(entitywither);
 +                        // world.addFreshEntity(entitywither); // CraftBukkit - moved up
-                         BlockPumpkinCarved.updatePatternBlocks(world, shapedetector_shapedetectorcollection);
+                         CarvedPumpkinBlock.updatePatternBlocks(world, shapedetector_shapedetectorcollection);
                      }
  
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java.patch
new file mode 100644
index 0000000000..ea190773fc
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java.patch
@@ -0,0 +1,272 @@
+--- a/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
++++ b/net/minecraft/world/level/block/entity/AbstractFurnaceBlockEntity.java
+@@ -22,7 +22,6 @@
+ import net.minecraft.world.ContainerHelper;
+ import net.minecraft.world.WorldlyContainer;
+ import net.minecraft.world.entity.ExperienceOrb;
+-import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.entity.player.StackedItemContents;
+ import net.minecraft.world.inventory.ContainerData;
+ import net.minecraft.world.inventory.RecipeCraftingHolder;
+@@ -41,6 +40,20 @@
+ import net.minecraft.world.level.block.Blocks;
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import org.bukkit.craftbukkit.block.CraftBlock;
++import org.bukkit.craftbukkit.entity.CraftHumanEntity;
++import org.bukkit.craftbukkit.inventory.CraftItemStack;
++import org.bukkit.craftbukkit.inventory.CraftItemType;
++import org.bukkit.entity.HumanEntity;
++import org.bukkit.entity.Player;
++import org.bukkit.event.block.BlockExpEvent;
++import org.bukkit.event.inventory.FurnaceBurnEvent;
++import org.bukkit.event.inventory.FurnaceExtractEvent;
++import org.bukkit.event.inventory.FurnaceSmeltEvent;
++import org.bukkit.event.inventory.FurnaceStartSmeltEvent;
++import org.bukkit.inventory.CookingRecipe;
++// CraftBukkit end
+ 
+ public abstract class AbstractFurnaceBlockEntity extends BaseContainerBlockEntity implements WorldlyContainer, RecipeCraftingHolder, StackedContentsCompatible {
+ 
+@@ -110,9 +123,39 @@
+             }
+         };
+         this.recipesUsed = new Reference2IntOpenHashMap();
+-        this.quickCheck = RecipeManager.createCheck(recipeType);
++        this.quickCheck = RecipeManager.createCheck((RecipeType<AbstractCookingRecipe>) recipeType); // CraftBukkit - decompile error // Eclipse fail
+     }
+ 
++    // CraftBukkit start - add fields and methods
++    private int maxStack = MAX_STACK;
++    public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
++
++    public List<ItemStack> getContents() {
++        return this.items;
++    }
++
++    public void onOpen(CraftHumanEntity who) {
++        this.transaction.add(who);
++    }
++
++    public void onClose(CraftHumanEntity who) {
++        this.transaction.remove(who);
++    }
++
++    public List<HumanEntity> getViewers() {
++        return this.transaction;
++    }
++
++    @Override
++    public int getMaxStackSize() {
++        return this.maxStack;
++    }
++
++    public void setMaxStackSize(int size) {
++        this.maxStack = size;
++    }
++    // CraftBukkit end
++
+     private boolean isLit() {
+         return this.litTimeRemaining > 0;
+     }
+@@ -175,7 +218,7 @@
+             RecipeHolder recipeholder;
+ 
+             if (flag2) {
+-                recipeholder = (RecipeHolder) blockEntity.quickCheck.getRecipeFor(singlerecipeinput, world).orElse((Object) null);
++                recipeholder = (RecipeHolder) blockEntity.quickCheck.getRecipeFor(singlerecipeinput, world).orElse(null); // CraftBukkit - decompile error
+             } else {
+                 recipeholder = null;
+             }
+@@ -183,9 +226,20 @@
+             int i = blockEntity.getMaxStackSize();
+ 
+             if (!blockEntity.isLit() && AbstractFurnaceBlockEntity.canBurn(world.registryAccess(), recipeholder, singlerecipeinput, blockEntity.items, i)) {
+-                blockEntity.litTimeRemaining = blockEntity.getBurnDuration(world.fuelValues(), itemstack);
++                // CraftBukkit start
++                CraftItemStack fuel = CraftItemStack.asCraftMirror(itemstack);
++
++                FurnaceBurnEvent furnaceBurnEvent = new FurnaceBurnEvent(CraftBlock.at(world, pos), fuel, blockEntity.getBurnDuration(world.fuelValues(), itemstack));
++                world.getCraftServer().getPluginManager().callEvent(furnaceBurnEvent);
++
++                if (furnaceBurnEvent.isCancelled()) {
++                    return;
++                }
++
++                blockEntity.litTimeRemaining = furnaceBurnEvent.getBurnTime();
+                 blockEntity.litTotalTime = blockEntity.litTimeRemaining;
+-                if (blockEntity.isLit()) {
++                if (blockEntity.isLit() && furnaceBurnEvent.isBurning()) {
++                    // CraftBukkit end
+                     flag1 = true;
+                     if (flag3) {
+                         Item item = itemstack.getItem();
+@@ -199,11 +253,23 @@
+             }
+ 
+             if (blockEntity.isLit() && AbstractFurnaceBlockEntity.canBurn(world.registryAccess(), recipeholder, singlerecipeinput, blockEntity.items, i)) {
++                // CraftBukkit start
++                if (recipeholder != null && blockEntity.cookingTimer == 0) {
++                    CraftItemStack source = CraftItemStack.asCraftMirror(blockEntity.items.get(0));
++                    CookingRecipe<?> recipe = (CookingRecipe<?>) recipeholder.toBukkitRecipe();
++
++                    FurnaceStartSmeltEvent event = new FurnaceStartSmeltEvent(CraftBlock.at(world, pos), source, recipe);
++                    world.getCraftServer().getPluginManager().callEvent(event);
++
++                    blockEntity.cookingTotalTime = event.getTotalCookTime();
++                }
++                // CraftBukkit end
++
+                 ++blockEntity.cookingTimer;
+                 if (blockEntity.cookingTimer == blockEntity.cookingTotalTime) {
+                     blockEntity.cookingTimer = 0;
+                     blockEntity.cookingTotalTime = AbstractFurnaceBlockEntity.getTotalCookTime(world, blockEntity);
+-                    if (AbstractFurnaceBlockEntity.burn(world.registryAccess(), recipeholder, singlerecipeinput, blockEntity.items, i)) {
++                    if (AbstractFurnaceBlockEntity.burn(blockEntity.level, blockEntity.worldPosition, world.registryAccess(), recipeholder, singlerecipeinput, blockEntity.items, i)) { // CraftBukkit
+                         blockEntity.setRecipeUsed(recipeholder);
+                     }
+ 
+@@ -242,20 +308,47 @@
+         }
+     }
+ 
+-    private static boolean burn(RegistryAccess dynamicRegistryManager, @Nullable RecipeHolder<? extends AbstractCookingRecipe> recipe, SingleRecipeInput input, NonNullList<ItemStack> inventory, int maxCount) {
+-        if (recipe != null && AbstractFurnaceBlockEntity.canBurn(dynamicRegistryManager, recipe, input, inventory, maxCount)) {
+-            ItemStack itemstack = (ItemStack) inventory.get(0);
+-            ItemStack itemstack1 = ((AbstractCookingRecipe) recipe.value()).assemble(input, dynamicRegistryManager);
+-            ItemStack itemstack2 = (ItemStack) inventory.get(2);
++    private static boolean burn(Level world, BlockPos blockposition, RegistryAccess iregistrycustom, @Nullable RecipeHolder<? extends AbstractCookingRecipe> recipeholder, SingleRecipeInput singlerecipeinput, NonNullList<ItemStack> nonnulllist, int i) { // CraftBukkit
++        if (recipeholder != null && AbstractFurnaceBlockEntity.canBurn(iregistrycustom, recipeholder, singlerecipeinput, nonnulllist, i)) {
++            ItemStack itemstack = (ItemStack) nonnulllist.get(0);
++            ItemStack itemstack1 = ((AbstractCookingRecipe) recipeholder.value()).assemble(singlerecipeinput, iregistrycustom);
++            ItemStack itemstack2 = (ItemStack) nonnulllist.get(2);
+ 
++            // CraftBukkit start - fire FurnaceSmeltEvent
++            CraftItemStack source = CraftItemStack.asCraftMirror(itemstack);
++            org.bukkit.inventory.ItemStack result = CraftItemStack.asBukkitCopy(itemstack1);
++
++            FurnaceSmeltEvent furnaceSmeltEvent = new FurnaceSmeltEvent(CraftBlock.at(world, blockposition), source, result);
++            world.getCraftServer().getPluginManager().callEvent(furnaceSmeltEvent);
++
++            if (furnaceSmeltEvent.isCancelled()) {
++                return false;
++            }
++
++            result = furnaceSmeltEvent.getResult();
++            itemstack1 = CraftItemStack.asNMSCopy(result);
++
++            if (!itemstack1.isEmpty()) {
++                if (itemstack2.isEmpty()) {
++                    nonnulllist.set(2, itemstack1.copy());
++                } else if (CraftItemStack.asCraftMirror(itemstack2).isSimilar(result)) {
++                    itemstack2.grow(itemstack1.getCount());
++                } else {
++                    return false;
++                }
++            }
++
++            /*
+             if (itemstack2.isEmpty()) {
+-                inventory.set(2, itemstack1.copy());
++                nonnulllist.set(2, itemstack1.copy());
+             } else if (ItemStack.isSameItemSameComponents(itemstack2, itemstack1)) {
+                 itemstack2.grow(1);
+             }
++            */
++            // CraftBukkit end
+ 
+-            if (itemstack.is(Blocks.WET_SPONGE.asItem()) && !((ItemStack) inventory.get(1)).isEmpty() && ((ItemStack) inventory.get(1)).is(Items.BUCKET)) {
+-                inventory.set(1, new ItemStack(Items.WATER_BUCKET));
++            if (itemstack.is(Blocks.WET_SPONGE.asItem()) && !((ItemStack) nonnulllist.get(1)).isEmpty() && ((ItemStack) nonnulllist.get(1)).is(Items.BUCKET)) {
++                nonnulllist.set(1, new ItemStack(Items.WATER_BUCKET));
+             }
+ 
+             itemstack.shrink(1);
+@@ -270,6 +363,7 @@
+     }
+ 
+     public static int getTotalCookTime(ServerLevel world, AbstractFurnaceBlockEntity furnace) {
++        if (world == null) return 200; // CraftBukkit - SPIGOT-4302
+         SingleRecipeInput singlerecipeinput = new SingleRecipeInput(furnace.getItem(0));
+ 
+         return (Integer) furnace.quickCheck.getRecipeFor(singlerecipeinput, world).map((recipeholder) -> {
+@@ -358,19 +452,19 @@
+     }
+ 
+     @Override
+-    public void awardUsedRecipes(Player player, List<ItemStack> ingredients) {}
++    public void awardUsedRecipes(net.minecraft.world.entity.player.Player player, List<ItemStack> ingredients) {}
+ 
+-    public void awardUsedRecipesAndPopExperience(ServerPlayer player) {
+-        List<RecipeHolder<?>> list = this.getRecipesToAwardAndPopExperience(player.serverLevel(), player.position());
++    public void awardUsedRecipesAndPopExperience(ServerPlayer entityplayer, ItemStack itemstack, int amount) { // CraftBukkit
++        List<RecipeHolder<?>> list = this.getRecipesToAwardAndPopExperience(entityplayer.serverLevel(), entityplayer.position(), this.worldPosition, entityplayer, itemstack, amount); // CraftBukkit
+ 
+-        player.awardRecipes(list);
++        entityplayer.awardRecipes(list);
+         Iterator iterator = list.iterator();
+ 
+         while (iterator.hasNext()) {
+             RecipeHolder<?> recipeholder = (RecipeHolder) iterator.next();
+ 
+             if (recipeholder != null) {
+-                player.triggerRecipeCrafted(recipeholder, this.items);
++                entityplayer.triggerRecipeCrafted(recipeholder, this.items);
+             }
+         }
+ 
+@@ -378,30 +472,47 @@
+     }
+ 
+     public List<RecipeHolder<?>> getRecipesToAwardAndPopExperience(ServerLevel world, Vec3 pos) {
++        // CraftBukkit start
++        return this.getRecipesToAwardAndPopExperience(world, pos, this.worldPosition, null, null, 0);
++    }
++
++    public List<RecipeHolder<?>> getRecipesToAwardAndPopExperience(ServerLevel worldserver, Vec3 vec3d, BlockPos blockposition, ServerPlayer entityplayer, ItemStack itemstack, int amount) {
++        // CraftBukkit end
+         List<RecipeHolder<?>> list = Lists.newArrayList();
+         ObjectIterator objectiterator = this.recipesUsed.reference2IntEntrySet().iterator();
+ 
+         while (objectiterator.hasNext()) {
+             Entry<ResourceKey<Recipe<?>>> entry = (Entry) objectiterator.next();
+ 
+-            world.recipeAccess().byKey((ResourceKey) entry.getKey()).ifPresent((recipeholder) -> {
++            worldserver.recipeAccess().byKey(entry.getKey()).ifPresent((recipeholder) -> { // CraftBukkit - decompile error
+                 list.add(recipeholder);
+-                AbstractFurnaceBlockEntity.createExperience(world, pos, entry.getIntValue(), ((AbstractCookingRecipe) recipeholder.value()).experience());
++                AbstractFurnaceBlockEntity.createExperience(worldserver, vec3d, entry.getIntValue(), ((AbstractCookingRecipe) recipeholder.value()).experience(), blockposition, entityplayer, itemstack, amount); // CraftBukkit
+             });
+         }
+ 
+         return list;
+     }
+ 
+-    private static void createExperience(ServerLevel world, Vec3 pos, int multiplier, float experience) {
+-        int j = Mth.floor((float) multiplier * experience);
+-        float f1 = Mth.frac((float) multiplier * experience);
++    private static void createExperience(ServerLevel worldserver, Vec3 vec3d, int i, float f, BlockPos blockposition, net.minecraft.world.entity.player.Player entityhuman, ItemStack itemstack, int amount) { // CraftBukkit
++        int j = Mth.floor((float) i * f);
++        float f1 = Mth.frac((float) i * f);
+ 
+         if (f1 != 0.0F && Math.random() < (double) f1) {
+             ++j;
+         }
+ 
+-        ExperienceOrb.award(world, pos, j);
++        // CraftBukkit start - fire FurnaceExtractEvent / BlockExpEvent
++        BlockExpEvent event;
++        if (amount != 0) {
++            event = new FurnaceExtractEvent((Player) entityhuman.getBukkitEntity(), CraftBlock.at(worldserver, blockposition), CraftItemType.minecraftToBukkit(itemstack.getItem()), amount, j);
++        } else {
++            event = new BlockExpEvent(CraftBlock.at(worldserver, blockposition), j);
++        }
++        worldserver.getCraftServer().getPluginManager().callEvent(event);
++        j = event.getExpToDrop();
++        // CraftBukkit end
++
++        ExperienceOrb.award(worldserver, vec3d, j);
+     }
+ 
+     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/BannerBlockEntity.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/BannerBlockEntity.java.patch
new file mode 100644
index 0000000000..9459c7a493
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/BannerBlockEntity.java.patch
@@ -0,0 +1,45 @@
+--- a/net/minecraft/world/level/block/entity/BannerBlockEntity.java
++++ b/net/minecraft/world/level/block/entity/BannerBlockEntity.java
+@@ -19,6 +19,10 @@
+ import net.minecraft.world.level.block.state.BlockState;
+ import org.slf4j.Logger;
+ 
++// CraftBukkit start
++import java.util.List;
++// CraftBukkit end
++
+ public class BannerBlockEntity extends BlockEntity implements Nameable {
+ 
+     private static final Logger LOGGER = LogUtils.getLogger();
+@@ -74,7 +78,7 @@
+             BannerPatternLayers.CODEC.parse(registries.createSerializationContext(NbtOps.INSTANCE), nbt.get("patterns")).resultOrPartial((s) -> {
+                 BannerBlockEntity.LOGGER.error("Failed to parse banner patterns: '{}'", s);
+             }).ifPresent((bannerpatternlayers) -> {
+-                this.patterns = bannerpatternlayers;
++                this.setPatterns(bannerpatternlayers); // CraftBukkit - apply limits
+             });
+         }
+ 
+@@ -108,7 +112,7 @@
+     @Override
+     protected void applyImplicitComponents(BlockEntity.DataComponentInput components) {
+         super.applyImplicitComponents(components);
+-        this.patterns = (BannerPatternLayers) components.getOrDefault(DataComponents.BANNER_PATTERNS, BannerPatternLayers.EMPTY);
++        this.setPatterns((BannerPatternLayers) components.getOrDefault(DataComponents.BANNER_PATTERNS, BannerPatternLayers.EMPTY)); // CraftBukkit - apply limits
+         this.name = (Component) components.get(DataComponents.CUSTOM_NAME);
+     }
+ 
+@@ -124,4 +128,13 @@
+         nbt.remove("patterns");
+         nbt.remove("CustomName");
+     }
++
++    // CraftBukkit start
++    public void setPatterns(BannerPatternLayers bannerpatternlayers) {
++        if (bannerpatternlayers.layers().size() > 20) {
++            bannerpatternlayers = new BannerPatternLayers(List.copyOf(bannerpatternlayers.layers().subList(0, 20)));
++        }
++        this.patterns = bannerpatternlayers;
++    }
++    // CraftBukkit end
+ }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityBarrel.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/BarrelBlockEntity.java.patch
similarity index 62%
rename from paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityBarrel.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/entity/BarrelBlockEntity.java.patch
index 0d9290ca46..bc89832782 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityBarrel.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/BarrelBlockEntity.java.patch
@@ -1,17 +1,17 @@
---- a/net/minecraft/world/level/block/entity/TileEntityBarrel.java
-+++ b/net/minecraft/world/level/block/entity/TileEntityBarrel.java
-@@ -21,8 +21,49 @@
- import net.minecraft.world.level.block.BlockBarrel;
- import net.minecraft.world.level.block.state.IBlockData;
- 
+--- a/net/minecraft/world/level/block/entity/BarrelBlockEntity.java
++++ b/net/minecraft/world/level/block/entity/BarrelBlockEntity.java
+@@ -20,9 +20,49 @@
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.block.BarrelBlock;
+ import net.minecraft.world.level.block.state.BlockState;
 +// CraftBukkit start
 +import java.util.ArrayList;
 +import java.util.List;
 +import org.bukkit.craftbukkit.entity.CraftHumanEntity;
 +import org.bukkit.entity.HumanEntity;
 +// CraftBukkit end
-+
- public class TileEntityBarrel extends TileEntityLootable {
+ 
+ public class BarrelBlockEntity extends RandomizableContainerBlockEntity {
  
 +    // CraftBukkit start - add fields and methods
 +    public List<HumanEntity> transaction = new ArrayList<>();
@@ -24,27 +24,27 @@
 +
 +    @Override
 +    public void onOpen(CraftHumanEntity who) {
-+        transaction.add(who);
++        this.transaction.add(who);
 +    }
 +
 +    @Override
 +    public void onClose(CraftHumanEntity who) {
-+        transaction.remove(who);
++        this.transaction.remove(who);
 +    }
 +
 +    @Override
 +    public List<HumanEntity> getViewers() {
-+        return transaction;
++        return this.transaction;
 +    }
 +
 +    @Override
 +    public int getMaxStackSize() {
-+       return maxStack;
++       return this.maxStack;
 +    }
 +
 +    @Override
 +    public void setMaxStackSize(int i) {
-+        maxStack = i;
++        this.maxStack = i;
 +    }
 +    // CraftBukkit end
      private NonNullList<ItemStack> items;
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java.patch
new file mode 100644
index 0000000000..fc20a77130
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java.patch
@@ -0,0 +1,15 @@
+--- a/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java
++++ b/net/minecraft/world/level/block/entity/BaseContainerBlockEntity.java
+@@ -178,4 +178,12 @@
+         nbt.remove("lock");
+         nbt.remove("Items");
+     }
++
++    // CraftBukkit start
++    @Override
++    public org.bukkit.Location getLocation() {
++        if (this.level == null) return null;
++        return new org.bukkit.Location(this.level.getWorld(), this.worldPosition.getX(), this.worldPosition.getY(), this.worldPosition.getZ());
++    }
++    // CraftBukkit end
+ }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/BeaconBlockEntity.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/BeaconBlockEntity.java.patch
new file mode 100644
index 0000000000..82821774ad
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/BeaconBlockEntity.java.patch
@@ -0,0 +1,139 @@
+--- a/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
++++ b/net/minecraft/world/level/block/entity/BeaconBlockEntity.java
+@@ -45,6 +45,10 @@
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.level.levelgen.Heightmap;
+ import net.minecraft.world.phys.AABB;
++// CraftBukkit start
++import org.bukkit.craftbukkit.potion.CraftPotionUtil;
++import org.bukkit.potion.PotionEffect;
++// CraftBukkit end
+ 
+ public class BeaconBlockEntity extends BlockEntity implements MenuProvider, Nameable {
+ 
+@@ -71,6 +75,15 @@
+     public Component name;
+     public LockCode lockKey;
+     private final ContainerData dataAccess;
++    // CraftBukkit start - add fields and methods
++    public PotionEffect getPrimaryEffect() {
++        return (this.primaryPower != null) ? CraftPotionUtil.toBukkit(new MobEffectInstance(this.primaryPower, BeaconBlockEntity.getLevel(this.levels), BeaconBlockEntity.getAmplification(this.levels, this.primaryPower, this.secondaryPower), true, true)) : null;
++    }
++
++    public PotionEffect getSecondaryEffect() {
++        return (BeaconBlockEntity.hasSecondaryEffect(this.levels, this.primaryPower, this.secondaryPower)) ? CraftPotionUtil.toBukkit(new MobEffectInstance(this.secondaryPower, BeaconBlockEntity.getLevel(this.levels), BeaconBlockEntity.getAmplification(this.levels, this.primaryPower, this.secondaryPower), true, true)) : null;
++    }
++    // CraftBukkit end
+ 
+     @Nullable
+     static Holder<MobEffect> filterEffect(@Nullable Holder<MobEffect> effect) {
+@@ -251,39 +264,78 @@
+         super.setRemoved();
+     }
+ 
+-    private static void applyEffects(Level world, BlockPos pos, int beaconLevel, @Nullable Holder<MobEffect> primaryEffect, @Nullable Holder<MobEffect> secondaryEffect) {
+-        if (!world.isClientSide && primaryEffect != null) {
+-            double d0 = (double) (beaconLevel * 10 + 10);
++    // CraftBukkit start - split into components
++    private static byte getAmplification(int i, @Nullable Holder<MobEffect> holder, @Nullable Holder<MobEffect> holder1) {
++        {
+             byte b0 = 0;
+ 
+-            if (beaconLevel >= 4 && Objects.equals(primaryEffect, secondaryEffect)) {
++            if (i >= 4 && Objects.equals(holder, holder1)) {
+                 b0 = 1;
+             }
+ 
+-            int j = (9 + beaconLevel * 2) * 20;
+-            AABB axisalignedbb = (new AABB(pos)).inflate(d0).expandTowards(0.0D, (double) world.getHeight(), 0.0D);
++            return b0;
++        }
++    }
++
++    private static int getLevel(int i) {
++        {
++            int j = (9 + i * 2) * 20;
++            return j;
++        }
++    }
++
++    public static List getHumansInRange(Level world, BlockPos blockposition, int i) {
++        {
++            double d0 = (double) (i * 10 + 10);
++
++            AABB axisalignedbb = (new AABB(blockposition)).inflate(d0).expandTowards(0.0D, (double) world.getHeight(), 0.0D);
+             List<Player> list = world.getEntitiesOfClass(Player.class, axisalignedbb);
++
++            return list;
++        }
++    }
++
++    private static void applyEffect(List list, @Nullable Holder<MobEffect> holder, int j, int b0) {
++        {
+             Iterator iterator = list.iterator();
+ 
+             Player entityhuman;
+ 
+             while (iterator.hasNext()) {
+                 entityhuman = (Player) iterator.next();
+-                entityhuman.addEffect(new MobEffectInstance(primaryEffect, j, b0, true, true));
++                entityhuman.addEffect(new MobEffectInstance(holder, j, b0, true, true), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.BEACON);
+             }
++        }
++    }
+ 
+-            if (beaconLevel >= 4 && !Objects.equals(primaryEffect, secondaryEffect) && secondaryEffect != null) {
+-                iterator = list.iterator();
+-
+-                while (iterator.hasNext()) {
+-                    entityhuman = (Player) iterator.next();
+-                    entityhuman.addEffect(new MobEffectInstance(secondaryEffect, j, 0, true, true));
+-                }
++    private static boolean hasSecondaryEffect(int i, @Nullable Holder<MobEffect> holder, @Nullable Holder<MobEffect> holder1) {
++        {
++            if (i >= 4 && !Objects.equals(holder, holder1) && holder1 != null) {
++                return true;
+             }
+ 
++            return false;
+         }
+     }
+ 
++    private static void applyEffects(Level world, BlockPos pos, int beaconLevel, @Nullable Holder<MobEffect> primaryEffect, @Nullable Holder<MobEffect> secondaryEffect) {
++        if (!world.isClientSide && primaryEffect != null) {
++            double d0 = (double) (beaconLevel * 10 + 10);
++            byte b0 = BeaconBlockEntity.getAmplification(beaconLevel, primaryEffect, secondaryEffect);
++
++            int j = BeaconBlockEntity.getLevel(beaconLevel);
++            List list = BeaconBlockEntity.getHumansInRange(world, pos, beaconLevel);
++
++            BeaconBlockEntity.applyEffect(list, primaryEffect, j, b0);
++
++            if (BeaconBlockEntity.hasSecondaryEffect(beaconLevel, primaryEffect, secondaryEffect)) {
++                BeaconBlockEntity.applyEffect(list, secondaryEffect, j, 0);
++            }
++        }
++
++    }
++    // CraftBukkit end
++
+     public static void playSound(Level world, BlockPos pos, SoundEvent sound) {
+         world.playSound((Player) null, pos, sound, SoundSource.BLOCKS, 1.0F, 1.0F);
+     }
+@@ -316,7 +368,7 @@
+         if (nbt.contains(key, 8)) {
+             ResourceLocation minecraftkey = ResourceLocation.tryParse(nbt.getString(key));
+ 
+-            return minecraftkey == null ? null : (Holder) BuiltInRegistries.MOB_EFFECT.get(minecraftkey).map(BeaconBlockEntity::filterEffect).orElse((Object) null);
++            return minecraftkey == null ? null : (Holder) BuiltInRegistries.MOB_EFFECT.get(minecraftkey).orElse(null); // CraftBukkit - persist manually set non-default beacon effects (SPIGOT-3598)
+         } else {
+             return null;
+         }
+@@ -327,6 +379,7 @@
+         super.loadAdditional(nbt, registries);
+         this.primaryPower = BeaconBlockEntity.loadEffect(nbt, "primary_effect");
+         this.secondaryPower = BeaconBlockEntity.loadEffect(nbt, "secondary_effect");
++        this.levels = nbt.getInt("Levels"); // CraftBukkit - SPIGOT-5053, use where available
+         if (nbt.contains("CustomName", 8)) {
+             this.name = parseCustomNameSafe(nbt.getString("CustomName"), registries);
+         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java.patch
new file mode 100644
index 0000000000..40e627b3f1
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java.patch
@@ -0,0 +1,253 @@
+--- a/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
++++ b/net/minecraft/world/level/block/entity/BeehiveBlockEntity.java
+@@ -43,6 +43,10 @@
+ import net.minecraft.world.level.gameevent.GameEvent;
+ import org.slf4j.Logger;
+ 
++// CraftBukkit start
++import org.bukkit.event.entity.EntityRemoveEvent;
++// CraftBukkit end
++
+ public class BeehiveBlockEntity extends BlockEntity {
+ 
+     private static final Logger LOGGER = LogUtils.getLogger();
+@@ -56,6 +60,7 @@
+     private List<BeehiveBlockEntity.BeeData> stored = Lists.newArrayList();
+     @Nullable
+     public BlockPos savedFlowerPos;
++    public int maxBees = 3; // CraftBukkit - allow setting max amount of bees a hive can hold
+ 
+     public BeehiveBlockEntity(BlockPos pos, BlockState state) {
+         super(BlockEntityType.BEEHIVE, pos, state);
+@@ -95,7 +100,7 @@
+     }
+ 
+     public boolean isFull() {
+-        return this.stored.size() == 3;
++        return this.stored.size() == this.maxBees; // CraftBukkit
+     }
+ 
+     public void emptyAllLivingFromHive(@Nullable Player player, BlockState state, BeehiveBlockEntity.BeeReleaseStatus beeState) {
+@@ -112,7 +117,7 @@
+ 
+                     if (player.position().distanceToSqr(entity.position()) <= 16.0D) {
+                         if (!this.isSedated()) {
+-                            entitybee.setTarget(player);
++                            entitybee.setTarget(player, org.bukkit.event.entity.EntityTargetEvent.TargetReason.CLOSEST_PLAYER, true); // CraftBukkit
+                         } else {
+                             entitybee.setStayOutOfHiveCountdown(400);
+                         }
+@@ -124,10 +129,16 @@
+     }
+ 
+     private List<Entity> releaseAllOccupants(BlockState state, BeehiveBlockEntity.BeeReleaseStatus beeState) {
++        // CraftBukkit start - This allows us to bypass the night/rain/emergency check
++        return this.releaseBees(state, beeState, false);
++    }
++
++    public List<Entity> releaseBees(BlockState iblockdata, BeehiveBlockEntity.BeeReleaseStatus tileentitybeehive_releasestatus, boolean force) {
+         List<Entity> list = Lists.newArrayList();
+ 
+         this.stored.removeIf((tileentitybeehive_hivebee) -> {
+-            return BeehiveBlockEntity.releaseOccupant(this.level, this.worldPosition, state, tileentitybeehive_hivebee.toOccupant(), list, beeState, this.savedFlowerPos);
++            return BeehiveBlockEntity.releaseOccupant(this.level, this.worldPosition, iblockdata, tileentitybeehive_hivebee.toOccupant(), list, tileentitybeehive_releasestatus, this.savedFlowerPos, force);
++            // CraftBukkit end
+         });
+         if (!list.isEmpty()) {
+             super.setChanged();
+@@ -151,7 +162,17 @@
+     }
+ 
+     public void addOccupant(Bee entity) {
+-        if (this.stored.size() < 3) {
++        if (this.stored.size() < this.maxBees) { // CraftBukkit
++            // CraftBukkit start
++            if (this.level != null) {
++                org.bukkit.event.entity.EntityEnterBlockEvent event = new org.bukkit.event.entity.EntityEnterBlockEvent(entity.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(this.level, this.getBlockPos()));
++                org.bukkit.Bukkit.getPluginManager().callEvent(event);
++                if (event.isCancelled()) {
++                    entity.setStayOutOfHiveCountdown(400);
++                    return;
++                }
++            }
++            // CraftBukkit end
+             entity.stopRiding();
+             entity.ejectPassengers();
+             entity.dropLeash();
+@@ -167,7 +188,7 @@
+                 this.level.gameEvent((Holder) GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of(entity, this.getBlockState()));
+             }
+ 
+-            entity.discard();
++            entity.discard(EntityRemoveEvent.Cause.ENTER_BLOCK); // CraftBukkit - add Bukkit remove cause
+             super.setChanged();
+         }
+     }
+@@ -177,32 +198,50 @@
+     }
+ 
+     private static boolean releaseOccupant(Level world, BlockPos pos, BlockState state, BeehiveBlockEntity.Occupant bee, @Nullable List<Entity> entities, BeehiveBlockEntity.BeeReleaseStatus beeState, @Nullable BlockPos flowerPos) {
+-        if (Bee.isNightOrRaining(world) && beeState != BeehiveBlockEntity.BeeReleaseStatus.EMERGENCY) {
++        // CraftBukkit start - This allows us to bypass the night/rain/emergency check
++        return BeehiveBlockEntity.releaseOccupant(world, pos, state, bee, entities, beeState, flowerPos, false);
++    }
++
++    private static boolean releaseOccupant(Level world, BlockPos blockposition, BlockState iblockdata, BeehiveBlockEntity.Occupant tileentitybeehive_c, @Nullable List<Entity> list, BeehiveBlockEntity.BeeReleaseStatus tileentitybeehive_releasestatus, @Nullable BlockPos blockposition1, boolean force) {
++        if (!force && Bee.isNightOrRaining(world) && tileentitybeehive_releasestatus != BeehiveBlockEntity.BeeReleaseStatus.EMERGENCY) {
++            // CraftBukkit end
+             return false;
+         } else {
+-            Direction enumdirection = (Direction) state.getValue(BeehiveBlock.FACING);
+-            BlockPos blockposition2 = pos.relative(enumdirection);
++            Direction enumdirection = (Direction) iblockdata.getValue(BeehiveBlock.FACING);
++            BlockPos blockposition2 = blockposition.relative(enumdirection);
+             boolean flag = !world.getBlockState(blockposition2).getCollisionShape(world, blockposition2).isEmpty();
+ 
+-            if (flag && beeState != BeehiveBlockEntity.BeeReleaseStatus.EMERGENCY) {
++            if (flag && tileentitybeehive_releasestatus != BeehiveBlockEntity.BeeReleaseStatus.EMERGENCY) {
+                 return false;
+             } else {
+-                Entity entity = bee.createEntity(world, pos);
++                Entity entity = tileentitybeehive_c.createEntity(world, blockposition);
+ 
+                 if (entity != null) {
++                    // CraftBukkit start
+                     if (entity instanceof Bee) {
++                        float f = entity.getBbWidth();
++                        double d0 = flag ? 0.0D : 0.55D + (double) (f / 2.0F);
++                        double d1 = (double) blockposition.getX() + 0.5D + d0 * (double) enumdirection.getStepX();
++                        double d2 = (double) blockposition.getY() + 0.5D - (double) (entity.getBbHeight() / 2.0F);
++                        double d3 = (double) blockposition.getZ() + 0.5D + d0 * (double) enumdirection.getStepZ();
++
++                        entity.moveTo(d1, d2, d3, entity.getYRot(), entity.getXRot());
++                    }
++                    if (!world.addFreshEntity(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BEEHIVE)) return false; // CraftBukkit - SpawnReason, moved from below
++                    // CraftBukkit end
++                    if (entity instanceof Bee) {
+                         Bee entitybee = (Bee) entity;
+ 
+-                        if (flowerPos != null && !entitybee.hasSavedFlowerPos() && world.random.nextFloat() < 0.9F) {
+-                            entitybee.setSavedFlowerPos(flowerPos);
++                        if (blockposition1 != null && !entitybee.hasSavedFlowerPos() && world.random.nextFloat() < 0.9F) {
++                            entitybee.setSavedFlowerPos(blockposition1);
+                         }
+ 
+-                        if (beeState == BeehiveBlockEntity.BeeReleaseStatus.HONEY_DELIVERED) {
++                        if (tileentitybeehive_releasestatus == BeehiveBlockEntity.BeeReleaseStatus.HONEY_DELIVERED) {
+                             entitybee.dropOffNectar();
+-                            if (state.is(BlockTags.BEEHIVES, (blockbase_blockdata) -> {
++                            if (iblockdata.is(BlockTags.BEEHIVES, (blockbase_blockdata) -> {
+                                 return blockbase_blockdata.hasProperty(BeehiveBlock.HONEY_LEVEL);
+                             })) {
+-                                int i = BeehiveBlockEntity.getHoneyLevel(state);
++                                int i = BeehiveBlockEntity.getHoneyLevel(iblockdata);
+ 
+                                 if (i < 5) {
+                                     int j = world.random.nextInt(100) == 0 ? 2 : 1;
+@@ -211,27 +250,29 @@
+                                         --j;
+                                     }
+ 
+-                                    world.setBlockAndUpdate(pos, (BlockState) state.setValue(BeehiveBlock.HONEY_LEVEL, i + j));
++                                    world.setBlockAndUpdate(blockposition, (BlockState) iblockdata.setValue(BeehiveBlock.HONEY_LEVEL, i + j));
+                                 }
+                             }
+                         }
+ 
+-                        if (entities != null) {
+-                            entities.add(entitybee);
++                        if (list != null) {
++                            list.add(entitybee);
+                         }
+ 
++                        /* // CraftBukkit start
+                         float f = entity.getBbWidth();
+                         double d0 = flag ? 0.0D : 0.55D + (double) (f / 2.0F);
+-                        double d1 = (double) pos.getX() + 0.5D + d0 * (double) enumdirection.getStepX();
+-                        double d2 = (double) pos.getY() + 0.5D - (double) (entity.getBbHeight() / 2.0F);
+-                        double d3 = (double) pos.getZ() + 0.5D + d0 * (double) enumdirection.getStepZ();
++                        double d1 = (double) blockposition.getX() + 0.5D + d0 * (double) enumdirection.getStepX();
++                        double d2 = (double) blockposition.getY() + 0.5D - (double) (entity.getBbHeight() / 2.0F);
++                        double d3 = (double) blockposition.getZ() + 0.5D + d0 * (double) enumdirection.getStepZ();
+ 
+                         entity.moveTo(d1, d2, d3, entity.getYRot(), entity.getXRot());
++                         */ // CraftBukkit end
+                     }
+ 
+-                    world.playSound((Player) null, pos, SoundEvents.BEEHIVE_EXIT, SoundSource.BLOCKS, 1.0F, 1.0F);
+-                    world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, pos, GameEvent.Context.of(entity, world.getBlockState(pos)));
+-                    return world.addFreshEntity(entity);
++                    world.playSound((Player) null, blockposition, SoundEvents.BEEHIVE_EXIT, SoundSource.BLOCKS, 1.0F, 1.0F);
++                    world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, blockposition, GameEvent.Context.of(entity, world.getBlockState(blockposition)));
++                    return true; // return this.world.addFreshEntity(entity); // CraftBukkit - moved up
+                 } else {
+                     return false;
+                 }
+@@ -256,6 +297,10 @@
+                 if (BeehiveBlockEntity.releaseOccupant(world, pos, state, tileentitybeehive_hivebee.toOccupant(), (List) null, tileentitybeehive_releasestatus, flowerPos)) {
+                     flag = true;
+                     iterator.remove();
++                    // CraftBukkit start
++                } else {
++                    tileentitybeehive_hivebee.ticksInHive = tileentitybeehive_hivebee.occupant.minTicksInHive / 2; // Not strictly Vanilla behaviour in cases where bees cannot spawn but still reasonable
++                    // CraftBukkit end
+                 }
+             }
+         }
+@@ -282,7 +327,7 @@
+     @Override
+     protected void loadAdditional(CompoundTag nbt, HolderLookup.Provider registries) {
+         super.loadAdditional(nbt, registries);
+-        this.stored.clear();
++        this.stored = Lists.newArrayList(); // CraftBukkit - SPIGOT-7790: create new copy (may be modified in physics event triggered by honey change)
+         if (nbt.contains("bees")) {
+             BeehiveBlockEntity.Occupant.LIST_CODEC.parse(NbtOps.INSTANCE, nbt.get("bees")).resultOrPartial((s) -> {
+                 BeehiveBlockEntity.LOGGER.error("Failed to parse bees: '{}'", s);
+@@ -291,7 +336,12 @@
+             });
+         }
+ 
+-        this.savedFlowerPos = (BlockPos) NbtUtils.readBlockPos(nbt, "flower_pos").orElse((Object) null);
++        this.savedFlowerPos = (BlockPos) NbtUtils.readBlockPos(nbt, "flower_pos").orElse(null); // CraftBukkit - decompile error
++        // CraftBukkit start
++        if (nbt.contains("Bukkit.MaxEntities")) {
++            this.maxBees = nbt.getInt("Bukkit.MaxEntities");
++        }
++        // CraftBukkit end
+     }
+ 
+     @Override
+@@ -301,13 +351,14 @@
+         if (this.hasSavedFlowerPos()) {
+             nbt.put("flower_pos", NbtUtils.writeBlockPos(this.savedFlowerPos));
+         }
++        nbt.putInt("Bukkit.MaxEntities", this.maxBees); // CraftBukkit
+ 
+     }
+ 
+     @Override
+     protected void applyImplicitComponents(BlockEntity.DataComponentInput components) {
+         super.applyImplicitComponents(components);
+-        this.stored.clear();
++        this.stored = Lists.newArrayList(); // CraftBukkit - SPIGOT-7790: create new copy (may be modified in physics event triggered by honey change)
+         List<BeehiveBlockEntity.Occupant> list = (List) components.getOrDefault(DataComponents.BEES, List.of());
+ 
+         list.forEach(this::storeBee);
+@@ -348,7 +399,7 @@
+             CompoundTag nbttagcompound = new CompoundTag();
+ 
+             entity.save(nbttagcompound);
+-            List list = BeehiveBlockEntity.IGNORED_BEE_TAGS;
++            List<String> list = BeehiveBlockEntity.IGNORED_BEE_TAGS; // CraftBukkit - decompile error
+ 
+             Objects.requireNonNull(nbttagcompound);
+             list.forEach(nbttagcompound::remove);
+@@ -367,7 +418,7 @@
+         @Nullable
+         public Entity createEntity(Level world, BlockPos pos) {
+             CompoundTag nbttagcompound = this.entityData.copyTag();
+-            List list = BeehiveBlockEntity.IGNORED_BEE_TAGS;
++            List<String> list = BeehiveBlockEntity.IGNORED_BEE_TAGS; // CraftBukkit - decompile error
+ 
+             Objects.requireNonNull(nbttagcompound);
+             list.forEach(nbttagcompound::remove);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityBell.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/BellBlockEntity.java.patch
similarity index 57%
rename from paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityBell.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/entity/BellBlockEntity.java.patch
index c54d843b60..fc0846a693 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityBell.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/BellBlockEntity.java.patch
@@ -1,7 +1,7 @@
---- a/net/minecraft/world/level/block/entity/TileEntityBell.java
-+++ b/net/minecraft/world/level/block/entity/TileEntityBell.java
+--- a/net/minecraft/world/level/block/entity/BellBlockEntity.java
++++ b/net/minecraft/world/level/block/entity/BellBlockEntity.java
 @@ -120,7 +120,7 @@
-                 EntityLiving entityliving = (EntityLiving) iterator.next();
+                 LivingEntity entityliving = (LivingEntity) iterator.next();
  
                  if (entityliving.isAlive() && !entityliving.isRemoved() && blockposition.closerToCenterThan(entityliving.position(), 32.0D)) {
 -                    entityliving.getBrain().setMemory(MemoryModuleType.HEARD_BELL_TIME, (Object) this.level.getGameTime());
@@ -12,15 +12,15 @@
 @@ -144,9 +144,13 @@
      }
  
-     private static void makeRaidersGlow(World world, BlockPosition blockposition, List<EntityLiving> list) {
+     private static void makeRaidersGlow(Level world, BlockPos pos, List<LivingEntity> hearingEntities) {
 +        List<org.bukkit.entity.LivingEntity> entities = // CraftBukkit
-         list.stream().filter((entityliving) -> {
-             return isRaiderWithinRange(blockposition, entityliving);
--        }).forEach(TileEntityBell::glow);
+         hearingEntities.stream().filter((entityliving) -> {
+             return BellBlockEntity.isRaiderWithinRange(pos, entityliving);
+-        }).forEach(BellBlockEntity::glow);
 +        }).map((entity) -> (org.bukkit.entity.LivingEntity) entity.getBukkitEntity()).collect(java.util.stream.Collectors.toCollection(java.util.ArrayList::new)); // CraftBukkit
 +
-+        org.bukkit.craftbukkit.event.CraftEventFactory.handleBellResonateEvent(world, blockposition, entities).forEach(TileEntityBell::glow);
++        org.bukkit.craftbukkit.event.CraftEventFactory.handleBellResonateEvent(world, pos, entities).forEach(BellBlockEntity::glow);
 +        // CraftBukkit end
      }
  
-     private static void showBellParticles(World world, BlockPosition blockposition, List<EntityLiving> list) {
+     private static void showBellParticles(Level world, BlockPos pos, List<LivingEntity> hearingEntities) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntity.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/BlockEntity.java.patch
similarity index 51%
rename from paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntity.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/entity/BlockEntity.java.patch
index 5f4ff8d39b..38f32457ea 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntity.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/BlockEntity.java.patch
@@ -1,7 +1,7 @@
---- a/net/minecraft/world/level/block/entity/TileEntity.java
-+++ b/net/minecraft/world/level/block/entity/TileEntity.java
+--- a/net/minecraft/world/level/block/entity/BlockEntity.java
++++ b/net/minecraft/world/level/block/entity/BlockEntity.java
 @@ -26,8 +26,18 @@
- import net.minecraft.world.level.block.state.IBlockData;
+ import net.minecraft.world.level.block.state.BlockState;
  import org.slf4j.Logger;
  
 +// CraftBukkit start
@@ -10,36 +10,37 @@
 +import org.bukkit.inventory.InventoryHolder;
 +// CraftBukkit end
 +
- public abstract class TileEntity {
+ public abstract class BlockEntity {
  
 +    // CraftBukkit start - data containers
 +    private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
 +    public CraftPersistentDataContainer persistentDataContainer;
 +    // CraftBukkit end
      private static final Logger LOGGER = LogUtils.getLogger();
-     private final TileEntityTypes<?> type;
+     private final BlockEntityType<?> type;
      @Nullable
-@@ -74,7 +84,16 @@
+@@ -74,8 +84,17 @@
          return this.level != null;
      }
  
--    protected void loadAdditional(NBTTagCompound nbttagcompound, HolderLookup.a holderlookup_a) {}
+-    protected void loadAdditional(CompoundTag nbt, HolderLookup.Provider registries) {}
 +    // CraftBukkit start - read container
-+    protected void loadAdditional(NBTTagCompound nbttagcompound, HolderLookup.a holderlookup_a) {
-+        this.persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY);
-+
-+        net.minecraft.nbt.NBTBase persistentDataTag = nbttagcompound.get("PublicBukkitValues");
-+        if (persistentDataTag instanceof NBTTagCompound) {
-+            this.persistentDataContainer.putAll((NBTTagCompound) persistentDataTag);
++    protected void loadAdditional(CompoundTag nbt, HolderLookup.Provider registries) {
++        this.persistentDataContainer = new CraftPersistentDataContainer(BlockEntity.DATA_TYPE_REGISTRY);
+ 
++        net.minecraft.nbt.Tag persistentDataTag = nbt.get("PublicBukkitValues");
++        if (persistentDataTag instanceof CompoundTag) {
++            this.persistentDataContainer.putAll((CompoundTag) persistentDataTag);
 +        }
 +    }
 +    // CraftBukkit end
- 
-     public final void loadWithComponents(NBTTagCompound nbttagcompound, HolderLookup.a holderlookup_a) {
-         this.loadAdditional(nbttagcompound, holderlookup_a);
++
+     public final void loadWithComponents(CompoundTag nbt, HolderLookup.Provider registries) {
+         this.loadAdditional(nbt, registries);
+         BlockEntity.ComponentHelper.COMPONENTS_CODEC.parse(registries.createSerializationContext(NbtOps.INSTANCE), nbt).resultOrPartial((s) -> {
 @@ -114,6 +133,11 @@
          }).ifPresent((nbtbase) -> {
-             nbttagcompound.merge((NBTTagCompound) nbtbase);
+             nbttagcompound.merge((CompoundTag) nbtbase);
          });
 +        // CraftBukkit start - store container
 +        if (this.persistentDataContainer != null && !this.persistentDataContainer.isEmpty()) {
@@ -52,9 +53,9 @@
 @@ -263,13 +287,19 @@
      }
  
-     public final void applyComponents(DataComponentMap datacomponentmap, DataComponentPatch datacomponentpatch) {
+     public final void applyComponents(DataComponentMap defaultComponents, DataComponentPatch components) {
 +        // CraftBukkit start
-+        this.applyComponentsSet(datacomponentmap, datacomponentpatch);
++        this.applyComponentsSet(defaultComponents, components);
 +    }
 +
 +    public final Set<DataComponentType<?>> applyComponentsSet(DataComponentMap datacomponentmap, DataComponentPatch datacomponentpatch) {
@@ -63,15 +64,20 @@
  
          set.add(DataComponents.BLOCK_ENTITY_DATA);
          set.add(DataComponents.BLOCK_STATE);
-         final PatchedDataComponentMap patcheddatacomponentmap = PatchedDataComponentMap.fromPatch(datacomponentmap, datacomponentpatch);
+-        final PatchedDataComponentMap patcheddatacomponentmap = PatchedDataComponentMap.fromPatch(defaultComponents, components);
++        final PatchedDataComponentMap patcheddatacomponentmap = PatchedDataComponentMap.fromPatch(datacomponentmap, datacomponentpatch);
  
--        this.applyImplicitComponents(new TileEntity.b(this) {
-+        this.applyImplicitComponents(new TileEntity.b() { // CraftBukkit - decompile error
+-        this.applyImplicitComponents(new BlockEntity.DataComponentInput(this) {
++        this.applyImplicitComponents(new BlockEntity.DataComponentInput() { // CraftBukkit - decompile error
              @Nullable
              @Override
-             public <T> T get(DataComponentType<T> datacomponenttype) {
-@@ -287,6 +317,10 @@
-         DataComponentPatch datacomponentpatch1 = datacomponentpatch.forget(set::contains);
+             public <T> T get(DataComponentType<T> type) {
+@@ -284,9 +314,13 @@
+             }
+         });
+         Objects.requireNonNull(set);
+-        DataComponentPatch datacomponentpatch1 = components.forget(set::contains);
++        DataComponentPatch datacomponentpatch1 = datacomponentpatch.forget(set::contains);
  
          this.components = datacomponentpatch1.split().added();
 +        // CraftBukkit start
@@ -80,20 +86,20 @@
 +        // CraftBukkit end
      }
  
-     protected void collectImplicitComponents(DataComponentMap.a datacomponentmap_a) {}
+     protected void collectImplicitComponents(DataComponentMap.Builder builder) {}
 @@ -321,6 +355,15 @@
          }
      }
  
 +    // CraftBukkit start - add method
 +    public InventoryHolder getOwner() {
-+        if (level == null) return null;
-+        org.bukkit.block.BlockState state = level.getWorld().getBlockAt(worldPosition.getX(), worldPosition.getY(), worldPosition.getZ()).getState();
++        if (this.level == null) return null;
++        org.bukkit.block.BlockState state = this.level.getWorld().getBlockAt(this.worldPosition.getX(), this.worldPosition.getY(), this.worldPosition.getZ()).getState();
 +        if (state instanceof InventoryHolder) return (InventoryHolder) state;
 +        return null;
 +    }
 +    // CraftBukkit end
 +
-     private static class a {
+     private static class ComponentHelper {
  
          public static final Codec<DataComponentMap> COMPONENTS_CODEC = DataComponentMap.CODEC.optionalFieldOf("components", DataComponentMap.EMPTY).codec();
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/BlockEntityType.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/BlockEntityType.java.patch
new file mode 100644
index 0000000000..d1e189fdfd
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/BlockEntityType.java.patch
@@ -0,0 +1,20 @@
+--- a/net/minecraft/world/level/block/entity/BlockEntityType.java
++++ b/net/minecraft/world/level/block/entity/BlockEntityType.java
+@@ -66,7 +66,7 @@
+     public static final BlockEntityType<CrafterBlockEntity> CRAFTER = BlockEntityType.register("crafter", CrafterBlockEntity::new, Blocks.CRAFTER);
+     public static final BlockEntityType<TrialSpawnerBlockEntity> TRIAL_SPAWNER = BlockEntityType.register("trial_spawner", TrialSpawnerBlockEntity::new, Blocks.TRIAL_SPAWNER);
+     public static final BlockEntityType<VaultBlockEntity> VAULT = BlockEntityType.register("vault", VaultBlockEntity::new, Blocks.VAULT);
+-    private static final Set<BlockEntityType<?>> OP_ONLY_CUSTOM_DATA = Set.of(BlockEntityType.COMMAND_BLOCK, BlockEntityType.LECTERN, BlockEntityType.SIGN, BlockEntityType.HANGING_SIGN, BlockEntityType.MOB_SPAWNER, BlockEntityType.TRIAL_SPAWNER);
++    private static final Set<BlockEntityType<?>> OP_ONLY_CUSTOM_DATA = Set.of(BlockEntityType.COMMAND_BLOCK, BlockEntityType.LECTERN, BlockEntityType.SIGN, BlockEntityType.HANGING_SIGN, BlockEntityType.MOB_SPAWNER, BlockEntityType.TRIAL_SPAWNER, BlockEntityType.CHEST); // CraftBukkit
+     private final BlockEntityType.BlockEntitySupplier<? extends T> factory;
+     public final Set<Block> validBlocks;
+     private final Holder.Reference<BlockEntityType<?>> builtInRegistryHolder;
+@@ -110,7 +110,7 @@
+     public T getBlockEntity(BlockGetter world, BlockPos pos) {
+         BlockEntity tileentity = world.getBlockEntity(pos);
+ 
+-        return tileentity != null && tileentity.getType() == this ? tileentity : null;
++        return tileentity != null && tileentity.getType() == this ? (T) tileentity : null; // CraftBukkit - decompile error
+     }
+ 
+     public boolean onlyOpCanSetNbt() {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java.patch
new file mode 100644
index 0000000000..3732e9afc7
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java.patch
@@ -0,0 +1,181 @@
+--- a/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
++++ b/net/minecraft/world/level/block/entity/BrewingStandBlockEntity.java
+@@ -8,7 +8,6 @@
+ import net.minecraft.core.NonNullList;
+ import net.minecraft.nbt.CompoundTag;
+ import net.minecraft.network.chat.Component;
+-import net.minecraft.tags.ItemTags;
+ import net.minecraft.world.ContainerHelper;
+ import net.minecraft.world.Containers;
+ import net.minecraft.world.WorldlyContainer;
+@@ -23,6 +22,20 @@
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.block.BrewingStandBlock;
+ import net.minecraft.world.level.block.state.BlockState;
++// CraftBukkit start
++import java.util.ArrayList;
++import java.util.List;
++import net.minecraft.server.MinecraftServer;
++import net.minecraft.tags.ItemTags;
++import org.bukkit.craftbukkit.block.CraftBlock;
++import org.bukkit.craftbukkit.entity.CraftHumanEntity;
++import org.bukkit.craftbukkit.inventory.CraftItemStack;
++import org.bukkit.entity.HumanEntity;
++import org.bukkit.event.block.BrewingStartEvent;
++import org.bukkit.event.inventory.BrewEvent;
++import org.bukkit.event.inventory.BrewingStandFuelEvent;
++import org.bukkit.inventory.InventoryHolder;
++// CraftBukkit end
+ 
+ public class BrewingStandBlockEntity extends BaseContainerBlockEntity implements WorldlyContainer {
+ 
+@@ -41,7 +54,37 @@
+     private Item ingredient;
+     public int fuel;
+     protected final ContainerData dataAccess;
++    // CraftBukkit start - add fields and methods
++    private int lastTick = MinecraftServer.currentTick;
++    public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
++    private int maxStack = MAX_STACK;
+ 
++    public void onOpen(CraftHumanEntity who) {
++        this.transaction.add(who);
++    }
++
++    public void onClose(CraftHumanEntity who) {
++        this.transaction.remove(who);
++    }
++
++    public List<HumanEntity> getViewers() {
++        return this.transaction;
++    }
++
++    public List<ItemStack> getContents() {
++        return this.items;
++    }
++
++    @Override
++    public int getMaxStackSize() {
++        return this.maxStack;
++    }
++
++    public void setMaxStackSize(int size) {
++        this.maxStack = size;
++    }
++    // CraftBukkit end
++
+     public BrewingStandBlockEntity(BlockPos pos, BlockState state) {
+         super(BlockEntityType.BREWING_STAND, pos, state);
+         this.items = NonNullList.withSize(5, ItemStack.EMPTY);
+@@ -107,8 +150,19 @@
+         ItemStack itemstack = (ItemStack) blockEntity.items.get(4);
+ 
+         if (blockEntity.fuel <= 0 && itemstack.is(ItemTags.BREWING_FUEL)) {
+-            blockEntity.fuel = 20;
+-            itemstack.shrink(1);
++            // CraftBukkit start
++            BrewingStandFuelEvent event = new BrewingStandFuelEvent(CraftBlock.at(world, pos), CraftItemStack.asCraftMirror(itemstack), 20);
++            world.getCraftServer().getPluginManager().callEvent(event);
++
++            if (event.isCancelled()) {
++                return;
++            }
++
++            blockEntity.fuel = event.getFuelPower();
++            if (blockEntity.fuel > 0 && event.isConsuming()) {
++                itemstack.shrink(1);
++            }
++            // CraftBukkit end
+             setChanged(world, pos, state);
+         }
+ 
+@@ -116,12 +170,17 @@
+         boolean flag1 = blockEntity.brewTime > 0;
+         ItemStack itemstack1 = (ItemStack) blockEntity.items.get(3);
+ 
++        // CraftBukkit start - Use wall time instead of ticks for brewing
++        int elapsedTicks = MinecraftServer.currentTick - blockEntity.lastTick;
++        blockEntity.lastTick = MinecraftServer.currentTick;
++
+         if (flag1) {
+-            --blockEntity.brewTime;
+-            boolean flag2 = blockEntity.brewTime == 0;
++            blockEntity.brewTime -= elapsedTicks;
++            boolean flag2 = blockEntity.brewTime <= 0; // == -> <=
++            // CraftBukkit end
+ 
+             if (flag2 && flag) {
+-                BrewingStandBlockEntity.doBrew(world, pos, blockEntity.items);
++                BrewingStandBlockEntity.doBrew(world, pos, blockEntity.items, blockEntity); // CraftBukkit
+             } else if (!flag || !itemstack1.is(blockEntity.ingredient)) {
+                 blockEntity.brewTime = 0;
+             }
+@@ -129,7 +188,11 @@
+             setChanged(world, pos, state);
+         } else if (flag && blockEntity.fuel > 0) {
+             --blockEntity.fuel;
+-            blockEntity.brewTime = 400;
++            // CraftBukkit start
++            BrewingStartEvent event = new BrewingStartEvent(CraftBlock.at(world, pos), CraftItemStack.asCraftMirror(itemstack1), 400);
++            world.getCraftServer().getPluginManager().callEvent(event);
++            blockEntity.brewTime = event.getTotalBrewTime(); // 400 -> event.getTotalBrewTime()
++            // CraftBukkit end
+             blockEntity.ingredient = itemstack1.getItem();
+             setChanged(world, pos, state);
+         }
+@@ -185,14 +248,36 @@
+         }
+     }
+ 
+-    private static void doBrew(Level world, BlockPos pos, NonNullList<ItemStack> slots) {
+-        ItemStack itemstack = (ItemStack) slots.get(3);
++    private static void doBrew(Level world, BlockPos blockposition, NonNullList<ItemStack> nonnulllist, BrewingStandBlockEntity tileentitybrewingstand) { // CraftBukkit
++        ItemStack itemstack = (ItemStack) nonnulllist.get(3);
+         PotionBrewing potionbrewer = world.potionBrewing();
+ 
++        // CraftBukkit start
++        InventoryHolder owner = tileentitybrewingstand.getOwner();
++        List<org.bukkit.inventory.ItemStack> brewResults = new ArrayList<>(3);
+         for (int i = 0; i < 3; ++i) {
+-            slots.set(i, potionbrewer.mix(itemstack, (ItemStack) slots.get(i)));
++            brewResults.add(i, CraftItemStack.asCraftMirror(potionbrewer.mix(itemstack, (ItemStack) nonnulllist.get(i))));
+         }
+ 
++        if (owner != null) {
++            BrewEvent event = new BrewEvent(CraftBlock.at(world, blockposition), (org.bukkit.inventory.BrewerInventory) owner.getInventory(), brewResults, tileentitybrewingstand.fuel);
++            org.bukkit.Bukkit.getPluginManager().callEvent(event);
++            if (event.isCancelled()) {
++                return;
++            }
++        }
++        // CraftBukkit end
++
++        for (int i = 0; i < 3; ++i) {
++            // CraftBukkit start - validate index in case it is cleared by plugins
++            if (i < brewResults.size()) {
++                nonnulllist.set(i, CraftItemStack.asNMSCopy(brewResults.get(i)));
++            } else {
++                nonnulllist.set(i, ItemStack.EMPTY);
++            }
++            // CraftBukkit end
++        }
++
+         itemstack.shrink(1);
+         ItemStack itemstack1 = itemstack.getItem().getCraftingRemainder();
+ 
+@@ -200,12 +285,12 @@
+             if (itemstack.isEmpty()) {
+                 itemstack = itemstack1;
+             } else {
+-                Containers.dropItemStack(world, (double) pos.getX(), (double) pos.getY(), (double) pos.getZ(), itemstack1);
++                Containers.dropItemStack(world, (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), itemstack1);
+             }
+         }
+ 
+-        slots.set(3, itemstack);
+-        world.levelEvent(1035, pos, 0);
++        nonnulllist.set(3, itemstack);
++        world.levelEvent(1035, blockposition, 0);
+     }
+ 
+     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/BrushableBlockEntity.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/BrushableBlockEntity.java.patch
similarity index 64%
rename from paper-server/patches/sources/net/minecraft/world/level/block/entity/BrushableBlockEntity.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/entity/BrushableBlockEntity.java.patch
index 3b5b8926a2..95c49f058b 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/BrushableBlockEntity.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/BrushableBlockEntity.java.patch
@@ -1,7 +1,7 @@
 --- a/net/minecraft/world/level/block/entity/BrushableBlockEntity.java
 +++ b/net/minecraft/world/level/block/entity/BrushableBlockEntity.java
 @@ -31,6 +31,12 @@
- import net.minecraft.world.phys.Vec3D;
+ import net.minecraft.world.phys.Vec3;
  import org.slf4j.Logger;
  
 +// CraftBukkit start
@@ -10,17 +10,17 @@
 +import org.bukkit.craftbukkit.event.CraftEventFactory;
 +// CraftBukkit end
 +
- public class BrushableBlockEntity extends TileEntity {
+ public class BrushableBlockEntity extends BlockEntity {
  
      private static final Logger LOGGER = LogUtils.getLogger();
 @@ -151,7 +157,10 @@
-             EntityItem entityitem = new EntityItem(worldserver, d3, d4, d5, this.item.split(worldserver.random.nextInt(21) + 10));
+             ItemEntity entityitem = new ItemEntity(world, d3, d4, d5, this.item.split(world.random.nextInt(21) + 10));
  
-             entityitem.setDeltaMovement(Vec3D.ZERO);
--            worldserver.addFreshEntity(entityitem);
+             entityitem.setDeltaMovement(Vec3.ZERO);
+-            world.addFreshEntity(entityitem);
 +            // CraftBukkit start
 +            org.bukkit.block.Block bblock = CraftBlock.at(this.level, this.worldPosition);
-+            CraftEventFactory.handleBlockDropItemEvent(bblock, bblock.getState(), (EntityPlayer) entityhuman, Arrays.asList(entityitem));
++            CraftEventFactory.handleBlockDropItemEvent(bblock, bblock.getState(), (ServerPlayer) player, Arrays.asList(entityitem));
 +            // CraftBukkit end
              this.item = ItemStack.EMPTY;
          }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityCampfire.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/CampfireBlockEntity.java.patch
similarity index 55%
rename from paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityCampfire.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/entity/CampfireBlockEntity.java.patch
index ec68f7a9b3..eabf6e4ccd 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityCampfire.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/CampfireBlockEntity.java.patch
@@ -1,7 +1,7 @@
---- a/net/minecraft/world/level/block/entity/TileEntityCampfire.java
-+++ b/net/minecraft/world/level/block/entity/TileEntityCampfire.java
+--- a/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
++++ b/net/minecraft/world/level/block/entity/CampfireBlockEntity.java
 @@ -31,6 +31,14 @@
- import net.minecraft.world.level.block.state.IBlockData;
+ import net.minecraft.world.level.block.state.BlockState;
  import net.minecraft.world.level.gameevent.GameEvent;
  
 +// CraftBukkit start
@@ -12,19 +12,19 @@
 +import org.bukkit.inventory.CampfireRecipe;
 +// CraftBukkit end
 +
- public class TileEntityCampfire extends TileEntity implements Clearable {
+ public class CampfireBlockEntity extends BlockEntity implements Clearable {
  
      private static final int BURN_COOL_SPEED = 2;
 @@ -63,6 +71,20 @@
                      }).orElse(itemstack);
  
-                     if (itemstack1.isItemEnabled(worldserver.enabledFeatures())) {
+                     if (itemstack1.isItemEnabled(world.enabledFeatures())) {
 +                        // CraftBukkit start - fire BlockCookEvent
 +                        CraftItemStack source = CraftItemStack.asCraftMirror(itemstack);
 +                        org.bukkit.inventory.ItemStack result = CraftItemStack.asBukkitCopy(itemstack1);
 +
-+                        BlockCookEvent blockCookEvent = new BlockCookEvent(CraftBlock.at(worldserver, blockposition), source, result);
-+                        worldserver.getCraftServer().getPluginManager().callEvent(blockCookEvent);
++                        BlockCookEvent blockCookEvent = new BlockCookEvent(CraftBlock.at(world, pos), source, result);
++                        world.getCraftServer().getPluginManager().callEvent(blockCookEvent);
 +
 +                        if (blockCookEvent.isCancelled()) {
 +                            return;
@@ -33,19 +33,19 @@
 +                        result = blockCookEvent.getResult();
 +                        itemstack1 = CraftItemStack.asNMSCopy(result);
 +                        // CraftBukkit end
-                         InventoryUtils.dropItemStack(worldserver, (double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ(), itemstack1);
-                         tileentitycampfire.items.set(i, ItemStack.EMPTY);
-                         worldserver.sendBlockUpdated(blockposition, iblockdata, iblockdata, 3);
+                         Containers.dropItemStack(world, (double) pos.getX(), (double) pos.getY(), (double) pos.getZ(), itemstack1);
+                         blockEntity.items.set(i, ItemStack.EMPTY);
+                         world.sendBlockUpdated(pos, state, state, 3);
 @@ -177,7 +199,11 @@
                      return false;
                  }
  
--                this.cookingTime[i] = ((RecipeCampfire) ((RecipeHolder) optional.get()).value()).cookingTime();
+-                this.cookingTime[i] = ((CampfireCookingRecipe) ((RecipeHolder) optional.get()).value()).cookingTime();
 +                // CraftBukkit start
-+                CampfireStartEvent event = new CampfireStartEvent(CraftBlock.at(this.level,this.worldPosition), CraftItemStack.asCraftMirror(itemstack), (CampfireRecipe) optional.get().toBukkitRecipe());
++                CampfireStartEvent event = new CampfireStartEvent(CraftBlock.at(this.level,this.worldPosition), CraftItemStack.asCraftMirror(stack), (CampfireRecipe) optional.get().toBukkitRecipe());
 +                this.level.getCraftServer().getPluginManager().callEvent(event);
 +                this.cookingTime[i] = event.getTotalCookTime(); // i -> event.getTotalCookTime()
 +                // CraftBukkit end
                  this.cookingProgress[i] = 0;
-                 this.items.set(i, itemstack.consumeAndReturn(1, entityliving));
-                 worldserver.gameEvent((Holder) GameEvent.BLOCK_CHANGE, this.getBlockPos(), GameEvent.a.of(entityliving, this.getBlockState()));
+                 this.items.set(i, stack.consumeAndReturn(1, entity));
+                 world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, this.getBlockPos(), GameEvent.Context.of(entity, this.getBlockState()));
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityChest.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/ChestBlockEntity.java.patch
similarity index 53%
rename from paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityChest.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/entity/ChestBlockEntity.java.patch
index fe85c696ac..537f1913b2 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityChest.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/ChestBlockEntity.java.patch
@@ -1,19 +1,18 @@
---- a/net/minecraft/world/level/block/entity/TileEntityChest.java
-+++ b/net/minecraft/world/level/block/entity/TileEntityChest.java
-@@ -24,6 +24,12 @@
- import net.minecraft.world.level.block.state.IBlockData;
- import net.minecraft.world.level.block.state.properties.BlockPropertyChestType;
- 
+--- a/net/minecraft/world/level/block/entity/ChestBlockEntity.java
++++ b/net/minecraft/world/level/block/entity/ChestBlockEntity.java
+@@ -23,6 +23,11 @@
+ import net.minecraft.world.level.block.ChestBlock;
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.level.block.state.properties.ChestType;
 +// CraftBukkit start
 +import java.util.List;
 +import org.bukkit.craftbukkit.entity.CraftHumanEntity;
 +import org.bukkit.entity.HumanEntity;
 +// CraftBukkit end
-+
- public class TileEntityChest extends TileEntityLootable implements LidBlockEntity {
  
-     private static final int EVENT_SET_OPEN_COUNT = 1;
-@@ -31,6 +37,36 @@
+ public class ChestBlockEntity extends RandomizableContainerBlockEntity implements LidBlockEntity {
+ 
+@@ -31,6 +36,36 @@
      public final ContainerOpenersCounter openersCounter;
      private final ChestLidController chestLidController;
  
@@ -26,27 +25,27 @@
 +    }
 +
 +    public void onOpen(CraftHumanEntity who) {
-+        transaction.add(who);
++        this.transaction.add(who);
 +    }
 +
 +    public void onClose(CraftHumanEntity who) {
-+        transaction.remove(who);
++        this.transaction.remove(who);
 +    }
 +
 +    public List<HumanEntity> getViewers() {
-+        return transaction;
++        return this.transaction;
 +    }
 +
 +    @Override
 +    public int getMaxStackSize() {
-+        return maxStack;
++        return this.maxStack;
 +    }
 +
 +    public void setMaxStackSize(int size) {
-+        maxStack = size;
++        this.maxStack = size;
 +    }
 +    // CraftBukkit end
 +
-     protected TileEntityChest(TileEntityTypes<?> tileentitytypes, BlockPosition blockposition, IBlockData iblockdata) {
-         super(tileentitytypes, blockposition, iblockdata);
+     protected ChestBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
+         super(type, pos, state);
          this.items = NonNullList.withSize(27, ItemStack.EMPTY);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java.patch
similarity index 54%
rename from paper-server/patches/sources/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java.patch
index 449bad12a7..af35923253 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java.patch
@@ -1,6 +1,6 @@
 --- a/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java
 +++ b/net/minecraft/world/level/block/entity/ChiseledBookShelfBlockEntity.java
-@@ -23,12 +23,54 @@
+@@ -23,13 +23,55 @@
  import net.minecraft.world.level.gameevent.GameEvent;
  import org.slf4j.Logger;
  
@@ -11,7 +11,7 @@
 +import org.bukkit.entity.HumanEntity;
 +// CraftBukkit end
 +
- public class ChiseledBookShelfBlockEntity extends TileEntity implements IInventory {
+ public class ChiseledBookShelfBlockEntity extends BlockEntity implements Container {
  
      public static final int MAX_BOOKS_IN_STORAGE = 6;
      private static final Logger LOGGER = LogUtils.getLogger();
@@ -20,7 +20,7 @@
 +    // CraftBukkit start - add fields and methods
 +    public List<HumanEntity> transaction = new java.util.ArrayList<>();
 +    private int maxStack = 1;
-+
+ 
 +    @Override
 +    public List<ItemStack> getContents() {
 +        return this.items;
@@ -28,57 +28,58 @@
 +
 +    @Override
 +    public void onOpen(CraftHumanEntity who) {
-+        transaction.add(who);
++        this.transaction.add(who);
 +    }
 +
 +    @Override
 +    public void onClose(CraftHumanEntity who) {
-+        transaction.remove(who);
++        this.transaction.remove(who);
 +    }
 +
 +    @Override
 +    public List<HumanEntity> getViewers() {
-+        return transaction;
++        return this.transaction;
 +    }
 +
 +    @Override
 +    public void setMaxStackSize(int size) {
-+        maxStack = size;
++        this.maxStack = size;
 +    }
 +
 +    @Override
 +    public Location getLocation() {
-+        if (level == null) return null;
-+        return new org.bukkit.Location(level.getWorld(), worldPosition.getX(), worldPosition.getY(), worldPosition.getZ());
++        if (this.level == null) return null;
++        return new org.bukkit.Location(this.level.getWorld(), this.worldPosition.getX(), this.worldPosition.getY(), this.worldPosition.getZ());
 +    }
 +    // CraftBukkit end
- 
-     public ChiseledBookShelfBlockEntity(BlockPosition blockposition, IBlockData iblockdata) {
-         super(TileEntityTypes.CHISELED_BOOKSHELF, blockposition, iblockdata);
++
+     public ChiseledBookShelfBlockEntity(BlockPos pos, BlockState state) {
+         super(BlockEntityType.CHISELED_BOOKSHELF, pos, state);
+         this.items = NonNullList.withSize(6, ItemStack.EMPTY);
 @@ -100,7 +142,7 @@
  
-         this.items.set(i, ItemStack.EMPTY);
+         this.items.set(slot, ItemStack.EMPTY);
          if (!itemstack.isEmpty()) {
--            this.updateState(i);
-+            if (level != null) this.updateState(i); // CraftBukkit - SPIGOT-7381: check for null world
+-            this.updateState(slot);
++            if (this.level != null) this.updateState(slot); // CraftBukkit - SPIGOT-7381: check for null world
          }
  
          return itemstack;
 @@ -115,7 +157,7 @@
-     public void setItem(int i, ItemStack itemstack) {
-         if (itemstack.is(TagsItem.BOOKSHELF_BOOKS)) {
-             this.items.set(i, itemstack);
--            this.updateState(i);
-+            if (level != null) this.updateState(i); // CraftBukkit - SPIGOT-7381: check for null world
-         } else if (itemstack.isEmpty()) {
-             this.removeItem(i, 1);
+     public void setItem(int slot, ItemStack stack) {
+         if (stack.is(ItemTags.BOOKSHELF_BOOKS)) {
+             this.items.set(slot, stack);
+-            this.updateState(slot);
++            if (this.level != null) this.updateState(slot); // CraftBukkit - SPIGOT-7381: check for null world
+         } else if (stack.isEmpty()) {
+             this.removeItem(slot, 1);
          }
 @@ -131,7 +173,7 @@
  
      @Override
      public int getMaxStackSize() {
 -        return 1;
-+        return maxStack; // CraftBukkit
++        return this.maxStack; // CraftBukkit
      }
  
      @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/CommandBlockEntity.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/CommandBlockEntity.java.patch
new file mode 100644
index 0000000000..2c1ebabd28
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/CommandBlockEntity.java.patch
@@ -0,0 +1,17 @@
+--- a/net/minecraft/world/level/block/entity/CommandBlockEntity.java
++++ b/net/minecraft/world/level/block/entity/CommandBlockEntity.java
+@@ -24,7 +24,14 @@
+     private boolean auto;
+     private boolean conditionMet;
+     private final BaseCommandBlock commandBlock = new BaseCommandBlock() {
++        // CraftBukkit start
+         @Override
++        public org.bukkit.command.CommandSender getBukkitSender(CommandSourceStack wrapper) {
++            return new org.bukkit.craftbukkit.command.CraftBlockCommandSender(wrapper, CommandBlockEntity.this);
++        }
++        // CraftBukkit end
++
++        @Override
+         public void setCommand(String command) {
+             super.setCommand(command);
+             CommandBlockEntity.this.setChanged();
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/ConduitBlockEntity.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/ConduitBlockEntity.java.patch
new file mode 100644
index 0000000000..6dd6c8627e
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/ConduitBlockEntity.java.patch
@@ -0,0 +1,108 @@
+--- a/net/minecraft/world/level/block/entity/ConduitBlockEntity.java
++++ b/net/minecraft/world/level/block/entity/ConduitBlockEntity.java
+@@ -10,6 +10,7 @@
+ import net.minecraft.core.particles.ParticleTypes;
+ import net.minecraft.nbt.CompoundTag;
+ import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket;
++import net.minecraft.server.level.ServerLevel;
+ import net.minecraft.sounds.SoundEvent;
+ import net.minecraft.sounds.SoundEvents;
+ import net.minecraft.sounds.SoundSource;
+@@ -187,11 +188,23 @@
+     }
+ 
+     private static void applyEffects(Level world, BlockPos pos, List<BlockPos> activatingBlocks) {
+-        int i = activatingBlocks.size();
++        // CraftBukkit start
++        ConduitBlockEntity.applyEffects(world, pos, ConduitBlockEntity.getRange(activatingBlocks));
++    }
++
++    public static int getRange(List<BlockPos> list) {
++        // CraftBukkit end
++        int i = list.size();
+         int j = i / 7 * 16;
+-        int k = pos.getX();
+-        int l = pos.getY();
+-        int i1 = pos.getZ();
++        // CraftBukkit start
++        return j;
++    }
++
++    private static void applyEffects(Level world, BlockPos blockposition, int j) { // j = effect range in blocks
++        // CraftBukkit end
++        int k = blockposition.getX();
++        int l = blockposition.getY();
++        int i1 = blockposition.getZ();
+         AABB axisalignedbb = (new AABB((double) k, (double) l, (double) i1, (double) (k + 1), (double) (l + 1), (double) (i1 + 1))).inflate((double) j).expandTowards(0.0D, (double) world.getHeight(), 0.0D);
+         List<Player> list1 = world.getEntitiesOfClass(Player.class, axisalignedbb);
+ 
+@@ -201,8 +214,8 @@
+             while (iterator.hasNext()) {
+                 Player entityhuman = (Player) iterator.next();
+ 
+-                if (pos.closerThan(entityhuman.blockPosition(), (double) j) && entityhuman.isInWaterOrRain()) {
+-                    entityhuman.addEffect(new MobEffectInstance(MobEffects.CONDUIT_POWER, 260, 0, true, true));
++                if (blockposition.closerThan(entityhuman.blockPosition(), (double) j) && entityhuman.isInWaterOrRain()) {
++                    entityhuman.addEffect(new MobEffectInstance(MobEffects.CONDUIT_POWER, 260, 0, true, true), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.CONDUIT); // CraftBukkit
+                 }
+             }
+ 
+@@ -210,33 +223,42 @@
+     }
+ 
+     private static void updateDestroyTarget(Level world, BlockPos pos, BlockState state, List<BlockPos> activatingBlocks, ConduitBlockEntity blockEntity) {
+-        LivingEntity entityliving = blockEntity.destroyTarget;
+-        int i = activatingBlocks.size();
++        // CraftBukkit start - add "damageTarget" boolean
++        ConduitBlockEntity.updateDestroyTarget(world, pos, state, activatingBlocks, blockEntity, true);
++    }
+ 
++    public static void updateDestroyTarget(Level world, BlockPos blockposition, BlockState iblockdata, List<BlockPos> list, ConduitBlockEntity tileentityconduit, boolean damageTarget) {
++        // CraftBukkit end
++        LivingEntity entityliving = tileentityconduit.destroyTarget;
++        int i = list.size();
++
+         if (i < 42) {
+-            blockEntity.destroyTarget = null;
+-        } else if (blockEntity.destroyTarget == null && blockEntity.destroyTargetUUID != null) {
+-            blockEntity.destroyTarget = ConduitBlockEntity.findDestroyTarget(world, pos, blockEntity.destroyTargetUUID);
+-            blockEntity.destroyTargetUUID = null;
+-        } else if (blockEntity.destroyTarget == null) {
+-            List<LivingEntity> list1 = world.getEntitiesOfClass(LivingEntity.class, ConduitBlockEntity.getDestroyRangeAABB(pos), (entityliving1) -> {
++            tileentityconduit.destroyTarget = null;
++        } else if (tileentityconduit.destroyTarget == null && tileentityconduit.destroyTargetUUID != null) {
++            tileentityconduit.destroyTarget = ConduitBlockEntity.findDestroyTarget(world, blockposition, tileentityconduit.destroyTargetUUID);
++            tileentityconduit.destroyTargetUUID = null;
++        } else if (tileentityconduit.destroyTarget == null) {
++            List<LivingEntity> list1 = world.getEntitiesOfClass(LivingEntity.class, ConduitBlockEntity.getDestroyRangeAABB(blockposition), (entityliving1) -> {
+                 return entityliving1 instanceof Enemy && entityliving1.isInWaterOrRain();
+             });
+ 
+             if (!list1.isEmpty()) {
+-                blockEntity.destroyTarget = (LivingEntity) list1.get(world.random.nextInt(list1.size()));
++                tileentityconduit.destroyTarget = (LivingEntity) list1.get(world.random.nextInt(list1.size()));
+             }
+-        } else if (!blockEntity.destroyTarget.isAlive() || !pos.closerThan(blockEntity.destroyTarget.blockPosition(), 8.0D)) {
+-            blockEntity.destroyTarget = null;
++        } else if (!tileentityconduit.destroyTarget.isAlive() || !blockposition.closerThan(tileentityconduit.destroyTarget.blockPosition(), 8.0D)) {
++            tileentityconduit.destroyTarget = null;
+         }
+ 
+-        if (blockEntity.destroyTarget != null) {
+-            world.playSound((Player) null, blockEntity.destroyTarget.getX(), blockEntity.destroyTarget.getY(), blockEntity.destroyTarget.getZ(), SoundEvents.CONDUIT_ATTACK_TARGET, SoundSource.BLOCKS, 1.0F, 1.0F);
+-            blockEntity.destroyTarget.hurt(world.damageSources().magic(), 4.0F);
++        // CraftBukkit start
++        if (damageTarget && tileentityconduit.destroyTarget != null) {
++            if (tileentityconduit.destroyTarget.hurtServer((ServerLevel) world, world.damageSources().magic().directBlock(world, blockposition), 4.0F)) {
++                world.playSound(null, tileentityconduit.destroyTarget.getX(), tileentityconduit.destroyTarget.getY(), tileentityconduit.destroyTarget.getZ(), SoundEvents.CONDUIT_ATTACK_TARGET, SoundSource.BLOCKS, 1.0F, 1.0F);
++            }
++            // CraftBukkit end
+         }
+ 
+-        if (entityliving != blockEntity.destroyTarget) {
+-            world.sendBlockUpdated(pos, state, state, 2);
++        if (entityliving != tileentityconduit.destroyTarget) {
++            world.sendBlockUpdated(blockposition, iblockdata, iblockdata, 2);
+         }
+ 
+     }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/ContainerOpenersCounter.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/ContainerOpenersCounter.java.patch
new file mode 100644
index 0000000000..4985952c79
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/ContainerOpenersCounter.java.patch
@@ -0,0 +1,75 @@
+--- a/net/minecraft/world/level/block/entity/ContainerOpenersCounter.java
++++ b/net/minecraft/world/level/block/entity/ContainerOpenersCounter.java
+@@ -17,6 +17,7 @@
+     private static final int CHECK_TICK_DELAY = 5;
+     private int openCount;
+     private double maxInteractionRange;
++    public boolean opened; // CraftBukkit
+ 
+     public ContainerOpenersCounter() {}
+ 
+@@ -26,11 +27,36 @@
+ 
+     protected abstract void openerCountChanged(Level world, BlockPos pos, BlockState state, int oldViewerCount, int newViewerCount);
+ 
++    // CraftBukkit start
++    public void onAPIOpen(Level world, BlockPos blockposition, BlockState iblockdata) {
++        this.onOpen(world, blockposition, iblockdata);
++    }
++
++    public void onAPIClose(Level world, BlockPos blockposition, BlockState iblockdata) {
++        this.onClose(world, blockposition, iblockdata);
++    }
++
++    public void openerAPICountChanged(Level world, BlockPos blockposition, BlockState iblockdata, int i, int j) {
++        this.openerCountChanged(world, blockposition, iblockdata, i, j);
++    }
++    // CraftBukkit end
++
+     protected abstract boolean isOwnContainer(Player player);
+ 
+     public void incrementOpeners(Player player, Level world, BlockPos pos, BlockState state) {
++        int oldPower = Math.max(0, Math.min(15, this.openCount)); // CraftBukkit - Get power before new viewer is added
+         int i = this.openCount++;
+ 
++        // CraftBukkit start - Call redstone event
++        if (world.getBlockState(pos).is(net.minecraft.world.level.block.Blocks.TRAPPED_CHEST)) {
++            int newPower = Math.max(0, Math.min(15, this.openCount));
++
++            if (oldPower != newPower) {
++                org.bukkit.craftbukkit.event.CraftEventFactory.callRedstoneChange(world, pos, oldPower, newPower);
++            }
++        }
++        // CraftBukkit end
++
+         if (i == 0) {
+             this.onOpen(world, pos, state);
+             world.gameEvent((Entity) player, (Holder) GameEvent.CONTAINER_OPEN, pos);
+@@ -42,8 +68,19 @@
+     }
+ 
+     public void decrementOpeners(Player player, Level world, BlockPos pos, BlockState state) {
++        int oldPower = Math.max(0, Math.min(15, this.openCount)); // CraftBukkit - Get power before new viewer is added
+         int i = this.openCount--;
+ 
++        // CraftBukkit start - Call redstone event
++        if (world.getBlockState(pos).is(net.minecraft.world.level.block.Blocks.TRAPPED_CHEST)) {
++            int newPower = Math.max(0, Math.min(15, this.openCount));
++
++            if (oldPower != newPower) {
++                org.bukkit.craftbukkit.event.CraftEventFactory.callRedstoneChange(world, pos, oldPower, newPower);
++            }
++        }
++        // CraftBukkit end
++
+         if (this.openCount == 0) {
+             this.onClose(world, pos, state);
+             world.gameEvent((Entity) player, (Holder) GameEvent.CONTAINER_CLOSE, pos);
+@@ -72,6 +109,7 @@
+         }
+ 
+         int i = list.size();
++        if (this.opened) i++; // CraftBukkit - add dummy count from API
+         int j = this.openCount;
+ 
+         if (j != i) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/ContainerOpenersCounter.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/ContainerOpenersCounter.patch
deleted file mode 100644
index 87d8f1a721..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/ContainerOpenersCounter.patch
+++ /dev/null
@@ -1,75 +0,0 @@
---- a/net/minecraft/world/level/block/entity/ContainerOpenersCounter.java
-+++ b/net/minecraft/world/level/block/entity/ContainerOpenersCounter.java
-@@ -17,6 +17,7 @@
-     private static final int CHECK_TICK_DELAY = 5;
-     private int openCount;
-     private double maxInteractionRange;
-+    public boolean opened; // CraftBukkit
- 
-     public ContainerOpenersCounter() {}
- 
-@@ -26,11 +27,36 @@
- 
-     protected abstract void openerCountChanged(World world, BlockPosition blockposition, IBlockData iblockdata, int i, int j);
- 
-+    // CraftBukkit start
-+    public void onAPIOpen(World world, BlockPosition blockposition, IBlockData iblockdata) {
-+        onOpen(world, blockposition, iblockdata);
-+    }
-+
-+    public void onAPIClose(World world, BlockPosition blockposition, IBlockData iblockdata) {
-+        onClose(world, blockposition, iblockdata);
-+    }
-+
-+    public void openerAPICountChanged(World world, BlockPosition blockposition, IBlockData iblockdata, int i, int j) {
-+        openerCountChanged(world, blockposition, iblockdata, i, j);
-+    }
-+    // CraftBukkit end
-+
-     protected abstract boolean isOwnContainer(EntityHuman entityhuman);
- 
-     public void incrementOpeners(EntityHuman entityhuman, World world, BlockPosition blockposition, IBlockData iblockdata) {
-+        int oldPower = Math.max(0, Math.min(15, this.openCount)); // CraftBukkit - Get power before new viewer is added
-         int i = this.openCount++;
- 
-+        // CraftBukkit start - Call redstone event
-+        if (world.getBlockState(blockposition).is(net.minecraft.world.level.block.Blocks.TRAPPED_CHEST)) {
-+            int newPower = Math.max(0, Math.min(15, this.openCount));
-+
-+            if (oldPower != newPower) {
-+                org.bukkit.craftbukkit.event.CraftEventFactory.callRedstoneChange(world, blockposition, oldPower, newPower);
-+            }
-+        }
-+        // CraftBukkit end
-+
-         if (i == 0) {
-             this.onOpen(world, blockposition, iblockdata);
-             world.gameEvent((Entity) entityhuman, (Holder) GameEvent.CONTAINER_OPEN, blockposition);
-@@ -42,8 +68,19 @@
-     }
- 
-     public void decrementOpeners(EntityHuman entityhuman, World world, BlockPosition blockposition, IBlockData iblockdata) {
-+        int oldPower = Math.max(0, Math.min(15, this.openCount)); // CraftBukkit - Get power before new viewer is added
-         int i = this.openCount--;
- 
-+        // CraftBukkit start - Call redstone event
-+        if (world.getBlockState(blockposition).is(net.minecraft.world.level.block.Blocks.TRAPPED_CHEST)) {
-+            int newPower = Math.max(0, Math.min(15, this.openCount));
-+
-+            if (oldPower != newPower) {
-+                org.bukkit.craftbukkit.event.CraftEventFactory.callRedstoneChange(world, blockposition, oldPower, newPower);
-+            }
-+        }
-+        // CraftBukkit end
-+
-         if (this.openCount == 0) {
-             this.onClose(world, blockposition, iblockdata);
-             world.gameEvent((Entity) entityhuman, (Holder) GameEvent.CONTAINER_CLOSE, blockposition);
-@@ -72,6 +109,7 @@
-         }
- 
-         int i = list.size();
-+        if (opened) i++; // CraftBukkit - add dummy count from API
-         int j = this.openCount;
- 
-         if (j != i) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/CrafterBlockEntity.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/CrafterBlockEntity.java.patch
similarity index 59%
rename from paper-server/patches/sources/net/minecraft/world/level/block/entity/CrafterBlockEntity.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/entity/CrafterBlockEntity.java.patch
index 90eb9c7d06..e71ac50ca3 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/CrafterBlockEntity.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/CrafterBlockEntity.java.patch
@@ -1,26 +1,25 @@
 --- a/net/minecraft/world/level/block/entity/CrafterBlockEntity.java
 +++ b/net/minecraft/world/level/block/entity/CrafterBlockEntity.java
-@@ -23,6 +23,12 @@
+@@ -22,6 +22,11 @@
+ import net.minecraft.world.level.Level;
  import net.minecraft.world.level.block.CrafterBlock;
- import net.minecraft.world.level.block.state.IBlockData;
- 
+ import net.minecraft.world.level.block.state.BlockState;
 +// CraftBukkit start
 +import org.bukkit.Location;
 +import org.bukkit.craftbukkit.entity.CraftHumanEntity;
 +import org.bukkit.entity.HumanEntity;
 +// CraftBukkit end
-+
- public class CrafterBlockEntity extends TileEntityLootable implements InventoryCrafting {
  
-     public static final int CONTAINER_WIDTH = 3;
-@@ -35,12 +41,52 @@
+ public class CrafterBlockEntity extends RandomizableContainerBlockEntity implements CraftingContainer {
+ 
+@@ -35,12 +40,52 @@
      private NonNullList<ItemStack> items;
      public int craftingTicksRemaining;
-     protected final IContainerProperties containerData;
+     protected final ContainerData containerData;
 +    // CraftBukkit start - add fields and methods
 +    public List<HumanEntity> transaction = new java.util.ArrayList<>();
 +    private int maxStack = MAX_STACK;
-+
+ 
 +    @Override
 +    public List<ItemStack> getContents() {
 +        return this.items;
@@ -28,42 +27,42 @@
 +
 +    @Override
 +    public void onOpen(CraftHumanEntity who) {
-+        transaction.add(who);
++        this.transaction.add(who);
 +    }
 +
 +    @Override
 +    public void onClose(CraftHumanEntity who) {
-+        transaction.remove(who);
++        this.transaction.remove(who);
 +    }
 +
 +    @Override
 +    public List<HumanEntity> getViewers() {
-+        return transaction;
++        return this.transaction;
 +    }
 +
 +    @Override
 +    public int getMaxStackSize() {
-+        return maxStack;
++        return this.maxStack;
 +    }
 +
 +    @Override
 +    public void setMaxStackSize(int size) {
-+        maxStack = size;
++        this.maxStack = size;
 +    }
 +
 +    @Override
 +    public Location getLocation() {
-+        if (level == null) return null;
-+        return new org.bukkit.Location(level.getWorld(), worldPosition.getX(), worldPosition.getY(), worldPosition.getZ());
++        if (this.level == null) return null;
++        return new org.bukkit.Location(this.level.getWorld(), this.worldPosition.getX(), this.worldPosition.getY(), this.worldPosition.getZ());
 +    }
 +    // CraftBukkit end
- 
-     public CrafterBlockEntity(BlockPosition blockposition, IBlockData iblockdata) {
-         super(TileEntityTypes.CRAFTER, blockposition, iblockdata);
++
+     public CrafterBlockEntity(BlockPos pos, BlockState state) {
+         super(BlockEntityType.CRAFTER, pos, state);
          this.items = NonNullList.withSize(9, ItemStack.EMPTY);
          this.craftingTicksRemaining = 0;
--        this.containerData = new IContainerProperties(this) {
-+        this.containerData = new IContainerProperties() { // CraftBukkit - decompile error
+-        this.containerData = new ContainerData(this) {
++        this.containerData = new ContainerData() { // CraftBukkit - decompile error
              private final int[] slotStates = new int[9];
              private int triggered = 0;
  
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java.patch
similarity index 76%
rename from paper-server/patches/sources/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java.patch
index 6fdb53410b..6c93436b46 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/DecoratedPotBlockEntity.java.patch
@@ -14,7 +14,7 @@
 +import org.bukkit.entity.HumanEntity;
 +// CraftBukkit end
 +
- public class DecoratedPotBlockEntity extends TileEntity implements RandomizableContainer, ContainerSingleItem.a {
+ public class DecoratedPotBlockEntity extends BlockEntity implements RandomizableContainer, ContainerSingleItem.BlockContainerSingleItem {
  
 +    // CraftBukkit start - add fields and methods
 +    public List<HumanEntity> transaction = new ArrayList<>();
@@ -27,33 +27,33 @@
 +
 +    @Override
 +    public void onOpen(CraftHumanEntity who) {
-+        transaction.add(who);
++        this.transaction.add(who);
 +    }
 +
 +    @Override
 +    public void onClose(CraftHumanEntity who) {
-+        transaction.remove(who);
++        this.transaction.remove(who);
 +    }
 +
 +    @Override
 +    public List<HumanEntity> getViewers() {
-+        return transaction;
++        return this.transaction;
 +    }
 +
 +    @Override
 +    public int getMaxStackSize() {
-+       return maxStack;
++       return this.maxStack;
 +    }
 +
 +    @Override
 +    public void setMaxStackSize(int i) {
-+        maxStack = i;
++        this.maxStack = i;
 +    }
 +
 +    @Override
 +    public Location getLocation() {
-+        if (level == null) return null;
-+        return CraftLocation.toBukkit(worldPosition, level.getWorld());
++        if (this.level == null) return null;
++        return CraftLocation.toBukkit(this.worldPosition, this.level.getWorld());
 +    }
 +    // CraftBukkit end
 +
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityDispenser.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/DispenserBlockEntity.java.patch
similarity index 58%
rename from paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityDispenser.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/entity/DispenserBlockEntity.java.patch
index 1fae288d65..ae1688f953 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityDispenser.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/DispenserBlockEntity.java.patch
@@ -1,16 +1,16 @@
---- a/net/minecraft/world/level/block/entity/TileEntityDispenser.java
-+++ b/net/minecraft/world/level/block/entity/TileEntityDispenser.java
-@@ -14,11 +14,47 @@
+--- a/net/minecraft/world/level/block/entity/DispenserBlockEntity.java
++++ b/net/minecraft/world/level/block/entity/DispenserBlockEntity.java
+@@ -13,12 +13,47 @@
+ import net.minecraft.world.inventory.DispenserMenu;
  import net.minecraft.world.item.ItemStack;
- import net.minecraft.world.level.block.state.IBlockData;
- 
+ import net.minecraft.world.level.block.state.BlockState;
 +// CraftBukkit start
 +import java.util.List;
 +import org.bukkit.craftbukkit.entity.CraftHumanEntity;
 +import org.bukkit.entity.HumanEntity;
 +// CraftBukkit end
-+
- public class TileEntityDispenser extends TileEntityLootable {
+ 
+ public class DispenserBlockEntity extends RandomizableContainerBlockEntity {
  
      public static final int CONTAINER_SIZE = 9;
      private NonNullList<ItemStack> items;
@@ -24,27 +24,27 @@
 +    }
 +
 +    public void onOpen(CraftHumanEntity who) {
-+        transaction.add(who);
++        this.transaction.add(who);
 +    }
 +
 +    public void onClose(CraftHumanEntity who) {
-+        transaction.remove(who);
++        this.transaction.remove(who);
 +    }
 +
 +    public List<HumanEntity> getViewers() {
-+        return transaction;
++        return this.transaction;
 +    }
 +
 +    @Override
 +    public int getMaxStackSize() {
-+        return maxStack;
++        return this.maxStack;
 +    }
 +
 +    public void setMaxStackSize(int size) {
-+        maxStack = size;
++        this.maxStack = size;
 +    }
 +    // CraftBukkit end
 +
-     protected TileEntityDispenser(TileEntityTypes<?> tileentitytypes, BlockPosition blockposition, IBlockData iblockdata) {
-         super(tileentitytypes, blockposition, iblockdata);
+     protected DispenserBlockEntity(BlockEntityType<?> type, BlockPos pos, BlockState state) {
+         super(type, pos, state);
          this.items = NonNullList.withSize(9, ItemStack.EMPTY);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/HopperBlockEntity.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/HopperBlockEntity.java.patch
new file mode 100644
index 0000000000..5dbfd86b94
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/HopperBlockEntity.java.patch
@@ -0,0 +1,214 @@
+--- a/net/minecraft/world/level/block/entity/HopperBlockEntity.java
++++ b/net/minecraft/world/level/block/entity/HopperBlockEntity.java
+@@ -11,6 +11,7 @@
+ import net.minecraft.nbt.CompoundTag;
+ import net.minecraft.network.chat.Component;
+ import net.minecraft.tags.BlockTags;
++import net.minecraft.world.CompoundContainer;
+ import net.minecraft.world.Container;
+ import net.minecraft.world.ContainerHelper;
+ import net.minecraft.world.WorldlyContainer;
+@@ -18,7 +19,6 @@
+ import net.minecraft.world.entity.Entity;
+ import net.minecraft.world.entity.EntitySelector;
+ import net.minecraft.world.entity.item.ItemEntity;
+-import net.minecraft.world.entity.player.Inventory;
+ import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.inventory.AbstractContainerMenu;
+ import net.minecraft.world.inventory.HopperMenu;
+@@ -29,6 +29,18 @@
+ import net.minecraft.world.level.block.HopperBlock;
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.phys.AABB;
++import org.bukkit.Bukkit;
++import org.bukkit.craftbukkit.block.CraftBlock;
++import org.bukkit.craftbukkit.entity.CraftHumanEntity;
++import org.bukkit.craftbukkit.inventory.CraftInventory;
++import org.bukkit.craftbukkit.inventory.CraftItemStack;
++import org.bukkit.entity.HumanEntity;
++import org.bukkit.event.entity.EntityRemoveEvent;
++import org.bukkit.event.inventory.HopperInventorySearchEvent;
++import org.bukkit.event.inventory.InventoryMoveItemEvent;
++import org.bukkit.event.inventory.InventoryPickupItemEvent;
++import org.bukkit.inventory.Inventory;
++// CraftBukkit end
+ 
+ public class HopperBlockEntity extends RandomizableContainerBlockEntity implements Hopper {
+ 
+@@ -40,6 +52,36 @@
+     private long tickedGameTime;
+     private Direction facing;
+ 
++    // CraftBukkit start - add fields and methods
++    public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
++    private int maxStack = MAX_STACK;
++
++    public List<ItemStack> getContents() {
++        return this.items;
++    }
++
++    public void onOpen(CraftHumanEntity who) {
++        this.transaction.add(who);
++    }
++
++    public void onClose(CraftHumanEntity who) {
++        this.transaction.remove(who);
++    }
++
++    public List<HumanEntity> getViewers() {
++        return this.transaction;
++    }
++
++    @Override
++    public int getMaxStackSize() {
++        return this.maxStack;
++    }
++
++    public void setMaxStackSize(int size) {
++        this.maxStack = size;
++    }
++    // CraftBukkit end
++
+     public HopperBlockEntity(BlockPos pos, BlockState state) {
+         super(BlockEntityType.HOPPER, pos, state);
+         this.items = NonNullList.withSize(5, ItemStack.EMPTY);
+@@ -167,7 +209,29 @@
+ 
+                     if (!itemstack.isEmpty()) {
+                         int j = itemstack.getCount();
+-                        ItemStack itemstack1 = HopperBlockEntity.addItem(blockEntity, iinventory, blockEntity.removeItem(i, 1), enumdirection);
++                        // CraftBukkit start - Call event when pushing items into other inventories
++                        ItemStack original = itemstack.copy();
++                        CraftItemStack oitemstack = CraftItemStack.asCraftMirror(blockEntity.removeItem(i, 1));
++
++                        Inventory destinationInventory;
++                        // Have to special case large chests as they work oddly
++                        if (iinventory instanceof CompoundContainer) {
++                            destinationInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest((CompoundContainer) iinventory);
++                        } else if (iinventory.getOwner() != null) {
++                            destinationInventory = iinventory.getOwner().getInventory();
++                        } else {
++                            destinationInventory = new CraftInventory(iinventory);
++                        }
++
++                        InventoryMoveItemEvent event = new InventoryMoveItemEvent(blockEntity.getOwner().getInventory(), oitemstack, destinationInventory, true);
++                        world.getCraftServer().getPluginManager().callEvent(event);
++                        if (event.isCancelled()) {
++                            blockEntity.setItem(i, original);
++                            blockEntity.setCooldown(8); // Delay hopper checks
++                            return false;
++                        }
++                        ItemStack itemstack1 = HopperBlockEntity.addItem(blockEntity, iinventory, CraftItemStack.asNMSCopy(event.getItem()), enumdirection);
++                        // CraftBukkit end
+ 
+                         if (itemstack1.isEmpty()) {
+                             iinventory.setChanged();
+@@ -279,8 +343,35 @@
+ 
+         if (!itemstack.isEmpty() && HopperBlockEntity.canTakeItemFromContainer(hopper, inventory, itemstack, slot, side)) {
+             int j = itemstack.getCount();
+-            ItemStack itemstack1 = HopperBlockEntity.addItem(inventory, hopper, inventory.removeItem(slot, 1), (Direction) null);
++            // CraftBukkit start - Call event on collection of items from inventories into the hopper
++            ItemStack original = itemstack.copy();
++            CraftItemStack oitemstack = CraftItemStack.asCraftMirror(inventory.removeItem(slot, 1));
+ 
++            Inventory sourceInventory;
++            // Have to special case large chests as they work oddly
++            if (inventory instanceof CompoundContainer) {
++                sourceInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest((CompoundContainer) inventory);
++            } else if (inventory.getOwner() != null) {
++                sourceInventory = inventory.getOwner().getInventory();
++            } else {
++                sourceInventory = new CraftInventory(inventory);
++            }
++
++            InventoryMoveItemEvent event = new InventoryMoveItemEvent(sourceInventory, oitemstack, hopper.getOwner().getInventory(), false);
++
++            Bukkit.getServer().getPluginManager().callEvent(event);
++            if (event.isCancelled()) {
++                inventory.setItem(slot, original);
++
++                if (hopper instanceof HopperBlockEntity) {
++                    ((HopperBlockEntity) hopper).setCooldown(8); // Delay hopper checks
++                }
++
++                return false;
++            }
++            ItemStack itemstack1 = HopperBlockEntity.addItem(inventory, hopper, CraftItemStack.asNMSCopy(event.getItem()), null);
++            // CraftBukkit end
++
+             if (itemstack1.isEmpty()) {
+                 inventory.setChanged();
+                 return true;
+@@ -297,13 +388,20 @@
+ 
+     public static boolean addItem(Container inventory, ItemEntity itemEntity) {
+         boolean flag = false;
++        // CraftBukkit start
++        InventoryPickupItemEvent event = new InventoryPickupItemEvent(inventory.getOwner().getInventory(), (org.bukkit.entity.Item) itemEntity.getBukkitEntity());
++        itemEntity.level().getCraftServer().getPluginManager().callEvent(event);
++        if (event.isCancelled()) {
++            return false;
++        }
++        // CraftBukkit end
+         ItemStack itemstack = itemEntity.getItem().copy();
+         ItemStack itemstack1 = HopperBlockEntity.addItem((Container) null, inventory, itemstack, (Direction) null);
+ 
+         if (itemstack1.isEmpty()) {
+             flag = true;
+             itemEntity.setItem(ItemStack.EMPTY);
+-            itemEntity.discard();
++            itemEntity.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
+         } else {
+             itemEntity.setItem(itemstack1);
+         }
+@@ -421,14 +519,38 @@
+         return stack;
+     }
+ 
++    // CraftBukkit start
+     @Nullable
++    private static Container runHopperInventorySearchEvent(Container inventory, CraftBlock hopper, CraftBlock searchLocation, HopperInventorySearchEvent.ContainerType containerType) {
++        HopperInventorySearchEvent event = new HopperInventorySearchEvent((inventory != null) ? new CraftInventory(inventory) : null, containerType, hopper, searchLocation);
++        Bukkit.getServer().getPluginManager().callEvent(event);
++        CraftInventory craftInventory = (CraftInventory) event.getInventory();
++        return (craftInventory != null) ? craftInventory.getInventory() : null;
++    }
++    // CraftBukkit end
++
++    @Nullable
+     private static Container getAttachedContainer(Level world, BlockPos pos, HopperBlockEntity blockEntity) {
+-        return HopperBlockEntity.getContainerAt(world, pos.relative(blockEntity.facing));
++        // CraftBukkit start
++        BlockPos searchPosition = pos.relative(blockEntity.facing);
++        Container inventory = HopperBlockEntity.getContainerAt(world, searchPosition);
++
++        CraftBlock hopper = CraftBlock.at(world, pos);
++        CraftBlock searchBlock = CraftBlock.at(world, searchPosition);
++        return HopperBlockEntity.runHopperInventorySearchEvent(inventory, hopper, searchBlock, HopperInventorySearchEvent.ContainerType.DESTINATION);
++        // CraftBukkit end
+     }
+ 
+     @Nullable
+     private static Container getSourceContainer(Level world, Hopper hopper, BlockPos pos, BlockState state) {
+-        return HopperBlockEntity.getContainerAt(world, pos, state, hopper.getLevelX(), hopper.getLevelY() + 1.0D, hopper.getLevelZ());
++        // CraftBukkit start
++        Container inventory = HopperBlockEntity.getContainerAt(world, pos, state, hopper.getLevelX(), hopper.getLevelY() + 1.0D, hopper.getLevelZ());
++
++        BlockPos blockPosition = BlockPos.containing(hopper.getLevelX(), hopper.getLevelY(), hopper.getLevelZ());
++        CraftBlock hopper1 = CraftBlock.at(world, blockPosition);
++        CraftBlock container = CraftBlock.at(world, blockPosition.above());
++        return HopperBlockEntity.runHopperInventorySearchEvent(inventory, hopper1, container, HopperInventorySearchEvent.ContainerType.SOURCE);
++        // CraftBukkit end
+     }
+ 
+     public static List<ItemEntity> getItemsAtAndAbove(Level world, Hopper hopper) {
+@@ -543,7 +665,7 @@
+     }
+ 
+     @Override
+-    protected AbstractContainerMenu createMenu(int syncId, Inventory playerInventory) {
++    protected AbstractContainerMenu createMenu(int syncId, net.minecraft.world.entity.player.Inventory playerInventory) {
+         return new HopperMenu(syncId, playerInventory, this);
+     }
+ }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityJukeBox.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java.patch
similarity index 63%
rename from paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityJukeBox.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java.patch
index d86298736c..8dc3e0b7d3 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityJukeBox.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java.patch
@@ -1,7 +1,7 @@
---- a/net/minecraft/world/level/block/entity/TileEntityJukeBox.java
-+++ b/net/minecraft/world/level/block/entity/TileEntityJukeBox.java
-@@ -19,12 +19,56 @@
- import net.minecraft.world.phys.Vec3D;
+--- a/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java
++++ b/net/minecraft/world/level/block/entity/JukeboxBlockEntity.java
+@@ -19,13 +19,57 @@
+ import net.minecraft.world.phys.Vec3;
  import net.minecraft.world.ticks.ContainerSingleItem;
  
 +// CraftBukkit start
@@ -12,7 +12,7 @@
 +import org.bukkit.entity.HumanEntity;
 +// CraftBukkit end
 +
- public class TileEntityJukeBox extends TileEntity implements ContainerSingleItem.a {
+ public class JukeboxBlockEntity extends BlockEntity implements ContainerSingleItem.BlockContainerSingleItem {
  
      public static final String SONG_ITEM_TAG_ID = "RecordItem";
      public static final String TICKS_SINCE_SONG_STARTED_TAG_ID = "ticks_since_song_started";
@@ -22,47 +22,48 @@
 +    public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
 +    private int maxStack = MAX_STACK;
 +    public boolean opened;
-+
+ 
 +    @Override
 +    public List<ItemStack> getContents() {
-+        return Collections.singletonList(item);
++        return Collections.singletonList(this.item);
 +    }
 +
 +    @Override
 +    public void onOpen(CraftHumanEntity who) {
-+        transaction.add(who);
++        this.transaction.add(who);
 +    }
 +
 +    @Override
 +    public void onClose(CraftHumanEntity who) {
-+        transaction.remove(who);
++        this.transaction.remove(who);
 +    }
 +
 +    @Override
 +    public List<HumanEntity> getViewers() {
-+        return transaction;
++        return this.transaction;
 +    }
 +
 +    @Override
 +    public void setMaxStackSize(int size) {
-+        maxStack = size;
++        this.maxStack = size;
 +    }
 +
 +    @Override
 +    public Location getLocation() {
-+        if (level == null) return null;
-+        return new org.bukkit.Location(level.getWorld(), worldPosition.getX(), worldPosition.getY(), worldPosition.getZ());
++        if (this.level == null) return null;
++        return new org.bukkit.Location(this.level.getWorld(), this.worldPosition.getX(), this.worldPosition.getY(), this.worldPosition.getZ());
 +    }
 +    // CraftBukkit end
- 
-     public TileEntityJukeBox(BlockPosition blockposition, IBlockData iblockdata) {
-         super(TileEntityTypes.JUKEBOX, blockposition, iblockdata);
++
+     public JukeboxBlockEntity(BlockPos pos, BlockState state) {
+         super(BlockEntityType.JUKEBOX, pos, state);
+         this.item = ItemStack.EMPTY;
 @@ -137,7 +181,7 @@
  
      @Override
      public int getMaxStackSize() {
 -        return 1;
-+        return maxStack; // CraftBukkit
++        return this.maxStack; // CraftBukkit
      }
  
      @Override
@@ -70,17 +71,19 @@
      }
  
      @VisibleForTesting
--    public void setSongItemWithoutPlaying(ItemStack itemstack) {
-+    public void setSongItemWithoutPlaying(ItemStack itemstack, long ticksSinceSongStarted) { // CraftBukkit - add argument
-         this.item = itemstack;
-+        this.jukeboxSongPlayer.song = null; // CraftBukkit - reset
-         JukeboxSong.fromStack(this.level.registryAccess(), itemstack).ifPresent((holder) -> {
+-    public void setSongItemWithoutPlaying(ItemStack stack) {
+-        this.item = stack;
+-        JukeboxSong.fromStack(this.level.registryAccess(), stack).ifPresent((holder) -> {
 -            this.jukeboxSongPlayer.setSongWithoutPlaying(holder, 0L);
++    public void setSongItemWithoutPlaying(ItemStack itemstack, long ticksSinceSongStarted) { // CraftBukkit - add argument
++        this.item = itemstack;
++        this.jukeboxSongPlayer.song = null; // CraftBukkit - reset
++        JukeboxSong.fromStack(this.level.registryAccess(), itemstack).ifPresent((holder) -> {
 +            this.jukeboxSongPlayer.setSongWithoutPlaying(holder, ticksSinceSongStarted); // CraftBukkit - add argument
          });
 -        this.level.updateNeighborsAt(this.getBlockPos(), this.getBlockState().getBlock());
 +        // CraftBukkit start - add null check for level
-+        if (level != null) {
++        if (this.level != null) {
 +            this.level.updateNeighborsAt(this.getBlockPos(), this.getBlockState().getBlock());
 +        }
 +        // CraftBukkit end
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/LecternBlockEntity.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/LecternBlockEntity.java.patch
new file mode 100644
index 0000000000..afaf4c6781
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/LecternBlockEntity.java.patch
@@ -0,0 +1,164 @@
+--- a/net/minecraft/world/level/block/entity/LecternBlockEntity.java
++++ b/net/minecraft/world/level/block/entity/LecternBlockEntity.java
+@@ -28,6 +28,17 @@
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.phys.Vec2;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import java.util.ArrayList;
++import java.util.Arrays;
++import java.util.List;
++import org.bukkit.Location;
++import org.bukkit.block.Lectern;
++import org.bukkit.craftbukkit.entity.CraftHumanEntity;
++import org.bukkit.craftbukkit.util.CraftLocation;
++import org.bukkit.entity.HumanEntity;
++import org.bukkit.inventory.InventoryHolder;
++// CraftBukkit end
+ 
+ public class LecternBlockEntity extends BlockEntity implements Clearable, MenuProvider {
+ 
+@@ -35,8 +46,55 @@
+     public static final int NUM_DATA = 1;
+     public static final int SLOT_BOOK = 0;
+     public static final int NUM_SLOTS = 1;
+-    public final Container bookAccess = new Container() {
++    // CraftBukkit start - add fields and methods
++    public final Container bookAccess = new LecternInventory();
++    public class LecternInventory implements Container {
++
++        public List<HumanEntity> transaction = new ArrayList<>();
++        private int maxStack = 1;
++
+         @Override
++        public List<ItemStack> getContents() {
++            return Arrays.asList(LecternBlockEntity.this.book);
++        }
++
++        @Override
++        public void onOpen(CraftHumanEntity who) {
++            this.transaction.add(who);
++        }
++
++        @Override
++        public void onClose(CraftHumanEntity who) {
++            this.transaction.remove(who);
++        }
++
++        @Override
++        public List<HumanEntity> getViewers() {
++            return this.transaction;
++        }
++
++        @Override
++        public void setMaxStackSize(int i) {
++            this.maxStack = i;
++        }
++
++        @Override
++        public Location getLocation() {
++            if (LecternBlockEntity.this.level == null) return null;
++            return CraftLocation.toBukkit(LecternBlockEntity.this.worldPosition, LecternBlockEntity.this.level.getWorld());
++        }
++
++        @Override
++        public InventoryHolder getOwner() {
++            return (Lectern) LecternBlockEntity.this.getOwner();
++        }
++
++        public LecternBlockEntity getLectern() {
++            return LecternBlockEntity.this;
++        }
++        // CraftBukkit end
++
++        @Override
+         public int getContainerSize() {
+             return 1;
+         }
+@@ -80,11 +138,20 @@
+         }
+ 
+         @Override
+-        public void setItem(int slot, ItemStack stack) {}
++        // CraftBukkit start
++        public void setItem(int slot, ItemStack stack) {
++            if (slot == 0) {
++                LecternBlockEntity.this.setBook(stack);
++                if (LecternBlockEntity.this.getLevel() != null) {
++                    LecternBlock.resetBookState(null, LecternBlockEntity.this.getLevel(), LecternBlockEntity.this.getBlockPos(), LecternBlockEntity.this.getBlockState(), LecternBlockEntity.this.hasBook());
++                }
++            }
++        }
++        // CraftBukkit end
+ 
+         @Override
+         public int getMaxStackSize() {
+-            return 1;
++            return this.maxStack; // CraftBukkit
+         }
+ 
+         @Override
+@@ -164,7 +231,7 @@
+         if (j != this.page) {
+             this.page = j;
+             this.setChanged();
+-            LecternBlock.signalPageChange(this.getLevel(), this.getBlockPos(), this.getBlockState());
++            if (this.level != null) LecternBlock.signalPageChange(this.getLevel(), this.getBlockPos(), this.getBlockState()); // CraftBukkit
+         }
+ 
+     }
+@@ -189,6 +256,35 @@
+         return book;
+     }
+ 
++    // CraftBukkit start
++    private final CommandSource commandSource = new CommandSource() {
++
++        @Override
++        public void sendSystemMessage(Component message) {
++        }
++
++        @Override
++        public org.bukkit.command.CommandSender getBukkitSender(CommandSourceStack wrapper) {
++            return wrapper.getEntity() != null ? wrapper.getEntity().getBukkitEntity() : new org.bukkit.craftbukkit.command.CraftBlockCommandSender(wrapper, LecternBlockEntity.this);
++        }
++
++        @Override
++        public boolean acceptsSuccess() {
++            return false;
++        }
++
++        @Override
++        public boolean acceptsFailure() {
++            return false;
++        }
++
++        @Override
++        public boolean shouldInformAdmins() {
++            return false;
++        }
++    };
++    // CraftBukkit end
++
+     private CommandSourceStack createCommandSourceStack(@Nullable Player player, ServerLevel world) {
+         String s;
+         Object object;
+@@ -203,7 +299,8 @@
+ 
+         Vec3 vec3d = Vec3.atCenterOf(this.worldPosition);
+ 
+-        return new CommandSourceStack(CommandSource.NULL, vec3d, Vec2.ZERO, world, 2, s, (Component) object, world.getServer(), player);
++        // CraftBukkit - commandSource
++        return new CommandSourceStack(this.commandSource, vec3d, Vec2.ZERO, world, 2, s, (Component) object, world.getServer(), player);
+     }
+ 
+     @Override
+@@ -236,7 +333,7 @@
+ 
+     @Override
+     public AbstractContainerMenu createMenu(int syncId, Inventory playerInventory, Player player) {
+-        return new LecternMenu(syncId, this.bookAccess, this.dataAccess);
++        return new LecternMenu(syncId, this.bookAccess, this.dataAccess, playerInventory); // CraftBukkit
+     }
+ 
+     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java.patch
new file mode 100644
index 0000000000..5d803ee0d9
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java.patch
@@ -0,0 +1,30 @@
+--- a/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
++++ b/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
+@@ -35,10 +35,13 @@
+     public SculkCatalystBlockEntity(BlockPos pos, BlockState state) {
+         super(BlockEntityType.SCULK_CATALYST, pos, state);
+         this.catalystListener = new SculkCatalystBlockEntity.CatalystListener(state, new BlockPositionSource(pos));
++        this.catalystListener.level = this.level; // CraftBukkit
+     }
+ 
+     public static void serverTick(Level world, BlockPos pos, BlockState state, SculkCatalystBlockEntity blockEntity) {
++        org.bukkit.craftbukkit.event.CraftEventFactory.sourceBlockOverride = blockEntity.getBlockPos(); // CraftBukkit - SPIGOT-7068: Add source block override, not the most elegant way but better than passing down a BlockPosition up to five methods deep.
+         blockEntity.catalystListener.getSculkSpreader().updateCursors(world, pos, world.getRandom(), true);
++        org.bukkit.craftbukkit.event.CraftEventFactory.sourceBlockOverride = null; // CraftBukkit
+     }
+ 
+     @Override
+@@ -64,11 +67,13 @@
+         final SculkSpreader sculkSpreader;
+         private final BlockState blockState;
+         private final PositionSource positionSource;
++        private Level level; // CraftBukkit
+ 
+         public CatalystListener(BlockState state, PositionSource positionSource) {
+             this.blockState = state;
+             this.positionSource = positionSource;
+             this.sculkSpreader = SculkSpreader.createLevelSpreader();
++            this.sculkSpreader.level = this.level; // CraftBukkit
+         }
+ 
+         @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.patch
deleted file mode 100644
index 5186a7c531..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
-+++ b/net/minecraft/world/level/block/entity/SculkCatalystBlockEntity.java
-@@ -35,10 +35,13 @@
-     public SculkCatalystBlockEntity(BlockPosition blockposition, IBlockData iblockdata) {
-         super(TileEntityTypes.SCULK_CATALYST, blockposition, iblockdata);
-         this.catalystListener = new SculkCatalystBlockEntity.CatalystListener(iblockdata, new BlockPositionSource(blockposition));
-+        catalystListener.level = level; // CraftBukkit
-     }
- 
-     public static void serverTick(World world, BlockPosition blockposition, IBlockData iblockdata, SculkCatalystBlockEntity sculkcatalystblockentity) {
-+        org.bukkit.craftbukkit.event.CraftEventFactory.sourceBlockOverride = sculkcatalystblockentity.getBlockPos(); // CraftBukkit - SPIGOT-7068: Add source block override, not the most elegant way but better than passing down a BlockPosition up to five methods deep.
-         sculkcatalystblockentity.catalystListener.getSculkSpreader().updateCursors(world, blockposition, world.getRandom(), true);
-+        org.bukkit.craftbukkit.event.CraftEventFactory.sourceBlockOverride = null; // CraftBukkit
-     }
- 
-     @Override
-@@ -64,11 +67,13 @@
-         final SculkSpreader sculkSpreader;
-         private final IBlockData blockState;
-         private final PositionSource positionSource;
-+        private World level; // CraftBukkit
- 
-         public CatalystListener(IBlockData iblockdata, PositionSource positionsource) {
-             this.blockState = iblockdata;
-             this.positionSource = positionsource;
-             this.sculkSpreader = SculkSpreader.createLevelSpreader();
-+            this.sculkSpreader.level = level; // CraftBukkit
-         }
- 
-         @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java.patch
new file mode 100644
index 0000000000..384ab32533
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java.patch
@@ -0,0 +1,67 @@
+--- a/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java
++++ b/net/minecraft/world/level/block/entity/ShulkerBoxBlockEntity.java
+@@ -33,6 +33,10 @@
+ import net.minecraft.world.level.material.PushReaction;
+ import net.minecraft.world.phys.AABB;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import org.bukkit.craftbukkit.entity.CraftHumanEntity;
++import org.bukkit.entity.HumanEntity;
++// CraftBukkit end
+ 
+ public class ShulkerBoxBlockEntity extends RandomizableContainerBlockEntity implements WorldlyContainer {
+ 
+@@ -52,6 +56,37 @@
+     @Nullable
+     private final DyeColor color;
+ 
++    // CraftBukkit start - add fields and methods
++    public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
++    private int maxStack = MAX_STACK;
++    public boolean opened;
++
++    public List<ItemStack> getContents() {
++        return this.itemStacks;
++    }
++
++    public void onOpen(CraftHumanEntity who) {
++        this.transaction.add(who);
++    }
++
++    public void onClose(CraftHumanEntity who) {
++        this.transaction.remove(who);
++    }
++
++    public List<HumanEntity> getViewers() {
++        return this.transaction;
++    }
++
++    @Override
++    public int getMaxStackSize() {
++        return this.maxStack;
++    }
++
++    public void setMaxStackSize(int size) {
++        this.maxStack = size;
++    }
++    // CraftBukkit end
++
+     public ShulkerBoxBlockEntity(@Nullable DyeColor color, BlockPos pos, BlockState state) {
+         super(BlockEntityType.SHULKER_BOX, pos, state);
+         this.itemStacks = NonNullList.withSize(27, ItemStack.EMPTY);
+@@ -184,6 +219,7 @@
+             }
+ 
+             ++this.openCount;
++            if (this.opened) return; // CraftBukkit - only animate if the ShulkerBox hasn't been forced open already by an API call.
+             this.level.blockEvent(this.worldPosition, this.getBlockState().getBlock(), 1, this.openCount);
+             if (this.openCount == 1) {
+                 this.level.gameEvent((Entity) player, (Holder) GameEvent.CONTAINER_OPEN, this.worldPosition);
+@@ -197,6 +233,7 @@
+     public void stopOpen(Player player) {
+         if (!this.remove && !player.isSpectator()) {
+             --this.openCount;
++            if (this.opened) return; // CraftBukkit - only animate if the ShulkerBox hasn't been forced open already by an API call.
+             this.level.blockEvent(this.worldPosition, this.getBlockState().getBlock(), 1, this.openCount);
+             if (this.openCount <= 0) {
+                 this.level.gameEvent((Entity) player, (Holder) GameEvent.CONTAINER_CLOSE, this.worldPosition);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/SignBlockEntity.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/SignBlockEntity.java.patch
new file mode 100644
index 0000000000..25868e4bc2
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/SignBlockEntity.java.patch
@@ -0,0 +1,230 @@
+--- a/net/minecraft/world/level/block/entity/SignBlockEntity.java
++++ b/net/minecraft/world/level/block/entity/SignBlockEntity.java
+@@ -22,12 +22,12 @@
+ import net.minecraft.network.chat.Style;
+ import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket;
+ import net.minecraft.server.level.ServerLevel;
++import net.minecraft.server.level.ServerPlayer;
+ import net.minecraft.server.network.FilteredText;
+ import net.minecraft.sounds.SoundEvent;
+ import net.minecraft.sounds.SoundEvents;
+ import net.minecraft.util.Mth;
+ import net.minecraft.world.entity.Entity;
+-import net.minecraft.world.entity.player.Player;
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.block.Block;
+ import net.minecraft.world.level.block.SignBlock;
+@@ -35,6 +35,12 @@
+ import net.minecraft.world.phys.Vec2;
+ import net.minecraft.world.phys.Vec3;
+ import org.slf4j.Logger;
++import org.bukkit.block.sign.Side;
++import org.bukkit.craftbukkit.block.CraftBlock;
++import org.bukkit.craftbukkit.util.CraftChatMessage;
++import org.bukkit.entity.Player;
++import org.bukkit.event.block.SignChangeEvent;
++// CraftBukkit end
+ 
+ public class SignBlockEntity extends BlockEntity {
+ 
+@@ -61,7 +67,7 @@
+         return new SignText();
+     }
+ 
+-    public boolean isFacingFrontText(Player player) {
++    public boolean isFacingFrontText(net.minecraft.world.entity.player.Player player) {
+         Block block = this.getBlockState().getBlock();
+ 
+         if (block instanceof SignBlock blocksign) {
+@@ -101,7 +107,7 @@
+     protected void saveAdditional(CompoundTag nbt, HolderLookup.Provider registries) {
+         super.saveAdditional(nbt, registries);
+         DynamicOps<Tag> dynamicops = registries.createSerializationContext(NbtOps.INSTANCE);
+-        DataResult dataresult = SignText.DIRECT_CODEC.encodeStart(dynamicops, this.frontText);
++        DataResult<Tag> dataresult = SignText.DIRECT_CODEC.encodeStart(dynamicops, this.frontText); // CraftBukkit - decompile error
+         Logger logger = SignBlockEntity.LOGGER;
+ 
+         Objects.requireNonNull(logger);
+@@ -121,7 +127,7 @@
+     protected void loadAdditional(CompoundTag nbt, HolderLookup.Provider registries) {
+         super.loadAdditional(nbt, registries);
+         DynamicOps<Tag> dynamicops = registries.createSerializationContext(NbtOps.INSTANCE);
+-        DataResult dataresult;
++        DataResult<SignText> dataresult; // CraftBukkit - decompile error
+         Logger logger;
+ 
+         if (nbt.contains("front_text")) {
+@@ -161,7 +167,7 @@
+ 
+         if (world instanceof ServerLevel worldserver) {
+             try {
+-                return ComponentUtils.updateForEntity(SignBlockEntity.createCommandSourceStack((Player) null, worldserver, this.worldPosition), text, (Entity) null, 0);
++                return ComponentUtils.updateForEntity(this.createCommandSourceStack((net.minecraft.world.entity.player.Player) null, worldserver, this.worldPosition), text, (Entity) null, 0);
+             } catch (CommandSyntaxException commandsyntaxexception) {
+                 ;
+             }
+@@ -170,15 +176,16 @@
+         return text;
+     }
+ 
+-    public void updateSignText(Player player, boolean front, List<FilteredText> messages) {
++    public void updateSignText(net.minecraft.world.entity.player.Player player, boolean front, List<FilteredText> messages) {
+         if (!this.isWaxed() && player.getUUID().equals(this.getPlayerWhoMayEdit()) && this.level != null) {
+             this.updateText((signtext) -> {
+-                return this.setMessages(player, messages, signtext);
++                return this.setMessages(player, messages, signtext, front); // CraftBukkit
+             }, front);
+             this.setAllowedPlayerEditor((UUID) null);
+             this.level.sendBlockUpdated(this.getBlockPos(), this.getBlockState(), this.getBlockState(), 3);
+         } else {
+             SignBlockEntity.LOGGER.warn("Player {} just tried to change non-editable sign", player.getName().getString());
++            ((ServerPlayer) player).connection.send(this.getUpdatePacket()); // CraftBukkit
+         }
+     }
+ 
+@@ -188,19 +195,43 @@
+         return this.setText((SignText) textChanger.apply(signtext), front);
+     }
+ 
+-    private SignText setMessages(Player player, List<FilteredText> messages, SignText text) {
+-        for (int i = 0; i < messages.size(); ++i) {
+-            FilteredText filteredtext = (FilteredText) messages.get(i);
+-            Style chatmodifier = text.getMessage(i, player.isTextFilteringEnabled()).getStyle();
++    private SignText setMessages(net.minecraft.world.entity.player.Player entityhuman, List<FilteredText> list, SignText signtext, boolean front) { // CraftBukkit
++        SignText originalText = signtext; // CraftBukkit
++        for (int i = 0; i < list.size(); ++i) {
++            FilteredText filteredtext = (FilteredText) list.get(i);
++            Style chatmodifier = signtext.getMessage(i, entityhuman.isTextFilteringEnabled()).getStyle();
+ 
+-            if (player.isTextFilteringEnabled()) {
+-                text = text.setMessage(i, Component.literal(filteredtext.filteredOrEmpty()).setStyle(chatmodifier));
++            if (entityhuman.isTextFilteringEnabled()) {
++                signtext = signtext.setMessage(i, Component.literal(filteredtext.filteredOrEmpty()).setStyle(chatmodifier));
+             } else {
+-                text = text.setMessage(i, Component.literal(filteredtext.raw()).setStyle(chatmodifier), Component.literal(filteredtext.filteredOrEmpty()).setStyle(chatmodifier));
++                signtext = signtext.setMessage(i, Component.literal(filteredtext.raw()).setStyle(chatmodifier), Component.literal(filteredtext.filteredOrEmpty()).setStyle(chatmodifier));
+             }
+         }
+ 
+-        return text;
++        // CraftBukkit start
++        Player player = ((ServerPlayer) entityhuman).getBukkitEntity();
++        String[] lines = new String[4];
++
++        for (int i = 0; i < list.size(); ++i) {
++            lines[i] = CraftChatMessage.fromComponent(signtext.getMessage(i, entityhuman.isTextFilteringEnabled()));
++        }
++
++        SignChangeEvent event = new SignChangeEvent(CraftBlock.at(this.level, this.worldPosition), player, lines.clone(), (front) ? Side.FRONT : Side.BACK);
++        entityhuman.level().getCraftServer().getPluginManager().callEvent(event);
++
++        if (event.isCancelled()) {
++            return originalText;
++        }
++
++        Component[] components = org.bukkit.craftbukkit.block.CraftSign.sanitizeLines(event.getLines());
++        for (int i = 0; i < components.length; i++) {
++            if (!Objects.equals(lines[i], event.getLine(i))) {
++                signtext = signtext.setMessage(i, components[i]);
++            }
++        }
++        // CraftBukkit end
++
++        return signtext;
+     }
+ 
+     public boolean setText(SignText text, boolean front) {
+@@ -227,11 +258,11 @@
+         }
+     }
+ 
+-    public boolean canExecuteClickCommands(boolean front, Player player) {
++    public boolean canExecuteClickCommands(boolean front, net.minecraft.world.entity.player.Player player) {
+         return this.isWaxed() && this.getText(front).hasAnyClickCommands(player);
+     }
+ 
+-    public boolean executeClickCommandsIfPresent(Player player, Level world, BlockPos pos, boolean front) {
++    public boolean executeClickCommandsIfPresent(net.minecraft.world.entity.player.Player player, Level world, BlockPos pos, boolean front) {
+         boolean flag1 = false;
+         Component[] aichatbasecomponent = this.getText(front).getMessages(player.isTextFilteringEnabled());
+         int i = aichatbasecomponent.length;
+@@ -242,7 +273,7 @@
+             ClickEvent chatclickable = chatmodifier.getClickEvent();
+ 
+             if (chatclickable != null && chatclickable.getAction() == ClickEvent.Action.RUN_COMMAND) {
+-                player.getServer().getCommands().performPrefixedCommand(SignBlockEntity.createCommandSourceStack(player, world, pos), chatclickable.getValue());
++                player.getServer().getCommands().performPrefixedCommand(this.createCommandSourceStack(player, world, pos), chatclickable.getValue());
+                 flag1 = true;
+             }
+         }
+@@ -250,11 +281,40 @@
+         return flag1;
+     }
+ 
+-    private static CommandSourceStack createCommandSourceStack(@Nullable Player player, Level world, BlockPos pos) {
++    // CraftBukkit start
++    private final CommandSource commandSource = new CommandSource() {
++
++        @Override
++        public void sendSystemMessage(Component message) {}
++
++        @Override
++        public org.bukkit.command.CommandSender getBukkitSender(CommandSourceStack wrapper) {
++            return wrapper.getEntity() != null ? wrapper.getEntity().getBukkitEntity() : new org.bukkit.craftbukkit.command.CraftBlockCommandSender(wrapper, SignBlockEntity.this);
++        }
++
++        @Override
++        public boolean acceptsSuccess() {
++            return false;
++        }
++
++        @Override
++        public boolean acceptsFailure() {
++            return false;
++        }
++
++        @Override
++        public boolean shouldInformAdmins() {
++            return false;
++        }
++    };
++
++    private CommandSourceStack createCommandSourceStack(@Nullable net.minecraft.world.entity.player.Player player, Level world, BlockPos pos) {
++        // CraftBukkit end
+         String s = player == null ? "Sign" : player.getName().getString();
+         Object object = player == null ? Component.literal("Sign") : player.getDisplayName();
+ 
+-        return new CommandSourceStack(CommandSource.NULL, Vec3.atCenterOf(pos), Vec2.ZERO, (ServerLevel) world, 2, s, (Component) object, world.getServer(), player);
++        // CraftBukkit - commandSource
++        return new CommandSourceStack(this.commandSource, Vec3.atCenterOf(pos), Vec2.ZERO, (ServerLevel) world, 2, s, (Component) object, world.getServer(), player);
+     }
+ 
+     @Override
+@@ -273,12 +333,17 @@
+ 
+     @Nullable
+     public UUID getPlayerWhoMayEdit() {
++        // CraftBukkit start - unnecessary sign ticking removed, so do this lazily
++        if (this.level != null && this.playerWhoMayEdit != null) {
++            this.clearInvalidPlayerWhoMayEdit(this, this.level, this.playerWhoMayEdit);
++        }
++        // CraftBukkit end
+         return this.playerWhoMayEdit;
+     }
+ 
+     private void markUpdated() {
+         this.setChanged();
+-        this.level.sendBlockUpdated(this.getBlockPos(), this.getBlockState(), this.getBlockState(), 3);
++        if (this.level != null) this.level.sendBlockUpdated(this.getBlockPos(), this.getBlockState(), this.getBlockState(), 3); // CraftBukkit - skip notify if world is null (SPIGOT-5122)
+     }
+ 
+     public boolean isWaxed() {
+@@ -296,7 +361,7 @@
+     }
+ 
+     public boolean playerIsTooFarAwayToEdit(UUID uuid) {
+-        Player entityhuman = this.level.getPlayerByUUID(uuid);
++        net.minecraft.world.entity.player.Player entityhuman = this.level.getPlayerByUUID(uuid);
+ 
+         return entityhuman == null || !entityhuman.canInteractWithBlock(this.getBlockPos(), 4.0D);
+     }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java.patch
new file mode 100644
index 0000000000..b5587ac5d9
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java.patch
@@ -0,0 +1,19 @@
+--- a/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
++++ b/net/minecraft/world/level/block/entity/TheEndGatewayBlockEntity.java
+@@ -21,6 +21,7 @@
+ import net.minecraft.world.level.block.Blocks;
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.level.chunk.LevelChunk;
++import net.minecraft.world.level.dimension.LevelStem;
+ import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
+ import net.minecraft.world.level.levelgen.feature.Feature;
+ import net.minecraft.world.level.levelgen.feature.configurations.EndGatewayConfiguration;
+@@ -143,7 +144,7 @@
+     public Vec3 getPortalPosition(ServerLevel world, BlockPos pos) {
+         BlockPos blockposition1;
+ 
+-        if (this.exitPortal == null && world.dimension() == Level.END) {
++        if (this.exitPortal == null && world.getTypeKey() == LevelStem.END) { // CraftBukkit - work in alternate worlds
+             blockposition1 = TheEndGatewayBlockEntity.findOrCreateValidTeleportPos(world, pos);
+             blockposition1 = blockposition1.above(10);
+             TheEndGatewayBlockEntity.LOGGER.debug("Creating portal at {}", blockposition1);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityBanner.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityBanner.patch
deleted file mode 100644
index ab67e1893e..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityBanner.patch
+++ /dev/null
@@ -1,45 +0,0 @@
---- a/net/minecraft/world/level/block/entity/TileEntityBanner.java
-+++ b/net/minecraft/world/level/block/entity/TileEntityBanner.java
-@@ -19,6 +19,10 @@
- import net.minecraft.world.level.block.state.IBlockData;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import java.util.List;
-+// CraftBukkit end
-+
- public class TileEntityBanner extends TileEntity implements INamableTileEntity {
- 
-     private static final Logger LOGGER = LogUtils.getLogger();
-@@ -74,7 +78,7 @@
-             BannerPatternLayers.CODEC.parse(holderlookup_a.createSerializationContext(DynamicOpsNBT.INSTANCE), nbttagcompound.get("patterns")).resultOrPartial((s) -> {
-                 TileEntityBanner.LOGGER.error("Failed to parse banner patterns: '{}'", s);
-             }).ifPresent((bannerpatternlayers) -> {
--                this.patterns = bannerpatternlayers;
-+                this.setPatterns(bannerpatternlayers); // CraftBukkit - apply limits
-             });
-         }
- 
-@@ -108,7 +112,7 @@
-     @Override
-     protected void applyImplicitComponents(TileEntity.b tileentity_b) {
-         super.applyImplicitComponents(tileentity_b);
--        this.patterns = (BannerPatternLayers) tileentity_b.getOrDefault(DataComponents.BANNER_PATTERNS, BannerPatternLayers.EMPTY);
-+        this.setPatterns((BannerPatternLayers) tileentity_b.getOrDefault(DataComponents.BANNER_PATTERNS, BannerPatternLayers.EMPTY)); // CraftBukkit - apply limits
-         this.name = (IChatBaseComponent) tileentity_b.get(DataComponents.CUSTOM_NAME);
-     }
- 
-@@ -124,4 +128,13 @@
-         nbttagcompound.remove("patterns");
-         nbttagcompound.remove("CustomName");
-     }
-+
-+    // CraftBukkit start
-+    public void setPatterns(BannerPatternLayers bannerpatternlayers) {
-+        if (bannerpatternlayers.layers().size() > 20) {
-+            bannerpatternlayers = new BannerPatternLayers(List.copyOf(bannerpatternlayers.layers().subList(0, 20)));
-+        }
-+        this.patterns = bannerpatternlayers;
-+    }
-+    // CraftBukkit end
- }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityBeacon.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityBeacon.patch
deleted file mode 100644
index fa7669c3fd..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityBeacon.patch
+++ /dev/null
@@ -1,135 +0,0 @@
---- a/net/minecraft/world/level/block/entity/TileEntityBeacon.java
-+++ b/net/minecraft/world/level/block/entity/TileEntityBeacon.java
-@@ -46,6 +46,11 @@
- import net.minecraft.world.level.levelgen.HeightMap;
- import net.minecraft.world.phys.AxisAlignedBB;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.potion.CraftPotionUtil;
-+import org.bukkit.potion.PotionEffect;
-+// CraftBukkit end
-+
- public class TileEntityBeacon extends TileEntity implements ITileInventory, INamableTileEntity {
- 
-     private static final int MAX_LEVELS = 4;
-@@ -71,6 +76,15 @@
-     public IChatBaseComponent name;
-     public ChestLock lockKey;
-     private final IContainerProperties dataAccess;
-+    // CraftBukkit start - add fields and methods
-+    public PotionEffect getPrimaryEffect() {
-+        return (this.primaryPower != null) ? CraftPotionUtil.toBukkit(new MobEffect(this.primaryPower, getLevel(this.levels), getAmplification(levels, primaryPower, secondaryPower), true, true)) : null;
-+    }
-+
-+    public PotionEffect getSecondaryEffect() {
-+        return (hasSecondaryEffect(levels, primaryPower, secondaryPower)) ? CraftPotionUtil.toBukkit(new MobEffect(this.secondaryPower, getLevel(this.levels), getAmplification(levels, primaryPower, secondaryPower), true, true)) : null;
-+    }
-+    // CraftBukkit end
- 
-     @Nullable
-     static Holder<MobEffectList> filterEffect(@Nullable Holder<MobEffectList> holder) {
-@@ -251,38 +265,77 @@
-         super.setRemoved();
-     }
- 
--    private static void applyEffects(World world, BlockPosition blockposition, int i, @Nullable Holder<MobEffectList> holder, @Nullable Holder<MobEffectList> holder1) {
--        if (!world.isClientSide && holder != null) {
--            double d0 = (double) (i * 10 + 10);
-+    // CraftBukkit start - split into components
-+    private static byte getAmplification(int i, @Nullable Holder<MobEffectList> holder, @Nullable Holder<MobEffectList> holder1) {
-+        {
-             byte b0 = 0;
- 
-             if (i >= 4 && Objects.equals(holder, holder1)) {
-                 b0 = 1;
-             }
- 
-+            return b0;
-+        }
-+    }
-+
-+    private static int getLevel(int i) {
-+        {
-             int j = (9 + i * 2) * 20;
-+            return j;
-+        }
-+    }
-+
-+    public static List getHumansInRange(World world, BlockPosition blockposition, int i) {
-+        {
-+            double d0 = (double) (i * 10 + 10);
-+
-             AxisAlignedBB axisalignedbb = (new AxisAlignedBB(blockposition)).inflate(d0).expandTowards(0.0D, (double) world.getHeight(), 0.0D);
-             List<EntityHuman> list = world.getEntitiesOfClass(EntityHuman.class, axisalignedbb);
-+
-+            return list;
-+        }
-+    }
-+
-+    private static void applyEffect(List list, @Nullable Holder<MobEffectList> holder, int j, int b0) {
-+        {
-             Iterator iterator = list.iterator();
- 
-             EntityHuman entityhuman;
- 
-             while (iterator.hasNext()) {
-                 entityhuman = (EntityHuman) iterator.next();
--                entityhuman.addEffect(new MobEffect(holder, j, b0, true, true));
-+                entityhuman.addEffect(new MobEffect(holder, j, b0, true, true), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.BEACON);
-             }
-+        }
-+    }
- 
-+    private static boolean hasSecondaryEffect(int i, @Nullable Holder<MobEffectList> holder, @Nullable Holder<MobEffectList> holder1) {
-+        {
-             if (i >= 4 && !Objects.equals(holder, holder1) && holder1 != null) {
--                iterator = list.iterator();
--
--                while (iterator.hasNext()) {
--                    entityhuman = (EntityHuman) iterator.next();
--                    entityhuman.addEffect(new MobEffect(holder1, j, 0, true, true));
--                }
-+                return true;
-             }
- 
-+            return false;
-+        }
-+    }
-+
-+    private static void applyEffects(World world, BlockPosition blockposition, int i, @Nullable Holder<MobEffectList> holder, @Nullable Holder<MobEffectList> holder1) {
-+        if (!world.isClientSide && holder != null) {
-+            double d0 = (double) (i * 10 + 10);
-+            byte b0 = getAmplification(i, holder, holder1);
-+
-+            int j = getLevel(i);
-+            List list = getHumansInRange(world, blockposition, i);
-+
-+            applyEffect(list, holder, j, b0);
-+
-+            if (hasSecondaryEffect(i, holder, holder1)) {
-+                applyEffect(list, holder1, j, 0);
-+            }
-         }
-+
-     }
-+    // CraftBukkit end
- 
-     public static void playSound(World world, BlockPosition blockposition, SoundEffect soundeffect) {
-         world.playSound((EntityHuman) null, blockposition, soundeffect, SoundCategory.BLOCKS, 1.0F, 1.0F);
-@@ -316,7 +369,7 @@
-         if (nbttagcompound.contains(s, 8)) {
-             MinecraftKey minecraftkey = MinecraftKey.tryParse(nbttagcompound.getString(s));
- 
--            return minecraftkey == null ? null : (Holder) BuiltInRegistries.MOB_EFFECT.get(minecraftkey).map(TileEntityBeacon::filterEffect).orElse((Object) null);
-+            return minecraftkey == null ? null : (Holder) BuiltInRegistries.MOB_EFFECT.get(minecraftkey).orElse(null); // CraftBukkit - persist manually set non-default beacon effects (SPIGOT-3598)
-         } else {
-             return null;
-         }
-@@ -327,6 +380,7 @@
-         super.loadAdditional(nbttagcompound, holderlookup_a);
-         this.primaryPower = loadEffect(nbttagcompound, "primary_effect");
-         this.secondaryPower = loadEffect(nbttagcompound, "secondary_effect");
-+        this.levels = nbttagcompound.getInt("Levels"); // CraftBukkit - SPIGOT-5053, use where available
-         if (nbttagcompound.contains("CustomName", 8)) {
-             this.name = parseCustomNameSafe(nbttagcompound.getString("CustomName"), holderlookup_a);
-         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityBeehive.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityBeehive.patch
deleted file mode 100644
index 28593a6d48..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityBeehive.patch
+++ /dev/null
@@ -1,209 +0,0 @@
---- a/net/minecraft/world/level/block/entity/TileEntityBeehive.java
-+++ b/net/minecraft/world/level/block/entity/TileEntityBeehive.java
-@@ -43,6 +43,10 @@
- import net.minecraft.world.level.gameevent.GameEvent;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+// CraftBukkit end
-+
- public class TileEntityBeehive extends TileEntity {
- 
-     private static final Logger LOGGER = LogUtils.getLogger();
-@@ -56,6 +60,7 @@
-     private List<TileEntityBeehive.HiveBee> stored = Lists.newArrayList();
-     @Nullable
-     public BlockPosition savedFlowerPos;
-+    public int maxBees = 3; // CraftBukkit - allow setting max amount of bees a hive can hold
- 
-     public TileEntityBeehive(BlockPosition blockposition, IBlockData iblockdata) {
-         super(TileEntityTypes.BEEHIVE, blockposition, iblockdata);
-@@ -95,7 +100,7 @@
-     }
- 
-     public boolean isFull() {
--        return this.stored.size() == 3;
-+        return this.stored.size() == this.maxBees; // CraftBukkit
-     }
- 
-     public void emptyAllLivingFromHive(@Nullable EntityHuman entityhuman, IBlockData iblockdata, TileEntityBeehive.ReleaseStatus tileentitybeehive_releasestatus) {
-@@ -112,7 +117,7 @@
- 
-                     if (entityhuman.position().distanceToSqr(entity.position()) <= 16.0D) {
-                         if (!this.isSedated()) {
--                            entitybee.setTarget(entityhuman);
-+                            entitybee.setTarget(entityhuman, org.bukkit.event.entity.EntityTargetEvent.TargetReason.CLOSEST_PLAYER, true); // CraftBukkit
-                         } else {
-                             entitybee.setStayOutOfHiveCountdown(400);
-                         }
-@@ -124,10 +129,16 @@
-     }
- 
-     private List<Entity> releaseAllOccupants(IBlockData iblockdata, TileEntityBeehive.ReleaseStatus tileentitybeehive_releasestatus) {
-+        // CraftBukkit start - This allows us to bypass the night/rain/emergency check
-+        return releaseBees(iblockdata, tileentitybeehive_releasestatus, false);
-+    }
-+
-+    public List<Entity> releaseBees(IBlockData iblockdata, TileEntityBeehive.ReleaseStatus tileentitybeehive_releasestatus, boolean force) {
-         List<Entity> list = Lists.newArrayList();
- 
-         this.stored.removeIf((tileentitybeehive_hivebee) -> {
--            return releaseOccupant(this.level, this.worldPosition, iblockdata, tileentitybeehive_hivebee.toOccupant(), list, tileentitybeehive_releasestatus, this.savedFlowerPos);
-+            return releaseOccupant(this.level, this.worldPosition, iblockdata, tileentitybeehive_hivebee.toOccupant(), list, tileentitybeehive_releasestatus, this.savedFlowerPos, force);
-+            // CraftBukkit end
-         });
-         if (!list.isEmpty()) {
-             super.setChanged();
-@@ -151,7 +162,17 @@
-     }
- 
-     public void addOccupant(EntityBee entitybee) {
--        if (this.stored.size() < 3) {
-+        if (this.stored.size() < this.maxBees) { // CraftBukkit
-+            // CraftBukkit start
-+            if (this.level != null) {
-+                org.bukkit.event.entity.EntityEnterBlockEvent event = new org.bukkit.event.entity.EntityEnterBlockEvent(entitybee.getBukkitEntity(), org.bukkit.craftbukkit.block.CraftBlock.at(level, getBlockPos()));
-+                org.bukkit.Bukkit.getPluginManager().callEvent(event);
-+                if (event.isCancelled()) {
-+                    entitybee.setStayOutOfHiveCountdown(400);
-+                    return;
-+                }
-+            }
-+            // CraftBukkit end
-             entitybee.stopRiding();
-             entitybee.ejectPassengers();
-             entitybee.dropLeash();
-@@ -167,7 +188,7 @@
-                 this.level.gameEvent((Holder) GameEvent.BLOCK_CHANGE, blockposition, GameEvent.a.of(entitybee, this.getBlockState()));
-             }
- 
--            entitybee.discard();
-+            entitybee.discard(EntityRemoveEvent.Cause.ENTER_BLOCK); // CraftBukkit - add Bukkit remove cause
-             super.setChanged();
-         }
-     }
-@@ -177,7 +198,13 @@
-     }
- 
-     private static boolean releaseOccupant(World world, BlockPosition blockposition, IBlockData iblockdata, TileEntityBeehive.c tileentitybeehive_c, @Nullable List<Entity> list, TileEntityBeehive.ReleaseStatus tileentitybeehive_releasestatus, @Nullable BlockPosition blockposition1) {
--        if (EntityBee.isNightOrRaining(world) && tileentitybeehive_releasestatus != TileEntityBeehive.ReleaseStatus.EMERGENCY) {
-+        // CraftBukkit start - This allows us to bypass the night/rain/emergency check
-+        return releaseOccupant(world, blockposition, iblockdata, tileentitybeehive_c, list, tileentitybeehive_releasestatus, blockposition1, false);
-+    }
-+
-+    private static boolean releaseOccupant(World world, BlockPosition blockposition, IBlockData iblockdata, TileEntityBeehive.c tileentitybeehive_c, @Nullable List<Entity> list, TileEntityBeehive.ReleaseStatus tileentitybeehive_releasestatus, @Nullable BlockPosition blockposition1, boolean force) {
-+        if (!force && EntityBee.isNightOrRaining(world) && tileentitybeehive_releasestatus != TileEntityBeehive.ReleaseStatus.EMERGENCY) {
-+            // CraftBukkit end
-             return false;
-         } else {
-             EnumDirection enumdirection = (EnumDirection) iblockdata.getValue(BlockBeehive.FACING);
-@@ -190,6 +217,18 @@
-                 Entity entity = tileentitybeehive_c.createEntity(world, blockposition);
- 
-                 if (entity != null) {
-+                    // CraftBukkit start
-+                    if (entity instanceof EntityBee) {
-+                        float f = entity.getBbWidth();
-+                        double d0 = flag ? 0.0D : 0.55D + (double) (f / 2.0F);
-+                        double d1 = (double) blockposition.getX() + 0.5D + d0 * (double) enumdirection.getStepX();
-+                        double d2 = (double) blockposition.getY() + 0.5D - (double) (entity.getBbHeight() / 2.0F);
-+                        double d3 = (double) blockposition.getZ() + 0.5D + d0 * (double) enumdirection.getStepZ();
-+
-+                        entity.moveTo(d1, d2, d3, entity.getYRot(), entity.getXRot());
-+                    }
-+                    if (!world.addFreshEntity(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.BEEHIVE)) return false; // CraftBukkit - SpawnReason, moved from below
-+                    // CraftBukkit end
-                     if (entity instanceof EntityBee) {
-                         EntityBee entitybee = (EntityBee) entity;
- 
-@@ -220,6 +259,7 @@
-                             list.add(entitybee);
-                         }
- 
-+                        /* // CraftBukkit start
-                         float f = entity.getBbWidth();
-                         double d0 = flag ? 0.0D : 0.55D + (double) (f / 2.0F);
-                         double d1 = (double) blockposition.getX() + 0.5D + d0 * (double) enumdirection.getStepX();
-@@ -227,11 +267,12 @@
-                         double d3 = (double) blockposition.getZ() + 0.5D + d0 * (double) enumdirection.getStepZ();
- 
-                         entity.moveTo(d1, d2, d3, entity.getYRot(), entity.getXRot());
-+                         */ // CraftBukkit end
-                     }
- 
-                     world.playSound((EntityHuman) null, blockposition, SoundEffects.BEEHIVE_EXIT, SoundCategory.BLOCKS, 1.0F, 1.0F);
-                     world.gameEvent((Holder) GameEvent.BLOCK_CHANGE, blockposition, GameEvent.a.of(entity, world.getBlockState(blockposition)));
--                    return world.addFreshEntity(entity);
-+                    return true; // return this.world.addFreshEntity(entity); // CraftBukkit - moved up
-                 } else {
-                     return false;
-                 }
-@@ -256,6 +297,10 @@
-                 if (releaseOccupant(world, blockposition, iblockdata, tileentitybeehive_hivebee.toOccupant(), (List) null, tileentitybeehive_releasestatus, blockposition1)) {
-                     flag = true;
-                     iterator.remove();
-+                    // CraftBukkit start
-+                } else {
-+                    tileentitybeehive_hivebee.ticksInHive = tileentitybeehive_hivebee.occupant.minTicksInHive / 2; // Not strictly Vanilla behaviour in cases where bees cannot spawn but still reasonable
-+                    // CraftBukkit end
-                 }
-             }
-         }
-@@ -282,7 +327,7 @@
-     @Override
-     protected void loadAdditional(NBTTagCompound nbttagcompound, HolderLookup.a holderlookup_a) {
-         super.loadAdditional(nbttagcompound, holderlookup_a);
--        this.stored.clear();
-+        this.stored = Lists.newArrayList(); // CraftBukkit - SPIGOT-7790: create new copy (may be modified in physics event triggered by honey change)
-         if (nbttagcompound.contains("bees")) {
-             TileEntityBeehive.c.LIST_CODEC.parse(DynamicOpsNBT.INSTANCE, nbttagcompound.get("bees")).resultOrPartial((s) -> {
-                 TileEntityBeehive.LOGGER.error("Failed to parse bees: '{}'", s);
-@@ -291,7 +336,12 @@
-             });
-         }
- 
--        this.savedFlowerPos = (BlockPosition) GameProfileSerializer.readBlockPos(nbttagcompound, "flower_pos").orElse((Object) null);
-+        this.savedFlowerPos = (BlockPosition) GameProfileSerializer.readBlockPos(nbttagcompound, "flower_pos").orElse(null); // CraftBukkit - decompile error
-+        // CraftBukkit start
-+        if (nbttagcompound.contains("Bukkit.MaxEntities")) {
-+            this.maxBees = nbttagcompound.getInt("Bukkit.MaxEntities");
-+        }
-+        // CraftBukkit end
-     }
- 
-     @Override
-@@ -301,13 +351,14 @@
-         if (this.hasSavedFlowerPos()) {
-             nbttagcompound.put("flower_pos", GameProfileSerializer.writeBlockPos(this.savedFlowerPos));
-         }
-+        nbttagcompound.putInt("Bukkit.MaxEntities", this.maxBees); // CraftBukkit
- 
-     }
- 
-     @Override
-     protected void applyImplicitComponents(TileEntity.b tileentity_b) {
-         super.applyImplicitComponents(tileentity_b);
--        this.stored.clear();
-+        this.stored = Lists.newArrayList(); // CraftBukkit - SPIGOT-7790: create new copy (may be modified in physics event triggered by honey change)
-         List<TileEntityBeehive.c> list = (List) tileentity_b.getOrDefault(DataComponents.BEES, List.of());
- 
-         list.forEach(this::storeBee);
-@@ -348,7 +399,7 @@
-             NBTTagCompound nbttagcompound = new NBTTagCompound();
- 
-             entity.save(nbttagcompound);
--            List list = TileEntityBeehive.IGNORED_BEE_TAGS;
-+            List<String> list = TileEntityBeehive.IGNORED_BEE_TAGS; // CraftBukkit - decompile error
- 
-             Objects.requireNonNull(nbttagcompound);
-             list.forEach(nbttagcompound::remove);
-@@ -367,7 +418,7 @@
-         @Nullable
-         public Entity createEntity(World world, BlockPosition blockposition) {
-             NBTTagCompound nbttagcompound = this.entityData.copyTag();
--            List list = TileEntityBeehive.IGNORED_BEE_TAGS;
-+            List<String> list = TileEntityBeehive.IGNORED_BEE_TAGS; // CraftBukkit - decompile error
- 
-             Objects.requireNonNull(nbttagcompound);
-             list.forEach(nbttagcompound::remove);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityBrewingStand.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityBrewingStand.patch
deleted file mode 100644
index 002abf3405..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityBrewingStand.patch
+++ /dev/null
@@ -1,153 +0,0 @@
---- a/net/minecraft/world/level/block/entity/TileEntityBrewingStand.java
-+++ b/net/minecraft/world/level/block/entity/TileEntityBrewingStand.java
-@@ -24,6 +24,20 @@
- import net.minecraft.world.level.block.BlockBrewingStand;
- import net.minecraft.world.level.block.state.IBlockData;
- 
-+// CraftBukkit start
-+import java.util.ArrayList;
-+import java.util.List;
-+import net.minecraft.server.MinecraftServer;
-+import org.bukkit.craftbukkit.block.CraftBlock;
-+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
-+import org.bukkit.craftbukkit.inventory.CraftItemStack;
-+import org.bukkit.entity.HumanEntity;
-+import org.bukkit.event.block.BrewingStartEvent;
-+import org.bukkit.event.inventory.BrewEvent;
-+import org.bukkit.event.inventory.BrewingStandFuelEvent;
-+import org.bukkit.inventory.InventoryHolder;
-+// CraftBukkit end
-+
- public class TileEntityBrewingStand extends TileEntityContainer implements IWorldInventory {
- 
-     private static final int INGREDIENT_SLOT = 3;
-@@ -41,6 +55,36 @@
-     private Item ingredient;
-     public int fuel;
-     protected final IContainerProperties dataAccess;
-+    // CraftBukkit start - add fields and methods
-+    private int lastTick = MinecraftServer.currentTick;
-+    public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
-+    private int maxStack = MAX_STACK;
-+
-+    public void onOpen(CraftHumanEntity who) {
-+        transaction.add(who);
-+    }
-+
-+    public void onClose(CraftHumanEntity who) {
-+        transaction.remove(who);
-+    }
-+
-+    public List<HumanEntity> getViewers() {
-+        return transaction;
-+    }
-+
-+    public List<ItemStack> getContents() {
-+        return this.items;
-+    }
-+
-+    @Override
-+    public int getMaxStackSize() {
-+        return maxStack;
-+    }
-+
-+    public void setMaxStackSize(int size) {
-+        maxStack = size;
-+    }
-+    // CraftBukkit end
- 
-     public TileEntityBrewingStand(BlockPosition blockposition, IBlockData iblockdata) {
-         super(TileEntityTypes.BREWING_STAND, blockposition, iblockdata);
-@@ -107,8 +151,19 @@
-         ItemStack itemstack = (ItemStack) tileentitybrewingstand.items.get(4);
- 
-         if (tileentitybrewingstand.fuel <= 0 && itemstack.is(TagsItem.BREWING_FUEL)) {
--            tileentitybrewingstand.fuel = 20;
--            itemstack.shrink(1);
-+            // CraftBukkit start
-+            BrewingStandFuelEvent event = new BrewingStandFuelEvent(CraftBlock.at(world, blockposition), CraftItemStack.asCraftMirror(itemstack), 20);
-+            world.getCraftServer().getPluginManager().callEvent(event);
-+
-+            if (event.isCancelled()) {
-+                return;
-+            }
-+
-+            tileentitybrewingstand.fuel = event.getFuelPower();
-+            if (tileentitybrewingstand.fuel > 0 && event.isConsuming()) {
-+                itemstack.shrink(1);
-+            }
-+            // CraftBukkit end
-             setChanged(world, blockposition, iblockdata);
-         }
- 
-@@ -116,12 +171,17 @@
-         boolean flag1 = tileentitybrewingstand.brewTime > 0;
-         ItemStack itemstack1 = (ItemStack) tileentitybrewingstand.items.get(3);
- 
-+        // CraftBukkit start - Use wall time instead of ticks for brewing
-+        int elapsedTicks = MinecraftServer.currentTick - tileentitybrewingstand.lastTick;
-+        tileentitybrewingstand.lastTick = MinecraftServer.currentTick;
-+
-         if (flag1) {
--            --tileentitybrewingstand.brewTime;
--            boolean flag2 = tileentitybrewingstand.brewTime == 0;
-+            tileentitybrewingstand.brewTime -= elapsedTicks;
-+            boolean flag2 = tileentitybrewingstand.brewTime <= 0; // == -> <=
-+            // CraftBukkit end
- 
-             if (flag2 && flag) {
--                doBrew(world, blockposition, tileentitybrewingstand.items);
-+                doBrew(world, blockposition, tileentitybrewingstand.items, tileentitybrewingstand); // CraftBukkit
-             } else if (!flag || !itemstack1.is(tileentitybrewingstand.ingredient)) {
-                 tileentitybrewingstand.brewTime = 0;
-             }
-@@ -129,7 +189,11 @@
-             setChanged(world, blockposition, iblockdata);
-         } else if (flag && tileentitybrewingstand.fuel > 0) {
-             --tileentitybrewingstand.fuel;
--            tileentitybrewingstand.brewTime = 400;
-+            // CraftBukkit start
-+            BrewingStartEvent event = new BrewingStartEvent(CraftBlock.at(world, blockposition), CraftItemStack.asCraftMirror(itemstack1), 400);
-+            world.getCraftServer().getPluginManager().callEvent(event);
-+            tileentitybrewingstand.brewTime = event.getTotalBrewTime(); // 400 -> event.getTotalBrewTime()
-+            // CraftBukkit end
-             tileentitybrewingstand.ingredient = itemstack1.getItem();
-             setChanged(world, blockposition, iblockdata);
-         }
-@@ -185,12 +249,34 @@
-         }
-     }
- 
--    private static void doBrew(World world, BlockPosition blockposition, NonNullList<ItemStack> nonnulllist) {
-+    private static void doBrew(World world, BlockPosition blockposition, NonNullList<ItemStack> nonnulllist, TileEntityBrewingStand tileentitybrewingstand) { // CraftBukkit
-         ItemStack itemstack = (ItemStack) nonnulllist.get(3);
-         PotionBrewer potionbrewer = world.potionBrewing();
- 
-+        // CraftBukkit start
-+        InventoryHolder owner = tileentitybrewingstand.getOwner();
-+        List<org.bukkit.inventory.ItemStack> brewResults = new ArrayList<>(3);
-         for (int i = 0; i < 3; ++i) {
--            nonnulllist.set(i, potionbrewer.mix(itemstack, (ItemStack) nonnulllist.get(i)));
-+            brewResults.add(i, CraftItemStack.asCraftMirror(potionbrewer.mix(itemstack, (ItemStack) nonnulllist.get(i))));
-+        }
-+
-+        if (owner != null) {
-+            BrewEvent event = new BrewEvent(CraftBlock.at(world, blockposition), (org.bukkit.inventory.BrewerInventory) owner.getInventory(), brewResults, tileentitybrewingstand.fuel);
-+            org.bukkit.Bukkit.getPluginManager().callEvent(event);
-+            if (event.isCancelled()) {
-+                return;
-+            }
-+        }
-+        // CraftBukkit end
-+
-+        for (int i = 0; i < 3; ++i) {
-+            // CraftBukkit start - validate index in case it is cleared by plugins
-+            if (i < brewResults.size()) {
-+                nonnulllist.set(i, CraftItemStack.asNMSCopy(brewResults.get(i)));
-+            } else {
-+                nonnulllist.set(i, ItemStack.EMPTY);
-+            }
-+            // CraftBukkit end
-         }
- 
-         itemstack.shrink(1);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityCommand.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityCommand.patch
deleted file mode 100644
index e664a2759c..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityCommand.patch
+++ /dev/null
@@ -1,16 +0,0 @@
---- a/net/minecraft/world/level/block/entity/TileEntityCommand.java
-+++ b/net/minecraft/world/level/block/entity/TileEntityCommand.java
-@@ -24,6 +24,13 @@
-     private boolean auto;
-     private boolean conditionMet;
-     private final CommandBlockListenerAbstract commandBlock = new CommandBlockListenerAbstract() {
-+        // CraftBukkit start
-+        @Override
-+        public org.bukkit.command.CommandSender getBukkitSender(CommandListenerWrapper wrapper) {
-+            return new org.bukkit.craftbukkit.command.CraftBlockCommandSender(wrapper, TileEntityCommand.this);
-+        }
-+        // CraftBukkit end
-+
-         @Override
-         public void setCommand(String s) {
-             super.setCommand(s);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityConduit.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityConduit.patch
deleted file mode 100644
index 033b3ba2d9..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityConduit.patch
+++ /dev/null
@@ -1,72 +0,0 @@
---- a/net/minecraft/world/level/block/entity/TileEntityConduit.java
-+++ b/net/minecraft/world/level/block/entity/TileEntityConduit.java
-@@ -28,6 +28,10 @@
- import net.minecraft.world.phys.AxisAlignedBB;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import net.minecraft.server.level.WorldServer;
-+// CraftBukkit end
-+
- public class TileEntityConduit extends TileEntity {
- 
-     private static final int BLOCK_REFRESH_RATE = 2;
-@@ -187,8 +191,20 @@
-     }
- 
-     private static void applyEffects(World world, BlockPosition blockposition, List<BlockPosition> list) {
-+        // CraftBukkit start
-+        applyEffects(world, blockposition, getRange(list));
-+    }
-+
-+    public static int getRange(List<BlockPosition> list) {
-+        // CraftBukkit end
-         int i = list.size();
-         int j = i / 7 * 16;
-+        // CraftBukkit start
-+        return j;
-+    }
-+
-+    private static void applyEffects(World world, BlockPosition blockposition, int j) { // j = effect range in blocks
-+        // CraftBukkit end
-         int k = blockposition.getX();
-         int l = blockposition.getY();
-         int i1 = blockposition.getZ();
-@@ -202,7 +218,7 @@
-                 EntityHuman entityhuman = (EntityHuman) iterator.next();
- 
-                 if (blockposition.closerThan(entityhuman.blockPosition(), (double) j) && entityhuman.isInWaterOrRain()) {
--                    entityhuman.addEffect(new MobEffect(MobEffects.CONDUIT_POWER, 260, 0, true, true));
-+                    entityhuman.addEffect(new MobEffect(MobEffects.CONDUIT_POWER, 260, 0, true, true), org.bukkit.event.entity.EntityPotionEffectEvent.Cause.CONDUIT); // CraftBukkit
-                 }
-             }
- 
-@@ -210,6 +226,12 @@
-     }
- 
-     private static void updateDestroyTarget(World world, BlockPosition blockposition, IBlockData iblockdata, List<BlockPosition> list, TileEntityConduit tileentityconduit) {
-+        // CraftBukkit start - add "damageTarget" boolean
-+        updateDestroyTarget(world, blockposition, iblockdata, list, tileentityconduit, true);
-+    }
-+
-+    public static void updateDestroyTarget(World world, BlockPosition blockposition, IBlockData iblockdata, List<BlockPosition> list, TileEntityConduit tileentityconduit, boolean damageTarget) {
-+        // CraftBukkit end
-         EntityLiving entityliving = tileentityconduit.destroyTarget;
-         int i = list.size();
- 
-@@ -230,9 +252,12 @@
-             tileentityconduit.destroyTarget = null;
-         }
- 
--        if (tileentityconduit.destroyTarget != null) {
--            world.playSound((EntityHuman) null, tileentityconduit.destroyTarget.getX(), tileentityconduit.destroyTarget.getY(), tileentityconduit.destroyTarget.getZ(), SoundEffects.CONDUIT_ATTACK_TARGET, SoundCategory.BLOCKS, 1.0F, 1.0F);
--            tileentityconduit.destroyTarget.hurt(world.damageSources().magic(), 4.0F);
-+        // CraftBukkit start
-+        if (damageTarget && tileentityconduit.destroyTarget != null) {
-+            if (tileentityconduit.destroyTarget.hurtServer((WorldServer) world, world.damageSources().magic().directBlock(world, blockposition), 4.0F)) {
-+                world.playSound(null, tileentityconduit.destroyTarget.getX(), tileentityconduit.destroyTarget.getY(), tileentityconduit.destroyTarget.getZ(), SoundEffects.CONDUIT_ATTACK_TARGET, SoundCategory.BLOCKS, 1.0F, 1.0F);
-+            }
-+            // CraftBukkit end
-         }
- 
-         if (entityliving != tileentityconduit.destroyTarget) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityContainer.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityContainer.patch
deleted file mode 100644
index cf27b35391..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityContainer.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/net/minecraft/world/level/block/entity/TileEntityContainer.java
-+++ b/net/minecraft/world/level/block/entity/TileEntityContainer.java
-@@ -178,4 +178,12 @@
-         nbttagcompound.remove("lock");
-         nbttagcompound.remove("Items");
-     }
-+
-+    // CraftBukkit start
-+    @Override
-+    public org.bukkit.Location getLocation() {
-+        if (level == null) return null;
-+        return new org.bukkit.Location(level.getWorld(), worldPosition.getX(), worldPosition.getY(), worldPosition.getZ());
-+    }
-+    // CraftBukkit end
- }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityEndGateway.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityEndGateway.patch
deleted file mode 100644
index e6456e8fcc..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityEndGateway.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/net/minecraft/world/level/block/entity/TileEntityEndGateway.java
-+++ b/net/minecraft/world/level/block/entity/TileEntityEndGateway.java
-@@ -27,6 +27,10 @@
- import net.minecraft.world.phys.Vec3D;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import net.minecraft.world.level.dimension.WorldDimension;
-+// CraftBukkit end
-+
- public class TileEntityEndGateway extends TileEntityEnderPortal {
- 
-     private static final Logger LOGGER = LogUtils.getLogger();
-@@ -143,7 +147,7 @@
-     public Vec3D getPortalPosition(WorldServer worldserver, BlockPosition blockposition) {
-         BlockPosition blockposition1;
- 
--        if (this.exitPortal == null && worldserver.dimension() == World.END) {
-+        if (this.exitPortal == null && worldserver.getTypeKey() == WorldDimension.END) { // CraftBukkit - work in alternate worlds
-             blockposition1 = findOrCreateValidTeleportPos(worldserver, blockposition);
-             blockposition1 = blockposition1.above(10);
-             TileEntityEndGateway.LOGGER.debug("Creating portal at {}", blockposition1);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityFurnace.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityFurnace.patch
deleted file mode 100644
index f70c7ce402..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityFurnace.patch
+++ /dev/null
@@ -1,237 +0,0 @@
---- a/net/minecraft/world/level/block/entity/TileEntityFurnace.java
-+++ b/net/minecraft/world/level/block/entity/TileEntityFurnace.java
-@@ -42,6 +42,21 @@
- import net.minecraft.world.level.block.state.IBlockData;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.block.CraftBlock;
-+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
-+import org.bukkit.craftbukkit.inventory.CraftItemStack;
-+import org.bukkit.craftbukkit.inventory.CraftItemType;
-+import org.bukkit.entity.HumanEntity;
-+import org.bukkit.entity.Player;
-+import org.bukkit.event.block.BlockExpEvent;
-+import org.bukkit.event.inventory.FurnaceBurnEvent;
-+import org.bukkit.event.inventory.FurnaceExtractEvent;
-+import org.bukkit.event.inventory.FurnaceSmeltEvent;
-+import org.bukkit.event.inventory.FurnaceStartSmeltEvent;
-+import org.bukkit.inventory.CookingRecipe;
-+// CraftBukkit end
-+
- public abstract class TileEntityFurnace extends TileEntityContainer implements IWorldInventory, RecipeCraftingHolder, AutoRecipeOutput {
- 
-     protected static final int SLOT_INPUT = 0;
-@@ -110,9 +125,39 @@
-             }
-         };
-         this.recipesUsed = new Reference2IntOpenHashMap();
--        this.quickCheck = CraftingManager.createCheck(recipes);
-+        this.quickCheck = CraftingManager.createCheck((Recipes<RecipeCooking>) recipes); // CraftBukkit - decompile error // Eclipse fail
-+    }
-+
-+    // CraftBukkit start - add fields and methods
-+    private int maxStack = MAX_STACK;
-+    public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
-+
-+    public List<ItemStack> getContents() {
-+        return this.items;
-+    }
-+
-+    public void onOpen(CraftHumanEntity who) {
-+        transaction.add(who);
-+    }
-+
-+    public void onClose(CraftHumanEntity who) {
-+        transaction.remove(who);
-+    }
-+
-+    public List<HumanEntity> getViewers() {
-+        return transaction;
-     }
- 
-+    @Override
-+    public int getMaxStackSize() {
-+        return maxStack;
-+    }
-+
-+    public void setMaxStackSize(int size) {
-+        maxStack = size;
-+    }
-+    // CraftBukkit end
-+
-     private boolean isLit() {
-         return this.litTimeRemaining > 0;
-     }
-@@ -175,7 +220,7 @@
-             RecipeHolder recipeholder;
- 
-             if (flag2) {
--                recipeholder = (RecipeHolder) tileentityfurnace.quickCheck.getRecipeFor(singlerecipeinput, worldserver).orElse((Object) null);
-+                recipeholder = (RecipeHolder) tileentityfurnace.quickCheck.getRecipeFor(singlerecipeinput, worldserver).orElse(null); // CraftBukkit - decompile error
-             } else {
-                 recipeholder = null;
-             }
-@@ -183,9 +228,20 @@
-             int i = tileentityfurnace.getMaxStackSize();
- 
-             if (!tileentityfurnace.isLit() && canBurn(worldserver.registryAccess(), recipeholder, singlerecipeinput, tileentityfurnace.items, i)) {
--                tileentityfurnace.litTimeRemaining = tileentityfurnace.getBurnDuration(worldserver.fuelValues(), itemstack);
-+                // CraftBukkit start
-+                CraftItemStack fuel = CraftItemStack.asCraftMirror(itemstack);
-+
-+                FurnaceBurnEvent furnaceBurnEvent = new FurnaceBurnEvent(CraftBlock.at(worldserver, blockposition), fuel, tileentityfurnace.getBurnDuration(worldserver.fuelValues(), itemstack));
-+                worldserver.getCraftServer().getPluginManager().callEvent(furnaceBurnEvent);
-+
-+                if (furnaceBurnEvent.isCancelled()) {
-+                    return;
-+                }
-+
-+                tileentityfurnace.litTimeRemaining = furnaceBurnEvent.getBurnTime();
-                 tileentityfurnace.litTotalTime = tileentityfurnace.litTimeRemaining;
--                if (tileentityfurnace.isLit()) {
-+                if (tileentityfurnace.isLit() && furnaceBurnEvent.isBurning()) {
-+                    // CraftBukkit end
-                     flag1 = true;
-                     if (flag3) {
-                         Item item = itemstack.getItem();
-@@ -199,11 +255,23 @@
-             }
- 
-             if (tileentityfurnace.isLit() && canBurn(worldserver.registryAccess(), recipeholder, singlerecipeinput, tileentityfurnace.items, i)) {
-+                // CraftBukkit start
-+                if (recipeholder != null && tileentityfurnace.cookingTimer == 0) {
-+                    CraftItemStack source = CraftItemStack.asCraftMirror(tileentityfurnace.items.get(0));
-+                    CookingRecipe<?> recipe = (CookingRecipe<?>) recipeholder.toBukkitRecipe();
-+
-+                    FurnaceStartSmeltEvent event = new FurnaceStartSmeltEvent(CraftBlock.at(worldserver, blockposition), source, recipe);
-+                    worldserver.getCraftServer().getPluginManager().callEvent(event);
-+
-+                    tileentityfurnace.cookingTotalTime = event.getTotalCookTime();
-+                }
-+                // CraftBukkit end
-+
-                 ++tileentityfurnace.cookingTimer;
-                 if (tileentityfurnace.cookingTimer == tileentityfurnace.cookingTotalTime) {
-                     tileentityfurnace.cookingTimer = 0;
-                     tileentityfurnace.cookingTotalTime = getTotalCookTime(worldserver, tileentityfurnace);
--                    if (burn(worldserver.registryAccess(), recipeholder, singlerecipeinput, tileentityfurnace.items, i)) {
-+                    if (burn(tileentityfurnace.level, tileentityfurnace.worldPosition, worldserver.registryAccess(), recipeholder, singlerecipeinput, tileentityfurnace.items, i)) { // CraftBukkit
-                         tileentityfurnace.setRecipeUsed(recipeholder);
-                     }
- 
-@@ -242,17 +310,44 @@
-         }
-     }
- 
--    private static boolean burn(IRegistryCustom iregistrycustom, @Nullable RecipeHolder<? extends RecipeCooking> recipeholder, SingleRecipeInput singlerecipeinput, NonNullList<ItemStack> nonnulllist, int i) {
-+    private static boolean burn(World world, BlockPosition blockposition, IRegistryCustom iregistrycustom, @Nullable RecipeHolder<? extends RecipeCooking> recipeholder, SingleRecipeInput singlerecipeinput, NonNullList<ItemStack> nonnulllist, int i) { // CraftBukkit
-         if (recipeholder != null && canBurn(iregistrycustom, recipeholder, singlerecipeinput, nonnulllist, i)) {
-             ItemStack itemstack = (ItemStack) nonnulllist.get(0);
-             ItemStack itemstack1 = ((RecipeCooking) recipeholder.value()).assemble(singlerecipeinput, iregistrycustom);
-             ItemStack itemstack2 = (ItemStack) nonnulllist.get(2);
- 
-+            // CraftBukkit start - fire FurnaceSmeltEvent
-+            CraftItemStack source = CraftItemStack.asCraftMirror(itemstack);
-+            org.bukkit.inventory.ItemStack result = CraftItemStack.asBukkitCopy(itemstack1);
-+
-+            FurnaceSmeltEvent furnaceSmeltEvent = new FurnaceSmeltEvent(CraftBlock.at(world, blockposition), source, result);
-+            world.getCraftServer().getPluginManager().callEvent(furnaceSmeltEvent);
-+
-+            if (furnaceSmeltEvent.isCancelled()) {
-+                return false;
-+            }
-+
-+            result = furnaceSmeltEvent.getResult();
-+            itemstack1 = CraftItemStack.asNMSCopy(result);
-+
-+            if (!itemstack1.isEmpty()) {
-+                if (itemstack2.isEmpty()) {
-+                    nonnulllist.set(2, itemstack1.copy());
-+                } else if (CraftItemStack.asCraftMirror(itemstack2).isSimilar(result)) {
-+                    itemstack2.grow(itemstack1.getCount());
-+                } else {
-+                    return false;
-+                }
-+            }
-+
-+            /*
-             if (itemstack2.isEmpty()) {
-                 nonnulllist.set(2, itemstack1.copy());
-             } else if (ItemStack.isSameItemSameComponents(itemstack2, itemstack1)) {
-                 itemstack2.grow(1);
-             }
-+            */
-+            // CraftBukkit end
- 
-             if (itemstack.is(Blocks.WET_SPONGE.asItem()) && !((ItemStack) nonnulllist.get(1)).isEmpty() && ((ItemStack) nonnulllist.get(1)).is(Items.BUCKET)) {
-                 nonnulllist.set(1, new ItemStack(Items.WATER_BUCKET));
-@@ -270,6 +365,7 @@
-     }
- 
-     private static int getTotalCookTime(WorldServer worldserver, TileEntityFurnace tileentityfurnace) {
-+        if (worldserver == null) return 200; // CraftBukkit - SPIGOT-4302
-         SingleRecipeInput singlerecipeinput = new SingleRecipeInput(tileentityfurnace.getItem(0));
- 
-         return (Integer) tileentityfurnace.quickCheck.getRecipeFor(singlerecipeinput, worldserver).map((recipeholder) -> {
-@@ -360,8 +456,8 @@
-     @Override
-     public void awardUsedRecipes(EntityHuman entityhuman, List<ItemStack> list) {}
- 
--    public void awardUsedRecipesAndPopExperience(EntityPlayer entityplayer) {
--        List<RecipeHolder<?>> list = this.getRecipesToAwardAndPopExperience(entityplayer.serverLevel(), entityplayer.position());
-+    public void awardUsedRecipesAndPopExperience(EntityPlayer entityplayer, ItemStack itemstack, int amount) { // CraftBukkit
-+        List<RecipeHolder<?>> list = this.getRecipesToAwardAndPopExperience(entityplayer.serverLevel(), entityplayer.position(), this.worldPosition, entityplayer, itemstack, amount); // CraftBukkit
- 
-         entityplayer.awardRecipes(list);
-         Iterator iterator = list.iterator();
-@@ -378,22 +474,28 @@
-     }
- 
-     public List<RecipeHolder<?>> getRecipesToAwardAndPopExperience(WorldServer worldserver, Vec3D vec3d) {
-+        // CraftBukkit start
-+        return this.getRecipesToAwardAndPopExperience(worldserver, vec3d, this.worldPosition, null, null, 0);
-+    }
-+
-+    public List<RecipeHolder<?>> getRecipesToAwardAndPopExperience(WorldServer worldserver, Vec3D vec3d, BlockPosition blockposition, EntityPlayer entityplayer, ItemStack itemstack, int amount) {
-+        // CraftBukkit end
-         List<RecipeHolder<?>> list = Lists.newArrayList();
-         ObjectIterator objectiterator = this.recipesUsed.reference2IntEntrySet().iterator();
- 
-         while (objectiterator.hasNext()) {
-             Entry<ResourceKey<IRecipe<?>>> entry = (Entry) objectiterator.next();
- 
--            worldserver.recipeAccess().byKey((ResourceKey) entry.getKey()).ifPresent((recipeholder) -> {
-+            worldserver.recipeAccess().byKey(entry.getKey()).ifPresent((recipeholder) -> { // CraftBukkit - decompile error
-                 list.add(recipeholder);
--                createExperience(worldserver, vec3d, entry.getIntValue(), ((RecipeCooking) recipeholder.value()).experience());
-+                createExperience(worldserver, vec3d, entry.getIntValue(), ((RecipeCooking) recipeholder.value()).experience(), blockposition, entityplayer, itemstack, amount); // CraftBukkit
-             });
-         }
- 
-         return list;
-     }
- 
--    private static void createExperience(WorldServer worldserver, Vec3D vec3d, int i, float f) {
-+    private static void createExperience(WorldServer worldserver, Vec3D vec3d, int i, float f, BlockPosition blockposition, EntityHuman entityhuman, ItemStack itemstack, int amount) { // CraftBukkit
-         int j = MathHelper.floor((float) i * f);
-         float f1 = MathHelper.frac((float) i * f);
- 
-@@ -401,6 +503,17 @@
-             ++j;
-         }
- 
-+        // CraftBukkit start - fire FurnaceExtractEvent / BlockExpEvent
-+        BlockExpEvent event;
-+        if (amount != 0) {
-+            event = new FurnaceExtractEvent((Player) entityhuman.getBukkitEntity(), CraftBlock.at(worldserver, blockposition), CraftItemType.minecraftToBukkit(itemstack.getItem()), amount, j);
-+        } else {
-+            event = new BlockExpEvent(CraftBlock.at(worldserver, blockposition), j);
-+        }
-+        worldserver.getCraftServer().getPluginManager().callEvent(event);
-+        j = event.getExpToDrop();
-+        // CraftBukkit end
-+
-         EntityExperienceOrb.award(worldserver, vec3d, j);
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityHopper.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityHopper.patch
deleted file mode 100644
index c54c3dbe21..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityHopper.patch
+++ /dev/null
@@ -1,192 +0,0 @@
---- a/net/minecraft/world/level/block/entity/TileEntityHopper.java
-+++ b/net/minecraft/world/level/block/entity/TileEntityHopper.java
-@@ -30,6 +30,22 @@
- import net.minecraft.world.level.block.state.IBlockData;
- import net.minecraft.world.phys.AxisAlignedBB;
- 
-+// CraftBukkit start
-+import net.minecraft.world.InventoryLargeChest;
-+import net.minecraft.world.entity.vehicle.EntityMinecartHopper;
-+import org.bukkit.Bukkit;
-+import org.bukkit.craftbukkit.block.CraftBlock;
-+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
-+import org.bukkit.craftbukkit.inventory.CraftInventory;
-+import org.bukkit.craftbukkit.inventory.CraftItemStack;
-+import org.bukkit.entity.HumanEntity;
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+import org.bukkit.event.inventory.HopperInventorySearchEvent;
-+import org.bukkit.event.inventory.InventoryMoveItemEvent;
-+import org.bukkit.event.inventory.InventoryPickupItemEvent;
-+import org.bukkit.inventory.Inventory;
-+// CraftBukkit end
-+
- public class TileEntityHopper extends TileEntityLootable implements IHopper {
- 
-     public static final int MOVE_ITEM_SPEED = 8;
-@@ -40,6 +56,36 @@
-     private long tickedGameTime;
-     private EnumDirection facing;
- 
-+    // CraftBukkit start - add fields and methods
-+    public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
-+    private int maxStack = MAX_STACK;
-+
-+    public List<ItemStack> getContents() {
-+        return this.items;
-+    }
-+
-+    public void onOpen(CraftHumanEntity who) {
-+        transaction.add(who);
-+    }
-+
-+    public void onClose(CraftHumanEntity who) {
-+        transaction.remove(who);
-+    }
-+
-+    public List<HumanEntity> getViewers() {
-+        return transaction;
-+    }
-+
-+    @Override
-+    public int getMaxStackSize() {
-+        return maxStack;
-+    }
-+
-+    public void setMaxStackSize(int size) {
-+        maxStack = size;
-+    }
-+    // CraftBukkit end
-+
-     public TileEntityHopper(BlockPosition blockposition, IBlockData iblockdata) {
-         super(TileEntityTypes.HOPPER, blockposition, iblockdata);
-         this.items = NonNullList.withSize(5, ItemStack.EMPTY);
-@@ -167,7 +213,29 @@
- 
-                     if (!itemstack.isEmpty()) {
-                         int j = itemstack.getCount();
--                        ItemStack itemstack1 = addItem(tileentityhopper, iinventory, tileentityhopper.removeItem(i, 1), enumdirection);
-+                        // CraftBukkit start - Call event when pushing items into other inventories
-+                        ItemStack original = itemstack.copy();
-+                        CraftItemStack oitemstack = CraftItemStack.asCraftMirror(tileentityhopper.removeItem(i, 1));
-+
-+                        Inventory destinationInventory;
-+                        // Have to special case large chests as they work oddly
-+                        if (iinventory instanceof InventoryLargeChest) {
-+                            destinationInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest((InventoryLargeChest) iinventory);
-+                        } else if (iinventory.getOwner() != null) {
-+                            destinationInventory = iinventory.getOwner().getInventory();
-+                        } else {
-+                            destinationInventory = new CraftInventory(iinventory);
-+                        }
-+
-+                        InventoryMoveItemEvent event = new InventoryMoveItemEvent(tileentityhopper.getOwner().getInventory(), oitemstack, destinationInventory, true);
-+                        world.getCraftServer().getPluginManager().callEvent(event);
-+                        if (event.isCancelled()) {
-+                            tileentityhopper.setItem(i, original);
-+                            tileentityhopper.setCooldown(8); // Delay hopper checks
-+                            return false;
-+                        }
-+                        ItemStack itemstack1 = addItem(tileentityhopper, iinventory, CraftItemStack.asNMSCopy(event.getItem()), enumdirection);
-+                        // CraftBukkit end
- 
-                         if (itemstack1.isEmpty()) {
-                             iinventory.setChanged();
-@@ -279,7 +347,34 @@
- 
-         if (!itemstack.isEmpty() && canTakeItemFromContainer(ihopper, iinventory, itemstack, i, enumdirection)) {
-             int j = itemstack.getCount();
--            ItemStack itemstack1 = addItem(iinventory, ihopper, iinventory.removeItem(i, 1), (EnumDirection) null);
-+            // CraftBukkit start - Call event on collection of items from inventories into the hopper
-+            ItemStack original = itemstack.copy();
-+            CraftItemStack oitemstack = CraftItemStack.asCraftMirror(iinventory.removeItem(i, 1));
-+
-+            Inventory sourceInventory;
-+            // Have to special case large chests as they work oddly
-+            if (iinventory instanceof InventoryLargeChest) {
-+                sourceInventory = new org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest((InventoryLargeChest) iinventory);
-+            } else if (iinventory.getOwner() != null) {
-+                sourceInventory = iinventory.getOwner().getInventory();
-+            } else {
-+                sourceInventory = new CraftInventory(iinventory);
-+            }
-+
-+            InventoryMoveItemEvent event = new InventoryMoveItemEvent(sourceInventory, oitemstack, ihopper.getOwner().getInventory(), false);
-+
-+            Bukkit.getServer().getPluginManager().callEvent(event);
-+            if (event.isCancelled()) {
-+                iinventory.setItem(i, original);
-+
-+                if (ihopper instanceof TileEntityHopper) {
-+                    ((TileEntityHopper) ihopper).setCooldown(8); // Delay hopper checks
-+                }
-+
-+                return false;
-+            }
-+            ItemStack itemstack1 = addItem(iinventory, ihopper, CraftItemStack.asNMSCopy(event.getItem()), null);
-+            // CraftBukkit end
- 
-             if (itemstack1.isEmpty()) {
-                 iinventory.setChanged();
-@@ -297,13 +392,20 @@
- 
-     public static boolean addItem(IInventory iinventory, EntityItem entityitem) {
-         boolean flag = false;
-+        // CraftBukkit start
-+        InventoryPickupItemEvent event = new InventoryPickupItemEvent(iinventory.getOwner().getInventory(), (org.bukkit.entity.Item) entityitem.getBukkitEntity());
-+        entityitem.level().getCraftServer().getPluginManager().callEvent(event);
-+        if (event.isCancelled()) {
-+            return false;
-+        }
-+        // CraftBukkit end
-         ItemStack itemstack = entityitem.getItem().copy();
-         ItemStack itemstack1 = addItem((IInventory) null, iinventory, itemstack, (EnumDirection) null);
- 
-         if (itemstack1.isEmpty()) {
-             flag = true;
-             entityitem.setItem(ItemStack.EMPTY);
--            entityitem.discard();
-+            entityitem.discard(EntityRemoveEvent.Cause.PICKUP); // CraftBukkit - add Bukkit remove cause
-         } else {
-             entityitem.setItem(itemstack1);
-         }
-@@ -421,14 +523,38 @@
-         return itemstack;
-     }
- 
-+    // CraftBukkit start
-+    @Nullable
-+    private static IInventory runHopperInventorySearchEvent(IInventory inventory, CraftBlock hopper, CraftBlock searchLocation, HopperInventorySearchEvent.ContainerType containerType) {
-+        HopperInventorySearchEvent event = new HopperInventorySearchEvent((inventory != null) ? new CraftInventory(inventory) : null, containerType, hopper, searchLocation);
-+        Bukkit.getServer().getPluginManager().callEvent(event);
-+        CraftInventory craftInventory = (CraftInventory) event.getInventory();
-+        return (craftInventory != null) ? craftInventory.getInventory() : null;
-+    }
-+    // CraftBukkit end
-+
-     @Nullable
-     private static IInventory getAttachedContainer(World world, BlockPosition blockposition, TileEntityHopper tileentityhopper) {
--        return getContainerAt(world, blockposition.relative(tileentityhopper.facing));
-+        // CraftBukkit start
-+        BlockPosition searchPosition = blockposition.relative(tileentityhopper.facing);
-+        IInventory inventory = getContainerAt(world, searchPosition);
-+
-+        CraftBlock hopper = CraftBlock.at(world, blockposition);
-+        CraftBlock searchBlock = CraftBlock.at(world, searchPosition);
-+        return runHopperInventorySearchEvent(inventory, hopper, searchBlock, HopperInventorySearchEvent.ContainerType.DESTINATION);
-+        // CraftBukkit end
-     }
- 
-     @Nullable
-     private static IInventory getSourceContainer(World world, IHopper ihopper, BlockPosition blockposition, IBlockData iblockdata) {
--        return getContainerAt(world, blockposition, iblockdata, ihopper.getLevelX(), ihopper.getLevelY() + 1.0D, ihopper.getLevelZ());
-+        // CraftBukkit start
-+        IInventory inventory = getContainerAt(world, blockposition, iblockdata, ihopper.getLevelX(), ihopper.getLevelY() + 1.0D, ihopper.getLevelZ());
-+
-+        BlockPosition blockPosition = BlockPosition.containing(ihopper.getLevelX(), ihopper.getLevelY(), ihopper.getLevelZ());
-+        CraftBlock hopper = CraftBlock.at(world, blockPosition);
-+        CraftBlock container = CraftBlock.at(world, blockPosition.above());
-+        return runHopperInventorySearchEvent(inventory, hopper, container, HopperInventorySearchEvent.ContainerType.SOURCE);
-+        // CraftBukkit end
-     }
- 
-     public static List<EntityItem> getItemsAtAndAbove(World world, IHopper ihopper) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityLectern.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityLectern.patch
deleted file mode 100644
index cd05061138..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityLectern.patch
+++ /dev/null
@@ -1,163 +0,0 @@
---- a/net/minecraft/world/level/block/entity/TileEntityLectern.java
-+++ b/net/minecraft/world/level/block/entity/TileEntityLectern.java
-@@ -29,13 +29,72 @@
- import net.minecraft.world.phys.Vec2F;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import java.util.ArrayList;
-+import java.util.Arrays;
-+import java.util.List;
-+import org.bukkit.Location;
-+import org.bukkit.block.Lectern;
-+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
-+import org.bukkit.craftbukkit.util.CraftLocation;
-+import org.bukkit.entity.HumanEntity;
-+import org.bukkit.inventory.InventoryHolder;
-+// CraftBukkit end
-+
- public class TileEntityLectern extends TileEntity implements Clearable, ITileInventory {
- 
-     public static final int DATA_PAGE = 0;
-     public static final int NUM_DATA = 1;
-     public static final int SLOT_BOOK = 0;
-     public static final int NUM_SLOTS = 1;
--    public final IInventory bookAccess = new IInventory() {
-+    // CraftBukkit start - add fields and methods
-+    public final IInventory bookAccess = new LecternInventory();
-+    public class LecternInventory implements IInventory {
-+
-+        public List<HumanEntity> transaction = new ArrayList<>();
-+        private int maxStack = 1;
-+
-+        @Override
-+        public List<ItemStack> getContents() {
-+            return Arrays.asList(book);
-+        }
-+
-+        @Override
-+        public void onOpen(CraftHumanEntity who) {
-+            transaction.add(who);
-+        }
-+
-+        @Override
-+        public void onClose(CraftHumanEntity who) {
-+            transaction.remove(who);
-+        }
-+
-+        @Override
-+        public List<HumanEntity> getViewers() {
-+            return transaction;
-+        }
-+
-+        @Override
-+        public void setMaxStackSize(int i) {
-+            maxStack = i;
-+        }
-+
-+        @Override
-+        public Location getLocation() {
-+            if (level == null) return null;
-+            return CraftLocation.toBukkit(worldPosition, level.getWorld());
-+        }
-+
-+        @Override
-+        public InventoryHolder getOwner() {
-+            return (Lectern) TileEntityLectern.this.getOwner();
-+        }
-+
-+        public TileEntityLectern getLectern() {
-+            return TileEntityLectern.this;
-+        }
-+        // CraftBukkit end
-+
-         @Override
-         public int getContainerSize() {
-             return 1;
-@@ -80,11 +139,20 @@
-         }
- 
-         @Override
--        public void setItem(int i, ItemStack itemstack) {}
-+        // CraftBukkit start
-+        public void setItem(int i, ItemStack itemstack) {
-+            if (i == 0) {
-+                TileEntityLectern.this.setBook(itemstack);
-+                if (TileEntityLectern.this.getLevel() != null) {
-+                    BlockLectern.resetBookState(null, TileEntityLectern.this.getLevel(), TileEntityLectern.this.getBlockPos(), TileEntityLectern.this.getBlockState(), TileEntityLectern.this.hasBook());
-+                }
-+            }
-+        }
-+        // CraftBukkit end
- 
-         @Override
-         public int getMaxStackSize() {
--            return 1;
-+            return maxStack; // CraftBukkit
-         }
- 
-         @Override
-@@ -164,7 +232,7 @@
-         if (j != this.page) {
-             this.page = j;
-             this.setChanged();
--            BlockLectern.signalPageChange(this.getLevel(), this.getBlockPos(), this.getBlockState());
-+            if (this.level != null) BlockLectern.signalPageChange(this.getLevel(), this.getBlockPos(), this.getBlockState()); // CraftBukkit
-         }
- 
-     }
-@@ -189,6 +257,35 @@
-         return itemstack;
-     }
- 
-+    // CraftBukkit start
-+    private final ICommandListener commandSource = new ICommandListener() {
-+
-+        @Override
-+        public void sendSystemMessage(IChatBaseComponent ichatbasecomponent) {
-+        }
-+
-+        @Override
-+        public org.bukkit.command.CommandSender getBukkitSender(CommandListenerWrapper wrapper) {
-+            return wrapper.getEntity() != null ? wrapper.getEntity().getBukkitEntity() : new org.bukkit.craftbukkit.command.CraftBlockCommandSender(wrapper, TileEntityLectern.this);
-+        }
-+
-+        @Override
-+        public boolean acceptsSuccess() {
-+            return false;
-+        }
-+
-+        @Override
-+        public boolean acceptsFailure() {
-+            return false;
-+        }
-+
-+        @Override
-+        public boolean shouldInformAdmins() {
-+            return false;
-+        }
-+    };
-+    // CraftBukkit end
-+
-     private CommandListenerWrapper createCommandSourceStack(@Nullable EntityHuman entityhuman, WorldServer worldserver) {
-         String s;
-         Object object;
-@@ -203,7 +300,8 @@
- 
-         Vec3D vec3d = Vec3D.atCenterOf(this.worldPosition);
- 
--        return new CommandListenerWrapper(ICommandListener.NULL, vec3d, Vec2F.ZERO, worldserver, 2, s, (IChatBaseComponent) object, worldserver.getServer(), entityhuman);
-+        // CraftBukkit - commandSource
-+        return new CommandListenerWrapper(commandSource, vec3d, Vec2F.ZERO, worldserver, 2, s, (IChatBaseComponent) object, worldserver.getServer(), entityhuman);
-     }
- 
-     @Override
-@@ -236,7 +334,7 @@
- 
-     @Override
-     public Container createMenu(int i, PlayerInventory playerinventory, EntityHuman entityhuman) {
--        return new ContainerLectern(i, this.bookAccess, this.dataAccess);
-+        return new ContainerLectern(i, this.bookAccess, this.dataAccess, playerinventory); // CraftBukkit
-     }
- 
-     @Override
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityShulkerBox.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityShulkerBox.patch
deleted file mode 100644
index 7b3f170d34..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityShulkerBox.patch
+++ /dev/null
@@ -1,68 +0,0 @@
---- a/net/minecraft/world/level/block/entity/TileEntityShulkerBox.java
-+++ b/net/minecraft/world/level/block/entity/TileEntityShulkerBox.java
-@@ -34,6 +34,11 @@
- import net.minecraft.world.phys.AxisAlignedBB;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.entity.CraftHumanEntity;
-+import org.bukkit.entity.HumanEntity;
-+// CraftBukkit end
-+
- public class TileEntityShulkerBox extends TileEntityLootable implements IWorldInventory {
- 
-     public static final int COLUMNS = 9;
-@@ -52,6 +57,37 @@
-     @Nullable
-     private final EnumColor color;
- 
-+    // CraftBukkit start - add fields and methods
-+    public List<HumanEntity> transaction = new java.util.ArrayList<HumanEntity>();
-+    private int maxStack = MAX_STACK;
-+    public boolean opened;
-+
-+    public List<ItemStack> getContents() {
-+        return this.itemStacks;
-+    }
-+
-+    public void onOpen(CraftHumanEntity who) {
-+        transaction.add(who);
-+    }
-+
-+    public void onClose(CraftHumanEntity who) {
-+        transaction.remove(who);
-+    }
-+
-+    public List<HumanEntity> getViewers() {
-+        return transaction;
-+    }
-+
-+    @Override
-+    public int getMaxStackSize() {
-+        return maxStack;
-+    }
-+
-+    public void setMaxStackSize(int size) {
-+        maxStack = size;
-+    }
-+    // CraftBukkit end
-+
-     public TileEntityShulkerBox(@Nullable EnumColor enumcolor, BlockPosition blockposition, IBlockData iblockdata) {
-         super(TileEntityTypes.SHULKER_BOX, blockposition, iblockdata);
-         this.itemStacks = NonNullList.withSize(27, ItemStack.EMPTY);
-@@ -184,6 +220,7 @@
-             }
- 
-             ++this.openCount;
-+            if (opened) return; // CraftBukkit - only animate if the ShulkerBox hasn't been forced open already by an API call.
-             this.level.blockEvent(this.worldPosition, this.getBlockState().getBlock(), 1, this.openCount);
-             if (this.openCount == 1) {
-                 this.level.gameEvent((Entity) entityhuman, (Holder) GameEvent.CONTAINER_OPEN, this.worldPosition);
-@@ -197,6 +234,7 @@
-     public void stopOpen(EntityHuman entityhuman) {
-         if (!this.remove && !entityhuman.isSpectator()) {
-             --this.openCount;
-+            if (opened) return; // CraftBukkit - only animate if the ShulkerBox hasn't been forced open already by an API call.
-             this.level.blockEvent(this.worldPosition, this.getBlockState().getBlock(), 1, this.openCount);
-             if (this.openCount <= 0) {
-                 this.level.gameEvent((Entity) entityhuman, (Holder) GameEvent.CONTAINER_CLOSE, this.worldPosition);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntitySign.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntitySign.patch
deleted file mode 100644
index 8c27e83ce3..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntitySign.patch
+++ /dev/null
@@ -1,154 +0,0 @@
---- a/net/minecraft/world/level/block/entity/TileEntitySign.java
-+++ b/net/minecraft/world/level/block/entity/TileEntitySign.java
-@@ -36,6 +36,16 @@
- import net.minecraft.world.phys.Vec3D;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import net.minecraft.nbt.NBTBase;
-+import net.minecraft.server.level.EntityPlayer;
-+import org.bukkit.block.sign.Side;
-+import org.bukkit.craftbukkit.block.CraftBlock;
-+import org.bukkit.craftbukkit.util.CraftChatMessage;
-+import org.bukkit.entity.Player;
-+import org.bukkit.event.block.SignChangeEvent;
-+// CraftBukkit end
-+
- public class TileEntitySign extends TileEntity {
- 
-     private static final Logger LOGGER = LogUtils.getLogger();
-@@ -101,7 +111,7 @@
-     protected void saveAdditional(NBTTagCompound nbttagcompound, HolderLookup.a holderlookup_a) {
-         super.saveAdditional(nbttagcompound, holderlookup_a);
-         DynamicOps<NBTBase> dynamicops = holderlookup_a.createSerializationContext(DynamicOpsNBT.INSTANCE);
--        DataResult dataresult = SignText.DIRECT_CODEC.encodeStart(dynamicops, this.frontText);
-+        DataResult<NBTBase> dataresult = SignText.DIRECT_CODEC.encodeStart(dynamicops, this.frontText); // CraftBukkit - decompile error
-         Logger logger = TileEntitySign.LOGGER;
- 
-         Objects.requireNonNull(logger);
-@@ -121,7 +131,7 @@
-     protected void loadAdditional(NBTTagCompound nbttagcompound, HolderLookup.a holderlookup_a) {
-         super.loadAdditional(nbttagcompound, holderlookup_a);
-         DynamicOps<NBTBase> dynamicops = holderlookup_a.createSerializationContext(DynamicOpsNBT.INSTANCE);
--        DataResult dataresult;
-+        DataResult<SignText> dataresult; // CraftBukkit - decompile error
-         Logger logger;
- 
-         if (nbttagcompound.contains("front_text")) {
-@@ -173,12 +183,13 @@
-     public void updateSignText(EntityHuman entityhuman, boolean flag, List<FilteredText> list) {
-         if (!this.isWaxed() && entityhuman.getUUID().equals(this.getPlayerWhoMayEdit()) && this.level != null) {
-             this.updateText((signtext) -> {
--                return this.setMessages(entityhuman, list, signtext);
-+                return this.setMessages(entityhuman, list, signtext, flag); // CraftBukkit
-             }, flag);
-             this.setAllowedPlayerEditor((UUID) null);
-             this.level.sendBlockUpdated(this.getBlockPos(), this.getBlockState(), this.getBlockState(), 3);
-         } else {
-             TileEntitySign.LOGGER.warn("Player {} just tried to change non-editable sign", entityhuman.getName().getString());
-+            ((EntityPlayer) entityhuman).connection.send(this.getUpdatePacket()); // CraftBukkit
-         }
-     }
- 
-@@ -188,7 +199,8 @@
-         return this.setText((SignText) unaryoperator.apply(signtext), flag);
-     }
- 
--    private SignText setMessages(EntityHuman entityhuman, List<FilteredText> list, SignText signtext) {
-+    private SignText setMessages(EntityHuman entityhuman, List<FilteredText> list, SignText signtext, boolean front) { // CraftBukkit
-+        SignText originalText = signtext; // CraftBukkit
-         for (int i = 0; i < list.size(); ++i) {
-             FilteredText filteredtext = (FilteredText) list.get(i);
-             ChatModifier chatmodifier = signtext.getMessage(i, entityhuman.isTextFilteringEnabled()).getStyle();
-@@ -200,6 +212,29 @@
-             }
-         }
- 
-+        // CraftBukkit start
-+        Player player = ((EntityPlayer) entityhuman).getBukkitEntity();
-+        String[] lines = new String[4];
-+
-+        for (int i = 0; i < list.size(); ++i) {
-+            lines[i] = CraftChatMessage.fromComponent(signtext.getMessage(i, entityhuman.isTextFilteringEnabled()));
-+        }
-+
-+        SignChangeEvent event = new SignChangeEvent(CraftBlock.at(this.level, this.worldPosition), player, lines.clone(), (front) ? Side.FRONT : Side.BACK);
-+        entityhuman.level().getCraftServer().getPluginManager().callEvent(event);
-+
-+        if (event.isCancelled()) {
-+            return originalText;
-+        }
-+
-+        IChatBaseComponent[] components = org.bukkit.craftbukkit.block.CraftSign.sanitizeLines(event.getLines());
-+        for (int i = 0; i < components.length; i++) {
-+            if (!Objects.equals(lines[i], event.getLine(i))) {
-+                signtext = signtext.setMessage(i, components[i]);
-+            }
-+        }
-+        // CraftBukkit end
-+
-         return signtext;
-     }
- 
-@@ -250,11 +285,40 @@
-         return flag1;
-     }
- 
--    private static CommandListenerWrapper createCommandSourceStack(@Nullable EntityHuman entityhuman, World world, BlockPosition blockposition) {
-+    // CraftBukkit start
-+    private final ICommandListener commandSource = new ICommandListener() {
-+
-+        @Override
-+        public void sendSystemMessage(IChatBaseComponent ichatbasecomponent) {}
-+
-+        @Override
-+        public org.bukkit.command.CommandSender getBukkitSender(CommandListenerWrapper wrapper) {
-+            return wrapper.getEntity() != null ? wrapper.getEntity().getBukkitEntity() : new org.bukkit.craftbukkit.command.CraftBlockCommandSender(wrapper, TileEntitySign.this);
-+        }
-+
-+        @Override
-+        public boolean acceptsSuccess() {
-+            return false;
-+        }
-+
-+        @Override
-+        public boolean acceptsFailure() {
-+            return false;
-+        }
-+
-+        @Override
-+        public boolean shouldInformAdmins() {
-+            return false;
-+        }
-+    };
-+
-+    private CommandListenerWrapper createCommandSourceStack(@Nullable EntityHuman entityhuman, World world, BlockPosition blockposition) {
-+        // CraftBukkit end
-         String s = entityhuman == null ? "Sign" : entityhuman.getName().getString();
-         Object object = entityhuman == null ? IChatBaseComponent.literal("Sign") : entityhuman.getDisplayName();
- 
--        return new CommandListenerWrapper(ICommandListener.NULL, Vec3D.atCenterOf(blockposition), Vec2F.ZERO, (WorldServer) world, 2, s, (IChatBaseComponent) object, world.getServer(), entityhuman);
-+        // CraftBukkit - commandSource
-+        return new CommandListenerWrapper(commandSource, Vec3D.atCenterOf(blockposition), Vec2F.ZERO, (WorldServer) world, 2, s, (IChatBaseComponent) object, world.getServer(), entityhuman);
-     }
- 
-     @Override
-@@ -273,12 +337,17 @@
- 
-     @Nullable
-     public UUID getPlayerWhoMayEdit() {
-+        // CraftBukkit start - unnecessary sign ticking removed, so do this lazily
-+        if (this.level != null && this.playerWhoMayEdit != null) {
-+            clearInvalidPlayerWhoMayEdit(this, this.level, this.playerWhoMayEdit);
-+        }
-+        // CraftBukkit end
-         return this.playerWhoMayEdit;
-     }
- 
-     private void markUpdated() {
-         this.setChanged();
--        this.level.sendBlockUpdated(this.getBlockPos(), this.getBlockState(), this.getBlockState(), 3);
-+        if (this.level != null) this.level.sendBlockUpdated(this.getBlockPos(), this.getBlockState(), this.getBlockState(), 3); // CraftBukkit - skip notify if world is null (SPIGOT-5122)
-     }
- 
-     public boolean isWaxed() {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityTypes.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityTypes.patch
deleted file mode 100644
index 89d94c46d7..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/TileEntityTypes.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/net/minecraft/world/level/block/entity/TileEntityTypes.java
-+++ b/net/minecraft/world/level/block/entity/TileEntityTypes.java
-@@ -66,7 +66,7 @@
-     public static final TileEntityTypes<CrafterBlockEntity> CRAFTER = register("crafter", CrafterBlockEntity::new, Blocks.CRAFTER);
-     public static final TileEntityTypes<TrialSpawnerBlockEntity> TRIAL_SPAWNER = register("trial_spawner", TrialSpawnerBlockEntity::new, Blocks.TRIAL_SPAWNER);
-     public static final TileEntityTypes<VaultBlockEntity> VAULT = register("vault", VaultBlockEntity::new, Blocks.VAULT);
--    private static final Set<TileEntityTypes<?>> OP_ONLY_CUSTOM_DATA = Set.of(TileEntityTypes.COMMAND_BLOCK, TileEntityTypes.LECTERN, TileEntityTypes.SIGN, TileEntityTypes.HANGING_SIGN, TileEntityTypes.MOB_SPAWNER, TileEntityTypes.TRIAL_SPAWNER);
-+    private static final Set<TileEntityTypes<?>> OP_ONLY_CUSTOM_DATA = Set.of(TileEntityTypes.COMMAND_BLOCK, TileEntityTypes.LECTERN, TileEntityTypes.SIGN, TileEntityTypes.HANGING_SIGN, TileEntityTypes.MOB_SPAWNER, TileEntityTypes.TRIAL_SPAWNER, TileEntityTypes.CHEST); // CraftBukkit
-     private final TileEntityTypes.a<? extends T> factory;
-     private final Set<Block> validBlocks;
-     private final Holder.c<TileEntityTypes<?>> builtInRegistryHolder;
-@@ -110,7 +110,7 @@
-     public T getBlockEntity(IBlockAccess iblockaccess, BlockPosition blockposition) {
-         TileEntity tileentity = iblockaccess.getBlockEntity(blockposition);
- 
--        return tileentity != null && tileentity.getType() == this ? tileentity : null;
-+        return tileentity != null && tileentity.getType() == this ? (T) tileentity : null; // CraftBukkit - decompile error
-     }
- 
-     public boolean onlyOpCanSetNbt() {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java.patch
similarity index 71%
rename from paper-server/patches/sources/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java.patch
index 51a8d8e138..da7f4a489a 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java.patch
@@ -1,19 +1,18 @@
 --- a/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java
 +++ b/net/minecraft/world/level/block/entity/trialspawner/TrialSpawner.java
-@@ -47,6 +47,12 @@
- import net.minecraft.world.phys.Vec3D;
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- 
+@@ -46,6 +46,11 @@
+ import net.minecraft.world.phys.HitResult;
+ import net.minecraft.world.phys.Vec3;
+ import net.minecraft.world.phys.shapes.CollisionContext;
 +// CraftBukkit start
 +import org.bukkit.craftbukkit.event.CraftEventFactory;
 +import org.bukkit.craftbukkit.inventory.CraftItemStack;
 +import org.bukkit.event.block.BlockDispenseLootEvent;
 +// CraftBukkit end
-+
+ 
  public final class TrialSpawner {
  
-     public static final String NORMAL_CONFIG_TAG_NAME = "normal_config";
-@@ -219,13 +225,18 @@
+@@ -219,14 +224,19 @@
                                  }
  
                                  entityinsentient.setPersistenceRequired();
@@ -24,22 +23,23 @@
                                  optional1.ifPresent(entityinsentient::equip);
                              }
  
--                            if (!worldserver.tryAddFreshEntityWithPassengers(entity)) {
+-                            if (!world.tryAddFreshEntityWithPassengers(entity)) {
 +                            // CraftBukkit start
-+                            if (org.bukkit.craftbukkit.event.CraftEventFactory.callTrialSpawnerSpawnEvent(entity, blockposition).isCancelled()) {
-+                                return Optional.empty();
-+                            }
-+                            if (!worldserver.tryAddFreshEntityWithPassengers(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.TRIAL_SPAWNER)) {
-+                                // CraftBukkit end
++                            if (org.bukkit.craftbukkit.event.CraftEventFactory.callTrialSpawnerSpawnEvent(entity, pos).isCancelled()) {
                                  return Optional.empty();
++                            }
++                            if (!world.tryAddFreshEntityWithPassengers(entity, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.TRIAL_SPAWNER)) {
++                                // CraftBukkit end
++                                return Optional.empty();
                              } else {
-                                 TrialSpawner.a trialspawner_a = this.isOminous ? TrialSpawner.a.OMINOUS : TrialSpawner.a.NORMAL;
-@@ -248,6 +259,15 @@
+                                 TrialSpawner.FlameParticle trialspawner_a = this.isOminous ? TrialSpawner.FlameParticle.OMINOUS : TrialSpawner.FlameParticle.NORMAL;
+ 
+@@ -248,6 +258,15 @@
          ObjectArrayList<ItemStack> objectarraylist = loottable.getRandomItems(lootparams);
  
          if (!objectarraylist.isEmpty()) {
 +            // CraftBukkit start
-+            BlockDispenseLootEvent spawnerDispenseLootEvent = CraftEventFactory.callBlockDispenseLootEvent(worldserver, blockposition, null, objectarraylist);
++            BlockDispenseLootEvent spawnerDispenseLootEvent = CraftEventFactory.callBlockDispenseLootEvent(world, pos, null, objectarraylist);
 +            if (spawnerDispenseLootEvent.isCancelled()) {
 +                return;
 +            }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerData.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerData.java.patch
similarity index 69%
rename from paper-server/patches/sources/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerData.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerData.java.patch
index e69745a455..20b5f75633 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerData.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/trialspawner/TrialSpawnerData.java.patch
@@ -3,18 +3,18 @@
 @@ -210,7 +210,7 @@
      }
  
-     public void resetAfterBecomingOminous(TrialSpawner trialspawner, WorldServer worldserver) {
+     public void resetAfterBecomingOminous(TrialSpawner logic, ServerLevel world) {
 -        Stream stream = this.currentMobs.stream();
 +        Stream<UUID> stream = this.currentMobs.stream(); // CraftBukkit - decompile error
  
-         Objects.requireNonNull(worldserver);
-         stream.map(worldserver::getEntity).forEach((entity) -> {
+         Objects.requireNonNull(world);
+         stream.map(world::getEntity).forEach((entity) -> {
 @@ -222,7 +222,7 @@
-                     entityinsentient.dropPreservedEquipment(worldserver);
+                     entityinsentient.dropPreservedEquipment(world);
                  }
  
 -                entity.remove(Entity.RemovalReason.DISCARDED);
 +                entity.remove(Entity.RemovalReason.DISCARDED, org.bukkit.event.entity.EntityRemoveEvent.Cause.DESPAWN); // CraftBukkit - Add bukkit remove cause;
              }
          });
-         if (!trialspawner.getOminousConfig().spawnPotentialsDefinition().isEmpty()) {
+         if (!logic.getOminousConfig().spawnPotentialsDefinition().isEmpty()) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/entity/vault/VaultBlockEntity.patch b/paper-server/patches/sources/net/minecraft/world/level/block/entity/vault/VaultBlockEntity.java.patch
similarity index 70%
rename from paper-server/patches/sources/net/minecraft/world/level/block/entity/vault/VaultBlockEntity.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/entity/vault/VaultBlockEntity.java.patch
index a44d02ca05..928e901a76 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/entity/vault/VaultBlockEntity.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/entity/vault/VaultBlockEntity.java.patch
@@ -1,7 +1,7 @@
 --- a/net/minecraft/world/level/block/entity/vault/VaultBlockEntity.java
 +++ b/net/minecraft/world/level/block/entity/vault/VaultBlockEntity.java
 @@ -46,6 +46,13 @@
- import net.minecraft.world.phys.Vec3D;
+ import net.minecraft.world.phys.Vec3;
  import org.slf4j.Logger;
  
 +// CraftBukkit start
@@ -11,11 +11,11 @@
 +import org.bukkit.event.block.VaultDisplayItemEvent;
 +// CraftBukkit end
 +
- public class VaultBlockEntity extends TileEntity {
+ public class VaultBlockEntity extends BlockEntity {
  
      private static final Logger LOGGER = LogUtils.getLogger();
 @@ -96,18 +103,18 @@
-             dataresult = VaultServerData.CODEC.parse(dynamicops, nbttagcompound.get("server_data"));
+             dataresult = VaultServerData.CODEC.parse(dynamicops, nbt.get("server_data"));
              logger = VaultBlockEntity.LOGGER;
              Objects.requireNonNull(logger);
 -            optional = dataresult.resultOrPartial(logger::error);
@@ -27,8 +27,8 @@
 +            ((Optional<VaultServerData>) optional).ifPresent(vaultserverdata::set); // CraftBukkit - decompile error
          }
  
-         if (nbttagcompound.contains("config")) {
-             dataresult = VaultConfig.CODEC.parse(dynamicops, nbttagcompound.get("config"));
+         if (nbt.contains("config")) {
+             dataresult = VaultConfig.CODEC.parse(dynamicops, nbt.get("config"));
              logger = VaultBlockEntity.LOGGER;
              Objects.requireNonNull(logger);
 -            dataresult.resultOrPartial(logger::error).ifPresent((vaultconfig) -> {
@@ -37,7 +37,7 @@
              });
          }
 @@ -116,11 +123,11 @@
-             dataresult = VaultSharedData.CODEC.parse(dynamicops, nbttagcompound.get("shared_data"));
+             dataresult = VaultSharedData.CODEC.parse(dynamicops, nbt.get("shared_data"));
              logger = VaultBlockEntity.LOGGER;
              Objects.requireNonNull(logger);
 -            optional = dataresult.resultOrPartial(logger::error);
@@ -52,31 +52,32 @@
      }
 @@ -320,6 +327,14 @@
                      if (!list.isEmpty()) {
-                         entityhuman.awardStat(StatisticList.ITEM_USED.get(itemstack.getItem()));
-                         itemstack.consume(vaultconfig.keyItem().getCount(), entityhuman);
+                         player.awardStat(Stats.ITEM_USED.get(stack.getItem()));
+                         stack.consume(config.keyItem().getCount(), player);
 +                        // CraftBukkit start
-+                        BlockDispenseLootEvent vaultDispenseLootEvent = CraftEventFactory.callBlockDispenseLootEvent(worldserver, blockposition, entityhuman, list);
++                        BlockDispenseLootEvent vaultDispenseLootEvent = CraftEventFactory.callBlockDispenseLootEvent(world, pos, player, list);
 +                        if (vaultDispenseLootEvent.isCancelled()) {
 +                            return;
 +                        }
 +
 +                        list = vaultDispenseLootEvent.getDispensedLoot().stream().map(CraftItemStack::asNMSCopy).toList();
 +                        // CraftBukkit end
-                         unlock(worldserver, iblockdata, blockposition, vaultconfig, vaultserverdata, vaultshareddata, list);
-                         vaultserverdata.addToRewardedPlayers(entityhuman);
-                         vaultshareddata.updateConnectedPlayersWithinRange(worldserver, blockposition, vaultserverdata, vaultconfig, vaultconfig.deactivationRange());
-@@ -341,6 +356,14 @@
-                 vaultshareddata.setDisplayItem(ItemStack.EMPTY);
+                         Server.unlock(world, state, pos, config, serverData, sharedData, list);
+                         serverData.addToRewardedPlayers(player);
+                         sharedData.updateConnectedPlayersWithinRange(world, pos, serverData, config, config.deactivationRange());
+@@ -341,7 +356,15 @@
+                 sharedData.setDisplayItem(ItemStack.EMPTY);
              } else {
-                 ItemStack itemstack = getRandomDisplayItemFromLootTable(worldserver, blockposition, (ResourceKey) vaultconfig.overrideLootTableToDisplay().orElse(vaultconfig.lootTable()));
+                 ItemStack itemstack = Server.getRandomDisplayItemFromLootTable(world, pos, (ResourceKey) config.overrideLootTableToDisplay().orElse(config.lootTable()));
 +                // CraftBukkit start
-+                VaultDisplayItemEvent event = CraftEventFactory.callVaultDisplayItemEvent(worldserver, blockposition, itemstack);
++                VaultDisplayItemEvent event = CraftEventFactory.callVaultDisplayItemEvent(world, pos, itemstack);
 +                if (event.isCancelled()) {
 +                    return;
 +                }
-+
+ 
 +                itemstack = CraftItemStack.asNMSCopy(event.getDisplayItem());
 +                // CraftBukkit end
- 
-                 vaultshareddata.setDisplayItem(itemstack);
++
+                 sharedData.setDisplayItem(itemstack);
              }
+         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/grower/TreeGrower.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/grower/TreeGrower.java.patch
new file mode 100644
index 0000000000..859e74b185
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/grower/TreeGrower.java.patch
@@ -0,0 +1,126 @@
+--- a/net/minecraft/world/level/block/grower/TreeGrower.java
++++ b/net/minecraft/world/level/block/grower/TreeGrower.java
+@@ -20,9 +20,14 @@
+ import net.minecraft.world.level.LevelAccessor;
+ import net.minecraft.world.level.block.Block;
+ import net.minecraft.world.level.block.Blocks;
++import net.minecraft.world.level.block.SaplingBlock;
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.level.chunk.ChunkGenerator;
+ import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
++// CraftBukkit start
++import net.minecraft.data.worldgen.features.TreeFeatures;
++import org.bukkit.TreeType;
++// CraftBukkit end
+ 
+ public final class TreeGrower {
+ 
+@@ -75,21 +80,22 @@
+             }
+         }
+ 
+-        return flowersNearby && this.flowers.isPresent() ? (ResourceKey) this.flowers.get() : (ResourceKey) this.tree.orElse((Object) null);
++        return flowersNearby && this.flowers.isPresent() ? (ResourceKey) this.flowers.get() : (ResourceKey) this.tree.orElse(null); // CraftBukkit - decompile error
+     }
+ 
+     @Nullable
+     private ResourceKey<ConfiguredFeature<?, ?>> getConfiguredMegaFeature(RandomSource random) {
+-        return this.secondaryMegaTree.isPresent() && random.nextFloat() < this.secondaryChance ? (ResourceKey) this.secondaryMegaTree.get() : (ResourceKey) this.megaTree.orElse((Object) null);
++        return this.secondaryMegaTree.isPresent() && random.nextFloat() < this.secondaryChance ? (ResourceKey) this.secondaryMegaTree.get() : (ResourceKey) this.megaTree.orElse(null); // CraftBukkit - decompile error
+     }
+ 
+     public boolean growTree(ServerLevel world, ChunkGenerator chunkGenerator, BlockPos pos, BlockState state, RandomSource random) {
+         ResourceKey<ConfiguredFeature<?, ?>> resourcekey = this.getConfiguredMegaFeature(random);
+ 
+         if (resourcekey != null) {
+-            Holder<ConfiguredFeature<?, ?>> holder = (Holder) world.registryAccess().lookupOrThrow(Registries.CONFIGURED_FEATURE).get(resourcekey).orElse((Object) null);
++            Holder<ConfiguredFeature<?, ?>> holder = (Holder) world.registryAccess().lookupOrThrow(Registries.CONFIGURED_FEATURE).get(resourcekey).orElse(null); // CraftBukkit - decompile error
+ 
+             if (holder != null) {
++                this.setTreeType(holder); // CraftBukkit
+                 for (int i = 0; i >= -1; --i) {
+                     for (int j = 0; j >= -1; --j) {
+                         if (TreeGrower.isTwoByTwoSapling(state, world, pos, i, j)) {
+@@ -120,11 +126,12 @@
+         if (resourcekey1 == null) {
+             return false;
+         } else {
+-            Holder<ConfiguredFeature<?, ?>> holder1 = (Holder) world.registryAccess().lookupOrThrow(Registries.CONFIGURED_FEATURE).get(resourcekey1).orElse((Object) null);
++            Holder<ConfiguredFeature<?, ?>> holder1 = (Holder) world.registryAccess().lookupOrThrow(Registries.CONFIGURED_FEATURE).get(resourcekey1).orElse(null); // CraftBukkit - decompile error
+ 
+             if (holder1 == null) {
+                 return false;
+             } else {
++                this.setTreeType(holder1); // CraftBukkit
+                 ConfiguredFeature<?, ?> worldgenfeatureconfigured1 = (ConfiguredFeature) holder1.value();
+                 BlockState iblockdata2 = world.getFluidState(pos).createLegacyBlock();
+ 
+@@ -165,11 +172,66 @@
+         return true;
+     }
+ 
++    // CraftBukkit start
++    private void setTreeType(Holder<ConfiguredFeature<?, ?>> holder) {
++        ResourceKey<ConfiguredFeature<?, ?>> worldgentreeabstract = holder.unwrapKey().get();
++        if (worldgentreeabstract == TreeFeatures.OAK || worldgentreeabstract == TreeFeatures.OAK_BEES_005) {
++            SaplingBlock.treeType = TreeType.TREE;
++        } else if (worldgentreeabstract == TreeFeatures.HUGE_RED_MUSHROOM) {
++            SaplingBlock.treeType = TreeType.RED_MUSHROOM;
++        } else if (worldgentreeabstract == TreeFeatures.HUGE_BROWN_MUSHROOM) {
++            SaplingBlock.treeType = TreeType.BROWN_MUSHROOM;
++        } else if (worldgentreeabstract == TreeFeatures.JUNGLE_TREE) {
++            SaplingBlock.treeType = TreeType.COCOA_TREE;
++        } else if (worldgentreeabstract == TreeFeatures.JUNGLE_TREE_NO_VINE) {
++            SaplingBlock.treeType = TreeType.SMALL_JUNGLE;
++        } else if (worldgentreeabstract == TreeFeatures.PINE) {
++            SaplingBlock.treeType = TreeType.TALL_REDWOOD;
++        } else if (worldgentreeabstract == TreeFeatures.SPRUCE) {
++            SaplingBlock.treeType = TreeType.REDWOOD;
++        } else if (worldgentreeabstract == TreeFeatures.ACACIA) {
++            SaplingBlock.treeType = TreeType.ACACIA;
++        } else if (worldgentreeabstract == TreeFeatures.BIRCH || worldgentreeabstract == TreeFeatures.BIRCH_BEES_005) {
++            SaplingBlock.treeType = TreeType.BIRCH;
++        } else if (worldgentreeabstract == TreeFeatures.SUPER_BIRCH_BEES_0002) {
++            SaplingBlock.treeType = TreeType.TALL_BIRCH;
++        } else if (worldgentreeabstract == TreeFeatures.SWAMP_OAK) {
++            SaplingBlock.treeType = TreeType.SWAMP;
++        } else if (worldgentreeabstract == TreeFeatures.FANCY_OAK || worldgentreeabstract == TreeFeatures.FANCY_OAK_BEES_005) {
++            SaplingBlock.treeType = TreeType.BIG_TREE;
++        } else if (worldgentreeabstract == TreeFeatures.JUNGLE_BUSH) {
++            SaplingBlock.treeType = TreeType.JUNGLE_BUSH;
++        } else if (worldgentreeabstract == TreeFeatures.DARK_OAK) {
++            SaplingBlock.treeType = TreeType.DARK_OAK;
++        } else if (worldgentreeabstract == TreeFeatures.MEGA_SPRUCE) {
++            SaplingBlock.treeType = TreeType.MEGA_REDWOOD;
++        } else if (worldgentreeabstract == TreeFeatures.MEGA_PINE) {
++            SaplingBlock.treeType = TreeType.MEGA_PINE;
++        } else if (worldgentreeabstract == TreeFeatures.MEGA_JUNGLE_TREE) {
++            SaplingBlock.treeType = TreeType.JUNGLE;
++        } else if (worldgentreeabstract == TreeFeatures.AZALEA_TREE) {
++            SaplingBlock.treeType = TreeType.AZALEA;
++        } else if (worldgentreeabstract == TreeFeatures.MANGROVE) {
++            SaplingBlock.treeType = TreeType.MANGROVE;
++        } else if (worldgentreeabstract == TreeFeatures.TALL_MANGROVE) {
++            SaplingBlock.treeType = TreeType.TALL_MANGROVE;
++        } else if (worldgentreeabstract == TreeFeatures.CHERRY || worldgentreeabstract == TreeFeatures.CHERRY_BEES_005) {
++            SaplingBlock.treeType = TreeType.CHERRY;
++        } else if (worldgentreeabstract == TreeFeatures.PALE_OAK || worldgentreeabstract == TreeFeatures.PALE_OAK_BONEMEAL) {
++            SaplingBlock.treeType = TreeType.PALE_OAK;
++        } else if (worldgentreeabstract == TreeFeatures.PALE_OAK_CREAKING) {
++            SaplingBlock.treeType = TreeType.PALE_OAK_CREAKING;
++        } else {
++            throw new IllegalArgumentException("Unknown tree generator " + worldgentreeabstract);
++        }
++    }
++    // CraftBukkit end
++
+     static {
+-        Function function = (worldgentreeprovider) -> {
++        Function<TreeGrower, String> function = (worldgentreeprovider) -> { // CraftBukkit - decompile error
+             return worldgentreeprovider.name;
+         };
+-        Map map = TreeGrower.GROWERS;
++        Map<String, TreeGrower> map = TreeGrower.GROWERS; // CraftBukkit - decompile error
+ 
+         Objects.requireNonNull(map);
+         CODEC = Codec.stringResolver(function, map::get);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/grower/WorldGenTreeProvider.patch b/paper-server/patches/sources/net/minecraft/world/level/block/grower/WorldGenTreeProvider.patch
deleted file mode 100644
index f5710a773d..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/grower/WorldGenTreeProvider.patch
+++ /dev/null
@@ -1,124 +0,0 @@
---- a/net/minecraft/world/level/block/grower/WorldGenTreeProvider.java
-+++ b/net/minecraft/world/level/block/grower/WorldGenTreeProvider.java
-@@ -24,6 +24,12 @@
- import net.minecraft.world.level.chunk.ChunkGenerator;
- import net.minecraft.world.level.levelgen.feature.WorldGenFeatureConfigured;
- 
-+// CraftBukkit start
-+import net.minecraft.data.worldgen.features.TreeFeatures;
-+import net.minecraft.world.level.block.BlockSapling;
-+import org.bukkit.TreeType;
-+// CraftBukkit end
-+
- public final class WorldGenTreeProvider {
- 
-     private static final Map<String, WorldGenTreeProvider> GROWERS = new Object2ObjectArrayMap();
-@@ -75,21 +81,22 @@
-             }
-         }
- 
--        return flag && this.flowers.isPresent() ? (ResourceKey) this.flowers.get() : (ResourceKey) this.tree.orElse((Object) null);
-+        return flag && this.flowers.isPresent() ? (ResourceKey) this.flowers.get() : (ResourceKey) this.tree.orElse(null); // CraftBukkit - decompile error
-     }
- 
-     @Nullable
-     private ResourceKey<WorldGenFeatureConfigured<?, ?>> getConfiguredMegaFeature(RandomSource randomsource) {
--        return this.secondaryMegaTree.isPresent() && randomsource.nextFloat() < this.secondaryChance ? (ResourceKey) this.secondaryMegaTree.get() : (ResourceKey) this.megaTree.orElse((Object) null);
-+        return this.secondaryMegaTree.isPresent() && randomsource.nextFloat() < this.secondaryChance ? (ResourceKey) this.secondaryMegaTree.get() : (ResourceKey) this.megaTree.orElse(null); // CraftBukkit - decompile error
-     }
- 
-     public boolean growTree(WorldServer worldserver, ChunkGenerator chunkgenerator, BlockPosition blockposition, IBlockData iblockdata, RandomSource randomsource) {
-         ResourceKey<WorldGenFeatureConfigured<?, ?>> resourcekey = this.getConfiguredMegaFeature(randomsource);
- 
-         if (resourcekey != null) {
--            Holder<WorldGenFeatureConfigured<?, ?>> holder = (Holder) worldserver.registryAccess().lookupOrThrow(Registries.CONFIGURED_FEATURE).get(resourcekey).orElse((Object) null);
-+            Holder<WorldGenFeatureConfigured<?, ?>> holder = (Holder) worldserver.registryAccess().lookupOrThrow(Registries.CONFIGURED_FEATURE).get(resourcekey).orElse(null); // CraftBukkit - decompile error
- 
-             if (holder != null) {
-+                setTreeType(holder); // CraftBukkit
-                 for (int i = 0; i >= -1; --i) {
-                     for (int j = 0; j >= -1; --j) {
-                         if (isTwoByTwoSapling(iblockdata, worldserver, blockposition, i, j)) {
-@@ -120,11 +127,12 @@
-         if (resourcekey1 == null) {
-             return false;
-         } else {
--            Holder<WorldGenFeatureConfigured<?, ?>> holder1 = (Holder) worldserver.registryAccess().lookupOrThrow(Registries.CONFIGURED_FEATURE).get(resourcekey1).orElse((Object) null);
-+            Holder<WorldGenFeatureConfigured<?, ?>> holder1 = (Holder) worldserver.registryAccess().lookupOrThrow(Registries.CONFIGURED_FEATURE).get(resourcekey1).orElse(null); // CraftBukkit - decompile error
- 
-             if (holder1 == null) {
-                 return false;
-             } else {
-+                setTreeType(holder1); // CraftBukkit
-                 WorldGenFeatureConfigured<?, ?> worldgenfeatureconfigured1 = (WorldGenFeatureConfigured) holder1.value();
-                 IBlockData iblockdata2 = worldserver.getFluidState(blockposition).createLegacyBlock();
- 
-@@ -165,11 +173,66 @@
-         return true;
-     }
- 
-+    // CraftBukkit start
-+    private void setTreeType(Holder<WorldGenFeatureConfigured<?, ?>> holder) {
-+        ResourceKey<WorldGenFeatureConfigured<?, ?>> worldgentreeabstract = holder.unwrapKey().get();
-+        if (worldgentreeabstract == TreeFeatures.OAK || worldgentreeabstract == TreeFeatures.OAK_BEES_005) {
-+            BlockSapling.treeType = TreeType.TREE;
-+        } else if (worldgentreeabstract == TreeFeatures.HUGE_RED_MUSHROOM) {
-+            BlockSapling.treeType = TreeType.RED_MUSHROOM;
-+        } else if (worldgentreeabstract == TreeFeatures.HUGE_BROWN_MUSHROOM) {
-+            BlockSapling.treeType = TreeType.BROWN_MUSHROOM;
-+        } else if (worldgentreeabstract == TreeFeatures.JUNGLE_TREE) {
-+            BlockSapling.treeType = TreeType.COCOA_TREE;
-+        } else if (worldgentreeabstract == TreeFeatures.JUNGLE_TREE_NO_VINE) {
-+            BlockSapling.treeType = TreeType.SMALL_JUNGLE;
-+        } else if (worldgentreeabstract == TreeFeatures.PINE) {
-+            BlockSapling.treeType = TreeType.TALL_REDWOOD;
-+        } else if (worldgentreeabstract == TreeFeatures.SPRUCE) {
-+            BlockSapling.treeType = TreeType.REDWOOD;
-+        } else if (worldgentreeabstract == TreeFeatures.ACACIA) {
-+            BlockSapling.treeType = TreeType.ACACIA;
-+        } else if (worldgentreeabstract == TreeFeatures.BIRCH || worldgentreeabstract == TreeFeatures.BIRCH_BEES_005) {
-+            BlockSapling.treeType = TreeType.BIRCH;
-+        } else if (worldgentreeabstract == TreeFeatures.SUPER_BIRCH_BEES_0002) {
-+            BlockSapling.treeType = TreeType.TALL_BIRCH;
-+        } else if (worldgentreeabstract == TreeFeatures.SWAMP_OAK) {
-+            BlockSapling.treeType = TreeType.SWAMP;
-+        } else if (worldgentreeabstract == TreeFeatures.FANCY_OAK || worldgentreeabstract == TreeFeatures.FANCY_OAK_BEES_005) {
-+            BlockSapling.treeType = TreeType.BIG_TREE;
-+        } else if (worldgentreeabstract == TreeFeatures.JUNGLE_BUSH) {
-+            BlockSapling.treeType = TreeType.JUNGLE_BUSH;
-+        } else if (worldgentreeabstract == TreeFeatures.DARK_OAK) {
-+            BlockSapling.treeType = TreeType.DARK_OAK;
-+        } else if (worldgentreeabstract == TreeFeatures.MEGA_SPRUCE) {
-+            BlockSapling.treeType = TreeType.MEGA_REDWOOD;
-+        } else if (worldgentreeabstract == TreeFeatures.MEGA_PINE) {
-+            BlockSapling.treeType = TreeType.MEGA_PINE;
-+        } else if (worldgentreeabstract == TreeFeatures.MEGA_JUNGLE_TREE) {
-+            BlockSapling.treeType = TreeType.JUNGLE;
-+        } else if (worldgentreeabstract == TreeFeatures.AZALEA_TREE) {
-+            BlockSapling.treeType = TreeType.AZALEA;
-+        } else if (worldgentreeabstract == TreeFeatures.MANGROVE) {
-+            BlockSapling.treeType = TreeType.MANGROVE;
-+        } else if (worldgentreeabstract == TreeFeatures.TALL_MANGROVE) {
-+            BlockSapling.treeType = TreeType.TALL_MANGROVE;
-+        } else if (worldgentreeabstract == TreeFeatures.CHERRY || worldgentreeabstract == TreeFeatures.CHERRY_BEES_005) {
-+            BlockSapling.treeType = TreeType.CHERRY;
-+        } else if (worldgentreeabstract == TreeFeatures.PALE_OAK || worldgentreeabstract == TreeFeatures.PALE_OAK_BONEMEAL) {
-+            BlockSapling.treeType = TreeType.PALE_OAK;
-+        } else if (worldgentreeabstract == TreeFeatures.PALE_OAK_CREAKING) {
-+            BlockSapling.treeType = TreeType.PALE_OAK_CREAKING;
-+        } else {
-+            throw new IllegalArgumentException("Unknown tree generator " + worldgentreeabstract);
-+        }
-+    }
-+    // CraftBukkit end
-+
-     static {
--        Function function = (worldgentreeprovider) -> {
-+        Function<WorldGenTreeProvider, String> function = (worldgentreeprovider) -> { // CraftBukkit - decompile error
-             return worldgentreeprovider.name;
-         };
--        Map map = WorldGenTreeProvider.GROWERS;
-+        Map<String, WorldGenTreeProvider> map = WorldGenTreeProvider.GROWERS; // CraftBukkit - decompile error
- 
-         Objects.requireNonNull(map);
-         CODEC = Codec.stringResolver(function, map::get);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/piston/BlockPiston.patch b/paper-server/patches/sources/net/minecraft/world/level/block/piston/PistonBaseBlock.java.patch
similarity index 65%
rename from paper-server/patches/sources/net/minecraft/world/level/block/piston/BlockPiston.patch
rename to paper-server/patches/sources/net/minecraft/world/level/block/piston/PistonBaseBlock.java.patch
index 7b2160e5ec..e987c10989 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/block/piston/BlockPiston.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/piston/PistonBaseBlock.java.patch
@@ -1,9 +1,9 @@
---- a/net/minecraft/world/level/block/piston/BlockPiston.java
-+++ b/net/minecraft/world/level/block/piston/BlockPiston.java
-@@ -45,6 +45,14 @@
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- import net.minecraft.world.phys.shapes.VoxelShapes;
- 
+--- a/net/minecraft/world/level/block/piston/PistonBaseBlock.java
++++ b/net/minecraft/world/level/block/piston/PistonBaseBlock.java
+@@ -44,6 +44,13 @@
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.Shapes;
+ import net.minecraft.world.phys.shapes.VoxelShape;
 +// CraftBukkit start
 +import com.google.common.collect.ImmutableList;
 +import java.util.AbstractList;
@@ -11,17 +11,16 @@
 +import org.bukkit.event.block.BlockPistonRetractEvent;
 +import org.bukkit.event.block.BlockPistonExtendEvent;
 +// CraftBukkit end
-+
- public class BlockPiston extends BlockDirectional {
  
-     public static final MapCodec<BlockPiston> CODEC = RecordCodecBuilder.mapCodec((instance) -> {
-@@ -155,6 +163,18 @@
+ public class PistonBaseBlock extends DirectionalBlock {
+ 
+@@ -155,6 +162,18 @@
                  }
              }
  
 +            // CraftBukkit start
 +            if (!this.isSticky) {
-+                org.bukkit.block.Block block = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
++                org.bukkit.block.Block block = world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ());
 +                BlockPistonRetractEvent event = new BlockPistonRetractEvent(block, ImmutableList.<org.bukkit.block.Block>of(), CraftBlock.notchToBlockFace(enumdirection));
 +                world.getCraftServer().getPluginManager().callEvent(event);
 +
@@ -31,18 +30,18 @@
 +            }
 +            // PAIL: checkME - what happened to setTypeAndData?
 +            // CraftBukkit end
-             world.blockEvent(blockposition, this, b0, enumdirection.get3DDataValue());
+             world.blockEvent(pos, this, b0, enumdirection.get3DDataValue());
          }
  
-@@ -335,6 +355,48 @@
-             IBlockData[] aiblockdata = new IBlockData[list.size() + list2.size()];
-             EnumDirection enumdirection1 = flag ? enumdirection : enumdirection.getOpposite();
+@@ -335,7 +354,49 @@
+             BlockState[] aiblockdata = new BlockState[list.size() + list2.size()];
+             Direction enumdirection1 = extend ? dir : dir.getOpposite();
              int i = 0;
 +            // CraftBukkit start
-+            final org.bukkit.block.Block bblock = world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ());
-+
-+            final List<BlockPosition> moved = pistonextendschecker.getToPush();
-+            final List<BlockPosition> broken = pistonextendschecker.getToDestroy();
++            final org.bukkit.block.Block bblock = world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ());
+ 
++            final List<BlockPos> moved = pistonextendschecker.getToPush();
++            final List<BlockPos> broken = pistonextendschecker.getToDestroy();
 +
 +            List<org.bukkit.block.Block> blocks = new AbstractList<org.bukkit.block.Block>() {
 +
@@ -53,15 +52,15 @@
 +
 +                @Override
 +                public org.bukkit.block.Block get(int index) {
-+                    if (index >= size() || index < 0) {
++                    if (index >= this.size() || index < 0) {
 +                        throw new ArrayIndexOutOfBoundsException(index);
 +                    }
-+                    BlockPosition pos = (BlockPosition) (index < moved.size() ? moved.get(index) : broken.get(index - moved.size()));
++                    BlockPos pos = (BlockPos) (index < moved.size() ? moved.get(index) : broken.get(index - moved.size()));
 +                    return bblock.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ());
 +                }
 +            };
 +            org.bukkit.event.block.BlockPistonEvent event;
-+            if (flag) {
++            if (extend) {
 +                event = new BlockPistonExtendEvent(bblock, blocks, CraftBlock.notchToBlockFace(enumdirection1));
 +            } else {
 +                event = new BlockPistonRetractEvent(bblock, blocks, CraftBlock.notchToBlockFace(enumdirection1));
@@ -69,10 +68,10 @@
 +            world.getCraftServer().getPluginManager().callEvent(event);
 +
 +            if (event.isCancelled()) {
-+                for (BlockPosition b : broken) {
++                for (BlockPos b : broken) {
 +                    world.sendBlockUpdated(b, Blocks.AIR.defaultBlockState(), world.getBlockState(b), 3);
 +                }
-+                for (BlockPosition b : moved) {
++                for (BlockPos b : moved) {
 +                    world.sendBlockUpdated(b, Blocks.AIR.defaultBlockState(), world.getBlockState(b), 3);
 +                    b = b.relative(enumdirection1);
 +                    world.sendBlockUpdated(b, Blocks.AIR.defaultBlockState(), world.getBlockState(b), 3);
@@ -80,6 +79,7 @@
 +                return false;
 +            }
 +            // CraftBukkit end
- 
-             BlockPosition blockposition3;
++
+             BlockPos blockposition3;
              int j;
+             BlockState iblockdata1;
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/state/BlockBase.patch b/paper-server/patches/sources/net/minecraft/world/level/block/state/BlockBase.patch
deleted file mode 100644
index 55d783e127..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/block/state/BlockBase.patch
+++ /dev/null
@@ -1,55 +0,0 @@
---- a/net/minecraft/world/level/block/state/BlockBase.java
-+++ b/net/minecraft/world/level/block/state/BlockBase.java
-@@ -84,6 +84,11 @@
- import net.minecraft.world.phys.shapes.VoxelShapeCollision;
- import net.minecraft.world.phys.shapes.VoxelShapes;
- 
-+// CraftBukkit start
-+import net.minecraft.world.item.context.ItemActionContext;
-+import net.minecraft.world.level.ServerExplosion;
-+// CraftBukkit end
-+
- public abstract class BlockBase implements FeatureElement {
- 
-     protected static final EnumDirection[] UPDATE_SHAPE_ORDER = new EnumDirection[]{EnumDirection.WEST, EnumDirection.EAST, EnumDirection.NORTH, EnumDirection.SOUTH, EnumDirection.DOWN, EnumDirection.UP};
-@@ -158,6 +163,12 @@
- 
-     protected void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag) {}
- 
-+    // CraftBukkit start
-+    protected void onPlace(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag, @Nullable ItemActionContext context) {
-+        this.onPlace(iblockdata, world, blockposition, iblockdata1, flag);
-+    }
-+    // CraftBukkit end
-+
-     protected void onRemove(IBlockData iblockdata, World world, BlockPosition blockposition, IBlockData iblockdata1, boolean flag) {
-         if (iblockdata.hasBlockEntity() && !iblockdata.is(iblockdata1.getBlock())) {
-             world.removeBlockEntity(blockposition);
-@@ -174,8 +185,10 @@
-                 TileEntity tileentity = iblockdata.hasBlockEntity() ? worldserver.getBlockEntity(blockposition) : null;
-                 LootParams.a lootparams_a = (new LootParams.a(worldserver)).withParameter(LootContextParameters.ORIGIN, Vec3D.atCenterOf(blockposition)).withParameter(LootContextParameters.TOOL, ItemStack.EMPTY).withOptionalParameter(LootContextParameters.BLOCK_ENTITY, tileentity).withOptionalParameter(LootContextParameters.THIS_ENTITY, explosion.getDirectSourceEntity());
- 
--                if (explosion.getBlockInteraction() == Explosion.Effect.DESTROY_WITH_DECAY) {
--                    lootparams_a.withParameter(LootContextParameters.EXPLOSION_RADIUS, explosion.radius());
-+                // CraftBukkit start - add yield
-+                if (explosion instanceof ServerExplosion serverExplosion && serverExplosion.yield < 1.0F) {
-+                    lootparams_a.withParameter(LootContextParameters.EXPLOSION_RADIUS, 1.0F / serverExplosion.yield);
-+                    // CraftBukkit end
-                 }
- 
-                 iblockdata.spawnAfterBreak(worldserver, blockposition, ItemStack.EMPTY, flag);
-@@ -1125,7 +1138,13 @@
-         }
- 
-         public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata, boolean flag) {
--            this.getBlock().onPlace(this.asState(), world, blockposition, iblockdata, flag);
-+            // CraftBukkit start
-+            this.onPlace(world, blockposition, iblockdata, flag, null);
-+        }
-+
-+        public void onPlace(World world, BlockPosition blockposition, IBlockData iblockdata, boolean flag, @Nullable ItemActionContext context) {
-+            this.getBlock().onPlace(this.asState(), world, blockposition, iblockdata, flag, context);
-+            // CraftBukkit end
-         }
- 
-         public void onRemove(World world, BlockPosition blockposition, IBlockData iblockdata, boolean flag) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/block/state/BlockBehaviour.java.patch b/paper-server/patches/sources/net/minecraft/world/level/block/state/BlockBehaviour.java.patch
new file mode 100644
index 0000000000..ec2972a8ed
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/block/state/BlockBehaviour.java.patch
@@ -0,0 +1,62 @@
+--- a/net/minecraft/world/level/block/state/BlockBehaviour.java
++++ b/net/minecraft/world/level/block/state/BlockBehaviour.java
+@@ -46,6 +46,7 @@
+ import net.minecraft.world.item.Item;
+ import net.minecraft.world.item.ItemStack;
+ import net.minecraft.world.item.context.BlockPlaceContext;
++import net.minecraft.world.item.context.UseOnContext;
+ import net.minecraft.world.level.BlockGetter;
+ import net.minecraft.world.level.EmptyBlockGetter;
+ import net.minecraft.world.level.Explosion;
+@@ -83,6 +84,8 @@
+ import net.minecraft.world.phys.shapes.CollisionContext;
+ import net.minecraft.world.phys.shapes.Shapes;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++import net.minecraft.world.level.ServerExplosion;
++// CraftBukkit end
+ 
+ public abstract class BlockBehaviour implements FeatureElement {
+ 
+@@ -158,6 +161,12 @@
+ 
+     protected void onPlace(BlockState state, Level world, BlockPos pos, BlockState oldState, boolean notify) {}
+ 
++    // CraftBukkit start
++    protected void onPlace(BlockState iblockdata, Level world, BlockPos blockposition, BlockState iblockdata1, boolean flag, @Nullable UseOnContext context) {
++        this.onPlace(iblockdata, world, blockposition, iblockdata1, flag);
++    }
++    // CraftBukkit end
++
+     protected void onRemove(BlockState state, Level world, BlockPos pos, BlockState newState, boolean moved) {
+         if (state.hasBlockEntity() && !state.is(newState.getBlock())) {
+             world.removeBlockEntity(pos);
+@@ -174,8 +183,10 @@
+                 BlockEntity tileentity = state.hasBlockEntity() ? world.getBlockEntity(pos) : null;
+                 LootParams.Builder lootparams_a = (new LootParams.Builder(world)).withParameter(LootContextParams.ORIGIN, Vec3.atCenterOf(pos)).withParameter(LootContextParams.TOOL, ItemStack.EMPTY).withOptionalParameter(LootContextParams.BLOCK_ENTITY, tileentity).withOptionalParameter(LootContextParams.THIS_ENTITY, explosion.getDirectSourceEntity());
+ 
+-                if (explosion.getBlockInteraction() == Explosion.BlockInteraction.DESTROY_WITH_DECAY) {
+-                    lootparams_a.withParameter(LootContextParams.EXPLOSION_RADIUS, explosion.radius());
++                // CraftBukkit start - add yield
++                if (explosion instanceof ServerExplosion serverExplosion && serverExplosion.yield < 1.0F) {
++                    lootparams_a.withParameter(LootContextParams.EXPLOSION_RADIUS, 1.0F / serverExplosion.yield);
++                    // CraftBukkit end
+                 }
+ 
+                 state.spawnAfterBreak(world, pos, ItemStack.EMPTY, flag);
+@@ -1125,9 +1136,15 @@
+         }
+ 
+         public void onPlace(Level world, BlockPos pos, BlockState state, boolean notify) {
+-            this.getBlock().onPlace(this.asState(), world, pos, state, notify);
++            // CraftBukkit start
++            this.onPlace(world, pos, state, notify, null);
+         }
+ 
++        public void onPlace(Level world, BlockPos blockposition, BlockState iblockdata, boolean flag, @Nullable UseOnContext context) {
++            this.getBlock().onPlace(this.asState(), world, blockposition, iblockdata, flag, context);
++            // CraftBukkit end
++        }
++
+         public void onRemove(Level world, BlockPos pos, BlockState state, boolean moved) {
+             this.getBlock().onRemove(this.asState(), world, pos, state, moved);
+         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/border/WorldBorder.java.patch b/paper-server/patches/sources/net/minecraft/world/level/border/WorldBorder.java.patch
new file mode 100644
index 0000000000..6dab41ad82
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/border/WorldBorder.java.patch
@@ -0,0 +1,18 @@
+--- a/net/minecraft/world/level/border/WorldBorder.java
++++ b/net/minecraft/world/level/border/WorldBorder.java
+@@ -30,6 +30,7 @@
+     int absoluteMaxSize = 29999984;
+     private WorldBorder.BorderExtent extent = new WorldBorder.StaticBorderExtent(5.9999968E7D);
+     public static final WorldBorder.Settings DEFAULT_SETTINGS = new WorldBorder.Settings(0.0D, 0.0D, 0.2D, 5.0D, 5, 15, 5.9999968E7D, 0L, 0.0D);
++    public net.minecraft.server.level.ServerLevel world; // CraftBukkit
+ 
+     public WorldBorder() {}
+ 
+@@ -189,6 +190,7 @@
+     }
+ 
+     public void addListener(BorderChangeListener listener) {
++        if (this.listeners.contains(listener)) return; // CraftBukkit
+         this.listeners.add(listener);
+     }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/border/WorldBorder.patch b/paper-server/patches/sources/net/minecraft/world/level/border/WorldBorder.patch
deleted file mode 100644
index 732d68c4d2..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/border/WorldBorder.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/net/minecraft/world/level/border/WorldBorder.java
-+++ b/net/minecraft/world/level/border/WorldBorder.java
-@@ -30,6 +30,7 @@
-     int absoluteMaxSize = 29999984;
-     private WorldBorder.a extent = new WorldBorder.d(5.9999968E7D);
-     public static final WorldBorder.c DEFAULT_SETTINGS = new WorldBorder.c(0.0D, 0.0D, 0.2D, 5.0D, 5, 15, 5.9999968E7D, 0L, 0.0D);
-+    public net.minecraft.server.level.WorldServer world; // CraftBukkit
- 
-     public WorldBorder() {}
- 
-@@ -189,6 +190,7 @@
-     }
- 
-     public void addListener(IWorldBorderListener iworldborderlistener) {
-+        if (listeners.contains(iworldborderlistener)) return; // CraftBukkit
-         this.listeners.add(iworldborderlistener);
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/chunk/Chunk.patch b/paper-server/patches/sources/net/minecraft/world/level/chunk/Chunk.patch
deleted file mode 100644
index 4937f5fc74..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/chunk/Chunk.patch
+++ /dev/null
@@ -1,181 +0,0 @@
---- a/net/minecraft/world/level/chunk/Chunk.java
-+++ b/net/minecraft/world/level/chunk/Chunk.java
-@@ -79,7 +79,7 @@
-     };
-     private final Map<BlockPosition, Chunk.d> tickersInLevel;
-     public boolean loaded;
--    public final World level;
-+    public final WorldServer level; // CraftBukkit - type
-     @Nullable
-     private Supplier<FullChunkStatus> fullStatus;
-     @Nullable
-@@ -98,7 +98,7 @@
-         this.tickersInLevel = Maps.newHashMap();
-         this.unsavedListener = (chunkcoordintpair1) -> {
-         };
--        this.level = world;
-+        this.level = (WorldServer) world; // CraftBukkit - type
-         this.gameEventListenerRegistrySections = new Int2ObjectOpenHashMap();
-         HeightMap.Type[] aheightmap_type = HeightMap.Type.values();
-         int j = aheightmap_type.length;
-@@ -116,6 +116,11 @@
-         this.fluidTicks = levelchunkticks1;
-     }
- 
-+    // CraftBukkit start
-+    public boolean mustNotSave;
-+    public boolean needsDecoration;
-+    // CraftBukkit end
-+
-     public Chunk(WorldServer worldserver, ProtoChunk protochunk, @Nullable Chunk.c chunk_c) {
-         this(worldserver, protochunk.getPos(), protochunk.getUpgradeData(), protochunk.unpackBlockTicks(), protochunk.unpackFluidTicks(), protochunk.getInhabitedTime(), protochunk.getSections(), chunk_c, protochunk.getBlendingData());
-         if (!Collections.disjoint(protochunk.pendingBlockEntities.keySet(), protochunk.blockEntities.keySet())) {
-@@ -151,6 +156,10 @@
-         this.skyLightSources = protochunk.skyLightSources;
-         this.setLightCorrect(protochunk.isLightCorrect());
-         this.markUnsaved();
-+        this.needsDecoration = true; // CraftBukkit
-+        // CraftBukkit start
-+        this.persistentDataContainer = protochunk.persistentDataContainer; // SPIGOT-6814: copy PDC to account for 1.17 to 1.18 chunk upgrading.
-+        // CraftBukkit end
-     }
- 
-     public void setUnsavedListener(Chunk.e chunk_e) {
-@@ -272,9 +281,16 @@
-         }
-     }
- 
-+    // CraftBukkit start
-     @Nullable
-     @Override
-     public IBlockData setBlockState(BlockPosition blockposition, IBlockData iblockdata, boolean flag) {
-+        return this.setBlockState(blockposition, iblockdata, flag, true);
-+    }
-+
-+    @Nullable
-+    public IBlockData setBlockState(BlockPosition blockposition, IBlockData iblockdata, boolean flag, boolean doPlace) {
-+        // CraftBukkit end
-         int i = blockposition.getY();
-         ChunkSection chunksection = this.getSection(this.getSectionIndex(i));
-         boolean flag1 = chunksection.hasOnlyAir();
-@@ -324,7 +340,8 @@
-                 if (!chunksection.getBlockState(j, k, l).is(block)) {
-                     return null;
-                 } else {
--                    if (!this.level.isClientSide) {
-+                    // CraftBukkit - Don't place while processing the BlockPlaceEvent, unless it's a BlockContainer. Prevents blocks such as TNT from activating when cancelled.
-+                    if (!this.level.isClientSide && doPlace && (!this.level.captureBlockStates || block instanceof net.minecraft.world.level.block.BlockTileEntity)) {
-                         iblockdata.onPlace(this.level, blockposition, iblockdata1, flag);
-                     }
- 
-@@ -375,7 +392,12 @@
- 
-     @Nullable
-     public TileEntity getBlockEntity(BlockPosition blockposition, Chunk.EnumTileEntityState chunk_enumtileentitystate) {
--        TileEntity tileentity = (TileEntity) this.blockEntities.get(blockposition);
-+        // CraftBukkit start
-+        TileEntity tileentity = level.capturedTileEntities.get(blockposition);
-+        if (tileentity == null) {
-+            tileentity = (TileEntity) this.blockEntities.get(blockposition);
-+        }
-+        // CraftBukkit end
- 
-         if (tileentity == null) {
-             NBTTagCompound nbttagcompound = (NBTTagCompound) this.pendingBlockEntities.remove(blockposition);
-@@ -447,6 +469,7 @@
- 
-         if (!iblockdata.hasBlockEntity()) {
-             Chunk.LOGGER.warn("Trying to set block entity {} at position {}, but state {} does not allow it", new Object[]{tileentity, blockposition, iblockdata});
-+            new Exception().printStackTrace(); // CraftBukkit
-         } else {
-             IBlockData iblockdata1 = tileentity.getBlockState();
- 
-@@ -500,6 +523,12 @@
-         if (this.isInLevel()) {
-             TileEntity tileentity = (TileEntity) this.blockEntities.remove(blockposition);
- 
-+            // CraftBukkit start - SPIGOT-5561: Also remove from pending map
-+            if (!pendingBlockEntities.isEmpty()) {
-+                pendingBlockEntities.remove(blockposition);
-+            }
-+            // CraftBukkit end
-+
-             if (tileentity != null) {
-                 World world = this.level;
- 
-@@ -553,6 +582,57 @@
- 
-     }
- 
-+    // CraftBukkit start
-+    public void loadCallback() {
-+        org.bukkit.Server server = this.level.getCraftServer();
-+        if (server != null) {
-+            /*
-+             * If it's a new world, the first few chunks are generated inside
-+             * the World constructor. We can't reliably alter that, so we have
-+             * no way of creating a CraftWorld/CraftServer at that point.
-+             */
-+            org.bukkit.Chunk bukkitChunk = new org.bukkit.craftbukkit.CraftChunk(this);
-+            server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(bukkitChunk, this.needsDecoration));
-+
-+            if (this.needsDecoration) {
-+                this.needsDecoration = false;
-+                java.util.Random random = new java.util.Random();
-+                random.setSeed(level.getSeed());
-+                long xRand = random.nextLong() / 2L * 2L + 1L;
-+                long zRand = random.nextLong() / 2L * 2L + 1L;
-+                random.setSeed((long) this.chunkPos.x * xRand + (long) this.chunkPos.z * zRand ^ level.getSeed());
-+
-+                org.bukkit.World world = this.level.getWorld();
-+                if (world != null) {
-+                    this.level.populating = true;
-+                    try {
-+                        for (org.bukkit.generator.BlockPopulator populator : world.getPopulators()) {
-+                            populator.populate(world, random, bukkitChunk);
-+                        }
-+                    } finally {
-+                        this.level.populating = false;
-+                    }
-+                }
-+                server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk));
-+            }
-+        }
-+    }
-+
-+    public void unloadCallback() {
-+        org.bukkit.Server server = this.level.getCraftServer();
-+        org.bukkit.Chunk bukkitChunk = new org.bukkit.craftbukkit.CraftChunk(this);
-+        org.bukkit.event.world.ChunkUnloadEvent unloadEvent = new org.bukkit.event.world.ChunkUnloadEvent(bukkitChunk, this.isUnsaved());
-+        server.getPluginManager().callEvent(unloadEvent);
-+        // note: saving can be prevented, but not forced if no saving is actually required
-+        this.mustNotSave = !unloadEvent.isSaveChunk();
-+    }
-+
-+    @Override
-+    public boolean isUnsaved() {
-+        return super.isUnsaved() && !this.mustNotSave;
-+    }
-+    // CraftBukkit end
-+
-     public boolean isEmpty() {
-         return false;
-     }
-@@ -750,7 +830,7 @@
- 
-     private <T extends TileEntity> void updateBlockEntityTicker(T t0) {
-         IBlockData iblockdata = t0.getBlockState();
--        BlockEntityTicker<T> blockentityticker = iblockdata.getTicker(this.level, t0.getType());
-+        BlockEntityTicker<T> blockentityticker = iblockdata.getTicker(this.level, (TileEntityTypes<T>) t0.getType()); // CraftBukkit - decompile error
- 
-         if (blockentityticker == null) {
-             this.removeBlockEntityTicker(t0.getBlockPos());
-@@ -841,7 +921,7 @@
-         private boolean loggedInvalidBlockState;
- 
-         a(final TileEntity tileentity, final BlockEntityTicker blockentityticker) {
--            this.blockEntity = tileentity;
-+            this.blockEntity = (T) tileentity; // CraftBukkit - decompile error
-             this.ticker = blockentityticker;
-         }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/chunk/IChunkAccess.patch b/paper-server/patches/sources/net/minecraft/world/level/chunk/ChunkAccess.java.patch
similarity index 59%
rename from paper-server/patches/sources/net/minecraft/world/level/chunk/IChunkAccess.patch
rename to paper-server/patches/sources/net/minecraft/world/level/chunk/ChunkAccess.java.patch
index 427607fb1c..f09c9d65ee 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/chunk/IChunkAccess.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/chunk/ChunkAccess.java.patch
@@ -1,29 +1,29 @@
---- a/net/minecraft/world/level/chunk/IChunkAccess.java
-+++ b/net/minecraft/world/level/chunk/IChunkAccess.java
+--- a/net/minecraft/world/level/chunk/ChunkAccess.java
++++ b/net/minecraft/world/level/chunk/ChunkAccess.java
 @@ -85,6 +85,11 @@
      protected final LevelHeightAccessor levelHeightAccessor;
-     protected final ChunkSection[] sections;
+     protected final LevelChunkSection[] sections;
  
 +    // CraftBukkit start - SPIGOT-6814: move to IChunkAccess to account for 1.17 to 1.18 chunk upgrading.
 +    private static final org.bukkit.craftbukkit.persistence.CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new org.bukkit.craftbukkit.persistence.CraftPersistentDataTypeRegistry();
-+    public org.bukkit.craftbukkit.persistence.DirtyCraftPersistentDataContainer persistentDataContainer = new org.bukkit.craftbukkit.persistence.DirtyCraftPersistentDataContainer(DATA_TYPE_REGISTRY);
++    public org.bukkit.craftbukkit.persistence.DirtyCraftPersistentDataContainer persistentDataContainer = new org.bukkit.craftbukkit.persistence.DirtyCraftPersistentDataContainer(ChunkAccess.DATA_TYPE_REGISTRY);
 +    // CraftBukkit end
 +
-     public IChunkAccess(ChunkCoordIntPair chunkcoordintpair, ChunkConverter chunkconverter, LevelHeightAccessor levelheightaccessor, IRegistry<BiomeBase> iregistry, long i, @Nullable ChunkSection[] achunksection, @Nullable BlendingData blendingdata) {
-         this.chunkPos = chunkcoordintpair;
-         this.upgradeData = chunkconverter;
+     public ChunkAccess(ChunkPos pos, UpgradeData upgradeData, LevelHeightAccessor heightLimitView, Registry<Biome> biomeRegistry, long inhabitedTime, @Nullable LevelChunkSection[] sectionArray, @Nullable BlendingData blendingData) {
+         this.chunkPos = pos;
+         this.upgradeData = upgradeData;
 @@ -103,7 +108,11 @@
          }
  
-         replaceMissingSections(iregistry, this.sections);
+         ChunkAccess.replaceMissingSections(biomeRegistry, this.sections);
 +        // CraftBukkit start
-+        this.biomeRegistry = iregistry;
++        this.biomeRegistry = biomeRegistry;
      }
-+    public final IRegistry<BiomeBase> biomeRegistry;
++    public final Registry<Biome> biomeRegistry;
 +    // CraftBukkit end
  
-     private static void replaceMissingSections(IRegistry<BiomeBase> iregistry, ChunkSection[] achunksection) {
-         for (int i = 0; i < achunksection.length; ++i) {
+     private static void replaceMissingSections(Registry<Biome> biomeRegistry, LevelChunkSection[] sectionArray) {
+         for (int i = 0; i < sectionArray.length; ++i) {
 @@ -275,6 +284,7 @@
      public boolean tryMarkSaved() {
          if (this.unsaved) {
@@ -46,26 +46,26 @@
      }
  
 +    // CraftBukkit start
-+    public void setBiome(int i, int j, int k, Holder<BiomeBase> biome) {
++    public void setBiome(int i, int j, int k, Holder<Biome> biome) {
 +        try {
 +            int l = QuartPos.fromBlock(this.getMinY());
 +            int i1 = l + QuartPos.fromBlock(this.getHeight()) - 1;
-+            int j1 = MathHelper.clamp(j, l, i1);
++            int j1 = Mth.clamp(j, l, i1);
 +            int k1 = this.getSectionIndex(QuartPos.toBlock(j1));
 +
 +            this.sections[k1].setBiome(i & 3, j1 & 3, k & 3, biome);
 +        } catch (Throwable throwable) {
 +            CrashReport crashreport = CrashReport.forThrowable(throwable, "Setting biome");
-+            CrashReportSystemDetails crashreportsystemdetails = crashreport.addCategory("Biome being set");
++            CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Biome being set");
 +
 +            crashreportsystemdetails.setDetail("Location", () -> {
-+                return CrashReportSystemDetails.formatLocation(this, i, j, k);
++                return CrashReportCategory.formatLocation(this, i, j, k);
 +            });
 +            throw new ReportedException(crashreport);
 +        }
 +    }
 +    // CraftBukkit end
 +
-     public void fillBiomesFromNoise(BiomeResolver biomeresolver, Climate.Sampler climate_sampler) {
-         ChunkCoordIntPair chunkcoordintpair = this.getPos();
+     public void fillBiomesFromNoise(BiomeResolver biomeSupplier, Climate.Sampler sampler) {
+         ChunkPos chunkcoordintpair = this.getPos();
          int i = QuartPos.fromBlock(chunkcoordintpair.getMinBlockX());
diff --git a/paper-server/patches/sources/net/minecraft/world/level/chunk/ChunkGenerator.java.patch b/paper-server/patches/sources/net/minecraft/world/level/chunk/ChunkGenerator.java.patch
new file mode 100644
index 0000000000..a751fc65b0
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/chunk/ChunkGenerator.java.patch
@@ -0,0 +1,139 @@
+--- a/net/minecraft/world/level/chunk/ChunkGenerator.java
++++ b/net/minecraft/world/level/chunk/ChunkGenerator.java
+@@ -312,29 +312,29 @@
+         }
+     }
+ 
+-    public void applyBiomeDecoration(WorldGenLevel world, ChunkAccess chunk, StructureManager structureAccessor) {
+-        ChunkPos chunkcoordintpair = chunk.getPos();
++    public void addVanillaDecorations(WorldGenLevel generatoraccessseed, ChunkAccess ichunkaccess, StructureManager structuremanager) { // CraftBukkit
++        ChunkPos chunkcoordintpair = ichunkaccess.getPos();
+ 
+         if (!SharedConstants.debugVoidTerrain(chunkcoordintpair)) {
+-            SectionPos sectionposition = SectionPos.of(chunkcoordintpair, world.getMinSectionY());
++            SectionPos sectionposition = SectionPos.of(chunkcoordintpair, generatoraccessseed.getMinSectionY());
+             BlockPos blockposition = sectionposition.origin();
+-            Registry<Structure> iregistry = world.registryAccess().lookupOrThrow(Registries.STRUCTURE);
++            Registry<Structure> iregistry = generatoraccessseed.registryAccess().lookupOrThrow(Registries.STRUCTURE);
+             Map<Integer, List<Structure>> map = (Map) iregistry.stream().collect(Collectors.groupingBy((structure) -> {
+                 return structure.step().ordinal();
+             }));
+             List<FeatureSorter.StepFeatureData> list = (List) this.featuresPerStep.get();
+             WorldgenRandom seededrandom = new WorldgenRandom(new XoroshiroRandomSource(RandomSupport.generateUniqueSeed()));
+-            long i = seededrandom.setDecorationSeed(world.getSeed(), blockposition.getX(), blockposition.getZ());
++            long i = seededrandom.setDecorationSeed(generatoraccessseed.getSeed(), blockposition.getX(), blockposition.getZ());
+             Set<Holder<Biome>> set = new ObjectArraySet();
+ 
+             ChunkPos.rangeClosed(sectionposition.chunk(), 1).forEach((chunkcoordintpair1) -> {
+-                ChunkAccess ichunkaccess1 = world.getChunk(chunkcoordintpair1.x, chunkcoordintpair1.z);
++                ChunkAccess ichunkaccess1 = generatoraccessseed.getChunk(chunkcoordintpair1.x, chunkcoordintpair1.z);
+                 LevelChunkSection[] achunksection = ichunkaccess1.getSections();
+                 int j = achunksection.length;
+ 
+                 for (int k = 0; k < j; ++k) {
+                     LevelChunkSection chunksection = achunksection[k];
+-                    PalettedContainerRO palettedcontainerro = chunksection.getBiomes();
++                    PalettedContainerRO<Holder<Biome>> palettedcontainerro = chunksection.getBiomes(); // CraftBukkit - decompile error
+ 
+                     Objects.requireNonNull(set);
+                     palettedcontainerro.getAll(set::add);
+@@ -345,7 +345,7 @@
+             int j = list.size();
+ 
+             try {
+-                Registry<PlacedFeature> iregistry1 = world.registryAccess().lookupOrThrow(Registries.PLACED_FEATURE);
++                Registry<PlacedFeature> iregistry1 = generatoraccessseed.registryAccess().lookupOrThrow(Registries.PLACED_FEATURE);
+                 int k = Math.max(GenerationStep.Decoration.values().length, j);
+ 
+                 for (int l = 0; l < k; ++l) {
+@@ -353,7 +353,7 @@
+                     Iterator iterator;
+                     CrashReportCategory crashreportsystemdetails;
+ 
+-                    if (structureAccessor.shouldGenerateStructures()) {
++                    if (structuremanager.shouldGenerateStructures()) {
+                         List<Structure> list1 = (List) map.getOrDefault(l, Collections.emptyList());
+ 
+                         for (iterator = list1.iterator(); iterator.hasNext(); ++i1) {
+@@ -368,9 +368,9 @@
+                             };
+ 
+                             try {
+-                                world.setCurrentlyGenerating(supplier);
+-                                structureAccessor.startsForStructure(sectionposition, structure).forEach((structurestart) -> {
+-                                    structurestart.placeInChunk(world, structureAccessor, this, seededrandom, ChunkGenerator.getWritableArea(chunk), chunkcoordintpair);
++                                generatoraccessseed.setCurrentlyGenerating(supplier);
++                                structuremanager.startsForStructure(sectionposition, structure).forEach((structurestart) -> {
++                                    structurestart.placeInChunk(generatoraccessseed, structuremanager, this, seededrandom, ChunkGenerator.getWritableArea(ichunkaccess), chunkcoordintpair);
+                                 });
+                             } catch (Exception exception) {
+                                 CrashReport crashreport = CrashReport.forThrowable(exception, "Feature placement");
+@@ -421,8 +421,8 @@
+                             seededrandom.setFeatureSeed(i, l1, l);
+ 
+                             try {
+-                                world.setCurrentlyGenerating(supplier1);
+-                                placedfeature.placeWithBiomeCheck(world, this, seededrandom, blockposition);
++                                generatoraccessseed.setCurrentlyGenerating(supplier1);
++                                placedfeature.placeWithBiomeCheck(generatoraccessseed, this, seededrandom, blockposition);
+                             } catch (Exception exception1) {
+                                 CrashReport crashreport1 = CrashReport.forThrowable(exception1, "Feature placement");
+ 
+@@ -435,7 +435,7 @@
+                     }
+                 }
+ 
+-                world.setCurrentlyGenerating((Supplier) null);
++                generatoraccessseed.setCurrentlyGenerating((Supplier) null);
+             } catch (Exception exception2) {
+                 CrashReport crashreport2 = CrashReport.forThrowable(exception2, "Biome decoration");
+ 
+@@ -445,6 +445,33 @@
+         }
+     }
+ 
++   // CraftBukkit start
++    public void applyBiomeDecoration(WorldGenLevel world, ChunkAccess chunk, StructureManager structureAccessor) {
++        this.applyBiomeDecoration(world, chunk, structureAccessor, true);
++    }
++
++    public void applyBiomeDecoration(WorldGenLevel generatoraccessseed, ChunkAccess ichunkaccess, StructureManager structuremanager, boolean vanilla) {
++        if (vanilla) {
++            this.addVanillaDecorations(generatoraccessseed, ichunkaccess, structuremanager);
++        }
++
++        org.bukkit.World world = generatoraccessseed.getMinecraftWorld().getWorld();
++        // only call when a populator is present (prevents unnecessary entity conversion)
++        if (!world.getPopulators().isEmpty()) {
++            org.bukkit.craftbukkit.generator.CraftLimitedRegion limitedRegion = new org.bukkit.craftbukkit.generator.CraftLimitedRegion(generatoraccessseed, ichunkaccess.getPos());
++            int x = ichunkaccess.getPos().x;
++            int z = ichunkaccess.getPos().z;
++            for (org.bukkit.generator.BlockPopulator populator : world.getPopulators()) {
++                WorldgenRandom seededrandom = new WorldgenRandom(new net.minecraft.world.level.levelgen.LegacyRandomSource(generatoraccessseed.getSeed()));
++                seededrandom.setDecorationSeed(generatoraccessseed.getSeed(), x, z);
++                populator.populate(world, new org.bukkit.craftbukkit.util.RandomSourceWrapper.RandomWrapper(seededrandom), x, z, limitedRegion);
++            }
++            limitedRegion.saveEntities();
++            limitedRegion.breakLink();
++        }
++    }
++    // CraftBukkit end
++
+     private static BoundingBox getWritableArea(ChunkAccess chunk) {
+         ChunkPos chunkcoordintpair = chunk.getPos();
+         int i = chunkcoordintpair.getMinBlockX();
+@@ -582,6 +609,14 @@
+         StructureStart structurestart = structure.generate(weightedEntry.structure(), dimension, dynamicRegistryManager, this, this.biomeSource, noiseConfig, structureManager, seed, pos, j, chunk, predicate);
+ 
+         if (structurestart.isValid()) {
++            // CraftBukkit start
++            BoundingBox box = structurestart.getBoundingBox();
++            org.bukkit.event.world.AsyncStructureSpawnEvent event = new org.bukkit.event.world.AsyncStructureSpawnEvent(structureAccessor.level.getMinecraftWorld().getWorld(), org.bukkit.craftbukkit.generator.structure.CraftStructure.minecraftToBukkit(structure), new org.bukkit.util.BoundingBox(box.minX(), box.minY(), box.minZ(), box.maxX(), box.maxY(), box.maxZ()), pos.x, pos.z);
++            org.bukkit.Bukkit.getPluginManager().callEvent(event);
++            if (event.isCancelled()) {
++                return true;
++            }
++            // CraftBukkit end
+             structureAccessor.setStartForStructure(sectionPos, structure, structurestart, chunk);
+             return true;
+         } else {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/chunk/ChunkGenerator.patch b/paper-server/patches/sources/net/minecraft/world/level/chunk/ChunkGenerator.patch
deleted file mode 100644
index 1d0aecddd6..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/chunk/ChunkGenerator.patch
+++ /dev/null
@@ -1,69 +0,0 @@
---- a/net/minecraft/world/level/chunk/ChunkGenerator.java
-+++ b/net/minecraft/world/level/chunk/ChunkGenerator.java
-@@ -312,7 +312,7 @@
-         }
-     }
- 
--    public void applyBiomeDecoration(GeneratorAccessSeed generatoraccessseed, IChunkAccess ichunkaccess, StructureManager structuremanager) {
-+    public void addVanillaDecorations(GeneratorAccessSeed generatoraccessseed, IChunkAccess ichunkaccess, StructureManager structuremanager) { // CraftBukkit
-         ChunkCoordIntPair chunkcoordintpair = ichunkaccess.getPos();
- 
-         if (!SharedConstants.debugVoidTerrain(chunkcoordintpair)) {
-@@ -334,7 +334,7 @@
- 
-                 for (int k = 0; k < j; ++k) {
-                     ChunkSection chunksection = achunksection[k];
--                    PalettedContainerRO palettedcontainerro = chunksection.getBiomes();
-+                    PalettedContainerRO<Holder<BiomeBase>> palettedcontainerro = chunksection.getBiomes(); // CraftBukkit - decompile error
- 
-                     Objects.requireNonNull(set);
-                     palettedcontainerro.getAll(set::add);
-@@ -445,6 +445,33 @@
-         }
-     }
- 
-+   // CraftBukkit start
-+    public void applyBiomeDecoration(GeneratorAccessSeed generatoraccessseed, IChunkAccess ichunkaccess, StructureManager structuremanager) {
-+        applyBiomeDecoration(generatoraccessseed, ichunkaccess, structuremanager, true);
-+    }
-+
-+    public void applyBiomeDecoration(GeneratorAccessSeed generatoraccessseed, IChunkAccess ichunkaccess, StructureManager structuremanager, boolean vanilla) {
-+        if (vanilla) {
-+            addVanillaDecorations(generatoraccessseed, ichunkaccess, structuremanager);
-+        }
-+
-+        org.bukkit.World world = generatoraccessseed.getMinecraftWorld().getWorld();
-+        // only call when a populator is present (prevents unnecessary entity conversion)
-+        if (!world.getPopulators().isEmpty()) {
-+            org.bukkit.craftbukkit.generator.CraftLimitedRegion limitedRegion = new org.bukkit.craftbukkit.generator.CraftLimitedRegion(generatoraccessseed, ichunkaccess.getPos());
-+            int x = ichunkaccess.getPos().x;
-+            int z = ichunkaccess.getPos().z;
-+            for (org.bukkit.generator.BlockPopulator populator : world.getPopulators()) {
-+                SeededRandom seededrandom = new SeededRandom(new net.minecraft.world.level.levelgen.LegacyRandomSource(generatoraccessseed.getSeed()));
-+                seededrandom.setDecorationSeed(generatoraccessseed.getSeed(), x, z);
-+                populator.populate(world, new org.bukkit.craftbukkit.util.RandomSourceWrapper.RandomWrapper(seededrandom), x, z, limitedRegion);
-+            }
-+            limitedRegion.saveEntities();
-+            limitedRegion.breakLink();
-+        }
-+    }
-+    // CraftBukkit end
-+
-     private static StructureBoundingBox getWritableArea(IChunkAccess ichunkaccess) {
-         ChunkCoordIntPair chunkcoordintpair = ichunkaccess.getPos();
-         int i = chunkcoordintpair.getMinBlockX();
-@@ -582,6 +609,14 @@
-         StructureStart structurestart = structure.generate(structureset_a.structure(), resourcekey, iregistrycustom, this, this.biomeSource, randomstate, structuretemplatemanager, i, chunkcoordintpair, j, ichunkaccess, predicate);
- 
-         if (structurestart.isValid()) {
-+            // CraftBukkit start
-+            StructureBoundingBox box = structurestart.getBoundingBox();
-+            org.bukkit.event.world.AsyncStructureSpawnEvent event = new org.bukkit.event.world.AsyncStructureSpawnEvent(structuremanager.level.getMinecraftWorld().getWorld(), org.bukkit.craftbukkit.generator.structure.CraftStructure.minecraftToBukkit(structure), new org.bukkit.util.BoundingBox(box.minX(), box.minY(), box.minZ(), box.maxX(), box.maxY(), box.maxZ()), chunkcoordintpair.x, chunkcoordintpair.z);
-+            org.bukkit.Bukkit.getPluginManager().callEvent(event);
-+            if (event.isCancelled()) {
-+                return true;
-+            }
-+            // CraftBukkit end
-             structuremanager.setStartForStructure(sectionposition, structure, structurestart, ichunkaccess);
-             return true;
-         } else {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.patch b/paper-server/patches/sources/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java.patch
similarity index 100%
rename from paper-server/patches/sources/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.patch
rename to paper-server/patches/sources/net/minecraft/world/level/chunk/ChunkGeneratorStructureState.java.patch
diff --git a/paper-server/patches/sources/net/minecraft/world/level/chunk/ChunkSection.patch b/paper-server/patches/sources/net/minecraft/world/level/chunk/ChunkSection.patch
deleted file mode 100644
index 72784c4b5e..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/chunk/ChunkSection.patch
+++ /dev/null
@@ -1,33 +0,0 @@
---- a/net/minecraft/world/level/chunk/ChunkSection.java
-+++ b/net/minecraft/world/level/chunk/ChunkSection.java
-@@ -23,7 +23,7 @@
-     private short tickingBlockCount;
-     private short tickingFluidCount;
-     private final DataPaletteBlock<IBlockData> states;
--    private PalettedContainerRO<Holder<BiomeBase>> biomes;
-+    private DataPaletteBlock<Holder<BiomeBase>> biomes; // CraftBukkit - read/write
- 
-     private ChunkSection(ChunkSection chunksection) {
-         this.nonEmptyBlockCount = chunksection.nonEmptyBlockCount;
-@@ -33,7 +33,7 @@
-         this.biomes = chunksection.biomes.copy();
-     }
- 
--    public ChunkSection(DataPaletteBlock<IBlockData> datapaletteblock, PalettedContainerRO<Holder<BiomeBase>> palettedcontainerro) {
-+    public ChunkSection(DataPaletteBlock<IBlockData> datapaletteblock, DataPaletteBlock<Holder<BiomeBase>> palettedcontainerro) { // CraftBukkit - read/write
-         this.states = datapaletteblock;
-         this.biomes = palettedcontainerro;
-         this.recalcBlockCounts();
-@@ -196,6 +196,12 @@
-         return (Holder) this.biomes.get(i, j, k);
-     }
- 
-+    // CraftBukkit start
-+    public void setBiome(int i, int j, int k, Holder<BiomeBase> biome) {
-+        this.biomes.set(i, j, k, biome);
-+    }
-+    // CraftBukkit end
-+
-     public void fillBiomesFromNoise(BiomeResolver biomeresolver, Climate.Sampler climate_sampler, int i, int j, int k) {
-         DataPaletteBlock<Holder<BiomeBase>> datapaletteblock = this.biomes.recreate();
-         boolean flag = true;
diff --git a/paper-server/patches/sources/net/minecraft/world/level/chunk/DataLayer.java.patch b/paper-server/patches/sources/net/minecraft/world/level/chunk/DataLayer.java.patch
new file mode 100644
index 0000000000..e1be97122d
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/chunk/DataLayer.java.patch
@@ -0,0 +1,7 @@
+--- a/net/minecraft/world/level/chunk/DataLayer.java
++++ b/net/minecraft/world/level/chunk/DataLayer.java
+@@ -1,3 +1,4 @@
++// mc-dev import
+ package net.minecraft.world.level.chunk;
+ 
+ import java.util.Arrays;
diff --git a/paper-server/patches/sources/net/minecraft/world/level/chunk/LevelChunk.java.patch b/paper-server/patches/sources/net/minecraft/world/level/chunk/LevelChunk.java.patch
new file mode 100644
index 0000000000..fab24391af
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/chunk/LevelChunk.java.patch
@@ -0,0 +1,266 @@
+--- a/net/minecraft/world/level/chunk/LevelChunk.java
++++ b/net/minecraft/world/level/chunk/LevelChunk.java
+@@ -79,7 +79,7 @@
+     };
+     private final Map<BlockPos, LevelChunk.RebindableTickingBlockEntityWrapper> tickersInLevel;
+     public boolean loaded;
+-    public final Level level;
++    public final ServerLevel level; // CraftBukkit - type
+     @Nullable
+     private Supplier<FullChunkStatus> fullStatus;
+     @Nullable
+@@ -98,7 +98,7 @@
+         this.tickersInLevel = Maps.newHashMap();
+         this.unsavedListener = (chunkcoordintpair1) -> {
+         };
+-        this.level = world;
++        this.level = (ServerLevel) world; // CraftBukkit - type
+         this.gameEventListenerRegistrySections = new Int2ObjectOpenHashMap();
+         Heightmap.Types[] aheightmap_type = Heightmap.Types.values();
+         int j = aheightmap_type.length;
+@@ -116,6 +116,11 @@
+         this.fluidTicks = fluidTickScheduler;
+     }
+ 
++    // CraftBukkit start
++    public boolean mustNotSave;
++    public boolean needsDecoration;
++    // CraftBukkit end
++
+     public LevelChunk(ServerLevel world, ProtoChunk protoChunk, @Nullable LevelChunk.PostLoadProcessor entityLoader) {
+         this(world, protoChunk.getPos(), protoChunk.getUpgradeData(), protoChunk.unpackBlockTicks(), protoChunk.unpackFluidTicks(), protoChunk.getInhabitedTime(), protoChunk.getSections(), entityLoader, protoChunk.getBlendingData());
+         if (!Collections.disjoint(protoChunk.pendingBlockEntities.keySet(), protoChunk.blockEntities.keySet())) {
+@@ -151,6 +156,10 @@
+         this.skyLightSources = protoChunk.skyLightSources;
+         this.setLightCorrect(protoChunk.isLightCorrect());
+         this.markUnsaved();
++        this.needsDecoration = true; // CraftBukkit
++        // CraftBukkit start
++        this.persistentDataContainer = protoChunk.persistentDataContainer; // SPIGOT-6814: copy PDC to account for 1.17 to 1.18 chunk upgrading.
++        // CraftBukkit end
+     }
+ 
+     public void setUnsavedListener(LevelChunk.UnsavedListener unsavedListener) {
+@@ -272,78 +281,86 @@
+         }
+     }
+ 
++    // CraftBukkit start
+     @Nullable
+     @Override
+     public BlockState setBlockState(BlockPos pos, BlockState state, boolean moved) {
+-        int i = pos.getY();
++        return this.setBlockState(pos, state, moved, true);
++    }
++
++    @Nullable
++    public BlockState setBlockState(BlockPos blockposition, BlockState iblockdata, boolean flag, boolean doPlace) {
++        // CraftBukkit end
++        int i = blockposition.getY();
+         LevelChunkSection chunksection = this.getSection(this.getSectionIndex(i));
+         boolean flag1 = chunksection.hasOnlyAir();
+ 
+-        if (flag1 && state.isAir()) {
++        if (flag1 && iblockdata.isAir()) {
+             return null;
+         } else {
+-            int j = pos.getX() & 15;
++            int j = blockposition.getX() & 15;
+             int k = i & 15;
+-            int l = pos.getZ() & 15;
+-            BlockState iblockdata1 = chunksection.setBlockState(j, k, l, state);
++            int l = blockposition.getZ() & 15;
++            BlockState iblockdata1 = chunksection.setBlockState(j, k, l, iblockdata);
+ 
+-            if (iblockdata1 == state) {
++            if (iblockdata1 == iblockdata) {
+                 return null;
+             } else {
+-                Block block = state.getBlock();
++                Block block = iblockdata.getBlock();
+ 
+-                ((Heightmap) this.heightmaps.get(Heightmap.Types.MOTION_BLOCKING)).update(j, i, l, state);
+-                ((Heightmap) this.heightmaps.get(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES)).update(j, i, l, state);
+-                ((Heightmap) this.heightmaps.get(Heightmap.Types.OCEAN_FLOOR)).update(j, i, l, state);
+-                ((Heightmap) this.heightmaps.get(Heightmap.Types.WORLD_SURFACE)).update(j, i, l, state);
++                ((Heightmap) this.heightmaps.get(Heightmap.Types.MOTION_BLOCKING)).update(j, i, l, iblockdata);
++                ((Heightmap) this.heightmaps.get(Heightmap.Types.MOTION_BLOCKING_NO_LEAVES)).update(j, i, l, iblockdata);
++                ((Heightmap) this.heightmaps.get(Heightmap.Types.OCEAN_FLOOR)).update(j, i, l, iblockdata);
++                ((Heightmap) this.heightmaps.get(Heightmap.Types.WORLD_SURFACE)).update(j, i, l, iblockdata);
+                 boolean flag2 = chunksection.hasOnlyAir();
+ 
+                 if (flag1 != flag2) {
+-                    this.level.getChunkSource().getLightEngine().updateSectionStatus(pos, flag2);
++                    this.level.getChunkSource().getLightEngine().updateSectionStatus(blockposition, flag2);
+                     this.level.getChunkSource().onSectionEmptinessChanged(this.chunkPos.x, SectionPos.blockToSectionCoord(i), this.chunkPos.z, flag2);
+                 }
+ 
+-                if (LightEngine.hasDifferentLightProperties(iblockdata1, state)) {
++                if (LightEngine.hasDifferentLightProperties(iblockdata1, iblockdata)) {
+                     ProfilerFiller gameprofilerfiller = Profiler.get();
+ 
+                     gameprofilerfiller.push("updateSkyLightSources");
+                     this.skyLightSources.update(this, j, i, l);
+                     gameprofilerfiller.popPush("queueCheckLight");
+-                    this.level.getChunkSource().getLightEngine().checkBlock(pos);
++                    this.level.getChunkSource().getLightEngine().checkBlock(blockposition);
+                     gameprofilerfiller.pop();
+                 }
+ 
+                 boolean flag3 = iblockdata1.hasBlockEntity();
+ 
+                 if (!this.level.isClientSide) {
+-                    iblockdata1.onRemove(this.level, pos, state, moved);
++                    iblockdata1.onRemove(this.level, blockposition, iblockdata, flag);
+                 } else if (!iblockdata1.is(block) && flag3) {
+-                    this.removeBlockEntity(pos);
++                    this.removeBlockEntity(blockposition);
+                 }
+ 
+                 if (!chunksection.getBlockState(j, k, l).is(block)) {
+                     return null;
+                 } else {
+-                    if (!this.level.isClientSide) {
+-                        state.onPlace(this.level, pos, iblockdata1, moved);
++                    // CraftBukkit - Don't place while processing the BlockPlaceEvent, unless it's a BlockContainer. Prevents blocks such as TNT from activating when cancelled.
++                    if (!this.level.isClientSide && doPlace && (!this.level.captureBlockStates || block instanceof net.minecraft.world.level.block.BaseEntityBlock)) {
++                        iblockdata.onPlace(this.level, blockposition, iblockdata1, flag);
+                     }
+ 
+-                    if (state.hasBlockEntity()) {
+-                        BlockEntity tileentity = this.getBlockEntity(pos, LevelChunk.EntityCreationType.CHECK);
++                    if (iblockdata.hasBlockEntity()) {
++                        BlockEntity tileentity = this.getBlockEntity(blockposition, LevelChunk.EntityCreationType.CHECK);
+ 
+-                        if (tileentity != null && !tileentity.isValidBlockState(state)) {
+-                            LevelChunk.LOGGER.warn("Found mismatched block entity @ {}: type = {}, state = {}", new Object[]{pos, tileentity.getType().builtInRegistryHolder().key().location(), state});
+-                            this.removeBlockEntity(pos);
++                        if (tileentity != null && !tileentity.isValidBlockState(iblockdata)) {
++                            LevelChunk.LOGGER.warn("Found mismatched block entity @ {}: type = {}, state = {}", new Object[]{blockposition, tileentity.getType().builtInRegistryHolder().key().location(), iblockdata});
++                            this.removeBlockEntity(blockposition);
+                             tileentity = null;
+                         }
+ 
+                         if (tileentity == null) {
+-                            tileentity = ((EntityBlock) block).newBlockEntity(pos, state);
++                            tileentity = ((EntityBlock) block).newBlockEntity(blockposition, iblockdata);
+                             if (tileentity != null) {
+                                 this.addAndRegisterBlockEntity(tileentity);
+                             }
+                         } else {
+-                            tileentity.setBlockState(state);
++                            tileentity.setBlockState(iblockdata);
+                             this.updateBlockEntityTicker(tileentity);
+                         }
+                     }
+@@ -375,7 +392,12 @@
+ 
+     @Nullable
+     public BlockEntity getBlockEntity(BlockPos pos, LevelChunk.EntityCreationType creationType) {
+-        BlockEntity tileentity = (BlockEntity) this.blockEntities.get(pos);
++        // CraftBukkit start
++        BlockEntity tileentity = this.level.capturedTileEntities.get(pos);
++        if (tileentity == null) {
++            tileentity = (BlockEntity) this.blockEntities.get(pos);
++        }
++        // CraftBukkit end
+ 
+         if (tileentity == null) {
+             CompoundTag nbttagcompound = (CompoundTag) this.pendingBlockEntities.remove(pos);
+@@ -447,6 +469,7 @@
+ 
+         if (!iblockdata.hasBlockEntity()) {
+             LevelChunk.LOGGER.warn("Trying to set block entity {} at position {}, but state {} does not allow it", new Object[]{blockEntity, blockposition, iblockdata});
++            new Exception().printStackTrace(); // CraftBukkit
+         } else {
+             BlockState iblockdata1 = blockEntity.getBlockState();
+ 
+@@ -500,6 +523,12 @@
+         if (this.isInLevel()) {
+             BlockEntity tileentity = (BlockEntity) this.blockEntities.remove(pos);
+ 
++            // CraftBukkit start - SPIGOT-5561: Also remove from pending map
++            if (!this.pendingBlockEntities.isEmpty()) {
++                this.pendingBlockEntities.remove(pos);
++            }
++            // CraftBukkit end
++
+             if (tileentity != null) {
+                 Level world = this.level;
+ 
+@@ -553,6 +582,57 @@
+ 
+     }
+ 
++    // CraftBukkit start
++    public void loadCallback() {
++        org.bukkit.Server server = this.level.getCraftServer();
++        if (server != null) {
++            /*
++             * If it's a new world, the first few chunks are generated inside
++             * the World constructor. We can't reliably alter that, so we have
++             * no way of creating a CraftWorld/CraftServer at that point.
++             */
++            org.bukkit.Chunk bukkitChunk = new org.bukkit.craftbukkit.CraftChunk(this);
++            server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkLoadEvent(bukkitChunk, this.needsDecoration));
++
++            if (this.needsDecoration) {
++                this.needsDecoration = false;
++                java.util.Random random = new java.util.Random();
++                random.setSeed(this.level.getSeed());
++                long xRand = random.nextLong() / 2L * 2L + 1L;
++                long zRand = random.nextLong() / 2L * 2L + 1L;
++                random.setSeed((long) this.chunkPos.x * xRand + (long) this.chunkPos.z * zRand ^ this.level.getSeed());
++
++                org.bukkit.World world = this.level.getWorld();
++                if (world != null) {
++                    this.level.populating = true;
++                    try {
++                        for (org.bukkit.generator.BlockPopulator populator : world.getPopulators()) {
++                            populator.populate(world, random, bukkitChunk);
++                        }
++                    } finally {
++                        this.level.populating = false;
++                    }
++                }
++                server.getPluginManager().callEvent(new org.bukkit.event.world.ChunkPopulateEvent(bukkitChunk));
++            }
++        }
++    }
++
++    public void unloadCallback() {
++        org.bukkit.Server server = this.level.getCraftServer();
++        org.bukkit.Chunk bukkitChunk = new org.bukkit.craftbukkit.CraftChunk(this);
++        org.bukkit.event.world.ChunkUnloadEvent unloadEvent = new org.bukkit.event.world.ChunkUnloadEvent(bukkitChunk, this.isUnsaved());
++        server.getPluginManager().callEvent(unloadEvent);
++        // note: saving can be prevented, but not forced if no saving is actually required
++        this.mustNotSave = !unloadEvent.isSaveChunk();
++    }
++
++    @Override
++    public boolean isUnsaved() {
++        return super.isUnsaved() && !this.mustNotSave;
++    }
++    // CraftBukkit end
++
+     public boolean isEmpty() {
+         return false;
+     }
+@@ -750,7 +830,7 @@
+ 
+     private <T extends BlockEntity> void updateBlockEntityTicker(T blockEntity) {
+         BlockState iblockdata = blockEntity.getBlockState();
+-        BlockEntityTicker<T> blockentityticker = iblockdata.getTicker(this.level, blockEntity.getType());
++        BlockEntityTicker<T> blockentityticker = iblockdata.getTicker(this.level, (BlockEntityType<T>) blockEntity.getType()); // CraftBukkit - decompile error
+ 
+         if (blockentityticker == null) {
+             this.removeBlockEntityTicker(blockEntity.getBlockPos());
+@@ -841,7 +921,7 @@
+         private boolean loggedInvalidBlockState;
+ 
+         BoundTickingBlockEntity(final BlockEntity tileentity, final BlockEntityTicker blockentityticker) {
+-            this.blockEntity = tileentity;
++            this.blockEntity = (T) tileentity; // CraftBukkit - decompile error
+             this.ticker = blockentityticker;
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/chunk/LevelChunkSection.java.patch b/paper-server/patches/sources/net/minecraft/world/level/chunk/LevelChunkSection.java.patch
new file mode 100644
index 0000000000..9efdf34796
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/chunk/LevelChunkSection.java.patch
@@ -0,0 +1,37 @@
+--- a/net/minecraft/world/level/chunk/LevelChunkSection.java
++++ b/net/minecraft/world/level/chunk/LevelChunkSection.java
+@@ -23,7 +23,7 @@
+     private short tickingBlockCount;
+     private short tickingFluidCount;
+     public final PalettedContainer<BlockState> states;
+-    private PalettedContainerRO<Holder<Biome>> biomes;
++    private PalettedContainer<Holder<Biome>> biomes; // CraftBukkit - read/write
+ 
+     private LevelChunkSection(LevelChunkSection section) {
+         this.nonEmptyBlockCount = section.nonEmptyBlockCount;
+@@ -33,9 +33,9 @@
+         this.biomes = section.biomes.copy();
+     }
+ 
+-    public LevelChunkSection(PalettedContainer<BlockState> blockStateContainer, PalettedContainerRO<Holder<Biome>> biomeContainer) {
+-        this.states = blockStateContainer;
+-        this.biomes = biomeContainer;
++    public LevelChunkSection(PalettedContainer<BlockState> datapaletteblock, PalettedContainer<Holder<Biome>> palettedcontainerro) { // CraftBukkit - read/write
++        this.states = datapaletteblock;
++        this.biomes = palettedcontainerro;
+         this.recalcBlockCounts();
+     }
+ 
+@@ -196,6 +196,12 @@
+         return (Holder) this.biomes.get(x, y, z);
+     }
+ 
++    // CraftBukkit start
++    public void setBiome(int i, int j, int k, Holder<Biome> biome) {
++        this.biomes.set(i, j, k, biome);
++    }
++    // CraftBukkit end
++
+     public void fillBiomesFromNoise(BiomeResolver biomeSupplier, Climate.Sampler sampler, int x, int y, int z) {
+         PalettedContainer<Holder<Biome>> datapaletteblock = this.biomes.recreate();
+         boolean flag = true;
diff --git a/paper-server/patches/sources/net/minecraft/world/level/chunk/NibbleArray.patch b/paper-server/patches/sources/net/minecraft/world/level/chunk/NibbleArray.patch
deleted file mode 100644
index 48ffdb3140..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/chunk/NibbleArray.patch
+++ /dev/null
@@ -1,7 +0,0 @@
---- a/net/minecraft/world/level/chunk/NibbleArray.java
-+++ b/net/minecraft/world/level/chunk/NibbleArray.java
-@@ -1,3 +1,4 @@
-+// mc-dev import
- package net.minecraft.world.level.chunk;
- 
- import java.util.Arrays;
diff --git a/paper-server/patches/sources/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java.patch b/paper-server/patches/sources/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java.patch
new file mode 100644
index 0000000000..4d145a9527
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java.patch
@@ -0,0 +1,30 @@
+--- a/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java
++++ b/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java
+@@ -36,7 +36,7 @@
+     static CompletableFuture<ChunkAccess> generateStructureStarts(WorldGenContext context, ChunkStep step, StaticCache2D<GenerationChunkHolder> chunks, ChunkAccess chunk) {
+         ServerLevel worldserver = context.level();
+ 
+-        if (worldserver.getServer().getWorldData().worldGenOptions().generateStructures()) {
++        if (worldserver.serverLevelData.worldGenOptions().generateStructures()) { // CraftBukkit
+             context.generator().createStructures(worldserver.registryAccess(), worldserver.getChunkSource().getGeneratorState(), worldserver.structureManager(), chunk, context.structureManager(), worldserver.dimension());
+         }
+ 
+@@ -170,7 +170,17 @@
+ 
+     private static void postLoadProtoChunk(ServerLevel world, List<CompoundTag> entities) {
+         if (!entities.isEmpty()) {
+-            world.addWorldGenChunkEntities(EntityType.loadEntitiesRecursive(entities, world, EntitySpawnReason.LOAD));
++            // CraftBukkit start - these are spawned serialized (DefinedStructure) and we don't call an add event below at the moment due to ordering complexities
++            world.addWorldGenChunkEntities(EntityType.loadEntitiesRecursive(entities, world, EntitySpawnReason.LOAD).filter((entity) -> {
++                boolean needsRemoval = false;
++                net.minecraft.server.dedicated.DedicatedServer server = world.getCraftServer().getServer();
++                if (!world.getChunkSource().spawnFriendlies && (entity instanceof net.minecraft.world.entity.animal.Animal || entity instanceof net.minecraft.world.entity.animal.WaterAnimal)) {
++                    entity.discard(null); // CraftBukkit - add Bukkit remove cause
++                    needsRemoval = true;
++                }
++                return !needsRemoval;
++            }));
++            // CraftBukkit end
+         }
+ 
+     }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/chunk/status/ChunkStatusTasks.patch b/paper-server/patches/sources/net/minecraft/world/level/chunk/status/ChunkStatusTasks.patch
deleted file mode 100644
index 6e9daada0e..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/chunk/status/ChunkStatusTasks.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java
-+++ b/net/minecraft/world/level/chunk/status/ChunkStatusTasks.java
-@@ -36,7 +36,7 @@
-     static CompletableFuture<IChunkAccess> generateStructureStarts(WorldGenContext worldgencontext, ChunkStep chunkstep, StaticCache2D<GenerationChunkHolder> staticcache2d, IChunkAccess ichunkaccess) {
-         WorldServer worldserver = worldgencontext.level();
- 
--        if (worldserver.getServer().getWorldData().worldGenOptions().generateStructures()) {
-+        if (worldserver.serverLevelData.worldGenOptions().generateStructures()) { // CraftBukkit
-             worldgencontext.generator().createStructures(worldserver.registryAccess(), worldserver.getChunkSource().getGeneratorState(), worldserver.structureManager(), ichunkaccess, worldgencontext.structureManager(), worldserver.dimension());
-         }
- 
-@@ -170,7 +170,17 @@
- 
-     private static void postLoadProtoChunk(WorldServer worldserver, List<NBTTagCompound> list) {
-         if (!list.isEmpty()) {
--            worldserver.addWorldGenChunkEntities(EntityTypes.loadEntitiesRecursive(list, worldserver, EntitySpawnReason.LOAD));
-+            // CraftBukkit start - these are spawned serialized (DefinedStructure) and we don't call an add event below at the moment due to ordering complexities
-+            worldserver.addWorldGenChunkEntities(EntityTypes.loadEntitiesRecursive(list, worldserver, EntitySpawnReason.LOAD).filter((entity) -> {
-+                boolean needsRemoval = false;
-+                net.minecraft.server.dedicated.DedicatedServer server = worldserver.getCraftServer().getServer();
-+                if (!worldserver.getChunkSource().spawnFriendlies && (entity instanceof net.minecraft.world.entity.animal.EntityAnimal || entity instanceof net.minecraft.world.entity.animal.EntityWaterAnimal)) {
-+                    entity.discard(null); // CraftBukkit - add Bukkit remove cause
-+                    needsRemoval = true;
-+                }
-+                return !needsRemoval;
-+            }));
-+            // CraftBukkit end
-         }
- 
-     }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/ChunkStorage.java.patch b/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/ChunkStorage.java.patch
new file mode 100644
index 0000000000..8525d2ca6a
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/ChunkStorage.java.patch
@@ -0,0 +1,122 @@
+--- a/net/minecraft/world/level/chunk/storage/ChunkStorage.java
++++ b/net/minecraft/world/level/chunk/storage/ChunkStorage.java
+@@ -15,10 +15,16 @@
+ import net.minecraft.nbt.CompoundTag;
+ import net.minecraft.nbt.NbtUtils;
+ import net.minecraft.resources.ResourceKey;
++import net.minecraft.server.level.ServerChunkCache;
++import net.minecraft.server.level.ServerLevel;
+ import net.minecraft.util.datafix.DataFixTypes;
+ import net.minecraft.world.level.ChunkPos;
+-import net.minecraft.world.level.Level;
++import net.minecraft.world.level.LevelAccessor;
+ import net.minecraft.world.level.chunk.ChunkGenerator;
++// CraftBukkit start
++import java.util.concurrent.ExecutionException;
++import net.minecraft.world.level.chunk.status.ChunkStatus;
++import net.minecraft.world.level.dimension.LevelStem;
+ import net.minecraft.world.level.levelgen.structure.LegacyStructureDataHandler;
+ import net.minecraft.world.level.storage.DimensionDataStorage;
+ 
+@@ -39,27 +45,71 @@
+         return this.worker.isOldChunkAround(chunkPos, checkRadius);
+     }
+ 
+-    public CompoundTag upgradeChunkTag(ResourceKey<Level> worldKey, Supplier<DimensionDataStorage> persistentStateManagerFactory, CompoundTag nbt, Optional<ResourceKey<MapCodec<? extends ChunkGenerator>>> generatorCodecKey) {
+-        int i = ChunkStorage.getVersion(nbt);
++    // CraftBukkit start
++    private boolean check(ServerChunkCache cps, int x, int z) {
++        ChunkPos pos = new ChunkPos(x, z);
++        if (cps != null) {
++            com.google.common.base.Preconditions.checkState(org.bukkit.Bukkit.isPrimaryThread(), "primary thread");
++            if (cps.hasChunk(x, z)) {
++                return true;
++            }
++        }
+ 
++        CompoundTag nbt;
++        try {
++            nbt = this.read(pos).get().orElse(null);
++        } catch (InterruptedException | ExecutionException ex) {
++            throw new RuntimeException(ex);
++        }
++        if (nbt != null) {
++            CompoundTag level = nbt.getCompound("Level");
++            if (level.getBoolean("TerrainPopulated")) {
++                return true;
++            }
++
++            ChunkStatus status = ChunkStatus.byName(level.getString("Status"));
++            if (status != null && status.isOrAfter(ChunkStatus.FEATURES)) {
++                return true;
++            }
++        }
++
++        return false;
++    }
++
++    public CompoundTag upgradeChunkTag(ResourceKey<LevelStem> resourcekey, Supplier<DimensionDataStorage> supplier, CompoundTag nbttagcompound, Optional<ResourceKey<MapCodec<? extends ChunkGenerator>>> optional, ChunkPos pos, @Nullable LevelAccessor generatoraccess) {
++        // CraftBukkit end
++        int i = ChunkStorage.getVersion(nbttagcompound);
++
+         if (i == SharedConstants.getCurrentVersion().getDataVersion().getVersion()) {
+-            return nbt;
++            return nbttagcompound;
+         } else {
+             try {
++                // CraftBukkit start
++                if (i < 1466) {
++                    CompoundTag level = nbttagcompound.getCompound("Level");
++                    if (level.getBoolean("TerrainPopulated") && !level.getBoolean("LightPopulated")) {
++                        ServerChunkCache cps = (generatoraccess == null) ? null : ((ServerLevel) generatoraccess).getChunkSource();
++                        if (this.check(cps, pos.x - 1, pos.z) && this.check(cps, pos.x - 1, pos.z - 1) && this.check(cps, pos.x, pos.z - 1)) {
++                            level.putBoolean("LightPopulated", true);
++                        }
++                    }
++                }
++                // CraftBukkit end
++
+                 if (i < 1493) {
+-                    nbt = DataFixTypes.CHUNK.update(this.fixerUpper, nbt, i, 1493);
+-                    if (nbt.getCompound("Level").getBoolean("hasLegacyStructureData")) {
+-                        LegacyStructureDataHandler persistentstructurelegacy = this.getLegacyStructureHandler(worldKey, persistentStateManagerFactory);
++                    nbttagcompound = DataFixTypes.CHUNK.update(this.fixerUpper, nbttagcompound, i, 1493);
++                    if (nbttagcompound.getCompound("Level").getBoolean("hasLegacyStructureData")) {
++                        LegacyStructureDataHandler persistentstructurelegacy = this.getLegacyStructureHandler(resourcekey, supplier);
+ 
+-                        nbt = persistentstructurelegacy.updateFromLegacy(nbt);
++                        nbttagcompound = persistentstructurelegacy.updateFromLegacy(nbttagcompound);
+                     }
+                 }
+ 
+-                ChunkStorage.injectDatafixingContext(nbt, worldKey, generatorCodecKey);
+-                nbt = DataFixTypes.CHUNK.updateToCurrentVersion(this.fixerUpper, nbt, Math.max(1493, i));
+-                ChunkStorage.removeDatafixingContext(nbt);
+-                NbtUtils.addCurrentDataVersion(nbt);
+-                return nbt;
++                ChunkStorage.injectDatafixingContext(nbttagcompound, resourcekey, optional);
++                nbttagcompound = DataFixTypes.CHUNK.updateToCurrentVersion(this.fixerUpper, nbttagcompound, Math.max(1493, i));
++                ChunkStorage.removeDatafixingContext(nbttagcompound);
++                NbtUtils.addCurrentDataVersion(nbttagcompound);
++                return nbttagcompound;
+             } catch (Exception exception) {
+                 CrashReport crashreport = CrashReport.forThrowable(exception, "Updated chunk");
+                 CrashReportCategory crashreportsystemdetails = crashreport.addCategory("Updated chunk details");
+@@ -70,7 +120,7 @@
+         }
+     }
+ 
+-    private LegacyStructureDataHandler getLegacyStructureHandler(ResourceKey<Level> worldKey, Supplier<DimensionDataStorage> stateManagerGetter) {
++    private LegacyStructureDataHandler getLegacyStructureHandler(ResourceKey<LevelStem> worldKey, Supplier<DimensionDataStorage> stateManagerGetter) { // CraftBukkit
+         LegacyStructureDataHandler persistentstructurelegacy = this.legacyStructureHandler;
+ 
+         if (persistentstructurelegacy == null) {
+@@ -85,7 +135,7 @@
+         return persistentstructurelegacy;
+     }
+ 
+-    public static void injectDatafixingContext(CompoundTag nbt, ResourceKey<Level> worldKey, Optional<ResourceKey<MapCodec<? extends ChunkGenerator>>> generatorCodecKey) {
++    public static void injectDatafixingContext(CompoundTag nbt, ResourceKey<LevelStem> worldKey, Optional<ResourceKey<MapCodec<? extends ChunkGenerator>>> generatorCodecKey) { // CraftBukkit
+         CompoundTag nbttagcompound1 = new CompoundTag();
+ 
+         nbttagcompound1.putString("dimension", worldKey.location().toString());
diff --git a/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/IChunkLoader.patch b/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/IChunkLoader.patch
deleted file mode 100644
index 38001e3b97..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/IChunkLoader.patch
+++ /dev/null
@@ -1,95 +0,0 @@
---- a/net/minecraft/world/level/chunk/storage/IChunkLoader.java
-+++ b/net/minecraft/world/level/chunk/storage/IChunkLoader.java
-@@ -22,6 +22,15 @@
- import net.minecraft.world.level.levelgen.structure.PersistentStructureLegacy;
- import net.minecraft.world.level.storage.WorldPersistentData;
- 
-+// CraftBukkit start
-+import java.util.concurrent.ExecutionException;
-+import net.minecraft.server.level.ChunkProviderServer;
-+import net.minecraft.server.level.WorldServer;
-+import net.minecraft.world.level.GeneratorAccess;
-+import net.minecraft.world.level.chunk.status.ChunkStatus;
-+import net.minecraft.world.level.dimension.WorldDimension;
-+// CraftBukkit end
-+
- public class IChunkLoader implements AutoCloseable {
- 
-     public static final int LAST_MONOLYTH_STRUCTURE_DATA_VERSION = 1493;
-@@ -39,13 +48,57 @@
-         return this.worker.isOldChunkAround(chunkcoordintpair, i);
-     }
- 
--    public NBTTagCompound upgradeChunkTag(ResourceKey<World> resourcekey, Supplier<WorldPersistentData> supplier, NBTTagCompound nbttagcompound, Optional<ResourceKey<MapCodec<? extends ChunkGenerator>>> optional) {
-+    // CraftBukkit start
-+    private boolean check(ChunkProviderServer cps, int x, int z) {
-+        ChunkCoordIntPair pos = new ChunkCoordIntPair(x, z);
-+        if (cps != null) {
-+            com.google.common.base.Preconditions.checkState(org.bukkit.Bukkit.isPrimaryThread(), "primary thread");
-+            if (cps.hasChunk(x, z)) {
-+                return true;
-+            }
-+        }
-+
-+        NBTTagCompound nbt;
-+        try {
-+            nbt = read(pos).get().orElse(null);
-+        } catch (InterruptedException | ExecutionException ex) {
-+            throw new RuntimeException(ex);
-+        }
-+        if (nbt != null) {
-+            NBTTagCompound level = nbt.getCompound("Level");
-+            if (level.getBoolean("TerrainPopulated")) {
-+                return true;
-+            }
-+
-+            ChunkStatus status = ChunkStatus.byName(level.getString("Status"));
-+            if (status != null && status.isOrAfter(ChunkStatus.FEATURES)) {
-+                return true;
-+            }
-+        }
-+
-+        return false;
-+    }
-+
-+    public NBTTagCompound upgradeChunkTag(ResourceKey<WorldDimension> resourcekey, Supplier<WorldPersistentData> supplier, NBTTagCompound nbttagcompound, Optional<ResourceKey<MapCodec<? extends ChunkGenerator>>> optional, ChunkCoordIntPair pos, @Nullable GeneratorAccess generatoraccess) {
-+        // CraftBukkit end
-         int i = getVersion(nbttagcompound);
- 
-         if (i == SharedConstants.getCurrentVersion().getDataVersion().getVersion()) {
-             return nbttagcompound;
-         } else {
-             try {
-+                // CraftBukkit start
-+                if (i < 1466) {
-+                    NBTTagCompound level = nbttagcompound.getCompound("Level");
-+                    if (level.getBoolean("TerrainPopulated") && !level.getBoolean("LightPopulated")) {
-+                        ChunkProviderServer cps = (generatoraccess == null) ? null : ((WorldServer) generatoraccess).getChunkSource();
-+                        if (check(cps, pos.x - 1, pos.z) && check(cps, pos.x - 1, pos.z - 1) && check(cps, pos.x, pos.z - 1)) {
-+                            level.putBoolean("LightPopulated", true);
-+                        }
-+                    }
-+                }
-+                // CraftBukkit end
-+
-                 if (i < 1493) {
-                     nbttagcompound = DataFixTypes.CHUNK.update(this.fixerUpper, nbttagcompound, i, 1493);
-                     if (nbttagcompound.getCompound("Level").getBoolean("hasLegacyStructureData")) {
-@@ -70,7 +123,7 @@
-         }
-     }
- 
--    private PersistentStructureLegacy getLegacyStructureHandler(ResourceKey<World> resourcekey, Supplier<WorldPersistentData> supplier) {
-+    private PersistentStructureLegacy getLegacyStructureHandler(ResourceKey<WorldDimension> resourcekey, Supplier<WorldPersistentData> supplier) { // CraftBukkit
-         PersistentStructureLegacy persistentstructurelegacy = this.legacyStructureHandler;
- 
-         if (persistentstructurelegacy == null) {
-@@ -85,7 +138,7 @@
-         return persistentstructurelegacy;
-     }
- 
--    public static void injectDatafixingContext(NBTTagCompound nbttagcompound, ResourceKey<World> resourcekey, Optional<ResourceKey<MapCodec<? extends ChunkGenerator>>> optional) {
-+    public static void injectDatafixingContext(NBTTagCompound nbttagcompound, ResourceKey<WorldDimension> resourcekey, Optional<ResourceKey<MapCodec<? extends ChunkGenerator>>> optional) { // CraftBukkit
-         NBTTagCompound nbttagcompound1 = new NBTTagCompound();
- 
-         nbttagcompound1.putString("dimension", resourcekey.location().toString());
diff --git a/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/RegionFile.patch b/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/RegionFile.java.patch
similarity index 89%
rename from paper-server/patches/sources/net/minecraft/world/level/chunk/storage/RegionFile.patch
rename to paper-server/patches/sources/net/minecraft/world/level/chunk/storage/RegionFile.java.patch
index ec081d2e99..3aa8202989 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/RegionFile.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/RegionFile.java.patch
@@ -7,14 +7,14 @@
  import com.google.common.annotations.VisibleForTesting;
 @@ -63,8 +64,8 @@
          } else {
-             this.externalFileDir = path1;
+             this.externalFileDir = directory;
              this.offsets = this.header.asIntBuffer();
 -            this.offsets.limit(1024);
 -            this.header.position(4096);
 +            ((java.nio.Buffer) this.offsets).limit(1024); // CraftBukkit - decompile error
 +            ((java.nio.Buffer) this.header).position(4096); // CraftBukkit - decompile error
              this.timestamps = this.header.asIntBuffer();
-             if (flag) {
+             if (dsync) {
                  this.file = FileChannel.open(path, StandardOpenOption.CREATE, StandardOpenOption.READ, StandardOpenOption.WRITE, StandardOpenOption.DSYNC);
 @@ -73,7 +74,7 @@
              }
@@ -32,7 +32,7 @@
 -            bytebuffer.flip();
 +            ((java.nio.Buffer) bytebuffer).flip(); // CraftBukkit - decompile error
              if (bytebuffer.remaining() < 5) {
-                 RegionFile.LOGGER.error("Chunk {} header is truncated: expected {} but read {}", new Object[]{chunkcoordintpair, l, bytebuffer.remaining()});
+                 RegionFile.LOGGER.error("Chunk {} header is truncated: expected {} but read {}", new Object[]{pos, l, bytebuffer.remaining()});
                  return null;
 @@ -246,7 +247,7 @@
  
@@ -56,9 +56,9 @@
          FileChannel filechannel = FileChannel.open(path1, StandardOpenOption.CREATE, StandardOpenOption.WRITE);
  
          try {
--            bytebuffer.position(5);
-+            ((java.nio.Buffer) bytebuffer).position(5); // CraftBukkit - decompile error
-             filechannel.write(bytebuffer);
+-            buf.position(5);
++            ((java.nio.Buffer) buf).position(5); // CraftBukkit - decompile error
+             filechannel.write(buf);
          } catch (Throwable throwable) {
              if (filechannel != null) {
 @@ -382,7 +383,7 @@
diff --git a/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/RegionFileCache.patch b/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/RegionFileCache.patch
deleted file mode 100644
index 888c3ee20d..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/RegionFileCache.patch
+++ /dev/null
@@ -1,56 +0,0 @@
---- a/net/minecraft/world/level/chunk/storage/RegionFileCache.java
-+++ b/net/minecraft/world/level/chunk/storage/RegionFileCache.java
-@@ -32,7 +32,7 @@
-         this.info = regionstorageinfo;
-     }
- 
--    private RegionFile getRegionFile(ChunkCoordIntPair chunkcoordintpair) throws IOException {
-+    private RegionFile getRegionFile(ChunkCoordIntPair chunkcoordintpair, boolean existingOnly) throws IOException { // CraftBukkit
-         long i = ChunkCoordIntPair.asLong(chunkcoordintpair.getRegionX(), chunkcoordintpair.getRegionZ());
-         RegionFile regionfile = (RegionFile) this.regionCache.getAndMoveToFirst(i);
- 
-@@ -47,6 +47,7 @@
-             Path path = this.folder;
-             int j = chunkcoordintpair.getRegionX();
-             Path path1 = path.resolve("r." + j + "." + chunkcoordintpair.getRegionZ() + ".mca");
-+            if (existingOnly && !java.nio.file.Files.exists(path1)) return null; // CraftBukkit
-             RegionFile regionfile1 = new RegionFile(this.info, path1, this.folder, this.sync);
- 
-             this.regionCache.putAndMoveToFirst(i, regionfile1);
-@@ -56,7 +57,12 @@
- 
-     @Nullable
-     public NBTTagCompound read(ChunkCoordIntPair chunkcoordintpair) throws IOException {
--        RegionFile regionfile = this.getRegionFile(chunkcoordintpair);
-+        // CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
-+        RegionFile regionfile = this.getRegionFile(chunkcoordintpair, true);
-+        if (regionfile == null) {
-+            return null;
-+        }
-+        // CraftBukkit end
-         DataInputStream datainputstream = regionfile.getChunkDataInputStream(chunkcoordintpair);
- 
-         NBTTagCompound nbttagcompound;
-@@ -96,7 +102,12 @@
-     }
- 
-     public void scanChunk(ChunkCoordIntPair chunkcoordintpair, StreamTagVisitor streamtagvisitor) throws IOException {
--        RegionFile regionfile = this.getRegionFile(chunkcoordintpair);
-+        // CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
-+        RegionFile regionfile = this.getRegionFile(chunkcoordintpair, true);
-+        if (regionfile == null) {
-+            return;
-+        }
-+        // CraftBukkit end
-         DataInputStream datainputstream = regionfile.getChunkDataInputStream(chunkcoordintpair);
- 
-         try {
-@@ -122,7 +133,7 @@
-     }
- 
-     protected void write(ChunkCoordIntPair chunkcoordintpair, @Nullable NBTTagCompound nbttagcompound) throws IOException {
--        RegionFile regionfile = this.getRegionFile(chunkcoordintpair);
-+        RegionFile regionfile = this.getRegionFile(chunkcoordintpair, false); // CraftBukkit
- 
-         if (nbttagcompound == null) {
-             regionfile.clear(chunkcoordintpair);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/RegionFileStorage.java.patch b/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/RegionFileStorage.java.patch
new file mode 100644
index 0000000000..7f38ae92af
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/RegionFileStorage.java.patch
@@ -0,0 +1,62 @@
+--- a/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
++++ b/net/minecraft/world/level/chunk/storage/RegionFileStorage.java
+@@ -32,8 +32,8 @@
+         this.info = storageKey;
+     }
+ 
+-    private RegionFile getRegionFile(ChunkPos pos) throws IOException {
+-        long i = ChunkPos.asLong(pos.getRegionX(), pos.getRegionZ());
++    private RegionFile getRegionFile(ChunkPos chunkcoordintpair, boolean existingOnly) throws IOException { // CraftBukkit
++        long i = ChunkPos.asLong(chunkcoordintpair.getRegionX(), chunkcoordintpair.getRegionZ());
+         RegionFile regionfile = (RegionFile) this.regionCache.getAndMoveToFirst(i);
+ 
+         if (regionfile != null) {
+@@ -45,8 +45,9 @@
+ 
+             FileUtil.createDirectoriesSafe(this.folder);
+             Path path = this.folder;
+-            int j = pos.getRegionX();
+-            Path path1 = path.resolve("r." + j + "." + pos.getRegionZ() + ".mca");
++            int j = chunkcoordintpair.getRegionX();
++            Path path1 = path.resolve("r." + j + "." + chunkcoordintpair.getRegionZ() + ".mca");
++            if (existingOnly && !java.nio.file.Files.exists(path1)) return null; // CraftBukkit
+             RegionFile regionfile1 = new RegionFile(this.info, path1, this.folder, this.sync);
+ 
+             this.regionCache.putAndMoveToFirst(i, regionfile1);
+@@ -56,7 +57,12 @@
+ 
+     @Nullable
+     public CompoundTag read(ChunkPos pos) throws IOException {
+-        RegionFile regionfile = this.getRegionFile(pos);
++        // CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
++        RegionFile regionfile = this.getRegionFile(pos, true);
++        if (regionfile == null) {
++            return null;
++        }
++        // CraftBukkit end
+         DataInputStream datainputstream = regionfile.getChunkDataInputStream(pos);
+ 
+         CompoundTag nbttagcompound;
+@@ -96,7 +102,12 @@
+     }
+ 
+     public void scanChunk(ChunkPos chunkPos, StreamTagVisitor scanner) throws IOException {
+-        RegionFile regionfile = this.getRegionFile(chunkPos);
++        // CraftBukkit start - SPIGOT-5680: There's no good reason to preemptively create files on read, save that for writing
++        RegionFile regionfile = this.getRegionFile(chunkPos, true);
++        if (regionfile == null) {
++            return;
++        }
++        // CraftBukkit end
+         DataInputStream datainputstream = regionfile.getChunkDataInputStream(chunkPos);
+ 
+         try {
+@@ -122,7 +133,7 @@
+     }
+ 
+     protected void write(ChunkPos pos, @Nullable CompoundTag nbt) throws IOException {
+-        RegionFile regionfile = this.getRegionFile(pos);
++        RegionFile regionfile = this.getRegionFile(pos, false); // CraftBukkit
+ 
+         if (nbt == null) {
+             regionfile.clear(pos);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/SerializableChunkData.java.patch b/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/SerializableChunkData.java.patch
new file mode 100644
index 0000000000..132fde3257
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/SerializableChunkData.java.patch
@@ -0,0 +1,147 @@
+--- a/net/minecraft/world/level/chunk/storage/SerializableChunkData.java
++++ b/net/minecraft/world/level/chunk/storage/SerializableChunkData.java
+@@ -76,7 +76,8 @@
+ import net.minecraft.world.ticks.SavedTick;
+ import org.slf4j.Logger;
+ 
+-public record SerializableChunkData(Registry<Biome> biomeRegistry, ChunkPos chunkPos, int minSectionY, long lastUpdateTime, long inhabitedTime, ChunkStatus chunkStatus, @Nullable BlendingData.Packed blendingData, @Nullable BelowZeroRetrogen belowZeroRetrogen, UpgradeData upgradeData, @Nullable long[] carvingMask, Map<Heightmap.Types, long[]> heightmaps, ChunkAccess.PackedTicks packedTicks, ShortList[] postProcessingSections, boolean lightCorrect, List<SerializableChunkData.SectionData> sectionData, List<CompoundTag> entities, List<CompoundTag> blockEntities, CompoundTag structureData) {
++// CraftBukkit - persistentDataContainer
++public record SerializableChunkData(Registry<Biome> biomeRegistry, ChunkPos chunkPos, int minSectionY, long lastUpdateTime, long inhabitedTime, ChunkStatus chunkStatus, @Nullable BlendingData.Packed blendingData, @Nullable BelowZeroRetrogen belowZeroRetrogen, UpgradeData upgradeData, @Nullable long[] carvingMask, Map<Heightmap.Types, long[]> heightmaps, ChunkAccess.PackedTicks packedTicks, ShortList[] postProcessingSections, boolean lightCorrect, List<SerializableChunkData.SectionData> sectionData, List<CompoundTag> entities, List<CompoundTag> blockEntities, CompoundTag structureData, @Nullable Tag persistentDataContainer) {
+ 
+     public static final Codec<PalettedContainer<BlockState>> BLOCK_STATE_CODEC = PalettedContainer.codecRW(Block.BLOCK_STATE_REGISTRY, BlockState.CODEC, PalettedContainer.Strategy.SECTION_STATES, Blocks.AIR.defaultBlockState());
+     private static final Logger LOGGER = LogUtils.getLogger();
+@@ -110,7 +111,7 @@
+                 dataresult = BlendingData.Packed.CODEC.parse(NbtOps.INSTANCE, nbt.getCompound("blending_data"));
+                 logger = SerializableChunkData.LOGGER;
+                 Objects.requireNonNull(logger);
+-                blendingdata_d = (BlendingData.Packed) dataresult.resultOrPartial(logger::error).orElse((Object) null);
++                blendingdata_d = (BlendingData.Packed) ((DataResult<BlendingData.Packed>) dataresult).resultOrPartial(logger::error).orElse(null); // CraftBukkit - decompile error
+             } else {
+                 blendingdata_d = null;
+             }
+@@ -121,7 +122,7 @@
+                 dataresult = BelowZeroRetrogen.CODEC.parse(NbtOps.INSTANCE, nbt.getCompound("below_zero_retrogen"));
+                 logger = SerializableChunkData.LOGGER;
+                 Objects.requireNonNull(logger);
+-                belowzeroretrogen = (BelowZeroRetrogen) dataresult.resultOrPartial(logger::error).orElse((Object) null);
++                belowzeroretrogen = (BelowZeroRetrogen) ((DataResult<BelowZeroRetrogen>) dataresult).resultOrPartial(logger::error).orElse(null); // CraftBukkit - decompile error
+             } else {
+                 belowzeroretrogen = null;
+             }
+@@ -178,7 +179,7 @@
+             ListTag nbttaglist2 = nbt.getList("sections", 10);
+             List<SerializableChunkData.SectionData> list4 = new ArrayList(nbttaglist2.size());
+             Registry<Biome> iregistry = registryManager.lookupOrThrow(Registries.BIOME);
+-            Codec<PalettedContainerRO<Holder<Biome>>> codec = makeBiomeCodec(iregistry);
++            Codec<PalettedContainer<Holder<Biome>>> codec = makeBiomeCodecRW(iregistry); // CraftBukkit - read/write
+ 
+             for (int i1 = 0; i1 < nbttaglist2.size(); ++i1) {
+                 CompoundTag nbttagcompound3 = nbttaglist2.getCompound(i1);
+@@ -196,17 +197,17 @@
+                         datapaletteblock = new PalettedContainer<>(Block.BLOCK_STATE_REGISTRY, Blocks.AIR.defaultBlockState(), PalettedContainer.Strategy.SECTION_STATES);
+                     }
+ 
+-                    Object object;
++                    PalettedContainer object; // CraftBukkit - read/write
+ 
+                     if (nbttagcompound3.contains("biomes", 10)) {
+-                        object = (PalettedContainerRO) codec.parse(NbtOps.INSTANCE, nbttagcompound3.getCompound("biomes")).promotePartial((s1) -> {
++                        object = codec.parse(NbtOps.INSTANCE, nbttagcompound3.getCompound("biomes")).promotePartial((s1) -> { // CraftBukkit - read/write
+                             logErrors(chunkcoordintpair, b0, s1);
+                         }).getOrThrow(SerializableChunkData.ChunkReadException::new);
+                     } else {
+                         object = new PalettedContainer<>(iregistry.asHolderIdMap(), iregistry.getOrThrow(Biomes.PLAINS), PalettedContainer.Strategy.SECTION_BIOMES);
+                     }
+ 
+-                    chunksection = new LevelChunkSection(datapaletteblock, (PalettedContainerRO) object);
++                    chunksection = new LevelChunkSection(datapaletteblock, (PalettedContainer) object); // CraftBukkit - read/write
+                 } else {
+                     chunksection = null;
+                 }
+@@ -217,7 +218,8 @@
+                 list4.add(new SerializableChunkData.SectionData(b0, chunksection, nibblearray, nibblearray1));
+             }
+ 
+-            return new SerializableChunkData(iregistry, chunkcoordintpair, world.getMinSectionY(), i, j, chunkstatus, blendingdata_d, belowzeroretrogen, chunkconverter, along, map, ichunkaccess_a, ashortlist, flag, list4, list2, list3, nbttagcompound2);
++            // CraftBukkit - ChunkBukkitValues
++            return new SerializableChunkData(iregistry, chunkcoordintpair, world.getMinSectionY(), i, j, chunkstatus, blendingdata_d, belowzeroretrogen, chunkconverter, along, map, ichunkaccess_a, ashortlist, flag, list4, list2, list3, nbttagcompound2, nbt.get("ChunkBukkitValues"));
+         }
+     }
+ 
+@@ -289,6 +291,12 @@
+             }
+         }
+ 
++        // CraftBukkit start - load chunk persistent data from nbt - SPIGOT-6814: Already load PDC here to account for 1.17 to 1.18 chunk upgrading.
++        if (this.persistentDataContainer instanceof CompoundTag) {
++            ((ChunkAccess) object).persistentDataContainer.putAll((CompoundTag) this.persistentDataContainer);
++        }
++        // CraftBukkit end
++
+         ((ChunkAccess) object).setLightCorrect(this.lightCorrect);
+         EnumSet<Heightmap.Types> enumset = EnumSet.noneOf(Heightmap.Types.class);
+         Iterator iterator1 = ((ChunkAccess) object).getPersistedStatus().heightmapsAfter().iterator();
+@@ -346,7 +354,13 @@
+ 
+     private static Codec<PalettedContainerRO<Holder<Biome>>> makeBiomeCodec(Registry<Biome> biomeRegistry) {
+         return PalettedContainer.codecRO(biomeRegistry.asHolderIdMap(), biomeRegistry.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, biomeRegistry.getOrThrow(Biomes.PLAINS));
++    }
++
++    // CraftBukkit start - read/write
++    private static Codec<PalettedContainer<Holder<Biome>>> makeBiomeCodecRW(Registry<Biome> iregistry) {
++        return PalettedContainer.codecRW(iregistry.asHolderIdMap(), iregistry.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, iregistry.getOrThrow(Biomes.PLAINS));
+     }
++    // CraftBukkit end
+ 
+     public static SerializableChunkData copyOf(ServerLevel world, ChunkAccess chunk) {
+         if (!chunk.canBeSerialized()) {
+@@ -419,7 +433,14 @@
+             });
+             CompoundTag nbttagcompound1 = packStructureData(StructurePieceSerializationContext.fromLevel(world), chunkcoordintpair, chunk.getAllStarts(), chunk.getAllReferences());
+ 
+-            return new SerializableChunkData(world.registryAccess().lookupOrThrow(Registries.BIOME), chunkcoordintpair, chunk.getMinSectionY(), world.getGameTime(), chunk.getInhabitedTime(), chunk.getPersistedStatus(), (BlendingData.Packed) Optionull.map(chunk.getBlendingData(), BlendingData::pack), chunk.getBelowZeroRetrogen(), chunk.getUpgradeData().copy(), along, map, ichunkaccess_a, ashortlist, chunk.isLightCorrect(), list, list2, list1, nbttagcompound1);
++            // CraftBukkit start - store chunk persistent data in nbt
++            CompoundTag persistentDataContainer = null;
++            if (!chunk.persistentDataContainer.isEmpty()) { // SPIGOT-6814: Always save PDC to account for 1.17 to 1.18 chunk upgrading.
++                persistentDataContainer = chunk.persistentDataContainer.toTagCompound();
++            }
++
++            return new SerializableChunkData(world.registryAccess().lookupOrThrow(Registries.BIOME), chunkcoordintpair, chunk.getMinSectionY(), world.getGameTime(), chunk.getInhabitedTime(), chunk.getPersistedStatus(), (BlendingData.Packed) Optionull.map(chunk.getBlendingData(), BlendingData::pack), chunk.getBelowZeroRetrogen(), chunk.getUpgradeData().copy(), along, map, ichunkaccess_a, ashortlist, chunk.isLightCorrect(), list, list2, list1, nbttagcompound1, persistentDataContainer);
++            // CraftBukkit end
+         }
+     }
+ 
+@@ -432,7 +453,7 @@
+         nbttagcompound.putLong("LastUpdate", this.lastUpdateTime);
+         nbttagcompound.putLong("InhabitedTime", this.inhabitedTime);
+         nbttagcompound.putString("Status", BuiltInRegistries.CHUNK_STATUS.getKey(this.chunkStatus).toString());
+-        DataResult dataresult;
++        DataResult<Tag> dataresult; // CraftBukkit - decompile error
+         Logger logger;
+ 
+         if (this.blendingData != null) {
+@@ -513,6 +534,11 @@
+         });
+         nbttagcompound.put("Heightmaps", nbttagcompound2);
+         nbttagcompound.put("structures", this.structureData);
++        // CraftBukkit start - store chunk persistent data in nbt
++        if (this.persistentDataContainer != null) { // SPIGOT-6814: Always save PDC to account for 1.17 to 1.18 chunk upgrading.
++            nbttagcompound.put("ChunkBukkitValues", this.persistentDataContainer);
++        }
++        // CraftBukkit end
+         return nbttagcompound;
+     }
+ 
+@@ -623,6 +649,12 @@
+                 StructureStart structurestart = StructureStart.loadStaticStart(context, nbttagcompound1.getCompound(s), worldSeed);
+ 
+                 if (structurestart != null) {
++                    // CraftBukkit start - load persistent data for structure start
++                    net.minecraft.nbt.Tag persistentBase = nbttagcompound1.getCompound(s).get("StructureBukkitValues");
++                    if (persistentBase instanceof CompoundTag) {
++                        structurestart.persistentDataContainer.putAll((CompoundTag) persistentBase);
++                    }
++                    // CraftBukkit end
+                     map.put(structure, structurestart);
+                 }
+             }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/SerializableChunkData.patch b/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/SerializableChunkData.patch
deleted file mode 100644
index ccd848a8e2..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/chunk/storage/SerializableChunkData.patch
+++ /dev/null
@@ -1,146 +0,0 @@
---- a/net/minecraft/world/level/chunk/storage/SerializableChunkData.java
-+++ b/net/minecraft/world/level/chunk/storage/SerializableChunkData.java
-@@ -76,7 +76,8 @@
- import net.minecraft.world.ticks.TickListChunk;
- import org.slf4j.Logger;
- 
--public record SerializableChunkData(IRegistry<BiomeBase> biomeRegistry, ChunkCoordIntPair chunkPos, int minSectionY, long lastUpdateTime, long inhabitedTime, ChunkStatus chunkStatus, @Nullable BlendingData.d blendingData, @Nullable BelowZeroRetrogen belowZeroRetrogen, ChunkConverter upgradeData, @Nullable long[] carvingMask, Map<HeightMap.Type, long[]> heightmaps, IChunkAccess.a packedTicks, ShortList[] postProcessingSections, boolean lightCorrect, List<SerializableChunkData.b> sectionData, List<NBTTagCompound> entities, List<NBTTagCompound> blockEntities, NBTTagCompound structureData) {
-+// CraftBukkit - persistentDataContainer
-+public record SerializableChunkData(IRegistry<BiomeBase> biomeRegistry, ChunkCoordIntPair chunkPos, int minSectionY, long lastUpdateTime, long inhabitedTime, ChunkStatus chunkStatus, @Nullable BlendingData.d blendingData, @Nullable BelowZeroRetrogen belowZeroRetrogen, ChunkConverter upgradeData, @Nullable long[] carvingMask, Map<HeightMap.Type, long[]> heightmaps, IChunkAccess.a packedTicks, ShortList[] postProcessingSections, boolean lightCorrect, List<SerializableChunkData.b> sectionData, List<NBTTagCompound> entities, List<NBTTagCompound> blockEntities, NBTTagCompound structureData, @Nullable NBTBase persistentDataContainer) {
- 
-     public static final Codec<DataPaletteBlock<IBlockData>> BLOCK_STATE_CODEC = DataPaletteBlock.codecRW(Block.BLOCK_STATE_REGISTRY, IBlockData.CODEC, DataPaletteBlock.d.SECTION_STATES, Blocks.AIR.defaultBlockState());
-     private static final Logger LOGGER = LogUtils.getLogger();
-@@ -110,7 +111,7 @@
-                 dataresult = BlendingData.d.CODEC.parse(DynamicOpsNBT.INSTANCE, nbttagcompound.getCompound("blending_data"));
-                 logger = SerializableChunkData.LOGGER;
-                 Objects.requireNonNull(logger);
--                blendingdata_d = (BlendingData.d) dataresult.resultOrPartial(logger::error).orElse((Object) null);
-+                blendingdata_d = (BlendingData.d) ((DataResult<BlendingData.d>) dataresult).resultOrPartial(logger::error).orElse(null); // CraftBukkit - decompile error
-             } else {
-                 blendingdata_d = null;
-             }
-@@ -121,7 +122,7 @@
-                 dataresult = BelowZeroRetrogen.CODEC.parse(DynamicOpsNBT.INSTANCE, nbttagcompound.getCompound("below_zero_retrogen"));
-                 logger = SerializableChunkData.LOGGER;
-                 Objects.requireNonNull(logger);
--                belowzeroretrogen = (BelowZeroRetrogen) dataresult.resultOrPartial(logger::error).orElse((Object) null);
-+                belowzeroretrogen = (BelowZeroRetrogen) ((DataResult<BelowZeroRetrogen>) dataresult).resultOrPartial(logger::error).orElse(null); // CraftBukkit - decompile error
-             } else {
-                 belowzeroretrogen = null;
-             }
-@@ -178,7 +179,7 @@
-             NBTTagList nbttaglist2 = nbttagcompound.getList("sections", 10);
-             List<SerializableChunkData.b> list4 = new ArrayList(nbttaglist2.size());
-             IRegistry<BiomeBase> iregistry = iregistrycustom.lookupOrThrow(Registries.BIOME);
--            Codec<PalettedContainerRO<Holder<BiomeBase>>> codec = makeBiomeCodec(iregistry);
-+            Codec<DataPaletteBlock<Holder<BiomeBase>>> codec = makeBiomeCodecRW(iregistry); // CraftBukkit - read/write
- 
-             for (int i1 = 0; i1 < nbttaglist2.size(); ++i1) {
-                 NBTTagCompound nbttagcompound3 = nbttaglist2.getCompound(i1);
-@@ -196,17 +197,17 @@
-                         datapaletteblock = new DataPaletteBlock<>(Block.BLOCK_STATE_REGISTRY, Blocks.AIR.defaultBlockState(), DataPaletteBlock.d.SECTION_STATES);
-                     }
- 
--                    Object object;
-+                    DataPaletteBlock object; // CraftBukkit - read/write
- 
-                     if (nbttagcompound3.contains("biomes", 10)) {
--                        object = (PalettedContainerRO) codec.parse(DynamicOpsNBT.INSTANCE, nbttagcompound3.getCompound("biomes")).promotePartial((s1) -> {
-+                        object = codec.parse(DynamicOpsNBT.INSTANCE, nbttagcompound3.getCompound("biomes")).promotePartial((s1) -> { // CraftBukkit - read/write
-                             logErrors(chunkcoordintpair, b0, s1);
-                         }).getOrThrow(SerializableChunkData.a::new);
-                     } else {
-                         object = new DataPaletteBlock<>(iregistry.asHolderIdMap(), iregistry.getOrThrow(Biomes.PLAINS), DataPaletteBlock.d.SECTION_BIOMES);
-                     }
- 
--                    chunksection = new ChunkSection(datapaletteblock, (PalettedContainerRO) object);
-+                    chunksection = new ChunkSection(datapaletteblock, (DataPaletteBlock) object); // CraftBukkit - read/write
-                 } else {
-                     chunksection = null;
-                 }
-@@ -217,7 +218,8 @@
-                 list4.add(new SerializableChunkData.b(b0, chunksection, nibblearray, nibblearray1));
-             }
- 
--            return new SerializableChunkData(iregistry, chunkcoordintpair, levelheightaccessor.getMinSectionY(), i, j, chunkstatus, blendingdata_d, belowzeroretrogen, chunkconverter, along, map, ichunkaccess_a, ashortlist, flag, list4, list2, list3, nbttagcompound2);
-+            // CraftBukkit - ChunkBukkitValues
-+            return new SerializableChunkData(iregistry, chunkcoordintpair, levelheightaccessor.getMinSectionY(), i, j, chunkstatus, blendingdata_d, belowzeroretrogen, chunkconverter, along, map, ichunkaccess_a, ashortlist, flag, list4, list2, list3, nbttagcompound2, nbttagcompound.get("ChunkBukkitValues"));
-         }
-     }
- 
-@@ -289,6 +291,12 @@
-             }
-         }
- 
-+        // CraftBukkit start - load chunk persistent data from nbt - SPIGOT-6814: Already load PDC here to account for 1.17 to 1.18 chunk upgrading.
-+        if (persistentDataContainer instanceof NBTTagCompound) {
-+            ((IChunkAccess) object).persistentDataContainer.putAll((NBTTagCompound) persistentDataContainer);
-+        }
-+        // CraftBukkit end
-+
-         ((IChunkAccess) object).setLightCorrect(this.lightCorrect);
-         EnumSet<HeightMap.Type> enumset = EnumSet.noneOf(HeightMap.Type.class);
-         Iterator iterator1 = ((IChunkAccess) object).getPersistedStatus().heightmapsAfter().iterator();
-@@ -348,6 +356,12 @@
-         return DataPaletteBlock.codecRO(iregistry.asHolderIdMap(), iregistry.holderByNameCodec(), DataPaletteBlock.d.SECTION_BIOMES, iregistry.getOrThrow(Biomes.PLAINS));
-     }
- 
-+    // CraftBukkit start - read/write
-+    private static Codec<DataPaletteBlock<Holder<BiomeBase>>> makeBiomeCodecRW(IRegistry<BiomeBase> iregistry) {
-+        return DataPaletteBlock.codecRW(iregistry.asHolderIdMap(), iregistry.holderByNameCodec(), DataPaletteBlock.d.SECTION_BIOMES, iregistry.getOrThrow(Biomes.PLAINS));
-+    }
-+    // CraftBukkit end
-+
-     public static SerializableChunkData copyOf(WorldServer worldserver, IChunkAccess ichunkaccess) {
-         if (!ichunkaccess.canBeSerialized()) {
-             throw new IllegalArgumentException("Chunk can't be serialized: " + String.valueOf(ichunkaccess));
-@@ -419,7 +433,14 @@
-             });
-             NBTTagCompound nbttagcompound1 = packStructureData(StructurePieceSerializationContext.fromLevel(worldserver), chunkcoordintpair, ichunkaccess.getAllStarts(), ichunkaccess.getAllReferences());
- 
--            return new SerializableChunkData(worldserver.registryAccess().lookupOrThrow(Registries.BIOME), chunkcoordintpair, ichunkaccess.getMinSectionY(), worldserver.getGameTime(), ichunkaccess.getInhabitedTime(), ichunkaccess.getPersistedStatus(), (BlendingData.d) Optionull.map(ichunkaccess.getBlendingData(), BlendingData::pack), ichunkaccess.getBelowZeroRetrogen(), ichunkaccess.getUpgradeData().copy(), along, map, ichunkaccess_a, ashortlist, ichunkaccess.isLightCorrect(), list, list2, list1, nbttagcompound1);
-+            // CraftBukkit start - store chunk persistent data in nbt
-+            NBTTagCompound persistentDataContainer = null;
-+            if (!ichunkaccess.persistentDataContainer.isEmpty()) { // SPIGOT-6814: Always save PDC to account for 1.17 to 1.18 chunk upgrading.
-+                persistentDataContainer = ichunkaccess.persistentDataContainer.toTagCompound();
-+            }
-+
-+            return new SerializableChunkData(worldserver.registryAccess().lookupOrThrow(Registries.BIOME), chunkcoordintpair, ichunkaccess.getMinSectionY(), worldserver.getGameTime(), ichunkaccess.getInhabitedTime(), ichunkaccess.getPersistedStatus(), (BlendingData.d) Optionull.map(ichunkaccess.getBlendingData(), BlendingData::pack), ichunkaccess.getBelowZeroRetrogen(), ichunkaccess.getUpgradeData().copy(), along, map, ichunkaccess_a, ashortlist, ichunkaccess.isLightCorrect(), list, list2, list1, nbttagcompound1, persistentDataContainer);
-+            // CraftBukkit end
-         }
-     }
- 
-@@ -432,7 +453,7 @@
-         nbttagcompound.putLong("LastUpdate", this.lastUpdateTime);
-         nbttagcompound.putLong("InhabitedTime", this.inhabitedTime);
-         nbttagcompound.putString("Status", BuiltInRegistries.CHUNK_STATUS.getKey(this.chunkStatus).toString());
--        DataResult dataresult;
-+        DataResult<NBTBase> dataresult; // CraftBukkit - decompile error
-         Logger logger;
- 
-         if (this.blendingData != null) {
-@@ -513,6 +534,11 @@
-         });
-         nbttagcompound.put("Heightmaps", nbttagcompound2);
-         nbttagcompound.put("structures", this.structureData);
-+        // CraftBukkit start - store chunk persistent data in nbt
-+        if (persistentDataContainer != null) { // SPIGOT-6814: Always save PDC to account for 1.17 to 1.18 chunk upgrading.
-+            nbttagcompound.put("ChunkBukkitValues", persistentDataContainer);
-+        }
-+        // CraftBukkit end
-         return nbttagcompound;
-     }
- 
-@@ -623,6 +649,12 @@
-                 StructureStart structurestart = StructureStart.loadStaticStart(structurepieceserializationcontext, nbttagcompound1.getCompound(s), i);
- 
-                 if (structurestart != null) {
-+                    // CraftBukkit start - load persistent data for structure start
-+                    net.minecraft.nbt.NBTBase persistentBase = nbttagcompound1.getCompound(s).get("StructureBukkitValues");
-+                    if (persistentBase instanceof NBTTagCompound) {
-+                        structurestart.persistentDataContainer.putAll((NBTTagCompound) persistentBase);
-+                    }
-+                    // CraftBukkit end
-                     map.put(structure, structurestart);
-                 }
-             }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/dimension/end/DragonRespawnAnimation.java.patch b/paper-server/patches/sources/net/minecraft/world/level/dimension/end/DragonRespawnAnimation.java.patch
new file mode 100644
index 0000000000..bc18c1f95e
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/dimension/end/DragonRespawnAnimation.java.patch
@@ -0,0 +1,57 @@
+--- a/net/minecraft/world/level/dimension/end/DragonRespawnAnimation.java
++++ b/net/minecraft/world/level/dimension/end/DragonRespawnAnimation.java
+@@ -12,6 +12,9 @@
+ import net.minecraft.world.level.levelgen.feature.Feature;
+ import net.minecraft.world.level.levelgen.feature.SpikeFeature;
+ import net.minecraft.world.level.levelgen.feature.configurations.SpikeConfiguration;
++// CraftBukkit start
++import org.bukkit.event.entity.EntityRemoveEvent;
++// CraftBukkit end
+ 
+ public enum DragonRespawnAnimation {
+ 
+@@ -27,7 +30,7 @@
+                 entityendercrystal.setBeamTarget(blockposition1);
+             }
+ 
+-            fight.setRespawnStage(null.PREPARING_TO_SUMMON_PILLARS);
++            fight.setRespawnStage(PREPARING_TO_SUMMON_PILLARS); // CraftBukkit - decompile error
+         }
+     },
+     PREPARING_TO_SUMMON_PILLARS {
+@@ -38,7 +41,7 @@
+                     world.levelEvent(3001, new BlockPos(0, 128, 0), 0);
+                 }
+             } else {
+-                fight.setRespawnStage(null.SUMMONING_PILLARS);
++                fight.setRespawnStage(SUMMONING_PILLARS); // CraftBukkit - decompile error
+             }
+ 
+         }
+@@ -81,7 +84,7 @@
+                         Feature.END_SPIKE.place(worldgenfeatureendspikeconfiguration, world, world.getChunkSource().getGenerator(), RandomSource.create(), new BlockPos(worldgenender_spike.getCenterX(), 45, worldgenender_spike.getCenterZ()));
+                     }
+                 } else if (flag1) {
+-                    fight.setRespawnStage(null.SUMMONING_DRAGON);
++                    fight.setRespawnStage(SUMMONING_DRAGON); // CraftBukkit - decompile error
+                 }
+             }
+ 
+@@ -94,7 +97,7 @@
+             EndCrystal entityendercrystal;
+ 
+             if (tick >= 100) {
+-                fight.setRespawnStage(null.END);
++                fight.setRespawnStage(END); // CraftBukkit - decompile error
+                 fight.resetSpikeCrystals();
+                 iterator = crystals.iterator();
+ 
+@@ -102,7 +105,7 @@
+                     entityendercrystal = (EndCrystal) iterator.next();
+                     entityendercrystal.setBeamTarget((BlockPos) null);
+                     world.explode(entityendercrystal, entityendercrystal.getX(), entityendercrystal.getY(), entityendercrystal.getZ(), 6.0F, Level.ExplosionInteraction.NONE);
+-                    entityendercrystal.discard();
++                    entityendercrystal.discard(EntityRemoveEvent.Cause.EXPLODE); // CraftBukkit - add Bukkit remove cause
+                 }
+             } else if (tick >= 80) {
+                 world.levelEvent(3001, new BlockPos(0, 128, 0), 0);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/dimension/end/EndDragonFight.java.patch b/paper-server/patches/sources/net/minecraft/world/level/dimension/end/EndDragonFight.java.patch
new file mode 100644
index 0000000000..81b61c583e
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/dimension/end/EndDragonFight.java.patch
@@ -0,0 +1,74 @@
+--- a/net/minecraft/world/level/dimension/end/EndDragonFight.java
++++ b/net/minecraft/world/level/dimension/end/EndDragonFight.java
+@@ -111,14 +111,14 @@
+         this.origin = origin;
+         this.validPlayer = EntitySelector.ENTITY_STILL_ALIVE.and(EntitySelector.withinDistance((double) origin.getX(), (double) (128 + origin.getY()), (double) origin.getZ(), 192.0D));
+         this.needsStateScanning = data.needsStateScanning;
+-        this.dragonUUID = (UUID) data.dragonUUID.orElse((Object) null);
++        this.dragonUUID = (UUID) data.dragonUUID.orElse(null); // CraftBukkit - decompile error
+         this.dragonKilled = data.dragonKilled;
+         this.previouslyKilled = data.previouslyKilled;
+         if (data.isRespawning) {
+             this.respawnStage = DragonRespawnAnimation.START;
+         }
+ 
+-        this.portalLocation = (BlockPos) data.exitPortalLocation.orElse((Object) null);
++        this.portalLocation = (BlockPos) data.exitPortalLocation.orElse(null); // CraftBukkit - decompile error
+         this.gateways.addAll((Collection) data.gateways.orElseGet(() -> {
+             ObjectArrayList<Integer> objectarraylist = new ObjectArrayList(ContiguousSet.create(Range.closedOpen(0, 20), DiscreteDomain.integers()));
+ 
+@@ -208,7 +208,7 @@
+             this.dragonKilled = false;
+             if (!flag) {
+                 EndDragonFight.LOGGER.info("But we didn't have a portal, let's remove it.");
+-                entityenderdragon.discard();
++                entityenderdragon.discard(null); // CraftBukkit - add Bukkit remove cause
+                 this.dragonUUID = null;
+             }
+         }
+@@ -513,7 +513,7 @@
+         return this.previouslyKilled;
+     }
+ 
+-    public void tryRespawn() {
++    public boolean tryRespawn() { // CraftBukkit - return boolean
+         if (this.dragonKilled && this.respawnStage == null) {
+             BlockPos blockposition = this.portalLocation;
+ 
+@@ -540,19 +540,19 @@
+                 List<EndCrystal> list1 = this.level.getEntitiesOfClass(EndCrystal.class, new AABB(blockposition1.relative(enumdirection, 2)));
+ 
+                 if (list1.isEmpty()) {
+-                    return;
++                    return false; // CraftBukkit - return value
+                 }
+ 
+                 list.addAll(list1);
+             }
+ 
+             EndDragonFight.LOGGER.debug("Found all crystals, respawning dragon.");
+-            this.respawnDragon(list);
++            return this.respawnDragon(list); // CraftBukkit - return value
+         }
+-
++        return false; // CraftBukkit - return value
+     }
+ 
+-    public void respawnDragon(List<EndCrystal> crystals) {
++    public boolean respawnDragon(List<EndCrystal> list) { // CraftBukkit - return boolean
+         if (this.dragonKilled && this.respawnStage == null) {
+             for (BlockPattern.BlockPatternMatch shapedetector_shapedetectorcollection = this.findExitPortal(); shapedetector_shapedetectorcollection != null; shapedetector_shapedetectorcollection = this.findExitPortal()) {
+                 for (int i = 0; i < this.exitPortalPattern.getWidth(); ++i) {
+@@ -571,9 +571,10 @@
+             this.respawnStage = DragonRespawnAnimation.START;
+             this.respawnTime = 0;
+             this.spawnExitPortal(false);
+-            this.respawnCrystals = crystals;
++            this.respawnCrystals = list;
++            return true; // CraftBukkit - return value
+         }
+-
++        return false; // CraftBukkit - return value
+     }
+ 
+     public void resetSpikeCrystals() {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/dimension/end/EnderDragonBattle.patch b/paper-server/patches/sources/net/minecraft/world/level/dimension/end/EnderDragonBattle.patch
deleted file mode 100644
index ad62a4bf22..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/dimension/end/EnderDragonBattle.patch
+++ /dev/null
@@ -1,72 +0,0 @@
---- a/net/minecraft/world/level/dimension/end/EnderDragonBattle.java
-+++ b/net/minecraft/world/level/dimension/end/EnderDragonBattle.java
-@@ -111,14 +111,14 @@
-         this.origin = blockposition;
-         this.validPlayer = IEntitySelector.ENTITY_STILL_ALIVE.and(IEntitySelector.withinDistance((double) blockposition.getX(), (double) (128 + blockposition.getY()), (double) blockposition.getZ(), 192.0D));
-         this.needsStateScanning = enderdragonbattle_a.needsStateScanning;
--        this.dragonUUID = (UUID) enderdragonbattle_a.dragonUUID.orElse((Object) null);
-+        this.dragonUUID = (UUID) enderdragonbattle_a.dragonUUID.orElse(null); // CraftBukkit - decompile error
-         this.dragonKilled = enderdragonbattle_a.dragonKilled;
-         this.previouslyKilled = enderdragonbattle_a.previouslyKilled;
-         if (enderdragonbattle_a.isRespawning) {
-             this.respawnStage = EnumDragonRespawn.START;
-         }
- 
--        this.portalLocation = (BlockPosition) enderdragonbattle_a.exitPortalLocation.orElse((Object) null);
-+        this.portalLocation = (BlockPosition) enderdragonbattle_a.exitPortalLocation.orElse(null); // CraftBukkit - decompile error
-         this.gateways.addAll((Collection) enderdragonbattle_a.gateways.orElseGet(() -> {
-             ObjectArrayList<Integer> objectarraylist = new ObjectArrayList(ContiguousSet.create(Range.closedOpen(0, 20), DiscreteDomain.integers()));
- 
-@@ -208,7 +208,7 @@
-             this.dragonKilled = false;
-             if (!flag) {
-                 EnderDragonBattle.LOGGER.info("But we didn't have a portal, let's remove it.");
--                entityenderdragon.discard();
-+                entityenderdragon.discard(null); // CraftBukkit - add Bukkit remove cause
-                 this.dragonUUID = null;
-             }
-         }
-@@ -513,7 +513,7 @@
-         return this.previouslyKilled;
-     }
- 
--    public void tryRespawn() {
-+    public boolean tryRespawn() { // CraftBukkit - return boolean
-         if (this.dragonKilled && this.respawnStage == null) {
-             BlockPosition blockposition = this.portalLocation;
- 
-@@ -540,19 +540,19 @@
-                 List<EntityEnderCrystal> list1 = this.level.getEntitiesOfClass(EntityEnderCrystal.class, new AxisAlignedBB(blockposition1.relative(enumdirection, 2)));
- 
-                 if (list1.isEmpty()) {
--                    return;
-+                    return false; // CraftBukkit - return value
-                 }
- 
-                 list.addAll(list1);
-             }
- 
-             EnderDragonBattle.LOGGER.debug("Found all crystals, respawning dragon.");
--            this.respawnDragon(list);
-+            return this.respawnDragon(list); // CraftBukkit - return value
-         }
--
-+        return false; // CraftBukkit - return value
-     }
- 
--    public void respawnDragon(List<EntityEnderCrystal> list) {
-+    public boolean respawnDragon(List<EntityEnderCrystal> list) { // CraftBukkit - return boolean
-         if (this.dragonKilled && this.respawnStage == null) {
-             for (ShapeDetector.ShapeDetectorCollection shapedetector_shapedetectorcollection = this.findExitPortal(); shapedetector_shapedetectorcollection != null; shapedetector_shapedetectorcollection = this.findExitPortal()) {
-                 for (int i = 0; i < this.exitPortalPattern.getWidth(); ++i) {
-@@ -572,8 +572,9 @@
-             this.respawnTime = 0;
-             this.spawnExitPortal(false);
-             this.respawnCrystals = list;
-+            return true; // CraftBukkit - return value
-         }
--
-+        return false; // CraftBukkit - return value
-     }
- 
-     public void resetSpikeCrystals() {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/dimension/end/EnumDragonRespawn.patch b/paper-server/patches/sources/net/minecraft/world/level/dimension/end/EnumDragonRespawn.patch
deleted file mode 100644
index 7ffc939cd1..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/dimension/end/EnumDragonRespawn.patch
+++ /dev/null
@@ -1,58 +0,0 @@
---- a/net/minecraft/world/level/dimension/end/EnumDragonRespawn.java
-+++ b/net/minecraft/world/level/dimension/end/EnumDragonRespawn.java
-@@ -13,6 +13,10 @@
- import net.minecraft.world.level.levelgen.feature.WorldGenerator;
- import net.minecraft.world.level.levelgen.feature.configurations.WorldGenFeatureEndSpikeConfiguration;
- 
-+// CraftBukkit start
-+import org.bukkit.event.entity.EntityRemoveEvent;
-+// CraftBukkit end
-+
- public enum EnumDragonRespawn {
- 
-     START {
-@@ -27,7 +31,7 @@
-                 entityendercrystal.setBeamTarget(blockposition1);
-             }
- 
--            enderdragonbattle.setRespawnStage(null.PREPARING_TO_SUMMON_PILLARS);
-+            enderdragonbattle.setRespawnStage(PREPARING_TO_SUMMON_PILLARS); // CraftBukkit - decompile error
-         }
-     },
-     PREPARING_TO_SUMMON_PILLARS {
-@@ -38,7 +42,7 @@
-                     worldserver.levelEvent(3001, new BlockPosition(0, 128, 0), 0);
-                 }
-             } else {
--                enderdragonbattle.setRespawnStage(null.SUMMONING_PILLARS);
-+                enderdragonbattle.setRespawnStage(SUMMONING_PILLARS); // CraftBukkit - decompile error
-             }
- 
-         }
-@@ -81,7 +85,7 @@
-                         WorldGenerator.END_SPIKE.place(worldgenfeatureendspikeconfiguration, worldserver, worldserver.getChunkSource().getGenerator(), RandomSource.create(), new BlockPosition(worldgenender_spike.getCenterX(), 45, worldgenender_spike.getCenterZ()));
-                     }
-                 } else if (flag1) {
--                    enderdragonbattle.setRespawnStage(null.SUMMONING_DRAGON);
-+                    enderdragonbattle.setRespawnStage(SUMMONING_DRAGON); // CraftBukkit - decompile error
-                 }
-             }
- 
-@@ -94,7 +98,7 @@
-             EntityEnderCrystal entityendercrystal;
- 
-             if (i >= 100) {
--                enderdragonbattle.setRespawnStage(null.END);
-+                enderdragonbattle.setRespawnStage(END); // CraftBukkit - decompile error
-                 enderdragonbattle.resetSpikeCrystals();
-                 iterator = list.iterator();
- 
-@@ -102,7 +106,7 @@
-                     entityendercrystal = (EntityEnderCrystal) iterator.next();
-                     entityendercrystal.setBeamTarget((BlockPosition) null);
-                     worldserver.explode(entityendercrystal, entityendercrystal.getX(), entityendercrystal.getY(), entityendercrystal.getZ(), 6.0F, World.a.NONE);
--                    entityendercrystal.discard();
-+                    entityendercrystal.discard(EntityRemoveEvent.Cause.EXPLODE); // CraftBukkit - add Bukkit remove cause
-                 }
-             } else if (i >= 80) {
-                 worldserver.levelEvent(3001, new BlockPosition(0, 128, 0), 0);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/entity/EntityAccess.patch b/paper-server/patches/sources/net/minecraft/world/level/entity/EntityAccess.java.patch
similarity index 71%
rename from paper-server/patches/sources/net/minecraft/world/level/entity/EntityAccess.patch
rename to paper-server/patches/sources/net/minecraft/world/level/entity/EntityAccess.java.patch
index 55f2fd8d6c..517de585e8 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/entity/EntityAccess.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/entity/EntityAccess.java.patch
@@ -1,23 +1,22 @@
 --- a/net/minecraft/world/level/entity/EntityAccess.java
 +++ b/net/minecraft/world/level/entity/EntityAccess.java
-@@ -6,6 +6,10 @@
+@@ -5,6 +5,9 @@
+ import net.minecraft.core.BlockPos;
  import net.minecraft.world.entity.Entity;
- import net.minecraft.world.phys.AxisAlignedBB;
- 
+ import net.minecraft.world.phys.AABB;
 +// CraftBukkit start
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +// CraftBukkit end
-+
+ 
  public interface EntityAccess {
  
-     int getId();
-@@ -24,6 +28,12 @@
+@@ -24,6 +27,12 @@
  
-     void setRemoved(Entity.RemovalReason entity_removalreason);
+     void setRemoved(Entity.RemovalReason reason);
  
 +    // CraftBukkit start - add Bukkit remove cause
 +    default void setRemoved(Entity.RemovalReason entity_removalreason, EntityRemoveEvent.Cause cause) {
-+        setRemoved(entity_removalreason);
++        this.setRemoved(entity_removalreason);
 +    }
 +    // CraftBukkit end
 +
diff --git a/paper-server/patches/sources/net/minecraft/world/level/entity/PersistentEntitySectionManager.patch b/paper-server/patches/sources/net/minecraft/world/level/entity/PersistentEntitySectionManager.java.patch
similarity index 52%
rename from paper-server/patches/sources/net/minecraft/world/level/entity/PersistentEntitySectionManager.patch
rename to paper-server/patches/sources/net/minecraft/world/level/entity/PersistentEntitySectionManager.java.patch
index b92034629c..0f5fb53570 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/entity/PersistentEntitySectionManager.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/entity/PersistentEntitySectionManager.java.patch
@@ -1,80 +1,95 @@
 --- a/net/minecraft/world/level/entity/PersistentEntitySectionManager.java
 +++ b/net/minecraft/world/level/entity/PersistentEntitySectionManager.java
-@@ -32,6 +32,12 @@
- import net.minecraft.world.level.ChunkCoordIntPair;
+@@ -29,8 +29,13 @@
+ import net.minecraft.util.CsvOutput;
+ import net.minecraft.util.VisibleForDebug;
+ import net.minecraft.world.entity.Entity;
+-import net.minecraft.world.level.ChunkPos;
  import org.slf4j.Logger;
- 
++import net.minecraft.world.level.ChunkPos;
 +// CraftBukkit start
 +import net.minecraft.world.level.chunk.storage.EntityStorage;
 +import org.bukkit.craftbukkit.event.CraftEventFactory;
 +import org.bukkit.event.entity.EntityRemoveEvent;
 +// CraftBukkit end
-+
+ 
  public class PersistentEntitySectionManager<T extends EntityAccess> implements AutoCloseable {
  
-     static final Logger LOGGER = LogUtils.getLogger();
-@@ -55,6 +61,16 @@
+@@ -55,6 +60,16 @@
          this.entityGetter = new LevelEntityGetterAdapter<>(this.visibleEntityStorage, this.sectionStorage);
      }
  
 +    // CraftBukkit start - add method to get all entities in chunk
-+    public List<Entity> getEntities(ChunkCoordIntPair chunkCoordIntPair) {
-+        return sectionStorage.getExistingSectionsInChunk(chunkCoordIntPair.toLong()).flatMap(EntitySection::getEntities).map(entity -> (Entity) entity).collect(Collectors.toList());
++    public List<Entity> getEntities(ChunkPos chunkCoordIntPair) {
++        return this.sectionStorage.getExistingSectionsInChunk(chunkCoordIntPair.toLong()).flatMap(EntitySection::getEntities).map(entity -> (Entity) entity).collect(Collectors.toList());
 +    }
 +
 +    public boolean isPending(long pair) {
-+        return chunkLoadStatuses.get(pair) == b.PENDING;
++        return this.chunkLoadStatuses.get(pair) == ChunkLoadStatus.PENDING;
 +    }
 +    // CraftBukkit end
 +
-     void removeSectionIfEmpty(long i, EntitySection<T> entitysection) {
-         if (entitysection.isEmpty()) {
-             this.sectionStorage.remove(i);
-@@ -196,6 +212,12 @@
+     void removeSectionIfEmpty(long sectionPos, EntitySection<T> section) {
+         if (section.isEmpty()) {
+             this.sectionStorage.remove(sectionPos);
+@@ -196,27 +211,35 @@
      }
  
-     private boolean storeChunkSections(long i, Consumer<T> consumer) {
+     private boolean storeChunkSections(long chunkPos, Consumer<T> action) {
+-        PersistentEntitySectionManager.ChunkLoadStatus persistententitysectionmanager_b = (PersistentEntitySectionManager.ChunkLoadStatus) this.chunkLoadStatuses.get(chunkPos);
 +        // CraftBukkit start - add boolean for event call
-+        return storeChunkSections(i, consumer, false);
++        return this.storeChunkSections(chunkPos, action, false);
 +    }
-+
+ 
 +    private boolean storeChunkSections(long i, Consumer<T> consumer, boolean callEvent) {
 +        // CraftBukkit end
-         PersistentEntitySectionManager.b persistententitysectionmanager_b = (PersistentEntitySectionManager.b) this.chunkLoadStatuses.get(i);
- 
-         if (persistententitysectionmanager_b == PersistentEntitySectionManager.b.PENDING) {
-@@ -207,6 +229,7 @@
++        PersistentEntitySectionManager.ChunkLoadStatus persistententitysectionmanager_b = (PersistentEntitySectionManager.ChunkLoadStatus) this.chunkLoadStatuses.get(i);
++
+         if (persistententitysectionmanager_b == PersistentEntitySectionManager.ChunkLoadStatus.PENDING) {
+             return false;
+         } else {
+-            List<T> list = (List) this.sectionStorage.getExistingSectionsInChunk(chunkPos).flatMap((entitysection) -> {
++            List<T> list = (List) this.sectionStorage.getExistingSectionsInChunk(i).flatMap((entitysection) -> {
+                 return entitysection.getEntities().filter(EntityAccess::shouldBeSaved);
+             }).collect(Collectors.toList());
  
              if (list.isEmpty()) {
-                 if (persistententitysectionmanager_b == PersistentEntitySectionManager.b.LOADED) {
-+                    if (callEvent) CraftEventFactory.callEntitiesUnloadEvent(((EntityStorage) permanentStorage).level, new ChunkCoordIntPair(i), ImmutableList.of()); // CraftBukkit
-                     this.permanentStorage.storeEntities(new ChunkEntities<>(new ChunkCoordIntPair(i), ImmutableList.of()));
+                 if (persistententitysectionmanager_b == PersistentEntitySectionManager.ChunkLoadStatus.LOADED) {
+-                    this.permanentStorage.storeEntities(new ChunkEntities<>(new ChunkPos(chunkPos), ImmutableList.of()));
++                    if (callEvent) CraftEventFactory.callEntitiesUnloadEvent(((EntityStorage) this.permanentStorage).level, new ChunkPos(i), ImmutableList.of()); // CraftBukkit
++                    this.permanentStorage.storeEntities(new ChunkEntities<>(new ChunkPos(i), ImmutableList.of()));
                  }
  
-@@ -215,6 +238,7 @@
-                 this.requestChunkLoad(i);
+                 return true;
+             } else if (persistententitysectionmanager_b == PersistentEntitySectionManager.ChunkLoadStatus.FRESH) {
+-                this.requestChunkLoad(chunkPos);
++                this.requestChunkLoad(i);
                  return false;
              } else {
-+                if (callEvent) CraftEventFactory.callEntitiesUnloadEvent(((EntityStorage) permanentStorage).level, new ChunkCoordIntPair(i), list.stream().map(entity -> (Entity) entity).collect(Collectors.toList())); // CraftBukkit
-                 this.permanentStorage.storeEntities(new ChunkEntities<>(new ChunkCoordIntPair(i), list));
-                 list.forEach(consumer);
+-                this.permanentStorage.storeEntities(new ChunkEntities<>(new ChunkPos(chunkPos), list));
+-                list.forEach(action);
++                if (callEvent) CraftEventFactory.callEntitiesUnloadEvent(((EntityStorage) this.permanentStorage).level, new ChunkPos(i), list.stream().map(entity -> (Entity) entity).collect(Collectors.toList())); // CraftBukkit
++                this.permanentStorage.storeEntities(new ChunkEntities<>(new ChunkPos(i), list));
++                list.forEach(consumer);
                  return true;
-@@ -238,7 +262,7 @@
-     private boolean processChunkUnload(long i) {
-         boolean flag = this.storeChunkSections(i, (entityaccess) -> {
+             }
+         }
+@@ -238,7 +261,7 @@
+     private boolean processChunkUnload(long chunkPos) {
+         boolean flag = this.storeChunkSections(chunkPos, (entityaccess) -> {
              entityaccess.getPassengersAndSelf().forEach(this::unloadEntity);
 -        });
 +        }, true); // CraftBukkit - add boolean for event call
  
          if (!flag) {
              return false;
-@@ -249,24 +273,28 @@
+@@ -249,24 +272,28 @@
      }
  
-     private void unloadEntity(EntityAccess entityaccess) {
--        entityaccess.setRemoved(Entity.RemovalReason.UNLOADED_TO_CHUNK);
-+        entityaccess.setRemoved(Entity.RemovalReason.UNLOADED_TO_CHUNK, EntityRemoveEvent.Cause.UNLOAD); // CraftBukkit - add Bukkit remove cause
-         entityaccess.setLevelCallback(EntityInLevelCallback.NULL);
+     private void unloadEntity(EntityAccess entity) {
+-        entity.setRemoved(Entity.RemovalReason.UNLOADED_TO_CHUNK);
++        entity.setRemoved(Entity.RemovalReason.UNLOADED_TO_CHUNK, EntityRemoveEvent.Cause.UNLOAD); // CraftBukkit - add Bukkit remove cause
+         entity.setLevelCallback(EntityInLevelCallback.NULL);
      }
  
      private void processUnloads() {
@@ -92,15 +107,15 @@
              chunkentities.getEntities().forEach((entityaccess) -> {
                  this.addEntity(entityaccess, true);
              });
-             this.chunkLoadStatuses.put(chunkentities.getPos().toLong(), PersistentEntitySectionManager.b.LOADED);
+             this.chunkLoadStatuses.put(chunkentities.getPos().toLong(), PersistentEntitySectionManager.ChunkLoadStatus.LOADED);
 +            // CraftBukkit start - call entity load event
-+            List<Entity> entities = getEntities(chunkentities.getPos());
-+            CraftEventFactory.callEntitiesLoadEvent(((EntityStorage) permanentStorage).level, chunkentities.getPos(), entities);
++            List<Entity> entities = this.getEntities(chunkentities.getPos());
++            CraftEventFactory.callEntitiesLoadEvent(((EntityStorage) this.permanentStorage).level, chunkentities.getPos(), entities);
 +            // CraftBukkit end
          }
  
      }
-@@ -292,7 +320,7 @@
+@@ -292,7 +319,7 @@
      }
  
      public void autoSave() {
@@ -109,7 +124,7 @@
              boolean flag = this.chunkVisibility.get(i) == Visibility.HIDDEN;
  
              if (flag) {
-@@ -311,7 +339,7 @@
+@@ -311,7 +338,7 @@
          while (!longset.isEmpty()) {
              this.permanentStorage.flush(false);
              this.processPendingLoads();
@@ -118,13 +133,13 @@
                  boolean flag = this.chunkVisibility.get(i) == Visibility.HIDDEN;
  
                  return flag ? this.processChunkUnload(i) : this.storeChunkSections(i, (entityaccess) -> {
-@@ -323,7 +351,15 @@
+@@ -323,7 +350,15 @@
      }
  
      public void close() throws IOException {
 -        this.saveAll();
 +        // CraftBukkit start - add save boolean
-+        close(true);
++        this.close(true);
 +    }
 +
 +    public void close(boolean save) throws IOException {
@@ -135,19 +150,19 @@
          this.permanentStorage.close();
      }
  
-@@ -350,7 +386,7 @@
+@@ -350,7 +385,7 @@
      public void dumpSections(Writer writer) throws IOException {
-         CSVWriter csvwriter = CSVWriter.builder().addColumn("x").addColumn("y").addColumn("z").addColumn("visibility").addColumn("load_status").addColumn("entity_count").build(writer);
+         CsvOutput csvwriter = CsvOutput.builder().addColumn("x").addColumn("y").addColumn("z").addColumn("visibility").addColumn("load_status").addColumn("entity_count").build(writer);
  
 -        this.sectionStorage.getAllChunksWithExistingSections().forEach((i) -> {
 +        this.sectionStorage.getAllChunksWithExistingSections().forEach((java.util.function.LongConsumer) (i) -> { // CraftBukkit - decompile error
-             PersistentEntitySectionManager.b persistententitysectionmanager_b = (PersistentEntitySectionManager.b) this.chunkLoadStatuses.get(i);
+             PersistentEntitySectionManager.ChunkLoadStatus persistententitysectionmanager_b = (PersistentEntitySectionManager.ChunkLoadStatus) this.chunkLoadStatuses.get(i);
  
              this.sectionStorage.getExistingSectionPositionsInChunk(i).forEach((j) -> {
-@@ -394,7 +430,7 @@
+@@ -394,7 +429,7 @@
          private EntitySection<T> currentSection;
  
-         a(final EntityAccess entityaccess, final long i, final EntitySection entitysection) {
+         Callback(final EntityAccess entityaccess, final long i, final EntitySection entitysection) {
 -            this.entity = entityaccess;
 +            this.entity = (T) entityaccess; // CraftBukkit - decompile error
              this.currentSectionKey = i;
diff --git a/paper-server/patches/sources/net/minecraft/world/level/gameevent/GameEventDispatcher.java.patch b/paper-server/patches/sources/net/minecraft/world/level/gameevent/GameEventDispatcher.java.patch
new file mode 100644
index 0000000000..56e4acade7
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/gameevent/GameEventDispatcher.java.patch
@@ -0,0 +1,30 @@
+--- a/net/minecraft/world/level/gameevent/GameEventDispatcher.java
++++ b/net/minecraft/world/level/gameevent/GameEventDispatcher.java
+@@ -11,6 +11,12 @@
+ import net.minecraft.server.level.ServerLevel;
+ import net.minecraft.world.level.chunk.LevelChunk;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import org.bukkit.Bukkit;
++import org.bukkit.craftbukkit.CraftGameEvent;
++import org.bukkit.craftbukkit.util.CraftLocation;
++import org.bukkit.event.world.GenericGameEvent;
++// CraftBukkit end
+ 
+ public class GameEventDispatcher {
+ 
+@@ -23,6 +29,14 @@
+     public void post(Holder<GameEvent> event, Vec3 emitterPos, GameEvent.Context emitter) {
+         int i = ((GameEvent) event.value()).notificationRadius();
+         BlockPos blockposition = BlockPos.containing(emitterPos);
++        // CraftBukkit start
++        GenericGameEvent event1 = new GenericGameEvent(CraftGameEvent.minecraftToBukkit(event.value()), CraftLocation.toBukkit(blockposition, this.level.getWorld()), (emitter.sourceEntity() == null) ? null : emitter.sourceEntity().getBukkitEntity(), i, !Bukkit.isPrimaryThread());
++        this.level.getCraftServer().getPluginManager().callEvent(event1);
++        if (event1.isCancelled()) {
++            return;
++        }
++        i = event1.getRadius();
++        // CraftBukkit end
+         int j = SectionPos.blockToSectionCoord(blockposition.getX() - i);
+         int k = SectionPos.blockToSectionCoord(blockposition.getY() - i);
+         int l = SectionPos.blockToSectionCoord(blockposition.getZ() - i);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/gameevent/GameEventDispatcher.patch b/paper-server/patches/sources/net/minecraft/world/level/gameevent/GameEventDispatcher.patch
deleted file mode 100644
index d3e07b3182..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/gameevent/GameEventDispatcher.patch
+++ /dev/null
@@ -1,31 +0,0 @@
---- a/net/minecraft/world/level/gameevent/GameEventDispatcher.java
-+++ b/net/minecraft/world/level/gameevent/GameEventDispatcher.java
-@@ -12,6 +12,13 @@
- import net.minecraft.world.level.chunk.Chunk;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import org.bukkit.Bukkit;
-+import org.bukkit.craftbukkit.CraftGameEvent;
-+import org.bukkit.craftbukkit.util.CraftLocation;
-+import org.bukkit.event.world.GenericGameEvent;
-+// CraftBukkit end
-+
- public class GameEventDispatcher {
- 
-     private final WorldServer level;
-@@ -23,6 +30,14 @@
-     public void post(Holder<GameEvent> holder, Vec3D vec3d, GameEvent.a gameevent_a) {
-         int i = ((GameEvent) holder.value()).notificationRadius();
-         BlockPosition blockposition = BlockPosition.containing(vec3d);
-+        // CraftBukkit start
-+        GenericGameEvent event = new GenericGameEvent(CraftGameEvent.minecraftToBukkit(holder.value()), CraftLocation.toBukkit(blockposition, level.getWorld()), (gameevent_a.sourceEntity() == null) ? null : gameevent_a.sourceEntity().getBukkitEntity(), i, !Bukkit.isPrimaryThread());
-+        level.getCraftServer().getPluginManager().callEvent(event);
-+        if (event.isCancelled()) {
-+            return;
-+        }
-+        i = event.getRadius();
-+        // CraftBukkit end
-         int j = SectionPosition.blockToSectionCoord(blockposition.getX() - i);
-         int k = SectionPosition.blockToSectionCoord(blockposition.getY() - i);
-         int l = SectionPosition.blockToSectionCoord(blockposition.getZ() - i);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java.patch b/paper-server/patches/sources/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java.patch
new file mode 100644
index 0000000000..24cf537948
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java.patch
@@ -0,0 +1,50 @@
+--- a/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java
++++ b/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java
+@@ -30,6 +30,11 @@
+ import net.minecraft.world.level.gameevent.PositionSource;
+ import net.minecraft.world.phys.HitResult;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import org.bukkit.craftbukkit.CraftGameEvent;
++import org.bukkit.craftbukkit.block.CraftBlock;
++import org.bukkit.event.block.BlockReceiveGameEvent;
++// CraftBukkit end
+ 
+ public interface VibrationSystem {
+ 
+@@ -233,7 +238,8 @@
+             if (callback.requiresAdjacentChunksToBeTicking() && !Ticker.areAdjacentChunksTicking(world, blockposition1)) {
+                 return false;
+             } else {
+-                callback.onReceiveVibration(world, blockposition, vibration.gameEvent(), (Entity) vibration.getEntity(world).orElse((Object) null), (Entity) vibration.getProjectileOwner(world).orElse((Object) null), VibrationSystem.Listener.distanceBetweenInBlocks(blockposition, blockposition1));
++                // CraftBukkit - decompile error
++                callback.onReceiveVibration(world, blockposition, vibration.gameEvent(), (Entity) vibration.getEntity(world).orElse(null), (Entity) vibration.getProjectileOwner(world).orElse(null), VibrationSystem.Listener.distanceBetweenInBlocks(blockposition, blockposition1));
+                 listenerData.setCurrentVibration((VibrationInfo) null);
+                 return true;
+             }
+@@ -288,8 +294,14 @@
+                     return false;
+                 } else {
+                     Vec3 vec3d1 = (Vec3) optional.get();
+-
+-                    if (!vibrationsystem_d.canReceiveVibration(world, BlockPos.containing(emitterPos), event, emitter)) {
++                    // CraftBukkit start
++                    boolean defaultCancel = !vibrationsystem_d.canReceiveVibration(world, BlockPos.containing(emitterPos), event, emitter);
++                    Entity entity = emitter.sourceEntity();
++                    BlockReceiveGameEvent event1 = new BlockReceiveGameEvent(CraftGameEvent.minecraftToBukkit(event.value()), CraftBlock.at(world, BlockPos.containing(vec3d1)), (entity == null) ? null : entity.getBukkitEntity());
++                    event1.setCancelled(defaultCancel);
++                    world.getCraftServer().getPluginManager().callEvent(event1);
++                    if (event1.isCancelled()) {
++                        // CraftBukkit end
+                         return false;
+                     } else if (Listener.isOccluded(world, emitterPos, vec3d1)) {
+                         return false;
+@@ -342,7 +354,7 @@
+             return instance.group(VibrationInfo.CODEC.lenientOptionalFieldOf("event").forGetter((vibrationsystem_a) -> {
+                 return Optional.ofNullable(vibrationsystem_a.currentVibration);
+             }), VibrationSelector.CODEC.fieldOf("selector").forGetter(VibrationSystem.Data::getSelectionStrategy), ExtraCodecs.NON_NEGATIVE_INT.fieldOf("event_delay").orElse(0).forGetter(VibrationSystem.Data::getTravelTimeInTicks)).apply(instance, (optional, vibrationselector, integer) -> {
+-                return new VibrationSystem.Data((VibrationInfo) optional.orElse((Object) null), vibrationselector, integer, true);
++                return new VibrationSystem.Data((VibrationInfo) optional.orElse(null), vibrationselector, integer, true); // CraftBukkit - decompile error
+             });
+         });
+         public static final String NBT_TAG_KEY = "listener";
diff --git a/paper-server/patches/sources/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.patch b/paper-server/patches/sources/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.patch
deleted file mode 100644
index 0b7640d2c4..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.patch
+++ /dev/null
@@ -1,51 +0,0 @@
---- a/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java
-+++ b/net/minecraft/world/level/gameevent/vibrations/VibrationSystem.java
-@@ -31,6 +31,12 @@
- import net.minecraft.world.phys.MovingObjectPosition;
- import net.minecraft.world.phys.Vec3D;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.CraftGameEvent;
-+import org.bukkit.craftbukkit.block.CraftBlock;
-+import org.bukkit.event.block.BlockReceiveGameEvent;
-+// CraftBukkit end
-+
- public interface VibrationSystem {
- 
-     List<ResourceKey<GameEvent>> RESONANCE_EVENTS = List.of(GameEvent.RESONATE_1.key(), GameEvent.RESONATE_2.key(), GameEvent.RESONATE_3.key(), GameEvent.RESONATE_4.key(), GameEvent.RESONATE_5.key(), GameEvent.RESONATE_6.key(), GameEvent.RESONATE_7.key(), GameEvent.RESONATE_8.key(), GameEvent.RESONATE_9.key(), GameEvent.RESONATE_10.key(), GameEvent.RESONATE_11.key(), GameEvent.RESONATE_12.key(), GameEvent.RESONATE_13.key(), GameEvent.RESONATE_14.key(), GameEvent.RESONATE_15.key());
-@@ -233,7 +239,8 @@
-             if (vibrationsystem_d.requiresAdjacentChunksToBeTicking() && !areAdjacentChunksTicking(worldserver, blockposition1)) {
-                 return false;
-             } else {
--                vibrationsystem_d.onReceiveVibration(worldserver, blockposition, vibrationinfo.gameEvent(), (Entity) vibrationinfo.getEntity(worldserver).orElse((Object) null), (Entity) vibrationinfo.getProjectileOwner(worldserver).orElse((Object) null), VibrationSystem.b.distanceBetweenInBlocks(blockposition, blockposition1));
-+                // CraftBukkit - decompile error
-+                vibrationsystem_d.onReceiveVibration(worldserver, blockposition, vibrationinfo.gameEvent(), (Entity) vibrationinfo.getEntity(worldserver).orElse(null), (Entity) vibrationinfo.getProjectileOwner(worldserver).orElse(null), VibrationSystem.b.distanceBetweenInBlocks(blockposition, blockposition1));
-                 vibrationsystem_a.setCurrentVibration((VibrationInfo) null);
-                 return true;
-             }
-@@ -288,8 +295,14 @@
-                     return false;
-                 } else {
-                     Vec3D vec3d1 = (Vec3D) optional.get();
--
--                    if (!vibrationsystem_d.canReceiveVibration(worldserver, BlockPosition.containing(vec3d), holder, gameevent_a)) {
-+                    // CraftBukkit start
-+                    boolean defaultCancel = !vibrationsystem_d.canReceiveVibration(worldserver, BlockPosition.containing(vec3d), holder, gameevent_a);
-+                    Entity entity = gameevent_a.sourceEntity();
-+                    BlockReceiveGameEvent event = new BlockReceiveGameEvent(CraftGameEvent.minecraftToBukkit(holder.value()), CraftBlock.at(worldserver, BlockPosition.containing(vec3d1)), (entity == null) ? null : entity.getBukkitEntity());
-+                    event.setCancelled(defaultCancel);
-+                    worldserver.getCraftServer().getPluginManager().callEvent(event);
-+                    if (event.isCancelled()) {
-+                        // CraftBukkit end
-                         return false;
-                     } else if (isOccluded(worldserver, vec3d, vec3d1)) {
-                         return false;
-@@ -342,7 +355,7 @@
-             return instance.group(VibrationInfo.CODEC.lenientOptionalFieldOf("event").forGetter((vibrationsystem_a) -> {
-                 return Optional.ofNullable(vibrationsystem_a.currentVibration);
-             }), VibrationSelector.CODEC.fieldOf("selector").forGetter(VibrationSystem.a::getSelectionStrategy), ExtraCodecs.NON_NEGATIVE_INT.fieldOf("event_delay").orElse(0).forGetter(VibrationSystem.a::getTravelTimeInTicks)).apply(instance, (optional, vibrationselector, integer) -> {
--                return new VibrationSystem.a((VibrationInfo) optional.orElse((Object) null), vibrationselector, integer, true);
-+                return new VibrationSystem.a((VibrationInfo) optional.orElse(null), vibrationselector, integer, true); // CraftBukkit - decompile error
-             });
-         });
-         public static final String NBT_TAG_KEY = "listener";
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/ChunkGeneratorAbstract.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/ChunkGeneratorAbstract.patch
deleted file mode 100644
index 9e7f2e0416..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/levelgen/ChunkGeneratorAbstract.patch
+++ /dev/null
@@ -1,7 +0,0 @@
---- a/net/minecraft/world/level/levelgen/ChunkGeneratorAbstract.java
-+++ b/net/minecraft/world/level/levelgen/ChunkGeneratorAbstract.java
-@@ -1,3 +1,4 @@
-+// keep
- package net.minecraft.world.level.levelgen;
- 
- import com.google.common.annotations.VisibleForTesting;
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/ChunkProviderFlat.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/ChunkProviderFlat.patch
deleted file mode 100644
index 73fd98881d..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/levelgen/ChunkProviderFlat.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/net/minecraft/world/level/levelgen/ChunkProviderFlat.java
-+++ b/net/minecraft/world/level/levelgen/ChunkProviderFlat.java
-@@ -34,10 +34,16 @@
-     private final GeneratorSettingsFlat settings;
- 
-     public ChunkProviderFlat(GeneratorSettingsFlat generatorsettingsflat) {
--        WorldChunkManagerHell worldchunkmanagerhell = new WorldChunkManagerHell(generatorsettingsflat.getBiome());
-+        // CraftBukkit start
-+        // WorldChunkManagerHell worldchunkmanagerhell = new WorldChunkManagerHell(generatorsettingsflat.getBiome());
- 
--        Objects.requireNonNull(generatorsettingsflat);
--        super(worldchunkmanagerhell, SystemUtils.memoize(generatorsettingsflat::adjustGenerationSettings));
-+        // Objects.requireNonNull(generatorsettingsflat);
-+        this(generatorsettingsflat, new WorldChunkManagerHell(generatorsettingsflat.getBiome()));
-+    }
-+
-+    public ChunkProviderFlat(GeneratorSettingsFlat generatorsettingsflat, net.minecraft.world.level.biome.WorldChunkManager worldchunkmanager) {
-+        super(worldchunkmanager, SystemUtils.memoize(generatorsettingsflat::adjustGenerationSettings));
-+        // CraftBukkit end
-         this.settings = generatorsettingsflat;
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/FlatLevelSource.java.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/FlatLevelSource.java.patch
new file mode 100644
index 0000000000..88a2591889
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/levelgen/FlatLevelSource.java.patch
@@ -0,0 +1,26 @@
+--- a/net/minecraft/world/level/levelgen/FlatLevelSource.java
++++ b/net/minecraft/world/level/levelgen/FlatLevelSource.java
+@@ -34,13 +34,19 @@
+     private final FlatLevelGeneratorSettings settings;
+ 
+     public FlatLevelSource(FlatLevelGeneratorSettings config) {
+-        FixedBiomeSource worldchunkmanagerhell = new FixedBiomeSource(config.getBiome());
++        // CraftBukkit start
++        // WorldChunkManagerHell worldchunkmanagerhell = new WorldChunkManagerHell(generatorsettingsflat.getBiome());
+ 
+-        Objects.requireNonNull(config);
+-        super(worldchunkmanagerhell, Util.memoize(config::adjustGenerationSettings));
+-        this.settings = config;
++        // Objects.requireNonNull(generatorsettingsflat);
++        this(config, new FixedBiomeSource(config.getBiome()));
+     }
+ 
++    public FlatLevelSource(FlatLevelGeneratorSettings generatorsettingsflat, net.minecraft.world.level.biome.BiomeSource worldchunkmanager) {
++        super(worldchunkmanager, Util.memoize(generatorsettingsflat::adjustGenerationSettings));
++        // CraftBukkit end
++        this.settings = generatorsettingsflat;
++    }
++
+     @Override
+     public ChunkGeneratorStructureState createState(HolderLookup<StructureSet> structureSetRegistry, RandomState noiseConfig, long seed) {
+         Stream<Holder<StructureSet>> stream = (Stream) this.settings.structureOverrides().map(HolderSet::stream).orElseGet(() -> {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/MobSpawnerPatrol.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/MobSpawnerPatrol.patch
deleted file mode 100644
index c2787a531f..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/levelgen/MobSpawnerPatrol.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/level/levelgen/MobSpawnerPatrol.java
-+++ b/net/minecraft/world/level/levelgen/MobSpawnerPatrol.java
-@@ -116,7 +116,7 @@
- 
-                 entitymonsterpatrolling.setPos((double) blockposition.getX(), (double) blockposition.getY(), (double) blockposition.getZ());
-                 entitymonsterpatrolling.finalizeSpawn(worldserver, worldserver.getCurrentDifficultyAt(blockposition), EntitySpawnReason.PATROL, (GroupDataEntity) null);
--                worldserver.addFreshEntityWithPassengers(entitymonsterpatrolling);
-+                worldserver.addFreshEntityWithPassengers(entitymonsterpatrolling, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.PATROL); // CraftBukkit
-                 return true;
-             } else {
-                 return false;
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/MobSpawnerPhantom.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/MobSpawnerPhantom.patch
deleted file mode 100644
index 35c075ea14..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/levelgen/MobSpawnerPhantom.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- a/net/minecraft/world/level/levelgen/MobSpawnerPhantom.java
-+++ b/net/minecraft/world/level/levelgen/MobSpawnerPhantom.java
-@@ -74,7 +74,7 @@
-                                                 if (entityphantom != null) {
-                                                     entityphantom.moveTo(blockposition1, 0.0F, 0.0F);
-                                                     groupdataentity = entityphantom.finalizeSpawn(worldserver, difficultydamagescaler, EntitySpawnReason.NATURAL, groupdataentity);
--                                                    worldserver.addFreshEntityWithPassengers(entityphantom);
-+                                                    worldserver.addFreshEntityWithPassengers(entityphantom, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit
-                                                     ++i;
-                                                 }
-                                             }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java.patch
new file mode 100644
index 0000000000..e3e53c8dde
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java.patch
@@ -0,0 +1,7 @@
+--- a/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
++++ b/net/minecraft/world/level/levelgen/NoiseBasedChunkGenerator.java
+@@ -1,3 +1,4 @@
++// keep
+ package net.minecraft.world.level.levelgen;
+ 
+ import com.google.common.annotations.VisibleForTesting;
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/PatrolSpawner.java.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/PatrolSpawner.java.patch
new file mode 100644
index 0000000000..e85d9944d3
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/levelgen/PatrolSpawner.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/level/levelgen/PatrolSpawner.java
++++ b/net/minecraft/world/level/levelgen/PatrolSpawner.java
+@@ -116,7 +116,7 @@
+ 
+                 entitymonsterpatrolling.setPos((double) pos.getX(), (double) pos.getY(), (double) pos.getZ());
+                 entitymonsterpatrolling.finalizeSpawn(world, world.getCurrentDifficultyAt(pos), EntitySpawnReason.PATROL, (SpawnGroupData) null);
+-                world.addFreshEntityWithPassengers(entitymonsterpatrolling);
++                world.addFreshEntityWithPassengers(entitymonsterpatrolling, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.PATROL); // CraftBukkit
+                 return true;
+             } else {
+                 return false;
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/PhantomSpawner.java.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/PhantomSpawner.java.patch
new file mode 100644
index 0000000000..6cc07c4a98
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/levelgen/PhantomSpawner.java.patch
@@ -0,0 +1,11 @@
+--- a/net/minecraft/world/level/levelgen/PhantomSpawner.java
++++ b/net/minecraft/world/level/levelgen/PhantomSpawner.java
+@@ -74,7 +74,7 @@
+                                                 if (entityphantom != null) {
+                                                     entityphantom.moveTo(blockposition1, 0.0F, 0.0F);
+                                                     groupdataentity = entityphantom.finalizeSpawn(world, difficultydamagescaler, EntitySpawnReason.NATURAL, groupdataentity);
+-                                                    world.addFreshEntityWithPassengers(entityphantom);
++                                                    world.addFreshEntityWithPassengers(entityphantom, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.NATURAL); // CraftBukkit
+                                                     ++i;
+                                                 }
+                                             }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java.patch
similarity index 60%
rename from paper-server/patches/sources/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.patch
rename to paper-server/patches/sources/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java.patch
index f8a04e34b9..d2cdde6d47 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java.patch
@@ -1,45 +1,48 @@
 --- a/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java
 +++ b/net/minecraft/world/level/levelgen/feature/EndPlatformFeature.java
-@@ -8,6 +8,12 @@
+@@ -7,6 +7,11 @@
+ import net.minecraft.world.level.block.Block;
  import net.minecraft.world.level.block.Blocks;
- import net.minecraft.world.level.levelgen.feature.configurations.WorldGenFeatureEmptyConfiguration;
- 
+ import net.minecraft.world.level.levelgen.feature.configurations.NoneFeatureConfiguration;
 +// CraftBukkit start
 +import java.util.List;
 +import org.bukkit.block.BlockState;
 +import org.bukkit.event.world.PortalCreateEvent;
 +// CraftBukkit end
-+
- public class EndPlatformFeature extends WorldGenerator<WorldGenFeatureEmptyConfiguration> {
  
-     public EndPlatformFeature(Codec<WorldGenFeatureEmptyConfiguration> codec) {
-@@ -21,6 +27,13 @@
+ public class EndPlatformFeature extends Feature<NoneFeatureConfiguration> {
+ 
+@@ -21,24 +26,51 @@
      }
  
-     public static void createEndPlatform(WorldAccess worldaccess, BlockPosition blockposition, boolean flag) {
-+        createEndPlatform(worldaccess, blockposition, flag, null);
+     public static void createEndPlatform(ServerLevelAccessor world, BlockPos pos, boolean breakBlocks) {
+-        BlockPos.MutableBlockPos blockposition_mutableblockposition = pos.mutable();
++        EndPlatformFeature.createEndPlatform(world, pos, breakBlocks, null);
 +        // CraftBukkit start
 +    }
-+
-+    public static void createEndPlatform(WorldAccess worldaccess, BlockPosition blockposition, boolean flag, Entity entity) {
+ 
++    public static void createEndPlatform(ServerLevelAccessor worldaccess, BlockPos blockposition, boolean flag, Entity entity) {
 +        org.bukkit.craftbukkit.util.BlockStateListPopulator blockList = new org.bukkit.craftbukkit.util.BlockStateListPopulator(worldaccess);
 +        // CraftBukkit end
-         BlockPosition.MutableBlockPosition blockposition_mutableblockposition = blockposition.mutable();
- 
++        BlockPos.MutableBlockPos blockposition_mutableblockposition = blockposition.mutable();
++
          for (int i = -2; i <= 2; ++i) {
-@@ -29,16 +42,36 @@
-                     BlockPosition.MutableBlockPosition blockposition_mutableblockposition1 = blockposition_mutableblockposition.set(blockposition).move(j, k, i);
+             for (int j = -2; j <= 2; ++j) {
+                 for (int k = -1; k < 3; ++k) {
+-                    BlockPos.MutableBlockPos blockposition_mutableblockposition1 = blockposition_mutableblockposition.set(pos).move(j, k, i);
++                    BlockPos.MutableBlockPos blockposition_mutableblockposition1 = blockposition_mutableblockposition.set(blockposition).move(j, k, i);
                      Block block = k == -1 ? Blocks.OBSIDIAN : Blocks.AIR;
  
--                    if (!worldaccess.getBlockState(blockposition_mutableblockposition1).is(block)) {
+-                    if (!world.getBlockState(blockposition_mutableblockposition1).is(block)) {
+-                        if (breakBlocks) {
+-                            world.destroyBlock(blockposition_mutableblockposition1, true, (Entity) null);
 +                    // CraftBukkit start
 +                    if (!blockList.getBlockState(blockposition_mutableblockposition1).is(block)) {
-                         if (flag) {
--                            worldaccess.destroyBlock(blockposition_mutableblockposition1, true, (Entity) null);
++                        if (flag) {
 +                            blockList.destroyBlock(blockposition_mutableblockposition1, true, (Entity) null);
                          }
  
--                        worldaccess.setBlock(blockposition_mutableblockposition1, block.defaultBlockState(), 3);
+-                        world.setBlock(blockposition_mutableblockposition1, block.defaultBlockState(), 3);
 +                        blockList.setBlock(blockposition_mutableblockposition1, block.defaultBlockState(), 3);
 +                        // CraftBukkit end
                      }
@@ -51,7 +54,7 @@
 +        if (entity != null) {
 +            org.bukkit.World bworld = worldaccess.getLevel().getWorld();
 +            PortalCreateEvent portalEvent = new PortalCreateEvent((List<BlockState>) (List) blockList.getList(), bworld, entity.getBukkitEntity(), org.bukkit.event.world.PortalCreateEvent.CreateReason.END_PLATFORM);
-+
+ 
 +            worldaccess.getLevel().getCraftServer().getPluginManager().callEvent(portalEvent);
 +            if (portalEvent.isCancelled()) {
 +                return;
@@ -64,6 +67,6 @@
 +        }
 +        blockList.updateList();
 +        // CraftBukkit end
- 
++
      }
  }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/LegacyStructureDataHandler.java.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/LegacyStructureDataHandler.java.patch
new file mode 100644
index 0000000000..04607e1797
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/LegacyStructureDataHandler.java.patch
@@ -0,0 +1,32 @@
+--- a/net/minecraft/world/level/levelgen/structure/LegacyStructureDataHandler.java
++++ b/net/minecraft/world/level/levelgen/structure/LegacyStructureDataHandler.java
+@@ -18,7 +18,7 @@
+ import net.minecraft.resources.ResourceKey;
+ import net.minecraft.util.datafix.DataFixTypes;
+ import net.minecraft.world.level.ChunkPos;
+-import net.minecraft.world.level.Level;
++import net.minecraft.world.level.dimension.LevelStem;
+ import net.minecraft.world.level.storage.DimensionDataStorage;
+ 
+ public class LegacyStructureDataHandler {
+@@ -233,16 +233,16 @@
+         }
+     }
+ 
+-    public static LegacyStructureDataHandler getLegacyStructureHandler(ResourceKey<Level> world, @Nullable DimensionDataStorage persistentStateManager) {
+-        if (world == Level.OVERWORLD) {
++    public static LegacyStructureDataHandler getLegacyStructureHandler(ResourceKey<LevelStem> world, @Nullable DimensionDataStorage persistentStateManager) { // CraftBukkit
++        if (world == LevelStem.OVERWORLD) { // CraftBukkit
+             return new LegacyStructureDataHandler(persistentStateManager, ImmutableList.of("Monument", "Stronghold", "Village", "Mineshaft", "Temple", "Mansion"), ImmutableList.of("Village", "Mineshaft", "Mansion", "Igloo", "Desert_Pyramid", "Jungle_Pyramid", "Swamp_Hut", "Stronghold", "Monument"));
+         } else {
+             ImmutableList immutablelist;
+ 
+-            if (world == Level.NETHER) {
++            if (world == LevelStem.NETHER) { // CraftBukkit
+                 immutablelist = ImmutableList.of("Fortress");
+                 return new LegacyStructureDataHandler(persistentStateManager, immutablelist, immutablelist);
+-            } else if (world == Level.END) {
++            } else if (world == LevelStem.END) { // CraftBukkit
+                 immutablelist = ImmutableList.of("EndCity");
+                 return new LegacyStructureDataHandler(persistentStateManager, immutablelist, immutablelist);
+             } else {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/PersistentStructureLegacy.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/PersistentStructureLegacy.patch
deleted file mode 100644
index a8d3bc86d1..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/PersistentStructureLegacy.patch
+++ /dev/null
@@ -1,34 +0,0 @@
---- a/net/minecraft/world/level/levelgen/structure/PersistentStructureLegacy.java
-+++ b/net/minecraft/world/level/levelgen/structure/PersistentStructureLegacy.java
-@@ -21,6 +21,10 @@
- import net.minecraft.world.level.World;
- import net.minecraft.world.level.storage.WorldPersistentData;
- 
-+// CraftBukkit start
-+import net.minecraft.world.level.dimension.WorldDimension;
-+// CraftBukkit end
-+
- public class PersistentStructureLegacy {
- 
-     private static final Map<String, String> CURRENT_TO_LEGACY_MAP = (Map) SystemUtils.make(Maps.newHashMap(), (hashmap) -> {
-@@ -233,16 +237,16 @@
-         }
-     }
- 
--    public static PersistentStructureLegacy getLegacyStructureHandler(ResourceKey<World> resourcekey, @Nullable WorldPersistentData worldpersistentdata) {
--        if (resourcekey == World.OVERWORLD) {
-+    public static PersistentStructureLegacy getLegacyStructureHandler(ResourceKey<WorldDimension> resourcekey, @Nullable WorldPersistentData worldpersistentdata) { // CraftBukkit
-+        if (resourcekey == WorldDimension.OVERWORLD) { // CraftBukkit
-             return new PersistentStructureLegacy(worldpersistentdata, ImmutableList.of("Monument", "Stronghold", "Village", "Mineshaft", "Temple", "Mansion"), ImmutableList.of("Village", "Mineshaft", "Mansion", "Igloo", "Desert_Pyramid", "Jungle_Pyramid", "Swamp_Hut", "Stronghold", "Monument"));
-         } else {
-             ImmutableList immutablelist;
- 
--            if (resourcekey == World.NETHER) {
-+            if (resourcekey == WorldDimension.NETHER) { // CraftBukkit
-                 immutablelist = ImmutableList.of("Fortress");
-                 return new PersistentStructureLegacy(worldpersistentdata, immutablelist, immutablelist);
--            } else if (resourcekey == World.END) {
-+            } else if (resourcekey == WorldDimension.END) { // CraftBukkit
-                 immutablelist = ImmutableList.of("EndCity");
-                 return new PersistentStructureLegacy(worldpersistentdata, immutablelist, immutablelist);
-             } else {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/StructurePiece.java.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/StructurePiece.java.patch
new file mode 100644
index 0000000000..918d4c34ed
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/StructurePiece.java.patch
@@ -0,0 +1,164 @@
+--- a/net/minecraft/world/level/levelgen/structure/StructurePiece.java
++++ b/net/minecraft/world/level/levelgen/structure/StructurePiece.java
+@@ -29,8 +29,6 @@
+ import net.minecraft.world.level.block.Mirror;
+ import net.minecraft.world.level.block.Rotation;
+ import net.minecraft.world.level.block.entity.BlockEntity;
+-import net.minecraft.world.level.block.entity.ChestBlockEntity;
+-import net.minecraft.world.level.block.entity.DispenserBlockEntity;
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.level.chunk.ChunkGenerator;
+ import net.minecraft.world.level.levelgen.Heightmap;
+@@ -51,7 +49,7 @@
+     private Rotation rotation;
+     protected int genDepth;
+     private final StructurePieceType type;
+-    private static final Set<Block> SHAPE_CHECK_BLOCKS = ImmutableSet.builder().add(Blocks.NETHER_BRICK_FENCE).add(Blocks.TORCH).add(Blocks.WALL_TORCH).add(Blocks.OAK_FENCE).add(Blocks.SPRUCE_FENCE).add(Blocks.DARK_OAK_FENCE).add(Blocks.PALE_OAK_FENCE).add(Blocks.ACACIA_FENCE).add(Blocks.BIRCH_FENCE).add(Blocks.JUNGLE_FENCE).add(Blocks.LADDER).add(Blocks.IRON_BARS).build();
++    public static final Set<Block> SHAPE_CHECK_BLOCKS = ImmutableSet.<Block>builder().add(Blocks.NETHER_BRICK_FENCE).add(Blocks.TORCH).add(Blocks.WALL_TORCH).add(Blocks.OAK_FENCE).add(Blocks.SPRUCE_FENCE).add(Blocks.DARK_OAK_FENCE).add(Blocks.PALE_OAK_FENCE).add(Blocks.ACACIA_FENCE).add(Blocks.BIRCH_FENCE).add(Blocks.JUNGLE_FENCE).add(Blocks.LADDER).add(Blocks.IRON_BARS).build(); // CraftBukkit - decompile error / PAIL private -> public
+ 
+     protected StructurePiece(StructurePieceType type, int length, BoundingBox boundingBox) {
+         this.type = type;
+@@ -80,13 +78,11 @@
+         CompoundTag nbttagcompound = new CompoundTag();
+ 
+         nbttagcompound.putString("id", BuiltInRegistries.STRUCTURE_PIECE.getKey(this.getType()).toString());
+-        DataResult dataresult = BoundingBox.CODEC.encodeStart(NbtOps.INSTANCE, this.boundingBox);
+-        Logger logger = StructurePiece.LOGGER;
+-
+-        Objects.requireNonNull(logger);
+-        dataresult.resultOrPartial(logger::error).ifPresent((nbtbase) -> {
+-            nbttagcompound.put("BB", nbtbase);
++        // CraftBukkit start - decompile error
++        BoundingBox.CODEC.encodeStart(NbtOps.INSTANCE, this.boundingBox).resultOrPartial(Objects.requireNonNull(StructurePiece.LOGGER)::error).ifPresent((nbtbase) -> {
++             nbttagcompound.put("BB", nbtbase);
+         });
++        // CraftBukkit end
+         Direction enumdirection = this.getOrientation();
+ 
+         nbttagcompound.putInt("O", enumdirection == null ? -1 : enumdirection.get2DDataValue());
+@@ -186,6 +182,11 @@
+                 }
+ 
+                 world.setBlock(blockposition_mutableblockposition, block, 2);
++                // CraftBukkit start - fluid handling is already done if we have a transformer generator access
++                if (world instanceof org.bukkit.craftbukkit.util.TransformerGeneratorAccess) {
++                    return;
++                }
++                // CraftBukkit end
+                 FluidState fluid = world.getFluidState(blockposition_mutableblockposition);
+ 
+                 if (!fluid.isEmpty()) {
+@@ -195,10 +196,42 @@
+                 if (StructurePiece.SHAPE_CHECK_BLOCKS.contains(block.getBlock())) {
+                     world.getChunk(blockposition_mutableblockposition).markPosForPostprocessing(blockposition_mutableblockposition);
+                 }
++
++            }
++        }
++    }
++
++    // CraftBukkit start
++    protected boolean placeCraftBlockEntity(ServerLevelAccessor worldAccess, BlockPos position, org.bukkit.craftbukkit.block.CraftBlockEntityState<?> craftBlockEntityState, int i) {
++        if (worldAccess instanceof org.bukkit.craftbukkit.util.TransformerGeneratorAccess transformerAccess) {
++            return transformerAccess.setCraftBlock(position, craftBlockEntityState, i);
++        }
++        boolean result = worldAccess.setBlock(position, craftBlockEntityState.getHandle(), i);
++        BlockEntity tileEntity = worldAccess.getBlockEntity(position);
++        if (tileEntity != null) {
++            tileEntity.loadWithComponents(craftBlockEntityState.getSnapshotNBT(), worldAccess.registryAccess());
++        }
++        return result;
++    }
+ 
++    protected void placeCraftSpawner(ServerLevelAccessor worldAccess, BlockPos position, org.bukkit.entity.EntityType entityType, int i) {
++        // This method is used in structures that are generated by code and place spawners as they set the entity after the block was placed making it impossible for plugins to access that information
++        org.bukkit.craftbukkit.block.CraftCreatureSpawner spawner = (org.bukkit.craftbukkit.block.CraftCreatureSpawner) org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(worldAccess, position, Blocks.SPAWNER.defaultBlockState(), null);
++        spawner.setSpawnedType(entityType);
++        this.placeCraftBlockEntity(worldAccess, position, spawner, i);
++    }
++
++    protected void setCraftLootTable(ServerLevelAccessor worldAccess, BlockPos position, RandomSource randomSource, ResourceKey<LootTable> loottableKey) {
++        // This method is used in structures that use data markers to a loot table to loot containers as otherwise plugins won't have access to that information.
++        net.minecraft.world.level.block.entity.BlockEntity tileEntity = worldAccess.getBlockEntity(position);
++        if (tileEntity instanceof net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity tileEntityLootable) {
++            tileEntityLootable.setLootTable(loottableKey, randomSource.nextLong());
++            if (worldAccess instanceof org.bukkit.craftbukkit.util.TransformerGeneratorAccess transformerAccess) {
++                transformerAccess.setCraftBlock(position, (org.bukkit.craftbukkit.block.CraftBlockState) org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(worldAccess, position, tileEntity.getBlockState(), tileEntityLootable.saveWithFullMetadata(worldAccess.registryAccess())), 3);
+             }
+         }
+     }
++    // CraftBukkit end
+ 
+     protected boolean canBeReplaced(LevelReader world, int x, int y, int z, BoundingBox box) {
+         return true;
+@@ -393,12 +426,20 @@
+                 block = StructurePiece.reorient(world, pos, Blocks.CHEST.defaultBlockState());
+             }
+ 
+-            world.setBlock(pos, block, 2);
+-            BlockEntity tileentity = world.getBlockEntity(pos);
++            // CraftBukkit start
++            /*
++            worldaccess.setBlock(blockposition, iblockdata, 2);
++            TileEntity tileentity = worldaccess.getBlockEntity(blockposition);
+ 
+-            if (tileentity instanceof ChestBlockEntity) {
+-                ((ChestBlockEntity) tileentity).setLootTable(lootTable, random.nextLong());
++            if (tileentity instanceof TileEntityChest) {
++                ((TileEntityChest) tileentity).setLootTable(resourcekey, randomsource.nextLong());
+             }
++            */
++            org.bukkit.craftbukkit.block.CraftChest chestState = (org.bukkit.craftbukkit.block.CraftChest) org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(world, pos, block, null);
++            chestState.setLootTable(org.bukkit.craftbukkit.CraftLootTable.minecraftToBukkit(lootTable));
++            chestState.setSeed(random.nextLong());
++            this.placeCraftBlockEntity(world, pos, chestState, 2);
++            // CraftBukkit end
+ 
+             return true;
+         } else {
+@@ -410,13 +451,32 @@
+         BlockPos.MutableBlockPos blockposition_mutableblockposition = this.getWorldPos(x, y, z);
+ 
+         if (boundingBox.isInside(blockposition_mutableblockposition) && !world.getBlockState(blockposition_mutableblockposition).is(Blocks.DISPENSER)) {
+-            this.placeBlock(world, (BlockState) Blocks.DISPENSER.defaultBlockState().setValue(DispenserBlock.FACING, facing), x, y, z, boundingBox);
+-            BlockEntity tileentity = world.getBlockEntity(blockposition_mutableblockposition);
++            // CraftBukkit start
++            /*
++            this.placeBlock(generatoraccessseed, (IBlockData) Blocks.DISPENSER.defaultBlockState().setValue(BlockDispenser.FACING, enumdirection), i, j, k, structureboundingbox);
++            TileEntity tileentity = generatoraccessseed.getBlockEntity(blockposition_mutableblockposition);
+ 
+-            if (tileentity instanceof DispenserBlockEntity) {
+-                ((DispenserBlockEntity) tileentity).setLootTable(lootTable, random.nextLong());
++            if (tileentity instanceof TileEntityDispenser) {
++                ((TileEntityDispenser) tileentity).setLootTable(resourcekey, randomsource.nextLong());
+             }
++            */
++            if (!this.canBeReplaced(world, x, y, z, boundingBox)) {
++                return true;
++            }
++            BlockState iblockdata = Blocks.DISPENSER.defaultBlockState().setValue(DispenserBlock.FACING, facing);
++            if (this.mirror != Mirror.NONE) {
++                iblockdata = iblockdata.mirror(this.mirror);
++            }
++            if (this.rotation != Rotation.NONE) {
++                iblockdata = iblockdata.rotate(this.rotation);
++            }
+ 
++            org.bukkit.craftbukkit.block.CraftDispenser dispenserState = (org.bukkit.craftbukkit.block.CraftDispenser) org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(world, blockposition_mutableblockposition, iblockdata, null);
++            dispenserState.setLootTable(org.bukkit.craftbukkit.CraftLootTable.minecraftToBukkit(lootTable));
++            dispenserState.setSeed(random.nextLong());
++            this.placeCraftBlockEntity(world, blockposition_mutableblockposition, dispenserState, 2);
++            // CraftBukkit end
++
+             return true;
+         } else {
+             return false;
+@@ -428,7 +488,7 @@
+     }
+ 
+     public static BoundingBox createBoundingBox(Stream<StructurePiece> pieces) {
+-        Stream stream1 = pieces.map(StructurePiece::getBoundingBox);
++        Stream<BoundingBox> stream1 = pieces.map(StructurePiece::getBoundingBox); // CraftBukkit - decompile error
+ 
+         Objects.requireNonNull(stream1);
+         return (BoundingBox) BoundingBox.encapsulatingBoxes(stream1::iterator).orElseThrow(() -> {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/StructurePiece.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/StructurePiece.patch
deleted file mode 100644
index e9a1240028..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/StructurePiece.patch
+++ /dev/null
@@ -1,142 +0,0 @@
---- a/net/minecraft/world/level/levelgen/structure/StructurePiece.java
-+++ b/net/minecraft/world/level/levelgen/structure/StructurePiece.java
-@@ -51,7 +51,7 @@
-     private EnumBlockRotation rotation;
-     protected int genDepth;
-     private final WorldGenFeatureStructurePieceType type;
--    private static final Set<Block> SHAPE_CHECK_BLOCKS = ImmutableSet.builder().add(Blocks.NETHER_BRICK_FENCE).add(Blocks.TORCH).add(Blocks.WALL_TORCH).add(Blocks.OAK_FENCE).add(Blocks.SPRUCE_FENCE).add(Blocks.DARK_OAK_FENCE).add(Blocks.PALE_OAK_FENCE).add(Blocks.ACACIA_FENCE).add(Blocks.BIRCH_FENCE).add(Blocks.JUNGLE_FENCE).add(Blocks.LADDER).add(Blocks.IRON_BARS).build();
-+    public static final Set<Block> SHAPE_CHECK_BLOCKS = ImmutableSet.<Block>builder().add(Blocks.NETHER_BRICK_FENCE).add(Blocks.TORCH).add(Blocks.WALL_TORCH).add(Blocks.OAK_FENCE).add(Blocks.SPRUCE_FENCE).add(Blocks.DARK_OAK_FENCE).add(Blocks.PALE_OAK_FENCE).add(Blocks.ACACIA_FENCE).add(Blocks.BIRCH_FENCE).add(Blocks.JUNGLE_FENCE).add(Blocks.LADDER).add(Blocks.IRON_BARS).build(); // CraftBukkit - decompile error / PAIL private -> public
- 
-     protected StructurePiece(WorldGenFeatureStructurePieceType worldgenfeaturestructurepiecetype, int i, StructureBoundingBox structureboundingbox) {
-         this.type = worldgenfeaturestructurepiecetype;
-@@ -80,13 +80,11 @@
-         NBTTagCompound nbttagcompound = new NBTTagCompound();
- 
-         nbttagcompound.putString("id", BuiltInRegistries.STRUCTURE_PIECE.getKey(this.getType()).toString());
--        DataResult dataresult = StructureBoundingBox.CODEC.encodeStart(DynamicOpsNBT.INSTANCE, this.boundingBox);
--        Logger logger = StructurePiece.LOGGER;
--
--        Objects.requireNonNull(logger);
--        dataresult.resultOrPartial(logger::error).ifPresent((nbtbase) -> {
--            nbttagcompound.put("BB", nbtbase);
-+        // CraftBukkit start - decompile error
-+        StructureBoundingBox.CODEC.encodeStart(DynamicOpsNBT.INSTANCE, this.boundingBox).resultOrPartial(Objects.requireNonNull(StructurePiece.LOGGER)::error).ifPresent((nbtbase) -> {
-+             nbttagcompound.put("BB", nbtbase);
-         });
-+        // CraftBukkit end
-         EnumDirection enumdirection = this.getOrientation();
- 
-         nbttagcompound.putInt("O", enumdirection == null ? -1 : enumdirection.get2DDataValue());
-@@ -186,6 +184,11 @@
-                 }
- 
-                 generatoraccessseed.setBlock(blockposition_mutableblockposition, iblockdata, 2);
-+                // CraftBukkit start - fluid handling is already done if we have a transformer generator access
-+                if (generatoraccessseed instanceof org.bukkit.craftbukkit.util.TransformerGeneratorAccess) {
-+                    return;
-+                }
-+                // CraftBukkit end
-                 Fluid fluid = generatoraccessseed.getFluidState(blockposition_mutableblockposition);
- 
-                 if (!fluid.isEmpty()) {
-@@ -200,6 +203,38 @@
-         }
-     }
- 
-+    // CraftBukkit start
-+    protected boolean placeCraftBlockEntity(WorldAccess worldAccess, BlockPosition position, org.bukkit.craftbukkit.block.CraftBlockEntityState<?> craftBlockEntityState, int i) {
-+        if (worldAccess instanceof org.bukkit.craftbukkit.util.TransformerGeneratorAccess transformerAccess) {
-+            return transformerAccess.setCraftBlock(position, craftBlockEntityState, i);
-+        }
-+        boolean result = worldAccess.setBlock(position, craftBlockEntityState.getHandle(), i);
-+        TileEntity tileEntity = worldAccess.getBlockEntity(position);
-+        if (tileEntity != null) {
-+            tileEntity.loadWithComponents(craftBlockEntityState.getSnapshotNBT(), worldAccess.registryAccess());
-+        }
-+        return result;
-+    }
-+
-+    protected void placeCraftSpawner(WorldAccess worldAccess, BlockPosition position, org.bukkit.entity.EntityType entityType, int i) {
-+        // This method is used in structures that are generated by code and place spawners as they set the entity after the block was placed making it impossible for plugins to access that information
-+        org.bukkit.craftbukkit.block.CraftCreatureSpawner spawner = (org.bukkit.craftbukkit.block.CraftCreatureSpawner) org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(worldAccess, position, Blocks.SPAWNER.defaultBlockState(), null);
-+        spawner.setSpawnedType(entityType);
-+        placeCraftBlockEntity(worldAccess, position, spawner, i);
-+    }
-+
-+    protected void setCraftLootTable(WorldAccess worldAccess, BlockPosition position, RandomSource randomSource, ResourceKey<LootTable> loottableKey) {
-+        // This method is used in structures that use data markers to a loot table to loot containers as otherwise plugins won't have access to that information.
-+        net.minecraft.world.level.block.entity.TileEntity tileEntity = worldAccess.getBlockEntity(position);
-+        if (tileEntity instanceof net.minecraft.world.level.block.entity.TileEntityLootable tileEntityLootable) {
-+            tileEntityLootable.setLootTable(loottableKey, randomSource.nextLong());
-+            if (worldAccess instanceof org.bukkit.craftbukkit.util.TransformerGeneratorAccess transformerAccess) {
-+                transformerAccess.setCraftBlock(position, (org.bukkit.craftbukkit.block.CraftBlockState) org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(worldAccess, position, tileEntity.getBlockState(), tileEntityLootable.saveWithFullMetadata(worldAccess.registryAccess())), 3);
-+            }
-+        }
-+    }
-+    // CraftBukkit end
-+
-     protected boolean canBeReplaced(IWorldReader iworldreader, int i, int j, int k, StructureBoundingBox structureboundingbox) {
-         return true;
-     }
-@@ -393,12 +428,20 @@
-                 iblockdata = reorient(worldaccess, blockposition, Blocks.CHEST.defaultBlockState());
-             }
- 
-+            // CraftBukkit start
-+            /*
-             worldaccess.setBlock(blockposition, iblockdata, 2);
-             TileEntity tileentity = worldaccess.getBlockEntity(blockposition);
- 
-             if (tileentity instanceof TileEntityChest) {
-                 ((TileEntityChest) tileentity).setLootTable(resourcekey, randomsource.nextLong());
-             }
-+            */
-+            org.bukkit.craftbukkit.block.CraftChest chestState = (org.bukkit.craftbukkit.block.CraftChest) org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(worldaccess, blockposition, iblockdata, null);
-+            chestState.setLootTable(org.bukkit.craftbukkit.CraftLootTable.minecraftToBukkit(resourcekey));
-+            chestState.setSeed(randomsource.nextLong());
-+            placeCraftBlockEntity(worldaccess, blockposition, chestState, 2);
-+            // CraftBukkit end
- 
-             return true;
-         } else {
-@@ -410,12 +453,31 @@
-         BlockPosition.MutableBlockPosition blockposition_mutableblockposition = this.getWorldPos(i, j, k);
- 
-         if (structureboundingbox.isInside(blockposition_mutableblockposition) && !generatoraccessseed.getBlockState(blockposition_mutableblockposition).is(Blocks.DISPENSER)) {
-+            // CraftBukkit start
-+            /*
-             this.placeBlock(generatoraccessseed, (IBlockData) Blocks.DISPENSER.defaultBlockState().setValue(BlockDispenser.FACING, enumdirection), i, j, k, structureboundingbox);
-             TileEntity tileentity = generatoraccessseed.getBlockEntity(blockposition_mutableblockposition);
- 
-             if (tileentity instanceof TileEntityDispenser) {
-                 ((TileEntityDispenser) tileentity).setLootTable(resourcekey, randomsource.nextLong());
-             }
-+            */
-+            if (!this.canBeReplaced(generatoraccessseed, i, j, k, structureboundingbox)) {
-+                return true;
-+            }
-+            IBlockData iblockdata = Blocks.DISPENSER.defaultBlockState().setValue(BlockDispenser.FACING, enumdirection);
-+            if (this.mirror != EnumBlockMirror.NONE) {
-+                iblockdata = iblockdata.mirror(this.mirror);
-+            }
-+            if (this.rotation != EnumBlockRotation.NONE) {
-+                iblockdata = iblockdata.rotate(this.rotation);
-+            }
-+
-+            org.bukkit.craftbukkit.block.CraftDispenser dispenserState = (org.bukkit.craftbukkit.block.CraftDispenser) org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(generatoraccessseed, blockposition_mutableblockposition, iblockdata, null);
-+            dispenserState.setLootTable(org.bukkit.craftbukkit.CraftLootTable.minecraftToBukkit(resourcekey));
-+            dispenserState.setSeed(randomsource.nextLong());
-+            placeCraftBlockEntity(generatoraccessseed, blockposition_mutableblockposition, dispenserState, 2);
-+            // CraftBukkit end
- 
-             return true;
-         } else {
-@@ -428,7 +490,7 @@
-     }
- 
-     public static StructureBoundingBox createBoundingBox(Stream<StructurePiece> stream) {
--        Stream stream1 = stream.map(StructurePiece::getBoundingBox);
-+        Stream<StructureBoundingBox> stream1 = stream.map(StructurePiece::getBoundingBox); // CraftBukkit - decompile error
- 
-         Objects.requireNonNull(stream1);
-         return (StructureBoundingBox) StructureBoundingBox.encapsulatingBoxes(stream1::iterator).orElseThrow(() -> {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/StructureStart.java.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/StructureStart.java.patch
new file mode 100644
index 0000000000..83539110a1
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/StructureStart.java.patch
@@ -0,0 +1,59 @@
+--- a/net/minecraft/world/level/levelgen/structure/StructureStart.java
++++ b/net/minecraft/world/level/levelgen/structure/StructureStart.java
+@@ -32,6 +32,12 @@
+     @Nullable
+     private volatile BoundingBox cachedBoundingBox;
+ 
++    // CraftBukkit start
++    private static final org.bukkit.craftbukkit.persistence.CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new org.bukkit.craftbukkit.persistence.CraftPersistentDataTypeRegistry();
++    public org.bukkit.craftbukkit.persistence.DirtyCraftPersistentDataContainer persistentDataContainer = new org.bukkit.craftbukkit.persistence.DirtyCraftPersistentDataContainer(StructureStart.DATA_TYPE_REGISTRY);
++    public org.bukkit.event.world.AsyncStructureGenerateEvent.Cause generationEventCause = org.bukkit.event.world.AsyncStructureGenerateEvent.Cause.WORLD_GENERATION;
++    // CraftBukkit end
++
+     public StructureStart(Structure structure, ChunkPos pos, int references, PiecesContainer children) {
+         this.structure = structure;
+         this.chunkPos = pos;
+@@ -91,15 +97,29 @@
+             BoundingBox structureboundingbox1 = ((StructurePiece) list.get(0)).boundingBox;
+             BlockPos blockposition = structureboundingbox1.getCenter();
+             BlockPos blockposition1 = new BlockPos(blockposition.getX(), structureboundingbox1.minY(), blockposition.getZ());
++            // CraftBukkit start
++            /*
+             Iterator iterator = list.iterator();
+ 
+             while (iterator.hasNext()) {
+                 StructurePiece structurepiece = (StructurePiece) iterator.next();
+ 
+-                if (structurepiece.getBoundingBox().intersects(chunkBox)) {
+-                    structurepiece.postProcess(world, structureAccessor, chunkGenerator, random, chunkBox, chunkPos, blockposition1);
++                if (structurepiece.getBoundingBox().intersects(structureboundingbox)) {
++                    structurepiece.postProcess(generatoraccessseed, structuremanager, chunkgenerator, randomsource, structureboundingbox, chunkcoordintpair, blockposition1);
+                 }
+             }
++            */
++            List<StructurePiece> pieces = list.stream().filter(piece -> piece.getBoundingBox().intersects(chunkBox)).toList();
++            if (!pieces.isEmpty()) {
++                org.bukkit.craftbukkit.util.TransformerGeneratorAccess transformerAccess = new org.bukkit.craftbukkit.util.TransformerGeneratorAccess();
++                transformerAccess.setHandle(world);
++                transformerAccess.setStructureTransformer(new org.bukkit.craftbukkit.util.CraftStructureTransformer(this.generationEventCause, world, structureAccessor, this.structure, chunkBox, chunkPos));
++                for (StructurePiece piece : pieces) {
++                    piece.postProcess(transformerAccess, structureAccessor, chunkGenerator, random, chunkBox, chunkPos, blockposition1);
++                }
++                transformerAccess.getStructureTransformer().discard();
++            }
++            // CraftBukkit end
+ 
+             this.structure.afterPlace(world, structureAccessor, chunkGenerator, random, chunkBox, chunkPos, this.pieceContainer);
+         }
+@@ -107,6 +127,11 @@
+ 
+     public CompoundTag createTag(StructurePieceSerializationContext context, ChunkPos chunkPos) {
+         CompoundTag nbttagcompound = new CompoundTag();
++        // CraftBukkit start - store persistent data in nbt
++        if (!this.persistentDataContainer.isEmpty()) {
++            nbttagcompound.put("StructureBukkitValues", this.persistentDataContainer.toTagCompound());
++        }
++        // CraftBukkit end
+ 
+         if (this.isValid()) {
+             nbttagcompound.putString("id", context.registryAccess().lookupOrThrow(Registries.STRUCTURE).getKey(this.structure).toString());
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/StructureStart.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/StructureStart.patch
deleted file mode 100644
index cf6f6199a5..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/StructureStart.patch
+++ /dev/null
@@ -1,55 +0,0 @@
---- a/net/minecraft/world/level/levelgen/structure/StructureStart.java
-+++ b/net/minecraft/world/level/levelgen/structure/StructureStart.java
-@@ -32,6 +32,12 @@
-     @Nullable
-     private volatile StructureBoundingBox cachedBoundingBox;
- 
-+    // CraftBukkit start
-+    private static final org.bukkit.craftbukkit.persistence.CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new org.bukkit.craftbukkit.persistence.CraftPersistentDataTypeRegistry();
-+    public org.bukkit.craftbukkit.persistence.DirtyCraftPersistentDataContainer persistentDataContainer = new org.bukkit.craftbukkit.persistence.DirtyCraftPersistentDataContainer(DATA_TYPE_REGISTRY);
-+    public org.bukkit.event.world.AsyncStructureGenerateEvent.Cause generationEventCause = org.bukkit.event.world.AsyncStructureGenerateEvent.Cause.WORLD_GENERATION;
-+    // CraftBukkit end
-+
-     public StructureStart(Structure structure, ChunkCoordIntPair chunkcoordintpair, int i, PiecesContainer piecescontainer) {
-         this.structure = structure;
-         this.chunkPos = chunkcoordintpair;
-@@ -91,6 +97,8 @@
-             StructureBoundingBox structureboundingbox1 = ((StructurePiece) list.get(0)).boundingBox;
-             BlockPosition blockposition = structureboundingbox1.getCenter();
-             BlockPosition blockposition1 = new BlockPosition(blockposition.getX(), structureboundingbox1.minY(), blockposition.getZ());
-+            // CraftBukkit start
-+            /*
-             Iterator iterator = list.iterator();
- 
-             while (iterator.hasNext()) {
-@@ -100,6 +108,18 @@
-                     structurepiece.postProcess(generatoraccessseed, structuremanager, chunkgenerator, randomsource, structureboundingbox, chunkcoordintpair, blockposition1);
-                 }
-             }
-+            */
-+            List<StructurePiece> pieces = list.stream().filter(piece -> piece.getBoundingBox().intersects(structureboundingbox)).toList();
-+            if (!pieces.isEmpty()) {
-+                org.bukkit.craftbukkit.util.TransformerGeneratorAccess transformerAccess = new org.bukkit.craftbukkit.util.TransformerGeneratorAccess();
-+                transformerAccess.setHandle(generatoraccessseed);
-+                transformerAccess.setStructureTransformer(new org.bukkit.craftbukkit.util.CraftStructureTransformer(generationEventCause, generatoraccessseed, structuremanager, structure, structureboundingbox, chunkcoordintpair));
-+                for (StructurePiece piece : pieces) {
-+                    piece.postProcess(transformerAccess, structuremanager, chunkgenerator, randomsource, structureboundingbox, chunkcoordintpair, blockposition1);
-+                }
-+                transformerAccess.getStructureTransformer().discard();
-+            }
-+            // CraftBukkit end
- 
-             this.structure.afterPlace(generatoraccessseed, structuremanager, chunkgenerator, randomsource, structureboundingbox, chunkcoordintpair, this.pieceContainer);
-         }
-@@ -107,6 +127,11 @@
- 
-     public NBTTagCompound createTag(StructurePieceSerializationContext structurepieceserializationcontext, ChunkCoordIntPair chunkcoordintpair) {
-         NBTTagCompound nbttagcompound = new NBTTagCompound();
-+        // CraftBukkit start - store persistent data in nbt
-+        if (!persistentDataContainer.isEmpty()) {
-+            nbttagcompound.put("StructureBukkitValues", persistentDataContainer.toTagCompound());
-+        }
-+        // CraftBukkit end
- 
-         if (this.isValid()) {
-             nbttagcompound.putString("id", structurepieceserializationcontext.registryAccess().lookupOrThrow(Registries.STRUCTURE).getKey(this.structure).toString());
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/DesertPyramidStructure.java.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/DesertPyramidStructure.java.patch
new file mode 100644
index 0000000000..84696b809f
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/DesertPyramidStructure.java.patch
@@ -0,0 +1,18 @@
+--- a/net/minecraft/world/level/levelgen/structure/structures/DesertPyramidStructure.java
++++ b/net/minecraft/world/level/levelgen/structure/structures/DesertPyramidStructure.java
+@@ -68,6 +68,15 @@
+ 
+     private static void placeSuspiciousSand(BoundingBox box, WorldGenLevel world, BlockPos pos) {
+         if (box.isInside(pos)) {
++            // CraftBukkit start
++            if (world instanceof org.bukkit.craftbukkit.util.TransformerGeneratorAccess transformerAccess) {
++                org.bukkit.craftbukkit.block.CraftBrushableBlock brushableState = (org.bukkit.craftbukkit.block.CraftBrushableBlock) org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(world, pos, Blocks.SUSPICIOUS_SAND.defaultBlockState(), null);
++                brushableState.setLootTable(org.bukkit.craftbukkit.CraftLootTable.minecraftToBukkit(BuiltInLootTables.DESERT_PYRAMID_ARCHAEOLOGY));
++                brushableState.setSeed(pos.asLong());
++                transformerAccess.setCraftBlock(pos, brushableState, 2);
++                return;
++            }
++            // CraftBukkit end
+             world.setBlock(pos, Blocks.SUSPICIOUS_SAND.defaultBlockState(), 2);
+             world.getBlockEntity(pos, BlockEntityType.BRUSHABLE_BLOCK).ifPresent((brushableblockentity) -> {
+                 brushableblockentity.setLootTable(BuiltInLootTables.DESERT_PYRAMID_ARCHAEOLOGY, pos.asLong());
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/DesertPyramidStructure.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/DesertPyramidStructure.patch
deleted file mode 100644
index 8da3c90705..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/DesertPyramidStructure.patch
+++ /dev/null
@@ -1,18 +0,0 @@
---- a/net/minecraft/world/level/levelgen/structure/structures/DesertPyramidStructure.java
-+++ b/net/minecraft/world/level/levelgen/structure/structures/DesertPyramidStructure.java
-@@ -68,6 +68,15 @@
- 
-     private static void placeSuspiciousSand(StructureBoundingBox structureboundingbox, GeneratorAccessSeed generatoraccessseed, BlockPosition blockposition) {
-         if (structureboundingbox.isInside(blockposition)) {
-+            // CraftBukkit start
-+            if (generatoraccessseed instanceof org.bukkit.craftbukkit.util.TransformerGeneratorAccess transformerAccess) {
-+                org.bukkit.craftbukkit.block.CraftBrushableBlock brushableState = (org.bukkit.craftbukkit.block.CraftBrushableBlock) org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(generatoraccessseed, blockposition, Blocks.SUSPICIOUS_SAND.defaultBlockState(), null);
-+                brushableState.setLootTable(org.bukkit.craftbukkit.CraftLootTable.minecraftToBukkit(LootTables.DESERT_PYRAMID_ARCHAEOLOGY));
-+                brushableState.setSeed(blockposition.asLong());
-+                transformerAccess.setCraftBlock(blockposition, brushableState, 2);
-+                return;
-+            }
-+            // CraftBukkit end
-             generatoraccessseed.setBlock(blockposition, Blocks.SUSPICIOUS_SAND.defaultBlockState(), 2);
-             generatoraccessseed.getBlockEntity(blockposition, TileEntityTypes.BRUSHABLE_BLOCK).ifPresent((brushableblockentity) -> {
-                 brushableblockentity.setLootTable(LootTables.DESERT_PYRAMID_ARCHAEOLOGY, blockposition.asLong());
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/EndCityPieces.java.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/EndCityPieces.java.patch
new file mode 100644
index 0000000000..0ec21beb4f
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/EndCityPieces.java.patch
@@ -0,0 +1,16 @@
+--- a/net/minecraft/world/level/levelgen/structure/structures/EndCityPieces.java
++++ b/net/minecraft/world/level/levelgen/structure/structures/EndCityPieces.java
+@@ -285,7 +285,12 @@
+                 BlockPos blockposition1 = pos.below();
+ 
+                 if (boundingBox.isInside(blockposition1)) {
+-                    RandomizableContainer.setBlockEntityLootTable(world, random, blockposition1, BuiltInLootTables.END_CITY_TREASURE);
++                    // CraftBukkit start - ensure block transformation
++                    /*
++                    RandomizableContainer.setBlockEntityLootTable(worldaccess, randomsource, blockposition1, LootTables.END_CITY_TREASURE);
++                    */
++                    this.setCraftLootTable(world, blockposition1, random, BuiltInLootTables.END_CITY_TREASURE);
++                    // CraftBukkit end
+                 }
+             } else if (boundingBox.isInside(pos) && Level.isInSpawnableBounds(pos)) {
+                 if (metadata.startsWith("Sentry")) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/EndCityPieces.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/EndCityPieces.patch
deleted file mode 100644
index 9aea52419b..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/EndCityPieces.patch
+++ /dev/null
@@ -1,15 +0,0 @@
---- a/net/minecraft/world/level/levelgen/structure/structures/EndCityPieces.java
-+++ b/net/minecraft/world/level/levelgen/structure/structures/EndCityPieces.java
-@@ -285,7 +285,12 @@
-                 BlockPosition blockposition1 = blockposition.below();
- 
-                 if (structureboundingbox.isInside(blockposition1)) {
-+                    // CraftBukkit start - ensure block transformation
-+                    /*
-                     RandomizableContainer.setBlockEntityLootTable(worldaccess, randomsource, blockposition1, LootTables.END_CITY_TREASURE);
-+                    */
-+                    setCraftLootTable(worldaccess, blockposition1, randomsource, LootTables.END_CITY_TREASURE);
-+                    // CraftBukkit end
-                 }
-             } else if (structureboundingbox.isInside(blockposition) && World.isInSpawnableBounds(blockposition)) {
-                 if (s.startsWith("Sentry")) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/IglooPieces.java.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/IglooPieces.java.patch
new file mode 100644
index 0000000000..5dc0652fc4
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/IglooPieces.java.patch
@@ -0,0 +1,31 @@
+--- a/net/minecraft/world/level/levelgen/structure/structures/IglooPieces.java
++++ b/net/minecraft/world/level/levelgen/structure/structures/IglooPieces.java
+@@ -14,8 +14,6 @@
+ import net.minecraft.world.level.block.Blocks;
+ import net.minecraft.world.level.block.Mirror;
+ import net.minecraft.world.level.block.Rotation;
+-import net.minecraft.world.level.block.entity.BlockEntity;
+-import net.minecraft.world.level.block.entity.ChestBlockEntity;
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.level.chunk.ChunkGenerator;
+ import net.minecraft.world.level.levelgen.Heightmap;
+@@ -86,11 +84,16 @@
+         protected void handleDataMarker(String metadata, BlockPos pos, ServerLevelAccessor world, RandomSource random, BoundingBox boundingBox) {
+             if ("chest".equals(metadata)) {
+                 world.setBlock(pos, Blocks.AIR.defaultBlockState(), 3);
+-                BlockEntity tileentity = world.getBlockEntity(pos.below());
++                // CraftBukkit start - ensure block transformation
++                /*
++                TileEntity tileentity = worldaccess.getBlockEntity(blockposition.below());
+ 
+-                if (tileentity instanceof ChestBlockEntity) {
+-                    ((ChestBlockEntity) tileentity).setLootTable(BuiltInLootTables.IGLOO_CHEST, random.nextLong());
++                if (tileentity instanceof TileEntityChest) {
++                    ((TileEntityChest) tileentity).setLootTable(LootTables.IGLOO_CHEST, randomsource.nextLong());
+                 }
++                */
++                this.setCraftLootTable(world, pos.below(), random, BuiltInLootTables.IGLOO_CHEST);
++                // CraftBukkit end
+ 
+             }
+         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/IglooPieces.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/IglooPieces.patch
deleted file mode 100644
index 85ee41d10a..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/IglooPieces.patch
+++ /dev/null
@@ -1,19 +0,0 @@
---- a/net/minecraft/world/level/levelgen/structure/structures/IglooPieces.java
-+++ b/net/minecraft/world/level/levelgen/structure/structures/IglooPieces.java
-@@ -86,11 +86,16 @@
-         protected void handleDataMarker(String s, BlockPosition blockposition, WorldAccess worldaccess, RandomSource randomsource, StructureBoundingBox structureboundingbox) {
-             if ("chest".equals(s)) {
-                 worldaccess.setBlock(blockposition, Blocks.AIR.defaultBlockState(), 3);
-+                // CraftBukkit start - ensure block transformation
-+                /*
-                 TileEntity tileentity = worldaccess.getBlockEntity(blockposition.below());
- 
-                 if (tileentity instanceof TileEntityChest) {
-                     ((TileEntityChest) tileentity).setLootTable(LootTables.IGLOO_CHEST, randomsource.nextLong());
-                 }
-+                */
-+                setCraftLootTable(worldaccess, blockposition.below(), randomsource, LootTables.IGLOO_CHEST);
-+                // CraftBukkit end
- 
-             }
-         }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/MineshaftPieces.java.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/MineshaftPieces.java.patch
new file mode 100644
index 0000000000..32925fee48
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/MineshaftPieces.java.patch
@@ -0,0 +1,68 @@
+--- a/net/minecraft/world/level/levelgen/structure/structures/MineshaftPieces.java
++++ b/net/minecraft/world/level/levelgen/structure/structures/MineshaftPieces.java
+@@ -12,6 +12,7 @@
+ import net.minecraft.core.Direction;
+ import net.minecraft.nbt.CompoundTag;
+ import net.minecraft.nbt.NbtOps;
++import net.minecraft.nbt.Tag;
+ import net.minecraft.resources.ResourceKey;
+ import net.minecraft.tags.BiomeTags;
+ import net.minecraft.util.RandomSource;
+@@ -30,8 +31,6 @@
+ import net.minecraft.world.level.block.FenceBlock;
+ import net.minecraft.world.level.block.RailBlock;
+ import net.minecraft.world.level.block.WallTorchBlock;
+-import net.minecraft.world.level.block.entity.BlockEntity;
+-import net.minecraft.world.level.block.entity.SpawnerBlockEntity;
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.level.block.state.properties.RailShape;
+ import net.minecraft.world.level.chunk.ChunkGenerator;
+@@ -520,14 +519,19 @@
+ 
+                         if (chunkBox.isInside(blockposition_mutableblockposition) && this.isInterior(world, 1, 0, l, chunkBox)) {
+                             this.hasPlacedSpider = true;
+-                            world.setBlock(blockposition_mutableblockposition, Blocks.SPAWNER.defaultBlockState(), 2);
+-                            BlockEntity tileentity = world.getBlockEntity(blockposition_mutableblockposition);
+-
+-                            if (tileentity instanceof SpawnerBlockEntity) {
+-                                SpawnerBlockEntity tileentitymobspawner = (SpawnerBlockEntity) tileentity;
++                            // CraftBukkit start
++                            /*
++                            generatoraccessseed.setBlock(blockposition_mutableblockposition, Blocks.SPAWNER.defaultBlockState(), 2);
++                            TileEntity tileentity = generatoraccessseed.getBlockEntity(blockposition_mutableblockposition);
+ 
+-                                tileentitymobspawner.setEntityId(EntityType.CAVE_SPIDER, random);
++                            if (tileentity instanceof TileEntityMobSpawner) {
++                                TileEntityMobSpawner tileentitymobspawner = (TileEntityMobSpawner) tileentity;
++
++                                tileentitymobspawner.setEntityId(EntityTypes.CAVE_SPIDER, randomsource);
+                             }
++                            */
++                            this.placeCraftSpawner(world, blockposition_mutableblockposition, org.bukkit.entity.EntityType.CAVE_SPIDER, 2);
++                            // CraftBukkit end
+                         }
+                     }
+                 }
+@@ -819,11 +823,11 @@
+ 
+         public MineShaftRoom(CompoundTag nbt) {
+             super(StructurePieceType.MINE_SHAFT_ROOM, nbt);
+-            DataResult dataresult = BoundingBox.CODEC.listOf().parse(NbtOps.INSTANCE, nbt.getList("Entrances", 11));
++            DataResult<List<BoundingBox>> dataresult = BoundingBox.CODEC.listOf().parse(NbtOps.INSTANCE, nbt.getList("Entrances", 11)); // CraftBukkit - decompile error
+             Logger logger = MineshaftPieces.LOGGER;
+ 
+             Objects.requireNonNull(logger);
+-            Optional optional = dataresult.resultOrPartial(logger::error);
++            Optional<List<BoundingBox>> optional = dataresult.resultOrPartial(logger::error); // CraftBukkit - decompile error
+             List list = this.childEntranceBoxes;
+ 
+             Objects.requireNonNull(this.childEntranceBoxes);
+@@ -929,7 +933,7 @@
+         @Override
+         protected void addAdditionalSaveData(StructurePieceSerializationContext context, CompoundTag nbt) {
+             super.addAdditionalSaveData(context, nbt);
+-            DataResult dataresult = BoundingBox.CODEC.listOf().encodeStart(NbtOps.INSTANCE, this.childEntranceBoxes);
++            DataResult<Tag> dataresult = BoundingBox.CODEC.listOf().encodeStart(NbtOps.INSTANCE, this.childEntranceBoxes); // CraftBukkit - decompile error
+             Logger logger = MineshaftPieces.LOGGER;
+ 
+             Objects.requireNonNull(logger);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/MineshaftPieces.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/MineshaftPieces.patch
deleted file mode 100644
index 086c189cf8..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/MineshaftPieces.patch
+++ /dev/null
@@ -1,55 +0,0 @@
---- a/net/minecraft/world/level/levelgen/structure/structures/MineshaftPieces.java
-+++ b/net/minecraft/world/level/levelgen/structure/structures/MineshaftPieces.java
-@@ -44,6 +44,10 @@
- import net.minecraft.world.level.storage.loot.LootTables;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import net.minecraft.nbt.NBTBase;
-+// CraftBukkit end
-+
- public class MineshaftPieces {
- 
-     static final Logger LOGGER = LogUtils.getLogger();
-@@ -520,6 +524,8 @@
- 
-                         if (structureboundingbox.isInside(blockposition_mutableblockposition) && this.isInterior(generatoraccessseed, 1, 0, l, structureboundingbox)) {
-                             this.hasPlacedSpider = true;
-+                            // CraftBukkit start
-+                            /*
-                             generatoraccessseed.setBlock(blockposition_mutableblockposition, Blocks.SPAWNER.defaultBlockState(), 2);
-                             TileEntity tileentity = generatoraccessseed.getBlockEntity(blockposition_mutableblockposition);
- 
-@@ -528,6 +534,9 @@
- 
-                                 tileentitymobspawner.setEntityId(EntityTypes.CAVE_SPIDER, randomsource);
-                             }
-+                            */
-+                            placeCraftSpawner(generatoraccessseed, blockposition_mutableblockposition, org.bukkit.entity.EntityType.CAVE_SPIDER, 2);
-+                            // CraftBukkit end
-                         }
-                     }
-                 }
-@@ -819,11 +828,11 @@
- 
-         public d(NBTTagCompound nbttagcompound) {
-             super(WorldGenFeatureStructurePieceType.MINE_SHAFT_ROOM, nbttagcompound);
--            DataResult dataresult = StructureBoundingBox.CODEC.listOf().parse(DynamicOpsNBT.INSTANCE, nbttagcompound.getList("Entrances", 11));
-+            DataResult<List<StructureBoundingBox>> dataresult = StructureBoundingBox.CODEC.listOf().parse(DynamicOpsNBT.INSTANCE, nbttagcompound.getList("Entrances", 11)); // CraftBukkit - decompile error
-             Logger logger = MineshaftPieces.LOGGER;
- 
-             Objects.requireNonNull(logger);
--            Optional optional = dataresult.resultOrPartial(logger::error);
-+            Optional<List<StructureBoundingBox>> optional = dataresult.resultOrPartial(logger::error); // CraftBukkit - decompile error
-             List list = this.childEntranceBoxes;
- 
-             Objects.requireNonNull(this.childEntranceBoxes);
-@@ -929,7 +938,7 @@
-         @Override
-         protected void addAdditionalSaveData(StructurePieceSerializationContext structurepieceserializationcontext, NBTTagCompound nbttagcompound) {
-             super.addAdditionalSaveData(structurepieceserializationcontext, nbttagcompound);
--            DataResult dataresult = StructureBoundingBox.CODEC.listOf().encodeStart(DynamicOpsNBT.INSTANCE, this.childEntranceBoxes);
-+            DataResult<NBTBase> dataresult = StructureBoundingBox.CODEC.listOf().encodeStart(DynamicOpsNBT.INSTANCE, this.childEntranceBoxes); // CraftBukkit - decompile error
-             Logger logger = MineshaftPieces.LOGGER;
- 
-             Objects.requireNonNull(logger);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/NetherFortressPieces.java.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/NetherFortressPieces.java.patch
new file mode 100644
index 0000000000..23051dcaf5
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/NetherFortressPieces.java.patch
@@ -0,0 +1,45 @@
+--- a/net/minecraft/world/level/levelgen/structure/structures/NetherFortressPieces.java
++++ b/net/minecraft/world/level/levelgen/structure/structures/NetherFortressPieces.java
+@@ -8,15 +8,12 @@
+ import net.minecraft.core.Direction;
+ import net.minecraft.nbt.CompoundTag;
+ import net.minecraft.util.RandomSource;
+-import net.minecraft.world.entity.EntityType;
+ import net.minecraft.world.level.ChunkPos;
+ import net.minecraft.world.level.StructureManager;
+ import net.minecraft.world.level.WorldGenLevel;
+ import net.minecraft.world.level.block.Blocks;
+ import net.minecraft.world.level.block.FenceBlock;
+ import net.minecraft.world.level.block.StairBlock;
+-import net.minecraft.world.level.block.entity.BlockEntity;
+-import net.minecraft.world.level.block.entity.SpawnerBlockEntity;
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.level.chunk.ChunkGenerator;
+ import net.minecraft.world.level.levelgen.structure.BoundingBox;
+@@ -428,14 +425,19 @@
+ 
+                 if (chunkBox.isInside(blockposition_mutableblockposition)) {
+                     this.hasPlacedSpawner = true;
+-                    world.setBlock(blockposition_mutableblockposition, Blocks.SPAWNER.defaultBlockState(), 2);
+-                    BlockEntity tileentity = world.getBlockEntity(blockposition_mutableblockposition);
+-
+-                    if (tileentity instanceof SpawnerBlockEntity) {
+-                        SpawnerBlockEntity tileentitymobspawner = (SpawnerBlockEntity) tileentity;
+-
+-                        tileentitymobspawner.setEntityId(EntityType.BLAZE, random);
++                    // CraftBukkit start
++                    /*
++                    generatoraccessseed.setBlock(blockposition_mutableblockposition, Blocks.SPAWNER.defaultBlockState(), 2);
++                    TileEntity tileentity = generatoraccessseed.getBlockEntity(blockposition_mutableblockposition);
++
++                    if (tileentity instanceof TileEntityMobSpawner) {
++                        TileEntityMobSpawner tileentitymobspawner = (TileEntityMobSpawner) tileentity;
++
++                        tileentitymobspawner.setEntityId(EntityTypes.BLAZE, randomsource);
+                     }
++                    */
++                    this.placeCraftSpawner(world, blockposition_mutableblockposition, org.bukkit.entity.EntityType.BLAZE, 2);
++                    // CraftBukkit end
+                 }
+             }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/NetherFortressPieces.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/NetherFortressPieces.patch
deleted file mode 100644
index ab12d63ae0..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/NetherFortressPieces.patch
+++ /dev/null
@@ -1,21 +0,0 @@
---- a/net/minecraft/world/level/levelgen/structure/structures/NetherFortressPieces.java
-+++ b/net/minecraft/world/level/levelgen/structure/structures/NetherFortressPieces.java
-@@ -428,6 +428,8 @@
- 
-                 if (structureboundingbox.isInside(blockposition_mutableblockposition)) {
-                     this.hasPlacedSpawner = true;
-+                    // CraftBukkit start
-+                    /*
-                     generatoraccessseed.setBlock(blockposition_mutableblockposition, Blocks.SPAWNER.defaultBlockState(), 2);
-                     TileEntity tileentity = generatoraccessseed.getBlockEntity(blockposition_mutableblockposition);
- 
-@@ -436,6 +438,9 @@
- 
-                         tileentitymobspawner.setEntityId(EntityTypes.BLAZE, randomsource);
-                     }
-+                    */
-+                    placeCraftSpawner(generatoraccessseed, blockposition_mutableblockposition, org.bukkit.entity.EntityType.BLAZE, 2);
-+                    // CraftBukkit end
-                 }
-             }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/OceanRuinPieces.java.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/OceanRuinPieces.java.patch
new file mode 100644
index 0000000000..7e1e399a8b
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/OceanRuinPieces.java.patch
@@ -0,0 +1,37 @@
+--- a/net/minecraft/world/level/levelgen/structure/structures/OceanRuinPieces.java
++++ b/net/minecraft/world/level/levelgen/structure/structures/OceanRuinPieces.java
+@@ -27,8 +27,6 @@
+ import net.minecraft.world.level.block.ChestBlock;
+ import net.minecraft.world.level.block.Mirror;
+ import net.minecraft.world.level.block.Rotation;
+-import net.minecraft.world.level.block.entity.BlockEntity;
+-import net.minecraft.world.level.block.entity.ChestBlockEntity;
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.level.chunk.ChunkGenerator;
+ import net.minecraft.world.level.levelgen.Heightmap;
+@@ -200,12 +198,20 @@
+         @Override
+         protected void handleDataMarker(String metadata, BlockPos pos, ServerLevelAccessor world, RandomSource random, BoundingBox boundingBox) {
+             if ("chest".equals(metadata)) {
+-                world.setBlock(pos, (BlockState) Blocks.CHEST.defaultBlockState().setValue(ChestBlock.WATERLOGGED, world.getFluidState(pos).is(FluidTags.WATER)), 2);
+-                BlockEntity tileentity = world.getBlockEntity(pos);
+-
+-                if (tileentity instanceof ChestBlockEntity) {
+-                    ((ChestBlockEntity) tileentity).setLootTable(this.isLarge ? BuiltInLootTables.UNDERWATER_RUIN_BIG : BuiltInLootTables.UNDERWATER_RUIN_SMALL, random.nextLong());
++                // CraftBukkit start - transform block to ensure loot table is accessible
++                /*
++                worldaccess.setBlock(blockposition, (IBlockData) Blocks.CHEST.defaultBlockState().setValue(BlockChest.WATERLOGGED, worldaccess.getFluidState(blockposition).is(TagsFluid.WATER)), 2);
++                TileEntity tileentity = worldaccess.getBlockEntity(blockposition);
++
++                if (tileentity instanceof TileEntityChest) {
++                    ((TileEntityChest) tileentity).setLootTable(this.isLarge ? LootTables.UNDERWATER_RUIN_BIG : LootTables.UNDERWATER_RUIN_SMALL, randomsource.nextLong());
+                 }
++                */
++                org.bukkit.craftbukkit.block.CraftChest craftChest = (org.bukkit.craftbukkit.block.CraftChest) org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(world, pos, Blocks.CHEST.defaultBlockState().setValue(ChestBlock.WATERLOGGED, world.getFluidState(pos).is(FluidTags.WATER)), null);
++                craftChest.setSeed(random.nextLong());
++                craftChest.setLootTable(org.bukkit.craftbukkit.CraftLootTable.minecraftToBukkit(this.isLarge ? BuiltInLootTables.UNDERWATER_RUIN_BIG : BuiltInLootTables.UNDERWATER_RUIN_SMALL));
++                this.placeCraftBlockEntity(world, pos, craftChest, 2);
++                // CraftBukkit end
+             } else if ("drowned".equals(metadata)) {
+                 Drowned entitydrowned = (Drowned) EntityType.DROWNED.create(world.getLevel(), EntitySpawnReason.STRUCTURE);
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/OceanRuinPieces.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/OceanRuinPieces.patch
deleted file mode 100644
index bfb61781f9..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/OceanRuinPieces.patch
+++ /dev/null
@@ -1,23 +0,0 @@
---- a/net/minecraft/world/level/levelgen/structure/structures/OceanRuinPieces.java
-+++ b/net/minecraft/world/level/levelgen/structure/structures/OceanRuinPieces.java
-@@ -200,12 +200,20 @@
-         @Override
-         protected void handleDataMarker(String s, BlockPosition blockposition, WorldAccess worldaccess, RandomSource randomsource, StructureBoundingBox structureboundingbox) {
-             if ("chest".equals(s)) {
-+                // CraftBukkit start - transform block to ensure loot table is accessible
-+                /*
-                 worldaccess.setBlock(blockposition, (IBlockData) Blocks.CHEST.defaultBlockState().setValue(BlockChest.WATERLOGGED, worldaccess.getFluidState(blockposition).is(TagsFluid.WATER)), 2);
-                 TileEntity tileentity = worldaccess.getBlockEntity(blockposition);
- 
-                 if (tileentity instanceof TileEntityChest) {
-                     ((TileEntityChest) tileentity).setLootTable(this.isLarge ? LootTables.UNDERWATER_RUIN_BIG : LootTables.UNDERWATER_RUIN_SMALL, randomsource.nextLong());
-                 }
-+                */
-+                org.bukkit.craftbukkit.block.CraftChest craftChest = (org.bukkit.craftbukkit.block.CraftChest) org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(worldaccess, blockposition, Blocks.CHEST.defaultBlockState().setValue(BlockChest.WATERLOGGED, worldaccess.getFluidState(blockposition).is(TagsFluid.WATER)), null);
-+                craftChest.setSeed(randomsource.nextLong());
-+                craftChest.setLootTable(org.bukkit.craftbukkit.CraftLootTable.minecraftToBukkit(this.isLarge ? LootTables.UNDERWATER_RUIN_BIG : LootTables.UNDERWATER_RUIN_SMALL));
-+                placeCraftBlockEntity(worldaccess, blockposition, craftChest, 2);
-+                // CraftBukkit end
-             } else if ("drowned".equals(s)) {
-                 EntityDrowned entitydrowned = (EntityDrowned) EntityTypes.DROWNED.create(worldaccess.getLevel(), EntitySpawnReason.STRUCTURE);
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/ShipwreckPieces.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/ShipwreckPieces.java.patch
similarity index 63%
rename from paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/ShipwreckPieces.patch
rename to paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/ShipwreckPieces.java.patch
index 259fce4db0..d667e572c3 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/ShipwreckPieces.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/ShipwreckPieces.java.patch
@@ -1,14 +1,15 @@
 --- a/net/minecraft/world/level/levelgen/structure/structures/ShipwreckPieces.java
 +++ b/net/minecraft/world/level/levelgen/structure/structures/ShipwreckPieces.java
 @@ -79,7 +79,12 @@
-             ResourceKey<LootTable> resourcekey = (ResourceKey) ShipwreckPieces.MARKERS_TO_LOOT.get(s);
+             ResourceKey<LootTable> resourcekey = (ResourceKey) ShipwreckPieces.MARKERS_TO_LOOT.get(metadata);
  
              if (resourcekey != null) {
+-                RandomizableContainer.setBlockEntityLootTable(world, random, pos.below(), resourcekey);
 +                // CraftBukkit start - ensure block transformation
 +                /*
-                 RandomizableContainer.setBlockEntityLootTable(worldaccess, randomsource, blockposition.below(), resourcekey);
++                RandomizableContainer.setBlockEntityLootTable(worldaccess, randomsource, blockposition.below(), resourcekey);
 +                */
-+                setCraftLootTable(worldaccess, blockposition.below(), randomsource, resourcekey);
++                this.setCraftLootTable(world, pos.below(), random, resourcekey);
 +                // CraftBukkit end
              }
  
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/StrongholdPieces.java.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/StrongholdPieces.java.patch
new file mode 100644
index 0000000000..90efca8745
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/StrongholdPieces.java.patch
@@ -0,0 +1,55 @@
+--- a/net/minecraft/world/level/levelgen/structure/structures/StrongholdPieces.java
++++ b/net/minecraft/world/level/levelgen/structure/structures/StrongholdPieces.java
+@@ -8,7 +8,6 @@
+ import net.minecraft.core.Direction;
+ import net.minecraft.nbt.CompoundTag;
+ import net.minecraft.util.RandomSource;
+-import net.minecraft.world.entity.EntityType;
+ import net.minecraft.world.level.ChunkPos;
+ import net.minecraft.world.level.StructureManager;
+ import net.minecraft.world.level.WorldGenLevel;
+@@ -22,8 +21,6 @@
+ import net.minecraft.world.level.block.SlabBlock;
+ import net.minecraft.world.level.block.StairBlock;
+ import net.minecraft.world.level.block.WallTorchBlock;
+-import net.minecraft.world.level.block.entity.BlockEntity;
+-import net.minecraft.world.level.block.entity.SpawnerBlockEntity;
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.level.block.state.properties.DoubleBlockHalf;
+ import net.minecraft.world.level.block.state.properties.SlabType;
+@@ -53,7 +50,7 @@
+                 public boolean doPlace(int chainLength) {
+                     return super.doPlace(chainLength) && chainLength > 5;
+                 }
+-            }};
++            } }; // CraftBukkit - fix decompile styling
+     private static List<StrongholdPieces.PieceWeight> currentPieces;
+     static Class<? extends StrongholdPieces.StrongholdPiece> imposedPiece;
+     private static int totalWeight;
+@@ -1136,14 +1133,19 @@
+ 
+                 if (chunkBox.isInside(blockposition_mutableblockposition)) {
+                     this.hasPlacedSpawner = true;
+-                    world.setBlock(blockposition_mutableblockposition, Blocks.SPAWNER.defaultBlockState(), 2);
+-                    BlockEntity tileentity = world.getBlockEntity(blockposition_mutableblockposition);
+-
+-                    if (tileentity instanceof SpawnerBlockEntity) {
+-                        SpawnerBlockEntity tileentitymobspawner = (SpawnerBlockEntity) tileentity;
+-
+-                        tileentitymobspawner.setEntityId(EntityType.SILVERFISH, random);
++                    // CraftBukkit start
++                    /*
++                    generatoraccessseed.setBlock(blockposition_mutableblockposition, Blocks.SPAWNER.defaultBlockState(), 2);
++                    TileEntity tileentity = generatoraccessseed.getBlockEntity(blockposition_mutableblockposition);
++
++                    if (tileentity instanceof TileEntityMobSpawner) {
++                        TileEntityMobSpawner tileentitymobspawner = (TileEntityMobSpawner) tileentity;
++
++                        tileentitymobspawner.setEntityId(EntityTypes.SILVERFISH, randomsource);
+                     }
++                    */
++                    this.placeCraftSpawner(world, blockposition_mutableblockposition, org.bukkit.entity.EntityType.SILVERFISH, 2);
++                    // CraftBukkit end
+                 }
+             }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/StrongholdPieces.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/StrongholdPieces.patch
deleted file mode 100644
index b1409167ea..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/StrongholdPieces.patch
+++ /dev/null
@@ -1,30 +0,0 @@
---- a/net/minecraft/world/level/levelgen/structure/structures/StrongholdPieces.java
-+++ b/net/minecraft/world/level/levelgen/structure/structures/StrongholdPieces.java
-@@ -53,7 +53,7 @@
-                 public boolean doPlace(int i) {
-                     return super.doPlace(i) && i > 5;
-                 }
--            }};
-+            } }; // CraftBukkit - fix decompile styling
-     private static List<StrongholdPieces.f> currentPieces;
-     static Class<? extends StrongholdPieces.p> imposedPiece;
-     private static int totalWeight;
-@@ -1136,6 +1136,8 @@
- 
-                 if (structureboundingbox.isInside(blockposition_mutableblockposition)) {
-                     this.hasPlacedSpawner = true;
-+                    // CraftBukkit start
-+                    /*
-                     generatoraccessseed.setBlock(blockposition_mutableblockposition, Blocks.SPAWNER.defaultBlockState(), 2);
-                     TileEntity tileentity = generatoraccessseed.getBlockEntity(blockposition_mutableblockposition);
- 
-@@ -1144,6 +1146,9 @@
- 
-                         tileentitymobspawner.setEntityId(EntityTypes.SILVERFISH, randomsource);
-                     }
-+                    */
-+                    placeCraftSpawner(generatoraccessseed, blockposition_mutableblockposition, org.bukkit.entity.EntityType.SILVERFISH, 2);
-+                    // CraftBukkit end
-                 }
-             }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/SwampHutPiece.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/SwampHutPiece.java.patch
similarity index 51%
rename from paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/SwampHutPiece.patch
rename to paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/SwampHutPiece.java.patch
index d46ee75786..ad3c0e1641 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/SwampHutPiece.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/structures/SwampHutPiece.java.patch
@@ -3,18 +3,18 @@
 @@ -100,7 +100,7 @@
                          entitywitch.setPersistenceRequired();
                          entitywitch.moveTo((double) blockposition_mutableblockposition.getX() + 0.5D, (double) blockposition_mutableblockposition.getY(), (double) blockposition_mutableblockposition.getZ() + 0.5D, 0.0F, 0.0F);
-                         entitywitch.finalizeSpawn(generatoraccessseed, generatoraccessseed.getCurrentDifficultyAt(blockposition_mutableblockposition), EntitySpawnReason.STRUCTURE, (GroupDataEntity) null);
--                        generatoraccessseed.addFreshEntityWithPassengers(entitywitch);
-+                        generatoraccessseed.addFreshEntityWithPassengers(entitywitch, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN); // CraftBukkit - add SpawnReason
+                         entitywitch.finalizeSpawn(world, world.getCurrentDifficultyAt(blockposition_mutableblockposition), EntitySpawnReason.STRUCTURE, (SpawnGroupData) null);
+-                        world.addFreshEntityWithPassengers(entitywitch);
++                        world.addFreshEntityWithPassengers(entitywitch, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN); // CraftBukkit - add SpawnReason
                      }
                  }
              }
 @@ -121,7 +121,7 @@
                      entitycat.setPersistenceRequired();
                      entitycat.moveTo((double) blockposition_mutableblockposition.getX() + 0.5D, (double) blockposition_mutableblockposition.getY(), (double) blockposition_mutableblockposition.getZ() + 0.5D, 0.0F, 0.0F);
-                     entitycat.finalizeSpawn(worldaccess, worldaccess.getCurrentDifficultyAt(blockposition_mutableblockposition), EntitySpawnReason.STRUCTURE, (GroupDataEntity) null);
--                    worldaccess.addFreshEntityWithPassengers(entitycat);
-+                    worldaccess.addFreshEntityWithPassengers(entitycat, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN); // CraftBukkit - add SpawnReason
+                     entitycat.finalizeSpawn(world, world.getCurrentDifficultyAt(blockposition_mutableblockposition), EntitySpawnReason.STRUCTURE, (SpawnGroupData) null);
+-                    world.addFreshEntityWithPassengers(entitycat);
++                    world.addFreshEntityWithPassengers(entitycat, org.bukkit.event.entity.CreatureSpawnEvent.SpawnReason.CHUNK_GEN); // CraftBukkit - add SpawnReason
                  }
              }
          }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructure.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructure.patch
deleted file mode 100644
index f8027cf9fd..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructure.patch
+++ /dev/null
@@ -1,147 +0,0 @@
---- a/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructure.java
-+++ b/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructure.java
-@@ -56,6 +56,12 @@
- import net.minecraft.world.phys.shapes.VoxelShapeBitSet;
- import net.minecraft.world.phys.shapes.VoxelShapeDiscrete;
- 
-+// CraftBukkit start
-+import net.minecraft.nbt.NBTBase;
-+import org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer;
-+import org.bukkit.craftbukkit.persistence.CraftPersistentDataTypeRegistry;
-+// CraftBukkit end
-+
- public class DefinedStructure {
- 
-     public static final String PALETTE_TAG = "palette";
-@@ -74,6 +80,11 @@
-     private BaseBlockPosition size;
-     private String author;
- 
-+    // CraftBukkit start - data containers
-+    private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
-+    public CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY);
-+    // CraftBukkit end
-+
-     public DefinedStructure() {
-         this.size = BaseBlockPosition.ZERO;
-         this.author = "?";
-@@ -147,7 +158,7 @@
-     }
- 
-     private static List<DefinedStructure.BlockInfo> buildInfoList(List<DefinedStructure.BlockInfo> list, List<DefinedStructure.BlockInfo> list1, List<DefinedStructure.BlockInfo> list2) {
--        Comparator<DefinedStructure.BlockInfo> comparator = Comparator.comparingInt((definedstructure_blockinfo) -> {
-+        Comparator<DefinedStructure.BlockInfo> comparator = Comparator.<DefinedStructure.BlockInfo>comparingInt((definedstructure_blockinfo) -> { // CraftBukkit - decompile error
-             return definedstructure_blockinfo.pos.getY();
-         }).thenComparingInt((definedstructure_blockinfo) -> {
-             return definedstructure_blockinfo.pos.getX();
-@@ -253,6 +264,19 @@
-         if (this.palettes.isEmpty()) {
-             return false;
-         } else {
-+            // CraftBukkit start
-+            // We only want the TransformerGeneratorAccess at certain locations because in here are many "block update" calls that shouldn't be transformed
-+            WorldAccess wrappedAccess = worldaccess;
-+            org.bukkit.craftbukkit.util.CraftStructureTransformer structureTransformer = null;
-+            if (wrappedAccess instanceof org.bukkit.craftbukkit.util.TransformerGeneratorAccess transformerAccess) {
-+                worldaccess = transformerAccess.getHandle();
-+                structureTransformer = transformerAccess.getStructureTransformer();
-+                // The structureTransformer is not needed if we can not transform blocks therefore we can save a little bit of performance doing this
-+                if (structureTransformer != null && !structureTransformer.canTransformBlocks()) {
-+                    structureTransformer = null;
-+                }
-+            }
-+            // CraftBukkit end
-             List<DefinedStructure.BlockInfo> list = definedstructureinfo.getRandomPalette(this.palettes, blockposition).blocks();
- 
-             if ((!list.isEmpty() || !definedstructureinfo.isIgnoreEntities() && !this.entityInfoList.isEmpty()) && this.size.getX() >= 1 && this.size.getY() >= 1 && this.size.getZ() >= 1) {
-@@ -284,6 +308,20 @@
-                             Clearable.tryClear(tileentity);
-                             worldaccess.setBlock(blockposition2, Blocks.BARRIER.defaultBlockState(), 20);
-                         }
-+                        // CraftBukkit start
-+                        if (structureTransformer != null) {
-+                            org.bukkit.craftbukkit.block.CraftBlockState craftBlockState = (org.bukkit.craftbukkit.block.CraftBlockState) org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(worldaccess, blockposition2, iblockdata, null);
-+                            if (definedstructure_blockinfo.nbt != null && craftBlockState instanceof org.bukkit.craftbukkit.block.CraftBlockEntityState<?> entityState) {
-+                                entityState.loadData(definedstructure_blockinfo.nbt);
-+                                if (craftBlockState instanceof org.bukkit.craftbukkit.block.CraftLootable<?> craftLootable) {
-+                                    craftLootable.setSeed(randomsource.nextLong());
-+                                }
-+                            }
-+                            craftBlockState = structureTransformer.transformCraftState(craftBlockState);
-+                            iblockdata = craftBlockState.getHandle();
-+                            definedstructure_blockinfo = new DefinedStructure.BlockInfo(blockposition2, iblockdata, (craftBlockState instanceof org.bukkit.craftbukkit.block.CraftBlockEntityState<?> craftBlockEntityState ? craftBlockEntityState.getSnapshotNBT() : null));
-+                        }
-+                        // CraftBukkit end
- 
-                         if (worldaccess.setBlock(blockposition2, iblockdata, i)) {
-                             j = Math.min(j, blockposition2.getX());
-@@ -296,7 +334,7 @@
-                             if (definedstructure_blockinfo.nbt != null) {
-                                 tileentity = worldaccess.getBlockEntity(blockposition2);
-                                 if (tileentity != null) {
--                                    if (tileentity instanceof RandomizableContainer) {
-+                                    if (structureTransformer == null && tileentity instanceof RandomizableContainer) { // CraftBukkit - only process if don't have a transformer access (Was already set above) - SPIGOT-7520: Use structureTransformer as check, so that it is the same as above
-                                         definedstructure_blockinfo.nbt.putLong("LootTableSeed", randomsource.nextLong());
-                                     }
- 
-@@ -401,7 +439,7 @@
-                 }
- 
-                 if (!definedstructureinfo.isIgnoreEntities()) {
--                    this.placeEntities(worldaccess, blockposition, definedstructureinfo.getMirror(), definedstructureinfo.getRotation(), definedstructureinfo.getRotationPivot(), structureboundingbox, definedstructureinfo.shouldFinalizeEntities());
-+                    this.placeEntities(wrappedAccess, blockposition, definedstructureinfo.getMirror(), definedstructureinfo.getRotation(), definedstructureinfo.getRotationPivot(), structureboundingbox, definedstructureinfo.shouldFinalizeEntities()); // CraftBukkit
-                 }
- 
-                 return true;
-@@ -503,11 +541,13 @@
-     }
- 
-     private static Optional<Entity> createEntityIgnoreException(WorldAccess worldaccess, NBTTagCompound nbttagcompound) {
--        try {
-+        // CraftBukkit start
-+        // try {
-             return EntityTypes.create(nbttagcompound, worldaccess.getLevel(), EntitySpawnReason.STRUCTURE);
--        } catch (Exception exception) {
--            return Optional.empty();
--        }
-+        // } catch (Exception exception) {
-+            // return Optional.empty();
-+        // }
-+        // CraftBukkit end
-     }
- 
-     public BaseBlockPosition getSize(EnumBlockRotation enumblockrotation) {
-@@ -721,6 +761,11 @@
- 
-         nbttagcompound.put("entities", nbttaglist3);
-         nbttagcompound.put("size", this.newIntegerList(this.size.getX(), this.size.getY(), this.size.getZ()));
-+        // CraftBukkit start - PDC
-+        if (!this.persistentDataContainer.isEmpty()) {
-+            nbttagcompound.put("BukkitValues", this.persistentDataContainer.toTagCompound());
-+        }
-+        // CraftBukkit end
-         return GameProfileSerializer.addCurrentDataVersion(nbttagcompound);
-     }
- 
-@@ -760,6 +805,12 @@
-             }
-         }
- 
-+        // CraftBukkit start - PDC
-+        NBTBase base = nbttagcompound.get("BukkitValues");
-+        if (base instanceof NBTTagCompound) {
-+            this.persistentDataContainer.putAll((NBTTagCompound) base);
-+        }
-+        // CraftBukkit end
-     }
- 
-     private void loadPalette(HolderGetter<Block> holdergetter, NBTTagList nbttaglist, NBTTagList nbttaglist1) {
-@@ -924,7 +975,7 @@
-         public IBlockData stateFor(int i) {
-             IBlockData iblockdata = (IBlockData) this.ids.byId(i);
- 
--            return iblockdata == null ? DefinedStructure.c.DEFAULT_BLOCK_STATE : iblockdata;
-+            return iblockdata == null ? DEFAULT_BLOCK_STATE : iblockdata; // CraftBukkit - decompile error
-         }
- 
-         public Iterator<IBlockData> iterator() {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructureInfo.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/templatesystem/StructurePlaceSettings.java.patch
similarity index 77%
rename from paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructureInfo.patch
rename to paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/templatesystem/StructurePlaceSettings.java.patch
index 4eee99d57f..60b3e8e667 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructureInfo.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/templatesystem/StructurePlaceSettings.java.patch
@@ -1,12 +1,12 @@
---- a/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructureInfo.java
-+++ b/net/minecraft/world/level/levelgen/structure/templatesystem/DefinedStructureInfo.java
+--- a/net/minecraft/world/level/levelgen/structure/templatesystem/StructurePlaceSettings.java
++++ b/net/minecraft/world/level/levelgen/structure/templatesystem/StructurePlaceSettings.java
 @@ -22,7 +22,7 @@
      private LiquidSettings liquidSettings;
      @Nullable
      private RandomSource random;
 -    private int palette;
 +    public int palette = -1; // CraftBukkit - Set initial value so we know if the palette has been set forcefully
-     private final List<DefinedStructureProcessor> processors;
+     private final List<StructureProcessor> processors;
      private boolean knownShape;
      private boolean finalizeEntities;
 @@ -149,6 +149,13 @@
@@ -18,8 +18,8 @@
 +            if (this.palette >= i) {
 +                throw new IllegalArgumentException("Palette index out of bounds. Got " + this.palette + " where there are only " + i + " palettes available.");
 +            }
-+            return list.get(this.palette);
++            return infoLists.get(this.palette);
 +        // CraftBukkit end
          } else {
-             return (DefinedStructure.b) list.get(this.getRandom(blockposition).nextInt(i));
+             return (StructureTemplate.Palette) infoLists.get(this.getRandom(pos).nextInt(i));
          }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java.patch b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java.patch
new file mode 100644
index 0000000000..d03bc0207c
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java.patch
@@ -0,0 +1,152 @@
+--- a/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
++++ b/net/minecraft/world/level/levelgen/structure/templatesystem/StructureTemplate.java
+@@ -25,6 +25,7 @@
+ import net.minecraft.nbt.IntTag;
+ import net.minecraft.nbt.ListTag;
+ import net.minecraft.nbt.NbtUtils;
++import net.minecraft.nbt.Tag;
+ import net.minecraft.resources.ResourceLocation;
+ import net.minecraft.util.RandomSource;
+ import net.minecraft.world.Clearable;
+@@ -55,6 +56,9 @@
+ import net.minecraft.world.phys.Vec3;
+ import net.minecraft.world.phys.shapes.BitSetDiscreteVoxelShape;
+ import net.minecraft.world.phys.shapes.DiscreteVoxelShape;
++import org.bukkit.craftbukkit.persistence.CraftPersistentDataContainer;
++import org.bukkit.craftbukkit.persistence.CraftPersistentDataTypeRegistry;
++// CraftBukkit end
+ 
+ public class StructureTemplate {
+ 
+@@ -73,6 +77,11 @@
+     public final List<StructureTemplate.StructureEntityInfo> entityInfoList = Lists.newArrayList();
+     private Vec3i size;
+     private String author;
++
++    // CraftBukkit start - data containers
++    private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
++    public CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(StructureTemplate.DATA_TYPE_REGISTRY);
++    // CraftBukkit end
+ 
+     public StructureTemplate() {
+         this.size = Vec3i.ZERO;
+@@ -147,7 +156,7 @@
+     }
+ 
+     private static List<StructureTemplate.StructureBlockInfo> buildInfoList(List<StructureTemplate.StructureBlockInfo> fullBlocks, List<StructureTemplate.StructureBlockInfo> blocksWithNbt, List<StructureTemplate.StructureBlockInfo> otherBlocks) {
+-        Comparator<StructureTemplate.StructureBlockInfo> comparator = Comparator.comparingInt((definedstructure_blockinfo) -> {
++        Comparator<StructureTemplate.StructureBlockInfo> comparator = Comparator.<StructureTemplate.StructureBlockInfo>comparingInt((definedstructure_blockinfo) -> { // CraftBukkit - decompile error
+             return definedstructure_blockinfo.pos.getY();
+         }).thenComparingInt((definedstructure_blockinfo) -> {
+             return definedstructure_blockinfo.pos.getX();
+@@ -253,6 +262,19 @@
+         if (this.palettes.isEmpty()) {
+             return false;
+         } else {
++            // CraftBukkit start
++            // We only want the TransformerGeneratorAccess at certain locations because in here are many "block update" calls that shouldn't be transformed
++            ServerLevelAccessor wrappedAccess = world;
++            org.bukkit.craftbukkit.util.CraftStructureTransformer structureTransformer = null;
++            if (wrappedAccess instanceof org.bukkit.craftbukkit.util.TransformerGeneratorAccess transformerAccess) {
++                world = transformerAccess.getHandle();
++                structureTransformer = transformerAccess.getStructureTransformer();
++                // The structureTransformer is not needed if we can not transform blocks therefore we can save a little bit of performance doing this
++                if (structureTransformer != null && !structureTransformer.canTransformBlocks()) {
++                    structureTransformer = null;
++                }
++            }
++            // CraftBukkit end
+             List<StructureTemplate.StructureBlockInfo> list = placementData.getRandomPalette(this.palettes, pos).blocks();
+ 
+             if ((!list.isEmpty() || !placementData.isIgnoreEntities() && !this.entityInfoList.isEmpty()) && this.size.getX() >= 1 && this.size.getY() >= 1 && this.size.getZ() >= 1) {
+@@ -284,6 +306,20 @@
+                             Clearable.tryClear(tileentity);
+                             world.setBlock(blockposition2, Blocks.BARRIER.defaultBlockState(), 20);
+                         }
++                        // CraftBukkit start
++                        if (structureTransformer != null) {
++                            org.bukkit.craftbukkit.block.CraftBlockState craftBlockState = (org.bukkit.craftbukkit.block.CraftBlockState) org.bukkit.craftbukkit.block.CraftBlockStates.getBlockState(world, blockposition2, iblockdata, null);
++                            if (definedstructure_blockinfo.nbt != null && craftBlockState instanceof org.bukkit.craftbukkit.block.CraftBlockEntityState<?> entityState) {
++                                entityState.loadData(definedstructure_blockinfo.nbt);
++                                if (craftBlockState instanceof org.bukkit.craftbukkit.block.CraftLootable<?> craftLootable) {
++                                    craftLootable.setSeed(random.nextLong());
++                                }
++                            }
++                            craftBlockState = structureTransformer.transformCraftState(craftBlockState);
++                            iblockdata = craftBlockState.getHandle();
++                            definedstructure_blockinfo = new StructureTemplate.StructureBlockInfo(blockposition2, iblockdata, (craftBlockState instanceof org.bukkit.craftbukkit.block.CraftBlockEntityState<?> craftBlockEntityState ? craftBlockEntityState.getSnapshotNBT() : null));
++                        }
++                        // CraftBukkit end
+ 
+                         if (world.setBlock(blockposition2, iblockdata, flags)) {
+                             j = Math.min(j, blockposition2.getX());
+@@ -296,7 +332,7 @@
+                             if (definedstructure_blockinfo.nbt != null) {
+                                 tileentity = world.getBlockEntity(blockposition2);
+                                 if (tileentity != null) {
+-                                    if (tileentity instanceof RandomizableContainer) {
++                                    if (structureTransformer == null && tileentity instanceof RandomizableContainer) { // CraftBukkit - only process if don't have a transformer access (Was already set above) - SPIGOT-7520: Use structureTransformer as check, so that it is the same as above
+                                         definedstructure_blockinfo.nbt.putLong("LootTableSeed", random.nextLong());
+                                     }
+ 
+@@ -401,7 +437,7 @@
+                 }
+ 
+                 if (!placementData.isIgnoreEntities()) {
+-                    this.placeEntities(world, pos, placementData.getMirror(), placementData.getRotation(), placementData.getRotationPivot(), structureboundingbox, placementData.shouldFinalizeEntities());
++                    this.placeEntities(wrappedAccess, pos, placementData.getMirror(), placementData.getRotation(), placementData.getRotationPivot(), structureboundingbox, placementData.shouldFinalizeEntities()); // CraftBukkit
+                 }
+ 
+                 return true;
+@@ -503,11 +539,13 @@
+     }
+ 
+     private static Optional<Entity> createEntityIgnoreException(ServerLevelAccessor world, CompoundTag nbt) {
+-        try {
++        // CraftBukkit start
++        // try {
+             return EntityType.create(nbt, world.getLevel(), EntitySpawnReason.STRUCTURE);
+-        } catch (Exception exception) {
+-            return Optional.empty();
+-        }
++        // } catch (Exception exception) {
++            // return Optional.empty();
++        // }
++        // CraftBukkit end
+     }
+ 
+     public Vec3i getSize(Rotation rotation) {
+@@ -721,6 +759,11 @@
+ 
+         nbt.put("entities", nbttaglist3);
+         nbt.put("size", this.newIntegerList(this.size.getX(), this.size.getY(), this.size.getZ()));
++        // CraftBukkit start - PDC
++        if (!this.persistentDataContainer.isEmpty()) {
++            nbt.put("BukkitValues", this.persistentDataContainer.toTagCompound());
++        }
++        // CraftBukkit end
+         return NbtUtils.addCurrentDataVersion(nbt);
+     }
+ 
+@@ -760,6 +803,12 @@
+             }
+         }
+ 
++        // CraftBukkit start - PDC
++        Tag base = nbt.get("BukkitValues");
++        if (base instanceof CompoundTag) {
++            this.persistentDataContainer.putAll((CompoundTag) base);
++        }
++        // CraftBukkit end
+     }
+ 
+     private void loadPalette(HolderGetter<Block> blockLookup, ListTag palette, ListTag blocks) {
+@@ -924,7 +973,7 @@
+         public BlockState stateFor(int id) {
+             BlockState iblockdata = (BlockState) this.ids.byId(id);
+ 
+-            return iblockdata == null ? StructureTemplate.SimplePalette.DEFAULT_BLOCK_STATE : iblockdata;
++            return iblockdata == null ? SimplePalette.DEFAULT_BLOCK_STATE : iblockdata; // CraftBukkit - decompile error
+         }
+ 
+         public Iterator<BlockState> iterator() {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/material/FlowingFluid.java.patch b/paper-server/patches/sources/net/minecraft/world/level/material/FlowingFluid.java.patch
new file mode 100644
index 0000000000..69b2babecc
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/material/FlowingFluid.java.patch
@@ -0,0 +1,75 @@
+--- a/net/minecraft/world/level/material/FlowingFluid.java
++++ b/net/minecraft/world/level/material/FlowingFluid.java
+@@ -31,6 +31,14 @@
+ import net.minecraft.world.phys.Vec3;
+ import net.minecraft.world.phys.shapes.Shapes;
+ import net.minecraft.world.phys.shapes.VoxelShape;
++// CraftBukkit start
++import org.bukkit.block.BlockFace;
++import org.bukkit.craftbukkit.block.CraftBlock;
++import org.bukkit.craftbukkit.block.data.CraftBlockData;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.event.block.BlockFromToEvent;
++import org.bukkit.event.block.FluidLevelChangeEvent;
++// CraftBukkit end
+ 
+ public abstract class FlowingFluid extends Fluid {
+ 
+@@ -135,6 +143,15 @@
+                 Fluid fluidtype = fluid2.getType();
+ 
+                 if (fluid1.canBeReplacedWith(world, blockposition1, fluidtype, Direction.DOWN) && FlowingFluid.canHoldSpecificFluid(world, blockposition1, iblockdata1, fluidtype)) {
++                    // CraftBukkit start
++                    org.bukkit.block.Block source = CraftBlock.at(world, fluidPos);
++                    BlockFromToEvent event = new BlockFromToEvent(source, BlockFace.DOWN);
++                    world.getCraftServer().getPluginManager().callEvent(event);
++
++                    if (event.isCancelled()) {
++                        return;
++                    }
++                    // CraftBukkit end
+                     this.spreadTo(world, blockposition1, iblockdata1, Direction.DOWN, fluid2);
+                     if (this.sourceNeighborCount(world, fluidPos) >= 3) {
+                         this.spreadToSides(world, fluidPos, fluidState, blockState);
+@@ -167,7 +184,16 @@
+                 Direction enumdirection = (Direction) entry.getKey();
+                 FluidState fluid1 = (FluidState) entry.getValue();
+                 BlockPos blockposition1 = pos.relative(enumdirection);
++
++                // CraftBukkit start
++                org.bukkit.block.Block source = CraftBlock.at(world, pos);
++                BlockFromToEvent event = new BlockFromToEvent(source, org.bukkit.craftbukkit.block.CraftBlock.notchToBlockFace(enumdirection));
++                world.getCraftServer().getPluginManager().callEvent(event);
+ 
++                if (event.isCancelled()) {
++                    continue;
++                }
++                // CraftBukkit end
+                 this.spreadTo(world, blockposition1, world.getBlockState(blockposition1), enumdirection, fluid1);
+             }
+ 
+@@ -444,10 +470,24 @@
+             if (fluid1.isEmpty()) {
+                 fluidState = fluid1;
+                 blockState = Blocks.AIR.defaultBlockState();
++                // CraftBukkit start
++                FluidLevelChangeEvent event = CraftEventFactory.callFluidLevelChangeEvent(world, pos, blockState);
++                if (event.isCancelled()) {
++                    return;
++                }
++                blockState = ((CraftBlockData) event.getNewData()).getState();
++                // CraftBukkit end
+                 world.setBlock(pos, blockState, 3);
+             } else if (!fluid1.equals(fluidState)) {
+                 fluidState = fluid1;
+                 blockState = fluid1.createLegacyBlock();
++                // CraftBukkit start
++                FluidLevelChangeEvent event = CraftEventFactory.callFluidLevelChangeEvent(world, pos, blockState);
++                if (event.isCancelled()) {
++                    return;
++                }
++                blockState = ((CraftBlockData) event.getNewData()).getState();
++                // CraftBukkit end
+                 world.setBlock(pos, blockState, 3);
+                 world.scheduleTick(pos, fluid1.getType(), i);
+             }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/material/FluidTypeFlowing.patch b/paper-server/patches/sources/net/minecraft/world/level/material/FluidTypeFlowing.patch
deleted file mode 100644
index 0cff368d6c..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/material/FluidTypeFlowing.patch
+++ /dev/null
@@ -1,75 +0,0 @@
---- a/net/minecraft/world/level/material/FluidTypeFlowing.java
-+++ b/net/minecraft/world/level/material/FluidTypeFlowing.java
-@@ -32,6 +32,15 @@
- import net.minecraft.world.phys.shapes.VoxelShape;
- import net.minecraft.world.phys.shapes.VoxelShapes;
- 
-+// CraftBukkit start
-+import org.bukkit.block.BlockFace;
-+import org.bukkit.craftbukkit.block.CraftBlock;
-+import org.bukkit.craftbukkit.block.data.CraftBlockData;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.event.block.BlockFromToEvent;
-+import org.bukkit.event.block.FluidLevelChangeEvent;
-+// CraftBukkit end
-+
- public abstract class FluidTypeFlowing extends FluidType {
- 
-     public static final BlockStateBoolean FALLING = BlockProperties.FALLING;
-@@ -135,6 +144,15 @@
-                 FluidType fluidtype = fluid2.getType();
- 
-                 if (fluid1.canBeReplacedWith(worldserver, blockposition1, fluidtype, EnumDirection.DOWN) && canHoldSpecificFluid(worldserver, blockposition1, iblockdata1, fluidtype)) {
-+                    // CraftBukkit start
-+                    org.bukkit.block.Block source = CraftBlock.at(worldserver, blockposition);
-+                    BlockFromToEvent event = new BlockFromToEvent(source, BlockFace.DOWN);
-+                    worldserver.getCraftServer().getPluginManager().callEvent(event);
-+
-+                    if (event.isCancelled()) {
-+                        return;
-+                    }
-+                    // CraftBukkit end
-                     this.spreadTo(worldserver, blockposition1, iblockdata1, EnumDirection.DOWN, fluid2);
-                     if (this.sourceNeighborCount(worldserver, blockposition) >= 3) {
-                         this.spreadToSides(worldserver, blockposition, fluid, iblockdata);
-@@ -168,6 +186,15 @@
-                 Fluid fluid1 = (Fluid) entry.getValue();
-                 BlockPosition blockposition1 = blockposition.relative(enumdirection);
- 
-+                // CraftBukkit start
-+                org.bukkit.block.Block source = CraftBlock.at(worldserver, blockposition);
-+                BlockFromToEvent event = new BlockFromToEvent(source, org.bukkit.craftbukkit.block.CraftBlock.notchToBlockFace(enumdirection));
-+                worldserver.getCraftServer().getPluginManager().callEvent(event);
-+
-+                if (event.isCancelled()) {
-+                    continue;
-+                }
-+                // CraftBukkit end
-                 this.spreadTo(worldserver, blockposition1, worldserver.getBlockState(blockposition1), enumdirection, fluid1);
-             }
- 
-@@ -444,10 +471,24 @@
-             if (fluid1.isEmpty()) {
-                 fluid = fluid1;
-                 iblockdata = Blocks.AIR.defaultBlockState();
-+                // CraftBukkit start
-+                FluidLevelChangeEvent event = CraftEventFactory.callFluidLevelChangeEvent(worldserver, blockposition, iblockdata);
-+                if (event.isCancelled()) {
-+                    return;
-+                }
-+                iblockdata = ((CraftBlockData) event.getNewData()).getState();
-+                // CraftBukkit end
-                 worldserver.setBlock(blockposition, iblockdata, 3);
-             } else if (!fluid1.equals(fluid)) {
-                 fluid = fluid1;
-                 iblockdata = fluid1.createLegacyBlock();
-+                // CraftBukkit start
-+                FluidLevelChangeEvent event = CraftEventFactory.callFluidLevelChangeEvent(worldserver, blockposition, iblockdata);
-+                if (event.isCancelled()) {
-+                    return;
-+                }
-+                iblockdata = ((CraftBlockData) event.getNewData()).getState();
-+                // CraftBukkit end
-                 worldserver.setBlock(blockposition, iblockdata, 3);
-                 worldserver.scheduleTick(blockposition, fluid1.getType(), i);
-             }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/material/FluidTypeLava.patch b/paper-server/patches/sources/net/minecraft/world/level/material/FluidTypeLava.patch
deleted file mode 100644
index b77cab1de6..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/material/FluidTypeLava.patch
+++ /dev/null
@@ -1,44 +0,0 @@
---- a/net/minecraft/world/level/material/FluidTypeLava.java
-+++ b/net/minecraft/world/level/material/FluidTypeLava.java
-@@ -85,6 +85,13 @@
- 
-                     if (iblockdata.isAir()) {
-                         if (this.hasFlammableNeighbours(worldserver, blockposition1)) {
-+                            // CraftBukkit start - Prevent lava putting something on fire
-+                            if (worldserver.getBlockState(blockposition1).getBlock() != Blocks.FIRE) {
-+                                if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(worldserver, blockposition1, blockposition).isCancelled()) {
-+                                    continue;
-+                                }
-+                            }
-+                            // CraftBukkit end
-                             worldserver.setBlockAndUpdate(blockposition1, BlockFireAbstract.getState(worldserver, blockposition1));
-                             return;
-                         }
-@@ -101,6 +108,14 @@
-                     }
- 
-                     if (worldserver.isEmptyBlock(blockposition2.above()) && this.isFlammable(worldserver, blockposition2)) {
-+                        // CraftBukkit start - Prevent lava putting something on fire
-+                        BlockPosition up = blockposition2.above();
-+                        if (worldserver.getBlockState(up).getBlock() != Blocks.FIRE) {
-+                            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(worldserver, up, blockposition).isCancelled()) {
-+                                continue;
-+                            }
-+                        }
-+                        // CraftBukkit end
-                         worldserver.setBlockAndUpdate(blockposition2.above(), BlockFireAbstract.getState(worldserver, blockposition2));
-                     }
-                 }
-@@ -196,7 +211,11 @@
- 
-             if (this.is(TagsFluid.LAVA) && fluid1.is(TagsFluid.WATER)) {
-                 if (iblockdata.getBlock() instanceof BlockFluids) {
--                    generatoraccess.setBlock(blockposition, Blocks.STONE.defaultBlockState(), 3);
-+                    // CraftBukkit start
-+                    if (!org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(generatoraccess.getMinecraftWorld(), blockposition, Blocks.STONE.defaultBlockState(), 3)) {
-+                        return;
-+                    }
-+                    // CraftBukkit end
-                 }
- 
-                 this.fizz(generatoraccess, blockposition);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/material/LavaFluid.java.patch b/paper-server/patches/sources/net/minecraft/world/level/material/LavaFluid.java.patch
new file mode 100644
index 0000000000..88889a233d
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/material/LavaFluid.java.patch
@@ -0,0 +1,44 @@
+--- a/net/minecraft/world/level/material/LavaFluid.java
++++ b/net/minecraft/world/level/material/LavaFluid.java
+@@ -85,6 +85,13 @@
+ 
+                     if (iblockdata.isAir()) {
+                         if (this.hasFlammableNeighbours(world, blockposition1)) {
++                            // CraftBukkit start - Prevent lava putting something on fire
++                            if (world.getBlockState(blockposition1).getBlock() != Blocks.FIRE) {
++                                if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, blockposition1, pos).isCancelled()) {
++                                    continue;
++                                }
++                            }
++                            // CraftBukkit end
+                             world.setBlockAndUpdate(blockposition1, BaseFireBlock.getState(world, blockposition1));
+                             return;
+                         }
+@@ -101,6 +108,14 @@
+                     }
+ 
+                     if (world.isEmptyBlock(blockposition2.above()) && this.isFlammable(world, blockposition2)) {
++                        // CraftBukkit start - Prevent lava putting something on fire
++                        BlockPos up = blockposition2.above();
++                        if (world.getBlockState(up).getBlock() != Blocks.FIRE) {
++                            if (org.bukkit.craftbukkit.event.CraftEventFactory.callBlockIgniteEvent(world, up, pos).isCancelled()) {
++                                continue;
++                            }
++                        }
++                        // CraftBukkit end
+                         world.setBlockAndUpdate(blockposition2.above(), BaseFireBlock.getState(world, blockposition2));
+                     }
+                 }
+@@ -196,7 +211,11 @@
+ 
+             if (this.is(FluidTags.LAVA) && fluid1.is(FluidTags.WATER)) {
+                 if (state.getBlock() instanceof LiquidBlock) {
+-                    world.setBlock(pos, Blocks.STONE.defaultBlockState(), 3);
++                    // CraftBukkit start
++                    if (!org.bukkit.craftbukkit.event.CraftEventFactory.handleBlockFormEvent(world.getMinecraftWorld(), pos, Blocks.STONE.defaultBlockState(), 3)) {
++                        return;
++                    }
++                    // CraftBukkit end
+                 }
+ 
+                 this.fizz(world, pos);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/portal/BlockPortalShape.patch b/paper-server/patches/sources/net/minecraft/world/level/portal/BlockPortalShape.patch
deleted file mode 100644
index 903517a86a..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/portal/BlockPortalShape.patch
+++ /dev/null
@@ -1,173 +0,0 @@
---- a/net/minecraft/world/level/portal/BlockPortalShape.java
-+++ b/net/minecraft/world/level/portal/BlockPortalShape.java
-@@ -23,6 +23,11 @@
- import net.minecraft.world.phys.shapes.VoxelShapes;
- import org.apache.commons.lang3.mutable.MutableInt;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.util.BlockStateListPopulator;
-+import org.bukkit.event.world.PortalCreateEvent;
-+// CraftBukkit end
-+
- public class BlockPortalShape {
- 
-     private static final int MIN_WIDTH = 2;
-@@ -40,8 +45,12 @@
-     private final BlockPosition bottomLeft;
-     private final int height;
-     private final int width;
-+    // CraftBukkit start - add field
-+    private final BlockStateListPopulator blocks;
- 
--    private BlockPortalShape(EnumDirection.EnumAxis enumdirection_enumaxis, int i, EnumDirection enumdirection, BlockPosition blockposition, int j, int k) {
-+    private BlockPortalShape(EnumDirection.EnumAxis enumdirection_enumaxis, int i, EnumDirection enumdirection, BlockPosition blockposition, int j, int k, BlockStateListPopulator blocks) {
-+        this.blocks = blocks;
-+        // CraftBukkit end
-         this.axis = enumdirection_enumaxis;
-         this.numPortalBlocks = i;
-         this.rightDir = enumdirection;
-@@ -69,44 +78,45 @@
-     }
- 
-     public static BlockPortalShape findAnyShape(IBlockAccess iblockaccess, BlockPosition blockposition, EnumDirection.EnumAxis enumdirection_enumaxis) {
-+        BlockStateListPopulator blocks = new BlockStateListPopulator(((GeneratorAccess) iblockaccess).getMinecraftWorld()); // CraftBukkit
-         EnumDirection enumdirection = enumdirection_enumaxis == EnumDirection.EnumAxis.X ? EnumDirection.WEST : EnumDirection.SOUTH;
--        BlockPosition blockposition1 = calculateBottomLeft(iblockaccess, enumdirection, blockposition);
-+        BlockPosition blockposition1 = calculateBottomLeft(iblockaccess, enumdirection, blockposition, blocks); // CraftBukkit
- 
-         if (blockposition1 == null) {
--            return new BlockPortalShape(enumdirection_enumaxis, 0, enumdirection, blockposition, 0, 0);
-+            return new BlockPortalShape(enumdirection_enumaxis, 0, enumdirection, blockposition, 0, 0, blocks); // CraftBukkit
-         } else {
--            int i = calculateWidth(iblockaccess, blockposition1, enumdirection);
-+            int i = calculateWidth(iblockaccess, blockposition1, enumdirection, blocks); // CraftBukkit
- 
-             if (i == 0) {
--                return new BlockPortalShape(enumdirection_enumaxis, 0, enumdirection, blockposition1, 0, 0);
-+                return new BlockPortalShape(enumdirection_enumaxis, 0, enumdirection, blockposition1, 0, 0, blocks); // CraftBukkit
-             } else {
-                 MutableInt mutableint = new MutableInt();
--                int j = calculateHeight(iblockaccess, blockposition1, enumdirection, i, mutableint);
-+                int j = calculateHeight(iblockaccess, blockposition1, enumdirection, i, mutableint, blocks); // CraftBukkit
- 
--                return new BlockPortalShape(enumdirection_enumaxis, mutableint.getValue(), enumdirection, blockposition1, i, j);
-+                return new BlockPortalShape(enumdirection_enumaxis, mutableint.getValue(), enumdirection, blockposition1, i, j, blocks); // CraftBukkit
-             }
-         }
-     }
- 
-     @Nullable
--    private static BlockPosition calculateBottomLeft(IBlockAccess iblockaccess, EnumDirection enumdirection, BlockPosition blockposition) {
-+    private static BlockPosition calculateBottomLeft(IBlockAccess iblockaccess, EnumDirection enumdirection, BlockPosition blockposition, BlockStateListPopulator blocks) { // CraftBukkit
-         for (int i = Math.max(iblockaccess.getMinY(), blockposition.getY() - 21); blockposition.getY() > i && isEmpty(iblockaccess.getBlockState(blockposition.below())); blockposition = blockposition.below()) {
-             ;
-         }
- 
-         EnumDirection enumdirection1 = enumdirection.getOpposite();
--        int j = getDistanceUntilEdgeAboveFrame(iblockaccess, blockposition, enumdirection1) - 1;
-+        int j = getDistanceUntilEdgeAboveFrame(iblockaccess, blockposition, enumdirection1, blocks) - 1; // CraftBukkit
- 
-         return j < 0 ? null : blockposition.relative(enumdirection1, j);
-     }
- 
--    private static int calculateWidth(IBlockAccess iblockaccess, BlockPosition blockposition, EnumDirection enumdirection) {
--        int i = getDistanceUntilEdgeAboveFrame(iblockaccess, blockposition, enumdirection);
-+    private static int calculateWidth(IBlockAccess iblockaccess, BlockPosition blockposition, EnumDirection enumdirection, BlockStateListPopulator blocks) { // CraftBukkit
-+        int i = getDistanceUntilEdgeAboveFrame(iblockaccess, blockposition, enumdirection, blocks); // CraftBukkit
- 
-         return i >= 2 && i <= 21 ? i : 0;
-     }
- 
--    private static int getDistanceUntilEdgeAboveFrame(IBlockAccess iblockaccess, BlockPosition blockposition, EnumDirection enumdirection) {
-+    private static int getDistanceUntilEdgeAboveFrame(IBlockAccess iblockaccess, BlockPosition blockposition, EnumDirection enumdirection, BlockStateListPopulator blocks) { // CraftBukkit
-         BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition();
- 
-         for (int i = 0; i <= 21; ++i) {
-@@ -115,6 +125,7 @@
- 
-             if (!isEmpty(iblockdata)) {
-                 if (BlockPortalShape.FRAME.test(iblockdata, iblockaccess, blockposition_mutableblockposition)) {
-+                    blocks.setBlock(blockposition_mutableblockposition, iblockdata, 18); // CraftBukkit - lower left / right
-                     return i;
-                 }
-                 break;
-@@ -125,31 +136,33 @@
-             if (!BlockPortalShape.FRAME.test(iblockdata1, iblockaccess, blockposition_mutableblockposition)) {
-                 break;
-             }
-+            blocks.setBlock(blockposition_mutableblockposition, iblockdata1, 18); // CraftBukkit - bottom row
-         }
- 
-         return 0;
-     }
- 
--    private static int calculateHeight(IBlockAccess iblockaccess, BlockPosition blockposition, EnumDirection enumdirection, int i, MutableInt mutableint) {
-+    private static int calculateHeight(IBlockAccess iblockaccess, BlockPosition blockposition, EnumDirection enumdirection, int i, MutableInt mutableint, BlockStateListPopulator blocks) { // CraftBukkit
-         BlockPosition.MutableBlockPosition blockposition_mutableblockposition = new BlockPosition.MutableBlockPosition();
--        int j = getDistanceUntilTop(iblockaccess, blockposition, enumdirection, blockposition_mutableblockposition, i, mutableint);
-+        int j = getDistanceUntilTop(iblockaccess, blockposition, enumdirection, blockposition_mutableblockposition, i, mutableint, blocks); // CraftBukkit
- 
--        return j >= 3 && j <= 21 && hasTopFrame(iblockaccess, blockposition, enumdirection, blockposition_mutableblockposition, i, j) ? j : 0;
-+        return j >= 3 && j <= 21 && hasTopFrame(iblockaccess, blockposition, enumdirection, blockposition_mutableblockposition, i, j, blocks) ? j : 0; // CraftBukkit
-     }
- 
--    private static boolean hasTopFrame(IBlockAccess iblockaccess, BlockPosition blockposition, EnumDirection enumdirection, BlockPosition.MutableBlockPosition blockposition_mutableblockposition, int i, int j) {
-+    private static boolean hasTopFrame(IBlockAccess iblockaccess, BlockPosition blockposition, EnumDirection enumdirection, BlockPosition.MutableBlockPosition blockposition_mutableblockposition, int i, int j, BlockStateListPopulator blocks) { // CraftBukkit
-         for (int k = 0; k < i; ++k) {
-             BlockPosition.MutableBlockPosition blockposition_mutableblockposition1 = blockposition_mutableblockposition.set(blockposition).move(EnumDirection.UP, j).move(enumdirection, k);
- 
-             if (!BlockPortalShape.FRAME.test(iblockaccess.getBlockState(blockposition_mutableblockposition1), iblockaccess, blockposition_mutableblockposition1)) {
-                 return false;
-             }
-+            blocks.setBlock(blockposition_mutableblockposition1, iblockaccess.getBlockState(blockposition_mutableblockposition1), 18); // CraftBukkit - upper row
-         }
- 
-         return true;
-     }
- 
--    private static int getDistanceUntilTop(IBlockAccess iblockaccess, BlockPosition blockposition, EnumDirection enumdirection, BlockPosition.MutableBlockPosition blockposition_mutableblockposition, int i, MutableInt mutableint) {
-+    private static int getDistanceUntilTop(IBlockAccess iblockaccess, BlockPosition blockposition, EnumDirection enumdirection, BlockPosition.MutableBlockPosition blockposition_mutableblockposition, int i, MutableInt mutableint, BlockStateListPopulator blocks) { // CraftBukkit
-         for (int j = 0; j < 21; ++j) {
-             blockposition_mutableblockposition.set(blockposition).move(EnumDirection.UP, j).move(enumdirection, -1);
-             if (!BlockPortalShape.FRAME.test(iblockaccess.getBlockState(blockposition_mutableblockposition), iblockaccess, blockposition_mutableblockposition)) {
-@@ -173,6 +186,10 @@
-                     mutableint.increment();
-                 }
-             }
-+            // CraftBukkit start - left and right
-+            blocks.setBlock(blockposition_mutableblockposition.set(blockposition).move(EnumDirection.UP, j).move(enumdirection, -1), iblockaccess.getBlockState(blockposition_mutableblockposition), 18);
-+            blocks.setBlock(blockposition_mutableblockposition.set(blockposition).move(EnumDirection.UP, j).move(enumdirection, i), iblockaccess.getBlockState(blockposition_mutableblockposition), 18);
-+            // CraftBukkit end
-         }
- 
-         return 21;
-@@ -186,12 +203,28 @@
-         return this.width >= 2 && this.width <= 21 && this.height >= 3 && this.height <= 21;
-     }
- 
--    public void createPortalBlocks(GeneratorAccess generatoraccess) {
-+    // CraftBukkit start - return boolean, add entity
-+    public boolean createPortalBlocks(GeneratorAccess generatoraccess, Entity entity) {
-+        org.bukkit.World bworld = generatoraccess.getMinecraftWorld().getWorld();
-+
-+        // Copy below for loop
-         IBlockData iblockdata = (IBlockData) Blocks.NETHER_PORTAL.defaultBlockState().setValue(BlockPortal.AXIS, this.axis);
- 
-         BlockPosition.betweenClosed(this.bottomLeft, this.bottomLeft.relative(EnumDirection.UP, this.height - 1).relative(this.rightDir, this.width - 1)).forEach((blockposition) -> {
-+            blocks.setBlock(blockposition, iblockdata, 18);
-+        });
-+
-+        PortalCreateEvent event = new PortalCreateEvent((java.util.List<org.bukkit.block.BlockState>) (java.util.List) blocks.getList(), bworld, (entity == null) ? null : entity.getBukkitEntity(), PortalCreateEvent.CreateReason.FIRE);
-+        generatoraccess.getMinecraftWorld().getServer().server.getPluginManager().callEvent(event);
-+
-+        if (event.isCancelled()) {
-+            return false;
-+        }
-+        // CraftBukkit end
-+        BlockPosition.betweenClosed(this.bottomLeft, this.bottomLeft.relative(EnumDirection.UP, this.height - 1).relative(this.rightDir, this.width - 1)).forEach((blockposition) -> {
-             generatoraccess.setBlock(blockposition, iblockdata, 18);
-         });
-+        return true; // CraftBukkit
-     }
- 
-     public boolean isComplete() {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/portal/PortalForcer.java.patch b/paper-server/patches/sources/net/minecraft/world/level/portal/PortalForcer.java.patch
new file mode 100644
index 0000000000..15875d2c0f
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/portal/PortalForcer.java.patch
@@ -0,0 +1,128 @@
+--- a/net/minecraft/world/level/portal/PortalForcer.java
++++ b/net/minecraft/world/level/portal/PortalForcer.java
+@@ -43,24 +43,36 @@
+     }
+ 
+     public Optional<BlockPos> findClosestPortalPosition(BlockPos pos, boolean destIsNether, WorldBorder worldBorder) {
++        // CraftBukkit start
++        return this.findClosestPortalPosition(pos, worldBorder, destIsNether ? 16 : 128); // Search Radius
++    }
++
++    public Optional<BlockPos> findClosestPortalPosition(BlockPos blockposition, WorldBorder worldborder, int i) {
+         PoiManager villageplace = this.level.getPoiManager();
+-        int i = destIsNether ? 16 : 128;
++        // int i = flag ? 16 : 128;
++        // CraftBukkit end
+ 
+-        villageplace.ensureLoadedAndValid(this.level, pos, i);
+-        Stream stream = villageplace.getInSquare((holder) -> {
++        villageplace.ensureLoadedAndValid(this.level, blockposition, i);
++        Stream<BlockPos> stream = villageplace.getInSquare((holder) -> { // CraftBukkit - decompile error
+             return holder.is(PoiTypes.NETHER_PORTAL);
+-        }, pos, i, PoiManager.Occupancy.ANY).map(PoiRecord::getPos);
++        }, blockposition, i, PoiManager.Occupancy.ANY).map(PoiRecord::getPos);
+ 
+-        Objects.requireNonNull(worldBorder);
+-        return stream.filter(worldBorder::isWithinBounds).filter((blockposition1) -> {
++        Objects.requireNonNull(worldborder);
++        return stream.filter(worldborder::isWithinBounds).filter((blockposition1) -> {
+             return this.level.getBlockState(blockposition1).hasProperty(BlockStateProperties.HORIZONTAL_AXIS);
+-        }).min(Comparator.comparingDouble((blockposition1) -> {
+-            return blockposition1.distSqr(pos);
++        }).min(Comparator.comparingDouble((BlockPos blockposition1) -> { // CraftBukkit - decompile error
++            return blockposition1.distSqr(blockposition);
+         }).thenComparingInt(Vec3i::getY));
+     }
+ 
+     public Optional<BlockUtil.FoundRectangle> createPortal(BlockPos pos, Direction.Axis axis) {
+-        Direction enumdirection = Direction.get(Direction.AxisDirection.POSITIVE, axis);
++        // CraftBukkit start
++        return this.createPortal(pos, axis, null, 16);
++    }
++
++    public Optional<BlockUtil.FoundRectangle> createPortal(BlockPos blockposition, Direction.Axis enumdirection_enumaxis, net.minecraft.world.entity.Entity entity, int createRadius) {
++        // CraftBukkit end
++        Direction enumdirection = Direction.get(Direction.AxisDirection.POSITIVE, enumdirection_enumaxis);
+         double d0 = -1.0D;
+         BlockPos blockposition1 = null;
+         double d1 = -1.0D;
+@@ -68,8 +80,8 @@
+         WorldBorder worldborder = this.level.getWorldBorder();
+         int i = Math.min(this.level.getMaxY(), this.level.getMinY() + this.level.getLogicalHeight() - 1);
+         boolean flag = true;
+-        BlockPos.MutableBlockPos blockposition_mutableblockposition = pos.mutable();
+-        Iterator iterator = BlockPos.spiralAround(pos, 16, Direction.EAST, Direction.SOUTH).iterator();
++        BlockPos.MutableBlockPos blockposition_mutableblockposition = blockposition.mutable();
++        Iterator iterator = BlockPos.spiralAround(blockposition, createRadius, Direction.EAST, Direction.SOUTH).iterator(); // CraftBukkit
+ 
+         int j;
+         int k;
+@@ -95,7 +107,7 @@
+                             if (i1 <= 0 || i1 >= 3) {
+                                 blockposition_mutableblockposition1.setY(k);
+                                 if (this.canHostFrame(blockposition_mutableblockposition1, blockposition_mutableblockposition, enumdirection, 0)) {
+-                                    double d2 = pos.distSqr(blockposition_mutableblockposition1);
++                                    double d2 = blockposition.distSqr(blockposition_mutableblockposition1);
+ 
+                                     if (this.canHostFrame(blockposition_mutableblockposition1, blockposition_mutableblockposition, enumdirection, -1) && this.canHostFrame(blockposition_mutableblockposition1, blockposition_mutableblockposition, enumdirection, 1) && (d0 == -1.0D || d0 > d2)) {
+                                         d0 = d2;
+@@ -122,6 +134,7 @@
+         int j1;
+         int k1;
+ 
++        org.bukkit.craftbukkit.util.BlockStateListPopulator blockList = new org.bukkit.craftbukkit.util.BlockStateListPopulator(this.level); // CraftBukkit - Use BlockStateListPopulator
+         if (d0 == -1.0D) {
+             j1 = Math.max(this.level.getMinY() - -1, 70);
+             k1 = i - 9;
+@@ -129,7 +142,7 @@
+                 return Optional.empty();
+             }
+ 
+-            blockposition1 = (new BlockPos(pos.getX() - enumdirection.getStepX() * 1, Mth.clamp(pos.getY(), j1, k1), pos.getZ() - enumdirection.getStepZ() * 1)).immutable();
++            blockposition1 = (new BlockPos(blockposition.getX() - enumdirection.getStepX() * 1, Mth.clamp(blockposition.getY(), j1, k1), blockposition.getZ() - enumdirection.getStepZ() * 1)).immutable();
+             blockposition1 = worldborder.clampToBounds(blockposition1);
+             Direction enumdirection1 = enumdirection.getClockWise();
+ 
+@@ -139,7 +152,7 @@
+                         BlockState iblockdata = i1 < 0 ? Blocks.OBSIDIAN.defaultBlockState() : Blocks.AIR.defaultBlockState();
+ 
+                         blockposition_mutableblockposition.setWithOffset(blockposition1, l * enumdirection.getStepX() + k * enumdirection1.getStepX(), i1, l * enumdirection.getStepZ() + k * enumdirection1.getStepZ());
+-                        this.level.setBlockAndUpdate(blockposition_mutableblockposition, iblockdata);
++                        blockList.setBlock(blockposition_mutableblockposition, iblockdata, 3); // CraftBukkit
+                     }
+                 }
+             }
+@@ -149,20 +162,30 @@
+             for (k1 = -1; k1 < 4; ++k1) {
+                 if (j1 == -1 || j1 == 2 || k1 == -1 || k1 == 3) {
+                     blockposition_mutableblockposition.setWithOffset(blockposition1, j1 * enumdirection.getStepX(), k1, j1 * enumdirection.getStepZ());
+-                    this.level.setBlock(blockposition_mutableblockposition, Blocks.OBSIDIAN.defaultBlockState(), 3);
++                    blockList.setBlock(blockposition_mutableblockposition, Blocks.OBSIDIAN.defaultBlockState(), 3); // CraftBukkit
+                 }
+             }
+         }
+ 
+-        BlockState iblockdata1 = (BlockState) Blocks.NETHER_PORTAL.defaultBlockState().setValue(NetherPortalBlock.AXIS, axis);
++        BlockState iblockdata1 = (BlockState) Blocks.NETHER_PORTAL.defaultBlockState().setValue(NetherPortalBlock.AXIS, enumdirection_enumaxis);
+ 
+         for (k1 = 0; k1 < 2; ++k1) {
+             for (j = 0; j < 3; ++j) {
+                 blockposition_mutableblockposition.setWithOffset(blockposition1, k1 * enumdirection.getStepX(), j, k1 * enumdirection.getStepZ());
+-                this.level.setBlock(blockposition_mutableblockposition, iblockdata1, 18);
++                blockList.setBlock(blockposition_mutableblockposition, iblockdata1, 18); // CraftBukkit
+             }
+         }
+ 
++        // CraftBukkit start
++        org.bukkit.World bworld = this.level.getWorld();
++        org.bukkit.event.world.PortalCreateEvent event = new org.bukkit.event.world.PortalCreateEvent((java.util.List<org.bukkit.block.BlockState>) (java.util.List) blockList.getList(), bworld, (entity == null) ? null : entity.getBukkitEntity(), org.bukkit.event.world.PortalCreateEvent.CreateReason.NETHER_PAIR);
++
++        this.level.getCraftServer().getPluginManager().callEvent(event);
++        if (event.isCancelled()) {
++            return Optional.empty();
++        }
++        blockList.updateList();
++        // CraftBukkit end
+         return Optional.of(new BlockUtil.FoundRectangle(blockposition1.immutable(), 2, 3));
+     }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/portal/PortalShape.java.patch b/paper-server/patches/sources/net/minecraft/world/level/portal/PortalShape.java.patch
new file mode 100644
index 0000000000..f0cf745dd6
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/portal/PortalShape.java.patch
@@ -0,0 +1,226 @@
+--- a/net/minecraft/world/level/portal/PortalShape.java
++++ b/net/minecraft/world/level/portal/PortalShape.java
+@@ -23,6 +23,11 @@
+ import net.minecraft.world.phys.shapes.VoxelShape;
+ import org.apache.commons.lang3.mutable.MutableInt;
+ 
++// CraftBukkit start
++import org.bukkit.craftbukkit.util.BlockStateListPopulator;
++import org.bukkit.event.world.PortalCreateEvent;
++// CraftBukkit end
++
+ public class PortalShape {
+ 
+     private static final int MIN_WIDTH = 2;
+@@ -40,14 +45,18 @@
+     private final BlockPos bottomLeft;
+     private final int height;
+     private final int width;
++    // CraftBukkit start - add field
++    private final BlockStateListPopulator blocks;
+ 
+-    private PortalShape(Direction.Axis axis, int foundPortalBlocks, Direction negativeDir, BlockPos lowerCorner, int width, int height) {
+-        this.axis = axis;
+-        this.numPortalBlocks = foundPortalBlocks;
+-        this.rightDir = negativeDir;
+-        this.bottomLeft = lowerCorner;
+-        this.width = width;
+-        this.height = height;
++    private PortalShape(Direction.Axis enumdirection_enumaxis, int i, Direction enumdirection, BlockPos blockposition, int j, int k, BlockStateListPopulator blocks) {
++        this.blocks = blocks;
++        // CraftBukkit end
++        this.axis = enumdirection_enumaxis;
++        this.numPortalBlocks = i;
++        this.rightDir = enumdirection;
++        this.bottomLeft = blockposition;
++        this.width = j;
++        this.height = k;
+     }
+ 
+     public static Optional<PortalShape> findEmptyPortalShape(LevelAccessor world, BlockPos pos, Direction.Axis firstCheckedAxis) {
+@@ -69,110 +78,118 @@
+     }
+ 
+     public static PortalShape findAnyShape(BlockGetter world, BlockPos pos, Direction.Axis axis) {
++        BlockStateListPopulator blocks = new BlockStateListPopulator(((LevelAccessor) world).getMinecraftWorld()); // CraftBukkit
+         Direction enumdirection = axis == Direction.Axis.X ? Direction.WEST : Direction.SOUTH;
+-        BlockPos blockposition1 = PortalShape.calculateBottomLeft(world, enumdirection, pos);
++        BlockPos blockposition1 = PortalShape.calculateBottomLeft(world, enumdirection, pos, blocks); // CraftBukkit
+ 
+         if (blockposition1 == null) {
+-            return new PortalShape(axis, 0, enumdirection, pos, 0, 0);
++            return new PortalShape(axis, 0, enumdirection, pos, 0, 0, blocks); // CraftBukkit
+         } else {
+-            int i = PortalShape.calculateWidth(world, blockposition1, enumdirection);
++            int i = PortalShape.calculateWidth(world, blockposition1, enumdirection, blocks); // CraftBukkit
+ 
+             if (i == 0) {
+-                return new PortalShape(axis, 0, enumdirection, blockposition1, 0, 0);
++                return new PortalShape(axis, 0, enumdirection, blockposition1, 0, 0, blocks); // CraftBukkit
+             } else {
+                 MutableInt mutableint = new MutableInt();
+-                int j = PortalShape.calculateHeight(world, blockposition1, enumdirection, i, mutableint);
++                int j = PortalShape.calculateHeight(world, blockposition1, enumdirection, i, mutableint, blocks); // CraftBukkit
+ 
+-                return new PortalShape(axis, mutableint.getValue(), enumdirection, blockposition1, i, j);
++                return new PortalShape(axis, mutableint.getValue(), enumdirection, blockposition1, i, j, blocks); // CraftBukkit
+             }
+         }
+     }
+ 
+     @Nullable
+-    private static BlockPos calculateBottomLeft(BlockGetter world, Direction direction, BlockPos pow) {
+-        for (int i = Math.max(world.getMinY(), pow.getY() - 21); pow.getY() > i && PortalShape.isEmpty(world.getBlockState(pow.below())); pow = pow.below()) {
++    private static BlockPos calculateBottomLeft(BlockGetter iblockaccess, Direction enumdirection, BlockPos blockposition, BlockStateListPopulator blocks) { // CraftBukkit
++        for (int i = Math.max(iblockaccess.getMinY(), blockposition.getY() - 21); blockposition.getY() > i && PortalShape.isEmpty(iblockaccess.getBlockState(blockposition.below())); blockposition = blockposition.below()) {
+             ;
+         }
+ 
+-        Direction enumdirection1 = direction.getOpposite();
+-        int j = PortalShape.getDistanceUntilEdgeAboveFrame(world, pow, enumdirection1) - 1;
++        Direction enumdirection1 = enumdirection.getOpposite();
++        int j = PortalShape.getDistanceUntilEdgeAboveFrame(iblockaccess, blockposition, enumdirection1, blocks) - 1; // CraftBukkit
+ 
+-        return j < 0 ? null : pow.relative(enumdirection1, j);
++        return j < 0 ? null : blockposition.relative(enumdirection1, j);
+     }
+ 
+-    private static int calculateWidth(BlockGetter world, BlockPos lowerCorner, Direction negativeDir) {
+-        int i = PortalShape.getDistanceUntilEdgeAboveFrame(world, lowerCorner, negativeDir);
++    private static int calculateWidth(BlockGetter iblockaccess, BlockPos blockposition, Direction enumdirection, BlockStateListPopulator blocks) { // CraftBukkit
++        int i = PortalShape.getDistanceUntilEdgeAboveFrame(iblockaccess, blockposition, enumdirection, blocks); // CraftBukkit
+ 
+         return i >= 2 && i <= 21 ? i : 0;
+     }
+ 
+-    private static int getDistanceUntilEdgeAboveFrame(BlockGetter world, BlockPos lowerCorner, Direction negativeDir) {
++    private static int getDistanceUntilEdgeAboveFrame(BlockGetter iblockaccess, BlockPos blockposition, Direction enumdirection, BlockStateListPopulator blocks) { // CraftBukkit
+         BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
+ 
+         for (int i = 0; i <= 21; ++i) {
+-            blockposition_mutableblockposition.set(lowerCorner).move(negativeDir, i);
+-            BlockState iblockdata = world.getBlockState(blockposition_mutableblockposition);
++            blockposition_mutableblockposition.set(blockposition).move(enumdirection, i);
++            BlockState iblockdata = iblockaccess.getBlockState(blockposition_mutableblockposition);
+ 
+             if (!PortalShape.isEmpty(iblockdata)) {
+-                if (PortalShape.FRAME.test(iblockdata, world, blockposition_mutableblockposition)) {
++                if (PortalShape.FRAME.test(iblockdata, iblockaccess, blockposition_mutableblockposition)) {
++                    blocks.setBlock(blockposition_mutableblockposition, iblockdata, 18); // CraftBukkit - lower left / right
+                     return i;
+                 }
+                 break;
+             }
+ 
+-            BlockState iblockdata1 = world.getBlockState(blockposition_mutableblockposition.move(Direction.DOWN));
++            BlockState iblockdata1 = iblockaccess.getBlockState(blockposition_mutableblockposition.move(Direction.DOWN));
+ 
+-            if (!PortalShape.FRAME.test(iblockdata1, world, blockposition_mutableblockposition)) {
++            if (!PortalShape.FRAME.test(iblockdata1, iblockaccess, blockposition_mutableblockposition)) {
+                 break;
+             }
++            blocks.setBlock(blockposition_mutableblockposition, iblockdata1, 18); // CraftBukkit - bottom row
+         }
+ 
+         return 0;
+     }
+ 
+-    private static int calculateHeight(BlockGetter world, BlockPos lowerCorner, Direction negativeDir, int width, MutableInt foundPortalBlocks) {
+-        BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
+-        int j = PortalShape.getDistanceUntilTop(world, lowerCorner, negativeDir, blockposition_mutableblockposition, width, foundPortalBlocks);
++    private static int calculateHeight(BlockGetter iblockaccess, BlockPos blockposition, Direction enumdirection, int i, MutableInt mutableint, BlockStateListPopulator blocks) { // CraftBukkit
++        BlockPos.MutableBlockPos blockposition_mutableblockposition = new BlockPos.MutableBlockPos();
++        int j = PortalShape.getDistanceUntilTop(iblockaccess, blockposition, enumdirection, blockposition_mutableblockposition, i, mutableint, blocks); // CraftBukkit
+ 
+-        return j >= 3 && j <= 21 && PortalShape.hasTopFrame(world, lowerCorner, negativeDir, blockposition_mutableblockposition, width, j) ? j : 0;
++        return j >= 3 && j <= 21 && PortalShape.hasTopFrame(iblockaccess, blockposition, enumdirection, blockposition_mutableblockposition, i, j, blocks) ? j : 0; // CraftBukkit
+     }
+ 
+-    private static boolean hasTopFrame(BlockGetter world, BlockPos lowerCorner, Direction direction, BlockPos.MutableBlockPos pos, int width, int height) {
+-        for (int k = 0; k < width; ++k) {
+-            BlockPos.MutableBlockPos blockposition_mutableblockposition1 = pos.set(lowerCorner).move(Direction.UP, height).move(direction, k);
++    private static boolean hasTopFrame(BlockGetter iblockaccess, BlockPos blockposition, Direction enumdirection, BlockPos.MutableBlockPos blockposition_mutableblockposition, int i, int j, BlockStateListPopulator blocks) { // CraftBukkit
++        for (int k = 0; k < i; ++k) {
++            BlockPos.MutableBlockPos blockposition_mutableblockposition1 = blockposition_mutableblockposition.set(blockposition).move(Direction.UP, j).move(enumdirection, k);
+ 
+-            if (!PortalShape.FRAME.test(world.getBlockState(blockposition_mutableblockposition1), world, blockposition_mutableblockposition1)) {
++            if (!PortalShape.FRAME.test(iblockaccess.getBlockState(blockposition_mutableblockposition1), iblockaccess, blockposition_mutableblockposition1)) {
+                 return false;
+             }
++            blocks.setBlock(blockposition_mutableblockposition1, iblockaccess.getBlockState(blockposition_mutableblockposition1), 18); // CraftBukkit - upper row
+         }
+ 
+         return true;
+     }
+ 
+-    private static int getDistanceUntilTop(BlockGetter world, BlockPos lowerCorner, Direction negativeDir, BlockPos.MutableBlockPos pos, int width, MutableInt foundPortalBlocks) {
++    private static int getDistanceUntilTop(BlockGetter iblockaccess, BlockPos blockposition, Direction enumdirection, BlockPos.MutableBlockPos blockposition_mutableblockposition, int i, MutableInt mutableint, BlockStateListPopulator blocks) { // CraftBukkit
+         for (int j = 0; j < 21; ++j) {
+-            pos.set(lowerCorner).move(Direction.UP, j).move(negativeDir, -1);
+-            if (!PortalShape.FRAME.test(world.getBlockState(pos), world, pos)) {
++            blockposition_mutableblockposition.set(blockposition).move(Direction.UP, j).move(enumdirection, -1);
++            if (!PortalShape.FRAME.test(iblockaccess.getBlockState(blockposition_mutableblockposition), iblockaccess, blockposition_mutableblockposition)) {
+                 return j;
+             }
+ 
+-            pos.set(lowerCorner).move(Direction.UP, j).move(negativeDir, width);
+-            if (!PortalShape.FRAME.test(world.getBlockState(pos), world, pos)) {
++            blockposition_mutableblockposition.set(blockposition).move(Direction.UP, j).move(enumdirection, i);
++            if (!PortalShape.FRAME.test(iblockaccess.getBlockState(blockposition_mutableblockposition), iblockaccess, blockposition_mutableblockposition)) {
+                 return j;
+             }
+ 
+-            for (int k = 0; k < width; ++k) {
+-                pos.set(lowerCorner).move(Direction.UP, j).move(negativeDir, k);
+-                BlockState iblockdata = world.getBlockState(pos);
++            for (int k = 0; k < i; ++k) {
++                blockposition_mutableblockposition.set(blockposition).move(Direction.UP, j).move(enumdirection, k);
++                BlockState iblockdata = iblockaccess.getBlockState(blockposition_mutableblockposition);
+ 
+                 if (!PortalShape.isEmpty(iblockdata)) {
+                     return j;
+                 }
+ 
+                 if (iblockdata.is(Blocks.NETHER_PORTAL)) {
+-                    foundPortalBlocks.increment();
++                    mutableint.increment();
+                 }
+             }
++            // CraftBukkit start - left and right
++            blocks.setBlock(blockposition_mutableblockposition.set(blockposition).move(Direction.UP, j).move(enumdirection, -1), iblockaccess.getBlockState(blockposition_mutableblockposition), 18);
++            blocks.setBlock(blockposition_mutableblockposition.set(blockposition).move(Direction.UP, j).move(enumdirection, i), iblockaccess.getBlockState(blockposition_mutableblockposition), 18);
++            // CraftBukkit end
+         }
+ 
+         return 21;
+@@ -186,12 +203,28 @@
+         return this.width >= 2 && this.width <= 21 && this.height >= 3 && this.height <= 21;
+     }
+ 
+-    public void createPortalBlocks(LevelAccessor world) {
++    // CraftBukkit start - return boolean, add entity
++    public boolean createPortalBlocks(LevelAccessor generatoraccess, Entity entity) {
++        org.bukkit.World bworld = generatoraccess.getMinecraftWorld().getWorld();
++
++        // Copy below for loop
+         BlockState iblockdata = (BlockState) Blocks.NETHER_PORTAL.defaultBlockState().setValue(NetherPortalBlock.AXIS, this.axis);
+ 
+         BlockPos.betweenClosed(this.bottomLeft, this.bottomLeft.relative(Direction.UP, this.height - 1).relative(this.rightDir, this.width - 1)).forEach((blockposition) -> {
+-            world.setBlock(blockposition, iblockdata, 18);
++            this.blocks.setBlock(blockposition, iblockdata, 18);
+         });
++
++        PortalCreateEvent event = new PortalCreateEvent((java.util.List<org.bukkit.block.BlockState>) (java.util.List) this.blocks.getList(), bworld, (entity == null) ? null : entity.getBukkitEntity(), PortalCreateEvent.CreateReason.FIRE);
++        generatoraccess.getMinecraftWorld().getServer().server.getPluginManager().callEvent(event);
++
++        if (event.isCancelled()) {
++            return false;
++        }
++        // CraftBukkit end
++        BlockPos.betweenClosed(this.bottomLeft, this.bottomLeft.relative(Direction.UP, this.height - 1).relative(this.rightDir, this.width - 1)).forEach((blockposition) -> {
++            generatoraccess.setBlock(blockposition, iblockdata, 18);
++        });
++        return true; // CraftBukkit
+     }
+ 
+     public boolean isComplete() {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/portal/PortalTravelAgent.patch b/paper-server/patches/sources/net/minecraft/world/level/portal/PortalTravelAgent.patch
deleted file mode 100644
index 0f5b050ab4..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/portal/PortalTravelAgent.patch
+++ /dev/null
@@ -1,98 +0,0 @@
---- a/net/minecraft/world/level/portal/PortalTravelAgent.java
-+++ b/net/minecraft/world/level/portal/PortalTravelAgent.java
-@@ -43,23 +43,35 @@
-     }
- 
-     public Optional<BlockPosition> findClosestPortalPosition(BlockPosition blockposition, boolean flag, WorldBorder worldborder) {
-+        // CraftBukkit start
-+        return findClosestPortalPosition(blockposition, worldborder, flag ? 16 : 128); // Search Radius
-+    }
-+
-+    public Optional<BlockPosition> findClosestPortalPosition(BlockPosition blockposition, WorldBorder worldborder, int i) {
-         VillagePlace villageplace = this.level.getPoiManager();
--        int i = flag ? 16 : 128;
-+        // int i = flag ? 16 : 128;
-+        // CraftBukkit end
- 
-         villageplace.ensureLoadedAndValid(this.level, blockposition, i);
--        Stream stream = villageplace.getInSquare((holder) -> {
-+        Stream<BlockPosition> stream = villageplace.getInSquare((holder) -> { // CraftBukkit - decompile error
-             return holder.is(PoiTypes.NETHER_PORTAL);
-         }, blockposition, i, VillagePlace.Occupancy.ANY).map(VillagePlaceRecord::getPos);
- 
-         Objects.requireNonNull(worldborder);
-         return stream.filter(worldborder::isWithinBounds).filter((blockposition1) -> {
-             return this.level.getBlockState(blockposition1).hasProperty(BlockProperties.HORIZONTAL_AXIS);
--        }).min(Comparator.comparingDouble((blockposition1) -> {
-+        }).min(Comparator.comparingDouble((BlockPosition blockposition1) -> { // CraftBukkit - decompile error
-             return blockposition1.distSqr(blockposition);
-         }).thenComparingInt(BaseBlockPosition::getY));
-     }
- 
-     public Optional<BlockUtil.Rectangle> createPortal(BlockPosition blockposition, EnumDirection.EnumAxis enumdirection_enumaxis) {
-+        // CraftBukkit start
-+        return this.createPortal(blockposition, enumdirection_enumaxis, null, 16);
-+    }
-+
-+    public Optional<BlockUtil.Rectangle> createPortal(BlockPosition blockposition, EnumDirection.EnumAxis enumdirection_enumaxis, net.minecraft.world.entity.Entity entity, int createRadius) {
-+        // CraftBukkit end
-         EnumDirection enumdirection = EnumDirection.get(EnumDirection.EnumAxisDirection.POSITIVE, enumdirection_enumaxis);
-         double d0 = -1.0D;
-         BlockPosition blockposition1 = null;
-@@ -69,7 +81,7 @@
-         int i = Math.min(this.level.getMaxY(), this.level.getMinY() + this.level.getLogicalHeight() - 1);
-         boolean flag = true;
-         BlockPosition.MutableBlockPosition blockposition_mutableblockposition = blockposition.mutable();
--        Iterator iterator = BlockPosition.spiralAround(blockposition, 16, EnumDirection.EAST, EnumDirection.SOUTH).iterator();
-+        Iterator iterator = BlockPosition.spiralAround(blockposition, createRadius, EnumDirection.EAST, EnumDirection.SOUTH).iterator(); // CraftBukkit
- 
-         int j;
-         int k;
-@@ -122,6 +134,7 @@
-         int j1;
-         int k1;
- 
-+        org.bukkit.craftbukkit.util.BlockStateListPopulator blockList = new org.bukkit.craftbukkit.util.BlockStateListPopulator(this.level); // CraftBukkit - Use BlockStateListPopulator
-         if (d0 == -1.0D) {
-             j1 = Math.max(this.level.getMinY() - -1, 70);
-             k1 = i - 9;
-@@ -139,7 +152,7 @@
-                         IBlockData iblockdata = i1 < 0 ? Blocks.OBSIDIAN.defaultBlockState() : Blocks.AIR.defaultBlockState();
- 
-                         blockposition_mutableblockposition.setWithOffset(blockposition1, l * enumdirection.getStepX() + k * enumdirection1.getStepX(), i1, l * enumdirection.getStepZ() + k * enumdirection1.getStepZ());
--                        this.level.setBlockAndUpdate(blockposition_mutableblockposition, iblockdata);
-+                        blockList.setBlock(blockposition_mutableblockposition, iblockdata, 3); // CraftBukkit
-                     }
-                 }
-             }
-@@ -149,7 +162,7 @@
-             for (k1 = -1; k1 < 4; ++k1) {
-                 if (j1 == -1 || j1 == 2 || k1 == -1 || k1 == 3) {
-                     blockposition_mutableblockposition.setWithOffset(blockposition1, j1 * enumdirection.getStepX(), k1, j1 * enumdirection.getStepZ());
--                    this.level.setBlock(blockposition_mutableblockposition, Blocks.OBSIDIAN.defaultBlockState(), 3);
-+                    blockList.setBlock(blockposition_mutableblockposition, Blocks.OBSIDIAN.defaultBlockState(), 3); // CraftBukkit
-                 }
-             }
-         }
-@@ -159,10 +172,20 @@
-         for (k1 = 0; k1 < 2; ++k1) {
-             for (j = 0; j < 3; ++j) {
-                 blockposition_mutableblockposition.setWithOffset(blockposition1, k1 * enumdirection.getStepX(), j, k1 * enumdirection.getStepZ());
--                this.level.setBlock(blockposition_mutableblockposition, iblockdata1, 18);
-+                blockList.setBlock(blockposition_mutableblockposition, iblockdata1, 18); // CraftBukkit
-             }
-         }
- 
-+        // CraftBukkit start
-+        org.bukkit.World bworld = this.level.getWorld();
-+        org.bukkit.event.world.PortalCreateEvent event = new org.bukkit.event.world.PortalCreateEvent((java.util.List<org.bukkit.block.BlockState>) (java.util.List) blockList.getList(), bworld, (entity == null) ? null : entity.getBukkitEntity(), org.bukkit.event.world.PortalCreateEvent.CreateReason.NETHER_PAIR);
-+
-+        this.level.getCraftServer().getPluginManager().callEvent(event);
-+        if (event.isCancelled()) {
-+            return Optional.empty();
-+        }
-+        blockList.updateList();
-+        // CraftBukkit end
-         return Optional.of(new BlockUtil.Rectangle(blockposition1.immutable(), 2, 3));
-     }
- 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/portal/TeleportTransition.java.patch b/paper-server/patches/sources/net/minecraft/world/level/portal/TeleportTransition.java.patch
new file mode 100644
index 0000000000..1733056573
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/portal/TeleportTransition.java.patch
@@ -0,0 +1,62 @@
+--- a/net/minecraft/world/level/portal/TeleportTransition.java
++++ b/net/minecraft/world/level/portal/TeleportTransition.java
+@@ -8,26 +8,55 @@
+ import net.minecraft.world.entity.Entity;
+ import net.minecraft.world.entity.Relative;
+ import net.minecraft.world.phys.Vec3;
++// CraftBukkit start
++import org.bukkit.event.player.PlayerTeleportEvent;
+ 
+-public record TeleportTransition(ServerLevel newLevel, Vec3 position, Vec3 deltaMovement, float yRot, float xRot, boolean missingRespawnBlock, boolean asPassenger, Set<Relative> relatives, TeleportTransition.PostTeleportTransition postTeleportTransition) {
++public record TeleportTransition(ServerLevel newLevel, Vec3 position, Vec3 deltaMovement, float yRot, float xRot, boolean missingRespawnBlock, boolean asPassenger, Set<Relative> relatives, TeleportTransition.PostTeleportTransition postTeleportTransition, PlayerTeleportEvent.TeleportCause cause) {
+ 
++    public TeleportTransition(ServerLevel newLevel, Vec3 position, Vec3 deltaMovement, float yRot, float xRot, boolean missingRespawnBlock, boolean asPassenger, Set<Relative> relatives, TeleportTransition.PostTeleportTransition postTeleportTransition) {
++        this(newLevel, position, deltaMovement, yRot, xRot, missingRespawnBlock, asPassenger, relatives, postTeleportTransition, PlayerTeleportEvent.TeleportCause.UNKNOWN);
++    }
++
++    public TeleportTransition(PlayerTeleportEvent.TeleportCause cause) {
++        this(null, Vec3.ZERO, Vec3.ZERO, 0.0F, 0.0F, false, false, Set.of(), DO_NOTHING, cause);
++    }
++    // CraftBukkit end
++
+     public static final TeleportTransition.PostTeleportTransition DO_NOTHING = (entity) -> {
+     };
+     public static final TeleportTransition.PostTeleportTransition PLAY_PORTAL_SOUND = TeleportTransition::playPortalSound;
+     public static final TeleportTransition.PostTeleportTransition PLACE_PORTAL_TICKET = TeleportTransition::placePortalTicket;
+ 
+     public TeleportTransition(ServerLevel world, Vec3 pos, Vec3 velocity, float yaw, float pitch, TeleportTransition.PostTeleportTransition postDimensionTransition) {
+-        this(world, pos, velocity, yaw, pitch, Set.of(), postDimensionTransition);
++        // CraftBukkit start
++        this(world, pos, velocity, yaw, pitch, postDimensionTransition, PlayerTeleportEvent.TeleportCause.UNKNOWN);
+     }
+ 
++    public TeleportTransition(ServerLevel worldserver, Vec3 vec3d, Vec3 vec3d1, float f, float f1, TeleportTransition.PostTeleportTransition teleporttransition_a, PlayerTeleportEvent.TeleportCause cause) {
++        this(worldserver, vec3d, vec3d1, f, f1, Set.of(), teleporttransition_a, cause);
++        // CraftBukkit end
++    }
++
+     public TeleportTransition(ServerLevel world, Vec3 pos, Vec3 velocity, float yaw, float pitch, Set<Relative> flags, TeleportTransition.PostTeleportTransition postDimensionTransition) {
+-        this(world, pos, velocity, yaw, pitch, false, false, flags, postDimensionTransition);
++        // CraftBukkit start
++        this(world, pos, velocity, yaw, pitch, flags, postDimensionTransition, PlayerTeleportEvent.TeleportCause.UNKNOWN);
+     }
+ 
++    public TeleportTransition(ServerLevel worldserver, Vec3 vec3d, Vec3 vec3d1, float f, float f1, Set<Relative> set, TeleportTransition.PostTeleportTransition teleporttransition_a, PlayerTeleportEvent.TeleportCause cause) {
++        this(worldserver, vec3d, vec3d1, f, f1, false, false, set, teleporttransition_a, cause);
++        // CraftBukkit end
++    }
++
+     public TeleportTransition(ServerLevel world, Entity entity, TeleportTransition.PostTeleportTransition postDimensionTransition) {
+-        this(world, findAdjustedSharedSpawnPos(world, entity), Vec3.ZERO, 0.0F, 0.0F, false, false, Set.of(), postDimensionTransition);
++        // CraftBukkit start
++        this(world, entity, postDimensionTransition, PlayerTeleportEvent.TeleportCause.UNKNOWN);
+     }
+ 
++    public TeleportTransition(ServerLevel worldserver, Entity entity, TeleportTransition.PostTeleportTransition teleporttransition_a, PlayerTeleportEvent.TeleportCause cause) {
++        this(worldserver, findAdjustedSharedSpawnPos(worldserver, entity), Vec3.ZERO, 0.0F, 0.0F, false, false, Set.of(), teleporttransition_a, cause);
++        // CraftBukkit end
++    }
++
+     private static void playPortalSound(Entity entity) {
+         if (entity instanceof ServerPlayer entityplayer) {
+             entityplayer.connection.send(new ClientboundLevelEventPacket(1032, BlockPos.ZERO, 0, false));
diff --git a/paper-server/patches/sources/net/minecraft/world/level/portal/TeleportTransition.patch b/paper-server/patches/sources/net/minecraft/world/level/portal/TeleportTransition.patch
deleted file mode 100644
index 26b742340f..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/portal/TeleportTransition.patch
+++ /dev/null
@@ -1,60 +0,0 @@
---- a/net/minecraft/world/level/portal/TeleportTransition.java
-+++ b/net/minecraft/world/level/portal/TeleportTransition.java
-@@ -9,7 +9,19 @@
- import net.minecraft.world.entity.Relative;
- import net.minecraft.world.phys.Vec3D;
- 
--public record TeleportTransition(WorldServer newLevel, Vec3D position, Vec3D deltaMovement, float yRot, float xRot, boolean missingRespawnBlock, boolean asPassenger, Set<Relative> relatives, TeleportTransition.a postTeleportTransition) {
-+// CraftBukkit start
-+import org.bukkit.event.player.PlayerTeleportEvent;
-+
-+public record TeleportTransition(WorldServer newLevel, Vec3D position, Vec3D deltaMovement, float yRot, float xRot, boolean missingRespawnBlock, boolean asPassenger, Set<Relative> relatives, TeleportTransition.a postTeleportTransition, PlayerTeleportEvent.TeleportCause cause) {
-+
-+    public TeleportTransition(WorldServer newLevel, Vec3D position, Vec3D deltaMovement, float yRot, float xRot, boolean missingRespawnBlock, boolean asPassenger, Set<Relative> relatives, TeleportTransition.a postTeleportTransition) {
-+        this(newLevel, position, deltaMovement, yRot, xRot, missingRespawnBlock, asPassenger, relatives, postTeleportTransition, PlayerTeleportEvent.TeleportCause.UNKNOWN);
-+    }
-+
-+    public TeleportTransition(PlayerTeleportEvent.TeleportCause cause) {
-+        this(null, Vec3D.ZERO, Vec3D.ZERO, 0.0F, 0.0F, false, false, Set.of(), DO_NOTHING, cause);
-+    }
-+    // CraftBukkit end
- 
-     public static final TeleportTransition.a DO_NOTHING = (entity) -> {
-     };
-@@ -17,15 +29,33 @@
-     public static final TeleportTransition.a PLACE_PORTAL_TICKET = TeleportTransition::placePortalTicket;
- 
-     public TeleportTransition(WorldServer worldserver, Vec3D vec3d, Vec3D vec3d1, float f, float f1, TeleportTransition.a teleporttransition_a) {
--        this(worldserver, vec3d, vec3d1, f, f1, Set.of(), teleporttransition_a);
-+        // CraftBukkit start
-+        this(worldserver, vec3d, vec3d1, f, f1, teleporttransition_a, PlayerTeleportEvent.TeleportCause.UNKNOWN);
-+    }
-+
-+    public TeleportTransition(WorldServer worldserver, Vec3D vec3d, Vec3D vec3d1, float f, float f1, TeleportTransition.a teleporttransition_a, PlayerTeleportEvent.TeleportCause cause) {
-+        this(worldserver, vec3d, vec3d1, f, f1, Set.of(), teleporttransition_a, cause);
-+        // CraftBukkit end
-     }
- 
-     public TeleportTransition(WorldServer worldserver, Vec3D vec3d, Vec3D vec3d1, float f, float f1, Set<Relative> set, TeleportTransition.a teleporttransition_a) {
--        this(worldserver, vec3d, vec3d1, f, f1, false, false, set, teleporttransition_a);
-+        // CraftBukkit start
-+        this(worldserver, vec3d, vec3d1, f, f1, set, teleporttransition_a, PlayerTeleportEvent.TeleportCause.UNKNOWN);
-+    }
-+
-+    public TeleportTransition(WorldServer worldserver, Vec3D vec3d, Vec3D vec3d1, float f, float f1, Set<Relative> set, TeleportTransition.a teleporttransition_a, PlayerTeleportEvent.TeleportCause cause) {
-+        this(worldserver, vec3d, vec3d1, f, f1, false, false, set, teleporttransition_a, cause);
-+        // CraftBukkit end
-     }
- 
-     public TeleportTransition(WorldServer worldserver, Entity entity, TeleportTransition.a teleporttransition_a) {
--        this(worldserver, findAdjustedSharedSpawnPos(worldserver, entity), Vec3D.ZERO, 0.0F, 0.0F, false, false, Set.of(), teleporttransition_a);
-+        // CraftBukkit start
-+        this(worldserver, entity, teleporttransition_a, PlayerTeleportEvent.TeleportCause.UNKNOWN);
-+    }
-+
-+    public TeleportTransition(WorldServer worldserver, Entity entity, TeleportTransition.a teleporttransition_a, PlayerTeleportEvent.TeleportCause cause) {
-+        this(worldserver, findAdjustedSharedSpawnPos(worldserver, entity), Vec3D.ZERO, 0.0F, 0.0F, false, false, Set.of(), teleporttransition_a, cause);
-+        // CraftBukkit end
-     }
- 
-     private static void playPortalSound(Entity entity) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/redstone/DefaultRedstoneWireEvaluator.java.patch b/paper-server/patches/sources/net/minecraft/world/level/redstone/DefaultRedstoneWireEvaluator.java.patch
new file mode 100644
index 0000000000..8862572ac8
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/redstone/DefaultRedstoneWireEvaluator.java.patch
@@ -0,0 +1,31 @@
+--- a/net/minecraft/world/level/redstone/DefaultRedstoneWireEvaluator.java
++++ b/net/minecraft/world/level/redstone/DefaultRedstoneWireEvaluator.java
+@@ -9,6 +9,10 @@
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.block.RedStoneWireBlock;
+ import net.minecraft.world.level.block.state.BlockState;
++// CraftBukkit start
++import org.bukkit.craftbukkit.block.CraftBlock;
++import org.bukkit.event.block.BlockRedstoneEvent;
++// CraftBukkit end
+ 
+ public class DefaultRedstoneWireEvaluator extends RedstoneWireEvaluator {
+ 
+@@ -20,7 +24,16 @@
+     public void updatePowerStrength(Level world, BlockPos pos, BlockState state, @Nullable Orientation orientation, boolean blockAdded) {
+         int i = this.calculateTargetStrength(world, pos);
+ 
+-        if ((Integer) state.getValue(RedStoneWireBlock.POWER) != i) {
++        // CraftBukkit start
++        int oldPower = state.getValue(RedStoneWireBlock.POWER);
++        if (oldPower != i) {
++            BlockRedstoneEvent event = new BlockRedstoneEvent(CraftBlock.at(world, pos), oldPower, i);
++            world.getCraftServer().getPluginManager().callEvent(event);
++
++            i = event.getNewCurrent();
++        }
++        if (oldPower != i) {
++            // CraftBukkit end
+             if (world.getBlockState(pos) == state) {
+                 world.setBlock(pos, (BlockState) state.setValue(RedStoneWireBlock.POWER, i), 2);
+             }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/redstone/DefaultRedstoneWireEvaluator.patch b/paper-server/patches/sources/net/minecraft/world/level/redstone/DefaultRedstoneWireEvaluator.patch
deleted file mode 100644
index c98450b075..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/redstone/DefaultRedstoneWireEvaluator.patch
+++ /dev/null
@@ -1,32 +0,0 @@
---- a/net/minecraft/world/level/redstone/DefaultRedstoneWireEvaluator.java
-+++ b/net/minecraft/world/level/redstone/DefaultRedstoneWireEvaluator.java
-@@ -10,6 +10,11 @@
- import net.minecraft.world.level.block.BlockRedstoneWire;
- import net.minecraft.world.level.block.state.IBlockData;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.block.CraftBlock;
-+import org.bukkit.event.block.BlockRedstoneEvent;
-+// CraftBukkit end
-+
- public class DefaultRedstoneWireEvaluator extends RedstoneWireEvaluator {
- 
-     public DefaultRedstoneWireEvaluator(BlockRedstoneWire blockredstonewire) {
-@@ -20,7 +25,16 @@
-     public void updatePowerStrength(World world, BlockPosition blockposition, IBlockData iblockdata, @Nullable Orientation orientation, boolean flag) {
-         int i = this.calculateTargetStrength(world, blockposition);
- 
--        if ((Integer) iblockdata.getValue(BlockRedstoneWire.POWER) != i) {
-+        // CraftBukkit start
-+        int oldPower = iblockdata.getValue(BlockRedstoneWire.POWER);
-+        if (oldPower != i) {
-+            BlockRedstoneEvent event = new BlockRedstoneEvent(CraftBlock.at(world, blockposition), oldPower, i);
-+            world.getCraftServer().getPluginManager().callEvent(event);
-+
-+            i = event.getNewCurrent();
-+        }
-+        if (oldPower != i) {
-+            // CraftBukkit end
-             if (world.getBlockState(blockposition) == iblockdata) {
-                 world.setBlock(blockposition, (IBlockData) iblockdata.setValue(BlockRedstoneWire.POWER, i), 2);
-             }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/redstone/ExperimentalRedstoneWireEvaluator.patch b/paper-server/patches/sources/net/minecraft/world/level/redstone/ExperimentalRedstoneWireEvaluator.java.patch
similarity index 62%
rename from paper-server/patches/sources/net/minecraft/world/level/redstone/ExperimentalRedstoneWireEvaluator.patch
rename to paper-server/patches/sources/net/minecraft/world/level/redstone/ExperimentalRedstoneWireEvaluator.java.patch
index 1639970766..722dc6d4f7 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/redstone/ExperimentalRedstoneWireEvaluator.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/redstone/ExperimentalRedstoneWireEvaluator.java.patch
@@ -1,24 +1,23 @@
 --- a/net/minecraft/world/level/redstone/ExperimentalRedstoneWireEvaluator.java
 +++ b/net/minecraft/world/level/redstone/ExperimentalRedstoneWireEvaluator.java
-@@ -17,6 +17,11 @@
- import net.minecraft.world.level.block.state.properties.BlockPropertyRedstoneSide;
- import net.minecraft.world.level.block.state.properties.BlockStateEnum;
- 
+@@ -16,6 +16,10 @@
+ import net.minecraft.world.level.block.state.BlockState;
+ import net.minecraft.world.level.block.state.properties.EnumProperty;
+ import net.minecraft.world.level.block.state.properties.RedstoneSide;
 +// CraftBukkit start
 +import org.bukkit.craftbukkit.block.CraftBlock;
 +import org.bukkit.event.block.BlockRedstoneEvent;
 +// CraftBukkit end
-+
+ 
  public class ExperimentalRedstoneWireEvaluator extends RedstoneWireEvaluator {
  
-     private final Deque<BlockPosition> wiresToTurnOff = new ArrayDeque();
-@@ -41,7 +46,16 @@
-             int j = unpackPower(i);
-             IBlockData iblockdata1 = world.getBlockState(blockposition1);
+@@ -41,7 +45,16 @@
+             int j = ExperimentalRedstoneWireEvaluator.unpackPower(i);
+             BlockState iblockdata1 = world.getBlockState(blockposition1);
  
--            if (iblockdata1.is((Block) this.wireBlock) && !((Integer) iblockdata1.getValue(BlockRedstoneWire.POWER)).equals(j)) {
+-            if (iblockdata1.is((Block) this.wireBlock) && !((Integer) iblockdata1.getValue(RedStoneWireBlock.POWER)).equals(j)) {
 +            // CraftBukkit start
-+            int oldPower = iblockdata.getValue(BlockRedstoneWire.POWER);
++            int oldPower = state.getValue(RedStoneWireBlock.POWER);
 +            if (oldPower != j) {
 +                BlockRedstoneEvent event = new BlockRedstoneEvent(CraftBlock.at(world, blockposition1), oldPower, j);
 +                world.getCraftServer().getPluginManager().callEvent(event);
@@ -29,4 +28,4 @@
 +                // CraftBukkit end
                  int k = 2;
  
-                 if (!flag || !flag1) {
+                 if (!blockAdded || !flag1) {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/redstone/NeighborUpdater.patch b/paper-server/patches/sources/net/minecraft/world/level/redstone/NeighborUpdater.java.patch
similarity index 54%
rename from paper-server/patches/sources/net/minecraft/world/level/redstone/NeighborUpdater.patch
rename to paper-server/patches/sources/net/minecraft/world/level/redstone/NeighborUpdater.java.patch
index 3d8cac6f43..86c3e41aec 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/redstone/NeighborUpdater.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/redstone/NeighborUpdater.java.patch
@@ -1,11 +1,15 @@
 --- a/net/minecraft/world/level/redstone/NeighborUpdater.java
 +++ b/net/minecraft/world/level/redstone/NeighborUpdater.java
-@@ -13,6 +13,13 @@
+@@ -8,11 +8,17 @@
+ import net.minecraft.core.BlockPos;
+ import net.minecraft.core.Direction;
+ import net.minecraft.core.registries.BuiltInRegistries;
++import net.minecraft.server.level.ServerLevel;
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.LevelAccessor;
  import net.minecraft.world.level.block.Block;
  import net.minecraft.world.level.block.Blocks;
- import net.minecraft.world.level.block.state.IBlockData;
-+// CraftBukkit start
-+import net.minecraft.server.level.WorldServer;
+ import net.minecraft.world.level.block.state.BlockState;
 +import org.bukkit.craftbukkit.CraftWorld;
 +import org.bukkit.craftbukkit.block.CraftBlock;
 +import org.bukkit.craftbukkit.block.data.CraftBlockData;
@@ -14,21 +18,21 @@
  
  public interface NeighborUpdater {
  
-@@ -50,6 +57,17 @@
+@@ -50,6 +56,17 @@
  
-     static void executeUpdate(World world, IBlockData iblockdata, BlockPosition blockposition, Block block, @Nullable Orientation orientation, boolean flag) {
+     static void executeUpdate(Level world, BlockState state, BlockPos pos, Block sourceBlock, @Nullable Orientation orientation, boolean notify) {
          try {
 +            // CraftBukkit start
-+            CraftWorld cworld = ((WorldServer) world).getWorld();
++            CraftWorld cworld = ((ServerLevel) world).getWorld();
 +            if (cworld != null) {
-+                BlockPhysicsEvent event = new BlockPhysicsEvent(CraftBlock.at(world, blockposition), CraftBlockData.fromData(iblockdata));
-+                ((WorldServer) world).getCraftServer().getPluginManager().callEvent(event);
++                BlockPhysicsEvent event = new BlockPhysicsEvent(CraftBlock.at(world, pos), CraftBlockData.fromData(state));
++                ((ServerLevel) world).getCraftServer().getPluginManager().callEvent(event);
 +
 +                if (event.isCancelled()) {
 +                    return;
 +                }
 +            }
 +            // CraftBukkit end
-             iblockdata.handleNeighborChanged(world, blockposition, block, orientation, flag);
+             state.handleNeighborChanged(world, pos, sourceBlock, orientation, notify);
          } catch (Throwable throwable) {
              CrashReport crashreport = CrashReport.forThrowable(throwable, "Exception while updating neighbours");
diff --git a/paper-server/patches/sources/net/minecraft/world/level/saveddata/maps/WorldMap.patch b/paper-server/patches/sources/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java.patch
similarity index 50%
rename from paper-server/patches/sources/net/minecraft/world/level/saveddata/maps/WorldMap.patch
rename to paper-server/patches/sources/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java.patch
index 88ce770f53..6c740e3304 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/saveddata/maps/WorldMap.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java.patch
@@ -1,12 +1,11 @@
---- a/net/minecraft/world/level/saveddata/maps/WorldMap.java
-+++ b/net/minecraft/world/level/saveddata/maps/WorldMap.java
-@@ -47,6 +47,17 @@
- import net.minecraft.world.level.saveddata.PersistentBase;
+--- a/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
++++ b/net/minecraft/world/level/saveddata/maps/MapItemSavedData.java
+@@ -47,6 +47,16 @@
+ import net.minecraft.world.level.saveddata.SavedData;
  import org.slf4j.Logger;
  
 +// CraftBukkit start
 +import java.util.UUID;
-+import net.minecraft.nbt.NBTBase;
 +import org.bukkit.Bukkit;
 +import org.bukkit.craftbukkit.CraftServer;
 +import org.bukkit.craftbukkit.CraftWorld;
@@ -15,11 +14,11 @@
 +import org.bukkit.craftbukkit.util.CraftChatMessage;
 +// CraftBukkit end
 +
- public class WorldMap extends PersistentBase {
+ public class MapItemSavedData extends SavedData {
  
      private static final Logger LOGGER = LogUtils.getLogger();
-@@ -70,6 +81,13 @@
-     private final Map<String, WorldMapFrame> frameMarkers = Maps.newHashMap();
+@@ -70,6 +80,13 @@
+     private final Map<String, MapFrame> frameMarkers = Maps.newHashMap();
      private int trackedDecorationCount;
  
 +    // CraftBukkit start
@@ -29,35 +28,35 @@
 +    public MapId id;
 +    // CraftBukkit end
 +
-     public static PersistentBase.a<WorldMap> factory() {
-         return new PersistentBase.a<>(() -> {
+     public static SavedData.Factory<MapItemSavedData> factory() {
+         return new SavedData.Factory<>(() -> {
              throw new IllegalStateException("Should never create an empty map saved data");
-@@ -84,6 +102,10 @@
-         this.trackingPosition = flag;
-         this.unlimitedTracking = flag1;
-         this.locked = flag2;
+@@ -84,6 +101,10 @@
+         this.trackingPosition = showDecorations;
+         this.unlimitedTracking = unlimitedTracking;
+         this.locked = locked;
 +        // CraftBukkit start
-+        mapView = new CraftMapView(this);
-+        server = (CraftServer) org.bukkit.Bukkit.getServer();
++        this.mapView = new CraftMapView(this);
++        this.server = (CraftServer) org.bukkit.Bukkit.getServer();
 +        // CraftBukkit end
      }
  
-     public static WorldMap createFresh(double d0, double d1, byte b0, boolean flag, boolean flag1, ResourceKey<World> resourcekey) {
-@@ -101,12 +123,30 @@
+     public static MapItemSavedData createFresh(double centerX, double centerZ, byte scale, boolean showDecorations, boolean unlimitedTracking, ResourceKey<Level> dimension) {
+@@ -101,12 +122,30 @@
      }
  
-     public static WorldMap load(NBTTagCompound nbttagcompound, HolderLookup.a holderlookup_a) {
--        DataResult dataresult = DimensionManager.parseLegacy(new Dynamic(DynamicOpsNBT.INSTANCE, nbttagcompound.get("dimension")));
-+        DataResult<ResourceKey<World>> dataresult = DimensionManager.parseLegacy(new Dynamic(DynamicOpsNBT.INSTANCE, nbttagcompound.get("dimension"))); // CraftBukkit - decompile error
-         Logger logger = WorldMap.LOGGER;
+     public static MapItemSavedData load(CompoundTag nbt, HolderLookup.Provider registries) {
+-        DataResult dataresult = DimensionType.parseLegacy(new Dynamic(NbtOps.INSTANCE, nbt.get("dimension")));
++        DataResult<ResourceKey<Level>> dataresult = DimensionType.parseLegacy(new Dynamic(NbtOps.INSTANCE, nbt.get("dimension"))); // CraftBukkit - decompile error
+         Logger logger = MapItemSavedData.LOGGER;
  
          Objects.requireNonNull(logger);
--        ResourceKey<World> resourcekey = (ResourceKey) dataresult.resultOrPartial(logger::error).orElseThrow(() -> {
--            return new IllegalArgumentException("Invalid map dimension: " + String.valueOf(nbttagcompound.get("dimension")));
+-        ResourceKey<Level> resourcekey = (ResourceKey) dataresult.resultOrPartial(logger::error).orElseThrow(() -> {
+-            return new IllegalArgumentException("Invalid map dimension: " + String.valueOf(nbt.get("dimension")));
 +        // CraftBukkit start
-+        ResourceKey<World> resourcekey = (ResourceKey) dataresult.resultOrPartial(logger::error).orElseGet(() -> {
-+            long least = nbttagcompound.getLong("UUIDLeast");
-+            long most = nbttagcompound.getLong("UUIDMost");
++        ResourceKey<Level> resourcekey = (ResourceKey) dataresult.resultOrPartial(logger::error).orElseGet(() -> {
++            long least = nbt.getLong("UUIDLeast");
++            long most = nbt.getLong("UUIDMost");
 +
 +            if (least != 0L && most != 0L) {
 +                UUID uniqueId = new UUID(most, least);
@@ -72,37 +71,37 @@
 +                    return world.getHandle().dimension();
 +                }
 +            }
-+            throw new IllegalArgumentException("Invalid map dimension: " + String.valueOf(nbttagcompound.get("dimension")));
++            throw new IllegalArgumentException("Invalid map dimension: " + String.valueOf(nbt.get("dimension")));
 +            // CraftBukkit end
          });
-         int i = nbttagcompound.getInt("xCenter");
-         int j = nbttagcompound.getInt("zCenter");
-@@ -131,7 +171,8 @@
-             MapIconBanner mapiconbanner = (MapIconBanner) iterator.next();
+         int i = nbt.getInt("xCenter");
+         int j = nbt.getInt("zCenter");
+@@ -131,7 +170,8 @@
+             MapBanner mapiconbanner = (MapBanner) iterator.next();
  
              worldmap.bannerMarkers.put(mapiconbanner.getId(), mapiconbanner);
--            worldmap.addDecoration(mapiconbanner.getDecoration(), (GeneratorAccess) null, mapiconbanner.getId(), (double) mapiconbanner.pos().getX(), (double) mapiconbanner.pos().getZ(), 180.0D, (IChatBaseComponent) mapiconbanner.name().orElse((Object) null));
+-            worldmap.addDecoration(mapiconbanner.getDecoration(), (LevelAccessor) null, mapiconbanner.getId(), (double) mapiconbanner.pos().getX(), (double) mapiconbanner.pos().getZ(), 180.0D, (Component) mapiconbanner.name().orElse((Object) null));
 +            // CraftBukkit - decompile error
-+            worldmap.addDecoration(mapiconbanner.getDecoration(), (GeneratorAccess) null, mapiconbanner.getId(), (double) mapiconbanner.pos().getX(), (double) mapiconbanner.pos().getZ(), 180.0D, (IChatBaseComponent) mapiconbanner.name().orElse(null));
++            worldmap.addDecoration(mapiconbanner.getDecoration(), (LevelAccessor) null, mapiconbanner.getId(), (double) mapiconbanner.pos().getX(), (double) mapiconbanner.pos().getZ(), 180.0D, (Component) mapiconbanner.name().orElse(null));
          }
  
-         NBTTagList nbttaglist = nbttagcompound.getList("frames", 10);
-@@ -150,13 +191,32 @@
+         ListTag nbttaglist = nbt.getList("frames", 10);
+@@ -150,13 +190,32 @@
  
      @Override
-     public NBTTagCompound save(NBTTagCompound nbttagcompound, HolderLookup.a holderlookup_a) {
--        DataResult dataresult = MinecraftKey.CODEC.encodeStart(DynamicOpsNBT.INSTANCE, this.dimension.location());
-+        DataResult<NBTBase> dataresult = MinecraftKey.CODEC.encodeStart(DynamicOpsNBT.INSTANCE, this.dimension.location()); // CraftBukkit - decompile error
-         Logger logger = WorldMap.LOGGER;
+     public CompoundTag save(CompoundTag nbt, HolderLookup.Provider registries) {
+-        DataResult dataresult = ResourceLocation.CODEC.encodeStart(NbtOps.INSTANCE, this.dimension.location());
++        DataResult<Tag> dataresult = ResourceLocation.CODEC.encodeStart(NbtOps.INSTANCE, this.dimension.location()); // CraftBukkit - decompile error
+         Logger logger = MapItemSavedData.LOGGER;
  
          Objects.requireNonNull(logger);
          dataresult.resultOrPartial(logger::error).ifPresent((nbtbase) -> {
-             nbttagcompound.put("dimension", nbtbase);
+             nbt.put("dimension", nbtbase);
          });
 +        // CraftBukkit start
 +        if (true) {
 +            if (this.uniqueId == null) {
-+                for (org.bukkit.World world : server.getWorlds()) {
++                for (org.bukkit.World world : this.server.getWorlds()) {
 +                    CraftWorld cWorld = (CraftWorld) world;
 +                    if (cWorld.getHandle().dimension() == this.dimension) {
 +                        this.uniqueId = cWorld.getUID();
@@ -113,46 +112,46 @@
 +            /* Perform a second check to see if a matching world was found, this is a necessary
 +               change incase Maps are forcefully unlinked from a World and lack a UID.*/
 +            if (this.uniqueId != null) {
-+                nbttagcompound.putLong("UUIDLeast", this.uniqueId.getLeastSignificantBits());
-+                nbttagcompound.putLong("UUIDMost", this.uniqueId.getMostSignificantBits());
++                nbt.putLong("UUIDLeast", this.uniqueId.getLeastSignificantBits());
++                nbt.putLong("UUIDMost", this.uniqueId.getMostSignificantBits());
 +            }
 +        }
 +        // CraftBukkit end
-         nbttagcompound.putInt("xCenter", this.centerX);
-         nbttagcompound.putInt("zCenter", this.centerZ);
-         nbttagcompound.putByte("scale", this.scale);
-@@ -443,7 +503,7 @@
+         nbt.putInt("xCenter", this.centerX);
+         nbt.putInt("zCenter", this.centerZ);
+         nbt.putByte("scale", this.scale);
+@@ -443,7 +502,7 @@
  
              if (!this.isTrackedCountOverLimit(256)) {
                  this.bannerMarkers.put(mapiconbanner.getId(), mapiconbanner);
--                this.addDecoration(mapiconbanner.getDecoration(), generatoraccess, mapiconbanner.getId(), d0, d1, 180.0D, (IChatBaseComponent) mapiconbanner.name().orElse((Object) null));
-+                this.addDecoration(mapiconbanner.getDecoration(), generatoraccess, mapiconbanner.getId(), d0, d1, 180.0D, (IChatBaseComponent) mapiconbanner.name().orElse(null)); // CraftBukkit - decompile error
+-                this.addDecoration(mapiconbanner.getDecoration(), world, mapiconbanner.getId(), d0, d1, 180.0D, (Component) mapiconbanner.name().orElse((Object) null));
++                this.addDecoration(mapiconbanner.getDecoration(), world, mapiconbanner.getId(), d0, d1, 180.0D, (Component) mapiconbanner.name().orElse(null)); // CraftBukkit - decompile error
                  return true;
              }
          }
-@@ -554,7 +614,7 @@
+@@ -554,7 +613,7 @@
              this.player = entityhuman;
          }
  
--        private WorldMap.c createPatch() {
-+        private WorldMap.c createPatch(byte[] buffer) { // CraftBukkit
+-        private MapItemSavedData.MapPatch createPatch() {
++        private MapItemSavedData.MapPatch createPatch(byte[] buffer) { // CraftBukkit
              int i = this.minDirtyX;
              int j = this.minDirtyY;
              int k = this.maxDirtyX + 1 - this.minDirtyX;
-@@ -563,7 +623,7 @@
+@@ -563,7 +622,7 @@
  
              for (int i1 = 0; i1 < k; ++i1) {
                  for (int j1 = 0; j1 < l; ++j1) {
--                    abyte[i1 + j1 * k] = WorldMap.this.colors[i + i1 + (j + j1) * 128];
+-                    abyte[i1 + j1 * k] = MapItemSavedData.this.colors[i + i1 + (j + j1) * 128];
 +                    abyte[i1 + j1 * k] = buffer[i + i1 + (j + j1) * 128]; // CraftBukkit
                  }
              }
  
-@@ -573,19 +633,29 @@
+@@ -573,19 +632,29 @@
          @Nullable
-         Packet<?> nextUpdatePacket(MapId mapid) {
-             WorldMap.c worldmap_c;
-+            org.bukkit.craftbukkit.map.RenderData render = WorldMap.this.mapView.render((org.bukkit.craftbukkit.entity.CraftPlayer) this.player.getBukkitEntity()); // CraftBukkit
+         Packet<?> nextUpdatePacket(MapId mapId) {
+             MapItemSavedData.MapPatch worldmap_c;
++            org.bukkit.craftbukkit.map.RenderData render = MapItemSavedData.this.mapView.render((org.bukkit.craftbukkit.entity.CraftPlayer) this.player.getBukkitEntity()); // CraftBukkit
  
              if (this.dirtyData) {
                  this.dirtyData = false;
@@ -167,13 +166,13 @@
 -            if (this.dirtyDecorations && this.tick++ % 5 == 0) {
 +            if ((true || this.dirtyDecorations) && this.tick++ % 5 == 0) { // CraftBukkit - custom maps don't update this yet
                  this.dirtyDecorations = false;
--                collection = WorldMap.this.decorations.values();
+-                collection = MapItemSavedData.this.decorations.values();
 +                // CraftBukkit start
-+                java.util.Collection<MapIcon> icons = new java.util.ArrayList<MapIcon>();
++                java.util.Collection<MapDecoration> icons = new java.util.ArrayList<MapDecoration>();
 +
 +                for (org.bukkit.map.MapCursor cursor : render.cursors) {
 +                    if (cursor.isVisible()) {
-+                        icons.add(new MapIcon(CraftMapCursor.CraftType.bukkitToMinecraftHolder(cursor.getType()), cursor.getX(), cursor.getY(), cursor.getDirection(), CraftChatMessage.fromStringOrOptional(cursor.getCaption())));
++                        icons.add(new MapDecoration(CraftMapCursor.CraftType.bukkitToMinecraftHolder(cursor.getType()), cursor.getX(), cursor.getY(), cursor.getDirection(), CraftChatMessage.fromStringOrOptional(cursor.getCaption())));
 +                    }
 +                }
 +                collection = icons;
diff --git a/paper-server/patches/sources/net/minecraft/world/level/storage/Convertable.patch b/paper-server/patches/sources/net/minecraft/world/level/storage/Convertable.patch
deleted file mode 100644
index c2b8131482..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/storage/Convertable.patch
+++ /dev/null
@@ -1,108 +0,0 @@
---- a/net/minecraft/world/level/storage/Convertable.java
-+++ b/net/minecraft/world/level/storage/Convertable.java
-@@ -78,6 +78,10 @@
- import net.minecraft.world.level.validation.PathAllowList;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import net.minecraft.world.level.dimension.WorldDimension;
-+// CraftBukkit end
-+
- public class Convertable {
- 
-     static final Logger LOGGER = LogUtils.getLogger();
-@@ -149,7 +153,7 @@
-     }
- 
-     public static WorldDataConfiguration readDataConfig(Dynamic<?> dynamic) {
--        DataResult dataresult = WorldDataConfiguration.CODEC.parse(dynamic);
-+        DataResult<WorldDataConfiguration> dataresult = WorldDataConfiguration.CODEC.parse(dynamic); // CraftBukkit - decompile error
-         Logger logger = Convertable.LOGGER;
- 
-         Objects.requireNonNull(logger);
-@@ -168,6 +172,7 @@
-         WorldDimensions.b worlddimensions_b = generatorsettings.dimensions().bake(iregistry);
-         Lifecycle lifecycle = worlddimensions_b.lifecycle().add(holderlookup_a.allRegistriesLifecycle());
-         WorldDataServer worlddataserver = WorldDataServer.parse(dynamic1, worldsettings, worlddimensions_b.specialWorldProperty(), generatorsettings.options(), lifecycle);
-+        worlddataserver.pdc = ((Dynamic<NBTBase>) dynamic1).getElement("BukkitValues", null); // CraftBukkit - Add PDC to world
- 
-         return new LevelDataAndDimensions(worlddataserver, worlddimensions_b);
-     }
-@@ -409,27 +414,41 @@
-         return this.backupDir;
-     }
- 
--    public Convertable.ConversionSession validateAndCreateAccess(String s) throws IOException, ContentValidationException {
-+    public Convertable.ConversionSession validateAndCreateAccess(String s, ResourceKey<WorldDimension> dimensionType) throws IOException, ContentValidationException { // CraftBukkit
-         Path path = this.getLevelPath(s);
-         List<ForbiddenSymlinkInfo> list = this.worldDirValidator.validateDirectory(path, true);
- 
-         if (!list.isEmpty()) {
-             throw new ContentValidationException(path, list);
-         } else {
--            return new Convertable.ConversionSession(s, path);
-+            return new Convertable.ConversionSession(s, path, dimensionType); // CraftBukkit
-         }
-     }
- 
--    public Convertable.ConversionSession createAccess(String s) throws IOException {
-+    public Convertable.ConversionSession createAccess(String s, ResourceKey<WorldDimension> dimensionType) throws IOException { // CraftBukkit
-         Path path = this.getLevelPath(s);
- 
--        return new Convertable.ConversionSession(s, path);
-+        return new Convertable.ConversionSession(s, path, dimensionType); // CraftBukkit
-     }
- 
-     public DirectoryValidator getWorldDirValidator() {
-         return this.worldDirValidator;
-     }
- 
-+    // CraftBukkit start
-+    public static Path getStorageFolder(Path path, ResourceKey<WorldDimension> dimensionType) {
-+        if (dimensionType == WorldDimension.OVERWORLD) {
-+            return path;
-+        } else if (dimensionType == WorldDimension.NETHER) {
-+            return path.resolve("DIM-1");
-+        } else if (dimensionType == WorldDimension.END) {
-+            return path.resolve("DIM1");
-+        } else {
-+            return path.resolve("dimensions").resolve(dimensionType.location().getNamespace()).resolve(dimensionType.location().getPath());
-+        }
-+    }
-+    // CraftBukkit end
-+
-     public static record a(List<Convertable.b> levels) implements Iterable<Convertable.b> {
- 
-         public boolean isEmpty() {
-@@ -488,8 +507,12 @@
-         public final Convertable.b levelDirectory;
-         private final String levelId;
-         private final Map<SavedFile, Path> resources = Maps.newHashMap();
-+        // CraftBukkit start
-+        public final ResourceKey<WorldDimension> dimensionType;
- 
--        ConversionSession(final String s, final Path path) throws IOException {
-+        ConversionSession(final String s, final Path path, final ResourceKey<WorldDimension> dimensionType) throws IOException {
-+            this.dimensionType = dimensionType;
-+            // CraftBukkit end
-             this.levelId = s;
-             this.levelDirectory = new Convertable.b(path);
-             this.lock = SessionLock.create(path);
-@@ -529,7 +552,7 @@
-         }
- 
-         public Path getLevelPath(SavedFile savedfile) {
--            Map map = this.resources;
-+            Map<SavedFile, Path> map = this.resources; // CraftBukkit - decompile error
-             Convertable.b convertable_b = this.levelDirectory;
- 
-             Objects.requireNonNull(this.levelDirectory);
-@@ -537,7 +560,7 @@
-         }
- 
-         public Path getDimensionPath(ResourceKey<World> resourcekey) {
--            return DimensionManager.getStorageFolder(resourcekey, this.levelDirectory.path());
-+            return getStorageFolder(this.levelDirectory.path(), this.dimensionType); // CraftBukkit
-         }
- 
-         private void checkLock() {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/storage/LevelStorageSource.java.patch b/paper-server/patches/sources/net/minecraft/world/level/storage/LevelStorageSource.java.patch
new file mode 100644
index 0000000000..90b7400290
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/storage/LevelStorageSource.java.patch
@@ -0,0 +1,106 @@
+--- a/net/minecraft/world/level/storage/LevelStorageSource.java
++++ b/net/minecraft/world/level/storage/LevelStorageSource.java
+@@ -68,7 +68,6 @@
+ import net.minecraft.world.level.Level;
+ import net.minecraft.world.level.LevelSettings;
+ import net.minecraft.world.level.WorldDataConfiguration;
+-import net.minecraft.world.level.dimension.DimensionType;
+ import net.minecraft.world.level.dimension.LevelStem;
+ import net.minecraft.world.level.levelgen.WorldDimensions;
+ import net.minecraft.world.level.levelgen.WorldGenSettings;
+@@ -149,7 +148,7 @@
+     }
+ 
+     public static WorldDataConfiguration readDataConfig(Dynamic<?> dynamic) {
+-        DataResult dataresult = WorldDataConfiguration.CODEC.parse(dynamic);
++        DataResult<WorldDataConfiguration> dataresult = WorldDataConfiguration.CODEC.parse(dynamic); // CraftBukkit - decompile error
+         Logger logger = LevelStorageSource.LOGGER;
+ 
+         Objects.requireNonNull(logger);
+@@ -168,6 +167,7 @@
+         WorldDimensions.Complete worlddimensions_b = generatorsettings.dimensions().bake(dimensionsRegistry);
+         Lifecycle lifecycle = worlddimensions_b.lifecycle().add(registries.allRegistriesLifecycle());
+         PrimaryLevelData worlddataserver = PrimaryLevelData.parse(dynamic1, worldsettings, worlddimensions_b.specialWorldProperty(), generatorsettings.options(), lifecycle);
++        worlddataserver.pdc = ((Dynamic<Tag>) dynamic1).getElement("BukkitValues", null); // CraftBukkit - Add PDC to world
+ 
+         return new LevelDataAndDimensions(worlddataserver, worlddimensions_b);
+     }
+@@ -409,26 +409,40 @@
+         return this.backupDir;
+     }
+ 
+-    public LevelStorageSource.LevelStorageAccess validateAndCreateAccess(String directoryName) throws IOException, ContentValidationException {
+-        Path path = this.getLevelPath(directoryName);
++    public LevelStorageSource.LevelStorageAccess validateAndCreateAccess(String s, ResourceKey<LevelStem> dimensionType) throws IOException, ContentValidationException { // CraftBukkit
++        Path path = this.getLevelPath(s);
+         List<ForbiddenSymlinkInfo> list = this.worldDirValidator.validateDirectory(path, true);
+ 
+         if (!list.isEmpty()) {
+             throw new ContentValidationException(path, list);
+         } else {
+-            return new LevelStorageSource.LevelStorageAccess(directoryName, path);
++            return new LevelStorageSource.LevelStorageAccess(s, path, dimensionType); // CraftBukkit
+         }
+     }
+ 
+-    public LevelStorageSource.LevelStorageAccess createAccess(String directoryName) throws IOException {
+-        Path path = this.getLevelPath(directoryName);
++    public LevelStorageSource.LevelStorageAccess createAccess(String s, ResourceKey<LevelStem> dimensionType) throws IOException { // CraftBukkit
++        Path path = this.getLevelPath(s);
+ 
+-        return new LevelStorageSource.LevelStorageAccess(directoryName, path);
++        return new LevelStorageSource.LevelStorageAccess(s, path, dimensionType); // CraftBukkit
+     }
+ 
+     public DirectoryValidator getWorldDirValidator() {
+         return this.worldDirValidator;
++    }
++
++    // CraftBukkit start
++    public static Path getStorageFolder(Path path, ResourceKey<LevelStem> dimensionType) {
++        if (dimensionType == LevelStem.OVERWORLD) {
++            return path;
++        } else if (dimensionType == LevelStem.NETHER) {
++            return path.resolve("DIM-1");
++        } else if (dimensionType == LevelStem.END) {
++            return path.resolve("DIM1");
++        } else {
++            return path.resolve("dimensions").resolve(dimensionType.location().getNamespace()).resolve(dimensionType.location().getPath());
++        }
+     }
++    // CraftBukkit end
+ 
+     public static record LevelCandidates(List<LevelStorageSource.LevelDirectory> levels) implements Iterable<LevelStorageSource.LevelDirectory> {
+ 
+@@ -488,8 +502,12 @@
+         public final LevelStorageSource.LevelDirectory levelDirectory;
+         private final String levelId;
+         private final Map<LevelResource, Path> resources = Maps.newHashMap();
++        // CraftBukkit start
++        public final ResourceKey<LevelStem> dimensionType;
+ 
+-        LevelStorageAccess(final String s, final Path path) throws IOException {
++        LevelStorageAccess(final String s, final Path path, final ResourceKey<LevelStem> dimensionType) throws IOException {
++            this.dimensionType = dimensionType;
++            // CraftBukkit end
+             this.levelId = s;
+             this.levelDirectory = new LevelStorageSource.LevelDirectory(path);
+             this.lock = DirectoryLock.create(path);
+@@ -529,7 +547,7 @@
+         }
+ 
+         public Path getLevelPath(LevelResource savePath) {
+-            Map map = this.resources;
++            Map<LevelResource, Path> map = this.resources; // CraftBukkit - decompile error
+             LevelStorageSource.LevelDirectory convertable_b = this.levelDirectory;
+ 
+             Objects.requireNonNull(this.levelDirectory);
+@@ -537,7 +555,7 @@
+         }
+ 
+         public Path getDimensionPath(ResourceKey<Level> key) {
+-            return DimensionType.getStorageFolder(key, this.levelDirectory.path());
++            return LevelStorageSource.getStorageFolder(this.levelDirectory.path(), this.dimensionType); // CraftBukkit
+         }
+ 
+         private void checkLock() {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/storage/PlayerDataStorage.java.patch b/paper-server/patches/sources/net/minecraft/world/level/storage/PlayerDataStorage.java.patch
new file mode 100644
index 0000000000..d2bf4deb10
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/storage/PlayerDataStorage.java.patch
@@ -0,0 +1,109 @@
+--- a/net/minecraft/world/level/storage/PlayerDataStorage.java
++++ b/net/minecraft/world/level/storage/PlayerDataStorage.java
+@@ -15,8 +15,10 @@
+ import net.minecraft.nbt.NbtAccounter;
+ import net.minecraft.nbt.NbtIo;
+ import net.minecraft.nbt.NbtUtils;
++import net.minecraft.server.level.ServerPlayer;
+ import net.minecraft.util.datafix.DataFixTypes;
+ import net.minecraft.world.entity.player.Player;
++import org.bukkit.craftbukkit.entity.CraftPlayer;
+ import org.slf4j.Logger;
+ 
+ public class PlayerDataStorage {
+@@ -49,34 +51,36 @@
+ 
+     }
+ 
+-    private void backup(Player player, String extension) {
++    private void backup(String name, String s1, String s) { // name, uuid, extension
+         Path path = this.playerDir.toPath();
+-        String s1 = player.getStringUUID();
+-        Path path1 = path.resolve(s1 + extension);
++        // String s1 = entityhuman.getStringUUID(); // CraftBukkit - used above
++        Path path1 = path.resolve(s1 + s);
+ 
+-        s1 = player.getStringUUID();
+-        Path path2 = path.resolve(s1 + "_corrupted_" + LocalDateTime.now().format(PlayerDataStorage.FORMATTER) + extension);
++        // s1 = entityhuman.getStringUUID(); // CraftBukkit - used above
++        Path path2 = path.resolve(s1 + "_corrupted_" + LocalDateTime.now().format(PlayerDataStorage.FORMATTER) + s);
+ 
+         if (Files.isRegularFile(path1, new LinkOption[0])) {
+             try {
+                 Files.copy(path1, path2, StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES);
+             } catch (Exception exception) {
+-                PlayerDataStorage.LOGGER.warn("Failed to copy the player.dat file for {}", player.getName().getString(), exception);
++                PlayerDataStorage.LOGGER.warn("Failed to copy the player.dat file for {}", name, exception); // CraftBukkit
+             }
+ 
+         }
+     }
+ 
+-    private Optional<CompoundTag> load(Player player, String extension) {
++    // CraftBukkit start
++    private Optional<CompoundTag> load(String name, String s1, String s) { // name, uuid, extension
++        // CraftBukkit end
+         File file = this.playerDir;
+-        String s1 = player.getStringUUID();
+-        File file1 = new File(file, s1 + extension);
++        // String s1 = entityhuman.getStringUUID(); // CraftBukkit - used above
++        File file1 = new File(file, s1 + s);
+ 
+         if (file1.exists() && file1.isFile()) {
+             try {
+                 return Optional.of(NbtIo.readCompressed(file1.toPath(), NbtAccounter.unlimitedHeap()));
+             } catch (Exception exception) {
+-                PlayerDataStorage.LOGGER.warn("Failed to load player data for {}", player.getName().getString());
++                PlayerDataStorage.LOGGER.warn("Failed to load player data for {}", name); // CraftBukkit
+             }
+         }
+ 
+@@ -84,20 +88,44 @@
+     }
+ 
+     public Optional<CompoundTag> load(Player player) {
+-        Optional<CompoundTag> optional = this.load(player, ".dat");
++        // CraftBukkit start
++        return this.load(player.getName().getString(), player.getStringUUID()).map((nbttagcompound) -> {
++            if (player instanceof ServerPlayer) {
++                CraftPlayer player1 = (CraftPlayer) player.getBukkitEntity();
++                // Only update first played if it is older than the one we have
++                long modified = new File(this.playerDir, player.getStringUUID() + ".dat").lastModified();
++                if (modified < player1.getFirstPlayed()) {
++                    player1.setFirstPlayed(modified);
++                }
++            }
+ 
++            player.load(nbttagcompound); // From below
++            return nbttagcompound;
++        });
++    }
++
++    public Optional<CompoundTag> load(String name, String uuid) {
++        // CraftBukkit end
++        Optional<CompoundTag> optional = this.load(name, uuid, ".dat"); // CraftBukkit
++
+         if (optional.isEmpty()) {
+-            this.backup(player, ".dat");
++            this.backup(name, uuid, ".dat"); // CraftBukkit
+         }
+ 
+         return optional.or(() -> {
+-            return this.load(player, ".dat_old");
++            return this.load(name, uuid, ".dat_old"); // CraftBukkit
+         }).map((nbttagcompound) -> {
+             int i = NbtUtils.getDataVersion(nbttagcompound, -1);
+ 
+             nbttagcompound = DataFixTypes.PLAYER.updateToCurrentVersion(this.fixerUpper, nbttagcompound, i);
+-            player.load(nbttagcompound);
++            // entityhuman.load(nbttagcompound); // CraftBukkit - handled above
+             return nbttagcompound;
+         });
+     }
++
++    // CraftBukkit start
++    public File getPlayerDir() {
++        return this.playerDir;
++    }
++    // CraftBukkit end
+ }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/storage/PrimaryLevelData.java.patch b/paper-server/patches/sources/net/minecraft/world/level/storage/PrimaryLevelData.java.patch
new file mode 100644
index 0000000000..8f0d3bde87
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/storage/PrimaryLevelData.java.patch
@@ -0,0 +1,192 @@
+--- a/net/minecraft/world/level/storage/PrimaryLevelData.java
++++ b/net/minecraft/world/level/storage/PrimaryLevelData.java
+@@ -20,15 +20,12 @@
+ import net.minecraft.SharedConstants;
+ import net.minecraft.Util;
+ import net.minecraft.core.BlockPos;
++import net.minecraft.core.Registry;
+ import net.minecraft.core.RegistryAccess;
+ import net.minecraft.core.UUIDUtil;
+-import net.minecraft.nbt.CompoundTag;
+-import net.minecraft.nbt.ListTag;
+-import net.minecraft.nbt.NbtOps;
+-import net.minecraft.nbt.NbtUtils;
+-import net.minecraft.nbt.StringTag;
+-import net.minecraft.nbt.Tag;
+ import net.minecraft.server.MinecraftServer;
++import net.minecraft.server.level.ServerLevel;
++import net.minecraft.server.level.ServerPlayer;
+ import net.minecraft.world.Difficulty;
+ import net.minecraft.world.level.GameRules;
+ import net.minecraft.world.level.GameType;
+@@ -36,12 +33,26 @@
+ import net.minecraft.world.level.LevelSettings;
+ import net.minecraft.world.level.WorldDataConfiguration;
+ import net.minecraft.world.level.border.WorldBorder;
++import net.minecraft.world.level.dimension.LevelStem;
+ import net.minecraft.world.level.dimension.end.EndDragonFight;
+-import net.minecraft.world.level.levelgen.WorldGenSettings;
+ import net.minecraft.world.level.levelgen.WorldOptions;
+ import net.minecraft.world.level.timers.TimerCallbacks;
+ import net.minecraft.world.level.timers.TimerQueue;
+ import org.slf4j.Logger;
++import net.minecraft.core.registries.Registries;
++import net.minecraft.nbt.CompoundTag;
++import net.minecraft.nbt.ListTag;
++import net.minecraft.nbt.NbtOps;
++import net.minecraft.nbt.NbtUtils;
++import net.minecraft.nbt.StringTag;
++import net.minecraft.nbt.Tag;
++import net.minecraft.network.protocol.game.ClientboundChangeDifficultyPacket;
++import net.minecraft.world.level.levelgen.WorldDimensions;
++import net.minecraft.world.level.levelgen.WorldGenSettings;
++import org.bukkit.Bukkit;
++import org.bukkit.event.weather.ThunderChangeEvent;
++import org.bukkit.event.weather.WeatherChangeEvent;
++// CraftBukkit end
+ 
+ public class PrimaryLevelData implements ServerLevelData, WorldData {
+ 
+@@ -79,7 +90,21 @@
+     private boolean wasModded;
+     private final Set<String> removedFeatureFlags;
+     private final TimerQueue<MinecraftServer> scheduledEvents;
++    // CraftBukkit start - Add world and pdc
++    public Registry<LevelStem> customDimensions;
++    private ServerLevel world;
++    protected Tag pdc;
+ 
++    public void setWorld(ServerLevel world) {
++        if (this.world != null) {
++            return;
++        }
++        this.world = world;
++        world.getWorld().readBukkitValues(this.pdc);
++        this.pdc = null;
++    }
++    // CraftBukkit end
++
+     private PrimaryLevelData(@Nullable CompoundTag playerData, boolean modded, BlockPos spawnPos, float spawnAngle, long time, long timeOfDay, int version, int clearWeatherTime, int rainTime, boolean raining, int thunderTime, boolean thundering, boolean initialized, boolean difficultyLocked, WorldBorder.Settings worldBorder, int wanderingTraderSpawnDelay, int wanderingTraderSpawnChance, @Nullable UUID wanderingTraderId, Set<String> serverBrands, Set<String> removedFeatures, TimerQueue<MinecraftServer> scheduledEvents, @Nullable CompoundTag customBossEvents, EndDragonFight.Data dragonFight, LevelSettings levelInfo, WorldOptions generatorOptions, PrimaryLevelData.SpecialWorldProperty specialProperty, Lifecycle lifecycle) {
+         this.wasModded = modded;
+         this.spawnPos = spawnPos;
+@@ -116,7 +141,7 @@
+ 
+     public static <T> PrimaryLevelData parse(Dynamic<T> dynamic, LevelSettings info, PrimaryLevelData.SpecialWorldProperty specialProperty, WorldOptions generatorOptions, Lifecycle lifecycle) {
+         long i = dynamic.get("Time").asLong(0L);
+-        OptionalDynamic optionaldynamic = dynamic.get("Player");
++        OptionalDynamic<T> optionaldynamic = dynamic.get("Player"); // CraftBukkit - decompile error
+         Codec codec = CompoundTag.CODEC;
+ 
+         Objects.requireNonNull(codec);
+@@ -136,7 +161,7 @@
+         WorldBorder.Settings worldborder_c = WorldBorder.Settings.read(dynamic, WorldBorder.DEFAULT_SETTINGS);
+         int k1 = dynamic.get("WanderingTraderSpawnDelay").asInt(0);
+         int l1 = dynamic.get("WanderingTraderSpawnChance").asInt(0);
+-        UUID uuid = (UUID) dynamic.get("WanderingTraderId").read(UUIDUtil.CODEC).result().orElse((Object) null);
++        UUID uuid = (UUID) dynamic.get("WanderingTraderId").read(UUIDUtil.CODEC).result().orElse(null); // CraftBukkit - decompile error
+         Set set = (Set) dynamic.get("ServerBrands").asStream().flatMap((dynamic1) -> {
+             return dynamic1.asString().result().stream();
+         }).collect(Collectors.toCollection(Sets::newLinkedHashSet));
+@@ -145,7 +170,7 @@
+         }).collect(Collectors.toSet());
+         TimerQueue customfunctioncallbacktimerqueue = new TimerQueue<>(TimerCallbacks.SERVER_CALLBACKS, dynamic.get("ScheduledEvents").asStream());
+         CompoundTag nbttagcompound1 = (CompoundTag) dynamic.get("CustomBossEvents").orElseEmptyMap().getValue();
+-        DataResult dataresult = dynamic.get("DragonFight").read(EndDragonFight.Data.CODEC);
++        DataResult<EndDragonFight.Data> dataresult = dynamic.get("DragonFight").read(EndDragonFight.Data.CODEC); // CraftBukkit - decompile error
+         Logger logger = PrimaryLevelData.LOGGER;
+ 
+         Objects.requireNonNull(logger);
+@@ -180,7 +205,7 @@
+         levelNbt.put("Version", nbttagcompound2);
+         NbtUtils.addCurrentDataVersion(levelNbt);
+         DynamicOps<Tag> dynamicops = registryManager.createSerializationContext(NbtOps.INSTANCE);
+-        DataResult dataresult = WorldGenSettings.encode(dynamicops, this.worldOptions, registryManager);
++        DataResult<Tag> dataresult = WorldGenSettings.encode(dynamicops, this.worldOptions, new WorldDimensions(this.customDimensions != null ? this.customDimensions : registryManager.lookupOrThrow(Registries.LEVEL_STEM))); // CraftBukkit
+         Logger logger = PrimaryLevelData.LOGGER;
+ 
+         Objects.requireNonNull(logger);
+@@ -230,11 +255,13 @@
+             levelNbt.putUUID("WanderingTraderId", this.wanderingTraderId);
+         }
+ 
++        levelNbt.putString("Bukkit.Version", Bukkit.getName() + "/" + Bukkit.getVersion() + "/" + Bukkit.getBukkitVersion()); // CraftBukkit
++        this.world.getWorld().storeBukkitValues(levelNbt); // CraftBukkit - add pdc
+     }
+ 
+     private static ListTag stringCollectionToTag(Set<String> strings) {
+         ListTag nbttaglist = new ListTag();
+-        Stream stream = strings.stream().map(StringTag::valueOf);
++        Stream<StringTag> stream = strings.stream().map(StringTag::valueOf); // CraftBukkit - decompile error
+ 
+         Objects.requireNonNull(nbttaglist);
+         stream.forEach(nbttaglist::add);
+@@ -310,6 +337,20 @@
+ 
+     @Override
+     public void setThundering(boolean thundering) {
++        // CraftBukkit start
++        if (this.thundering == thundering) {
++            return;
++        }
++
++        org.bukkit.World world = Bukkit.getWorld(this.getLevelName());
++        if (world != null) {
++            ThunderChangeEvent thunder = new ThunderChangeEvent(world, thundering);
++            Bukkit.getServer().getPluginManager().callEvent(thunder);
++            if (thunder.isCancelled()) {
++                return;
++            }
++        }
++        // CraftBukkit end
+         this.thundering = thundering;
+     }
+ 
+@@ -330,6 +371,20 @@
+ 
+     @Override
+     public void setRaining(boolean raining) {
++        // CraftBukkit start
++        if (this.raining == raining) {
++            return;
++        }
++
++        org.bukkit.World world = Bukkit.getWorld(this.getLevelName());
++        if (world != null) {
++            WeatherChangeEvent weather = new WeatherChangeEvent(world, raining);
++            Bukkit.getServer().getPluginManager().callEvent(weather);
++            if (weather.isCancelled()) {
++                return;
++            }
++        }
++        // CraftBukkit end
+         this.raining = raining;
+     }
+ 
+@@ -396,6 +451,12 @@
+     @Override
+     public void setDifficulty(Difficulty difficulty) {
+         this.settings = this.settings.withDifficulty(difficulty);
++        // CraftBukkit start
++        ClientboundChangeDifficultyPacket packet = new ClientboundChangeDifficultyPacket(this.getDifficulty(), this.isDifficultyLocked());
++        for (ServerPlayer player : (java.util.List<ServerPlayer>) (java.util.List) this.world.players()) {
++            player.connection.send(packet);
++        }
++        // CraftBukkit end
+     }
+ 
+     @Override
+@@ -532,6 +593,14 @@
+         return this.settings.copy();
+     }
+ 
++    // CraftBukkit start - Check if the name stored in NBT is the correct one
++    public void checkName(String name) {
++        if (!this.settings.levelName.equals(name)) {
++            this.settings.levelName = name;
++        }
++    }
++    // CraftBukkit end
++
+     /** @deprecated */
+     @Deprecated
+     public static enum SpecialWorldProperty {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/storage/WorldDataServer.patch b/paper-server/patches/sources/net/minecraft/world/level/storage/WorldDataServer.patch
deleted file mode 100644
index cf2dffac97..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/storage/WorldDataServer.patch
+++ /dev/null
@@ -1,164 +0,0 @@
---- a/net/minecraft/world/level/storage/WorldDataServer.java
-+++ b/net/minecraft/world/level/storage/WorldDataServer.java
-@@ -43,6 +43,19 @@
- import net.minecraft.world.level.timers.CustomFunctionCallbackTimers;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import net.minecraft.core.IRegistry;
-+import net.minecraft.core.registries.Registries;
-+import net.minecraft.network.protocol.game.PacketPlayOutServerDifficulty;
-+import net.minecraft.server.level.EntityPlayer;
-+import net.minecraft.server.level.WorldServer;
-+import net.minecraft.world.level.dimension.WorldDimension;
-+import net.minecraft.world.level.levelgen.WorldDimensions;
-+import org.bukkit.Bukkit;
-+import org.bukkit.event.weather.ThunderChangeEvent;
-+import org.bukkit.event.weather.WeatherChangeEvent;
-+// CraftBukkit end
-+
- public class WorldDataServer implements IWorldDataServer, SaveData {
- 
-     private static final Logger LOGGER = LogUtils.getLogger();
-@@ -79,6 +92,20 @@
-     private boolean wasModded;
-     private final Set<String> removedFeatureFlags;
-     private final CustomFunctionCallbackTimerQueue<MinecraftServer> scheduledEvents;
-+    // CraftBukkit start - Add world and pdc
-+    public IRegistry<WorldDimension> customDimensions;
-+    private WorldServer world;
-+    protected NBTBase pdc;
-+
-+    public void setWorld(WorldServer world) {
-+        if (this.world != null) {
-+            return;
-+        }
-+        this.world = world;
-+        world.getWorld().readBukkitValues(pdc);
-+        pdc = null;
-+    }
-+    // CraftBukkit end
- 
-     private WorldDataServer(@Nullable NBTTagCompound nbttagcompound, boolean flag, BlockPosition blockposition, float f, long i, long j, int k, int l, int i1, boolean flag1, int j1, boolean flag2, boolean flag3, boolean flag4, WorldBorder.c worldborder_c, int k1, int l1, @Nullable UUID uuid, Set<String> set, Set<String> set1, CustomFunctionCallbackTimerQueue<MinecraftServer> customfunctioncallbacktimerqueue, @Nullable NBTTagCompound nbttagcompound1, EnderDragonBattle.a enderdragonbattle_a, WorldSettings worldsettings, WorldOptions worldoptions, WorldDataServer.a worlddataserver_a, Lifecycle lifecycle) {
-         this.wasModded = flag;
-@@ -116,7 +143,7 @@
- 
-     public static <T> WorldDataServer parse(Dynamic<T> dynamic, WorldSettings worldsettings, WorldDataServer.a worlddataserver_a, WorldOptions worldoptions, Lifecycle lifecycle) {
-         long i = dynamic.get("Time").asLong(0L);
--        OptionalDynamic optionaldynamic = dynamic.get("Player");
-+        OptionalDynamic<T> optionaldynamic = dynamic.get("Player"); // CraftBukkit - decompile error
-         Codec codec = NBTTagCompound.CODEC;
- 
-         Objects.requireNonNull(codec);
-@@ -136,7 +163,7 @@
-         WorldBorder.c worldborder_c = WorldBorder.c.read(dynamic, WorldBorder.DEFAULT_SETTINGS);
-         int k1 = dynamic.get("WanderingTraderSpawnDelay").asInt(0);
-         int l1 = dynamic.get("WanderingTraderSpawnChance").asInt(0);
--        UUID uuid = (UUID) dynamic.get("WanderingTraderId").read(UUIDUtil.CODEC).result().orElse((Object) null);
-+        UUID uuid = (UUID) dynamic.get("WanderingTraderId").read(UUIDUtil.CODEC).result().orElse(null); // CraftBukkit - decompile error
-         Set set = (Set) dynamic.get("ServerBrands").asStream().flatMap((dynamic1) -> {
-             return dynamic1.asString().result().stream();
-         }).collect(Collectors.toCollection(Sets::newLinkedHashSet));
-@@ -145,7 +172,7 @@
-         }).collect(Collectors.toSet());
-         CustomFunctionCallbackTimerQueue customfunctioncallbacktimerqueue = new CustomFunctionCallbackTimerQueue<>(CustomFunctionCallbackTimers.SERVER_CALLBACKS, dynamic.get("ScheduledEvents").asStream());
-         NBTTagCompound nbttagcompound1 = (NBTTagCompound) dynamic.get("CustomBossEvents").orElseEmptyMap().getValue();
--        DataResult dataresult = dynamic.get("DragonFight").read(EnderDragonBattle.a.CODEC);
-+        DataResult<EnderDragonBattle.a> dataresult = dynamic.get("DragonFight").read(EnderDragonBattle.a.CODEC); // CraftBukkit - decompile error
-         Logger logger = WorldDataServer.LOGGER;
- 
-         Objects.requireNonNull(logger);
-@@ -180,7 +207,7 @@
-         nbttagcompound.put("Version", nbttagcompound2);
-         GameProfileSerializer.addCurrentDataVersion(nbttagcompound);
-         DynamicOps<NBTBase> dynamicops = iregistrycustom.createSerializationContext(DynamicOpsNBT.INSTANCE);
--        DataResult dataresult = GeneratorSettings.encode(dynamicops, this.worldOptions, iregistrycustom);
-+        DataResult<NBTBase> dataresult = GeneratorSettings.encode(dynamicops, this.worldOptions, new WorldDimensions(this.customDimensions != null ? this.customDimensions : iregistrycustom.lookupOrThrow(Registries.LEVEL_STEM))); // CraftBukkit
-         Logger logger = WorldDataServer.LOGGER;
- 
-         Objects.requireNonNull(logger);
-@@ -230,11 +257,13 @@
-             nbttagcompound.putUUID("WanderingTraderId", this.wanderingTraderId);
-         }
- 
-+        nbttagcompound.putString("Bukkit.Version", Bukkit.getName() + "/" + Bukkit.getVersion() + "/" + Bukkit.getBukkitVersion()); // CraftBukkit
-+        world.getWorld().storeBukkitValues(nbttagcompound); // CraftBukkit - add pdc
-     }
- 
-     private static NBTTagList stringCollectionToTag(Set<String> set) {
-         NBTTagList nbttaglist = new NBTTagList();
--        Stream stream = set.stream().map(NBTTagString::valueOf);
-+        Stream<NBTTagString> stream = set.stream().map(NBTTagString::valueOf); // CraftBukkit - decompile error
- 
-         Objects.requireNonNull(nbttaglist);
-         stream.forEach(nbttaglist::add);
-@@ -310,6 +339,20 @@
- 
-     @Override
-     public void setThundering(boolean flag) {
-+        // CraftBukkit start
-+        if (this.thundering == flag) {
-+            return;
-+        }
-+
-+        org.bukkit.World world = Bukkit.getWorld(getLevelName());
-+        if (world != null) {
-+            ThunderChangeEvent thunder = new ThunderChangeEvent(world, flag);
-+            Bukkit.getServer().getPluginManager().callEvent(thunder);
-+            if (thunder.isCancelled()) {
-+                return;
-+            }
-+        }
-+        // CraftBukkit end
-         this.thundering = flag;
-     }
- 
-@@ -330,6 +373,20 @@
- 
-     @Override
-     public void setRaining(boolean flag) {
-+        // CraftBukkit start
-+        if (this.raining == flag) {
-+            return;
-+        }
-+
-+        org.bukkit.World world = Bukkit.getWorld(getLevelName());
-+        if (world != null) {
-+            WeatherChangeEvent weather = new WeatherChangeEvent(world, flag);
-+            Bukkit.getServer().getPluginManager().callEvent(weather);
-+            if (weather.isCancelled()) {
-+                return;
-+            }
-+        }
-+        // CraftBukkit end
-         this.raining = flag;
-     }
- 
-@@ -396,6 +453,12 @@
-     @Override
-     public void setDifficulty(EnumDifficulty enumdifficulty) {
-         this.settings = this.settings.withDifficulty(enumdifficulty);
-+        // CraftBukkit start
-+        PacketPlayOutServerDifficulty packet = new PacketPlayOutServerDifficulty(this.getDifficulty(), this.isDifficultyLocked());
-+        for (EntityPlayer player : (java.util.List<EntityPlayer>) (java.util.List) world.players()) {
-+            player.connection.send(packet);
-+        }
-+        // CraftBukkit end
-     }
- 
-     @Override
-@@ -532,6 +595,14 @@
-         return this.settings.copy();
-     }
- 
-+    // CraftBukkit start - Check if the name stored in NBT is the correct one
-+    public void checkName(String name) {
-+        if (!this.settings.levelName.equals(name)) {
-+            this.settings.levelName = name;
-+        }
-+    }
-+    // CraftBukkit end
-+
-     /** @deprecated */
-     @Deprecated
-     public static enum a {
diff --git a/paper-server/patches/sources/net/minecraft/world/level/storage/WorldNBTStorage.patch b/paper-server/patches/sources/net/minecraft/world/level/storage/WorldNBTStorage.patch
deleted file mode 100644
index b2b4b4bd3d..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/storage/WorldNBTStorage.patch
+++ /dev/null
@@ -1,106 +0,0 @@
---- a/net/minecraft/world/level/storage/WorldNBTStorage.java
-+++ b/net/minecraft/world/level/storage/WorldNBTStorage.java
-@@ -15,8 +15,10 @@
- import net.minecraft.nbt.NBTCompressedStreamTools;
- import net.minecraft.nbt.NBTReadLimiter;
- import net.minecraft.nbt.NBTTagCompound;
-+import net.minecraft.server.level.EntityPlayer;
- import net.minecraft.util.datafix.DataFixTypes;
- import net.minecraft.world.entity.player.EntityHuman;
-+import org.bukkit.craftbukkit.entity.CraftPlayer;
- import org.slf4j.Logger;
- 
- public class WorldNBTStorage {
-@@ -49,34 +51,36 @@
- 
-     }
- 
--    private void backup(EntityHuman entityhuman, String s) {
-+    private void backup(String name, String s1, String s) { // name, uuid, extension
-         Path path = this.playerDir.toPath();
--        String s1 = entityhuman.getStringUUID();
-+        // String s1 = entityhuman.getStringUUID(); // CraftBukkit - used above
-         Path path1 = path.resolve(s1 + s);
- 
--        s1 = entityhuman.getStringUUID();
-+        // s1 = entityhuman.getStringUUID(); // CraftBukkit - used above
-         Path path2 = path.resolve(s1 + "_corrupted_" + LocalDateTime.now().format(WorldNBTStorage.FORMATTER) + s);
- 
-         if (Files.isRegularFile(path1, new LinkOption[0])) {
-             try {
-                 Files.copy(path1, path2, StandardCopyOption.REPLACE_EXISTING, StandardCopyOption.COPY_ATTRIBUTES);
-             } catch (Exception exception) {
--                WorldNBTStorage.LOGGER.warn("Failed to copy the player.dat file for {}", entityhuman.getName().getString(), exception);
-+                WorldNBTStorage.LOGGER.warn("Failed to copy the player.dat file for {}", name, exception); // CraftBukkit
-             }
- 
-         }
-     }
- 
--    private Optional<NBTTagCompound> load(EntityHuman entityhuman, String s) {
-+    // CraftBukkit start
-+    private Optional<NBTTagCompound> load(String name, String s1, String s) { // name, uuid, extension
-+        // CraftBukkit end
-         File file = this.playerDir;
--        String s1 = entityhuman.getStringUUID();
-+        // String s1 = entityhuman.getStringUUID(); // CraftBukkit - used above
-         File file1 = new File(file, s1 + s);
- 
-         if (file1.exists() && file1.isFile()) {
-             try {
-                 return Optional.of(NBTCompressedStreamTools.readCompressed(file1.toPath(), NBTReadLimiter.unlimitedHeap()));
-             } catch (Exception exception) {
--                WorldNBTStorage.LOGGER.warn("Failed to load player data for {}", entityhuman.getName().getString());
-+                WorldNBTStorage.LOGGER.warn("Failed to load player data for {}", name); // CraftBukkit
-             }
-         }
- 
-@@ -84,20 +88,44 @@
-     }
- 
-     public Optional<NBTTagCompound> load(EntityHuman entityhuman) {
--        Optional<NBTTagCompound> optional = this.load(entityhuman, ".dat");
-+        // CraftBukkit start
-+        return load(entityhuman.getName().getString(), entityhuman.getStringUUID()).map((nbttagcompound) -> {
-+            if (entityhuman instanceof EntityPlayer) {
-+                CraftPlayer player = (CraftPlayer) entityhuman.getBukkitEntity();
-+                // Only update first played if it is older than the one we have
-+                long modified = new File(this.playerDir, entityhuman.getStringUUID() + ".dat").lastModified();
-+                if (modified < player.getFirstPlayed()) {
-+                    player.setFirstPlayed(modified);
-+                }
-+            }
-+
-+            entityhuman.load(nbttagcompound); // From below
-+            return nbttagcompound;
-+        });
-+    }
-+
-+    public Optional<NBTTagCompound> load(String name, String uuid) {
-+        // CraftBukkit end
-+        Optional<NBTTagCompound> optional = this.load(name, uuid, ".dat"); // CraftBukkit
- 
-         if (optional.isEmpty()) {
--            this.backup(entityhuman, ".dat");
-+            this.backup(name, uuid, ".dat"); // CraftBukkit
-         }
- 
-         return optional.or(() -> {
--            return this.load(entityhuman, ".dat_old");
-+            return this.load(name, uuid, ".dat_old"); // CraftBukkit
-         }).map((nbttagcompound) -> {
-             int i = GameProfileSerializer.getDataVersion(nbttagcompound, -1);
- 
-             nbttagcompound = DataFixTypes.PLAYER.updateToCurrentVersion(this.fixerUpper, nbttagcompound, i);
--            entityhuman.load(nbttagcompound);
-+            // entityhuman.load(nbttagcompound); // CraftBukkit - handled above
-             return nbttagcompound;
-         });
-     }
-+
-+    // CraftBukkit start
-+    public File getPlayerDir() {
-+        return playerDir;
-+    }
-+    // CraftBukkit end
- }
diff --git a/paper-server/patches/sources/net/minecraft/world/level/storage/loot/LootDataType.patch b/paper-server/patches/sources/net/minecraft/world/level/storage/loot/LootDataType.java.patch
similarity index 83%
rename from paper-server/patches/sources/net/minecraft/world/level/storage/loot/LootDataType.patch
rename to paper-server/patches/sources/net/minecraft/world/level/storage/loot/LootDataType.java.patch
index 86e7c6ff30..c9f13ba298 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/storage/loot/LootDataType.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/storage/loot/LootDataType.java.patch
@@ -9,11 +9,11 @@
 +import org.bukkit.craftbukkit.util.CraftNamespacedKey;
 +// CraftBukkit end
 +
- public record LootDataType<T>(ResourceKey<IRegistry<T>> registryKey, Codec<T> codec, LootDataType.a<T> validator) {
+ public record LootDataType<T>(ResourceKey<Registry<T>> registryKey, Codec<T> codec, LootDataType.Validator<T> validator) {
  
      public static final LootDataType<LootItemCondition> PREDICATE = new LootDataType<>(Registries.PREDICATE, LootItemCondition.DIRECT_CODEC, createSimpleValidator());
 @@ -32,6 +37,7 @@
-     private static LootDataType.a<LootTable> createLootTableValidator() {
+     private static LootDataType.Validator<LootTable> createLootTableValidator() {
          return (lootcollector, resourcekey, loottable) -> {
              loottable.validate(lootcollector.setContextKeySet(loottable.getParamSet()).enterElement("{" + String.valueOf(resourcekey.registry()) + "/" + String.valueOf(resourcekey.location()) + "}", resourcekey));
 +            loottable.craftLootTable = new CraftLootTable(CraftNamespacedKey.fromMinecraft(resourcekey.location()), loottable); // CraftBukkit
diff --git a/paper-server/patches/sources/net/minecraft/world/level/storage/loot/LootTable.java.patch b/paper-server/patches/sources/net/minecraft/world/level/storage/loot/LootTable.java.patch
new file mode 100644
index 0000000000..7d0dabee86
--- /dev/null
+++ b/paper-server/patches/sources/net/minecraft/world/level/storage/loot/LootTable.java.patch
@@ -0,0 +1,62 @@
+--- a/net/minecraft/world/level/storage/loot/LootTable.java
++++ b/net/minecraft/world/level/storage/loot/LootTable.java
+@@ -31,6 +31,13 @@
+ import net.minecraft.world.level.storage.loot.parameters.LootContextParamSets;
+ import org.slf4j.Logger;
+ 
++// CraftBukkit start
++import org.bukkit.craftbukkit.CraftLootTable;
++import org.bukkit.craftbukkit.event.CraftEventFactory;
++import org.bukkit.craftbukkit.inventory.CraftItemStack;
++import org.bukkit.event.world.LootGenerateEvent;
++// CraftBukkit end
++
+ public class LootTable {
+ 
+     private static final Logger LOGGER = LogUtils.getLogger();
+@@ -54,6 +61,7 @@
+     private final List<LootPool> pools;
+     private final List<LootItemFunction> functions;
+     private final BiFunction<ItemStack, LootContext, ItemStack> compositeFunction;
++    public CraftLootTable craftLootTable; // CraftBukkit
+ 
+     LootTable(ContextKeySet type, Optional<ResourceLocation> randomSequenceId, List<LootPool> pools, List<LootItemFunction> functions) {
+         this.paramSet = type;
+@@ -157,10 +165,23 @@
+     }
+ 
+     public void fill(Container inventory, LootParams parameters, long seed) {
+-        LootContext loottableinfo = (new LootContext.Builder(parameters)).withOptionalRandomSeed(seed).create(this.randomSequence);
++        // CraftBukkit start
++        this.fillInventory(inventory, parameters, seed, false);
++    }
++
++    public void fillInventory(Container iinventory, LootParams lootparams, long i, boolean plugin) {
++        // CraftBukkit end
++        LootContext loottableinfo = (new LootContext.Builder(lootparams)).withOptionalRandomSeed(i).create(this.randomSequence);
+         ObjectArrayList<ItemStack> objectarraylist = this.getRandomItems(loottableinfo);
+         RandomSource randomsource = loottableinfo.getRandom();
+-        List<Integer> list = this.getAvailableSlots(inventory, randomsource);
++        // CraftBukkit start
++        LootGenerateEvent event = CraftEventFactory.callLootGenerateEvent(iinventory, this, loottableinfo, objectarraylist, plugin);
++        if (event.isCancelled()) {
++            return;
++        }
++        objectarraylist = event.getLoot().stream().map(CraftItemStack::asNMSCopy).collect(ObjectArrayList.toList());
++        // CraftBukkit end
++        List<Integer> list = this.getAvailableSlots(iinventory, randomsource);
+ 
+         this.shuffleAndSplitItems(objectarraylist, list.size(), randomsource);
+         ObjectListIterator objectlistiterator = objectarraylist.iterator();
+@@ -174,9 +195,9 @@
+             }
+ 
+             if (itemstack.isEmpty()) {
+-                inventory.setItem((Integer) list.remove(list.size() - 1), ItemStack.EMPTY);
++                iinventory.setItem((Integer) list.remove(list.size() - 1), ItemStack.EMPTY);
+             } else {
+-                inventory.setItem((Integer) list.remove(list.size() - 1), itemstack);
++                iinventory.setItem((Integer) list.remove(list.size() - 1), itemstack);
+             }
+         }
+ 
diff --git a/paper-server/patches/sources/net/minecraft/world/level/storage/loot/LootTable.patch b/paper-server/patches/sources/net/minecraft/world/level/storage/loot/LootTable.patch
deleted file mode 100644
index 827b4ca441..0000000000
--- a/paper-server/patches/sources/net/minecraft/world/level/storage/loot/LootTable.patch
+++ /dev/null
@@ -1,47 +0,0 @@
---- a/net/minecraft/world/level/storage/loot/LootTable.java
-+++ b/net/minecraft/world/level/storage/loot/LootTable.java
-@@ -31,6 +31,13 @@
- import net.minecraft.world.level.storage.loot.parameters.LootContextParameterSets;
- import org.slf4j.Logger;
- 
-+// CraftBukkit start
-+import org.bukkit.craftbukkit.CraftLootTable;
-+import org.bukkit.craftbukkit.event.CraftEventFactory;
-+import org.bukkit.craftbukkit.inventory.CraftItemStack;
-+import org.bukkit.event.world.LootGenerateEvent;
-+// CraftBukkit end
-+
- public class LootTable {
- 
-     private static final Logger LOGGER = LogUtils.getLogger();
-@@ -54,6 +61,7 @@
-     private final List<LootSelector> pools;
-     private final List<LootItemFunction> functions;
-     private final BiFunction<ItemStack, LootTableInfo, ItemStack> compositeFunction;
-+    public CraftLootTable craftLootTable; // CraftBukkit
- 
-     LootTable(ContextKeySet contextkeyset, Optional<MinecraftKey> optional, List<LootSelector> list, List<LootItemFunction> list1) {
-         this.paramSet = contextkeyset;
-@@ -157,9 +165,22 @@
-     }
- 
-     public void fill(IInventory iinventory, LootParams lootparams, long i) {
-+        // CraftBukkit start
-+        this.fillInventory(iinventory, lootparams, i, false);
-+    }
-+
-+    public void fillInventory(IInventory iinventory, LootParams lootparams, long i, boolean plugin) {
-+        // CraftBukkit end
-         LootTableInfo loottableinfo = (new LootTableInfo.Builder(lootparams)).withOptionalRandomSeed(i).create(this.randomSequence);
-         ObjectArrayList<ItemStack> objectarraylist = this.getRandomItems(loottableinfo);
-         RandomSource randomsource = loottableinfo.getRandom();
-+        // CraftBukkit start
-+        LootGenerateEvent event = CraftEventFactory.callLootGenerateEvent(iinventory, this, loottableinfo, objectarraylist, plugin);
-+        if (event.isCancelled()) {
-+            return;
-+        }
-+        objectarraylist = event.getLoot().stream().map(CraftItemStack::asNMSCopy).collect(ObjectArrayList.toList());
-+        // CraftBukkit end
-         List<Integer> list = this.getAvailableSlots(iinventory, randomsource);
- 
-         this.shuffleAndSplitItems(objectarraylist, list.size(), randomsource);
diff --git a/paper-server/patches/sources/net/minecraft/world/level/storage/loot/predicates/LootItemConditionSurvivesExplosion.patch b/paper-server/patches/sources/net/minecraft/world/level/storage/loot/predicates/ExplosionCondition.java.patch
similarity index 67%
rename from paper-server/patches/sources/net/minecraft/world/level/storage/loot/predicates/LootItemConditionSurvivesExplosion.patch
rename to paper-server/patches/sources/net/minecraft/world/level/storage/loot/predicates/ExplosionCondition.java.patch
index 48c4a881b6..19cd841992 100644
--- a/paper-server/patches/sources/net/minecraft/world/level/storage/loot/predicates/LootItemConditionSurvivesExplosion.patch
+++ b/paper-server/patches/sources/net/minecraft/world/level/storage/loot/predicates/ExplosionCondition.java.patch
@@ -1,5 +1,5 @@
---- a/net/minecraft/world/level/storage/loot/predicates/LootItemConditionSurvivesExplosion.java
-+++ b/net/minecraft/world/level/storage/loot/predicates/LootItemConditionSurvivesExplosion.java
+--- a/net/minecraft/world/level/storage/loot/predicates/ExplosionCondition.java
++++ b/net/minecraft/world/level/storage/loot/predicates/ExplosionCondition.java
 @@ -31,7 +31,8 @@
              RandomSource randomsource = loottableinfo.getRandom();
              float f = 1.0F / ofloat;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftArt.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftArt.java
index d9da8e49b4..40af940193 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftArt.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftArt.java
@@ -3,7 +3,6 @@ package org.bukkit.craftbukkit;
 import com.google.common.base.Preconditions;
 import java.util.Locale;
 import net.minecraft.core.Holder;
-import net.minecraft.core.IRegistry;
 import net.minecraft.core.registries.Registries;
 import net.minecraft.world.entity.decoration.PaintingVariant;
 import org.bukkit.Art;
@@ -21,7 +20,7 @@ public class CraftArt implements Art, Handleable<PaintingVariant> {
     }
 
     public static Art minecraftHolderToBukkit(Holder<PaintingVariant> minecraft) {
-        return minecraftToBukkit(minecraft.value());
+        return CraftArt.minecraftToBukkit(minecraft.value());
     }
 
     public static PaintingVariant bukkitToMinecraft(Art bukkit) {
@@ -31,9 +30,9 @@ public class CraftArt implements Art, Handleable<PaintingVariant> {
     public static Holder<PaintingVariant> bukkitToMinecraftHolder(Art bukkit) {
         Preconditions.checkArgument(bukkit != null);
 
-        IRegistry<PaintingVariant> registry = CraftRegistry.getMinecraftRegistry(Registries.PAINTING_VARIANT);
+        net.minecraft.core.Registry<PaintingVariant> registry = CraftRegistry.getMinecraftRegistry(Registries.PAINTING_VARIANT);
 
-        if (registry.wrapAsHolder(bukkitToMinecraft(bukkit)) instanceof Holder.c<PaintingVariant> holder) {
+        if (registry.wrapAsHolder(CraftArt.bukkitToMinecraft(bukkit)) instanceof Holder.Reference<PaintingVariant> holder) {
             return holder;
         }
 
@@ -58,55 +57,55 @@ public class CraftArt implements Art, Handleable<PaintingVariant> {
         } else {
             this.name = key.toString();
         }
-        this.ordinal = count++;
+        this.ordinal = CraftArt.count++;
     }
 
     @Override
     public PaintingVariant getHandle() {
-        return paintingVariant;
+        return this.paintingVariant;
     }
 
     @Override
     public int getBlockWidth() {
-        return paintingVariant.width();
+        return this.paintingVariant.width();
     }
 
     @Override
     public int getBlockHeight() {
-        return paintingVariant.height();
+        return this.paintingVariant.height();
     }
 
     @Override
     public int getId() {
-        return CraftRegistry.getMinecraftRegistry(Registries.PAINTING_VARIANT).getId(paintingVariant);
+        return CraftRegistry.getMinecraftRegistry(Registries.PAINTING_VARIANT).getId(this.paintingVariant);
     }
 
     @NotNull
     @Override
     public NamespacedKey getKey() {
-        return key;
+        return this.key;
     }
 
     @Override
     public int compareTo(@NotNull Art art) {
-        return ordinal - art.ordinal();
+        return this.ordinal - art.ordinal();
     }
 
     @NotNull
     @Override
     public String name() {
-        return name;
+        return this.name;
     }
 
     @Override
     public int ordinal() {
-        return ordinal;
+        return this.ordinal;
     }
 
     @Override
     public String toString() {
         // For backwards compatibility
-        return name();
+        return this.name();
     }
 
     @Override
@@ -119,11 +118,11 @@ public class CraftArt implements Art, Handleable<PaintingVariant> {
             return false;
         }
 
-        return getKey().equals(otherArt.getKey());
+        return this.getKey().equals(otherArt.getKey());
     }
 
     @Override
     public int hashCode() {
-        return getKey().hashCode();
+        return this.getKey().hashCode();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftChunk.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
index b786d5aefb..5e8b503104 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftChunk.java
@@ -9,33 +9,31 @@ import java.util.Objects;
 import java.util.concurrent.locks.LockSupport;
 import java.util.function.BooleanSupplier;
 import java.util.function.Predicate;
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
 import net.minecraft.core.Holder;
-import net.minecraft.core.IRegistry;
-import net.minecraft.core.SectionPosition;
+import net.minecraft.core.Registry;
+import net.minecraft.core.SectionPos;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.nbt.DynamicOpsNBT;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.server.level.WorldServer;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.nbt.NbtOps;
+import net.minecraft.server.level.ServerLevel;
 import net.minecraft.util.thread.ConsecutiveExecutor;
-import net.minecraft.world.level.ChunkCoordIntPair;
-import net.minecraft.world.level.EnumSkyBlock;
-import net.minecraft.world.level.biome.BiomeBase;
+import net.minecraft.world.level.ChunkPos;
+import net.minecraft.world.level.LightLayer;
 import net.minecraft.world.level.biome.Biomes;
 import net.minecraft.world.level.block.Blocks;
-import net.minecraft.world.level.block.state.IBlockData;
-import net.minecraft.world.level.chunk.ChunkSection;
-import net.minecraft.world.level.chunk.DataPaletteBlock;
-import net.minecraft.world.level.chunk.IChunkAccess;
-import net.minecraft.world.level.chunk.NibbleArray;
+import net.minecraft.world.level.chunk.ChunkAccess;
+import net.minecraft.world.level.chunk.DataLayer;
+import net.minecraft.world.level.chunk.ImposterProtoChunk;
+import net.minecraft.world.level.chunk.LevelChunkSection;
+import net.minecraft.world.level.chunk.PalettedContainer;
 import net.minecraft.world.level.chunk.PalettedContainerRO;
-import net.minecraft.world.level.chunk.ProtoChunkExtension;
 import net.minecraft.world.level.chunk.status.ChunkStatus;
 import net.minecraft.world.level.chunk.storage.EntityStorage;
 import net.minecraft.world.level.chunk.storage.SerializableChunkData;
 import net.minecraft.world.level.entity.PersistentEntitySectionManager;
-import net.minecraft.world.level.levelgen.HeightMap;
-import net.minecraft.world.level.levelgen.SeededRandom;
+import net.minecraft.world.level.levelgen.Heightmap;
+import net.minecraft.world.level.levelgen.WorldgenRandom;
 import net.minecraft.world.level.lighting.LevelLightEngine;
 import org.bukkit.Chunk;
 import org.bukkit.ChunkSnapshot;
@@ -55,20 +53,20 @@ import org.bukkit.persistence.PersistentDataContainer;
 import org.bukkit.plugin.Plugin;
 
 public class CraftChunk implements Chunk {
-    private final WorldServer worldServer;
+    private final ServerLevel worldServer;
     private final int x;
     private final int z;
-    private static final DataPaletteBlock<IBlockData> emptyBlockIDs = new DataPaletteBlock<>(net.minecraft.world.level.block.Block.BLOCK_STATE_REGISTRY, Blocks.AIR.defaultBlockState(), DataPaletteBlock.d.SECTION_STATES);
+    private static final PalettedContainer<net.minecraft.world.level.block.state.BlockState> emptyBlockIDs = new PalettedContainer<>(net.minecraft.world.level.block.Block.BLOCK_STATE_REGISTRY, Blocks.AIR.defaultBlockState(), PalettedContainer.Strategy.SECTION_STATES);
     private static final byte[] FULL_LIGHT = new byte[2048];
     private static final byte[] EMPTY_LIGHT = new byte[2048];
 
-    public CraftChunk(net.minecraft.world.level.chunk.Chunk chunk) {
-        worldServer = chunk.level;
-        x = chunk.getPos().x;
-        z = chunk.getPos().z;
+    public CraftChunk(net.minecraft.world.level.chunk.LevelChunk chunk) {
+        this.worldServer = chunk.level;
+        this.x = chunk.getPos().x;
+        this.z = chunk.getPos().z;
     }
 
-    public CraftChunk(WorldServer worldServer, int x, int z) {
+    public CraftChunk(ServerLevel worldServer, int x, int z) {
         this.worldServer = worldServer;
         this.x = x;
         this.z = z;
@@ -76,18 +74,18 @@ public class CraftChunk implements Chunk {
 
     @Override
     public World getWorld() {
-        return worldServer.getWorld();
+        return this.worldServer.getWorld();
     }
 
     public CraftWorld getCraftWorld() {
-        return (CraftWorld) getWorld();
+        return (CraftWorld) this.getWorld();
     }
 
-    public IChunkAccess getHandle(ChunkStatus chunkStatus) {
-        IChunkAccess chunkAccess = worldServer.getChunk(x, z, chunkStatus);
+    public ChunkAccess getHandle(ChunkStatus chunkStatus) {
+        ChunkAccess chunkAccess = this.worldServer.getChunk(this.x, this.z, chunkStatus);
 
         // SPIGOT-7332: Get unwrapped extension
-        if (chunkAccess instanceof ProtoChunkExtension extension) {
+        if (chunkAccess instanceof ImposterProtoChunk extension) {
             return extension.getWrapped();
         }
 
@@ -96,42 +94,42 @@ public class CraftChunk implements Chunk {
 
     @Override
     public int getX() {
-        return x;
+        return this.x;
     }
 
     @Override
     public int getZ() {
-        return z;
+        return this.z;
     }
 
     @Override
     public String toString() {
-        return "CraftChunk{" + "x=" + getX() + "z=" + getZ() + '}';
+        return "CraftChunk{" + "x=" + this.getX() + "z=" + this.getZ() + '}';
     }
 
     @Override
     public Block getBlock(int x, int y, int z) {
-        validateChunkCoordinates(worldServer.getMinY(), worldServer.getMaxY(), x, y, z);
+        CraftChunk.validateChunkCoordinates(this.worldServer.getMinY(), this.worldServer.getMaxY(), x, y, z);
 
-        return new CraftBlock(worldServer, new BlockPosition((this.x << 4) | x, y, (this.z << 4) | z));
+        return new CraftBlock(this.worldServer, new BlockPos((this.x << 4) | x, y, (this.z << 4) | z));
     }
 
     @Override
     public boolean isEntitiesLoaded() {
-        return getCraftWorld().getHandle().entityManager.areEntitiesLoaded(ChunkCoordIntPair.asLong(x, z));
+        return this.getCraftWorld().getHandle().entityManager.areEntitiesLoaded(ChunkPos.asLong(this.x, this.z));
     }
 
     @Override
     public Entity[] getEntities() {
-        if (!isLoaded()) {
-            getWorld().getChunkAt(x, z); // Transient load for this tick
+        if (!this.isLoaded()) {
+            this.getWorld().getChunkAt(this.x, this.z); // Transient load for this tick
         }
 
-        PersistentEntitySectionManager<net.minecraft.world.entity.Entity> entityManager = getCraftWorld().getHandle().entityManager;
-        long pair = ChunkCoordIntPair.asLong(x, z);
+        PersistentEntitySectionManager<net.minecraft.world.entity.Entity> entityManager = this.getCraftWorld().getHandle().entityManager;
+        long pair = ChunkPos.asLong(this.x, this.z);
 
         if (entityManager.areEntitiesLoaded(pair)) {
-            return entityManager.getEntities(new ChunkCoordIntPair(x, z)).stream()
+            return entityManager.getEntities(new ChunkPos(this.x, this.z)).stream()
                     .map(net.minecraft.world.entity.Entity::getBukkitEntity)
                     .filter(Objects::nonNull).toArray(Entity[]::new);
         }
@@ -169,23 +167,23 @@ public class CraftChunk implements Chunk {
             }
         }
 
-        return entityManager.getEntities(new ChunkCoordIntPair(x, z)).stream()
+        return entityManager.getEntities(new ChunkPos(this.x, this.z)).stream()
                 .map(net.minecraft.world.entity.Entity::getBukkitEntity)
                 .filter(Objects::nonNull).toArray(Entity[]::new);
     }
 
     @Override
     public BlockState[] getTileEntities() {
-        if (!isLoaded()) {
-            getWorld().getChunkAt(x, z); // Transient load for this tick
+        if (!this.isLoaded()) {
+            this.getWorld().getChunkAt(this.x, this.z); // Transient load for this tick
         }
         int index = 0;
-        IChunkAccess chunk = getHandle(ChunkStatus.FULL);
+        ChunkAccess chunk = this.getHandle(ChunkStatus.FULL);
 
         BlockState[] entities = new BlockState[chunk.blockEntities.size()];
 
-        for (BlockPosition position : chunk.blockEntities.keySet()) {
-            entities[index++] = worldServer.getWorld().getBlockAt(position.getX(), position.getY(), position.getZ()).getState();
+        for (BlockPos position : chunk.blockEntities.keySet()) {
+            entities[index++] = this.worldServer.getWorld().getBlockAt(position.getX(), position.getY(), position.getZ()).getState();
         }
 
         return entities;
@@ -193,84 +191,84 @@ public class CraftChunk implements Chunk {
 
     @Override
     public boolean isGenerated() {
-        IChunkAccess chunk = getHandle(ChunkStatus.EMPTY);
+        ChunkAccess chunk = this.getHandle(ChunkStatus.EMPTY);
         return chunk.getPersistedStatus().isOrAfter(ChunkStatus.FULL);
     }
 
     @Override
     public boolean isLoaded() {
-        return getWorld().isChunkLoaded(this);
+        return this.getWorld().isChunkLoaded(this);
     }
 
     @Override
     public boolean load() {
-        return getWorld().loadChunk(getX(), getZ(), true);
+        return this.getWorld().loadChunk(this.getX(), this.getZ(), true);
     }
 
     @Override
     public boolean load(boolean generate) {
-        return getWorld().loadChunk(getX(), getZ(), generate);
+        return this.getWorld().loadChunk(this.getX(), this.getZ(), generate);
     }
 
     @Override
     public boolean unload() {
-        return getWorld().unloadChunk(getX(), getZ());
+        return this.getWorld().unloadChunk(this.getX(), this.getZ());
     }
 
     @Override
     public boolean isSlimeChunk() {
         // 987234911L is deterimined in EntitySlime when seeing if a slime can spawn in a chunk
-        return SeededRandom.seedSlimeChunk(getX(), getZ(), getWorld().getSeed(), 987234911L).nextInt(10) == 0;
+        return WorldgenRandom.seedSlimeChunk(this.getX(), this.getZ(), this.getWorld().getSeed(), 987234911L).nextInt(10) == 0;
     }
 
     @Override
     public boolean unload(boolean save) {
-        return getWorld().unloadChunk(getX(), getZ(), save);
+        return this.getWorld().unloadChunk(this.getX(), this.getZ(), save);
     }
 
     @Override
     public boolean isForceLoaded() {
-        return getWorld().isChunkForceLoaded(getX(), getZ());
+        return this.getWorld().isChunkForceLoaded(this.getX(), this.getZ());
     }
 
     @Override
     public void setForceLoaded(boolean forced) {
-        getWorld().setChunkForceLoaded(getX(), getZ(), forced);
+        this.getWorld().setChunkForceLoaded(this.getX(), this.getZ(), forced);
     }
 
     @Override
     public boolean addPluginChunkTicket(Plugin plugin) {
-        return getWorld().addPluginChunkTicket(getX(), getZ(), plugin);
+        return this.getWorld().addPluginChunkTicket(this.getX(), this.getZ(), plugin);
     }
 
     @Override
     public boolean removePluginChunkTicket(Plugin plugin) {
-        return getWorld().removePluginChunkTicket(getX(), getZ(), plugin);
+        return this.getWorld().removePluginChunkTicket(this.getX(), this.getZ(), plugin);
     }
 
     @Override
     public Collection<Plugin> getPluginChunkTickets() {
-        return getWorld().getPluginChunkTickets(getX(), getZ());
+        return this.getWorld().getPluginChunkTickets(this.getX(), this.getZ());
     }
 
     @Override
     public long getInhabitedTime() {
-        return getHandle(ChunkStatus.EMPTY).getInhabitedTime();
+        return this.getHandle(ChunkStatus.EMPTY).getInhabitedTime();
     }
 
     @Override
     public void setInhabitedTime(long ticks) {
         Preconditions.checkArgument(ticks >= 0, "ticks cannot be negative");
 
-        getHandle(ChunkStatus.STRUCTURE_STARTS).setInhabitedTime(ticks);
+        this.getHandle(ChunkStatus.STRUCTURE_STARTS).setInhabitedTime(ticks);
     }
 
     @Override
     public boolean contains(BlockData block) {
         Preconditions.checkArgument(block != null, "Block cannot be null");
 
-        Predicate<IBlockData> nms = Predicates.equalTo(((CraftBlockData) block).getState());
-        for (ChunkSection section : getHandle(ChunkStatus.FULL).getSections()) {
+        Predicate<net.minecraft.world.level.block.state.BlockState> nms = Predicates.equalTo(((CraftBlockData) block).getState());
+        for (LevelChunkSection section : this.getHandle(ChunkStatus.FULL).getSections()) {
             if (section != null && section.getStates().maybeHas(nms)) {
                 return true;
             }
@@ -283,9 +281,9 @@ public class CraftChunk implements Chunk {
     public boolean contains(Biome biome) {
         Preconditions.checkArgument(biome != null, "Biome cannot be null");
 
-        IChunkAccess chunk = getHandle(ChunkStatus.BIOMES);
-        Predicate<Holder<BiomeBase>> nms = Predicates.equalTo(CraftBiome.bukkitToMinecraftHolder(biome));
-        for (ChunkSection section : chunk.getSections()) {
+        ChunkAccess chunk = this.getHandle(ChunkStatus.BIOMES);
+        Predicate<Holder<net.minecraft.world.level.biome.Biome>> nms = Predicates.equalTo(CraftBiome.bukkitToMinecraftHolder(biome));
+        for (LevelChunkSection section : chunk.getSections()) {
             if (section != null && section.getBiomes().maybeHas(nms)) {
                 return true;
             }
@@ -296,71 +294,71 @@ public class CraftChunk implements Chunk {
 
     @Override
     public ChunkSnapshot getChunkSnapshot() {
-        return getChunkSnapshot(true, false, false);
+        return this.getChunkSnapshot(true, false, false);
     }
 
     @Override
     public ChunkSnapshot getChunkSnapshot(boolean includeMaxBlockY, boolean includeBiome, boolean includeBiomeTempRain) {
-        IChunkAccess chunk = getHandle(ChunkStatus.FULL);
+        ChunkAccess chunk = this.getHandle(ChunkStatus.FULL);
 
-        ChunkSection[] cs = chunk.getSections();
-        DataPaletteBlock[] sectionBlockIDs = new DataPaletteBlock[cs.length];
+        LevelChunkSection[] cs = chunk.getSections();
+        PalettedContainer[] sectionBlockIDs = new PalettedContainer[cs.length];
         byte[][] sectionSkyLights = new byte[cs.length][];
         byte[][] sectionEmitLights = new byte[cs.length][];
         boolean[] sectionEmpty = new boolean[cs.length];
-        PalettedContainerRO<Holder<BiomeBase>>[] biome = (includeBiome || includeBiomeTempRain) ? new DataPaletteBlock[cs.length] : null;
+        PalettedContainerRO<Holder<net.minecraft.world.level.biome.Biome>>[] biome = (includeBiome || includeBiomeTempRain) ? new PalettedContainer[cs.length] : null;
 
-        IRegistry<BiomeBase> iregistry = worldServer.registryAccess().lookupOrThrow(Registries.BIOME);
-        Codec<PalettedContainerRO<Holder<BiomeBase>>> biomeCodec = DataPaletteBlock.codecRO(iregistry.asHolderIdMap(), iregistry.holderByNameCodec(), DataPaletteBlock.d.SECTION_BIOMES, iregistry.getOrThrow(Biomes.PLAINS));
+        Registry<net.minecraft.world.level.biome.Biome> iregistry = this.worldServer.registryAccess().lookupOrThrow(Registries.BIOME);
+        Codec<PalettedContainerRO<Holder<net.minecraft.world.level.biome.Biome>>> biomeCodec = PalettedContainer.codecRO(iregistry.asHolderIdMap(), iregistry.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, iregistry.getOrThrow(Biomes.PLAINS));
 
         for (int i = 0; i < cs.length; i++) {
-            NBTTagCompound data = new NBTTagCompound();
+            CompoundTag data = new CompoundTag();
 
-            data.put("block_states", SerializableChunkData.BLOCK_STATE_CODEC.encodeStart(DynamicOpsNBT.INSTANCE, cs[i].getStates()).getOrThrow());
-            sectionBlockIDs[i] = SerializableChunkData.BLOCK_STATE_CODEC.parse(DynamicOpsNBT.INSTANCE, data.getCompound("block_states")).getOrThrow(SerializableChunkData.a::new);
+            data.put("block_states", SerializableChunkData.BLOCK_STATE_CODEC.encodeStart(NbtOps.INSTANCE, cs[i].getStates()).getOrThrow());
+            sectionBlockIDs[i] = SerializableChunkData.BLOCK_STATE_CODEC.parse(NbtOps.INSTANCE, data.getCompound("block_states")).getOrThrow(SerializableChunkData.ChunkReadException::new);
             sectionEmpty[i] = cs[i].hasOnlyAir();
 
-            LevelLightEngine lightengine = worldServer.getLightEngine();
-            NibbleArray skyLightArray = lightengine.getLayerListener(EnumSkyBlock.SKY).getDataLayerData(SectionPosition.of(x, chunk.getSectionYFromSectionIndex(i), z)); // SPIGOT-7498: Convert section index
+            LevelLightEngine lightengine = this.worldServer.getLightEngine();
+            DataLayer skyLightArray = lightengine.getLayerListener(LightLayer.SKY).getDataLayerData(SectionPos.of(this.x, chunk.getSectionYFromSectionIndex(i), this.z)); // SPIGOT-7498: Convert section index
             if (skyLightArray == null) {
-                sectionSkyLights[i] = worldServer.dimensionType().hasSkyLight() ? FULL_LIGHT : EMPTY_LIGHT;
+                sectionSkyLights[i] = this.worldServer.dimensionType().hasSkyLight() ? CraftChunk.FULL_LIGHT : CraftChunk.EMPTY_LIGHT;
             } else {
                 sectionSkyLights[i] = new byte[2048];
                 System.arraycopy(skyLightArray.getData(), 0, sectionSkyLights[i], 0, 2048);
             }
-            NibbleArray emitLightArray = lightengine.getLayerListener(EnumSkyBlock.BLOCK).getDataLayerData(SectionPosition.of(x, chunk.getSectionYFromSectionIndex(i), z)); // SPIGOT-7498: Convert section index
+            DataLayer emitLightArray = lightengine.getLayerListener(LightLayer.BLOCK).getDataLayerData(SectionPos.of(this.x, chunk.getSectionYFromSectionIndex(i), this.z)); // SPIGOT-7498: Convert section index
             if (emitLightArray == null) {
-                sectionEmitLights[i] = EMPTY_LIGHT;
+                sectionEmitLights[i] = CraftChunk.EMPTY_LIGHT;
             } else {
                 sectionEmitLights[i] = new byte[2048];
                 System.arraycopy(emitLightArray.getData(), 0, sectionEmitLights[i], 0, 2048);
             }
 
             if (biome != null) {
-                data.put("biomes", biomeCodec.encodeStart(DynamicOpsNBT.INSTANCE, cs[i].getBiomes()).getOrThrow());
-                biome[i] = biomeCodec.parse(DynamicOpsNBT.INSTANCE, data.getCompound("biomes")).getOrThrow(SerializableChunkData.a::new);
+                data.put("biomes", biomeCodec.encodeStart(NbtOps.INSTANCE, cs[i].getBiomes()).getOrThrow());
+                biome[i] = biomeCodec.parse(NbtOps.INSTANCE, data.getCompound("biomes")).getOrThrow(SerializableChunkData.ChunkReadException::new);
             }
         }
 
-        HeightMap hmap = null;
+        Heightmap hmap = null;
 
         if (includeMaxBlockY) {
-            hmap = new HeightMap(chunk, HeightMap.Type.MOTION_BLOCKING);
-            hmap.setRawData(chunk, HeightMap.Type.MOTION_BLOCKING, chunk.heightmaps.get(HeightMap.Type.MOTION_BLOCKING).getRawData());
+            hmap = new Heightmap(chunk, Heightmap.Types.MOTION_BLOCKING);
+            hmap.setRawData(chunk, Heightmap.Types.MOTION_BLOCKING, chunk.heightmaps.get(Heightmap.Types.MOTION_BLOCKING).getRawData());
         }
 
-        World world = getWorld();
-        return new CraftChunkSnapshot(getX(), getZ(), chunk.getMinY(), chunk.getMaxY(), world.getSeaLevel(), world.getName(), world.getFullTime(), sectionBlockIDs, sectionSkyLights, sectionEmitLights, sectionEmpty, hmap, iregistry, biome);
+        World world = this.getWorld();
+        return new CraftChunkSnapshot(this.getX(), this.getZ(), chunk.getMinY(), chunk.getMaxY(), world.getSeaLevel(), world.getName(), world.getFullTime(), sectionBlockIDs, sectionSkyLights, sectionEmitLights, sectionEmpty, hmap, iregistry, biome);
     }
 
     @Override
     public PersistentDataContainer getPersistentDataContainer() {
-        return getHandle(ChunkStatus.STRUCTURE_STARTS).persistentDataContainer;
+        return this.getHandle(ChunkStatus.STRUCTURE_STARTS).persistentDataContainer;
     }
 
     @Override
     public LoadLevel getLoadLevel() {
-        net.minecraft.world.level.chunk.Chunk chunk = worldServer.getChunkIfLoaded(getX(), getZ());
+        net.minecraft.world.level.chunk.LevelChunk chunk = this.worldServer.getChunkIfLoaded(this.getX(), this.getZ());
         if (chunk == null) {
             return LoadLevel.UNLOADED;
         }
@@ -369,64 +367,64 @@ public class CraftChunk implements Chunk {
 
     @Override
     public Collection<GeneratedStructure> getStructures() {
-        return getCraftWorld().getStructures(getX(), getZ());
+        return this.getCraftWorld().getStructures(this.getX(), this.getZ());
     }
 
     @Override
     public Collection<GeneratedStructure> getStructures(Structure structure) {
-        return getCraftWorld().getStructures(getX(), getZ(), structure);
+        return this.getCraftWorld().getStructures(this.getX(), this.getZ(), structure);
     }
 
     @Override
     public Collection<Player> getPlayersSeeingChunk() {
-        return getWorld().getPlayersSeeingChunk(this);
+        return this.getWorld().getPlayersSeeingChunk(this);
     }
 
     @Override
     public boolean equals(Object o) {
         if (this == o) return true;
-        if (o == null || getClass() != o.getClass()) return false;
+        if (o == null || this.getClass() != o.getClass()) return false;
 
         CraftChunk that = (CraftChunk) o;
 
-        if (x != that.x) return false;
-        if (z != that.z) return false;
-        return worldServer.equals(that.worldServer);
+        if (this.x != that.x) return false;
+        if (this.z != that.z) return false;
+        return this.worldServer.equals(that.worldServer);
     }
 
     @Override
     public int hashCode() {
-        int result = worldServer.hashCode();
-        result = 31 * result + x;
-        result = 31 * result + z;
+        int result = this.worldServer.hashCode();
+        result = 31 * result + this.x;
+        result = 31 * result + this.z;
         return result;
     }
 
     public static ChunkSnapshot getEmptyChunkSnapshot(int x, int z, CraftWorld world, boolean includeBiome, boolean includeBiomeTempRain) {
-        IChunkAccess actual = world.getHandle().getChunk(x, z, (includeBiome || includeBiomeTempRain) ? ChunkStatus.BIOMES : ChunkStatus.EMPTY);
+        ChunkAccess actual = world.getHandle().getChunk(x, z, (includeBiome || includeBiomeTempRain) ? ChunkStatus.BIOMES : ChunkStatus.EMPTY);
 
         /* Fill with empty data */
         int hSection = actual.getSectionsCount();
-        DataPaletteBlock[] blockIDs = new DataPaletteBlock[hSection];
+        PalettedContainer[] blockIDs = new PalettedContainer[hSection];
         byte[][] skyLight = new byte[hSection][];
         byte[][] emitLight = new byte[hSection][];
         boolean[] empty = new boolean[hSection];
-        IRegistry<BiomeBase> iregistry = world.getHandle().registryAccess().lookupOrThrow(Registries.BIOME);
-        DataPaletteBlock<Holder<BiomeBase>>[] biome = (includeBiome || includeBiomeTempRain) ? new DataPaletteBlock[hSection] : null;
-        Codec<PalettedContainerRO<Holder<BiomeBase>>> biomeCodec = DataPaletteBlock.codecRO(iregistry.asHolderIdMap(), iregistry.holderByNameCodec(), DataPaletteBlock.d.SECTION_BIOMES, iregistry.getOrThrow(Biomes.PLAINS));
+        Registry<net.minecraft.world.level.biome.Biome> iregistry = world.getHandle().registryAccess().lookupOrThrow(Registries.BIOME);
+        PalettedContainer<Holder<net.minecraft.world.level.biome.Biome>>[] biome = (includeBiome || includeBiomeTempRain) ? new PalettedContainer[hSection] : null;
+        Codec<PalettedContainerRO<Holder<net.minecraft.world.level.biome.Biome>>> biomeCodec = PalettedContainer.codecRO(iregistry.asHolderIdMap(), iregistry.holderByNameCodec(), PalettedContainer.Strategy.SECTION_BIOMES, iregistry.getOrThrow(Biomes.PLAINS));
 
         for (int i = 0; i < hSection; i++) {
-            blockIDs[i] = emptyBlockIDs;
-            skyLight[i] = world.getHandle().dimensionType().hasSkyLight() ? FULL_LIGHT : EMPTY_LIGHT;
-            emitLight[i] = EMPTY_LIGHT;
+            blockIDs[i] = CraftChunk.emptyBlockIDs;
+            skyLight[i] = world.getHandle().dimensionType().hasSkyLight() ? CraftChunk.FULL_LIGHT : CraftChunk.EMPTY_LIGHT;
+            emitLight[i] = CraftChunk.EMPTY_LIGHT;
             empty[i] = true;
 
             if (biome != null) {
-                biome[i] = (DataPaletteBlock<Holder<BiomeBase>>) biomeCodec.parse(DynamicOpsNBT.INSTANCE, biomeCodec.encodeStart(DynamicOpsNBT.INSTANCE, actual.getSection(i).getBiomes()).getOrThrow()).getOrThrow(SerializableChunkData.a::new);
+                biome[i] = (PalettedContainer<Holder<net.minecraft.world.level.biome.Biome>>) biomeCodec.parse(NbtOps.INSTANCE, biomeCodec.encodeStart(NbtOps.INSTANCE, actual.getSection(i).getBiomes()).getOrThrow()).getOrThrow(SerializableChunkData.ChunkReadException::new);
             }
         }
 
-        return new CraftChunkSnapshot(x, z, world.getMinHeight(), world.getMaxHeight(), world.getSeaLevel(), world.getName(), world.getFullTime(), blockIDs, skyLight, emitLight, empty, new HeightMap(actual, HeightMap.Type.MOTION_BLOCKING), iregistry, biome);
+        return new CraftChunkSnapshot(x, z, world.getMinHeight(), world.getMaxHeight(), world.getSeaLevel(), world.getName(), world.getFullTime(), blockIDs, skyLight, emitLight, empty, new Heightmap(actual, Heightmap.Types.MOTION_BLOCKING), iregistry, biome);
     }
 
     static void validateChunkCoordinates(int minY, int maxY, int x, int y, int z) {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java
index 971b5fd152..a845ebd626 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftChunkSnapshot.java
@@ -3,14 +3,13 @@ package org.bukkit.craftbukkit;
 import com.google.common.base.Preconditions;
 import com.google.common.base.Predicates;
 import java.util.function.Predicate;
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
 import net.minecraft.core.Holder;
-import net.minecraft.core.IRegistry;
-import net.minecraft.world.level.biome.BiomeBase;
-import net.minecraft.world.level.block.state.IBlockData;
-import net.minecraft.world.level.chunk.DataPaletteBlock;
+import net.minecraft.core.Registry;
+import net.minecraft.world.level.block.state.BlockState;
+import net.minecraft.world.level.chunk.PalettedContainer;
 import net.minecraft.world.level.chunk.PalettedContainerRO;
-import net.minecraft.world.level.levelgen.HeightMap;
+import net.minecraft.world.level.levelgen.Heightmap;
 import org.bukkit.ChunkSnapshot;
 import org.bukkit.Material;
 import org.bukkit.block.Biome;
@@ -28,16 +27,16 @@ public class CraftChunkSnapshot implements ChunkSnapshot {
     private final int x, z;
     private final int minHeight, maxHeight, seaLevel;
     private final String worldname;
-    private final DataPaletteBlock<IBlockData>[] blockids;
+    private final PalettedContainer<BlockState>[] blockids;
     private final byte[][] skylight;
     private final byte[][] emitlight;
     private final boolean[] empty;
-    private final HeightMap hmap; // Height map
+    private final Heightmap hmap; // Height map
     private final long captureFulltime;
-    private final IRegistry<BiomeBase> biomeRegistry;
-    private final PalettedContainerRO<Holder<BiomeBase>>[] biome;
+    private final Registry<net.minecraft.world.level.biome.Biome> biomeRegistry;
+    private final PalettedContainerRO<Holder<net.minecraft.world.level.biome.Biome>>[] biome;
 
-    CraftChunkSnapshot(int x, int z, int minHeight, int maxHeight, int seaLevel, String wname, long wtime, DataPaletteBlock<IBlockData>[] sectionBlockIDs, byte[][] sectionSkyLights, byte[][] sectionEmitLights, boolean[] sectionEmpty, HeightMap hmap, IRegistry<BiomeBase> biomeRegistry, PalettedContainerRO<Holder<BiomeBase>>[] biome) {
+    CraftChunkSnapshot(int x, int z, int minHeight, int maxHeight, int seaLevel, String wname, long wtime, PalettedContainer<BlockState>[] sectionBlockIDs, byte[][] sectionSkyLights, byte[][] sectionEmitLights, boolean[] sectionEmpty, Heightmap hmap, Registry<net.minecraft.world.level.biome.Biome> biomeRegistry, PalettedContainerRO<Holder<net.minecraft.world.level.biome.Biome>>[] biome) {
         this.x = x;
         this.z = z;
         this.minHeight = minHeight;
@@ -56,25 +55,25 @@ public class CraftChunkSnapshot implements ChunkSnapshot {
 
     @Override
     public int getX() {
-        return x;
+        return this.x;
     }
 
     @Override
     public int getZ() {
-        return z;
+        return this.z;
     }
 
     @Override
     public String getWorldName() {
-        return worldname;
+        return this.worldname;
     }
 
     @Override
     public boolean contains(BlockData block) {
         Preconditions.checkArgument(block != null, "Block cannot be null");
 
-        Predicate<IBlockData> nms = Predicates.equalTo(((CraftBlockData) block).getState());
-        for (DataPaletteBlock<IBlockData> palette : blockids) {
+        Predicate<BlockState> nms = Predicates.equalTo(((CraftBlockData) block).getState());
+        for (PalettedContainer<BlockState> palette : this.blockids) {
             if (palette.maybeHas(nms)) {
                 return true;
             }
@@ -87,8 +86,8 @@ public class CraftChunkSnapshot implements ChunkSnapshot {
     public boolean contains(Biome biome) {
         Preconditions.checkArgument(biome != null, "Biome cannot be null");
 
-        Predicate<Holder<BiomeBase>> nms = Predicates.equalTo(CraftBiome.bukkitToMinecraftHolder(biome));
-        for (PalettedContainerRO<Holder<BiomeBase>> palette : this.biome) {
+        Predicate<Holder<net.minecraft.world.level.biome.Biome>> nms = Predicates.equalTo(CraftBiome.bukkitToMinecraftHolder(biome));
+        for (PalettedContainerRO<Holder<net.minecraft.world.level.biome.Biome>> palette : this.biome) {
             if (palette.maybeHas(nms)) {
                 return true;
             }
@@ -99,92 +98,92 @@ public class CraftChunkSnapshot implements ChunkSnapshot {
 
     @Override
     public Material getBlockType(int x, int y, int z) {
-        validateChunkCoordinates(x, y, z);
+        this.validateChunkCoordinates(x, y, z);
 
-        return CraftBlockType.minecraftToBukkit(blockids[getSectionIndex(y)].get(x, y & 0xF, z).getBlock());
+        return CraftBlockType.minecraftToBukkit(this.blockids[this.getSectionIndex(y)].get(x, y & 0xF, z).getBlock());
     }
 
     @Override
     public final BlockData getBlockData(int x, int y, int z) {
-        validateChunkCoordinates(x, y, z);
+        this.validateChunkCoordinates(x, y, z);
 
-        return CraftBlockData.fromData(blockids[getSectionIndex(y)].get(x, y & 0xF, z));
+        return CraftBlockData.fromData(this.blockids[this.getSectionIndex(y)].get(x, y & 0xF, z));
     }
 
     @Override
     public final int getData(int x, int y, int z) {
-        validateChunkCoordinates(x, y, z);
+        this.validateChunkCoordinates(x, y, z);
 
-        return CraftMagicNumbers.toLegacyData(blockids[getSectionIndex(y)].get(x, y & 0xF, z));
+        return CraftMagicNumbers.toLegacyData(this.blockids[this.getSectionIndex(y)].get(x, y & 0xF, z));
     }
 
     @Override
     public final int getBlockSkyLight(int x, int y, int z) {
-        validateChunkCoordinates(x, y, z);
+        this.validateChunkCoordinates(x, y, z);
 
         int off = ((y & 0xF) << 7) | (z << 3) | (x >> 1);
-        return (skylight[getSectionIndex(y)][off] >> ((x & 1) << 2)) & 0xF;
+        return (this.skylight[this.getSectionIndex(y)][off] >> ((x & 1) << 2)) & 0xF;
     }
 
     @Override
     public final int getBlockEmittedLight(int x, int y, int z) {
-        validateChunkCoordinates(x, y, z);
+        this.validateChunkCoordinates(x, y, z);
 
         int off = ((y & 0xF) << 7) | (z << 3) | (x >> 1);
-        return (emitlight[getSectionIndex(y)][off] >> ((x & 1) << 2)) & 0xF;
+        return (this.emitlight[this.getSectionIndex(y)][off] >> ((x & 1) << 2)) & 0xF;
     }
 
     @Override
     public final int getHighestBlockYAt(int x, int z) {
-        Preconditions.checkState(hmap != null, "ChunkSnapshot created without height map. Please call getSnapshot with includeMaxblocky=true");
-        validateChunkCoordinates(x, 0, z);
+        Preconditions.checkState(this.hmap != null, "ChunkSnapshot created without height map. Please call getSnapshot with includeMaxblocky=true");
+        this.validateChunkCoordinates(x, 0, z);
 
-        return hmap.getHighestTaken(x, z);
+        return this.hmap.getHighestTaken(x, z);
     }
 
     @Override
     public final Biome getBiome(int x, int z) {
-        return getBiome(x, 0, z);
+        return this.getBiome(x, 0, z);
     }
 
     @Override
     public final Biome getBiome(int x, int y, int z) {
-        Preconditions.checkState(biome != null, "ChunkSnapshot created without biome. Please call getSnapshot with includeBiome=true");
-        validateChunkCoordinates(x, y, z);
+        Preconditions.checkState(this.biome != null, "ChunkSnapshot created without biome. Please call getSnapshot with includeBiome=true");
+        this.validateChunkCoordinates(x, y, z);
 
-        PalettedContainerRO<Holder<BiomeBase>> biome = this.biome[getSectionIndex(y)]; // SPIGOT-7188: Don't need to convert y to biome coordinate scale since it is bound to the block chunk section
+        PalettedContainerRO<Holder<net.minecraft.world.level.biome.Biome>> biome = this.biome[this.getSectionIndex(y)]; // SPIGOT-7188: Don't need to convert y to biome coordinate scale since it is bound to the block chunk section
         return CraftBiome.minecraftHolderToBukkit(biome.get(x >> 2, (y & 0xF) >> 2, z >> 2));
     }
 
     @Override
     public final double getRawBiomeTemperature(int x, int z) {
-        return getRawBiomeTemperature(x, 0, z);
+        return this.getRawBiomeTemperature(x, 0, z);
     }
 
     @Override
     public final double getRawBiomeTemperature(int x, int y, int z) {
-        Preconditions.checkState(biome != null, "ChunkSnapshot created without biome. Please call getSnapshot with includeBiome=true");
-        validateChunkCoordinates(x, y, z);
+        Preconditions.checkState(this.biome != null, "ChunkSnapshot created without biome. Please call getSnapshot with includeBiome=true");
+        this.validateChunkCoordinates(x, y, z);
 
-        PalettedContainerRO<Holder<BiomeBase>> biome = this.biome[getSectionIndex(y)]; // SPIGOT-7188: Don't need to convert y to biome coordinate scale since it is bound to the block chunk section
-        return biome.get(x >> 2, (y & 0xF) >> 2, z >> 2).value().getTemperature(new BlockPosition((this.x << 4) | x, y, (this.z << 4) | z), seaLevel);
+        PalettedContainerRO<Holder<net.minecraft.world.level.biome.Biome>> biome = this.biome[this.getSectionIndex(y)]; // SPIGOT-7188: Don't need to convert y to biome coordinate scale since it is bound to the block chunk section
+        return biome.get(x >> 2, (y & 0xF) >> 2, z >> 2).value().getTemperature(new BlockPos((this.x << 4) | x, y, (this.z << 4) | z), this.seaLevel);
     }
 
     @Override
     public final long getCaptureFullTime() {
-        return captureFulltime;
+        return this.captureFulltime;
     }
 
     @Override
     public final boolean isSectionEmpty(int sy) {
-        return empty[sy];
+        return this.empty[sy];
     }
 
     private int getSectionIndex(int y) {
-        return (y - minHeight) >> 4;
+        return (y - this.minHeight) >> 4;
     }
 
     private void validateChunkCoordinates(int x, int y, int z) {
-        CraftChunk.validateChunkCoordinates(minHeight, maxHeight, x, y, z);
+        CraftChunk.validateChunkCoordinates(this.minHeight, this.maxHeight, x, y, z);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftEquipmentSlot.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftEquipmentSlot.java
index e379616d94..ae86c45c1d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftEquipmentSlot.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftEquipmentSlot.java
@@ -1,56 +1,55 @@
 package org.bukkit.craftbukkit;
 
 import java.util.Locale;
-import net.minecraft.world.EnumHand;
-import net.minecraft.world.entity.EnumItemSlot;
+import net.minecraft.world.InteractionHand;
 import net.minecraft.world.entity.EquipmentSlotGroup;
 import org.bukkit.inventory.EquipmentSlot;
 
 public class CraftEquipmentSlot {
 
-    private static final EnumItemSlot[] slots = new EnumItemSlot[EquipmentSlot.values().length];
-    private static final EquipmentSlot[] enums = new EquipmentSlot[EnumItemSlot.values().length];
+    private static final net.minecraft.world.entity.EquipmentSlot[] slots = new net.minecraft.world.entity.EquipmentSlot[EquipmentSlot.values().length];
+    private static final EquipmentSlot[] enums = new EquipmentSlot[net.minecraft.world.entity.EquipmentSlot.values().length];
 
     static {
-        set(EquipmentSlot.HAND, EnumItemSlot.MAINHAND);
-        set(EquipmentSlot.OFF_HAND, EnumItemSlot.OFFHAND);
-        set(EquipmentSlot.FEET, EnumItemSlot.FEET);
-        set(EquipmentSlot.LEGS, EnumItemSlot.LEGS);
-        set(EquipmentSlot.CHEST, EnumItemSlot.CHEST);
-        set(EquipmentSlot.HEAD, EnumItemSlot.HEAD);
-        set(EquipmentSlot.BODY, EnumItemSlot.BODY);
+        set(EquipmentSlot.HAND, net.minecraft.world.entity.EquipmentSlot.MAINHAND);
+        set(EquipmentSlot.OFF_HAND, net.minecraft.world.entity.EquipmentSlot.OFFHAND);
+        set(EquipmentSlot.FEET, net.minecraft.world.entity.EquipmentSlot.FEET);
+        set(EquipmentSlot.LEGS, net.minecraft.world.entity.EquipmentSlot.LEGS);
+        set(EquipmentSlot.CHEST, net.minecraft.world.entity.EquipmentSlot.CHEST);
+        set(EquipmentSlot.HEAD, net.minecraft.world.entity.EquipmentSlot.HEAD);
+        set(EquipmentSlot.BODY, net.minecraft.world.entity.EquipmentSlot.BODY);
     }
 
-    private static void set(EquipmentSlot type, EnumItemSlot value) {
-        slots[type.ordinal()] = value;
-        enums[value.ordinal()] = type;
+    private static void set(EquipmentSlot type, net.minecraft.world.entity.EquipmentSlot value) {
+        CraftEquipmentSlot.slots[type.ordinal()] = value;
+        CraftEquipmentSlot.enums[value.ordinal()] = type;
     }
 
-    public static EquipmentSlot getSlot(EnumItemSlot nms) {
-        return enums[nms.ordinal()];
+    public static EquipmentSlot getSlot(net.minecraft.world.entity.EquipmentSlot nms) {
+        return CraftEquipmentSlot.enums[nms.ordinal()];
     }
 
     public static org.bukkit.inventory.EquipmentSlotGroup getSlot(EquipmentSlotGroup nms) {
         return org.bukkit.inventory.EquipmentSlotGroup.getByName(nms.getSerializedName());
     }
 
-    public static EnumItemSlot getNMS(EquipmentSlot slot) {
-        return slots[slot.ordinal()];
+    public static net.minecraft.world.entity.EquipmentSlot getNMS(EquipmentSlot slot) {
+        return CraftEquipmentSlot.slots[slot.ordinal()];
     }
 
     public static EquipmentSlotGroup getNMSGroup(org.bukkit.inventory.EquipmentSlotGroup slot) {
         return EquipmentSlotGroup.valueOf(slot.toString().toUpperCase(Locale.ROOT));
     }
 
-    public static EquipmentSlot getHand(EnumHand enumhand) {
-        return (enumhand == EnumHand.MAIN_HAND) ? EquipmentSlot.HAND : EquipmentSlot.OFF_HAND;
+    public static EquipmentSlot getHand(InteractionHand enumhand) {
+        return (enumhand == InteractionHand.MAIN_HAND) ? EquipmentSlot.HAND : EquipmentSlot.OFF_HAND;
     }
 
-    public static EnumHand getHand(EquipmentSlot hand) {
+    public static InteractionHand getHand(EquipmentSlot hand) {
         if (hand == EquipmentSlot.HAND) {
-            return EnumHand.MAIN_HAND;
+            return InteractionHand.MAIN_HAND;
         } else if (hand == EquipmentSlot.OFF_HAND) {
-            return EnumHand.OFF_HAND;
+            return InteractionHand.OFF_HAND;
         }
 
         throw new IllegalArgumentException("EquipmentSlot." + hand + " is not a hand");
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftExplosionResult.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftExplosionResult.java
index bbbb2f1223..42e0b771f4 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftExplosionResult.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftExplosionResult.java
@@ -8,7 +8,7 @@ public final class CraftExplosionResult {
 
     private CraftExplosionResult() {}
 
-    public static ExplosionResult toBukkit(Explosion.Effect effect) {
+    public static ExplosionResult toBukkit(Explosion.BlockInteraction effect) {
         Preconditions.checkArgument(effect != null, "explosion effect cannot be null");
 
         switch (effect) {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftFeatureFlag.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftFeatureFlag.java
index 4622aa4133..da90e5c84a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftFeatureFlag.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftFeatureFlag.java
@@ -2,7 +2,7 @@ package org.bukkit.craftbukkit;
 
 import java.util.HashSet;
 import java.util.Set;
-import net.minecraft.resources.MinecraftKey;
+import net.minecraft.resources.ResourceLocation;
 import net.minecraft.world.flag.FeatureFlagSet;
 import net.minecraft.world.flag.FeatureFlags;
 import org.bukkit.FeatureFlag;
@@ -15,7 +15,7 @@ public class CraftFeatureFlag implements FeatureFlag {
     private final NamespacedKey namespacedKey;
     private final net.minecraft.world.flag.FeatureFlag featureFlag;
 
-    public CraftFeatureFlag(MinecraftKey minecraftKey, net.minecraft.world.flag.FeatureFlag featureFlag) {
+    public CraftFeatureFlag(ResourceLocation minecraftKey, net.minecraft.world.flag.FeatureFlag featureFlag) {
         this.namespacedKey = CraftNamespacedKey.fromMinecraft(minecraftKey);
         this.featureFlag = featureFlag;
     }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftFluid.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftFluid.java
index dabf55cffa..6cbd9d313d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftFluid.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftFluid.java
@@ -2,31 +2,30 @@ package org.bukkit.craftbukkit;
 
 import java.util.Locale;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.world.level.material.FluidType;
 import org.bukkit.Fluid;
 import org.bukkit.NamespacedKey;
 import org.bukkit.Registry;
 import org.bukkit.craftbukkit.util.Handleable;
 import org.jetbrains.annotations.NotNull;
 
-public class CraftFluid implements Fluid, Handleable<FluidType> {
+public class CraftFluid implements Fluid, Handleable<net.minecraft.world.level.material.Fluid> {
 
     private static int count = 0;
 
-    public static Fluid minecraftToBukkit(FluidType minecraft) {
+    public static Fluid minecraftToBukkit(net.minecraft.world.level.material.Fluid minecraft) {
         return CraftRegistry.minecraftToBukkit(minecraft, Registries.FLUID, Registry.FLUID);
     }
 
-    public static FluidType bukkitToMinecraft(Fluid bukkit) {
+    public static net.minecraft.world.level.material.Fluid bukkitToMinecraft(Fluid bukkit) {
         return CraftRegistry.bukkitToMinecraft(bukkit);
     }
 
     private final NamespacedKey key;
-    private final FluidType fluidType;
+    private final net.minecraft.world.level.material.Fluid fluidType;
     private final String name;
     private final int ordinal;
 
-    public CraftFluid(NamespacedKey key, FluidType fluidType) {
+    public CraftFluid(NamespacedKey key, net.minecraft.world.level.material.Fluid fluidType) {
         this.key = key;
         this.fluidType = fluidType;
         // For backwards compatibility, minecraft values will stile return the uppercase name without the namespace,
@@ -38,40 +37,40 @@ public class CraftFluid implements Fluid, Handleable<FluidType> {
         } else {
             this.name = key.toString();
         }
-        this.ordinal = count++;
+        this.ordinal = CraftFluid.count++;
     }
 
     @Override
-    public FluidType getHandle() {
-        return fluidType;
+    public net.minecraft.world.level.material.Fluid getHandle() {
+        return this.fluidType;
     }
 
     @NotNull
     @Override
     public NamespacedKey getKey() {
-        return key;
+        return this.key;
     }
 
     @Override
     public int compareTo(@NotNull Fluid fluid) {
-        return ordinal - fluid.ordinal();
+        return this.ordinal - fluid.ordinal();
     }
 
     @NotNull
     @Override
     public String name() {
-        return name;
+        return this.name;
     }
 
     @Override
     public int ordinal() {
-        return ordinal;
+        return this.ordinal;
     }
 
     @Override
     public String toString() {
         // For backwards compatibility
-        return name();
+        return this.name();
     }
 
     @Override
@@ -84,11 +83,11 @@ public class CraftFluid implements Fluid, Handleable<FluidType> {
             return false;
         }
 
-        return getKey().equals(otherFluid.getKey());
+        return this.getKey().equals(otherFluid.getKey());
     }
 
     @Override
     public int hashCode() {
-        return getKey().hashCode();
+        return this.getKey().hashCode();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftFluidCollisionMode.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftFluidCollisionMode.java
index 1991614da2..2178d65fae 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftFluidCollisionMode.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftFluidCollisionMode.java
@@ -1,22 +1,22 @@
 package org.bukkit.craftbukkit;
 
-import net.minecraft.world.level.RayTrace.FluidCollisionOption;
+import net.minecraft.world.level.ClipContext.Fluid;
 import org.bukkit.FluidCollisionMode;
 
 public final class CraftFluidCollisionMode {
 
     private CraftFluidCollisionMode() {}
 
-    public static FluidCollisionOption toNMS(FluidCollisionMode fluidCollisionMode) {
+    public static Fluid toNMS(FluidCollisionMode fluidCollisionMode) {
         if (fluidCollisionMode == null) return null;
 
         switch (fluidCollisionMode) {
             case ALWAYS:
-                return FluidCollisionOption.ANY;
+                return Fluid.ANY;
             case SOURCE_ONLY:
-                return FluidCollisionOption.SOURCE_ONLY;
+                return Fluid.SOURCE_ONLY;
             case NEVER:
-                return FluidCollisionOption.NONE;
+                return Fluid.NONE;
             default:
                 return null;
         }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftGameEvent.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftGameEvent.java
index 33c07bc905..ac9b4328cd 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftGameEvent.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftGameEvent.java
@@ -27,13 +27,13 @@ public class CraftGameEvent extends GameEvent implements Handleable<net.minecraf
 
     @Override
     public net.minecraft.world.level.gameevent.GameEvent getHandle() {
-        return handle;
+        return this.handle;
     }
 
     @NotNull
     @Override
     public NamespacedKey getKey() {
-        return key;
+        return this.key;
     }
 
     @Override
@@ -46,16 +46,16 @@ public class CraftGameEvent extends GameEvent implements Handleable<net.minecraf
             return false;
         }
 
-        return getKey().equals(((GameEvent) other).getKey());
+        return this.getKey().equals(((GameEvent) other).getKey());
     }
 
     @Override
     public int hashCode() {
-        return getKey().hashCode();
+        return this.getKey().hashCode();
     }
 
     @Override
     public String toString() {
-        return "CraftGameEvent{key=" + key + "}";
+        return "CraftGameEvent{key=" + this.key + "}";
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftHeightMap.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftHeightMap.java
index e635e0858c..8032f40212 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftHeightMap.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftHeightMap.java
@@ -7,26 +7,26 @@ public final class CraftHeightMap {
     private CraftHeightMap() {
     }
 
-    public static net.minecraft.world.level.levelgen.HeightMap.Type toNMS(HeightMap bukkitHeightMap) {
+    public static net.minecraft.world.level.levelgen.Heightmap.Types toNMS(HeightMap bukkitHeightMap) {
         switch (bukkitHeightMap) {
             case MOTION_BLOCKING_NO_LEAVES:
-                return net.minecraft.world.level.levelgen.HeightMap.Type.MOTION_BLOCKING_NO_LEAVES;
+                return net.minecraft.world.level.levelgen.Heightmap.Types.MOTION_BLOCKING_NO_LEAVES;
             case OCEAN_FLOOR:
-                return net.minecraft.world.level.levelgen.HeightMap.Type.OCEAN_FLOOR;
+                return net.minecraft.world.level.levelgen.Heightmap.Types.OCEAN_FLOOR;
             case OCEAN_FLOOR_WG:
-                return net.minecraft.world.level.levelgen.HeightMap.Type.OCEAN_FLOOR_WG;
+                return net.minecraft.world.level.levelgen.Heightmap.Types.OCEAN_FLOOR_WG;
             case WORLD_SURFACE:
-                return net.minecraft.world.level.levelgen.HeightMap.Type.WORLD_SURFACE;
+                return net.minecraft.world.level.levelgen.Heightmap.Types.WORLD_SURFACE;
             case WORLD_SURFACE_WG:
-                return net.minecraft.world.level.levelgen.HeightMap.Type.WORLD_SURFACE_WG;
+                return net.minecraft.world.level.levelgen.Heightmap.Types.WORLD_SURFACE_WG;
             case MOTION_BLOCKING:
-                return net.minecraft.world.level.levelgen.HeightMap.Type.MOTION_BLOCKING;
+                return net.minecraft.world.level.levelgen.Heightmap.Types.MOTION_BLOCKING;
             default:
-                throw new EnumConstantNotPresentException(net.minecraft.world.level.levelgen.HeightMap.Type.class, bukkitHeightMap.name());
+                throw new EnumConstantNotPresentException(net.minecraft.world.level.levelgen.Heightmap.Types.class, bukkitHeightMap.name());
         }
     }
 
-    public static HeightMap fromNMS(net.minecraft.world.level.levelgen.HeightMap.Type nmsHeightMapType) {
+    public static HeightMap fromNMS(net.minecraft.world.level.levelgen.Heightmap.Types nmsHeightMapType) {
         switch (nmsHeightMapType) {
             case WORLD_SURFACE_WG:
                 return HeightMap.WORLD_SURFACE_WG;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftInput.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftInput.java
index ee71b85e77..db40ec781e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftInput.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftInput.java
@@ -13,37 +13,37 @@ public class CraftInput implements Input {
 
     @Override
     public boolean isForward() {
-        return handle.forward();
+        return this.handle.forward();
     }
 
     @Override
     public boolean isBackward() {
-        return handle.backward();
+        return this.handle.backward();
     }
 
     @Override
     public boolean isLeft() {
-        return handle.left();
+        return this.handle.left();
     }
 
     @Override
     public boolean isRight() {
-        return handle.right();
+        return this.handle.right();
     }
 
     @Override
     public boolean isJump() {
-        return handle.jump();
+        return this.handle.jump();
     }
 
     @Override
     public boolean isSneak() {
-        return handle.shift();
+        return this.handle.shift();
     }
 
     @Override
     public boolean isSprint() {
-        return handle.sprint();
+        return this.handle.sprint();
     }
 
     @Override
@@ -61,7 +61,7 @@ public class CraftInput implements Input {
         if (obj == null) {
             return false;
         }
-        if (getClass() != obj.getClass()) {
+        if (this.getClass() != obj.getClass()) {
             return false;
         }
         final CraftInput other = (CraftInput) obj;
@@ -70,6 +70,6 @@ public class CraftInput implements Input {
 
     @Override
     public String toString() {
-        return "CraftInput{" + handle + '}';
+        return "CraftInput{" + this.handle + '}';
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftJukeboxSong.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftJukeboxSong.java
index 647b8d4afa..49c037e961 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftJukeboxSong.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftJukeboxSong.java
@@ -2,7 +2,6 @@ package org.bukkit.craftbukkit;
 
 import com.google.common.base.Preconditions;
 import net.minecraft.core.Holder;
-import net.minecraft.core.IRegistry;
 import net.minecraft.core.registries.Registries;
 import net.minecraft.network.chat.contents.TranslatableContents;
 import org.bukkit.JukeboxSong;
@@ -18,7 +17,7 @@ public class CraftJukeboxSong implements JukeboxSong, Handleable<net.minecraft.w
     }
 
     public static JukeboxSong minecraftHolderToBukkit(Holder<net.minecraft.world.item.JukeboxSong> minecraft) {
-        return minecraftToBukkit(minecraft.value());
+        return CraftJukeboxSong.minecraftToBukkit(minecraft.value());
     }
 
     public static net.minecraft.world.item.JukeboxSong bukkitToMinecraft(JukeboxSong bukkit) {
@@ -28,9 +27,9 @@ public class CraftJukeboxSong implements JukeboxSong, Handleable<net.minecraft.w
     public static Holder<net.minecraft.world.item.JukeboxSong> bukkitToMinecraftHolder(JukeboxSong bukkit) {
         Preconditions.checkArgument(bukkit != null);
 
-        IRegistry<net.minecraft.world.item.JukeboxSong> registry = CraftRegistry.getMinecraftRegistry(Registries.JUKEBOX_SONG);
+        net.minecraft.core.Registry<net.minecraft.world.item.JukeboxSong> registry = CraftRegistry.getMinecraftRegistry(Registries.JUKEBOX_SONG);
 
-        if (registry.wrapAsHolder(bukkitToMinecraft(bukkit)) instanceof Holder.c<net.minecraft.world.item.JukeboxSong> holder) {
+        if (registry.wrapAsHolder(CraftJukeboxSong.bukkitToMinecraft(bukkit)) instanceof Holder.Reference<net.minecraft.world.item.JukeboxSong> holder) {
             return holder;
         }
 
@@ -48,18 +47,18 @@ public class CraftJukeboxSong implements JukeboxSong, Handleable<net.minecraft.w
 
     @Override
     public net.minecraft.world.item.JukeboxSong getHandle() {
-        return handle;
+        return this.handle;
     }
 
     @Override
     @NotNull
     public NamespacedKey getKey() {
-        return key;
+        return this.key;
     }
 
     @NotNull
     @Override
     public String getTranslationKey() {
-        return ((TranslatableContents) handle.description().getContents()).getKey();
+        return ((TranslatableContents) this.handle.description().getContents()).getKey();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java
index f8de98e034..a70e6872ad 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftLootTable.java
@@ -6,19 +6,18 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Random;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.resources.MinecraftKey;
 import net.minecraft.resources.ResourceKey;
-import net.minecraft.server.level.WorldServer;
+import net.minecraft.resources.ResourceLocation;
+import net.minecraft.server.level.ServerLevel;
 import net.minecraft.util.context.ContextKey;
 import net.minecraft.util.context.ContextKeySet;
-import net.minecraft.world.IInventory;
+import net.minecraft.world.Container;
 import net.minecraft.world.entity.Entity;
-import net.minecraft.world.entity.player.EntityHuman;
+import net.minecraft.world.entity.player.Player;
 import net.minecraft.world.level.storage.loot.LootParams;
 import net.minecraft.world.level.storage.loot.LootTable;
-import net.minecraft.world.level.storage.loot.LootTableInfo;
-import net.minecraft.world.level.storage.loot.parameters.LootContextParameters;
-import net.minecraft.world.phys.Vec3D;
+import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
+import net.minecraft.world.phys.Vec3;
 import org.bukkit.Bukkit;
 import org.bukkit.Location;
 import org.bukkit.NamespacedKey;
@@ -34,12 +33,12 @@ import org.bukkit.loot.LootContext;
 
 public class CraftLootTable implements org.bukkit.loot.LootTable {
 
-    public static org.bukkit.loot.LootTable minecraftToBukkit(MinecraftKey minecraft) {
+    public static org.bukkit.loot.LootTable minecraftToBukkit(ResourceLocation minecraft) {
         return (minecraft == null) ? null : Bukkit.getLootTable(CraftNamespacedKey.fromMinecraft(minecraft));
     }
 
     public static org.bukkit.loot.LootTable minecraftToBukkit(ResourceKey<LootTable> minecraft) {
-        return (minecraft == null) ? null : Bukkit.getLootTable(minecraftToBukkitKey(minecraft));
+        return (minecraft == null) ? null : Bukkit.getLootTable(CraftLootTable.minecraftToBukkitKey(minecraft));
     }
 
     public static NamespacedKey minecraftToBukkitKey(ResourceKey<LootTable> minecraft) {
@@ -47,7 +46,7 @@ public class CraftLootTable implements org.bukkit.loot.LootTable {
     }
 
     public static ResourceKey<LootTable> bukkitToMinecraft(org.bukkit.loot.LootTable table) {
-        return (table == null) ? null : bukkitKeyToMinecraft(table.getKey());
+        return (table == null) ? null : CraftLootTable.bukkitKeyToMinecraft(table.getKey());
     }
 
     public static ResourceKey<LootTable> bukkitKeyToMinecraft(NamespacedKey key) {
@@ -63,14 +62,14 @@ public class CraftLootTable implements org.bukkit.loot.LootTable {
     }
 
     public LootTable getHandle() {
-        return handle;
+        return this.handle;
     }
 
     @Override
     public Collection<ItemStack> populateLoot(Random random, LootContext context) {
         Preconditions.checkArgument(context != null, "LootContext cannot be null");
-        LootParams nmsContext = convertContext(context, random);
-        List<net.minecraft.world.item.ItemStack> nmsItems = handle.getRandomItems(nmsContext);
+        LootParams nmsContext = this.convertContext(context, random);
+        List<net.minecraft.world.item.ItemStack> nmsItems = this.handle.getRandomItems(nmsContext);
         Collection<ItemStack> bukkit = new ArrayList<>(nmsItems.size());
 
         for (net.minecraft.world.item.ItemStack item : nmsItems) {
@@ -87,87 +86,87 @@ public class CraftLootTable implements org.bukkit.loot.LootTable {
     public void fillInventory(Inventory inventory, Random random, LootContext context) {
         Preconditions.checkArgument(inventory != null, "Inventory cannot be null");
         Preconditions.checkArgument(context != null, "LootContext cannot be null");
-        LootParams nmsContext = convertContext(context, random);
+        LootParams nmsContext = this.convertContext(context, random);
         CraftInventory craftInventory = (CraftInventory) inventory;
-        IInventory handle = craftInventory.getInventory();
+        Container handle = craftInventory.getInventory();
 
         // TODO: When events are added, call event here w/ custom reason?
-        getHandle().fillInventory(handle, nmsContext, random.nextLong(), true);
+        this.getHandle().fillInventory(handle, nmsContext, random.nextLong(), true);
     }
 
     @Override
     public NamespacedKey getKey() {
-        return key;
+        return this.key;
     }
 
     private LootParams convertContext(LootContext context, Random random) {
         Preconditions.checkArgument(context != null, "LootContext cannot be null");
         Location loc = context.getLocation();
         Preconditions.checkArgument(loc.getWorld() != null, "LootContext.getLocation#getWorld cannot be null");
-        WorldServer handle = ((CraftWorld) loc.getWorld()).getHandle();
+        ServerLevel handle = ((CraftWorld) loc.getWorld()).getHandle();
 
-        LootParams.a builder = new LootParams.a(handle);
+        LootParams.Builder builder = new LootParams.Builder(handle);
         if (random != null) {
             // builder = builder.withRandom(new RandomSourceWrapper(random));
         }
-        setMaybe(builder, LootContextParameters.ORIGIN, CraftLocation.toVec3D(loc));
-        if (getHandle() != LootTable.EMPTY) {
+        this.setMaybe(builder, LootContextParams.ORIGIN, CraftLocation.toVec3D(loc));
+        if (this.getHandle() != LootTable.EMPTY) {
             // builder.luck(context.getLuck());
 
             if (context.getLootedEntity() != null) {
                 Entity nmsLootedEntity = ((CraftEntity) context.getLootedEntity()).getHandle();
-                setMaybe(builder, LootContextParameters.THIS_ENTITY, nmsLootedEntity);
-                setMaybe(builder, LootContextParameters.DAMAGE_SOURCE, handle.damageSources().generic());
-                setMaybe(builder, LootContextParameters.ORIGIN, nmsLootedEntity.position());
+                this.setMaybe(builder, LootContextParams.THIS_ENTITY, nmsLootedEntity);
+                this.setMaybe(builder, LootContextParams.DAMAGE_SOURCE, handle.damageSources().generic());
+                this.setMaybe(builder, LootContextParams.ORIGIN, nmsLootedEntity.position());
             }
 
             if (context.getKiller() != null) {
-                EntityHuman nmsKiller = ((CraftHumanEntity) context.getKiller()).getHandle();
-                setMaybe(builder, LootContextParameters.ATTACKING_ENTITY, nmsKiller);
+                Player nmsKiller = ((CraftHumanEntity) context.getKiller()).getHandle();
+                this.setMaybe(builder, LootContextParams.ATTACKING_ENTITY, nmsKiller);
                 // If there is a player killer, damage source should reflect that in case loot tables use that information
-                setMaybe(builder, LootContextParameters.DAMAGE_SOURCE, handle.damageSources().playerAttack(nmsKiller));
-                setMaybe(builder, LootContextParameters.LAST_DAMAGE_PLAYER, nmsKiller); // SPIGOT-5603 - Set minecraft:killed_by_player
-                setMaybe(builder, LootContextParameters.TOOL, nmsKiller.getUseItem()); // SPIGOT-6925 - Set minecraft:match_tool
+                this.setMaybe(builder, LootContextParams.DAMAGE_SOURCE, handle.damageSources().playerAttack(nmsKiller));
+                this.setMaybe(builder, LootContextParams.LAST_DAMAGE_PLAYER, nmsKiller); // SPIGOT-5603 - Set minecraft:killed_by_player
+                this.setMaybe(builder, LootContextParams.TOOL, nmsKiller.getUseItem()); // SPIGOT-6925 - Set minecraft:match_tool
             }
         }
 
         // SPIGOT-5603 - Avoid IllegalArgumentException in LootTableInfo#build()
-        ContextKeySet.a nmsBuilder = new ContextKeySet.a();
-        for (ContextKey<?> param : getHandle().getParamSet().required()) {
+        ContextKeySet.Builder nmsBuilder = new ContextKeySet.Builder();
+        for (ContextKey<?> param : this.getHandle().getParamSet().required()) {
             nmsBuilder.required(param);
         }
-        for (ContextKey<?> param : getHandle().getParamSet().allowed()) {
-            if (!getHandle().getParamSet().required().contains(param)) {
+        for (ContextKey<?> param : this.getHandle().getParamSet().allowed()) {
+            if (!this.getHandle().getParamSet().required().contains(param)) {
                 nmsBuilder.optional(param);
             }
         }
 
-        return builder.create(getHandle().getParamSet());
+        return builder.create(this.getHandle().getParamSet());
     }
 
-    private <T> void setMaybe(LootParams.a builder, ContextKey<T> param, T value) {
-        if (getHandle().getParamSet().required().contains(param) || getHandle().getParamSet().allowed().contains(param)) {
+    private <T> void setMaybe(LootParams.Builder builder, ContextKey<T> param, T value) {
+        if (this.getHandle().getParamSet().required().contains(param) || this.getHandle().getParamSet().allowed().contains(param)) {
             builder.withParameter(param, value);
         }
     }
 
-    public static LootContext convertContext(LootTableInfo info) {
-        Vec3D position = info.getOptionalParameter(LootContextParameters.ORIGIN);
+    public static LootContext convertContext(net.minecraft.world.level.storage.loot.LootContext info) {
+        Vec3 position = info.getOptionalParameter(LootContextParams.ORIGIN);
         if (position == null) {
-            position = info.getOptionalParameter(LootContextParameters.THIS_ENTITY).position(); // Every vanilla context has origin or this_entity, see LootContextParameterSets
+            position = info.getOptionalParameter(LootContextParams.THIS_ENTITY).position(); // Every vanilla context has origin or this_entity, see LootContextParameterSets
         }
         Location location = CraftLocation.toBukkit(position, info.getLevel().getWorld());
         LootContext.Builder contextBuilder = new LootContext.Builder(location);
 
-        if (info.hasParameter(LootContextParameters.ATTACKING_ENTITY)) {
-            CraftEntity killer = info.getOptionalParameter(LootContextParameters.ATTACKING_ENTITY).getBukkitEntity();
+        if (info.hasParameter(LootContextParams.ATTACKING_ENTITY)) {
+            CraftEntity killer = info.getOptionalParameter(LootContextParams.ATTACKING_ENTITY).getBukkitEntity();
             if (killer instanceof CraftHumanEntity) {
                 contextBuilder.killer((CraftHumanEntity) killer);
             }
         }
 
-        if (info.hasParameter(LootContextParameters.THIS_ENTITY)) {
-            contextBuilder.lootedEntity(info.getOptionalParameter(LootContextParameters.THIS_ENTITY).getBukkitEntity());
+        if (info.hasParameter(LootContextParams.THIS_ENTITY)) {
+            contextBuilder.lootedEntity(info.getOptionalParameter(LootContextParams.THIS_ENTITY).getBukkitEntity());
         }
 
         contextBuilder.luck(info.getLuck());
@@ -176,7 +175,7 @@ public class CraftLootTable implements org.bukkit.loot.LootTable {
 
     @Override
     public String toString() {
-        return getKey().toString();
+        return this.getKey().toString();
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftMusicInstrument.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftMusicInstrument.java
index b6d151d378..fa0a3f895f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftMusicInstrument.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftMusicInstrument.java
@@ -2,7 +2,6 @@ package org.bukkit.craftbukkit;
 
 import com.google.common.base.Preconditions;
 import net.minecraft.core.Holder;
-import net.minecraft.core.IRegistry;
 import net.minecraft.core.registries.Registries;
 import net.minecraft.world.item.Instrument;
 import org.bukkit.MusicInstrument;
@@ -18,7 +17,7 @@ public class CraftMusicInstrument extends MusicInstrument implements Handleable<
     }
 
     public static MusicInstrument minecraftHolderToBukkit(Holder<Instrument> minecraft) {
-        return minecraftToBukkit(minecraft.value());
+        return CraftMusicInstrument.minecraftToBukkit(minecraft.value());
     }
 
     public static Instrument bukkitToMinecraft(MusicInstrument bukkit) {
@@ -28,9 +27,9 @@ public class CraftMusicInstrument extends MusicInstrument implements Handleable<
     public static Holder<Instrument> bukkitToMinecraftHolder(MusicInstrument bukkit) {
         Preconditions.checkArgument(bukkit != null);
 
-        IRegistry<Instrument> registry = CraftRegistry.getMinecraftRegistry(Registries.INSTRUMENT);
+        net.minecraft.core.Registry<Instrument> registry = CraftRegistry.getMinecraftRegistry(Registries.INSTRUMENT);
 
-        if (registry.wrapAsHolder(bukkitToMinecraft(bukkit)) instanceof Holder.c<Instrument> holder) {
+        if (registry.wrapAsHolder(CraftMusicInstrument.bukkitToMinecraft(bukkit)) instanceof Holder.Reference<Instrument> holder) {
             return holder;
         }
 
@@ -60,13 +59,13 @@ public class CraftMusicInstrument extends MusicInstrument implements Handleable<
 
     @Override
     public Instrument getHandle() {
-        return handle;
+        return this.handle;
     }
 
     @NotNull
     @Override
     public NamespacedKey getKey() {
-        return key;
+        return this.key;
     }
 
     @Override
@@ -79,16 +78,16 @@ public class CraftMusicInstrument extends MusicInstrument implements Handleable<
             return false;
         }
 
-        return getKey().equals(((MusicInstrument) other).getKey());
+        return this.getKey().equals(((MusicInstrument) other).getKey());
     }
 
     @Override
     public int hashCode() {
-        return getKey().hashCode();
+        return this.getKey().hashCode();
     }
 
     @Override
     public String toString() {
-        return "CraftMusicInstrument{key=" + key + "}";
+        return "CraftMusicInstrument{key=" + this.key + "}";
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
index a00765395e..818df09e92 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftOfflinePlayer.java
@@ -10,12 +10,12 @@ import java.util.List;
 import java.util.Map;
 import java.util.UUID;
 import net.minecraft.core.GlobalPos;
-import net.minecraft.nbt.DynamicOpsNBT;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
-import net.minecraft.server.players.WhiteListEntry;
-import net.minecraft.stats.ServerStatisticManager;
-import net.minecraft.world.level.storage.WorldNBTStorage;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.nbt.ListTag;
+import net.minecraft.nbt.NbtOps;
+import net.minecraft.server.players.UserWhiteListEntry;
+import net.minecraft.stats.ServerStatsCounter;
+import net.minecraft.world.level.storage.PlayerDataStorage;
 import org.bukkit.BanEntry;
 import org.bukkit.BanList;
 import org.bukkit.Bukkit;
@@ -39,7 +39,7 @@ import org.bukkit.profile.PlayerProfile;
 public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializable {
     private final GameProfile profile;
     private final CraftServer server;
-    private final WorldNBTStorage storage;
+    private final PlayerDataStorage storage;
 
     protected CraftOfflinePlayer(CraftServer server, GameProfile profile) {
         this.server = server;
@@ -50,22 +50,22 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
 
     @Override
     public boolean isOnline() {
-        return getPlayer() != null;
+        return this.getPlayer() != null;
     }
 
     @Override
     public String getName() {
-        Player player = getPlayer();
+        Player player = this.getPlayer();
         if (player != null) {
             return player.getName();
         }
 
         // This might not match lastKnownName but if not it should be more correct
-        if (!profile.getName().isEmpty()) {
-            return profile.getName();
+        if (!this.profile.getName().isEmpty()) {
+            return this.profile.getName();
         }
 
-        NBTTagCompound data = getBukkitData();
+        CompoundTag data = this.getBukkitData();
 
         if (data != null) {
             if (data.contains("lastKnownName")) {
@@ -78,75 +78,75 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
 
     @Override
     public UUID getUniqueId() {
-        return profile.getId();
+        return this.profile.getId();
     }
 
     @Override
     public PlayerProfile getPlayerProfile() {
-        return new CraftPlayerProfile(profile);
+        return new CraftPlayerProfile(this.profile);
     }
 
     public Server getServer() {
-        return server;
+        return this.server;
     }
 
     @Override
     public boolean isOp() {
-        return server.getHandle().isOp(profile);
+        return this.server.getHandle().isOp(this.profile);
     }
 
     @Override
     public void setOp(boolean value) {
-        if (value == isOp()) {
+        if (value == this.isOp()) {
             return;
         }
 
         if (value) {
-            server.getHandle().op(profile);
+            this.server.getHandle().op(this.profile);
         } else {
-            server.getHandle().deop(profile);
+            this.server.getHandle().deop(this.profile);
         }
     }
 
     @Override
     public boolean isBanned() {
-        return ((ProfileBanList) server.getBanList(BanList.Type.PROFILE)).isBanned(getPlayerProfile());
+        return ((ProfileBanList) this.server.getBanList(BanList.Type.PROFILE)).isBanned(this.getPlayerProfile());
     }
 
     @Override
     public BanEntry<PlayerProfile> ban(String reason, Date expires, String source) {
-        return ((ProfileBanList) server.getBanList(BanList.Type.PROFILE)).addBan(getPlayerProfile(), reason, expires, source);
+        return ((ProfileBanList) this.server.getBanList(BanList.Type.PROFILE)).addBan(this.getPlayerProfile(), reason, expires, source);
     }
 
     @Override
     public BanEntry<PlayerProfile> ban(String reason, Instant expires, String source) {
-        return ((ProfileBanList) server.getBanList(BanList.Type.PROFILE)).addBan(getPlayerProfile(), reason, expires, source);
+        return ((ProfileBanList) this.server.getBanList(BanList.Type.PROFILE)).addBan(this.getPlayerProfile(), reason, expires, source);
     }
 
     @Override
     public BanEntry<PlayerProfile> ban(String reason, Duration duration, String source) {
-        return ((ProfileBanList) server.getBanList(BanList.Type.PROFILE)).addBan(getPlayerProfile(), reason, duration, source);
+        return ((ProfileBanList) this.server.getBanList(BanList.Type.PROFILE)).addBan(this.getPlayerProfile(), reason, duration, source);
     }
 
     public void setBanned(boolean value) {
         if (value) {
-            ((ProfileBanList) server.getBanList(BanList.Type.PROFILE)).addBan(getPlayerProfile(), null, (Date) null, null);
+            ((ProfileBanList) this.server.getBanList(BanList.Type.PROFILE)).addBan(this.getPlayerProfile(), null, (Date) null, null);
         } else {
-            ((ProfileBanList) server.getBanList(BanList.Type.PROFILE)).pardon(getPlayerProfile());
+            ((ProfileBanList) this.server.getBanList(BanList.Type.PROFILE)).pardon(this.getPlayerProfile());
         }
     }
 
     @Override
     public boolean isWhitelisted() {
-        return server.getHandle().getWhiteList().isWhiteListed(profile);
+        return this.server.getHandle().getWhiteList().isWhiteListed(this.profile);
     }
 
     @Override
     public void setWhitelisted(boolean value) {
         if (value) {
-            server.getHandle().getWhiteList().add(new WhiteListEntry(profile));
+            this.server.getHandle().getWhiteList().add(new UserWhiteListEntry(this.profile));
         } else {
-            server.getHandle().getWhiteList().remove(profile);
+            this.server.getHandle().getWhiteList().remove(this.profile);
         }
     }
 
@@ -154,7 +154,7 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
     public Map<String, Object> serialize() {
         Map<String, Object> result = new LinkedHashMap<>();
 
-        result.put("UUID", profile.getId().toString());
+        result.put("UUID", this.profile.getId().toString());
 
         return result;
     }
@@ -170,12 +170,12 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
 
     @Override
     public String toString() {
-        return getClass().getSimpleName() + "[UUID=" + profile.getId() + "]";
+        return this.getClass().getSimpleName() + "[UUID=" + this.profile.getId() + "]";
     }
 
     @Override
     public Player getPlayer() {
-        return server.getPlayer(getUniqueId());
+        return this.server.getPlayer(this.getUniqueId());
     }
 
     @Override
@@ -198,16 +198,16 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
         return hash;
     }
 
-    private NBTTagCompound getData() {
-        return storage.load(profile.getName(), profile.getId().toString()).orElse(null);
+    private CompoundTag getData() {
+        return this.storage.load(this.profile.getName(), this.profile.getId().toString()).orElse(null);
     }
 
-    private NBTTagCompound getBukkitData() {
-        NBTTagCompound result = getData();
+    private CompoundTag getBukkitData() {
+        CompoundTag result = this.getData();
 
         if (result != null) {
             if (!result.contains("bukkit")) {
-                result.put("bukkit", new NBTTagCompound());
+                result.put("bukkit", new CompoundTag());
             }
             result = result.getCompound("bukkit");
         }
@@ -216,21 +216,21 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
     }
 
     private File getDataFile() {
-        return new File(storage.getPlayerDir(), getUniqueId() + ".dat");
+        return new File(this.storage.getPlayerDir(), this.getUniqueId() + ".dat");
     }
 
     @Override
     public long getFirstPlayed() {
-        Player player = getPlayer();
+        Player player = this.getPlayer();
         if (player != null) return player.getFirstPlayed();
 
-        NBTTagCompound data = getBukkitData();
+        CompoundTag data = this.getBukkitData();
 
         if (data != null) {
             if (data.contains("firstPlayed")) {
                 return data.getLong("firstPlayed");
             } else {
-                File file = getDataFile();
+                File file = this.getDataFile();
                 return file.lastModified();
             }
         } else {
@@ -240,16 +240,16 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
 
     @Override
     public long getLastPlayed() {
-        Player player = getPlayer();
+        Player player = this.getPlayer();
         if (player != null) return player.getLastPlayed();
 
-        NBTTagCompound data = getBukkitData();
+        CompoundTag data = this.getBukkitData();
 
         if (data != null) {
             if (data.contains("lastPlayed")) {
                 return data.getLong("lastPlayed");
             } else {
-                File file = getDataFile();
+                File file = this.getDataFile();
                 return file.lastModified();
             }
         } else {
@@ -259,31 +259,31 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
 
     @Override
     public boolean hasPlayedBefore() {
-        return getData() != null;
+        return this.getData() != null;
     }
 
     @Override
     public Location getLastDeathLocation() {
-        if (getData().contains("LastDeathLocation", 10)) {
-            return GlobalPos.CODEC.parse(DynamicOpsNBT.INSTANCE, getData().get("LastDeathLocation")).result().map(CraftMemoryMapper::fromNms).orElse(null);
+        if (this.getData().contains("LastDeathLocation", 10)) {
+            return GlobalPos.CODEC.parse(NbtOps.INSTANCE, this.getData().get("LastDeathLocation")).result().map(CraftMemoryMapper::fromNms).orElse(null);
         }
         return null;
     }
 
     @Override
     public Location getLocation() {
-        NBTTagCompound data = getData();
+        CompoundTag data = this.getData();
         if (data == null) {
             return null;
         }
 
         if (data.contains("Pos") && data.contains("Rotation")) {
-            NBTTagList position = (NBTTagList) data.get("Pos");
-            NBTTagList rotation = (NBTTagList) data.get("Rotation");
+            ListTag position = (ListTag) data.get("Pos");
+            ListTag rotation = (ListTag) data.get("Rotation");
 
             UUID uuid = new UUID(data.getLong("WorldUUIDMost"), data.getLong("WorldUUIDLeast"));
 
-            return new Location(server.getWorld(uuid),
+            return new Location(this.server.getWorld(uuid),
                 position.getDouble(0),
                 position.getDouble(1),
                 position.getDouble(2),
@@ -297,50 +297,50 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
 
     @Override
     public Location getBedSpawnLocation() {
-        return getRespawnLocation();
+        return this.getRespawnLocation();
     }
 
     @Override
     public Location getRespawnLocation() {
-        NBTTagCompound data = getData();
+        CompoundTag data = this.getData();
         if (data == null) return null;
 
         if (data.contains("SpawnX") && data.contains("SpawnY") && data.contains("SpawnZ")) {
             String spawnWorld = data.getString("SpawnWorld");
             if (spawnWorld.equals("")) {
-                spawnWorld = server.getWorlds().get(0).getName();
+                spawnWorld = this.server.getWorlds().get(0).getName();
             }
-            return new Location(server.getWorld(spawnWorld), data.getInt("SpawnX"), data.getInt("SpawnY"), data.getInt("SpawnZ"));
+            return new Location(this.server.getWorld(spawnWorld), data.getInt("SpawnX"), data.getInt("SpawnY"), data.getInt("SpawnZ"));
         }
         return null;
     }
 
     public void setMetadata(String metadataKey, MetadataValue metadataValue) {
-        server.getPlayerMetadata().setMetadata(this, metadataKey, metadataValue);
+        this.server.getPlayerMetadata().setMetadata(this, metadataKey, metadataValue);
     }
 
     public List<MetadataValue> getMetadata(String metadataKey) {
-        return server.getPlayerMetadata().getMetadata(this, metadataKey);
+        return this.server.getPlayerMetadata().getMetadata(this, metadataKey);
     }
 
     public boolean hasMetadata(String metadataKey) {
-        return server.getPlayerMetadata().hasMetadata(this, metadataKey);
+        return this.server.getPlayerMetadata().hasMetadata(this, metadataKey);
     }
 
     public void removeMetadata(String metadataKey, Plugin plugin) {
-        server.getPlayerMetadata().removeMetadata(this, metadataKey, plugin);
+        this.server.getPlayerMetadata().removeMetadata(this, metadataKey, plugin);
     }
 
-    private ServerStatisticManager getStatisticManager() {
-        return server.getHandle().getPlayerStats(getUniqueId(), getName());
+    private ServerStatsCounter getStatisticManager() {
+        return this.server.getHandle().getPlayerStats(this.getUniqueId(), this.getName());
     }
 
     @Override
     public void incrementStatistic(Statistic statistic) {
-        if (isOnline()) {
-            getPlayer().incrementStatistic(statistic);
+        if (this.isOnline()) {
+            this.getPlayer().incrementStatistic(statistic);
         } else {
-            ServerStatisticManager manager = getStatisticManager();
+            ServerStatsCounter manager = this.getStatisticManager();
             CraftStatistic.incrementStatistic(manager, statistic, null);
             manager.save();
         }
@@ -348,10 +348,10 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
 
     @Override
     public void decrementStatistic(Statistic statistic) {
-        if (isOnline()) {
-            getPlayer().decrementStatistic(statistic);
+        if (this.isOnline()) {
+            this.getPlayer().decrementStatistic(statistic);
         } else {
-            ServerStatisticManager manager = getStatisticManager();
+            ServerStatsCounter manager = this.getStatisticManager();
             CraftStatistic.decrementStatistic(manager, statistic, null);
             manager.save();
         }
@@ -359,19 +359,19 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
 
     @Override
     public int getStatistic(Statistic statistic) {
-        if (isOnline()) {
-            return getPlayer().getStatistic(statistic);
+        if (this.isOnline()) {
+            return this.getPlayer().getStatistic(statistic);
         } else {
-            return CraftStatistic.getStatistic(getStatisticManager(), statistic);
+            return CraftStatistic.getStatistic(this.getStatisticManager(), statistic);
         }
     }
 
     @Override
     public void incrementStatistic(Statistic statistic, int amount) {
-        if (isOnline()) {
-            getPlayer().incrementStatistic(statistic, amount);
+        if (this.isOnline()) {
+            this.getPlayer().incrementStatistic(statistic, amount);
         } else {
-            ServerStatisticManager manager = getStatisticManager();
+            ServerStatsCounter manager = this.getStatisticManager();
             CraftStatistic.incrementStatistic(manager, statistic, amount, null);
             manager.save();
         }
@@ -379,10 +379,10 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
 
     @Override
     public void decrementStatistic(Statistic statistic, int amount) {
-        if (isOnline()) {
-            getPlayer().decrementStatistic(statistic, amount);
+        if (this.isOnline()) {
+            this.getPlayer().decrementStatistic(statistic, amount);
         } else {
-            ServerStatisticManager manager = getStatisticManager();
+            ServerStatsCounter manager = this.getStatisticManager();
             CraftStatistic.decrementStatistic(manager, statistic, amount, null);
             manager.save();
         }
@@ -390,10 +390,10 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
 
     @Override
     public void setStatistic(Statistic statistic, int newValue) {
-        if (isOnline()) {
-            getPlayer().setStatistic(statistic, newValue);
+        if (this.isOnline()) {
+            this.getPlayer().setStatistic(statistic, newValue);
         } else {
-            ServerStatisticManager manager = getStatisticManager();
+            ServerStatsCounter manager = this.getStatisticManager();
             CraftStatistic.setStatistic(manager, statistic, newValue, null);
             manager.save();
         }
@@ -401,10 +401,10 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
 
     @Override
     public void incrementStatistic(Statistic statistic, Material material) {
-        if (isOnline()) {
-            getPlayer().incrementStatistic(statistic, material);
+        if (this.isOnline()) {
+            this.getPlayer().incrementStatistic(statistic, material);
         } else {
-            ServerStatisticManager manager = getStatisticManager();
+            ServerStatsCounter manager = this.getStatisticManager();
             CraftStatistic.incrementStatistic(manager, statistic, material, null);
             manager.save();
         }
@@ -412,10 +412,10 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
 
     @Override
     public void decrementStatistic(Statistic statistic, Material material) {
-        if (isOnline()) {
-            getPlayer().decrementStatistic(statistic, material);
+        if (this.isOnline()) {
+            this.getPlayer().decrementStatistic(statistic, material);
         } else {
-            ServerStatisticManager manager = getStatisticManager();
+            ServerStatsCounter manager = this.getStatisticManager();
             CraftStatistic.decrementStatistic(manager, statistic, material, null);
             manager.save();
         }
@@ -423,19 +423,19 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
 
     @Override
     public int getStatistic(Statistic statistic, Material material) {
-        if (isOnline()) {
-            return getPlayer().getStatistic(statistic, material);
+        if (this.isOnline()) {
+            return this.getPlayer().getStatistic(statistic, material);
         } else {
-            return CraftStatistic.getStatistic(getStatisticManager(), statistic, material);
+            return CraftStatistic.getStatistic(this.getStatisticManager(), statistic, material);
         }
     }
 
     @Override
     public void incrementStatistic(Statistic statistic, Material material, int amount) {
-        if (isOnline()) {
-            getPlayer().incrementStatistic(statistic, material, amount);
+        if (this.isOnline()) {
+            this.getPlayer().incrementStatistic(statistic, material, amount);
         } else {
-            ServerStatisticManager manager = getStatisticManager();
+            ServerStatsCounter manager = this.getStatisticManager();
             CraftStatistic.incrementStatistic(manager, statistic, material, amount, null);
             manager.save();
         }
@@ -443,10 +443,10 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
 
     @Override
     public void decrementStatistic(Statistic statistic, Material material, int amount) {
-        if (isOnline()) {
-            getPlayer().decrementStatistic(statistic, material, amount);
+        if (this.isOnline()) {
+            this.getPlayer().decrementStatistic(statistic, material, amount);
         } else {
-            ServerStatisticManager manager = getStatisticManager();
+            ServerStatsCounter manager = this.getStatisticManager();
             CraftStatistic.decrementStatistic(manager, statistic, material, amount, null);
             manager.save();
         }
@@ -454,10 +454,10 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
 
     @Override
     public void setStatistic(Statistic statistic, Material material, int newValue) {
-        if (isOnline()) {
-            getPlayer().setStatistic(statistic, material, newValue);
+        if (this.isOnline()) {
+            this.getPlayer().setStatistic(statistic, material, newValue);
         } else {
-            ServerStatisticManager manager = getStatisticManager();
+            ServerStatsCounter manager = this.getStatisticManager();
             CraftStatistic.setStatistic(manager, statistic, material, newValue, null);
             manager.save();
         }
@@ -465,10 +465,10 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
 
     @Override
     public void incrementStatistic(Statistic statistic, EntityType entityType) {
-        if (isOnline()) {
-            getPlayer().incrementStatistic(statistic, entityType);
+        if (this.isOnline()) {
+            this.getPlayer().incrementStatistic(statistic, entityType);
         } else {
-            ServerStatisticManager manager = getStatisticManager();
+            ServerStatsCounter manager = this.getStatisticManager();
             CraftStatistic.incrementStatistic(manager, statistic, entityType, null);
             manager.save();
         }
@@ -476,10 +476,10 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
 
     @Override
     public void decrementStatistic(Statistic statistic, EntityType entityType) {
-        if (isOnline()) {
-            getPlayer().decrementStatistic(statistic, entityType);
+        if (this.isOnline()) {
+            this.getPlayer().decrementStatistic(statistic, entityType);
         } else {
-            ServerStatisticManager manager = getStatisticManager();
+            ServerStatsCounter manager = this.getStatisticManager();
             CraftStatistic.decrementStatistic(manager, statistic, entityType, null);
             manager.save();
         }
@@ -487,19 +487,19 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
 
     @Override
     public int getStatistic(Statistic statistic, EntityType entityType) {
-        if (isOnline()) {
-            return getPlayer().getStatistic(statistic, entityType);
+        if (this.isOnline()) {
+            return this.getPlayer().getStatistic(statistic, entityType);
         } else {
-            return CraftStatistic.getStatistic(getStatisticManager(), statistic, entityType);
+            return CraftStatistic.getStatistic(this.getStatisticManager(), statistic, entityType);
         }
     }
 
     @Override
     public void incrementStatistic(Statistic statistic, EntityType entityType, int amount) {
-        if (isOnline()) {
-            getPlayer().incrementStatistic(statistic, entityType, amount);
+        if (this.isOnline()) {
+            this.getPlayer().incrementStatistic(statistic, entityType, amount);
         } else {
-            ServerStatisticManager manager = getStatisticManager();
+            ServerStatsCounter manager = this.getStatisticManager();
             CraftStatistic.incrementStatistic(manager, statistic, entityType, amount, null);
             manager.save();
         }
@@ -507,10 +507,10 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
 
     @Override
     public void decrementStatistic(Statistic statistic, EntityType entityType, int amount) {
-        if (isOnline()) {
-            getPlayer().decrementStatistic(statistic, entityType, amount);
+        if (this.isOnline()) {
+            this.getPlayer().decrementStatistic(statistic, entityType, amount);
         } else {
-            ServerStatisticManager manager = getStatisticManager();
+            ServerStatsCounter manager = this.getStatisticManager();
             CraftStatistic.decrementStatistic(manager, statistic, entityType, amount, null);
             manager.save();
         }
@@ -518,10 +518,10 @@ public class CraftOfflinePlayer implements OfflinePlayer, ConfigurationSerializa
 
     @Override
     public void setStatistic(Statistic statistic, EntityType entityType, int newValue) {
-        if (isOnline()) {
-            getPlayer().setStatistic(statistic, entityType, newValue);
+        if (this.isOnline()) {
+            this.getPlayer().setStatistic(statistic, entityType, newValue);
         } else {
-            ServerStatisticManager manager = getStatisticManager();
+            ServerStatsCounter manager = this.getStatisticManager();
             CraftStatistic.setStatistic(manager, statistic, entityType, newValue, null);
             manager.save();
         }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftParticle.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftParticle.java
index cbe78c2221..73d8814ee2 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftParticle.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftParticle.java
@@ -4,16 +4,15 @@ import com.google.common.base.Preconditions;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.function.BiFunction;
-import net.minecraft.core.IRegistry;
+import net.minecraft.core.particles.BlockParticleOption;
 import net.minecraft.core.particles.ColorParticleOption;
 import net.minecraft.core.particles.DustColorTransitionOptions;
-import net.minecraft.core.particles.ParticleParam;
-import net.minecraft.core.particles.ParticleParamBlock;
-import net.minecraft.core.particles.ParticleParamItem;
-import net.minecraft.core.particles.ParticleParamRedstone;
-import net.minecraft.core.particles.ParticleType;
+import net.minecraft.core.particles.DustParticleOptions;
+import net.minecraft.core.particles.ItemParticleOption;
+import net.minecraft.core.particles.ParticleOptions;
 import net.minecraft.core.particles.SculkChargeParticleOptions;
 import net.minecraft.core.particles.ShriekParticleOption;
+import net.minecraft.core.particles.SimpleParticleType;
 import net.minecraft.core.particles.TrailParticleOption;
 import net.minecraft.core.particles.VibrationParticleOption;
 import net.minecraft.core.registries.Registries;
@@ -43,10 +42,10 @@ public abstract class CraftParticle<D> implements Keyed {
 
     private static final Registry<CraftParticle<?>> CRAFT_PARTICLE_REGISTRY = new CraftParticleRegistry(CraftRegistry.getMinecraftRegistry(Registries.PARTICLE_TYPE));
 
-    public static Particle minecraftToBukkit(net.minecraft.core.particles.Particle<?> minecraft) {
+    public static Particle minecraftToBukkit(net.minecraft.core.particles.ParticleType<?> minecraft) {
         Preconditions.checkArgument(minecraft != null);
 
-        IRegistry<net.minecraft.core.particles.Particle<?>> registry = CraftRegistry.getMinecraftRegistry(Registries.PARTICLE_TYPE);
+        net.minecraft.core.Registry<net.minecraft.core.particles.ParticleType<?>> registry = CraftRegistry.getMinecraftRegistry(Registries.PARTICLE_TYPE);
         Particle bukkit = Registry.PARTICLE_TYPE.get(CraftNamespacedKey.fromMinecraft(registry.getResourceKey(minecraft).orElseThrow().location()));
 
         Preconditions.checkArgument(bukkit != null);
@@ -54,14 +53,14 @@ public abstract class CraftParticle<D> implements Keyed {
         return bukkit;
     }
 
-    public static net.minecraft.core.particles.Particle<?> bukkitToMinecraft(Particle bukkit) {
+    public static net.minecraft.core.particles.ParticleType<?> bukkitToMinecraft(Particle bukkit) {
         Preconditions.checkArgument(bukkit != null);
 
         return CraftRegistry.getMinecraftRegistry(Registries.PARTICLE_TYPE)
                 .getOptional(CraftNamespacedKey.toMinecraft(bukkit.getKey())).orElseThrow();
     }
 
-    public static <D> ParticleParam createParticleParam(Particle particle, D data) {
+    public static <D> ParticleOptions createParticleParam(Particle particle, D data) {
         Preconditions.checkArgument(particle != null, "particle cannot be null");
 
         data = CraftParticle.convertLegacy(data);
@@ -72,7 +71,7 @@ public abstract class CraftParticle<D> implements Keyed {
             Preconditions.checkArgument(particle.getDataType().isInstance(data), "data (%s) should be %s", data.getClass(), particle.getDataType());
         }
 
-        CraftParticle<D> craftParticle = (CraftParticle<D>) CRAFT_PARTICLE_REGISTRY.get(particle.getKey());
+        CraftParticle<D> craftParticle = (CraftParticle<D>) CraftParticle.CRAFT_PARTICLE_REGISTRY.get(particle.getKey());
 
         Preconditions.checkArgument(craftParticle != null);
 
@@ -88,72 +87,72 @@ public abstract class CraftParticle<D> implements Keyed {
     }
 
     private final NamespacedKey key;
-    private final net.minecraft.core.particles.Particle<?> particle;
+    private final net.minecraft.core.particles.ParticleType<?> particle;
     private final Class<D> clazz;
 
-    public CraftParticle(NamespacedKey key, net.minecraft.core.particles.Particle<?> particle, Class<D> clazz) {
+    public CraftParticle(NamespacedKey key, net.minecraft.core.particles.ParticleType<?> particle, Class<D> clazz) {
         this.key = key;
         this.particle = particle;
         this.clazz = clazz;
     }
 
-    public net.minecraft.core.particles.Particle<?> getHandle() {
-        return particle;
+    public net.minecraft.core.particles.ParticleType<?> getHandle() {
+        return this.particle;
     }
 
-    public abstract ParticleParam createParticleParam(D data);
+    public abstract ParticleOptions createParticleParam(D data);
 
     @Override
     public NamespacedKey getKey() {
-        return key;
+        return this.key;
     }
 
-    public static class CraftParticleRegistry extends CraftRegistry<CraftParticle<?>, net.minecraft.core.particles.Particle<?>> {
+    public static class CraftParticleRegistry extends CraftRegistry<CraftParticle<?>, net.minecraft.core.particles.ParticleType<?>> {
 
-        private static final Map<NamespacedKey, BiFunction<NamespacedKey, net.minecraft.core.particles.Particle<?>, CraftParticle<?>>> PARTICLE_MAP = new HashMap<>();
+        private static final Map<NamespacedKey, BiFunction<NamespacedKey, net.minecraft.core.particles.ParticleType<?>, CraftParticle<?>>> PARTICLE_MAP = new HashMap<>();
 
-        private static final BiFunction<NamespacedKey, net.minecraft.core.particles.Particle<?>, CraftParticle<?>> VOID_FUNCTION = (name, particle) -> new CraftParticle<>(name, particle, Void.class) {
+        private static final BiFunction<NamespacedKey, net.minecraft.core.particles.ParticleType<?>, CraftParticle<?>> VOID_FUNCTION = (name, particle) -> new CraftParticle<>(name, particle, Void.class) {
             @Override
-            public ParticleParam createParticleParam(Void data) {
-                return (ParticleType) getHandle();
+            public ParticleOptions createParticleParam(Void data) {
+                return (SimpleParticleType) this.getHandle();
             }
         };
 
         static {
-            BiFunction<NamespacedKey, net.minecraft.core.particles.Particle<?>, CraftParticle<?>> dustOptionsFunction = (name, particle) -> new CraftParticle<>(name, particle, Particle.DustOptions.class) {
+            BiFunction<NamespacedKey, net.minecraft.core.particles.ParticleType<?>, CraftParticle<?>> dustOptionsFunction = (name, particle) -> new CraftParticle<>(name, particle, Particle.DustOptions.class) {
                 @Override
-                public ParticleParam createParticleParam(Particle.DustOptions data) {
+                public ParticleOptions createParticleParam(Particle.DustOptions data) {
                     Color color = data.getColor();
-                    return new ParticleParamRedstone(color.asRGB(), data.getSize());
+                    return new DustParticleOptions(color.asRGB(), data.getSize());
                 }
             };
 
-            BiFunction<NamespacedKey, net.minecraft.core.particles.Particle<?>, CraftParticle<?>> itemStackFunction = (name, particle) -> new CraftParticle<>(name, particle, ItemStack.class) {
+            BiFunction<NamespacedKey, net.minecraft.core.particles.ParticleType<?>, CraftParticle<?>> itemStackFunction = (name, particle) -> new CraftParticle<>(name, particle, ItemStack.class) {
                 @Override
-                public ParticleParam createParticleParam(ItemStack data) {
-                    return new ParticleParamItem((net.minecraft.core.particles.Particle<ParticleParamItem>) getHandle(), CraftItemStack.asNMSCopy(data));
+                public ParticleOptions createParticleParam(ItemStack data) {
+                    return new ItemParticleOption((net.minecraft.core.particles.ParticleType<ItemParticleOption>) this.getHandle(), CraftItemStack.asNMSCopy(data));
                 }
             };
 
-            BiFunction<NamespacedKey, net.minecraft.core.particles.Particle<?>, CraftParticle<?>> blockDataFunction = (name, particle) -> new CraftParticle<>(name, particle, BlockData.class) {
+            BiFunction<NamespacedKey, net.minecraft.core.particles.ParticleType<?>, CraftParticle<?>> blockDataFunction = (name, particle) -> new CraftParticle<>(name, particle, BlockData.class) {
                 @Override
-                public ParticleParam createParticleParam(BlockData data) {
-                    return new ParticleParamBlock((net.minecraft.core.particles.Particle<ParticleParamBlock>) getHandle(), ((CraftBlockData) data).getState());
+                public ParticleOptions createParticleParam(BlockData data) {
+                    return new BlockParticleOption((net.minecraft.core.particles.ParticleType<BlockParticleOption>) this.getHandle(), ((CraftBlockData) data).getState());
                 }
             };
 
-            BiFunction<NamespacedKey, net.minecraft.core.particles.Particle<?>, CraftParticle<?>> dustTransitionFunction = (name, particle) -> new CraftParticle<>(name, particle, Particle.DustTransition.class) {
+            BiFunction<NamespacedKey, net.minecraft.core.particles.ParticleType<?>, CraftParticle<?>> dustTransitionFunction = (name, particle) -> new CraftParticle<>(name, particle, Particle.DustTransition.class) {
                 @Override
-                public ParticleParam createParticleParam(Particle.DustTransition data) {
+                public ParticleOptions createParticleParam(Particle.DustTransition data) {
                     Color from = data.getColor();
                     Color to = data.getToColor();
                     return new DustColorTransitionOptions(from.asRGB(), to.asRGB(), data.getSize());
                 }
             };
 
-            BiFunction<NamespacedKey, net.minecraft.core.particles.Particle<?>, CraftParticle<?>> vibrationFunction = (name, particle) -> new CraftParticle<>(name, particle, Vibration.class) {
+            BiFunction<NamespacedKey, net.minecraft.core.particles.ParticleType<?>, CraftParticle<?>> vibrationFunction = (name, particle) -> new CraftParticle<>(name, particle, Vibration.class) {
                 @Override
-                public ParticleParam createParticleParam(Vibration data) {
+                public ParticleOptions createParticleParam(Vibration data) {
                     PositionSource source;
                     if (data.getDestination() instanceof Vibration.Destination.BlockDestination) {
                         Location destination = ((Vibration.Destination.BlockDestination) data.getDestination()).getLocation();
@@ -169,30 +168,30 @@ public abstract class CraftParticle<D> implements Keyed {
                 }
             };
 
-            BiFunction<NamespacedKey, net.minecraft.core.particles.Particle<?>, CraftParticle<?>> floatFunction = (name, particle) -> new CraftParticle<>(name, particle, Float.class) {
+            BiFunction<NamespacedKey, net.minecraft.core.particles.ParticleType<?>, CraftParticle<?>> floatFunction = (name, particle) -> new CraftParticle<>(name, particle, Float.class) {
                 @Override
-                public ParticleParam createParticleParam(Float data) {
+                public ParticleOptions createParticleParam(Float data) {
                     return new SculkChargeParticleOptions(data);
                 }
             };
 
-            BiFunction<NamespacedKey, net.minecraft.core.particles.Particle<?>, CraftParticle<?>> integerFunction = (name, particle) -> new CraftParticle<>(name, particle, Integer.class) {
+            BiFunction<NamespacedKey, net.minecraft.core.particles.ParticleType<?>, CraftParticle<?>> integerFunction = (name, particle) -> new CraftParticle<>(name, particle, Integer.class) {
                 @Override
-                public ParticleParam createParticleParam(Integer data) {
+                public ParticleOptions createParticleParam(Integer data) {
                     return new ShriekParticleOption(data);
                 }
             };
 
-            BiFunction<NamespacedKey, net.minecraft.core.particles.Particle<?>, CraftParticle<?>> colorFunction = (name, particle) -> new CraftParticle<>(name, particle, Color.class) {
+            BiFunction<NamespacedKey, net.minecraft.core.particles.ParticleType<?>, CraftParticle<?>> colorFunction = (name, particle) -> new CraftParticle<>(name, particle, Color.class) {
                 @Override
-                public ParticleParam createParticleParam(Color color) {
-                    return ColorParticleOption.create((net.minecraft.core.particles.Particle<ColorParticleOption>) particle, color.asARGB());
+                public ParticleOptions createParticleParam(Color color) {
+                    return ColorParticleOption.create((net.minecraft.core.particles.ParticleType<ColorParticleOption>) particle, color.asARGB());
                 }
             };
 
-            BiFunction<NamespacedKey, net.minecraft.core.particles.Particle<?>, CraftParticle<?>> trailFunction = (name, particle) -> new CraftParticle<>(name, particle, Particle.Trail.class) {
+            BiFunction<NamespacedKey, net.minecraft.core.particles.ParticleType<?>, CraftParticle<?>> trailFunction = (name, particle) -> new CraftParticle<>(name, particle, Particle.Trail.class) {
                 @Override
-                public ParticleParam createParticleParam(Particle.Trail data) {
+                public ParticleOptions createParticleParam(Particle.Trail data) {
                     return new TrailParticleOption(CraftLocation.toVec3D(data.getTarget()), data.getColor().asRGB(), data.getDuration());
                 }
             };
@@ -212,21 +211,21 @@ public abstract class CraftParticle<D> implements Keyed {
             add("trail", trailFunction);
         }
 
-        private static void add(String name, BiFunction<NamespacedKey, net.minecraft.core.particles.Particle<?>, CraftParticle<?>> function) {
-            PARTICLE_MAP.put(NamespacedKey.fromString(name), function);
+        private static void add(String name, BiFunction<NamespacedKey, net.minecraft.core.particles.ParticleType<?>, CraftParticle<?>> function) {
+            CraftParticleRegistry.PARTICLE_MAP.put(NamespacedKey.fromString(name), function);
         }
 
-        public CraftParticleRegistry(IRegistry<net.minecraft.core.particles.Particle<?>> minecraftRegistry) {
+        public CraftParticleRegistry(net.minecraft.core.Registry<net.minecraft.core.particles.ParticleType<?>> minecraftRegistry) {
             super(CraftParticle.class, minecraftRegistry, null, FieldRename.PARTICLE_TYPE_RENAME);
         }
 
         @Override
-        public CraftParticle<?> createBukkit(NamespacedKey namespacedKey, net.minecraft.core.particles.Particle<?> particle) {
+        public CraftParticle<?> createBukkit(NamespacedKey namespacedKey, net.minecraft.core.particles.ParticleType<?> particle) {
             if (particle == null) {
                 return null;
             }
 
-            BiFunction<NamespacedKey, net.minecraft.core.particles.Particle<?>, CraftParticle<?>> function = PARTICLE_MAP.getOrDefault(namespacedKey, VOID_FUNCTION);
+            BiFunction<NamespacedKey, net.minecraft.core.particles.ParticleType<?>, CraftParticle<?>> function = CraftParticleRegistry.PARTICLE_MAP.getOrDefault(namespacedKey, CraftParticleRegistry.VOID_FUNCTION);
 
             return function.apply(namespacedKey, particle);
         }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftRaid.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftRaid.java
index 575b44d060..b8ce1c1c24 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftRaid.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftRaid.java
@@ -7,9 +7,8 @@ import java.util.List;
 import java.util.Set;
 import java.util.UUID;
 import java.util.function.Function;
-import net.minecraft.core.BlockPosition;
-import net.minecraft.world.entity.raid.EntityRaider;
-import net.minecraft.world.level.World;
+import net.minecraft.core.BlockPos;
+import net.minecraft.world.level.Level;
 import org.bukkit.Location;
 import org.bukkit.Raid;
 import org.bukkit.Raid.RaidStatus;
@@ -26,40 +25,40 @@ public final class CraftRaid implements Raid {
 
     @Override
     public boolean isStarted() {
-        return handle.isStarted();
+        return this.handle.isStarted();
     }
 
     @Override
     public long getActiveTicks() {
-        return handle.ticksActive;
+        return this.handle.ticksActive;
     }
 
     @Override
     public int getBadOmenLevel() {
-        return handle.raidOmenLevel;
+        return this.handle.raidOmenLevel;
     }
 
     @Override
     public void setBadOmenLevel(int badOmenLevel) {
-        int max = handle.getMaxRaidOmenLevel();
+        int max = this.handle.getMaxRaidOmenLevel();
         Preconditions.checkArgument(0 <= badOmenLevel && badOmenLevel <= max, "Bad Omen level must be between 0 and %s", max);
-        handle.raidOmenLevel = badOmenLevel;
+        this.handle.raidOmenLevel = badOmenLevel;
     }
 
     @Override
     public Location getLocation() {
-        BlockPosition pos = handle.getCenter();
-        World world = handle.getLevel();
+        BlockPos pos = this.handle.getCenter();
+        Level world = this.handle.getLevel();
         return CraftLocation.toBukkit(pos, world.getWorld());
     }
 
     @Override
     public RaidStatus getStatus() {
-        if (handle.isStopped()) {
+        if (this.handle.isStopped()) {
             return RaidStatus.STOPPED;
-        } else if (handle.isVictory()) {
+        } else if (this.handle.isVictory()) {
             return RaidStatus.VICTORY;
-        } else if (handle.isLoss()) {
+        } else if (this.handle.isLoss()) {
             return RaidStatus.LOSS;
         } else {
             return RaidStatus.ONGOING;
@@ -68,40 +67,40 @@ public final class CraftRaid implements Raid {
 
     @Override
     public int getSpawnedGroups() {
-        return handle.getGroupsSpawned();
+        return this.handle.getGroupsSpawned();
     }
 
     @Override
     public int getTotalGroups() {
-        return handle.numGroups + (handle.raidOmenLevel > 1 ? 1 : 0);
+        return this.handle.numGroups + (this.handle.raidOmenLevel > 1 ? 1 : 0);
     }
 
     @Override
     public int getTotalWaves() {
-        return handle.numGroups;
+        return this.handle.numGroups;
     }
 
     @Override
     public float getTotalHealth() {
-        return handle.getHealthOfLivingRaiders();
+        return this.handle.getHealthOfLivingRaiders();
     }
 
     @Override
     public Set<UUID> getHeroes() {
-        return Collections.unmodifiableSet(handle.heroesOfTheVillage);
+        return Collections.unmodifiableSet(this.handle.heroesOfTheVillage);
     }
 
     @Override
     public List<Raider> getRaiders() {
-        return handle.getRaiders().stream().map(new Function<EntityRaider, Raider>() {
+        return this.handle.getRaiders().stream().map(new Function<net.minecraft.world.entity.raid.Raider, Raider>() {
             @Override
-            public Raider apply(EntityRaider entityRaider) {
+            public Raider apply(net.minecraft.world.entity.raid.Raider entityRaider) {
                 return (Raider) entityRaider.getBukkitEntity();
             }
         }).collect(ImmutableList.toImmutableList());
     }
 
     public net.minecraft.world.entity.raid.Raid getHandle() {
-        return handle;
+        return this.handle;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
index 737ff63076..92a0c2049f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftRegionAccessor.java
@@ -7,23 +7,20 @@ import java.util.List;
 import java.util.Random;
 import java.util.function.Consumer;
 import java.util.function.Predicate;
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
 import net.minecraft.core.Holder;
 import net.minecraft.core.registries.Registries;
 import net.minecraft.data.worldgen.features.TreeFeatures;
 import net.minecraft.resources.ResourceKey;
 import net.minecraft.util.RandomSource;
-import net.minecraft.world.entity.EntityInsentient;
 import net.minecraft.world.entity.EntitySpawnReason;
-import net.minecraft.world.entity.GroupDataEntity;
-import net.minecraft.world.entity.projectile.EntityPotion;
-import net.minecraft.world.level.GeneratorAccessSeed;
-import net.minecraft.world.level.biome.BiomeBase;
-import net.minecraft.world.level.block.BlockChorusFlower;
+import net.minecraft.world.entity.Mob;
+import net.minecraft.world.entity.SpawnGroupData;
+import net.minecraft.world.level.WorldGenLevel;
 import net.minecraft.world.level.block.Blocks;
-import net.minecraft.world.level.block.state.IBlockData;
+import net.minecraft.world.level.block.ChorusFlowerBlock;
 import net.minecraft.world.level.chunk.ChunkGenerator;
-import net.minecraft.world.level.levelgen.feature.WorldGenFeatureConfigured;
+import net.minecraft.world.level.levelgen.feature.ConfiguredFeature;
 import net.minecraft.world.level.portal.TeleportTransition;
 import org.bukkit.Location;
 import org.bukkit.Material;
@@ -64,123 +61,123 @@ import org.bukkit.potion.PotionType;
 
 public abstract class CraftRegionAccessor implements RegionAccessor {
 
-    public abstract GeneratorAccessSeed getHandle();
+    public abstract WorldGenLevel getHandle();
 
     public boolean isNormalWorld() {
-        return getHandle() instanceof net.minecraft.server.level.WorldServer;
+        return this.getHandle() instanceof net.minecraft.server.level.ServerLevel;
     }
 
     @Override
     public Biome getBiome(Location location) {
-        return getBiome(location.getBlockX(), location.getBlockY(), location.getBlockZ());
+        return this.getBiome(location.getBlockX(), location.getBlockY(), location.getBlockZ());
     }
 
     @Override
     public Biome getBiome(int x, int y, int z) {
-        return CraftBiome.minecraftHolderToBukkit(getHandle().getNoiseBiome(x >> 2, y >> 2, z >> 2));
+        return CraftBiome.minecraftHolderToBukkit(this.getHandle().getNoiseBiome(x >> 2, y >> 2, z >> 2));
     }
 
     @Override
     public void setBiome(Location location, Biome biome) {
-        setBiome(location.getBlockX(), location.getBlockY(), location.getBlockZ(), biome);
+        this.setBiome(location.getBlockX(), location.getBlockY(), location.getBlockZ(), biome);
     }
 
     @Override
     public void setBiome(int x, int y, int z, Biome biome) {
         Preconditions.checkArgument(biome != Biome.CUSTOM, "Cannot set the biome to %s", biome);
-        Holder<BiomeBase> biomeBase = CraftBiome.bukkitToMinecraftHolder(biome);
-        setBiome(x, y, z, biomeBase);
+        Holder<net.minecraft.world.level.biome.Biome> biomeBase = CraftBiome.bukkitToMinecraftHolder(biome);
+        this.setBiome(x, y, z, biomeBase);
     }
 
-    public abstract void setBiome(int x, int y, int z, Holder<BiomeBase> biomeBase);
+    public abstract void setBiome(int x, int y, int z, Holder<net.minecraft.world.level.biome.Biome> biomeBase);
 
     @Override
     public BlockState getBlockState(Location location) {
-        return getBlockState(location.getBlockX(), location.getBlockY(), location.getBlockZ());
+        return this.getBlockState(location.getBlockX(), location.getBlockY(), location.getBlockZ());
     }
 
     @Override
     public BlockState getBlockState(int x, int y, int z) {
-        return CraftBlock.at(getHandle(), new BlockPosition(x, y, z)).getState();
+        return CraftBlock.at(this.getHandle(), new BlockPos(x, y, z)).getState();
     }
 
     @Override
     public BlockData getBlockData(Location location) {
-        return getBlockData(location.getBlockX(), location.getBlockY(), location.getBlockZ());
+        return this.getBlockData(location.getBlockX(), location.getBlockY(), location.getBlockZ());
     }
 
     @Override
     public BlockData getBlockData(int x, int y, int z) {
-        return CraftBlockData.fromData(getData(x, y, z));
+        return CraftBlockData.fromData(this.getData(x, y, z));
     }
 
     @Override
     public Material getType(Location location) {
-        return getType(location.getBlockX(), location.getBlockY(), location.getBlockZ());
+        return this.getType(location.getBlockX(), location.getBlockY(), location.getBlockZ());
     }
 
     @Override
     public Material getType(int x, int y, int z) {
-        return CraftBlockType.minecraftToBukkit(getData(x, y, z).getBlock());
+        return CraftBlockType.minecraftToBukkit(this.getData(x, y, z).getBlock());
     }
 
-    private IBlockData getData(int x, int y, int z) {
-        return getHandle().getBlockState(new BlockPosition(x, y, z));
+    private net.minecraft.world.level.block.state.BlockState getData(int x, int y, int z) {
+        return this.getHandle().getBlockState(new BlockPos(x, y, z));
     }
 
     @Override
     public void setBlockData(Location location, BlockData blockData) {
-        setBlockData(location.getBlockX(), location.getBlockY(), location.getBlockZ(), blockData);
+        this.setBlockData(location.getBlockX(), location.getBlockY(), location.getBlockZ(), blockData);
     }
 
     @Override
     public void setBlockData(int x, int y, int z, BlockData blockData) {
-        GeneratorAccessSeed world = getHandle();
-        BlockPosition pos = new BlockPosition(x, y, z);
-        IBlockData old = getHandle().getBlockState(pos);
+        WorldGenLevel world = this.getHandle();
+        BlockPos pos = new BlockPos(x, y, z);
+        net.minecraft.world.level.block.state.BlockState old = this.getHandle().getBlockState(pos);
 
         CraftBlock.setTypeAndData(world, pos, old, ((CraftBlockData) blockData).getState(), true);
     }
 
     @Override
     public void setType(Location location, Material material) {
-        setType(location.getBlockX(), location.getBlockY(), location.getBlockZ(), material);
+        this.setType(location.getBlockX(), location.getBlockY(), location.getBlockZ(), material);
     }
 
     @Override
     public void setType(int x, int y, int z, Material material) {
-        setBlockData(x, y, z, material.createBlockData());
+        this.setBlockData(x, y, z, material.createBlockData());
     }
 
     @Override
     public int getHighestBlockYAt(int x, int z) {
-        return getHighestBlockYAt(x, z, org.bukkit.HeightMap.MOTION_BLOCKING);
+        return this.getHighestBlockYAt(x, z, org.bukkit.HeightMap.MOTION_BLOCKING);
     }
 
     @Override
     public int getHighestBlockYAt(Location location) {
-        return getHighestBlockYAt(location.getBlockX(), location.getBlockZ());
+        return this.getHighestBlockYAt(location.getBlockX(), location.getBlockZ());
     }
 
     @Override
     public int getHighestBlockYAt(int x, int z, org.bukkit.HeightMap heightMap) {
-        return getHandle().getHeight(CraftHeightMap.toNMS(heightMap), x, z);
+        return this.getHandle().getHeight(CraftHeightMap.toNMS(heightMap), x, z);
     }
 
     @Override
     public int getHighestBlockYAt(Location location, org.bukkit.HeightMap heightMap) {
-        return getHighestBlockYAt(location.getBlockX(), location.getBlockZ(), heightMap);
+        return this.getHighestBlockYAt(location.getBlockX(), location.getBlockZ(), heightMap);
     }
 
     @Override
     public boolean generateTree(Location location, Random random, TreeType treeType) {
-        BlockPosition pos = CraftLocation.toBlockPosition(location);
-        return generateTree(getHandle(), getHandle().getMinecraftWorld().getChunkSource().getGenerator(), pos, new RandomSourceWrapper(random), treeType);
+        BlockPos pos = CraftLocation.toBlockPosition(location);
+        return this.generateTree(this.getHandle(), this.getHandle().getMinecraftWorld().getChunkSource().getGenerator(), pos, new RandomSourceWrapper(random), treeType);
     }
 
     @Override
     public boolean generateTree(Location location, Random random, TreeType treeType, Consumer<? super BlockState> consumer) {
-        return generateTree(location, random, treeType, (consumer == null) ? null : (block) -> {
+        return this.generateTree(location, random, treeType, (consumer == null) ? null : (block) -> {
             consumer.accept(block);
             return true;
         });
@@ -188,9 +185,9 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
 
     @Override
     public boolean generateTree(Location location, Random random, TreeType treeType, Predicate<? super BlockState> predicate) {
-        BlockPosition pos = CraftLocation.toBlockPosition(location);
-        BlockStateListPopulator populator = new BlockStateListPopulator(getHandle());
-        boolean result = generateTree(populator, getHandle().getMinecraftWorld().getChunkSource().getGenerator(), pos, new RandomSourceWrapper(random), treeType);
+        BlockPos pos = CraftLocation.toBlockPosition(location);
+        BlockStateListPopulator populator = new BlockStateListPopulator(this.getHandle());
+        boolean result = this.generateTree(populator, this.getHandle().getMinecraftWorld().getChunkSource().getGenerator(), pos, new RandomSourceWrapper(random), treeType);
         populator.refreshTiles();
 
         for (BlockState blockState : populator.getList()) {
@@ -202,8 +199,8 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
         return result;
     }
 
-    public boolean generateTree(GeneratorAccessSeed access, ChunkGenerator chunkGenerator, BlockPosition pos, RandomSource random, TreeType treeType) {
-        ResourceKey<WorldGenFeatureConfigured<?, ?>> gen;
+    public boolean generateTree(WorldGenLevel access, ChunkGenerator chunkGenerator, BlockPos pos, RandomSource random, TreeType treeType) {
+        ResourceKey<ConfiguredFeature<?, ?>> gen;
         switch (treeType) {
             case BIG_TREE:
                 gen = TreeFeatures.FANCY_OAK;
@@ -254,7 +251,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
                 gen = TreeFeatures.SUPER_BIRCH_BEES_0002;
                 break;
             case CHORUS_PLANT:
-                ((BlockChorusFlower) Blocks.CHORUS_FLOWER).generatePlant(access, pos, random, 8);
+                ((ChorusFlowerBlock) Blocks.CHORUS_FLOWER).generatePlant(access, pos, random, 8);
                 return true;
             case CRIMSON_FUNGUS:
                 gen = TreeFeatures.CRIMSON_FUNGUS_PLANTED;
@@ -286,29 +283,29 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
                 break;
         }
 
-        Holder<WorldGenFeatureConfigured<?, ?>> holder = access.registryAccess().lookupOrThrow(Registries.CONFIGURED_FEATURE).get(gen).orElse(null);
+        Holder<ConfiguredFeature<?, ?>> holder = access.registryAccess().lookupOrThrow(Registries.CONFIGURED_FEATURE).get(gen).orElse(null);
         return (holder != null) ? holder.value().place(access, chunkGenerator, random, pos) : false;
     }
 
     @Override
     public Entity spawnEntity(Location location, EntityType entityType) {
-        return spawn(location, entityType.getEntityClass());
+        return this.spawn(location, entityType.getEntityClass());
     }
 
     @Override
     public Entity spawnEntity(Location loc, EntityType type, boolean randomizeData) {
-        return spawn(loc, type.getEntityClass(), null, CreatureSpawnEvent.SpawnReason.CUSTOM, randomizeData);
+        return this.spawn(loc, type.getEntityClass(), null, CreatureSpawnEvent.SpawnReason.CUSTOM, randomizeData);
     }
 
     @Override
     public List<Entity> getEntities() {
         List<Entity> list = new ArrayList<Entity>();
 
-        getNMSEntities().forEach(entity -> {
+        this.getNMSEntities().forEach(entity -> {
             Entity bukkitEntity = entity.getBukkitEntity();
 
             // Assuming that bukkitEntity isn't null
-            if (bukkitEntity != null && (!isNormalWorld() || bukkitEntity.isValid())) {
+            if (bukkitEntity != null && (!this.isNormalWorld() || bukkitEntity.isValid())) {
                 list.add(bukkitEntity);
             }
         });
@@ -320,11 +317,11 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
     public List<LivingEntity> getLivingEntities() {
         List<LivingEntity> list = new ArrayList<LivingEntity>();
 
-        getNMSEntities().forEach(entity -> {
+        this.getNMSEntities().forEach(entity -> {
             Entity bukkitEntity = entity.getBukkitEntity();
 
             // Assuming that bukkitEntity isn't null
-            if (bukkitEntity != null && bukkitEntity instanceof LivingEntity && (!isNormalWorld() || bukkitEntity.isValid())) {
+            if (bukkitEntity != null && bukkitEntity instanceof LivingEntity && (!this.isNormalWorld() || bukkitEntity.isValid())) {
                 list.add((LivingEntity) bukkitEntity);
             }
         });
@@ -337,7 +334,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
     public <T extends Entity> Collection<T> getEntitiesByClass(Class<T> clazz) {
         Collection<T> list = new ArrayList<T>();
 
-        getNMSEntities().forEach(entity -> {
+        this.getNMSEntities().forEach(entity -> {
             Entity bukkitEntity = entity.getBukkitEntity();
 
             if (bukkitEntity == null) {
@@ -346,7 +343,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
 
             Class<?> bukkitClass = bukkitEntity.getClass();
 
-            if (clazz.isAssignableFrom(bukkitClass) && (!isNormalWorld() || bukkitEntity.isValid())) {
+            if (clazz.isAssignableFrom(bukkitClass) && (!this.isNormalWorld() || bukkitEntity.isValid())) {
                 list.add((T) bukkitEntity);
             }
         });
@@ -358,7 +355,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
     public Collection<Entity> getEntitiesByClasses(Class<?>... classes) {
         Collection<Entity> list = new ArrayList<Entity>();
 
-        getNMSEntities().forEach(entity -> {
+        this.getNMSEntities().forEach(entity -> {
             Entity bukkitEntity = entity.getBukkitEntity();
 
             if (bukkitEntity == null) {
@@ -369,7 +366,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
 
             for (Class<?> clazz : classes) {
                 if (clazz.isAssignableFrom(bukkitClass)) {
-                    if (!isNormalWorld() || bukkitEntity.isValid()) {
+                    if (!this.isNormalWorld() || bukkitEntity.isValid()) {
                         list.add(bukkitEntity);
                     }
                     break;
@@ -385,9 +382,9 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
     @Override
     @SuppressWarnings("unchecked")
     public <T extends Entity> T createEntity(Location location, Class<T> clazz) throws IllegalArgumentException {
-        net.minecraft.world.entity.Entity entity = createEntity(location, clazz, true);
+        net.minecraft.world.entity.Entity entity = this.createEntity(location, clazz, true);
 
-        if (!isNormalWorld()) {
+        if (!this.isNormalWorld()) {
             entity.generation = true;
         }
 
@@ -396,27 +393,27 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
 
     @Override
     public <T extends Entity> T spawn(Location location, Class<T> clazz) throws IllegalArgumentException {
-        return spawn(location, clazz, null, CreatureSpawnEvent.SpawnReason.CUSTOM);
+        return this.spawn(location, clazz, null, CreatureSpawnEvent.SpawnReason.CUSTOM);
     }
 
     @Override
     public <T extends Entity> T spawn(Location location, Class<T> clazz, Consumer<? super T> function) throws IllegalArgumentException {
-        return spawn(location, clazz, function, CreatureSpawnEvent.SpawnReason.CUSTOM);
+        return this.spawn(location, clazz, function, CreatureSpawnEvent.SpawnReason.CUSTOM);
     }
 
     @Override
     public <T extends Entity> T spawn(Location location, Class<T> clazz, boolean randomizeData, Consumer<? super T> function) throws IllegalArgumentException {
-        return spawn(location, clazz, function, CreatureSpawnEvent.SpawnReason.CUSTOM, randomizeData);
+        return this.spawn(location, clazz, function, CreatureSpawnEvent.SpawnReason.CUSTOM, randomizeData);
     }
 
     public <T extends Entity> T spawn(Location location, Class<T> clazz, Consumer<? super T> function, CreatureSpawnEvent.SpawnReason reason) throws IllegalArgumentException {
-        return spawn(location, clazz, function, reason, true);
+        return this.spawn(location, clazz, function, reason, true);
     }
 
     public <T extends Entity> T spawn(Location location, Class<T> clazz, Consumer<? super T> function, CreatureSpawnEvent.SpawnReason reason, boolean randomizeData) throws IllegalArgumentException {
-        net.minecraft.world.entity.Entity entity = createEntity(location, clazz, randomizeData);
+        net.minecraft.world.entity.Entity entity = this.createEntity(location, clazz, randomizeData);
 
-        return addEntity(entity, reason, function, randomizeData);
+        return this.addEntity(entity, reason, function, randomizeData);
     }
 
     @Override
@@ -424,28 +421,28 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
     public <T extends Entity> T addEntity(T entity) {
         Preconditions.checkArgument(!entity.isInWorld(), "Entity has already been added to a world");
         net.minecraft.world.entity.Entity nmsEntity = ((CraftEntity) entity).getHandle();
-        if (nmsEntity.level() != getHandle().getLevel()) {
-            nmsEntity = nmsEntity.teleport(new TeleportTransition(getHandle().getLevel(), nmsEntity, TeleportTransition.DO_NOTHING));
+        if (nmsEntity.level() != this.getHandle().getLevel()) {
+            nmsEntity = nmsEntity.teleport(new TeleportTransition(this.getHandle().getLevel(), nmsEntity, TeleportTransition.DO_NOTHING));
         }
 
-        addEntityWithPassengers(nmsEntity, CreatureSpawnEvent.SpawnReason.CUSTOM);
+        this.addEntityWithPassengers(nmsEntity, CreatureSpawnEvent.SpawnReason.CUSTOM);
         return (T) nmsEntity.getBukkitEntity();
     }
 
     @SuppressWarnings("unchecked")
     public <T extends Entity> T addEntity(net.minecraft.world.entity.Entity entity, CreatureSpawnEvent.SpawnReason reason) throws IllegalArgumentException {
-        return addEntity(entity, reason, null, true);
+        return this.addEntity(entity, reason, null, true);
     }
 
     @SuppressWarnings("unchecked")
     public <T extends Entity> T addEntity(net.minecraft.world.entity.Entity entity, CreatureSpawnEvent.SpawnReason reason, Consumer<? super T> function, boolean randomizeData) throws IllegalArgumentException {
         Preconditions.checkArgument(entity != null, "Cannot spawn null entity");
 
-        if (randomizeData && entity instanceof EntityInsentient) {
-            ((EntityInsentient) entity).finalizeSpawn(getHandle(), getHandle().getCurrentDifficultyAt(entity.blockPosition()), EntitySpawnReason.COMMAND, (GroupDataEntity) null);
+        if (randomizeData && entity instanceof Mob) {
+            ((Mob) entity).finalizeSpawn(this.getHandle(), this.getHandle().getCurrentDifficultyAt(entity.blockPosition()), EntitySpawnReason.COMMAND, (SpawnGroupData) null);
         }
 
-        if (!isNormalWorld()) {
+        if (!this.isNormalWorld()) {
             entity.generation = true;
         }
 
@@ -453,7 +450,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
             function.accept((T) entity.getBukkitEntity());
         }
 
-        addEntityToWorld(entity, reason);
+        this.addEntityToWorld(entity, reason);
         return (T) entity.getBukkitEntity();
     }
 
@@ -463,7 +460,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
 
     @SuppressWarnings("unchecked")
     public net.minecraft.world.entity.Entity makeEntity(Location location, Class<? extends Entity> clazz) throws IllegalArgumentException {
-        return createEntity(location, clazz, true);
+        return this.createEntity(location, clazz, true);
     }
 
     @SuppressWarnings("unchecked")
@@ -481,7 +478,7 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
             clazz = LargeFireball.class;
         } else if (clazz == LingeringPotion.class) {
             clazz = ThrownPotion.class;
-            runOld = other -> ((EntityPotion) other).setItem(CraftItemStack.asNMSCopy(new ItemStack(org.bukkit.Material.LINGERING_POTION, 1)));
+            runOld = other -> ((net.minecraft.world.entity.projectile.ThrownPotion) other).setItem(CraftItemStack.asNMSCopy(new ItemStack(org.bukkit.Material.LINGERING_POTION, 1)));
         } else if (clazz == Minecart.class) {
             clazz = RideableMinecart.class;
         } else if (clazz == SizedFireball.class) {
@@ -505,11 +502,11 @@ public abstract class CraftRegionAccessor implements RegionAccessor {
             }
         }
 
-        if (!entityTypeData.entityType().isEnabledByFeature(getHandle().getMinecraftWorld().getWorld())) {
+        if (!entityTypeData.entityType().isEnabledByFeature(this.getHandle().getMinecraftWorld().getWorld())) {
             throw new IllegalArgumentException("Cannot spawn an entity for " + clazz.getName() + " because it is not an enabled feature");
         }
 
-        net.minecraft.world.entity.Entity entity = entityTypeData.spawnFunction().apply(new CraftEntityTypes.SpawnData(getHandle(), location, randomizeData, isNormalWorld()));
+        net.minecraft.world.entity.Entity entity = entityTypeData.spawnFunction().apply(new CraftEntityTypes.SpawnData(this.getHandle(), location, randomizeData, this.isNormalWorld()));
 
         if (entity != null) {
             runOld.accept(entity);
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
index cea16c3b2f..0d091c7b32 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftRegistry.java
@@ -7,8 +7,7 @@ import java.util.Map;
 import java.util.function.BiFunction;
 import java.util.stream.Stream;
 import net.minecraft.core.Holder;
-import net.minecraft.core.IRegistry;
-import net.minecraft.core.IRegistryCustom;
+import net.minecraft.core.RegistryAccess;
 import net.minecraft.core.registries.Registries;
 import net.minecraft.resources.ResourceKey;
 import org.bukkit.Art;
@@ -66,19 +65,19 @@ import org.jetbrains.annotations.NotNull;
 
 public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
 
-    private static IRegistryCustom registry;
+    private static RegistryAccess registry;
 
-    public static void setMinecraftRegistry(IRegistryCustom registry) {
+    public static void setMinecraftRegistry(RegistryAccess registry) {
         Preconditions.checkState(CraftRegistry.registry == null, "Registry already set");
         CraftRegistry.registry = registry;
     }
 
-    public static IRegistryCustom getMinecraftRegistry() {
-        return registry;
+    public static RegistryAccess getMinecraftRegistry() {
+        return CraftRegistry.registry;
     }
 
-    public static <E> IRegistry<E> getMinecraftRegistry(ResourceKey<IRegistry<E>> key) {
-        return getMinecraftRegistry().lookupOrThrow(key);
+    public static <E> net.minecraft.core.Registry<E> getMinecraftRegistry(ResourceKey<net.minecraft.core.Registry<E>> key) {
+        return CraftRegistry.getMinecraftRegistry().lookupOrThrow(key);
     }
 
     /**
@@ -90,10 +89,10 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
      * @param bukkitRegistry the bukkit registry to use
      * @return the bukkit representation of the minecraft value
      */
-    public static <B extends Keyed, M> B minecraftToBukkit(M minecraft, ResourceKey<IRegistry<M>> registryKey, Registry<B> bukkitRegistry) {
+    public static <B extends Keyed, M> B minecraftToBukkit(M minecraft, ResourceKey<net.minecraft.core.Registry<M>> registryKey, Registry<B> bukkitRegistry) {
         Preconditions.checkArgument(minecraft != null);
 
-        IRegistry<M> registry = CraftRegistry.getMinecraftRegistry(registryKey);
+        net.minecraft.core.Registry<M> registry = CraftRegistry.getMinecraftRegistry(registryKey);
         B bukkit = bukkitRegistry.get(CraftNamespacedKey.fromMinecraft(registry.getResourceKey(minecraft)
                 .orElseThrow(() -> new IllegalStateException(String.format("Cannot convert '%s' to bukkit representation, since it is not registered.", minecraft))).location()));
 
@@ -115,12 +114,12 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
         return ((Handleable<M>) bukkit).getHandle();
     }
 
-    public static <B extends Keyed, M> Holder<M> bukkitToMinecraftHolder(B bukkit, ResourceKey<IRegistry<M>> registryKey) {
+    public static <B extends Keyed, M> Holder<M> bukkitToMinecraftHolder(B bukkit, ResourceKey<net.minecraft.core.Registry<M>> registryKey) {
         Preconditions.checkArgument(bukkit != null);
 
-        IRegistry<M> registry = CraftRegistry.getMinecraftRegistry(registryKey);
+        net.minecraft.core.Registry<M> registry = CraftRegistry.getMinecraftRegistry(registryKey);
 
-        if (registry.wrapAsHolder(bukkitToMinecraft(bukkit)) instanceof Holder.c<M> holder) {
+        if (registry.wrapAsHolder(CraftRegistry.bukkitToMinecraft(bukkit)) instanceof Holder.Reference<M> holder) {
             return holder;
         }
 
@@ -135,7 +134,7 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
      * @param registryHolder the minecraft registry holder
      * @return the bukkit registry of the provided class
      */
-    public static <B extends Keyed> Registry<?> createRegistry(Class<? super B> bukkitClass, IRegistryCustom registryHolder) {
+    public static <B extends Keyed> Registry<?> createRegistry(Class<? super B> bukkitClass, RegistryAccess registryHolder) {
         if (bukkitClass == Art.class) {
             return new CraftRegistry<>(Art.class, registryHolder.lookupOrThrow(Registries.PAINTING_VARIANT), CraftArt::new, FieldRename.NONE);
         }
@@ -237,12 +236,12 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
 
     private final Class<? super B> bukkitClass;
     private final Map<NamespacedKey, B> cache = new HashMap<>();
-    private final IRegistry<M> minecraftRegistry;
+    private final net.minecraft.core.Registry<M> minecraftRegistry;
     private final BiFunction<NamespacedKey, M, B> minecraftToBukkit;
     private final BiFunction<NamespacedKey, ApiVersion, NamespacedKey> updater;
     private boolean init;
 
-    public CraftRegistry(Class<? super B> bukkitClass, IRegistry<M> minecraftRegistry, BiFunction<NamespacedKey, M, B> minecraftToBukkit, BiFunction<NamespacedKey, ApiVersion, NamespacedKey> updater) {
+    public CraftRegistry(Class<? super B> bukkitClass, net.minecraft.core.Registry<M> minecraftRegistry, BiFunction<NamespacedKey, M, B> minecraftToBukkit, BiFunction<NamespacedKey, ApiVersion, NamespacedKey> updater) {
         this.bukkitClass = bukkitClass;
         this.minecraftRegistry = minecraftRegistry;
         this.minecraftToBukkit = minecraftToBukkit;
@@ -250,12 +249,12 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
     }
 
     public B get(NamespacedKey namespacedKey, ApiVersion apiVersion) {
-        return get(updater.apply(namespacedKey, apiVersion));
+        return this.get(this.updater.apply(namespacedKey, apiVersion));
     }
 
     @Override
     public B get(NamespacedKey namespacedKey) {
-        B cached = cache.get(namespacedKey);
+        B cached = this.cache.get(namespacedKey);
         if (cached != null) {
             return cached;
         }
@@ -270,23 +269,23 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
         // With this code (when bukkit class is not loaded):
         // Registry#get -> (load class -> create default) -> Registry#get -> get from cache
         // Result: Registry#get == <bukkitClass>.<field>
-        if (!init) {
-            init = true;
+        if (!this.init) {
+            this.init = true;
             try {
-                Class.forName(bukkitClass.getName());
+                Class.forName(this.bukkitClass.getName());
             } catch (ClassNotFoundException e) {
-                throw new RuntimeException("Could not load registry class " + bukkitClass, e);
+                throw new RuntimeException("Could not load registry class " + this.bukkitClass, e);
             }
 
-            return get(namespacedKey);
+            return this.get(namespacedKey);
         }
 
-        B bukkit = createBukkit(namespacedKey, minecraftRegistry.getOptional(CraftNamespacedKey.toMinecraft(namespacedKey)).orElse(null));
+        B bukkit = this.createBukkit(namespacedKey, this.minecraftRegistry.getOptional(CraftNamespacedKey.toMinecraft(namespacedKey)).orElse(null));
         if (bukkit == null) {
             return null;
         }
 
-        cache.put(namespacedKey, bukkit);
+        this.cache.put(namespacedKey, bukkit);
 
         return bukkit;
     }
@@ -294,9 +293,9 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
     @NotNull
     @Override
     public B getOrThrow(@NotNull NamespacedKey namespacedKey) {
-        B object = get(namespacedKey);
+        B object = this.get(namespacedKey);
 
-        Preconditions.checkArgument(object != null, "No %s registry entry found for key %s.", minecraftRegistry.key(), namespacedKey);
+        Preconditions.checkArgument(object != null, "No %s registry entry found for key %s.", this.minecraftRegistry.key(), namespacedKey);
 
         return object;
     }
@@ -304,12 +303,12 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
     @NotNull
     @Override
     public Stream<B> stream() {
-        return minecraftRegistry.keySet().stream().map(minecraftKey -> get(CraftNamespacedKey.fromMinecraft(minecraftKey)));
+        return this.minecraftRegistry.keySet().stream().map(minecraftKey -> this.get(CraftNamespacedKey.fromMinecraft(minecraftKey)));
     }
 
     @Override
     public Iterator<B> iterator() {
-        return stream().iterator();
+        return this.stream().iterator();
     }
 
     public B createBukkit(NamespacedKey namespacedKey, M minecraft) {
@@ -317,6 +316,6 @@ public class CraftRegistry<B extends Keyed, M> implements Registry<B> {
             return null;
         }
 
-        return minecraftToBukkit.apply(namespacedKey, minecraft);
+        return this.minecraftToBukkit.apply(namespacedKey, minecraft);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java
index e48e96e892..d7c3c797c5 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServer.java
@@ -45,77 +45,75 @@ import java.util.stream.Collectors;
 import javax.imageio.ImageIO;
 import jline.console.ConsoleReader;
 import net.minecraft.advancements.AdvancementHolder;
-import net.minecraft.commands.CommandDispatcher;
-import net.minecraft.commands.CommandListenerWrapper;
-import net.minecraft.commands.arguments.ArgumentEntity;
-import net.minecraft.core.BlockPosition;
-import net.minecraft.core.IRegistry;
-import net.minecraft.core.IRegistryCustom;
+import net.minecraft.commands.CommandSourceStack;
+import net.minecraft.commands.Commands;
+import net.minecraft.commands.arguments.EntityArgument;
+import net.minecraft.core.BlockPos;
+import net.minecraft.core.RegistryAccess;
 import net.minecraft.core.registries.BuiltInRegistries;
 import net.minecraft.core.registries.Registries;
 import net.minecraft.nbt.NbtException;
 import net.minecraft.nbt.ReportedNbtException;
-import net.minecraft.resources.MinecraftKey;
 import net.minecraft.resources.ResourceKey;
+import net.minecraft.resources.ResourceLocation;
+import net.minecraft.server.ConsoleInput;
 import net.minecraft.server.MinecraftServer;
 import net.minecraft.server.ReloadableServerRegistries;
-import net.minecraft.server.ServerCommand;
 import net.minecraft.server.WorldLoader;
-import net.minecraft.server.bossevents.BossBattleCustom;
-import net.minecraft.server.commands.CommandReload;
+import net.minecraft.server.bossevents.CustomBossEvent;
+import net.minecraft.server.commands.ReloadCommand;
 import net.minecraft.server.dedicated.DedicatedPlayerList;
 import net.minecraft.server.dedicated.DedicatedServer;
 import net.minecraft.server.dedicated.DedicatedServerProperties;
 import net.minecraft.server.dedicated.DedicatedServerSettings;
-import net.minecraft.server.level.EntityPlayer;
+import net.minecraft.server.level.ServerLevel;
+import net.minecraft.server.level.ServerPlayer;
 import net.minecraft.server.level.TicketType;
-import net.minecraft.server.level.WorldServer;
-import net.minecraft.server.players.GameProfileBanEntry;
-import net.minecraft.server.players.IpBanEntry;
-import net.minecraft.server.players.OpListEntry;
+import net.minecraft.server.players.IpBanListEntry;
 import net.minecraft.server.players.PlayerList;
-import net.minecraft.server.players.WhiteListEntry;
+import net.minecraft.server.players.ServerOpListEntry;
+import net.minecraft.server.players.UserBanListEntry;
+import net.minecraft.server.players.UserWhiteListEntry;
 import net.minecraft.tags.TagKey;
-import net.minecraft.util.ChatDeserializer;
-import net.minecraft.util.datafix.DataConverterRegistry;
-import net.minecraft.world.EnumDifficulty;
+import net.minecraft.util.GsonHelper;
+import net.minecraft.util.datafix.DataFixers;
+import net.minecraft.world.Difficulty;
 import net.minecraft.world.damagesource.DamageType;
-import net.minecraft.world.entity.EntityTypes;
+import net.minecraft.world.entity.EntityType;
 import net.minecraft.world.entity.ai.village.VillageSiege;
-import net.minecraft.world.entity.npc.MobSpawnerCat;
-import net.minecraft.world.entity.npc.MobSpawnerTrader;
-import net.minecraft.world.entity.player.EntityHuman;
-import net.minecraft.world.inventory.Container;
-import net.minecraft.world.inventory.ContainerWorkbench;
-import net.minecraft.world.inventory.InventoryCraftResult;
-import net.minecraft.world.inventory.InventoryCrafting;
+import net.minecraft.world.entity.npc.CatSpawner;
+import net.minecraft.world.entity.npc.WanderingTraderSpawner;
+import net.minecraft.world.inventory.AbstractContainerMenu;
+import net.minecraft.world.inventory.CraftingContainer;
+import net.minecraft.world.inventory.CraftingMenu;
+import net.minecraft.world.inventory.ResultContainer;
 import net.minecraft.world.inventory.TransientCraftingContainer;
 import net.minecraft.world.item.Item;
-import net.minecraft.world.item.ItemWorldMap;
-import net.minecraft.world.item.crafting.RecipeCrafting;
+import net.minecraft.world.item.MapItem;
+import net.minecraft.world.item.crafting.CraftingRecipe;
 import net.minecraft.world.item.crafting.RecipeHolder;
-import net.minecraft.world.item.crafting.RecipeRepair;
-import net.minecraft.world.item.crafting.Recipes;
-import net.minecraft.world.level.EnumGamemode;
+import net.minecraft.world.item.crafting.RecipeType;
+import net.minecraft.world.item.crafting.RepairItemRecipe;
+import net.minecraft.world.level.CustomSpawner;
 import net.minecraft.world.level.GameRules;
-import net.minecraft.world.level.MobSpawner;
-import net.minecraft.world.level.WorldSettings;
+import net.minecraft.world.level.GameType;
+import net.minecraft.world.level.LevelSettings;
 import net.minecraft.world.level.biome.BiomeManager;
 import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.dimension.WorldDimension;
-import net.minecraft.world.level.levelgen.MobSpawnerPatrol;
-import net.minecraft.world.level.levelgen.MobSpawnerPhantom;
+import net.minecraft.world.level.dimension.LevelStem;
+import net.minecraft.world.level.levelgen.PatrolSpawner;
+import net.minecraft.world.level.levelgen.PhantomSpawner;
 import net.minecraft.world.level.levelgen.WorldDimensions;
 import net.minecraft.world.level.levelgen.WorldOptions;
-import net.minecraft.world.level.material.FluidType;
+import net.minecraft.world.level.material.Fluid;
 import net.minecraft.world.level.saveddata.maps.MapId;
-import net.minecraft.world.level.saveddata.maps.WorldMap;
-import net.minecraft.world.level.storage.Convertable;
+import net.minecraft.world.level.saveddata.maps.MapItemSavedData;
 import net.minecraft.world.level.storage.LevelDataAndDimensions;
-import net.minecraft.world.level.storage.WorldDataServer;
-import net.minecraft.world.level.storage.WorldNBTStorage;
+import net.minecraft.world.level.storage.LevelStorageSource;
+import net.minecraft.world.level.storage.PlayerDataStorage;
+import net.minecraft.world.level.storage.PrimaryLevelData;
 import net.minecraft.world.level.validation.ContentValidationException;
-import net.minecraft.world.phys.Vec3D;
+import net.minecraft.world.phys.Vec3;
 import org.bukkit.BanList;
 import org.bukkit.Bukkit;
 import org.bukkit.ChatColor;
@@ -280,7 +278,7 @@ public final class CraftServer implements Server {
     private final CraftCommandMap commandMap = new CraftCommandMap(this);
     private final SimpleHelpMap helpMap = new SimpleHelpMap(this);
     private final StandardMessenger messenger = new StandardMessenger();
-    private final SimplePluginManager pluginManager = new SimplePluginManager(this, commandMap);
+    private final SimplePluginManager pluginManager = new SimplePluginManager(this, this.commandMap);
     private final StructureManager structureManager;
     protected final DedicatedServer console;
     protected final DedicatedPlayerList playerList;
@@ -320,9 +318,9 @@ public final class CraftServer implements Server {
     public CraftServer(DedicatedServer console, PlayerList playerList) {
         this.console = console;
         this.playerList = (DedicatedPlayerList) playerList;
-        this.playerView = Collections.unmodifiableList(Lists.transform(playerList.players, new Function<EntityPlayer, CraftPlayer>() {
+        this.playerView = Collections.unmodifiableList(Lists.transform(playerList.players, new Function<ServerPlayer, CraftPlayer>() {
             @Override
-            public CraftPlayer apply(EntityPlayer player) {
+            public CraftPlayer apply(ServerPlayer player) {
                 return player.getBukkitEntity();
             }
         }));
@@ -337,29 +335,29 @@ public final class CraftServer implements Server {
         CraftRegistry.setMinecraftRegistry(console.registryAccess());
 
         if (!Main.useConsole) {
-            getLogger().info("Console input is disabled due to --noconsole command argument");
+            this.getLogger().info("Console input is disabled due to --noconsole command argument");
         }
 
-        configuration = YamlConfiguration.loadConfiguration(getConfigFile());
-        configuration.options().copyDefaults(true);
-        configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(getClass().getClassLoader().getResourceAsStream("configurations/bukkit.yml"), Charsets.UTF_8)));
+        this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
+        this.configuration.options().copyDefaults(true);
+        this.configuration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream("configurations/bukkit.yml"), Charsets.UTF_8)));
         ConfigurationSection legacyAlias = null;
-        if (!configuration.isString("aliases")) {
-            legacyAlias = configuration.getConfigurationSection("aliases");
-            configuration.set("aliases", "now-in-commands.yml");
+        if (!this.configuration.isString("aliases")) {
+            legacyAlias = this.configuration.getConfigurationSection("aliases");
+            this.configuration.set("aliases", "now-in-commands.yml");
         }
-        saveConfig();
-        if (getCommandsConfigFile().isFile()) {
+        this.saveConfig();
+        if (this.getCommandsConfigFile().isFile()) {
             legacyAlias = null;
         }
-        commandsConfiguration = YamlConfiguration.loadConfiguration(getCommandsConfigFile());
-        commandsConfiguration.options().copyDefaults(true);
-        commandsConfiguration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(getClass().getClassLoader().getResourceAsStream("configurations/commands.yml"), Charsets.UTF_8)));
-        saveCommandsConfig();
+        this.commandsConfiguration = YamlConfiguration.loadConfiguration(this.getCommandsConfigFile());
+        this.commandsConfiguration.options().copyDefaults(true);
+        this.commandsConfiguration.setDefaults(YamlConfiguration.loadConfiguration(new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream("configurations/commands.yml"), Charsets.UTF_8)));
+        this.saveCommandsConfig();
 
         // Migrate aliases from old file and add previously implicit $1- to pass all arguments
         if (legacyAlias != null) {
-            ConfigurationSection aliases = commandsConfiguration.createSection("aliases");
+            ConfigurationSection aliases = this.commandsConfiguration.createSection("aliases");
             for (String key : legacyAlias.getKeys(false)) {
                 ArrayList<String> commands = new ArrayList<String>();
 
@@ -375,95 +373,95 @@ public final class CraftServer implements Server {
             }
         }
 
-        saveCommandsConfig();
-        overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
-        ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions");
-        pluginManager.useTimings(configuration.getBoolean("settings.plugin-profiling"));
-        overrideSpawnLimits();
-        console.autosavePeriod = configuration.getInt("ticks-per.autosave");
-        warningState = WarningState.value(configuration.getString("settings.deprecated-verbose"));
-        TicketType.PLUGIN.timeout = configuration.getInt("chunk-gc.period-in-ticks");
-        minimumAPI = ApiVersion.getOrCreateVersion(configuration.getString("settings.minimum-api"));
-        loadIcon();
-        loadCompatibilities();
+        this.saveCommandsConfig();
+        this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
+        this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
+        this.pluginManager.useTimings(this.configuration.getBoolean("settings.plugin-profiling"));
+        this.overrideSpawnLimits();
+        console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
+        this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
+        TicketType.PLUGIN.timeout = this.configuration.getInt("chunk-gc.period-in-ticks");
+        this.minimumAPI = ApiVersion.getOrCreateVersion(this.configuration.getString("settings.minimum-api"));
+        this.loadIcon();
+        this.loadCompatibilities();
         CraftMagicNumbers.INSTANCE.getCommodore().updateReroute(activeCompatibilities::contains);
 
         // Set map color cache
-        if (configuration.getBoolean("settings.use-map-color-cache")) {
-            MapPalette.setMapColorCache(new CraftMapColorCache(logger));
+        if (this.configuration.getBoolean("settings.use-map-color-cache")) {
+            MapPalette.setMapColorCache(new CraftMapColorCache(this.logger));
         }
     }
 
     public boolean getCommandBlockOverride(String command) {
-        return overrideAllCommandBlockCommands || commandsConfiguration.getStringList("command-block-overrides").contains(command);
+        return this.overrideAllCommandBlockCommands || this.commandsConfiguration.getStringList("command-block-overrides").contains(command);
     }
 
     private File getConfigFile() {
-        return (File) console.options.valueOf("bukkit-settings");
+        return (File) this.console.options.valueOf("bukkit-settings");
     }
 
     private File getCommandsConfigFile() {
-        return (File) console.options.valueOf("commands-settings");
+        return (File) this.console.options.valueOf("commands-settings");
     }
 
     private void overrideSpawnLimits() {
         for (SpawnCategory spawnCategory : SpawnCategory.values()) {
             if (CraftSpawnCategory.isValidForLimits(spawnCategory)) {
-                spawnCategoryLimit.put(spawnCategory, configuration.getInt(CraftSpawnCategory.getConfigNameSpawnLimit(spawnCategory)));
+                this.spawnCategoryLimit.put(spawnCategory, this.configuration.getInt(CraftSpawnCategory.getConfigNameSpawnLimit(spawnCategory)));
             }
         }
     }
 
     private void saveConfig() {
         try {
-            configuration.save(getConfigFile());
+            this.configuration.save(this.getConfigFile());
         } catch (IOException ex) {
-            Logger.getLogger(CraftServer.class.getName()).log(Level.SEVERE, "Could not save " + getConfigFile(), ex);
+            Logger.getLogger(CraftServer.class.getName()).log(Level.SEVERE, "Could not save " + this.getConfigFile(), ex);
         }
     }
 
     private void saveCommandsConfig() {
         try {
-            commandsConfiguration.save(getCommandsConfigFile());
+            this.commandsConfiguration.save(this.getCommandsConfigFile());
         } catch (IOException ex) {
-            Logger.getLogger(CraftServer.class.getName()).log(Level.SEVERE, "Could not save " + getCommandsConfigFile(), ex);
+            Logger.getLogger(CraftServer.class.getName()).log(Level.SEVERE, "Could not save " + this.getCommandsConfigFile(), ex);
         }
     }
 
     private void loadCompatibilities() {
-        ConfigurationSection compatibilities = configuration.getConfigurationSection("settings.compatibility");
+        ConfigurationSection compatibilities = this.configuration.getConfigurationSection("settings.compatibility");
         if (compatibilities == null) {
-            activeCompatibilities = Collections.emptySet();
+            this.activeCompatibilities = Collections.emptySet();
             return;
         }
 
-        activeCompatibilities = compatibilities
+        this.activeCompatibilities = compatibilities
                 .getKeys(false)
                 .stream()
                 .filter(compatibilities::getBoolean)
                 .collect(Collectors.toSet());
 
-        if (!activeCompatibilities.isEmpty()) {
-            logger.info("Using following compatibilities: `" + Joiner.on("`, `").join(activeCompatibilities) + "`, this will affect performance and other plugins behavior.");
-            logger.info("Only use when necessary and prefer updating plugins if possible.");
+        if (!this.activeCompatibilities.isEmpty()) {
+            this.logger.info("Using following compatibilities: `" + Joiner.on("`, `").join(this.activeCompatibilities) + "`, this will affect performance and other plugins behavior.");
+            this.logger.info("Only use when necessary and prefer updating plugins if possible.");
         }
 
-        if (activeCompatibilities.contains("enum-compatibility-mode")) {
-            getLogger().warning("Loading plugins in enum compatibility mode. This will affect plugin performance. Use only as a transition period or when absolutely necessary.");
+        if (this.activeCompatibilities.contains("enum-compatibility-mode")) {
+            this.getLogger().warning("Loading plugins in enum compatibility mode. This will affect plugin performance. Use only as a transition period or when absolutely necessary.");
         } else if (System.getProperty("RemoveEnumBanner") == null) {
             // TODO 2024-06-16: Remove in newer version
-            getLogger().info("*** This version of Spigot contains changes to some enums. If you notice that plugins no longer work after updating, please report this to the developers of those plugins first. ***");
-            getLogger().info("*** If you cannot update those plugins, you can try setting `settings.compatibility.enum-compatibility-mode` to `true` in `bukkit.yml`. ***");
+            this.getLogger().info("*** This version of Spigot contains changes to some enums. If you notice that plugins no longer work after updating, please report this to the developers of those plugins first. ***");
+            this.getLogger().info("*** If you cannot update those plugins, you can try setting `settings.compatibility.enum-compatibility-mode` to `true` in `bukkit.yml`. ***");
         }
     }
 
     public void loadPlugins() {
-        pluginManager.registerInterface(JavaPluginLoader.class);
+        this.pluginManager.registerInterface(JavaPluginLoader.class);
 
-        File pluginFolder = (File) console.options.valueOf("plugins");
+        File pluginFolder = (File) this.console.options.valueOf("plugins");
 
         if (pluginFolder.exists()) {
-            Plugin[] plugins = pluginManager.loadPlugins(pluginFolder);
+            Plugin[] plugins = this.pluginManager.loadPlugins(pluginFolder);
             for (Plugin plugin : plugins) {
                 try {
                     String message = String.format("Loading %s", plugin.getDescription().getFullName());
@@ -480,58 +478,58 @@ public final class CraftServer implements Server {
 
     public void enablePlugins(PluginLoadOrder type) {
         if (type == PluginLoadOrder.STARTUP) {
-            helpMap.clear();
-            helpMap.initializeGeneralTopics();
+            this.helpMap.clear();
+            this.helpMap.initializeGeneralTopics();
         }
 
-        Plugin[] plugins = pluginManager.getPlugins();
+        Plugin[] plugins = this.pluginManager.getPlugins();
 
         for (Plugin plugin : plugins) {
             if ((!plugin.isEnabled()) && (plugin.getDescription().getLoad() == type)) {
-                enablePlugin(plugin);
+                this.enablePlugin(plugin);
             }
         }
 
         if (type == PluginLoadOrder.POSTWORLD) {
-            commandMap.setFallbackCommands();
-            setVanillaCommands();
-            commandMap.registerServerAliases();
+            this.commandMap.setFallbackCommands();
+            this.setVanillaCommands();
+            this.commandMap.registerServerAliases();
             DefaultPermissions.registerCorePermissions();
             CraftDefaultPermissions.registerCorePermissions();
-            loadCustomPermissions();
-            helpMap.initializeCommands();
-            syncCommands();
+            this.loadCustomPermissions();
+            this.helpMap.initializeCommands();
+            this.syncCommands();
         }
     }
 
     public void disablePlugins() {
-        pluginManager.disablePlugins();
+        this.pluginManager.disablePlugins();
     }
 
     private void setVanillaCommands() {
-        CommandDispatcher dispatcher = console.vanillaCommandDispatcher;
+        Commands dispatcher = this.console.vanillaCommandDispatcher;
 
         // Build a list of all Vanilla commands and create wrappers
-        for (CommandNode<CommandListenerWrapper> cmd : dispatcher.getDispatcher().getRoot().getChildren()) {
-            commandMap.register("minecraft", new VanillaCommandWrapper(dispatcher, cmd));
+        for (CommandNode<CommandSourceStack> cmd : dispatcher.getDispatcher().getRoot().getChildren()) {
+            this.commandMap.register("minecraft", new VanillaCommandWrapper(dispatcher, cmd));
         }
     }
 
     public void syncCommands() {
         // Clear existing commands
-        CommandDispatcher dispatcher = console.resources.managers().commands = new CommandDispatcher();
+        Commands dispatcher = this.console.resources.managers().commands = new Commands();
 
         // Register all commands, vanilla ones will be using the old dispatcher references
-        for (Map.Entry<String, Command> entry : commandMap.getKnownCommands().entrySet()) {
+        for (Map.Entry<String, Command> entry : this.commandMap.getKnownCommands().entrySet()) {
             String label = entry.getKey();
             Command command = entry.getValue();
 
             if (command instanceof VanillaCommandWrapper) {
-                LiteralCommandNode<CommandListenerWrapper> node = (LiteralCommandNode<CommandListenerWrapper>) ((VanillaCommandWrapper) command).vanillaCommand;
+                LiteralCommandNode<CommandSourceStack> node = (LiteralCommandNode<CommandSourceStack>) ((VanillaCommandWrapper) command).vanillaCommand;
                 if (!node.getLiteral().equals(label)) {
-                    LiteralCommandNode<CommandListenerWrapper> clone = new LiteralCommandNode(label, node.getCommand(), node.getRequirement(), node.getRedirect(), node.getRedirectModifier(), node.isFork());
+                    LiteralCommandNode<CommandSourceStack> clone = new LiteralCommandNode(label, node.getCommand(), node.getRequirement(), node.getRedirect(), node.getRedirectModifier(), node.isFork());
 
-                    for (CommandNode<CommandListenerWrapper> child : node.getChildren()) {
+                    for (CommandNode<CommandSourceStack> child : node.getChildren()) {
                         clone.addChild(child);
                     }
                     node = clone;
@@ -544,7 +542,7 @@ public final class CraftServer implements Server {
         }
 
         // Refresh commands
-        for (EntityPlayer player : getHandle().players) {
+        for (ServerPlayer player : this.getHandle().players) {
             dispatcher.sendCommands(player);
         }
     }
@@ -555,14 +553,14 @@ public final class CraftServer implements Server {
 
             for (Permission perm : perms) {
                 try {
-                    pluginManager.addPermission(perm, false);
+                    this.pluginManager.addPermission(perm, false);
                 } catch (IllegalArgumentException ex) {
-                    getLogger().log(Level.WARNING, "Plugin " + plugin.getDescription().getFullName() + " tried to register permission '" + perm.getName() + "' but it's already registered", ex);
+                    this.getLogger().log(Level.WARNING, "Plugin " + plugin.getDescription().getFullName() + " tried to register permission '" + perm.getName() + "' but it's already registered", ex);
                 }
             }
-            pluginManager.dirtyPermissibles();
+            this.pluginManager.dirtyPermissibles();
 
-            pluginManager.enablePlugin(plugin);
+            this.pluginManager.enablePlugin(plugin);
         } catch (Throwable ex) {
             Logger.getLogger(CraftServer.class.getName()).log(Level.SEVERE, ex.getMessage() + " loading " + plugin.getDescription().getFullName() + " (Is it up to date?)", ex);
         }
@@ -570,17 +568,17 @@ public final class CraftServer implements Server {
 
     @Override
     public String getName() {
-        return serverName;
+        return this.serverName;
     }
 
     @Override
     public String getVersion() {
-        return serverVersion + " (MC: " + console.getServerVersion() + ")";
+        return this.serverVersion + " (MC: " + this.console.getServerVersion() + ")";
     }
 
     @Override
     public String getBukkitVersion() {
-        return bukkitVersion;
+        return this.bukkitVersion;
     }
 
     @Override
@@ -593,7 +591,7 @@ public final class CraftServer implements Server {
     public Player getPlayer(final String name) {
         Preconditions.checkArgument(name != null, "name cannot be null");
 
-        Player found = getPlayerExact(name);
+        Player found = this.getPlayerExact(name);
         // Try for an exact match first.
         if (found != null) {
             return found;
@@ -601,7 +599,7 @@ public final class CraftServer implements Server {
 
         String lowerName = name.toLowerCase(Locale.ROOT);
         int delta = Integer.MAX_VALUE;
-        for (Player player : getOnlinePlayers()) {
+        for (Player player : this.getOnlinePlayers()) {
             if (player.getName().toLowerCase(Locale.ROOT).startsWith(lowerName)) {
                 int curDelta = Math.abs(player.getName().length() - lowerName.length());
                 if (curDelta < delta) {
@@ -619,7 +617,7 @@ public final class CraftServer implements Server {
     public Player getPlayerExact(String name) {
         Preconditions.checkArgument(name != null, "name cannot be null");
 
-        EntityPlayer player = playerList.getPlayerByName(name);
+        ServerPlayer player = this.playerList.getPlayerByName(name);
         return (player != null) ? player.getBukkitEntity() : null;
     }
 
@@ -627,7 +625,7 @@ public final class CraftServer implements Server {
     public Player getPlayer(UUID id) {
         Preconditions.checkArgument(id != null, "UUID id cannot be null");
 
-        EntityPlayer player = playerList.getPlayer(id);
+        ServerPlayer player = this.playerList.getPlayer(id);
         if (player != null) {
             return player.getBukkitEntity();
         }
@@ -637,7 +635,7 @@ public final class CraftServer implements Server {
 
     @Override
     public int broadcastMessage(String message) {
-        return broadcast(message, BROADCAST_CHANNEL_USERS);
+        return this.broadcast(message, BROADCAST_CHANNEL_USERS);
     }
 
     @Override
@@ -667,14 +665,14 @@ public final class CraftServer implements Server {
 
     @Override
     public int getMaxPlayers() {
-        return playerList.getMaxPlayers();
+        return this.playerList.getMaxPlayers();
     }
 
     @Override
     public void setMaxPlayers(int maxPlayers) {
         Preconditions.checkArgument(maxPlayers >= 0, "maxPlayers must be >= 0");
 
-        playerList.maxPlayers = maxPlayers;
+        this.playerList.maxPlayers = maxPlayers;
     }
 
     // NOTE: These are dependent on the corresponding call in MinecraftServer
@@ -800,7 +798,7 @@ public final class CraftServer implements Server {
 
     @Override
     public File getUpdateFolderFile() {
-        return new File((File) console.options.valueOf("plugins"), this.configuration.getString("settings.update-folder", "update"));
+        return new File((File) this.console.options.valueOf("plugins"), this.configuration.getString("settings.update-folder", "update"));
     }
 
     @Override
@@ -811,37 +809,37 @@ public final class CraftServer implements Server {
     @Override
     @Deprecated
     public int getTicksPerAnimalSpawns() {
-        return getTicksPerSpawns(SpawnCategory.ANIMAL);
+        return this.getTicksPerSpawns(SpawnCategory.ANIMAL);
     }
 
     @Override
     @Deprecated
     public int getTicksPerMonsterSpawns() {
-        return getTicksPerSpawns(SpawnCategory.MONSTER);
+        return this.getTicksPerSpawns(SpawnCategory.MONSTER);
     }
 
     @Override
     @Deprecated
     public int getTicksPerWaterSpawns() {
-        return getTicksPerSpawns(SpawnCategory.WATER_ANIMAL);
+        return this.getTicksPerSpawns(SpawnCategory.WATER_ANIMAL);
     }
 
     @Override
     @Deprecated
     public int getTicksPerWaterAmbientSpawns() {
-        return getTicksPerSpawns(SpawnCategory.WATER_AMBIENT);
+        return this.getTicksPerSpawns(SpawnCategory.WATER_AMBIENT);
     }
 
     @Override
     @Deprecated
     public int getTicksPerWaterUndergroundCreatureSpawns() {
-        return getTicksPerSpawns(SpawnCategory.WATER_UNDERGROUND_CREATURE);
+        return this.getTicksPerSpawns(SpawnCategory.WATER_UNDERGROUND_CREATURE);
     }
 
     @Override
     @Deprecated
     public int getTicksPerAmbientSpawns() {
-        return getTicksPerSpawns(SpawnCategory.AMBIENT);
+        return this.getTicksPerSpawns(SpawnCategory.AMBIENT);
     }
 
     @Override
@@ -853,30 +851,30 @@ public final class CraftServer implements Server {
 
     @Override
     public PluginManager getPluginManager() {
-        return pluginManager;
+        return this.pluginManager;
     }
 
     @Override
     public CraftScheduler getScheduler() {
-        return scheduler;
+        return this.scheduler;
     }
 
     @Override
     public ServicesManager getServicesManager() {
-        return servicesManager;
+        return this.servicesManager;
     }
 
     @Override
     public List<World> getWorlds() {
-        return new ArrayList<World>(worlds.values());
+        return new ArrayList<World>(this.worlds.values());
     }
 
     public DedicatedPlayerList getHandle() {
-        return playerList;
+        return this.playerList;
     }
 
     // NOTE: Should only be called from DedicatedServer.ah()
-    public boolean dispatchServerCommand(CommandSender sender, ServerCommand serverCommand) {
+    public boolean dispatchServerCommand(CommandSender sender, ConsoleInput serverCommand) {
         if (sender instanceof Conversable) {
             Conversable conversable = (Conversable) sender;
 
@@ -887,9 +885,9 @@ public final class CraftServer implements Server {
         }
         try {
             this.playerCommandState = true;
-            return dispatchCommand(sender, serverCommand.msg);
+            return this.dispatchCommand(sender, serverCommand.msg);
         } catch (Exception ex) {
-            getLogger().log(Level.WARNING, "Unexpected exception while parsing console command \"" + serverCommand.msg + '"', ex);
+            this.getLogger().log(Level.WARNING, "Unexpected exception while parsing console command \"" + serverCommand.msg + '"', ex);
             return false;
         } finally {
             this.playerCommandState = false;
@@ -901,7 +899,7 @@ public final class CraftServer implements Server {
         Preconditions.checkArgument(sender != null, "sender cannot be null");
         Preconditions.checkArgument(commandLine != null, "commandLine cannot be null");
 
-        if (commandMap.dispatch(sender, commandLine)) {
+        if (this.commandMap.dispatch(sender, commandLine)) {
             return true;
         }
 
@@ -916,38 +914,38 @@ public final class CraftServer implements Server {
 
     @Override
     public void reload() {
-        reloadCount++;
-        configuration = YamlConfiguration.loadConfiguration(getConfigFile());
-        commandsConfiguration = YamlConfiguration.loadConfiguration(getCommandsConfigFile());
+        this.reloadCount++;
+        this.configuration = YamlConfiguration.loadConfiguration(this.getConfigFile());
+        this.commandsConfiguration = YamlConfiguration.loadConfiguration(this.getCommandsConfigFile());
 
-        console.settings = new DedicatedServerSettings(console.options);
-        DedicatedServerProperties config = console.settings.getProperties();
+        this.console.settings = new DedicatedServerSettings(this.console.options);
+        DedicatedServerProperties config = this.console.settings.getProperties();
 
-        console.setPvpAllowed(config.pvp);
-        console.setFlightAllowed(config.allowFlight);
-        console.setMotd(config.motd);
-        overrideSpawnLimits();
-        warningState = WarningState.value(configuration.getString("settings.deprecated-verbose"));
-        TicketType.PLUGIN.timeout = configuration.getInt("chunk-gc.period-in-ticks");
-        minimumAPI = ApiVersion.getOrCreateVersion(configuration.getString("settings.minimum-api"));
-        printSaveWarning = false;
-        console.autosavePeriod = configuration.getInt("ticks-per.autosave");
-        loadIcon();
-        loadCompatibilities();
+        this.console.setPvpAllowed(config.pvp);
+        this.console.setFlightAllowed(config.allowFlight);
+        this.console.setMotd(config.motd);
+        this.overrideSpawnLimits();
+        this.warningState = WarningState.value(this.configuration.getString("settings.deprecated-verbose"));
+        TicketType.PLUGIN.timeout = this.configuration.getInt("chunk-gc.period-in-ticks");
+        this.minimumAPI = ApiVersion.getOrCreateVersion(this.configuration.getString("settings.minimum-api"));
+        this.printSaveWarning = false;
+        this.console.autosavePeriod = this.configuration.getInt("ticks-per.autosave");
+        this.loadIcon();
+        this.loadCompatibilities();
         CraftMagicNumbers.INSTANCE.getCommodore().updateReroute(activeCompatibilities::contains);
 
         try {
-            playerList.getIpBans().load();
+            this.playerList.getIpBans().load();
         } catch (IOException ex) {
-            logger.log(Level.WARNING, "Failed to load banned-ips.json, " + ex.getMessage());
+            this.logger.log(Level.WARNING, "Failed to load banned-ips.json, " + ex.getMessage());
         }
         try {
-            playerList.getBans().load();
+            this.playerList.getBans().load();
         } catch (IOException ex) {
-            logger.log(Level.WARNING, "Failed to load banned-players.json, " + ex.getMessage());
+            this.logger.log(Level.WARNING, "Failed to load banned-players.json, " + ex.getMessage());
         }
 
-        for (WorldServer world : console.getAllLevels()) {
+        for (ServerLevel world : this.console.getAllLevels()) {
             world.serverLevelData.setDifficulty(config.difficulty);
             world.setSpawnSettings(config.spawnMonsters);
 
@@ -963,58 +961,58 @@ public final class CraftServer implements Server {
             }
         }
 
-        pluginManager.clearPlugins();
-        commandMap.clearCommands();
-        reloadData();
-        overrideAllCommandBlockCommands = commandsConfiguration.getStringList("command-block-overrides").contains("*");
-        ignoreVanillaPermissions = commandsConfiguration.getBoolean("ignore-vanilla-permissions");
+        this.pluginManager.clearPlugins();
+        this.commandMap.clearCommands();
+        this.reloadData();
+        this.overrideAllCommandBlockCommands = this.commandsConfiguration.getStringList("command-block-overrides").contains("*");
+        this.ignoreVanillaPermissions = this.commandsConfiguration.getBoolean("ignore-vanilla-permissions");
 
         int pollCount = 0;
 
         // Wait for at most 2.5 seconds for plugins to close their threads
-        while (pollCount < 50 && getScheduler().getActiveWorkers().size() > 0) {
+        while (pollCount < 50 && this.getScheduler().getActiveWorkers().size() > 0) {
             try {
                 Thread.sleep(50);
             } catch (InterruptedException e) {}
             pollCount++;
         }
 
-        List<BukkitWorker> overdueWorkers = getScheduler().getActiveWorkers();
+        List<BukkitWorker> overdueWorkers = this.getScheduler().getActiveWorkers();
         for (BukkitWorker worker : overdueWorkers) {
             Plugin plugin = worker.getOwner();
-            getLogger().log(Level.SEVERE, String.format(
+            this.getLogger().log(Level.SEVERE, String.format(
                 "Nag author(s): '%s' of '%s' about the following: %s",
                 plugin.getDescription().getAuthors(),
                 plugin.getDescription().getFullName(),
                 "This plugin is not properly shutting down its async tasks when it is being reloaded.  This may cause conflicts with the newly loaded version of the plugin"
             ));
         }
-        loadPlugins();
-        enablePlugins(PluginLoadOrder.STARTUP);
-        enablePlugins(PluginLoadOrder.POSTWORLD);
-        getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.RELOAD));
+        this.loadPlugins();
+        this.enablePlugins(PluginLoadOrder.STARTUP);
+        this.enablePlugins(PluginLoadOrder.POSTWORLD);
+        this.getPluginManager().callEvent(new ServerLoadEvent(ServerLoadEvent.LoadType.RELOAD));
     }
 
     @Override
     public void reloadData() {
-        CommandReload.reload(console);
+        ReloadCommand.reload(this.console);
     }
 
     private void loadIcon() {
-        icon = new CraftIconCache(null);
+        this.icon = new CraftIconCache(null);
         try {
             final File file = new File(new File("."), "server-icon.png");
             if (file.isFile()) {
-                icon = loadServerIcon0(file);
+                this.icon = CraftServer.loadServerIcon0(file);
             }
         } catch (Exception ex) {
-            getLogger().log(Level.WARNING, "Couldn't load server icon", ex);
+            this.getLogger().log(Level.WARNING, "Couldn't load server icon", ex);
         }
     }
 
     @SuppressWarnings({ "unchecked", "finally" })
     private void loadCustomPermissions() {
-        File file = new File(configuration.getString("settings.permissions-file"));
+        File file = new File(this.configuration.getString("settings.permissions-file"));
         FileInputStream stream;
 
         try {
@@ -1030,12 +1028,12 @@ public final class CraftServer implements Server {
         Map<String, Map<String, Object>> perms;
 
         try {
-            perms = (Map<String, Map<String, Object>>) yaml.load(stream);
+            perms = (Map<String, Map<String, Object>>) this.yaml.load(stream);
         } catch (MarkedYAMLException ex) {
-            getLogger().log(Level.WARNING, "Server permissions file " + file + " is not valid YAML: " + ex.toString());
+            this.getLogger().log(Level.WARNING, "Server permissions file " + file + " is not valid YAML: " + ex.toString());
             return;
         } catch (Throwable ex) {
-            getLogger().log(Level.WARNING, "Server permissions file " + file + " is not valid YAML.", ex);
+            this.getLogger().log(Level.WARNING, "Server permissions file " + file + " is not valid YAML.", ex);
             return;
         } finally {
             try {
@@ -1044,7 +1042,7 @@ public final class CraftServer implements Server {
         }
 
         if (perms == null) {
-            getLogger().log(Level.INFO, "Server permissions file " + file + " is empty, ignoring it");
+            this.getLogger().log(Level.INFO, "Server permissions file " + file + " is empty, ignoring it");
             return;
         }
 
@@ -1052,16 +1050,16 @@ public final class CraftServer implements Server {
 
         for (Permission perm : permsList) {
             try {
-                pluginManager.addPermission(perm);
+                this.pluginManager.addPermission(perm);
             } catch (IllegalArgumentException ex) {
-                getLogger().log(Level.SEVERE, "Permission in " + file + " was already defined", ex);
+                this.getLogger().log(Level.SEVERE, "Permission in " + file + " was already defined", ex);
             }
         }
     }
 
     @Override
     public String toString() {
-        return "CraftServer{" + "serverName=" + serverName + ",serverVersion=" + serverVersion + ",minecraftVersion=" + console.getServerVersion() + '}';
+        return "CraftServer{" + "serverName=" + this.serverName + ",serverVersion=" + this.serverVersion + ",minecraftVersion=" + this.console.getServerVersion() + '}';
     }
 
     public World createWorld(String name, World.Environment environment) {
@@ -1082,14 +1080,14 @@ public final class CraftServer implements Server {
 
     @Override
     public World createWorld(WorldCreator creator) {
-        Preconditions.checkState(console.getAllLevels().iterator().hasNext(), "Cannot create additional worlds on STARTUP");
+        Preconditions.checkState(this.console.getAllLevels().iterator().hasNext(), "Cannot create additional worlds on STARTUP");
         Preconditions.checkArgument(creator != null, "WorldCreator cannot be null");
 
         String name = creator.name();
         ChunkGenerator generator = creator.generator();
         BiomeProvider biomeProvider = creator.biomeProvider();
-        File folder = new File(getWorldContainer(), name);
-        World world = getWorld(name);
+        File folder = new File(this.getWorldContainer(), name);
+        World world = this.getWorld(name);
 
         if (world != null) {
             return world;
@@ -1100,44 +1098,44 @@ public final class CraftServer implements Server {
         }
 
         if (generator == null) {
-            generator = getGenerator(name);
+            generator = this.getGenerator(name);
         }
 
         if (biomeProvider == null) {
-            biomeProvider = getBiomeProvider(name);
+            biomeProvider = this.getBiomeProvider(name);
         }
 
-        ResourceKey<WorldDimension> actualDimension;
+        ResourceKey<LevelStem> actualDimension;
         switch (creator.environment()) {
             case NORMAL:
-                actualDimension = WorldDimension.OVERWORLD;
+                actualDimension = LevelStem.OVERWORLD;
                 break;
             case NETHER:
-                actualDimension = WorldDimension.NETHER;
+                actualDimension = LevelStem.NETHER;
                 break;
             case THE_END:
-                actualDimension = WorldDimension.END;
+                actualDimension = LevelStem.END;
                 break;
             default:
                 throw new IllegalArgumentException("Illegal dimension (" + creator.environment() + ")");
         }
 
-        Convertable.ConversionSession worldSession;
+        LevelStorageSource.LevelStorageAccess worldSession;
         try {
-            worldSession = Convertable.createDefault(getWorldContainer().toPath()).validateAndCreateAccess(name, actualDimension);
+            worldSession = LevelStorageSource.createDefault(this.getWorldContainer().toPath()).validateAndCreateAccess(name, actualDimension);
         } catch (IOException | ContentValidationException ex) {
             throw new RuntimeException(ex);
         }
 
         Dynamic<?> dynamic;
         if (worldSession.hasWorldData()) {
-            net.minecraft.world.level.storage.WorldInfo worldinfo;
+            net.minecraft.world.level.storage.LevelSummary worldinfo;
 
             try {
                 dynamic = worldSession.getDataTag();
                 worldinfo = worldSession.getSummary(dynamic);
             } catch (NbtException | ReportedNbtException | IOException ioexception) {
-                Convertable.b convertable_b = worldSession.getLevelDirectory();
+                LevelStorageSource.LevelDirectory convertable_b = worldSession.getLevelDirectory();
 
                 MinecraftServer.LOGGER.warn("Failed to load world data from {}", convertable_b.dataFile(), ioexception);
                 MinecraftServer.LOGGER.info("Attempting to use fallback");
@@ -1169,85 +1167,85 @@ public final class CraftServer implements Server {
 
         boolean hardcore = creator.hardcore();
 
-        WorldDataServer worlddata;
-        WorldLoader.a worldloader_a = console.worldLoader;
-        IRegistryCustom.Dimension iregistrycustom_dimension = worldloader_a.datapackDimensions();
-        IRegistry<WorldDimension> iregistry = iregistrycustom_dimension.lookupOrThrow(Registries.LEVEL_STEM);
+        PrimaryLevelData worlddata;
+        WorldLoader.DataLoadContext worldloader_a = this.console.worldLoader;
+        RegistryAccess.Frozen iregistrycustom_dimension = worldloader_a.datapackDimensions();
+        net.minecraft.core.Registry<LevelStem> iregistry = iregistrycustom_dimension.lookupOrThrow(Registries.LEVEL_STEM);
         if (dynamic != null) {
-            LevelDataAndDimensions leveldataanddimensions = Convertable.getLevelDataAndDimensions(dynamic, worldloader_a.dataConfiguration(), iregistry, worldloader_a.datapackWorldgen());
+            LevelDataAndDimensions leveldataanddimensions = LevelStorageSource.getLevelDataAndDimensions(dynamic, worldloader_a.dataConfiguration(), iregistry, worldloader_a.datapackWorldgen());
 
-            worlddata = (WorldDataServer) leveldataanddimensions.worldData();
+            worlddata = (PrimaryLevelData) leveldataanddimensions.worldData();
             iregistrycustom_dimension = leveldataanddimensions.dimensions().dimensionsRegistryAccess();
         } else {
-            WorldSettings worldsettings;
+            LevelSettings worldsettings;
             WorldOptions worldoptions = new WorldOptions(creator.seed(), creator.generateStructures(), false);
             WorldDimensions worlddimensions;
 
-            DedicatedServerProperties.WorldDimensionData properties = new DedicatedServerProperties.WorldDimensionData(ChatDeserializer.parse((creator.generatorSettings().isEmpty()) ? "{}" : creator.generatorSettings()), creator.type().name().toLowerCase(Locale.ROOT));
+            DedicatedServerProperties.WorldDimensionData properties = new DedicatedServerProperties.WorldDimensionData(GsonHelper.parse((creator.generatorSettings().isEmpty()) ? "{}" : creator.generatorSettings()), creator.type().name().toLowerCase(Locale.ROOT));
 
-            worldsettings = new WorldSettings(name, EnumGamemode.byId(getDefaultGameMode().getValue()), hardcore, EnumDifficulty.EASY, false, new GameRules(worldloader_a.dataConfiguration().enabledFeatures()), worldloader_a.dataConfiguration());
+            worldsettings = new LevelSettings(name, GameType.byId(this.getDefaultGameMode().getValue()), hardcore, Difficulty.EASY, false, new GameRules(worldloader_a.dataConfiguration().enabledFeatures()), worldloader_a.dataConfiguration());
             worlddimensions = properties.create(worldloader_a.datapackWorldgen());
 
-            WorldDimensions.b worlddimensions_b = worlddimensions.bake(iregistry);
+            WorldDimensions.Complete worlddimensions_b = worlddimensions.bake(iregistry);
             Lifecycle lifecycle = worlddimensions_b.lifecycle().add(worldloader_a.datapackWorldgen().allRegistriesLifecycle());
 
-            worlddata = new WorldDataServer(worldsettings, worldoptions, worlddimensions_b.specialWorldProperty(), lifecycle);
+            worlddata = new PrimaryLevelData(worldsettings, worldoptions, worlddimensions_b.specialWorldProperty(), lifecycle);
             iregistrycustom_dimension = worlddimensions_b.dimensionsRegistryAccess();
         }
         iregistry = iregistrycustom_dimension.lookupOrThrow(Registries.LEVEL_STEM);
         worlddata.customDimensions = iregistry;
         worlddata.checkName(name);
-        worlddata.setModdedInfo(console.getServerModName(), console.getModdedStatus().shouldReportAsModified());
+        worlddata.setModdedInfo(this.console.getServerModName(), this.console.getModdedStatus().shouldReportAsModified());
 
-        if (console.options.has("forceUpgrade")) {
-            net.minecraft.server.Main.forceUpgrade(worldSession, DataConverterRegistry.getDataFixer(), console.options.has("eraseCache"), () -> true, iregistrycustom_dimension, console.options.has("recreateRegionFiles"));
+        if (this.console.options.has("forceUpgrade")) {
+            net.minecraft.server.Main.forceUpgrade(worldSession, DataFixers.getDataFixer(), this.console.options.has("eraseCache"), () -> true, iregistrycustom_dimension, this.console.options.has("recreateRegionFiles"));
         }
 
         long j = BiomeManager.obfuscateSeed(creator.seed());
-        List<MobSpawner> list = ImmutableList.of(new MobSpawnerPhantom(), new MobSpawnerPatrol(), new MobSpawnerCat(), new VillageSiege(), new MobSpawnerTrader(worlddata));
-        WorldDimension worlddimension = iregistry.getValue(actualDimension);
+        List<CustomSpawner> list = ImmutableList.of(new PhantomSpawner(), new PatrolSpawner(), new CatSpawner(), new VillageSiege(), new WanderingTraderSpawner(worlddata));
+        LevelStem worlddimension = iregistry.getValue(actualDimension);
 
         WorldInfo worldInfo = new CraftWorldInfo(worlddata, worldSession, creator.environment(), worlddimension.type().value());
         if (biomeProvider == null && generator != null) {
             biomeProvider = generator.getDefaultBiomeProvider(worldInfo);
         }
 
-        ResourceKey<net.minecraft.world.level.World> worldKey;
+        ResourceKey<net.minecraft.world.level.Level> worldKey;
         String levelName = this.getServer().getProperties().levelName;
         if (name.equals(levelName + "_nether")) {
-            worldKey = net.minecraft.world.level.World.NETHER;
+            worldKey = net.minecraft.world.level.Level.NETHER;
         } else if (name.equals(levelName + "_the_end")) {
-            worldKey = net.minecraft.world.level.World.END;
+            worldKey = net.minecraft.world.level.Level.END;
         } else {
-            worldKey = ResourceKey.create(Registries.DIMENSION, MinecraftKey.withDefaultNamespace(name.toLowerCase(Locale.ROOT)));
+            worldKey = ResourceKey.create(Registries.DIMENSION, ResourceLocation.withDefaultNamespace(name.toLowerCase(Locale.ROOT)));
         }
 
         // If set to not keep spawn in memory (changed from default) then adjust rule accordingly
         if (!creator.keepSpawnInMemory()) {
             worlddata.getGameRules().getRule(GameRules.RULE_SPAWN_CHUNK_RADIUS).set(0, null);
         }
-        WorldServer internal = (WorldServer) new WorldServer(console, console.executor, worldSession, worlddata, worldKey, worlddimension, getServer().progressListenerFactory.create(worlddata.getGameRules().getInt(GameRules.RULE_SPAWN_CHUNK_RADIUS)),
-                worlddata.isDebugWorld(), j, creator.environment() == Environment.NORMAL ? list : ImmutableList.of(), true, console.overworld().getRandomSequences(), creator.environment(), generator, biomeProvider);
+        ServerLevel internal = (ServerLevel) new ServerLevel(this.console, this.console.executor, worldSession, worlddata, worldKey, worlddimension, this.getServer().progressListenerFactory.create(worlddata.getGameRules().getInt(GameRules.RULE_SPAWN_CHUNK_RADIUS)),
+                worlddata.isDebugWorld(), j, creator.environment() == Environment.NORMAL ? list : ImmutableList.of(), true, this.console.overworld().getRandomSequences(), creator.environment(), generator, biomeProvider);
 
-        if (!(worlds.containsKey(name.toLowerCase(Locale.ROOT)))) {
+        if (!(this.worlds.containsKey(name.toLowerCase(Locale.ROOT)))) {
             return null;
         }
 
-        console.initWorld(internal, worlddata, worlddata, worlddata.worldGenOptions());
+        this.console.initWorld(internal, worlddata, worlddata, worlddata.worldGenOptions());
 
         internal.setSpawnSettings(true);
-        console.addLevel(internal);
+        this.console.addLevel(internal);
 
-        getServer().prepareLevels(internal.getChunkSource().chunkMap.progressListener, internal);
+        this.getServer().prepareLevels(internal.getChunkSource().chunkMap.progressListener, internal);
         internal.entityManager.tick(); // SPIGOT-6526: Load pending entities so they are available to the API
 
-        pluginManager.callEvent(new WorldLoadEvent(internal.getWorld()));
+        this.pluginManager.callEvent(new WorldLoadEvent(internal.getWorld()));
         return internal.getWorld();
     }
 
     @Override
     public boolean unloadWorld(String name, boolean save) {
-        return unloadWorld(getWorld(name), save);
+        return this.unloadWorld(this.getWorld(name), save);
     }
 
     @Override
@@ -1256,13 +1254,13 @@ public final class CraftServer implements Server {
             return false;
         }
 
-        WorldServer handle = ((CraftWorld) world).getHandle();
+        ServerLevel handle = ((CraftWorld) world).getHandle();
 
-        if (console.getLevel(handle.dimension()) == null) {
+        if (this.console.getLevel(handle.dimension()) == null) {
             return false;
         }
 
-        if (handle.dimension() == net.minecraft.world.level.World.OVERWORLD) {
+        if (handle.dimension() == net.minecraft.world.level.Level.OVERWORLD) {
             return false;
         }
 
@@ -1271,7 +1269,7 @@ public final class CraftServer implements Server {
         }
 
         WorldUnloadEvent e = new WorldUnloadEvent(handle.getWorld());
-        pluginManager.callEvent(e);
+        this.pluginManager.callEvent(e);
 
         if (e.isCancelled()) {
             return false;
@@ -1286,28 +1284,28 @@ public final class CraftServer implements Server {
             handle.entityManager.close(save); // SPIGOT-6722: close entityManager
             handle.convertable.close();
         } catch (Exception ex) {
-            getLogger().log(Level.SEVERE, null, ex);
+            this.getLogger().log(Level.SEVERE, null, ex);
         }
 
-        worlds.remove(world.getName().toLowerCase(Locale.ROOT));
-        console.removeLevel(handle);
+        this.worlds.remove(world.getName().toLowerCase(Locale.ROOT));
+        this.console.removeLevel(handle);
         return true;
     }
 
     public DedicatedServer getServer() {
-        return console;
+        return this.console;
     }
 
     @Override
     public World getWorld(String name) {
         Preconditions.checkArgument(name != null, "name cannot be null");
 
-        return worlds.get(name.toLowerCase(Locale.ROOT));
+        return this.worlds.get(name.toLowerCase(Locale.ROOT));
     }
 
     @Override
     public World getWorld(UUID uid) {
-        for (World world : worlds.values()) {
+        for (World world : this.worlds.values()) {
             if (world.getUID().equals(uid)) {
                 return world;
             }
@@ -1317,11 +1315,11 @@ public final class CraftServer implements Server {
 
     public void addWorld(World world) {
         // Check if a World already exists with the UID.
-        if (getWorld(world.getUID()) != null) {
+        if (this.getWorld(world.getUID()) != null) {
             System.out.println("World " + world.getName() + " is a duplicate of another world and has been prevented from loading. Please delete the uid.dat file from " + world.getName() + "'s world directory if you want to be able to load the duplicate world.");
             return;
         }
-        worlds.put(world.getName().toLowerCase(Locale.ROOT), world);
+        this.worlds.put(world.getName().toLowerCase(Locale.ROOT), world);
     }
 
     @Override
@@ -1331,16 +1329,16 @@ public final class CraftServer implements Server {
 
     @Override
     public Logger getLogger() {
-        return logger;
+        return this.logger;
     }
 
     public ConsoleReader getReader() {
-        return console.reader;
+        return this.console.reader;
     }
 
     @Override
     public PluginCommand getPluginCommand(String name) {
-        Command command = commandMap.getCommand(name);
+        Command command = this.commandMap.getCommand(name);
 
         if (command instanceof PluginCommand) {
             return (PluginCommand) command;
@@ -1351,8 +1349,8 @@ public final class CraftServer implements Server {
 
     @Override
     public void savePlayers() {
-        checkSaveState();
-        playerList.saveAll();
+        this.checkSaveState();
+        this.playerList.saveAll();
     }
 
     @Override
@@ -1396,7 +1394,7 @@ public final class CraftServer implements Server {
         Preconditions.checkArgument(result != null, "ItemStack cannot be null");
 
         List<Recipe> results = new ArrayList<Recipe>();
-        Iterator<Recipe> iter = recipeIterator();
+        Iterator<Recipe> iter = this.recipeIterator();
         while (iter.hasNext()) {
             Recipe recipe = iter.next();
             ItemStack stack = recipe.getResult();
@@ -1414,39 +1412,39 @@ public final class CraftServer implements Server {
     public Recipe getRecipe(NamespacedKey recipeKey) {
         Preconditions.checkArgument(recipeKey != null, "NamespacedKey recipeKey cannot be null");
 
-        return getServer().getRecipeManager().byKey(CraftRecipe.toMinecraft(recipeKey)).map(RecipeHolder::toBukkitRecipe).orElse(null);
+        return this.getServer().getRecipeManager().byKey(CraftRecipe.toMinecraft(recipeKey)).map(RecipeHolder::toBukkitRecipe).orElse(null);
     }
 
-    private InventoryCrafting createInventoryCrafting() {
+    private CraftingContainer createInventoryCrafting() {
         // Create a players Crafting Inventory
-        Container container = new Container(null, -1) {
+        AbstractContainerMenu container = new AbstractContainerMenu(null, -1) {
             @Override
             public InventoryView getBukkitView() {
                 return null;
             }
 
             @Override
-            public boolean stillValid(EntityHuman entityhuman) {
+            public boolean stillValid(net.minecraft.world.entity.player.Player player) {
                 return false;
             }
 
             @Override
-            public net.minecraft.world.item.ItemStack quickMoveStack(EntityHuman entityhuman, int i) {
+            public net.minecraft.world.item.ItemStack quickMoveStack(net.minecraft.world.entity.player.Player player, int slot) {
                 return net.minecraft.world.item.ItemStack.EMPTY;
             }
         };
-        InventoryCrafting inventoryCrafting = new TransientCraftingContainer(container, 3, 3);
+        CraftingContainer inventoryCrafting = new TransientCraftingContainer(container, 3, 3);
         return inventoryCrafting;
     }
 
     @Override
     public Recipe getCraftingRecipe(ItemStack[] craftingMatrix, World world) {
-        return getNMSRecipe(craftingMatrix, createInventoryCrafting(), (CraftWorld) world).map(RecipeHolder::toBukkitRecipe).orElse(null);
+        return this.getNMSRecipe(craftingMatrix, this.createInventoryCrafting(), (CraftWorld) world).map(RecipeHolder::toBukkitRecipe).orElse(null);
     }
 
     @Override
     public ItemStack craftItem(ItemStack[] craftingMatrix, World world, Player player) {
-        return craftItemResult(craftingMatrix, world, player).getResult();
+        return this.craftItemResult(craftingMatrix, world, player).getResult();
     }
 
     @Override
@@ -1458,31 +1456,31 @@ public final class CraftServer implements Server {
         CraftPlayer craftPlayer = (CraftPlayer) player;
 
         // Create a players Crafting Inventory and get the recipe
-        ContainerWorkbench container = new ContainerWorkbench(-1, craftPlayer.getHandle().getInventory());
-        InventoryCrafting inventoryCrafting = container.craftSlots;
-        InventoryCraftResult craftResult = container.resultSlots;
+        CraftingMenu container = new CraftingMenu(-1, craftPlayer.getHandle().getInventory());
+        CraftingContainer inventoryCrafting = container.craftSlots;
+        ResultContainer craftResult = container.resultSlots;
 
-        Optional<RecipeHolder<RecipeCrafting>> recipe = getNMSRecipe(craftingMatrix, inventoryCrafting, craftWorld);
+        Optional<RecipeHolder<CraftingRecipe>> recipe = this.getNMSRecipe(craftingMatrix, inventoryCrafting, craftWorld);
 
         // Generate the resulting ItemStack from the Crafting Matrix
         net.minecraft.world.item.ItemStack itemstack = net.minecraft.world.item.ItemStack.EMPTY;
 
         if (recipe.isPresent()) {
-            RecipeHolder<RecipeCrafting> recipeCrafting = recipe.get();
+            RecipeHolder<CraftingRecipe> recipeCrafting = recipe.get();
             if (craftResult.setRecipeUsed(craftPlayer.getHandle(), recipeCrafting)) {
                 itemstack = recipeCrafting.value().assemble(inventoryCrafting.asCraftInput(), craftWorld.getHandle().registryAccess());
             }
         }
 
         // Call Bukkit event to check for matrix/result changes.
-        net.minecraft.world.item.ItemStack result = CraftEventFactory.callPreCraftEvent(inventoryCrafting, craftResult, itemstack, container.getBukkitView(), recipe.map(RecipeHolder::value).orElse(null) instanceof RecipeRepair);
+        net.minecraft.world.item.ItemStack result = CraftEventFactory.callPreCraftEvent(inventoryCrafting, craftResult, itemstack, container.getBukkitView(), recipe.map(RecipeHolder::value).orElse(null) instanceof RepairItemRecipe);
 
-        return createItemCraftResult(recipe, CraftItemStack.asBukkitCopy(result), inventoryCrafting, craftWorld.getHandle());
+        return this.createItemCraftResult(recipe, CraftItemStack.asBukkitCopy(result), inventoryCrafting, craftWorld.getHandle());
     }
 
     @Override
     public ItemStack craftItem(ItemStack[] craftingMatrix, World world) {
-        return craftItemResult(craftingMatrix, world).getResult();
+        return this.craftItemResult(craftingMatrix, world).getResult();
     }
 
     @Override
@@ -1492,9 +1490,9 @@ public final class CraftServer implements Server {
         CraftWorld craftWorld = (CraftWorld) world;
 
         // Create a players Crafting Inventory and get the recipe
-        InventoryCrafting inventoryCrafting = createInventoryCrafting();
+        CraftingContainer inventoryCrafting = this.createInventoryCrafting();
 
-        Optional<RecipeHolder<RecipeCrafting>> recipe = getNMSRecipe(craftingMatrix, inventoryCrafting, craftWorld);
+        Optional<RecipeHolder<CraftingRecipe>> recipe = this.getNMSRecipe(craftingMatrix, inventoryCrafting, craftWorld);
 
         // Generate the resulting ItemStack from the Crafting Matrix
         net.minecraft.world.item.ItemStack itemStack = net.minecraft.world.item.ItemStack.EMPTY;
@@ -1503,10 +1501,10 @@ public final class CraftServer implements Server {
             itemStack = recipe.get().value().assemble(inventoryCrafting.asCraftInput(), craftWorld.getHandle().registryAccess());
         }
 
-        return createItemCraftResult(recipe, CraftItemStack.asBukkitCopy(itemStack), inventoryCrafting, craftWorld.getHandle());
+        return this.createItemCraftResult(recipe, CraftItemStack.asBukkitCopy(itemStack), inventoryCrafting, craftWorld.getHandle());
     }
 
-    private CraftItemCraftResult createItemCraftResult(Optional<RecipeHolder<RecipeCrafting>> recipe, ItemStack itemStack, InventoryCrafting inventoryCrafting, WorldServer worldServer) {
+    private CraftItemCraftResult createItemCraftResult(Optional<RecipeHolder<CraftingRecipe>> recipe, ItemStack itemStack, CraftingContainer inventoryCrafting, ServerLevel worldServer) {
         CraftItemCraftResult craftItemResult = new CraftItemCraftResult(itemStack);
         recipe.map((holder) -> holder.value().getRemainingItems(inventoryCrafting.asCraftInput())).ifPresent((remainingItems) -> {
             // Set the resulting matrix items and overflow items
@@ -1539,7 +1537,7 @@ public final class CraftServer implements Server {
         return craftItemResult;
     }
 
-    private Optional<RecipeHolder<RecipeCrafting>> getNMSRecipe(ItemStack[] craftingMatrix, InventoryCrafting inventoryCrafting, CraftWorld world) {
+    private Optional<RecipeHolder<CraftingRecipe>> getNMSRecipe(ItemStack[] craftingMatrix, CraftingContainer inventoryCrafting, CraftWorld world) {
         Preconditions.checkArgument(craftingMatrix != null, "craftingMatrix must not be null");
         Preconditions.checkArgument(craftingMatrix.length == 9, "craftingMatrix must be an array of length 9");
         Preconditions.checkArgument(world != null, "world must not be null");
@@ -1548,7 +1546,7 @@ public final class CraftServer implements Server {
             inventoryCrafting.setItem(i, CraftItemStack.asNMSCopy(craftingMatrix[i]));
         }
 
-        return getServer().getRecipeManager().getRecipeFor(Recipes.CRAFTING, inventoryCrafting.asCraftInput(), world.getHandle());
+        return this.getServer().getRecipeManager().getRecipeFor(RecipeType.CRAFTING, inventoryCrafting.asCraftInput(), world.getHandle());
     }
 
     @Override
@@ -1558,24 +1556,24 @@ public final class CraftServer implements Server {
 
     @Override
     public void clearRecipes() {
-        console.getRecipeManager().clearRecipes();
+        this.console.getRecipeManager().clearRecipes();
     }
 
     @Override
     public void resetRecipes() {
-        reloadData(); // Not ideal but hard to reload a subset of a resource pack
+        this.reloadData(); // Not ideal but hard to reload a subset of a resource pack
     }
 
     @Override
     public boolean removeRecipe(NamespacedKey recipeKey) {
         Preconditions.checkArgument(recipeKey != null, "recipeKey == null");
 
-        return getServer().getRecipeManager().removeRecipe(CraftRecipe.toMinecraft(recipeKey));
+        return this.getServer().getRecipeManager().removeRecipe(CraftRecipe.toMinecraft(recipeKey));
     }
 
     @Override
     public Map<String, String[]> getCommandAliases() {
-        ConfigurationSection section = commandsConfiguration.getConfigurationSection("aliases");
+        ConfigurationSection section = this.commandsConfiguration.getConfigurationSection("aliases");
         Map<String, String[]> result = new LinkedHashMap<String, String[]>();
 
         if (section != null) {
@@ -1596,17 +1594,17 @@ public final class CraftServer implements Server {
     }
 
     public void removeBukkitSpawnRadius() {
-        configuration.set("settings.spawn-radius", null);
-        saveConfig();
+        this.configuration.set("settings.spawn-radius", null);
+        this.saveConfig();
     }
 
     public int getBukkitSpawnRadius() {
-        return configuration.getInt("settings.spawn-radius", -1);
+        return this.configuration.getInt("settings.spawn-radius", -1);
     }
 
     @Override
     public String getShutdownMessage() {
-        return configuration.getString("settings.shutdown-message");
+        return this.configuration.getString("settings.shutdown-message");
     }
 
     @Override
@@ -1616,8 +1614,8 @@ public final class CraftServer implements Server {
 
     @Override
     public void setSpawnRadius(int value) {
-        configuration.set("settings.spawn-radius", value);
-        saveConfig();
+        this.configuration.set("settings.spawn-radius", value);
+        this.saveConfig();
     }
 
     @Override
@@ -1637,26 +1635,26 @@ public final class CraftServer implements Server {
 
     @Override
     public boolean getHideOnlinePlayers() {
-        return console.hidesOnlinePlayers();
+        return this.console.hidesOnlinePlayers();
     }
 
     @Override
     public boolean getOnlineMode() {
-        return console.usesAuthentication();
+        return this.console.usesAuthentication();
     }
 
     @Override
     public boolean getAllowFlight() {
-        return console.isFlightAllowed();
+        return this.console.isFlightAllowed();
     }
 
     @Override
     public boolean isHardcore() {
-        return console.isHardcore();
+        return this.console.isHardcore();
     }
 
     public ChunkGenerator getGenerator(String world) {
-        ConfigurationSection section = configuration.getConfigurationSection("worlds");
+        ConfigurationSection section = this.configuration.getConfigurationSection("worlds");
         ChunkGenerator result = null;
 
         if (section != null) {
@@ -1668,17 +1666,17 @@ public final class CraftServer implements Server {
                 if ((name != null) && (!name.equals(""))) {
                     String[] split = name.split(":", 2);
                     String id = (split.length > 1) ? split[1] : null;
-                    Plugin plugin = pluginManager.getPlugin(split[0]);
+                    Plugin plugin = this.pluginManager.getPlugin(split[0]);
 
                     if (plugin == null) {
-                        getLogger().severe("Could not set generator for default world '" + world + "': Plugin '" + split[0] + "' does not exist");
+                        this.getLogger().severe("Could not set generator for default world '" + world + "': Plugin '" + split[0] + "' does not exist");
                     } else if (!plugin.isEnabled()) {
-                        getLogger().severe("Could not set generator for default world '" + world + "': Plugin '" + plugin.getDescription().getFullName() + "' is not enabled yet (is it load:STARTUP?)");
+                        this.getLogger().severe("Could not set generator for default world '" + world + "': Plugin '" + plugin.getDescription().getFullName() + "' is not enabled yet (is it load:STARTUP?)");
                     } else {
                         try {
                             result = plugin.getDefaultWorldGenerator(world, id);
                             if (result == null) {
-                                getLogger().severe("Could not set generator for default world '" + world + "': Plugin '" + plugin.getDescription().getFullName() + "' lacks a default world generator");
+                                this.getLogger().severe("Could not set generator for default world '" + world + "': Plugin '" + plugin.getDescription().getFullName() + "' lacks a default world generator");
                             }
                         } catch (Throwable t) {
                             plugin.getLogger().log(Level.SEVERE, "Could not set generator for default world '" + world + "': Plugin '" + plugin.getDescription().getFullName(), t);
@@ -1692,7 +1690,7 @@ public final class CraftServer implements Server {
     }
 
     public BiomeProvider getBiomeProvider(String world) {
-        ConfigurationSection section = configuration.getConfigurationSection("worlds");
+        ConfigurationSection section = this.configuration.getConfigurationSection("worlds");
         BiomeProvider result = null;
 
         if (section != null) {
@@ -1704,17 +1702,17 @@ public final class CraftServer implements Server {
                 if ((name != null) && (!name.equals(""))) {
                     String[] split = name.split(":", 2);
                     String id = (split.length > 1) ? split[1] : null;
-                    Plugin plugin = pluginManager.getPlugin(split[0]);
+                    Plugin plugin = this.pluginManager.getPlugin(split[0]);
 
                     if (plugin == null) {
-                        getLogger().severe("Could not set biome provider for default world '" + world + "': Plugin '" + split[0] + "' does not exist");
+                        this.getLogger().severe("Could not set biome provider for default world '" + world + "': Plugin '" + split[0] + "' does not exist");
                     } else if (!plugin.isEnabled()) {
-                        getLogger().severe("Could not set biome provider for default world '" + world + "': Plugin '" + plugin.getDescription().getFullName() + "' is not enabled yet (is it load:STARTUP?)");
+                        this.getLogger().severe("Could not set biome provider for default world '" + world + "': Plugin '" + plugin.getDescription().getFullName() + "' is not enabled yet (is it load:STARTUP?)");
                     } else {
                         try {
                             result = plugin.getDefaultBiomeProvider(world, id);
                             if (result == null) {
-                                getLogger().severe("Could not set biome provider for default world '" + world + "': Plugin '" + plugin.getDescription().getFullName() + "' lacks a default world biome provider");
+                                this.getLogger().severe("Could not set biome provider for default world '" + world + "': Plugin '" + plugin.getDescription().getFullName() + "' lacks a default world biome provider");
                             }
                         } catch (Throwable t) {
                             plugin.getLogger().log(Level.SEVERE, "Could not set biome provider for default world '" + world + "': Plugin '" + plugin.getDescription().getFullName(), t);
@@ -1730,7 +1728,7 @@ public final class CraftServer implements Server {
     @Override
     @Deprecated
     public CraftMapView getMap(int id) {
-        WorldMap worldmap = console.getLevel(net.minecraft.world.level.World.OVERWORLD).getMapData(new MapId(id));
+        MapItemSavedData worldmap = this.console.getLevel(net.minecraft.world.level.Level.OVERWORLD).getMapData(new MapId(id));
         if (worldmap == null) {
             return null;
         }
@@ -1741,10 +1739,10 @@ public final class CraftServer implements Server {
     public CraftMapView createMap(World world) {
         Preconditions.checkArgument(world != null, "World cannot be null");
 
-        net.minecraft.world.level.World minecraftWorld = ((CraftWorld) world).getHandle();
+        net.minecraft.world.level.Level minecraftWorld = ((CraftWorld) world).getHandle();
         // creates a new map at world spawn with the scale of 3, with out tracking position and unlimited tracking
-        BlockPosition spawn = minecraftWorld.getLevelData().getSpawnPos();
-        MapId newId = ItemWorldMap.createNewSavedData(minecraftWorld, spawn.getX(), spawn.getZ(), 3, false, false, minecraftWorld.dimension());
+        BlockPos spawn = minecraftWorld.getLevelData().getSpawnPos();
+        MapId newId = MapItem.createNewSavedData(minecraftWorld, spawn.getX(), spawn.getZ(), 3, false, false, minecraftWorld.dimension());
         return minecraftWorld.getMapData(newId).mapView;
     }
 
@@ -1759,35 +1757,35 @@ public final class CraftServer implements Server {
         Preconditions.checkArgument(structureType != null, "StructureType cannot be null");
         Preconditions.checkArgument(structureType.getMapIcon() != null, "Cannot create explorer maps for StructureType %s", structureType.getName());
 
-        WorldServer worldServer = ((CraftWorld) world).getHandle();
+        ServerLevel worldServer = ((CraftWorld) world).getHandle();
         Location structureLocation = world.locateNearestStructure(location, structureType, radius, findUnexplored);
-        BlockPosition structurePosition = CraftLocation.toBlockPosition(structureLocation);
+        BlockPos structurePosition = CraftLocation.toBlockPosition(structureLocation);
 
         // Create map with trackPlayer = true, unlimitedTracking = true
-        net.minecraft.world.item.ItemStack stack = ItemWorldMap.create(worldServer, structurePosition.getX(), structurePosition.getZ(), MapView.Scale.NORMAL.getValue(), true, true);
-        ItemWorldMap.renderBiomePreviewMap(worldServer, stack);
+        net.minecraft.world.item.ItemStack stack = MapItem.create(worldServer, structurePosition.getX(), structurePosition.getZ(), MapView.Scale.NORMAL.getValue(), true, true);
+        MapItem.renderBiomePreviewMap(worldServer, stack);
         // "+" map ID taken from EntityVillager
-        ItemWorldMap.getSavedData(stack, worldServer).addTargetDecoration(stack, structurePosition, "+", CraftMapCursor.CraftType.bukkitToMinecraftHolder(structureType.getMapIcon()));
+        MapItem.getSavedData(stack, worldServer).addTargetDecoration(stack, structurePosition, "+", CraftMapCursor.CraftType.bukkitToMinecraftHolder(structureType.getMapIcon()));
 
         return CraftItemStack.asBukkitCopy(stack);
     }
 
     @Override
     public void shutdown() {
-        console.halt(false);
+        this.console.halt(false);
     }
 
     @Override
     public int broadcast(String message, String permission) {
         Set<CommandSender> recipients = new HashSet<>();
-        for (Permissible permissible : getPluginManager().getPermissionSubscriptions(permission)) {
+        for (Permissible permissible : this.getPluginManager().getPermissionSubscriptions(permission)) {
             if (permissible instanceof CommandSender && permissible.hasPermission(permission)) {
                 recipients.add((CommandSender) permissible);
             }
         }
 
         BroadcastMessageEvent broadcastMessageEvent = new BroadcastMessageEvent(!Bukkit.isPrimaryThread(), message, recipients);
-        getPluginManager().callEvent(broadcastMessageEvent);
+        this.getPluginManager().callEvent(broadcastMessageEvent);
 
         if (broadcastMessageEvent.isCancelled()) {
             return 0;
@@ -1808,24 +1806,24 @@ public final class CraftServer implements Server {
         Preconditions.checkArgument(name != null, "name cannot be null");
         Preconditions.checkArgument(!name.isBlank(), "name cannot be empty");
 
-        OfflinePlayer result = getPlayerExact(name);
+        OfflinePlayer result = this.getPlayerExact(name);
         if (result == null) {
             GameProfile profile = null;
             // Only fetch an online UUID in online mode
-            if (getOnlineMode()) {
+            if (this.getOnlineMode()) {
                 // This is potentially blocking :(
-                profile = console.getProfileCache().get(name).orElse(null);
+                profile = this.console.getProfileCache().get(name).orElse(null);
             }
 
             if (profile == null) {
                 // Make an OfflinePlayer using an offline mode UUID since the name has no profile
-                result = getOfflinePlayer(new GameProfile(UUID.nameUUIDFromBytes(("OfflinePlayer:" + name).getBytes(Charsets.UTF_8)), name));
+                result = this.getOfflinePlayer(new GameProfile(UUID.nameUUIDFromBytes(("OfflinePlayer:" + name).getBytes(Charsets.UTF_8)), name));
             } else {
                 // Use the GameProfile even when we get a UUID so we ensure we still have a name
-                result = getOfflinePlayer(profile);
+                result = this.getOfflinePlayer(profile);
             }
         } else {
-            offlinePlayers.remove(result.getUniqueId());
+            this.offlinePlayers.remove(result.getUniqueId());
         }
 
         return result;
@@ -1835,15 +1833,15 @@ public final class CraftServer implements Server {
     public OfflinePlayer getOfflinePlayer(UUID id) {
         Preconditions.checkArgument(id != null, "UUID id cannot be null");
 
-        OfflinePlayer result = getPlayer(id);
+        OfflinePlayer result = this.getPlayer(id);
         if (result == null) {
-            result = offlinePlayers.get(id);
+            result = this.offlinePlayers.get(id);
             if (result == null) {
                 result = new CraftOfflinePlayer(this, new GameProfile(id, ""));
-                offlinePlayers.put(id, result);
+                this.offlinePlayers.put(id, result);
             }
         } else {
-            offlinePlayers.remove(id);
+            this.offlinePlayers.remove(id);
         }
 
         return result;
@@ -1866,14 +1864,14 @@ public final class CraftServer implements Server {
 
     public OfflinePlayer getOfflinePlayer(GameProfile profile) {
         OfflinePlayer player = new CraftOfflinePlayer(this, profile);
-        offlinePlayers.put(profile.getId(), player);
+        this.offlinePlayers.put(profile.getId(), player);
         return player;
     }
 
     @Override
     @SuppressWarnings("unchecked")
     public Set<String> getIPBans() {
-        return playerList.getIpBans().getEntries().stream().map(IpBanEntry::getUser).collect(Collectors.toSet());
+        return this.playerList.getIpBans().getEntries().stream().map(IpBanListEntry::getUser).collect(Collectors.toSet());
     }
 
     @Override
@@ -1908,8 +1906,8 @@ public final class CraftServer implements Server {
     public Set<OfflinePlayer> getBannedPlayers() {
         Set<OfflinePlayer> result = new HashSet<OfflinePlayer>();
 
-        for (GameProfileBanEntry entry : playerList.getBans().getEntries()) {
-            result.add(getOfflinePlayer(entry.getUser()));
+        for (UserBanListEntry entry : this.playerList.getBans().getEntries()) {
+            result.add(this.getOfflinePlayer(entry.getUser()));
         }
 
         return result;
@@ -1927,26 +1925,26 @@ public final class CraftServer implements Server {
 
     @Override
     public void setWhitelist(boolean value) {
-        playerList.setUsingWhiteList(value);
-        console.storeUsingWhiteList(value);
+        this.playerList.setUsingWhiteList(value);
+        this.console.storeUsingWhiteList(value);
     }
 
     @Override
     public boolean isWhitelistEnforced() {
-        return console.isEnforceWhitelist();
+        return this.console.isEnforceWhitelist();
     }
 
     @Override
     public void setWhitelistEnforced(boolean value) {
-        console.setEnforceWhitelist(value);
+        this.console.setEnforceWhitelist(value);
     }
 
     @Override
     public Set<OfflinePlayer> getWhitelistedPlayers() {
         Set<OfflinePlayer> result = new LinkedHashSet<OfflinePlayer>();
 
-        for (WhiteListEntry entry : playerList.getWhiteList().getEntries()) {
-            result.add(getOfflinePlayer(entry.getUser()));
+        for (UserWhiteListEntry entry : this.playerList.getWhiteList().getEntries()) {
+            result.add(this.getOfflinePlayer(entry.getUser()));
         }
 
         return result;
@@ -1956,8 +1954,8 @@ public final class CraftServer implements Server {
     public Set<OfflinePlayer> getOperators() {
         Set<OfflinePlayer> result = new HashSet<OfflinePlayer>();
 
-        for (OpListEntry entry : playerList.getOps().getEntries()) {
-            result.add(getOfflinePlayer(entry.getUser()));
+        for (ServerOpListEntry entry : this.playerList.getOps().getEntries()) {
+            result.add(this.getOfflinePlayer(entry.getUser()));
         }
 
         return result;
@@ -1965,74 +1963,74 @@ public final class CraftServer implements Server {
 
     @Override
     public void reloadWhitelist() {
-        playerList.reloadWhiteList();
+        this.playerList.reloadWhiteList();
     }
 
     @Override
     public GameMode getDefaultGameMode() {
-        return GameMode.getByValue(console.getLevel(net.minecraft.world.level.World.OVERWORLD).serverLevelData.getGameType().getId());
+        return GameMode.getByValue(this.console.getLevel(net.minecraft.world.level.Level.OVERWORLD).serverLevelData.getGameType().getId());
     }
 
     @Override
     public void setDefaultGameMode(GameMode mode) {
         Preconditions.checkArgument(mode != null, "GameMode cannot be null");
 
-        for (World world : getWorlds()) {
-            ((CraftWorld) world).getHandle().serverLevelData.setGameType(EnumGamemode.byId(mode.getValue()));
+        for (World world : this.getWorlds()) {
+            ((CraftWorld) world).getHandle().serverLevelData.setGameType(GameType.byId(mode.getValue()));
         }
     }
 
     @Override
     public ConsoleCommandSender getConsoleSender() {
-        return console.console;
+        return this.console.console;
     }
 
     public EntityMetadataStore getEntityMetadata() {
-        return entityMetadata;
+        return this.entityMetadata;
     }
 
     public PlayerMetadataStore getPlayerMetadata() {
-        return playerMetadata;
+        return this.playerMetadata;
     }
 
     public WorldMetadataStore getWorldMetadata() {
-        return worldMetadata;
+        return this.worldMetadata;
     }
 
     @Override
     public File getWorldContainer() {
-        return this.getServer().storageSource.getDimensionPath(net.minecraft.world.level.World.OVERWORLD).getParent().toFile();
+        return this.getServer().storageSource.getDimensionPath(net.minecraft.world.level.Level.OVERWORLD).getParent().toFile();
     }
 
     @Override
     public OfflinePlayer[] getOfflinePlayers() {
-        WorldNBTStorage storage = console.playerDataStorage;
+        PlayerDataStorage storage = this.console.playerDataStorage;
         String[] files = storage.getPlayerDir().list(new DatFileFilter());
         Set<OfflinePlayer> players = new HashSet<OfflinePlayer>();
 
         for (String file : files) {
             try {
-                players.add(getOfflinePlayer(UUID.fromString(file.substring(0, file.length() - 4))));
+                players.add(this.getOfflinePlayer(UUID.fromString(file.substring(0, file.length() - 4))));
             } catch (IllegalArgumentException ex) {
                 // Who knows what is in this directory, just ignore invalid files
             }
         }
 
-        players.addAll(getOnlinePlayers());
+        players.addAll(this.getOnlinePlayers());
 
         return players.toArray(new OfflinePlayer[players.size()]);
     }
 
     @Override
     public Messenger getMessenger() {
-        return messenger;
+        return this.messenger;
     }
 
     @Override
     public void sendPluginMessage(Plugin source, String channel, byte[] message) {
-        StandardMessenger.validatePluginMessage(getMessenger(), source, channel, message);
+        StandardMessenger.validatePluginMessage(this.getMessenger(), source, channel, message);
 
-        for (Player player : getOnlinePlayers()) {
+        for (Player player : this.getOnlinePlayers()) {
             player.sendPluginMessage(source, channel, message);
         }
     }
@@ -2041,7 +2039,7 @@ public final class CraftServer implements Server {
     public Set<String> getListeningPluginChannels() {
         Set<String> result = new HashSet<String>();
 
-        for (Player player : getOnlinePlayers()) {
+        for (Player player : this.getOnlinePlayers()) {
             result.addAll(player.getListeningPluginChannels());
         }
 
@@ -2087,67 +2085,67 @@ public final class CraftServer implements Server {
 
     @Override
     public HelpMap getHelpMap() {
-        return helpMap;
+        return this.helpMap;
     }
 
     public SimpleCommandMap getCommandMap() {
-        return commandMap;
+        return this.commandMap;
     }
 
     @Override
     @Deprecated
     public int getMonsterSpawnLimit() {
-        return getSpawnLimit(SpawnCategory.MONSTER);
+        return this.getSpawnLimit(SpawnCategory.MONSTER);
     }
 
     @Override
     @Deprecated
     public int getAnimalSpawnLimit() {
-        return getSpawnLimit(SpawnCategory.ANIMAL);
+        return this.getSpawnLimit(SpawnCategory.ANIMAL);
     }
 
     @Override
     @Deprecated
     public int getWaterAnimalSpawnLimit() {
-        return getSpawnLimit(SpawnCategory.WATER_ANIMAL);
+        return this.getSpawnLimit(SpawnCategory.WATER_ANIMAL);
     }
 
     @Override
     @Deprecated
     public int getWaterAmbientSpawnLimit() {
-        return getSpawnLimit(SpawnCategory.WATER_AMBIENT);
+        return this.getSpawnLimit(SpawnCategory.WATER_AMBIENT);
     }
 
     @Override
     @Deprecated
     public int getWaterUndergroundCreatureSpawnLimit() {
-        return getSpawnLimit(SpawnCategory.WATER_UNDERGROUND_CREATURE);
+        return this.getSpawnLimit(SpawnCategory.WATER_UNDERGROUND_CREATURE);
     }
 
     @Override
     @Deprecated
     public int getAmbientSpawnLimit() {
-        return getSpawnLimit(SpawnCategory.AMBIENT);
+        return this.getSpawnLimit(SpawnCategory.AMBIENT);
     }
 
     @Override
     public int getSpawnLimit(SpawnCategory spawnCategory) {
-        return spawnCategoryLimit.getOrDefault(spawnCategory, -1);
+        return this.spawnCategoryLimit.getOrDefault(spawnCategory, -1);
     }
 
     @Override
     public boolean isPrimaryThread() {
-        return Thread.currentThread().equals(console.serverThread) || console.hasStopped(); // All bets are off if we have shut down (e.g. due to watchdog)
+        return Thread.currentThread().equals(this.console.serverThread) || this.console.hasStopped(); // All bets are off if we have shut down (e.g. due to watchdog)
     }
 
     @Override
     public String getMotd() {
-        return console.getMotd();
+        return this.console.getMotd();
     }
 
     @Override
     public void setMotd(String motd) {
-        console.setMotd(motd);
+        this.console.setMotd(motd);
     }
 
     @Override
@@ -2157,10 +2155,10 @@ public final class CraftServer implements Server {
 
     @Override
     public WarningState getWarningState() {
-        return warningState;
+        return this.warningState;
     }
 
-    public List<String> tabComplete(CommandSender sender, String message, WorldServer world, Vec3D pos, boolean forceCommand) {
+    public List<String> tabComplete(CommandSender sender, String message, ServerLevel world, Vec3 pos, boolean forceCommand) {
         if (!(sender instanceof Player)) {
             return ImmutableList.of();
         }
@@ -2168,18 +2166,18 @@ public final class CraftServer implements Server {
         List<String> offers;
         Player player = (Player) sender;
         if (message.startsWith("/") || forceCommand) {
-            offers = tabCompleteCommand(player, message, world, pos);
+            offers = this.tabCompleteCommand(player, message, world, pos);
         } else {
-            offers = tabCompleteChat(player, message);
+            offers = this.tabCompleteChat(player, message);
         }
 
         TabCompleteEvent tabEvent = new TabCompleteEvent(player, message, offers);
-        getPluginManager().callEvent(tabEvent);
+        this.getPluginManager().callEvent(tabEvent);
 
         return tabEvent.isCancelled() ? Collections.EMPTY_LIST : tabEvent.getCompletions();
     }
 
-    public List<String> tabCompleteCommand(Player player, String message, WorldServer world, Vec3D pos) {
+    public List<String> tabCompleteCommand(Player player, String message, ServerLevel world, Vec3 pos) {
         List<String> completions = null;
         try {
             if (message.startsWith("/")) {
@@ -2187,13 +2185,13 @@ public final class CraftServer implements Server {
                 message = message.substring(1);
             }
             if (pos == null) {
-                completions = getCommandMap().tabComplete(player, message);
+                completions = this.getCommandMap().tabComplete(player, message);
             } else {
-                completions = getCommandMap().tabComplete(player, message, CraftLocation.toBukkit(pos, world.getWorld()));
+                completions = this.getCommandMap().tabComplete(player, message, CraftLocation.toBukkit(pos, world.getWorld()));
             }
         } catch (CommandException ex) {
             player.sendMessage(ChatColor.RED + "An internal error occurred while attempting to tab-complete this command");
-            getLogger().log(Level.SEVERE, "Exception when " + player.getName() + " attempted to tab complete " + message, ex);
+            this.getLogger().log(Level.SEVERE, "Exception when " + player.getName() + " attempted to tab complete " + message, ex);
         }
 
         return completions == null ? ImmutableList.<String>of() : completions;
@@ -2203,12 +2201,12 @@ public final class CraftServer implements Server {
         List<String> completions = new ArrayList<String>();
         PlayerChatTabCompleteEvent event = new PlayerChatTabCompleteEvent(player, message, completions);
         String token = event.getLastToken();
-        for (Player p : getOnlinePlayers()) {
+        for (Player p : this.getOnlinePlayers()) {
             if (player.canSee(p) && StringUtil.startsWithIgnoreCase(p.getName(), token)) {
                 completions.add(p.getName());
             }
         }
-        pluginManager.callEvent(event);
+        this.pluginManager.callEvent(event);
 
         Iterator<?> it = completions.iterator();
         while (it.hasNext()) {
@@ -2234,7 +2232,7 @@ public final class CraftServer implements Server {
 
     @Override
     public CraftScoreboardManager getScoreboardManager() {
-        return scoreboardManager;
+        return this.scoreboardManager;
     }
 
     @Override
@@ -2247,29 +2245,29 @@ public final class CraftServer implements Server {
             return;
         }
         this.printSaveWarning = true;
-        getLogger().log(Level.WARNING, "A manual (plugin-induced) save has been detected while server is configured to auto-save. This may affect performance.", warningState == WarningState.ON ? new Throwable() : null);
+        this.getLogger().log(Level.WARNING, "A manual (plugin-induced) save has been detected while server is configured to auto-save. This may affect performance.", this.warningState == WarningState.ON ? new Throwable() : null);
     }
 
     @Override
     public CraftIconCache getServerIcon() {
-        return icon;
+        return this.icon;
     }
 
     @Override
     public CraftIconCache loadServerIcon(File file) throws Exception {
         Preconditions.checkArgument(file != null, "File cannot be null");
         Preconditions.checkArgument(file.isFile(), "File (%s) is not a valid file", file);
-        return loadServerIcon0(file);
+        return CraftServer.loadServerIcon0(file);
     }
 
     static CraftIconCache loadServerIcon0(File file) throws Exception {
-        return loadServerIcon0(ImageIO.read(file));
+        return CraftServer.loadServerIcon0(ImageIO.read(file));
     }
 
     @Override
     public CraftIconCache loadServerIcon(BufferedImage image) throws Exception {
         Preconditions.checkArgument(image != null, "BufferedImage image cannot be null");
-        return loadServerIcon0(image);
+        return CraftServer.loadServerIcon0(image);
     }
 
     static CraftIconCache loadServerIcon0(BufferedImage image) throws Exception {
@@ -2284,12 +2282,12 @@ public final class CraftServer implements Server {
 
     @Override
     public void setIdleTimeout(int threshold) {
-        console.setPlayerIdleTimeout(threshold);
+        this.console.setPlayerIdleTimeout(threshold);
     }
 
     @Override
     public int getIdleTimeout() {
-        return console.getPlayerIdleTimeout();
+        return this.console.getPlayerIdleTimeout();
     }
 
     @Override
@@ -2305,7 +2303,7 @@ public final class CraftServer implements Server {
     @Override
     public ChunkGenerator.ChunkData createChunkData(World world) {
         Preconditions.checkArgument(world != null, "World cannot be null");
-        WorldServer handle = ((CraftWorld) world).getHandle();
+        ServerLevel handle = ((CraftWorld) world).getHandle();
         return new OldCraftChunkData(world.getMinHeight(), world.getMaxHeight(), handle.registryAccess().lookupOrThrow(Registries.BIOME));
     }
 
@@ -2320,7 +2318,7 @@ public final class CraftServer implements Server {
         Preconditions.checkArgument(barColor != null, "BarColor key cannot be null");
         Preconditions.checkArgument(barStyle != null, "BarStyle key cannot be null");
 
-        BossBattleCustom bossBattleCustom = getServer().getCustomBossEvents().create(CraftNamespacedKey.toMinecraft(key), CraftChatMessage.fromString(title, true)[0]);
+        CustomBossEvent bossBattleCustom = this.getServer().getCustomBossEvents().create(CraftNamespacedKey.toMinecraft(key), CraftChatMessage.fromString(title, true)[0]);
         CraftKeyedBossbar craftKeyedBossbar = new CraftKeyedBossbar(bossBattleCustom);
         craftKeyedBossbar.setColor(barColor);
         craftKeyedBossbar.setStyle(barStyle);
@@ -2336,9 +2334,9 @@ public final class CraftServer implements Server {
 
     @Override
     public Iterator<KeyedBossBar> getBossBars() {
-        return Iterators.unmodifiableIterator(Iterators.transform(getServer().getCustomBossEvents().getEvents().iterator(), new Function<BossBattleCustom, org.bukkit.boss.KeyedBossBar>() {
+        return Iterators.unmodifiableIterator(Iterators.transform(this.getServer().getCustomBossEvents().getEvents().iterator(), new Function<CustomBossEvent, org.bukkit.boss.KeyedBossBar>() {
             @Override
-            public org.bukkit.boss.KeyedBossBar apply(BossBattleCustom bossBattleCustom) {
+            public org.bukkit.boss.KeyedBossBar apply(CustomBossEvent bossBattleCustom) {
                 return bossBattleCustom.getBukkitEntity();
             }
         }));
@@ -2347,7 +2345,7 @@ public final class CraftServer implements Server {
     @Override
     public KeyedBossBar getBossBar(NamespacedKey key) {
         Preconditions.checkArgument(key != null, "key");
-        net.minecraft.server.bossevents.BossBattleCustom bossBattleCustom = getServer().getCustomBossEvents().get(CraftNamespacedKey.toMinecraft(key));
+        net.minecraft.server.bossevents.CustomBossEvent bossBattleCustom = this.getServer().getCustomBossEvents().get(CraftNamespacedKey.toMinecraft(key));
 
         return (bossBattleCustom == null) ? null : bossBattleCustom.getBukkitEntity();
     }
@@ -2355,8 +2353,8 @@ public final class CraftServer implements Server {
     @Override
     public boolean removeBossBar(NamespacedKey key) {
         Preconditions.checkArgument(key != null, "key");
-        net.minecraft.server.bossevents.BossBattleCustomData bossBattleCustomData = getServer().getCustomBossEvents();
-        net.minecraft.server.bossevents.BossBattleCustom bossBattleCustom = bossBattleCustomData.get(CraftNamespacedKey.toMinecraft(key));
+        net.minecraft.server.bossevents.CustomBossEvents bossBattleCustomData = this.getServer().getCustomBossEvents();
+        net.minecraft.server.bossevents.CustomBossEvent bossBattleCustom = bossBattleCustomData.get(CraftNamespacedKey.toMinecraft(key));
 
         if (bossBattleCustom != null) {
             bossBattleCustomData.remove(bossBattleCustom);
@@ -2370,7 +2368,7 @@ public final class CraftServer implements Server {
     public Entity getEntity(UUID uuid) {
         Preconditions.checkArgument(uuid != null, "UUID id cannot be null");
 
-        for (WorldServer world : getServer().getAllLevels()) {
+        for (ServerLevel world : this.getServer().getAllLevels()) {
             net.minecraft.world.entity.Entity entity = world.getEntity(uuid);
             if (entity != null) {
                 return entity.getBukkitEntity();
@@ -2384,13 +2382,13 @@ public final class CraftServer implements Server {
     public org.bukkit.advancement.Advancement getAdvancement(NamespacedKey key) {
         Preconditions.checkArgument(key != null, "NamespacedKey key cannot be null");
 
-        AdvancementHolder advancement = console.getAdvancements().get(CraftNamespacedKey.toMinecraft(key));
+        AdvancementHolder advancement = this.console.getAdvancements().get(CraftNamespacedKey.toMinecraft(key));
         return (advancement == null) ? null : advancement.toBukkit();
     }
 
     @Override
     public Iterator<org.bukkit.advancement.Advancement> advancementIterator() {
-        return Iterators.unmodifiableIterator(Iterators.transform(console.getAdvancements().getAllAdvancements().iterator(), new Function<AdvancementHolder, org.bukkit.advancement.Advancement>() {
+        return Iterators.unmodifiableIterator(Iterators.transform(this.console.getAdvancements().getAllAdvancements().iterator(), new Function<AdvancementHolder, org.bukkit.advancement.Advancement>() {
             @Override
             public org.bukkit.advancement.Advancement apply(AdvancementHolder advancement) {
                 return advancement.toBukkit();
@@ -2402,12 +2400,12 @@ public final class CraftServer implements Server {
     public BlockData createBlockData(org.bukkit.Material material) {
         Preconditions.checkArgument(material != null, "Material cannot be null");
 
-        return createBlockData(material, (String) null);
+        return this.createBlockData(material, (String) null);
     }
 
     @Override
     public BlockData createBlockData(org.bukkit.Material material, Consumer<? super BlockData> consumer) {
-        BlockData data = createBlockData(material);
+        BlockData data = this.createBlockData(material);
 
         if (consumer != null) {
             consumer.accept(data);
@@ -2420,7 +2418,7 @@ public final class CraftServer implements Server {
     public BlockData createBlockData(String data) throws IllegalArgumentException {
         Preconditions.checkArgument(data != null, "data cannot be null");
 
-        return createBlockData((Material) null, data);
+        return this.createBlockData((Material) null, data);
     }
 
     @Override
@@ -2436,7 +2434,7 @@ public final class CraftServer implements Server {
         Preconditions.checkArgument(registry != null, "registry cannot be null");
         Preconditions.checkArgument(tag != null, "NamespacedKey tag cannot be null");
         Preconditions.checkArgument(clazz != null, "Class clazz cannot be null");
-        MinecraftKey key = CraftNamespacedKey.toMinecraft(tag);
+        ResourceLocation key = CraftNamespacedKey.toMinecraft(tag);
 
         switch (registry) {
             case org.bukkit.Tag.REGISTRY_BLOCKS -> {
@@ -2455,14 +2453,14 @@ public final class CraftServer implements Server {
             }
             case org.bukkit.Tag.REGISTRY_FLUIDS -> {
                 Preconditions.checkArgument(clazz == org.bukkit.Fluid.class, "Fluid namespace (%s) must have fluid type", clazz.getName());
-                TagKey<FluidType> fluidTagKey = TagKey.create(Registries.FLUID, key);
+                TagKey<Fluid> fluidTagKey = TagKey.create(Registries.FLUID, key);
                 if (BuiltInRegistries.FLUID.get(fluidTagKey).isPresent()) {
                     return (org.bukkit.Tag<T>) new CraftFluidTag(BuiltInRegistries.FLUID, fluidTagKey);
                 }
             }
             case org.bukkit.Tag.REGISTRY_ENTITY_TYPES -> {
                 Preconditions.checkArgument(clazz == org.bukkit.entity.EntityType.class, "Entity type namespace (%s) must have entity type", clazz.getName());
-                TagKey<EntityTypes<?>> entityTagKey = TagKey.create(Registries.ENTITY_TYPE, key);
+                TagKey<EntityType<?>> entityTagKey = TagKey.create(Registries.ENTITY_TYPE, key);
                 if (BuiltInRegistries.ENTITY_TYPE.get(entityTagKey).isPresent()) {
                     return (org.bukkit.Tag<T>) new CraftEntityTag(BuiltInRegistries.ENTITY_TYPE, entityTagKey);
                 }
@@ -2470,7 +2468,7 @@ public final class CraftServer implements Server {
             case org.bukkit.tag.DamageTypeTags.REGISTRY_DAMAGE_TYPES -> {
                 Preconditions.checkArgument(clazz == org.bukkit.damage.DamageType.class, "Damage type namespace (%s) must have damage type", clazz.getName());
                 TagKey<DamageType> damageTagKey = TagKey.create(Registries.DAMAGE_TYPE, key);
-                IRegistry<DamageType> damageRegistry = CraftRegistry.getMinecraftRegistry(Registries.DAMAGE_TYPE);
+                net.minecraft.core.Registry<DamageType> damageRegistry = CraftRegistry.getMinecraftRegistry(Registries.DAMAGE_TYPE);
                 if (damageRegistry.get(damageTagKey).isPresent()) {
                     return (org.bukkit.Tag<T>) new CraftDamageTag(damageRegistry, damageTagKey);
                 }
@@ -2489,27 +2487,27 @@ public final class CraftServer implements Server {
         switch (registry) {
             case org.bukkit.Tag.REGISTRY_BLOCKS -> {
                 Preconditions.checkArgument(clazz == org.bukkit.Material.class, "Block namespace (%s) must have material type", clazz.getName());
-                IRegistry<Block> blockTags = BuiltInRegistries.BLOCK;
+                net.minecraft.core.Registry<Block> blockTags = BuiltInRegistries.BLOCK;
                 return blockTags.getTags().map(pair -> (org.bukkit.Tag<T>) new CraftBlockTag(blockTags, pair.key())).collect(ImmutableList.toImmutableList());
             }
             case org.bukkit.Tag.REGISTRY_ITEMS -> {
                 Preconditions.checkArgument(clazz == org.bukkit.Material.class, "Item namespace (%s) must have material type", clazz.getName());
-                IRegistry<Item> itemTags = BuiltInRegistries.ITEM;
+                net.minecraft.core.Registry<Item> itemTags = BuiltInRegistries.ITEM;
                 return itemTags.getTags().map(pair -> (org.bukkit.Tag<T>) new CraftItemTag(itemTags, pair.key())).collect(ImmutableList.toImmutableList());
             }
             case org.bukkit.Tag.REGISTRY_FLUIDS -> {
                 Preconditions.checkArgument(clazz == org.bukkit.Fluid.class, "Fluid namespace (%s) must have fluid type", clazz.getName());
-                IRegistry<FluidType> fluidTags = BuiltInRegistries.FLUID;
+                net.minecraft.core.Registry<Fluid> fluidTags = BuiltInRegistries.FLUID;
                 return fluidTags.getTags().map(pair -> (org.bukkit.Tag<T>) new CraftFluidTag(fluidTags, pair.key())).collect(ImmutableList.toImmutableList());
             }
             case org.bukkit.Tag.REGISTRY_ENTITY_TYPES -> {
                 Preconditions.checkArgument(clazz == org.bukkit.entity.EntityType.class, "Entity type namespace (%s) must have entity type", clazz.getName());
-                IRegistry<EntityTypes<?>> entityTags = BuiltInRegistries.ENTITY_TYPE;
+                net.minecraft.core.Registry<EntityType<?>> entityTags = BuiltInRegistries.ENTITY_TYPE;
                 return entityTags.getTags().map(pair -> (org.bukkit.Tag<T>) new CraftEntityTag(entityTags, pair.key())).collect(ImmutableList.toImmutableList());
             }
             case org.bukkit.tag.DamageTypeTags.REGISTRY_DAMAGE_TYPES -> {
                 Preconditions.checkArgument(clazz == org.bukkit.damage.DamageType.class, "Damage type namespace (%s) must have damage type", clazz.getName());
-                IRegistry<DamageType> damageTags = CraftRegistry.getMinecraftRegistry(Registries.DAMAGE_TYPE);
+                net.minecraft.core.Registry<DamageType> damageTags = CraftRegistry.getMinecraftRegistry(Registries.DAMAGE_TYPE);
                 return damageTags.getTags().map(pair -> (org.bukkit.Tag<T>) new CraftDamageTag(damageTags, pair.key())).collect(ImmutableList.toImmutableList());
             }
             default -> throw new IllegalArgumentException();
@@ -2520,7 +2518,7 @@ public final class CraftServer implements Server {
     public LootTable getLootTable(NamespacedKey key) {
         Preconditions.checkArgument(key != null, "NamespacedKey key cannot be null");
 
-        ReloadableServerRegistries.a registry = getServer().reloadableRegistries();
+        ReloadableServerRegistries.Holder registry = this.getServer().reloadableRegistries();
         return registry.lookup().lookup(Registries.LOOT_TABLE)
                 .flatMap((lookup) -> lookup.get(CraftLootTable.bukkitKeyToMinecraft(key)))
                 .map((holder) -> new CraftLootTable(key, holder.value()))
@@ -2532,7 +2530,7 @@ public final class CraftServer implements Server {
         Preconditions.checkArgument(selector != null, "selector cannot be null");
         Preconditions.checkArgument(sender != null, "CommandSender sender cannot be null");
 
-        ArgumentEntity arg = ArgumentEntity.entities();
+        EntityArgument arg = EntityArgument.entities();
         List<? extends net.minecraft.world.entity.Entity> nms;
 
         try {
@@ -2548,12 +2546,12 @@ public final class CraftServer implements Server {
 
     @Override
     public StructureManager getStructureManager() {
-        return structureManager;
+        return this.structureManager;
     }
 
     @Override
     public <T extends Keyed> Registry<T> getRegistry(Class<T> aClass) {
-        return (Registry<T>) registries.computeIfAbsent(aClass, key -> CraftRegistry.createRegistry(aClass, console.registryAccess()));
+        return (Registry<T>) this.registries.computeIfAbsent(aClass, key -> CraftRegistry.createRegistry(aClass, this.console.registryAccess()));
     }
 
     @Deprecated
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServerLinks.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServerLinks.java
index e245477cf9..cbdb1a56a9 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServerLinks.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServerLinks.java
@@ -30,12 +30,12 @@ public class CraftServerLinks implements ServerLinks {
     public ServerLink getLink(Type type) {
         Preconditions.checkArgument(type != null, "type cannot be null");
 
-        return getServerLinks().findKnownType(fromBukkit(type)).map(CraftServerLink::new).orElse(null);
+        return this.getServerLinks().findKnownType(CraftServerLinks.fromBukkit(type)).map(CraftServerLink::new).orElse(null);
     }
 
     @Override
     public List<ServerLink> getLinks() {
-        return getServerLinks().entries().stream().map(nms -> (ServerLink) new CraftServerLink(nms)).toList();
+        return this.getServerLinks().entries().stream().map(nms -> (ServerLink) new CraftServerLink(nms)).toList();
     }
 
     @Override
@@ -43,11 +43,11 @@ public class CraftServerLinks implements ServerLinks {
         Preconditions.checkArgument(type != null, "type cannot be null");
         Preconditions.checkArgument(url != null, "url cannot be null");
 
-        ServerLink existing = getLink(type);
+        ServerLink existing = this.getLink(type);
         if (existing != null) {
-            removeLink(existing);
+            this.removeLink(existing);
         }
-        return addLink(type, url);
+        return this.addLink(type, url);
     }
 
     @Override
@@ -55,8 +55,8 @@ public class CraftServerLinks implements ServerLinks {
         Preconditions.checkArgument(type != null, "type cannot be null");
         Preconditions.checkArgument(url != null, "url cannot be null");
 
-        CraftServerLink link = new CraftServerLink(net.minecraft.server.ServerLinks.Entry.knownType(fromBukkit(type), url));
-        addLink(link);
+        CraftServerLink link = new CraftServerLink(net.minecraft.server.ServerLinks.Entry.knownType(CraftServerLinks.fromBukkit(type), url));
+        this.addLink(link);
 
         return link;
     }
@@ -67,42 +67,42 @@ public class CraftServerLinks implements ServerLinks {
         Preconditions.checkArgument(url != null, "url cannot be null");
 
         CraftServerLink link = new CraftServerLink(net.minecraft.server.ServerLinks.Entry.custom(CraftChatMessage.fromStringOrNull(displayName), url));
-        addLink(link);
+        this.addLink(link);
 
         return link;
     }
 
     private void addLink(CraftServerLink link) {
-        List<net.minecraft.server.ServerLinks.Entry> lst = new ArrayList<>(getServerLinks().entries());
+        List<net.minecraft.server.ServerLinks.Entry> lst = new ArrayList<>(this.getServerLinks().entries());
         lst.add(link.handle);
 
-        setLinks(new net.minecraft.server.ServerLinks(lst));
+        this.setLinks(new net.minecraft.server.ServerLinks(lst));
     }
 
     @Override
     public boolean removeLink(ServerLink link) {
         Preconditions.checkArgument(link != null, "link cannot be null");
 
-        List<net.minecraft.server.ServerLinks.Entry> lst = new ArrayList<>(getServerLinks().entries());
+        List<net.minecraft.server.ServerLinks.Entry> lst = new ArrayList<>(this.getServerLinks().entries());
         boolean result = lst.remove(((CraftServerLink) link).handle);
 
-        setLinks(new net.minecraft.server.ServerLinks(lst));
+        this.setLinks(new net.minecraft.server.ServerLinks(lst));
 
         return result;
     }
 
     @Override
     public ServerLinks copy() {
-        return new CraftServerLinks(getServerLinks());
+        return new CraftServerLinks(this.getServerLinks());
     }
 
     public net.minecraft.server.ServerLinks getServerLinks() {
-        return (server != null) ? server.serverLinks() : serverLinks;
+        return (this.server != null) ? this.server.serverLinks() : this.serverLinks;
     }
 
     private void setLinks(net.minecraft.server.ServerLinks links) {
-        if (server != null) {
-            server.serverLinks = links;
+        if (this.server != null) {
+            this.server.serverLinks = links;
         } else {
             this.serverLinks = links;
         }
@@ -126,17 +126,17 @@ public class CraftServerLinks implements ServerLinks {
 
         @Override
         public Type getType() {
-            return handle.type().left().map(CraftServerLinks::fromNMS).orElse(null);
+            return this.handle.type().left().map(CraftServerLinks::fromNMS).orElse(null);
         }
 
         @Override
         public String getDisplayName() {
-            return CraftChatMessage.fromComponent(handle.displayName());
+            return CraftChatMessage.fromComponent(this.handle.displayName());
         }
 
         @Override
         public URI getUrl() {
-            return handle.link();
+            return this.handle.link();
         }
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServerTickManager.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServerTickManager.java
index 7fca09c2ca..cdc55d0703 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServerTickManager.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftServerTickManager.java
@@ -16,78 +16,78 @@ final class CraftServerTickManager implements ServerTickManager {
 
     @Override
     public boolean isRunningNormally() {
-        return manager.runsNormally();
+        return this.manager.runsNormally();
     }
 
     @Override
     public boolean isStepping() {
-        return manager.isSteppingForward();
+        return this.manager.isSteppingForward();
     }
 
     @Override
     public boolean isSprinting() {
-        return manager.isSprinting();
+        return this.manager.isSprinting();
     }
 
     @Override
     public boolean isFrozen() {
-        return manager.isFrozen();
+        return this.manager.isFrozen();
     }
 
     @Override
     public float getTickRate() {
-        return manager.tickrate();
+        return this.manager.tickrate();
     }
 
     @Override
     public void setTickRate(final float tickRate) {
         Preconditions.checkArgument(tickRate >= 1.0F && tickRate <= 10_000.0F, "The given tick rate must not be less than 1.0 or greater than 10,000.0");
-        manager.setTickRate(tickRate);
+        this.manager.setTickRate(tickRate);
     }
 
     @Override
     public void setFrozen(final boolean frozen) {
         if (frozen) {
-            if (manager.isSprinting()) {
-                manager.stopSprinting();
+            if (this.manager.isSprinting()) {
+                this.manager.stopSprinting();
             }
 
-            if (manager.isSteppingForward()) {
-                manager.stopStepping();
+            if (this.manager.isSteppingForward()) {
+                this.manager.stopStepping();
             }
         }
 
-        manager.setFrozen(frozen);
+        this.manager.setFrozen(frozen);
     }
 
     @Override
     public boolean stepGameIfFrozen(final int ticks) {
-        return manager.stepGameIfPaused(ticks);
+        return this.manager.stepGameIfPaused(ticks);
     }
 
     @Override
     public boolean stopStepping() {
-        return manager.stopStepping();
+        return this.manager.stopStepping();
     }
 
     @Override
     public boolean requestGameToSprint(final int ticks) {
-        return manager.requestGameToSprint(ticks);
+        return this.manager.requestGameToSprint(ticks);
     }
 
     @Override
     public boolean stopSprinting() {
-        return manager.stopSprinting();
+        return this.manager.stopSprinting();
     }
 
     @Override
     public boolean isFrozen(final Entity entity) {
         Preconditions.checkArgument(entity != null, "The given entity must not be null");
-        return manager.isEntityFrozen(((CraftEntity) entity).getHandle());
+        return this.manager.isEntityFrozen(((CraftEntity) entity).getHandle());
     }
 
     @Override
     public int getFrozenTicksToRun() {
-        return manager.frozenTicksToRun();
+        return this.manager.frozenTicksToRun();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftSound.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftSound.java
index 7a37ec850a..e53d6d33bf 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftSound.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftSound.java
@@ -3,33 +3,32 @@ package org.bukkit.craftbukkit;
 import com.google.common.base.Preconditions;
 import java.util.Locale;
 import net.minecraft.core.Holder;
-import net.minecraft.core.IRegistry;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.sounds.SoundEffect;
+import net.minecraft.sounds.SoundEvent;
 import org.bukkit.NamespacedKey;
 import org.bukkit.Registry;
 import org.bukkit.Sound;
 import org.bukkit.craftbukkit.util.Handleable;
 import org.jetbrains.annotations.NotNull;
 
-public class CraftSound implements Sound, Handleable<SoundEffect> {
+public class CraftSound implements Sound, Handleable<SoundEvent> {
 
     private static int count = 0;
 
-    public static Sound minecraftToBukkit(SoundEffect minecraft) {
+    public static Sound minecraftToBukkit(SoundEvent minecraft) {
         return CraftRegistry.minecraftToBukkit(minecraft, Registries.SOUND_EVENT, Registry.SOUNDS);
     }
 
-    public static SoundEffect bukkitToMinecraft(Sound bukkit) {
+    public static SoundEvent bukkitToMinecraft(Sound bukkit) {
         return CraftRegistry.bukkitToMinecraft(bukkit);
     }
 
-    public static Holder<SoundEffect> bukkitToMinecraftHolder(Sound bukkit) {
+    public static Holder<SoundEvent> bukkitToMinecraftHolder(Sound bukkit) {
         Preconditions.checkArgument(bukkit != null);
 
-        IRegistry<SoundEffect> registry = CraftRegistry.getMinecraftRegistry(Registries.SOUND_EVENT);
+        net.minecraft.core.Registry<SoundEvent> registry = CraftRegistry.getMinecraftRegistry(Registries.SOUND_EVENT);
 
-        if (registry.wrapAsHolder(bukkitToMinecraft(bukkit)) instanceof Holder.c<SoundEffect> holder) {
+        if (registry.wrapAsHolder(CraftSound.bukkitToMinecraft(bukkit)) instanceof Holder.Reference<SoundEvent> holder) {
             return holder;
         }
 
@@ -38,11 +37,11 @@ public class CraftSound implements Sound, Handleable<SoundEffect> {
     }
 
     private final NamespacedKey key;
-    private final SoundEffect soundEffect;
+    private final SoundEvent soundEffect;
     private final String name;
     private final int ordinal;
 
-    public CraftSound(NamespacedKey key, SoundEffect soundEffect) {
+    public CraftSound(NamespacedKey key, SoundEvent soundEffect) {
         this.key = key;
         this.soundEffect = soundEffect;
         // For backwards compatibility, minecraft values will stile return the uppercase name without the namespace,
@@ -54,40 +53,40 @@ public class CraftSound implements Sound, Handleable<SoundEffect> {
         } else {
             this.name = key.toString();
         }
-        this.ordinal = count++;
+        this.ordinal = CraftSound.count++;
     }
 
     @Override
-    public SoundEffect getHandle() {
-        return soundEffect;
+    public SoundEvent getHandle() {
+        return this.soundEffect;
     }
 
     @NotNull
     @Override
     public NamespacedKey getKey() {
-        return key;
+        return this.key;
     }
 
     @Override
     public int compareTo(@NotNull Sound sound) {
-        return ordinal - sound.ordinal();
+        return this.ordinal - sound.ordinal();
     }
 
     @NotNull
     @Override
     public String name() {
-        return name;
+        return this.name;
     }
 
     @Override
     public int ordinal() {
-        return ordinal;
+        return this.ordinal;
     }
 
     @Override
     public String toString() {
         // For backwards compatibility
-        return name();
+        return this.name();
     }
 
     @Override
@@ -100,11 +99,11 @@ public class CraftSound implements Sound, Handleable<SoundEffect> {
             return false;
         }
 
-        return getKey().equals(otherSound.getKey());
+        return this.getKey().equals(otherSound.getKey());
     }
 
     @Override
     public int hashCode() {
-        return getKey().hashCode();
+        return this.getKey().hashCode();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftSoundGroup.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftSoundGroup.java
index 3859fc6bea..63a48ec761 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftSoundGroup.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftSoundGroup.java
@@ -1,59 +1,59 @@
 package org.bukkit.craftbukkit;
 
 import java.util.HashMap;
-import net.minecraft.world.level.block.SoundEffectType;
+import net.minecraft.world.level.block.SoundType;
 import org.bukkit.Sound;
 import org.bukkit.SoundGroup;
 
 public class CraftSoundGroup implements SoundGroup {
 
-    private final net.minecraft.world.level.block.SoundEffectType handle;
-    private static final HashMap<SoundEffectType, CraftSoundGroup> SOUND_GROUPS = new HashMap<>();
+    private final net.minecraft.world.level.block.SoundType handle;
+    private static final HashMap<SoundType, CraftSoundGroup> SOUND_GROUPS = new HashMap<>();
 
-    public static SoundGroup getSoundGroup(SoundEffectType soundEffectType) {
-        return SOUND_GROUPS.computeIfAbsent(soundEffectType, CraftSoundGroup::new);
+    public static SoundGroup getSoundGroup(SoundType soundEffectType) {
+        return CraftSoundGroup.SOUND_GROUPS.computeIfAbsent(soundEffectType, CraftSoundGroup::new);
     }
 
-    private CraftSoundGroup(net.minecraft.world.level.block.SoundEffectType soundEffectType) {
+    private CraftSoundGroup(net.minecraft.world.level.block.SoundType soundEffectType) {
         this.handle = soundEffectType;
     }
 
-    public net.minecraft.world.level.block.SoundEffectType getHandle() {
-        return handle;
+    public net.minecraft.world.level.block.SoundType getHandle() {
+        return this.handle;
     }
 
     @Override
     public float getVolume() {
-        return getHandle().getVolume();
+        return this.getHandle().getVolume();
     }
 
     @Override
     public float getPitch() {
-        return getHandle().getPitch();
+        return this.getHandle().getPitch();
     }
 
     @Override
     public Sound getBreakSound() {
-        return CraftSound.minecraftToBukkit(getHandle().breakSound);
+        return CraftSound.minecraftToBukkit(this.getHandle().breakSound);
     }
 
     @Override
     public Sound getStepSound() {
-        return CraftSound.minecraftToBukkit(getHandle().getStepSound());
+        return CraftSound.minecraftToBukkit(this.getHandle().getStepSound());
     }
 
     @Override
     public Sound getPlaceSound() {
-        return CraftSound.minecraftToBukkit(getHandle().getPlaceSound());
+        return CraftSound.minecraftToBukkit(this.getHandle().getPlaceSound());
     }
 
     @Override
     public Sound getHitSound() {
-        return CraftSound.minecraftToBukkit(getHandle().hitSound);
+        return CraftSound.minecraftToBukkit(this.getHandle().hitSound);
     }
 
     @Override
     public Sound getFallSound() {
-        return CraftSound.minecraftToBukkit(getHandle().getFallSound());
+        return CraftSound.minecraftToBukkit(this.getHandle().getFallSound());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java
index a1318890cf..ccee1f637d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftStatistic.java
@@ -3,13 +3,12 @@ package org.bukkit.craftbukkit;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.BiMap;
 import com.google.common.collect.ImmutableBiMap;
-import net.minecraft.core.IRegistry;
+import net.minecraft.core.Registry;
 import net.minecraft.core.registries.BuiltInRegistries;
-import net.minecraft.resources.MinecraftKey;
-import net.minecraft.server.level.EntityPlayer;
-import net.minecraft.stats.ServerStatisticManager;
-import net.minecraft.stats.StatisticList;
-import net.minecraft.world.entity.EntityTypes;
+import net.minecraft.resources.ResourceLocation;
+import net.minecraft.server.level.ServerPlayer;
+import net.minecraft.stats.ServerStatsCounter;
+import net.minecraft.stats.Stats;
 import net.minecraft.world.item.Item;
 import net.minecraft.world.level.block.Block;
 import org.bukkit.Material;
@@ -21,95 +20,95 @@ import org.bukkit.craftbukkit.inventory.CraftItemType;
 import org.bukkit.entity.EntityType;
 
 public enum CraftStatistic {
-    DAMAGE_DEALT(StatisticList.DAMAGE_DEALT),
-    DAMAGE_TAKEN(StatisticList.DAMAGE_TAKEN),
-    DEATHS(StatisticList.DEATHS),
-    MOB_KILLS(StatisticList.MOB_KILLS),
-    PLAYER_KILLS(StatisticList.PLAYER_KILLS),
-    FISH_CAUGHT(StatisticList.FISH_CAUGHT),
-    ANIMALS_BRED(StatisticList.ANIMALS_BRED),
-    LEAVE_GAME(StatisticList.LEAVE_GAME),
-    JUMP(StatisticList.JUMP),
-    DROP_COUNT(StatisticList.DROP),
-    DROP(MinecraftKey.withDefaultNamespace("dropped")),
-    PICKUP(MinecraftKey.withDefaultNamespace("picked_up")),
-    PLAY_ONE_MINUTE(StatisticList.PLAY_TIME),
-    TOTAL_WORLD_TIME(StatisticList.TOTAL_WORLD_TIME),
-    WALK_ONE_CM(StatisticList.WALK_ONE_CM),
-    WALK_ON_WATER_ONE_CM(StatisticList.WALK_ON_WATER_ONE_CM),
-    FALL_ONE_CM(StatisticList.FALL_ONE_CM),
-    SNEAK_TIME(StatisticList.CROUCH_TIME),
-    CLIMB_ONE_CM(StatisticList.CLIMB_ONE_CM),
-    FLY_ONE_CM(StatisticList.FLY_ONE_CM),
-    WALK_UNDER_WATER_ONE_CM(StatisticList.WALK_UNDER_WATER_ONE_CM),
-    MINECART_ONE_CM(StatisticList.MINECART_ONE_CM),
-    BOAT_ONE_CM(StatisticList.BOAT_ONE_CM),
-    PIG_ONE_CM(StatisticList.PIG_ONE_CM),
-    HORSE_ONE_CM(StatisticList.HORSE_ONE_CM),
-    SPRINT_ONE_CM(StatisticList.SPRINT_ONE_CM),
-    CROUCH_ONE_CM(StatisticList.CROUCH_ONE_CM),
-    AVIATE_ONE_CM(StatisticList.AVIATE_ONE_CM),
-    MINE_BLOCK(MinecraftKey.withDefaultNamespace("mined")),
-    USE_ITEM(MinecraftKey.withDefaultNamespace("used")),
-    BREAK_ITEM(MinecraftKey.withDefaultNamespace("broken")),
-    CRAFT_ITEM(MinecraftKey.withDefaultNamespace("crafted")),
-    KILL_ENTITY(MinecraftKey.withDefaultNamespace("killed")),
-    ENTITY_KILLED_BY(MinecraftKey.withDefaultNamespace("killed_by")),
-    TIME_SINCE_DEATH(StatisticList.TIME_SINCE_DEATH),
-    TALKED_TO_VILLAGER(StatisticList.TALKED_TO_VILLAGER),
-    TRADED_WITH_VILLAGER(StatisticList.TRADED_WITH_VILLAGER),
-    CAKE_SLICES_EATEN(StatisticList.EAT_CAKE_SLICE),
-    CAULDRON_FILLED(StatisticList.FILL_CAULDRON),
-    CAULDRON_USED(StatisticList.USE_CAULDRON),
-    ARMOR_CLEANED(StatisticList.CLEAN_ARMOR),
-    BANNER_CLEANED(StatisticList.CLEAN_BANNER),
-    BREWINGSTAND_INTERACTION(StatisticList.INTERACT_WITH_BREWINGSTAND),
-    BEACON_INTERACTION(StatisticList.INTERACT_WITH_BEACON),
-    DROPPER_INSPECTED(StatisticList.INSPECT_DROPPER),
-    HOPPER_INSPECTED(StatisticList.INSPECT_HOPPER),
-    DISPENSER_INSPECTED(StatisticList.INSPECT_DISPENSER),
-    NOTEBLOCK_PLAYED(StatisticList.PLAY_NOTEBLOCK),
-    NOTEBLOCK_TUNED(StatisticList.TUNE_NOTEBLOCK),
-    FLOWER_POTTED(StatisticList.POT_FLOWER),
-    TRAPPED_CHEST_TRIGGERED(StatisticList.TRIGGER_TRAPPED_CHEST),
-    ENDERCHEST_OPENED(StatisticList.OPEN_ENDERCHEST),
-    ITEM_ENCHANTED(StatisticList.ENCHANT_ITEM),
-    RECORD_PLAYED(StatisticList.PLAY_RECORD),
-    FURNACE_INTERACTION(StatisticList.INTERACT_WITH_FURNACE),
-    CRAFTING_TABLE_INTERACTION(StatisticList.INTERACT_WITH_CRAFTING_TABLE),
-    CHEST_OPENED(StatisticList.OPEN_CHEST),
-    SLEEP_IN_BED(StatisticList.SLEEP_IN_BED),
-    SHULKER_BOX_OPENED(StatisticList.OPEN_SHULKER_BOX),
-    TIME_SINCE_REST(StatisticList.TIME_SINCE_REST),
-    SWIM_ONE_CM(StatisticList.SWIM_ONE_CM),
-    DAMAGE_DEALT_ABSORBED(StatisticList.DAMAGE_DEALT_ABSORBED),
-    DAMAGE_DEALT_RESISTED(StatisticList.DAMAGE_DEALT_RESISTED),
-    DAMAGE_BLOCKED_BY_SHIELD(StatisticList.DAMAGE_BLOCKED_BY_SHIELD),
-    DAMAGE_ABSORBED(StatisticList.DAMAGE_ABSORBED),
-    DAMAGE_RESISTED(StatisticList.DAMAGE_RESISTED),
-    CLEAN_SHULKER_BOX(StatisticList.CLEAN_SHULKER_BOX),
-    OPEN_BARREL(StatisticList.OPEN_BARREL),
-    INTERACT_WITH_BLAST_FURNACE(StatisticList.INTERACT_WITH_BLAST_FURNACE),
-    INTERACT_WITH_SMOKER(StatisticList.INTERACT_WITH_SMOKER),
-    INTERACT_WITH_LECTERN(StatisticList.INTERACT_WITH_LECTERN),
-    INTERACT_WITH_CAMPFIRE(StatisticList.INTERACT_WITH_CAMPFIRE),
-    INTERACT_WITH_CARTOGRAPHY_TABLE(StatisticList.INTERACT_WITH_CARTOGRAPHY_TABLE),
-    INTERACT_WITH_LOOM(StatisticList.INTERACT_WITH_LOOM),
-    INTERACT_WITH_STONECUTTER(StatisticList.INTERACT_WITH_STONECUTTER),
-    BELL_RING(StatisticList.BELL_RING),
-    RAID_TRIGGER(StatisticList.RAID_TRIGGER),
-    RAID_WIN(StatisticList.RAID_WIN),
-    INTERACT_WITH_ANVIL(StatisticList.INTERACT_WITH_ANVIL),
-    INTERACT_WITH_GRINDSTONE(StatisticList.INTERACT_WITH_GRINDSTONE),
-    TARGET_HIT(StatisticList.TARGET_HIT),
-    INTERACT_WITH_SMITHING_TABLE(StatisticList.INTERACT_WITH_SMITHING_TABLE),
-    STRIDER_ONE_CM(StatisticList.STRIDER_ONE_CM);
-    private final MinecraftKey minecraftKey;
+    DAMAGE_DEALT(Stats.DAMAGE_DEALT),
+    DAMAGE_TAKEN(Stats.DAMAGE_TAKEN),
+    DEATHS(Stats.DEATHS),
+    MOB_KILLS(Stats.MOB_KILLS),
+    PLAYER_KILLS(Stats.PLAYER_KILLS),
+    FISH_CAUGHT(Stats.FISH_CAUGHT),
+    ANIMALS_BRED(Stats.ANIMALS_BRED),
+    LEAVE_GAME(Stats.LEAVE_GAME),
+    JUMP(Stats.JUMP),
+    DROP_COUNT(Stats.DROP),
+    DROP(ResourceLocation.withDefaultNamespace("dropped")),
+    PICKUP(ResourceLocation.withDefaultNamespace("picked_up")),
+    PLAY_ONE_MINUTE(Stats.PLAY_TIME),
+    TOTAL_WORLD_TIME(Stats.TOTAL_WORLD_TIME),
+    WALK_ONE_CM(Stats.WALK_ONE_CM),
+    WALK_ON_WATER_ONE_CM(Stats.WALK_ON_WATER_ONE_CM),
+    FALL_ONE_CM(Stats.FALL_ONE_CM),
+    SNEAK_TIME(Stats.CROUCH_TIME),
+    CLIMB_ONE_CM(Stats.CLIMB_ONE_CM),
+    FLY_ONE_CM(Stats.FLY_ONE_CM),
+    WALK_UNDER_WATER_ONE_CM(Stats.WALK_UNDER_WATER_ONE_CM),
+    MINECART_ONE_CM(Stats.MINECART_ONE_CM),
+    BOAT_ONE_CM(Stats.BOAT_ONE_CM),
+    PIG_ONE_CM(Stats.PIG_ONE_CM),
+    HORSE_ONE_CM(Stats.HORSE_ONE_CM),
+    SPRINT_ONE_CM(Stats.SPRINT_ONE_CM),
+    CROUCH_ONE_CM(Stats.CROUCH_ONE_CM),
+    AVIATE_ONE_CM(Stats.AVIATE_ONE_CM),
+    MINE_BLOCK(ResourceLocation.withDefaultNamespace("mined")),
+    USE_ITEM(ResourceLocation.withDefaultNamespace("used")),
+    BREAK_ITEM(ResourceLocation.withDefaultNamespace("broken")),
+    CRAFT_ITEM(ResourceLocation.withDefaultNamespace("crafted")),
+    KILL_ENTITY(ResourceLocation.withDefaultNamespace("killed")),
+    ENTITY_KILLED_BY(ResourceLocation.withDefaultNamespace("killed_by")),
+    TIME_SINCE_DEATH(Stats.TIME_SINCE_DEATH),
+    TALKED_TO_VILLAGER(Stats.TALKED_TO_VILLAGER),
+    TRADED_WITH_VILLAGER(Stats.TRADED_WITH_VILLAGER),
+    CAKE_SLICES_EATEN(Stats.EAT_CAKE_SLICE),
+    CAULDRON_FILLED(Stats.FILL_CAULDRON),
+    CAULDRON_USED(Stats.USE_CAULDRON),
+    ARMOR_CLEANED(Stats.CLEAN_ARMOR),
+    BANNER_CLEANED(Stats.CLEAN_BANNER),
+    BREWINGSTAND_INTERACTION(Stats.INTERACT_WITH_BREWINGSTAND),
+    BEACON_INTERACTION(Stats.INTERACT_WITH_BEACON),
+    DROPPER_INSPECTED(Stats.INSPECT_DROPPER),
+    HOPPER_INSPECTED(Stats.INSPECT_HOPPER),
+    DISPENSER_INSPECTED(Stats.INSPECT_DISPENSER),
+    NOTEBLOCK_PLAYED(Stats.PLAY_NOTEBLOCK),
+    NOTEBLOCK_TUNED(Stats.TUNE_NOTEBLOCK),
+    FLOWER_POTTED(Stats.POT_FLOWER),
+    TRAPPED_CHEST_TRIGGERED(Stats.TRIGGER_TRAPPED_CHEST),
+    ENDERCHEST_OPENED(Stats.OPEN_ENDERCHEST),
+    ITEM_ENCHANTED(Stats.ENCHANT_ITEM),
+    RECORD_PLAYED(Stats.PLAY_RECORD),
+    FURNACE_INTERACTION(Stats.INTERACT_WITH_FURNACE),
+    CRAFTING_TABLE_INTERACTION(Stats.INTERACT_WITH_CRAFTING_TABLE),
+    CHEST_OPENED(Stats.OPEN_CHEST),
+    SLEEP_IN_BED(Stats.SLEEP_IN_BED),
+    SHULKER_BOX_OPENED(Stats.OPEN_SHULKER_BOX),
+    TIME_SINCE_REST(Stats.TIME_SINCE_REST),
+    SWIM_ONE_CM(Stats.SWIM_ONE_CM),
+    DAMAGE_DEALT_ABSORBED(Stats.DAMAGE_DEALT_ABSORBED),
+    DAMAGE_DEALT_RESISTED(Stats.DAMAGE_DEALT_RESISTED),
+    DAMAGE_BLOCKED_BY_SHIELD(Stats.DAMAGE_BLOCKED_BY_SHIELD),
+    DAMAGE_ABSORBED(Stats.DAMAGE_ABSORBED),
+    DAMAGE_RESISTED(Stats.DAMAGE_RESISTED),
+    CLEAN_SHULKER_BOX(Stats.CLEAN_SHULKER_BOX),
+    OPEN_BARREL(Stats.OPEN_BARREL),
+    INTERACT_WITH_BLAST_FURNACE(Stats.INTERACT_WITH_BLAST_FURNACE),
+    INTERACT_WITH_SMOKER(Stats.INTERACT_WITH_SMOKER),
+    INTERACT_WITH_LECTERN(Stats.INTERACT_WITH_LECTERN),
+    INTERACT_WITH_CAMPFIRE(Stats.INTERACT_WITH_CAMPFIRE),
+    INTERACT_WITH_CARTOGRAPHY_TABLE(Stats.INTERACT_WITH_CARTOGRAPHY_TABLE),
+    INTERACT_WITH_LOOM(Stats.INTERACT_WITH_LOOM),
+    INTERACT_WITH_STONECUTTER(Stats.INTERACT_WITH_STONECUTTER),
+    BELL_RING(Stats.BELL_RING),
+    RAID_TRIGGER(Stats.RAID_TRIGGER),
+    RAID_WIN(Stats.RAID_WIN),
+    INTERACT_WITH_ANVIL(Stats.INTERACT_WITH_ANVIL),
+    INTERACT_WITH_GRINDSTONE(Stats.INTERACT_WITH_GRINDSTONE),
+    TARGET_HIT(Stats.TARGET_HIT),
+    INTERACT_WITH_SMITHING_TABLE(Stats.INTERACT_WITH_SMITHING_TABLE),
+    STRIDER_ONE_CM(Stats.STRIDER_ONE_CM);
+    private final ResourceLocation minecraftKey;
     private final org.bukkit.Statistic bukkit;
-    private static final BiMap<MinecraftKey, org.bukkit.Statistic> statistics;
+    private static final BiMap<ResourceLocation, org.bukkit.Statistic> statistics;
 
     static {
-        ImmutableBiMap.Builder<MinecraftKey, org.bukkit.Statistic> statisticBuilder = ImmutableBiMap.builder();
+        ImmutableBiMap.Builder<ResourceLocation, org.bukkit.Statistic> statisticBuilder = ImmutableBiMap.builder();
         for (CraftStatistic statistic : CraftStatistic.values()) {
             statisticBuilder.put(statistic.minecraftKey, statistic.bukkit);
         }
@@ -117,53 +116,53 @@ public enum CraftStatistic {
         statistics = statisticBuilder.build();
     }
 
-    private CraftStatistic(MinecraftKey minecraftKey) {
+    private CraftStatistic(ResourceLocation minecraftKey) {
         this.minecraftKey = minecraftKey;
 
         this.bukkit = org.bukkit.Statistic.valueOf(this.name());
-        Preconditions.checkState(bukkit != null, "Bukkit statistic %s does not exist", this.name());
+        Preconditions.checkState(this.bukkit != null, "Bukkit statistic %s does not exist", this.name());
     }
 
-    public static org.bukkit.Statistic getBukkitStatistic(net.minecraft.stats.Statistic<?> statistic) {
+    public static org.bukkit.Statistic getBukkitStatistic(net.minecraft.stats.Stat<?> statistic) {
         Preconditions.checkArgument(statistic != null, "NMS Statistic cannot be null");
-        IRegistry statRegistry = statistic.getType().getRegistry();
-        MinecraftKey nmsKey = BuiltInRegistries.STAT_TYPE.getKey(statistic.getType());
+        Registry statRegistry = statistic.getType().getRegistry();
+        ResourceLocation nmsKey = BuiltInRegistries.STAT_TYPE.getKey(statistic.getType());
 
         if (statRegistry == BuiltInRegistries.CUSTOM_STAT) {
-            nmsKey = (MinecraftKey) statistic.getValue();
+            nmsKey = (ResourceLocation) statistic.getValue();
         }
 
         return statistics.get(nmsKey);
     }
 
-    public static net.minecraft.stats.Statistic getNMSStatistic(org.bukkit.Statistic bukkit) {
+    public static net.minecraft.stats.Stat getNMSStatistic(org.bukkit.Statistic bukkit) {
         Preconditions.checkArgument(bukkit.getType() == Statistic.Type.UNTYPED, "This method only accepts untyped statistics");
 
-        net.minecraft.stats.Statistic<MinecraftKey> nms = StatisticList.CUSTOM.get(statistics.inverse().get(bukkit));
+        net.minecraft.stats.Stat<ResourceLocation> nms = Stats.CUSTOM.get(statistics.inverse().get(bukkit));
         Preconditions.checkArgument(nms != null, "NMS Statistic %s does not exist", bukkit);
 
         return nms;
     }
 
-    public static net.minecraft.stats.Statistic getMaterialStatistic(org.bukkit.Statistic stat, Material material) {
+    public static net.minecraft.stats.Stat getMaterialStatistic(org.bukkit.Statistic stat, Material material) {
         try {
             if (stat == Statistic.MINE_BLOCK) {
-                return StatisticList.BLOCK_MINED.get(CraftBlockType.bukkitToMinecraft(material));
+                return Stats.BLOCK_MINED.get(CraftBlockType.bukkitToMinecraft(material));
             }
             if (stat == Statistic.CRAFT_ITEM) {
-                return StatisticList.ITEM_CRAFTED.get(CraftItemType.bukkitToMinecraft(material));
+                return Stats.ITEM_CRAFTED.get(CraftItemType.bukkitToMinecraft(material));
             }
             if (stat == Statistic.USE_ITEM) {
-                return StatisticList.ITEM_USED.get(CraftItemType.bukkitToMinecraft(material));
+                return Stats.ITEM_USED.get(CraftItemType.bukkitToMinecraft(material));
             }
             if (stat == Statistic.BREAK_ITEM) {
-                return StatisticList.ITEM_BROKEN.get(CraftItemType.bukkitToMinecraft(material));
+                return Stats.ITEM_BROKEN.get(CraftItemType.bukkitToMinecraft(material));
             }
             if (stat == Statistic.PICKUP) {
-                return StatisticList.ITEM_PICKED_UP.get(CraftItemType.bukkitToMinecraft(material));
+                return Stats.ITEM_PICKED_UP.get(CraftItemType.bukkitToMinecraft(material));
             }
             if (stat == Statistic.DROP) {
-                return StatisticList.ITEM_DROPPED.get(CraftItemType.bukkitToMinecraft(material));
+                return Stats.ITEM_DROPPED.get(CraftItemType.bukkitToMinecraft(material));
             }
         } catch (ArrayIndexOutOfBoundsException e) {
             return null;
@@ -171,27 +170,27 @@ public enum CraftStatistic {
         return null;
     }
 
-    public static net.minecraft.stats.Statistic getEntityStatistic(org.bukkit.Statistic stat, EntityType entity) {
+    public static net.minecraft.stats.Stat getEntityStatistic(org.bukkit.Statistic stat, EntityType entity) {
         Preconditions.checkArgument(entity != null, "EntityType cannot be null");
         if (entity.getName() != null) {
-            EntityTypes<?> nmsEntity = CraftEntityType.bukkitToMinecraft(entity);
+            net.minecraft.world.entity.EntityType<?> nmsEntity = CraftEntityType.bukkitToMinecraft(entity);
 
             if (stat == org.bukkit.Statistic.KILL_ENTITY) {
-                return net.minecraft.stats.StatisticList.ENTITY_KILLED.get(nmsEntity);
+                return net.minecraft.stats.Stats.ENTITY_KILLED.get(nmsEntity);
             }
             if (stat == org.bukkit.Statistic.ENTITY_KILLED_BY) {
-                return net.minecraft.stats.StatisticList.ENTITY_KILLED_BY.get(nmsEntity);
+                return net.minecraft.stats.Stats.ENTITY_KILLED_BY.get(nmsEntity);
             }
         }
         return null;
     }
 
-    public static EntityType getEntityTypeFromStatistic(net.minecraft.stats.Statistic<EntityTypes<?>> statistic) {
+    public static EntityType getEntityTypeFromStatistic(net.minecraft.stats.Stat<net.minecraft.world.entity.EntityType<?>> statistic) {
         Preconditions.checkArgument(statistic != null, "NMS Statistic cannot be null");
         return CraftEntityType.minecraftToBukkit(statistic.getValue());
     }
 
-    public static Material getMaterialFromStatistic(net.minecraft.stats.Statistic<?> statistic) {
+    public static Material getMaterialFromStatistic(net.minecraft.stats.Stat<?> statistic) {
         if (statistic.getValue() instanceof Item statisticItemValue) {
             return CraftItemType.minecraftToBukkit(statisticItemValue);
         }
@@ -201,35 +200,35 @@ public enum CraftStatistic {
         return null;
     }
 
-    public static void incrementStatistic(ServerStatisticManager manager, Statistic statistic, EntityPlayer player) {
+    public static void incrementStatistic(ServerStatsCounter manager, Statistic statistic, ServerPlayer player) {
         incrementStatistic(manager, statistic, 1, player);
     }
 
-    public static void decrementStatistic(ServerStatisticManager manager, Statistic statistic, EntityPlayer player) {
+    public static void decrementStatistic(ServerStatsCounter manager, Statistic statistic, ServerPlayer player) {
         decrementStatistic(manager, statistic, 1, player);
     }
 
-    public static int getStatistic(ServerStatisticManager manager, Statistic statistic) {
+    public static int getStatistic(ServerStatsCounter manager, Statistic statistic) {
         Preconditions.checkArgument(statistic != null, "Statistic cannot be null");
         Preconditions.checkArgument(statistic.getType() == Type.UNTYPED, "Must supply additional parameter for this statistic");
         return manager.getValue(CraftStatistic.getNMSStatistic(statistic));
     }
 
-    public static void incrementStatistic(ServerStatisticManager manager, Statistic statistic, int amount, EntityPlayer player) {
+    public static void incrementStatistic(ServerStatsCounter manager, Statistic statistic, int amount, ServerPlayer player) {
         Preconditions.checkArgument(amount > 0, "Amount must be greater than 0");
         setStatistic(manager, statistic, getStatistic(manager, statistic) + amount, player);
     }
 
-    public static void decrementStatistic(ServerStatisticManager manager, Statistic statistic, int amount, EntityPlayer player) {
+    public static void decrementStatistic(ServerStatsCounter manager, Statistic statistic, int amount, ServerPlayer player) {
         Preconditions.checkArgument(amount > 0, "Amount must be greater than 0");
         setStatistic(manager, statistic, getStatistic(manager, statistic) - amount, player);
     }
 
-    public static void setStatistic(ServerStatisticManager manager, Statistic statistic, int newValue, EntityPlayer player) {
+    public static void setStatistic(ServerStatsCounter manager, Statistic statistic, int newValue, ServerPlayer player) {
         Preconditions.checkArgument(statistic != null, "Statistic cannot be null");
         Preconditions.checkArgument(statistic.getType() == Type.UNTYPED, "Must supply additional parameter for this statistic");
         Preconditions.checkArgument(newValue >= 0, "Value must be greater than or equal to 0");
-        net.minecraft.stats.Statistic nmsStatistic = CraftStatistic.getNMSStatistic(statistic);
+        net.minecraft.stats.Stat nmsStatistic = CraftStatistic.getNMSStatistic(statistic);
         manager.setValue(null, nmsStatistic, newValue);
 
         // Update scoreboards
@@ -240,39 +239,39 @@ public enum CraftStatistic {
         }
     }
 
-    public static void incrementStatistic(ServerStatisticManager manager, Statistic statistic, Material material, EntityPlayer player) {
+    public static void incrementStatistic(ServerStatsCounter manager, Statistic statistic, Material material, ServerPlayer player) {
         incrementStatistic(manager, statistic, material, 1, player);
     }
 
-    public static void decrementStatistic(ServerStatisticManager manager, Statistic statistic, Material material, EntityPlayer player) {
+    public static void decrementStatistic(ServerStatsCounter manager, Statistic statistic, Material material, ServerPlayer player) {
         decrementStatistic(manager, statistic, material, 1, player);
     }
 
-    public static int getStatistic(ServerStatisticManager manager, Statistic statistic, Material material) {
+    public static int getStatistic(ServerStatsCounter manager, Statistic statistic, Material material) {
         Preconditions.checkArgument(statistic != null, "Statistic cannot be null");
         Preconditions.checkArgument(material != null, "Material cannot be null");
         Preconditions.checkArgument(statistic.getType() == Type.BLOCK || statistic.getType() == Type.ITEM, "This statistic does not take a Material parameter");
-        net.minecraft.stats.Statistic nmsStatistic = CraftStatistic.getMaterialStatistic(statistic, material);
+        net.minecraft.stats.Stat nmsStatistic = CraftStatistic.getMaterialStatistic(statistic, material);
         Preconditions.checkArgument(nmsStatistic != null, "The supplied Material %s does not have a corresponding statistic", material);
         return manager.getValue(nmsStatistic);
     }
 
-    public static void incrementStatistic(ServerStatisticManager manager, Statistic statistic, Material material, int amount, EntityPlayer player) {
+    public static void incrementStatistic(ServerStatsCounter manager, Statistic statistic, Material material, int amount, ServerPlayer player) {
         Preconditions.checkArgument(amount > 0, "Amount must be greater than 0");
         setStatistic(manager, statistic, material, getStatistic(manager, statistic, material) + amount, player);
     }
 
-    public static void decrementStatistic(ServerStatisticManager manager, Statistic statistic, Material material, int amount, EntityPlayer player) {
+    public static void decrementStatistic(ServerStatsCounter manager, Statistic statistic, Material material, int amount, ServerPlayer player) {
         Preconditions.checkArgument(amount > 0, "Amount must be greater than 0");
         setStatistic(manager, statistic, material, getStatistic(manager, statistic, material) - amount, player);
     }
 
-    public static void setStatistic(ServerStatisticManager manager, Statistic statistic, Material material, int newValue, EntityPlayer player) {
+    public static void setStatistic(ServerStatsCounter manager, Statistic statistic, Material material, int newValue, ServerPlayer player) {
         Preconditions.checkArgument(statistic != null, "Statistic cannot be null");
         Preconditions.checkArgument(material != null, "Material cannot be null");
         Preconditions.checkArgument(newValue >= 0, "Value must be greater than or equal to 0");
         Preconditions.checkArgument(statistic.getType() == Type.BLOCK || statistic.getType() == Type.ITEM, "This statistic does not take a Material parameter");
-        net.minecraft.stats.Statistic nmsStatistic = CraftStatistic.getMaterialStatistic(statistic, material);
+        net.minecraft.stats.Stat nmsStatistic = CraftStatistic.getMaterialStatistic(statistic, material);
         Preconditions.checkArgument(nmsStatistic != null, "The supplied Material %s does not have a corresponding statistic", material);
         manager.setValue(null, nmsStatistic, newValue);
 
@@ -284,39 +283,39 @@ public enum CraftStatistic {
         }
     }
 
-    public static void incrementStatistic(ServerStatisticManager manager, Statistic statistic, EntityType entityType, EntityPlayer player) {
+    public static void incrementStatistic(ServerStatsCounter manager, Statistic statistic, EntityType entityType, ServerPlayer player) {
         incrementStatistic(manager, statistic, entityType, 1, player);
     }
 
-    public static void decrementStatistic(ServerStatisticManager manager, Statistic statistic, EntityType entityType, EntityPlayer player) {
+    public static void decrementStatistic(ServerStatsCounter manager, Statistic statistic, EntityType entityType, ServerPlayer player) {
         decrementStatistic(manager, statistic, entityType, 1, player);
     }
 
-    public static int getStatistic(ServerStatisticManager manager, Statistic statistic, EntityType entityType) {
+    public static int getStatistic(ServerStatsCounter manager, Statistic statistic, EntityType entityType) {
         Preconditions.checkArgument(statistic != null, "Statistic cannot be null");
         Preconditions.checkArgument(entityType != null, "EntityType cannot be null");
         Preconditions.checkArgument(statistic.getType() == Type.ENTITY, "This statistic does not take an EntityType parameter");
-        net.minecraft.stats.Statistic nmsStatistic = CraftStatistic.getEntityStatistic(statistic, entityType);
+        net.minecraft.stats.Stat nmsStatistic = CraftStatistic.getEntityStatistic(statistic, entityType);
         Preconditions.checkArgument(nmsStatistic != null, "The supplied EntityType %s does not have a corresponding statistic", entityType);
         return manager.getValue(nmsStatistic);
     }
 
-    public static void incrementStatistic(ServerStatisticManager manager, Statistic statistic, EntityType entityType, int amount, EntityPlayer player) {
+    public static void incrementStatistic(ServerStatsCounter manager, Statistic statistic, EntityType entityType, int amount, ServerPlayer player) {
         Preconditions.checkArgument(amount > 0, "Amount must be greater than 0");
         setStatistic(manager, statistic, entityType, getStatistic(manager, statistic, entityType) + amount, player);
     }
 
-    public static void decrementStatistic(ServerStatisticManager manager, Statistic statistic, EntityType entityType, int amount, EntityPlayer player) {
+    public static void decrementStatistic(ServerStatsCounter manager, Statistic statistic, EntityType entityType, int amount, ServerPlayer player) {
         Preconditions.checkArgument(amount > 0, "Amount must be greater than 0");
         setStatistic(manager, statistic, entityType, getStatistic(manager, statistic, entityType) - amount, player);
     }
 
-    public static void setStatistic(ServerStatisticManager manager, Statistic statistic, EntityType entityType, int newValue, EntityPlayer player) {
+    public static void setStatistic(ServerStatsCounter manager, Statistic statistic, EntityType entityType, int newValue, ServerPlayer player) {
         Preconditions.checkArgument(statistic != null, "Statistic cannot be null");
         Preconditions.checkArgument(entityType != null, "EntityType cannot be null");
         Preconditions.checkArgument(newValue >= 0, "Value must be greater than or equal to 0");
         Preconditions.checkArgument(statistic.getType() == Type.ENTITY, "This statistic does not take an EntityType parameter");
-        net.minecraft.stats.Statistic nmsStatistic = CraftStatistic.getEntityStatistic(statistic, entityType);
+        net.minecraft.stats.Stat nmsStatistic = CraftStatistic.getEntityStatistic(statistic, entityType);
         Preconditions.checkArgument(nmsStatistic != null, "The supplied EntityType %s does not have a corresponding statistic", entityType);
         manager.setValue(null, nmsStatistic, newValue);
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
index 0c25788e88..1e5828ab5c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorld.java
@@ -24,57 +24,52 @@ import java.util.concurrent.ExecutionException;
 import java.util.function.Consumer;
 import java.util.function.Predicate;
 import java.util.stream.Collectors;
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
 import net.minecraft.core.Holder;
 import net.minecraft.core.HolderSet;
-import net.minecraft.core.IRegistry;
-import net.minecraft.core.particles.Particles;
+import net.minecraft.core.particles.ParticleTypes;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.nbt.NBTBase;
-import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.nbt.Tag;
 import net.minecraft.network.protocol.game.ClientboundLevelChunkWithLightPacket;
-import net.minecraft.network.protocol.game.PacketPlayOutEntitySound;
-import net.minecraft.network.protocol.game.PacketPlayOutNamedSoundEffect;
-import net.minecraft.network.protocol.game.PacketPlayOutUpdateTime;
-import net.minecraft.network.protocol.game.PacketPlayOutWorldEvent;
-import net.minecraft.resources.MinecraftKey;
-import net.minecraft.server.level.ChunkMapDistance;
-import net.minecraft.server.level.EntityPlayer;
-import net.minecraft.server.level.PlayerChunk;
-import net.minecraft.server.level.PlayerChunkMap;
+import net.minecraft.network.protocol.game.ClientboundLevelEventPacket;
+import net.minecraft.network.protocol.game.ClientboundSetTimePacket;
+import net.minecraft.network.protocol.game.ClientboundSoundEntityPacket;
+import net.minecraft.network.protocol.game.ClientboundSoundPacket;
+import net.minecraft.resources.ResourceLocation;
+import net.minecraft.server.level.ChunkHolder;
+import net.minecraft.server.level.ChunkMap;
+import net.minecraft.server.level.DistanceManager;
+import net.minecraft.server.level.ServerLevel;
+import net.minecraft.server.level.ServerPlayer;
 import net.minecraft.server.level.Ticket;
 import net.minecraft.server.level.TicketType;
-import net.minecraft.server.level.WorldServer;
-import net.minecraft.sounds.SoundCategory;
-import net.minecraft.sounds.SoundEffect;
-import net.minecraft.sounds.SoundEffects;
-import net.minecraft.util.ArraySetSorted;
-import net.minecraft.util.MathHelper;
+import net.minecraft.sounds.SoundEvent;
+import net.minecraft.sounds.SoundEvents;
+import net.minecraft.sounds.SoundSource;
+import net.minecraft.util.Mth;
+import net.minecraft.util.SortedArraySet;
 import net.minecraft.util.Unit;
-import net.minecraft.world.EnumDifficulty;
-import net.minecraft.world.entity.EntityLightning;
 import net.minecraft.world.entity.EntitySpawnReason;
-import net.minecraft.world.entity.EntityTypes;
-import net.minecraft.world.entity.item.EntityFallingBlock;
-import net.minecraft.world.entity.item.EntityItem;
-import net.minecraft.world.entity.player.EntityHuman;
-import net.minecraft.world.entity.projectile.EntityArrow;
-import net.minecraft.world.entity.raid.PersistentRaid;
-import net.minecraft.world.level.ChunkCoordIntPair;
+import net.minecraft.world.entity.EntityType;
+import net.minecraft.world.entity.LightningBolt;
+import net.minecraft.world.entity.item.FallingBlockEntity;
+import net.minecraft.world.entity.item.ItemEntity;
+import net.minecraft.world.entity.raid.Raids;
+import net.minecraft.world.level.ChunkPos;
+import net.minecraft.world.level.ClipContext;
 import net.minecraft.world.level.Explosion;
 import net.minecraft.world.level.GameRules;
-import net.minecraft.world.level.RayTrace;
-import net.minecraft.world.level.biome.BiomeBase;
 import net.minecraft.world.level.biome.Climate;
-import net.minecraft.world.level.chunk.IChunkAccess;
-import net.minecraft.world.level.chunk.ProtoChunkExtension;
+import net.minecraft.world.level.chunk.ChunkAccess;
+import net.minecraft.world.level.chunk.ImposterProtoChunk;
 import net.minecraft.world.level.chunk.status.ChunkStatus;
 import net.minecraft.world.level.levelgen.structure.StructureStart;
-import net.minecraft.world.level.storage.SavedFile;
-import net.minecraft.world.phys.AxisAlignedBB;
-import net.minecraft.world.phys.MovingObjectPosition;
-import net.minecraft.world.phys.Vec3D;
-import net.minecraft.world.phys.shapes.VoxelShapeCollision;
+import net.minecraft.world.level.storage.LevelResource;
+import net.minecraft.world.phys.AABB;
+import net.minecraft.world.phys.HitResult;
+import net.minecraft.world.phys.Vec3;
+import net.minecraft.world.phys.shapes.CollisionContext;
 import org.bukkit.BlockChangeDelegate;
 import org.bukkit.Bukkit;
 import org.bukkit.Chunk;
@@ -162,7 +157,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
     public static final int CUSTOM_DIMENSION_OFFSET = 10;
     private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
 
-    private final WorldServer world;
+    private final ServerLevel world;
     private WorldBorder worldBorder;
     private Environment environment;
     private final CraftServer server = (CraftServer) Bukkit.getServer();
@@ -171,27 +166,27 @@ public class CraftWorld extends CraftRegionAccessor implements World {
     private final List<BlockPopulator> populators = new ArrayList<BlockPopulator>();
     private final BlockMetadataStore blockMetadata = new BlockMetadataStore(this);
     private final Object2IntOpenHashMap<SpawnCategory> spawnCategoryLimit = new Object2IntOpenHashMap<>();
-    private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY);
+    private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftWorld.DATA_TYPE_REGISTRY);
 
     private static final Random rand = new Random();
 
-    public CraftWorld(WorldServer world, ChunkGenerator gen, BiomeProvider biomeProvider, Environment env) {
+    public CraftWorld(ServerLevel world, ChunkGenerator gen, BiomeProvider biomeProvider, Environment env) {
         this.world = world;
         this.generator = gen;
         this.biomeProvider = biomeProvider;
 
-        environment = env;
+        this.environment = env;
     }
 
     @Override
     public Block getBlockAt(int x, int y, int z) {
-        return CraftBlock.at(world, new BlockPosition(x, y, z));
+        return CraftBlock.at(this.world, new BlockPos(x, y, z));
     }
 
     @Override
     public Location getSpawnLocation() {
-        BlockPosition spawn = world.getSharedSpawnPos();
-        float yaw = world.getSharedSpawnAngle();
+        BlockPos spawn = this.world.getSharedSpawnPos();
+        float yaw = this.world.getSharedSpawnAngle();
         return CraftLocation.toBukkit(spawn, this, yaw, 0);
     }
 
@@ -199,18 +194,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
     public boolean setSpawnLocation(Location location) {
         Preconditions.checkArgument(location != null, "location");
 
-        return equals(location.getWorld()) ? setSpawnLocation(location.getBlockX(), location.getBlockY(), location.getBlockZ(), location.getYaw()) : false;
+        return this.equals(location.getWorld()) ? this.setSpawnLocation(location.getBlockX(), location.getBlockY(), location.getBlockZ(), location.getYaw()) : false;
     }
 
     @Override
     public boolean setSpawnLocation(int x, int y, int z, float angle) {
         try {
-            Location previousLocation = getSpawnLocation();
-            world.levelData.setSpawn(new BlockPosition(x, y, z), angle);
+            Location previousLocation = this.getSpawnLocation();
+            this.world.levelData.setSpawn(new BlockPos(x, y, z), angle);
 
             // Notify anyone who's listening.
             SpawnChangeEvent event = new SpawnChangeEvent(this, previousLocation);
-            server.getPluginManager().callEvent(event);
+            this.server.getPluginManager().callEvent(event);
 
             return true;
         } catch (Exception e) {
@@ -220,12 +215,12 @@ public class CraftWorld extends CraftRegionAccessor implements World {
 
     @Override
     public boolean setSpawnLocation(int x, int y, int z) {
-        return setSpawnLocation(x, y, z, 0.0F);
+        return this.setSpawnLocation(x, y, z, 0.0F);
     }
 
     @Override
     public Chunk getChunkAt(int x, int z) {
-        net.minecraft.world.level.chunk.Chunk chunk = (net.minecraft.world.level.chunk.Chunk) this.world.getChunk(x, z, ChunkStatus.FULL, true);
+        net.minecraft.world.level.chunk.LevelChunk chunk = (net.minecraft.world.level.chunk.LevelChunk) this.world.getChunk(x, z, ChunkStatus.FULL, true);
         return new CraftChunk(chunk);
     }
 
@@ -233,28 +228,28 @@ public class CraftWorld extends CraftRegionAccessor implements World {
     @Override
     public Chunk getChunkAt(int x, int z, boolean generate) {
         if (generate) {
-            return getChunkAt(x, z);
+            return this.getChunkAt(x, z);
         }
 
-        return new CraftChunk(getHandle(), x, z);
+        return new CraftChunk(this.getHandle(), x, z);
     }
 
     @Override
     public Chunk getChunkAt(Block block) {
         Preconditions.checkArgument(block != null, "null block");
 
-        return getChunkAt(block.getX() >> 4, block.getZ() >> 4);
+        return this.getChunkAt(block.getX() >> 4, block.getZ() >> 4);
     }
 
     @Override
     public boolean isChunkLoaded(int x, int z) {
-        return world.getChunkSource().isChunkLoaded(x, z);
+        return this.world.getChunkSource().isChunkLoaded(x, z);
     }
 
     @Override
     public boolean isChunkGenerated(int x, int z) {
         try {
-            return isChunkLoaded(x, z) || world.getChunkSource().chunkMap.read(new ChunkCoordIntPair(x, z)).get().isPresent();
+            return this.isChunkLoaded(x, z) || this.world.getChunkSource().chunkMap.read(new ChunkPos(x, z)).get().isPresent();
         } catch (InterruptedException | ExecutionException ex) {
             throw new RuntimeException(ex);
         }
@@ -262,52 +257,52 @@ public class CraftWorld extends CraftRegionAccessor implements World {
 
     @Override
     public Chunk[] getLoadedChunks() {
-        Long2ObjectLinkedOpenHashMap<PlayerChunk> chunks = world.getChunkSource().chunkMap.visibleChunkMap;
-        return chunks.values().stream().map(PlayerChunk::getFullChunkNow).filter(Objects::nonNull).map(CraftChunk::new).toArray(Chunk[]::new);
+        Long2ObjectLinkedOpenHashMap<ChunkHolder> chunks = this.world.getChunkSource().chunkMap.visibleChunkMap;
+        return chunks.values().stream().map(ChunkHolder::getFullChunkNow).filter(Objects::nonNull).map(CraftChunk::new).toArray(Chunk[]::new);
     }
 
     @Override
     public void loadChunk(int x, int z) {
-        loadChunk(x, z, true);
+        this.loadChunk(x, z, true);
     }
 
     @Override
     public boolean unloadChunk(Chunk chunk) {
-        return unloadChunk(chunk.getX(), chunk.getZ());
+        return this.unloadChunk(chunk.getX(), chunk.getZ());
     }
 
     @Override
     public boolean unloadChunk(int x, int z) {
-        return unloadChunk(x, z, true);
+        return this.unloadChunk(x, z, true);
     }
 
     @Override
     public boolean unloadChunk(int x, int z, boolean save) {
-        return unloadChunk0(x, z, save);
+        return this.unloadChunk0(x, z, save);
     }
 
     @Override
     public boolean unloadChunkRequest(int x, int z) {
-        if (isChunkLoaded(x, z)) {
-            world.getChunkSource().removeRegionTicket(TicketType.PLUGIN, new ChunkCoordIntPair(x, z), 1, Unit.INSTANCE);
+        if (this.isChunkLoaded(x, z)) {
+            this.world.getChunkSource().removeRegionTicket(TicketType.PLUGIN, new ChunkPos(x, z), 1, Unit.INSTANCE);
         }
 
         return true;
     }
 
     private boolean unloadChunk0(int x, int z, boolean save) {
-        if (!isChunkLoaded(x, z)) {
+        if (!this.isChunkLoaded(x, z)) {
             return true;
         }
-        net.minecraft.world.level.chunk.Chunk chunk = world.getChunk(x, z);
+        net.minecraft.world.level.chunk.LevelChunk chunk = this.world.getChunk(x, z);
 
         if (!save) {
             chunk.tryMarkSaved(); // Use method call to account for persistentDataContainer
         }
-        unloadChunkRequest(x, z);
+        this.unloadChunkRequest(x, z);
 
-        world.getChunkSource().purgeUnload();
-        return !isChunkLoaded(x, z);
+        this.world.getChunkSource().purgeUnload();
+        return !this.isChunkLoaded(x, z);
     }
 
     @Override
@@ -337,16 +332,16 @@ public class CraftWorld extends CraftRegionAccessor implements World {
 
     @Override
     public boolean refreshChunk(int x, int z) {
-        PlayerChunk playerChunk = world.getChunkSource().chunkMap.visibleChunkMap.get(ChunkCoordIntPair.asLong(x, z));
+        ChunkHolder playerChunk = this.world.getChunkSource().chunkMap.visibleChunkMap.get(ChunkPos.asLong(x, z));
         if (playerChunk == null) return false;
 
         playerChunk.getTickingChunkFuture().thenAccept(either -> {
             either.ifSuccess(chunk -> {
-                List<EntityPlayer> playersInRange = playerChunk.playerProvider.getPlayers(playerChunk.getPos(), false);
+                List<ServerPlayer> playersInRange = playerChunk.playerProvider.getPlayers(playerChunk.getPos(), false);
                 if (playersInRange.isEmpty()) return;
 
-                ClientboundLevelChunkWithLightPacket refreshPacket = new ClientboundLevelChunkWithLightPacket(chunk, world.getLightEngine(), null, null);
-                for (EntityPlayer player : playersInRange) {
+                ClientboundLevelChunkWithLightPacket refreshPacket = new ClientboundLevelChunkWithLightPacket(chunk, this.world.getLightEngine(), null, null);
+                for (ServerPlayer player : playersInRange) {
                     if (player.connection == null) continue;
 
                     player.connection.send(refreshPacket);
@@ -361,16 +356,16 @@ public class CraftWorld extends CraftRegionAccessor implements World {
     public Collection<Player> getPlayersSeeingChunk(Chunk chunk) {
         Preconditions.checkArgument(chunk != null, "chunk cannot be null");
 
-        return getPlayersSeeingChunk(chunk.getX(), chunk.getZ());
+        return this.getPlayersSeeingChunk(chunk.getX(), chunk.getZ());
     }
 
     @Override
     public Collection<Player> getPlayersSeeingChunk(int x, int z) {
-        if (!isChunkLoaded(x, z)) {
+        if (!this.isChunkLoaded(x, z)) {
             return Collections.emptySet();
         }
 
-        List<EntityPlayer> players = world.getChunkSource().chunkMap.getPlayers(new ChunkCoordIntPair(x, z), false);
+        List<ServerPlayer> players = this.world.getChunkSource().chunkMap.getPlayers(new ChunkPos(x, z), false);
 
         if (players.isEmpty()) {
             return Collections.emptySet();
@@ -378,27 +373,27 @@ public class CraftWorld extends CraftRegionAccessor implements World {
 
         return players.stream()
                 .filter(Objects::nonNull)
-                .map(EntityPlayer::getBukkitEntity)
+                .map(ServerPlayer::getBukkitEntity)
                 .collect(Collectors.toUnmodifiableSet());
     }
 
     @Override
     public boolean isChunkInUse(int x, int z) {
-        return isChunkLoaded(x, z);
+        return this.isChunkLoaded(x, z);
     }
 
     @Override
     public boolean loadChunk(int x, int z, boolean generate) {
-        IChunkAccess chunk = world.getChunkSource().getChunk(x, z, generate ? ChunkStatus.FULL : ChunkStatus.EMPTY, true);
+        ChunkAccess chunk = this.world.getChunkSource().getChunk(x, z, generate ? ChunkStatus.FULL : ChunkStatus.EMPTY, true);
 
         // If generate = false, but the chunk already exists, we will get this back.
-        if (chunk instanceof ProtoChunkExtension) {
+        if (chunk instanceof ImposterProtoChunk) {
             // We then cycle through again to get the full chunk immediately, rather than after the ticket addition
-            chunk = world.getChunkSource().getChunk(x, z, ChunkStatus.FULL, true);
+            chunk = this.world.getChunkSource().getChunk(x, z, ChunkStatus.FULL, true);
         }
 
-        if (chunk instanceof net.minecraft.world.level.chunk.Chunk) {
-            world.getChunkSource().addRegionTicket(TicketType.PLUGIN, new ChunkCoordIntPair(x, z), 1, Unit.INSTANCE);
+        if (chunk instanceof net.minecraft.world.level.chunk.LevelChunk) {
+            this.world.getChunkSource().addRegionTicket(TicketType.PLUGIN, new ChunkPos(x, z), 1, Unit.INSTANCE);
             return true;
         }
 
@@ -409,14 +404,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
     public boolean isChunkLoaded(Chunk chunk) {
         Preconditions.checkArgument(chunk != null, "null chunk");
 
-        return isChunkLoaded(chunk.getX(), chunk.getZ());
+        return this.isChunkLoaded(chunk.getX(), chunk.getZ());
     }
 
     @Override
     public void loadChunk(Chunk chunk) {
         Preconditions.checkArgument(chunk != null, "null chunk");
 
-        loadChunk(chunk.getX(), chunk.getZ());
+        this.loadChunk(chunk.getX(), chunk.getZ());
     }
 
     @Override
@@ -424,9 +419,9 @@ public class CraftWorld extends CraftRegionAccessor implements World {
         Preconditions.checkArgument(plugin != null, "null plugin");
         Preconditions.checkArgument(plugin.isEnabled(), "plugin is not enabled");
 
-        ChunkMapDistance chunkDistanceManager = this.world.getChunkSource().chunkMap.distanceManager;
+        DistanceManager chunkDistanceManager = this.world.getChunkSource().chunkMap.distanceManager;
 
-        if (chunkDistanceManager.addRegionTicketAtDistance(TicketType.PLUGIN_TICKET, new ChunkCoordIntPair(x, z), 2, plugin)) { // keep in-line with force loading, add at level 31
+        if (chunkDistanceManager.addRegionTicketAtDistance(TicketType.PLUGIN_TICKET, new ChunkPos(x, z), 2, plugin)) { // keep in-line with force loading, add at level 31
             this.getChunkAt(x, z); // ensure loaded
             return true;
         }
@@ -438,22 +433,22 @@ public class CraftWorld extends CraftRegionAccessor implements World {
     public boolean removePluginChunkTicket(int x, int z, Plugin plugin) {
         Preconditions.checkNotNull(plugin, "null plugin");
 
-        ChunkMapDistance chunkDistanceManager = this.world.getChunkSource().chunkMap.distanceManager;
-        return chunkDistanceManager.removeRegionTicketAtDistance(TicketType.PLUGIN_TICKET, new ChunkCoordIntPair(x, z), 2, plugin); // keep in-line with force loading, remove at level 31
+        DistanceManager chunkDistanceManager = this.world.getChunkSource().chunkMap.distanceManager;
+        return chunkDistanceManager.removeRegionTicketAtDistance(TicketType.PLUGIN_TICKET, new ChunkPos(x, z), 2, plugin); // keep in-line with force loading, remove at level 31
     }
 
     @Override
     public void removePluginChunkTickets(Plugin plugin) {
         Preconditions.checkNotNull(plugin, "null plugin");
 
-        ChunkMapDistance chunkDistanceManager = this.world.getChunkSource().chunkMap.distanceManager;
+        DistanceManager chunkDistanceManager = this.world.getChunkSource().chunkMap.distanceManager;
         chunkDistanceManager.removeAllTicketsFor(TicketType.PLUGIN_TICKET, 31, plugin); // keep in-line with force loading, remove at level 31
     }
 
     @Override
     public Collection<Plugin> getPluginChunkTickets(int x, int z) {
-        ChunkMapDistance chunkDistanceManager = this.world.getChunkSource().chunkMap.distanceManager;
-        ArraySetSorted<Ticket<?>> tickets = chunkDistanceManager.tickets.get(ChunkCoordIntPair.asLong(x, z));
+        DistanceManager chunkDistanceManager = this.world.getChunkSource().chunkMap.distanceManager;
+        SortedArraySet<Ticket<?>> tickets = chunkDistanceManager.tickets.get(ChunkPos.asLong(x, z));
 
         if (tickets == null) {
             return Collections.emptyList();
@@ -472,11 +467,11 @@ public class CraftWorld extends CraftRegionAccessor implements World {
     @Override
     public Map<Plugin, Collection<Chunk>> getPluginChunkTickets() {
         Map<Plugin, ImmutableList.Builder<Chunk>> ret = new HashMap<>();
-        ChunkMapDistance chunkDistanceManager = this.world.getChunkSource().chunkMap.distanceManager;
+        DistanceManager chunkDistanceManager = this.world.getChunkSource().chunkMap.distanceManager;
 
-        for (Long2ObjectMap.Entry<ArraySetSorted<Ticket<?>>> chunkTickets : chunkDistanceManager.tickets.long2ObjectEntrySet()) {
+        for (Long2ObjectMap.Entry<SortedArraySet<Ticket<?>>> chunkTickets : chunkDistanceManager.tickets.long2ObjectEntrySet()) {
             long chunkKey = chunkTickets.getLongKey();
-            ArraySetSorted<Ticket<?>> tickets = chunkTickets.getValue();
+            SortedArraySet<Ticket<?>> tickets = chunkTickets.getValue();
 
             Chunk chunk = null;
             for (Ticket<?> ticket : tickets) {
@@ -485,7 +480,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
                 }
 
                 if (chunk == null) {
-                    chunk = this.getChunkAt(ChunkCoordIntPair.getX(chunkKey), ChunkCoordIntPair.getZ(chunkKey));
+                    chunk = this.getChunkAt(ChunkPos.getX(chunkKey), ChunkPos.getZ(chunkKey));
                 }
 
                 ret.computeIfAbsent((Plugin) ticket.key, (key) -> ImmutableList.builder()).add(chunk);
@@ -507,7 +502,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
 
         for (int x = minX; x <= maxX; x++) {
             for (int z = minZ; z <= maxZ; z++) {
-                chunks.add(getChunkAt(x, z, false));
+                chunks.add(this.getChunkAt(x, z, false));
             }
         }
 
@@ -516,32 +511,32 @@ public class CraftWorld extends CraftRegionAccessor implements World {
 
     @Override
     public boolean isChunkForceLoaded(int x, int z) {
-        return getHandle().getForcedChunks().contains(ChunkCoordIntPair.asLong(x, z));
+        return this.getHandle().getForcedChunks().contains(ChunkPos.asLong(x, z));
     }
 
     @Override
     public void setChunkForceLoaded(int x, int z, boolean forced) {
-        getHandle().setChunkForced(x, z, forced);
+        this.getHandle().setChunkForced(x, z, forced);
     }
 
     @Override
     public Collection<Chunk> getForceLoadedChunks() {
         Set<Chunk> chunks = new HashSet<>();
 
-        for (long coord : getHandle().getForcedChunks()) {
-            chunks.add(getChunkAt(ChunkCoordIntPair.getX(coord), ChunkCoordIntPair.getZ(coord)));
+        for (long coord : this.getHandle().getForcedChunks()) {
+            chunks.add(this.getChunkAt(ChunkPos.getX(coord), ChunkPos.getZ(coord)));
         }
 
         return Collections.unmodifiableCollection(chunks);
     }
 
-    public WorldServer getHandle() {
-        return world;
+    public ServerLevel getHandle() {
+        return this.world;
     }
 
     @Override
     public org.bukkit.entity.Item dropItem(Location loc, ItemStack item) {
-        return dropItem(loc, item, null);
+        return this.dropItem(loc, item, null);
     }
 
     @Override
@@ -549,19 +544,19 @@ public class CraftWorld extends CraftRegionAccessor implements World {
         Preconditions.checkArgument(loc != null, "Location cannot be null");
         Preconditions.checkArgument(item != null, "ItemStack cannot be null");
 
-        EntityItem entity = new EntityItem(world, loc.getX(), loc.getY(), loc.getZ(), CraftItemStack.asNMSCopy(item));
+        ItemEntity entity = new ItemEntity(this.world, loc.getX(), loc.getY(), loc.getZ(), CraftItemStack.asNMSCopy(item));
         org.bukkit.entity.Item itemEntity = (org.bukkit.entity.Item) entity.getBukkitEntity();
         entity.pickupDelay = 10;
         if (function != null) {
             function.accept(itemEntity);
         }
-        world.addFreshEntity(entity, SpawnReason.CUSTOM);
+        this.world.addFreshEntity(entity, SpawnReason.CUSTOM);
         return itemEntity;
     }
 
     @Override
     public org.bukkit.entity.Item dropItemNaturally(Location loc, ItemStack item) {
-        return dropItemNaturally(loc, item, null);
+        return this.dropItemNaturally(loc, item, null);
     }
 
     @Override
@@ -569,16 +564,16 @@ public class CraftWorld extends CraftRegionAccessor implements World {
         Preconditions.checkArgument(loc != null, "Location cannot be null");
         Preconditions.checkArgument(item != null, "ItemStack cannot be null");
 
-        double xs = MathHelper.nextDouble(world.random, -0.25D, 0.25D);
-        double ys = MathHelper.nextDouble(world.random, -0.25D, 0.25D) - ((double) EntityTypes.ITEM.getHeight() / 2.0D);
-        double zs = MathHelper.nextDouble(world.random, -0.25D, 0.25D);
+        double xs = Mth.nextDouble(this.world.random, -0.25D, 0.25D);
+        double ys = Mth.nextDouble(this.world.random, -0.25D, 0.25D) - ((double) EntityType.ITEM.getHeight() / 2.0D);
+        double zs = Mth.nextDouble(this.world.random, -0.25D, 0.25D);
         loc = loc.clone().add(xs, ys, zs);
-        return dropItem(loc, item, function);
+        return this.dropItem(loc, item, function);
     }
 
     @Override
     public Arrow spawnArrow(Location loc, Vector velocity, float speed, float spread) {
-        return spawnArrow(loc, velocity, speed, spread, Arrow.class);
+        return this.spawnArrow(loc, velocity, speed, spread, Arrow.class);
     }
 
     @Override
@@ -587,180 +582,180 @@ public class CraftWorld extends CraftRegionAccessor implements World {
         Preconditions.checkArgument(velocity != null, "Vector cannot be null");
         Preconditions.checkArgument(clazz != null, "clazz Entity for the arrow cannot be null");
 
-        EntityArrow arrow;
+        net.minecraft.world.entity.projectile.AbstractArrow arrow;
         if (TippedArrow.class.isAssignableFrom(clazz)) {
-            arrow = EntityTypes.ARROW.create(world, EntitySpawnReason.COMMAND);
+            arrow = EntityType.ARROW.create(this.world, EntitySpawnReason.COMMAND);
             ((Arrow) arrow.getBukkitEntity()).setBasePotionType(PotionType.WATER);
         } else if (SpectralArrow.class.isAssignableFrom(clazz)) {
-            arrow = EntityTypes.SPECTRAL_ARROW.create(world, EntitySpawnReason.COMMAND);
+            arrow = EntityType.SPECTRAL_ARROW.create(this.world, EntitySpawnReason.COMMAND);
         } else if (Trident.class.isAssignableFrom(clazz)) {
-            arrow = EntityTypes.TRIDENT.create(world, EntitySpawnReason.COMMAND);
+            arrow = EntityType.TRIDENT.create(this.world, EntitySpawnReason.COMMAND);
         } else {
-            arrow = EntityTypes.ARROW.create(world, EntitySpawnReason.COMMAND);
+            arrow = EntityType.ARROW.create(this.world, EntitySpawnReason.COMMAND);
         }
 
         arrow.moveTo(loc.getX(), loc.getY(), loc.getZ(), loc.getYaw(), loc.getPitch());
         arrow.shoot(velocity.getX(), velocity.getY(), velocity.getZ(), speed, spread);
-        world.addFreshEntity(arrow);
+        this.world.addFreshEntity(arrow);
         return (T) arrow.getBukkitEntity();
     }
 
     @Override
     public LightningStrike strikeLightning(Location loc) {
-        return strikeLightning0(loc, false);
+        return this.strikeLightning0(loc, false);
     }
 
     @Override
     public LightningStrike strikeLightningEffect(Location loc) {
-        return strikeLightning0(loc, true);
+        return this.strikeLightning0(loc, true);
     }
 
     private LightningStrike strikeLightning0(Location loc, boolean isVisual) {
         Preconditions.checkArgument(loc != null, "Location cannot be null");
 
-        EntityLightning lightning = EntityTypes.LIGHTNING_BOLT.create(world, EntitySpawnReason.COMMAND);
+        LightningBolt lightning = EntityType.LIGHTNING_BOLT.create(this.world, EntitySpawnReason.COMMAND);
         lightning.moveTo(loc.getX(), loc.getY(), loc.getZ());
         lightning.setVisualOnly(isVisual);
-        world.strikeLightning(lightning, LightningStrikeEvent.Cause.CUSTOM);
+        this.world.strikeLightning(lightning, LightningStrikeEvent.Cause.CUSTOM);
         return (LightningStrike) lightning.getBukkitEntity();
     }
 
     @Override
     public boolean generateTree(Location loc, TreeType type) {
-        return generateTree(loc, rand, type);
+        return this.generateTree(loc, CraftWorld.rand, type);
     }
 
     @Override
     public boolean generateTree(Location loc, TreeType type, BlockChangeDelegate delegate) {
-        world.captureTreeGeneration = true;
-        world.captureBlockStates = true;
-        boolean grownTree = generateTree(loc, type);
-        world.captureBlockStates = false;
-        world.captureTreeGeneration = false;
+        this.world.captureTreeGeneration = true;
+        this.world.captureBlockStates = true;
+        boolean grownTree = this.generateTree(loc, type);
+        this.world.captureBlockStates = false;
+        this.world.captureTreeGeneration = false;
         if (grownTree) { // Copy block data to delegate
-            for (BlockState blockstate : world.capturedBlockStates.values()) {
-                BlockPosition position = ((CraftBlockState) blockstate).getPosition();
-                net.minecraft.world.level.block.state.IBlockData oldBlock = world.getBlockState(position);
+            for (BlockState blockstate : this.world.capturedBlockStates.values()) {
+                BlockPos position = ((CraftBlockState) blockstate).getPosition();
+                net.minecraft.world.level.block.state.BlockState oldBlock = this.world.getBlockState(position);
                 int flag = ((CraftBlockState) blockstate).getFlag();
                 delegate.setBlockData(blockstate.getX(), blockstate.getY(), blockstate.getZ(), blockstate.getBlockData());
-                net.minecraft.world.level.block.state.IBlockData newBlock = world.getBlockState(position);
-                world.notifyAndUpdatePhysics(position, null, oldBlock, newBlock, newBlock, flag, 512);
+                net.minecraft.world.level.block.state.BlockState newBlock = this.world.getBlockState(position);
+                this.world.notifyAndUpdatePhysics(position, null, oldBlock, newBlock, newBlock, flag, 512);
             }
-            world.capturedBlockStates.clear();
+            this.world.capturedBlockStates.clear();
             return true;
         } else {
-            world.capturedBlockStates.clear();
+            this.world.capturedBlockStates.clear();
             return false;
         }
     }
 
     @Override
     public String getName() {
-        return world.serverLevelData.getLevelName();
+        return this.world.serverLevelData.getLevelName();
     }
 
     @Override
     public UUID getUID() {
-        return world.uuid;
+        return this.world.uuid;
     }
 
     @Override
     public NamespacedKey getKey() {
-        return CraftNamespacedKey.fromMinecraft(world.dimension().location());
+        return CraftNamespacedKey.fromMinecraft(this.world.dimension().location());
     }
 
     @Override
     public String toString() {
-        return "CraftWorld{name=" + getName() + '}';
+        return "CraftWorld{name=" + this.getName() + '}';
     }
 
     @Override
     public long getTime() {
-        long time = getFullTime() % 24000;
+        long time = this.getFullTime() % 24000;
         if (time < 0) time += 24000;
         return time;
     }
 
     @Override
     public void setTime(long time) {
-        long margin = (time - getFullTime()) % 24000;
+        long margin = (time - this.getFullTime()) % 24000;
         if (margin < 0) margin += 24000;
-        setFullTime(getFullTime() + margin);
+        this.setFullTime(this.getFullTime() + margin);
     }
 
     @Override
     public long getFullTime() {
-        return world.getDayTime();
+        return this.world.getDayTime();
     }
 
     @Override
     public void setFullTime(long time) {
         // Notify anyone who's listening
-        TimeSkipEvent event = new TimeSkipEvent(this, TimeSkipEvent.SkipReason.CUSTOM, time - world.getDayTime());
-        server.getPluginManager().callEvent(event);
+        TimeSkipEvent event = new TimeSkipEvent(this, TimeSkipEvent.SkipReason.CUSTOM, time - this.world.getDayTime());
+        this.server.getPluginManager().callEvent(event);
         if (event.isCancelled()) {
             return;
         }
 
-        world.setDayTime(world.getDayTime() + event.getSkipAmount());
+        this.world.setDayTime(this.world.getDayTime() + event.getSkipAmount());
 
         // Forces the client to update to the new time immediately
-        for (Player p : getPlayers()) {
+        for (Player p : this.getPlayers()) {
             CraftPlayer cp = (CraftPlayer) p;
             if (cp.getHandle().connection == null) continue;
 
-            cp.getHandle().connection.send(new PacketPlayOutUpdateTime(cp.getHandle().level().getGameTime(), cp.getHandle().getPlayerTime(), cp.getHandle().serverLevel().getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)));
+            cp.getHandle().connection.send(new ClientboundSetTimePacket(cp.getHandle().level().getGameTime(), cp.getHandle().getPlayerTime(), cp.getHandle().serverLevel().getGameRules().getBoolean(GameRules.RULE_DAYLIGHT)));
         }
     }
 
     @Override
     public long getGameTime() {
-        return world.levelData.getGameTime();
+        return this.world.levelData.getGameTime();
     }
 
     @Override
     public boolean createExplosion(double x, double y, double z, float power) {
-        return createExplosion(x, y, z, power, false, true);
+        return this.createExplosion(x, y, z, power, false, true);
     }
 
     @Override
     public boolean createExplosion(double x, double y, double z, float power, boolean setFire) {
-        return createExplosion(x, y, z, power, setFire, true);
+        return this.createExplosion(x, y, z, power, setFire, true);
     }
 
     @Override
     public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks) {
-        return createExplosion(x, y, z, power, setFire, breakBlocks, null);
+        return this.createExplosion(x, y, z, power, setFire, breakBlocks, null);
     }
 
     @Override
     public boolean createExplosion(double x, double y, double z, float power, boolean setFire, boolean breakBlocks, Entity source) {
-        net.minecraft.world.level.World.a explosionType;
+        net.minecraft.world.level.Level.ExplosionInteraction explosionType;
         if (!breakBlocks) {
-            explosionType = net.minecraft.world.level.World.a.NONE; // Don't break blocks
+            explosionType = net.minecraft.world.level.Level.ExplosionInteraction.NONE; // Don't break blocks
         } else if (source == null) {
-            explosionType = net.minecraft.world.level.World.a.STANDARD; // Break blocks, don't decay drops
+            explosionType = net.minecraft.world.level.Level.ExplosionInteraction.STANDARD; // Break blocks, don't decay drops
         } else {
-            explosionType = net.minecraft.world.level.World.a.MOB; // Respect mobGriefing gamerule
+            explosionType = net.minecraft.world.level.Level.ExplosionInteraction.MOB; // Respect mobGriefing gamerule
         }
 
         net.minecraft.world.entity.Entity entity = (source == null) ? null : ((CraftEntity) source).getHandle();
-        return !world.explode0(entity, Explosion.getDefaultDamageSource(world, entity), null, x, y, z, power, setFire, explosionType, Particles.EXPLOSION, Particles.EXPLOSION_EMITTER, SoundEffects.GENERIC_EXPLODE).wasCanceled;
+        return !this.world.explode0(entity, Explosion.getDefaultDamageSource(this.world, entity), null, x, y, z, power, setFire, explosionType, ParticleTypes.EXPLOSION, ParticleTypes.EXPLOSION_EMITTER, SoundEvents.GENERIC_EXPLODE).wasCanceled;
     }
 
     @Override
     public boolean createExplosion(Location loc, float power) {
-        return createExplosion(loc, power, false);
+        return this.createExplosion(loc, power, false);
     }
 
     @Override
     public boolean createExplosion(Location loc, float power, boolean setFire) {
-        return createExplosion(loc, power, setFire, true);
+        return this.createExplosion(loc, power, setFire, true);
     }
 
     @Override
     public boolean createExplosion(Location loc, float power, boolean setFire, boolean breakBlocks) {
-        return createExplosion(loc, power, setFire, breakBlocks, null);
+        return this.createExplosion(loc, power, setFire, breakBlocks, null);
     }
 
     @Override
@@ -768,89 +763,89 @@ public class CraftWorld extends CraftRegionAccessor implements World {
         Preconditions.checkArgument(loc != null, "Location is null");
         Preconditions.checkArgument(this.equals(loc.getWorld()), "Location not in world");
 
-        return createExplosion(loc.getX(), loc.getY(), loc.getZ(), power, setFire, breakBlocks, source);
+        return this.createExplosion(loc.getX(), loc.getY(), loc.getZ(), power, setFire, breakBlocks, source);
     }
 
     @Override
     public Environment getEnvironment() {
-        return environment;
+        return this.environment;
     }
 
     @Override
     public Block getBlockAt(Location location) {
-        return getBlockAt(location.getBlockX(), location.getBlockY(), location.getBlockZ());
+        return this.getBlockAt(location.getBlockX(), location.getBlockY(), location.getBlockZ());
     }
 
     @Override
     public Chunk getChunkAt(Location location) {
-        return getChunkAt(location.getBlockX() >> 4, location.getBlockZ() >> 4);
+        return this.getChunkAt(location.getBlockX() >> 4, location.getBlockZ() >> 4);
     }
 
     @Override
     public ChunkGenerator getGenerator() {
-        return generator;
+        return this.generator;
     }
 
     @Override
     public BiomeProvider getBiomeProvider() {
-        return biomeProvider;
+        return this.biomeProvider;
     }
 
     @Override
     public List<BlockPopulator> getPopulators() {
-        return populators;
+        return this.populators;
     }
 
     @NotNull
     @Override
     public <T extends LivingEntity> T spawn(@NotNull Location location, @NotNull Class<T> clazz, @NotNull SpawnReason spawnReason, boolean randomizeData, @Nullable Consumer<? super T> function) throws IllegalArgumentException {
         Preconditions.checkArgument(spawnReason != null, "Spawn reason cannot be null");
-        return spawn(location, clazz, function, spawnReason, randomizeData);
+        return this.spawn(location, clazz, function, spawnReason, randomizeData);
     }
 
     @Override
     public Block getHighestBlockAt(int x, int z) {
-        return getBlockAt(x, getHighestBlockYAt(x, z), z);
+        return this.getBlockAt(x, this.getHighestBlockYAt(x, z), z);
     }
 
     @Override
     public Block getHighestBlockAt(Location location) {
-        return getHighestBlockAt(location.getBlockX(), location.getBlockZ());
+        return this.getHighestBlockAt(location.getBlockX(), location.getBlockZ());
     }
 
     @Override
     public int getHighestBlockYAt(int x, int z, org.bukkit.HeightMap heightMap) {
         // Transient load for this tick
-        return world.getChunk(x >> 4, z >> 4).getHeight(CraftHeightMap.toNMS(heightMap), x, z);
+        return this.world.getChunk(x >> 4, z >> 4).getHeight(CraftHeightMap.toNMS(heightMap), x, z);
     }
 
     @Override
     public Block getHighestBlockAt(int x, int z, org.bukkit.HeightMap heightMap) {
-        return getBlockAt(x, getHighestBlockYAt(x, z, heightMap), z);
+        return this.getBlockAt(x, this.getHighestBlockYAt(x, z, heightMap), z);
     }
 
     @Override
     public Block getHighestBlockAt(Location location, org.bukkit.HeightMap heightMap) {
-        return getHighestBlockAt(location.getBlockX(), location.getBlockZ(), heightMap);
+        return this.getHighestBlockAt(location.getBlockX(), location.getBlockZ(), heightMap);
     }
 
     @Override
     public Biome getBiome(int x, int z) {
-        return getBiome(x, 0, z);
+        return this.getBiome(x, 0, z);
     }
 
     @Override
     public void setBiome(int x, int z, Biome bio) {
-        for (int y = getMinHeight(); y < getMaxHeight(); y++) {
-            setBiome(x, y, z, bio);
+        for (int y = this.getMinHeight(); y < this.getMaxHeight(); y++) {
+            this.setBiome(x, y, z, bio);
         }
     }
 
     @Override
-    public void setBiome(int x, int y, int z, Holder<BiomeBase> bb) {
-        BlockPosition pos = new BlockPosition(x, 0, z);
+    public void setBiome(int x, int y, int z, Holder<net.minecraft.world.level.biome.Biome> bb) {
+        BlockPos pos = new BlockPos(x, 0, z);
         if (this.world.hasChunkAt(pos)) {
-            net.minecraft.world.level.chunk.Chunk chunk = this.world.getChunkAt(pos);
+            net.minecraft.world.level.chunk.LevelChunk chunk = this.world.getChunkAt(pos);
 
             if (chunk != null) {
                 chunk.setBiome(x >> 2, y >> 2, z >> 2, bb);
@@ -862,18 +857,18 @@ public class CraftWorld extends CraftRegionAccessor implements World {
 
     @Override
     public double getTemperature(int x, int z) {
-        return getTemperature(x, 0, z);
+        return this.getTemperature(x, 0, z);
     }
 
     @Override
     public double getTemperature(int x, int y, int z) {
-        BlockPosition pos = new BlockPosition(x, y, z);
+        BlockPos pos = new BlockPos(x, y, z);
         return this.world.getNoiseBiome(x >> 2, y >> 2, z >> 2).value().getTemperature(pos, this.world.getSeaLevel());
     }
 
     @Override
     public double getHumidity(int x, int z) {
-        return getHumidity(x, 0, z);
+        return this.getHumidity(x, 0, z);
     }
 
     @Override
@@ -885,22 +880,22 @@ public class CraftWorld extends CraftRegionAccessor implements World {
     @SuppressWarnings("unchecked")
     @Deprecated
     public <T extends Entity> Collection<T> getEntitiesByClass(Class<T>... classes) {
-        return (Collection<T>) getEntitiesByClasses(classes);
+        return (Collection<T>) this.getEntitiesByClasses(classes);
     }
 
     @Override
     public Iterable<net.minecraft.world.entity.Entity> getNMSEntities() {
-        return getHandle().getEntities().getAll();
+        return this.getHandle().getEntities().getAll();
     }
 
     @Override
     public void addEntityToWorld(net.minecraft.world.entity.Entity entity, SpawnReason reason) {
-        getHandle().addFreshEntity(entity, reason);
+        this.getHandle().addFreshEntity(entity, reason);
     }
 
     @Override
     public void addEntityWithPassengers(net.minecraft.world.entity.Entity entity, SpawnReason reason) {
-        getHandle().tryAddFreshEntityWithPassengers(entity, reason);
+        this.getHandle().tryAddFreshEntityWithPassengers(entity, reason);
     }
 
     @Override
@@ -926,8 +921,8 @@ public class CraftWorld extends CraftRegionAccessor implements World {
     public Collection<Entity> getNearbyEntities(BoundingBox boundingBox, Predicate<? super Entity> filter) {
         Preconditions.checkArgument(boundingBox != null, "BoundingBox cannot be null");
 
-        AxisAlignedBB bb = new AxisAlignedBB(boundingBox.getMinX(), boundingBox.getMinY(), boundingBox.getMinZ(), boundingBox.getMaxX(), boundingBox.getMaxY(), boundingBox.getMaxZ());
-        List<net.minecraft.world.entity.Entity> entityList = getHandle().getEntities((net.minecraft.world.entity.Entity) null, bb, Predicates.alwaysTrue());
+        AABB bb = new AABB(boundingBox.getMinX(), boundingBox.getMinY(), boundingBox.getMinZ(), boundingBox.getMaxX(), boundingBox.getMaxY(), boundingBox.getMaxZ());
+        List<net.minecraft.world.entity.Entity> entityList = this.getHandle().getEntities((net.minecraft.world.entity.Entity) null, bb, Predicates.alwaysTrue());
         List<Entity> bukkitEntityList = new ArrayList<org.bukkit.entity.Entity>(entityList.size());
 
         for (net.minecraft.world.entity.Entity entity : entityList) {
@@ -1024,9 +1019,9 @@ public class CraftWorld extends CraftRegionAccessor implements World {
         }
 
         Vector dir = direction.clone().normalize().multiply(maxDistance);
-        Vec3D startPos = CraftLocation.toVec3D(start);
-        Vec3D endPos = startPos.add(dir.getX(), dir.getY(), dir.getZ());
-        MovingObjectPosition nmsHitResult = this.getHandle().clip(new RayTrace(startPos, endPos, ignorePassableBlocks ? RayTrace.BlockCollisionOption.COLLIDER : RayTrace.BlockCollisionOption.OUTLINE, CraftFluidCollisionMode.toNMS(fluidCollisionMode), VoxelShapeCollision.empty()));
+        Vec3 startPos = CraftLocation.toVec3D(start);
+        Vec3 endPos = startPos.add(dir.getX(), dir.getY(), dir.getZ());
+        HitResult nmsHitResult = this.getHandle().clip(new ClipContext(startPos, endPos, ignorePassableBlocks ? ClipContext.Block.COLLIDER : ClipContext.Block.OUTLINE, CraftFluidCollisionMode.toNMS(fluidCollisionMode), CollisionContext.empty()));
 
         return CraftRayTraceResult.fromNMS(this, nmsHitResult);
     }
@@ -1063,9 +1058,9 @@ public class CraftWorld extends CraftRegionAccessor implements World {
 
     @Override
     public List<Player> getPlayers() {
-        List<Player> list = new ArrayList<Player>(world.players().size());
+        List<Player> list = new ArrayList<Player>(this.world.players().size());
 
-        for (EntityHuman human : world.players()) {
+        for (net.minecraft.world.entity.player.Player human : this.world.players()) {
             HumanEntity bukkitEntity = human.getBukkitEntity();
 
             if ((bukkitEntity != null) && (bukkitEntity instanceof Player)) {
@@ -1079,27 +1074,27 @@ public class CraftWorld extends CraftRegionAccessor implements World {
     @Override
     public void save() {
         this.server.checkSaveState();
-        boolean oldSave = world.noSave;
+        boolean oldSave = this.world.noSave;
 
-        world.noSave = false;
-        world.save(null, false, false);
+        this.world.noSave = false;
+        this.world.save(null, false, false);
 
-        world.noSave = oldSave;
+        this.world.noSave = oldSave;
     }
 
     @Override
     public boolean isAutoSave() {
-        return !world.noSave;
+        return !this.world.noSave;
     }
 
     @Override
     public void setAutoSave(boolean value) {
-        world.noSave = !value;
+        this.world.noSave = !value;
     }
 
     @Override
     public void setDifficulty(Difficulty difficulty) {
-        this.getHandle().serverLevelData.setDifficulty(EnumDifficulty.byId(difficulty.getValue()));
+        this.getHandle().serverLevelData.setDifficulty(net.minecraft.world.Difficulty.byId(difficulty.getValue()));
     }
 
     @Override
@@ -1109,60 +1104,60 @@ public class CraftWorld extends CraftRegionAccessor implements World {
 
     @Override
     public int getViewDistance() {
-        return world.getChunkSource().chunkMap.serverViewDistance;
+        return this.world.getChunkSource().chunkMap.serverViewDistance;
     }
 
     @Override
     public int getSimulationDistance() {
-        return world.getChunkSource().chunkMap.getDistanceManager().simulationDistance;
+        return this.world.getChunkSource().chunkMap.getDistanceManager().simulationDistance;
     }
 
     public BlockMetadataStore getBlockMetadata() {
-        return blockMetadata;
+        return this.blockMetadata;
     }
 
     @Override
     public boolean hasStorm() {
-        return world.levelData.isRaining();
+        return this.world.levelData.isRaining();
     }
 
     @Override
     public void setStorm(boolean hasStorm) {
-        world.levelData.setRaining(hasStorm);
-        setWeatherDuration(0); // Reset weather duration (legacy behaviour)
-        setClearWeatherDuration(0); // Reset clear weather duration (reset "/weather clear" commands)
+        this.world.levelData.setRaining(hasStorm);
+        this.setWeatherDuration(0); // Reset weather duration (legacy behaviour)
+        this.setClearWeatherDuration(0); // Reset clear weather duration (reset "/weather clear" commands)
     }
 
     @Override
     public int getWeatherDuration() {
-        return world.serverLevelData.getRainTime();
+        return this.world.serverLevelData.getRainTime();
     }
 
     @Override
     public void setWeatherDuration(int duration) {
-        world.serverLevelData.setRainTime(duration);
+        this.world.serverLevelData.setRainTime(duration);
     }
 
     @Override
     public boolean isThundering() {
-        return world.levelData.isThundering();
+        return this.world.levelData.isThundering();
     }
 
     @Override
     public void setThundering(boolean thundering) {
-        world.serverLevelData.setThundering(thundering);
-        setThunderDuration(0); // Reset weather duration (legacy behaviour)
-        setClearWeatherDuration(0); // Reset clear weather duration (reset "/weather clear" commands)
+        this.world.serverLevelData.setThundering(thundering);
+        this.setThunderDuration(0); // Reset weather duration (legacy behaviour)
+        this.setClearWeatherDuration(0); // Reset clear weather duration (reset "/weather clear" commands)
     }
 
     @Override
     public int getThunderDuration() {
-        return world.serverLevelData.getThunderTime();
+        return this.world.serverLevelData.getThunderTime();
     }
 
     @Override
     public void setThunderDuration(int duration) {
-        world.serverLevelData.setThunderTime(duration);
+        this.world.serverLevelData.setThunderTime(duration);
     }
 
     @Override
@@ -1172,41 +1167,41 @@ public class CraftWorld extends CraftRegionAccessor implements World {
 
     @Override
     public void setClearWeatherDuration(int duration) {
-        world.serverLevelData.setClearWeatherTime(duration);
+        this.world.serverLevelData.setClearWeatherTime(duration);
     }
 
     @Override
     public int getClearWeatherDuration() {
-        return world.serverLevelData.getClearWeatherTime();
+        return this.world.serverLevelData.getClearWeatherTime();
     }
 
     @Override
     public long getSeed() {
-        return world.getSeed();
+        return this.world.getSeed();
     }
 
     @Override
     public boolean getPVP() {
-        return world.pvpMode;
+        return this.world.pvpMode;
     }
 
     @Override
     public void setPVP(boolean pvp) {
-        world.pvpMode = pvp;
+        this.world.pvpMode = pvp;
     }
 
     public void playEffect(Player player, Effect effect, int data) {
-        playEffect(player.getLocation(), effect, data, 0);
+        this.playEffect(player.getLocation(), effect, data, 0);
     }
 
     @Override
     public void playEffect(Location location, Effect effect, int data) {
-        playEffect(location, effect, data, 64);
+        this.playEffect(location, effect, data, 64);
     }
 
     @Override
     public <T> void playEffect(Location loc, Effect effect, T data) {
-        playEffect(loc, effect, data, 64);
+        this.playEffect(loc, effect, data, 64);
     }
 
     @Override
@@ -1220,7 +1215,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
         }
 
         int datavalue = CraftEffect.getDataValue(effect, data);
-        playEffect(loc, effect, datavalue, radius);
+        this.playEffect(loc, effect, datavalue, radius);
     }
 
     @Override
@@ -1229,11 +1224,11 @@ public class CraftWorld extends CraftRegionAccessor implements World {
         Preconditions.checkArgument(location != null, "Location cannot be null");
         Preconditions.checkArgument(location.getWorld() != null, "World of Location cannot be null");
         int packetData = effect.getId();
-        PacketPlayOutWorldEvent packet = new PacketPlayOutWorldEvent(packetData, CraftLocation.toBlockPosition(location), data, false);
+        ClientboundLevelEventPacket packet = new ClientboundLevelEventPacket(packetData, CraftLocation.toBlockPosition(location), data, false);
         int distance;
         radius *= radius;
 
-        for (Player player : getPlayers()) {
+        for (Player player : this.getPlayers()) {
             if (((CraftPlayer) player).getHandle().connection == null) continue;
             if (!location.getWorld().equals(player.getWorld())) continue;
 
@@ -1247,7 +1242,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
     @Override
     public FallingBlock spawnFallingBlock(Location location, MaterialData data) throws IllegalArgumentException {
         Preconditions.checkArgument(data != null, "MaterialData cannot be null");
-        return spawnFallingBlock(location, data.getItemType(), data.getData());
+        return this.spawnFallingBlock(location, data.getItemType(), data.getData());
     }
 
     @Override
@@ -1256,7 +1251,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
         Preconditions.checkArgument(material != null, "Material cannot be null");
         Preconditions.checkArgument(material.isBlock(), "Material.%s must be a block", material);
 
-        EntityFallingBlock entity = EntityFallingBlock.fall(world, BlockPosition.containing(location.getX(), location.getY(), location.getZ()), CraftBlockType.bukkitToMinecraft(material).defaultBlockState(), SpawnReason.CUSTOM);
+        FallingBlockEntity entity = FallingBlockEntity.fall(this.world, BlockPos.containing(location.getX(), location.getY(), location.getZ()), CraftBlockType.bukkitToMinecraft(material).defaultBlockState(), SpawnReason.CUSTOM);
         return (FallingBlock) entity.getBukkitEntity();
     }
 
@@ -1265,7 +1260,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
         Preconditions.checkArgument(location != null, "Location cannot be null");
         Preconditions.checkArgument(data != null, "BlockData cannot be null");
 
-        EntityFallingBlock entity = EntityFallingBlock.fall(world, BlockPosition.containing(location.getX(), location.getY(), location.getZ()), ((CraftBlockData) data).getState(), SpawnReason.CUSTOM);
+        FallingBlockEntity entity = FallingBlockEntity.fall(this.world, BlockPos.containing(location.getX(), location.getY(), location.getZ()), ((CraftBlockData) data).getState(), SpawnReason.CUSTOM);
         return (FallingBlock) entity.getBukkitEntity();
     }
 
@@ -1276,96 +1271,96 @@ public class CraftWorld extends CraftRegionAccessor implements World {
 
     @Override
     public void setSpawnFlags(boolean allowMonsters, boolean allowAnimals) {
-        world.getChunkSource().setSpawnSettings(allowMonsters, allowAnimals);
+        this.world.getChunkSource().setSpawnSettings(allowMonsters, allowAnimals);
     }
 
     @Override
     public boolean getAllowAnimals() {
-        return world.getChunkSource().spawnFriendlies;
+        return this.world.getChunkSource().spawnFriendlies;
     }
 
     @Override
     public boolean getAllowMonsters() {
-        return world.getChunkSource().spawnEnemies;
+        return this.world.getChunkSource().spawnEnemies;
     }
 
     @Override
     public int getMinHeight() {
-        return world.getMinY();
+        return this.world.getMinY();
     }
 
     @Override
     public int getMaxHeight() {
-        return world.getMaxY() + 1;
+        return this.world.getMaxY() + 1;
     }
 
     @Override
     public int getLogicalHeight() {
-        return world.dimensionType().logicalHeight();
+        return this.world.dimensionType().logicalHeight();
     }
 
     @Override
     public boolean isNatural() {
-        return world.dimensionType().natural();
+        return this.world.dimensionType().natural();
     }
 
     @Override
     public boolean isBedWorks() {
-        return world.dimensionType().bedWorks();
+        return this.world.dimensionType().bedWorks();
     }
 
     @Override
     public boolean hasSkyLight() {
-        return world.dimensionType().hasSkyLight();
+        return this.world.dimensionType().hasSkyLight();
     }
 
     @Override
     public boolean hasCeiling() {
-        return world.dimensionType().hasCeiling();
+        return this.world.dimensionType().hasCeiling();
     }
 
     @Override
     public boolean isPiglinSafe() {
-        return world.dimensionType().piglinSafe();
+        return this.world.dimensionType().piglinSafe();
     }
 
     @Override
     public boolean isRespawnAnchorWorks() {
-        return world.dimensionType().respawnAnchorWorks();
+        return this.world.dimensionType().respawnAnchorWorks();
     }
 
     @Override
     public boolean hasRaids() {
-        return world.dimensionType().hasRaids();
+        return this.world.dimensionType().hasRaids();
     }
 
     @Override
     public boolean isUltraWarm() {
-        return world.dimensionType().ultraWarm();
+        return this.world.dimensionType().ultraWarm();
     }
 
     @Override
     public int getSeaLevel() {
-        return world.getSeaLevel();
+        return this.world.getSeaLevel();
     }
 
     @Override
     public boolean getKeepSpawnInMemory() {
-        return getGameRuleValue(GameRule.SPAWN_CHUNK_RADIUS) > 0;
+        return this.getGameRuleValue(GameRule.SPAWN_CHUNK_RADIUS) > 0;
     }
 
     @Override
     public void setKeepSpawnInMemory(boolean keepLoaded) {
         if (keepLoaded) {
-            setGameRule(GameRule.SPAWN_CHUNK_RADIUS, getGameRuleDefault(GameRule.SPAWN_CHUNK_RADIUS));
+            this.setGameRule(GameRule.SPAWN_CHUNK_RADIUS, this.getGameRuleDefault(GameRule.SPAWN_CHUNK_RADIUS));
         } else {
-            setGameRule(GameRule.SPAWN_CHUNK_RADIUS, 0);
+            this.setGameRule(GameRule.SPAWN_CHUNK_RADIUS, 0);
         }
     }
 
     @Override
     public int hashCode() {
-        return getUID().hashCode();
+        return this.getUID().hashCode();
     }
 
     @Override
@@ -1373,7 +1368,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
         if (obj == null) {
             return false;
         }
-        if (getClass() != obj.getClass()) {
+        if (this.getClass() != obj.getClass()) {
             return false;
         }
 
@@ -1384,14 +1379,14 @@ public class CraftWorld extends CraftRegionAccessor implements World {
 
     @Override
     public File getWorldFolder() {
-        return world.convertable.getLevelPath(SavedFile.ROOT).toFile().getParentFile();
+        return this.world.convertable.getLevelPath(LevelResource.ROOT).toFile().getParentFile();
     }
 
     @Override
     public void sendPluginMessage(Plugin source, String channel, byte[] message) {
-        StandardMessenger.validatePluginMessage(server.getMessenger(), source, channel, message);
+        StandardMessenger.validatePluginMessage(this.server.getMessenger(), source, channel, message);
 
-        for (Player player : getPlayers()) {
+        for (Player player : this.getPlayers()) {
             player.sendPluginMessage(source, channel, message);
         }
     }
@@ -1400,7 +1395,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
     public Set<String> getListeningPluginChannels() {
         Set<String> result = new HashSet<String>();
 
-        for (Player player : getPlayers()) {
+        for (Player player : this.getPlayers()) {
             result.addAll(player.getListeningPluginChannels());
         }
 
@@ -1409,94 +1404,94 @@ public class CraftWorld extends CraftRegionAccessor implements World {
 
     @Override
     public org.bukkit.WorldType getWorldType() {
-        return world.isFlat() ? org.bukkit.WorldType.FLAT : org.bukkit.WorldType.NORMAL;
+        return this.world.isFlat() ? org.bukkit.WorldType.FLAT : org.bukkit.WorldType.NORMAL;
     }
 
     @Override
     public boolean canGenerateStructures() {
-        return world.serverLevelData.worldGenOptions().generateStructures();
+        return this.world.serverLevelData.worldGenOptions().generateStructures();
     }
 
     @Override
     public boolean isHardcore() {
-        return world.getLevelData().isHardcore();
+        return this.world.getLevelData().isHardcore();
     }
 
     @Override
     public void setHardcore(boolean hardcore) {
-        world.serverLevelData.settings.hardcore = hardcore;
+        this.world.serverLevelData.settings.hardcore = hardcore;
     }
 
     @Override
     @Deprecated
     public long getTicksPerAnimalSpawns() {
-        return getTicksPerSpawns(SpawnCategory.ANIMAL);
+        return this.getTicksPerSpawns(SpawnCategory.ANIMAL);
     }
 
     @Override
     @Deprecated
     public void setTicksPerAnimalSpawns(int ticksPerAnimalSpawns) {
-        setTicksPerSpawns(SpawnCategory.ANIMAL, ticksPerAnimalSpawns);
+        this.setTicksPerSpawns(SpawnCategory.ANIMAL, ticksPerAnimalSpawns);
     }
 
     @Override
     @Deprecated
     public long getTicksPerMonsterSpawns() {
-        return getTicksPerSpawns(SpawnCategory.MONSTER);
+        return this.getTicksPerSpawns(SpawnCategory.MONSTER);
     }
 
     @Override
     @Deprecated
     public void setTicksPerMonsterSpawns(int ticksPerMonsterSpawns) {
-        setTicksPerSpawns(SpawnCategory.MONSTER, ticksPerMonsterSpawns);
+        this.setTicksPerSpawns(SpawnCategory.MONSTER, ticksPerMonsterSpawns);
     }
 
     @Override
     @Deprecated
     public long getTicksPerWaterSpawns() {
-        return getTicksPerSpawns(SpawnCategory.WATER_ANIMAL);
+        return this.getTicksPerSpawns(SpawnCategory.WATER_ANIMAL);
     }
 
     @Override
     @Deprecated
     public void setTicksPerWaterSpawns(int ticksPerWaterSpawns) {
-        setTicksPerSpawns(SpawnCategory.WATER_ANIMAL, ticksPerWaterSpawns);
+        this.setTicksPerSpawns(SpawnCategory.WATER_ANIMAL, ticksPerWaterSpawns);
     }
 
     @Override
     @Deprecated
     public long getTicksPerWaterAmbientSpawns() {
-        return getTicksPerSpawns(SpawnCategory.WATER_AMBIENT);
+        return this.getTicksPerSpawns(SpawnCategory.WATER_AMBIENT);
     }
 
     @Override
     @Deprecated
     public void setTicksPerWaterAmbientSpawns(int ticksPerWaterAmbientSpawns) {
-        setTicksPerSpawns(SpawnCategory.WATER_AMBIENT, ticksPerWaterAmbientSpawns);
+        this.setTicksPerSpawns(SpawnCategory.WATER_AMBIENT, ticksPerWaterAmbientSpawns);
     }
 
     @Override
     @Deprecated
     public long getTicksPerWaterUndergroundCreatureSpawns() {
-        return getTicksPerSpawns(SpawnCategory.WATER_UNDERGROUND_CREATURE);
+        return this.getTicksPerSpawns(SpawnCategory.WATER_UNDERGROUND_CREATURE);
     }
 
     @Override
     @Deprecated
     public void setTicksPerWaterUndergroundCreatureSpawns(int ticksPerWaterUndergroundCreatureSpawns) {
-        setTicksPerSpawns(SpawnCategory.WATER_UNDERGROUND_CREATURE, ticksPerWaterUndergroundCreatureSpawns);
+        this.setTicksPerSpawns(SpawnCategory.WATER_UNDERGROUND_CREATURE, ticksPerWaterUndergroundCreatureSpawns);
     }
 
     @Override
     @Deprecated
     public long getTicksPerAmbientSpawns() {
-        return getTicksPerSpawns(SpawnCategory.AMBIENT);
+        return this.getTicksPerSpawns(SpawnCategory.AMBIENT);
     }
 
     @Override
     @Deprecated
     public void setTicksPerAmbientSpawns(int ticksPerAmbientSpawns) {
-        setTicksPerSpawns(SpawnCategory.AMBIENT, ticksPerAmbientSpawns);
+        this.setTicksPerSpawns(SpawnCategory.AMBIENT, ticksPerAmbientSpawns);
     }
 
     @Override
@@ -1504,7 +1499,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
         Preconditions.checkArgument(spawnCategory != null, "SpawnCategory cannot be null");
         Preconditions.checkArgument(CraftSpawnCategory.isValidForLimits(spawnCategory), "SpawnCategory.%s are not supported", spawnCategory);
 
-        world.ticksPerSpawnCategory.put(spawnCategory, (long) ticksPerCategorySpawn);
+        this.world.ticksPerSpawnCategory.put(spawnCategory, (long) ticksPerCategorySpawn);
     }
 
     @Override
@@ -1512,99 +1507,99 @@ public class CraftWorld extends CraftRegionAccessor implements World {
         Preconditions.checkArgument(spawnCategory != null, "SpawnCategory cannot be null");
         Preconditions.checkArgument(CraftSpawnCategory.isValidForLimits(spawnCategory), "SpawnCategory.%s are not supported", spawnCategory);
 
-        return world.ticksPerSpawnCategory.getLong(spawnCategory);
+        return this.world.ticksPerSpawnCategory.getLong(spawnCategory);
     }
 
     @Override
     public void setMetadata(String metadataKey, MetadataValue newMetadataValue) {
-        server.getWorldMetadata().setMetadata(this, metadataKey, newMetadataValue);
+        this.server.getWorldMetadata().setMetadata(this, metadataKey, newMetadataValue);
     }
 
     @Override
     public List<MetadataValue> getMetadata(String metadataKey) {
-        return server.getWorldMetadata().getMetadata(this, metadataKey);
+        return this.server.getWorldMetadata().getMetadata(this, metadataKey);
     }
 
     @Override
     public boolean hasMetadata(String metadataKey) {
-        return server.getWorldMetadata().hasMetadata(this, metadataKey);
+        return this.server.getWorldMetadata().hasMetadata(this, metadataKey);
     }
 
     @Override
     public void removeMetadata(String metadataKey, Plugin owningPlugin) {
-        server.getWorldMetadata().removeMetadata(this, metadataKey, owningPlugin);
+        this.server.getWorldMetadata().removeMetadata(this, metadataKey, owningPlugin);
     }
 
     @Override
     @Deprecated
     public int getMonsterSpawnLimit() {
-        return getSpawnLimit(SpawnCategory.MONSTER);
+        return this.getSpawnLimit(SpawnCategory.MONSTER);
     }
 
     @Override
     @Deprecated
     public void setMonsterSpawnLimit(int limit) {
-        setSpawnLimit(SpawnCategory.MONSTER, limit);
+        this.setSpawnLimit(SpawnCategory.MONSTER, limit);
     }
 
     @Override
     @Deprecated
     public int getAnimalSpawnLimit() {
-        return getSpawnLimit(SpawnCategory.ANIMAL);
+        return this.getSpawnLimit(SpawnCategory.ANIMAL);
     }
 
     @Override
     @Deprecated
     public void setAnimalSpawnLimit(int limit) {
-        setSpawnLimit(SpawnCategory.ANIMAL, limit);
+        this.setSpawnLimit(SpawnCategory.ANIMAL, limit);
     }
 
     @Override
     @Deprecated
     public int getWaterAnimalSpawnLimit() {
-        return getSpawnLimit(SpawnCategory.WATER_ANIMAL);
+        return this.getSpawnLimit(SpawnCategory.WATER_ANIMAL);
     }
 
     @Override
     @Deprecated
     public void setWaterAnimalSpawnLimit(int limit) {
-        setSpawnLimit(SpawnCategory.WATER_ANIMAL, limit);
+        this.setSpawnLimit(SpawnCategory.WATER_ANIMAL, limit);
     }
 
     @Override
     @Deprecated
     public int getWaterAmbientSpawnLimit() {
-        return getSpawnLimit(SpawnCategory.WATER_AMBIENT);
+        return this.getSpawnLimit(SpawnCategory.WATER_AMBIENT);
     }
 
     @Override
     @Deprecated
     public void setWaterAmbientSpawnLimit(int limit) {
-        setSpawnLimit(SpawnCategory.WATER_AMBIENT, limit);
+        this.setSpawnLimit(SpawnCategory.WATER_AMBIENT, limit);
     }
 
     @Override
     @Deprecated
     public int getWaterUndergroundCreatureSpawnLimit() {
-        return getSpawnLimit(SpawnCategory.WATER_UNDERGROUND_CREATURE);
+        return this.getSpawnLimit(SpawnCategory.WATER_UNDERGROUND_CREATURE);
     }
 
     @Override
     @Deprecated
     public void setWaterUndergroundCreatureSpawnLimit(int limit) {
-        setSpawnLimit(SpawnCategory.WATER_UNDERGROUND_CREATURE, limit);
+        this.setSpawnLimit(SpawnCategory.WATER_UNDERGROUND_CREATURE, limit);
     }
 
     @Override
     @Deprecated
     public int getAmbientSpawnLimit() {
-        return getSpawnLimit(SpawnCategory.AMBIENT);
+        return this.getSpawnLimit(SpawnCategory.AMBIENT);
     }
 
     @Override
     @Deprecated
     public void setAmbientSpawnLimit(int limit) {
-        setSpawnLimit(SpawnCategory.AMBIENT, limit);
+        this.setSpawnLimit(SpawnCategory.AMBIENT, limit);
     }
 
     @Override
@@ -1612,9 +1607,9 @@ public class CraftWorld extends CraftRegionAccessor implements World {
         Preconditions.checkArgument(spawnCategory != null, "SpawnCategory cannot be null");
         Preconditions.checkArgument(CraftSpawnCategory.isValidForLimits(spawnCategory), "SpawnCategory.%s are not supported", spawnCategory);
 
-        int limit = spawnCategoryLimit.getOrDefault(spawnCategory, -1);
+        int limit = this.spawnCategoryLimit.getOrDefault(spawnCategory, -1);
         if (limit < 0) {
-            limit = server.getSpawnLimit(spawnCategory);
+            limit = this.server.getSpawnLimit(spawnCategory);
         }
         return limit;
     }
@@ -1624,32 +1619,32 @@ public class CraftWorld extends CraftRegionAccessor implements World {
         Preconditions.checkArgument(spawnCategory != null, "SpawnCategory cannot be null");
         Preconditions.checkArgument(CraftSpawnCategory.isValidForLimits(spawnCategory), "SpawnCategory.%s are not supported", spawnCategory);
 
-        spawnCategoryLimit.put(spawnCategory, limit);
+        this.spawnCategoryLimit.put(spawnCategory, limit);
     }
 
     @Override
     public void playNote(@NotNull Location loc, @NotNull Instrument instrument, @NotNull Note note) {
-        playSound(loc, instrument.getSound(), org.bukkit.SoundCategory.RECORDS, 3f, note.getPitch());
+        this.playSound(loc, instrument.getSound(), org.bukkit.SoundCategory.RECORDS, 3f, note.getPitch());
     }
 
     @Override
     public void playSound(Location loc, Sound sound, float volume, float pitch) {
-        playSound(loc, sound, org.bukkit.SoundCategory.MASTER, volume, pitch);
+        this.playSound(loc, sound, org.bukkit.SoundCategory.MASTER, volume, pitch);
     }
 
     @Override
     public void playSound(Location loc, String sound, float volume, float pitch) {
-        playSound(loc, sound, org.bukkit.SoundCategory.MASTER, volume, pitch);
+        this.playSound(loc, sound, org.bukkit.SoundCategory.MASTER, volume, pitch);
     }
 
     @Override
     public void playSound(Location loc, Sound sound, org.bukkit.SoundCategory category, float volume, float pitch) {
-        playSound(loc, sound, category, volume, pitch, getHandle().random.nextLong());;
+        this.playSound(loc, sound, category, volume, pitch, this.getHandle().random.nextLong());;
     }
 
     @Override
     public void playSound(Location loc, String sound, org.bukkit.SoundCategory category, float volume, float pitch) {
-        playSound(loc, sound, category, volume, pitch, getHandle().random.nextLong());
+        this.playSound(loc, sound, category, volume, pitch, this.getHandle().random.nextLong());
     }
 
     @Override
@@ -1660,7 +1655,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
         double y = loc.getY();
         double z = loc.getZ();
 
-        getHandle().playSeededSound(null, x, y, z, CraftSound.bukkitToMinecraft(sound), SoundCategory.valueOf(category.name()), volume, pitch, seed);
+        this.getHandle().playSeededSound(null, x, y, z, CraftSound.bukkitToMinecraft(sound), SoundSource.valueOf(category.name()), volume, pitch, seed);
     }
 
     @Override
@@ -1671,36 +1666,36 @@ public class CraftWorld extends CraftRegionAccessor implements World {
         double y = loc.getY();
         double z = loc.getZ();
 
-        PacketPlayOutNamedSoundEffect packet = new PacketPlayOutNamedSoundEffect(Holder.direct(SoundEffect.createVariableRangeEvent(MinecraftKey.parse(sound))), SoundCategory.valueOf(category.name()), x, y, z, volume, pitch, seed);
-        world.getServer().getPlayerList().broadcast(null, x, y, z, volume > 1.0F ? 16.0F * volume : 16.0D, this.world.dimension(), packet);
+        ClientboundSoundPacket packet = new ClientboundSoundPacket(Holder.direct(SoundEvent.createVariableRangeEvent(ResourceLocation.parse(sound))), SoundSource.valueOf(category.name()), x, y, z, volume, pitch, seed);
+        this.world.getServer().getPlayerList().broadcast(null, x, y, z, volume > 1.0F ? 16.0F * volume : 16.0D, this.world.dimension(), packet);
     }
 
     @Override
     public void playSound(Entity entity, Sound sound, float volume, float pitch) {
-        playSound(entity, sound, org.bukkit.SoundCategory.MASTER, volume, pitch);
+        this.playSound(entity, sound, org.bukkit.SoundCategory.MASTER, volume, pitch);
     }
 
     @Override
     public void playSound(Entity entity, String sound, float volume, float pitch) {
-        playSound(entity, sound, org.bukkit.SoundCategory.MASTER, volume, pitch);
+        this.playSound(entity, sound, org.bukkit.SoundCategory.MASTER, volume, pitch);
     }
 
     @Override
     public void playSound(Entity entity, Sound sound, org.bukkit.SoundCategory category, float volume, float pitch) {
-        playSound(entity, sound, category, volume, pitch, getHandle().random.nextLong());
+        this.playSound(entity, sound, category, volume, pitch, this.getHandle().random.nextLong());
     }
 
     @Override
     public void playSound(Entity entity, String sound, org.bukkit.SoundCategory category, float volume, float pitch) {
-        playSound(entity, sound, category, volume, pitch, getHandle().random.nextLong());
+        this.playSound(entity, sound, category, volume, pitch, this.getHandle().random.nextLong());
     }
 
     @Override
     public void playSound(Entity entity, Sound sound, org.bukkit.SoundCategory category, float volume, float pitch, long seed) {
         if (!(entity instanceof CraftEntity craftEntity) || entity.getWorld() != this || sound == null || category == null) return;
 
-        PacketPlayOutEntitySound packet = new PacketPlayOutEntitySound(CraftSound.bukkitToMinecraftHolder(sound), net.minecraft.sounds.SoundCategory.valueOf(category.name()), craftEntity.getHandle(), volume, pitch, seed);
-        PlayerChunkMap.EntityTracker entityTracker = getHandle().getChunkSource().chunkMap.entityMap.get(entity.getEntityId());
+        ClientboundSoundEntityPacket packet = new ClientboundSoundEntityPacket(CraftSound.bukkitToMinecraftHolder(sound), net.minecraft.sounds.SoundSource.valueOf(category.name()), craftEntity.getHandle(), volume, pitch, seed);
+        ChunkMap.TrackedEntity entityTracker = this.getHandle().getChunkSource().chunkMap.entityMap.get(entity.getEntityId());
         if (entityTracker != null) {
             entityTracker.broadcastAndSend(packet);
         }
@@ -1710,44 +1705,44 @@ public class CraftWorld extends CraftRegionAccessor implements World {
     public void playSound(Entity entity, String sound, org.bukkit.SoundCategory category, float volume, float pitch, long seed) {
         if (!(entity instanceof CraftEntity craftEntity) || entity.getWorld() != this || sound == null || category == null) return;
 
-        PacketPlayOutEntitySound packet = new PacketPlayOutEntitySound(Holder.direct(SoundEffect.createVariableRangeEvent(MinecraftKey.parse(sound))), net.minecraft.sounds.SoundCategory.valueOf(category.name()), craftEntity.getHandle(), volume, pitch, seed);
-        PlayerChunkMap.EntityTracker entityTracker = getHandle().getChunkSource().chunkMap.entityMap.get(entity.getEntityId());
+        ClientboundSoundEntityPacket packet = new ClientboundSoundEntityPacket(Holder.direct(SoundEvent.createVariableRangeEvent(ResourceLocation.parse(sound))), net.minecraft.sounds.SoundSource.valueOf(category.name()), craftEntity.getHandle(), volume, pitch, seed);
+        ChunkMap.TrackedEntity entityTracker = this.getHandle().getChunkSource().chunkMap.entityMap.get(entity.getEntityId());
         if (entityTracker != null) {
             entityTracker.broadcastAndSend(packet);
         }
     }
 
-    private Map<String, GameRules.GameRuleKey<?>> gamerules;
-    public synchronized Map<String, GameRules.GameRuleKey<?>> getGameRulesNMS() {
-        if (gamerules != null) {
-            return gamerules;
+    private Map<String, GameRules.Key<?>> gamerules;
+    public synchronized Map<String, GameRules.Key<?>> getGameRulesNMS() {
+        if (this.gamerules != null) {
+            return this.gamerules;
         }
 
-        return this.gamerules = getGameRulesNMS(getHandle().getGameRules());
+        return this.gamerules = CraftWorld.getGameRulesNMS(this.getHandle().getGameRules());
     }
 
-    public static Map<String, GameRules.GameRuleKey<?>> getGameRulesNMS(GameRules gameRules) {
-        Map<String, GameRules.GameRuleKey<?>> gamerules = new HashMap<>();
-        gameRules.visitGameRuleTypes(new GameRules.GameRuleVisitor() {
+    public static Map<String, GameRules.Key<?>> getGameRulesNMS(GameRules gameRules) {
+        Map<String, GameRules.Key<?>> gamerules = new HashMap<>();
+        gameRules.visitGameRuleTypes(new GameRules.GameRuleTypeVisitor() {
             @Override
-            public <T extends GameRules.GameRuleValue<T>> void visit(GameRules.GameRuleKey<T> gamerules_gamerulekey, GameRules.GameRuleDefinition<T> gamerules_gameruledefinition) {
-                gamerules.put(gamerules_gamerulekey.getId(), gamerules_gamerulekey);
+            public <T extends GameRules.Value<T>> void visit(GameRules.Key<T> key, GameRules.Type<T> type) {
+                gamerules.put(key.getId(), key);
             }
         });
         return gamerules;
     }
 
-    private Map<String, GameRules.GameRuleDefinition<?>> gameruleDefinitions;
-    public synchronized Map<String, GameRules.GameRuleDefinition<?>> getGameRuleDefinitions() {
-        if (gameruleDefinitions != null) {
-            return gameruleDefinitions;
+    private Map<String, GameRules.Type<?>> gameruleDefinitions;
+    public synchronized Map<String, GameRules.Type<?>> getGameRuleDefinitions() {
+        if (this.gameruleDefinitions != null) {
+            return this.gameruleDefinitions;
         }
 
-        Map<String, GameRules.GameRuleDefinition<?>> gameruleDefinitions = new HashMap<>();
-        getHandle().getGameRules().visitGameRuleTypes(new GameRules.GameRuleVisitor() {
+        Map<String, GameRules.Type<?>> gameruleDefinitions = new HashMap<>();
+        this.getHandle().getGameRules().visitGameRuleTypes(new GameRules.GameRuleTypeVisitor() {
             @Override
-            public <T extends GameRules.GameRuleValue<T>> void visit(GameRules.GameRuleKey<T> gamerules_gamerulekey, GameRules.GameRuleDefinition<T> gamerules_gameruledefinition) {
-                gameruleDefinitions.put(gamerules_gamerulekey.getId(), gamerules_gameruledefinition);
+            public <T extends GameRules.Value<T>> void visit(GameRules.Key<T> key, GameRules.Type<T> type) {
+                gameruleDefinitions.put(key.getId(), type);
             }
         });
 
@@ -1761,7 +1756,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
             return null;
         }
 
-        GameRules.GameRuleValue<?> value = getHandle().getGameRules().getRule(getGameRulesNMS().get(rule));
+        GameRules.Value<?> value = this.getHandle().getGameRules().getRule(this.getGameRulesNMS().get(rule));
         return value != null ? value.toString() : "";
     }
 
@@ -1770,36 +1765,36 @@ public class CraftWorld extends CraftRegionAccessor implements World {
         // No null values allowed
         if (rule == null || value == null) return false;
 
-        if (!isGameRule(rule)) return false;
+        if (!this.isGameRule(rule)) return false;
 
-        GameRules.GameRuleValue<?> handle = getHandle().getGameRules().getRule(getGameRulesNMS().get(rule));
+        GameRules.Value<?> handle = this.getHandle().getGameRules().getRule(this.getGameRulesNMS().get(rule));
         handle.deserialize(value);
-        handle.onChanged(getHandle());
+        handle.onChanged(this.getHandle());
         return true;
     }
 
     @Override
     public String[] getGameRules() {
-        return getGameRulesNMS().keySet().toArray(new String[getGameRulesNMS().size()]);
+        return this.getGameRulesNMS().keySet().toArray(new String[this.getGameRulesNMS().size()]);
     }
 
     @Override
     public boolean isGameRule(String rule) {
         Preconditions.checkArgument(rule != null, "String rule cannot be null");
         Preconditions.checkArgument(!rule.isEmpty(), "String rule cannot be empty");
-        return getGameRulesNMS().containsKey(rule);
+        return this.getGameRulesNMS().containsKey(rule);
     }
 
     @Override
     public <T> T getGameRuleValue(GameRule<T> rule) {
         Preconditions.checkArgument(rule != null, "GameRule cannot be null");
-        return convert(rule, getHandle().getGameRules().getRule(getGameRulesNMS().get(rule.getName())));
+        return this.convert(rule, this.getHandle().getGameRules().getRule(this.getGameRulesNMS().get(rule.getName())));
     }
 
     @Override
     public <T> T getGameRuleDefault(GameRule<T> rule) {
         Preconditions.checkArgument(rule != null, "GameRule cannot be null");
-        return convert(rule, getGameRuleDefinitions().get(rule.getName()).createRule());
+        return this.convert(rule, this.getGameRuleDefinitions().get(rule.getName()).createRule());
     }
 
     @Override
@@ -1807,22 +1802,22 @@ public class CraftWorld extends CraftRegionAccessor implements World {
         Preconditions.checkArgument(rule != null, "GameRule cannot be null");
         Preconditions.checkArgument(newValue != null, "GameRule value cannot be null");
 
-        if (!isGameRule(rule.getName())) return false;
+        if (!this.isGameRule(rule.getName())) return false;
 
-        GameRules.GameRuleValue<?> handle = getHandle().getGameRules().getRule(getGameRulesNMS().get(rule.getName()));
+        GameRules.Value<?> handle = this.getHandle().getGameRules().getRule(this.getGameRulesNMS().get(rule.getName()));
         handle.deserialize(newValue.toString());
-        handle.onChanged(getHandle());
+        handle.onChanged(this.getHandle());
         return true;
     }
 
-    private <T> T convert(GameRule<T> rule, GameRules.GameRuleValue<?> value) {
+    private <T> T convert(GameRule<T> rule, GameRules.Value<?> value) {
         if (value == null) {
             return null;
         }
 
-        if (value instanceof GameRules.GameRuleBoolean) {
-            return rule.getType().cast(((GameRules.GameRuleBoolean) value).get());
-        } else if (value instanceof GameRules.GameRuleInt) {
+        if (value instanceof GameRules.BooleanValue) {
+            return rule.getType().cast(((GameRules.BooleanValue) value).get());
+        } else if (value instanceof GameRules.IntegerValue) {
             return rule.getType().cast(value.getCommandResult());
         } else {
             throw new IllegalArgumentException("Invalid GameRule type (" + value + ") for GameRule " + rule.getName());
@@ -1840,72 +1835,72 @@ public class CraftWorld extends CraftRegionAccessor implements World {
 
     @Override
     public void spawnParticle(Particle particle, Location location, int count) {
-        spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count);
+        this.spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count);
     }
 
     @Override
     public void spawnParticle(Particle particle, double x, double y, double z, int count) {
-        spawnParticle(particle, x, y, z, count, null);
+        this.spawnParticle(particle, x, y, z, count, null);
     }
 
     @Override
     public <T> void spawnParticle(Particle particle, Location location, int count, T data) {
-        spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, data);
+        this.spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, data);
     }
 
     @Override
     public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, T data) {
-        spawnParticle(particle, x, y, z, count, 0, 0, 0, data);
+        this.spawnParticle(particle, x, y, z, count, 0, 0, 0, data);
     }
 
     @Override
     public void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ) {
-        spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, offsetX, offsetY, offsetZ);
+        this.spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, offsetX, offsetY, offsetZ);
     }
 
     @Override
     public void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ) {
-        spawnParticle(particle, x, y, z, count, offsetX, offsetY, offsetZ, null);
+        this.spawnParticle(particle, x, y, z, count, offsetX, offsetY, offsetZ, null);
     }
 
     @Override
     public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, T data) {
-        spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, offsetX, offsetY, offsetZ, data);
+        this.spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, offsetX, offsetY, offsetZ, data);
     }
 
     @Override
     public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, T data) {
-        spawnParticle(particle, x, y, z, count, offsetX, offsetY, offsetZ, 1, data);
+        this.spawnParticle(particle, x, y, z, count, offsetX, offsetY, offsetZ, 1, data);
     }
 
     @Override
     public void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra) {
-        spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, offsetX, offsetY, offsetZ, extra);
+        this.spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, offsetX, offsetY, offsetZ, extra);
     }
 
     @Override
     public void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra) {
-        spawnParticle(particle, x, y, z, count, offsetX, offsetY, offsetZ, extra, null);
+        this.spawnParticle(particle, x, y, z, count, offsetX, offsetY, offsetZ, extra, null);
     }
 
     @Override
     public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) {
-        spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, offsetX, offsetY, offsetZ, extra, data);
+        this.spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, offsetX, offsetY, offsetZ, extra, data);
     }
 
     @Override
     public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) {
-        spawnParticle(particle, x, y, z, count, offsetX, offsetY, offsetZ, extra, data, false);
+        this.spawnParticle(particle, x, y, z, count, offsetX, offsetY, offsetZ, extra, data, false);
     }
 
     @Override
     public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) {
-        spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, offsetX, offsetY, offsetZ, extra, data, force);
+        this.spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, offsetX, offsetY, offsetZ, extra, data, force);
     }
 
     @Override
     public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) {
-        getHandle().sendParticlesSource(
+        this.getHandle().sendParticlesSource(
                 null, // Sender
                 CraftParticle.createParticleParam(particle, data), // Particle
                 false, force,
@@ -1924,41 +1919,41 @@ public class CraftWorld extends CraftRegionAccessor implements World {
 
         // Manually map the mess of the old StructureType to the new StructureType and normal Structure
         if (org.bukkit.StructureType.MINESHAFT == structureType) {
-            result = locateNearestStructure(origin, StructureType.MINESHAFT, radius, findUnexplored);
+            result = this.locateNearestStructure(origin, StructureType.MINESHAFT, radius, findUnexplored);
         } else if (org.bukkit.StructureType.VILLAGE == structureType) {
-            result = locateNearestStructure(origin, List.of(Structure.VILLAGE_DESERT, Structure.VILLAGE_PLAINS, Structure.VILLAGE_SAVANNA, Structure.VILLAGE_SNOWY, Structure.VILLAGE_TAIGA), radius, findUnexplored);
+            result = this.locateNearestStructure(origin, List.of(Structure.VILLAGE_DESERT, Structure.VILLAGE_PLAINS, Structure.VILLAGE_SAVANNA, Structure.VILLAGE_SNOWY, Structure.VILLAGE_TAIGA), radius, findUnexplored);
         } else if (org.bukkit.StructureType.NETHER_FORTRESS == structureType) {
-            result = locateNearestStructure(origin, StructureType.FORTRESS, radius, findUnexplored);
+            result = this.locateNearestStructure(origin, StructureType.FORTRESS, radius, findUnexplored);
         } else if (org.bukkit.StructureType.STRONGHOLD == structureType) {
-            result = locateNearestStructure(origin, StructureType.STRONGHOLD, radius, findUnexplored);
+            result = this.locateNearestStructure(origin, StructureType.STRONGHOLD, radius, findUnexplored);
         } else if (org.bukkit.StructureType.JUNGLE_PYRAMID == structureType) {
-            result = locateNearestStructure(origin, StructureType.JUNGLE_TEMPLE, radius, findUnexplored);
+            result = this.locateNearestStructure(origin, StructureType.JUNGLE_TEMPLE, radius, findUnexplored);
         } else if (org.bukkit.StructureType.OCEAN_RUIN == structureType) {
-            result = locateNearestStructure(origin, StructureType.OCEAN_RUIN, radius, findUnexplored);
+            result = this.locateNearestStructure(origin, StructureType.OCEAN_RUIN, radius, findUnexplored);
         } else if (org.bukkit.StructureType.DESERT_PYRAMID == structureType) {
-            result = locateNearestStructure(origin, StructureType.DESERT_PYRAMID, radius, findUnexplored);
+            result = this.locateNearestStructure(origin, StructureType.DESERT_PYRAMID, radius, findUnexplored);
         } else if (org.bukkit.StructureType.IGLOO == structureType) {
-            result = locateNearestStructure(origin, StructureType.IGLOO, radius, findUnexplored);
+            result = this.locateNearestStructure(origin, StructureType.IGLOO, radius, findUnexplored);
         } else if (org.bukkit.StructureType.SWAMP_HUT == structureType) {
-            result = locateNearestStructure(origin, StructureType.SWAMP_HUT, radius, findUnexplored);
+            result = this.locateNearestStructure(origin, StructureType.SWAMP_HUT, radius, findUnexplored);
         } else if (org.bukkit.StructureType.OCEAN_MONUMENT == structureType) {
-            result = locateNearestStructure(origin, StructureType.OCEAN_MONUMENT, radius, findUnexplored);
+            result = this.locateNearestStructure(origin, StructureType.OCEAN_MONUMENT, radius, findUnexplored);
         } else if (org.bukkit.StructureType.END_CITY == structureType) {
-            result = locateNearestStructure(origin, StructureType.END_CITY, radius, findUnexplored);
+            result = this.locateNearestStructure(origin, StructureType.END_CITY, radius, findUnexplored);
         } else if (org.bukkit.StructureType.WOODLAND_MANSION == structureType) {
-            result = locateNearestStructure(origin, StructureType.WOODLAND_MANSION, radius, findUnexplored);
+            result = this.locateNearestStructure(origin, StructureType.WOODLAND_MANSION, radius, findUnexplored);
         } else if (org.bukkit.StructureType.BURIED_TREASURE == structureType) {
-            result = locateNearestStructure(origin, StructureType.BURIED_TREASURE, radius, findUnexplored);
+            result = this.locateNearestStructure(origin, StructureType.BURIED_TREASURE, radius, findUnexplored);
         } else if (org.bukkit.StructureType.SHIPWRECK == structureType) {
-            result = locateNearestStructure(origin, StructureType.SHIPWRECK, radius, findUnexplored);
+            result = this.locateNearestStructure(origin, StructureType.SHIPWRECK, radius, findUnexplored);
         } else if (org.bukkit.StructureType.PILLAGER_OUTPOST == structureType) {
-            result = locateNearestStructure(origin, Structure.PILLAGER_OUTPOST, radius, findUnexplored);
+            result = this.locateNearestStructure(origin, Structure.PILLAGER_OUTPOST, radius, findUnexplored);
         } else if (org.bukkit.StructureType.NETHER_FOSSIL == structureType) {
-            result = locateNearestStructure(origin, StructureType.NETHER_FOSSIL, radius, findUnexplored);
+            result = this.locateNearestStructure(origin, StructureType.NETHER_FOSSIL, radius, findUnexplored);
         } else if (org.bukkit.StructureType.RUINED_PORTAL == structureType) {
-            result = locateNearestStructure(origin, StructureType.RUINED_PORTAL, radius, findUnexplored);
+            result = this.locateNearestStructure(origin, StructureType.RUINED_PORTAL, radius, findUnexplored);
         } else if (org.bukkit.StructureType.BASTION_REMNANT == structureType) {
-            result = locateNearestStructure(origin, Structure.BASTION_REMNANT, radius, findUnexplored);
+            result = this.locateNearestStructure(origin, Structure.BASTION_REMNANT, radius, findUnexplored);
         }
 
         return (result == null) ? null : result.getLocation();
@@ -1973,23 +1968,23 @@ public class CraftWorld extends CraftRegionAccessor implements World {
             }
         }
 
-        return locateNearestStructure(origin, structures, radius, findUnexplored);
+        return this.locateNearestStructure(origin, structures, radius, findUnexplored);
     }
 
     @Override
     public StructureSearchResult locateNearestStructure(Location origin, Structure structure, int radius, boolean findUnexplored) {
-        return locateNearestStructure(origin, List.of(structure), radius, findUnexplored);
+        return this.locateNearestStructure(origin, List.of(structure), radius, findUnexplored);
     }
 
     public StructureSearchResult locateNearestStructure(Location origin, List<Structure> structures, int radius, boolean findUnexplored) {
-        BlockPosition originPos = BlockPosition.containing(origin.getX(), origin.getY(), origin.getZ());
+        BlockPos originPos = BlockPos.containing(origin.getX(), origin.getY(), origin.getZ());
         List<Holder<net.minecraft.world.level.levelgen.structure.Structure>> holders = new ArrayList<>();
 
         for (Structure structure : structures) {
             holders.add(Holder.direct(CraftStructure.bukkitToMinecraft(structure)));
         }
 
-        Pair<BlockPosition, Holder<net.minecraft.world.level.levelgen.structure.Structure>> found = getHandle().getChunkSource().getGenerator().findNearestMapStructure(getHandle(), HolderSet.direct(holders), originPos, radius, findUnexplored);
+        Pair<BlockPos, Holder<net.minecraft.world.level.levelgen.structure.Structure>> found = this.getHandle().getChunkSource().getGenerator().findNearestMapStructure(this.getHandle(), HolderSet.direct(holders), originPos, radius, findUnexplored);
         if (found == null) {
             return null;
         }
@@ -1999,21 +1994,21 @@ public class CraftWorld extends CraftRegionAccessor implements World {
 
     @Override
     public BiomeSearchResult locateNearestBiome(Location origin, int radius, Biome... biomes) {
-        return locateNearestBiome(origin, radius, 32, 64, biomes);
+        return this.locateNearestBiome(origin, radius, 32, 64, biomes);
     }
 
     @Override
     public BiomeSearchResult locateNearestBiome(Location origin, int radius, int horizontalInterval, int verticalInterval, Biome... biomes) {
-        BlockPosition originPos = BlockPosition.containing(origin.getX(), origin.getY(), origin.getZ());
-        Set<Holder<BiomeBase>> holders = new HashSet<>();
+        BlockPos originPos = BlockPos.containing(origin.getX(), origin.getY(), origin.getZ());
+        Set<Holder<net.minecraft.world.level.biome.Biome>> holders = new HashSet<>();
 
         for (Biome biome : biomes) {
             holders.add(CraftBiome.bukkitToMinecraftHolder(biome));
         }
 
-        Climate.Sampler sampler = getHandle().getChunkSource().randomState().sampler();
+        Climate.Sampler sampler = this.getHandle().getChunkSource().randomState().sampler();
         // The given predicate is evaluated once at the start of the search, so performance isn't a large concern.
-        Pair<BlockPosition, Holder<BiomeBase>> found = getHandle().getChunkSource().getGenerator().getBiomeSource().findClosestBiome3d(originPos, radius, horizontalInterval, verticalInterval, holders::contains, sampler, getHandle());
+        Pair<BlockPos, Holder<net.minecraft.world.level.biome.Biome>> found = this.getHandle().getChunkSource().getGenerator().getBiomeSource().findClosestBiome3d(originPos, radius, horizontalInterval, verticalInterval, holders::contains, sampler, this.getHandle());
         if (found == null) {
             return null;
         }
@@ -2026,40 +2021,40 @@ public class CraftWorld extends CraftRegionAccessor implements World {
         Preconditions.checkArgument(location != null, "Location cannot be null");
         Preconditions.checkArgument(radius >= 0, "Radius value (%s) cannot be negative", radius);
 
-        PersistentRaid persistentRaid = world.getRaids();
+        Raids persistentRaid = this.world.getRaids();
         net.minecraft.world.entity.raid.Raid raid = persistentRaid.getNearbyRaid(CraftLocation.toBlockPosition(location), radius * radius);
         return (raid == null) ? null : new CraftRaid(raid);
     }
 
     @Override
     public List<Raid> getRaids() {
-        PersistentRaid persistentRaid = world.getRaids();
+        Raids persistentRaid = this.world.getRaids();
         return persistentRaid.raidMap.values().stream().map(CraftRaid::new).collect(Collectors.toList());
     }
 
     @Override
     public DragonBattle getEnderDragonBattle() {
-        return (getHandle().getDragonFight() == null) ? null : new CraftDragonBattle(getHandle().getDragonFight());
+        return (this.getHandle().getDragonFight() == null) ? null : new CraftDragonBattle(this.getHandle().getDragonFight());
     }
 
     @Override
     public Collection<GeneratedStructure> getStructures(int x, int z) {
-        return getStructures(x, z, struct -> true);
+        return this.getStructures(x, z, struct -> true);
     }
 
     @Override
     public Collection<GeneratedStructure> getStructures(int x, int z, Structure structure) {
         Preconditions.checkArgument(structure != null, "Structure cannot be null");
 
-        IRegistry<net.minecraft.world.level.levelgen.structure.Structure> registry = CraftRegistry.getMinecraftRegistry(Registries.STRUCTURE);
-        MinecraftKey key = registry.getKey(CraftStructure.bukkitToMinecraft(structure));
+        net.minecraft.core.Registry<net.minecraft.world.level.levelgen.structure.Structure> registry = CraftRegistry.getMinecraftRegistry(Registries.STRUCTURE);
+        ResourceLocation key = registry.getKey(CraftStructure.bukkitToMinecraft(structure));
 
-        return getStructures(x, z, struct -> registry.getKey(struct).equals(key));
+        return this.getStructures(x, z, struct -> registry.getKey(struct).equals(key));
     }
 
     private List<GeneratedStructure> getStructures(int x, int z, Predicate<net.minecraft.world.level.levelgen.structure.Structure> predicate) {
         List<GeneratedStructure> structures = new ArrayList<>();
-        for (StructureStart start : getHandle().structureManager().startsForStructure(new ChunkCoordIntPair(x, z), predicate)) {
+        for (StructureStart start : this.getHandle().structureManager().startsForStructure(new ChunkPos(x, z), predicate)) {
             structures.add(new CraftGeneratedStructure(start));
         }
 
@@ -2068,7 +2063,7 @@ public class CraftWorld extends CraftRegionAccessor implements World {
 
     @Override
     public PersistentDataContainer getPersistentDataContainer() {
-        return persistentDataContainer;
+        return this.persistentDataContainer;
     }
 
     @Override
@@ -2076,15 +2071,15 @@ public class CraftWorld extends CraftRegionAccessor implements World {
         return CraftFeatureFlag.getFromNMS(this.getHandle().enabledFeatures()).stream().map(FeatureFlag.class::cast).collect(Collectors.toUnmodifiableSet());
     }
 
-    public void storeBukkitValues(NBTTagCompound c) {
+    public void storeBukkitValues(CompoundTag c) {
         if (!this.persistentDataContainer.isEmpty()) {
             c.put("BukkitValues", this.persistentDataContainer.toTagCompound());
         }
     }
 
-    public void readBukkitValues(NBTBase c) {
-        if (c instanceof NBTTagCompound) {
-            this.persistentDataContainer.putAll((NBTTagCompound) c);
+    public void readBukkitValues(Tag c) {
+        if (c instanceof CompoundTag) {
+            this.persistentDataContainer.putAll((CompoundTag) c);
         }
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorldBorder.java b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorldBorder.java
index 063d202cb9..1fe5ae164e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorldBorder.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/CraftWorldBorder.java
@@ -2,7 +2,7 @@ package org.bukkit.craftbukkit;
 
 import com.google.common.base.Preconditions;
 import java.util.concurrent.TimeUnit;
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.WorldBorder;
@@ -24,7 +24,7 @@ public class CraftWorldBorder implements WorldBorder {
 
     @Override
     public World getWorld() {
-        return world;
+        return this.world;
     }
 
     @Override
@@ -44,7 +44,7 @@ public class CraftWorldBorder implements WorldBorder {
 
     @Override
     public void setSize(double newSize, long time) {
-        setSize(Math.min(getMaxSize(), Math.max(1.0D, newSize)), TimeUnit.SECONDS, Math.min(9223372036854775L, Math.max(0L, time)));
+        this.setSize(Math.min(this.getMaxSize(), Math.max(1.0D, newSize)), TimeUnit.SECONDS, Math.min(9223372036854775L, Math.max(0L, time)));
     }
 
     @Override
@@ -125,7 +125,7 @@ public class CraftWorldBorder implements WorldBorder {
     public boolean isInside(Location location) {
         Preconditions.checkArgument(location != null, "location cannot be null");
 
-        return (world == null || location.getWorld().equals(this.world)) && this.handle.isWithinBounds(BlockPosition.containing(location.getX(), location.getY(), location.getZ()));
+        return (this.world == null || location.getWorld().equals(this.world)) && this.handle.isWithinBounds(BlockPos.containing(location.getX(), location.getY(), location.getZ()));
     }
 
     @Override
@@ -139,10 +139,10 @@ public class CraftWorldBorder implements WorldBorder {
     }
 
     public net.minecraft.world.level.border.WorldBorder getHandle() {
-        return handle;
+        return this.handle;
     }
 
     public boolean isVirtual() {
-        return world == null;
+        return this.world == null;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/Main.java b/paper-server/src/main/java/org/bukkit/craftbukkit/Main.java
index c2c4126b3f..efc2595982 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/Main.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/Main.java
@@ -23,117 +23,117 @@ public class Main {
         // Todo: Installation script
         OptionParser parser = new OptionParser() {
             {
-                acceptsAll(asList("?", "help"), "Show the help");
+                this.acceptsAll(Main.asList("?", "help"), "Show the help");
 
-                acceptsAll(asList("c", "config"), "Properties file to use")
+                this.acceptsAll(Main.asList("c", "config"), "Properties file to use")
                         .withRequiredArg()
                         .ofType(File.class)
                         .defaultsTo(new File("server.properties"))
                         .describedAs("Properties file");
 
-                acceptsAll(asList("P", "plugins"), "Plugin directory to use")
+                this.acceptsAll(Main.asList("P", "plugins"), "Plugin directory to use")
                         .withRequiredArg()
                         .ofType(File.class)
                         .defaultsTo(new File("plugins"))
                         .describedAs("Plugin directory");
 
-                acceptsAll(asList("h", "host", "server-ip"), "Host to listen on")
+                this.acceptsAll(Main.asList("h", "host", "server-ip"), "Host to listen on")
                         .withRequiredArg()
                         .ofType(String.class)
                         .describedAs("Hostname or IP");
 
-                acceptsAll(asList("W", "world-dir", "universe", "world-container"), "World container")
+                this.acceptsAll(Main.asList("W", "world-dir", "universe", "world-container"), "World container")
                         .withRequiredArg()
                         .ofType(File.class)
                         .defaultsTo(new File("."))
                         .describedAs("Directory containing worlds");
 
-                acceptsAll(asList("w", "world", "level-name"), "World name")
+                this.acceptsAll(Main.asList("w", "world", "level-name"), "World name")
                         .withRequiredArg()
                         .ofType(String.class)
                         .describedAs("World name");
 
-                acceptsAll(asList("p", "port", "server-port"), "Port to listen on")
+                this.acceptsAll(Main.asList("p", "port", "server-port"), "Port to listen on")
                         .withRequiredArg()
                         .ofType(Integer.class)
                         .describedAs("Port");
 
-                accepts("serverId", "Server ID")
+                this.accepts("serverId", "Server ID")
                         .withRequiredArg();
 
-                accepts("jfrProfile", "Enable JFR profiling");
+                this.accepts("jfrProfile", "Enable JFR profiling");
 
-                accepts("pidFile", "pid File")
+                this.accepts("pidFile", "pid File")
                         .withRequiredArg()
                         .withValuesConvertedBy(new PathConverter());
 
-                acceptsAll(asList("o", "online-mode"), "Whether to use online authentication")
+                this.acceptsAll(Main.asList("o", "online-mode"), "Whether to use online authentication")
                         .withRequiredArg()
                         .ofType(Boolean.class)
                         .describedAs("Authentication");
 
-                acceptsAll(asList("s", "size", "max-players"), "Maximum amount of players")
+                this.acceptsAll(Main.asList("s", "size", "max-players"), "Maximum amount of players")
                         .withRequiredArg()
                         .ofType(Integer.class)
                         .describedAs("Server size");
 
-                acceptsAll(asList("d", "date-format"), "Format of the date to display in the console (for log entries)")
+                this.acceptsAll(Main.asList("d", "date-format"), "Format of the date to display in the console (for log entries)")
                         .withRequiredArg()
                         .ofType(SimpleDateFormat.class)
                         .describedAs("Log date format");
 
-                acceptsAll(asList("log-pattern"), "Specfies the log filename pattern")
+                this.acceptsAll(Main.asList("log-pattern"), "Specfies the log filename pattern")
                         .withRequiredArg()
                         .ofType(String.class)
                         .defaultsTo("server.log")
                         .describedAs("Log filename");
 
-                acceptsAll(asList("log-limit"), "Limits the maximum size of the log file (0 = unlimited)")
+                this.acceptsAll(Main.asList("log-limit"), "Limits the maximum size of the log file (0 = unlimited)")
                         .withRequiredArg()
                         .ofType(Integer.class)
                         .defaultsTo(0)
                         .describedAs("Max log size");
 
-                acceptsAll(asList("log-count"), "Specified how many log files to cycle through")
+                this.acceptsAll(Main.asList("log-count"), "Specified how many log files to cycle through")
                         .withRequiredArg()
                         .ofType(Integer.class)
                         .defaultsTo(1)
                         .describedAs("Log count");
 
-                acceptsAll(asList("log-append"), "Whether to append to the log file")
+                this.acceptsAll(Main.asList("log-append"), "Whether to append to the log file")
                         .withRequiredArg()
                         .ofType(Boolean.class)
                         .defaultsTo(true)
                         .describedAs("Log append");
 
-                acceptsAll(asList("log-strip-color"), "Strips color codes from log file");
+                this.acceptsAll(Main.asList("log-strip-color"), "Strips color codes from log file");
 
-                acceptsAll(asList("b", "bukkit-settings"), "File for bukkit settings")
+                this.acceptsAll(Main.asList("b", "bukkit-settings"), "File for bukkit settings")
                         .withRequiredArg()
                         .ofType(File.class)
                         .defaultsTo(new File("bukkit.yml"))
                         .describedAs("Yml file");
 
-                acceptsAll(asList("C", "commands-settings"), "File for command settings")
+                this.acceptsAll(Main.asList("C", "commands-settings"), "File for command settings")
                         .withRequiredArg()
                         .ofType(File.class)
                         .defaultsTo(new File("commands.yml"))
                         .describedAs("Yml file");
 
-                acceptsAll(asList("forceUpgrade"), "Whether to force a world upgrade");
-                acceptsAll(asList("eraseCache"), "Whether to force cache erase during world upgrade");
-                acceptsAll(asList("recreateRegionFiles"), "Whether to recreate region files during world upgrade");
-                acceptsAll(asList("nogui"), "Disables the graphical console");
+                this.acceptsAll(Main.asList("forceUpgrade"), "Whether to force a world upgrade");
+                this.acceptsAll(Main.asList("eraseCache"), "Whether to force cache erase during world upgrade");
+                this.acceptsAll(Main.asList("recreateRegionFiles"), "Whether to recreate region files during world upgrade");
+                this.acceptsAll(Main.asList("nogui"), "Disables the graphical console");
 
-                acceptsAll(asList("nojline"), "Disables jline and emulates the vanilla console");
+                this.acceptsAll(Main.asList("nojline"), "Disables jline and emulates the vanilla console");
 
-                acceptsAll(asList("noconsole"), "Disables the console");
+                this.acceptsAll(Main.asList("noconsole"), "Disables the console");
 
-                acceptsAll(asList("v", "version"), "Show the CraftBukkit Version");
+                this.acceptsAll(Main.asList("v", "version"), "Show the CraftBukkit Version");
 
-                acceptsAll(asList("demo"), "Demo mode");
+                this.acceptsAll(Main.asList("demo"), "Demo mode");
 
-                acceptsAll(asList("initSettings"), "Only create configuration files and then exit"); // SPIGOT-5761: Add initSettings option
+                this.acceptsAll(Main.asList("initSettings"), "Only create configuration files and then exit"); // SPIGOT-5761: Add initSettings option
             }
         };
 
@@ -172,14 +172,14 @@ public class Main {
                 String jline_UnsupportedTerminal = new String(new char[]{'j', 'l', 'i', 'n', 'e', '.', 'U', 'n', 's', 'u', 'p', 'p', 'o', 'r', 't', 'e', 'd', 'T', 'e', 'r', 'm', 'i', 'n', 'a', 'l'});
                 String jline_terminal = new String(new char[]{'j', 'l', 'i', 'n', 'e', '.', 't', 'e', 'r', 'm', 'i', 'n', 'a', 'l'});
 
-                useJline = !(jline_UnsupportedTerminal).equals(System.getProperty(jline_terminal));
+                Main.useJline = !(jline_UnsupportedTerminal).equals(System.getProperty(jline_terminal));
 
                 if (options.has("nojline")) {
                     System.setProperty("user.language", "en");
-                    useJline = false;
+                    Main.useJline = false;
                 }
 
-                if (useJline) {
+                if (Main.useJline) {
                     AnsiConsole.systemInstall();
                 } else {
                     // This ensures the terminal literal will always match the jline implementation
@@ -187,7 +187,7 @@ public class Main {
                 }
 
                 if (options.has("noconsole")) {
-                    useConsole = false;
+                    Main.useConsole = false;
                 }
 
                 if (Main.class.getPackage().getImplementationVendor() != null && System.getProperty("IReallyKnowWhatIAmDoingISwear") == null) {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java b/paper-server/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java
index 55557ffabb..d119093d3a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancement.java
@@ -17,30 +17,30 @@ public class CraftAdvancement implements org.bukkit.advancement.Advancement {
     }
 
     public AdvancementHolder getHandle() {
-        return handle;
+        return this.handle;
     }
 
     @Override
     public NamespacedKey getKey() {
-        return CraftNamespacedKey.fromMinecraft(handle.id());
+        return CraftNamespacedKey.fromMinecraft(this.handle.id());
     }
 
     @Override
     public Collection<String> getCriteria() {
-        return Collections.unmodifiableCollection(handle.value().criteria().keySet());
+        return Collections.unmodifiableCollection(this.handle.value().criteria().keySet());
     }
 
     @Override
     public AdvancementRequirements getRequirements() {
-        return new CraftAdvancementRequirements(handle.value().requirements());
+        return new CraftAdvancementRequirements(this.handle.value().requirements());
     }
 
     @Override
     public AdvancementDisplay getDisplay() {
-        if (handle.value().display().isEmpty()) {
+        if (this.handle.value().display().isEmpty()) {
             return null;
         }
 
-        return new CraftAdvancementDisplay(handle.value().display().get());
+        return new CraftAdvancementDisplay(this.handle.value().display().get());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementDisplay.java b/paper-server/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementDisplay.java
index edf19a70a5..8ca8685231 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementDisplay.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementDisplay.java
@@ -1,6 +1,6 @@
 package org.bukkit.craftbukkit.advancement;
 
-import net.minecraft.advancements.AdvancementDisplay;
+import net.minecraft.advancements.DisplayInfo;
 import org.bukkit.advancement.AdvancementDisplayType;
 import org.bukkit.craftbukkit.inventory.CraftItemStack;
 import org.bukkit.craftbukkit.util.CraftChatMessage;
@@ -8,58 +8,58 @@ import org.bukkit.inventory.ItemStack;
 
 public class CraftAdvancementDisplay implements org.bukkit.advancement.AdvancementDisplay {
 
-    private final AdvancementDisplay handle;
+    private final DisplayInfo handle;
 
-    public CraftAdvancementDisplay(AdvancementDisplay handle) {
+    public CraftAdvancementDisplay(DisplayInfo handle) {
         this.handle = handle;
     }
 
-    public AdvancementDisplay getHandle() {
-        return handle;
+    public DisplayInfo getHandle() {
+        return this.handle;
     }
 
     @Override
     public String getTitle() {
-        return CraftChatMessage.fromComponent(handle.getTitle());
+        return CraftChatMessage.fromComponent(this.handle.getTitle());
     }
 
     @Override
     public String getDescription() {
-        return CraftChatMessage.fromComponent(handle.getDescription());
+        return CraftChatMessage.fromComponent(this.handle.getDescription());
     }
 
     @Override
     public ItemStack getIcon() {
-        return CraftItemStack.asBukkitCopy(handle.getIcon());
+        return CraftItemStack.asBukkitCopy(this.handle.getIcon());
     }
 
     @Override
     public boolean shouldShowToast() {
-        return handle.shouldShowToast();
+        return this.handle.shouldShowToast();
     }
 
     @Override
     public boolean shouldAnnounceChat() {
-        return handle.shouldAnnounceChat();
+        return this.handle.shouldAnnounceChat();
     }
 
     @Override
     public boolean isHidden() {
-        return handle.isHidden();
+        return this.handle.isHidden();
     }
 
     @Override
     public float getX() {
-        return handle.getX();
+        return this.handle.getX();
     }
 
     @Override
     public float getY() {
-        return handle.getY();
+        return this.handle.getY();
     }
 
     @Override
     public AdvancementDisplayType getType() {
-        return AdvancementDisplayType.values()[handle.getType().ordinal()];
+        return AdvancementDisplayType.values()[this.handle.getType().ordinal()];
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementProgress.java b/paper-server/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementProgress.java
index ee1a1ea5cf..aeb04a65a1 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementProgress.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementProgress.java
@@ -5,17 +5,17 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.Date;
 import net.minecraft.advancements.CriterionProgress;
-import net.minecraft.server.AdvancementDataPlayer;
+import net.minecraft.server.PlayerAdvancements;
 import org.bukkit.advancement.Advancement;
 import org.bukkit.advancement.AdvancementProgress;
 
 public class CraftAdvancementProgress implements AdvancementProgress {
 
     private final CraftAdvancement advancement;
-    private final AdvancementDataPlayer playerData;
+    private final PlayerAdvancements playerData;
     private final net.minecraft.advancements.AdvancementProgress handle;
 
-    public CraftAdvancementProgress(CraftAdvancement advancement, AdvancementDataPlayer player, net.minecraft.advancements.AdvancementProgress handle) {
+    public CraftAdvancementProgress(CraftAdvancement advancement, PlayerAdvancements player, net.minecraft.advancements.AdvancementProgress handle) {
         this.advancement = advancement;
         this.playerData = player;
         this.handle = handle;
@@ -23,37 +23,37 @@ public class CraftAdvancementProgress implements AdvancementProgress {
 
     @Override
     public Advancement getAdvancement() {
-        return advancement;
+        return this.advancement;
     }
 
     @Override
     public boolean isDone() {
-        return handle.isDone();
+        return this.handle.isDone();
     }
 
     @Override
     public boolean awardCriteria(String criteria) {
-        return playerData.award(advancement.getHandle(), criteria);
+        return this.playerData.award(this.advancement.getHandle(), criteria);
     }
 
     @Override
     public boolean revokeCriteria(String criteria) {
-        return playerData.revoke(advancement.getHandle(), criteria);
+        return this.playerData.revoke(this.advancement.getHandle(), criteria);
     }
 
     @Override
     public Date getDateAwarded(String criteria) {
-        CriterionProgress criterion = handle.getCriterion(criteria);
+        CriterionProgress criterion = this.handle.getCriterion(criteria);
         return (criterion == null) ? null : Date.from(criterion.getObtained());
     }
 
     @Override
     public Collection<String> getRemainingCriteria() {
-        return Collections.unmodifiableCollection(Lists.newArrayList(handle.getRemainingCriteria()));
+        return Collections.unmodifiableCollection(Lists.newArrayList(this.handle.getRemainingCriteria()));
     }
 
     @Override
     public Collection<String> getAwardedCriteria() {
-        return Collections.unmodifiableCollection(Lists.newArrayList(handle.getCompletedCriteria()));
+        return Collections.unmodifiableCollection(Lists.newArrayList(this.handle.getCompletedCriteria()));
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementRequirement.java b/paper-server/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementRequirement.java
index fd567c06a0..4c4cd09fdc 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementRequirement.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementRequirement.java
@@ -16,11 +16,11 @@ public class CraftAdvancementRequirement implements AdvancementRequirement {
     @NotNull
     @Override
     public List<String> getRequiredCriteria() {
-        return Collections.unmodifiableList(requirements);
+        return Collections.unmodifiableList(this.requirements);
     }
 
     @Override
     public boolean isStrict() {
-        return requirements.size() == 1;
+        return this.requirements.size() == 1;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementRequirements.java b/paper-server/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementRequirements.java
index 6993911bdc..c45faed358 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementRequirements.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/advancement/CraftAdvancementRequirements.java
@@ -16,6 +16,6 @@ public class CraftAdvancementRequirements implements org.bukkit.advancement.Adva
     @NotNull
     @Override
     public List<AdvancementRequirement> getRequirements() {
-        return requirements.requirements().stream().map((requirement) -> (AdvancementRequirement) new CraftAdvancementRequirement(requirement)).toList();
+        return this.requirements.requirements().stream().map((requirement) -> (AdvancementRequirement) new CraftAdvancementRequirement(requirement)).toList();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttribute.java b/paper-server/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttribute.java
index 9899366320..8797a47be1 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttribute.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttribute.java
@@ -3,9 +3,7 @@ package org.bukkit.craftbukkit.attribute;
 import com.google.common.base.Preconditions;
 import java.util.Locale;
 import net.minecraft.core.Holder;
-import net.minecraft.core.IRegistry;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.world.entity.ai.attributes.AttributeBase;
 import org.bukkit.NamespacedKey;
 import org.bukkit.Registry;
 import org.bukkit.attribute.Attribute;
@@ -15,16 +13,16 @@ import org.bukkit.craftbukkit.util.ApiVersion;
 import org.bukkit.craftbukkit.util.Handleable;
 import org.jetbrains.annotations.NotNull;
 
-public class CraftAttribute implements Attribute, Handleable<AttributeBase> {
+public class CraftAttribute implements Attribute, Handleable<net.minecraft.world.entity.ai.attributes.Attribute> {
 
     private static int count = 0;
 
-    public static Attribute minecraftToBukkit(AttributeBase minecraft) {
+    public static Attribute minecraftToBukkit(net.minecraft.world.entity.ai.attributes.Attribute minecraft) {
         return CraftRegistry.minecraftToBukkit(minecraft, Registries.ATTRIBUTE, Registry.ATTRIBUTE);
     }
 
-    public static Attribute minecraftHolderToBukkit(Holder<AttributeBase> minecraft) {
-        return minecraftToBukkit(minecraft.value());
+    public static Attribute minecraftHolderToBukkit(Holder<net.minecraft.world.entity.ai.attributes.Attribute> minecraft) {
+        return CraftAttribute.minecraftToBukkit(minecraft.value());
     }
 
     public static Attribute stringToBukkit(String string) {
@@ -40,16 +38,16 @@ public class CraftAttribute implements Attribute, Handleable<AttributeBase> {
         return CraftRegistry.get(Registry.ATTRIBUTE, key, ApiVersion.CURRENT);
     }
 
-    public static AttributeBase bukkitToMinecraft(Attribute bukkit) {
+    public static net.minecraft.world.entity.ai.attributes.Attribute bukkitToMinecraft(Attribute bukkit) {
         return CraftRegistry.bukkitToMinecraft(bukkit);
     }
 
-    public static Holder<AttributeBase> bukkitToMinecraftHolder(Attribute bukkit) {
+    public static Holder<net.minecraft.world.entity.ai.attributes.Attribute> bukkitToMinecraftHolder(Attribute bukkit) {
         Preconditions.checkArgument(bukkit != null);
 
-        IRegistry<AttributeBase> registry = CraftRegistry.getMinecraftRegistry(Registries.ATTRIBUTE);
+        net.minecraft.core.Registry<net.minecraft.world.entity.ai.attributes.Attribute> registry = CraftRegistry.getMinecraftRegistry(Registries.ATTRIBUTE);
 
-        if (registry.wrapAsHolder(bukkitToMinecraft(bukkit)) instanceof Holder.c<AttributeBase> holder) {
+        if (registry.wrapAsHolder(CraftAttribute.bukkitToMinecraft(bukkit)) instanceof Holder.Reference<net.minecraft.world.entity.ai.attributes.Attribute> holder) {
             return holder;
         }
 
@@ -64,11 +62,11 @@ public class CraftAttribute implements Attribute, Handleable<AttributeBase> {
     }
 
     private final NamespacedKey key;
-    private final AttributeBase attributeBase;
+    private final net.minecraft.world.entity.ai.attributes.Attribute attributeBase;
     private final String name;
     private final int ordinal;
 
-    public CraftAttribute(NamespacedKey key, AttributeBase attributeBase) {
+    public CraftAttribute(NamespacedKey key, net.minecraft.world.entity.ai.attributes.Attribute attributeBase) {
         this.key = key;
         this.attributeBase = attributeBase;
         // For backwards compatibility, minecraft values will stile return the uppercase name without the namespace,
@@ -80,46 +78,46 @@ public class CraftAttribute implements Attribute, Handleable<AttributeBase> {
         } else {
             this.name = key.toString();
         }
-        this.ordinal = count++;
+        this.ordinal = CraftAttribute.count++;
     }
 
     @Override
-    public AttributeBase getHandle() {
-        return attributeBase;
+    public net.minecraft.world.entity.ai.attributes.Attribute getHandle() {
+        return this.attributeBase;
     }
 
     @NotNull
     @Override
     public NamespacedKey getKey() {
-        return key;
+        return this.key;
     }
 
     @NotNull
     @Override
     public String getTranslationKey() {
-        return attributeBase.getDescriptionId();
+        return this.attributeBase.getDescriptionId();
     }
 
     @Override
     public int compareTo(@NotNull Attribute attribute) {
-        return ordinal - attribute.ordinal();
+        return this.ordinal - attribute.ordinal();
     }
 
     @NotNull
     @Override
     public String name() {
-        return name;
+        return this.name;
     }
 
     @Override
     public int ordinal() {
-        return ordinal;
+        return this.ordinal;
     }
 
     @Override
     public String toString() {
         // For backwards compatibility
-        return name();
+        return this.name();
     }
 
     @Override
@@ -132,11 +130,11 @@ public class CraftAttribute implements Attribute, Handleable<AttributeBase> {
             return false;
         }
 
-        return getKey().equals(otherAttribute.getKey());
+        return this.getKey().equals(otherAttribute.getKey());
     }
 
     @Override
     public int hashCode() {
-        return getKey().hashCode();
+        return this.getKey().hashCode();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java b/paper-server/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java
index 82076cb7f9..de0eba19c0 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeInstance.java
@@ -12,34 +12,34 @@ import org.bukkit.inventory.EquipmentSlot;
 
 public class CraftAttributeInstance implements AttributeInstance {
 
-    private final net.minecraft.world.entity.ai.attributes.AttributeModifiable handle;
+    private final net.minecraft.world.entity.ai.attributes.AttributeInstance handle;
     private final Attribute attribute;
 
-    public CraftAttributeInstance(net.minecraft.world.entity.ai.attributes.AttributeModifiable handle, Attribute attribute) {
+    public CraftAttributeInstance(net.minecraft.world.entity.ai.attributes.AttributeInstance handle, Attribute attribute) {
         this.handle = handle;
         this.attribute = attribute;
     }
 
     @Override
     public Attribute getAttribute() {
-        return attribute;
+        return this.attribute;
     }
 
     @Override
     public double getBaseValue() {
-        return handle.getBaseValue();
+        return this.handle.getBaseValue();
     }
 
     @Override
     public void setBaseValue(double d) {
-        handle.setBaseValue(d);
+        this.handle.setBaseValue(d);
     }
 
     @Override
     public Collection<AttributeModifier> getModifiers() {
         List<AttributeModifier> result = new ArrayList<AttributeModifier>();
-        for (net.minecraft.world.entity.ai.attributes.AttributeModifier nms : handle.getModifiers()) {
-            result.add(convert(nms));
+        for (net.minecraft.world.entity.ai.attributes.AttributeModifier nms : this.handle.getModifiers()) {
+            result.add(CraftAttributeInstance.convert(nms));
         }
 
         return result;
@@ -48,23 +48,23 @@ public class CraftAttributeInstance implements AttributeInstance {
     @Override
     public void addModifier(AttributeModifier modifier) {
         Preconditions.checkArgument(modifier != null, "modifier");
-        handle.addPermanentModifier(convert(modifier));
+        this.handle.addPermanentModifier(CraftAttributeInstance.convert(modifier));
     }
 
     @Override
     public void removeModifier(AttributeModifier modifier) {
         Preconditions.checkArgument(modifier != null, "modifier");
-        handle.removeModifier(convert(modifier));
+        this.handle.removeModifier(CraftAttributeInstance.convert(modifier));
     }
 
     @Override
     public double getValue() {
-        return handle.getValue();
+        return this.handle.getValue();
     }
 
     @Override
     public double getDefaultValue() {
-       return handle.getAttribute().value().getDefaultValue();
+       return this.handle.getAttribute().value().getDefaultValue();
     }
 
     public static net.minecraft.world.entity.ai.attributes.AttributeModifier convert(AttributeModifier bukkit) {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java b/paper-server/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java
index 063bcf5faf..de40e52296 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/attribute/CraftAttributeMap.java
@@ -1,23 +1,23 @@
 package org.bukkit.craftbukkit.attribute;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.ai.attributes.AttributeMapBase;
+import net.minecraft.world.entity.ai.attributes.AttributeMap;
 import org.bukkit.attribute.Attributable;
 import org.bukkit.attribute.Attribute;
 import org.bukkit.attribute.AttributeInstance;
 
 public class CraftAttributeMap implements Attributable {
 
-    private final AttributeMapBase handle;
+    private final AttributeMap handle;
 
-    public CraftAttributeMap(AttributeMapBase handle) {
+    public CraftAttributeMap(AttributeMap handle) {
         this.handle = handle;
     }
 
     @Override
     public AttributeInstance getAttribute(Attribute attribute) {
         Preconditions.checkArgument(attribute != null, "attribute");
-        net.minecraft.world.entity.ai.attributes.AttributeModifiable nms = handle.getInstance(CraftAttribute.bukkitToMinecraftHolder(attribute));
+        net.minecraft.world.entity.ai.attributes.AttributeInstance nms = this.handle.getInstance(CraftAttribute.bukkitToMinecraftHolder(attribute));
 
         return (nms == null) ? null : new CraftAttributeInstance(nms, attribute);
     }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/ban/CraftIpBanEntry.java b/paper-server/src/main/java/org/bukkit/craftbukkit/ban/CraftIpBanEntry.java
index e6d6689dd2..847da7f813 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/ban/CraftIpBanEntry.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/ban/CraftIpBanEntry.java
@@ -4,8 +4,8 @@ import com.google.common.net.InetAddresses;
 import java.net.InetAddress;
 import java.time.Instant;
 import java.util.Date;
-import net.minecraft.server.players.IpBanEntry;
 import net.minecraft.server.players.IpBanList;
+import net.minecraft.server.players.IpBanListEntry;
 import org.bukkit.BanEntry;
 
 public final class CraftIpBanEntry implements BanEntry<InetAddress> {
@@ -17,7 +17,7 @@ public final class CraftIpBanEntry implements BanEntry<InetAddress> {
     private Date expiration;
     private String reason;
 
-    public CraftIpBanEntry(String target, IpBanEntry entry, IpBanList list) {
+    public CraftIpBanEntry(String target, IpBanListEntry entry, IpBanList list) {
         this.list = list;
         this.target = target;
         this.created = entry.getCreated() != null ? new Date(entry.getCreated().getTime()) : null;
@@ -63,7 +63,7 @@ public final class CraftIpBanEntry implements BanEntry<InetAddress> {
 
     @Override
     public void setExpiration(Date expiration) {
-        if (expiration != null && expiration.getTime() == minorDate.getTime()) {
+        if (expiration != null && expiration.getTime() == CraftIpBanEntry.minorDate.getTime()) {
             expiration = null; // Forces "forever"
         }
 
@@ -82,12 +82,12 @@ public final class CraftIpBanEntry implements BanEntry<InetAddress> {
 
     @Override
     public void save() {
-        IpBanEntry entry = new IpBanEntry(this.target, this.created, this.source, this.expiration, this.reason);
+        IpBanListEntry entry = new IpBanListEntry(this.target, this.created, this.source, this.expiration, this.reason);
         this.list.add(entry);
     }
 
     @Override
     public void remove() {
-        this.list.remove(target);
+        this.list.remove(this.target);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/ban/CraftIpBanList.java b/paper-server/src/main/java/org/bukkit/craftbukkit/ban/CraftIpBanList.java
index 46b47d5466..94be0e848d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/ban/CraftIpBanList.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/ban/CraftIpBanList.java
@@ -8,8 +8,8 @@ import java.time.Duration;
 import java.time.Instant;
 import java.util.Date;
 import java.util.Set;
-import net.minecraft.server.players.IpBanEntry;
 import net.minecraft.server.players.IpBanList;
+import net.minecraft.server.players.IpBanListEntry;
 import org.bukkit.BanEntry;
 
 public class CraftIpBanList implements org.bukkit.ban.IpBanList {
@@ -23,12 +23,12 @@ public class CraftIpBanList implements org.bukkit.ban.IpBanList {
     public BanEntry<InetAddress> getBanEntry(String target) {
         Preconditions.checkArgument(target != null, "Target cannot be null");
 
-        IpBanEntry entry = this.list.get(target);
+        IpBanListEntry entry = this.list.get(target);
         if (entry == null) {
             return null;
         }
 
-        return new CraftIpBanEntry(target, entry, list);
+        return new CraftIpBanEntry(target, entry, this.list);
     }
 
     @Override
@@ -40,13 +40,13 @@ public class CraftIpBanList implements org.bukkit.ban.IpBanList {
     public BanEntry<InetAddress> addBan(String target, String reason, Date expires, String source) {
         Preconditions.checkArgument(target != null, "Ban target cannot be null");
 
-        IpBanEntry entry = new IpBanEntry(target, new Date(),
+        IpBanListEntry entry = new IpBanListEntry(target, new Date(),
                 (source == null || source.isBlank()) ? null : source, expires,
                 (reason == null || reason.isBlank()) ? null : reason);
 
         this.list.add(entry);
 
-        return new CraftIpBanEntry(target, entry, list);
+        return new CraftIpBanEntry(target, entry, this.list);
     }
 
     @Override
@@ -57,22 +57,22 @@ public class CraftIpBanList implements org.bukkit.ban.IpBanList {
     @Override
     public BanEntry<InetAddress> addBan(InetAddress target, String reason, Instant expires, String source) {
         Date date = expires != null ? Date.from(expires) : null;
-        return addBan(target, reason, date, source);
+        return this.addBan(target, reason, date, source);
     }
 
     @Override
     public BanEntry<InetAddress> addBan(InetAddress target, String reason, Duration duration, String source) {
         Instant instant = duration != null ? Instant.now().plus(duration) : null;
-        return addBan(target, reason, instant, source);
+        return this.addBan(target, reason, instant, source);
     }
 
     @Override
     public Set<BanEntry> getBanEntries() {
         ImmutableSet.Builder<BanEntry> builder = ImmutableSet.builder();
-        for (String target : list.getUserList()) {
-            IpBanEntry ipBanEntry = list.get(target);
+        for (String target : this.list.getUserList()) {
+            IpBanListEntry ipBanEntry = this.list.get(target);
             if (ipBanEntry != null) {
-                builder.add(new CraftIpBanEntry(target, ipBanEntry, list));
+                builder.add(new CraftIpBanEntry(target, ipBanEntry, this.list));
             }
         }
         return builder.build();
@@ -81,10 +81,10 @@ public class CraftIpBanList implements org.bukkit.ban.IpBanList {
     @Override
     public Set<BanEntry<InetAddress>> getEntries() {
         ImmutableSet.Builder<BanEntry<InetAddress>> builder = ImmutableSet.builder();
-        for (String target : list.getUserList()) {
-            IpBanEntry ipBanEntry = list.get(target);
+        for (String target : this.list.getUserList()) {
+            IpBanListEntry ipBanEntry = this.list.get(target);
             if (ipBanEntry != null) {
-                builder.add(new CraftIpBanEntry(target, ipBanEntry, list));
+                builder.add(new CraftIpBanEntry(target, ipBanEntry, this.list));
             }
         }
         return builder.build();
@@ -98,7 +98,7 @@ public class CraftIpBanList implements org.bukkit.ban.IpBanList {
 
     @Override
     public boolean isBanned(InetAddress target) {
-        return this.isBanned(getIpFromAddress(target));
+        return this.isBanned(this.getIpFromAddress(target));
     }
 
     @Override
@@ -109,7 +109,7 @@ public class CraftIpBanList implements org.bukkit.ban.IpBanList {
 
     @Override
     public void pardon(InetAddress target) {
-        this.pardon(getIpFromAddress(target));
+        this.pardon(this.getIpFromAddress(target));
     }
 
     private String getIpFromAddress(InetAddress address) {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/ban/CraftProfileBanEntry.java b/paper-server/src/main/java/org/bukkit/craftbukkit/ban/CraftProfileBanEntry.java
index 6cc8990ee0..13e5e44b06 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/ban/CraftProfileBanEntry.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/ban/CraftProfileBanEntry.java
@@ -3,22 +3,22 @@ package org.bukkit.craftbukkit.ban;
 import com.mojang.authlib.GameProfile;
 import java.time.Instant;
 import java.util.Date;
-import net.minecraft.server.players.GameProfileBanEntry;
-import net.minecraft.server.players.GameProfileBanList;
+import net.minecraft.server.players.UserBanList;
+import net.minecraft.server.players.UserBanListEntry;
 import org.bukkit.BanEntry;
 import org.bukkit.craftbukkit.profile.CraftPlayerProfile;
 import org.bukkit.profile.PlayerProfile;
 
 public final class CraftProfileBanEntry implements BanEntry<PlayerProfile> {
     private static final Date minorDate = Date.from(Instant.parse("1899-12-31T04:00:00Z"));
-    private final GameProfileBanList list;
+    private final UserBanList list;
     private final GameProfile profile;
     private Date created;
     private String source;
     private Date expiration;
     private String reason;
 
-    public CraftProfileBanEntry(GameProfile profile, GameProfileBanEntry entry, GameProfileBanList list) {
+    public CraftProfileBanEntry(GameProfile profile, UserBanListEntry entry, UserBanList list) {
         this.list = list;
         this.profile = profile;
         this.created = entry.getCreated() != null ? new Date(entry.getCreated().getTime()) : null;
@@ -64,7 +64,7 @@ public final class CraftProfileBanEntry implements BanEntry<PlayerProfile> {
 
     @Override
     public void setExpiration(Date expiration) {
-        if (expiration != null && expiration.getTime() == minorDate.getTime()) {
+        if (expiration != null && expiration.getTime() == CraftProfileBanEntry.minorDate.getTime()) {
             expiration = null; // Forces "forever"
         }
 
@@ -83,7 +83,7 @@ public final class CraftProfileBanEntry implements BanEntry<PlayerProfile> {
 
     @Override
     public void save() {
-        GameProfileBanEntry entry = new GameProfileBanEntry(this.profile, this.created, this.source, this.expiration, this.reason);
+        UserBanListEntry entry = new UserBanListEntry(this.profile, this.created, this.source, this.expiration, this.reason);
         this.list.add(entry);
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/ban/CraftProfileBanList.java b/paper-server/src/main/java/org/bukkit/craftbukkit/ban/CraftProfileBanList.java
index c7bf2cb854..172202accf 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/ban/CraftProfileBanList.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/ban/CraftProfileBanList.java
@@ -9,17 +9,17 @@ import java.util.Date;
 import java.util.Set;
 import java.util.UUID;
 import net.minecraft.server.MinecraftServer;
-import net.minecraft.server.players.GameProfileBanEntry;
-import net.minecraft.server.players.GameProfileBanList;
+import net.minecraft.server.players.UserBanList;
+import net.minecraft.server.players.UserBanListEntry;
 import org.bukkit.BanEntry;
 import org.bukkit.ban.ProfileBanList;
 import org.bukkit.craftbukkit.profile.CraftPlayerProfile;
 import org.bukkit.profile.PlayerProfile;
 
 public class CraftProfileBanList implements ProfileBanList {
-    private final GameProfileBanList list;
+    private final UserBanList list;
 
-    public CraftProfileBanList(GameProfileBanList list) {
+    public CraftProfileBanList(UserBanList list) {
         this.list = list;
     }
 
@@ -27,7 +27,7 @@ public class CraftProfileBanList implements ProfileBanList {
     public BanEntry<PlayerProfile> getBanEntry(String target) {
         Preconditions.checkArgument(target != null, "Target cannot be null");
 
-        return this.getBanEntry(getProfile(target));
+        return this.getBanEntry(CraftProfileBanList.getProfile(target));
     }
 
     @Override
@@ -41,7 +41,7 @@ public class CraftProfileBanList implements ProfileBanList {
     public BanEntry<PlayerProfile> addBan(String target, String reason, Date expires, String source) {
         Preconditions.checkArgument(target != null, "Ban target cannot be null");
 
-        return this.addBan(getProfileByName(target), reason, expires, source);
+        return this.addBan(CraftProfileBanList.getProfileByName(target), reason, expires, source);
     }
 
     @Override
@@ -55,21 +55,21 @@ public class CraftProfileBanList implements ProfileBanList {
     @Override
     public BanEntry<PlayerProfile> addBan(PlayerProfile target, String reason, Instant expires, String source) {
         Date date = expires != null ? Date.from(expires) : null;
-        return addBan(target, reason, date, source);
+        return this.addBan(target, reason, date, source);
     }
 
     @Override
     public BanEntry<PlayerProfile> addBan(PlayerProfile target, String reason, Duration duration, String source) {
         Instant instant = duration != null ? Instant.now().plus(duration) : null;
-        return addBan(target, reason, instant, source);
+        return this.addBan(target, reason, instant, source);
     }
 
     @Override
     public Set<BanEntry> getBanEntries() {
         ImmutableSet.Builder<BanEntry> builder = ImmutableSet.builder();
-        for (GameProfileBanEntry entry : list.getEntries()) {
+        for (UserBanListEntry entry : this.list.getEntries()) {
             GameProfile profile = entry.getUser();
-            builder.add(new CraftProfileBanEntry(profile, entry, list));
+            builder.add(new CraftProfileBanEntry(profile, entry, this.list));
         }
 
         return builder.build();
@@ -78,9 +78,9 @@ public class CraftProfileBanList implements ProfileBanList {
     @Override
     public Set<BanEntry<PlayerProfile>> getEntries() {
         ImmutableSet.Builder<BanEntry<PlayerProfile>> builder = ImmutableSet.builder();
-        for (GameProfileBanEntry entry : list.getEntries()) {
+        for (UserBanListEntry entry : this.list.getEntries()) {
             GameProfile profile = entry.getUser();
-            builder.add(new CraftProfileBanEntry(profile, entry, list));
+            builder.add(new CraftProfileBanEntry(profile, entry, this.list));
         }
 
         return builder.build();
@@ -97,7 +97,7 @@ public class CraftProfileBanList implements ProfileBanList {
     public boolean isBanned(String target) {
         Preconditions.checkArgument(target != null, "Target cannot be null");
 
-        return this.isBanned(getProfile(target));
+        return this.isBanned(CraftProfileBanList.getProfile(target));
     }
 
     @Override
@@ -111,7 +111,7 @@ public class CraftProfileBanList implements ProfileBanList {
     public void pardon(String target) {
         Preconditions.checkArgument(target != null, "Target cannot be null");
 
-        this.pardon(getProfile(target));
+        this.pardon(CraftProfileBanList.getProfile(target));
     }
 
     public BanEntry<PlayerProfile> getBanEntry(GameProfile profile) {
@@ -119,12 +119,12 @@ public class CraftProfileBanList implements ProfileBanList {
             return null;
         }
 
-        GameProfileBanEntry entry = list.get(profile);
+        UserBanListEntry entry = this.list.get(profile);
         if (entry == null) {
             return null;
         }
 
-        return new CraftProfileBanEntry(profile, entry, list);
+        return new CraftProfileBanEntry(profile, entry, this.list);
     }
 
     public BanEntry<PlayerProfile> addBan(GameProfile profile, String reason, Date expires, String source) {
@@ -132,21 +132,21 @@ public class CraftProfileBanList implements ProfileBanList {
             return null;
         }
 
-        GameProfileBanEntry entry = new GameProfileBanEntry(profile, new Date(),
+        UserBanListEntry entry = new UserBanListEntry(profile, new Date(),
                 (source == null || source.isBlank()) ? null : source, expires,
                 (reason == null || reason.isBlank()) ? null : reason);
 
-        list.add(entry);
+        this.list.add(entry);
 
-        return new CraftProfileBanEntry(profile, entry, list);
+        return new CraftProfileBanEntry(profile, entry, this.list);
     }
 
     private void pardon(GameProfile profile) {
-        list.remove(profile);
+        this.list.remove(profile);
     }
 
     private boolean isBanned(GameProfile profile) {
-        return profile != null && list.isBanned(profile);
+        return profile != null && this.list.isBanned(profile);
     }
 
     static GameProfile getProfile(String target) {
@@ -157,7 +157,7 @@ public class CraftProfileBanList implements ProfileBanList {
         } catch (IllegalArgumentException ignored) {
         }
 
-        return (uuid != null) ? getProfileByUUID(uuid) : getProfileByName(target);
+        return (uuid != null) ? CraftProfileBanList.getProfileByUUID(uuid) : CraftProfileBanList.getProfileByName(target);
     }
 
     static GameProfile getProfileByUUID(UUID uuid) {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CapturedBlockState.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CapturedBlockState.java
index 618fddeee9..b709d45316 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CapturedBlockState.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CapturedBlockState.java
@@ -1,11 +1,11 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
 import net.minecraft.util.RandomSource;
-import net.minecraft.world.level.GeneratorAccessSeed;
-import net.minecraft.world.level.World;
-import net.minecraft.world.level.block.entity.TileEntity;
-import net.minecraft.world.level.block.entity.TileEntityBeehive;
+import net.minecraft.world.level.Level;
+import net.minecraft.world.level.WorldGenLevel;
+import net.minecraft.world.level.block.entity.BeehiveBlockEntity;
+import net.minecraft.world.level.block.entity.BlockEntity;
 import org.bukkit.Location;
 import org.bukkit.Material;
 import org.bukkit.block.Block;
@@ -33,7 +33,7 @@ public final class CapturedBlockState extends CraftBlockState {
 
         // Probably no longer needed with the extra #updatedTree method,
         // but leave if here for now in case a plugin for whatever reason relies on this.
-        addBees();
+        this.addBees();
 
         return result;
     }
@@ -41,27 +41,27 @@ public final class CapturedBlockState extends CraftBlockState {
     private void updatedTree() {
         // SPIGOT-7248 - Manual update to avoid physics where appropriate
         // SPIGOT-7572 - Move SPIGOT-7248 fix from nms ItemStack to here, to allow bee generation in nests
-        world.getHandle().setBlock(CraftLocation.toBlockPosition(getLocation()), getHandle(), getFlag());
+        this.world.getHandle().setBlock(CraftLocation.toBlockPosition(this.getLocation()), this.getHandle(), this.getFlag());
 
-        addBees();
+        this.addBees();
     }
 
     private void addBees() {
         // SPIGOT-5537: Horrible hack to manually add bees given World.captureTreeGeneration does not support tiles
-        if (this.treeBlock && getType() == Material.BEE_NEST) {
-            GeneratorAccessSeed generatoraccessseed = this.world.getHandle();
-            BlockPosition blockposition1 = this.getPosition();
+        if (this.treeBlock && this.getType() == Material.BEE_NEST) {
+            WorldGenLevel generatoraccessseed = this.world.getHandle();
+            BlockPos blockposition1 = this.getPosition();
             RandomSource random = generatoraccessseed.getRandom();
 
             // Begin copied block from WorldGenFeatureTreeBeehive
-            TileEntity tileentity = generatoraccessseed.getBlockEntity(blockposition1);
+            BlockEntity tileentity = generatoraccessseed.getBlockEntity(blockposition1);
 
-            if (tileentity instanceof TileEntityBeehive) {
-                TileEntityBeehive tileentitybeehive = (TileEntityBeehive) tileentity;
+            if (tileentity instanceof BeehiveBlockEntity) {
+                BeehiveBlockEntity tileentitybeehive = (BeehiveBlockEntity) tileentity;
                 int j = 2 + random.nextInt(2);
 
                 for (int k = 0; k < j; ++k) {
-                    tileentitybeehive.storeBee(TileEntityBeehive.c.create(random.nextInt(599)));
+                    tileentitybeehive.storeBee(BeehiveBlockEntity.Occupant.create(random.nextInt(599)));
                 }
             }
             // End copied block
@@ -78,11 +78,11 @@ public final class CapturedBlockState extends CraftBlockState {
         return new CapturedBlockState(this, location);
     }
 
-    public static CapturedBlockState getBlockState(World world, BlockPosition pos, int flag) {
+    public static CapturedBlockState getBlockState(Level world, BlockPos pos, int flag) {
         return new CapturedBlockState(world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()), flag, false);
     }
 
-    public static CapturedBlockState getTreeBlockState(World world, BlockPosition pos, int flag) {
+    public static CapturedBlockState getTreeBlockState(Level world, BlockPos pos, int flag) {
         return new CapturedBlockState(world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()), flag, true);
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java
index 27916fc493..5635230fc2 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBanner.java
@@ -3,10 +3,9 @@ package org.bukkit.craftbukkit.block;
 import com.google.common.base.Preconditions;
 import java.util.ArrayList;
 import java.util.List;
-import net.minecraft.world.item.EnumColor;
-import net.minecraft.world.level.block.BlockBannerAbstract;
+import net.minecraft.world.level.block.AbstractBannerBlock;
+import net.minecraft.world.level.block.entity.BannerBlockEntity;
 import net.minecraft.world.level.block.entity.BannerPatternLayers;
-import net.minecraft.world.level.block.entity.TileEntityBanner;
 import org.bukkit.DyeColor;
 import org.bukkit.Location;
 import org.bukkit.World;
@@ -14,12 +13,12 @@ import org.bukkit.block.Banner;
 import org.bukkit.block.banner.Pattern;
 import org.bukkit.craftbukkit.block.banner.CraftPatternType;
 
-public class CraftBanner extends CraftBlockEntityState<TileEntityBanner> implements Banner {
+public class CraftBanner extends CraftBlockEntityState<BannerBlockEntity> implements Banner {
 
     private DyeColor base;
     private List<Pattern> patterns;
 
-    public CraftBanner(World world, TileEntityBanner tileEntity) {
+    public CraftBanner(World world, BannerBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
@@ -30,16 +29,16 @@ public class CraftBanner extends CraftBlockEntityState<TileEntityBanner> impleme
     }
 
     @Override
-    public void load(TileEntityBanner banner) {
+    public void load(BannerBlockEntity banner) {
         super.load(banner);
 
-        base = DyeColor.getByWoolData((byte) ((BlockBannerAbstract) this.data.getBlock()).getColor().getId());
-        patterns = new ArrayList<Pattern>();
+        this.base = DyeColor.getByWoolData((byte) ((AbstractBannerBlock) this.data.getBlock()).getColor().getId());
+        this.patterns = new ArrayList<Pattern>();
 
         if (banner.getPatterns() != null) {
             for (int i = 0; i < banner.getPatterns().layers().size(); i++) {
-                BannerPatternLayers.b p = banner.getPatterns().layers().get(i);
-                patterns.add(new Pattern(DyeColor.getByWoolData((byte) p.color().getId()), CraftPatternType.minecraftHolderToBukkit(p.pattern())));
+                BannerPatternLayers.Layer p = banner.getPatterns().layers().get(i);
+                this.patterns.add(new Pattern(DyeColor.getByWoolData((byte) p.color().getId()), CraftPatternType.minecraftHolderToBukkit(p.pattern())));
             }
         }
     }
@@ -57,7 +56,7 @@ public class CraftBanner extends CraftBlockEntityState<TileEntityBanner> impleme
 
     @Override
     public List<Pattern> getPatterns() {
-        return new ArrayList<Pattern>(patterns);
+        return new ArrayList<Pattern>(this.patterns);
     }
 
     @Override
@@ -87,19 +86,19 @@ public class CraftBanner extends CraftBlockEntityState<TileEntityBanner> impleme
 
     @Override
     public int numberOfPatterns() {
-        return patterns.size();
+        return this.patterns.size();
     }
 
     @Override
-    public void applyTo(TileEntityBanner banner) {
+    public void applyTo(BannerBlockEntity banner) {
         super.applyTo(banner);
 
-        banner.baseColor = EnumColor.byId(base.getWoolData());
+        banner.baseColor = net.minecraft.world.item.DyeColor.byId(this.base.getWoolData());
 
-        List<BannerPatternLayers.b> newPatterns = new ArrayList<>();
+        List<BannerPatternLayers.Layer> newPatterns = new ArrayList<>();
 
-        for (Pattern p : patterns) {
-            newPatterns.add(new net.minecraft.world.level.block.entity.BannerPatternLayers.b(CraftPatternType.bukkitToMinecraftHolder(p.getPattern()), EnumColor.byId(p.getColor().getWoolData())));
+        for (Pattern p : this.patterns) {
+            newPatterns.add(new net.minecraft.world.level.block.entity.BannerPatternLayers.Layer(CraftPatternType.bukkitToMinecraftHolder(p.getPattern()), net.minecraft.world.item.DyeColor.byId(p.getColor().getWoolData())));
         }
         banner.setPatterns(new BannerPatternLayers(newPatterns));
     }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBarrel.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBarrel.java
index cf0b4baedc..f4b480e304 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBarrel.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBarrel.java
@@ -1,18 +1,18 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.sounds.SoundEffects;
-import net.minecraft.world.level.block.BlockBarrel;
-import net.minecraft.world.level.block.entity.TileEntityBarrel;
-import net.minecraft.world.level.block.state.IBlockData;
+import net.minecraft.sounds.SoundEvents;
+import net.minecraft.world.level.block.BarrelBlock;
+import net.minecraft.world.level.block.entity.BarrelBlockEntity;
+import net.minecraft.world.level.block.state.BlockState;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.block.Barrel;
 import org.bukkit.craftbukkit.inventory.CraftInventory;
 import org.bukkit.inventory.Inventory;
 
-public class CraftBarrel extends CraftLootable<TileEntityBarrel> implements Barrel {
+public class CraftBarrel extends CraftLootable<BarrelBlockEntity> implements Barrel {
 
-    public CraftBarrel(World world, TileEntityBarrel tileEntity) {
+    public CraftBarrel(World world, BarrelBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
@@ -36,32 +36,32 @@ public class CraftBarrel extends CraftLootable<TileEntityBarrel> implements Barr
 
     @Override
     public void open() {
-        requirePlaced();
-        if (!getTileEntity().openersCounter.opened) {
-            IBlockData blockData = getTileEntity().getBlockState();
-            boolean open = blockData.getValue(BlockBarrel.OPEN);
+        this.requirePlaced();
+        if (!this.getTileEntity().openersCounter.opened) {
+            BlockState blockData = this.getTileEntity().getBlockState();
+            boolean open = blockData.getValue(BarrelBlock.OPEN);
 
             if (!open) {
-                getTileEntity().updateBlockState(blockData, true);
-                if (getWorldHandle() instanceof net.minecraft.world.level.World) {
-                    getTileEntity().playSound(blockData, SoundEffects.BARREL_OPEN);
+                this.getTileEntity().updateBlockState(blockData, true);
+                if (this.getWorldHandle() instanceof net.minecraft.world.level.Level) {
+                    this.getTileEntity().playSound(blockData, SoundEvents.BARREL_OPEN);
                 }
             }
         }
-        getTileEntity().openersCounter.opened = true;
+        this.getTileEntity().openersCounter.opened = true;
     }
 
     @Override
     public void close() {
-        requirePlaced();
-        if (getTileEntity().openersCounter.opened) {
-            IBlockData blockData = getTileEntity().getBlockState();
-            getTileEntity().updateBlockState(blockData, false);
-            if (getWorldHandle() instanceof net.minecraft.world.level.World) {
-                getTileEntity().playSound(blockData, SoundEffects.BARREL_CLOSE);
+        this.requirePlaced();
+        if (this.getTileEntity().openersCounter.opened) {
+            BlockState blockData = this.getTileEntity().getBlockState();
+            this.getTileEntity().updateBlockState(blockData, false);
+            if (this.getWorldHandle() instanceof net.minecraft.world.level.Level) {
+                this.getTileEntity().playSound(blockData, SoundEvents.BARREL_CLOSE);
             }
         }
-        getTileEntity().openersCounter.opened = false;
+        this.getTileEntity().openersCounter.opened = false;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java
index e6bc7d5d09..0949f9e6bc 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBeacon.java
@@ -4,15 +4,15 @@ import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
 import java.util.Optional;
-import net.minecraft.advancements.critereon.CriterionConditionItem;
-import net.minecraft.advancements.critereon.CriterionConditionValue;
+import net.minecraft.advancements.critereon.ItemPredicate;
+import net.minecraft.advancements.critereon.MinMaxBounds;
 import net.minecraft.core.component.DataComponentPredicate;
 import net.minecraft.core.component.DataComponents;
-import net.minecraft.network.chat.IChatBaseComponent;
-import net.minecraft.world.ChestLock;
-import net.minecraft.world.entity.player.EntityHuman;
-import net.minecraft.world.level.block.entity.TileEntity;
-import net.minecraft.world.level.block.entity.TileEntityBeacon;
+import net.minecraft.network.chat.Component;
+import net.minecraft.world.LockCode;
+import net.minecraft.world.entity.player.Player;
+import net.minecraft.world.level.block.entity.BeaconBlockEntity;
+import net.minecraft.world.level.block.entity.BlockEntity;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.block.Beacon;
@@ -24,9 +24,9 @@ import org.bukkit.inventory.ItemStack;
 import org.bukkit.potion.PotionEffect;
 import org.bukkit.potion.PotionEffectType;
 
-public class CraftBeacon extends CraftBlockEntityState<TileEntityBeacon> implements Beacon {
+public class CraftBeacon extends CraftBlockEntityState<BeaconBlockEntity> implements Beacon {
 
-    public CraftBeacon(World world, TileEntityBeacon tileEntity) {
+    public CraftBeacon(World world, BeaconBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
@@ -36,16 +36,16 @@ public class CraftBeacon extends CraftBlockEntityState<TileEntityBeacon> impleme
 
     @Override
     public Collection<LivingEntity> getEntitiesInRange() {
-        ensureNoWorldGeneration();
+        this.ensureNoWorldGeneration();
 
-        TileEntity tileEntity = this.getTileEntityFromWorld();
-        if (tileEntity instanceof TileEntityBeacon) {
-            TileEntityBeacon beacon = (TileEntityBeacon) tileEntity;
+        BlockEntity tileEntity = this.getTileEntityFromWorld();
+        if (tileEntity instanceof BeaconBlockEntity) {
+            BeaconBlockEntity beacon = (BeaconBlockEntity) tileEntity;
 
-            Collection<EntityHuman> nms = TileEntityBeacon.getHumansInRange(beacon.getLevel(), beacon.getBlockPos(), beacon.levels);
+            Collection<Player> nms = BeaconBlockEntity.getHumansInRange(beacon.getLevel(), beacon.getBlockPos(), beacon.levels);
             Collection<LivingEntity> bukkit = new ArrayList<LivingEntity>(nms.size());
 
-            for (EntityHuman human : nms) {
+            for (Player human : nms) {
                 bukkit.add(human.getBukkitEntity());
             }
 
@@ -83,7 +83,7 @@ public class CraftBeacon extends CraftBlockEntityState<TileEntityBeacon> impleme
 
     @Override
     public String getCustomName() {
-        TileEntityBeacon beacon = this.getSnapshot();
+        BeaconBlockEntity beacon = this.getSnapshot();
         return beacon.name != null ? CraftChatMessage.fromComponent(beacon.name) : null;
     }
 
@@ -94,12 +94,12 @@ public class CraftBeacon extends CraftBlockEntityState<TileEntityBeacon> impleme
 
     @Override
     public boolean isLocked() {
-        return this.getSnapshot().lockKey != ChestLock.NO_LOCK;
+        return this.getSnapshot().lockKey != LockCode.NO_LOCK;
     }
 
     @Override
     public String getLock() {
-        Optional<? extends IChatBaseComponent> customName = this.getSnapshot().lockKey.predicate().components().asPatch().get(DataComponents.CUSTOM_NAME);
+        Optional<? extends Component> customName = this.getSnapshot().lockKey.predicate().components().asPatch().get(DataComponents.CUSTOM_NAME);
 
         return (customName != null) ? customName.map(CraftChatMessage::fromComponent).orElse("") : "";
     }
@@ -107,19 +107,19 @@ public class CraftBeacon extends CraftBlockEntityState<TileEntityBeacon> impleme
     @Override
     public void setLock(String key) {
         if (key == null) {
-            this.getSnapshot().lockKey = ChestLock.NO_LOCK;
+            this.getSnapshot().lockKey = LockCode.NO_LOCK;
         } else {
             DataComponentPredicate predicate = DataComponentPredicate.builder().expect(DataComponents.CUSTOM_NAME, CraftChatMessage.fromStringOrNull(key)).build();
-            this.getSnapshot().lockKey = new ChestLock(new CriterionConditionItem(Optional.empty(), CriterionConditionValue.IntegerRange.ANY, predicate, Collections.emptyMap()));
+            this.getSnapshot().lockKey = new LockCode(new ItemPredicate(Optional.empty(), MinMaxBounds.Ints.ANY, predicate, Collections.emptyMap()));
         }
     }
 
     @Override
     public void setLockItem(ItemStack key) {
         if (key == null) {
-            this.getSnapshot().lockKey = ChestLock.NO_LOCK;
+            this.getSnapshot().lockKey = LockCode.NO_LOCK;
         } else {
-            this.getSnapshot().lockKey = new ChestLock(CraftItemStack.asCriterionConditionItem(key));
+            this.getSnapshot().lockKey = new LockCode(CraftItemStack.asCriterionConditionItem(key));
         }
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBed.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBed.java
index d77cea208c..b5bc9b22e4 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBed.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBed.java
@@ -1,14 +1,14 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.world.level.block.entity.TileEntityBed;
+import net.minecraft.world.level.block.entity.BedBlockEntity;
 import org.bukkit.DyeColor;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.block.Bed;
 
-public class CraftBed extends CraftBlockEntityState<TileEntityBed> implements Bed {
+public class CraftBed extends CraftBlockEntityState<BedBlockEntity> implements Bed {
 
-    public CraftBed(World world, TileEntityBed tileEntity) {
+    public CraftBed(World world, BedBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
@@ -18,7 +18,7 @@ public class CraftBed extends CraftBlockEntityState<TileEntityBed> implements Be
 
     @Override
     public DyeColor getColor() {
-        switch (getType()) {
+        switch (this.getType()) {
             case BLACK_BED:
                 return DyeColor.BLACK;
             case BLUE_BED:
@@ -52,7 +52,7 @@ public class CraftBed extends CraftBlockEntityState<TileEntityBed> implements Be
             case YELLOW_BED:
                 return DyeColor.YELLOW;
             default:
-                throw new IllegalArgumentException("Unknown DyeColor for " + getType());
+                throw new IllegalArgumentException("Unknown DyeColor for " + this.getType());
         }
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBeehive.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBeehive.java
index dd97621e5e..fbacbef0dd 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBeehive.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBeehive.java
@@ -3,10 +3,10 @@ package org.bukkit.craftbukkit.block;
 import com.google.common.base.Preconditions;
 import java.util.ArrayList;
 import java.util.List;
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
 import net.minecraft.world.entity.Entity;
-import net.minecraft.world.level.block.entity.TileEntityBeehive;
-import net.minecraft.world.level.block.entity.TileEntityBeehive.ReleaseStatus;
+import net.minecraft.world.level.block.entity.BeehiveBlockEntity;
+import net.minecraft.world.level.block.entity.BeehiveBlockEntity.BeeReleaseStatus;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.block.Beehive;
@@ -14,9 +14,9 @@ import org.bukkit.craftbukkit.entity.CraftBee;
 import org.bukkit.craftbukkit.util.CraftLocation;
 import org.bukkit.entity.Bee;
 
-public class CraftBeehive extends CraftBlockEntityState<TileEntityBeehive> implements Beehive {
+public class CraftBeehive extends CraftBlockEntityState<BeehiveBlockEntity> implements Beehive {
 
-    public CraftBeehive(World world, TileEntityBeehive tileEntity) {
+    public CraftBeehive(World world, BeehiveBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
@@ -26,52 +26,52 @@ public class CraftBeehive extends CraftBlockEntityState<TileEntityBeehive> imple
 
     @Override
     public Location getFlower() {
-        BlockPosition flower = getSnapshot().savedFlowerPos;
-        return (flower == null) ? null : CraftLocation.toBukkit(flower, getWorld());
+        BlockPos flower = this.getSnapshot().savedFlowerPos;
+        return (flower == null) ? null : CraftLocation.toBukkit(flower, this.getWorld());
     }
 
     @Override
     public void setFlower(Location location) {
         Preconditions.checkArgument(location == null || this.getWorld().equals(location.getWorld()), "Flower must be in same world");
-        getSnapshot().savedFlowerPos = (location == null) ? null : CraftLocation.toBlockPosition(location);
+        this.getSnapshot().savedFlowerPos = (location == null) ? null : CraftLocation.toBlockPosition(location);
     }
 
     @Override
     public boolean isFull() {
-        return getSnapshot().isFull();
+        return this.getSnapshot().isFull();
     }
 
     @Override
     public boolean isSedated() {
-        return isPlaced() && getTileEntity().isSedated();
+        return this.isPlaced() && this.getTileEntity().isSedated();
     }
 
     @Override
     public int getEntityCount() {
-        return getSnapshot().getOccupantCount();
+        return this.getSnapshot().getOccupantCount();
     }
 
     @Override
     public int getMaxEntities() {
-        return getSnapshot().maxBees;
+        return this.getSnapshot().maxBees;
     }
 
     @Override
     public void setMaxEntities(int max) {
         Preconditions.checkArgument(max > 0, "Max bees must be more than 0");
 
-        getSnapshot().maxBees = max;
+        this.getSnapshot().maxBees = max;
     }
 
     @Override
     public List<Bee> releaseEntities() {
-        ensureNoWorldGeneration();
+        this.ensureNoWorldGeneration();
 
         List<Bee> bees = new ArrayList<>();
 
-        if (isPlaced()) {
-            TileEntityBeehive beehive = ((TileEntityBeehive) this.getTileEntityFromWorld());
-            for (Entity bee : beehive.releaseBees(this.getHandle(), ReleaseStatus.BEE_RELEASED, true)) {
+        if (this.isPlaced()) {
+            BeehiveBlockEntity beehive = ((BeehiveBlockEntity) this.getTileEntityFromWorld());
+            for (Entity bee : beehive.releaseBees(this.getHandle(), BeeReleaseStatus.BEE_RELEASED, true)) {
                 bees.add((Bee) bee.getBukkitEntity());
             }
         }
@@ -83,7 +83,7 @@ public class CraftBeehive extends CraftBlockEntityState<TileEntityBeehive> imple
     public void addEntity(Bee entity) {
         Preconditions.checkArgument(entity != null, "Entity must not be null");
 
-        getSnapshot().addOccupant(((CraftBee) entity).getHandle());
+        this.getSnapshot().addOccupant(((CraftBee) entity).getHandle());
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBell.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBell.java
index 824283a83c..a816667b65 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBell.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBell.java
@@ -1,11 +1,11 @@
 package org.bukkit.craftbukkit.block;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.core.EnumDirection;
-import net.minecraft.world.level.block.BlockBell;
+import net.minecraft.core.Direction;
+import net.minecraft.world.level.block.BellBlock;
 import net.minecraft.world.level.block.Blocks;
-import net.minecraft.world.level.block.entity.TileEntity;
-import net.minecraft.world.level.block.entity.TileEntityBell;
+import net.minecraft.world.level.block.entity.BellBlockEntity;
+import net.minecraft.world.level.block.entity.BlockEntity;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.block.Bell;
@@ -13,9 +13,9 @@ import org.bukkit.block.BlockFace;
 import org.bukkit.craftbukkit.entity.CraftEntity;
 import org.bukkit.entity.Entity;
 
-public class CraftBell extends CraftBlockEntityState<TileEntityBell> implements Bell {
+public class CraftBell extends CraftBlockEntityState<BellBlockEntity> implements Bell {
 
-    public CraftBell(World world, TileEntityBell tileEntity) {
+    public CraftBell(World world, BellBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
@@ -27,50 +27,50 @@ public class CraftBell extends CraftBlockEntityState<TileEntityBell> implements
     public boolean ring(Entity entity, BlockFace direction) {
         Preconditions.checkArgument(direction == null || direction.isCartesian(), "direction must be cartesian, given %s", direction);
 
-        TileEntity tileEntity = getTileEntityFromWorld();
+        BlockEntity tileEntity = this.getTileEntityFromWorld();
         if (tileEntity == null) {
             return false;
         }
 
         net.minecraft.world.entity.Entity nmsEntity = (entity != null) ? ((CraftEntity) entity).getHandle() : null;
-        EnumDirection enumDirection = CraftBlock.blockFaceToNotch(direction);
+        Direction enumDirection = CraftBlock.blockFaceToNotch(direction);
 
-        return ((BlockBell) Blocks.BELL).attemptToRing(nmsEntity, world.getHandle(), getPosition(), enumDirection);
+        return ((BellBlock) Blocks.BELL).attemptToRing(nmsEntity, this.world.getHandle(), this.getPosition(), enumDirection);
     }
 
     @Override
     public boolean ring(Entity entity) {
-        return ring(entity, null);
+        return this.ring(entity, null);
     }
 
     @Override
     public boolean ring(BlockFace direction) {
-        return ring(null, direction);
+        return this.ring(null, direction);
     }
 
     @Override
     public boolean ring() {
-        return ring(null, null);
+        return this.ring(null, null);
     }
 
     @Override
     public boolean isShaking() {
-        return getSnapshot().shaking;
+        return this.getSnapshot().shaking;
     }
 
     @Override
     public int getShakingTicks() {
-        return getSnapshot().ticks;
+        return this.getSnapshot().ticks;
     }
 
     @Override
     public boolean isResonating() {
-        return getSnapshot().resonating;
+        return this.getSnapshot().resonating;
     }
 
     @Override
     public int getResonatingTicks() {
-        return isResonating() ? getSnapshot().ticks : 0;
+        return this.isResonating() ? this.getSnapshot().ticks : 0;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBiome.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBiome.java
index c463fb1dff..4e535481cf 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBiome.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBiome.java
@@ -2,9 +2,7 @@ package org.bukkit.craftbukkit.block;
 
 import java.util.Locale;
 import net.minecraft.core.Holder;
-import net.minecraft.core.IRegistry;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.world.level.biome.BiomeBase;
 import org.bukkit.NamespacedKey;
 import org.bukkit.Registry;
 import org.bukkit.block.Biome;
@@ -12,19 +10,19 @@ import org.bukkit.craftbukkit.CraftRegistry;
 import org.bukkit.craftbukkit.util.Handleable;
 import org.jetbrains.annotations.NotNull;
 
-public class CraftBiome implements Biome, Handleable<BiomeBase> {
+public class CraftBiome implements Biome, Handleable<net.minecraft.world.level.biome.Biome> {
 
     private static int count = 0;
 
-    public static Biome minecraftToBukkit(BiomeBase minecraft) {
+    public static Biome minecraftToBukkit(net.minecraft.world.level.biome.Biome minecraft) {
         return CraftRegistry.minecraftToBukkit(minecraft, Registries.BIOME, Registry.BIOME);
     }
 
-    public static Biome minecraftHolderToBukkit(Holder<BiomeBase> minecraft) {
-        return minecraftToBukkit(minecraft.value());
+    public static Biome minecraftHolderToBukkit(Holder<net.minecraft.world.level.biome.Biome> minecraft) {
+        return CraftBiome.minecraftToBukkit(minecraft.value());
     }
 
-    public static BiomeBase bukkitToMinecraft(Biome bukkit) {
+    public static net.minecraft.world.level.biome.Biome bukkitToMinecraft(Biome bukkit) {
         if (bukkit == Biome.CUSTOM) {
             return null;
         }
@@ -32,14 +30,14 @@ public class CraftBiome implements Biome, Handleable<BiomeBase> {
         return CraftRegistry.bukkitToMinecraft(bukkit);
     }
 
-    public static Holder<BiomeBase> bukkitToMinecraftHolder(Biome bukkit) {
+    public static Holder<net.minecraft.world.level.biome.Biome> bukkitToMinecraftHolder(Biome bukkit) {
         if (bukkit == Biome.CUSTOM) {
             return null;
         }
 
-        IRegistry<BiomeBase> registry = CraftRegistry.getMinecraftRegistry(Registries.BIOME);
+        net.minecraft.core.Registry<net.minecraft.world.level.biome.Biome> registry = CraftRegistry.getMinecraftRegistry(Registries.BIOME);
 
-        if (registry.wrapAsHolder(bukkitToMinecraft(bukkit)) instanceof Holder.c<BiomeBase> holder) {
+        if (registry.wrapAsHolder(CraftBiome.bukkitToMinecraft(bukkit)) instanceof Holder.Reference<net.minecraft.world.level.biome.Biome> holder) {
             return holder;
         }
 
@@ -48,11 +46,11 @@ public class CraftBiome implements Biome, Handleable<BiomeBase> {
     }
 
     private final NamespacedKey key;
-    private final BiomeBase biomeBase;
+    private final net.minecraft.world.level.biome.Biome biomeBase;
     private final String name;
     private final int ordinal;
 
-    public CraftBiome(NamespacedKey key, BiomeBase biomeBase) {
+    public CraftBiome(NamespacedKey key, net.minecraft.world.level.biome.Biome biomeBase) {
         this.key = key;
         this.biomeBase = biomeBase;
         // For backwards compatibility, minecraft values will stile return the uppercase name without the namespace,
@@ -64,40 +62,40 @@ public class CraftBiome implements Biome, Handleable<BiomeBase> {
         } else {
             this.name = key.toString();
         }
-        this.ordinal = count++;
+        this.ordinal = CraftBiome.count++;
     }
 
     @Override
-    public BiomeBase getHandle() {
-        return biomeBase;
+    public net.minecraft.world.level.biome.Biome getHandle() {
+        return this.biomeBase;
     }
 
     @NotNull
     @Override
     public NamespacedKey getKey() {
-        return key;
+        return this.key;
     }
 
     @Override
     public int compareTo(@NotNull Biome biome) {
-        return ordinal - biome.ordinal();
+        return this.ordinal - biome.ordinal();
     }
 
     @NotNull
     @Override
     public String name() {
-        return name;
+        return this.name;
     }
 
     @Override
     public int ordinal() {
-        return ordinal;
+        return this.ordinal;
     }
 
     @Override
     public String toString() {
         // For backwards compatibility
-        return name();
+        return this.name();
     }
 
     @Override
@@ -110,11 +108,11 @@ public class CraftBiome implements Biome, Handleable<BiomeBase> {
             return false;
         }
 
-        return getKey().equals(otherBiome.getKey());
+        return this.getKey().equals(otherBiome.getKey());
     }
 
     @Override
     public int hashCode() {
-        return getKey().hashCode();
+        return this.getKey().hashCode();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlastFurnace.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlastFurnace.java
index bb0dca4183..f9cfdaf650 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlastFurnace.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlastFurnace.java
@@ -1,13 +1,13 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.world.level.block.entity.TileEntityBlastFurnace;
+import net.minecraft.world.level.block.entity.BlastFurnaceBlockEntity;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.block.BlastFurnace;
 
-public class CraftBlastFurnace extends CraftFurnace<TileEntityBlastFurnace> implements BlastFurnace {
+public class CraftBlastFurnace extends CraftFurnace<BlastFurnaceBlockEntity> implements BlastFurnace {
 
-    public CraftBlastFurnace(World world, TileEntityBlastFurnace tileEntity) {
+    public CraftBlastFurnace(World world, BlastFurnaceBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
index 6ac71753fc..c9b1167b15 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlock.java
@@ -6,27 +6,26 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.List;
 import java.util.stream.Collectors;
-import net.minecraft.core.BlockPosition;
-import net.minecraft.core.EnumDirection;
-import net.minecraft.server.level.WorldServer;
-import net.minecraft.world.EnumHand;
-import net.minecraft.world.EnumInteractionResult;
-import net.minecraft.world.item.ItemBoneMeal;
+import net.minecraft.core.BlockPos;
+import net.minecraft.core.Direction;
+import net.minecraft.server.level.ServerLevel;
+import net.minecraft.world.InteractionHand;
+import net.minecraft.world.InteractionResult;
+import net.minecraft.world.item.BoneMealItem;
 import net.minecraft.world.item.Items;
-import net.minecraft.world.item.context.ItemActionContext;
-import net.minecraft.world.level.EnumSkyBlock;
-import net.minecraft.world.level.GeneratorAccess;
-import net.minecraft.world.level.RayTrace;
-import net.minecraft.world.level.block.BlockRedstoneWire;
-import net.minecraft.world.level.block.BlockSapling;
+import net.minecraft.world.item.context.UseOnContext;
+import net.minecraft.world.level.ClipContext;
+import net.minecraft.world.level.LevelAccessor;
+import net.minecraft.world.level.LightLayer;
 import net.minecraft.world.level.block.Blocks;
-import net.minecraft.world.level.block.state.IBlockData;
-import net.minecraft.world.phys.AxisAlignedBB;
-import net.minecraft.world.phys.MovingObjectPosition;
-import net.minecraft.world.phys.MovingObjectPositionBlock;
-import net.minecraft.world.phys.Vec3D;
+import net.minecraft.world.level.block.RedStoneWireBlock;
+import net.minecraft.world.level.block.SaplingBlock;
+import net.minecraft.world.phys.AABB;
+import net.minecraft.world.phys.BlockHitResult;
+import net.minecraft.world.phys.HitResult;
+import net.minecraft.world.phys.Vec3;
+import net.minecraft.world.phys.shapes.CollisionContext;
 import net.minecraft.world.phys.shapes.VoxelShape;
-import net.minecraft.world.phys.shapes.VoxelShapeCollision;
 import org.bukkit.Bukkit;
 import org.bukkit.Chunk;
 import org.bukkit.FluidCollisionMode;
@@ -63,51 +62,51 @@ import org.bukkit.util.RayTraceResult;
 import org.bukkit.util.Vector;
 
 public class CraftBlock implements Block {
-    private final net.minecraft.world.level.GeneratorAccess world;
-    private final BlockPosition position;
+    private final net.minecraft.world.level.LevelAccessor world;
+    private final BlockPos position;
 
-    public CraftBlock(GeneratorAccess world, BlockPosition position) {
+    public CraftBlock(LevelAccessor world, BlockPos position) {
         this.world = world;
         this.position = position.immutable();
     }
 
-    public static CraftBlock at(GeneratorAccess world, BlockPosition position) {
+    public static CraftBlock at(LevelAccessor world, BlockPos position) {
         return new CraftBlock(world, position);
     }
 
-    public net.minecraft.world.level.block.state.IBlockData getNMS() {
-        return world.getBlockState(position);
+    public net.minecraft.world.level.block.state.BlockState getNMS() {
+        return this.world.getBlockState(this.position);
     }
 
-    public BlockPosition getPosition() {
-        return position;
+    public BlockPos getPosition() {
+        return this.position;
     }
 
-    public GeneratorAccess getHandle() {
-        return world;
+    public LevelAccessor getHandle() {
+        return this.world;
     }
 
     @Override
     public World getWorld() {
-        return world.getMinecraftWorld().getWorld();
+        return this.world.getMinecraftWorld().getWorld();
     }
 
     public CraftWorld getCraftWorld() {
-        return (CraftWorld) getWorld();
+        return (CraftWorld) this.getWorld();
     }
 
     @Override
     public Location getLocation() {
-        return CraftLocation.toBukkit(position, getWorld());
+        return CraftLocation.toBukkit(this.position, this.getWorld());
     }
 
     @Override
     public Location getLocation(Location loc) {
         if (loc != null) {
-            loc.setWorld(getWorld());
-            loc.setX(position.getX());
-            loc.setY(position.getY());
-            loc.setZ(position.getZ());
+            loc.setWorld(this.getWorld());
+            loc.setX(this.position.getX());
+            loc.setY(this.position.getY());
+            loc.setZ(this.position.getZ());
             loc.setYaw(0);
             loc.setPitch(0);
         }
@@ -116,88 +115,88 @@ public class CraftBlock implements Block {
     }
 
     public BlockVector getVector() {
-        return new BlockVector(getX(), getY(), getZ());
+        return new BlockVector(this.getX(), this.getY(), this.getZ());
     }
 
     @Override
     public int getX() {
-        return position.getX();
+        return this.position.getX();
     }
 
     @Override
     public int getY() {
-        return position.getY();
+        return this.position.getY();
     }
 
     @Override
     public int getZ() {
-        return position.getZ();
+        return this.position.getZ();
     }
 
     @Override
     public Chunk getChunk() {
-        return getWorld().getChunkAt(this);
+        return this.getWorld().getChunkAt(this);
     }
 
     public void setData(final byte data) {
-        setData(data, 3);
+        this.setData(data, 3);
     }
 
     public void setData(final byte data, boolean applyPhysics) {
         if (applyPhysics) {
-            setData(data, 3);
+            this.setData(data, 3);
         } else {
-            setData(data, 2);
+            this.setData(data, 2);
         }
     }
 
     private void setData(final byte data, int flag) {
-        world.setBlock(position, CraftMagicNumbers.getBlock(getType(), data), flag);
+        this.world.setBlock(this.position, CraftMagicNumbers.getBlock(this.getType(), data), flag);
     }
 
     @Override
     public byte getData() {
-        IBlockData blockData = world.getBlockState(position);
+        net.minecraft.world.level.block.state.BlockState blockData = this.world.getBlockState(this.position);
         return CraftMagicNumbers.toLegacyData(blockData);
     }
 
     @Override
     public BlockData getBlockData() {
-        return CraftBlockData.fromData(getNMS());
+        return CraftBlockData.fromData(this.getNMS());
     }
 
     @Override
     public void setType(final Material type) {
-        setType(type, true);
+        this.setType(type, true);
     }
 
     @Override
     public void setType(Material type, boolean applyPhysics) {
         Preconditions.checkArgument(type != null, "Material cannot be null");
-        setBlockData(type.createBlockData(), applyPhysics);
+        this.setBlockData(type.createBlockData(), applyPhysics);
     }
 
     @Override
     public void setBlockData(BlockData data) {
-        setBlockData(data, true);
+        this.setBlockData(data, true);
     }
 
     @Override
     public void setBlockData(BlockData data, boolean applyPhysics) {
         Preconditions.checkArgument(data != null, "BlockData cannot be null");
-        setTypeAndData(((CraftBlockData) data).getState(), applyPhysics);
+        this.setTypeAndData(((CraftBlockData) data).getState(), applyPhysics);
     }
 
-    boolean setTypeAndData(final IBlockData blockData, final boolean applyPhysics) {
-        return setTypeAndData(world, position, getNMS(), blockData, applyPhysics);
+    boolean setTypeAndData(final net.minecraft.world.level.block.state.BlockState blockData, final boolean applyPhysics) {
+        return CraftBlock.setTypeAndData(this.world, this.position, this.getNMS(), blockData, applyPhysics);
     }
 
-    public static boolean setTypeAndData(GeneratorAccess world, BlockPosition position, IBlockData old, IBlockData blockData, boolean applyPhysics) {
+    public static boolean setTypeAndData(LevelAccessor world, BlockPos position, net.minecraft.world.level.block.state.BlockState old, net.minecraft.world.level.block.state.BlockState blockData, boolean applyPhysics) {
         // SPIGOT-611: need to do this to prevent glitchiness. Easier to handle this here (like /setblock) than to fix weirdness in tile entity cleanup
         if (old.hasBlockEntity() && blockData.getBlock() != old.getBlock()) { // SPIGOT-3725 remove old tile entity if block changes
             // SPIGOT-4612: faster - just clear tile
-            if (world instanceof net.minecraft.world.level.World) {
-                ((net.minecraft.world.level.World) world).removeBlockEntity(position);
+            if (world instanceof net.minecraft.world.level.Level) {
+                ((net.minecraft.world.level.Level) world).removeBlockEntity(position);
             } else {
                 world.setBlock(position, Blocks.AIR.defaultBlockState(), 0);
             }
@@ -207,7 +206,7 @@ public class CraftBlock implements Block {
             return world.setBlock(position, blockData, 3);
         } else {
             boolean success = world.setBlock(position, blockData, 2 | 16 | 1024); // NOTIFY | NO_OBSERVER | NO_PLACE (custom)
-            if (success && world instanceof net.minecraft.world.level.World) {
+            if (success && world instanceof net.minecraft.world.level.Level) {
                 world.getMinecraftWorld().sendBlockUpdated(
                         position,
                         old,
@@ -221,45 +220,45 @@ public class CraftBlock implements Block {
 
     @Override
     public Material getType() {
-        return CraftBlockType.minecraftToBukkit(world.getBlockState(position).getBlock());
+        return CraftBlockType.minecraftToBukkit(this.world.getBlockState(this.position).getBlock());
     }
 
     @Override
     public byte getLightLevel() {
-        return (byte) world.getMinecraftWorld().getMaxLocalRawBrightness(position);
+        return (byte) this.world.getMinecraftWorld().getMaxLocalRawBrightness(this.position);
     }
 
     @Override
     public byte getLightFromSky() {
-        return (byte) world.getBrightness(EnumSkyBlock.SKY, position);
+        return (byte) this.world.getBrightness(LightLayer.SKY, this.position);
     }
 
     @Override
     public byte getLightFromBlocks() {
-        return (byte) world.getBrightness(EnumSkyBlock.BLOCK, position);
+        return (byte) this.world.getBrightness(LightLayer.BLOCK, this.position);
     }
 
     public Block getFace(final BlockFace face) {
-        return getRelative(face, 1);
+        return this.getRelative(face, 1);
     }
 
     public Block getFace(final BlockFace face, final int distance) {
-        return getRelative(face, distance);
+        return this.getRelative(face, distance);
     }
 
     @Override
     public Block getRelative(final int modX, final int modY, final int modZ) {
-        return getWorld().getBlockAt(getX() + modX, getY() + modY, getZ() + modZ);
+        return this.getWorld().getBlockAt(this.getX() + modX, this.getY() + modY, this.getZ() + modZ);
     }
 
     @Override
     public Block getRelative(BlockFace face) {
-        return getRelative(face, 1);
+        return this.getRelative(face, 1);
     }
 
     @Override
     public Block getRelative(BlockFace face, int distance) {
-        return getRelative(face.getModX() * distance, face.getModY() * distance, face.getModZ() * distance);
+        return this.getRelative(face.getModX() * distance, face.getModY() * distance, face.getModZ() * distance);
     }
 
     @Override
@@ -277,10 +276,10 @@ public class CraftBlock implements Block {
 
     @Override
     public String toString() {
-        return "CraftBlock{pos=" + position + ",type=" + getType() + ",data=" + getNMS() + ",fluid=" + world.getFluidState(position) + '}';
+        return "CraftBlock{pos=" + this.position + ",type=" + this.getType() + ",data=" + this.getNMS() + ",fluid=" + this.world.getFluidState(this.position) + '}';
     }
 
-    public static BlockFace notchToBlockFace(EnumDirection notch) {
+    public static BlockFace notchToBlockFace(Direction notch) {
         if (notch == null) {
             return BlockFace.SELF;
         }
@@ -302,23 +301,23 @@ public class CraftBlock implements Block {
         }
     }
 
-    public static EnumDirection blockFaceToNotch(BlockFace face) {
+    public static Direction blockFaceToNotch(BlockFace face) {
         if (face == null) {
             return null;
         }
         switch (face) {
             case DOWN:
-                return EnumDirection.DOWN;
+                return Direction.DOWN;
             case UP:
-                return EnumDirection.UP;
+                return Direction.UP;
             case NORTH:
-                return EnumDirection.NORTH;
+                return Direction.NORTH;
             case SOUTH:
-                return EnumDirection.SOUTH;
+                return Direction.SOUTH;
             case WEST:
-                return EnumDirection.WEST;
+                return Direction.WEST;
             case EAST:
-                return EnumDirection.EAST;
+                return Direction.EAST;
             default:
                 return null;
         }
@@ -331,32 +330,32 @@ public class CraftBlock implements Block {
 
     @Override
     public Biome getBiome() {
-        return getWorld().getBiome(getX(), getY(), getZ());
+        return this.getWorld().getBiome(this.getX(), this.getY(), this.getZ());
     }
 
     @Override
     public void setBiome(Biome bio) {
-        getWorld().setBiome(getX(), getY(), getZ(), bio);
+        this.getWorld().setBiome(this.getX(), this.getY(), this.getZ(), bio);
     }
 
     @Override
     public double getTemperature() {
-        return world.getBiome(position).value().getTemperature(position, world.getSeaLevel());
+        return this.world.getBiome(this.position).value().getTemperature(this.position, this.world.getSeaLevel());
     }
 
     @Override
     public double getHumidity() {
-        return getWorld().getHumidity(getX(), getY(), getZ());
+        return this.getWorld().getHumidity(this.getX(), this.getY(), this.getZ());
     }
 
     @Override
     public boolean isBlockPowered() {
-        return world.getMinecraftWorld().getDirectSignalTo(position) > 0;
+        return this.world.getMinecraftWorld().getDirectSignalTo(this.position) > 0;
     }
 
     @Override
     public boolean isBlockIndirectlyPowered() {
-        return world.getMinecraftWorld().hasNeighborSignal(position);
+        return this.world.getMinecraftWorld().hasNeighborSignal(this.position);
     }
 
     @Override
@@ -378,14 +377,14 @@ public class CraftBlock implements Block {
 
     @Override
     public boolean isBlockFacePowered(BlockFace face) {
-        return world.getMinecraftWorld().hasSignal(position, blockFaceToNotch(face));
+        return this.world.getMinecraftWorld().hasSignal(this.position, CraftBlock.blockFaceToNotch(face));
     }
 
     @Override
     public boolean isBlockFaceIndirectlyPowered(BlockFace face) {
-        int power = world.getMinecraftWorld().getSignal(position, blockFaceToNotch(face));
+        int power = this.world.getMinecraftWorld().getSignal(this.position, CraftBlock.blockFaceToNotch(face));
 
-        Block relative = getRelative(face);
+        Block relative = this.getRelative(face);
         if (relative.getType() == Material.REDSTONE_WIRE) {
             return Math.max(power, relative.getData()) > 0;
         }
@@ -396,24 +395,24 @@ public class CraftBlock implements Block {
     @Override
     public int getBlockPower(BlockFace face) {
         int power = 0;
-        net.minecraft.world.level.World world = this.world.getMinecraftWorld();
-        int x = getX();
-        int y = getY();
-        int z = getZ();
-        if ((face == BlockFace.DOWN || face == BlockFace.SELF) && world.hasSignal(new BlockPosition(x, y - 1, z), EnumDirection.DOWN)) power = getPower(power, world.getBlockState(new BlockPosition(x, y - 1, z)));
-        if ((face == BlockFace.UP || face == BlockFace.SELF) && world.hasSignal(new BlockPosition(x, y + 1, z), EnumDirection.UP)) power = getPower(power, world.getBlockState(new BlockPosition(x, y + 1, z)));
-        if ((face == BlockFace.EAST || face == BlockFace.SELF) && world.hasSignal(new BlockPosition(x + 1, y, z), EnumDirection.EAST)) power = getPower(power, world.getBlockState(new BlockPosition(x + 1, y, z)));
-        if ((face == BlockFace.WEST || face == BlockFace.SELF) && world.hasSignal(new BlockPosition(x - 1, y, z), EnumDirection.WEST)) power = getPower(power, world.getBlockState(new BlockPosition(x - 1, y, z)));
-        if ((face == BlockFace.NORTH || face == BlockFace.SELF) && world.hasSignal(new BlockPosition(x, y, z - 1), EnumDirection.NORTH)) power = getPower(power, world.getBlockState(new BlockPosition(x, y, z - 1)));
-        if ((face == BlockFace.SOUTH || face == BlockFace.SELF) && world.hasSignal(new BlockPosition(x, y, z + 1), EnumDirection.SOUTH)) power = getPower(power, world.getBlockState(new BlockPosition(x, y, z + 1)));
-        return power > 0 ? power : (face == BlockFace.SELF ? isBlockIndirectlyPowered() : isBlockFaceIndirectlyPowered(face)) ? 15 : 0;
+        net.minecraft.world.level.Level world = this.world.getMinecraftWorld();
+        int x = this.getX();
+        int y = this.getY();
+        int z = this.getZ();
+        if ((face == BlockFace.DOWN || face == BlockFace.SELF) && world.hasSignal(new BlockPos(x, y - 1, z), Direction.DOWN)) power = CraftBlock.getPower(power, world.getBlockState(new BlockPos(x, y - 1, z)));
+        if ((face == BlockFace.UP || face == BlockFace.SELF) && world.hasSignal(new BlockPos(x, y + 1, z), Direction.UP)) power = CraftBlock.getPower(power, world.getBlockState(new BlockPos(x, y + 1, z)));
+        if ((face == BlockFace.EAST || face == BlockFace.SELF) && world.hasSignal(new BlockPos(x + 1, y, z), Direction.EAST)) power = CraftBlock.getPower(power, world.getBlockState(new BlockPos(x + 1, y, z)));
+        if ((face == BlockFace.WEST || face == BlockFace.SELF) && world.hasSignal(new BlockPos(x - 1, y, z), Direction.WEST)) power = CraftBlock.getPower(power, world.getBlockState(new BlockPos(x - 1, y, z)));
+        if ((face == BlockFace.NORTH || face == BlockFace.SELF) && world.hasSignal(new BlockPos(x, y, z - 1), Direction.NORTH)) power = CraftBlock.getPower(power, world.getBlockState(new BlockPos(x, y, z - 1)));
+        if ((face == BlockFace.SOUTH || face == BlockFace.SELF) && world.hasSignal(new BlockPos(x, y, z + 1), Direction.SOUTH)) power = CraftBlock.getPower(power, world.getBlockState(new BlockPos(x, y, z + 1)));
+        return power > 0 ? power : (face == BlockFace.SELF ? this.isBlockIndirectlyPowered() : this.isBlockFaceIndirectlyPowered(face)) ? 15 : 0;
     }
 
-    private static int getPower(int i, IBlockData iblockdata) {
+    private static int getPower(int i, net.minecraft.world.level.block.state.BlockState iblockdata) {
         if (!iblockdata.is(Blocks.REDSTONE_WIRE)) {
             return i;
         } else {
-            int j = iblockdata.getValue(BlockRedstoneWire.POWER);
+            int j = iblockdata.getValue(RedStoneWireBlock.POWER);
 
             return j > i ? j : i;
         }
@@ -421,72 +420,72 @@ public class CraftBlock implements Block {
 
     @Override
     public int getBlockPower() {
-        return getBlockPower(BlockFace.SELF);
+        return this.getBlockPower(BlockFace.SELF);
     }
 
     @Override
     public boolean isEmpty() {
-        return getNMS().isAir();
+        return this.getNMS().isAir();
     }
 
     @Override
     public boolean isLiquid() {
-        return getNMS().liquid();
+        return this.getNMS().liquid();
     }
 
     @Override
     public PistonMoveReaction getPistonMoveReaction() {
-        return PistonMoveReaction.getById(getNMS().getPistonPushReaction().ordinal());
+        return PistonMoveReaction.getById(this.getNMS().getPistonPushReaction().ordinal());
     }
 
     @Override
     public boolean breakNaturally() {
-        return breakNaturally(null);
+        return this.breakNaturally(null);
     }
 
     @Override
     public boolean breakNaturally(ItemStack item) {
         // Order matters here, need to drop before setting to air so skulls can get their data
-        net.minecraft.world.level.block.state.IBlockData iblockdata = this.getNMS();
+        net.minecraft.world.level.block.state.BlockState iblockdata = this.getNMS();
         net.minecraft.world.level.block.Block block = iblockdata.getBlock();
         net.minecraft.world.item.ItemStack nmsItem = CraftItemStack.asNMSCopy(item);
         boolean result = false;
 
         // Modelled off EntityHuman#hasBlock
         if (block != Blocks.AIR && (item == null || !iblockdata.requiresCorrectToolForDrops() || nmsItem.isCorrectToolForDrops(iblockdata))) {
-            net.minecraft.world.level.block.Block.dropResources(iblockdata, world.getMinecraftWorld(), position, world.getBlockEntity(position), null, nmsItem);
+            net.minecraft.world.level.block.Block.dropResources(iblockdata, this.world.getMinecraftWorld(), this.position, this.world.getBlockEntity(this.position), null, nmsItem);
             result = true;
         }
 
         // SPIGOT-6778: Directly call setBlock instead of setTypeAndData, so that the tile entiy is not removed and custom remove logic is run.
-        return world.setBlock(position, Blocks.AIR.defaultBlockState(), 3) && result;
+        return this.world.setBlock(this.position, Blocks.AIR.defaultBlockState(), 3) && result;
     }
 
     @Override
     public boolean applyBoneMeal(BlockFace face) {
-        EnumDirection direction = blockFaceToNotch(face);
+        Direction direction = CraftBlock.blockFaceToNotch(face);
         BlockFertilizeEvent event = null;
-        WorldServer world = getCraftWorld().getHandle();
-        ItemActionContext context = new ItemActionContext(world, null, EnumHand.MAIN_HAND, Items.BONE_MEAL.getDefaultInstance(), new MovingObjectPositionBlock(Vec3D.ZERO, direction, getPosition(), false));
+        ServerLevel world = this.getCraftWorld().getHandle();
+        UseOnContext context = new UseOnContext(world, null, InteractionHand.MAIN_HAND, Items.BONE_MEAL.getDefaultInstance(), new BlockHitResult(Vec3.ZERO, direction, this.getPosition(), false));
 
         // SPIGOT-6895: Call StructureGrowEvent and BlockFertilizeEvent
         world.captureTreeGeneration = true;
-        EnumInteractionResult result = ItemBoneMeal.applyBonemeal(context);
+        InteractionResult result = BoneMealItem.applyBonemeal(context);
         world.captureTreeGeneration = false;
 
         if (world.capturedBlockStates.size() > 0) {
-            TreeType treeType = BlockSapling.treeType;
-            BlockSapling.treeType = null;
+            TreeType treeType = SaplingBlock.treeType;
+            SaplingBlock.treeType = null;
             List<BlockState> blocks = new ArrayList<>(world.capturedBlockStates.values());
             world.capturedBlockStates.clear();
             StructureGrowEvent structureEvent = null;
 
             if (treeType != null) {
-                structureEvent = new StructureGrowEvent(getLocation(), treeType, true, null, blocks);
+                structureEvent = new StructureGrowEvent(this.getLocation(), treeType, true, null, blocks);
                 Bukkit.getPluginManager().callEvent(structureEvent);
             }
 
-            event = new BlockFertilizeEvent(CraftBlock.at(world, getPosition()), null, blocks);
+            event = new BlockFertilizeEvent(CraftBlock.at(world, this.getPosition()), null, blocks);
             event.setCancelled(structureEvent != null && structureEvent.isCancelled());
             Bukkit.getPluginManager().callEvent(event);
 
@@ -497,27 +496,27 @@ public class CraftBlock implements Block {
             }
         }
 
-        return result == EnumInteractionResult.SUCCESS && (event == null || !event.isCancelled());
+        return result == InteractionResult.SUCCESS && (event == null || !event.isCancelled());
     }
 
     @Override
     public Collection<ItemStack> getDrops() {
-        return getDrops(null);
+        return this.getDrops(null);
     }
 
     @Override
     public Collection<ItemStack> getDrops(ItemStack item) {
-        return getDrops(item, null);
+        return this.getDrops(item, null);
     }
 
     @Override
     public Collection<ItemStack> getDrops(ItemStack item, Entity entity) {
-        IBlockData iblockdata = getNMS();
+        net.minecraft.world.level.block.state.BlockState iblockdata = this.getNMS();
         net.minecraft.world.item.ItemStack nms = CraftItemStack.asNMSCopy(item);
 
         // Modelled off EntityHuman#hasBlock
         if (item == null || CraftBlockData.isPreferredTool(iblockdata, nms)) {
-            return net.minecraft.world.level.block.Block.getDrops(iblockdata, (WorldServer) world.getMinecraftWorld(), position, world.getBlockEntity(position), entity == null ? null : ((CraftEntity) entity).getHandle(), nms)
+            return net.minecraft.world.level.block.Block.getDrops(iblockdata, (ServerLevel) this.world.getMinecraftWorld(), this.position, this.world.getBlockEntity(this.position), entity == null ? null : ((CraftEntity) entity).getHandle(), nms)
                     .stream().map(CraftItemStack::asBukkitCopy).collect(Collectors.toList());
         } else {
             return Collections.emptyList();
@@ -526,7 +525,7 @@ public class CraftBlock implements Block {
 
     @Override
     public boolean isPreferredTool(ItemStack item) {
-        IBlockData iblockdata = getNMS();
+        net.minecraft.world.level.block.state.BlockState iblockdata = this.getNMS();
         net.minecraft.world.item.ItemStack nms = CraftItemStack.asNMSCopy(item);
         return CraftBlockData.isPreferredTool(iblockdata, nms);
     }
@@ -534,32 +533,32 @@ public class CraftBlock implements Block {
     @Override
     public float getBreakSpeed(Player player) {
         Preconditions.checkArgument(player != null, "player cannot be null");
-        return getNMS().getDestroyProgress(((CraftPlayer) player).getHandle(), world, position);
+        return this.getNMS().getDestroyProgress(((CraftPlayer) player).getHandle(), this.world, this.position);
     }
 
     @Override
     public void setMetadata(String metadataKey, MetadataValue newMetadataValue) {
-        getCraftWorld().getBlockMetadata().setMetadata(this, metadataKey, newMetadataValue);
+        this.getCraftWorld().getBlockMetadata().setMetadata(this, metadataKey, newMetadataValue);
     }
 
     @Override
     public List<MetadataValue> getMetadata(String metadataKey) {
-        return getCraftWorld().getBlockMetadata().getMetadata(this, metadataKey);
+        return this.getCraftWorld().getBlockMetadata().getMetadata(this, metadataKey);
     }
 
     @Override
     public boolean hasMetadata(String metadataKey) {
-        return getCraftWorld().getBlockMetadata().hasMetadata(this, metadataKey);
+        return this.getCraftWorld().getBlockMetadata().hasMetadata(this, metadataKey);
     }
 
     @Override
     public void removeMetadata(String metadataKey, Plugin owningPlugin) {
-        getCraftWorld().getBlockMetadata().removeMetadata(this, metadataKey, owningPlugin);
+        this.getCraftWorld().getBlockMetadata().removeMetadata(this, metadataKey, owningPlugin);
     }
 
     @Override
     public boolean isPassable() {
-        return this.getNMS().getCollisionShape(world, position).isEmpty();
+        return this.getNMS().getCollisionShape(this.world, this.position).isEmpty();
     }
 
     @Override
@@ -578,42 +577,42 @@ public class CraftBlock implements Block {
         }
 
         Vector dir = direction.clone().normalize().multiply(maxDistance);
-        Vec3D startPos = CraftLocation.toVec3D(start);
-        Vec3D endPos = startPos.add(dir.getX(), dir.getY(), dir.getZ());
+        Vec3 startPos = CraftLocation.toVec3D(start);
+        Vec3 endPos = startPos.add(dir.getX(), dir.getY(), dir.getZ());
 
-        MovingObjectPosition nmsHitResult = world.clip(new RayTrace(startPos, endPos, RayTrace.BlockCollisionOption.OUTLINE, CraftFluidCollisionMode.toNMS(fluidCollisionMode), VoxelShapeCollision.empty()), position);
+        HitResult nmsHitResult = this.world.clip(new ClipContext(startPos, endPos, ClipContext.Block.OUTLINE, CraftFluidCollisionMode.toNMS(fluidCollisionMode), CollisionContext.empty()), this.position);
         return CraftRayTraceResult.fromNMS(this.getWorld(), nmsHitResult);
     }
 
     @Override
     public BoundingBox getBoundingBox() {
-        VoxelShape shape = getNMS().getShape(world, position);
+        VoxelShape shape = this.getNMS().getShape(this.world, this.position);
 
         if (shape.isEmpty()) {
             return new BoundingBox(); // Return an empty bounding box if the block has no dimension
         }
 
-        AxisAlignedBB aabb = shape.bounds();
-        return new BoundingBox(getX() + aabb.minX, getY() + aabb.minY, getZ() + aabb.minZ, getX() + aabb.maxX, getY() + aabb.maxY, getZ() + aabb.maxZ);
+        AABB aabb = shape.bounds();
+        return new BoundingBox(this.getX() + aabb.minX, this.getY() + aabb.minY, this.getZ() + aabb.minZ, this.getX() + aabb.maxX, this.getY() + aabb.maxY, this.getZ() + aabb.maxZ);
     }
 
     @Override
     public org.bukkit.util.VoxelShape getCollisionShape() {
-        VoxelShape shape = getNMS().getCollisionShape(world, position);
+        VoxelShape shape = this.getNMS().getCollisionShape(this.world, this.position);
         return new CraftVoxelShape(shape);
     }
 
     @Override
     public boolean canPlace(BlockData data) {
         Preconditions.checkArgument(data != null, "BlockData cannot be null");
-        net.minecraft.world.level.block.state.IBlockData iblockdata = ((CraftBlockData) data).getState();
-        net.minecraft.world.level.World world = this.world.getMinecraftWorld();
+        net.minecraft.world.level.block.state.BlockState iblockdata = ((CraftBlockData) data).getState();
+        net.minecraft.world.level.Level world = this.world.getMinecraftWorld();
 
         return iblockdata.canSurvive(world, this.position);
     }
 
     @Override
     public String getTranslationKey() {
-        return getNMS().getBlock().getDescriptionId();
+        return this.getNMS().getBlock().getDescriptionId();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
index 581905974d..483a89ba47 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockEntityState.java
@@ -1,17 +1,17 @@
 package org.bukkit.craftbukkit.block;
 
 import java.util.Set;
-import net.minecraft.core.IRegistryCustom;
+import net.minecraft.core.RegistryAccess;
 import net.minecraft.core.component.DataComponentMap;
 import net.minecraft.core.component.DataComponentPatch;
 import net.minecraft.core.component.DataComponentType;
-import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.CompoundTag;
 import net.minecraft.network.protocol.Packet;
-import net.minecraft.network.protocol.game.PacketListenerPlayOut;
-import net.minecraft.network.protocol.game.PacketPlayOutTileEntityData;
+import net.minecraft.network.protocol.game.ClientGamePacketListener;
+import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket;
 import net.minecraft.server.MinecraftServer;
-import net.minecraft.world.level.GeneratorAccess;
-import net.minecraft.world.level.block.entity.TileEntity;
+import net.minecraft.world.level.LevelAccessor;
+import net.minecraft.world.level.block.entity.BlockEntity;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.block.TileState;
@@ -20,7 +20,7 @@ import org.bukkit.persistence.PersistentDataContainer;
 import org.jetbrains.annotations.NotNull;
 import org.jetbrains.annotations.Nullable;
 
-public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState implements TileState {
+public class CraftBlockEntityState<T extends BlockEntity> extends CraftBlockState implements TileState {
 
     private final T tileEntity;
     private final T snapshot;
@@ -32,22 +32,22 @@ public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState
 
         // copy tile entity data:
         this.snapshot = this.createSnapshot(tileEntity);
-        this.load(snapshot);
+        this.load(this.snapshot);
     }
 
     protected CraftBlockEntityState(CraftBlockEntityState<T> state, Location location) {
         super(state, location);
-        this.tileEntity = createSnapshot(state.snapshot);
-        this.snapshot = tileEntity;
-        loadData(state.getSnapshotNBT());
+        this.tileEntity = this.createSnapshot(state.snapshot);
+        this.snapshot = this.tileEntity;
+        this.loadData(state.getSnapshotNBT());
     }
 
     public void refreshSnapshot() {
-        this.load(tileEntity);
+        this.load(this.tileEntity);
     }
 
-    private IRegistryCustom getRegistryAccess() {
-        GeneratorAccess worldHandle = getWorldHandle();
+    private RegistryAccess getRegistryAccess() {
+        LevelAccessor worldHandle = this.getWorldHandle();
         return (worldHandle != null) ? worldHandle.registryAccess() : MinecraftServer.getDefaultRegistryAccess();
     }
 
@@ -56,96 +56,96 @@ public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState
             return null;
         }
 
-        NBTTagCompound nbtTagCompound = tileEntity.saveWithFullMetadata(getRegistryAccess());
-        T snapshot = (T) TileEntity.loadStatic(getPosition(), getHandle(), nbtTagCompound, getRegistryAccess());
+        CompoundTag nbtTagCompound = tileEntity.saveWithFullMetadata(this.getRegistryAccess());
+        T snapshot = (T) BlockEntity.loadStatic(this.getPosition(), this.getHandle(), nbtTagCompound, this.getRegistryAccess());
 
         return snapshot;
     }
 
     public Set<DataComponentType<?>> applyComponents(DataComponentMap datacomponentmap, DataComponentPatch datacomponentpatch) {
-        Set<DataComponentType<?>> result = snapshot.applyComponentsSet(datacomponentmap, datacomponentpatch);
-        load(snapshot);
+        Set<DataComponentType<?>> result = this.snapshot.applyComponentsSet(datacomponentmap, datacomponentpatch);
+        this.load(this.snapshot);
         return result;
     }
 
     public DataComponentMap collectComponents() {
-        return snapshot.collectComponents();
+        return this.snapshot.collectComponents();
     }
 
     // Loads the specified data into the snapshot TileEntity.
-    public void loadData(NBTTagCompound nbtTagCompound) {
-        snapshot.loadWithComponents(nbtTagCompound, getRegistryAccess());
-        load(snapshot);
+    public void loadData(CompoundTag nbtTagCompound) {
+        this.snapshot.loadWithComponents(nbtTagCompound, this.getRegistryAccess());
+        this.load(this.snapshot);
     }
 
     // copies the TileEntity-specific data, retains the position
     private void copyData(T from, T to) {
-        NBTTagCompound nbtTagCompound = from.saveWithFullMetadata(getRegistryAccess());
-        to.loadWithComponents(nbtTagCompound, getRegistryAccess());
+        CompoundTag nbtTagCompound = from.saveWithFullMetadata(this.getRegistryAccess());
+        to.loadWithComponents(nbtTagCompound, this.getRegistryAccess());
     }
 
     // gets the wrapped TileEntity
-    protected T getTileEntity() {
-        return tileEntity;
+    public T getTileEntity() {
+        return this.tileEntity;
     }
 
     // gets the cloned TileEntity which is used to store the captured data
     protected T getSnapshot() {
-        return snapshot;
+        return this.snapshot;
     }
 
     // gets the current TileEntity from the world at this position
-    protected TileEntity getTileEntityFromWorld() {
-        requirePlaced();
+    protected BlockEntity getTileEntityFromWorld() {
+        this.requirePlaced();
 
-        return getWorldHandle().getBlockEntity(this.getPosition());
+        return this.getWorldHandle().getBlockEntity(this.getPosition());
     }
 
     // gets the NBT data of the TileEntity represented by this block state
-    public NBTTagCompound getSnapshotNBT() {
+    public CompoundTag getSnapshotNBT() {
         // update snapshot
-        applyTo(snapshot);
+        this.applyTo(this.snapshot);
 
-        return snapshot.saveWithFullMetadata(getRegistryAccess());
+        return this.snapshot.saveWithFullMetadata(this.getRegistryAccess());
     }
 
-    public NBTTagCompound getItemNBT() {
+    public CompoundTag getItemNBT() {
         // update snapshot
-        applyTo(snapshot);
+        this.applyTo(this.snapshot);
 
         // See TileEntity#saveToItem
-        NBTTagCompound nbt = snapshot.saveCustomOnly(getRegistryAccess());
-        snapshot.removeComponentsFromTag(nbt);
+        CompoundTag nbt = this.snapshot.saveCustomOnly(this.getRegistryAccess());
+        this.snapshot.removeComponentsFromTag(nbt);
         return nbt;
     }
 
-    public void addEntityType(NBTTagCompound nbt) {
-        TileEntity.addEntityType(nbt, snapshot.getType());
+    public void addEntityType(CompoundTag nbt) {
+        BlockEntity.addEntityType(nbt, this.snapshot.getType());
     }
 
     // gets the packet data of the TileEntity represented by this block state
-    public NBTTagCompound getUpdateNBT() {
+    public CompoundTag getUpdateNBT() {
         // update snapshot
-        applyTo(snapshot);
+        this.applyTo(this.snapshot);
 
-        return snapshot.getUpdateTag(getRegistryAccess());
+        return this.snapshot.getUpdateTag(this.getRegistryAccess());
     }
 
     // copies the data of the given tile entity to this block state
     protected void load(T tileEntity) {
-        if (tileEntity != null && tileEntity != snapshot) {
-            copyData(tileEntity, snapshot);
+        if (tileEntity != null && tileEntity != this.snapshot) {
+            this.copyData(tileEntity, this.snapshot);
         }
     }
 
     // applies the TileEntity data of this block state to the given TileEntity
     protected void applyTo(T tileEntity) {
-        if (tileEntity != null && tileEntity != snapshot) {
-            copyData(snapshot, tileEntity);
+        if (tileEntity != null && tileEntity != this.snapshot) {
+            this.copyData(this.snapshot, tileEntity);
         }
     }
 
-    protected boolean isApplicable(TileEntity tileEntity) {
+    protected boolean isApplicable(BlockEntity tileEntity) {
         return tileEntity != null && this.tileEntity.getClass() == tileEntity.getClass();
     }
 
@@ -154,10 +154,10 @@ public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState
         boolean result = super.update(force, applyPhysics);
 
         if (result && this.isPlaced()) {
-            TileEntity tile = getTileEntityFromWorld();
+            BlockEntity tile = this.getTileEntityFromWorld();
 
-            if (isApplicable(tile)) {
-                applyTo((T) tile);
+            if (this.isApplicable(tile)) {
+                this.applyTo((T) tile);
                 tile.setChanged();
             }
         }
@@ -171,8 +171,8 @@ public class CraftBlockEntityState<T extends TileEntity> extends CraftBlockState
     }
 
     @Nullable
-    public Packet<PacketListenerPlayOut> getUpdatePacket(@NotNull Location location) {
-        return new PacketPlayOutTileEntityData(CraftLocation.toBlockPosition(location), snapshot.getType(), getUpdateNBT());
+    public Packet<ClientGamePacketListener> getUpdatePacket(@NotNull Location location) {
+        return new ClientboundBlockEntityDataPacket(CraftLocation.toBlockPosition(location), this.snapshot.getType(), this.getUpdateNBT());
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
index e2aaf4c803..fabdec2d66 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockState.java
@@ -4,9 +4,8 @@ import com.google.common.base.Preconditions;
 import java.lang.ref.WeakReference;
 import java.util.List;
 import javax.annotation.Nullable;
-import net.minecraft.core.BlockPosition;
-import net.minecraft.world.level.GeneratorAccess;
-import net.minecraft.world.level.block.state.IBlockData;
+import net.minecraft.core.BlockPos;
+import net.minecraft.world.level.LevelAccessor;
 import org.bukkit.Chunk;
 import org.bukkit.Location;
 import org.bukkit.Material;
@@ -26,16 +25,16 @@ import org.bukkit.plugin.Plugin;
 public class CraftBlockState implements BlockState {
 
     protected final CraftWorld world;
-    private final BlockPosition position;
-    protected IBlockData data;
+    private final BlockPos position;
+    protected net.minecraft.world.level.block.state.BlockState data;
     protected int flag;
-    private WeakReference<GeneratorAccess> weakWorld;
+    private WeakReference<LevelAccessor> weakWorld;
 
     protected CraftBlockState(final Block block) {
         this(block.getWorld(), ((CraftBlock) block).getPosition(), ((CraftBlock) block).getNMS());
         this.flag = 3;
 
-        setWorldHandle(((CraftBlock) block).getHandle());
+        this.setWorldHandle(((CraftBlock) block).getHandle());
     }
 
     protected CraftBlockState(final Block block, int flag) {
@@ -44,10 +43,10 @@ public class CraftBlockState implements BlockState {
     }
 
     // world can be null for non-placed BlockStates.
-    protected CraftBlockState(@Nullable World world, BlockPosition blockPosition, IBlockData blockData) {
+    protected CraftBlockState(@Nullable World world, BlockPos blockPosition, net.minecraft.world.level.block.state.BlockState blockData) {
         this.world = (CraftWorld) world;
-        position = blockPosition;
-        data = blockData;
+        this.position = blockPosition;
+        this.data = blockData;
     }
 
     // Creates an unplaced copy of the given CraftBlockState at the given location
@@ -61,11 +60,11 @@ public class CraftBlockState implements BlockState {
         }
         this.data = state.data;
         this.flag = state.flag;
-        setWorldHandle(state.getWorldHandle());
+        this.setWorldHandle(state.getWorldHandle());
     }
 
-    public void setWorldHandle(GeneratorAccess generatorAccess) {
-        if (generatorAccess instanceof net.minecraft.world.level.World) {
+    public void setWorldHandle(LevelAccessor generatorAccess) {
+        if (generatorAccess instanceof net.minecraft.world.level.Level) {
             this.weakWorld = null;
         } else {
             this.weakWorld = new WeakReference<>(generatorAccess);
@@ -74,71 +73,71 @@ public class CraftBlockState implements BlockState {
 
     // Returns null if weakWorld is not available and the BlockState is not placed.
     // If this returns a World instead of only a GeneratorAccess, this implies that this BlockState is placed.
-    public GeneratorAccess getWorldHandle() {
-        if (weakWorld == null) {
-            return this.isPlaced() ? world.getHandle() : null;
+    public LevelAccessor getWorldHandle() {
+        if (this.weakWorld == null) {
+            return this.isPlaced() ? this.world.getHandle() : null;
         }
 
-        GeneratorAccess access = weakWorld.get();
+        LevelAccessor access = this.weakWorld.get();
         if (access == null) {
-            weakWorld = null;
-            return this.isPlaced() ? world.getHandle() : null;
+            this.weakWorld = null;
+            return this.isPlaced() ? this.world.getHandle() : null;
         }
 
         return access;
     }
 
     protected final boolean isWorldGeneration() {
-        GeneratorAccess generatorAccess = this.getWorldHandle();
-        return generatorAccess != null && !(generatorAccess instanceof net.minecraft.world.level.World);
+        LevelAccessor generatorAccess = this.getWorldHandle();
+        return generatorAccess != null && !(generatorAccess instanceof net.minecraft.world.level.Level);
     }
 
     protected final void ensureNoWorldGeneration() {
-        Preconditions.checkState(!isWorldGeneration(), "This operation is not supported during world generation!");
+        Preconditions.checkState(!this.isWorldGeneration(), "This operation is not supported during world generation!");
     }
 
     @Override
     public World getWorld() {
-        requirePlaced();
-        return world;
+        this.requirePlaced();
+        return this.world;
     }
 
     @Override
     public int getX() {
-        return position.getX();
+        return this.position.getX();
     }
 
     @Override
     public int getY() {
-        return position.getY();
+        return this.position.getY();
     }
 
     @Override
     public int getZ() {
-        return position.getZ();
+        return this.position.getZ();
     }
 
     @Override
     public Chunk getChunk() {
-        requirePlaced();
-        return world.getChunkAt(getX() >> 4, getZ() >> 4);
+        this.requirePlaced();
+        return this.world.getChunkAt(this.getX() >> 4, this.getZ() >> 4);
     }
 
-    public void setData(IBlockData data) {
+    public void setData(net.minecraft.world.level.block.state.BlockState data) {
         this.data = data;
     }
 
-    public BlockPosition getPosition() {
+    public BlockPos getPosition() {
         return this.position;
     }
 
-    public IBlockData getHandle() {
+    public net.minecraft.world.level.block.state.BlockState getHandle() {
         return this.data;
     }
 
     @Override
     public BlockData getBlockData() {
-        return CraftBlockData.fromData(data);
+        return CraftBlockData.fromData(this.data);
     }
 
     @Override
@@ -161,7 +160,7 @@ public class CraftBlockState implements BlockState {
 
     @Override
     public MaterialData getData() {
-        return CraftMagicNumbers.getMaterial(data);
+        return CraftMagicNumbers.getMaterial(this.data);
     }
 
     @Override
@@ -176,7 +175,7 @@ public class CraftBlockState implements BlockState {
 
     @Override
     public Material getType() {
-        return CraftBlockType.minecraftToBukkit(data.getBlock());
+        return CraftBlockType.minecraftToBukkit(this.data.getBlock());
     }
 
     public void setFlag(int flag) {
@@ -184,49 +183,49 @@ public class CraftBlockState implements BlockState {
     }
 
     public int getFlag() {
-        return flag;
+        return this.flag;
     }
 
     @Override
     public byte getLightLevel() {
-        return getBlock().getLightLevel();
+        return this.getBlock().getLightLevel();
     }
 
     @Override
     public CraftBlock getBlock() {
-        requirePlaced();
-        return CraftBlock.at(getWorldHandle(), position);
+        this.requirePlaced();
+        return CraftBlock.at(this.getWorldHandle(), this.position);
     }
 
     @Override
     public boolean update() {
-        return update(false);
+        return this.update(false);
     }
 
     @Override
     public boolean update(boolean force) {
-        return update(force, true);
+        return this.update(force, true);
     }
 
     @Override
     public boolean update(boolean force, boolean applyPhysics) {
-        if (!isPlaced()) {
+        if (!this.isPlaced()) {
             return true;
         }
-        GeneratorAccess access = getWorldHandle();
-        CraftBlock block = getBlock();
+        LevelAccessor access = this.getWorldHandle();
+        CraftBlock block = this.getBlock();
 
-        if (block.getType() != getType()) {
+        if (block.getType() != this.getType()) {
             if (!force) {
                 return false;
             }
         }
 
-        IBlockData newBlock = this.data;
+        net.minecraft.world.level.block.state.BlockState newBlock = this.data;
         block.setTypeAndData(newBlock, applyPhysics);
-        if (access instanceof net.minecraft.world.level.World) {
-            world.getHandle().sendBlockUpdated(
-                    position,
+        if (access instanceof net.minecraft.world.level.Level) {
+            this.world.getHandle().sendBlockUpdated(
+                    this.position,
                     block.getNMS(),
                     newBlock,
                     3
@@ -234,8 +233,8 @@ public class CraftBlockState implements BlockState {
         }
 
         // Update levers etc
-        if (false && applyPhysics && getData() instanceof Attachable) { // Call does not map to new API
-            world.getHandle().updateNeighborsAt(position.relative(CraftBlock.blockFaceToNotch(((Attachable) getData()).getAttachedFace())), newBlock.getBlock());
+        if (false && applyPhysics && this.getData() instanceof Attachable) { // Call does not map to new API
+            this.world.getHandle().updateNeighborsAt(this.position.relative(CraftBlock.blockFaceToNotch(((Attachable) this.getData()).getAttachedFace())), newBlock.getBlock());
         }
 
         return true;
@@ -243,7 +242,7 @@ public class CraftBlockState implements BlockState {
 
     @Override
     public byte getRawData() {
-        return CraftMagicNumbers.toLegacyData(data);
+        return CraftMagicNumbers.toLegacyData(this.data);
     }
 
     @Override
@@ -254,10 +253,10 @@ public class CraftBlockState implements BlockState {
     @Override
     public Location getLocation(Location loc) {
         if (loc != null) {
-            loc.setWorld(world);
-            loc.setX(getX());
-            loc.setY(getY());
-            loc.setZ(getZ());
+            loc.setWorld(this.world);
+            loc.setX(this.getX());
+            loc.setY(this.getY());
+            loc.setZ(this.getZ());
             loc.setYaw(0);
             loc.setPitch(0);
         }
@@ -267,7 +266,7 @@ public class CraftBlockState implements BlockState {
 
     @Override
     public void setRawData(byte data) {
-        this.data = CraftMagicNumbers.getBlock(getType(), data);
+        this.data = CraftMagicNumbers.getBlock(this.getType(), data);
     }
 
     @Override
@@ -275,7 +274,7 @@ public class CraftBlockState implements BlockState {
         if (obj == null) {
             return false;
         }
-        if (getClass() != obj.getClass()) {
+        if (this.getClass() != obj.getClass()) {
             return false;
         }
         final CraftBlockState other = (CraftBlockState) obj;
@@ -302,35 +301,35 @@ public class CraftBlockState implements BlockState {
 
     @Override
     public void setMetadata(String metadataKey, MetadataValue newMetadataValue) {
-        requirePlaced();
-        world.getBlockMetadata().setMetadata(getBlock(), metadataKey, newMetadataValue);
+        this.requirePlaced();
+        this.world.getBlockMetadata().setMetadata(this.getBlock(), metadataKey, newMetadataValue);
     }
 
     @Override
     public List<MetadataValue> getMetadata(String metadataKey) {
-        requirePlaced();
-        return world.getBlockMetadata().getMetadata(getBlock(), metadataKey);
+        this.requirePlaced();
+        return this.world.getBlockMetadata().getMetadata(this.getBlock(), metadataKey);
     }
 
     @Override
     public boolean hasMetadata(String metadataKey) {
-        requirePlaced();
-        return world.getBlockMetadata().hasMetadata(getBlock(), metadataKey);
+        this.requirePlaced();
+        return this.world.getBlockMetadata().hasMetadata(this.getBlock(), metadataKey);
     }
 
     @Override
     public void removeMetadata(String metadataKey, Plugin owningPlugin) {
-        requirePlaced();
-        world.getBlockMetadata().removeMetadata(getBlock(), metadataKey, owningPlugin);
+        this.requirePlaced();
+        this.world.getBlockMetadata().removeMetadata(this.getBlock(), metadataKey, owningPlugin);
     }
 
     @Override
     public boolean isPlaced() {
-        return world != null;
+        return this.world != null;
     }
 
     protected void requirePlaced() {
-        Preconditions.checkState(isPlaced(), "The blockState must be placed to call this method");
+        Preconditions.checkState(this.isPlaced(), "The blockState must be placed to call this method");
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
index c683a83050..b849ed6eef 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockStates.java
@@ -8,59 +8,58 @@ import java.util.List;
 import java.util.Map;
 import java.util.function.BiFunction;
 import javax.annotation.Nullable;
-import net.minecraft.core.BlockPosition;
-import net.minecraft.core.IRegistryCustom;
-import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.core.BlockPos;
+import net.minecraft.core.RegistryAccess;
+import net.minecraft.nbt.CompoundTag;
 import net.minecraft.server.MinecraftServer;
-import net.minecraft.world.level.GeneratorAccess;
-import net.minecraft.world.level.IWorldReader;
+import net.minecraft.world.level.LevelAccessor;
+import net.minecraft.world.level.LevelReader;
+import net.minecraft.world.level.block.entity.BannerBlockEntity;
+import net.minecraft.world.level.block.entity.BarrelBlockEntity;
+import net.minecraft.world.level.block.entity.BeaconBlockEntity;
+import net.minecraft.world.level.block.entity.BedBlockEntity;
+import net.minecraft.world.level.block.entity.BeehiveBlockEntity;
+import net.minecraft.world.level.block.entity.BellBlockEntity;
+import net.minecraft.world.level.block.entity.BlastFurnaceBlockEntity;
+import net.minecraft.world.level.block.entity.BlockEntity;
+import net.minecraft.world.level.block.entity.BrewingStandBlockEntity;
 import net.minecraft.world.level.block.entity.BrushableBlockEntity;
 import net.minecraft.world.level.block.entity.CalibratedSculkSensorBlockEntity;
+import net.minecraft.world.level.block.entity.CampfireBlockEntity;
+import net.minecraft.world.level.block.entity.ChestBlockEntity;
 import net.minecraft.world.level.block.entity.ChiseledBookShelfBlockEntity;
+import net.minecraft.world.level.block.entity.CommandBlockEntity;
+import net.minecraft.world.level.block.entity.ComparatorBlockEntity;
+import net.minecraft.world.level.block.entity.ConduitBlockEntity;
 import net.minecraft.world.level.block.entity.CrafterBlockEntity;
 import net.minecraft.world.level.block.entity.CreakingHeartBlockEntity;
+import net.minecraft.world.level.block.entity.DaylightDetectorBlockEntity;
 import net.minecraft.world.level.block.entity.DecoratedPotBlockEntity;
+import net.minecraft.world.level.block.entity.DispenserBlockEntity;
+import net.minecraft.world.level.block.entity.DropperBlockEntity;
+import net.minecraft.world.level.block.entity.EnchantingTableBlockEntity;
+import net.minecraft.world.level.block.entity.EnderChestBlockEntity;
+import net.minecraft.world.level.block.entity.FurnaceBlockEntity;
 import net.minecraft.world.level.block.entity.HangingSignBlockEntity;
+import net.minecraft.world.level.block.entity.HopperBlockEntity;
+import net.minecraft.world.level.block.entity.JigsawBlockEntity;
+import net.minecraft.world.level.block.entity.JukeboxBlockEntity;
+import net.minecraft.world.level.block.entity.LecternBlockEntity;
 import net.minecraft.world.level.block.entity.SculkCatalystBlockEntity;
 import net.minecraft.world.level.block.entity.SculkSensorBlockEntity;
 import net.minecraft.world.level.block.entity.SculkShriekerBlockEntity;
-import net.minecraft.world.level.block.entity.TileEntity;
-import net.minecraft.world.level.block.entity.TileEntityBanner;
-import net.minecraft.world.level.block.entity.TileEntityBarrel;
-import net.minecraft.world.level.block.entity.TileEntityBeacon;
-import net.minecraft.world.level.block.entity.TileEntityBed;
-import net.minecraft.world.level.block.entity.TileEntityBeehive;
-import net.minecraft.world.level.block.entity.TileEntityBell;
-import net.minecraft.world.level.block.entity.TileEntityBlastFurnace;
-import net.minecraft.world.level.block.entity.TileEntityBrewingStand;
-import net.minecraft.world.level.block.entity.TileEntityCampfire;
-import net.minecraft.world.level.block.entity.TileEntityChest;
-import net.minecraft.world.level.block.entity.TileEntityChestTrapped;
-import net.minecraft.world.level.block.entity.TileEntityCommand;
-import net.minecraft.world.level.block.entity.TileEntityComparator;
-import net.minecraft.world.level.block.entity.TileEntityConduit;
-import net.minecraft.world.level.block.entity.TileEntityDispenser;
-import net.minecraft.world.level.block.entity.TileEntityDropper;
-import net.minecraft.world.level.block.entity.TileEntityEnchantTable;
-import net.minecraft.world.level.block.entity.TileEntityEndGateway;
-import net.minecraft.world.level.block.entity.TileEntityEnderChest;
-import net.minecraft.world.level.block.entity.TileEntityEnderPortal;
-import net.minecraft.world.level.block.entity.TileEntityFurnaceFurnace;
-import net.minecraft.world.level.block.entity.TileEntityHopper;
-import net.minecraft.world.level.block.entity.TileEntityJigsaw;
-import net.minecraft.world.level.block.entity.TileEntityJukeBox;
-import net.minecraft.world.level.block.entity.TileEntityLectern;
-import net.minecraft.world.level.block.entity.TileEntityLightDetector;
-import net.minecraft.world.level.block.entity.TileEntityMobSpawner;
-import net.minecraft.world.level.block.entity.TileEntityShulkerBox;
-import net.minecraft.world.level.block.entity.TileEntitySign;
-import net.minecraft.world.level.block.entity.TileEntitySkull;
-import net.minecraft.world.level.block.entity.TileEntitySmoker;
-import net.minecraft.world.level.block.entity.TileEntityStructure;
+import net.minecraft.world.level.block.entity.ShulkerBoxBlockEntity;
+import net.minecraft.world.level.block.entity.SignBlockEntity;
+import net.minecraft.world.level.block.entity.SkullBlockEntity;
+import net.minecraft.world.level.block.entity.SmokerBlockEntity;
+import net.minecraft.world.level.block.entity.SpawnerBlockEntity;
+import net.minecraft.world.level.block.entity.StructureBlockEntity;
+import net.minecraft.world.level.block.entity.TheEndGatewayBlockEntity;
+import net.minecraft.world.level.block.entity.TheEndPortalBlockEntity;
+import net.minecraft.world.level.block.entity.TrappedChestBlockEntity;
 import net.minecraft.world.level.block.entity.TrialSpawnerBlockEntity;
 import net.minecraft.world.level.block.entity.vault.VaultBlockEntity;
-import net.minecraft.world.level.block.piston.TileEntityPiston;
-import net.minecraft.world.level.block.state.IBlockData;
+import net.minecraft.world.level.block.piston.PistonMovingBlockEntity;
 import org.bukkit.Material;
 import org.bukkit.World;
 import org.bukkit.block.Block;
@@ -83,22 +82,22 @@ public final class CraftBlockStates {
         // If the given tile entity is not null, its position and block data are expected to match the given block position and block data.
         // In some situations, such as during chunk generation, the tile entity's world may be null, even if the given world is not null.
         // If the tile entity's world is not null, it is expected to match the given world.
-        public abstract B createBlockState(World world, BlockPosition blockPosition, IBlockData blockData, TileEntity tileEntity);
+        public abstract B createBlockState(World world, BlockPos blockPosition, net.minecraft.world.level.block.state.BlockState blockData, BlockEntity tileEntity);
     }
 
-    private static class BlockEntityStateFactory<T extends TileEntity, B extends CraftBlockEntityState<T>> extends BlockStateFactory<B> {
+    private static class BlockEntityStateFactory<T extends BlockEntity, B extends CraftBlockEntityState<T>> extends BlockStateFactory<B> {
 
         private final BiFunction<World, T, B> blockStateConstructor;
-        private final BiFunction<BlockPosition, IBlockData, T> tileEntityConstructor;
+        private final BiFunction<BlockPos, net.minecraft.world.level.block.state.BlockState, T> tileEntityConstructor;
 
-        protected BlockEntityStateFactory(Class<B> blockStateType, BiFunction<World, T, B> blockStateConstructor, BiFunction<BlockPosition, IBlockData, T> tileEntityConstructor) {
+        protected BlockEntityStateFactory(Class<B> blockStateType, BiFunction<World, T, B> blockStateConstructor, BiFunction<BlockPos, net.minecraft.world.level.block.state.BlockState, T> tileEntityConstructor) {
             super(blockStateType);
             this.blockStateConstructor = blockStateConstructor;
             this.tileEntityConstructor = tileEntityConstructor;
         }
 
         @Override
-        public final B createBlockState(World world, BlockPosition blockPosition, IBlockData blockData, TileEntity tileEntity) {
+        public final B createBlockState(World world, BlockPos blockPosition, net.minecraft.world.level.block.state.BlockState blockData, BlockEntity tileEntity) {
             if (world != null) {
                 Preconditions.checkState(tileEntity != null, "Tile is null, asynchronous access? %s", CraftBlock.at(((CraftWorld) world).getHandle(), blockPosition));
             } else if (tileEntity == null) {
@@ -107,19 +106,19 @@ public final class CraftBlockStates {
             return this.createBlockState(world, (T) tileEntity);
         }
 
-        private T createTileEntity(BlockPosition blockPosition, IBlockData blockData) {
-            return tileEntityConstructor.apply(blockPosition, blockData);
+        private T createTileEntity(BlockPos blockPosition, net.minecraft.world.level.block.state.BlockState blockData) {
+            return this.tileEntityConstructor.apply(blockPosition, blockData);
         }
 
         private B createBlockState(World world, T tileEntity) {
-            return blockStateConstructor.apply(world, tileEntity);
+            return this.blockStateConstructor.apply(world, tileEntity);
         }
     }
 
     private static final Map<Material, BlockStateFactory<?>> FACTORIES = new HashMap<>();
     private static final BlockStateFactory<?> DEFAULT_FACTORY = new BlockStateFactory<CraftBlockState>(CraftBlockState.class) {
         @Override
-        public CraftBlockState createBlockState(World world, BlockPosition blockPosition, IBlockData blockData, TileEntity tileEntity) {
+        public CraftBlockState createBlockState(World world, BlockPos blockPosition, net.minecraft.world.level.block.state.BlockState blockData, BlockEntity tileEntity) {
             // SPIGOT-6754, SPIGOT-6817: Restore previous behaviour for tile entities with removed blocks (loot generation post-destroy)
             if (tileEntity != null) {
                 // block with unhandled TileEntity:
@@ -157,7 +156,7 @@ public final class CraftBlockStates {
                         Material.SPRUCE_WALL_SIGN,
                         Material.WARPED_SIGN,
                         Material.WARPED_WALL_SIGN
-                ), CraftSign.class, CraftSign::new, TileEntitySign::new
+                ), CraftSign.class, CraftSign::new, SignBlockEntity::new
         );
 
         register(
@@ -205,7 +204,7 @@ public final class CraftBlockStates {
                         Material.WITHER_SKELETON_WALL_SKULL,
                         Material.ZOMBIE_HEAD,
                         Material.ZOMBIE_WALL_HEAD
-                ), CraftSkull.class, CraftSkull::new, TileEntitySkull::new
+                ), CraftSkull.class, CraftSkull::new, SkullBlockEntity::new
         );
 
         register(
@@ -213,7 +212,7 @@ public final class CraftBlockStates {
                         Material.COMMAND_BLOCK,
                         Material.REPEATING_COMMAND_BLOCK,
                         Material.CHAIN_COMMAND_BLOCK
-                ), CraftCommandBlock.class, CraftCommandBlock::new, TileEntityCommand::new
+                ), CraftCommandBlock.class, CraftCommandBlock::new, CommandBlockEntity::new
         );
 
         register(
@@ -250,7 +249,7 @@ public final class CraftBlockStates {
                         Material.WHITE_WALL_BANNER,
                         Material.YELLOW_BANNER,
                         Material.YELLOW_WALL_BANNER
-                ), CraftBanner.class, CraftBanner::new, TileEntityBanner::new
+                ), CraftBanner.class, CraftBanner::new, BannerBlockEntity::new
         );
 
         register(
@@ -272,7 +271,7 @@ public final class CraftBlockStates {
                         Material.GREEN_SHULKER_BOX,
                         Material.RED_SHULKER_BOX,
                         Material.BLACK_SHULKER_BOX
-                ), CraftShulkerBox.class, CraftShulkerBox::new, TileEntityShulkerBox::new
+                ), CraftShulkerBox.class, CraftShulkerBox::new, ShulkerBoxBlockEntity::new
         );
 
         register(
@@ -293,101 +292,101 @@ public final class CraftBlockStates {
                         Material.RED_BED,
                         Material.WHITE_BED,
                         Material.YELLOW_BED
-                ), CraftBed.class, CraftBed::new, TileEntityBed::new
+                ), CraftBed.class, CraftBed::new, BedBlockEntity::new
         );
 
         register(
                 Arrays.asList(
                         Material.BEEHIVE,
                         Material.BEE_NEST
-                ), CraftBeehive.class, CraftBeehive::new, TileEntityBeehive::new
+                ), CraftBeehive.class, CraftBeehive::new, BeehiveBlockEntity::new
         );
 
         register(
                 Arrays.asList(
                         Material.CAMPFIRE,
                         Material.SOUL_CAMPFIRE
-                ), CraftCampfire.class, CraftCampfire::new, TileEntityCampfire::new
+                ), CraftCampfire.class, CraftCampfire::new, CampfireBlockEntity::new
         );
 
-        register(Material.BARREL, CraftBarrel.class, CraftBarrel::new, TileEntityBarrel::new);
-        register(Material.BEACON, CraftBeacon.class, CraftBeacon::new, TileEntityBeacon::new);
-        register(Material.BELL, CraftBell.class, CraftBell::new, TileEntityBell::new);
-        register(Material.BLAST_FURNACE, CraftBlastFurnace.class, CraftBlastFurnace::new, TileEntityBlastFurnace::new);
-        register(Material.BREWING_STAND, CraftBrewingStand.class, CraftBrewingStand::new, TileEntityBrewingStand::new);
-        register(Material.CHEST, CraftChest.class, CraftChest::new, TileEntityChest::new);
+        register(Material.BARREL, CraftBarrel.class, CraftBarrel::new, BarrelBlockEntity::new);
+        register(Material.BEACON, CraftBeacon.class, CraftBeacon::new, BeaconBlockEntity::new);
+        register(Material.BELL, CraftBell.class, CraftBell::new, BellBlockEntity::new);
+        register(Material.BLAST_FURNACE, CraftBlastFurnace.class, CraftBlastFurnace::new, BlastFurnaceBlockEntity::new);
+        register(Material.BREWING_STAND, CraftBrewingStand.class, CraftBrewingStand::new, BrewingStandBlockEntity::new);
+        register(Material.CHEST, CraftChest.class, CraftChest::new, ChestBlockEntity::new);
         register(Material.CHISELED_BOOKSHELF, CraftChiseledBookshelf.class, CraftChiseledBookshelf::new, ChiseledBookShelfBlockEntity::new);
-        register(Material.COMPARATOR, CraftComparator.class, CraftComparator::new, TileEntityComparator::new);
-        register(Material.CONDUIT, CraftConduit.class, CraftConduit::new, TileEntityConduit::new);
+        register(Material.COMPARATOR, CraftComparator.class, CraftComparator::new, ComparatorBlockEntity::new);
+        register(Material.CONDUIT, CraftConduit.class, CraftConduit::new, ConduitBlockEntity::new);
         register(Material.CREAKING_HEART, CraftCreakingHeart.class, CraftCreakingHeart::new, CreakingHeartBlockEntity::new);
-        register(Material.DAYLIGHT_DETECTOR, CraftDaylightDetector.class, CraftDaylightDetector::new, TileEntityLightDetector::new);
+        register(Material.DAYLIGHT_DETECTOR, CraftDaylightDetector.class, CraftDaylightDetector::new, DaylightDetectorBlockEntity::new);
         register(Material.DECORATED_POT, CraftDecoratedPot.class, CraftDecoratedPot::new, DecoratedPotBlockEntity::new);
-        register(Material.DISPENSER, CraftDispenser.class, CraftDispenser::new, TileEntityDispenser::new);
-        register(Material.DROPPER, CraftDropper.class, CraftDropper::new, TileEntityDropper::new);
-        register(Material.ENCHANTING_TABLE, CraftEnchantingTable.class, CraftEnchantingTable::new, TileEntityEnchantTable::new);
-        register(Material.ENDER_CHEST, CraftEnderChest.class, CraftEnderChest::new, TileEntityEnderChest::new);
-        register(Material.END_GATEWAY, CraftEndGateway.class, CraftEndGateway::new, TileEntityEndGateway::new);
-        register(Material.END_PORTAL, CraftEndPortal.class, CraftEndPortal::new, TileEntityEnderPortal::new);
-        register(Material.FURNACE, CraftFurnaceFurnace.class, CraftFurnaceFurnace::new, TileEntityFurnaceFurnace::new);
-        register(Material.HOPPER, CraftHopper.class, CraftHopper::new, TileEntityHopper::new);
-        register(Material.JIGSAW, CraftJigsaw.class, CraftJigsaw::new, TileEntityJigsaw::new);
-        register(Material.JUKEBOX, CraftJukebox.class, CraftJukebox::new, TileEntityJukeBox::new);
-        register(Material.LECTERN, CraftLectern.class, CraftLectern::new, TileEntityLectern::new);
-        register(Material.MOVING_PISTON, CraftMovingPiston.class, CraftMovingPiston::new, TileEntityPiston::new);
+        register(Material.DISPENSER, CraftDispenser.class, CraftDispenser::new, DispenserBlockEntity::new);
+        register(Material.DROPPER, CraftDropper.class, CraftDropper::new, DropperBlockEntity::new);
+        register(Material.ENCHANTING_TABLE, CraftEnchantingTable.class, CraftEnchantingTable::new, EnchantingTableBlockEntity::new);
+        register(Material.ENDER_CHEST, CraftEnderChest.class, CraftEnderChest::new, EnderChestBlockEntity::new);
+        register(Material.END_GATEWAY, CraftEndGateway.class, CraftEndGateway::new, TheEndGatewayBlockEntity::new);
+        register(Material.END_PORTAL, CraftEndPortal.class, CraftEndPortal::new, TheEndPortalBlockEntity::new);
+        register(Material.FURNACE, CraftFurnaceFurnace.class, CraftFurnaceFurnace::new, FurnaceBlockEntity::new);
+        register(Material.HOPPER, CraftHopper.class, CraftHopper::new, HopperBlockEntity::new);
+        register(Material.JIGSAW, CraftJigsaw.class, CraftJigsaw::new, JigsawBlockEntity::new);
+        register(Material.JUKEBOX, CraftJukebox.class, CraftJukebox::new, JukeboxBlockEntity::new);
+        register(Material.LECTERN, CraftLectern.class, CraftLectern::new, LecternBlockEntity::new);
+        register(Material.MOVING_PISTON, CraftMovingPiston.class, CraftMovingPiston::new, PistonMovingBlockEntity::new);
         register(Material.SCULK_CATALYST, CraftSculkCatalyst.class, CraftSculkCatalyst::new, SculkCatalystBlockEntity::new);
         register(Material.CALIBRATED_SCULK_SENSOR, CraftCalibratedSculkSensor.class, CraftCalibratedSculkSensor::new, CalibratedSculkSensorBlockEntity::new);
         register(Material.SCULK_SENSOR, CraftSculkSensor.class, CraftSculkSensor::new, SculkSensorBlockEntity::new);
         register(Material.SCULK_SHRIEKER, CraftSculkShrieker.class, CraftSculkShrieker::new, SculkShriekerBlockEntity::new);
-        register(Material.SMOKER, CraftSmoker.class, CraftSmoker::new, TileEntitySmoker::new);
-        register(Material.SPAWNER, CraftCreatureSpawner.class, CraftCreatureSpawner::new, TileEntityMobSpawner::new);
-        register(Material.STRUCTURE_BLOCK, CraftStructureBlock.class, CraftStructureBlock::new, TileEntityStructure::new);
+        register(Material.SMOKER, CraftSmoker.class, CraftSmoker::new, SmokerBlockEntity::new);
+        register(Material.SPAWNER, CraftCreatureSpawner.class, CraftCreatureSpawner::new, SpawnerBlockEntity::new);
+        register(Material.STRUCTURE_BLOCK, CraftStructureBlock.class, CraftStructureBlock::new, StructureBlockEntity::new);
         register(Material.SUSPICIOUS_SAND, CraftSuspiciousSand.class, CraftSuspiciousSand::new, BrushableBlockEntity::new);
         register(Material.SUSPICIOUS_GRAVEL, CraftBrushableBlock.class, CraftBrushableBlock::new, BrushableBlockEntity::new);
-        register(Material.TRAPPED_CHEST, CraftChest.class, CraftChest::new, TileEntityChestTrapped::new);
+        register(Material.TRAPPED_CHEST, CraftChest.class, CraftChest::new, TrappedChestBlockEntity::new);
         register(Material.CRAFTER, CraftCrafter.class, CraftCrafter::new, CrafterBlockEntity::new);
         register(Material.TRIAL_SPAWNER, CraftTrialSpawner.class, CraftTrialSpawner::new, TrialSpawnerBlockEntity::new);
         register(Material.VAULT, CraftVault.class, CraftVault::new, VaultBlockEntity::new);
     }
 
     private static void register(Material blockType, BlockStateFactory<?> factory) {
-        FACTORIES.put(blockType, factory);
+        CraftBlockStates.FACTORIES.put(blockType, factory);
     }
 
-    private static <T extends TileEntity, B extends CraftBlockEntityState<T>> void register(
+    private static <T extends BlockEntity, B extends CraftBlockEntityState<T>> void register(
             Material blockType,
             Class<B> blockStateType,
             BiFunction<World, T, B> blockStateConstructor,
-            BiFunction<BlockPosition, IBlockData, T> tileEntityConstructor
+            BiFunction<BlockPos, net.minecraft.world.level.block.state.BlockState, T> tileEntityConstructor
     ) {
-        register(Collections.singletonList(blockType), blockStateType, blockStateConstructor, tileEntityConstructor);
+        CraftBlockStates.register(Collections.singletonList(blockType), blockStateType, blockStateConstructor, tileEntityConstructor);
     }
 
-    private static <T extends TileEntity, B extends CraftBlockEntityState<T>> void register(
+    private static <T extends BlockEntity, B extends CraftBlockEntityState<T>> void register(
             List<Material> blockTypes,
             Class<B> blockStateType,
             BiFunction<World, T, B> blockStateConstructor,
-            BiFunction<BlockPosition, IBlockData, T> tileEntityConstructor
+            BiFunction<BlockPos, net.minecraft.world.level.block.state.BlockState, T> tileEntityConstructor
     ) {
         BlockStateFactory<B> factory = new BlockEntityStateFactory<>(blockStateType, blockStateConstructor, tileEntityConstructor);
         for (Material blockType : blockTypes) {
-            register(blockType, factory);
+            CraftBlockStates.register(blockType, factory);
         }
     }
 
     private static BlockStateFactory<?> getFactory(Material material) {
-        return FACTORIES.getOrDefault(material, DEFAULT_FACTORY);
+        return CraftBlockStates.FACTORIES.getOrDefault(material, CraftBlockStates.DEFAULT_FACTORY);
     }
 
     public static Class<? extends CraftBlockState> getBlockStateType(Material material) {
         Preconditions.checkNotNull(material, "material is null");
-        return getFactory(material).blockStateType;
+        return CraftBlockStates.getFactory(material).blockStateType;
     }
 
-    public static TileEntity createNewTileEntity(Material material) {
-        BlockStateFactory<?> factory = getFactory(material);
+    public static BlockEntity createNewTileEntity(Material material) {
+        BlockStateFactory<?> factory = CraftBlockStates.getFactory(material);
 
         if (factory instanceof BlockEntityStateFactory) {
-            return ((BlockEntityStateFactory<?, ?>) factory).createTileEntity(BlockPosition.ZERO, CraftBlockType.bukkitToMinecraft(material).defaultBlockState());
+            return ((BlockEntityStateFactory<?, ?>) factory).createTileEntity(BlockPos.ZERO, CraftBlockType.bukkitToMinecraft(material).defaultBlockState());
         }
 
         return null;
@@ -397,55 +396,55 @@ public final class CraftBlockStates {
         Preconditions.checkNotNull(block, "block is null");
         CraftBlock craftBlock = (CraftBlock) block;
         CraftWorld world = (CraftWorld) block.getWorld();
-        BlockPosition blockPosition = craftBlock.getPosition();
-        IBlockData blockData = craftBlock.getNMS();
-        TileEntity tileEntity = craftBlock.getHandle().getBlockEntity(blockPosition);
-        CraftBlockState blockState = getBlockState(world, blockPosition, blockData, tileEntity);
+        BlockPos blockPosition = craftBlock.getPosition();
+        net.minecraft.world.level.block.state.BlockState blockData = craftBlock.getNMS();
+        BlockEntity tileEntity = craftBlock.getHandle().getBlockEntity(blockPosition);
+        CraftBlockState blockState = CraftBlockStates.getBlockState(world, blockPosition, blockData, tileEntity);
         blockState.setWorldHandle(craftBlock.getHandle()); // Inject the block's generator access
         return blockState;
     }
 
     @Deprecated
-    public static BlockState getBlockState(BlockPosition blockPosition, Material material, @Nullable NBTTagCompound blockEntityTag) {
-        return getBlockState(MinecraftServer.getDefaultRegistryAccess(), blockPosition, material, blockEntityTag);
+    public static BlockState getBlockState(BlockPos blockPosition, Material material, @Nullable CompoundTag blockEntityTag) {
+        return CraftBlockStates.getBlockState(MinecraftServer.getDefaultRegistryAccess(), blockPosition, material, blockEntityTag);
     }
 
-    public static BlockState getBlockState(IWorldReader world, BlockPosition blockPosition, Material material, @Nullable NBTTagCompound blockEntityTag) {
-        return getBlockState(world.registryAccess(), blockPosition, material, blockEntityTag);
+    public static BlockState getBlockState(LevelReader world, BlockPos blockPosition, Material material, @Nullable CompoundTag blockEntityTag) {
+        return CraftBlockStates.getBlockState(world.registryAccess(), blockPosition, material, blockEntityTag);
     }
 
-    public static BlockState getBlockState(IRegistryCustom registry, BlockPosition blockPosition, Material material, @Nullable NBTTagCompound blockEntityTag) {
+    public static BlockState getBlockState(RegistryAccess registry, BlockPos blockPosition, Material material, @Nullable CompoundTag blockEntityTag) {
         Preconditions.checkNotNull(material, "material is null");
-        IBlockData blockData = CraftBlockType.bukkitToMinecraft(material).defaultBlockState();
-        return getBlockState(registry, blockPosition, blockData, blockEntityTag);
+        net.minecraft.world.level.block.state.BlockState blockData = CraftBlockType.bukkitToMinecraft(material).defaultBlockState();
+        return CraftBlockStates.getBlockState(registry, blockPosition, blockData, blockEntityTag);
     }
 
     @Deprecated
-    public static BlockState getBlockState(IBlockData blockData, @Nullable NBTTagCompound blockEntityTag) {
-        return getBlockState(MinecraftServer.getDefaultRegistryAccess(), BlockPosition.ZERO, blockData, blockEntityTag);
+    public static BlockState getBlockState(net.minecraft.world.level.block.state.BlockState blockData, @Nullable CompoundTag blockEntityTag) {
+        return CraftBlockStates.getBlockState(MinecraftServer.getDefaultRegistryAccess(), BlockPos.ZERO, blockData, blockEntityTag);
     }
 
-    public static BlockState getBlockState(IWorldReader world, BlockPosition blockPosition, IBlockData blockData, @Nullable NBTTagCompound blockEntityTag) {
-        return getBlockState(world.registryAccess(), blockPosition, blockData, blockEntityTag);
+    public static BlockState getBlockState(LevelReader world, BlockPos blockPosition, net.minecraft.world.level.block.state.BlockState blockData, @Nullable CompoundTag blockEntityTag) {
+        return CraftBlockStates.getBlockState(world.registryAccess(), blockPosition, blockData, blockEntityTag);
     }
 
-    public static BlockState getBlockState(IRegistryCustom registry, BlockPosition blockPosition, IBlockData blockData, @Nullable NBTTagCompound blockEntityTag) {
+    public static BlockState getBlockState(RegistryAccess registry, BlockPos blockPosition, net.minecraft.world.level.block.state.BlockState blockData, @Nullable CompoundTag blockEntityTag) {
         Preconditions.checkNotNull(blockPosition, "blockPosition is null");
         Preconditions.checkNotNull(blockData, "blockData is null");
-        TileEntity tileEntity = (blockEntityTag == null) ? null : TileEntity.loadStatic(blockPosition, blockData, blockEntityTag, registry);
-        return getBlockState(null, blockPosition, blockData, tileEntity);
+        BlockEntity tileEntity = (blockEntityTag == null) ? null : BlockEntity.loadStatic(blockPosition, blockData, blockEntityTag, registry);
+        return CraftBlockStates.getBlockState(null, blockPosition, blockData, tileEntity);
     }
 
     // See BlockStateFactory#createBlockState(World, BlockPosition, IBlockData, TileEntity)
-    private static CraftBlockState getBlockState(World world, BlockPosition blockPosition, IBlockData blockData, TileEntity tileEntity) {
+    public static CraftBlockState getBlockState(World world, BlockPos blockPosition, net.minecraft.world.level.block.state.BlockState blockData, BlockEntity tileEntity) {
         Material material = CraftBlockType.minecraftToBukkit(blockData.getBlock());
         BlockStateFactory<?> factory;
         // For some types of TileEntity blocks (eg. moving pistons), Minecraft may in some situations (eg. when using Block#setType or the
         // setBlock command) not create a corresponding TileEntity in the world. We return a normal BlockState in this case.
-        if (world != null && tileEntity == null && isTileEntityOptional(material)) {
-            factory = DEFAULT_FACTORY;
+        if (world != null && tileEntity == null && CraftBlockStates.isTileEntityOptional(material)) {
+            factory = CraftBlockStates.DEFAULT_FACTORY;
         } else {
-            factory = getFactory(material);
+            factory = CraftBlockStates.getFactory(material);
         }
         return factory.createBlockState(world, blockPosition, blockData, tileEntity);
     }
@@ -455,12 +454,12 @@ public final class CraftBlockStates {
     }
 
     // This ignores tile entity data.
-    public static CraftBlockState getBlockState(GeneratorAccess world, BlockPosition pos) {
+    public static CraftBlockState getBlockState(LevelAccessor world, BlockPos pos) {
         return new CraftBlockState(CraftBlock.at(world, pos));
     }
 
     // This ignores tile entity data.
-    public static CraftBlockState getBlockState(GeneratorAccess world, BlockPosition pos, int flag) {
+    public static CraftBlockState getBlockState(LevelAccessor world, BlockPos pos, int flag) {
         return new CraftBlockState(CraftBlock.at(world, pos), flag);
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockSupport.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockSupport.java
index dc4b113f93..5d902c1dfa 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockSupport.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockSupport.java
@@ -1,6 +1,6 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.world.level.block.EnumBlockSupport;
+import net.minecraft.world.level.block.SupportType;
 import org.bukkit.block.BlockSupport;
 
 public final class CraftBlockSupport {
@@ -8,7 +8,7 @@ public final class CraftBlockSupport {
     private CraftBlockSupport() {
     }
 
-    public static BlockSupport toBukkit(EnumBlockSupport support) {
+    public static BlockSupport toBukkit(SupportType support) {
         return switch (support) {
             case FULL -> BlockSupport.FULL;
             case CENTER -> BlockSupport.CENTER;
@@ -17,11 +17,11 @@ public final class CraftBlockSupport {
         };
     }
 
-    public static EnumBlockSupport toNMS(BlockSupport support) {
+    public static SupportType toNMS(BlockSupport support) {
         return switch (support) {
-            case FULL -> EnumBlockSupport.FULL;
-            case CENTER -> EnumBlockSupport.CENTER;
-            case RIGID -> EnumBlockSupport.RIGID;
+            case FULL -> SupportType.FULL;
+            case CENTER -> SupportType.CENTER;
+            case RIGID -> SupportType.RIGID;
             default -> throw new IllegalArgumentException("Unsupported BlockSupport type: " + support + ". This is a bug.");
         };
     }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockType.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockType.java
index 015e6cefb5..338a8f4acf 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockType.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBlockType.java
@@ -4,20 +4,20 @@ import com.google.common.base.Preconditions;
 import java.lang.reflect.Method;
 import java.util.Arrays;
 import java.util.function.Consumer;
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.world.EnumHand;
-import net.minecraft.world.entity.player.EntityHuman;
+import net.minecraft.world.InteractionHand;
+import net.minecraft.world.entity.player.Player;
 import net.minecraft.world.item.Item;
 import net.minecraft.world.item.Items;
-import net.minecraft.world.level.BlockAccessAir;
+import net.minecraft.world.level.EmptyBlockGetter;
 import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.block.BlockFire;
 import net.minecraft.world.level.block.Blocks;
 import net.minecraft.world.level.block.Fallable;
-import net.minecraft.world.level.block.state.BlockBase;
-import net.minecraft.world.level.block.state.IBlockData;
-import net.minecraft.world.phys.MovingObjectPositionBlock;
+import net.minecraft.world.level.block.FireBlock;
+import net.minecraft.world.level.block.state.BlockBehaviour;
+import net.minecraft.world.level.block.state.BlockState;
+import net.minecraft.world.phys.BlockHitResult;
 import org.bukkit.Material;
 import org.bukkit.NamespacedKey;
 import org.bukkit.Registry;
@@ -70,21 +70,21 @@ public class CraftBlockType<B extends BlockData> implements BlockType.Typed<B>,
     }
 
     private static final Class<?>[] USE_WITHOUT_ITEM_ARGS = new Class[]{
-        IBlockData.class, net.minecraft.world.level.World.class, BlockPosition.class, EntityHuman.class, MovingObjectPositionBlock.class
+        BlockState.class, net.minecraft.world.level.Level.class, BlockPos.class, Player.class, BlockHitResult.class
     };
     private static final Class<?>[] USE_ITEM_ON_ARGS = new Class[]{
-        net.minecraft.world.item.ItemStack.class, IBlockData.class, net.minecraft.world.level.World.class, BlockPosition.class, EntityHuman.class, EnumHand.class, MovingObjectPositionBlock.class
+        net.minecraft.world.item.ItemStack.class, BlockState.class, net.minecraft.world.level.Level.class, BlockPos.class, Player.class, InteractionHand.class, BlockHitResult.class
     };
 
     private static boolean isInteractable(Block block) {
         Class<?> clazz = block.getClass();
 
-        boolean hasMethod = hasMethod(clazz, USE_WITHOUT_ITEM_ARGS) || hasMethod(clazz, USE_ITEM_ON_ARGS);
+        boolean hasMethod = CraftBlockType.hasMethod(clazz, CraftBlockType.USE_WITHOUT_ITEM_ARGS) || CraftBlockType.hasMethod(clazz, CraftBlockType.USE_ITEM_ON_ARGS);
 
-        if (!hasMethod && clazz.getSuperclass() != BlockBase.class) {
+        if (!hasMethod && clazz.getSuperclass() != BlockBehaviour.class) {
             clazz = clazz.getSuperclass();
 
-            hasMethod = hasMethod(clazz, USE_WITHOUT_ITEM_ARGS) || hasMethod(clazz, USE_ITEM_ON_ARGS);
+            hasMethod = CraftBlockType.hasMethod(clazz, CraftBlockType.USE_WITHOUT_ITEM_ARGS) || CraftBlockType.hasMethod(clazz, CraftBlockType.USE_ITEM_ON_ARGS);
         }
 
         return hasMethod;
@@ -94,12 +94,12 @@ public class CraftBlockType<B extends BlockData> implements BlockType.Typed<B>,
         this.key = key;
         this.block = block;
         this.blockDataClass = (Class<B>) CraftBlockData.fromData(block.defaultBlockState()).getClass().getInterfaces()[0];
-        this.interactable = isInteractable(block);
+        this.interactable = CraftBlockType.isInteractable(block);
     }
 
     @Override
     public Block getHandle() {
-        return block;
+        return this.block;
     }
 
     @NotNull
@@ -122,7 +122,7 @@ public class CraftBlockType<B extends BlockData> implements BlockType.Typed<B>,
             return true;
         }
 
-        return block.asItem() != Items.AIR;
+        return this.block.asItem() != Items.AIR;
     }
 
     @NotNull
@@ -132,24 +132,24 @@ public class CraftBlockType<B extends BlockData> implements BlockType.Typed<B>,
             return ItemType.AIR;
         }
 
-        Item item = block.asItem();
-        Preconditions.checkArgument(item != Items.AIR, "The block type %s has no corresponding item type", getKey());
+        Item item = this.block.asItem();
+        Preconditions.checkArgument(item != Items.AIR, "The block type %s has no corresponding item type", this.getKey());
         return CraftItemType.minecraftToBukkitNew(item);
     }
 
     @Override
     public Class<B> getBlockDataClass() {
-        return blockDataClass;
+        return this.blockDataClass;
     }
 
     @Override
     public B createBlockData() {
-        return createBlockData((String) null);
+        return this.createBlockData((String) null);
     }
 
     @Override
     public B createBlockData(Consumer<? super B> consumer) {
-        B data = createBlockData();
+        B data = this.createBlockData();
 
         if (consumer != null) {
             consumer.accept(data);
@@ -165,69 +165,69 @@ public class CraftBlockType<B extends BlockData> implements BlockType.Typed<B>,
 
     @Override
     public boolean isSolid() {
-        return block.defaultBlockState().blocksMotion();
+        return this.block.defaultBlockState().blocksMotion();
     }
 
     @Override
     public boolean isAir() {
-        return block.defaultBlockState().isAir();
+        return this.block.defaultBlockState().isAir();
     }
 
     @Override
     public boolean isEnabledByFeature(@NotNull World world) {
         Preconditions.checkNotNull(world, "World cannot be null");
-        return getHandle().isEnabled(((CraftWorld) world).getHandle().enabledFeatures());
+        return this.getHandle().isEnabled(((CraftWorld) world).getHandle().enabledFeatures());
     }
 
     @Override
     public boolean isFlammable() {
-        return block.defaultBlockState().ignitedByLava();
+        return this.block.defaultBlockState().ignitedByLava();
     }
 
     @Override
     public boolean isBurnable() {
-        return ((BlockFire) Blocks.FIRE).igniteOdds.getOrDefault(block, 0) > 0;
+        return ((FireBlock) Blocks.FIRE).igniteOdds.getOrDefault(this.block, 0) > 0;
     }
 
     @Override
     public boolean isOccluding() {
-        return block.defaultBlockState().isRedstoneConductor(BlockAccessAir.INSTANCE, BlockPosition.ZERO);
+        return this.block.defaultBlockState().isRedstoneConductor(EmptyBlockGetter.INSTANCE, BlockPos.ZERO);
     }
 
     @Override
     public boolean hasGravity() {
-        return block instanceof Fallable;
+        return this.block instanceof Fallable;
     }
 
     @Override
     public boolean isInteractable() {
-        return interactable;
+        return this.interactable;
     }
 
     @Override
     public float getHardness() {
-        return block.defaultBlockState().destroySpeed;
+        return this.block.defaultBlockState().destroySpeed;
     }
 
     @Override
     public float getBlastResistance() {
-        return block.getExplosionResistance();
+        return this.block.getExplosionResistance();
     }
 
     @Override
     public float getSlipperiness() {
-        return block.getFriction();
+        return this.block.getFriction();
     }
 
     @NotNull
     @Override
     public String getTranslationKey() {
-        return block.getDescriptionId();
+        return this.block.getDescriptionId();
     }
 
     @Override
     public NamespacedKey getKey() {
-        return key;
+        return this.key;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBrewingStand.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBrewingStand.java
index 8b00bd160e..e9f55c898d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBrewingStand.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBrewingStand.java
@@ -1,15 +1,15 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.world.level.block.entity.TileEntityBrewingStand;
+import net.minecraft.world.level.block.entity.BrewingStandBlockEntity;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.block.BrewingStand;
 import org.bukkit.craftbukkit.inventory.CraftInventoryBrewer;
 import org.bukkit.inventory.BrewerInventory;
 
-public class CraftBrewingStand extends CraftContainer<TileEntityBrewingStand> implements BrewingStand {
+public class CraftBrewingStand extends CraftContainer<BrewingStandBlockEntity> implements BrewingStand {
 
-    public CraftBrewingStand(World world, TileEntityBrewingStand tileEntity) {
+    public CraftBrewingStand(World world, BrewingStandBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBrushableBlock.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBrushableBlock.java
index 6484fa6f56..949e074a32 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBrushableBlock.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftBrushableBlock.java
@@ -21,12 +21,12 @@ public class CraftBrushableBlock extends CraftBlockEntityState<BrushableBlockEnt
 
     @Override
     public ItemStack getItem() {
-        return CraftItemStack.asBukkitCopy(getSnapshot().getItem());
+        return CraftItemStack.asBukkitCopy(this.getSnapshot().getItem());
     }
 
     @Override
     public void setItem(ItemStack item) {
-        getSnapshot().item = CraftItemStack.asNMSCopy(item);
+        this.getSnapshot().item = CraftItemStack.asNMSCopy(item);
     }
 
     @Override
@@ -40,26 +40,26 @@ public class CraftBrushableBlock extends CraftBlockEntityState<BrushableBlockEnt
 
     @Override
     public LootTable getLootTable() {
-        return CraftLootTable.minecraftToBukkit(getSnapshot().lootTable);
+        return CraftLootTable.minecraftToBukkit(this.getSnapshot().lootTable);
     }
 
     @Override
     public void setLootTable(LootTable table) {
-        setLootTable(table, getSeed());
+        this.setLootTable(table, this.getSeed());
     }
 
     @Override
     public long getSeed() {
-        return getSnapshot().lootTableSeed;
+        return this.getSnapshot().lootTableSeed;
     }
 
     @Override
     public void setSeed(long seed) {
-        setLootTable(getLootTable(), seed);
+        this.setLootTable(this.getLootTable(), seed);
     }
 
     private void setLootTable(LootTable table, long seed) {
-        getSnapshot().setLootTable(CraftLootTable.bukkitToMinecraft(table), seed);
+        this.getSnapshot().setLootTable(CraftLootTable.bukkitToMinecraft(table), seed);
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftCampfire.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftCampfire.java
index aba52da75b..4850cbf2c3 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftCampfire.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftCampfire.java
@@ -1,15 +1,15 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.world.level.block.entity.TileEntityCampfire;
+import net.minecraft.world.level.block.entity.CampfireBlockEntity;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.block.Campfire;
 import org.bukkit.craftbukkit.inventory.CraftItemStack;
 import org.bukkit.inventory.ItemStack;
 
-public class CraftCampfire extends CraftBlockEntityState<TileEntityCampfire> implements Campfire {
+public class CraftCampfire extends CraftBlockEntityState<CampfireBlockEntity> implements Campfire {
 
-    public CraftCampfire(World world, TileEntityCampfire tileEntity) {
+    public CraftCampfire(World world, CampfireBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
@@ -19,38 +19,38 @@ public class CraftCampfire extends CraftBlockEntityState<TileEntityCampfire> imp
 
     @Override
     public int getSize() {
-        return getSnapshot().getItems().size();
+        return this.getSnapshot().getItems().size();
     }
 
     @Override
     public ItemStack getItem(int index) {
-        net.minecraft.world.item.ItemStack item = getSnapshot().getItems().get(index);
+        net.minecraft.world.item.ItemStack item = this.getSnapshot().getItems().get(index);
         return item.isEmpty() ? null : CraftItemStack.asCraftMirror(item);
     }
 
     @Override
     public void setItem(int index, ItemStack item) {
-        getSnapshot().getItems().set(index, CraftItemStack.asNMSCopy(item));
+        this.getSnapshot().getItems().set(index, CraftItemStack.asNMSCopy(item));
     }
 
     @Override
     public int getCookTime(int index) {
-        return getSnapshot().cookingProgress[index];
+        return this.getSnapshot().cookingProgress[index];
     }
 
     @Override
     public void setCookTime(int index, int cookTime) {
-        getSnapshot().cookingProgress[index] = cookTime;
+        this.getSnapshot().cookingProgress[index] = cookTime;
     }
 
     @Override
     public int getCookTimeTotal(int index) {
-        return getSnapshot().cookingTime[index];
+        return this.getSnapshot().cookingTime[index];
     }
 
     @Override
     public void setCookTimeTotal(int index, int cookTimeTotal) {
-        getSnapshot().cookingTime[index] = cookTimeTotal;
+        this.getSnapshot().cookingTime[index] = cookTimeTotal;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
index 04d86c680c..2b6a93a944 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftChest.java
@@ -1,10 +1,10 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.world.ITileInventory;
-import net.minecraft.world.level.block.BlockChest;
+import net.minecraft.world.MenuProvider;
 import net.minecraft.world.level.block.Blocks;
-import net.minecraft.world.level.block.entity.TileEntityChest;
-import net.minecraft.world.level.block.state.IBlockData;
+import net.minecraft.world.level.block.ChestBlock;
+import net.minecraft.world.level.block.entity.ChestBlockEntity;
+import net.minecraft.world.level.block.state.BlockState;
 import org.bukkit.Location;
 import org.bukkit.Material;
 import org.bukkit.World;
@@ -14,9 +14,9 @@ import org.bukkit.craftbukkit.inventory.CraftInventory;
 import org.bukkit.craftbukkit.inventory.CraftInventoryDoubleChest;
 import org.bukkit.inventory.Inventory;
 
-public class CraftChest extends CraftLootable<TileEntityChest> implements Chest {
+public class CraftChest extends CraftLootable<ChestBlockEntity> implements Chest {
 
-    public CraftChest(World world, TileEntityChest tileEntity) {
+    public CraftChest(World world, ChestBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
@@ -41,46 +41,46 @@ public class CraftChest extends CraftLootable<TileEntityChest> implements Chest
     @Override
     public Inventory getInventory() {
         CraftInventory inventory = (CraftInventory) this.getBlockInventory();
-        if (!isPlaced() || isWorldGeneration()) {
+        if (!this.isPlaced() || this.isWorldGeneration()) {
             return inventory;
         }
 
         // The logic here is basically identical to the logic in BlockChest.interact
         CraftWorld world = (CraftWorld) this.getWorld();
 
-        BlockChest blockChest = (BlockChest) (this.getType() == Material.CHEST ? Blocks.CHEST : Blocks.TRAPPED_CHEST);
-        ITileInventory nms = blockChest.getMenuProvider(data, world.getHandle(), this.getPosition(), true);
+        ChestBlock blockChest = (ChestBlock) (this.getType() == Material.CHEST ? Blocks.CHEST : Blocks.TRAPPED_CHEST);
+        MenuProvider nms = blockChest.getMenuProvider(this.data, world.getHandle(), this.getPosition(), true);
 
-        if (nms instanceof BlockChest.DoubleInventory) {
-            inventory = new CraftInventoryDoubleChest((BlockChest.DoubleInventory) nms);
+        if (nms instanceof ChestBlock.DoubleInventory) {
+            inventory = new CraftInventoryDoubleChest((ChestBlock.DoubleInventory) nms);
         }
         return inventory;
     }
 
     @Override
     public void open() {
-        requirePlaced();
-        if (!getTileEntity().openersCounter.opened && getWorldHandle() instanceof net.minecraft.world.level.World) {
-            IBlockData block = getTileEntity().getBlockState();
-            int openCount = getTileEntity().openersCounter.getOpenerCount();
+        this.requirePlaced();
+        if (!this.getTileEntity().openersCounter.opened && this.getWorldHandle() instanceof net.minecraft.world.level.Level) {
+            BlockState block = this.getTileEntity().getBlockState();
+            int openCount = this.getTileEntity().openersCounter.getOpenerCount();
 
-            getTileEntity().openersCounter.onAPIOpen((net.minecraft.world.level.World) getWorldHandle(), getPosition(), block);
-            getTileEntity().openersCounter.openerAPICountChanged((net.minecraft.world.level.World) getWorldHandle(), getPosition(), block, openCount, openCount + 1);
+            this.getTileEntity().openersCounter.onAPIOpen((net.minecraft.world.level.Level) this.getWorldHandle(), this.getPosition(), block);
+            this.getTileEntity().openersCounter.openerAPICountChanged((net.minecraft.world.level.Level) this.getWorldHandle(), this.getPosition(), block, openCount, openCount + 1);
         }
-        getTileEntity().openersCounter.opened = true;
+        this.getTileEntity().openersCounter.opened = true;
     }
 
     @Override
     public void close() {
-        requirePlaced();
-        if (getTileEntity().openersCounter.opened && getWorldHandle() instanceof net.minecraft.world.level.World) {
-            IBlockData block = getTileEntity().getBlockState();
-            int openCount = getTileEntity().openersCounter.getOpenerCount();
+        this.requirePlaced();
+        if (this.getTileEntity().openersCounter.opened && this.getWorldHandle() instanceof net.minecraft.world.level.Level) {
+            BlockState block = this.getTileEntity().getBlockState();
+            int openCount = this.getTileEntity().openersCounter.getOpenerCount();
 
-            getTileEntity().openersCounter.onAPIClose((net.minecraft.world.level.World) getWorldHandle(), getPosition(), block);
-            getTileEntity().openersCounter.openerAPICountChanged((net.minecraft.world.level.World) getWorldHandle(), getPosition(), block, openCount, 0);
+            this.getTileEntity().openersCounter.onAPIClose((net.minecraft.world.level.Level) this.getWorldHandle(), this.getPosition(), block);
+            this.getTileEntity().openersCounter.openerAPICountChanged((net.minecraft.world.level.Level) this.getWorldHandle(), this.getPosition(), block, openCount, 0);
         }
-        getTileEntity().openersCounter.opened = false;
+        this.getTileEntity().openersCounter.opened = false;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftChiseledBookshelf.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftChiseledBookshelf.java
index 1fd5256581..9a11ff215f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftChiseledBookshelf.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftChiseledBookshelf.java
@@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.block;
 
 import net.minecraft.world.level.block.ChiseledBookShelfBlock;
 import net.minecraft.world.level.block.entity.ChiseledBookShelfBlockEntity;
-import net.minecraft.world.phys.Vec2F;
+import net.minecraft.world.phys.Vec2;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.block.BlockFace;
@@ -24,12 +24,12 @@ public class CraftChiseledBookshelf extends CraftBlockEntityState<ChiseledBookSh
 
     @Override
     public int getLastInteractedSlot() {
-        return getSnapshot().getLastInteractedSlot();
+        return this.getSnapshot().getLastInteractedSlot();
     }
 
     @Override
     public void setLastInteractedSlot(int lastInteractedSlot) {
-        getSnapshot().lastInteractedSlot = lastInteractedSlot;
+        this.getSnapshot().lastInteractedSlot = lastInteractedSlot;
     }
 
     @Override
@@ -50,19 +50,19 @@ public class CraftChiseledBookshelf extends CraftBlockEntityState<ChiseledBookSh
     public int getSlot(Vector clickVector) {
         BlockFace facing = ((Directional) this.getBlockData()).getFacing();
 
-        Vec2F faceVector;
+        Vec2 faceVector;
         switch (facing) {
         case NORTH:
-            faceVector = new Vec2F((float) (1.0f - clickVector.getX()), (float) clickVector.getY());
+            faceVector = new Vec2((float) (1.0f - clickVector.getX()), (float) clickVector.getY());
             break;
         case SOUTH:
-            faceVector = new Vec2F((float) clickVector.getX(), (float) clickVector.getY());
+            faceVector = new Vec2((float) clickVector.getX(), (float) clickVector.getY());
             break;
         case WEST:
-            faceVector = new Vec2F((float) clickVector.getZ(), (float) clickVector.getY());
+            faceVector = new Vec2((float) clickVector.getZ(), (float) clickVector.getY());
             break;
         case EAST:
-            faceVector = new Vec2F((float) (1f - clickVector.getZ()), (float) clickVector.getY());
+            faceVector = new Vec2((float) (1f - clickVector.getZ()), (float) clickVector.getY());
             break;
         case DOWN:
         case UP:
@@ -70,10 +70,10 @@ public class CraftChiseledBookshelf extends CraftBlockEntityState<ChiseledBookSh
             return -1;
         }
 
-        return getHitSlot(faceVector);
+        return CraftChiseledBookshelf.getHitSlot(faceVector);
     }
 
-    private static int getHitSlot(Vec2F vec2f) {
+    private static int getHitSlot(Vec2 vec2f) {
         int i = vec2f.y >= 0.5F ? 0 : 1;
         int j = ChiseledBookShelfBlock.getSection(vec2f.x);
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java
index 164d114801..f9b89a7c6a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftCommandBlock.java
@@ -1,14 +1,14 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.world.level.block.entity.TileEntityCommand;
+import net.minecraft.world.level.block.entity.CommandBlockEntity;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.block.CommandBlock;
 import org.bukkit.craftbukkit.util.CraftChatMessage;
 
-public class CraftCommandBlock extends CraftBlockEntityState<TileEntityCommand> implements CommandBlock {
+public class CraftCommandBlock extends CraftBlockEntityState<CommandBlockEntity> implements CommandBlock {
 
-    public CraftCommandBlock(World world, TileEntityCommand tileEntity) {
+    public CraftCommandBlock(World world, CommandBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
@@ -18,22 +18,22 @@ public class CraftCommandBlock extends CraftBlockEntityState<TileEntityCommand>
 
     @Override
     public String getCommand() {
-        return getSnapshot().getCommandBlock().getCommand();
+        return this.getSnapshot().getCommandBlock().getCommand();
     }
 
     @Override
     public void setCommand(String command) {
-        getSnapshot().getCommandBlock().setCommand(command != null ? command : "");
+        this.getSnapshot().getCommandBlock().setCommand(command != null ? command : "");
     }
 
     @Override
     public String getName() {
-        return CraftChatMessage.fromComponent(getSnapshot().getCommandBlock().getName());
+        return CraftChatMessage.fromComponent(this.getSnapshot().getCommandBlock().getName());
     }
 
     @Override
     public void setName(String name) {
-        getSnapshot().getCommandBlock().setCustomName(CraftChatMessage.fromStringOrNull(name != null ? name : "@"));
+        this.getSnapshot().getCommandBlock().setCustomName(CraftChatMessage.fromStringOrNull(name != null ? name : "@"));
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftComparator.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftComparator.java
index cdb27f8118..2d45ae4447 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftComparator.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftComparator.java
@@ -1,13 +1,13 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.world.level.block.entity.TileEntityComparator;
+import net.minecraft.world.level.block.entity.ComparatorBlockEntity;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.block.Comparator;
 
-public class CraftComparator extends CraftBlockEntityState<TileEntityComparator> implements Comparator {
+public class CraftComparator extends CraftBlockEntityState<ComparatorBlockEntity> implements Comparator {
 
-    public CraftComparator(World world, TileEntityComparator tileEntity) {
+    public CraftComparator(World world, ComparatorBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftConduit.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftConduit.java
index 6f1f27bd83..c1759aeb3e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftConduit.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftConduit.java
@@ -2,10 +2,9 @@ package org.bukkit.craftbukkit.block;
 
 import java.util.ArrayList;
 import java.util.Collection;
-import net.minecraft.core.BlockPosition;
-import net.minecraft.world.entity.EntityLiving;
-import net.minecraft.world.level.block.entity.TileEntityConduit;
-import net.minecraft.world.phys.AxisAlignedBB;
+import net.minecraft.core.BlockPos;
+import net.minecraft.world.level.block.entity.ConduitBlockEntity;
+import net.minecraft.world.phys.AABB;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.block.Block;
@@ -14,9 +13,9 @@ import org.bukkit.craftbukkit.entity.CraftLivingEntity;
 import org.bukkit.entity.LivingEntity;
 import org.bukkit.util.BoundingBox;
 
-public class CraftConduit extends CraftBlockEntityState<TileEntityConduit> implements Conduit {
+public class CraftConduit extends CraftBlockEntityState<ConduitBlockEntity> implements Conduit {
 
-    public CraftConduit(World world, TileEntityConduit tileEntity) {
+    public CraftConduit(World world, ConduitBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
@@ -36,27 +35,27 @@ public class CraftConduit extends CraftBlockEntityState<TileEntityConduit> imple
 
     @Override
     public boolean isActive() {
-        ensureNoWorldGeneration();
-        TileEntityConduit conduit = (TileEntityConduit) getTileEntityFromWorld();
+        this.ensureNoWorldGeneration();
+        ConduitBlockEntity conduit = (ConduitBlockEntity) this.getTileEntityFromWorld();
         return conduit != null && conduit.isActive();
     }
 
     @Override
     public boolean isHunting() {
-        ensureNoWorldGeneration();
-        TileEntityConduit conduit = (TileEntityConduit) getTileEntityFromWorld();
+        this.ensureNoWorldGeneration();
+        ConduitBlockEntity conduit = (ConduitBlockEntity) this.getTileEntityFromWorld();
         return conduit != null && conduit.isHunting();
     }
 
     @Override
     public Collection<Block> getFrameBlocks() {
-        ensureNoWorldGeneration();
+        this.ensureNoWorldGeneration();
         Collection<Block> blocks = new ArrayList<>();
 
-        TileEntityConduit conduit = (TileEntityConduit) getTileEntityFromWorld();
+        ConduitBlockEntity conduit = (ConduitBlockEntity) this.getTileEntityFromWorld();
         if (conduit != null) {
-            for (BlockPosition position : conduit.effectBlocks) {
-                blocks.add(CraftBlock.at(getWorldHandle(), position));
+            for (BlockPos position : conduit.effectBlocks) {
+                blocks.add(CraftBlock.at(this.getWorldHandle(), position));
             }
         }
 
@@ -65,26 +64,26 @@ public class CraftConduit extends CraftBlockEntityState<TileEntityConduit> imple
 
     @Override
     public int getFrameBlockCount() {
-        ensureNoWorldGeneration();
-        TileEntityConduit conduit = (TileEntityConduit) getTileEntityFromWorld();
+        this.ensureNoWorldGeneration();
+        ConduitBlockEntity conduit = (ConduitBlockEntity) this.getTileEntityFromWorld();
         return (conduit != null) ? conduit.effectBlocks.size() : 0;
     }
 
     @Override
     public int getRange() {
-        ensureNoWorldGeneration();
-        TileEntityConduit conduit = (TileEntityConduit) getTileEntityFromWorld();
-        return (conduit != null) ? TileEntityConduit.getRange(conduit.effectBlocks) : 0;
+        this.ensureNoWorldGeneration();
+        ConduitBlockEntity conduit = (ConduitBlockEntity) this.getTileEntityFromWorld();
+        return (conduit != null) ? ConduitBlockEntity.getRange(conduit.effectBlocks) : 0;
     }
 
     @Override
     public boolean setTarget(LivingEntity target) {
-        TileEntityConduit conduit = (TileEntityConduit) getTileEntityFromWorld();
+        ConduitBlockEntity conduit = (ConduitBlockEntity) this.getTileEntityFromWorld();
         if (conduit == null) {
             return false;
         }
 
-        EntityLiving currentTarget = conduit.destroyTarget;
+        net.minecraft.world.entity.LivingEntity currentTarget = conduit.destroyTarget;
 
         if (target == null) {
             if (currentTarget == null) {
@@ -102,30 +101,30 @@ public class CraftConduit extends CraftBlockEntityState<TileEntityConduit> imple
             conduit.destroyTargetUUID = target.getUniqueId();
         }
 
-        TileEntityConduit.updateDestroyTarget(conduit.getLevel(), getPosition(), data, conduit.effectBlocks, conduit, false);
+        ConduitBlockEntity.updateDestroyTarget(conduit.getLevel(), this.getPosition(), this.data, conduit.effectBlocks, conduit, false);
         return true;
     }
 
     @Override
     public LivingEntity getTarget() {
-        TileEntityConduit conduit = (TileEntityConduit) getTileEntityFromWorld();
+        ConduitBlockEntity conduit = (ConduitBlockEntity) this.getTileEntityFromWorld();
         if (conduit == null) {
             return null;
         }
 
-        EntityLiving nmsEntity = conduit.destroyTarget;
+        net.minecraft.world.entity.LivingEntity nmsEntity = conduit.destroyTarget;
         return (nmsEntity != null) ? (LivingEntity) nmsEntity.getBukkitEntity() : null;
     }
 
     @Override
     public boolean hasTarget() {
-        TileEntityConduit conduit = (TileEntityConduit) getTileEntityFromWorld();
+        ConduitBlockEntity conduit = (ConduitBlockEntity) this.getTileEntityFromWorld();
         return conduit != null && conduit.destroyTarget != null && conduit.destroyTarget.isAlive();
     }
 
     @Override
     public BoundingBox getHuntingArea() {
-        AxisAlignedBB bounds = TileEntityConduit.getDestroyRangeAABB(getPosition());
+        AABB bounds = ConduitBlockEntity.getDestroyRangeAABB(this.getPosition());
         return new BoundingBox(bounds.minX, bounds.minY, bounds.minZ, bounds.maxX, bounds.maxY, bounds.maxZ);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftContainer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftContainer.java
index 75212d9996..32f3c1f190 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftContainer.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftContainer.java
@@ -2,13 +2,13 @@ package org.bukkit.craftbukkit.block;
 
 import java.util.Collections;
 import java.util.Optional;
-import net.minecraft.advancements.critereon.CriterionConditionItem;
-import net.minecraft.advancements.critereon.CriterionConditionValue;
+import net.minecraft.advancements.critereon.ItemPredicate;
+import net.minecraft.advancements.critereon.MinMaxBounds;
 import net.minecraft.core.component.DataComponentPredicate;
 import net.minecraft.core.component.DataComponents;
-import net.minecraft.network.chat.IChatBaseComponent;
-import net.minecraft.world.ChestLock;
-import net.minecraft.world.level.block.entity.TileEntityContainer;
+import net.minecraft.network.chat.Component;
+import net.minecraft.world.LockCode;
+import net.minecraft.world.level.block.entity.BaseContainerBlockEntity;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.block.Container;
@@ -16,7 +16,7 @@ import org.bukkit.craftbukkit.inventory.CraftItemStack;
 import org.bukkit.craftbukkit.util.CraftChatMessage;
 import org.bukkit.inventory.ItemStack;
 
-public abstract class CraftContainer<T extends TileEntityContainer> extends CraftBlockEntityState<T> implements Container {
+public abstract class CraftContainer<T extends BaseContainerBlockEntity> extends CraftBlockEntityState<T> implements Container {
 
     public CraftContainer(World world, T tileEntity) {
         super(world, tileEntity);
@@ -28,12 +28,12 @@ public abstract class CraftContainer<T extends TileEntityContainer> extends Craf
 
     @Override
     public boolean isLocked() {
-        return this.getSnapshot().lockKey != ChestLock.NO_LOCK;
+        return this.getSnapshot().lockKey != LockCode.NO_LOCK;
     }
 
     @Override
     public String getLock() {
-        Optional<? extends IChatBaseComponent> customName = this.getSnapshot().lockKey.predicate().components().asPatch().get(DataComponents.CUSTOM_NAME);
+        Optional<? extends Component> customName = this.getSnapshot().lockKey.predicate().components().asPatch().get(DataComponents.CUSTOM_NAME);
 
         return (customName != null) ? customName.map(CraftChatMessage::fromComponent).orElse("") : "";
     }
@@ -41,19 +41,19 @@ public abstract class CraftContainer<T extends TileEntityContainer> extends Craf
     @Override
     public void setLock(String key) {
         if (key == null) {
-            this.getSnapshot().lockKey = ChestLock.NO_LOCK;
+            this.getSnapshot().lockKey = LockCode.NO_LOCK;
         } else {
             DataComponentPredicate predicate = DataComponentPredicate.builder().expect(DataComponents.CUSTOM_NAME, CraftChatMessage.fromStringOrNull(key)).build();
-            this.getSnapshot().lockKey = new ChestLock(new CriterionConditionItem(Optional.empty(), CriterionConditionValue.IntegerRange.ANY, predicate, Collections.emptyMap()));
+            this.getSnapshot().lockKey = new LockCode(new ItemPredicate(Optional.empty(), MinMaxBounds.Ints.ANY, predicate, Collections.emptyMap()));
         }
     }
 
     @Override
     public void setLockItem(ItemStack key) {
         if (key == null) {
-            this.getSnapshot().lockKey = ChestLock.NO_LOCK;
+            this.getSnapshot().lockKey = LockCode.NO_LOCK;
         } else {
-            this.getSnapshot().lockKey = new ChestLock(CraftItemStack.asCriterionConditionItem(key));
+            this.getSnapshot().lockKey = new LockCode(CraftItemStack.asCriterionConditionItem(key));
         }
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftCrafter.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftCrafter.java
index d5894a96dd..d9cbd835f0 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftCrafter.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftCrafter.java
@@ -44,35 +44,35 @@ public class CraftCrafter extends CraftLootable<CrafterBlockEntity> implements C
 
     @Override
     public int getCraftingTicks() {
-        return getSnapshot().craftingTicksRemaining;
+        return this.getSnapshot().craftingTicksRemaining;
     }
 
     @Override
     public void setCraftingTicks(int ticks) {
-      getSnapshot().setCraftingTicksRemaining(ticks);
+      this.getSnapshot().setCraftingTicksRemaining(ticks);
     }
 
     @Override
     public boolean isSlotDisabled(int slot) {
         Preconditions.checkArgument(slot >= 0 && slot < 9, "Invalid slot index %s for Crafter", slot);
 
-        return getSnapshot().isSlotDisabled(slot);
+        return this.getSnapshot().isSlotDisabled(slot);
     }
 
     @Override
     public void setSlotDisabled(int slot, boolean disabled) {
         Preconditions.checkArgument(slot >= 0 && slot < 9, "Invalid slot index %s for Crafter", slot);
 
-        getSnapshot().setSlotState(slot, disabled);
+        this.getSnapshot().setSlotState(slot, disabled);
     }
 
     @Override
     public boolean isTriggered() {
-        return getSnapshot().isTriggered();
+        return this.getSnapshot().isTriggered();
     }
 
     @Override
     public void setTriggered(boolean triggered) {
-        getSnapshot().setTriggered(triggered);
+        this.getSnapshot().setTriggered(triggered);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java
index 334f27ca1e..9b2b6697d0 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftCreatureSpawner.java
@@ -8,16 +8,15 @@ import java.util.List;
 import java.util.Map;
 import java.util.Optional;
 import java.util.stream.Collectors;
-import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.CompoundTag;
 import net.minecraft.util.InclusiveRange;
 import net.minecraft.util.RandomSource;
 import net.minecraft.util.random.SimpleWeightedRandomList;
-import net.minecraft.util.random.WeightedEntry.b;
-import net.minecraft.world.entity.EntityTypes;
+import net.minecraft.util.random.WeightedEntry.Wrapper;
 import net.minecraft.world.entity.EquipmentTable;
-import net.minecraft.world.level.MobSpawnerAbstract;
-import net.minecraft.world.level.MobSpawnerData;
-import net.minecraft.world.level.block.entity.TileEntityMobSpawner;
+import net.minecraft.world.level.BaseSpawner;
+import net.minecraft.world.level.SpawnData;
+import net.minecraft.world.level.block.entity.SpawnerBlockEntity;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.block.CreatureSpawner;
@@ -30,9 +29,9 @@ import org.bukkit.craftbukkit.entity.CraftEntityType;
 import org.bukkit.entity.EntitySnapshot;
 import org.bukkit.entity.EntityType;
 
-public class CraftCreatureSpawner extends CraftBlockEntityState<TileEntityMobSpawner> implements CreatureSpawner {
+public class CraftCreatureSpawner extends CraftBlockEntityState<SpawnerBlockEntity> implements CreatureSpawner {
 
-    public CraftCreatureSpawner(World world, TileEntityMobSpawner tileEntity) {
+    public CraftCreatureSpawner(World world, SpawnerBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
@@ -42,12 +41,12 @@ public class CraftCreatureSpawner extends CraftBlockEntityState<TileEntityMobSpa
 
     @Override
     public EntityType getSpawnedType() {
-        MobSpawnerData spawnData = this.getSnapshot().getSpawner().nextSpawnData;
+        SpawnData spawnData = this.getSnapshot().getSpawner().nextSpawnData;
         if (spawnData == null) {
             return null;
         }
 
-        Optional<EntityTypes<?>> type = EntityTypes.by(spawnData.getEntityToSpawn());
+        Optional<net.minecraft.world.entity.EntityType<?>> type = net.minecraft.world.entity.EntityType.by(spawnData.getEntityToSpawn());
         return type.map(CraftEntityType::minecraftToBukkit).orElse(null);
     }
 
@@ -55,7 +54,7 @@ public class CraftCreatureSpawner extends CraftBlockEntityState<TileEntityMobSpa
     public void setSpawnedType(EntityType entityType) {
         if (entityType == null) {
             this.getSnapshot().getSpawner().spawnPotentials = SimpleWeightedRandomList.empty(); // need clear the spawnPotentials to avoid nextSpawnData being replaced later
-            this.getSnapshot().getSpawner().nextSpawnData = new MobSpawnerData();
+            this.getSnapshot().getSpawner().nextSpawnData = new SpawnData();
             return;
         }
         Preconditions.checkArgument(entityType != EntityType.UNKNOWN, "Can't spawn EntityType %s from mob spawners!", entityType);
@@ -66,7 +65,7 @@ public class CraftCreatureSpawner extends CraftBlockEntityState<TileEntityMobSpa
 
     @Override
     public EntitySnapshot getSpawnedEntity() {
-        MobSpawnerData spawnData = this.getSnapshot().getSpawner().nextSpawnData;
+        SpawnData spawnData = this.getSnapshot().getSpawner().nextSpawnData;
         if (spawnData == null) {
             return null;
         }
@@ -76,41 +75,41 @@ public class CraftCreatureSpawner extends CraftBlockEntityState<TileEntityMobSpa
 
     @Override
     public void setSpawnedEntity(EntitySnapshot snapshot) {
-        setSpawnedEntity(this.getSnapshot().getSpawner(), snapshot, null, null);
+        CraftCreatureSpawner.setSpawnedEntity(this.getSnapshot().getSpawner(), snapshot, null, null);
     }
 
     @Override
     public void setSpawnedEntity(SpawnerEntry spawnerEntry) {
         Preconditions.checkArgument(spawnerEntry != null, "Entry cannot be null");
 
-        setSpawnedEntity(this.getSnapshot().getSpawner(), spawnerEntry.getSnapshot(), spawnerEntry.getSpawnRule(), spawnerEntry.getEquipment());
+        CraftCreatureSpawner.setSpawnedEntity(this.getSnapshot().getSpawner(), spawnerEntry.getSnapshot(), spawnerEntry.getSpawnRule(), spawnerEntry.getEquipment());
     }
 
-    public static void setSpawnedEntity(MobSpawnerAbstract spawner, EntitySnapshot snapshot, SpawnRule spawnRule, SpawnerEntry.Equipment equipment) {
+    public static void setSpawnedEntity(BaseSpawner spawner, EntitySnapshot snapshot, SpawnRule spawnRule, SpawnerEntry.Equipment equipment) {
         spawner.spawnPotentials = SimpleWeightedRandomList.empty(); // need clear the spawnPotentials to avoid nextSpawnData being replaced later
 
         if (snapshot == null) {
-            spawner.nextSpawnData = new MobSpawnerData();
+            spawner.nextSpawnData = new SpawnData();
             return;
         }
-        NBTTagCompound compoundTag = ((CraftEntitySnapshot) snapshot).getData();
+        CompoundTag compoundTag = ((CraftEntitySnapshot) snapshot).getData();
 
-        spawner.nextSpawnData = new MobSpawnerData(compoundTag, Optional.ofNullable(toMinecraftRule(spawnRule)), getEquipment(equipment));
+        spawner.nextSpawnData = new SpawnData(compoundTag, Optional.ofNullable(CraftCreatureSpawner.toMinecraftRule(spawnRule)), CraftCreatureSpawner.getEquipment(equipment));
     }
 
     @Override
     public void addPotentialSpawn(EntitySnapshot snapshot, int weight, SpawnRule spawnRule) {
-        addPotentialSpawn(this.getSnapshot().getSpawner(), snapshot, weight, spawnRule, null);
+        CraftCreatureSpawner.addPotentialSpawn(this.getSnapshot().getSpawner(), snapshot, weight, spawnRule, null);
     }
 
-    public static void addPotentialSpawn(MobSpawnerAbstract spawner, EntitySnapshot snapshot, int weight, SpawnRule spawnRule, SpawnerEntry.Equipment equipment) {
+    public static void addPotentialSpawn(BaseSpawner spawner, EntitySnapshot snapshot, int weight, SpawnRule spawnRule, SpawnerEntry.Equipment equipment) {
         Preconditions.checkArgument(snapshot != null, "Snapshot cannot be null");
 
-        NBTTagCompound compoundTag = ((CraftEntitySnapshot) snapshot).getData();
+        CompoundTag compoundTag = ((CraftEntitySnapshot) snapshot).getData();
 
-        SimpleWeightedRandomList.a<MobSpawnerData> builder = SimpleWeightedRandomList.builder(); // PAIL rename Builder
+        SimpleWeightedRandomList.Builder<SpawnData> builder = SimpleWeightedRandomList.builder(); // PAIL rename Builder
         spawner.spawnPotentials.unwrap().forEach(entry -> builder.add(entry.data(), entry.getWeight().asInt()));
-        builder.add(new MobSpawnerData(compoundTag, Optional.ofNullable(toMinecraftRule(spawnRule)), getEquipment(equipment)), weight);
+        builder.add(new SpawnData(compoundTag, Optional.ofNullable(CraftCreatureSpawner.toMinecraftRule(spawnRule)), CraftCreatureSpawner.getEquipment(equipment)), weight);
         spawner.spawnPotentials = builder.build();
     }
 
@@ -118,52 +117,52 @@ public class CraftCreatureSpawner extends CraftBlockEntityState<TileEntityMobSpa
     public void addPotentialSpawn(SpawnerEntry spawnerEntry) {
         Preconditions.checkArgument(spawnerEntry != null, "Entry cannot be null");
 
-        addPotentialSpawn(spawnerEntry.getSnapshot(), spawnerEntry.getSpawnWeight(), spawnerEntry.getSpawnRule());
+        this.addPotentialSpawn(spawnerEntry.getSnapshot(), spawnerEntry.getSpawnWeight(), spawnerEntry.getSpawnRule());
     }
 
     @Override
     public void setPotentialSpawns(Collection<SpawnerEntry> entries) {
-        setPotentialSpawns(this.getSnapshot().getSpawner(), entries);
+        CraftCreatureSpawner.setPotentialSpawns(this.getSnapshot().getSpawner(), entries);
     }
 
-    public static void setPotentialSpawns(MobSpawnerAbstract spawner, Collection<SpawnerEntry> entries) {
+    public static void setPotentialSpawns(BaseSpawner spawner, Collection<SpawnerEntry> entries) {
         Preconditions.checkArgument(entries != null, "Entries cannot be null");
 
-        SimpleWeightedRandomList.a<MobSpawnerData> builder = SimpleWeightedRandomList.builder();
+        SimpleWeightedRandomList.Builder<SpawnData> builder = SimpleWeightedRandomList.builder();
         for (SpawnerEntry spawnerEntry : entries) {
-            NBTTagCompound compoundTag = ((CraftEntitySnapshot) spawnerEntry.getSnapshot()).getData();
-            builder.add(new MobSpawnerData(compoundTag, Optional.ofNullable(toMinecraftRule(spawnerEntry.getSpawnRule())), getEquipment(spawnerEntry.getEquipment())), spawnerEntry.getSpawnWeight());
+            CompoundTag compoundTag = ((CraftEntitySnapshot) spawnerEntry.getSnapshot()).getData();
+            builder.add(new SpawnData(compoundTag, Optional.ofNullable(CraftCreatureSpawner.toMinecraftRule(spawnerEntry.getSpawnRule())), CraftCreatureSpawner.getEquipment(spawnerEntry.getEquipment())), spawnerEntry.getSpawnWeight());
         }
         spawner.spawnPotentials = builder.build();
     }
 
     @Override
     public List<SpawnerEntry> getPotentialSpawns() {
-        return getPotentialSpawns(this.getSnapshot().getSpawner());
+        return CraftCreatureSpawner.getPotentialSpawns(this.getSnapshot().getSpawner());
     }
 
-    public static List<SpawnerEntry> getPotentialSpawns(MobSpawnerAbstract spawner) {
+    public static List<SpawnerEntry> getPotentialSpawns(BaseSpawner spawner) {
         List<SpawnerEntry> entries = new ArrayList<>();
 
-        for (b<MobSpawnerData> entry : spawner.spawnPotentials.unwrap()) { // PAIL rename Wrapper
+        for (Wrapper<SpawnData> entry : spawner.spawnPotentials.unwrap()) { // PAIL rename Wrapper
             CraftEntitySnapshot snapshot = CraftEntitySnapshot.create(entry.data().getEntityToSpawn());
 
             if (snapshot != null) {
                 SpawnRule rule = entry.data().customSpawnRules().map(CraftCreatureSpawner::fromMinecraftRule).orElse(null);
-                entries.add(new SpawnerEntry(snapshot, entry.getWeight().asInt(), rule, getEquipment(entry.data().equipment())));
+                entries.add(new SpawnerEntry(snapshot, entry.getWeight().asInt(), rule, CraftCreatureSpawner.getEquipment(entry.data().equipment())));
             }
         }
         return entries;
     }
 
-    public static MobSpawnerData.a toMinecraftRule(SpawnRule rule) { // PAIL rename CustomSpawnRules
+    public static SpawnData.CustomSpawnRules toMinecraftRule(SpawnRule rule) { // PAIL rename CustomSpawnRules
         if (rule == null) {
             return null;
         }
-        return new MobSpawnerData.a(new InclusiveRange<>(rule.getMinBlockLight(), rule.getMaxBlockLight()), new InclusiveRange<>(rule.getMinSkyLight(), rule.getMaxSkyLight()));
+        return new SpawnData.CustomSpawnRules(new InclusiveRange<>(rule.getMinBlockLight(), rule.getMaxBlockLight()), new InclusiveRange<>(rule.getMinSkyLight(), rule.getMaxSkyLight()));
     }
 
-    public static SpawnRule fromMinecraftRule(MobSpawnerData.a rule) {
+    public static SpawnRule fromMinecraftRule(SpawnData.CustomSpawnRules rule) {
         InclusiveRange<Integer> blockLight = rule.blockLightLimit();
         InclusiveRange<Integer> skyLight = rule.skyLightLimit();
 
@@ -172,12 +171,12 @@ public class CraftCreatureSpawner extends CraftBlockEntityState<TileEntityMobSpa
 
     @Override
     public String getCreatureTypeName() {
-        MobSpawnerData spawnData = this.getSnapshot().getSpawner().nextSpawnData;
+        SpawnData spawnData = this.getSnapshot().getSpawner().nextSpawnData;
         if (spawnData == null) {
             return null;
         }
 
-        Optional<EntityTypes<?>> type = EntityTypes.by(spawnData.getEntityToSpawn());
+        Optional<net.minecraft.world.entity.EntityType<?>> type = net.minecraft.world.entity.EntityType.by(spawnData.getEntityToSpawn());
         return type.map(CraftEntityType::minecraftToBukkit).map(CraftEntityType::bukkitToString).orElse(null);
     }
 
@@ -186,10 +185,10 @@ public class CraftCreatureSpawner extends CraftBlockEntityState<TileEntityMobSpa
         // Verify input
         EntityType type = CraftEntityType.stringToBukkit(creatureType);
         if (type == null) {
-            setSpawnedType(null);
+            this.setSpawnedType(null);
             return;
         }
-        setSpawnedType(type);
+        this.setSpawnedType(type);
     }
 
     @Override
@@ -209,7 +208,7 @@ public class CraftCreatureSpawner extends CraftBlockEntityState<TileEntityMobSpa
 
     @Override
     public void setMinSpawnDelay(int spawnDelay) {
-        Preconditions.checkArgument(spawnDelay <= getMaxSpawnDelay(), "Minimum Spawn Delay must be less than or equal to Maximum Spawn Delay");
+        Preconditions.checkArgument(spawnDelay <= this.getMaxSpawnDelay(), "Minimum Spawn Delay must be less than or equal to Maximum Spawn Delay");
         this.getSnapshot().getSpawner().minSpawnDelay = spawnDelay;
     }
 
@@ -221,7 +220,7 @@ public class CraftCreatureSpawner extends CraftBlockEntityState<TileEntityMobSpa
     @Override
     public void setMaxSpawnDelay(int spawnDelay) {
         Preconditions.checkArgument(spawnDelay > 0, "Maximum Spawn Delay must be greater than 0.");
-        Preconditions.checkArgument(spawnDelay >= getMinSpawnDelay(), "Maximum Spawn Delay must be greater than or equal to Minimum Spawn Delay");
+        Preconditions.checkArgument(spawnDelay >= this.getMinSpawnDelay(), "Maximum Spawn Delay must be greater than or equal to Minimum Spawn Delay");
         this.getSnapshot().getSpawner().maxSpawnDelay = spawnDelay;
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftDaylightDetector.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftDaylightDetector.java
index a9b4d54bc0..09f3a59fa9 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftDaylightDetector.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftDaylightDetector.java
@@ -1,13 +1,13 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.world.level.block.entity.TileEntityLightDetector;
+import net.minecraft.world.level.block.entity.DaylightDetectorBlockEntity;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.block.DaylightDetector;
 
-public class CraftDaylightDetector extends CraftBlockEntityState<TileEntityLightDetector> implements DaylightDetector {
+public class CraftDaylightDetector extends CraftBlockEntityState<DaylightDetectorBlockEntity> implements DaylightDetector {
 
-    public CraftDaylightDetector(World world, TileEntityLightDetector tileEntity) {
+    public CraftDaylightDetector(World world, DaylightDetectorBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftDecoratedPot.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftDecoratedPot.java
index 703d4705d7..6e0258d4d6 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftDecoratedPot.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftDecoratedPot.java
@@ -49,13 +49,13 @@ public class CraftDecoratedPot extends CraftBlockEntityState<DecoratedPotBlockEn
         Preconditions.checkArgument(sherd == null || sherd == Material.BRICK || Tag.ITEMS_DECORATED_POT_SHERDS.isTagged(sherd), "sherd is not a valid sherd material: %s", sherd);
 
         Optional<Item> sherdItem = (sherd != null) ? Optional.of(CraftItemType.bukkitToMinecraft(sherd)) : Optional.of(Items.BRICK);
-        PotDecorations decorations = getSnapshot().getDecorations();
+        PotDecorations decorations = this.getSnapshot().getDecorations();
 
         switch (face) {
-            case BACK -> getSnapshot().decorations = new PotDecorations(sherdItem, decorations.left(), decorations.right(), decorations.front());
-            case LEFT -> getSnapshot().decorations = new PotDecorations(decorations.back(), sherdItem, decorations.right(), decorations.front());
-            case RIGHT -> getSnapshot().decorations = new PotDecorations(decorations.back(), decorations.left(), sherdItem, decorations.front());
-            case FRONT -> getSnapshot().decorations = new PotDecorations(decorations.back(), decorations.left(), decorations.right(), sherdItem);
+            case BACK -> this.getSnapshot().decorations = new PotDecorations(sherdItem, decorations.left(), decorations.right(), decorations.front());
+            case LEFT -> this.getSnapshot().decorations = new PotDecorations(decorations.back(), sherdItem, decorations.right(), decorations.front());
+            case RIGHT -> this.getSnapshot().decorations = new PotDecorations(decorations.back(), decorations.left(), sherdItem, decorations.front());
+            case FRONT -> this.getSnapshot().decorations = new PotDecorations(decorations.back(), decorations.left(), decorations.right(), sherdItem);
             default -> throw new IllegalArgumentException("Unexpected value: " + face);
         }
     }
@@ -64,7 +64,7 @@ public class CraftDecoratedPot extends CraftBlockEntityState<DecoratedPotBlockEn
     public Material getSherd(Side face) {
         Preconditions.checkArgument(face != null, "face must not be null");
 
-        PotDecorations decorations = getSnapshot().getDecorations();
+        PotDecorations decorations = this.getSnapshot().getDecorations();
         Optional<Item> sherdItem = switch (face) {
             case BACK -> decorations.back();
             case LEFT -> decorations.left();
@@ -78,7 +78,7 @@ public class CraftDecoratedPot extends CraftBlockEntityState<DecoratedPotBlockEn
 
     @Override
     public Map<Side, Material> getSherds() {
-        PotDecorations decorations = getSnapshot().getDecorations();
+        PotDecorations decorations = this.getSnapshot().getDecorations();
 
         Map<Side, Material> sherds = new EnumMap<>(Side.class);
         sherds.put(Side.BACK, CraftItemType.minecraftToBukkit(decorations.back().orElse(Items.BRICK)));
@@ -90,7 +90,7 @@ public class CraftDecoratedPot extends CraftBlockEntityState<DecoratedPotBlockEn
 
     @Override
     public List<Material> getShards() {
-        return getSnapshot().getDecorations().ordered().stream().map(CraftItemType::minecraftToBukkit).collect(Collectors.toUnmodifiableList());
+        return this.getSnapshot().getDecorations().ordered().stream().map(CraftItemType::minecraftToBukkit).collect(Collectors.toUnmodifiableList());
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java
index 5215a49e05..ab9f0ee31c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftDispenser.java
@@ -1,8 +1,8 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.world.level.block.BlockDispenser;
 import net.minecraft.world.level.block.Blocks;
-import net.minecraft.world.level.block.entity.TileEntityDispenser;
+import net.minecraft.world.level.block.DispenserBlock;
+import net.minecraft.world.level.block.entity.DispenserBlockEntity;
 import org.bukkit.Location;
 import org.bukkit.Material;
 import org.bukkit.World;
@@ -14,9 +14,9 @@ import org.bukkit.craftbukkit.projectiles.CraftBlockProjectileSource;
 import org.bukkit.inventory.Inventory;
 import org.bukkit.projectiles.BlockProjectileSource;
 
-public class CraftDispenser extends CraftLootable<TileEntityDispenser> implements Dispenser {
+public class CraftDispenser extends CraftLootable<DispenserBlockEntity> implements Dispenser {
 
-    public CraftDispenser(World world, TileEntityDispenser tileEntity) {
+    public CraftDispenser(World world, DispenserBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
@@ -40,22 +40,22 @@ public class CraftDispenser extends CraftLootable<TileEntityDispenser> implement
 
     @Override
     public BlockProjectileSource getBlockProjectileSource() {
-        Block block = getBlock();
+        Block block = this.getBlock();
 
         if (block.getType() != Material.DISPENSER) {
             return null;
         }
 
-        return new CraftBlockProjectileSource((TileEntityDispenser) this.getTileEntityFromWorld());
+        return new CraftBlockProjectileSource((DispenserBlockEntity) this.getTileEntityFromWorld());
     }
 
     @Override
     public boolean dispense() {
-        ensureNoWorldGeneration();
-        Block block = getBlock();
+        this.ensureNoWorldGeneration();
+        Block block = this.getBlock();
         if (block.getType() == Material.DISPENSER) {
             CraftWorld world = (CraftWorld) this.getWorld();
-            BlockDispenser dispense = (BlockDispenser) Blocks.DISPENSER;
+            DispenserBlock dispense = (DispenserBlock) Blocks.DISPENSER;
 
             dispense.dispenseFrom(world.getHandle(), this.getHandle(), this.getPosition());
             return true;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftDropper.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftDropper.java
index 98f5935573..5eed6c2430 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftDropper.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftDropper.java
@@ -1,8 +1,8 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.world.level.block.BlockDropper;
 import net.minecraft.world.level.block.Blocks;
-import net.minecraft.world.level.block.entity.TileEntityDropper;
+import net.minecraft.world.level.block.DropperBlock;
+import net.minecraft.world.level.block.entity.DropperBlockEntity;
 import org.bukkit.Location;
 import org.bukkit.Material;
 import org.bukkit.World;
@@ -12,9 +12,9 @@ import org.bukkit.craftbukkit.CraftWorld;
 import org.bukkit.craftbukkit.inventory.CraftInventory;
 import org.bukkit.inventory.Inventory;
 
-public class CraftDropper extends CraftLootable<TileEntityDropper> implements Dropper {
+public class CraftDropper extends CraftLootable<DropperBlockEntity> implements Dropper {
 
-    public CraftDropper(World world, TileEntityDropper tileEntity) {
+    public CraftDropper(World world, DropperBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
@@ -38,11 +38,11 @@ public class CraftDropper extends CraftLootable<TileEntityDropper> implements Dr
 
     @Override
     public void drop() {
-        ensureNoWorldGeneration();
-        Block block = getBlock();
+        this.ensureNoWorldGeneration();
+        Block block = this.getBlock();
         if (block.getType() == Material.DROPPER) {
             CraftWorld world = (CraftWorld) this.getWorld();
-            BlockDropper drop = (BlockDropper) Blocks.DROPPER;
+            DropperBlock drop = (DropperBlock) Blocks.DROPPER;
 
             drop.dispenseFrom(world.getHandle(), this.getHandle(), this.getPosition());
         }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftEnchantingTable.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftEnchantingTable.java
index 87613252f6..690dd79b82 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftEnchantingTable.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftEnchantingTable.java
@@ -1,14 +1,14 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.world.level.block.entity.TileEntityEnchantTable;
+import net.minecraft.world.level.block.entity.EnchantingTableBlockEntity;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.block.EnchantingTable;
 import org.bukkit.craftbukkit.util.CraftChatMessage;
 
-public class CraftEnchantingTable extends CraftBlockEntityState<TileEntityEnchantTable> implements EnchantingTable {
+public class CraftEnchantingTable extends CraftBlockEntityState<EnchantingTableBlockEntity> implements EnchantingTable {
 
-    public CraftEnchantingTable(World world, TileEntityEnchantTable tileEntity) {
+    public CraftEnchantingTable(World world, EnchantingTableBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
@@ -18,7 +18,7 @@ public class CraftEnchantingTable extends CraftBlockEntityState<TileEntityEnchan
 
     @Override
     public String getCustomName() {
-        TileEntityEnchantTable enchant = this.getSnapshot();
+        EnchantingTableBlockEntity enchant = this.getSnapshot();
         return enchant.hasCustomName() ? CraftChatMessage.fromComponent(enchant.getCustomName()) : null;
     }
 
@@ -28,7 +28,7 @@ public class CraftEnchantingTable extends CraftBlockEntityState<TileEntityEnchan
     }
 
     @Override
-    public void applyTo(TileEntityEnchantTable enchantingTable) {
+    public void applyTo(EnchantingTableBlockEntity enchantingTable) {
         super.applyTo(enchantingTable);
 
         if (!this.getSnapshot().hasCustomName()) {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java
index 94e7f0a259..c21d2813b4 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftEndGateway.java
@@ -1,16 +1,16 @@
 package org.bukkit.craftbukkit.block;
 
 import java.util.Objects;
-import net.minecraft.core.BlockPosition;
-import net.minecraft.world.level.block.entity.TileEntityEndGateway;
+import net.minecraft.core.BlockPos;
+import net.minecraft.world.level.block.entity.TheEndGatewayBlockEntity;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.block.EndGateway;
 import org.bukkit.craftbukkit.util.CraftLocation;
 
-public class CraftEndGateway extends CraftBlockEntityState<TileEntityEndGateway> implements EndGateway {
+public class CraftEndGateway extends CraftBlockEntityState<TheEndGatewayBlockEntity> implements EndGateway {
 
-    public CraftEndGateway(World world, TileEntityEndGateway tileEntity) {
+    public CraftEndGateway(World world, TheEndGatewayBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
@@ -20,7 +20,7 @@ public class CraftEndGateway extends CraftBlockEntityState<TileEntityEndGateway>
 
     @Override
     public Location getExitLocation() {
-        BlockPosition pos = this.getSnapshot().exitPortal;
+        BlockPos pos = this.getSnapshot().exitPortal;
         return pos == null ? null : CraftLocation.toBukkit(pos, this.isPlaced() ? this.getWorld() : null);
     }
 
@@ -56,7 +56,7 @@ public class CraftEndGateway extends CraftBlockEntityState<TileEntityEndGateway>
     }
 
     @Override
-    public void applyTo(TileEntityEndGateway endGateway) {
+    public void applyTo(TheEndGatewayBlockEntity endGateway) {
         super.applyTo(endGateway);
 
         if (this.getSnapshot().exitPortal == null) {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftEndPortal.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftEndPortal.java
index 38787ce4d2..4968db347d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftEndPortal.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftEndPortal.java
@@ -1,12 +1,12 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.world.level.block.entity.TileEntityEnderPortal;
+import net.minecraft.world.level.block.entity.TheEndPortalBlockEntity;
 import org.bukkit.Location;
 import org.bukkit.World;
 
-public class CraftEndPortal extends CraftBlockEntityState<TileEntityEnderPortal> {
+public class CraftEndPortal extends CraftBlockEntityState<TheEndPortalBlockEntity> {
 
-    public CraftEndPortal(World world, TileEntityEnderPortal tileEntity) {
+    public CraftEndPortal(World world, TheEndPortalBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftEnderChest.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftEnderChest.java
index 746d23c01d..07b63ce5f5 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftEnderChest.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftEnderChest.java
@@ -1,14 +1,14 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.world.level.block.entity.TileEntityEnderChest;
-import net.minecraft.world.level.block.state.IBlockData;
+import net.minecraft.world.level.block.entity.EnderChestBlockEntity;
+import net.minecraft.world.level.block.state.BlockState;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.block.EnderChest;
 
-public class CraftEnderChest extends CraftBlockEntityState<TileEntityEnderChest> implements EnderChest {
+public class CraftEnderChest extends CraftBlockEntityState<EnderChestBlockEntity> implements EnderChest {
 
-    public CraftEnderChest(World world, TileEntityEnderChest tileEntity) {
+    public CraftEnderChest(World world, EnderChestBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
@@ -18,28 +18,28 @@ public class CraftEnderChest extends CraftBlockEntityState<TileEntityEnderChest>
 
     @Override
     public void open() {
-        requirePlaced();
-        if (!getTileEntity().openersCounter.opened && getWorldHandle() instanceof net.minecraft.world.level.World) {
-            IBlockData block = getTileEntity().getBlockState();
-            int openCount = getTileEntity().openersCounter.getOpenerCount();
+        this.requirePlaced();
+        if (!this.getTileEntity().openersCounter.opened && this.getWorldHandle() instanceof net.minecraft.world.level.Level) {
+            BlockState block = this.getTileEntity().getBlockState();
+            int openCount = this.getTileEntity().openersCounter.getOpenerCount();
 
-            getTileEntity().openersCounter.onAPIOpen((net.minecraft.world.level.World) getWorldHandle(), getPosition(), block);
-            getTileEntity().openersCounter.openerAPICountChanged((net.minecraft.world.level.World) getWorldHandle(), getPosition(), block, openCount, openCount + 1);
+            this.getTileEntity().openersCounter.onAPIOpen((net.minecraft.world.level.Level) this.getWorldHandle(), this.getPosition(), block);
+            this.getTileEntity().openersCounter.openerAPICountChanged((net.minecraft.world.level.Level) this.getWorldHandle(), this.getPosition(), block, openCount, openCount + 1);
         }
-        getTileEntity().openersCounter.opened = true;
+        this.getTileEntity().openersCounter.opened = true;
     }
 
     @Override
     public void close() {
-        requirePlaced();
-        if (getTileEntity().openersCounter.opened && getWorldHandle() instanceof net.minecraft.world.level.World) {
-            IBlockData block = getTileEntity().getBlockState();
-            int openCount = getTileEntity().openersCounter.getOpenerCount();
+        this.requirePlaced();
+        if (this.getTileEntity().openersCounter.opened && this.getWorldHandle() instanceof net.minecraft.world.level.Level) {
+            BlockState block = this.getTileEntity().getBlockState();
+            int openCount = this.getTileEntity().openersCounter.getOpenerCount();
 
-            getTileEntity().openersCounter.onAPIClose((net.minecraft.world.level.World) getWorldHandle(), getPosition(), block);
-            getTileEntity().openersCounter.openerAPICountChanged((net.minecraft.world.level.World) getWorldHandle(), getPosition(), block, openCount, 0);
+            this.getTileEntity().openersCounter.onAPIClose((net.minecraft.world.level.Level) this.getWorldHandle(), this.getPosition(), block);
+            this.getTileEntity().openersCounter.openerAPICountChanged((net.minecraft.world.level.Level) this.getWorldHandle(), this.getPosition(), block, openCount, 0);
         }
-        getTileEntity().openersCounter.opened = false;
+        this.getTileEntity().openersCounter.opened = false;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java
index 3f8f3e8c83..7a642b1b95 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftFurnace.java
@@ -2,8 +2,8 @@ package org.bukkit.craftbukkit.block;
 
 import com.google.common.collect.ImmutableMap;
 import java.util.Map;
-import net.minecraft.world.level.block.BlockFurnace;
-import net.minecraft.world.level.block.entity.TileEntityFurnace;
+import net.minecraft.world.level.block.AbstractFurnaceBlock;
+import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity;
 import org.bukkit.Bukkit;
 import org.bukkit.Location;
 import org.bukkit.World;
@@ -14,7 +14,7 @@ import org.bukkit.inventory.CookingRecipe;
 import org.bukkit.inventory.FurnaceInventory;
 import org.bukkit.inventory.Recipe;
 
-public abstract class CraftFurnace<T extends TileEntityFurnace> extends CraftContainer<T> implements Furnace {
+public abstract class CraftFurnace<T extends AbstractFurnaceBlockEntity> extends CraftContainer<T> implements Furnace {
 
     public CraftFurnace(World world, T tileEntity) {
         super(world, tileEntity);
@@ -47,7 +47,7 @@ public abstract class CraftFurnace<T extends TileEntityFurnace> extends CraftCon
     public void setBurnTime(short burnTime) {
         this.getSnapshot().litTimeRemaining = burnTime;
         // SPIGOT-844: Allow lighting and relighting using this API
-        this.data = this.data.setValue(BlockFurnace.LIT, burnTime > 0);
+        this.data = this.data.setValue(AbstractFurnaceBlock.LIT, burnTime > 0);
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftFurnaceFurnace.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftFurnaceFurnace.java
index 8776d39456..8d3eade195 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftFurnaceFurnace.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftFurnaceFurnace.java
@@ -1,12 +1,12 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.world.level.block.entity.TileEntityFurnaceFurnace;
+import net.minecraft.world.level.block.entity.FurnaceBlockEntity;
 import org.bukkit.Location;
 import org.bukkit.World;
 
-public class CraftFurnaceFurnace extends CraftFurnace<TileEntityFurnaceFurnace> {
+public class CraftFurnaceFurnace extends CraftFurnace<FurnaceBlockEntity> {
 
-    public CraftFurnaceFurnace(World world, TileEntityFurnaceFurnace tileEntity) {
+    public CraftFurnaceFurnace(World world, FurnaceBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java
index 70bc3338d9..2995b40741 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftHopper.java
@@ -1,15 +1,15 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.world.level.block.entity.TileEntityHopper;
+import net.minecraft.world.level.block.entity.HopperBlockEntity;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.block.Hopper;
 import org.bukkit.craftbukkit.inventory.CraftInventory;
 import org.bukkit.inventory.Inventory;
 
-public class CraftHopper extends CraftLootable<TileEntityHopper> implements Hopper {
+public class CraftHopper extends CraftLootable<HopperBlockEntity> implements Hopper {
 
-    public CraftHopper(World world, TileEntityHopper tileEntity) {
+    public CraftHopper(World world, HopperBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftJigsaw.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftJigsaw.java
index 3a98aac04d..69cc43eb51 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftJigsaw.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftJigsaw.java
@@ -1,13 +1,13 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.world.level.block.entity.TileEntityJigsaw;
+import net.minecraft.world.level.block.entity.JigsawBlockEntity;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.block.Jigsaw;
 
-public class CraftJigsaw extends CraftBlockEntityState<TileEntityJigsaw> implements Jigsaw {
+public class CraftJigsaw extends CraftBlockEntityState<JigsawBlockEntity> implements Jigsaw {
 
-    public CraftJigsaw(World world, TileEntityJigsaw tileEntity) {
+    public CraftJigsaw(World world, JigsawBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java
index 880e32a8ef..5d191b1d67 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftJukebox.java
@@ -1,9 +1,9 @@
 package org.bukkit.craftbukkit.block;
 
 import net.minecraft.world.item.ItemStack;
-import net.minecraft.world.level.block.BlockJukeBox;
-import net.minecraft.world.level.block.entity.TileEntity;
-import net.minecraft.world.level.block.entity.TileEntityJukeBox;
+import net.minecraft.world.level.block.JukeboxBlock;
+import net.minecraft.world.level.block.entity.BlockEntity;
+import net.minecraft.world.level.block.entity.JukeboxBlockEntity;
 import org.bukkit.Location;
 import org.bukkit.Material;
 import org.bukkit.World;
@@ -13,9 +13,9 @@ import org.bukkit.craftbukkit.inventory.CraftItemStack;
 import org.bukkit.craftbukkit.inventory.CraftItemType;
 import org.bukkit.inventory.JukeboxInventory;
 
-public class CraftJukebox extends CraftBlockEntityState<TileEntityJukeBox> implements Jukebox {
+public class CraftJukebox extends CraftBlockEntityState<JukeboxBlockEntity> implements Jukebox {
 
-    public CraftJukebox(World world, TileEntityJukeBox tileEntity) {
+    public CraftJukebox(World world, JukeboxBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
@@ -42,10 +42,10 @@ public class CraftJukebox extends CraftBlockEntityState<TileEntityJukeBox> imple
         boolean result = super.update(force, applyPhysics);
 
         if (result && this.isPlaced() && this.getType() == Material.JUKEBOX) {
-            getWorldHandle().setBlock(this.getPosition(), data, 3);
+            this.getWorldHandle().setBlock(this.getPosition(), this.data, 3);
 
-            TileEntity tileEntity = this.getTileEntityFromWorld();
-            if (tileEntity instanceof TileEntityJukeBox jukebox) {
+            BlockEntity tileEntity = this.getTileEntityFromWorld();
+            if (tileEntity instanceof JukeboxBlockEntity jukebox) {
                 jukebox.setTheItem(jukebox.getTheItem());
             }
         }
@@ -55,7 +55,7 @@ public class CraftJukebox extends CraftBlockEntityState<TileEntityJukeBox> imple
 
     @Override
     public Material getPlaying() {
-        return getRecord().getType();
+        return this.getRecord().getType();
     }
 
     @Override
@@ -64,12 +64,12 @@ public class CraftJukebox extends CraftBlockEntityState<TileEntityJukeBox> imple
             record = Material.AIR;
         }
 
-        setRecord(new org.bukkit.inventory.ItemStack(record));
+        this.setRecord(new org.bukkit.inventory.ItemStack(record));
     }
 
     @Override
     public boolean hasRecord() {
-        return getHandle().getValue(BlockJukeBox.HAS_RECORD) && !getPlaying().isAir();
+        return this.getHandle().getValue(JukeboxBlock.HAS_RECORD) && !this.getPlaying().isAir();
     }
 
     @Override
@@ -82,31 +82,31 @@ public class CraftJukebox extends CraftBlockEntityState<TileEntityJukeBox> imple
     public void setRecord(org.bukkit.inventory.ItemStack record) {
         ItemStack nms = CraftItemStack.asNMSCopy(record);
 
-        TileEntityJukeBox snapshot = this.getSnapshot();
+        JukeboxBlockEntity snapshot = this.getSnapshot();
         snapshot.setSongItemWithoutPlaying(nms, snapshot.getSongPlayer().getTicksSinceSongStarted());
 
-        this.data = this.data.setValue(BlockJukeBox.HAS_RECORD, !nms.isEmpty());
+        this.data = this.data.setValue(JukeboxBlock.HAS_RECORD, !nms.isEmpty());
     }
 
     @Override
     public boolean isPlaying() {
-        requirePlaced();
+        this.requirePlaced();
 
-        TileEntity tileEntity = this.getTileEntityFromWorld();
-        return tileEntity instanceof TileEntityJukeBox jukebox && jukebox.getSongPlayer().isPlaying();
+        BlockEntity tileEntity = this.getTileEntityFromWorld();
+        return tileEntity instanceof JukeboxBlockEntity jukebox && jukebox.getSongPlayer().isPlaying();
     }
 
     @Override
     public boolean startPlaying() {
-        requirePlaced();
+        this.requirePlaced();
 
-        TileEntity tileEntity = this.getTileEntityFromWorld();
-        if (!(tileEntity instanceof TileEntityJukeBox jukebox)) {
+        BlockEntity tileEntity = this.getTileEntityFromWorld();
+        if (!(tileEntity instanceof JukeboxBlockEntity jukebox)) {
             return false;
         }
 
         ItemStack record = jukebox.getTheItem();
-        if (record.isEmpty() || isPlaying()) {
+        if (record.isEmpty() || this.isPlaying()) {
             return false;
         }
 
@@ -116,10 +116,10 @@ public class CraftJukebox extends CraftBlockEntityState<TileEntityJukeBox> imple
 
     @Override
     public void stopPlaying() {
-        requirePlaced();
+        this.requirePlaced();
 
-        TileEntity tileEntity = this.getTileEntityFromWorld();
-        if (!(tileEntity instanceof TileEntityJukeBox jukebox)) {
+        BlockEntity tileEntity = this.getTileEntityFromWorld();
+        if (!(tileEntity instanceof JukeboxBlockEntity jukebox)) {
             return;
         }
 
@@ -128,12 +128,12 @@ public class CraftJukebox extends CraftBlockEntityState<TileEntityJukeBox> imple
 
     @Override
     public boolean eject() {
-        ensureNoWorldGeneration();
+        this.ensureNoWorldGeneration();
 
-        TileEntity tileEntity = this.getTileEntityFromWorld();
-        if (!(tileEntity instanceof TileEntityJukeBox)) return false;
+        BlockEntity tileEntity = this.getTileEntityFromWorld();
+        if (!(tileEntity instanceof JukeboxBlockEntity)) return false;
 
-        TileEntityJukeBox jukebox = (TileEntityJukeBox) tileEntity;
+        JukeboxBlockEntity jukebox = (JukeboxBlockEntity) tileEntity;
         boolean result = !jukebox.getTheItem().isEmpty();
         jukebox.popOutTheItem();
         return result;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftLectern.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftLectern.java
index 76c11ad34b..b881a69c6c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftLectern.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftLectern.java
@@ -1,7 +1,7 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.world.level.block.BlockLectern;
-import net.minecraft.world.level.block.entity.TileEntityLectern;
+import net.minecraft.world.level.block.LecternBlock;
+import net.minecraft.world.level.block.entity.LecternBlockEntity;
 import org.bukkit.Location;
 import org.bukkit.Material;
 import org.bukkit.World;
@@ -9,9 +9,9 @@ import org.bukkit.block.Lectern;
 import org.bukkit.craftbukkit.inventory.CraftInventoryLectern;
 import org.bukkit.inventory.Inventory;
 
-public class CraftLectern extends CraftBlockEntityState<TileEntityLectern> implements Lectern {
+public class CraftLectern extends CraftBlockEntityState<LecternBlockEntity> implements Lectern {
 
-    public CraftLectern(World world, TileEntityLectern tileEntity) {
+    public CraftLectern(World world, LecternBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
@@ -21,12 +21,12 @@ public class CraftLectern extends CraftBlockEntityState<TileEntityLectern> imple
 
     @Override
     public int getPage() {
-        return getSnapshot().getPage();
+        return this.getSnapshot().getPage();
     }
 
     @Override
     public void setPage(int page) {
-        getSnapshot().setPage(page);
+        this.getSnapshot().setPage(page);
     }
 
     @Override
@@ -47,8 +47,8 @@ public class CraftLectern extends CraftBlockEntityState<TileEntityLectern> imple
     public boolean update(boolean force, boolean applyPhysics) {
         boolean result = super.update(force, applyPhysics);
 
-        if (result && this.getType() == Material.LECTERN && getWorldHandle() instanceof net.minecraft.world.level.World) {
-            BlockLectern.signalPageChange(this.world.getHandle(), this.getPosition(), this.getHandle());
+        if (result && this.getType() == Material.LECTERN && this.getWorldHandle() instanceof net.minecraft.world.level.Level) {
+            LecternBlock.signalPageChange(this.world.getHandle(), this.getPosition(), this.getHandle());
         }
 
         return result;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
index 716cd98e10..74315a46f6 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftLootable.java
@@ -1,6 +1,6 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.world.level.block.entity.TileEntityLootable;
+import net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity;
 import org.bukkit.Location;
 import org.bukkit.Nameable;
 import org.bukkit.World;
@@ -8,7 +8,7 @@ import org.bukkit.craftbukkit.CraftLootTable;
 import org.bukkit.loot.LootTable;
 import org.bukkit.loot.Lootable;
 
-public abstract class CraftLootable<T extends TileEntityLootable> extends CraftContainer<T> implements Nameable, Lootable {
+public abstract class CraftLootable<T extends RandomizableContainerBlockEntity> extends CraftContainer<T> implements Nameable, Lootable {
 
     public CraftLootable(World world, T tileEntity) {
         super(world, tileEntity);
@@ -29,26 +29,26 @@ public abstract class CraftLootable<T extends TileEntityLootable> extends CraftC
 
     @Override
     public LootTable getLootTable() {
-        return CraftLootTable.minecraftToBukkit(getSnapshot().lootTable);
+        return CraftLootTable.minecraftToBukkit(this.getSnapshot().lootTable);
     }
 
     @Override
     public void setLootTable(LootTable table) {
-        setLootTable(table, getSeed());
+        this.setLootTable(table, this.getSeed());
     }
 
     @Override
     public long getSeed() {
-        return getSnapshot().lootTableSeed;
+        return this.getSnapshot().lootTableSeed;
     }
 
     @Override
     public void setSeed(long seed) {
-        setLootTable(getLootTable(), seed);
+        this.setLootTable(this.getLootTable(), seed);
     }
 
-    private void setLootTable(LootTable table, long seed) {
-        getSnapshot().setLootTable(CraftLootTable.bukkitToMinecraft(table), seed);
+    public void setLootTable(LootTable table, long seed) {
+        this.getSnapshot().setLootTable(CraftLootTable.bukkitToMinecraft(table), seed);
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftMovingPiston.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftMovingPiston.java
index cd4e2ef9c5..25b759dee5 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftMovingPiston.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftMovingPiston.java
@@ -1,12 +1,12 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.world.level.block.piston.TileEntityPiston;
+import net.minecraft.world.level.block.piston.PistonMovingBlockEntity;
 import org.bukkit.Location;
 import org.bukkit.World;
 
-public class CraftMovingPiston extends CraftBlockEntityState<TileEntityPiston> {
+public class CraftMovingPiston extends CraftBlockEntityState<PistonMovingBlockEntity> {
 
-    public CraftMovingPiston(World world, TileEntityPiston tileEntity) {
+    public CraftMovingPiston(World world, PistonMovingBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSculkCatalyst.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSculkCatalyst.java
index dfc0c52f0a..5211dc80f4 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSculkCatalyst.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSculkCatalyst.java
@@ -1,7 +1,7 @@
 package org.bukkit.craftbukkit.block;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
 import net.minecraft.world.level.block.entity.SculkCatalystBlockEntity;
 import org.bukkit.Location;
 import org.bukkit.World;
@@ -22,11 +22,11 @@ public class CraftSculkCatalyst extends CraftBlockEntityState<SculkCatalystBlock
     public void bloom(Block block, int charge) {
         Preconditions.checkArgument(block != null, "block cannot be null");
         Preconditions.checkArgument(charge > 0, "charge must be positive");
-        requirePlaced();
+        this.requirePlaced();
 
         // bloom() is for visual blooming effect, cursors are what changes the blocks.
-        getTileEntity().getListener().bloom(world.getHandle(), getPosition(), getHandle(), world.getHandle().getRandom());
-        getTileEntity().getListener().getSculkSpreader().addCursors(new BlockPosition(block.getX(), block.getY(), block.getZ()), charge);
+        this.getTileEntity().getListener().bloom(this.world.getHandle(), this.getPosition(), this.getHandle(), this.world.getHandle().getRandom());
+        this.getTileEntity().getListener().getSculkSpreader().addCursors(new BlockPos(block.getX(), block.getY(), block.getZ()), charge);
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSculkSensor.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSculkSensor.java
index 2dc4a49111..70d85dbfca 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSculkSensor.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSculkSensor.java
@@ -18,13 +18,13 @@ public class CraftSculkSensor<T extends SculkSensorBlockEntity> extends CraftBlo
 
     @Override
     public int getLastVibrationFrequency() {
-        return getSnapshot().getLastVibrationFrequency();
+        return this.getSnapshot().getLastVibrationFrequency();
     }
 
     @Override
     public void setLastVibrationFrequency(int lastVibrationFrequency) {
         Preconditions.checkArgument(0 <= lastVibrationFrequency && lastVibrationFrequency <= 15, "Vibration frequency must be between 0-15");
-        getSnapshot().lastVibrationFrequency = lastVibrationFrequency;
+        this.getSnapshot().lastVibrationFrequency = lastVibrationFrequency;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSculkShrieker.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSculkShrieker.java
index af97c980b8..9cdcbaf35f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSculkShrieker.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSculkShrieker.java
@@ -1,6 +1,6 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.server.level.EntityPlayer;
+import net.minecraft.server.level.ServerPlayer;
 import net.minecraft.world.level.block.entity.SculkShriekerBlockEntity;
 import org.bukkit.Location;
 import org.bukkit.World;
@@ -20,20 +20,20 @@ public class CraftSculkShrieker extends CraftBlockEntityState<SculkShriekerBlock
 
     @Override
     public int getWarningLevel() {
-        return getSnapshot().warningLevel;
+        return this.getSnapshot().warningLevel;
     }
 
     @Override
     public void setWarningLevel(int level) {
-        getSnapshot().warningLevel = level;
+        this.getSnapshot().warningLevel = level;
     }
 
     @Override
     public void tryShriek(Player player) {
-        requirePlaced();
+        this.requirePlaced();
 
-        EntityPlayer entityPlayer = (player == null) ? null : ((CraftPlayer) player).getHandle();
-        getTileEntity().tryShriek(world.getHandle(), entityPlayer);
+        ServerPlayer entityPlayer = (player == null) ? null : ((CraftPlayer) player).getHandle();
+        this.getTileEntity().tryShriek(this.world.getHandle(), entityPlayer);
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java
index d3b985ae2c..7676313493 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftShulkerBox.java
@@ -1,10 +1,9 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.sounds.SoundCategory;
-import net.minecraft.sounds.SoundEffects;
-import net.minecraft.world.item.EnumColor;
-import net.minecraft.world.level.block.BlockShulkerBox;
-import net.minecraft.world.level.block.entity.TileEntityShulkerBox;
+import net.minecraft.sounds.SoundEvents;
+import net.minecraft.sounds.SoundSource;
+import net.minecraft.world.level.block.ShulkerBoxBlock;
+import net.minecraft.world.level.block.entity.ShulkerBoxBlockEntity;
 import org.bukkit.DyeColor;
 import org.bukkit.Location;
 import org.bukkit.World;
@@ -12,9 +11,9 @@ import org.bukkit.block.ShulkerBox;
 import org.bukkit.craftbukkit.inventory.CraftInventory;
 import org.bukkit.inventory.Inventory;
 
-public class CraftShulkerBox extends CraftLootable<TileEntityShulkerBox> implements ShulkerBox {
+public class CraftShulkerBox extends CraftLootable<ShulkerBoxBlockEntity> implements ShulkerBox {
 
-    public CraftShulkerBox(World world, TileEntityShulkerBox tileEntity) {
+    public CraftShulkerBox(World world, ShulkerBoxBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
@@ -38,31 +37,31 @@ public class CraftShulkerBox extends CraftLootable<TileEntityShulkerBox> impleme
 
     @Override
     public DyeColor getColor() {
-        EnumColor color = ((BlockShulkerBox) CraftBlockType.bukkitToMinecraft(this.getType())).color;
+        net.minecraft.world.item.DyeColor color = ((ShulkerBoxBlock) CraftBlockType.bukkitToMinecraft(this.getType())).color;
 
         return (color == null) ? null : DyeColor.getByWoolData((byte) color.getId());
     }
 
     @Override
     public void open() {
-        requirePlaced();
-        if (!getTileEntity().opened && getWorldHandle() instanceof net.minecraft.world.level.World) {
-            net.minecraft.world.level.World world = getTileEntity().getLevel();
-            world.blockEvent(getPosition(), getTileEntity().getBlockState().getBlock(), 1, 1);
-            world.playSound(null, getPosition(), SoundEffects.SHULKER_BOX_OPEN, SoundCategory.BLOCKS, 0.5F, world.random.nextFloat() * 0.1F + 0.9F);
+        this.requirePlaced();
+        if (!this.getTileEntity().opened && this.getWorldHandle() instanceof net.minecraft.world.level.Level) {
+            net.minecraft.world.level.Level world = this.getTileEntity().getLevel();
+            world.blockEvent(this.getPosition(), this.getTileEntity().getBlockState().getBlock(), 1, 1);
+            world.playSound(null, this.getPosition(), SoundEvents.SHULKER_BOX_OPEN, SoundSource.BLOCKS, 0.5F, world.random.nextFloat() * 0.1F + 0.9F);
         }
-        getTileEntity().opened = true;
+        this.getTileEntity().opened = true;
     }
 
     @Override
     public void close() {
-        requirePlaced();
-        if (getTileEntity().opened && getWorldHandle() instanceof net.minecraft.world.level.World) {
-            net.minecraft.world.level.World world = getTileEntity().getLevel();
-            world.blockEvent(getPosition(), getTileEntity().getBlockState().getBlock(), 1, 0);
-            world.playSound(null, getPosition(), SoundEffects.SHULKER_BOX_OPEN, SoundCategory.BLOCKS, 0.5F, world.random.nextFloat() * 0.1F + 0.9F);
+        this.requirePlaced();
+        if (this.getTileEntity().opened && this.getWorldHandle() instanceof net.minecraft.world.level.Level) {
+            net.minecraft.world.level.Level world = this.getTileEntity().getLevel();
+            world.blockEvent(this.getPosition(), this.getTileEntity().getBlockState().getBlock(), 1, 0);
+            world.playSound(null, this.getPosition(), SoundEvents.SHULKER_BOX_OPEN, SoundSource.BLOCKS, 0.5F, world.random.nextFloat() * 0.1F + 0.9F);
         }
-        getTileEntity().opened = false;
+        this.getTileEntity().opened = false;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
index ae670045b9..0641d17d80 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSign.java
@@ -2,8 +2,8 @@ package org.bukkit.craftbukkit.block;
 
 import com.google.common.base.Preconditions;
 import java.util.UUID;
-import net.minecraft.network.chat.IChatBaseComponent;
-import net.minecraft.world.level.block.entity.TileEntitySign;
+import net.minecraft.network.chat.Component;
+import net.minecraft.world.level.block.entity.SignBlockEntity;
 import org.bukkit.Bukkit;
 import org.bukkit.DyeColor;
 import org.bukkit.Location;
@@ -19,7 +19,7 @@ import org.bukkit.entity.Player;
 import org.bukkit.event.player.PlayerSignOpenEvent;
 import org.jetbrains.annotations.NotNull;
 
-public class CraftSign<T extends TileEntitySign> extends CraftBlockEntityState<T> implements Sign {
+public class CraftSign<T extends SignBlockEntity> extends CraftBlockEntityState<T> implements Sign {
 
     private final CraftSignSide front;
     private final CraftSignSide back;
@@ -38,22 +38,22 @@ public class CraftSign<T extends TileEntitySign> extends CraftBlockEntityState<T
 
     @Override
     public String[] getLines() {
-        return front.getLines();
+        return this.front.getLines();
     }
 
     @Override
     public String getLine(int index) throws IndexOutOfBoundsException {
-        return front.getLine(index);
+        return this.front.getLine(index);
     }
 
     @Override
     public void setLine(int index, String line) throws IndexOutOfBoundsException {
-        front.setLine(index, line);
+        this.front.setLine(index, line);
     }
 
     @Override
     public boolean isEditable() {
-        return !isWaxed();
+        return !this.isWaxed();
     }
 
     @Override
@@ -63,22 +63,22 @@ public class CraftSign<T extends TileEntitySign> extends CraftBlockEntityState<T
 
     @Override
     public boolean isWaxed() {
-        return getSnapshot().isWaxed();
+        return this.getSnapshot().isWaxed();
     }
 
     @Override
     public void setWaxed(boolean waxed) {
-        getSnapshot().setWaxed(waxed);
+        this.getSnapshot().setWaxed(waxed);
     }
 
     @Override
     public boolean isGlowingText() {
-        return front.isGlowingText();
+        return this.front.isGlowingText();
     }
 
     @Override
     public void setGlowingText(boolean glowing) {
-        front.setGlowingText(glowing);
+        this.front.setGlowingText(glowing);
     }
 
     @NotNull
@@ -88,9 +88,9 @@ public class CraftSign<T extends TileEntitySign> extends CraftBlockEntityState<T
 
         switch (side) {
             case FRONT:
-                return front;
+                return this.front;
             case BACK:
-                return back;
+                return this.back;
             default:
                 throw new IllegalArgumentException();
         }
@@ -98,39 +98,39 @@ public class CraftSign<T extends TileEntitySign> extends CraftBlockEntityState<T
 
     @Override
     public SignSide getTargetSide(Player player) {
-        ensureNoWorldGeneration();
+        this.ensureNoWorldGeneration();
         Preconditions.checkArgument(player != null, "player cannot be null");
 
-        if (getSnapshot().isFacingFrontText(((CraftPlayer) player).getHandle())) {
-            return front;
+        if (this.getSnapshot().isFacingFrontText(((CraftPlayer) player).getHandle())) {
+            return this.front;
         }
 
-        return back;
+        return this.back;
     }
 
     @Override
     public Player getAllowedEditor() {
-        ensureNoWorldGeneration();
+        this.ensureNoWorldGeneration();
 
         // getPlayerWhoMayEdit is always null for the snapshot, so we use the wrapped TileEntity
-        UUID id = getTileEntity().getPlayerWhoMayEdit();
+        UUID id = this.getTileEntity().getPlayerWhoMayEdit();
         return (id == null) ? null : Bukkit.getPlayer(id);
     }
 
     @Override
     public DyeColor getColor() {
-        return front.getColor();
+        return this.front.getColor();
     }
 
     @Override
     public void setColor(DyeColor color) {
-        front.setColor(color);
+        this.front.setColor(color);
     }
 
     @Override
     public void applyTo(T sign) {
-        getSnapshot().setText(front.applyLegacyStringToSignSide(), true);
-        getSnapshot().setText(back.applyLegacyStringToSignSide(), false);
+        this.getSnapshot().setText(this.front.applyLegacyStringToSignSide(), true);
+        this.getSnapshot().setText(this.back.applyLegacyStringToSignSide(), false);
 
         super.applyTo(sign);
     }
@@ -155,35 +155,35 @@ public class CraftSign<T extends TileEntitySign> extends CraftBlockEntityState<T
             return;
         }
 
-        TileEntitySign handle = ((CraftSign<?>) sign).getTileEntity();
+        SignBlockEntity handle = ((CraftSign<?>) sign).getTileEntity();
         handle.setAllowedPlayerEditor(player.getUniqueId());
 
         ((CraftPlayer) player).getHandle().openTextEdit(handle, Side.FRONT == side);
     }
 
-    public static IChatBaseComponent[] sanitizeLines(String[] lines) {
-        IChatBaseComponent[] components = new IChatBaseComponent[4];
+    public static Component[] sanitizeLines(String[] lines) {
+        Component[] components = new Component[4];
 
         for (int i = 0; i < 4; i++) {
             if (i < lines.length && lines[i] != null) {
                 components[i] = CraftChatMessage.fromString(lines[i])[0];
             } else {
-                components[i] = IChatBaseComponent.empty();
+                components[i] = Component.empty();
             }
         }
 
         return components;
     }
 
-    public static String[] revertComponents(IChatBaseComponent[] components) {
+    public static String[] revertComponents(Component[] components) {
         String[] lines = new String[components.length];
         for (int i = 0; i < lines.length; i++) {
-            lines[i] = revertComponent(components[i]);
+            lines[i] = CraftSign.revertComponent(components[i]);
         }
         return lines;
     }
 
-    private static String revertComponent(IChatBaseComponent component) {
+    private static String revertComponent(Component component) {
         return CraftChatMessage.fromComponent(component);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java
index 650e25c17e..95045d09a3 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSkull.java
@@ -2,11 +2,11 @@ package org.bukkit.craftbukkit.block;
 
 import com.google.common.base.Preconditions;
 import com.mojang.authlib.GameProfile;
-import net.minecraft.SystemUtils;
-import net.minecraft.resources.MinecraftKey;
+import net.minecraft.Util;
+import net.minecraft.resources.ResourceLocation;
 import net.minecraft.server.MinecraftServer;
 import net.minecraft.world.item.component.ResolvableProfile;
-import net.minecraft.world.level.block.entity.TileEntitySkull;
+import net.minecraft.world.level.block.entity.SkullBlockEntity;
 import org.bukkit.Bukkit;
 import org.bukkit.Location;
 import org.bukkit.NamespacedKey;
@@ -24,12 +24,12 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey;
 import org.bukkit.profile.PlayerProfile;
 import org.jetbrains.annotations.Nullable;
 
-public class CraftSkull extends CraftBlockEntityState<TileEntitySkull> implements Skull {
+public class CraftSkull extends CraftBlockEntityState<SkullBlockEntity> implements Skull {
 
     private static final int MAX_OWNER_LENGTH = 16;
     private ResolvableProfile profile;
 
-    public CraftSkull(World world, TileEntitySkull tileEntity) {
+    public CraftSkull(World world, SkullBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
@@ -38,28 +38,28 @@ public class CraftSkull extends CraftBlockEntityState<TileEntitySkull> implement
     }
 
     @Override
-    public void load(TileEntitySkull skull) {
+    public void load(SkullBlockEntity skull) {
         super.load(skull);
 
         ResolvableProfile owner = skull.getOwnerProfile();
         if (owner != null) {
-            profile = owner;
+            this.profile = owner;
         }
     }
 
     @Override
     public boolean hasOwner() {
-        return profile != null;
+        return this.profile != null;
     }
 
     @Override
     public String getOwner() {
-        return hasOwner() ? profile.name().orElse(null) : null;
+        return this.hasOwner() ? this.profile.name().orElse(null) : null;
     }
 
     @Override
     public boolean setOwner(String name) {
-        if (name == null || name.length() > MAX_OWNER_LENGTH) {
+        if (name == null || name.length() > CraftSkull.MAX_OWNER_LENGTH) {
             return false;
         }
 
@@ -74,13 +74,13 @@ public class CraftSkull extends CraftBlockEntityState<TileEntitySkull> implement
 
     @Override
     public OfflinePlayer getOwningPlayer() {
-        if (hasOwner()) {
-            if (profile.id().filter(u -> !u.equals(SystemUtils.NIL_UUID)).isPresent()) {
-                return Bukkit.getOfflinePlayer(profile.id().get());
+        if (this.hasOwner()) {
+            if (this.profile.id().filter(u -> !u.equals(Util.NIL_UUID)).isPresent()) {
+                return Bukkit.getOfflinePlayer(this.profile.id().get());
             }
 
-            if (profile.name().filter(s -> !s.isEmpty()).isPresent()) {
-                return Bukkit.getOfflinePlayer(profile.name().get());
+            if (this.profile.name().filter(s -> !s.isEmpty()).isPresent()) {
+                return Bukkit.getOfflinePlayer(this.profile.name().get());
             }
         }
 
@@ -100,11 +100,11 @@ public class CraftSkull extends CraftBlockEntityState<TileEntitySkull> implement
 
     @Override
     public PlayerProfile getOwnerProfile() {
-        if (!hasOwner()) {
+        if (!this.hasOwner()) {
             return null;
         }
 
-        return new CraftPlayerProfile(profile);
+        return new CraftPlayerProfile(this.profile);
     }
 
     @Override
@@ -118,7 +118,7 @@ public class CraftSkull extends CraftBlockEntityState<TileEntitySkull> implement
 
     @Override
     public NamespacedKey getNoteBlockSound() {
-        MinecraftKey key = getSnapshot().getNoteBlockSound();
+        ResourceLocation key = this.getSnapshot().getNoteBlockSound();
         return (key != null) ? CraftNamespacedKey.fromMinecraft(key) : null;
     }
 
@@ -133,24 +133,24 @@ public class CraftSkull extends CraftBlockEntityState<TileEntitySkull> implement
 
     @Override
     public BlockFace getRotation() {
-        BlockData blockData = getBlockData();
+        BlockData blockData = this.getBlockData();
         return (blockData instanceof Rotatable rotatable) ? rotatable.getRotation() : ((Directional) blockData).getFacing();
     }
 
     @Override
     public void setRotation(BlockFace rotation) {
-        BlockData blockData = getBlockData();
+        BlockData blockData = this.getBlockData();
         if (blockData instanceof Rotatable) {
             ((Rotatable) blockData).setRotation(rotation);
         } else {
             ((Directional) blockData).setFacing(rotation);
         }
-        setBlockData(blockData);
+        this.setBlockData(blockData);
     }
 
     @Override
     public SkullType getSkullType() {
-        switch (getType()) {
+        switch (this.getType()) {
             case SKELETON_SKULL:
             case SKELETON_WALL_SKULL:
                 return SkullType.SKELETON;
@@ -173,7 +173,7 @@ public class CraftSkull extends CraftBlockEntityState<TileEntitySkull> implement
             case DRAGON_WALL_HEAD:
                 return SkullType.DRAGON;
             default:
-                throw new IllegalArgumentException("Unknown SkullType for " + getType());
+                throw new IllegalArgumentException("Unknown SkullType for " + this.getType());
         }
     }
 
@@ -183,11 +183,11 @@ public class CraftSkull extends CraftBlockEntityState<TileEntitySkull> implement
     }
 
     @Override
-    public void applyTo(TileEntitySkull skull) {
+    public void applyTo(SkullBlockEntity skull) {
         super.applyTo(skull);
 
-        if (getSkullType() == SkullType.PLAYER) {
-            skull.setOwner(hasOwner() ? profile : null);
+        if (this.getSkullType() == SkullType.PLAYER) {
+            skull.setOwner(this.hasOwner() ? this.profile : null);
         }
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSmoker.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSmoker.java
index aa5d93931c..756cc05c09 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSmoker.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftSmoker.java
@@ -1,13 +1,13 @@
 package org.bukkit.craftbukkit.block;
 
-import net.minecraft.world.level.block.entity.TileEntitySmoker;
+import net.minecraft.world.level.block.entity.SmokerBlockEntity;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.block.Smoker;
 
-public class CraftSmoker extends CraftFurnace<TileEntitySmoker> implements Smoker {
+public class CraftSmoker extends CraftFurnace<SmokerBlockEntity> implements Smoker {
 
-    public CraftSmoker(World world, TileEntitySmoker tileEntity) {
+    public CraftSmoker(World world, SmokerBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftStructureBlock.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftStructureBlock.java
index 3bde3b7b1a..305460177b 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftStructureBlock.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftStructureBlock.java
@@ -1,10 +1,9 @@
 package org.bukkit.craftbukkit.block;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.level.block.EnumBlockMirror;
-import net.minecraft.world.level.block.EnumBlockRotation;
-import net.minecraft.world.level.block.entity.TileEntityStructure;
-import net.minecraft.world.level.block.state.properties.BlockPropertyStructureMode;
+import net.minecraft.world.level.block.Rotation;
+import net.minecraft.world.level.block.entity.StructureBlockEntity;
+import net.minecraft.world.level.block.state.properties.StructureMode;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.block.Structure;
@@ -16,11 +15,11 @@ import org.bukkit.craftbukkit.util.CraftBlockVector;
 import org.bukkit.entity.LivingEntity;
 import org.bukkit.util.BlockVector;
 
-public class CraftStructureBlock extends CraftBlockEntityState<TileEntityStructure> implements Structure {
+public class CraftStructureBlock extends CraftBlockEntityState<StructureBlockEntity> implements Structure {
 
     private static final int MAX_SIZE = 48;
 
-    public CraftStructureBlock(World world, TileEntityStructure tileEntity) {
+    public CraftStructureBlock(World world, StructureBlockEntity tileEntity) {
         super(world, tileEntity);
     }
 
@@ -30,170 +29,170 @@ public class CraftStructureBlock extends CraftBlockEntityState<TileEntityStructu
 
     @Override
     public String getStructureName() {
-        return getSnapshot().getStructureName();
+        return this.getSnapshot().getStructureName();
     }
 
     @Override
     public void setStructureName(String name) {
         Preconditions.checkArgument(name != null, "Structure name cannot be null");
-        getSnapshot().setStructureName(name);
+        this.getSnapshot().setStructureName(name);
     }
 
     @Override
     public String getAuthor() {
-        return getSnapshot().author;
+        return this.getSnapshot().author;
     }
 
     @Override
     public void setAuthor(String author) {
         Preconditions.checkArgument(author != null, "Author name cannot be null");
         Preconditions.checkArgument(!author.isEmpty(), "Author name cannot be empty");
-        getSnapshot().author = author;
+        this.getSnapshot().author = author;
     }
 
     @Override
     public void setAuthor(LivingEntity entity) {
         Preconditions.checkArgument(entity != null, "Structure Block author entity cannot be null");
-        getSnapshot().createdBy(((CraftLivingEntity) entity).getHandle());
+        this.getSnapshot().createdBy(((CraftLivingEntity) entity).getHandle());
     }
 
     @Override
     public BlockVector getRelativePosition() {
-        return CraftBlockVector.toBukkit(getSnapshot().structurePos);
+        return CraftBlockVector.toBukkit(this.getSnapshot().structurePos);
     }
 
     @Override
     public void setRelativePosition(BlockVector vector) {
-        Preconditions.checkArgument(isBetween(vector.getBlockX(), -MAX_SIZE, MAX_SIZE), "Structure Size (X) must be between -%s and %s but got %s", MAX_SIZE, MAX_SIZE, vector.getBlockX());
-        Preconditions.checkArgument(isBetween(vector.getBlockY(), -MAX_SIZE, MAX_SIZE), "Structure Size (Y) must be between -%s and %s but got %s", MAX_SIZE, MAX_SIZE, vector.getBlockY());
-        Preconditions.checkArgument(isBetween(vector.getBlockZ(), -MAX_SIZE, MAX_SIZE), "Structure Size (Z) must be between -%s and %s but got %s", MAX_SIZE, MAX_SIZE, vector.getBlockZ());
-        getSnapshot().structurePos = CraftBlockVector.toBlockPosition(vector);
+        Preconditions.checkArgument(CraftStructureBlock.isBetween(vector.getBlockX(), -CraftStructureBlock.MAX_SIZE, CraftStructureBlock.MAX_SIZE), "Structure Size (X) must be between -%s and %s but got %s", CraftStructureBlock.MAX_SIZE, CraftStructureBlock.MAX_SIZE, vector.getBlockX());
+        Preconditions.checkArgument(CraftStructureBlock.isBetween(vector.getBlockY(), -CraftStructureBlock.MAX_SIZE, CraftStructureBlock.MAX_SIZE), "Structure Size (Y) must be between -%s and %s but got %s", CraftStructureBlock.MAX_SIZE, CraftStructureBlock.MAX_SIZE, vector.getBlockY());
+        Preconditions.checkArgument(CraftStructureBlock.isBetween(vector.getBlockZ(), -CraftStructureBlock.MAX_SIZE, CraftStructureBlock.MAX_SIZE), "Structure Size (Z) must be between -%s and %s but got %s", CraftStructureBlock.MAX_SIZE, CraftStructureBlock.MAX_SIZE, vector.getBlockZ());
+        this.getSnapshot().structurePos = CraftBlockVector.toBlockPosition(vector);
     }
 
     @Override
     public BlockVector getStructureSize() {
-        return CraftBlockVector.toBukkit(getSnapshot().structureSize);
+        return CraftBlockVector.toBukkit(this.getSnapshot().structureSize);
     }
 
     @Override
     public void setStructureSize(BlockVector vector) {
-        Preconditions.checkArgument(isBetween(vector.getBlockX(), 0, MAX_SIZE), "Structure Size (X) must be between %s and %s but got %s", 0, MAX_SIZE, vector.getBlockX());
-        Preconditions.checkArgument(isBetween(vector.getBlockY(), 0, MAX_SIZE), "Structure Size (Y) must be between %s and %s but got %s", 0, MAX_SIZE, vector.getBlockY());
-        Preconditions.checkArgument(isBetween(vector.getBlockZ(), 0, MAX_SIZE), "Structure Size (Z) must be between %s and %s but got %s", 0, MAX_SIZE, vector.getBlockZ());
-        getSnapshot().structureSize = CraftBlockVector.toBlockPosition(vector);
+        Preconditions.checkArgument(CraftStructureBlock.isBetween(vector.getBlockX(), 0, CraftStructureBlock.MAX_SIZE), "Structure Size (X) must be between %s and %s but got %s", 0, CraftStructureBlock.MAX_SIZE, vector.getBlockX());
+        Preconditions.checkArgument(CraftStructureBlock.isBetween(vector.getBlockY(), 0, CraftStructureBlock.MAX_SIZE), "Structure Size (Y) must be between %s and %s but got %s", 0, CraftStructureBlock.MAX_SIZE, vector.getBlockY());
+        Preconditions.checkArgument(CraftStructureBlock.isBetween(vector.getBlockZ(), 0, CraftStructureBlock.MAX_SIZE), "Structure Size (Z) must be between %s and %s but got %s", 0, CraftStructureBlock.MAX_SIZE, vector.getBlockZ());
+        this.getSnapshot().structureSize = CraftBlockVector.toBlockPosition(vector);
     }
 
     @Override
     public void setMirror(Mirror mirror) {
         Preconditions.checkArgument(mirror != null, "Mirror cannot be null");
-        getSnapshot().mirror = EnumBlockMirror.valueOf(mirror.name());
+        this.getSnapshot().mirror = net.minecraft.world.level.block.Mirror.valueOf(mirror.name());
     }
 
     @Override
     public Mirror getMirror() {
-        return Mirror.valueOf(getSnapshot().mirror.name());
+        return Mirror.valueOf(this.getSnapshot().mirror.name());
     }
 
     @Override
     public void setRotation(StructureRotation rotation) {
         Preconditions.checkArgument(rotation != null, "StructureRotation cannot be null");
-        getSnapshot().rotation = EnumBlockRotation.valueOf(rotation.name());
+        this.getSnapshot().rotation = Rotation.valueOf(rotation.name());
     }
 
     @Override
     public StructureRotation getRotation() {
-        return StructureRotation.valueOf(getSnapshot().rotation.name());
+        return StructureRotation.valueOf(this.getSnapshot().rotation.name());
     }
 
     @Override
     public void setUsageMode(UsageMode mode) {
         Preconditions.checkArgument(mode != null, "UsageMode cannot be null");
-        getSnapshot().mode = BlockPropertyStructureMode.valueOf(mode.name());
+        this.getSnapshot().mode = StructureMode.valueOf(mode.name());
     }
 
     @Override
     public UsageMode getUsageMode() {
-        return UsageMode.valueOf(getSnapshot().getMode().name());
+        return UsageMode.valueOf(this.getSnapshot().getMode().name());
     }
 
     @Override
     public void setIgnoreEntities(boolean flag) {
-        getSnapshot().ignoreEntities = flag;
+        this.getSnapshot().ignoreEntities = flag;
     }
 
     @Override
     public boolean isIgnoreEntities() {
-        return getSnapshot().ignoreEntities;
+        return this.getSnapshot().ignoreEntities;
     }
 
     @Override
     public void setShowAir(boolean showAir) {
-        getSnapshot().showAir = showAir;
+        this.getSnapshot().showAir = showAir;
     }
 
     @Override
     public boolean isShowAir() {
-        return getSnapshot().showAir;
+        return this.getSnapshot().showAir;
     }
 
     @Override
     public void setBoundingBoxVisible(boolean showBoundingBox) {
-        getSnapshot().showBoundingBox = showBoundingBox;
+        this.getSnapshot().showBoundingBox = showBoundingBox;
     }
 
     @Override
     public boolean isBoundingBoxVisible() {
-        return getSnapshot().showBoundingBox;
+        return this.getSnapshot().showBoundingBox;
     }
 
     @Override
     public void setIntegrity(float integrity) {
-        Preconditions.checkArgument(isBetween(integrity, 0.0f, 1.0f), "Integrity must be between 0.0f and 1.0f but got %s", integrity);
-        getSnapshot().integrity = integrity;
+        Preconditions.checkArgument(CraftStructureBlock.isBetween(integrity, 0.0f, 1.0f), "Integrity must be between 0.0f and 1.0f but got %s", integrity);
+        this.getSnapshot().integrity = integrity;
     }
 
     @Override
     public float getIntegrity() {
-        return getSnapshot().integrity;
+        return this.getSnapshot().integrity;
     }
 
     @Override
     public void setSeed(long seed) {
-        getSnapshot().seed = seed;
+        this.getSnapshot().seed = seed;
     }
 
     @Override
     public long getSeed() {
-        return getSnapshot().seed;
+        return this.getSnapshot().seed;
     }
 
     @Override
     public void setMetadata(String metadata) {
         Preconditions.checkArgument(metadata != null, "Structure metadata cannot be null");
-        if (getUsageMode() == UsageMode.DATA) {
-            getSnapshot().metaData = metadata;
+        if (this.getUsageMode() == UsageMode.DATA) {
+            this.getSnapshot().metaData = metadata;
         }
     }
 
     @Override
     public String getMetadata() {
-        return getSnapshot().metaData;
+        return this.getSnapshot().metaData;
     }
 
     @Override
-    protected void applyTo(TileEntityStructure tileEntity) {
+    protected void applyTo(StructureBlockEntity tileEntity) {
         super.applyTo(tileEntity);
-        net.minecraft.world.level.GeneratorAccess access = getWorldHandle();
+        net.minecraft.world.level.LevelAccessor access = this.getWorldHandle();
 
         // Ensure block type is correct
-        if (access instanceof net.minecraft.world.level.World) {
+        if (access instanceof net.minecraft.world.level.Level) {
             tileEntity.setMode(tileEntity.getMode());
         } else if (access != null) {
             // Custom handle during world generation
             // From TileEntityStructure#setUsageMode(BlockPropertyStructureMode)
-            net.minecraft.world.level.block.state.IBlockData data = access.getBlockState(this.getPosition());
+            net.minecraft.world.level.block.state.BlockState data = access.getBlockState(this.getPosition());
             if (data.is(net.minecraft.world.level.block.Blocks.STRUCTURE_BLOCK)) {
-                access.setBlock(this.getPosition(), data.setValue(net.minecraft.world.level.block.BlockStructure.MODE, tileEntity.getMode()), 2);
+                access.setBlock(this.getPosition(), data.setValue(net.minecraft.world.level.block.StructureBlock.MODE, tileEntity.getMode()), 2);
             }
         }
     }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftTrialSpawner.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftTrialSpawner.java
index 5ece537e10..a8f266438f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftTrialSpawner.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftTrialSpawner.java
@@ -23,8 +23,8 @@ public class CraftTrialSpawner extends CraftBlockEntityState<TrialSpawnerBlockEn
 
     public CraftTrialSpawner(World world, TrialSpawnerBlockEntity tileEntity) {
         super(world, tileEntity);
-        this.normalConfig = new CraftTrialSpawnerConfiguration(tileEntity.getTrialSpawner().getNormalConfig(), getSnapshot());
-        this.ominousConfig = new CraftTrialSpawnerConfiguration(tileEntity.getTrialSpawner().getOminousConfig(), getSnapshot());
+        this.normalConfig = new CraftTrialSpawnerConfiguration(tileEntity.getTrialSpawner().getNormalConfig(), this.getSnapshot());
+        this.ominousConfig = new CraftTrialSpawnerConfiguration(tileEntity.getTrialSpawner().getOminousConfig(), this.getSnapshot());
     }
 
     protected CraftTrialSpawner(CraftTrialSpawner state, Location location) {
@@ -35,29 +35,29 @@ public class CraftTrialSpawner extends CraftBlockEntityState<TrialSpawnerBlockEn
 
     @Override
     public int getCooldownLength() {
-        return getSnapshot().trialSpawner.getTargetCooldownLength();
+        return this.getSnapshot().trialSpawner.getTargetCooldownLength();
     }
 
     @Override
     public void setCooldownLength(int ticks) {
-        getSnapshot().trialSpawner.targetCooldownLength = ticks;
+        this.getSnapshot().trialSpawner.targetCooldownLength = ticks;
     }
 
     @Override
     public int getRequiredPlayerRange() {
-      return getSnapshot().trialSpawner.getRequiredPlayerRange();
+      return this.getSnapshot().trialSpawner.getRequiredPlayerRange();
     }
 
     @Override
     public void setRequiredPlayerRange(int requiredPlayerRange) {
-        getSnapshot().trialSpawner.requiredPlayerRange = requiredPlayerRange;
+        this.getSnapshot().trialSpawner.requiredPlayerRange = requiredPlayerRange;
     }
 
     @Override
     public Collection<Player> getTrackedPlayers() {
         ImmutableSet.Builder<Player> players = ImmutableSet.builder();
 
-        for (UUID uuid : getTrialData().detectedPlayers) {
+        for (UUID uuid : this.getTrialData().detectedPlayers) {
             Player player = Bukkit.getPlayer(uuid);
             if (player != null) {
                 players.add(player);
@@ -70,28 +70,28 @@ public class CraftTrialSpawner extends CraftBlockEntityState<TrialSpawnerBlockEn
     public boolean isTrackingPlayer(Player player) {
         Preconditions.checkArgument(player != null, "Player cannot be null");
 
-        return getTrialData().detectedPlayers.contains(player.getUniqueId());
+        return this.getTrialData().detectedPlayers.contains(player.getUniqueId());
     }
 
     @Override
     public void startTrackingPlayer(Player player) {
         Preconditions.checkArgument(player != null, "Player cannot be null");
 
-        getTrialData().detectedPlayers.add(player.getUniqueId());
+        this.getTrialData().detectedPlayers.add(player.getUniqueId());
     }
 
     @Override
     public void stopTrackingPlayer(Player player) {
         Preconditions.checkArgument(player != null, "Player cannot be null");
 
-        getTrialData().detectedPlayers.remove(player.getUniqueId());
+        this.getTrialData().detectedPlayers.remove(player.getUniqueId());
     }
 
     @Override
     public Collection<Entity> getTrackedEntities() {
         ImmutableSet.Builder<Entity> entities = ImmutableSet.builder();
 
-        for (UUID uuid : getTrialData().currentMobs) {
+        for (UUID uuid : this.getTrialData().currentMobs) {
             Entity entity = Bukkit.getEntity(uuid);
             if (entity != null) {
                 entities.add(entity);
@@ -104,60 +104,60 @@ public class CraftTrialSpawner extends CraftBlockEntityState<TrialSpawnerBlockEn
     public boolean isTrackingEntity(Entity entity) {
         Preconditions.checkArgument(entity != null, "Entity cannot be null");
 
-        return getTrialData().currentMobs.contains(entity.getUniqueId());
+        return this.getTrialData().currentMobs.contains(entity.getUniqueId());
     }
 
     @Override
     public void startTrackingEntity(Entity entity) {
         Preconditions.checkArgument(entity != null, "Entity cannot be null");
 
-        getTrialData().currentMobs.add(entity.getUniqueId());
+        this.getTrialData().currentMobs.add(entity.getUniqueId());
     }
 
     @Override
     public void stopTrackingEntity(Entity entity) {
         Preconditions.checkArgument(entity != null, "Entity cannot be null");
 
-        getTrialData().currentMobs.remove(entity.getUniqueId());
+        this.getTrialData().currentMobs.remove(entity.getUniqueId());
     }
 
     @Override
     public boolean isOminous() {
-        return getHandle().getValue(TrialSpawnerBlock.OMINOUS);
+        return this.getHandle().getValue(TrialSpawnerBlock.OMINOUS);
     }
 
     @Override
     public void setOminous(boolean ominous) {
-        getSnapshot().trialSpawner.isOminous = ominous;
+        this.getSnapshot().trialSpawner.isOminous = ominous;
         if (ominous) {
-            setData(getHandle().setValue(TrialSpawnerBlock.OMINOUS, true));
+            this.setData(this.getHandle().setValue(TrialSpawnerBlock.OMINOUS, true));
             // TODO: Consider calling TrialSpawnerData#resetAfterBecomingOminous in update(...), but note that method also removes entities
             return;
         }
 
-        setData(getHandle().setValue(TrialSpawnerBlock.OMINOUS, false));
+        this.setData(this.getHandle().setValue(TrialSpawnerBlock.OMINOUS, false));
     }
 
     @Override
     public TrialSpawnerConfiguration getNormalConfiguration() {
-       return normalConfig;
+       return this.normalConfig;
     }
 
     @Override
     public TrialSpawnerConfiguration getOminousConfiguration() {
-       return ominousConfig;
+       return this.ominousConfig;
     }
 
     @Override
     protected void applyTo(TrialSpawnerBlockEntity tileEntity) {
         super.applyTo(tileEntity);
 
-        tileEntity.trialSpawner.normalConfig = Holder.direct(normalConfig.toMinecraft());
-        tileEntity.trialSpawner.ominousConfig = Holder.direct(ominousConfig.toMinecraft());
+        tileEntity.trialSpawner.normalConfig = Holder.direct(this.normalConfig.toMinecraft());
+        tileEntity.trialSpawner.ominousConfig = Holder.direct(this.ominousConfig.toMinecraft());
     }
 
     private TrialSpawnerData getTrialData() {
-        return getSnapshot().getTrialSpawner().getData();
+        return this.getSnapshot().getTrialSpawner().getData();
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftTrialSpawnerConfiguration.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftTrialSpawnerConfiguration.java
index 0062664cf7..1e7a27bc78 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftTrialSpawnerConfiguration.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/CraftTrialSpawnerConfiguration.java
@@ -8,12 +8,11 @@ import java.util.List;
 import java.util.Map;
 import java.util.Optional;
 import net.minecraft.core.registries.BuiltInRegistries;
-import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.CompoundTag;
 import net.minecraft.resources.ResourceKey;
 import net.minecraft.util.random.SimpleWeightedRandomList;
-import net.minecraft.util.random.WeightedEntry.b;
-import net.minecraft.world.entity.EntityTypes;
-import net.minecraft.world.level.MobSpawnerData;
+import net.minecraft.util.random.WeightedEntry.Wrapper;
+import net.minecraft.world.level.SpawnData;
 import net.minecraft.world.level.block.entity.TrialSpawnerBlockEntity;
 import net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerConfig;
 import net.minecraft.world.level.block.entity.trialspawner.TrialSpawnerData;
@@ -36,7 +35,7 @@ public class CraftTrialSpawnerConfiguration implements TrialSpawnerConfiguration
     private float totalMobsAddedPerPlayer;
     private float simultaneousMobsAddedPerPlayer;
     private int ticksBetweenSpawn;
-    private SimpleWeightedRandomList<MobSpawnerData> spawnPotentialsDefinition;
+    private SimpleWeightedRandomList<SpawnData> spawnPotentialsDefinition;
     private SimpleWeightedRandomList<ResourceKey<net.minecraft.world.level.storage.loot.LootTable>> lootTablesToEject;
     private ResourceKey<net.minecraft.world.level.storage.loot.LootTable> itemsToDropWhenOminous;
 
@@ -56,84 +55,84 @@ public class CraftTrialSpawnerConfiguration implements TrialSpawnerConfiguration
 
     @Override
     public EntityType getSpawnedType() {
-       if (spawnPotentialsDefinition.isEmpty()) {
+       if (this.spawnPotentialsDefinition.isEmpty()) {
            return null;
        }
 
-       Optional<EntityTypes<?>> type = EntityTypes.by(spawnPotentialsDefinition.unwrap().get(0).data().getEntityToSpawn());
+       Optional<net.minecraft.world.entity.EntityType<?>> type = net.minecraft.world.entity.EntityType.by(this.spawnPotentialsDefinition.unwrap().get(0).data().getEntityToSpawn());
        return type.map(CraftEntityType::minecraftToBukkit).orElse(null);
     }
 
     @Override
     public void setSpawnedType(EntityType entityType) {
         if (entityType == null) {
-            getTrialData().nextSpawnData = Optional.empty();
-            spawnPotentialsDefinition = SimpleWeightedRandomList.empty(); // need clear the spawnPotentials to avoid nextSpawnData being replaced later
+            this.getTrialData().nextSpawnData = Optional.empty();
+            this.spawnPotentialsDefinition = SimpleWeightedRandomList.empty(); // need clear the spawnPotentials to avoid nextSpawnData being replaced later
             return;
         }
         Preconditions.checkArgument(entityType != EntityType.UNKNOWN, "Can't spawn EntityType %s from mob spawners!", entityType);
 
-        MobSpawnerData data = new MobSpawnerData();
+        SpawnData data = new SpawnData();
         data.getEntityToSpawn().putString("id", BuiltInRegistries.ENTITY_TYPE.getKey(CraftEntityType.bukkitToMinecraft(entityType)).toString());
-        getTrialData().nextSpawnData = Optional.of(data);
-        spawnPotentialsDefinition = SimpleWeightedRandomList.single(data);
+        this.getTrialData().nextSpawnData = Optional.of(data);
+        this.spawnPotentialsDefinition = SimpleWeightedRandomList.single(data);
     }
 
     @Override
     public float getBaseSpawnsBeforeCooldown() {
-        return totalMobs;
+        return this.totalMobs;
     }
 
     @Override
     public void setBaseSpawnsBeforeCooldown(float amount) {
-        totalMobs = amount;
+        this.totalMobs = amount;
     }
 
     @Override
     public float getBaseSimultaneousEntities() {
-        return simultaneousMobs;
+        return this.simultaneousMobs;
     }
 
     @Override
     public void setBaseSimultaneousEntities(float amount) {
-        simultaneousMobs = amount;
+        this.simultaneousMobs = amount;
     }
 
     @Override
     public float getAdditionalSpawnsBeforeCooldown() {
-        return totalMobsAddedPerPlayer;
+        return this.totalMobsAddedPerPlayer;
     }
 
     @Override
     public void setAdditionalSpawnsBeforeCooldown(float amount) {
-        totalMobsAddedPerPlayer = amount;
+        this.totalMobsAddedPerPlayer = amount;
     }
 
     @Override
     public float getAdditionalSimultaneousEntities() {
-        return simultaneousMobsAddedPerPlayer;
+        return this.simultaneousMobsAddedPerPlayer;
     }
 
     @Override
     public void setAdditionalSimultaneousEntities(float amount) {
-        simultaneousMobsAddedPerPlayer = amount;
+        this.simultaneousMobsAddedPerPlayer = amount;
     }
 
     @Override
     public int getDelay() {
-      return ticksBetweenSpawn;
+      return this.ticksBetweenSpawn;
     }
 
     @Override
     public void setDelay(int delay) {
         Preconditions.checkArgument(delay >= 0, "Delay cannot be less than 0");
 
-        ticksBetweenSpawn = delay;
+        this.ticksBetweenSpawn = delay;
     }
 
     @Override
     public int getSpawnRange() {
-        return spawnRange;
+        return this.spawnRange;
     }
 
     @Override
@@ -143,7 +142,7 @@ public class CraftTrialSpawnerConfiguration implements TrialSpawnerConfiguration
 
     @Override
     public EntitySnapshot getSpawnedEntity() {
-        SimpleWeightedRandomList<MobSpawnerData> potentials = spawnPotentialsDefinition;
+        SimpleWeightedRandomList<SpawnData> potentials = this.spawnPotentialsDefinition;
         if (potentials.isEmpty()) {
             return null;
         }
@@ -153,70 +152,70 @@ public class CraftTrialSpawnerConfiguration implements TrialSpawnerConfiguration
 
     @Override
     public void setSpawnedEntity(EntitySnapshot snapshot) {
-        setSpawnedEntity(snapshot, null, null);
+        this.setSpawnedEntity(snapshot, null, null);
     }
 
     @Override
     public void setSpawnedEntity(SpawnerEntry spawnerEntry) {
         Preconditions.checkArgument(spawnerEntry != null, "Entry cannot be null");
 
-        setSpawnedEntity(spawnerEntry.getSnapshot(), spawnerEntry.getSpawnRule(), spawnerEntry.getEquipment());
+        this.setSpawnedEntity(spawnerEntry.getSnapshot(), spawnerEntry.getSpawnRule(), spawnerEntry.getEquipment());
     }
 
     private void setSpawnedEntity(EntitySnapshot snapshot, SpawnRule spawnRule, SpawnerEntry.Equipment equipment) {
         if (snapshot == null) {
-            getTrialData().nextSpawnData = Optional.empty();
-            spawnPotentialsDefinition = SimpleWeightedRandomList.empty(); // need clear the spawnPotentials to avoid nextSpawnData being replaced later
+            this.getTrialData().nextSpawnData = Optional.empty();
+            this.spawnPotentialsDefinition = SimpleWeightedRandomList.empty(); // need clear the spawnPotentials to avoid nextSpawnData being replaced later
             return;
         }
 
-        NBTTagCompound compoundTag = ((CraftEntitySnapshot) snapshot).getData();
-        MobSpawnerData data = new MobSpawnerData(compoundTag, Optional.ofNullable(CraftCreatureSpawner.toMinecraftRule(spawnRule)), CraftCreatureSpawner.getEquipment(equipment));
+        CompoundTag compoundTag = ((CraftEntitySnapshot) snapshot).getData();
+        SpawnData data = new SpawnData(compoundTag, Optional.ofNullable(CraftCreatureSpawner.toMinecraftRule(spawnRule)), CraftCreatureSpawner.getEquipment(equipment));
 
-        getTrialData().nextSpawnData = Optional.of(data);
-        spawnPotentialsDefinition = SimpleWeightedRandomList.single(data);
+        this.getTrialData().nextSpawnData = Optional.of(data);
+        this.spawnPotentialsDefinition = SimpleWeightedRandomList.single(data);
     }
 
     @Override
     public void addPotentialSpawn(EntitySnapshot snapshot, int weight, SpawnRule spawnRule) {
-        addPotentialSpawn(snapshot, weight, spawnRule, null);
+        this.addPotentialSpawn(snapshot, weight, spawnRule, null);
     }
 
     private void addPotentialSpawn(EntitySnapshot snapshot, int weight, SpawnRule spawnRule, SpawnerEntry.Equipment equipment) {
         Preconditions.checkArgument(snapshot != null, "Snapshot cannot be null");
 
-        NBTTagCompound compoundTag = ((CraftEntitySnapshot) snapshot).getData();
+        CompoundTag compoundTag = ((CraftEntitySnapshot) snapshot).getData();
 
-        SimpleWeightedRandomList.a<MobSpawnerData> builder = SimpleWeightedRandomList.builder(); // PAIL rename Builder
-        spawnPotentialsDefinition.unwrap().forEach(entry -> builder.add(entry.data(), entry.getWeight().asInt()));
-        builder.add(new MobSpawnerData(compoundTag, Optional.ofNullable(CraftCreatureSpawner.toMinecraftRule(spawnRule)), CraftCreatureSpawner.getEquipment(equipment)), weight);
-        spawnPotentialsDefinition = builder.build();
+        SimpleWeightedRandomList.Builder<SpawnData> builder = SimpleWeightedRandomList.builder(); // PAIL rename Builder
+        this.spawnPotentialsDefinition.unwrap().forEach(entry -> builder.add(entry.data(), entry.getWeight().asInt()));
+        builder.add(new SpawnData(compoundTag, Optional.ofNullable(CraftCreatureSpawner.toMinecraftRule(spawnRule)), CraftCreatureSpawner.getEquipment(equipment)), weight);
+        this.spawnPotentialsDefinition = builder.build();
     }
 
     @Override
     public void addPotentialSpawn(SpawnerEntry spawnerEntry) {
         Preconditions.checkArgument(spawnerEntry != null, "Entry cannot be null");
 
-        addPotentialSpawn(spawnerEntry.getSnapshot(), spawnerEntry.getSpawnWeight(), spawnerEntry.getSpawnRule(), spawnerEntry.getEquipment());
+        this.addPotentialSpawn(spawnerEntry.getSnapshot(), spawnerEntry.getSpawnWeight(), spawnerEntry.getSpawnRule(), spawnerEntry.getEquipment());
     }
 
     @Override
     public void setPotentialSpawns(Collection<SpawnerEntry> entries) {
         Preconditions.checkArgument(entries != null, "Entries cannot be null");
 
-        SimpleWeightedRandomList.a<MobSpawnerData> builder = SimpleWeightedRandomList.builder();
+        SimpleWeightedRandomList.Builder<SpawnData> builder = SimpleWeightedRandomList.builder();
         for (SpawnerEntry spawnerEntry : entries) {
-            NBTTagCompound compoundTag = ((CraftEntitySnapshot) spawnerEntry.getSnapshot()).getData();
-            builder.add(new MobSpawnerData(compoundTag, Optional.ofNullable(CraftCreatureSpawner.toMinecraftRule(spawnerEntry.getSpawnRule())), CraftCreatureSpawner.getEquipment(spawnerEntry.getEquipment())), spawnerEntry.getSpawnWeight());
+            CompoundTag compoundTag = ((CraftEntitySnapshot) spawnerEntry.getSnapshot()).getData();
+            builder.add(new SpawnData(compoundTag, Optional.ofNullable(CraftCreatureSpawner.toMinecraftRule(spawnerEntry.getSpawnRule())), CraftCreatureSpawner.getEquipment(spawnerEntry.getEquipment())), spawnerEntry.getSpawnWeight());
         }
-        spawnPotentialsDefinition = builder.build();
+        this.spawnPotentialsDefinition = builder.build();
     }
 
     @Override
     public List<SpawnerEntry> getPotentialSpawns() {
         List<SpawnerEntry> entries = new ArrayList<>();
 
-        for (b<MobSpawnerData> entry : spawnPotentialsDefinition.unwrap()) { // PAIL rename Wrapper
+        for (Wrapper<SpawnData> entry : this.spawnPotentialsDefinition.unwrap()) { // PAIL rename Wrapper
             CraftEntitySnapshot snapshot = CraftEntitySnapshot.create(entry.data().getEntityToSpawn());
 
             if (snapshot != null) {
@@ -231,7 +230,7 @@ public class CraftTrialSpawnerConfiguration implements TrialSpawnerConfiguration
     public Map<LootTable, Integer> getPossibleRewards() {
         Map<LootTable, Integer> tables = new HashMap<>();
 
-        for (b<ResourceKey<net.minecraft.world.level.storage.loot.LootTable>> entry : lootTablesToEject.unwrap()) {
+        for (Wrapper<ResourceKey<net.minecraft.world.level.storage.loot.LootTable>> entry : this.lootTablesToEject.unwrap()) {
             LootTable table = CraftLootTable.minecraftToBukkit(entry.data());
             if (table != null) {
                 tables.put(table, entry.getWeight().asInt());
@@ -246,10 +245,10 @@ public class CraftTrialSpawnerConfiguration implements TrialSpawnerConfiguration
         Preconditions.checkArgument(table != null, "Table cannot be null");
         Preconditions.checkArgument(weight >= 1, "Weight must be at least 1");
 
-        SimpleWeightedRandomList.a<ResourceKey<net.minecraft.world.level.storage.loot.LootTable>> builder = SimpleWeightedRandomList.builder();
-        lootTablesToEject.unwrap().forEach(entry -> builder.add(entry.data(), entry.getWeight().asInt()));
+        SimpleWeightedRandomList.Builder<ResourceKey<net.minecraft.world.level.storage.loot.LootTable>> builder = SimpleWeightedRandomList.builder();
+        this.lootTablesToEject.unwrap().forEach(entry -> builder.add(entry.data(), entry.getWeight().asInt()));
         builder.add(CraftLootTable.bukkitToMinecraft(table), weight);
-        lootTablesToEject = builder.build();
+        this.lootTablesToEject = builder.build();
     }
 
     @Override
@@ -257,24 +256,24 @@ public class CraftTrialSpawnerConfiguration implements TrialSpawnerConfiguration
         Preconditions.checkArgument(table != null, "Key cannot be null");
 
         ResourceKey<net.minecraft.world.level.storage.loot.LootTable> minecraftKey = CraftLootTable.bukkitToMinecraft(table);
-        SimpleWeightedRandomList.a<ResourceKey<net.minecraft.world.level.storage.loot.LootTable>> builder = SimpleWeightedRandomList.builder();
+        SimpleWeightedRandomList.Builder<ResourceKey<net.minecraft.world.level.storage.loot.LootTable>> builder = SimpleWeightedRandomList.builder();
 
-        for (b<ResourceKey<net.minecraft.world.level.storage.loot.LootTable>> entry : lootTablesToEject.unwrap()) {
+        for (Wrapper<ResourceKey<net.minecraft.world.level.storage.loot.LootTable>> entry : this.lootTablesToEject.unwrap()) {
             if (!entry.data().equals(minecraftKey)) {
                 builder.add(entry.data(), entry.getWeight().asInt());
             }
         }
-        lootTablesToEject = builder.build();
+        this.lootTablesToEject = builder.build();
     }
 
     @Override
     public void setPossibleRewards(Map<LootTable, Integer> rewards) {
         if (rewards == null || rewards.isEmpty()) {
-            lootTablesToEject = SimpleWeightedRandomList.empty();
+            this.lootTablesToEject = SimpleWeightedRandomList.empty();
             return;
         }
 
-        SimpleWeightedRandomList.a<ResourceKey<net.minecraft.world.level.storage.loot.LootTable>> builder = SimpleWeightedRandomList.builder();
+        SimpleWeightedRandomList.Builder<ResourceKey<net.minecraft.world.level.storage.loot.LootTable>> builder = SimpleWeightedRandomList.builder();
         rewards.forEach((table, weight) -> {
             Preconditions.checkArgument(table != null, "Table cannot be null");
             Preconditions.checkArgument(weight >= 1, "Weight must be at least 1");
@@ -282,24 +281,24 @@ public class CraftTrialSpawnerConfiguration implements TrialSpawnerConfiguration
             builder.add(CraftLootTable.bukkitToMinecraft(table), weight);
         });
 
-        lootTablesToEject = builder.build();
+        this.lootTablesToEject = builder.build();
     }
 
     @Override
     public int getRequiredPlayerRange() {
-      return snapshot.trialSpawner.getRequiredPlayerRange();
+      return this.snapshot.trialSpawner.getRequiredPlayerRange();
     }
 
     @Override
     public void setRequiredPlayerRange(int requiredPlayerRange) {
-        snapshot.trialSpawner.requiredPlayerRange = requiredPlayerRange;
+        this.snapshot.trialSpawner.requiredPlayerRange = requiredPlayerRange;
     }
 
     private TrialSpawnerData getTrialData() {
-        return snapshot.getTrialSpawner().getData();
+        return this.snapshot.getTrialSpawner().getData();
     }
 
     protected TrialSpawnerConfig toMinecraft() {
-        return new TrialSpawnerConfig(spawnRange, totalMobs, simultaneousMobs, totalMobsAddedPerPlayer, simultaneousMobsAddedPerPlayer, ticksBetweenSpawn, spawnPotentialsDefinition, lootTablesToEject, itemsToDropWhenOminous);
+        return new TrialSpawnerConfig(this.spawnRange, this.totalMobs, this.simultaneousMobs, this.totalMobsAddedPerPlayer, this.simultaneousMobsAddedPerPlayer, this.ticksBetweenSpawn, this.spawnPotentialsDefinition, this.lootTablesToEject, this.itemsToDropWhenOminous);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/banner/CraftPatternType.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/banner/CraftPatternType.java
index 8a53473551..456a7b45c2 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/banner/CraftPatternType.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/banner/CraftPatternType.java
@@ -3,37 +3,36 @@ package org.bukkit.craftbukkit.block.banner;
 import com.google.common.base.Preconditions;
 import java.util.Locale;
 import net.minecraft.core.Holder;
-import net.minecraft.core.IRegistry;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.world.level.block.entity.EnumBannerPatternType;
+import net.minecraft.world.level.block.entity.BannerPattern;
 import org.bukkit.NamespacedKey;
 import org.bukkit.Registry;
 import org.bukkit.block.banner.PatternType;
 import org.bukkit.craftbukkit.CraftRegistry;
 import org.bukkit.craftbukkit.util.Handleable;
 
-public class CraftPatternType implements PatternType, Handleable<EnumBannerPatternType> {
+public class CraftPatternType implements PatternType, Handleable<BannerPattern> {
 
     private static int count = 0;
 
-    public static PatternType minecraftToBukkit(EnumBannerPatternType minecraft) {
+    public static PatternType minecraftToBukkit(BannerPattern minecraft) {
         return CraftRegistry.minecraftToBukkit(minecraft, Registries.BANNER_PATTERN, Registry.BANNER_PATTERN);
     }
 
-    public static PatternType minecraftHolderToBukkit(Holder<EnumBannerPatternType> minecraft) {
-        return minecraftToBukkit(minecraft.value());
+    public static PatternType minecraftHolderToBukkit(Holder<BannerPattern> minecraft) {
+        return CraftPatternType.minecraftToBukkit(minecraft.value());
     }
 
-    public static EnumBannerPatternType bukkitToMinecraft(PatternType bukkit) {
+    public static BannerPattern bukkitToMinecraft(PatternType bukkit) {
         return CraftRegistry.bukkitToMinecraft(bukkit);
     }
 
-    public static Holder<EnumBannerPatternType> bukkitToMinecraftHolder(PatternType bukkit) {
+    public static Holder<BannerPattern> bukkitToMinecraftHolder(PatternType bukkit) {
         Preconditions.checkArgument(bukkit != null);
 
-        IRegistry<EnumBannerPatternType> registry = CraftRegistry.getMinecraftRegistry(Registries.BANNER_PATTERN);
+        net.minecraft.core.Registry<BannerPattern> registry = CraftRegistry.getMinecraftRegistry(Registries.BANNER_PATTERN);
 
-        if (registry.wrapAsHolder(bukkitToMinecraft(bukkit)) instanceof Holder.c<EnumBannerPatternType> holder) {
+        if (registry.wrapAsHolder(CraftPatternType.bukkitToMinecraft(bukkit)) instanceof Holder.Reference<BannerPattern> holder) {
             return holder;
         }
 
@@ -42,11 +41,11 @@ public class CraftPatternType implements PatternType, Handleable<EnumBannerPatte
     }
 
     private final NamespacedKey key;
-    private final EnumBannerPatternType bannerPatternType;
+    private final BannerPattern bannerPatternType;
     private final String name;
     private final int ordinal;
 
-    public CraftPatternType(NamespacedKey key, EnumBannerPatternType bannerPatternType) {
+    public CraftPatternType(NamespacedKey key, BannerPattern bannerPatternType) {
         this.key = key;
         this.bannerPatternType = bannerPatternType;
         // For backwards compatibility, minecraft values will stile return the uppercase name without the namespace,
@@ -58,38 +57,38 @@ public class CraftPatternType implements PatternType, Handleable<EnumBannerPatte
         } else {
             this.name = key.toString();
         }
-        this.ordinal = count++;
+        this.ordinal = CraftPatternType.count++;
     }
 
     @Override
-    public EnumBannerPatternType getHandle() {
-        return bannerPatternType;
+    public BannerPattern getHandle() {
+        return this.bannerPatternType;
     }
 
     @Override
     public NamespacedKey getKey() {
-        return key;
+        return this.key;
     }
 
     @Override
     public int compareTo(PatternType patternType) {
-        return ordinal - patternType.ordinal();
+        return this.ordinal - patternType.ordinal();
     }
 
     @Override
     public String name() {
-        return name;
+        return this.name;
     }
 
     @Override
     public int ordinal() {
-        return ordinal;
+        return this.ordinal;
     }
 
     @Override
     public String toString() {
         // For backwards compatibility
-        return name();
+        return this.name();
     }
 
     @Override
@@ -102,12 +101,12 @@ public class CraftPatternType implements PatternType, Handleable<EnumBannerPatte
             return false;
         }
 
-        return getKey().equals(((PatternType) other).getKey());
+        return this.getKey().equals(((PatternType) other).getKey());
     }
 
     @Override
     public int hashCode() {
-        return getKey().hashCode();
+        return this.getKey().hashCode();
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftAgeable.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftAgeable.java
index 124a796260..09616eb1b2 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftAgeable.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftAgeable.java
@@ -4,20 +4,20 @@ import org.bukkit.block.data.Ageable;
 
 public abstract class CraftAgeable extends CraftBlockData implements Ageable {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger("age");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty AGE = getInteger("age");
 
     @Override
     public int getAge() {
-        return get(AGE);
+        return this.get(CraftAgeable.AGE);
     }
 
     @Override
     public void setAge(int age) {
-        set(AGE, age);
+        this.set(CraftAgeable.AGE, age);
     }
 
     @Override
     public int getMaximumAge() {
-        return getMax(AGE);
+        return getMax(CraftAgeable.AGE);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftAnaloguePowerable.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftAnaloguePowerable.java
index a295c40422..2b9b115a7b 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftAnaloguePowerable.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftAnaloguePowerable.java
@@ -4,20 +4,20 @@ import org.bukkit.block.data.AnaloguePowerable;
 
 public abstract class CraftAnaloguePowerable extends CraftBlockData implements AnaloguePowerable {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger POWER = getInteger("power");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty POWER = getInteger("power");
 
     @Override
     public int getPower() {
-        return get(POWER);
+        return this.get(CraftAnaloguePowerable.POWER);
     }
 
     @Override
     public void setPower(int power) {
-        set(POWER, power);
+        this.set(CraftAnaloguePowerable.POWER, power);
     }
 
     @Override
     public int getMaximumPower() {
-        return getMax(POWER);
+        return getMax(CraftAnaloguePowerable.POWER);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftAttachable.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftAttachable.java
index dd2099a50f..005ff155e1 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftAttachable.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftAttachable.java
@@ -4,15 +4,15 @@ import org.bukkit.block.data.Attachable;
 
 public abstract class CraftAttachable extends CraftBlockData implements Attachable {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean ATTACHED = getBoolean("attached");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty ATTACHED = getBoolean("attached");
 
     @Override
     public boolean isAttached() {
-        return get(ATTACHED);
+        return this.get(CraftAttachable.ATTACHED);
     }
 
     @Override
     public void setAttached(boolean attached) {
-        set(ATTACHED, attached);
+        this.set(CraftAttachable.ATTACHED, attached);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftBisected.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftBisected.java
index 79837ff2fb..c8dd400c7b 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftBisected.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftBisected.java
@@ -4,15 +4,15 @@ import org.bukkit.block.data.Bisected;
 
 public class CraftBisected extends CraftBlockData implements Bisected {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> HALF = getEnum("half");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> HALF = getEnum("half");
 
     @Override
     public org.bukkit.block.data.Bisected.Half getHalf() {
-        return get(HALF, org.bukkit.block.data.Bisected.Half.class);
+        return this.get(CraftBisected.HALF, org.bukkit.block.data.Bisected.Half.class);
     }
 
     @Override
     public void setHalf(org.bukkit.block.data.Bisected.Half half) {
-        set(HALF, half);
+        this.set(CraftBisected.HALF, half);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
index 1177b36af2..fc27930e4c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftBlockData.java
@@ -9,22 +9,20 @@ import java.util.HashMap;
 import java.util.Map;
 import java.util.Set;
 import java.util.stream.Collectors;
-import net.minecraft.commands.arguments.blocks.ArgumentBlock;
-import net.minecraft.core.BlockPosition;
-import net.minecraft.core.EnumDirection;
+import net.minecraft.commands.arguments.blocks.BlockStateParser;
+import net.minecraft.core.BlockPos;
+import net.minecraft.core.Direction;
 import net.minecraft.core.registries.BuiltInRegistries;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.util.INamable;
-import net.minecraft.world.level.BlockAccessAir;
+import net.minecraft.util.StringRepresentable;
+import net.minecraft.world.level.EmptyBlockGetter;
 import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.block.EnumBlockMirror;
-import net.minecraft.world.level.block.EnumBlockRotation;
-import net.minecraft.world.level.block.state.IBlockData;
-import net.minecraft.world.level.block.state.IBlockDataHolder;
-import net.minecraft.world.level.block.state.properties.BlockStateBoolean;
-import net.minecraft.world.level.block.state.properties.BlockStateEnum;
-import net.minecraft.world.level.block.state.properties.BlockStateInteger;
-import net.minecraft.world.level.block.state.properties.IBlockState;
+import net.minecraft.world.level.block.Rotation;
+import net.minecraft.world.level.block.state.StateHolder;
+import net.minecraft.world.level.block.state.properties.BooleanProperty;
+import net.minecraft.world.level.block.state.properties.EnumProperty;
+import net.minecraft.world.level.block.state.properties.IntegerProperty;
+import net.minecraft.world.level.block.state.properties.Property;
 import org.bukkit.Color;
 import org.bukkit.Location;
 import org.bukkit.Material;
@@ -52,24 +50,24 @@ import org.jetbrains.annotations.NotNull;
 
 public class CraftBlockData implements BlockData {
 
-    private IBlockData state;
-    private Map<IBlockState<?>, Comparable<?>> parsedStates;
+    private net.minecraft.world.level.block.state.BlockState state;
+    private Map<Property<?>, Comparable<?>> parsedStates;
 
     protected CraftBlockData() {
         throw new AssertionError("Template Constructor");
     }
 
-    protected CraftBlockData(IBlockData state) {
+    protected CraftBlockData(net.minecraft.world.level.block.state.BlockState state) {
         this.state = state;
     }
 
     @Override
     public Material getMaterial() {
-        return CraftBlockType.minecraftToBukkit(state.getBlock());
+        return CraftBlockType.minecraftToBukkit(this.state.getBlock());
     }
 
-    public IBlockData getState() {
-        return state;
+    public net.minecraft.world.level.block.state.BlockState getState() {
+        return this.state;
     }
 
     /**
@@ -80,8 +78,8 @@ public class CraftBlockData implements BlockData {
      * @param <B> the type
      * @return the matching Bukkit type
      */
-    protected <B extends Enum<B>> B get(BlockStateEnum<?> nms, Class<B> bukkit) {
-        return toBukkit(state.getValue(nms), bukkit);
+    protected <B extends Enum<B>> B get(EnumProperty<?> nms, Class<B> bukkit) {
+        return CraftBlockData.toBukkit(this.state.getValue(nms), bukkit);
     }
 
     /**
@@ -94,27 +92,27 @@ public class CraftBlockData implements BlockData {
      * @return an immutable Set of values in their appropriate Bukkit type
      */
     @SuppressWarnings("unchecked")
-    protected <B extends Enum<B>> Set<B> getValues(BlockStateEnum<?> nms, Class<B> bukkit) {
+    protected <B extends Enum<B>> Set<B> getValues(EnumProperty<?> nms, Class<B> bukkit) {
         ImmutableSet.Builder<B> values = ImmutableSet.builder();
 
         for (Enum<?> e : nms.getPossibleValues()) {
-            values.add(toBukkit(e, bukkit));
+            values.add(CraftBlockData.toBukkit(e, bukkit));
         }
 
         return values.build();
     }
 
     /**
-     * Set a given {@link BlockStateEnum} with the matching enum from Bukkit.
+     * Set a given {@link EnumProperty} with the matching enum from Bukkit.
      *
      * @param nms the NMS BlockStateEnum to set
      * @param bukkit the matching Bukkit Enum
      * @param <B> the Bukkit type
      * @param <N> the NMS type
      */
-    protected <B extends Enum<B>, N extends Enum<N> & INamable> void set(BlockStateEnum<N> nms, Enum<B> bukkit) {
+    protected <B extends Enum<B>, N extends Enum<N> & StringRepresentable> void set(EnumProperty<N> nms, Enum<B> bukkit) {
         this.parsedStates = null;
-        this.state = this.state.setValue(nms, toNMS(bukkit, nms.getValueClass()));
+        this.state = this.state.setValue(nms, CraftBlockData.toNMS(bukkit, nms.getValueClass()));
     }
 
     @Override
@@ -126,7 +124,7 @@ public class CraftBlockData implements BlockData {
         CraftBlockData clone = (CraftBlockData) this.clone();
         clone.parsedStates = null;
 
-        for (IBlockState parsed : craft.parsedStates.keySet()) {
+        for (Property parsed : craft.parsedStates.keySet()) {
             clone.state = clone.state.setValue(parsed, craft.state.getValue(parsed));
         }
 
@@ -168,10 +166,10 @@ public class CraftBlockData implements BlockData {
      */
     @SuppressWarnings("unchecked")
     private static <B extends Enum<B>> B toBukkit(Enum<?> nms, Class<B> bukkit) {
-        if (nms instanceof EnumDirection) {
-            return (B) CraftBlock.notchToBlockFace((EnumDirection) nms);
+        if (nms instanceof Direction) {
+            return (B) CraftBlock.notchToBlockFace((Direction) nms);
         }
-        return (B) ENUM_VALUES.computeIfAbsent(bukkit, Class::getEnumConstants)[nms.ordinal()];
+        return (B) CraftBlockData.ENUM_VALUES.computeIfAbsent(bukkit, Class::getEnumConstants)[nms.ordinal()];
     }
 
     /**
@@ -183,11 +181,11 @@ public class CraftBlockData implements BlockData {
      * @throws IllegalStateException if the Enum could not be converted
      */
     @SuppressWarnings("unchecked")
-    private static <N extends Enum<N> & INamable> N toNMS(Enum<?> bukkit, Class<N> nms) {
+    public static <N extends Enum<N> & StringRepresentable> N toNMS(Enum<?> bukkit, Class<N> nms) {
         if (bukkit instanceof BlockFace) {
             return (N) CraftBlock.blockFaceToNotch((BlockFace) bukkit);
         }
-        return (N) ENUM_VALUES.computeIfAbsent(nms, Class::getEnumConstants)[bukkit.ordinal()];
+        return (N) CraftBlockData.ENUM_VALUES.computeIfAbsent(nms, Class::getEnumConstants)[bukkit.ordinal()];
     }
 
     /**
@@ -197,7 +195,7 @@ public class CraftBlockData implements BlockData {
      * @param <T> the type
      * @return the current value of the given state
      */
-    protected <T extends Comparable<T>> T get(IBlockState<T> ibs) {
+    protected <T extends Comparable<T>> T get(Property<T> ibs) {
         // Straight integer or boolean getter
         return this.state.getValue(ibs);
     }
@@ -210,7 +208,7 @@ public class CraftBlockData implements BlockData {
      * @param <T> the state's type
      * @param <V> the value's type. Must match the state's type.
      */
-    public <T extends Comparable<T>, V extends T> void set(IBlockState<T> ibs, V v) {
+    public <T extends Comparable<T>, V extends T> void set(Property<T> ibs, V v) {
         // Straight integer or boolean setter
         this.parsedStates = null;
         this.state = this.state.setValue(ibs, v);
@@ -218,12 +216,12 @@ public class CraftBlockData implements BlockData {
 
     @Override
     public String getAsString() {
-        return toString(state.getValues());
+        return this.toString(this.state.getValues());
     }
 
     @Override
     public String getAsString(boolean hideUnspecified) {
-        return (hideUnspecified && parsedStates != null) ? toString(parsedStates) : getAsString();
+        return (hideUnspecified && this.parsedStates != null) ? this.toString(this.parsedStates) : this.getAsString();
     }
 
     @Override
@@ -237,16 +235,16 @@ public class CraftBlockData implements BlockData {
 
     @Override
     public String toString() {
-        return "CraftBlockData{" + getAsString() + "}";
+        return "CraftBlockData{" + this.getAsString() + "}";
     }
 
     // Mimicked from BlockDataAbstract#toString()
-    public String toString(Map<IBlockState<?>, Comparable<?>> states) {
-        StringBuilder stateString = new StringBuilder(BuiltInRegistries.BLOCK.getKey(state.getBlock()).toString());
+    public String toString(Map<Property<?>, Comparable<?>> states) {
+        StringBuilder stateString = new StringBuilder(BuiltInRegistries.BLOCK.getKey(this.state.getBlock()).toString());
 
         if (!states.isEmpty()) {
             stateString.append('[');
-            stateString.append(states.entrySet().stream().map(IBlockDataHolder.PROPERTY_ENTRY_TO_STRING_FUNCTION).collect(Collectors.joining(",")));
+            stateString.append(states.entrySet().stream().map(StateHolder.PROPERTY_ENTRY_TO_STRING_FUNCTION).collect(Collectors.joining(",")));
             stateString.append(']');
         }
 
@@ -254,14 +252,14 @@ public class CraftBlockData implements BlockData {
     }
 
     public Map<String, String> toStates(boolean hideUnspecified) {
-        return (hideUnspecified && parsedStates != null) ? toStates(parsedStates) : toStates(state.getValues());
+        return (hideUnspecified && this.parsedStates != null) ? CraftBlockData.toStates(this.parsedStates) : CraftBlockData.toStates(this.state.getValues());
     }
 
-    private static Map<String, String> toStates(Map<IBlockState<?>, Comparable<?>> states) {
+    private static Map<String, String> toStates(Map<Property<?>, Comparable<?>> states) {
         Map<String, String> compound = new HashMap<>();
 
-        for (Map.Entry<IBlockState<?>, Comparable<?>> entry : states.entrySet()) {
-            IBlockState iblockstate = (IBlockState) entry.getKey();
+        for (Map.Entry<Property<?>, Comparable<?>> entry : states.entrySet()) {
+            Property iblockstate = (Property) entry.getKey();
 
             compound.put(iblockstate.getName(), iblockstate.getName(entry.getValue()));
         }
@@ -271,48 +269,48 @@ public class CraftBlockData implements BlockData {
 
     @Override
     public boolean equals(Object obj) {
-        return obj instanceof CraftBlockData && state.equals(((CraftBlockData) obj).state);
+        return obj instanceof CraftBlockData && this.state.equals(((CraftBlockData) obj).state);
     }
 
     @Override
     public int hashCode() {
-        return state.hashCode();
+        return this.state.hashCode();
     }
 
-    protected static BlockStateBoolean getBoolean(String name) {
+    protected static BooleanProperty getBoolean(String name) {
         throw new AssertionError("Template Method");
     }
 
-    protected static BlockStateBoolean getBoolean(String name, boolean optional) {
+    protected static BooleanProperty getBoolean(String name, boolean optional) {
         throw new AssertionError("Template Method");
     }
 
-    protected static BlockStateEnum<?> getEnum(String name) {
+    protected static EnumProperty<?> getEnum(String name) {
         throw new AssertionError("Template Method");
     }
 
-    protected static BlockStateInteger getInteger(String name) {
+    protected static IntegerProperty getInteger(String name) {
         throw new AssertionError("Template Method");
     }
 
-    protected static BlockStateBoolean getBoolean(Class<? extends Block> block, String name) {
-        return (BlockStateBoolean) getState(block, name, false);
+    protected static BooleanProperty getBoolean(Class<? extends Block> block, String name) {
+        return (BooleanProperty) CraftBlockData.getState(block, name, false);
     }
 
-    protected static BlockStateBoolean getBoolean(Class<? extends Block> block, String name, boolean optional) {
-        return (BlockStateBoolean) getState(block, name, optional);
+    protected static BooleanProperty getBoolean(Class<? extends Block> block, String name, boolean optional) {
+        return (BooleanProperty) CraftBlockData.getState(block, name, optional);
     }
 
-    protected static BlockStateEnum<?> getEnum(Class<? extends Block> block, String name) {
-        return (BlockStateEnum<?>) getState(block, name, false);
+    protected static EnumProperty<?> getEnum(Class<? extends Block> block, String name) {
+        return (EnumProperty<?>) CraftBlockData.getState(block, name, false);
     }
 
-    protected static BlockStateInteger getInteger(Class<? extends Block> block, String name) {
-        return (BlockStateInteger) getState(block, name, false);
+    protected static IntegerProperty getInteger(Class<? extends Block> block, String name) {
+        return (IntegerProperty) CraftBlockData.getState(block, name, false);
     }
 
     /**
-     * Get a specified {@link IBlockState} from a given block's class with a
+     * Get a specified {@link Property} from a given block's class with a
      * given name
      *
      * @param block the class to retrieve the state from
@@ -322,15 +320,15 @@ public class CraftBlockData implements BlockData {
      * @throws IllegalStateException if the state is null and {@code optional}
      * is false.
      */
-    private static IBlockState<?> getState(Class<? extends Block> block, String name, boolean optional) {
-        IBlockState<?> state = null;
+    private static Property<?> getState(Class<? extends Block> block, String name, boolean optional) {
+        Property<?> state = null;
 
         for (Block instance : BuiltInRegistries.BLOCK) {
             if (instance.getClass() == block) {
                 if (state == null) {
                     state = instance.getStateDefinition().getProperty(name);
                 } else {
-                    IBlockState<?> newState = instance.getStateDefinition().getProperty(name);
+                    Property<?> newState = instance.getStateDefinition().getProperty(name);
 
                     Preconditions.checkState(state == newState, "State mistmatch %s,%s", state, newState);
                 }
@@ -348,7 +346,7 @@ public class CraftBlockData implements BlockData {
      * @param state the state to check
      * @return the minimum value allowed
      */
-    protected static int getMin(BlockStateInteger state) {
+    protected static int getMin(IntegerProperty state) {
         return state.min;
     }
 
@@ -358,140 +356,140 @@ public class CraftBlockData implements BlockData {
      * @param state the state to check
      * @return the maximum value allowed
      */
-    protected static int getMax(BlockStateInteger state) {
+    protected static int getMax(IntegerProperty state) {
         return state.max;
     }
 
     //
-    private static final Map<Class<? extends Block>, Function<IBlockData, CraftBlockData>> MAP = new HashMap<>();
+    private static final Map<Class<? extends Block>, Function<net.minecraft.world.level.block.state.BlockState, CraftBlockData>> MAP = new HashMap<>();
 
     static {
         //<editor-fold desc="CraftBlockData Registration" defaultstate="collapsed">
         register(net.minecraft.world.level.block.AmethystClusterBlock.class, org.bukkit.craftbukkit.block.impl.CraftAmethystCluster::new);
         register(net.minecraft.world.level.block.BigDripleafBlock.class, org.bukkit.craftbukkit.block.impl.CraftBigDripleaf::new);
         register(net.minecraft.world.level.block.BigDripleafStemBlock.class, org.bukkit.craftbukkit.block.impl.CraftBigDripleafStem::new);
-        register(net.minecraft.world.level.block.BlockAnvil.class, org.bukkit.craftbukkit.block.impl.CraftAnvil::new);
-        register(net.minecraft.world.level.block.BlockBamboo.class, org.bukkit.craftbukkit.block.impl.CraftBamboo::new);
-        register(net.minecraft.world.level.block.BlockBanner.class, org.bukkit.craftbukkit.block.impl.CraftBanner::new);
-        register(net.minecraft.world.level.block.BlockBannerWall.class, org.bukkit.craftbukkit.block.impl.CraftBannerWall::new);
-        register(net.minecraft.world.level.block.BlockBarrel.class, org.bukkit.craftbukkit.block.impl.CraftBarrel::new);
-        register(net.minecraft.world.level.block.BlockBarrier.class, org.bukkit.craftbukkit.block.impl.CraftBarrier::new);
-        register(net.minecraft.world.level.block.BlockBed.class, org.bukkit.craftbukkit.block.impl.CraftBed::new);
-        register(net.minecraft.world.level.block.BlockBeehive.class, org.bukkit.craftbukkit.block.impl.CraftBeehive::new);
-        register(net.minecraft.world.level.block.BlockBeetroot.class, org.bukkit.craftbukkit.block.impl.CraftBeetroot::new);
-        register(net.minecraft.world.level.block.BlockBell.class, org.bukkit.craftbukkit.block.impl.CraftBell::new);
-        register(net.minecraft.world.level.block.BlockBlastFurnace.class, org.bukkit.craftbukkit.block.impl.CraftBlastFurnace::new);
-        register(net.minecraft.world.level.block.BlockBrewingStand.class, org.bukkit.craftbukkit.block.impl.CraftBrewingStand::new);
-        register(net.minecraft.world.level.block.BlockBubbleColumn.class, org.bukkit.craftbukkit.block.impl.CraftBubbleColumn::new);
-        register(net.minecraft.world.level.block.BlockButtonAbstract.class, org.bukkit.craftbukkit.block.impl.CraftButtonAbstract::new);
-        register(net.minecraft.world.level.block.BlockCactus.class, org.bukkit.craftbukkit.block.impl.CraftCactus::new);
-        register(net.minecraft.world.level.block.BlockCake.class, org.bukkit.craftbukkit.block.impl.CraftCake::new);
-        register(net.minecraft.world.level.block.BlockCampfire.class, org.bukkit.craftbukkit.block.impl.CraftCampfire::new);
-        register(net.minecraft.world.level.block.BlockCarrots.class, org.bukkit.craftbukkit.block.impl.CraftCarrots::new);
-        register(net.minecraft.world.level.block.BlockChain.class, org.bukkit.craftbukkit.block.impl.CraftChain::new);
-        register(net.minecraft.world.level.block.BlockChest.class, org.bukkit.craftbukkit.block.impl.CraftChest::new);
-        register(net.minecraft.world.level.block.BlockChestTrapped.class, org.bukkit.craftbukkit.block.impl.CraftChestTrapped::new);
-        register(net.minecraft.world.level.block.BlockChorusFlower.class, org.bukkit.craftbukkit.block.impl.CraftChorusFlower::new);
-        register(net.minecraft.world.level.block.BlockChorusFruit.class, org.bukkit.craftbukkit.block.impl.CraftChorusFruit::new);
-        register(net.minecraft.world.level.block.BlockCobbleWall.class, org.bukkit.craftbukkit.block.impl.CraftCobbleWall::new);
-        register(net.minecraft.world.level.block.BlockCocoa.class, org.bukkit.craftbukkit.block.impl.CraftCocoa::new);
-        register(net.minecraft.world.level.block.BlockCommand.class, org.bukkit.craftbukkit.block.impl.CraftCommand::new);
-        register(net.minecraft.world.level.block.BlockComposter.class, org.bukkit.craftbukkit.block.impl.CraftComposter::new);
-        register(net.minecraft.world.level.block.BlockConduit.class, org.bukkit.craftbukkit.block.impl.CraftConduit::new);
-        register(net.minecraft.world.level.block.BlockCoralDead.class, org.bukkit.craftbukkit.block.impl.CraftCoralDead::new);
-        register(net.minecraft.world.level.block.BlockCoralFan.class, org.bukkit.craftbukkit.block.impl.CraftCoralFan::new);
-        register(net.minecraft.world.level.block.BlockCoralFanAbstract.class, org.bukkit.craftbukkit.block.impl.CraftCoralFanAbstract::new);
-        register(net.minecraft.world.level.block.BlockCoralFanWall.class, org.bukkit.craftbukkit.block.impl.CraftCoralFanWall::new);
-        register(net.minecraft.world.level.block.BlockCoralFanWallAbstract.class, org.bukkit.craftbukkit.block.impl.CraftCoralFanWallAbstract::new);
-        register(net.minecraft.world.level.block.BlockCoralPlant.class, org.bukkit.craftbukkit.block.impl.CraftCoralPlant::new);
-        register(net.minecraft.world.level.block.BlockCrops.class, org.bukkit.craftbukkit.block.impl.CraftCrops::new);
-        register(net.minecraft.world.level.block.BlockDaylightDetector.class, org.bukkit.craftbukkit.block.impl.CraftDaylightDetector::new);
-        register(net.minecraft.world.level.block.BlockDirtSnow.class, org.bukkit.craftbukkit.block.impl.CraftDirtSnow::new);
-        register(net.minecraft.world.level.block.BlockDispenser.class, org.bukkit.craftbukkit.block.impl.CraftDispenser::new);
-        register(net.minecraft.world.level.block.BlockDoor.class, org.bukkit.craftbukkit.block.impl.CraftDoor::new);
-        register(net.minecraft.world.level.block.BlockDropper.class, org.bukkit.craftbukkit.block.impl.CraftDropper::new);
-        register(net.minecraft.world.level.block.BlockEndRod.class, org.bukkit.craftbukkit.block.impl.CraftEndRod::new);
-        register(net.minecraft.world.level.block.BlockEnderChest.class, org.bukkit.craftbukkit.block.impl.CraftEnderChest::new);
-        register(net.minecraft.world.level.block.BlockEnderPortalFrame.class, org.bukkit.craftbukkit.block.impl.CraftEnderPortalFrame::new);
-        register(net.minecraft.world.level.block.BlockFence.class, org.bukkit.craftbukkit.block.impl.CraftFence::new);
-        register(net.minecraft.world.level.block.BlockFenceGate.class, org.bukkit.craftbukkit.block.impl.CraftFenceGate::new);
-        register(net.minecraft.world.level.block.BlockFire.class, org.bukkit.craftbukkit.block.impl.CraftFire::new);
-        register(net.minecraft.world.level.block.BlockFloorSign.class, org.bukkit.craftbukkit.block.impl.CraftFloorSign::new);
-        register(net.minecraft.world.level.block.BlockFluids.class, org.bukkit.craftbukkit.block.impl.CraftFluids::new);
-        register(net.minecraft.world.level.block.BlockFurnaceFurace.class, org.bukkit.craftbukkit.block.impl.CraftFurnaceFurace::new);
-        register(net.minecraft.world.level.block.BlockGlazedTerracotta.class, org.bukkit.craftbukkit.block.impl.CraftGlazedTerracotta::new);
-        register(net.minecraft.world.level.block.BlockGrass.class, org.bukkit.craftbukkit.block.impl.CraftGrass::new);
-        register(net.minecraft.world.level.block.BlockGrindstone.class, org.bukkit.craftbukkit.block.impl.CraftGrindstone::new);
-        register(net.minecraft.world.level.block.BlockHay.class, org.bukkit.craftbukkit.block.impl.CraftHay::new);
-        register(net.minecraft.world.level.block.BlockHopper.class, org.bukkit.craftbukkit.block.impl.CraftHopper::new);
-        register(net.minecraft.world.level.block.BlockHugeMushroom.class, org.bukkit.craftbukkit.block.impl.CraftHugeMushroom::new);
-        register(net.minecraft.world.level.block.BlockIceFrost.class, org.bukkit.craftbukkit.block.impl.CraftIceFrost::new);
-        register(net.minecraft.world.level.block.BlockIronBars.class, org.bukkit.craftbukkit.block.impl.CraftIronBars::new);
-        register(net.minecraft.world.level.block.BlockJigsaw.class, org.bukkit.craftbukkit.block.impl.CraftJigsaw::new);
-        register(net.minecraft.world.level.block.BlockJukeBox.class, org.bukkit.craftbukkit.block.impl.CraftJukeBox::new);
-        register(net.minecraft.world.level.block.BlockKelp.class, org.bukkit.craftbukkit.block.impl.CraftKelp::new);
-        register(net.minecraft.world.level.block.BlockLadder.class, org.bukkit.craftbukkit.block.impl.CraftLadder::new);
-        register(net.minecraft.world.level.block.BlockLantern.class, org.bukkit.craftbukkit.block.impl.CraftLantern::new);
-        register(net.minecraft.world.level.block.BlockLeaves.class, org.bukkit.craftbukkit.block.impl.CraftLeaves::new);
-        register(net.minecraft.world.level.block.BlockLectern.class, org.bukkit.craftbukkit.block.impl.CraftLectern::new);
-        register(net.minecraft.world.level.block.BlockLever.class, org.bukkit.craftbukkit.block.impl.CraftLever::new);
-        register(net.minecraft.world.level.block.BlockLoom.class, org.bukkit.craftbukkit.block.impl.CraftLoom::new);
-        register(net.minecraft.world.level.block.BlockMinecartDetector.class, org.bukkit.craftbukkit.block.impl.CraftMinecartDetector::new);
-        register(net.minecraft.world.level.block.BlockMinecartTrack.class, org.bukkit.craftbukkit.block.impl.CraftMinecartTrack::new);
-        register(net.minecraft.world.level.block.BlockMycel.class, org.bukkit.craftbukkit.block.impl.CraftMycel::new);
-        register(net.minecraft.world.level.block.BlockNetherWart.class, org.bukkit.craftbukkit.block.impl.CraftNetherWart::new);
-        register(net.minecraft.world.level.block.BlockNote.class, org.bukkit.craftbukkit.block.impl.CraftNote::new);
-        register(net.minecraft.world.level.block.BlockObserver.class, org.bukkit.craftbukkit.block.impl.CraftObserver::new);
-        register(net.minecraft.world.level.block.BlockPortal.class, org.bukkit.craftbukkit.block.impl.CraftPortal::new);
-        register(net.minecraft.world.level.block.BlockPotatoes.class, org.bukkit.craftbukkit.block.impl.CraftPotatoes::new);
-        register(net.minecraft.world.level.block.BlockPoweredRail.class, org.bukkit.craftbukkit.block.impl.CraftPoweredRail::new);
-        register(net.minecraft.world.level.block.BlockPressurePlateBinary.class, org.bukkit.craftbukkit.block.impl.CraftPressurePlateBinary::new);
-        register(net.minecraft.world.level.block.BlockPressurePlateWeighted.class, org.bukkit.craftbukkit.block.impl.CraftPressurePlateWeighted::new);
-        register(net.minecraft.world.level.block.BlockPumpkinCarved.class, org.bukkit.craftbukkit.block.impl.CraftPumpkinCarved::new);
-        register(net.minecraft.world.level.block.BlockRedstoneComparator.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneComparator::new);
-        register(net.minecraft.world.level.block.BlockRedstoneLamp.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneLamp::new);
-        register(net.minecraft.world.level.block.BlockRedstoneOre.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneOre::new);
-        register(net.minecraft.world.level.block.BlockRedstoneTorch.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneTorch::new);
-        register(net.minecraft.world.level.block.BlockRedstoneTorchWall.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneTorchWall::new);
-        register(net.minecraft.world.level.block.BlockRedstoneWire.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneWire::new);
-        register(net.minecraft.world.level.block.BlockReed.class, org.bukkit.craftbukkit.block.impl.CraftReed::new);
-        register(net.minecraft.world.level.block.BlockRepeater.class, org.bukkit.craftbukkit.block.impl.CraftRepeater::new);
-        register(net.minecraft.world.level.block.BlockRespawnAnchor.class, org.bukkit.craftbukkit.block.impl.CraftRespawnAnchor::new);
-        register(net.minecraft.world.level.block.BlockRotatable.class, org.bukkit.craftbukkit.block.impl.CraftRotatable::new);
-        register(net.minecraft.world.level.block.BlockSapling.class, org.bukkit.craftbukkit.block.impl.CraftSapling::new);
-        register(net.minecraft.world.level.block.BlockScaffolding.class, org.bukkit.craftbukkit.block.impl.CraftScaffolding::new);
-        register(net.minecraft.world.level.block.BlockSeaPickle.class, org.bukkit.craftbukkit.block.impl.CraftSeaPickle::new);
-        register(net.minecraft.world.level.block.BlockShulkerBox.class, org.bukkit.craftbukkit.block.impl.CraftShulkerBox::new);
-        register(net.minecraft.world.level.block.BlockSkull.class, org.bukkit.craftbukkit.block.impl.CraftSkull::new);
-        register(net.minecraft.world.level.block.BlockSkullPlayer.class, org.bukkit.craftbukkit.block.impl.CraftSkullPlayer::new);
-        register(net.minecraft.world.level.block.BlockSkullPlayerWall.class, org.bukkit.craftbukkit.block.impl.CraftSkullPlayerWall::new);
-        register(net.minecraft.world.level.block.BlockSkullWall.class, org.bukkit.craftbukkit.block.impl.CraftSkullWall::new);
-        register(net.minecraft.world.level.block.BlockSmoker.class, org.bukkit.craftbukkit.block.impl.CraftSmoker::new);
-        register(net.minecraft.world.level.block.BlockSnow.class, org.bukkit.craftbukkit.block.impl.CraftSnow::new);
-        register(net.minecraft.world.level.block.BlockSoil.class, org.bukkit.craftbukkit.block.impl.CraftSoil::new);
-        register(net.minecraft.world.level.block.BlockStainedGlassPane.class, org.bukkit.craftbukkit.block.impl.CraftStainedGlassPane::new);
-        register(net.minecraft.world.level.block.BlockStairs.class, org.bukkit.craftbukkit.block.impl.CraftStairs::new);
-        register(net.minecraft.world.level.block.BlockStem.class, org.bukkit.craftbukkit.block.impl.CraftStem::new);
-        register(net.minecraft.world.level.block.BlockStemAttached.class, org.bukkit.craftbukkit.block.impl.CraftStemAttached::new);
-        register(net.minecraft.world.level.block.BlockStepAbstract.class, org.bukkit.craftbukkit.block.impl.CraftStepAbstract::new);
-        register(net.minecraft.world.level.block.BlockStonecutter.class, org.bukkit.craftbukkit.block.impl.CraftStonecutter::new);
-        register(net.minecraft.world.level.block.BlockStructure.class, org.bukkit.craftbukkit.block.impl.CraftStructure::new);
-        register(net.minecraft.world.level.block.BlockSweetBerryBush.class, org.bukkit.craftbukkit.block.impl.CraftSweetBerryBush::new);
-        register(net.minecraft.world.level.block.BlockTNT.class, org.bukkit.craftbukkit.block.impl.CraftTNT::new);
-        register(net.minecraft.world.level.block.BlockTallPlant.class, org.bukkit.craftbukkit.block.impl.CraftTallPlant::new);
-        register(net.minecraft.world.level.block.BlockTallPlantFlower.class, org.bukkit.craftbukkit.block.impl.CraftTallPlantFlower::new);
-        register(net.minecraft.world.level.block.BlockTarget.class, org.bukkit.craftbukkit.block.impl.CraftTarget::new);
-        register(net.minecraft.world.level.block.BlockTorchWall.class, org.bukkit.craftbukkit.block.impl.CraftTorchWall::new);
-        register(net.minecraft.world.level.block.BlockTrapdoor.class, org.bukkit.craftbukkit.block.impl.CraftTrapdoor::new);
-        register(net.minecraft.world.level.block.BlockTripwire.class, org.bukkit.craftbukkit.block.impl.CraftTripwire::new);
-        register(net.minecraft.world.level.block.BlockTripwireHook.class, org.bukkit.craftbukkit.block.impl.CraftTripwireHook::new);
-        register(net.minecraft.world.level.block.BlockTurtleEgg.class, org.bukkit.craftbukkit.block.impl.CraftTurtleEgg::new);
-        register(net.minecraft.world.level.block.BlockTwistingVines.class, org.bukkit.craftbukkit.block.impl.CraftTwistingVines::new);
-        register(net.minecraft.world.level.block.BlockVine.class, org.bukkit.craftbukkit.block.impl.CraftVine::new);
-        register(net.minecraft.world.level.block.BlockWallSign.class, org.bukkit.craftbukkit.block.impl.CraftWallSign::new);
-        register(net.minecraft.world.level.block.BlockWeepingVines.class, org.bukkit.craftbukkit.block.impl.CraftWeepingVines::new);
-        register(net.minecraft.world.level.block.BlockWitherSkull.class, org.bukkit.craftbukkit.block.impl.CraftWitherSkull::new);
-        register(net.minecraft.world.level.block.BlockWitherSkullWall.class, org.bukkit.craftbukkit.block.impl.CraftWitherSkullWall::new);
+        register(net.minecraft.world.level.block.AnvilBlock.class, org.bukkit.craftbukkit.block.impl.CraftAnvil::new);
+        register(net.minecraft.world.level.block.BambooStalkBlock.class, org.bukkit.craftbukkit.block.impl.CraftBamboo::new);
+        register(net.minecraft.world.level.block.BannerBlock.class, org.bukkit.craftbukkit.block.impl.CraftBanner::new);
+        register(net.minecraft.world.level.block.WallBannerBlock.class, org.bukkit.craftbukkit.block.impl.CraftBannerWall::new);
+        register(net.minecraft.world.level.block.BarrelBlock.class, org.bukkit.craftbukkit.block.impl.CraftBarrel::new);
+        register(net.minecraft.world.level.block.BarrierBlock.class, org.bukkit.craftbukkit.block.impl.CraftBarrier::new);
+        register(net.minecraft.world.level.block.BedBlock.class, org.bukkit.craftbukkit.block.impl.CraftBed::new);
+        register(net.minecraft.world.level.block.BeehiveBlock.class, org.bukkit.craftbukkit.block.impl.CraftBeehive::new);
+        register(net.minecraft.world.level.block.BeetrootBlock.class, org.bukkit.craftbukkit.block.impl.CraftBeetroot::new);
+        register(net.minecraft.world.level.block.BellBlock.class, org.bukkit.craftbukkit.block.impl.CraftBell::new);
+        register(net.minecraft.world.level.block.BlastFurnaceBlock.class, org.bukkit.craftbukkit.block.impl.CraftBlastFurnace::new);
+        register(net.minecraft.world.level.block.BrewingStandBlock.class, org.bukkit.craftbukkit.block.impl.CraftBrewingStand::new);
+        register(net.minecraft.world.level.block.BubbleColumnBlock.class, org.bukkit.craftbukkit.block.impl.CraftBubbleColumn::new);
+        register(net.minecraft.world.level.block.ButtonBlock.class, org.bukkit.craftbukkit.block.impl.CraftButtonAbstract::new);
+        register(net.minecraft.world.level.block.CactusBlock.class, org.bukkit.craftbukkit.block.impl.CraftCactus::new);
+        register(net.minecraft.world.level.block.CakeBlock.class, org.bukkit.craftbukkit.block.impl.CraftCake::new);
+        register(net.minecraft.world.level.block.CampfireBlock.class, org.bukkit.craftbukkit.block.impl.CraftCampfire::new);
+        register(net.minecraft.world.level.block.CarrotBlock.class, org.bukkit.craftbukkit.block.impl.CraftCarrots::new);
+        register(net.minecraft.world.level.block.ChainBlock.class, org.bukkit.craftbukkit.block.impl.CraftChain::new);
+        register(net.minecraft.world.level.block.ChestBlock.class, org.bukkit.craftbukkit.block.impl.CraftChest::new);
+        register(net.minecraft.world.level.block.TrappedChestBlock.class, org.bukkit.craftbukkit.block.impl.CraftChestTrapped::new);
+        register(net.minecraft.world.level.block.ChorusFlowerBlock.class, org.bukkit.craftbukkit.block.impl.CraftChorusFlower::new);
+        register(net.minecraft.world.level.block.ChorusPlantBlock.class, org.bukkit.craftbukkit.block.impl.CraftChorusFruit::new);
+        register(net.minecraft.world.level.block.WallBlock.class, org.bukkit.craftbukkit.block.impl.CraftCobbleWall::new);
+        register(net.minecraft.world.level.block.CocoaBlock.class, org.bukkit.craftbukkit.block.impl.CraftCocoa::new);
+        register(net.minecraft.world.level.block.CommandBlock.class, org.bukkit.craftbukkit.block.impl.CraftCommand::new);
+        register(net.minecraft.world.level.block.ComposterBlock.class, org.bukkit.craftbukkit.block.impl.CraftComposter::new);
+        register(net.minecraft.world.level.block.ConduitBlock.class, org.bukkit.craftbukkit.block.impl.CraftConduit::new);
+        register(net.minecraft.world.level.block.BaseCoralPlantBlock.class, org.bukkit.craftbukkit.block.impl.CraftCoralDead::new);
+        register(net.minecraft.world.level.block.CoralFanBlock.class, org.bukkit.craftbukkit.block.impl.CraftCoralFan::new);
+        register(net.minecraft.world.level.block.BaseCoralFanBlock.class, org.bukkit.craftbukkit.block.impl.CraftCoralFanAbstract::new);
+        register(net.minecraft.world.level.block.CoralWallFanBlock.class, org.bukkit.craftbukkit.block.impl.CraftCoralFanWall::new);
+        register(net.minecraft.world.level.block.BaseCoralWallFanBlock.class, org.bukkit.craftbukkit.block.impl.CraftCoralFanWallAbstract::new);
+        register(net.minecraft.world.level.block.CoralPlantBlock.class, org.bukkit.craftbukkit.block.impl.CraftCoralPlant::new);
+        register(net.minecraft.world.level.block.CropBlock.class, org.bukkit.craftbukkit.block.impl.CraftCrops::new);
+        register(net.minecraft.world.level.block.DaylightDetectorBlock.class, org.bukkit.craftbukkit.block.impl.CraftDaylightDetector::new);
+        register(net.minecraft.world.level.block.SnowyDirtBlock.class, org.bukkit.craftbukkit.block.impl.CraftDirtSnow::new);
+        register(net.minecraft.world.level.block.DispenserBlock.class, org.bukkit.craftbukkit.block.impl.CraftDispenser::new);
+        register(net.minecraft.world.level.block.DoorBlock.class, org.bukkit.craftbukkit.block.impl.CraftDoor::new);
+        register(net.minecraft.world.level.block.DropperBlock.class, org.bukkit.craftbukkit.block.impl.CraftDropper::new);
+        register(net.minecraft.world.level.block.EndRodBlock.class, org.bukkit.craftbukkit.block.impl.CraftEndRod::new);
+        register(net.minecraft.world.level.block.EnderChestBlock.class, org.bukkit.craftbukkit.block.impl.CraftEnderChest::new);
+        register(net.minecraft.world.level.block.EndPortalFrameBlock.class, org.bukkit.craftbukkit.block.impl.CraftEnderPortalFrame::new);
+        register(net.minecraft.world.level.block.FenceBlock.class, org.bukkit.craftbukkit.block.impl.CraftFence::new);
+        register(net.minecraft.world.level.block.FenceGateBlock.class, org.bukkit.craftbukkit.block.impl.CraftFenceGate::new);
+        register(net.minecraft.world.level.block.FireBlock.class, org.bukkit.craftbukkit.block.impl.CraftFire::new);
+        register(net.minecraft.world.level.block.StandingSignBlock.class, org.bukkit.craftbukkit.block.impl.CraftFloorSign::new);
+        register(net.minecraft.world.level.block.LiquidBlock.class, org.bukkit.craftbukkit.block.impl.CraftFluids::new);
+        register(net.minecraft.world.level.block.FurnaceBlock.class, org.bukkit.craftbukkit.block.impl.CraftFurnaceFurace::new);
+        register(net.minecraft.world.level.block.GlazedTerracottaBlock.class, org.bukkit.craftbukkit.block.impl.CraftGlazedTerracotta::new);
+        register(net.minecraft.world.level.block.GrassBlock.class, org.bukkit.craftbukkit.block.impl.CraftGrass::new);
+        register(net.minecraft.world.level.block.GrindstoneBlock.class, org.bukkit.craftbukkit.block.impl.CraftGrindstone::new);
+        register(net.minecraft.world.level.block.HayBlock.class, org.bukkit.craftbukkit.block.impl.CraftHay::new);
+        register(net.minecraft.world.level.block.HopperBlock.class, org.bukkit.craftbukkit.block.impl.CraftHopper::new);
+        register(net.minecraft.world.level.block.HugeMushroomBlock.class, org.bukkit.craftbukkit.block.impl.CraftHugeMushroom::new);
+        register(net.minecraft.world.level.block.FrostedIceBlock.class, org.bukkit.craftbukkit.block.impl.CraftIceFrost::new);
+        register(net.minecraft.world.level.block.IronBarsBlock.class, org.bukkit.craftbukkit.block.impl.CraftIronBars::new);
+        register(net.minecraft.world.level.block.JigsawBlock.class, org.bukkit.craftbukkit.block.impl.CraftJigsaw::new);
+        register(net.minecraft.world.level.block.JukeboxBlock.class, org.bukkit.craftbukkit.block.impl.CraftJukeBox::new);
+        register(net.minecraft.world.level.block.KelpBlock.class, org.bukkit.craftbukkit.block.impl.CraftKelp::new);
+        register(net.minecraft.world.level.block.LadderBlock.class, org.bukkit.craftbukkit.block.impl.CraftLadder::new);
+        register(net.minecraft.world.level.block.LanternBlock.class, org.bukkit.craftbukkit.block.impl.CraftLantern::new);
+        register(net.minecraft.world.level.block.LeavesBlock.class, org.bukkit.craftbukkit.block.impl.CraftLeaves::new);
+        register(net.minecraft.world.level.block.LecternBlock.class, org.bukkit.craftbukkit.block.impl.CraftLectern::new);
+        register(net.minecraft.world.level.block.LeverBlock.class, org.bukkit.craftbukkit.block.impl.CraftLever::new);
+        register(net.minecraft.world.level.block.LoomBlock.class, org.bukkit.craftbukkit.block.impl.CraftLoom::new);
+        register(net.minecraft.world.level.block.DetectorRailBlock.class, org.bukkit.craftbukkit.block.impl.CraftMinecartDetector::new);
+        register(net.minecraft.world.level.block.RailBlock.class, org.bukkit.craftbukkit.block.impl.CraftMinecartTrack::new);
+        register(net.minecraft.world.level.block.MyceliumBlock.class, org.bukkit.craftbukkit.block.impl.CraftMycel::new);
+        register(net.minecraft.world.level.block.NetherWartBlock.class, org.bukkit.craftbukkit.block.impl.CraftNetherWart::new);
+        register(net.minecraft.world.level.block.NoteBlock.class, org.bukkit.craftbukkit.block.impl.CraftNote::new);
+        register(net.minecraft.world.level.block.ObserverBlock.class, org.bukkit.craftbukkit.block.impl.CraftObserver::new);
+        register(net.minecraft.world.level.block.NetherPortalBlock.class, org.bukkit.craftbukkit.block.impl.CraftPortal::new);
+        register(net.minecraft.world.level.block.PotatoBlock.class, org.bukkit.craftbukkit.block.impl.CraftPotatoes::new);
+        register(net.minecraft.world.level.block.PoweredRailBlock.class, org.bukkit.craftbukkit.block.impl.CraftPoweredRail::new);
+        register(net.minecraft.world.level.block.PressurePlateBlock.class, org.bukkit.craftbukkit.block.impl.CraftPressurePlateBinary::new);
+        register(net.minecraft.world.level.block.WeightedPressurePlateBlock.class, org.bukkit.craftbukkit.block.impl.CraftPressurePlateWeighted::new);
+        register(net.minecraft.world.level.block.CarvedPumpkinBlock.class, org.bukkit.craftbukkit.block.impl.CraftPumpkinCarved::new);
+        register(net.minecraft.world.level.block.ComparatorBlock.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneComparator::new);
+        register(net.minecraft.world.level.block.RedstoneLampBlock.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneLamp::new);
+        register(net.minecraft.world.level.block.RedStoneOreBlock.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneOre::new);
+        register(net.minecraft.world.level.block.RedstoneTorchBlock.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneTorch::new);
+        register(net.minecraft.world.level.block.RedstoneWallTorchBlock.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneTorchWall::new);
+        register(net.minecraft.world.level.block.RedStoneWireBlock.class, org.bukkit.craftbukkit.block.impl.CraftRedstoneWire::new);
+        register(net.minecraft.world.level.block.SugarCaneBlock.class, org.bukkit.craftbukkit.block.impl.CraftReed::new);
+        register(net.minecraft.world.level.block.RepeaterBlock.class, org.bukkit.craftbukkit.block.impl.CraftRepeater::new);
+        register(net.minecraft.world.level.block.RespawnAnchorBlock.class, org.bukkit.craftbukkit.block.impl.CraftRespawnAnchor::new);
+        register(net.minecraft.world.level.block.RotatedPillarBlock.class, org.bukkit.craftbukkit.block.impl.CraftRotatable::new);
+        register(net.minecraft.world.level.block.SaplingBlock.class, org.bukkit.craftbukkit.block.impl.CraftSapling::new);
+        register(net.minecraft.world.level.block.ScaffoldingBlock.class, org.bukkit.craftbukkit.block.impl.CraftScaffolding::new);
+        register(net.minecraft.world.level.block.SeaPickleBlock.class, org.bukkit.craftbukkit.block.impl.CraftSeaPickle::new);
+        register(net.minecraft.world.level.block.ShulkerBoxBlock.class, org.bukkit.craftbukkit.block.impl.CraftShulkerBox::new);
+        register(net.minecraft.world.level.block.SkullBlock.class, org.bukkit.craftbukkit.block.impl.CraftSkull::new);
+        register(net.minecraft.world.level.block.PlayerHeadBlock.class, org.bukkit.craftbukkit.block.impl.CraftSkullPlayer::new);
+        register(net.minecraft.world.level.block.PlayerWallHeadBlock.class, org.bukkit.craftbukkit.block.impl.CraftSkullPlayerWall::new);
+        register(net.minecraft.world.level.block.WallSkullBlock.class, org.bukkit.craftbukkit.block.impl.CraftSkullWall::new);
+        register(net.minecraft.world.level.block.SmokerBlock.class, org.bukkit.craftbukkit.block.impl.CraftSmoker::new);
+        register(net.minecraft.world.level.block.SnowLayerBlock.class, org.bukkit.craftbukkit.block.impl.CraftSnow::new);
+        register(net.minecraft.world.level.block.FarmBlock.class, org.bukkit.craftbukkit.block.impl.CraftSoil::new);
+        register(net.minecraft.world.level.block.StainedGlassPaneBlock.class, org.bukkit.craftbukkit.block.impl.CraftStainedGlassPane::new);
+        register(net.minecraft.world.level.block.StairBlock.class, org.bukkit.craftbukkit.block.impl.CraftStairs::new);
+        register(net.minecraft.world.level.block.StemBlock.class, org.bukkit.craftbukkit.block.impl.CraftStem::new);
+        register(net.minecraft.world.level.block.AttachedStemBlock.class, org.bukkit.craftbukkit.block.impl.CraftStemAttached::new);
+        register(net.minecraft.world.level.block.SlabBlock.class, org.bukkit.craftbukkit.block.impl.CraftStepAbstract::new);
+        register(net.minecraft.world.level.block.StonecutterBlock.class, org.bukkit.craftbukkit.block.impl.CraftStonecutter::new);
+        register(net.minecraft.world.level.block.StructureBlock.class, org.bukkit.craftbukkit.block.impl.CraftStructure::new);
+        register(net.minecraft.world.level.block.SweetBerryBushBlock.class, org.bukkit.craftbukkit.block.impl.CraftSweetBerryBush::new);
+        register(net.minecraft.world.level.block.TntBlock.class, org.bukkit.craftbukkit.block.impl.CraftTNT::new);
+        register(net.minecraft.world.level.block.DoublePlantBlock.class, org.bukkit.craftbukkit.block.impl.CraftTallPlant::new);
+        register(net.minecraft.world.level.block.TallFlowerBlock.class, org.bukkit.craftbukkit.block.impl.CraftTallPlantFlower::new);
+        register(net.minecraft.world.level.block.TargetBlock.class, org.bukkit.craftbukkit.block.impl.CraftTarget::new);
+        register(net.minecraft.world.level.block.WallTorchBlock.class, org.bukkit.craftbukkit.block.impl.CraftTorchWall::new);
+        register(net.minecraft.world.level.block.TrapDoorBlock.class, org.bukkit.craftbukkit.block.impl.CraftTrapdoor::new);
+        register(net.minecraft.world.level.block.TripWireBlock.class, org.bukkit.craftbukkit.block.impl.CraftTripwire::new);
+        register(net.minecraft.world.level.block.TripWireHookBlock.class, org.bukkit.craftbukkit.block.impl.CraftTripwireHook::new);
+        register(net.minecraft.world.level.block.TurtleEggBlock.class, org.bukkit.craftbukkit.block.impl.CraftTurtleEgg::new);
+        register(net.minecraft.world.level.block.TwistingVinesBlock.class, org.bukkit.craftbukkit.block.impl.CraftTwistingVines::new);
+        register(net.minecraft.world.level.block.VineBlock.class, org.bukkit.craftbukkit.block.impl.CraftVine::new);
+        register(net.minecraft.world.level.block.WallSignBlock.class, org.bukkit.craftbukkit.block.impl.CraftWallSign::new);
+        register(net.minecraft.world.level.block.WeepingVinesBlock.class, org.bukkit.craftbukkit.block.impl.CraftWeepingVines::new);
+        register(net.minecraft.world.level.block.WitherSkullBlock.class, org.bukkit.craftbukkit.block.impl.CraftWitherSkull::new);
+        register(net.minecraft.world.level.block.WitherWallSkullBlock.class, org.bukkit.craftbukkit.block.impl.CraftWitherSkullWall::new);
         register(net.minecraft.world.level.block.BrushableBlock.class, org.bukkit.craftbukkit.block.impl.CraftBrushable::new);
         register(net.minecraft.world.level.block.CalibratedSculkSensorBlock.class, org.bukkit.craftbukkit.block.impl.CraftCalibratedSculkSensor::new);
         register(net.minecraft.world.level.block.CandleBlock.class, org.bukkit.craftbukkit.block.impl.CraftCandle::new);
@@ -540,20 +538,20 @@ public class CraftBlockData implements BlockData {
         register(net.minecraft.world.level.block.WeatheringCopperSlabBlock.class, org.bukkit.craftbukkit.block.impl.CraftWeatheringCopperSlab::new);
         register(net.minecraft.world.level.block.WeatheringCopperStairBlock.class, org.bukkit.craftbukkit.block.impl.CraftWeatheringCopperStair::new);
         register(net.minecraft.world.level.block.WeatheringCopperTrapDoorBlock.class, org.bukkit.craftbukkit.block.impl.CraftWeatheringCopperTrapDoor::new);
-        register(net.minecraft.world.level.block.piston.BlockPiston.class, org.bukkit.craftbukkit.block.impl.CraftPiston::new);
-        register(net.minecraft.world.level.block.piston.BlockPistonExtension.class, org.bukkit.craftbukkit.block.impl.CraftPistonExtension::new);
-        register(net.minecraft.world.level.block.piston.BlockPistonMoving.class, org.bukkit.craftbukkit.block.impl.CraftPistonMoving::new);
+        register(net.minecraft.world.level.block.piston.PistonBaseBlock.class, org.bukkit.craftbukkit.block.impl.CraftPiston::new);
+        register(net.minecraft.world.level.block.piston.PistonHeadBlock.class, org.bukkit.craftbukkit.block.impl.CraftPistonExtension::new);
+        register(net.minecraft.world.level.block.piston.MovingPistonBlock.class, org.bukkit.craftbukkit.block.impl.CraftPistonMoving::new);
         //</editor-fold>
     }
 
-    private static void register(Class<? extends Block> nms, Function<IBlockData, CraftBlockData> bukkit) {
-        Preconditions.checkState(MAP.put(nms, bukkit) == null, "Duplicate mapping %s->%s", nms, bukkit);
+    private static void register(Class<? extends Block> nms, Function<net.minecraft.world.level.block.state.BlockState, CraftBlockData> bukkit) {
+        Preconditions.checkState(CraftBlockData.MAP.put(nms, bukkit) == null, "Duplicate mapping %s->%s", nms, bukkit);
     }
 
     public static CraftBlockData newData(BlockType blockType, String data) {
-        IBlockData blockData;
+        net.minecraft.world.level.block.state.BlockState blockData;
         Block block = blockType == null ? null : ((CraftBlockType<?>) blockType).getHandle();
-        Map<IBlockState<?>, Comparable<?>> parsed = null;
+        Map<Property<?>, Comparable<?>> parsed = null;
 
         // Data provided, use it
         if (data != null) {
@@ -564,7 +562,7 @@ public class CraftBlockData implements BlockData {
                 }
 
                 StringReader reader = new StringReader(data);
-                ArgumentBlock.a arg = ArgumentBlock.parseForBlock(CraftRegistry.getMinecraftRegistry(Registries.BLOCK), reader, false);
+                BlockStateParser.BlockResult arg = BlockStateParser.parseForBlock(CraftRegistry.getMinecraftRegistry(Registries.BLOCK), reader, false);
                 Preconditions.checkArgument(!reader.canRead(), "Spurious trailing data: " + data);
 
                 blockData = arg.blockState();
@@ -576,33 +574,33 @@ public class CraftBlockData implements BlockData {
             blockData = block.defaultBlockState();
         }
 
-        CraftBlockData craft = fromData(blockData);
+        CraftBlockData craft = CraftBlockData.fromData(blockData);
         craft.parsedStates = parsed;
         return craft;
     }
 
-    public static CraftBlockData fromData(IBlockData data) {
-        return MAP.getOrDefault(data.getBlock().getClass(), CraftBlockData::new).apply(data);
+    public static CraftBlockData fromData(net.minecraft.world.level.block.state.BlockState data) {
+        return CraftBlockData.MAP.getOrDefault(data.getBlock().getClass(), CraftBlockData::new).apply(data);
     }
 
     @Override
     public SoundGroup getSoundGroup() {
-        return CraftSoundGroup.getSoundGroup(state.getSoundType());
+        return CraftSoundGroup.getSoundGroup(this.state.getSoundType());
     }
 
     @Override
     public int getLightEmission() {
-        return state.getLightEmission();
+        return this.state.getLightEmission();
     }
 
     @Override
     public boolean isOccluding() {
-        return state.canOcclude();
+        return this.state.canOcclude();
     }
 
     @Override
     public boolean requiresCorrectToolForDrops() {
-        return state.requiresCorrectToolForDrops();
+        return this.state.requiresCorrectToolForDrops();
     }
 
     @Override
@@ -610,16 +608,16 @@ public class CraftBlockData implements BlockData {
         Preconditions.checkArgument(tool != null, "tool must not be null");
 
         net.minecraft.world.item.ItemStack nms = CraftItemStack.asNMSCopy(tool);
-        return isPreferredTool(state, nms);
+        return CraftBlockData.isPreferredTool(this.state, nms);
     }
 
-    public static boolean isPreferredTool(IBlockData iblockdata, net.minecraft.world.item.ItemStack nmsItem) {
+    public static boolean isPreferredTool(net.minecraft.world.level.block.state.BlockState iblockdata, net.minecraft.world.item.ItemStack nmsItem) {
         return !iblockdata.requiresCorrectToolForDrops() || nmsItem.isCorrectToolForDrops(iblockdata);
     }
 
     @Override
     public PistonMoveReaction getPistonMoveReaction() {
-        return PistonMoveReaction.getById(state.getPistonPushReaction().ordinal());
+        return PistonMoveReaction.getById(this.state.getPistonPushReaction().ordinal());
     }
 
     @Override
@@ -627,7 +625,7 @@ public class CraftBlockData implements BlockData {
         Preconditions.checkArgument(block != null, "block must not be null");
 
         CraftBlock craftBlock = (CraftBlock) block;
-        return state.canSurvive(craftBlock.getCraftWorld().getHandle(), craftBlock.getPosition());
+        return this.state.canSurvive(craftBlock.getCraftWorld().getHandle(), craftBlock.getPosition());
     }
 
     @Override
@@ -637,8 +635,8 @@ public class CraftBlockData implements BlockData {
         CraftWorld world = (CraftWorld) location.getWorld();
         Preconditions.checkArgument(world != null, "location must not have a null world");
 
-        BlockPosition position = CraftLocation.toBlockPosition(location);
-        return state.canSurvive(world.getHandle(), position);
+        BlockPos position = CraftLocation.toBlockPosition(location);
+        return this.state.canSurvive(world.getHandle(), position);
     }
 
     @Override
@@ -646,43 +644,43 @@ public class CraftBlockData implements BlockData {
         Preconditions.checkArgument(face != null, "face must not be null");
         Preconditions.checkArgument(support != null, "support must not be null");
 
-        return state.isFaceSturdy(BlockAccessAir.INSTANCE, BlockPosition.ZERO, CraftBlock.blockFaceToNotch(face), CraftBlockSupport.toNMS(support));
+        return this.state.isFaceSturdy(EmptyBlockGetter.INSTANCE, BlockPos.ZERO, CraftBlock.blockFaceToNotch(face), CraftBlockSupport.toNMS(support));
     }
 
     @Override
     public Color getMapColor() {
-        return Color.fromRGB(state.getMapColor(null, null).col);
+        return Color.fromRGB(this.state.getMapColor(null, null).col);
     }
 
     @Override
     public Material getPlacementMaterial() {
-        return CraftItemType.minecraftToBukkit(state.getBlock().asItem());
+        return CraftItemType.minecraftToBukkit(this.state.getBlock().asItem());
     }
 
     @Override
     public void rotate(StructureRotation rotation) {
-        this.state = state.rotate(EnumBlockRotation.valueOf(rotation.name()));
+        this.state = this.state.rotate(Rotation.valueOf(rotation.name()));
     }
 
     @Override
     public void mirror(Mirror mirror) {
-        this.state = state.mirror(EnumBlockMirror.valueOf(mirror.name()));
+        this.state = this.state.mirror(net.minecraft.world.level.block.Mirror.valueOf(mirror.name()));
     }
 
     @Override
     public void copyTo(BlockData blockData) {
         CraftBlockData other = (CraftBlockData) blockData;
-        IBlockData nms = other.state;
-        for (IBlockState<?> property : state.getBlock().getStateDefinition().getProperties()) {
+        net.minecraft.world.level.block.state.BlockState nms = other.state;
+        for (Property<?> property : this.state.getBlock().getStateDefinition().getProperties()) {
             if (nms.hasProperty(property)) {
-                nms = copyProperty(state, nms, property);
+                nms = this.copyProperty(this.state, nms, property);
             }
         }
 
         other.state = nms;
     }
 
-    private <T extends Comparable<T>> IBlockData copyProperty(IBlockData source, IBlockData target, IBlockState<T> property) {
+    private <T extends Comparable<T>> net.minecraft.world.level.block.state.BlockState copyProperty(net.minecraft.world.level.block.state.BlockState source, net.minecraft.world.level.block.state.BlockState target, Property<T> property) {
         return target.setValue(property, source.getValue(property));
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftBrushable.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftBrushable.java
index ee4d20b085..dfc651e5b6 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftBrushable.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftBrushable.java
@@ -4,20 +4,20 @@ import org.bukkit.block.data.Brushable;
 
 public abstract class CraftBrushable extends CraftBlockData implements Brushable {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger DUSTED = getInteger("dusted");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty DUSTED = getInteger("dusted");
 
     @Override
     public int getDusted() {
-        return get(DUSTED);
+        return this.get(CraftBrushable.DUSTED);
     }
 
     @Override
     public void setDusted(int dusted) {
-        set(DUSTED, dusted);
+        this.set(CraftBrushable.DUSTED, dusted);
     }
 
     @Override
     public int getMaximumDusted() {
-        return getMax(DUSTED);
+        return getMax(CraftBrushable.DUSTED);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftDirectional.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftDirectional.java
index 7c7f118dfe..88b765e2fa 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftDirectional.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftDirectional.java
@@ -4,20 +4,20 @@ import org.bukkit.block.data.Directional;
 
 public abstract class CraftDirectional extends CraftBlockData implements Directional {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum("facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum("facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftDirectional.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftDirectional.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftDirectional.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftFaceAttachable.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftFaceAttachable.java
index 6ab47e6b34..9cf2eb595c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftFaceAttachable.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftFaceAttachable.java
@@ -4,15 +4,15 @@ import org.bukkit.block.data.FaceAttachable;
 
 public abstract class CraftFaceAttachable extends CraftBlockData implements FaceAttachable {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> ATTACH_FACE = getEnum("face");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> ATTACH_FACE = getEnum("face");
 
     @Override
     public org.bukkit.block.data.FaceAttachable.AttachedFace getAttachedFace() {
-        return get(ATTACH_FACE, org.bukkit.block.data.FaceAttachable.AttachedFace.class);
+        return this.get(CraftFaceAttachable.ATTACH_FACE, org.bukkit.block.data.FaceAttachable.AttachedFace.class);
     }
 
     @Override
     public void setAttachedFace(org.bukkit.block.data.FaceAttachable.AttachedFace face) {
-        set(ATTACH_FACE, face);
+        this.set(CraftFaceAttachable.ATTACH_FACE, face);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftHangable.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftHangable.java
index e65c044226..5b99b7225c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftHangable.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftHangable.java
@@ -4,15 +4,15 @@ import org.bukkit.block.data.Hangable;
 
 public abstract class CraftHangable extends CraftBlockData implements Hangable {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean HANGING = getBoolean("hanging");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty HANGING = getBoolean("hanging");
 
     @Override
     public boolean isHanging() {
-        return get(HANGING);
+        return this.get(CraftHangable.HANGING);
     }
 
     @Override
     public void setHanging(boolean hanging) {
-        set(HANGING, hanging);
+        this.set(CraftHangable.HANGING, hanging);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftHatchable.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftHatchable.java
index 462bda804a..0e23223624 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftHatchable.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftHatchable.java
@@ -4,20 +4,20 @@ import org.bukkit.block.data.Hatchable;
 
 public abstract class CraftHatchable extends CraftBlockData implements Hatchable {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger HATCH = getInteger("hatch");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty HATCH = getInteger("hatch");
 
     @Override
     public int getHatch() {
-        return get(HATCH);
+        return this.get(CraftHatchable.HATCH);
     }
 
     @Override
     public void setHatch(int hatch) {
-        set(HATCH, hatch);
+        this.set(CraftHatchable.HATCH, hatch);
     }
 
     @Override
     public int getMaximumHatch() {
-        return getMax(HATCH);
+        return getMax(CraftHatchable.HATCH);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftLevelled.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftLevelled.java
index fb7b5ae8ca..a462418296 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftLevelled.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftLevelled.java
@@ -4,20 +4,20 @@ import org.bukkit.block.data.Levelled;
 
 public abstract class CraftLevelled extends CraftBlockData implements Levelled {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger LEVEL = getInteger("level");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty LEVEL = getInteger("level");
 
     @Override
     public int getLevel() {
-        return get(LEVEL);
+        return this.get(CraftLevelled.LEVEL);
     }
 
     @Override
     public void setLevel(int level) {
-        set(LEVEL, level);
+        this.set(CraftLevelled.LEVEL, level);
     }
 
     @Override
     public int getMaximumLevel() {
-        return getMax(LEVEL);
+        return getMax(CraftLevelled.LEVEL);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftLightable.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftLightable.java
index 684c868f0a..ca2b780037 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftLightable.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftLightable.java
@@ -4,15 +4,15 @@ import org.bukkit.block.data.Lightable;
 
 public abstract class CraftLightable extends CraftBlockData implements Lightable {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LIT = getBoolean("lit");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty LIT = getBoolean("lit");
 
     @Override
     public boolean isLit() {
-        return get(LIT);
+        return this.get(CraftLightable.LIT);
     }
 
     @Override
     public void setLit(boolean lit) {
-        set(LIT, lit);
+        this.set(CraftLightable.LIT, lit);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftMultipleFacing.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftMultipleFacing.java
index 7748d40de4..2d0af804bc 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftMultipleFacing.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftMultipleFacing.java
@@ -4,34 +4,34 @@ import org.bukkit.block.data.MultipleFacing;
 
 public abstract class CraftMultipleFacing extends CraftBlockData implements MultipleFacing {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] FACES = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty[] FACES = new net.minecraft.world.level.block.state.properties.BooleanProperty[]{
         getBoolean("north", true), getBoolean("east", true), getBoolean("south", true), getBoolean("west", true), getBoolean("up", true), getBoolean("down", true)
     };
 
     @Override
     public boolean hasFace(org.bukkit.block.BlockFace face) {
-        net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
+        net.minecraft.world.level.block.state.properties.BooleanProperty state = CraftMultipleFacing.FACES[face.ordinal()];
         if (state == null) {
             throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
         }
-        return get(state);
+        return this.get(state);
     }
 
     @Override
     public void setFace(org.bukkit.block.BlockFace face, boolean has) {
-        net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
+        net.minecraft.world.level.block.state.properties.BooleanProperty state = CraftMultipleFacing.FACES[face.ordinal()];
         if (state == null) {
             throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
         }
-        set(state, has);
+        this.set(state, has);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
         com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
 
-        for (int i = 0; i < FACES.length; i++) {
-            if (FACES[i] != null && get(FACES[i])) {
+        for (int i = 0; i < CraftMultipleFacing.FACES.length; i++) {
+            if (CraftMultipleFacing.FACES[i] != null && this.get(CraftMultipleFacing.FACES[i])) {
                 faces.add(org.bukkit.block.BlockFace.values()[i]);
             }
         }
@@ -43,8 +43,8 @@ public abstract class CraftMultipleFacing extends CraftBlockData implements Mult
     public java.util.Set<org.bukkit.block.BlockFace> getAllowedFaces() {
         com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
 
-        for (int i = 0; i < FACES.length; i++) {
-            if (FACES[i] != null) {
+        for (int i = 0; i < CraftMultipleFacing.FACES.length; i++) {
+            if (CraftMultipleFacing.FACES[i] != null) {
                 faces.add(org.bukkit.block.BlockFace.values()[i]);
             }
         }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftOpenable.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftOpenable.java
index 738e5c6b1f..46a0e3e4cb 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftOpenable.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftOpenable.java
@@ -4,15 +4,15 @@ import org.bukkit.block.data.Openable;
 
 public abstract class CraftOpenable extends CraftBlockData implements Openable {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean OPEN = getBoolean("open");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty OPEN = getBoolean("open");
 
     @Override
     public boolean isOpen() {
-        return get(OPEN);
+        return this.get(CraftOpenable.OPEN);
     }
 
     @Override
     public void setOpen(boolean open) {
-        set(OPEN, open);
+        this.set(CraftOpenable.OPEN, open);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftOrientable.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftOrientable.java
index b556d08170..55d96a0dc4 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftOrientable.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftOrientable.java
@@ -4,20 +4,20 @@ import org.bukkit.block.data.Orientable;
 
 public class CraftOrientable extends CraftBlockData implements Orientable {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> AXIS = getEnum("axis");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> AXIS = getEnum("axis");
 
     @Override
     public org.bukkit.Axis getAxis() {
-        return get(AXIS, org.bukkit.Axis.class);
+        return this.get(CraftOrientable.AXIS, org.bukkit.Axis.class);
     }
 
     @Override
     public void setAxis(org.bukkit.Axis axis) {
-        set(AXIS, axis);
+        this.set(CraftOrientable.AXIS, axis);
     }
 
     @Override
     public java.util.Set<org.bukkit.Axis> getAxes() {
-        return getValues(AXIS, org.bukkit.Axis.class);
+        return this.getValues(CraftOrientable.AXIS, org.bukkit.Axis.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftPowerable.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftPowerable.java
index bbe860fdba..70c58e0351 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftPowerable.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftPowerable.java
@@ -4,15 +4,15 @@ import org.bukkit.block.data.Powerable;
 
 public abstract class CraftPowerable extends CraftBlockData implements Powerable {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean("powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean("powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftPowerable.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftPowerable.POWERED, powered);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftRail.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftRail.java
index b44fe1cfcd..8a4937b38c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftRail.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftRail.java
@@ -4,20 +4,20 @@ import org.bukkit.block.data.Rail;
 
 public abstract class CraftRail extends CraftBlockData implements Rail {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> SHAPE = getEnum("shape");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> SHAPE = getEnum("shape");
 
     @Override
     public org.bukkit.block.data.Rail.Shape getShape() {
-        return get(SHAPE, org.bukkit.block.data.Rail.Shape.class);
+        return this.get(CraftRail.SHAPE, org.bukkit.block.data.Rail.Shape.class);
     }
 
     @Override
     public void setShape(org.bukkit.block.data.Rail.Shape shape) {
-        set(SHAPE, shape);
+        this.set(CraftRail.SHAPE, shape);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.data.Rail.Shape> getShapes() {
-        return getValues(SHAPE, org.bukkit.block.data.Rail.Shape.class);
+        return this.getValues(CraftRail.SHAPE, org.bukkit.block.data.Rail.Shape.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftRotatable.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftRotatable.java
index 907387eea0..665b52ad2a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftRotatable.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftRotatable.java
@@ -4,11 +4,11 @@ import org.bukkit.block.data.Rotatable;
 
 public abstract class CraftRotatable extends CraftBlockData implements Rotatable {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger ROTATION = getInteger("rotation");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty ROTATION = getInteger("rotation");
 
     @Override
     public org.bukkit.block.BlockFace getRotation() {
-        int data = get(ROTATION);
+        int data = this.get(CraftRotatable.ROTATION);
         switch (data) {
             case 0x0:
                 return org.bukkit.block.BlockFace.SOUTH;
@@ -102,6 +102,6 @@ public abstract class CraftRotatable extends CraftBlockData implements Rotatable
             default:
                 throw new IllegalArgumentException("Illegal rotation " + rotation);
         }
-        set(ROTATION, val);
+        this.set(CraftRotatable.ROTATION, val);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftSnowable.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftSnowable.java
index 81dba38519..1f5c02feb8 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftSnowable.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftSnowable.java
@@ -4,15 +4,15 @@ import org.bukkit.block.data.Snowable;
 
 public abstract class CraftSnowable extends CraftBlockData implements Snowable {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean SNOWY = getBoolean("snowy");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty SNOWY = getBoolean("snowy");
 
     @Override
     public boolean isSnowy() {
-        return get(SNOWY);
+        return this.get(CraftSnowable.SNOWY);
     }
 
     @Override
     public void setSnowy(boolean snowy) {
-        set(SNOWY, snowy);
+        this.set(CraftSnowable.SNOWY, snowy);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftWaterlogged.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftWaterlogged.java
index 43f2d7a6ca..73679510b9 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftWaterlogged.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/CraftWaterlogged.java
@@ -4,15 +4,15 @@ import org.bukkit.block.data.Waterlogged;
 
 public abstract class CraftWaterlogged extends CraftBlockData implements Waterlogged {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean("waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean("waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftWaterlogged.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftWaterlogged.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBamboo.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBamboo.java
index 1c5ba682db..2e657e4bcf 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBamboo.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBamboo.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftBamboo extends CraftBlockData implements Bamboo {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> LEAVES = getEnum("leaves");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> LEAVES = getEnum("leaves");
 
     @Override
     public org.bukkit.block.data.type.Bamboo.Leaves getLeaves() {
-        return get(LEAVES, org.bukkit.block.data.type.Bamboo.Leaves.class);
+        return this.get(CraftBamboo.LEAVES, org.bukkit.block.data.type.Bamboo.Leaves.class);
     }
 
     @Override
     public void setLeaves(org.bukkit.block.data.type.Bamboo.Leaves leaves) {
-        set(LEAVES, leaves);
+        this.set(CraftBamboo.LEAVES, leaves);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBed.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBed.java
index 3c12a80af3..f636a6b691 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBed.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBed.java
@@ -5,21 +5,21 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftBed extends CraftBlockData implements Bed {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> PART = getEnum("part");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean OCCUPIED = getBoolean("occupied");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> PART = getEnum("part");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty OCCUPIED = getBoolean("occupied");
 
     @Override
     public org.bukkit.block.data.type.Bed.Part getPart() {
-        return get(PART, org.bukkit.block.data.type.Bed.Part.class);
+        return this.get(CraftBed.PART, org.bukkit.block.data.type.Bed.Part.class);
     }
 
     @Override
     public void setPart(org.bukkit.block.data.type.Bed.Part part) {
-        set(PART, part);
+        this.set(CraftBed.PART, part);
     }
 
     @Override
     public boolean isOccupied() {
-        return get(OCCUPIED);
+        return this.get(CraftBed.OCCUPIED);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBeehive.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBeehive.java
index 8966c06ed0..cf4185a309 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBeehive.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBeehive.java
@@ -5,20 +5,20 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftBeehive extends CraftBlockData implements Beehive {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger HONEY_LEVEL = getInteger("honey_level");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty HONEY_LEVEL = getInteger("honey_level");
 
     @Override
     public int getHoneyLevel() {
-        return get(HONEY_LEVEL);
+        return this.get(CraftBeehive.HONEY_LEVEL);
     }
 
     @Override
     public void setHoneyLevel(int honeyLevel) {
-        set(HONEY_LEVEL, honeyLevel);
+        this.set(CraftBeehive.HONEY_LEVEL, honeyLevel);
     }
 
     @Override
     public int getMaximumHoneyLevel() {
-        return getMax(HONEY_LEVEL);
+        return getMax(CraftBeehive.HONEY_LEVEL);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBell.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBell.java
index a360627cec..7ffb256c33 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBell.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBell.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftBell extends CraftBlockData implements Bell {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> ATTACHMENT = getEnum("attachment");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> ATTACHMENT = getEnum("attachment");
 
     @Override
     public org.bukkit.block.data.type.Bell.Attachment getAttachment() {
-        return get(ATTACHMENT, org.bukkit.block.data.type.Bell.Attachment.class);
+        return this.get(CraftBell.ATTACHMENT, org.bukkit.block.data.type.Bell.Attachment.class);
     }
 
     @Override
     public void setAttachment(org.bukkit.block.data.type.Bell.Attachment leaves) {
-        set(ATTACHMENT, leaves);
+        this.set(CraftBell.ATTACHMENT, leaves);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBigDripleaf.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBigDripleaf.java
index bd509f2f15..25bbb744a8 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBigDripleaf.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBigDripleaf.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftBigDripleaf extends CraftBlockData implements BigDripleaf {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> TILT = getEnum("tilt");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> TILT = getEnum("tilt");
 
     @Override
     public Tilt getTilt() {
-        return get(TILT, org.bukkit.block.data.type.BigDripleaf.Tilt.class);
+        return this.get(CraftBigDripleaf.TILT, org.bukkit.block.data.type.BigDripleaf.Tilt.class);
     }
 
     @Override
     public void setTilt(org.bukkit.block.data.type.BigDripleaf.Tilt tilt) {
-        set(TILT, tilt);
+        this.set(CraftBigDripleaf.TILT, tilt);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBrewingStand.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBrewingStand.java
index b446b4d2f2..fceebad37f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBrewingStand.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBrewingStand.java
@@ -5,26 +5,26 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftBrewingStand extends CraftBlockData implements BrewingStand {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] HAS_BOTTLE = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty[] HAS_BOTTLE = new net.minecraft.world.level.block.state.properties.BooleanProperty[]{
         getBoolean("has_bottle_0"), getBoolean("has_bottle_1"), getBoolean("has_bottle_2")
     };
 
     @Override
     public boolean hasBottle(int bottle) {
-        return get(HAS_BOTTLE[bottle]);
+        return this.get(CraftBrewingStand.HAS_BOTTLE[bottle]);
     }
 
     @Override
     public void setBottle(int bottle, boolean has) {
-        set(HAS_BOTTLE[bottle], has);
+        this.set(CraftBrewingStand.HAS_BOTTLE[bottle], has);
     }
 
     @Override
     public java.util.Set<Integer> getBottles() {
         com.google.common.collect.ImmutableSet.Builder<Integer> bottles = com.google.common.collect.ImmutableSet.builder();
 
-        for (int index = 0; index < getMaximumBottles(); index++) {
-            if (hasBottle(index)) {
+        for (int index = 0; index < this.getMaximumBottles(); index++) {
+            if (this.hasBottle(index)) {
                 bottles.add(index);
             }
         }
@@ -34,6 +34,6 @@ public abstract class CraftBrewingStand extends CraftBlockData implements Brewin
 
     @Override
     public int getMaximumBottles() {
-        return HAS_BOTTLE.length;
+        return CraftBrewingStand.HAS_BOTTLE.length;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBrushable.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBrushable.java
index 444af6dda9..52f053b7ce 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBrushable.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBrushable.java
@@ -5,20 +5,20 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftBrushable extends CraftBlockData implements Brushable {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger DUSTED = getInteger("dusted");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty DUSTED = getInteger("dusted");
 
     @Override
     public int getDusted() {
-        return get(DUSTED);
+        return this.get(CraftBrushable.DUSTED);
     }
 
     @Override
     public void setDusted(int dusted) {
-        set(DUSTED, dusted);
+        this.set(CraftBrushable.DUSTED, dusted);
     }
 
     @Override
     public int getMaximumDusted() {
-        return getMax(DUSTED);
+        return getMax(CraftBrushable.DUSTED);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBubbleColumn.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBubbleColumn.java
index a5fc982c55..dd9661a5c6 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBubbleColumn.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftBubbleColumn.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftBubbleColumn extends CraftBlockData implements BubbleColumn {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean DRAG = getBoolean("drag");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty DRAG = getBoolean("drag");
 
     @Override
     public boolean isDrag() {
-        return get(DRAG);
+        return this.get(CraftBubbleColumn.DRAG);
     }
 
     @Override
     public void setDrag(boolean drag) {
-        set(DRAG, drag);
+        this.set(CraftBubbleColumn.DRAG, drag);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCake.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCake.java
index 24f0c31b5e..d33ab8bc33 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCake.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCake.java
@@ -5,20 +5,20 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftCake extends CraftBlockData implements Cake {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger BITES = getInteger("bites");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty BITES = getInteger("bites");
 
     @Override
     public int getBites() {
-        return get(BITES);
+        return this.get(CraftCake.BITES);
     }
 
     @Override
     public void setBites(int bites) {
-        set(BITES, bites);
+        this.set(CraftCake.BITES, bites);
     }
 
     @Override
     public int getMaximumBites() {
-        return getMax(BITES);
+        return getMax(CraftCake.BITES);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCampfire.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCampfire.java
index 3f13c29aac..cd69fa35be 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCampfire.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCampfire.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftCampfire extends CraftBlockData implements Campfire {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean SIGNAL_FIRE = getBoolean("signal_fire");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty SIGNAL_FIRE = getBoolean("signal_fire");
 
     @Override
     public boolean isSignalFire() {
-        return get(SIGNAL_FIRE);
+        return this.get(CraftCampfire.SIGNAL_FIRE);
     }
 
     @Override
     public void setSignalFire(boolean signalFire) {
-        set(SIGNAL_FIRE, signalFire);
+        this.set(CraftCampfire.SIGNAL_FIRE, signalFire);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCandle.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCandle.java
index 214779784e..8a3505009d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCandle.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCandle.java
@@ -5,20 +5,20 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftCandle extends CraftBlockData implements Candle {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger CANDLES = getInteger("candles");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty CANDLES = getInteger("candles");
 
     @Override
     public int getCandles() {
-        return get(CANDLES);
+        return this.get(CraftCandle.CANDLES);
     }
 
     @Override
     public void setCandles(int candles) {
-        set(CANDLES, candles);
+        this.set(CraftCandle.CANDLES, candles);
     }
 
     @Override
     public int getMaximumCandles() {
-        return getMax(CANDLES);
+        return getMax(CraftCandle.CANDLES);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCaveVinesPlant.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCaveVinesPlant.java
index 5cd6f7ef4f..52c032e5fb 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCaveVinesPlant.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCaveVinesPlant.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftCaveVinesPlant extends CraftBlockData implements CaveVinesPlant {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean BERRIES = getBoolean("berries");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty BERRIES = getBoolean("berries");
 
     @Override
     public boolean isBerries() {
-        return get(BERRIES);
+        return this.get(CraftCaveVinesPlant.BERRIES);
     }
 
     @Override
     public void setBerries(boolean berries) {
-        set(BERRIES, berries);
+        this.set(CraftCaveVinesPlant.BERRIES, berries);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftChest.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftChest.java
index bfb700be63..02ddf75b61 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftChest.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftChest.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftChest extends CraftBlockData implements Chest {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> TYPE = getEnum("type");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> TYPE = getEnum("type");
 
     @Override
     public org.bukkit.block.data.type.Chest.Type getType() {
-        return get(TYPE, org.bukkit.block.data.type.Chest.Type.class);
+        return this.get(CraftChest.TYPE, org.bukkit.block.data.type.Chest.Type.class);
     }
 
     @Override
     public void setType(org.bukkit.block.data.type.Chest.Type type) {
-        set(TYPE, type);
+        this.set(CraftChest.TYPE, type);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftChiseledBookshelf.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftChiseledBookshelf.java
index a7009f4ede..49a5c5c6b5 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftChiseledBookshelf.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftChiseledBookshelf.java
@@ -5,27 +5,27 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftChiseledBookshelf extends CraftBlockData implements ChiseledBookshelf {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] SLOT_OCCUPIED = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty[] SLOT_OCCUPIED = new net.minecraft.world.level.block.state.properties.BooleanProperty[]{
         getBoolean("slot_0_occupied"), getBoolean("slot_1_occupied"), getBoolean("slot_2_occupied"),
         getBoolean("slot_3_occupied"), getBoolean("slot_4_occupied"), getBoolean("slot_5_occupied")
     };
 
     @Override
     public boolean isSlotOccupied(int slot) {
-        return get(SLOT_OCCUPIED[slot]);
+        return this.get(CraftChiseledBookshelf.SLOT_OCCUPIED[slot]);
     }
 
     @Override
     public void setSlotOccupied(int slot, boolean has) {
-        set(SLOT_OCCUPIED[slot], has);
+        this.set(CraftChiseledBookshelf.SLOT_OCCUPIED[slot], has);
     }
 
     @Override
     public java.util.Set<Integer> getOccupiedSlots() {
         com.google.common.collect.ImmutableSet.Builder<Integer> slots = com.google.common.collect.ImmutableSet.builder();
 
-        for (int index = 0; index < getMaximumOccupiedSlots(); index++) {
-            if (isSlotOccupied(index)) {
+        for (int index = 0; index < this.getMaximumOccupiedSlots(); index++) {
+            if (this.isSlotOccupied(index)) {
                 slots.add(index);
             }
         }
@@ -35,6 +35,6 @@ public abstract class CraftChiseledBookshelf extends CraftBlockData implements C
 
     @Override
     public int getMaximumOccupiedSlots() {
-        return SLOT_OCCUPIED.length;
+        return CraftChiseledBookshelf.SLOT_OCCUPIED.length;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCommandBlock.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCommandBlock.java
index 132df87133..453573189b 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCommandBlock.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCommandBlock.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftCommandBlock extends CraftBlockData implements CommandBlock {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean CONDITIONAL = getBoolean("conditional");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty CONDITIONAL = getBoolean("conditional");
 
     @Override
     public boolean isConditional() {
-        return get(CONDITIONAL);
+        return this.get(CraftCommandBlock.CONDITIONAL);
     }
 
     @Override
     public void setConditional(boolean conditional) {
-        set(CONDITIONAL, conditional);
+        this.set(CraftCommandBlock.CONDITIONAL, conditional);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftComparator.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftComparator.java
index 09378dde46..d9bc382369 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftComparator.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftComparator.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftComparator extends CraftBlockData implements Comparator {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> MODE = getEnum("mode");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> MODE = getEnum("mode");
 
     @Override
     public org.bukkit.block.data.type.Comparator.Mode getMode() {
-        return get(MODE, org.bukkit.block.data.type.Comparator.Mode.class);
+        return this.get(CraftComparator.MODE, org.bukkit.block.data.type.Comparator.Mode.class);
     }
 
     @Override
     public void setMode(org.bukkit.block.data.type.Comparator.Mode mode) {
-        set(MODE, mode);
+        this.set(CraftComparator.MODE, mode);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCrafter.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCrafter.java
index afeb2283cd..b42a212b03 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCrafter.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCrafter.java
@@ -5,37 +5,37 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftCrafter extends CraftBlockData implements Crafter {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean CRAFTING = getBoolean("crafting");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean TRIGGERED = getBoolean("triggered");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> ORIENTATION = getEnum("orientation");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty CRAFTING = getBoolean("crafting");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty TRIGGERED = getBoolean("triggered");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> ORIENTATION = getEnum("orientation");
 
     @Override
     public boolean isCrafting() {
-        return get(CRAFTING);
+        return this.get(CraftCrafter.CRAFTING);
     }
 
     @Override
     public void setCrafting(boolean crafting) {
-        set(CRAFTING, crafting);
+        this.set(CraftCrafter.CRAFTING, crafting);
     }
 
     @Override
     public boolean isTriggered() {
-        return get(TRIGGERED);
+        return this.get(CraftCrafter.TRIGGERED);
     }
 
     @Override
     public void setTriggered(boolean triggered) {
-        set(TRIGGERED, triggered);
+        this.set(CraftCrafter.TRIGGERED, triggered);
     }
 
     @Override
     public org.bukkit.block.data.type.Crafter.Orientation getOrientation() {
-        return get(ORIENTATION, org.bukkit.block.data.type.Crafter.Orientation.class);
+        return this.get(CraftCrafter.ORIENTATION, org.bukkit.block.data.type.Crafter.Orientation.class);
     }
 
     @Override
     public void setOrientation(org.bukkit.block.data.type.Crafter.Orientation orientation) {
-        set(ORIENTATION, orientation);
+        this.set(CraftCrafter.ORIENTATION, orientation);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCreakingHeart.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCreakingHeart.java
index 1dd3689f27..03510587af 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCreakingHeart.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftCreakingHeart.java
@@ -5,26 +5,26 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftCreakingHeart extends CraftBlockData implements CreakingHeart {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean ACTIVE = getBoolean("active");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean NATURAL = getBoolean("natural");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty ACTIVE = getBoolean("active");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty NATURAL = getBoolean("natural");
 
     @Override
     public boolean isActive() {
-        return get(ACTIVE);
+        return this.get(CraftCreakingHeart.ACTIVE);
     }
 
     @Override
     public void setActive(boolean active) {
-        set(ACTIVE, active);
+        this.set(CraftCreakingHeart.ACTIVE, active);
     }
 
     @Override
     public boolean isNatural() {
-        return get(NATURAL);
+        return this.get(CraftCreakingHeart.NATURAL);
     }
 
     @Override
     public void setNatural(boolean natural) {
-        set(NATURAL, natural);
+        this.set(CraftCreakingHeart.NATURAL, natural);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftDaylightDetector.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftDaylightDetector.java
index f58d0ce468..87d092483a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftDaylightDetector.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftDaylightDetector.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftDaylightDetector extends CraftBlockData implements DaylightDetector {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean INVERTED = getBoolean("inverted");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty INVERTED = getBoolean("inverted");
 
     @Override
     public boolean isInverted() {
-        return get(INVERTED);
+        return this.get(CraftDaylightDetector.INVERTED);
     }
 
     @Override
     public void setInverted(boolean inverted) {
-        set(INVERTED, inverted);
+        this.set(CraftDaylightDetector.INVERTED, inverted);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftDispenser.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftDispenser.java
index c674d19e0f..911d02e8da 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftDispenser.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftDispenser.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftDispenser extends CraftBlockData implements Dispenser {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean TRIGGERED = getBoolean("triggered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty TRIGGERED = getBoolean("triggered");
 
     @Override
     public boolean isTriggered() {
-        return get(TRIGGERED);
+        return this.get(CraftDispenser.TRIGGERED);
     }
 
     @Override
     public void setTriggered(boolean triggered) {
-        set(TRIGGERED, triggered);
+        this.set(CraftDispenser.TRIGGERED, triggered);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftDoor.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftDoor.java
index 6681c43344..9563cb7994 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftDoor.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftDoor.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftDoor extends CraftBlockData implements Door {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> HINGE = getEnum("hinge");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> HINGE = getEnum("hinge");
 
     @Override
     public org.bukkit.block.data.type.Door.Hinge getHinge() {
-        return get(HINGE, org.bukkit.block.data.type.Door.Hinge.class);
+        return this.get(CraftDoor.HINGE, org.bukkit.block.data.type.Door.Hinge.class);
     }
 
     @Override
     public void setHinge(org.bukkit.block.data.type.Door.Hinge hinge) {
-        set(HINGE, hinge);
+        this.set(CraftDoor.HINGE, hinge);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftEndPortalFrame.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftEndPortalFrame.java
index af50653a15..d974174864 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftEndPortalFrame.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftEndPortalFrame.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftEndPortalFrame extends CraftBlockData implements EndPortalFrame {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean EYE = getBoolean("eye");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty EYE = getBoolean("eye");
 
     @Override
     public boolean hasEye() {
-        return get(EYE);
+        return this.get(CraftEndPortalFrame.EYE);
     }
 
     @Override
     public void setEye(boolean eye) {
-        set(EYE, eye);
+        this.set(CraftEndPortalFrame.EYE, eye);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftFarmland.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftFarmland.java
index 5d8f71f5ed..b90c918866 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftFarmland.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftFarmland.java
@@ -5,20 +5,20 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftFarmland extends CraftBlockData implements Farmland {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger MOISTURE = getInteger("moisture");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty MOISTURE = getInteger("moisture");
 
     @Override
     public int getMoisture() {
-        return get(MOISTURE);
+        return this.get(CraftFarmland.MOISTURE);
     }
 
     @Override
     public void setMoisture(int moisture) {
-        set(MOISTURE, moisture);
+        this.set(CraftFarmland.MOISTURE, moisture);
     }
 
     @Override
     public int getMaximumMoisture() {
-        return getMax(MOISTURE);
+        return getMax(CraftFarmland.MOISTURE);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftGate.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftGate.java
index 63e14889cc..cd2350f5a7 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftGate.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftGate.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftGate extends CraftBlockData implements Gate {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean IN_WALL = getBoolean("in_wall");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty IN_WALL = getBoolean("in_wall");
 
     @Override
     public boolean isInWall() {
-        return get(IN_WALL);
+        return this.get(CraftGate.IN_WALL);
     }
 
     @Override
     public void setInWall(boolean inWall) {
-        set(IN_WALL, inWall);
+        this.set(CraftGate.IN_WALL, inWall);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftHangingMoss.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftHangingMoss.java
index 1c81156c03..fe8699ed73 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftHangingMoss.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftHangingMoss.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftHangingMoss extends CraftBlockData implements HangingMoss {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean TIP = getBoolean("tip");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty TIP = getBoolean("tip");
 
     @Override
     public boolean isTip() {
-        return get(TIP);
+        return this.get(CraftHangingMoss.TIP);
     }
 
     @Override
     public void setTip(boolean tip) {
-        set(TIP, tip);
+        this.set(CraftHangingMoss.TIP, tip);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftHopper.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftHopper.java
index 5e11dc83b6..2da0ea263d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftHopper.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftHopper.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftHopper extends CraftBlockData implements Hopper {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean ENABLED = getBoolean("enabled");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty ENABLED = getBoolean("enabled");
 
     @Override
     public boolean isEnabled() {
-        return get(ENABLED);
+        return this.get(CraftHopper.ENABLED);
     }
 
     @Override
     public void setEnabled(boolean enabled) {
-        set(ENABLED, enabled);
+        this.set(CraftHopper.ENABLED, enabled);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftJigsaw.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftJigsaw.java
index 9538eaa8d4..0c88bb8248 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftJigsaw.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftJigsaw.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftJigsaw extends CraftBlockData implements Jigsaw {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> ORIENTATION = getEnum("orientation");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> ORIENTATION = getEnum("orientation");
 
     @Override
     public org.bukkit.block.data.type.Jigsaw.Orientation getOrientation() {
-        return get(ORIENTATION, org.bukkit.block.data.type.Jigsaw.Orientation.class);
+        return this.get(CraftJigsaw.ORIENTATION, org.bukkit.block.data.type.Jigsaw.Orientation.class);
     }
 
     @Override
     public void setOrientation(org.bukkit.block.data.type.Jigsaw.Orientation orientation) {
-        set(ORIENTATION, orientation);
+        this.set(CraftJigsaw.ORIENTATION, orientation);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftJukebox.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftJukebox.java
index fc5f588f72..2f22f99bc0 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftJukebox.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftJukebox.java
@@ -5,10 +5,10 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftJukebox extends CraftBlockData implements Jukebox {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean HAS_RECORD = getBoolean("has_record");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty HAS_RECORD = getBoolean("has_record");
 
     @Override
     public boolean hasRecord() {
-        return get(HAS_RECORD);
+        return this.get(CraftJukebox.HAS_RECORD);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLeaves.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLeaves.java
index 6edeaf0859..832c984bc9 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLeaves.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLeaves.java
@@ -5,26 +5,26 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftLeaves extends CraftBlockData implements Leaves {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger DISTANCE = getInteger("distance");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean PERSISTENT = getBoolean("persistent");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty DISTANCE = getInteger("distance");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty PERSISTENT = getBoolean("persistent");
 
     @Override
     public boolean isPersistent() {
-        return get(PERSISTENT);
+        return this.get(CraftLeaves.PERSISTENT);
     }
 
     @Override
     public void setPersistent(boolean persistent) {
-        set(PERSISTENT, persistent);
+        this.set(CraftLeaves.PERSISTENT, persistent);
     }
 
     @Override
     public int getDistance() {
-        return get(DISTANCE);
+        return this.get(CraftLeaves.DISTANCE);
     }
 
     @Override
     public void setDistance(int distance) {
-        set(DISTANCE, distance);
+        this.set(CraftLeaves.DISTANCE, distance);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLectern.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLectern.java
index b585ed5480..dcbe832b19 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLectern.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftLectern.java
@@ -5,10 +5,10 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftLectern extends CraftBlockData implements Lectern {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean HAS_BOOK = getBoolean("has_book");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty HAS_BOOK = getBoolean("has_book");
 
     @Override
     public boolean hasBook() {
-        return get(HAS_BOOK);
+        return this.get(CraftLectern.HAS_BOOK);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftMossyCarpet.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftMossyCarpet.java
index 462fc498eb..80a646334e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftMossyCarpet.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftMossyCarpet.java
@@ -5,28 +5,28 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftMossyCarpet extends CraftBlockData implements MossyCarpet {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean BOTTOM = getBoolean("bottom");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?>[] HEIGHTS = new net.minecraft.world.level.block.state.properties.BlockStateEnum[]{
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty BOTTOM = getBoolean("bottom");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?>[] HEIGHTS = new net.minecraft.world.level.block.state.properties.EnumProperty[]{
         getEnum("north"), getEnum("east"), getEnum("south"), getEnum("west")
     };
 
     @Override
     public boolean isBottom() {
-        return get(BOTTOM);
+        return this.get(CraftMossyCarpet.BOTTOM);
     }
 
     @Override
     public void setBottom(boolean up) {
-        set(BOTTOM, up);
+        this.set(CraftMossyCarpet.BOTTOM, up);
     }
 
     @Override
     public org.bukkit.block.data.type.MossyCarpet.Height getHeight(org.bukkit.block.BlockFace face) {
-        return get(HEIGHTS[face.ordinal()], org.bukkit.block.data.type.MossyCarpet.Height.class);
+        return this.get(CraftMossyCarpet.HEIGHTS[face.ordinal()], org.bukkit.block.data.type.MossyCarpet.Height.class);
     }
 
     @Override
     public void setHeight(org.bukkit.block.BlockFace face, org.bukkit.block.data.type.MossyCarpet.Height height) {
-        set(HEIGHTS[face.ordinal()], height);
+        this.set(CraftMossyCarpet.HEIGHTS[face.ordinal()], height);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftNoteBlock.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftNoteBlock.java
index 70cb460d2e..c44d33fb3a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftNoteBlock.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftNoteBlock.java
@@ -5,26 +5,26 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftNoteBlock extends CraftBlockData implements NoteBlock {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> INSTRUMENT = getEnum("instrument");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger NOTE = getInteger("note");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> INSTRUMENT = getEnum("instrument");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty NOTE = getInteger("note");
 
     @Override
     public org.bukkit.Instrument getInstrument() {
-        return get(INSTRUMENT, org.bukkit.Instrument.class);
+        return this.get(CraftNoteBlock.INSTRUMENT, org.bukkit.Instrument.class);
     }
 
     @Override
     public void setInstrument(org.bukkit.Instrument instrument) {
-        set(INSTRUMENT, instrument);
+        this.set(CraftNoteBlock.INSTRUMENT, instrument);
     }
 
     @Override
     public org.bukkit.Note getNote() {
-       return new org.bukkit.Note(get(NOTE));
+       return new org.bukkit.Note(this.get(CraftNoteBlock.NOTE));
     }
 
     @Override
     public void setNote(org.bukkit.Note note) {
-        set(NOTE, (int) note.getId());
+        this.set(CraftNoteBlock.NOTE, (int) note.getId());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftPinkPetals.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftPinkPetals.java
index cbf3f5cb9e..97fd7e4a39 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftPinkPetals.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftPinkPetals.java
@@ -5,20 +5,20 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftPinkPetals extends CraftBlockData implements PinkPetals {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger FLOWER_AMOUNT = getInteger("flower_amount");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty FLOWER_AMOUNT = getInteger("flower_amount");
 
     @Override
     public int getFlowerAmount() {
-        return get(FLOWER_AMOUNT);
+        return this.get(CraftPinkPetals.FLOWER_AMOUNT);
     }
 
     @Override
     public void setFlowerAmount(int flower_amount) {
-        set(FLOWER_AMOUNT, flower_amount);
+        this.set(CraftPinkPetals.FLOWER_AMOUNT, flower_amount);
     }
 
     @Override
     public int getMaximumFlowerAmount() {
-        return getMax(FLOWER_AMOUNT);
+        return getMax(CraftPinkPetals.FLOWER_AMOUNT);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftPiston.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftPiston.java
index 061e5c1248..193cf626c4 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftPiston.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftPiston.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftPiston extends CraftBlockData implements Piston {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean EXTENDED = getBoolean("extended");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty EXTENDED = getBoolean("extended");
 
     @Override
     public boolean isExtended() {
-        return get(EXTENDED);
+        return this.get(CraftPiston.EXTENDED);
     }
 
     @Override
     public void setExtended(boolean extended) {
-        set(EXTENDED, extended);
+        this.set(CraftPiston.EXTENDED, extended);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftPistonHead.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftPistonHead.java
index 1dc2cdaac0..07447b9550 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftPistonHead.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftPistonHead.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftPistonHead extends CraftBlockData implements PistonHead {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean SHORT = getBoolean("short");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty SHORT = getBoolean("short");
 
     @Override
     public boolean isShort() {
-        return get(SHORT);
+        return this.get(CraftPistonHead.SHORT);
     }
 
     @Override
     public void setShort(boolean _short) {
-        set(SHORT, _short);
+        this.set(CraftPistonHead.SHORT, _short);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftPointedDripstone.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftPointedDripstone.java
index f677c007a9..bfff4e16b2 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftPointedDripstone.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftPointedDripstone.java
@@ -5,31 +5,31 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftPointedDripstone extends CraftBlockData implements PointedDripstone {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> VERTICAL_DIRECTION = getEnum("vertical_direction");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> THICKNESS = getEnum("thickness");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> VERTICAL_DIRECTION = getEnum("vertical_direction");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> THICKNESS = getEnum("thickness");
 
     @Override
     public org.bukkit.block.BlockFace getVerticalDirection() {
-        return get(VERTICAL_DIRECTION, org.bukkit.block.BlockFace.class);
+        return this.get(CraftPointedDripstone.VERTICAL_DIRECTION, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setVerticalDirection(org.bukkit.block.BlockFace direction) {
-        set(VERTICAL_DIRECTION, direction);
+        this.set(CraftPointedDripstone.VERTICAL_DIRECTION, direction);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getVerticalDirections() {
-        return getValues(VERTICAL_DIRECTION, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftPointedDripstone.VERTICAL_DIRECTION, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public org.bukkit.block.data.type.PointedDripstone.Thickness getThickness() {
-        return get(THICKNESS, org.bukkit.block.data.type.PointedDripstone.Thickness.class);
+        return this.get(CraftPointedDripstone.THICKNESS, org.bukkit.block.data.type.PointedDripstone.Thickness.class);
     }
 
     @Override
     public void setThickness(org.bukkit.block.data.type.PointedDripstone.Thickness thickness) {
-        set(THICKNESS, thickness);
+        this.set(CraftPointedDripstone.THICKNESS, thickness);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftRedstoneWire.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftRedstoneWire.java
index 962b9982c2..9d1f4d0b20 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftRedstoneWire.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftRedstoneWire.java
@@ -5,22 +5,22 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftRedstoneWire extends CraftBlockData implements RedstoneWire {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> NORTH = getEnum("north");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> EAST = getEnum("east");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> SOUTH = getEnum("south");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> WEST = getEnum("west");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> NORTH = getEnum("north");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> EAST = getEnum("east");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> SOUTH = getEnum("south");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> WEST = getEnum("west");
 
     @Override
     public org.bukkit.block.data.type.RedstoneWire.Connection getFace(org.bukkit.block.BlockFace face) {
         switch (face) {
             case NORTH:
-                return get(NORTH, org.bukkit.block.data.type.RedstoneWire.Connection.class);
+                return this.get(CraftRedstoneWire.NORTH, org.bukkit.block.data.type.RedstoneWire.Connection.class);
             case EAST:
-                return get(EAST, org.bukkit.block.data.type.RedstoneWire.Connection.class);
+                return this.get(CraftRedstoneWire.EAST, org.bukkit.block.data.type.RedstoneWire.Connection.class);
             case SOUTH:
-                return get(SOUTH, org.bukkit.block.data.type.RedstoneWire.Connection.class);
+                return this.get(CraftRedstoneWire.SOUTH, org.bukkit.block.data.type.RedstoneWire.Connection.class);
             case WEST:
-                return get(WEST, org.bukkit.block.data.type.RedstoneWire.Connection.class);
+                return this.get(CraftRedstoneWire.WEST, org.bukkit.block.data.type.RedstoneWire.Connection.class);
             default:
                 throw new IllegalArgumentException("Cannot have face " + face);
         }
@@ -30,16 +30,16 @@ public abstract class CraftRedstoneWire extends CraftBlockData implements Redsto
     public void setFace(org.bukkit.block.BlockFace face, org.bukkit.block.data.type.RedstoneWire.Connection connection) {
         switch (face) {
             case NORTH:
-                set(NORTH, connection);
+                this.set(CraftRedstoneWire.NORTH, connection);
                 break;
             case EAST:
-                set(EAST, connection);
+                this.set(CraftRedstoneWire.EAST, connection);
                 break;
             case SOUTH:
-                set(SOUTH, connection);
+                this.set(CraftRedstoneWire.SOUTH, connection);
                 break;
             case WEST:
-                set(WEST, connection);
+                this.set(CraftRedstoneWire.WEST, connection);
                 break;
             default:
                 throw new IllegalArgumentException("Cannot have face " + face);
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftRepeater.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftRepeater.java
index a43a4dfaf6..8f2f55f917 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftRepeater.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftRepeater.java
@@ -5,36 +5,36 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftRepeater extends CraftBlockData implements Repeater {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger DELAY = getInteger("delay");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LOCKED = getBoolean("locked");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty DELAY = getInteger("delay");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty LOCKED = getBoolean("locked");
 
     @Override
     public int getDelay() {
-        return get(DELAY);
+        return this.get(CraftRepeater.DELAY);
     }
 
     @Override
     public void setDelay(int delay) {
-        set(DELAY, delay);
+        this.set(CraftRepeater.DELAY, delay);
     }
 
     @Override
     public int getMinimumDelay() {
-        return getMin(DELAY);
+        return getMin(CraftRepeater.DELAY);
     }
 
     @Override
     public int getMaximumDelay() {
-        return getMax(DELAY);
+        return getMax(CraftRepeater.DELAY);
     }
 
     @Override
     public boolean isLocked() {
-        return get(LOCKED);
+        return this.get(CraftRepeater.LOCKED);
     }
 
     @Override
     public void setLocked(boolean locked) {
-        set(LOCKED, locked);
+        this.set(CraftRepeater.LOCKED, locked);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftRespawnAnchor.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftRespawnAnchor.java
index 797326ff68..eb4f393801 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftRespawnAnchor.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftRespawnAnchor.java
@@ -5,20 +5,20 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftRespawnAnchor extends CraftBlockData implements RespawnAnchor {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger CHARGES = getInteger("charges");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty CHARGES = getInteger("charges");
 
     @Override
     public int getCharges() {
-        return get(CHARGES);
+        return this.get(CraftRespawnAnchor.CHARGES);
     }
 
     @Override
     public void setCharges(int charges) {
-        set(CHARGES, charges);
+        this.set(CraftRespawnAnchor.CHARGES, charges);
     }
 
     @Override
     public int getMaximumCharges() {
-        return getMax(CHARGES);
+        return getMax(CraftRespawnAnchor.CHARGES);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSapling.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSapling.java
index b8dedea6c6..a0a4249e7f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSapling.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSapling.java
@@ -5,20 +5,20 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftSapling extends CraftBlockData implements Sapling {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger STAGE = getInteger("stage");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty STAGE = getInteger("stage");
 
     @Override
     public int getStage() {
-        return get(STAGE);
+        return this.get(CraftSapling.STAGE);
     }
 
     @Override
     public void setStage(int stage) {
-        set(STAGE, stage);
+        this.set(CraftSapling.STAGE, stage);
     }
 
     @Override
     public int getMaximumStage() {
-        return getMax(STAGE);
+        return getMax(CraftSapling.STAGE);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftScaffolding.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftScaffolding.java
index f80edd8935..d8f4ddf8cf 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftScaffolding.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftScaffolding.java
@@ -5,31 +5,31 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftScaffolding extends CraftBlockData implements Scaffolding {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean BOTTOM = getBoolean("bottom");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger DISTANCE = getInteger("distance");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty BOTTOM = getBoolean("bottom");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty DISTANCE = getInteger("distance");
 
     @Override
     public boolean isBottom() {
-        return get(BOTTOM);
+        return this.get(CraftScaffolding.BOTTOM);
     }
 
     @Override
     public void setBottom(boolean bottom) {
-        set(BOTTOM, bottom);
+        this.set(CraftScaffolding.BOTTOM, bottom);
     }
 
     @Override
     public int getDistance() {
-        return get(DISTANCE);
+        return this.get(CraftScaffolding.DISTANCE);
     }
 
     @Override
     public void setDistance(int distance) {
-        set(DISTANCE, distance);
+        this.set(CraftScaffolding.DISTANCE, distance);
     }
 
     @Override
     public int getMaximumDistance() {
-        return getMax(DISTANCE);
+        return getMax(CraftScaffolding.DISTANCE);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSculkCatalyst.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSculkCatalyst.java
index d35ed668a0..8b714e0371 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSculkCatalyst.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSculkCatalyst.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftSculkCatalyst extends CraftBlockData implements SculkCatalyst {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean BLOOM = getBoolean("bloom");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty BLOOM = getBoolean("bloom");
 
     @Override
     public boolean isBloom() {
-        return get(BLOOM);
+        return this.get(CraftSculkCatalyst.BLOOM);
     }
 
     @Override
     public void setBloom(boolean bloom) {
-        set(BLOOM, bloom);
+        this.set(CraftSculkCatalyst.BLOOM, bloom);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSculkSensor.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSculkSensor.java
index c1a764879c..de48a235af 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSculkSensor.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSculkSensor.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftSculkSensor extends CraftBlockData implements SculkSensor {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> PHASE = getEnum("sculk_sensor_phase");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> PHASE = getEnum("sculk_sensor_phase");
 
     @Override
     public org.bukkit.block.data.type.SculkSensor.Phase getPhase() {
-        return get(PHASE, org.bukkit.block.data.type.SculkSensor.Phase.class);
+        return this.get(CraftSculkSensor.PHASE, org.bukkit.block.data.type.SculkSensor.Phase.class);
     }
 
     @Override
     public void setPhase(org.bukkit.block.data.type.SculkSensor.Phase phase) {
-        set(PHASE, phase);
+        this.set(CraftSculkSensor.PHASE, phase);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSculkShrieker.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSculkShrieker.java
index 714a3625d4..a3fb0f17aa 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSculkShrieker.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSculkShrieker.java
@@ -5,26 +5,26 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftSculkShrieker extends CraftBlockData implements SculkShrieker {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean CAN_SUMMON = getBoolean("can_summon");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean SHRIEKING = getBoolean("shrieking");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty CAN_SUMMON = getBoolean("can_summon");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty SHRIEKING = getBoolean("shrieking");
 
     @Override
     public boolean isCanSummon() {
-        return get(CAN_SUMMON);
+        return this.get(CraftSculkShrieker.CAN_SUMMON);
     }
 
     @Override
     public void setCanSummon(boolean can_summon) {
-        set(CAN_SUMMON, can_summon);
+        this.set(CraftSculkShrieker.CAN_SUMMON, can_summon);
     }
 
     @Override
     public boolean isShrieking() {
-        return get(SHRIEKING);
+        return this.get(CraftSculkShrieker.SHRIEKING);
     }
 
     @Override
     public void setShrieking(boolean shrieking) {
-        set(SHRIEKING, shrieking);
+        this.set(CraftSculkShrieker.SHRIEKING, shrieking);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSeaPickle.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSeaPickle.java
index bf92e11efe..71ab0b24a7 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSeaPickle.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSeaPickle.java
@@ -5,25 +5,25 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftSeaPickle extends CraftBlockData implements SeaPickle {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger PICKLES = getInteger("pickles");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty PICKLES = getInteger("pickles");
 
     @Override
     public int getPickles() {
-        return get(PICKLES);
+        return this.get(CraftSeaPickle.PICKLES);
     }
 
     @Override
     public void setPickles(int pickles) {
-        set(PICKLES, pickles);
+        this.set(CraftSeaPickle.PICKLES, pickles);
     }
 
     @Override
     public int getMinimumPickles() {
-        return getMin(PICKLES);
+        return getMin(CraftSeaPickle.PICKLES);
     }
 
     @Override
     public int getMaximumPickles() {
-        return getMax(PICKLES);
+        return getMax(CraftSeaPickle.PICKLES);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSlab.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSlab.java
index 31380b3d10..c64c1baa7e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSlab.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSlab.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftSlab extends CraftBlockData implements Slab {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> TYPE = getEnum("type");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> TYPE = getEnum("type");
 
     @Override
     public org.bukkit.block.data.type.Slab.Type getType() {
-        return get(TYPE, org.bukkit.block.data.type.Slab.Type.class);
+        return this.get(CraftSlab.TYPE, org.bukkit.block.data.type.Slab.Type.class);
     }
 
     @Override
     public void setType(org.bukkit.block.data.type.Slab.Type type) {
-        set(TYPE, type);
+        this.set(CraftSlab.TYPE, type);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSnow.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSnow.java
index 7002206b8e..e3c9182866 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSnow.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSnow.java
@@ -5,25 +5,25 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public class CraftSnow extends CraftBlockData implements Snow {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger LAYERS = getInteger("layers");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty LAYERS = getInteger("layers");
 
     @Override
     public int getLayers() {
-        return get(LAYERS);
+        return this.get(CraftSnow.LAYERS);
     }
 
     @Override
     public void setLayers(int layers) {
-        set(LAYERS, layers);
+        this.set(CraftSnow.LAYERS, layers);
     }
 
     @Override
     public int getMinimumLayers() {
-        return getMin(LAYERS);
+        return getMin(CraftSnow.LAYERS);
     }
 
     @Override
     public int getMaximumLayers() {
-        return getMax(LAYERS);
+        return getMax(CraftSnow.LAYERS);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftStairs.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftStairs.java
index 47d914f1d7..1155492322 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftStairs.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftStairs.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftStairs extends CraftBlockData implements Stairs {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> SHAPE = getEnum("shape");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> SHAPE = getEnum("shape");
 
     @Override
     public org.bukkit.block.data.type.Stairs.Shape getShape() {
-        return get(SHAPE, org.bukkit.block.data.type.Stairs.Shape.class);
+        return this.get(CraftStairs.SHAPE, org.bukkit.block.data.type.Stairs.Shape.class);
     }
 
     @Override
     public void setShape(org.bukkit.block.data.type.Stairs.Shape shape) {
-        set(SHAPE, shape);
+        this.set(CraftStairs.SHAPE, shape);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftStructureBlock.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftStructureBlock.java
index f568d7a442..dc4cb64ade 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftStructureBlock.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftStructureBlock.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftStructureBlock extends CraftBlockData implements StructureBlock {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> MODE = getEnum("mode");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> MODE = getEnum("mode");
 
     @Override
     public org.bukkit.block.data.type.StructureBlock.Mode getMode() {
-        return get(MODE, org.bukkit.block.data.type.StructureBlock.Mode.class);
+        return this.get(CraftStructureBlock.MODE, org.bukkit.block.data.type.StructureBlock.Mode.class);
     }
 
     @Override
     public void setMode(org.bukkit.block.data.type.StructureBlock.Mode mode) {
-        set(MODE, mode);
+        this.set(CraftStructureBlock.MODE, mode);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSwitch.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSwitch.java
index 4b12349fd9..f756460fc5 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSwitch.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftSwitch.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftSwitch extends CraftBlockData implements Switch {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACE = getEnum("face");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACE = getEnum("face");
 
     @Override
     public org.bukkit.block.data.type.Switch.Face getFace() {
-        return get(FACE, org.bukkit.block.data.type.Switch.Face.class);
+        return this.get(CraftSwitch.FACE, org.bukkit.block.data.type.Switch.Face.class);
     }
 
     @Override
     public void setFace(org.bukkit.block.data.type.Switch.Face face) {
-        set(FACE, face);
+        this.set(CraftSwitch.FACE, face);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTNT.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTNT.java
index 2f431bd4f7..47fa133dd5 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTNT.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTNT.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftTNT extends CraftBlockData implements TNT {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean UNSTABLE = getBoolean("unstable");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty UNSTABLE = getBoolean("unstable");
 
     @Override
     public boolean isUnstable() {
-        return get(UNSTABLE);
+        return this.get(CraftTNT.UNSTABLE);
     }
 
     @Override
     public void setUnstable(boolean unstable) {
-        set(UNSTABLE, unstable);
+        this.set(CraftTNT.UNSTABLE, unstable);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTechnicalPiston.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTechnicalPiston.java
index 0ad988f652..8a9b45733c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTechnicalPiston.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTechnicalPiston.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftTechnicalPiston extends CraftBlockData implements TechnicalPiston {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> TYPE = getEnum("type");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> TYPE = getEnum("type");
 
     @Override
     public org.bukkit.block.data.type.TechnicalPiston.Type getType() {
-        return get(TYPE, org.bukkit.block.data.type.TechnicalPiston.Type.class);
+        return this.get(CraftTechnicalPiston.TYPE, org.bukkit.block.data.type.TechnicalPiston.Type.class);
     }
 
     @Override
     public void setType(org.bukkit.block.data.type.TechnicalPiston.Type type) {
-        set(TYPE, type);
+        this.set(CraftTechnicalPiston.TYPE, type);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTrialSpawner.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTrialSpawner.java
index e212c5be52..9aba1df5d1 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTrialSpawner.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTrialSpawner.java
@@ -5,26 +5,26 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftTrialSpawner extends CraftBlockData implements TrialSpawner {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> TRIAL_SPAWNER_STATE = getEnum("trial_spawner_state");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean OMINOUS = getBoolean("ominous");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> TRIAL_SPAWNER_STATE = getEnum("trial_spawner_state");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty OMINOUS = getBoolean("ominous");
 
     @Override
     public org.bukkit.block.data.type.TrialSpawner.State getTrialSpawnerState() {
-        return get(TRIAL_SPAWNER_STATE, org.bukkit.block.data.type.TrialSpawner.State.class);
+        return this.get(CraftTrialSpawner.TRIAL_SPAWNER_STATE, org.bukkit.block.data.type.TrialSpawner.State.class);
     }
 
     @Override
     public void setTrialSpawnerState(org.bukkit.block.data.type.TrialSpawner.State state) {
-        set(TRIAL_SPAWNER_STATE, state);
+        this.set(CraftTrialSpawner.TRIAL_SPAWNER_STATE, state);
     }
 
     @Override
     public boolean isOminous() {
-        return get(OMINOUS);
+        return this.get(CraftTrialSpawner.OMINOUS);
     }
 
     @Override
     public void setOminous(boolean ominous) {
-        set(OMINOUS, ominous);
+        this.set(CraftTrialSpawner.OMINOUS, ominous);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTripwire.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTripwire.java
index 7f8dda3ec3..7e943cdf00 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTripwire.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTripwire.java
@@ -5,15 +5,15 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftTripwire extends CraftBlockData implements Tripwire {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean DISARMED = getBoolean("disarmed");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty DISARMED = getBoolean("disarmed");
 
     @Override
     public boolean isDisarmed() {
-        return get(DISARMED);
+        return this.get(CraftTripwire.DISARMED);
     }
 
     @Override
     public void setDisarmed(boolean disarmed) {
-        set(DISARMED, disarmed);
+        this.set(CraftTripwire.DISARMED, disarmed);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTurtleEgg.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTurtleEgg.java
index 2150d67ecd..98c0a4e9cd 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTurtleEgg.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftTurtleEgg.java
@@ -5,25 +5,25 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftTurtleEgg extends CraftBlockData implements TurtleEgg {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger EGGS = getInteger("eggs");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty EGGS = getInteger("eggs");
 
     @Override
     public int getEggs() {
-        return get(EGGS);
+        return this.get(CraftTurtleEgg.EGGS);
     }
 
     @Override
     public void setEggs(int eggs) {
-        set(EGGS, eggs);
+        this.set(CraftTurtleEgg.EGGS, eggs);
     }
 
     @Override
     public int getMinimumEggs() {
-        return getMin(EGGS);
+        return getMin(CraftTurtleEgg.EGGS);
     }
 
     @Override
     public int getMaximumEggs() {
-        return getMax(EGGS);
+        return getMax(CraftTurtleEgg.EGGS);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftVault.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftVault.java
index aea57911e6..37c850cccb 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftVault.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftVault.java
@@ -5,36 +5,36 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftVault extends CraftBlockData implements Vault {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> VAULT_STATE = getEnum("vault_state");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean OMINOUS = getBoolean("ominous");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> VAULT_STATE = getEnum("vault_state");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty OMINOUS = getBoolean("ominous");
 
     @Override
     public org.bukkit.block.data.type.Vault.State getVaultState() {
-        return get(VAULT_STATE, org.bukkit.block.data.type.Vault.State.class);
+        return this.get(CraftVault.VAULT_STATE, org.bukkit.block.data.type.Vault.State.class);
     }
 
     @Override
     public org.bukkit.block.data.type.Vault.State getTrialSpawnerState() {
-        return getVaultState();
+        return this.getVaultState();
     }
 
     @Override
     public void setVaultState(org.bukkit.block.data.type.Vault.State state) {
-        set(VAULT_STATE, state);
+        this.set(CraftVault.VAULT_STATE, state);
     }
 
     @Override
     public void setTrialSpawnerState(org.bukkit.block.data.type.Vault.State state) {
-        setVaultState(state);
+        this.setVaultState(state);
     }
 
     @Override
     public boolean isOminous() {
-        return get(OMINOUS);
+        return this.get(CraftVault.OMINOUS);
     }
 
     @Override
     public void setOminous(boolean ominous) {
-        set(OMINOUS, ominous);
+        this.set(CraftVault.OMINOUS, ominous);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftWall.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftWall.java
index c02ab57d94..00f287a84f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftWall.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/data/type/CraftWall.java
@@ -5,28 +5,28 @@ import org.bukkit.craftbukkit.block.data.CraftBlockData;
 
 public abstract class CraftWall extends CraftBlockData implements Wall {
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean UP = getBoolean("up");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?>[] HEIGHTS = new net.minecraft.world.level.block.state.properties.BlockStateEnum[]{
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty UP = getBoolean("up");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?>[] HEIGHTS = new net.minecraft.world.level.block.state.properties.EnumProperty[]{
         getEnum("north"), getEnum("east"), getEnum("south"), getEnum("west")
     };
 
     @Override
     public boolean isUp() {
-        return get(UP);
+        return this.get(CraftWall.UP);
     }
 
     @Override
     public void setUp(boolean up) {
-        set(UP, up);
+        this.set(CraftWall.UP, up);
     }
 
     @Override
     public org.bukkit.block.data.type.Wall.Height getHeight(org.bukkit.block.BlockFace face) {
-        return get(HEIGHTS[face.ordinal()], org.bukkit.block.data.type.Wall.Height.class);
+        return this.get(CraftWall.HEIGHTS[face.ordinal()], org.bukkit.block.data.type.Wall.Height.class);
     }
 
     @Override
     public void setHeight(org.bukkit.block.BlockFace face, org.bukkit.block.data.type.Wall.Height height) {
-        set(HEIGHTS[face.ordinal()], height);
+        this.set(CraftWall.HEIGHTS[face.ordinal()], height);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftAmethystCluster.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftAmethystCluster.java
index 311ce20cf7..a78c931b3f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftAmethystCluster.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftAmethystCluster.java
@@ -9,40 +9,40 @@ public final class CraftAmethystCluster extends org.bukkit.craftbukkit.block.dat
         super();
     }
 
-    public CraftAmethystCluster(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftAmethystCluster(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.AmethystClusterBlock.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.AmethystClusterBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftAmethystCluster.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftAmethystCluster.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftAmethystCluster.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.AmethystClusterBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.AmethystClusterBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftAmethystCluster.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftAmethystCluster.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftAnvil.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftAnvil.java
index e874ad40e0..b2ffbebdeb 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftAnvil.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftAnvil.java
@@ -9,26 +9,26 @@ public final class CraftAnvil extends org.bukkit.craftbukkit.block.data.CraftBlo
         super();
     }
 
-    public CraftAnvil(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftAnvil(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockAnvil.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.AnvilBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftAnvil.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftAnvil.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftAnvil.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBamboo.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBamboo.java
index 3f3a1d107b..ef37065539 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBamboo.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBamboo.java
@@ -9,59 +9,59 @@ public final class CraftBamboo extends org.bukkit.craftbukkit.block.data.CraftBl
         super();
     }
 
-    public CraftBamboo(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftBamboo(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftBamboo
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> LEAVES = getEnum(net.minecraft.world.level.block.BlockBamboo.class, "leaves");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> LEAVES = getEnum(net.minecraft.world.level.block.BambooStalkBlock.class, "leaves");
 
     @Override
     public org.bukkit.block.data.type.Bamboo.Leaves getLeaves() {
-        return get(LEAVES, org.bukkit.block.data.type.Bamboo.Leaves.class);
+        return this.get(CraftBamboo.LEAVES, org.bukkit.block.data.type.Bamboo.Leaves.class);
     }
 
     @Override
     public void setLeaves(org.bukkit.block.data.type.Bamboo.Leaves leaves) {
-        set(LEAVES, leaves);
+        this.set(CraftBamboo.LEAVES, leaves);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAgeable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockBamboo.class, "age");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty AGE = getInteger(net.minecraft.world.level.block.BambooStalkBlock.class, "age");
 
     @Override
     public int getAge() {
-        return get(AGE);
+        return this.get(CraftBamboo.AGE);
     }
 
     @Override
     public void setAge(int age) {
-        set(AGE, age);
+        this.set(CraftBamboo.AGE, age);
     }
 
     @Override
     public int getMaximumAge() {
-        return getMax(AGE);
+        return getMax(CraftBamboo.AGE);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftSapling
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger STAGE = getInteger(net.minecraft.world.level.block.BlockBamboo.class, "stage");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty STAGE = getInteger(net.minecraft.world.level.block.BambooStalkBlock.class, "stage");
 
     @Override
     public int getStage() {
-        return get(STAGE);
+        return this.get(CraftBamboo.STAGE);
     }
 
     @Override
     public void setStage(int stage) {
-        set(STAGE, stage);
+        this.set(CraftBamboo.STAGE, stage);
     }
 
     @Override
     public int getMaximumStage() {
-        return getMax(STAGE);
+        return getMax(CraftBamboo.STAGE);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBanner.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBanner.java
index 7902723429..79055ee1e1 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBanner.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBanner.java
@@ -9,17 +9,17 @@ public final class CraftBanner extends org.bukkit.craftbukkit.block.data.CraftBl
         super();
     }
 
-    public CraftBanner(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftBanner(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftRotatable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger ROTATION = getInteger(net.minecraft.world.level.block.BlockBanner.class, "rotation");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty ROTATION = getInteger(net.minecraft.world.level.block.BannerBlock.class, "rotation");
 
     @Override
     public org.bukkit.block.BlockFace getRotation() {
-        int data = get(ROTATION);
+        int data = this.get(CraftBanner.ROTATION);
         switch (data) {
             case 0x0:
                 return org.bukkit.block.BlockFace.SOUTH;
@@ -113,6 +113,6 @@ public final class CraftBanner extends org.bukkit.craftbukkit.block.data.CraftBl
             default:
                 throw new IllegalArgumentException("Illegal rotation " + rotation);
         }
-        set(ROTATION, val);
+        this.set(CraftBanner.ROTATION, val);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBannerWall.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBannerWall.java
index 981c325670..03f2ca6784 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBannerWall.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBannerWall.java
@@ -9,26 +9,26 @@ public final class CraftBannerWall extends org.bukkit.craftbukkit.block.data.Cra
         super();
     }
 
-    public CraftBannerWall(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftBannerWall(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockBannerWall.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.WallBannerBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftBannerWall.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftBannerWall.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftBannerWall.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBarrel.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBarrel.java
index ff86fc6150..511460a8fa 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBarrel.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBarrel.java
@@ -9,40 +9,40 @@ public final class CraftBarrel extends org.bukkit.craftbukkit.block.data.CraftBl
         super();
     }
 
-    public CraftBarrel(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftBarrel(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockBarrel.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.BarrelBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftBarrel.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftBarrel.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftBarrel.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftOpenable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean OPEN = getBoolean(net.minecraft.world.level.block.BlockBarrel.class, "open");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty OPEN = getBoolean(net.minecraft.world.level.block.BarrelBlock.class, "open");
 
     @Override
     public boolean isOpen() {
-        return get(OPEN);
+        return this.get(CraftBarrel.OPEN);
     }
 
     @Override
     public void setOpen(boolean open) {
-        set(OPEN, open);
+        this.set(CraftBarrel.OPEN, open);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBarrier.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBarrier.java
index d5713edbf5..1e810e5be4 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBarrier.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBarrier.java
@@ -9,21 +9,21 @@ public final class CraftBarrier extends org.bukkit.craftbukkit.block.data.CraftB
         super();
     }
 
-    public CraftBarrier(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftBarrier(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockBarrier.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.BarrierBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftBarrier.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftBarrier.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java
index 50deaba4de..2ccf3fbe3f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBed.java
@@ -9,46 +9,46 @@ public final class CraftBed extends org.bukkit.craftbukkit.block.data.CraftBlock
         super();
     }
 
-    public CraftBed(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftBed(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftBed
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> PART = getEnum(net.minecraft.world.level.block.BlockBed.class, "part");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean OCCUPIED = getBoolean(net.minecraft.world.level.block.BlockBed.class, "occupied");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> PART = getEnum(net.minecraft.world.level.block.BedBlock.class, "part");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty OCCUPIED = getBoolean(net.minecraft.world.level.block.BedBlock.class, "occupied");
 
     @Override
     public org.bukkit.block.data.type.Bed.Part getPart() {
-        return get(PART, org.bukkit.block.data.type.Bed.Part.class);
+        return this.get(CraftBed.PART, org.bukkit.block.data.type.Bed.Part.class);
     }
 
     @Override
     public void setPart(org.bukkit.block.data.type.Bed.Part part) {
-        set(PART, part);
+        this.set(CraftBed.PART, part);
     }
 
     @Override
     public boolean isOccupied() {
-        return get(OCCUPIED);
+        return this.get(CraftBed.OCCUPIED);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockBed.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.BedBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftBed.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftBed.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftBed.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBeehive.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBeehive.java
index e537ded2d7..a081a19ece 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBeehive.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBeehive.java
@@ -9,45 +9,45 @@ public final class CraftBeehive extends org.bukkit.craftbukkit.block.data.CraftB
         super();
     }
 
-    public CraftBeehive(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftBeehive(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftBeehive
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger HONEY_LEVEL = getInteger(net.minecraft.world.level.block.BlockBeehive.class, "honey_level");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty HONEY_LEVEL = getInteger(net.minecraft.world.level.block.BeehiveBlock.class, "honey_level");
 
     @Override
     public int getHoneyLevel() {
-        return get(HONEY_LEVEL);
+        return this.get(CraftBeehive.HONEY_LEVEL);
     }
 
     @Override
     public void setHoneyLevel(int honeyLevel) {
-        set(HONEY_LEVEL, honeyLevel);
+        this.set(CraftBeehive.HONEY_LEVEL, honeyLevel);
     }
 
     @Override
     public int getMaximumHoneyLevel() {
-        return getMax(HONEY_LEVEL);
+        return getMax(CraftBeehive.HONEY_LEVEL);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockBeehive.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.BeehiveBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftBeehive.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftBeehive.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftBeehive.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBeetroot.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBeetroot.java
index a4f212742f..90b4883f3e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBeetroot.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBeetroot.java
@@ -9,26 +9,26 @@ public final class CraftBeetroot extends org.bukkit.craftbukkit.block.data.Craft
         super();
     }
 
-    public CraftBeetroot(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftBeetroot(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAgeable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockBeetroot.class, "age");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty AGE = getInteger(net.minecraft.world.level.block.BeetrootBlock.class, "age");
 
     @Override
     public int getAge() {
-        return get(AGE);
+        return this.get(CraftBeetroot.AGE);
     }
 
     @Override
     public void setAge(int age) {
-        set(AGE, age);
+        this.set(CraftBeetroot.AGE, age);
     }
 
     @Override
     public int getMaximumAge() {
-        return getMax(AGE);
+        return getMax(CraftBeetroot.AGE);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBell.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBell.java
index 5a3e22466d..b534cb23ab 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBell.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBell.java
@@ -9,54 +9,54 @@ public final class CraftBell extends org.bukkit.craftbukkit.block.data.CraftBloc
         super();
     }
 
-    public CraftBell(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftBell(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftBell
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> ATTACHMENT = getEnum(net.minecraft.world.level.block.BlockBell.class, "attachment");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> ATTACHMENT = getEnum(net.minecraft.world.level.block.BellBlock.class, "attachment");
 
     @Override
     public org.bukkit.block.data.type.Bell.Attachment getAttachment() {
-        return get(ATTACHMENT, org.bukkit.block.data.type.Bell.Attachment.class);
+        return this.get(CraftBell.ATTACHMENT, org.bukkit.block.data.type.Bell.Attachment.class);
     }
 
     @Override
     public void setAttachment(org.bukkit.block.data.type.Bell.Attachment leaves) {
-        set(ATTACHMENT, leaves);
+        this.set(CraftBell.ATTACHMENT, leaves);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockBell.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.BellBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftBell.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftBell.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftBell.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockBell.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.BellBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftBell.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftBell.POWERED, powered);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBigDripleaf.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBigDripleaf.java
index 435386dbff..9fe7d42176 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBigDripleaf.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBigDripleaf.java
@@ -9,54 +9,54 @@ public final class CraftBigDripleaf extends org.bukkit.craftbukkit.block.data.Cr
         super();
     }
 
-    public CraftBigDripleaf(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftBigDripleaf(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftBigDripleaf
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> TILT = getEnum(net.minecraft.world.level.block.BigDripleafBlock.class, "tilt");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> TILT = getEnum(net.minecraft.world.level.block.BigDripleafBlock.class, "tilt");
 
     @Override
     public Tilt getTilt() {
-        return get(TILT, org.bukkit.block.data.type.BigDripleaf.Tilt.class);
+        return this.get(CraftBigDripleaf.TILT, org.bukkit.block.data.type.BigDripleaf.Tilt.class);
     }
 
     @Override
     public void setTilt(org.bukkit.block.data.type.BigDripleaf.Tilt tilt) {
-        set(TILT, tilt);
+        this.set(CraftBigDripleaf.TILT, tilt);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BigDripleafBlock.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.BigDripleafBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftBigDripleaf.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftBigDripleaf.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftBigDripleaf.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BigDripleafBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.BigDripleafBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftBigDripleaf.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftBigDripleaf.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBigDripleafStem.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBigDripleafStem.java
index 1c054426f2..64b872cbde 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBigDripleafStem.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBigDripleafStem.java
@@ -9,40 +9,40 @@ public final class CraftBigDripleafStem extends org.bukkit.craftbukkit.block.dat
         super();
     }
 
-    public CraftBigDripleafStem(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftBigDripleafStem(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BigDripleafStemBlock.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.BigDripleafStemBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftBigDripleafStem.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftBigDripleafStem.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftBigDripleafStem.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BigDripleafStemBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.BigDripleafStemBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftBigDripleafStem.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftBigDripleafStem.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBlastFurnace.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBlastFurnace.java
index 6c6107793a..64e18412c6 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBlastFurnace.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBlastFurnace.java
@@ -9,40 +9,40 @@ public final class CraftBlastFurnace extends org.bukkit.craftbukkit.block.data.C
         super();
     }
 
-    public CraftBlastFurnace(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftBlastFurnace(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockBlastFurnace.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.BlastFurnaceBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftBlastFurnace.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftBlastFurnace.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftBlastFurnace.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftLightable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LIT = getBoolean(net.minecraft.world.level.block.BlockBlastFurnace.class, "lit");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty LIT = getBoolean(net.minecraft.world.level.block.BlastFurnaceBlock.class, "lit");
 
     @Override
     public boolean isLit() {
-        return get(LIT);
+        return this.get(CraftBlastFurnace.LIT);
     }
 
     @Override
     public void setLit(boolean lit) {
-        set(LIT, lit);
+        this.set(CraftBlastFurnace.LIT, lit);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBrewingStand.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBrewingStand.java
index 3ea151b0b4..1815adec06 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBrewingStand.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBrewingStand.java
@@ -9,32 +9,32 @@ public final class CraftBrewingStand extends org.bukkit.craftbukkit.block.data.C
         super();
     }
 
-    public CraftBrewingStand(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftBrewingStand(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftBrewingStand
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] HAS_BOTTLE = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{
-        getBoolean(net.minecraft.world.level.block.BlockBrewingStand.class, "has_bottle_0"), getBoolean(net.minecraft.world.level.block.BlockBrewingStand.class, "has_bottle_1"), getBoolean(net.minecraft.world.level.block.BlockBrewingStand.class, "has_bottle_2")
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty[] HAS_BOTTLE = new net.minecraft.world.level.block.state.properties.BooleanProperty[]{
+        getBoolean(net.minecraft.world.level.block.BrewingStandBlock.class, "has_bottle_0"), getBoolean(net.minecraft.world.level.block.BrewingStandBlock.class, "has_bottle_1"), getBoolean(net.minecraft.world.level.block.BrewingStandBlock.class, "has_bottle_2")
     };
 
     @Override
     public boolean hasBottle(int bottle) {
-        return get(HAS_BOTTLE[bottle]);
+        return this.get(CraftBrewingStand.HAS_BOTTLE[bottle]);
     }
 
     @Override
     public void setBottle(int bottle, boolean has) {
-        set(HAS_BOTTLE[bottle], has);
+        this.set(CraftBrewingStand.HAS_BOTTLE[bottle], has);
     }
 
     @Override
     public java.util.Set<Integer> getBottles() {
         com.google.common.collect.ImmutableSet.Builder<Integer> bottles = com.google.common.collect.ImmutableSet.builder();
 
-        for (int index = 0; index < getMaximumBottles(); index++) {
-            if (hasBottle(index)) {
+        for (int index = 0; index < this.getMaximumBottles(); index++) {
+            if (this.hasBottle(index)) {
                 bottles.add(index);
             }
         }
@@ -44,6 +44,6 @@ public final class CraftBrewingStand extends org.bukkit.craftbukkit.block.data.C
 
     @Override
     public int getMaximumBottles() {
-        return HAS_BOTTLE.length;
+        return CraftBrewingStand.HAS_BOTTLE.length;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBrushable.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBrushable.java
index 31de535aab..303d624263 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBrushable.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBrushable.java
@@ -9,26 +9,26 @@ public final class CraftBrushable extends org.bukkit.craftbukkit.block.data.Craf
         super();
     }
 
-    public CraftBrushable(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftBrushable(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftBrushable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger DUSTED = getInteger(net.minecraft.world.level.block.BrushableBlock.class, "dusted");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty DUSTED = getInteger(net.minecraft.world.level.block.BrushableBlock.class, "dusted");
 
     @Override
     public int getDusted() {
-        return get(DUSTED);
+        return this.get(CraftBrushable.DUSTED);
     }
 
     @Override
     public void setDusted(int dusted) {
-        set(DUSTED, dusted);
+        this.set(CraftBrushable.DUSTED, dusted);
     }
 
     @Override
     public int getMaximumDusted() {
-        return getMax(DUSTED);
+        return getMax(CraftBrushable.DUSTED);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBubbleColumn.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBubbleColumn.java
index 63e312638c..9c51ee58b9 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBubbleColumn.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftBubbleColumn.java
@@ -9,21 +9,21 @@ public final class CraftBubbleColumn extends org.bukkit.craftbukkit.block.data.C
         super();
     }
 
-    public CraftBubbleColumn(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftBubbleColumn(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftBubbleColumn
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean DRAG = getBoolean(net.minecraft.world.level.block.BlockBubbleColumn.class, "drag");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty DRAG = getBoolean(net.minecraft.world.level.block.BubbleColumnBlock.class, "drag");
 
     @Override
     public boolean isDrag() {
-        return get(DRAG);
+        return this.get(CraftBubbleColumn.DRAG);
     }
 
     @Override
     public void setDrag(boolean drag) {
-        set(DRAG, drag);
+        this.set(CraftBubbleColumn.DRAG, drag);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftButtonAbstract.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftButtonAbstract.java
index c0af065d29..e71fd199fd 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftButtonAbstract.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftButtonAbstract.java
@@ -9,68 +9,68 @@ public final class CraftButtonAbstract extends org.bukkit.craftbukkit.block.data
         super();
     }
 
-    public CraftButtonAbstract(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftButtonAbstract(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftSwitch
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACE = getEnum(net.minecraft.world.level.block.BlockButtonAbstract.class, "face");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACE = getEnum(net.minecraft.world.level.block.ButtonBlock.class, "face");
 
     @Override
     public org.bukkit.block.data.type.Switch.Face getFace() {
-        return get(FACE, org.bukkit.block.data.type.Switch.Face.class);
+        return this.get(CraftButtonAbstract.FACE, org.bukkit.block.data.type.Switch.Face.class);
     }
 
     @Override
     public void setFace(org.bukkit.block.data.type.Switch.Face face) {
-        set(FACE, face);
+        this.set(CraftButtonAbstract.FACE, face);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockButtonAbstract.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.ButtonBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftButtonAbstract.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftButtonAbstract.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftButtonAbstract.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftFaceAttachable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> ATTACH_FACE = getEnum(net.minecraft.world.level.block.BlockButtonAbstract.class, "face");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> ATTACH_FACE = getEnum(net.minecraft.world.level.block.ButtonBlock.class, "face");
 
     @Override
     public org.bukkit.block.data.FaceAttachable.AttachedFace getAttachedFace() {
-        return get(ATTACH_FACE, org.bukkit.block.data.FaceAttachable.AttachedFace.class);
+        return this.get(CraftButtonAbstract.ATTACH_FACE, org.bukkit.block.data.FaceAttachable.AttachedFace.class);
     }
 
     @Override
     public void setAttachedFace(org.bukkit.block.data.FaceAttachable.AttachedFace face) {
-        set(ATTACH_FACE, face);
+        this.set(CraftButtonAbstract.ATTACH_FACE, face);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockButtonAbstract.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.ButtonBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftButtonAbstract.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftButtonAbstract.POWERED, powered);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCactus.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCactus.java
index 279067bffc..463217199f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCactus.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCactus.java
@@ -9,26 +9,26 @@ public final class CraftCactus extends org.bukkit.craftbukkit.block.data.CraftBl
         super();
     }
 
-    public CraftCactus(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftCactus(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAgeable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockCactus.class, "age");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty AGE = getInteger(net.minecraft.world.level.block.CactusBlock.class, "age");
 
     @Override
     public int getAge() {
-        return get(AGE);
+        return this.get(CraftCactus.AGE);
     }
 
     @Override
     public void setAge(int age) {
-        set(AGE, age);
+        this.set(CraftCactus.AGE, age);
     }
 
     @Override
     public int getMaximumAge() {
-        return getMax(AGE);
+        return getMax(CraftCactus.AGE);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCake.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCake.java
index ddaf32ce1c..50347a79b0 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCake.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCake.java
@@ -9,26 +9,26 @@ public final class CraftCake extends org.bukkit.craftbukkit.block.data.CraftBloc
         super();
     }
 
-    public CraftCake(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftCake(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftCake
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger BITES = getInteger(net.minecraft.world.level.block.BlockCake.class, "bites");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty BITES = getInteger(net.minecraft.world.level.block.CakeBlock.class, "bites");
 
     @Override
     public int getBites() {
-        return get(BITES);
+        return this.get(CraftCake.BITES);
     }
 
     @Override
     public void setBites(int bites) {
-        set(BITES, bites);
+        this.set(CraftCake.BITES, bites);
     }
 
     @Override
     public int getMaximumBites() {
-        return getMax(BITES);
+        return getMax(CraftCake.BITES);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCalibratedSculkSensor.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCalibratedSculkSensor.java
index 48d0591a3d..decacf616d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCalibratedSculkSensor.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCalibratedSculkSensor.java
@@ -9,73 +9,73 @@ public final class CraftCalibratedSculkSensor extends org.bukkit.craftbukkit.blo
         super();
     }
 
-    public CraftCalibratedSculkSensor(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftCalibratedSculkSensor(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.CalibratedSculkSensorBlock.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.CalibratedSculkSensorBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftCalibratedSculkSensor.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftCalibratedSculkSensor.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftCalibratedSculkSensor.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftSculkSensor
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> PHASE = getEnum(net.minecraft.world.level.block.CalibratedSculkSensorBlock.class, "sculk_sensor_phase");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> PHASE = getEnum(net.minecraft.world.level.block.CalibratedSculkSensorBlock.class, "sculk_sensor_phase");
 
     @Override
     public org.bukkit.block.data.type.SculkSensor.Phase getPhase() {
-        return get(PHASE, org.bukkit.block.data.type.SculkSensor.Phase.class);
+        return this.get(CraftCalibratedSculkSensor.PHASE, org.bukkit.block.data.type.SculkSensor.Phase.class);
     }
 
     @Override
     public void setPhase(org.bukkit.block.data.type.SculkSensor.Phase phase) {
-        set(PHASE, phase);
+        this.set(CraftCalibratedSculkSensor.PHASE, phase);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAnaloguePowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger POWER = getInteger(net.minecraft.world.level.block.CalibratedSculkSensorBlock.class, "power");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty POWER = getInteger(net.minecraft.world.level.block.CalibratedSculkSensorBlock.class, "power");
 
     @Override
     public int getPower() {
-        return get(POWER);
+        return this.get(CraftCalibratedSculkSensor.POWER);
     }
 
     @Override
     public void setPower(int power) {
-        set(POWER, power);
+        this.set(CraftCalibratedSculkSensor.POWER, power);
     }
 
     @Override
     public int getMaximumPower() {
-        return getMax(POWER);
+        return getMax(CraftCalibratedSculkSensor.POWER);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.CalibratedSculkSensorBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.CalibratedSculkSensorBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftCalibratedSculkSensor.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftCalibratedSculkSensor.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCampfire.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCampfire.java
index 6c79c954b4..52b3b5abe6 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCampfire.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCampfire.java
@@ -9,68 +9,68 @@ public final class CraftCampfire extends org.bukkit.craftbukkit.block.data.Craft
         super();
     }
 
-    public CraftCampfire(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftCampfire(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftCampfire
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean SIGNAL_FIRE = getBoolean(net.minecraft.world.level.block.BlockCampfire.class, "signal_fire");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty SIGNAL_FIRE = getBoolean(net.minecraft.world.level.block.CampfireBlock.class, "signal_fire");
 
     @Override
     public boolean isSignalFire() {
-        return get(SIGNAL_FIRE);
+        return this.get(CraftCampfire.SIGNAL_FIRE);
     }
 
     @Override
     public void setSignalFire(boolean signalFire) {
-        set(SIGNAL_FIRE, signalFire);
+        this.set(CraftCampfire.SIGNAL_FIRE, signalFire);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockCampfire.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.CampfireBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftCampfire.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftCampfire.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftCampfire.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftLightable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LIT = getBoolean(net.minecraft.world.level.block.BlockCampfire.class, "lit");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty LIT = getBoolean(net.minecraft.world.level.block.CampfireBlock.class, "lit");
 
     @Override
     public boolean isLit() {
-        return get(LIT);
+        return this.get(CraftCampfire.LIT);
     }
 
     @Override
     public void setLit(boolean lit) {
-        set(LIT, lit);
+        this.set(CraftCampfire.LIT, lit);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockCampfire.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.CampfireBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftCampfire.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftCampfire.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCandle.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCandle.java
index d33acb15de..2230160d5e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCandle.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCandle.java
@@ -9,54 +9,54 @@ public final class CraftCandle extends org.bukkit.craftbukkit.block.data.CraftBl
         super();
     }
 
-    public CraftCandle(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftCandle(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftCandle
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger CANDLES = getInteger(net.minecraft.world.level.block.CandleBlock.class, "candles");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty CANDLES = getInteger(net.minecraft.world.level.block.CandleBlock.class, "candles");
 
     @Override
     public int getCandles() {
-        return get(CANDLES);
+        return this.get(CraftCandle.CANDLES);
     }
 
     @Override
     public void setCandles(int candles) {
-        set(CANDLES, candles);
+        this.set(CraftCandle.CANDLES, candles);
     }
 
     @Override
     public int getMaximumCandles() {
-        return getMax(CANDLES);
+        return getMax(CraftCandle.CANDLES);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftLightable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LIT = getBoolean(net.minecraft.world.level.block.CandleBlock.class, "lit");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty LIT = getBoolean(net.minecraft.world.level.block.CandleBlock.class, "lit");
 
     @Override
     public boolean isLit() {
-        return get(LIT);
+        return this.get(CraftCandle.LIT);
     }
 
     @Override
     public void setLit(boolean lit) {
-        set(LIT, lit);
+        this.set(CraftCandle.LIT, lit);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.CandleBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.CandleBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftCandle.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftCandle.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCandleCake.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCandleCake.java
index bbcc97552b..adc224dd4b 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCandleCake.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCandleCake.java
@@ -9,21 +9,21 @@ public final class CraftCandleCake extends org.bukkit.craftbukkit.block.data.Cra
         super();
     }
 
-    public CraftCandleCake(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftCandleCake(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftLightable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LIT = getBoolean(net.minecraft.world.level.block.CandleCakeBlock.class, "lit");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty LIT = getBoolean(net.minecraft.world.level.block.CandleCakeBlock.class, "lit");
 
     @Override
     public boolean isLit() {
-        return get(LIT);
+        return this.get(CraftCandleCake.LIT);
     }
 
     @Override
     public void setLit(boolean lit) {
-        set(LIT, lit);
+        this.set(CraftCandleCake.LIT, lit);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCarrots.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCarrots.java
index 9e2096eb0c..270416eb51 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCarrots.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCarrots.java
@@ -9,26 +9,26 @@ public final class CraftCarrots extends org.bukkit.craftbukkit.block.data.CraftB
         super();
     }
 
-    public CraftCarrots(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftCarrots(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAgeable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockCarrots.class, "age");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty AGE = getInteger(net.minecraft.world.level.block.CarrotBlock.class, "age");
 
     @Override
     public int getAge() {
-        return get(AGE);
+        return this.get(CraftCarrots.AGE);
     }
 
     @Override
     public void setAge(int age) {
-        set(AGE, age);
+        this.set(CraftCarrots.AGE, age);
     }
 
     @Override
     public int getMaximumAge() {
-        return getMax(AGE);
+        return getMax(CraftCarrots.AGE);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCaveVines.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCaveVines.java
index 92e5a4c7ed..5b387ce833 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCaveVines.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCaveVines.java
@@ -9,40 +9,40 @@ public final class CraftCaveVines extends org.bukkit.craftbukkit.block.data.Craf
         super();
     }
 
-    public CraftCaveVines(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftCaveVines(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAgeable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.CaveVinesBlock.class, "age");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty AGE = getInteger(net.minecraft.world.level.block.CaveVinesBlock.class, "age");
 
     @Override
     public int getAge() {
-        return get(AGE);
+        return this.get(CraftCaveVines.AGE);
     }
 
     @Override
     public void setAge(int age) {
-        set(AGE, age);
+        this.set(CraftCaveVines.AGE, age);
     }
 
     @Override
     public int getMaximumAge() {
-        return getMax(AGE);
+        return getMax(CraftCaveVines.AGE);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftCaveVinesPlant
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean BERRIES = getBoolean(net.minecraft.world.level.block.CaveVinesBlock.class, "berries");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty BERRIES = getBoolean(net.minecraft.world.level.block.CaveVinesBlock.class, "berries");
 
     @Override
     public boolean isBerries() {
-        return get(BERRIES);
+        return this.get(CraftCaveVines.BERRIES);
     }
 
     @Override
     public void setBerries(boolean berries) {
-        set(BERRIES, berries);
+        this.set(CraftCaveVines.BERRIES, berries);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCaveVinesPlant.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCaveVinesPlant.java
index 03721a561e..b8c199bfbe 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCaveVinesPlant.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCaveVinesPlant.java
@@ -9,21 +9,21 @@ public final class CraftCaveVinesPlant extends org.bukkit.craftbukkit.block.data
         super();
     }
 
-    public CraftCaveVinesPlant(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftCaveVinesPlant(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftCaveVinesPlant
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean BERRIES = getBoolean(net.minecraft.world.level.block.CaveVinesPlantBlock.class, "berries");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty BERRIES = getBoolean(net.minecraft.world.level.block.CaveVinesPlantBlock.class, "berries");
 
     @Override
     public boolean isBerries() {
-        return get(BERRIES);
+        return this.get(CraftCaveVinesPlant.BERRIES);
     }
 
     @Override
     public void setBerries(boolean berries) {
-        set(BERRIES, berries);
+        this.set(CraftCaveVinesPlant.BERRIES, berries);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCeilingHangingSign.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCeilingHangingSign.java
index 6d00c6327f..fcda570877 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCeilingHangingSign.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCeilingHangingSign.java
@@ -9,31 +9,31 @@ public final class CraftCeilingHangingSign extends org.bukkit.craftbukkit.block.
         super();
     }
 
-    public CraftCeilingHangingSign(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftCeilingHangingSign(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAttachable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean ATTACHED = getBoolean(net.minecraft.world.level.block.CeilingHangingSignBlock.class, "attached");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty ATTACHED = getBoolean(net.minecraft.world.level.block.CeilingHangingSignBlock.class, "attached");
 
     @Override
     public boolean isAttached() {
-        return get(ATTACHED);
+        return this.get(CraftCeilingHangingSign.ATTACHED);
     }
 
     @Override
     public void setAttached(boolean attached) {
-        set(ATTACHED, attached);
+        this.set(CraftCeilingHangingSign.ATTACHED, attached);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftRotatable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger ROTATION = getInteger(net.minecraft.world.level.block.CeilingHangingSignBlock.class, "rotation");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty ROTATION = getInteger(net.minecraft.world.level.block.CeilingHangingSignBlock.class, "rotation");
 
     @Override
     public org.bukkit.block.BlockFace getRotation() {
-        int data = get(ROTATION);
+        int data = this.get(CraftCeilingHangingSign.ROTATION);
         switch (data) {
             case 0x0:
                 return org.bukkit.block.BlockFace.SOUTH;
@@ -127,20 +127,20 @@ public final class CraftCeilingHangingSign extends org.bukkit.craftbukkit.block.
             default:
                 throw new IllegalArgumentException("Illegal rotation " + rotation);
         }
-        set(ROTATION, val);
+        this.set(CraftCeilingHangingSign.ROTATION, val);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.CeilingHangingSignBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.CeilingHangingSignBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftCeilingHangingSign.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftCeilingHangingSign.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChain.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChain.java
index be3b6d4da4..50b317d484 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChain.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChain.java
@@ -9,40 +9,40 @@ public final class CraftChain extends org.bukkit.craftbukkit.block.data.CraftBlo
         super();
     }
 
-    public CraftChain(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftChain(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftOrientable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> AXIS = getEnum(net.minecraft.world.level.block.BlockChain.class, "axis");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> AXIS = getEnum(net.minecraft.world.level.block.ChainBlock.class, "axis");
 
     @Override
     public org.bukkit.Axis getAxis() {
-        return get(AXIS, org.bukkit.Axis.class);
+        return this.get(CraftChain.AXIS, org.bukkit.Axis.class);
     }
 
     @Override
     public void setAxis(org.bukkit.Axis axis) {
-        set(AXIS, axis);
+        this.set(CraftChain.AXIS, axis);
     }
 
     @Override
     public java.util.Set<org.bukkit.Axis> getAxes() {
-        return getValues(AXIS, org.bukkit.Axis.class);
+        return this.getValues(CraftChain.AXIS, org.bukkit.Axis.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockChain.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.ChainBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftChain.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftChain.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChest.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChest.java
index df826da17b..383b146dee 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChest.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChest.java
@@ -9,54 +9,54 @@ public final class CraftChest extends org.bukkit.craftbukkit.block.data.CraftBlo
         super();
     }
 
-    public CraftChest(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftChest(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftChest
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> TYPE = getEnum(net.minecraft.world.level.block.BlockChest.class, "type");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> TYPE = getEnum(net.minecraft.world.level.block.ChestBlock.class, "type");
 
     @Override
     public org.bukkit.block.data.type.Chest.Type getType() {
-        return get(TYPE, org.bukkit.block.data.type.Chest.Type.class);
+        return this.get(CraftChest.TYPE, org.bukkit.block.data.type.Chest.Type.class);
     }
 
     @Override
     public void setType(org.bukkit.block.data.type.Chest.Type type) {
-        set(TYPE, type);
+        this.set(CraftChest.TYPE, type);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockChest.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.ChestBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftChest.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftChest.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftChest.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockChest.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.ChestBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftChest.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftChest.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChestTrapped.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChestTrapped.java
index 08aba0ee04..b24a40c084 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChestTrapped.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChestTrapped.java
@@ -9,54 +9,54 @@ public final class CraftChestTrapped extends org.bukkit.craftbukkit.block.data.C
         super();
     }
 
-    public CraftChestTrapped(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftChestTrapped(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftChest
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> TYPE = getEnum(net.minecraft.world.level.block.BlockChestTrapped.class, "type");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> TYPE = getEnum(net.minecraft.world.level.block.TrappedChestBlock.class, "type");
 
     @Override
     public org.bukkit.block.data.type.Chest.Type getType() {
-        return get(TYPE, org.bukkit.block.data.type.Chest.Type.class);
+        return this.get(CraftChestTrapped.TYPE, org.bukkit.block.data.type.Chest.Type.class);
     }
 
     @Override
     public void setType(org.bukkit.block.data.type.Chest.Type type) {
-        set(TYPE, type);
+        this.set(CraftChestTrapped.TYPE, type);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockChestTrapped.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.TrappedChestBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftChestTrapped.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftChestTrapped.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftChestTrapped.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockChestTrapped.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.TrappedChestBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftChestTrapped.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftChestTrapped.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChiseledBookShelf.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChiseledBookShelf.java
index ed89dde790..26cfac0ae5 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChiseledBookShelf.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChiseledBookShelf.java
@@ -9,33 +9,33 @@ public final class CraftChiseledBookShelf extends org.bukkit.craftbukkit.block.d
         super();
     }
 
-    public CraftChiseledBookShelf(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftChiseledBookShelf(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftChiseledBookshelf
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] SLOT_OCCUPIED = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty[] SLOT_OCCUPIED = new net.minecraft.world.level.block.state.properties.BooleanProperty[]{
         getBoolean(net.minecraft.world.level.block.ChiseledBookShelfBlock.class, "slot_0_occupied"), getBoolean(net.minecraft.world.level.block.ChiseledBookShelfBlock.class, "slot_1_occupied"), getBoolean(net.minecraft.world.level.block.ChiseledBookShelfBlock.class, "slot_2_occupied"),
         getBoolean(net.minecraft.world.level.block.ChiseledBookShelfBlock.class, "slot_3_occupied"), getBoolean(net.minecraft.world.level.block.ChiseledBookShelfBlock.class, "slot_4_occupied"), getBoolean(net.minecraft.world.level.block.ChiseledBookShelfBlock.class, "slot_5_occupied")
     };
 
     @Override
     public boolean isSlotOccupied(int slot) {
-        return get(SLOT_OCCUPIED[slot]);
+        return this.get(CraftChiseledBookShelf.SLOT_OCCUPIED[slot]);
     }
 
     @Override
     public void setSlotOccupied(int slot, boolean has) {
-        set(SLOT_OCCUPIED[slot], has);
+        this.set(CraftChiseledBookShelf.SLOT_OCCUPIED[slot], has);
     }
 
     @Override
     public java.util.Set<Integer> getOccupiedSlots() {
         com.google.common.collect.ImmutableSet.Builder<Integer> slots = com.google.common.collect.ImmutableSet.builder();
 
-        for (int index = 0; index < getMaximumOccupiedSlots(); index++) {
-            if (isSlotOccupied(index)) {
+        for (int index = 0; index < this.getMaximumOccupiedSlots(); index++) {
+            if (this.isSlotOccupied(index)) {
                 slots.add(index);
             }
         }
@@ -45,25 +45,25 @@ public final class CraftChiseledBookShelf extends org.bukkit.craftbukkit.block.d
 
     @Override
     public int getMaximumOccupiedSlots() {
-        return SLOT_OCCUPIED.length;
+        return CraftChiseledBookShelf.SLOT_OCCUPIED.length;
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.ChiseledBookShelfBlock.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.ChiseledBookShelfBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftChiseledBookShelf.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftChiseledBookShelf.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftChiseledBookShelf.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChorusFlower.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChorusFlower.java
index 203cc451c9..1c759be1ed 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChorusFlower.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChorusFlower.java
@@ -9,26 +9,26 @@ public final class CraftChorusFlower extends org.bukkit.craftbukkit.block.data.C
         super();
     }
 
-    public CraftChorusFlower(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftChorusFlower(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAgeable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockChorusFlower.class, "age");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty AGE = getInteger(net.minecraft.world.level.block.ChorusFlowerBlock.class, "age");
 
     @Override
     public int getAge() {
-        return get(AGE);
+        return this.get(CraftChorusFlower.AGE);
     }
 
     @Override
     public void setAge(int age) {
-        set(AGE, age);
+        this.set(CraftChorusFlower.AGE, age);
     }
 
     @Override
     public int getMaximumAge() {
-        return getMax(AGE);
+        return getMax(CraftChorusFlower.AGE);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChorusFruit.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChorusFruit.java
index b1c7fee0d8..60190a7ce9 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChorusFruit.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftChorusFruit.java
@@ -9,40 +9,40 @@ public final class CraftChorusFruit extends org.bukkit.craftbukkit.block.data.Cr
         super();
     }
 
-    public CraftChorusFruit(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftChorusFruit(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftMultipleFacing
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] FACES = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{
-        getBoolean(net.minecraft.world.level.block.BlockChorusFruit.class, "north", true), getBoolean(net.minecraft.world.level.block.BlockChorusFruit.class, "east", true), getBoolean(net.minecraft.world.level.block.BlockChorusFruit.class, "south", true), getBoolean(net.minecraft.world.level.block.BlockChorusFruit.class, "west", true), getBoolean(net.minecraft.world.level.block.BlockChorusFruit.class, "up", true), getBoolean(net.minecraft.world.level.block.BlockChorusFruit.class, "down", true)
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty[] FACES = new net.minecraft.world.level.block.state.properties.BooleanProperty[]{
+        getBoolean(net.minecraft.world.level.block.ChorusPlantBlock.class, "north", true), getBoolean(net.minecraft.world.level.block.ChorusPlantBlock.class, "east", true), getBoolean(net.minecraft.world.level.block.ChorusPlantBlock.class, "south", true), getBoolean(net.minecraft.world.level.block.ChorusPlantBlock.class, "west", true), getBoolean(net.minecraft.world.level.block.ChorusPlantBlock.class, "up", true), getBoolean(net.minecraft.world.level.block.ChorusPlantBlock.class, "down", true)
     };
 
     @Override
     public boolean hasFace(org.bukkit.block.BlockFace face) {
-        net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
+        net.minecraft.world.level.block.state.properties.BooleanProperty state = CraftChorusFruit.FACES[face.ordinal()];
         if (state == null) {
             throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
         }
-        return get(state);
+        return this.get(state);
     }
 
     @Override
     public void setFace(org.bukkit.block.BlockFace face, boolean has) {
-        net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
+        net.minecraft.world.level.block.state.properties.BooleanProperty state = CraftChorusFruit.FACES[face.ordinal()];
         if (state == null) {
             throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
         }
-        set(state, has);
+        this.set(state, has);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
         com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
 
-        for (int i = 0; i < FACES.length; i++) {
-            if (FACES[i] != null && get(FACES[i])) {
+        for (int i = 0; i < CraftChorusFruit.FACES.length; i++) {
+            if (CraftChorusFruit.FACES[i] != null && this.get(CraftChorusFruit.FACES[i])) {
                 faces.add(org.bukkit.block.BlockFace.values()[i]);
             }
         }
@@ -54,8 +54,8 @@ public final class CraftChorusFruit extends org.bukkit.craftbukkit.block.data.Cr
     public java.util.Set<org.bukkit.block.BlockFace> getAllowedFaces() {
         com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
 
-        for (int i = 0; i < FACES.length; i++) {
-            if (FACES[i] != null) {
+        for (int i = 0; i < CraftChorusFruit.FACES.length; i++) {
+            if (CraftChorusFruit.FACES[i] != null) {
                 faces.add(org.bukkit.block.BlockFace.values()[i]);
             }
         }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCobbleWall.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCobbleWall.java
index e05139f092..f860bb309a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCobbleWall.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCobbleWall.java
@@ -9,48 +9,48 @@ public final class CraftCobbleWall extends org.bukkit.craftbukkit.block.data.Cra
         super();
     }
 
-    public CraftCobbleWall(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftCobbleWall(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftWall
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean UP = getBoolean(net.minecraft.world.level.block.BlockCobbleWall.class, "up");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?>[] HEIGHTS = new net.minecraft.world.level.block.state.properties.BlockStateEnum[]{
-        getEnum(net.minecraft.world.level.block.BlockCobbleWall.class, "north"), getEnum(net.minecraft.world.level.block.BlockCobbleWall.class, "east"), getEnum(net.minecraft.world.level.block.BlockCobbleWall.class, "south"), getEnum(net.minecraft.world.level.block.BlockCobbleWall.class, "west")
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty UP = getBoolean(net.minecraft.world.level.block.WallBlock.class, "up");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?>[] HEIGHTS = new net.minecraft.world.level.block.state.properties.EnumProperty[]{
+        getEnum(net.minecraft.world.level.block.WallBlock.class, "north"), getEnum(net.minecraft.world.level.block.WallBlock.class, "east"), getEnum(net.minecraft.world.level.block.WallBlock.class, "south"), getEnum(net.minecraft.world.level.block.WallBlock.class, "west")
     };
 
     @Override
     public boolean isUp() {
-        return get(UP);
+        return this.get(CraftCobbleWall.UP);
     }
 
     @Override
     public void setUp(boolean up) {
-        set(UP, up);
+        this.set(CraftCobbleWall.UP, up);
     }
 
     @Override
     public org.bukkit.block.data.type.Wall.Height getHeight(org.bukkit.block.BlockFace face) {
-        return get(HEIGHTS[face.ordinal()], org.bukkit.block.data.type.Wall.Height.class);
+        return this.get(CraftCobbleWall.HEIGHTS[face.ordinal()], org.bukkit.block.data.type.Wall.Height.class);
     }
 
     @Override
     public void setHeight(org.bukkit.block.BlockFace face, org.bukkit.block.data.type.Wall.Height height) {
-        set(HEIGHTS[face.ordinal()], height);
+        this.set(CraftCobbleWall.HEIGHTS[face.ordinal()], height);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockCobbleWall.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.WallBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftCobbleWall.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftCobbleWall.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCocoa.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCocoa.java
index 2298e9a122..56167946a2 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCocoa.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCocoa.java
@@ -9,45 +9,45 @@ public final class CraftCocoa extends org.bukkit.craftbukkit.block.data.CraftBlo
         super();
     }
 
-    public CraftCocoa(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftCocoa(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAgeable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockCocoa.class, "age");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty AGE = getInteger(net.minecraft.world.level.block.CocoaBlock.class, "age");
 
     @Override
     public int getAge() {
-        return get(AGE);
+        return this.get(CraftCocoa.AGE);
     }
 
     @Override
     public void setAge(int age) {
-        set(AGE, age);
+        this.set(CraftCocoa.AGE, age);
     }
 
     @Override
     public int getMaximumAge() {
-        return getMax(AGE);
+        return getMax(CraftCocoa.AGE);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockCocoa.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.CocoaBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftCocoa.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftCocoa.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftCocoa.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCommand.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCommand.java
index f42cf17c81..14a788410c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCommand.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCommand.java
@@ -9,40 +9,40 @@ public final class CraftCommand extends org.bukkit.craftbukkit.block.data.CraftB
         super();
     }
 
-    public CraftCommand(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftCommand(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftCommandBlock
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean CONDITIONAL = getBoolean(net.minecraft.world.level.block.BlockCommand.class, "conditional");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty CONDITIONAL = getBoolean(net.minecraft.world.level.block.CommandBlock.class, "conditional");
 
     @Override
     public boolean isConditional() {
-        return get(CONDITIONAL);
+        return this.get(CraftCommand.CONDITIONAL);
     }
 
     @Override
     public void setConditional(boolean conditional) {
-        set(CONDITIONAL, conditional);
+        this.set(CraftCommand.CONDITIONAL, conditional);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockCommand.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.CommandBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftCommand.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftCommand.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftCommand.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftComposter.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftComposter.java
index cf572f5bb8..7ce2e8b733 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftComposter.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftComposter.java
@@ -9,26 +9,26 @@ public final class CraftComposter extends org.bukkit.craftbukkit.block.data.Craf
         super();
     }
 
-    public CraftComposter(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftComposter(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftLevelled
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger LEVEL = getInteger(net.minecraft.world.level.block.BlockComposter.class, "level");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty LEVEL = getInteger(net.minecraft.world.level.block.ComposterBlock.class, "level");
 
     @Override
     public int getLevel() {
-        return get(LEVEL);
+        return this.get(CraftComposter.LEVEL);
     }
 
     @Override
     public void setLevel(int level) {
-        set(LEVEL, level);
+        this.set(CraftComposter.LEVEL, level);
     }
 
     @Override
     public int getMaximumLevel() {
-        return getMax(LEVEL);
+        return getMax(CraftComposter.LEVEL);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftConduit.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftConduit.java
index b2e424b8a6..be87c2d5e6 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftConduit.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftConduit.java
@@ -9,21 +9,21 @@ public final class CraftConduit extends org.bukkit.craftbukkit.block.data.CraftB
         super();
     }
 
-    public CraftConduit(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftConduit(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockConduit.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.ConduitBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftConduit.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftConduit.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCopperBulb.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCopperBulb.java
index c3c4a4043a..e85ccc6e4a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCopperBulb.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCopperBulb.java
@@ -9,35 +9,35 @@ public final class CraftCopperBulb extends org.bukkit.craftbukkit.block.data.Cra
         super();
     }
 
-    public CraftCopperBulb(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftCopperBulb(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftLightable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LIT = getBoolean(net.minecraft.world.level.block.CopperBulbBlock.class, "lit");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty LIT = getBoolean(net.minecraft.world.level.block.CopperBulbBlock.class, "lit");
 
     @Override
     public boolean isLit() {
-        return get(LIT);
+        return this.get(CraftCopperBulb.LIT);
     }
 
     @Override
     public void setLit(boolean lit) {
-        set(LIT, lit);
+        this.set(CraftCopperBulb.LIT, lit);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.CopperBulbBlock.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.CopperBulbBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftCopperBulb.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftCopperBulb.POWERED, powered);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralDead.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralDead.java
index 88a64ddf04..927ee9b69a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralDead.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralDead.java
@@ -9,21 +9,21 @@ public final class CraftCoralDead extends org.bukkit.craftbukkit.block.data.Craf
         super();
     }
 
-    public CraftCoralDead(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftCoralDead(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockCoralDead.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.BaseCoralPlantBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftCoralDead.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftCoralDead.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFan.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFan.java
index 35aedfe24f..42f8430d6c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFan.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFan.java
@@ -9,21 +9,21 @@ public final class CraftCoralFan extends org.bukkit.craftbukkit.block.data.Craft
         super();
     }
 
-    public CraftCoralFan(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftCoralFan(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockCoralFan.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.CoralFanBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftCoralFan.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftCoralFan.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanAbstract.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanAbstract.java
index 35b6f0833d..88c371ca28 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanAbstract.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanAbstract.java
@@ -9,21 +9,21 @@ public final class CraftCoralFanAbstract extends org.bukkit.craftbukkit.block.da
         super();
     }
 
-    public CraftCoralFanAbstract(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftCoralFanAbstract(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockCoralFanAbstract.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.BaseCoralFanBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftCoralFanAbstract.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftCoralFanAbstract.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanWall.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanWall.java
index a69bde4b8a..0928c60c29 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanWall.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanWall.java
@@ -9,40 +9,40 @@ public final class CraftCoralFanWall extends org.bukkit.craftbukkit.block.data.C
         super();
     }
 
-    public CraftCoralFanWall(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftCoralFanWall(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockCoralFanWall.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.CoralWallFanBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftCoralFanWall.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftCoralFanWall.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftCoralFanWall.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockCoralFanWall.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.CoralWallFanBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftCoralFanWall.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftCoralFanWall.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanWallAbstract.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanWallAbstract.java
index 7134c7b1b5..b1715fcac8 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanWallAbstract.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralFanWallAbstract.java
@@ -9,40 +9,40 @@ public final class CraftCoralFanWallAbstract extends org.bukkit.craftbukkit.bloc
         super();
     }
 
-    public CraftCoralFanWallAbstract(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftCoralFanWallAbstract(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockCoralFanWallAbstract.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.BaseCoralWallFanBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftCoralFanWallAbstract.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftCoralFanWallAbstract.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftCoralFanWallAbstract.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockCoralFanWallAbstract.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.BaseCoralWallFanBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftCoralFanWallAbstract.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftCoralFanWallAbstract.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralPlant.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralPlant.java
index 31f7e52969..447c4e1db5 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralPlant.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCoralPlant.java
@@ -9,21 +9,21 @@ public final class CraftCoralPlant extends org.bukkit.craftbukkit.block.data.Cra
         super();
     }
 
-    public CraftCoralPlant(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftCoralPlant(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockCoralPlant.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.CoralPlantBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftCoralPlant.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftCoralPlant.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCrafter.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCrafter.java
index 3eabfe6745..78b8a7cda5 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCrafter.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCrafter.java
@@ -9,43 +9,43 @@ public final class CraftCrafter extends org.bukkit.craftbukkit.block.data.CraftB
         super();
     }
 
-    public CraftCrafter(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftCrafter(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftCrafter
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean CRAFTING = getBoolean(net.minecraft.world.level.block.CrafterBlock.class, "crafting");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean TRIGGERED = getBoolean(net.minecraft.world.level.block.CrafterBlock.class, "triggered");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> ORIENTATION = getEnum(net.minecraft.world.level.block.CrafterBlock.class, "orientation");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty CRAFTING = getBoolean(net.minecraft.world.level.block.CrafterBlock.class, "crafting");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty TRIGGERED = getBoolean(net.minecraft.world.level.block.CrafterBlock.class, "triggered");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> ORIENTATION = getEnum(net.minecraft.world.level.block.CrafterBlock.class, "orientation");
 
     @Override
     public boolean isCrafting() {
-        return get(CRAFTING);
+        return this.get(CraftCrafter.CRAFTING);
     }
 
     @Override
     public void setCrafting(boolean crafting) {
-        set(CRAFTING, crafting);
+        this.set(CraftCrafter.CRAFTING, crafting);
     }
 
     @Override
     public boolean isTriggered() {
-        return get(TRIGGERED);
+        return this.get(CraftCrafter.TRIGGERED);
     }
 
     @Override
     public void setTriggered(boolean triggered) {
-        set(TRIGGERED, triggered);
+        this.set(CraftCrafter.TRIGGERED, triggered);
     }
 
     @Override
     public org.bukkit.block.data.type.Crafter.Orientation getOrientation() {
-        return get(ORIENTATION, org.bukkit.block.data.type.Crafter.Orientation.class);
+        return this.get(CraftCrafter.ORIENTATION, org.bukkit.block.data.type.Crafter.Orientation.class);
     }
 
     @Override
     public void setOrientation(org.bukkit.block.data.type.Crafter.Orientation orientation) {
-        set(ORIENTATION, orientation);
+        this.set(CraftCrafter.ORIENTATION, orientation);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCreakingHeart.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCreakingHeart.java
index 11f73f3de7..90d6f9655b 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCreakingHeart.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCreakingHeart.java
@@ -9,51 +9,51 @@ public final class CraftCreakingHeart extends org.bukkit.craftbukkit.block.data.
         super();
     }
 
-    public CraftCreakingHeart(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftCreakingHeart(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftCreakingHeart
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean ACTIVE = getBoolean(net.minecraft.world.level.block.CreakingHeartBlock.class, "active");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean NATURAL = getBoolean(net.minecraft.world.level.block.CreakingHeartBlock.class, "natural");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty ACTIVE = getBoolean(net.minecraft.world.level.block.CreakingHeartBlock.class, "active");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty NATURAL = getBoolean(net.minecraft.world.level.block.CreakingHeartBlock.class, "natural");
 
     @Override
     public boolean isActive() {
-        return get(ACTIVE);
+        return this.get(CraftCreakingHeart.ACTIVE);
     }
 
     @Override
     public void setActive(boolean active) {
-        set(ACTIVE, active);
+        this.set(CraftCreakingHeart.ACTIVE, active);
     }
 
     @Override
     public boolean isNatural() {
-        return get(NATURAL);
+        return this.get(CraftCreakingHeart.NATURAL);
     }
 
     @Override
     public void setNatural(boolean natural) {
-        set(NATURAL, natural);
+        this.set(CraftCreakingHeart.NATURAL, natural);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftOrientable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> AXIS = getEnum(net.minecraft.world.level.block.CreakingHeartBlock.class, "axis");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> AXIS = getEnum(net.minecraft.world.level.block.CreakingHeartBlock.class, "axis");
 
     @Override
     public org.bukkit.Axis getAxis() {
-        return get(AXIS, org.bukkit.Axis.class);
+        return this.get(CraftCreakingHeart.AXIS, org.bukkit.Axis.class);
     }
 
     @Override
     public void setAxis(org.bukkit.Axis axis) {
-        set(AXIS, axis);
+        this.set(CraftCreakingHeart.AXIS, axis);
     }
 
     @Override
     public java.util.Set<org.bukkit.Axis> getAxes() {
-        return getValues(AXIS, org.bukkit.Axis.class);
+        return this.getValues(CraftCreakingHeart.AXIS, org.bukkit.Axis.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCrops.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCrops.java
index 83b8b56fbe..d186de7098 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCrops.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftCrops.java
@@ -9,26 +9,26 @@ public final class CraftCrops extends org.bukkit.craftbukkit.block.data.CraftBlo
         super();
     }
 
-    public CraftCrops(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftCrops(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAgeable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockCrops.class, "age");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty AGE = getInteger(net.minecraft.world.level.block.CropBlock.class, "age");
 
     @Override
     public int getAge() {
-        return get(AGE);
+        return this.get(CraftCrops.AGE);
     }
 
     @Override
     public void setAge(int age) {
-        set(AGE, age);
+        this.set(CraftCrops.AGE, age);
     }
 
     @Override
     public int getMaximumAge() {
-        return getMax(AGE);
+        return getMax(CraftCrops.AGE);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDaylightDetector.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDaylightDetector.java
index c5ab57008f..3fd2f7b86f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDaylightDetector.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDaylightDetector.java
@@ -9,40 +9,40 @@ public final class CraftDaylightDetector extends org.bukkit.craftbukkit.block.da
         super();
     }
 
-    public CraftDaylightDetector(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftDaylightDetector(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftDaylightDetector
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean INVERTED = getBoolean(net.minecraft.world.level.block.BlockDaylightDetector.class, "inverted");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty INVERTED = getBoolean(net.minecraft.world.level.block.DaylightDetectorBlock.class, "inverted");
 
     @Override
     public boolean isInverted() {
-        return get(INVERTED);
+        return this.get(CraftDaylightDetector.INVERTED);
     }
 
     @Override
     public void setInverted(boolean inverted) {
-        set(INVERTED, inverted);
+        this.set(CraftDaylightDetector.INVERTED, inverted);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAnaloguePowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger POWER = getInteger(net.minecraft.world.level.block.BlockDaylightDetector.class, "power");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty POWER = getInteger(net.minecraft.world.level.block.DaylightDetectorBlock.class, "power");
 
     @Override
     public int getPower() {
-        return get(POWER);
+        return this.get(CraftDaylightDetector.POWER);
     }
 
     @Override
     public void setPower(int power) {
-        set(POWER, power);
+        this.set(CraftDaylightDetector.POWER, power);
     }
 
     @Override
     public int getMaximumPower() {
-        return getMax(POWER);
+        return getMax(CraftDaylightDetector.POWER);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDecoratedPot.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDecoratedPot.java
index c21c7bc174..356230b9b2 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDecoratedPot.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDecoratedPot.java
@@ -9,40 +9,40 @@ public final class CraftDecoratedPot extends org.bukkit.craftbukkit.block.data.C
         super();
     }
 
-    public CraftDecoratedPot(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftDecoratedPot(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.DecoratedPotBlock.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.DecoratedPotBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftDecoratedPot.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftDecoratedPot.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftDecoratedPot.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.DecoratedPotBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.DecoratedPotBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftDecoratedPot.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftDecoratedPot.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDirtSnow.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDirtSnow.java
index 5c4a061b09..a2d3b1f7a7 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDirtSnow.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDirtSnow.java
@@ -9,21 +9,21 @@ public final class CraftDirtSnow extends org.bukkit.craftbukkit.block.data.Craft
         super();
     }
 
-    public CraftDirtSnow(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftDirtSnow(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftSnowable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean SNOWY = getBoolean(net.minecraft.world.level.block.BlockDirtSnow.class, "snowy");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty SNOWY = getBoolean(net.minecraft.world.level.block.SnowyDirtBlock.class, "snowy");
 
     @Override
     public boolean isSnowy() {
-        return get(SNOWY);
+        return this.get(CraftDirtSnow.SNOWY);
     }
 
     @Override
     public void setSnowy(boolean snowy) {
-        set(SNOWY, snowy);
+        this.set(CraftDirtSnow.SNOWY, snowy);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDispenser.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDispenser.java
index 061e986973..444c0ef7b1 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDispenser.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDispenser.java
@@ -9,40 +9,40 @@ public final class CraftDispenser extends org.bukkit.craftbukkit.block.data.Craf
         super();
     }
 
-    public CraftDispenser(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftDispenser(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftDispenser
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean TRIGGERED = getBoolean(net.minecraft.world.level.block.BlockDispenser.class, "triggered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty TRIGGERED = getBoolean(net.minecraft.world.level.block.DispenserBlock.class, "triggered");
 
     @Override
     public boolean isTriggered() {
-        return get(TRIGGERED);
+        return this.get(CraftDispenser.TRIGGERED);
     }
 
     @Override
     public void setTriggered(boolean triggered) {
-        set(TRIGGERED, triggered);
+        this.set(CraftDispenser.TRIGGERED, triggered);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockDispenser.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.DispenserBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftDispenser.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftDispenser.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftDispenser.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDoor.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDoor.java
index 1dafa4ea75..633e7fd045 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDoor.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDoor.java
@@ -9,82 +9,82 @@ public final class CraftDoor extends org.bukkit.craftbukkit.block.data.CraftBloc
         super();
     }
 
-    public CraftDoor(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftDoor(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftDoor
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> HINGE = getEnum(net.minecraft.world.level.block.BlockDoor.class, "hinge");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> HINGE = getEnum(net.minecraft.world.level.block.DoorBlock.class, "hinge");
 
     @Override
     public org.bukkit.block.data.type.Door.Hinge getHinge() {
-        return get(HINGE, org.bukkit.block.data.type.Door.Hinge.class);
+        return this.get(CraftDoor.HINGE, org.bukkit.block.data.type.Door.Hinge.class);
     }
 
     @Override
     public void setHinge(org.bukkit.block.data.type.Door.Hinge hinge) {
-        set(HINGE, hinge);
+        this.set(CraftDoor.HINGE, hinge);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftBisected
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> HALF = getEnum(net.minecraft.world.level.block.BlockDoor.class, "half");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> HALF = getEnum(net.minecraft.world.level.block.DoorBlock.class, "half");
 
     @Override
     public org.bukkit.block.data.Bisected.Half getHalf() {
-        return get(HALF, org.bukkit.block.data.Bisected.Half.class);
+        return this.get(CraftDoor.HALF, org.bukkit.block.data.Bisected.Half.class);
     }
 
     @Override
     public void setHalf(org.bukkit.block.data.Bisected.Half half) {
-        set(HALF, half);
+        this.set(CraftDoor.HALF, half);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockDoor.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.DoorBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftDoor.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftDoor.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftDoor.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftOpenable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean OPEN = getBoolean(net.minecraft.world.level.block.BlockDoor.class, "open");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty OPEN = getBoolean(net.minecraft.world.level.block.DoorBlock.class, "open");
 
     @Override
     public boolean isOpen() {
-        return get(OPEN);
+        return this.get(CraftDoor.OPEN);
     }
 
     @Override
     public void setOpen(boolean open) {
-        set(OPEN, open);
+        this.set(CraftDoor.OPEN, open);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockDoor.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.DoorBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftDoor.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftDoor.POWERED, powered);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDropper.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDropper.java
index 37fbb0b0ac..c460bb6766 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDropper.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftDropper.java
@@ -9,40 +9,40 @@ public final class CraftDropper extends org.bukkit.craftbukkit.block.data.CraftB
         super();
     }
 
-    public CraftDropper(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftDropper(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftDispenser
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean TRIGGERED = getBoolean(net.minecraft.world.level.block.BlockDropper.class, "triggered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty TRIGGERED = getBoolean(net.minecraft.world.level.block.DropperBlock.class, "triggered");
 
     @Override
     public boolean isTriggered() {
-        return get(TRIGGERED);
+        return this.get(CraftDropper.TRIGGERED);
     }
 
     @Override
     public void setTriggered(boolean triggered) {
-        set(TRIGGERED, triggered);
+        this.set(CraftDropper.TRIGGERED, triggered);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockDropper.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.DropperBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftDropper.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftDropper.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftDropper.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftEndRod.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftEndRod.java
index 387f179601..81ad91969c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftEndRod.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftEndRod.java
@@ -9,26 +9,26 @@ public final class CraftEndRod extends org.bukkit.craftbukkit.block.data.CraftBl
         super();
     }
 
-    public CraftEndRod(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftEndRod(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockEndRod.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.EndRodBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftEndRod.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftEndRod.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftEndRod.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftEnderChest.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftEnderChest.java
index 6bf22b7ec2..b259fc7fcb 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftEnderChest.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftEnderChest.java
@@ -9,40 +9,40 @@ public final class CraftEnderChest extends org.bukkit.craftbukkit.block.data.Cra
         super();
     }
 
-    public CraftEnderChest(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftEnderChest(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockEnderChest.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.EnderChestBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftEnderChest.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftEnderChest.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftEnderChest.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockEnderChest.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.EnderChestBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftEnderChest.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftEnderChest.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftEnderPortalFrame.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftEnderPortalFrame.java
index 99dd4b6cca..d1959292a5 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftEnderPortalFrame.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftEnderPortalFrame.java
@@ -9,40 +9,40 @@ public final class CraftEnderPortalFrame extends org.bukkit.craftbukkit.block.da
         super();
     }
 
-    public CraftEnderPortalFrame(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftEnderPortalFrame(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftEndPortalFrame
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean EYE = getBoolean(net.minecraft.world.level.block.BlockEnderPortalFrame.class, "eye");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty EYE = getBoolean(net.minecraft.world.level.block.EndPortalFrameBlock.class, "eye");
 
     @Override
     public boolean hasEye() {
-        return get(EYE);
+        return this.get(CraftEnderPortalFrame.EYE);
     }
 
     @Override
     public void setEye(boolean eye) {
-        set(EYE, eye);
+        this.set(CraftEnderPortalFrame.EYE, eye);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockEnderPortalFrame.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.EndPortalFrameBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftEnderPortalFrame.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftEnderPortalFrame.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftEnderPortalFrame.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFence.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFence.java
index 28eec8009b..11f2f10703 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFence.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFence.java
@@ -9,40 +9,40 @@ public final class CraftFence extends org.bukkit.craftbukkit.block.data.CraftBlo
         super();
     }
 
-    public CraftFence(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftFence(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftMultipleFacing
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] FACES = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{
-        getBoolean(net.minecraft.world.level.block.BlockFence.class, "north", true), getBoolean(net.minecraft.world.level.block.BlockFence.class, "east", true), getBoolean(net.minecraft.world.level.block.BlockFence.class, "south", true), getBoolean(net.minecraft.world.level.block.BlockFence.class, "west", true), getBoolean(net.minecraft.world.level.block.BlockFence.class, "up", true), getBoolean(net.minecraft.world.level.block.BlockFence.class, "down", true)
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty[] FACES = new net.minecraft.world.level.block.state.properties.BooleanProperty[]{
+        getBoolean(net.minecraft.world.level.block.FenceBlock.class, "north", true), getBoolean(net.minecraft.world.level.block.FenceBlock.class, "east", true), getBoolean(net.minecraft.world.level.block.FenceBlock.class, "south", true), getBoolean(net.minecraft.world.level.block.FenceBlock.class, "west", true), getBoolean(net.minecraft.world.level.block.FenceBlock.class, "up", true), getBoolean(net.minecraft.world.level.block.FenceBlock.class, "down", true)
     };
 
     @Override
     public boolean hasFace(org.bukkit.block.BlockFace face) {
-        net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
+        net.minecraft.world.level.block.state.properties.BooleanProperty state = CraftFence.FACES[face.ordinal()];
         if (state == null) {
             throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
         }
-        return get(state);
+        return this.get(state);
     }
 
     @Override
     public void setFace(org.bukkit.block.BlockFace face, boolean has) {
-        net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
+        net.minecraft.world.level.block.state.properties.BooleanProperty state = CraftFence.FACES[face.ordinal()];
         if (state == null) {
             throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
         }
-        set(state, has);
+        this.set(state, has);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
         com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
 
-        for (int i = 0; i < FACES.length; i++) {
-            if (FACES[i] != null && get(FACES[i])) {
+        for (int i = 0; i < CraftFence.FACES.length; i++) {
+            if (CraftFence.FACES[i] != null && this.get(CraftFence.FACES[i])) {
                 faces.add(org.bukkit.block.BlockFace.values()[i]);
             }
         }
@@ -54,8 +54,8 @@ public final class CraftFence extends org.bukkit.craftbukkit.block.data.CraftBlo
     public java.util.Set<org.bukkit.block.BlockFace> getAllowedFaces() {
         com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
 
-        for (int i = 0; i < FACES.length; i++) {
-            if (FACES[i] != null) {
+        for (int i = 0; i < CraftFence.FACES.length; i++) {
+            if (CraftFence.FACES[i] != null) {
                 faces.add(org.bukkit.block.BlockFace.values()[i]);
             }
         }
@@ -65,15 +65,15 @@ public final class CraftFence extends org.bukkit.craftbukkit.block.data.CraftBlo
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockFence.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.FenceBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftFence.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftFence.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFenceGate.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFenceGate.java
index 6ffb606009..b31474d3b2 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFenceGate.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFenceGate.java
@@ -9,68 +9,68 @@ public final class CraftFenceGate extends org.bukkit.craftbukkit.block.data.Craf
         super();
     }
 
-    public CraftFenceGate(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftFenceGate(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftGate
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean IN_WALL = getBoolean(net.minecraft.world.level.block.BlockFenceGate.class, "in_wall");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty IN_WALL = getBoolean(net.minecraft.world.level.block.FenceGateBlock.class, "in_wall");
 
     @Override
     public boolean isInWall() {
-        return get(IN_WALL);
+        return this.get(CraftFenceGate.IN_WALL);
     }
 
     @Override
     public void setInWall(boolean inWall) {
-        set(IN_WALL, inWall);
+        this.set(CraftFenceGate.IN_WALL, inWall);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockFenceGate.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.FenceGateBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftFenceGate.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftFenceGate.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftFenceGate.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftOpenable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean OPEN = getBoolean(net.minecraft.world.level.block.BlockFenceGate.class, "open");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty OPEN = getBoolean(net.minecraft.world.level.block.FenceGateBlock.class, "open");
 
     @Override
     public boolean isOpen() {
-        return get(OPEN);
+        return this.get(CraftFenceGate.OPEN);
     }
 
     @Override
     public void setOpen(boolean open) {
-        set(OPEN, open);
+        this.set(CraftFenceGate.OPEN, open);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockFenceGate.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.FenceGateBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftFenceGate.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftFenceGate.POWERED, powered);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFire.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFire.java
index cac0e18ebc..b4a0566cd9 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFire.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFire.java
@@ -9,59 +9,59 @@ public final class CraftFire extends org.bukkit.craftbukkit.block.data.CraftBloc
         super();
     }
 
-    public CraftFire(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftFire(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAgeable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockFire.class, "age");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty AGE = getInteger(net.minecraft.world.level.block.FireBlock.class, "age");
 
     @Override
     public int getAge() {
-        return get(AGE);
+        return this.get(CraftFire.AGE);
     }
 
     @Override
     public void setAge(int age) {
-        set(AGE, age);
+        this.set(CraftFire.AGE, age);
     }
 
     @Override
     public int getMaximumAge() {
-        return getMax(AGE);
+        return getMax(CraftFire.AGE);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftMultipleFacing
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] FACES = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{
-        getBoolean(net.minecraft.world.level.block.BlockFire.class, "north", true), getBoolean(net.minecraft.world.level.block.BlockFire.class, "east", true), getBoolean(net.minecraft.world.level.block.BlockFire.class, "south", true), getBoolean(net.minecraft.world.level.block.BlockFire.class, "west", true), getBoolean(net.minecraft.world.level.block.BlockFire.class, "up", true), getBoolean(net.minecraft.world.level.block.BlockFire.class, "down", true)
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty[] FACES = new net.minecraft.world.level.block.state.properties.BooleanProperty[]{
+        getBoolean(net.minecraft.world.level.block.FireBlock.class, "north", true), getBoolean(net.minecraft.world.level.block.FireBlock.class, "east", true), getBoolean(net.minecraft.world.level.block.FireBlock.class, "south", true), getBoolean(net.minecraft.world.level.block.FireBlock.class, "west", true), getBoolean(net.minecraft.world.level.block.FireBlock.class, "up", true), getBoolean(net.minecraft.world.level.block.FireBlock.class, "down", true)
     };
 
     @Override
     public boolean hasFace(org.bukkit.block.BlockFace face) {
-        net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
+        net.minecraft.world.level.block.state.properties.BooleanProperty state = CraftFire.FACES[face.ordinal()];
         if (state == null) {
             throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
         }
-        return get(state);
+        return this.get(state);
     }
 
     @Override
     public void setFace(org.bukkit.block.BlockFace face, boolean has) {
-        net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
+        net.minecraft.world.level.block.state.properties.BooleanProperty state = CraftFire.FACES[face.ordinal()];
         if (state == null) {
             throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
         }
-        set(state, has);
+        this.set(state, has);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
         com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
 
-        for (int i = 0; i < FACES.length; i++) {
-            if (FACES[i] != null && get(FACES[i])) {
+        for (int i = 0; i < CraftFire.FACES.length; i++) {
+            if (CraftFire.FACES[i] != null && this.get(CraftFire.FACES[i])) {
                 faces.add(org.bukkit.block.BlockFace.values()[i]);
             }
         }
@@ -73,8 +73,8 @@ public final class CraftFire extends org.bukkit.craftbukkit.block.data.CraftBloc
     public java.util.Set<org.bukkit.block.BlockFace> getAllowedFaces() {
         com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
 
-        for (int i = 0; i < FACES.length; i++) {
-            if (FACES[i] != null) {
+        for (int i = 0; i < CraftFire.FACES.length; i++) {
+            if (CraftFire.FACES[i] != null) {
                 faces.add(org.bukkit.block.BlockFace.values()[i]);
             }
         }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFloorSign.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFloorSign.java
index fbea1e86c7..6c5c012370 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFloorSign.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFloorSign.java
@@ -9,17 +9,17 @@ public final class CraftFloorSign extends org.bukkit.craftbukkit.block.data.Craf
         super();
     }
 
-    public CraftFloorSign(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftFloorSign(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftRotatable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger ROTATION = getInteger(net.minecraft.world.level.block.BlockFloorSign.class, "rotation");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty ROTATION = getInteger(net.minecraft.world.level.block.StandingSignBlock.class, "rotation");
 
     @Override
     public org.bukkit.block.BlockFace getRotation() {
-        int data = get(ROTATION);
+        int data = this.get(CraftFloorSign.ROTATION);
         switch (data) {
             case 0x0:
                 return org.bukkit.block.BlockFace.SOUTH;
@@ -113,20 +113,20 @@ public final class CraftFloorSign extends org.bukkit.craftbukkit.block.data.Craf
             default:
                 throw new IllegalArgumentException("Illegal rotation " + rotation);
         }
-        set(ROTATION, val);
+        this.set(CraftFloorSign.ROTATION, val);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockFloorSign.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.StandingSignBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftFloorSign.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftFloorSign.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFluids.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFluids.java
index 0d9bf07031..70d734fc71 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFluids.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFluids.java
@@ -9,26 +9,26 @@ public final class CraftFluids extends org.bukkit.craftbukkit.block.data.CraftBl
         super();
     }
 
-    public CraftFluids(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftFluids(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftLevelled
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger LEVEL = getInteger(net.minecraft.world.level.block.BlockFluids.class, "level");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty LEVEL = getInteger(net.minecraft.world.level.block.LiquidBlock.class, "level");
 
     @Override
     public int getLevel() {
-        return get(LEVEL);
+        return this.get(CraftFluids.LEVEL);
     }
 
     @Override
     public void setLevel(int level) {
-        set(LEVEL, level);
+        this.set(CraftFluids.LEVEL, level);
     }
 
     @Override
     public int getMaximumLevel() {
-        return getMax(LEVEL);
+        return getMax(CraftFluids.LEVEL);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFurnaceFurace.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFurnaceFurace.java
index 30478af33d..5698cb115b 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFurnaceFurace.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftFurnaceFurace.java
@@ -9,40 +9,40 @@ public final class CraftFurnaceFurace extends org.bukkit.craftbukkit.block.data.
         super();
     }
 
-    public CraftFurnaceFurace(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftFurnaceFurace(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockFurnaceFurace.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.FurnaceBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftFurnaceFurace.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftFurnaceFurace.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftFurnaceFurace.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftLightable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LIT = getBoolean(net.minecraft.world.level.block.BlockFurnaceFurace.class, "lit");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty LIT = getBoolean(net.minecraft.world.level.block.FurnaceBlock.class, "lit");
 
     @Override
     public boolean isLit() {
-        return get(LIT);
+        return this.get(CraftFurnaceFurace.LIT);
     }
 
     @Override
     public void setLit(boolean lit) {
-        set(LIT, lit);
+        this.set(CraftFurnaceFurace.LIT, lit);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGlazedTerracotta.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGlazedTerracotta.java
index ec024f0da6..bae1e6e750 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGlazedTerracotta.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGlazedTerracotta.java
@@ -9,26 +9,26 @@ public final class CraftGlazedTerracotta extends org.bukkit.craftbukkit.block.da
         super();
     }
 
-    public CraftGlazedTerracotta(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftGlazedTerracotta(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockGlazedTerracotta.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.GlazedTerracottaBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftGlazedTerracotta.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftGlazedTerracotta.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftGlazedTerracotta.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGlowLichen.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGlowLichen.java
index 1c82832e37..b921b97f35 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGlowLichen.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGlowLichen.java
@@ -9,40 +9,40 @@ public final class CraftGlowLichen extends org.bukkit.craftbukkit.block.data.Cra
         super();
     }
 
-    public CraftGlowLichen(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftGlowLichen(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftMultipleFacing
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] FACES = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty[] FACES = new net.minecraft.world.level.block.state.properties.BooleanProperty[]{
         getBoolean(net.minecraft.world.level.block.GlowLichenBlock.class, "north", true), getBoolean(net.minecraft.world.level.block.GlowLichenBlock.class, "east", true), getBoolean(net.minecraft.world.level.block.GlowLichenBlock.class, "south", true), getBoolean(net.minecraft.world.level.block.GlowLichenBlock.class, "west", true), getBoolean(net.minecraft.world.level.block.GlowLichenBlock.class, "up", true), getBoolean(net.minecraft.world.level.block.GlowLichenBlock.class, "down", true)
     };
 
     @Override
     public boolean hasFace(org.bukkit.block.BlockFace face) {
-        net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
+        net.minecraft.world.level.block.state.properties.BooleanProperty state = CraftGlowLichen.FACES[face.ordinal()];
         if (state == null) {
             throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
         }
-        return get(state);
+        return this.get(state);
     }
 
     @Override
     public void setFace(org.bukkit.block.BlockFace face, boolean has) {
-        net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
+        net.minecraft.world.level.block.state.properties.BooleanProperty state = CraftGlowLichen.FACES[face.ordinal()];
         if (state == null) {
             throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
         }
-        set(state, has);
+        this.set(state, has);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
         com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
 
-        for (int i = 0; i < FACES.length; i++) {
-            if (FACES[i] != null && get(FACES[i])) {
+        for (int i = 0; i < CraftGlowLichen.FACES.length; i++) {
+            if (CraftGlowLichen.FACES[i] != null && this.get(CraftGlowLichen.FACES[i])) {
                 faces.add(org.bukkit.block.BlockFace.values()[i]);
             }
         }
@@ -54,8 +54,8 @@ public final class CraftGlowLichen extends org.bukkit.craftbukkit.block.data.Cra
     public java.util.Set<org.bukkit.block.BlockFace> getAllowedFaces() {
         com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
 
-        for (int i = 0; i < FACES.length; i++) {
-            if (FACES[i] != null) {
+        for (int i = 0; i < CraftGlowLichen.FACES.length; i++) {
+            if (CraftGlowLichen.FACES[i] != null) {
                 faces.add(org.bukkit.block.BlockFace.values()[i]);
             }
         }
@@ -65,15 +65,15 @@ public final class CraftGlowLichen extends org.bukkit.craftbukkit.block.data.Cra
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.GlowLichenBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.GlowLichenBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftGlowLichen.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftGlowLichen.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGrass.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGrass.java
index bdcd971c38..550a80ec5c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGrass.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGrass.java
@@ -9,21 +9,21 @@ public final class CraftGrass extends org.bukkit.craftbukkit.block.data.CraftBlo
         super();
     }
 
-    public CraftGrass(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftGrass(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftSnowable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean SNOWY = getBoolean(net.minecraft.world.level.block.BlockGrass.class, "snowy");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty SNOWY = getBoolean(net.minecraft.world.level.block.GrassBlock.class, "snowy");
 
     @Override
     public boolean isSnowy() {
-        return get(SNOWY);
+        return this.get(CraftGrass.SNOWY);
     }
 
     @Override
     public void setSnowy(boolean snowy) {
-        set(SNOWY, snowy);
+        this.set(CraftGrass.SNOWY, snowy);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGrindstone.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGrindstone.java
index 32444f739d..6f1f0d1ba5 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGrindstone.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftGrindstone.java
@@ -9,40 +9,40 @@ public final class CraftGrindstone extends org.bukkit.craftbukkit.block.data.Cra
         super();
     }
 
-    public CraftGrindstone(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftGrindstone(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockGrindstone.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.GrindstoneBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftGrindstone.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftGrindstone.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftGrindstone.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftFaceAttachable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> ATTACH_FACE = getEnum(net.minecraft.world.level.block.BlockGrindstone.class, "face");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> ATTACH_FACE = getEnum(net.minecraft.world.level.block.GrindstoneBlock.class, "face");
 
     @Override
     public org.bukkit.block.data.FaceAttachable.AttachedFace getAttachedFace() {
-        return get(ATTACH_FACE, org.bukkit.block.data.FaceAttachable.AttachedFace.class);
+        return this.get(CraftGrindstone.ATTACH_FACE, org.bukkit.block.data.FaceAttachable.AttachedFace.class);
     }
 
     @Override
     public void setAttachedFace(org.bukkit.block.data.FaceAttachable.AttachedFace face) {
-        set(ATTACH_FACE, face);
+        this.set(CraftGrindstone.ATTACH_FACE, face);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHangingMoss.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHangingMoss.java
index 40a59ddd60..b216aad4ee 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHangingMoss.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHangingMoss.java
@@ -9,21 +9,21 @@ public final class CraftHangingMoss extends org.bukkit.craftbukkit.block.data.Cr
         super();
     }
 
-    public CraftHangingMoss(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftHangingMoss(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftHangingMoss
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean TIP = getBoolean(net.minecraft.world.level.block.HangingMossBlock.class, "tip");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty TIP = getBoolean(net.minecraft.world.level.block.HangingMossBlock.class, "tip");
 
     @Override
     public boolean isTip() {
-        return get(TIP);
+        return this.get(CraftHangingMoss.TIP);
     }
 
     @Override
     public void setTip(boolean tip) {
-        set(TIP, tip);
+        this.set(CraftHangingMoss.TIP, tip);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHangingRoots.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHangingRoots.java
index 01418e8922..c3e66c6d55 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHangingRoots.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHangingRoots.java
@@ -9,21 +9,21 @@ public final class CraftHangingRoots extends org.bukkit.craftbukkit.block.data.C
         super();
     }
 
-    public CraftHangingRoots(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftHangingRoots(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.HangingRootsBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.HangingRootsBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftHangingRoots.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftHangingRoots.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHay.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHay.java
index afe6560146..3801685a7d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHay.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHay.java
@@ -9,26 +9,26 @@ public final class CraftHay extends org.bukkit.craftbukkit.block.data.CraftBlock
         super();
     }
 
-    public CraftHay(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftHay(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftOrientable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> AXIS = getEnum(net.minecraft.world.level.block.BlockHay.class, "axis");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> AXIS = getEnum(net.minecraft.world.level.block.HayBlock.class, "axis");
 
     @Override
     public org.bukkit.Axis getAxis() {
-        return get(AXIS, org.bukkit.Axis.class);
+        return this.get(CraftHay.AXIS, org.bukkit.Axis.class);
     }
 
     @Override
     public void setAxis(org.bukkit.Axis axis) {
-        set(AXIS, axis);
+        this.set(CraftHay.AXIS, axis);
     }
 
     @Override
     public java.util.Set<org.bukkit.Axis> getAxes() {
-        return getValues(AXIS, org.bukkit.Axis.class);
+        return this.getValues(CraftHay.AXIS, org.bukkit.Axis.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHeavyCore.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHeavyCore.java
index 364f7dbc10..d070fc8c36 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHeavyCore.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHeavyCore.java
@@ -9,21 +9,21 @@ public final class CraftHeavyCore extends org.bukkit.craftbukkit.block.data.Craf
         super();
     }
 
-    public CraftHeavyCore(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftHeavyCore(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.HeavyCoreBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.HeavyCoreBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftHeavyCore.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftHeavyCore.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHopper.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHopper.java
index ff70d732b6..26091ba15d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHopper.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHopper.java
@@ -9,40 +9,40 @@ public final class CraftHopper extends org.bukkit.craftbukkit.block.data.CraftBl
         super();
     }
 
-    public CraftHopper(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftHopper(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftHopper
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean ENABLED = getBoolean(net.minecraft.world.level.block.BlockHopper.class, "enabled");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty ENABLED = getBoolean(net.minecraft.world.level.block.HopperBlock.class, "enabled");
 
     @Override
     public boolean isEnabled() {
-        return get(ENABLED);
+        return this.get(CraftHopper.ENABLED);
     }
 
     @Override
     public void setEnabled(boolean enabled) {
-        set(ENABLED, enabled);
+        this.set(CraftHopper.ENABLED, enabled);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockHopper.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.HopperBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftHopper.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftHopper.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftHopper.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHugeMushroom.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHugeMushroom.java
index 3b8bcfa134..ebd0633f98 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHugeMushroom.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftHugeMushroom.java
@@ -9,40 +9,40 @@ public final class CraftHugeMushroom extends org.bukkit.craftbukkit.block.data.C
         super();
     }
 
-    public CraftHugeMushroom(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftHugeMushroom(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftMultipleFacing
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] FACES = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{
-        getBoolean(net.minecraft.world.level.block.BlockHugeMushroom.class, "north", true), getBoolean(net.minecraft.world.level.block.BlockHugeMushroom.class, "east", true), getBoolean(net.minecraft.world.level.block.BlockHugeMushroom.class, "south", true), getBoolean(net.minecraft.world.level.block.BlockHugeMushroom.class, "west", true), getBoolean(net.minecraft.world.level.block.BlockHugeMushroom.class, "up", true), getBoolean(net.minecraft.world.level.block.BlockHugeMushroom.class, "down", true)
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty[] FACES = new net.minecraft.world.level.block.state.properties.BooleanProperty[]{
+        getBoolean(net.minecraft.world.level.block.HugeMushroomBlock.class, "north", true), getBoolean(net.minecraft.world.level.block.HugeMushroomBlock.class, "east", true), getBoolean(net.minecraft.world.level.block.HugeMushroomBlock.class, "south", true), getBoolean(net.minecraft.world.level.block.HugeMushroomBlock.class, "west", true), getBoolean(net.minecraft.world.level.block.HugeMushroomBlock.class, "up", true), getBoolean(net.minecraft.world.level.block.HugeMushroomBlock.class, "down", true)
     };
 
     @Override
     public boolean hasFace(org.bukkit.block.BlockFace face) {
-        net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
+        net.minecraft.world.level.block.state.properties.BooleanProperty state = CraftHugeMushroom.FACES[face.ordinal()];
         if (state == null) {
             throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
         }
-        return get(state);
+        return this.get(state);
     }
 
     @Override
     public void setFace(org.bukkit.block.BlockFace face, boolean has) {
-        net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
+        net.minecraft.world.level.block.state.properties.BooleanProperty state = CraftHugeMushroom.FACES[face.ordinal()];
         if (state == null) {
             throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
         }
-        set(state, has);
+        this.set(state, has);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
         com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
 
-        for (int i = 0; i < FACES.length; i++) {
-            if (FACES[i] != null && get(FACES[i])) {
+        for (int i = 0; i < CraftHugeMushroom.FACES.length; i++) {
+            if (CraftHugeMushroom.FACES[i] != null && this.get(CraftHugeMushroom.FACES[i])) {
                 faces.add(org.bukkit.block.BlockFace.values()[i]);
             }
         }
@@ -54,8 +54,8 @@ public final class CraftHugeMushroom extends org.bukkit.craftbukkit.block.data.C
     public java.util.Set<org.bukkit.block.BlockFace> getAllowedFaces() {
         com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
 
-        for (int i = 0; i < FACES.length; i++) {
-            if (FACES[i] != null) {
+        for (int i = 0; i < CraftHugeMushroom.FACES.length; i++) {
+            if (CraftHugeMushroom.FACES[i] != null) {
                 faces.add(org.bukkit.block.BlockFace.values()[i]);
             }
         }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftIceFrost.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftIceFrost.java
index b4ad06fd76..85367beecc 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftIceFrost.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftIceFrost.java
@@ -9,26 +9,26 @@ public final class CraftIceFrost extends org.bukkit.craftbukkit.block.data.Craft
         super();
     }
 
-    public CraftIceFrost(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftIceFrost(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAgeable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockIceFrost.class, "age");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty AGE = getInteger(net.minecraft.world.level.block.FrostedIceBlock.class, "age");
 
     @Override
     public int getAge() {
-        return get(AGE);
+        return this.get(CraftIceFrost.AGE);
     }
 
     @Override
     public void setAge(int age) {
-        set(AGE, age);
+        this.set(CraftIceFrost.AGE, age);
     }
 
     @Override
     public int getMaximumAge() {
-        return getMax(AGE);
+        return getMax(CraftIceFrost.AGE);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftInfestedRotatedPillar.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftInfestedRotatedPillar.java
index e7a67d4d48..e3272b34dc 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftInfestedRotatedPillar.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftInfestedRotatedPillar.java
@@ -9,26 +9,26 @@ public final class CraftInfestedRotatedPillar extends org.bukkit.craftbukkit.blo
         super();
     }
 
-    public CraftInfestedRotatedPillar(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftInfestedRotatedPillar(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftOrientable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> AXIS = getEnum(net.minecraft.world.level.block.InfestedRotatedPillarBlock.class, "axis");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> AXIS = getEnum(net.minecraft.world.level.block.InfestedRotatedPillarBlock.class, "axis");
 
     @Override
     public org.bukkit.Axis getAxis() {
-        return get(AXIS, org.bukkit.Axis.class);
+        return this.get(CraftInfestedRotatedPillar.AXIS, org.bukkit.Axis.class);
     }
 
     @Override
     public void setAxis(org.bukkit.Axis axis) {
-        set(AXIS, axis);
+        this.set(CraftInfestedRotatedPillar.AXIS, axis);
     }
 
     @Override
     public java.util.Set<org.bukkit.Axis> getAxes() {
-        return getValues(AXIS, org.bukkit.Axis.class);
+        return this.getValues(CraftInfestedRotatedPillar.AXIS, org.bukkit.Axis.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftIronBars.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftIronBars.java
index c755dbd0f6..485d212ce5 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftIronBars.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftIronBars.java
@@ -9,40 +9,40 @@ public final class CraftIronBars extends org.bukkit.craftbukkit.block.data.Craft
         super();
     }
 
-    public CraftIronBars(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftIronBars(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftMultipleFacing
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] FACES = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{
-        getBoolean(net.minecraft.world.level.block.BlockIronBars.class, "north", true), getBoolean(net.minecraft.world.level.block.BlockIronBars.class, "east", true), getBoolean(net.minecraft.world.level.block.BlockIronBars.class, "south", true), getBoolean(net.minecraft.world.level.block.BlockIronBars.class, "west", true), getBoolean(net.minecraft.world.level.block.BlockIronBars.class, "up", true), getBoolean(net.minecraft.world.level.block.BlockIronBars.class, "down", true)
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty[] FACES = new net.minecraft.world.level.block.state.properties.BooleanProperty[]{
+        getBoolean(net.minecraft.world.level.block.IronBarsBlock.class, "north", true), getBoolean(net.minecraft.world.level.block.IronBarsBlock.class, "east", true), getBoolean(net.minecraft.world.level.block.IronBarsBlock.class, "south", true), getBoolean(net.minecraft.world.level.block.IronBarsBlock.class, "west", true), getBoolean(net.minecraft.world.level.block.IronBarsBlock.class, "up", true), getBoolean(net.minecraft.world.level.block.IronBarsBlock.class, "down", true)
     };
 
     @Override
     public boolean hasFace(org.bukkit.block.BlockFace face) {
-        net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
+        net.minecraft.world.level.block.state.properties.BooleanProperty state = CraftIronBars.FACES[face.ordinal()];
         if (state == null) {
             throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
         }
-        return get(state);
+        return this.get(state);
     }
 
     @Override
     public void setFace(org.bukkit.block.BlockFace face, boolean has) {
-        net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
+        net.minecraft.world.level.block.state.properties.BooleanProperty state = CraftIronBars.FACES[face.ordinal()];
         if (state == null) {
             throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
         }
-        set(state, has);
+        this.set(state, has);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
         com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
 
-        for (int i = 0; i < FACES.length; i++) {
-            if (FACES[i] != null && get(FACES[i])) {
+        for (int i = 0; i < CraftIronBars.FACES.length; i++) {
+            if (CraftIronBars.FACES[i] != null && this.get(CraftIronBars.FACES[i])) {
                 faces.add(org.bukkit.block.BlockFace.values()[i]);
             }
         }
@@ -54,8 +54,8 @@ public final class CraftIronBars extends org.bukkit.craftbukkit.block.data.Craft
     public java.util.Set<org.bukkit.block.BlockFace> getAllowedFaces() {
         com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
 
-        for (int i = 0; i < FACES.length; i++) {
-            if (FACES[i] != null) {
+        for (int i = 0; i < CraftIronBars.FACES.length; i++) {
+            if (CraftIronBars.FACES[i] != null) {
                 faces.add(org.bukkit.block.BlockFace.values()[i]);
             }
         }
@@ -65,15 +65,15 @@ public final class CraftIronBars extends org.bukkit.craftbukkit.block.data.Craft
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockIronBars.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.IronBarsBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftIronBars.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftIronBars.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftJigsaw.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftJigsaw.java
index 344bdb5d73..12237538df 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftJigsaw.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftJigsaw.java
@@ -9,21 +9,21 @@ public final class CraftJigsaw extends org.bukkit.craftbukkit.block.data.CraftBl
         super();
     }
 
-    public CraftJigsaw(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftJigsaw(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftJigsaw
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> ORIENTATION = getEnum(net.minecraft.world.level.block.BlockJigsaw.class, "orientation");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> ORIENTATION = getEnum(net.minecraft.world.level.block.JigsawBlock.class, "orientation");
 
     @Override
     public org.bukkit.block.data.type.Jigsaw.Orientation getOrientation() {
-        return get(ORIENTATION, org.bukkit.block.data.type.Jigsaw.Orientation.class);
+        return this.get(CraftJigsaw.ORIENTATION, org.bukkit.block.data.type.Jigsaw.Orientation.class);
     }
 
     @Override
     public void setOrientation(org.bukkit.block.data.type.Jigsaw.Orientation orientation) {
-        set(ORIENTATION, orientation);
+        this.set(CraftJigsaw.ORIENTATION, orientation);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftJukeBox.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftJukeBox.java
index 998a04a1ff..3e37557bf6 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftJukeBox.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftJukeBox.java
@@ -9,16 +9,16 @@ public final class CraftJukeBox extends org.bukkit.craftbukkit.block.data.CraftB
         super();
     }
 
-    public CraftJukeBox(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftJukeBox(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftJukebox
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean HAS_RECORD = getBoolean(net.minecraft.world.level.block.BlockJukeBox.class, "has_record");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty HAS_RECORD = getBoolean(net.minecraft.world.level.block.JukeboxBlock.class, "has_record");
 
     @Override
     public boolean hasRecord() {
-        return get(HAS_RECORD);
+        return this.get(CraftJukeBox.HAS_RECORD);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftKelp.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftKelp.java
index cf291bbe11..299b91121a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftKelp.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftKelp.java
@@ -9,26 +9,26 @@ public final class CraftKelp extends org.bukkit.craftbukkit.block.data.CraftBloc
         super();
     }
 
-    public CraftKelp(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftKelp(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAgeable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockKelp.class, "age");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty AGE = getInteger(net.minecraft.world.level.block.KelpBlock.class, "age");
 
     @Override
     public int getAge() {
-        return get(AGE);
+        return this.get(CraftKelp.AGE);
     }
 
     @Override
     public void setAge(int age) {
-        set(AGE, age);
+        this.set(CraftKelp.AGE, age);
     }
 
     @Override
     public int getMaximumAge() {
-        return getMax(AGE);
+        return getMax(CraftKelp.AGE);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLadder.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLadder.java
index 16c1bc1845..26e5905647 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLadder.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLadder.java
@@ -9,40 +9,40 @@ public final class CraftLadder extends org.bukkit.craftbukkit.block.data.CraftBl
         super();
     }
 
-    public CraftLadder(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftLadder(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockLadder.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.LadderBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftLadder.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftLadder.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftLadder.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockLadder.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.LadderBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftLadder.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftLadder.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLantern.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLantern.java
index a77d99db1e..37ab63bb8d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLantern.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLantern.java
@@ -9,35 +9,35 @@ public final class CraftLantern extends org.bukkit.craftbukkit.block.data.CraftB
         super();
     }
 
-    public CraftLantern(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftLantern(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftHangable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean HANGING = getBoolean(net.minecraft.world.level.block.BlockLantern.class, "hanging");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty HANGING = getBoolean(net.minecraft.world.level.block.LanternBlock.class, "hanging");
 
     @Override
     public boolean isHanging() {
-        return get(HANGING);
+        return this.get(CraftLantern.HANGING);
     }
 
     @Override
     public void setHanging(boolean hanging) {
-        set(HANGING, hanging);
+        this.set(CraftLantern.HANGING, hanging);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockLantern.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.LanternBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftLantern.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftLantern.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLayeredCauldron.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLayeredCauldron.java
index d041159f2f..bf0d53f65f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLayeredCauldron.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLayeredCauldron.java
@@ -9,26 +9,26 @@ public final class CraftLayeredCauldron extends org.bukkit.craftbukkit.block.dat
         super();
     }
 
-    public CraftLayeredCauldron(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftLayeredCauldron(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftLevelled
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger LEVEL = getInteger(net.minecraft.world.level.block.LayeredCauldronBlock.class, "level");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty LEVEL = getInteger(net.minecraft.world.level.block.LayeredCauldronBlock.class, "level");
 
     @Override
     public int getLevel() {
-        return get(LEVEL);
+        return this.get(CraftLayeredCauldron.LEVEL);
     }
 
     @Override
     public void setLevel(int level) {
-        set(LEVEL, level);
+        this.set(CraftLayeredCauldron.LEVEL, level);
     }
 
     @Override
     public int getMaximumLevel() {
-        return getMax(LEVEL);
+        return getMax(CraftLayeredCauldron.LEVEL);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLeaves.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLeaves.java
index c445da6caa..33d9a950ed 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLeaves.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLeaves.java
@@ -9,46 +9,46 @@ public final class CraftLeaves extends org.bukkit.craftbukkit.block.data.CraftBl
         super();
     }
 
-    public CraftLeaves(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftLeaves(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftLeaves
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger DISTANCE = getInteger(net.minecraft.world.level.block.BlockLeaves.class, "distance");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean PERSISTENT = getBoolean(net.minecraft.world.level.block.BlockLeaves.class, "persistent");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty DISTANCE = getInteger(net.minecraft.world.level.block.LeavesBlock.class, "distance");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty PERSISTENT = getBoolean(net.minecraft.world.level.block.LeavesBlock.class, "persistent");
 
     @Override
     public boolean isPersistent() {
-        return get(PERSISTENT);
+        return this.get(CraftLeaves.PERSISTENT);
     }
 
     @Override
     public void setPersistent(boolean persistent) {
-        set(PERSISTENT, persistent);
+        this.set(CraftLeaves.PERSISTENT, persistent);
     }
 
     @Override
     public int getDistance() {
-        return get(DISTANCE);
+        return this.get(CraftLeaves.DISTANCE);
     }
 
     @Override
     public void setDistance(int distance) {
-        set(DISTANCE, distance);
+        this.set(CraftLeaves.DISTANCE, distance);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockLeaves.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.LeavesBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftLeaves.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftLeaves.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLectern.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLectern.java
index a25443af38..ee53b15208 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLectern.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLectern.java
@@ -9,49 +9,49 @@ public final class CraftLectern extends org.bukkit.craftbukkit.block.data.CraftB
         super();
     }
 
-    public CraftLectern(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftLectern(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftLectern
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean HAS_BOOK = getBoolean(net.minecraft.world.level.block.BlockLectern.class, "has_book");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty HAS_BOOK = getBoolean(net.minecraft.world.level.block.LecternBlock.class, "has_book");
 
     @Override
     public boolean hasBook() {
-        return get(HAS_BOOK);
+        return this.get(CraftLectern.HAS_BOOK);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockLectern.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.LecternBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftLectern.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftLectern.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftLectern.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockLectern.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.LecternBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftLectern.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftLectern.POWERED, powered);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLever.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLever.java
index 2176148861..761ab0fb13 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLever.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLever.java
@@ -9,68 +9,68 @@ public final class CraftLever extends org.bukkit.craftbukkit.block.data.CraftBlo
         super();
     }
 
-    public CraftLever(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftLever(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftSwitch
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACE = getEnum(net.minecraft.world.level.block.BlockLever.class, "face");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACE = getEnum(net.minecraft.world.level.block.LeverBlock.class, "face");
 
     @Override
     public org.bukkit.block.data.type.Switch.Face getFace() {
-        return get(FACE, org.bukkit.block.data.type.Switch.Face.class);
+        return this.get(CraftLever.FACE, org.bukkit.block.data.type.Switch.Face.class);
     }
 
     @Override
     public void setFace(org.bukkit.block.data.type.Switch.Face face) {
-        set(FACE, face);
+        this.set(CraftLever.FACE, face);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockLever.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.LeverBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftLever.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftLever.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftLever.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftFaceAttachable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> ATTACH_FACE = getEnum(net.minecraft.world.level.block.BlockLever.class, "face");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> ATTACH_FACE = getEnum(net.minecraft.world.level.block.LeverBlock.class, "face");
 
     @Override
     public org.bukkit.block.data.FaceAttachable.AttachedFace getAttachedFace() {
-        return get(ATTACH_FACE, org.bukkit.block.data.FaceAttachable.AttachedFace.class);
+        return this.get(CraftLever.ATTACH_FACE, org.bukkit.block.data.FaceAttachable.AttachedFace.class);
     }
 
     @Override
     public void setAttachedFace(org.bukkit.block.data.FaceAttachable.AttachedFace face) {
-        set(ATTACH_FACE, face);
+        this.set(CraftLever.ATTACH_FACE, face);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockLever.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.LeverBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftLever.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftLever.POWERED, powered);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLight.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLight.java
index b09f55f636..49f314b144 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLight.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLight.java
@@ -9,40 +9,40 @@ public final class CraftLight extends org.bukkit.craftbukkit.block.data.CraftBlo
         super();
     }
 
-    public CraftLight(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftLight(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftLevelled
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger LEVEL = getInteger(net.minecraft.world.level.block.LightBlock.class, "level");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty LEVEL = getInteger(net.minecraft.world.level.block.LightBlock.class, "level");
 
     @Override
     public int getLevel() {
-        return get(LEVEL);
+        return this.get(CraftLight.LEVEL);
     }
 
     @Override
     public void setLevel(int level) {
-        set(LEVEL, level);
+        this.set(CraftLight.LEVEL, level);
     }
 
     @Override
     public int getMaximumLevel() {
-        return getMax(LEVEL);
+        return getMax(CraftLight.LEVEL);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.LightBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.LightBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftLight.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftLight.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLightningRod.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLightningRod.java
index 5d3446ea60..b3bc8b411c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLightningRod.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLightningRod.java
@@ -9,54 +9,54 @@ public final class CraftLightningRod extends org.bukkit.craftbukkit.block.data.C
         super();
     }
 
-    public CraftLightningRod(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftLightningRod(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.LightningRodBlock.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.LightningRodBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftLightningRod.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftLightningRod.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftLightningRod.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.LightningRodBlock.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.LightningRodBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftLightningRod.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftLightningRod.POWERED, powered);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.LightningRodBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.LightningRodBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftLightningRod.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftLightningRod.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLoom.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLoom.java
index dad3dd226a..e39737c6a7 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLoom.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftLoom.java
@@ -9,26 +9,26 @@ public final class CraftLoom extends org.bukkit.craftbukkit.block.data.CraftBloc
         super();
     }
 
-    public CraftLoom(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftLoom(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockLoom.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.LoomBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftLoom.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftLoom.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftLoom.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMangroveLeaves.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMangroveLeaves.java
index 1ff34c90da..7a1f2fd2f7 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMangroveLeaves.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMangroveLeaves.java
@@ -9,46 +9,46 @@ public final class CraftMangroveLeaves extends org.bukkit.craftbukkit.block.data
         super();
     }
 
-    public CraftMangroveLeaves(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftMangroveLeaves(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftLeaves
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger DISTANCE = getInteger(net.minecraft.world.level.block.MangroveLeavesBlock.class, "distance");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean PERSISTENT = getBoolean(net.minecraft.world.level.block.MangroveLeavesBlock.class, "persistent");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty DISTANCE = getInteger(net.minecraft.world.level.block.MangroveLeavesBlock.class, "distance");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty PERSISTENT = getBoolean(net.minecraft.world.level.block.MangroveLeavesBlock.class, "persistent");
 
     @Override
     public boolean isPersistent() {
-        return get(PERSISTENT);
+        return this.get(CraftMangroveLeaves.PERSISTENT);
     }
 
     @Override
     public void setPersistent(boolean persistent) {
-        set(PERSISTENT, persistent);
+        this.set(CraftMangroveLeaves.PERSISTENT, persistent);
     }
 
     @Override
     public int getDistance() {
-        return get(DISTANCE);
+        return this.get(CraftMangroveLeaves.DISTANCE);
     }
 
     @Override
     public void setDistance(int distance) {
-        set(DISTANCE, distance);
+        this.set(CraftMangroveLeaves.DISTANCE, distance);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.MangroveLeavesBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.MangroveLeavesBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftMangroveLeaves.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftMangroveLeaves.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMangrovePropagule.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMangrovePropagule.java
index 1d7671ec25..5a48fdd96b 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMangrovePropagule.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMangrovePropagule.java
@@ -9,73 +9,73 @@ public final class CraftMangrovePropagule extends org.bukkit.craftbukkit.block.d
         super();
     }
 
-    public CraftMangrovePropagule(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftMangrovePropagule(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAgeable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.MangrovePropaguleBlock.class, "age");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty AGE = getInteger(net.minecraft.world.level.block.MangrovePropaguleBlock.class, "age");
 
     @Override
     public int getAge() {
-        return get(AGE);
+        return this.get(CraftMangrovePropagule.AGE);
     }
 
     @Override
     public void setAge(int age) {
-        set(AGE, age);
+        this.set(CraftMangrovePropagule.AGE, age);
     }
 
     @Override
     public int getMaximumAge() {
-        return getMax(AGE);
+        return getMax(CraftMangrovePropagule.AGE);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftHangable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean HANGING = getBoolean(net.minecraft.world.level.block.MangrovePropaguleBlock.class, "hanging");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty HANGING = getBoolean(net.minecraft.world.level.block.MangrovePropaguleBlock.class, "hanging");
 
     @Override
     public boolean isHanging() {
-        return get(HANGING);
+        return this.get(CraftMangrovePropagule.HANGING);
     }
 
     @Override
     public void setHanging(boolean hanging) {
-        set(HANGING, hanging);
+        this.set(CraftMangrovePropagule.HANGING, hanging);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftSapling
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger STAGE = getInteger(net.minecraft.world.level.block.MangrovePropaguleBlock.class, "stage");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty STAGE = getInteger(net.minecraft.world.level.block.MangrovePropaguleBlock.class, "stage");
 
     @Override
     public int getStage() {
-        return get(STAGE);
+        return this.get(CraftMangrovePropagule.STAGE);
     }
 
     @Override
     public void setStage(int stage) {
-        set(STAGE, stage);
+        this.set(CraftMangrovePropagule.STAGE, stage);
     }
 
     @Override
     public int getMaximumStage() {
-        return getMax(STAGE);
+        return getMax(CraftMangrovePropagule.STAGE);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.MangrovePropaguleBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.MangrovePropaguleBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftMangrovePropagule.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftMangrovePropagule.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMangroveRoots.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMangroveRoots.java
index 0a16b7d5d2..1442ed8cf8 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMangroveRoots.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMangroveRoots.java
@@ -9,21 +9,21 @@ public final class CraftMangroveRoots extends org.bukkit.craftbukkit.block.data.
         super();
     }
 
-    public CraftMangroveRoots(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftMangroveRoots(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.MangroveRootsBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.MangroveRootsBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftMangroveRoots.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftMangroveRoots.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMinecartDetector.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMinecartDetector.java
index bd02bb1b25..a462ef71be 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMinecartDetector.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMinecartDetector.java
@@ -9,54 +9,54 @@ public final class CraftMinecartDetector extends org.bukkit.craftbukkit.block.da
         super();
     }
 
-    public CraftMinecartDetector(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftMinecartDetector(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockMinecartDetector.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.DetectorRailBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftMinecartDetector.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftMinecartDetector.POWERED, powered);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftRail
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> SHAPE = getEnum(net.minecraft.world.level.block.BlockMinecartDetector.class, "shape");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> SHAPE = getEnum(net.minecraft.world.level.block.DetectorRailBlock.class, "shape");
 
     @Override
     public org.bukkit.block.data.Rail.Shape getShape() {
-        return get(SHAPE, org.bukkit.block.data.Rail.Shape.class);
+        return this.get(CraftMinecartDetector.SHAPE, org.bukkit.block.data.Rail.Shape.class);
     }
 
     @Override
     public void setShape(org.bukkit.block.data.Rail.Shape shape) {
-        set(SHAPE, shape);
+        this.set(CraftMinecartDetector.SHAPE, shape);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.data.Rail.Shape> getShapes() {
-        return getValues(SHAPE, org.bukkit.block.data.Rail.Shape.class);
+        return this.getValues(CraftMinecartDetector.SHAPE, org.bukkit.block.data.Rail.Shape.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockMinecartDetector.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.DetectorRailBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftMinecartDetector.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftMinecartDetector.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMinecartTrack.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMinecartTrack.java
index 9ab6b8839a..f58d2af86a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMinecartTrack.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMinecartTrack.java
@@ -9,40 +9,40 @@ public final class CraftMinecartTrack extends org.bukkit.craftbukkit.block.data.
         super();
     }
 
-    public CraftMinecartTrack(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftMinecartTrack(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftRail
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> SHAPE = getEnum(net.minecraft.world.level.block.BlockMinecartTrack.class, "shape");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> SHAPE = getEnum(net.minecraft.world.level.block.RailBlock.class, "shape");
 
     @Override
     public org.bukkit.block.data.Rail.Shape getShape() {
-        return get(SHAPE, org.bukkit.block.data.Rail.Shape.class);
+        return this.get(CraftMinecartTrack.SHAPE, org.bukkit.block.data.Rail.Shape.class);
     }
 
     @Override
     public void setShape(org.bukkit.block.data.Rail.Shape shape) {
-        set(SHAPE, shape);
+        this.set(CraftMinecartTrack.SHAPE, shape);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.data.Rail.Shape> getShapes() {
-        return getValues(SHAPE, org.bukkit.block.data.Rail.Shape.class);
+        return this.getValues(CraftMinecartTrack.SHAPE, org.bukkit.block.data.Rail.Shape.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockMinecartTrack.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.RailBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftMinecartTrack.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftMinecartTrack.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMossyCarpet.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMossyCarpet.java
index ea190657d4..745eaca8b7 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMossyCarpet.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMossyCarpet.java
@@ -9,34 +9,34 @@ public final class CraftMossyCarpet extends org.bukkit.craftbukkit.block.data.Cr
         super();
     }
 
-    public CraftMossyCarpet(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftMossyCarpet(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftMossyCarpet
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean BOTTOM = getBoolean(net.minecraft.world.level.block.MossyCarpetBlock.class, "bottom");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?>[] HEIGHTS = new net.minecraft.world.level.block.state.properties.BlockStateEnum[]{
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty BOTTOM = getBoolean(net.minecraft.world.level.block.MossyCarpetBlock.class, "bottom");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?>[] HEIGHTS = new net.minecraft.world.level.block.state.properties.EnumProperty[]{
         getEnum(net.minecraft.world.level.block.MossyCarpetBlock.class, "north"), getEnum(net.minecraft.world.level.block.MossyCarpetBlock.class, "east"), getEnum(net.minecraft.world.level.block.MossyCarpetBlock.class, "south"), getEnum(net.minecraft.world.level.block.MossyCarpetBlock.class, "west")
     };
 
     @Override
     public boolean isBottom() {
-        return get(BOTTOM);
+        return this.get(CraftMossyCarpet.BOTTOM);
     }
 
     @Override
     public void setBottom(boolean up) {
-        set(BOTTOM, up);
+        this.set(CraftMossyCarpet.BOTTOM, up);
     }
 
     @Override
     public org.bukkit.block.data.type.MossyCarpet.Height getHeight(org.bukkit.block.BlockFace face) {
-        return get(HEIGHTS[face.ordinal()], org.bukkit.block.data.type.MossyCarpet.Height.class);
+        return this.get(CraftMossyCarpet.HEIGHTS[face.ordinal()], org.bukkit.block.data.type.MossyCarpet.Height.class);
     }
 
     @Override
     public void setHeight(org.bukkit.block.BlockFace face, org.bukkit.block.data.type.MossyCarpet.Height height) {
-        set(HEIGHTS[face.ordinal()], height);
+        this.set(CraftMossyCarpet.HEIGHTS[face.ordinal()], height);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMultiface.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMultiface.java
index 1a08fd93a3..c4796d88de 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMultiface.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMultiface.java
@@ -9,40 +9,40 @@ public final class CraftMultiface extends org.bukkit.craftbukkit.block.data.Craf
         super();
     }
 
-    public CraftMultiface(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftMultiface(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftMultipleFacing
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] FACES = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty[] FACES = new net.minecraft.world.level.block.state.properties.BooleanProperty[]{
         getBoolean(net.minecraft.world.level.block.MultifaceBlock.class, "north", true), getBoolean(net.minecraft.world.level.block.MultifaceBlock.class, "east", true), getBoolean(net.minecraft.world.level.block.MultifaceBlock.class, "south", true), getBoolean(net.minecraft.world.level.block.MultifaceBlock.class, "west", true), getBoolean(net.minecraft.world.level.block.MultifaceBlock.class, "up", true), getBoolean(net.minecraft.world.level.block.MultifaceBlock.class, "down", true)
     };
 
     @Override
     public boolean hasFace(org.bukkit.block.BlockFace face) {
-        net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
+        net.minecraft.world.level.block.state.properties.BooleanProperty state = CraftMultiface.FACES[face.ordinal()];
         if (state == null) {
             throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
         }
-        return get(state);
+        return this.get(state);
     }
 
     @Override
     public void setFace(org.bukkit.block.BlockFace face, boolean has) {
-        net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
+        net.minecraft.world.level.block.state.properties.BooleanProperty state = CraftMultiface.FACES[face.ordinal()];
         if (state == null) {
             throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
         }
-        set(state, has);
+        this.set(state, has);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
         com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
 
-        for (int i = 0; i < FACES.length; i++) {
-            if (FACES[i] != null && get(FACES[i])) {
+        for (int i = 0; i < CraftMultiface.FACES.length; i++) {
+            if (CraftMultiface.FACES[i] != null && this.get(CraftMultiface.FACES[i])) {
                 faces.add(org.bukkit.block.BlockFace.values()[i]);
             }
         }
@@ -54,8 +54,8 @@ public final class CraftMultiface extends org.bukkit.craftbukkit.block.data.Craf
     public java.util.Set<org.bukkit.block.BlockFace> getAllowedFaces() {
         com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
 
-        for (int i = 0; i < FACES.length; i++) {
-            if (FACES[i] != null) {
+        for (int i = 0; i < CraftMultiface.FACES.length; i++) {
+            if (CraftMultiface.FACES[i] != null) {
                 faces.add(org.bukkit.block.BlockFace.values()[i]);
             }
         }
@@ -65,15 +65,15 @@ public final class CraftMultiface extends org.bukkit.craftbukkit.block.data.Craf
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.MultifaceBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.MultifaceBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftMultiface.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftMultiface.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMycel.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMycel.java
index f39400b721..ec10c721e8 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMycel.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftMycel.java
@@ -9,21 +9,21 @@ public final class CraftMycel extends org.bukkit.craftbukkit.block.data.CraftBlo
         super();
     }
 
-    public CraftMycel(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftMycel(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftSnowable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean SNOWY = getBoolean(net.minecraft.world.level.block.BlockMycel.class, "snowy");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty SNOWY = getBoolean(net.minecraft.world.level.block.MyceliumBlock.class, "snowy");
 
     @Override
     public boolean isSnowy() {
-        return get(SNOWY);
+        return this.get(CraftMycel.SNOWY);
     }
 
     @Override
     public void setSnowy(boolean snowy) {
-        set(SNOWY, snowy);
+        this.set(CraftMycel.SNOWY, snowy);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftNetherWart.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftNetherWart.java
index 036e0d8885..b98d7f857b 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftNetherWart.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftNetherWart.java
@@ -9,26 +9,26 @@ public final class CraftNetherWart extends org.bukkit.craftbukkit.block.data.Cra
         super();
     }
 
-    public CraftNetherWart(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftNetherWart(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAgeable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockNetherWart.class, "age");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty AGE = getInteger(net.minecraft.world.level.block.NetherWartBlock.class, "age");
 
     @Override
     public int getAge() {
-        return get(AGE);
+        return this.get(CraftNetherWart.AGE);
     }
 
     @Override
     public void setAge(int age) {
-        set(AGE, age);
+        this.set(CraftNetherWart.AGE, age);
     }
 
     @Override
     public int getMaximumAge() {
-        return getMax(AGE);
+        return getMax(CraftNetherWart.AGE);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftNote.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftNote.java
index 9cd547eed8..60675e5519 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftNote.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftNote.java
@@ -9,46 +9,46 @@ public final class CraftNote extends org.bukkit.craftbukkit.block.data.CraftBloc
         super();
     }
 
-    public CraftNote(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftNote(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftNoteBlock
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> INSTRUMENT = getEnum(net.minecraft.world.level.block.BlockNote.class, "instrument");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger NOTE = getInteger(net.minecraft.world.level.block.BlockNote.class, "note");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> INSTRUMENT = getEnum(net.minecraft.world.level.block.NoteBlock.class, "instrument");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty NOTE = getInteger(net.minecraft.world.level.block.NoteBlock.class, "note");
 
     @Override
     public org.bukkit.Instrument getInstrument() {
-        return get(INSTRUMENT, org.bukkit.Instrument.class);
+        return this.get(CraftNote.INSTRUMENT, org.bukkit.Instrument.class);
     }
 
     @Override
     public void setInstrument(org.bukkit.Instrument instrument) {
-        set(INSTRUMENT, instrument);
+        this.set(CraftNote.INSTRUMENT, instrument);
     }
 
     @Override
     public org.bukkit.Note getNote() {
-       return new org.bukkit.Note(get(NOTE));
+       return new org.bukkit.Note(this.get(CraftNote.NOTE));
     }
 
     @Override
     public void setNote(org.bukkit.Note note) {
-        set(NOTE, (int) note.getId());
+        this.set(CraftNote.NOTE, (int) note.getId());
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockNote.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.NoteBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftNote.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftNote.POWERED, powered);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftObserver.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftObserver.java
index b06ac02873..e6364d5bfc 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftObserver.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftObserver.java
@@ -9,40 +9,40 @@ public final class CraftObserver extends org.bukkit.craftbukkit.block.data.Craft
         super();
     }
 
-    public CraftObserver(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftObserver(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockObserver.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.ObserverBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftObserver.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftObserver.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftObserver.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockObserver.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.ObserverBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftObserver.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftObserver.POWERED, powered);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftParticleLeaves.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftParticleLeaves.java
index 5d0822c46e..db4849a35d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftParticleLeaves.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftParticleLeaves.java
@@ -9,46 +9,46 @@ public final class CraftParticleLeaves extends org.bukkit.craftbukkit.block.data
         super();
     }
 
-    public CraftParticleLeaves(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftParticleLeaves(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftLeaves
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger DISTANCE = getInteger(net.minecraft.world.level.block.ParticleLeavesBlock.class, "distance");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean PERSISTENT = getBoolean(net.minecraft.world.level.block.ParticleLeavesBlock.class, "persistent");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty DISTANCE = getInteger(net.minecraft.world.level.block.ParticleLeavesBlock.class, "distance");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty PERSISTENT = getBoolean(net.minecraft.world.level.block.ParticleLeavesBlock.class, "persistent");
 
     @Override
     public boolean isPersistent() {
-        return get(PERSISTENT);
+        return this.get(CraftParticleLeaves.PERSISTENT);
     }
 
     @Override
     public void setPersistent(boolean persistent) {
-        set(PERSISTENT, persistent);
+        this.set(CraftParticleLeaves.PERSISTENT, persistent);
     }
 
     @Override
     public int getDistance() {
-        return get(DISTANCE);
+        return this.get(CraftParticleLeaves.DISTANCE);
     }
 
     @Override
     public void setDistance(int distance) {
-        set(DISTANCE, distance);
+        this.set(CraftParticleLeaves.DISTANCE, distance);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.ParticleLeavesBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.ParticleLeavesBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftParticleLeaves.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftParticleLeaves.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPiglinWallSkull.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPiglinWallSkull.java
index 9eec1f4f19..60b246ab4d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPiglinWallSkull.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPiglinWallSkull.java
@@ -9,40 +9,40 @@ public final class CraftPiglinWallSkull extends org.bukkit.craftbukkit.block.dat
         super();
     }
 
-    public CraftPiglinWallSkull(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftPiglinWallSkull(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.PiglinWallSkullBlock.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.PiglinWallSkullBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftPiglinWallSkull.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftPiglinWallSkull.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftPiglinWallSkull.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.PiglinWallSkullBlock.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.PiglinWallSkullBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftPiglinWallSkull.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftPiglinWallSkull.POWERED, powered);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPinkPetals.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPinkPetals.java
index 7d3bc82e7d..78b220a6f4 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPinkPetals.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPinkPetals.java
@@ -9,45 +9,45 @@ public final class CraftPinkPetals extends org.bukkit.craftbukkit.block.data.Cra
         super();
     }
 
-    public CraftPinkPetals(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftPinkPetals(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftPinkPetals
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger FLOWER_AMOUNT = getInteger(net.minecraft.world.level.block.PinkPetalsBlock.class, "flower_amount");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty FLOWER_AMOUNT = getInteger(net.minecraft.world.level.block.PinkPetalsBlock.class, "flower_amount");
 
     @Override
     public int getFlowerAmount() {
-        return get(FLOWER_AMOUNT);
+        return this.get(CraftPinkPetals.FLOWER_AMOUNT);
     }
 
     @Override
     public void setFlowerAmount(int flower_amount) {
-        set(FLOWER_AMOUNT, flower_amount);
+        this.set(CraftPinkPetals.FLOWER_AMOUNT, flower_amount);
     }
 
     @Override
     public int getMaximumFlowerAmount() {
-        return getMax(FLOWER_AMOUNT);
+        return getMax(CraftPinkPetals.FLOWER_AMOUNT);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.PinkPetalsBlock.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.PinkPetalsBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftPinkPetals.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftPinkPetals.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftPinkPetals.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPiston.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPiston.java
index 754dc78c43..f31db7daf2 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPiston.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPiston.java
@@ -9,40 +9,40 @@ public final class CraftPiston extends org.bukkit.craftbukkit.block.data.CraftBl
         super();
     }
 
-    public CraftPiston(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftPiston(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftPiston
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean EXTENDED = getBoolean(net.minecraft.world.level.block.piston.BlockPiston.class, "extended");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty EXTENDED = getBoolean(net.minecraft.world.level.block.piston.PistonBaseBlock.class, "extended");
 
     @Override
     public boolean isExtended() {
-        return get(EXTENDED);
+        return this.get(CraftPiston.EXTENDED);
     }
 
     @Override
     public void setExtended(boolean extended) {
-        set(EXTENDED, extended);
+        this.set(CraftPiston.EXTENDED, extended);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.piston.BlockPiston.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.piston.PistonBaseBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftPiston.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftPiston.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftPiston.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPistonExtension.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPistonExtension.java
index ad4079ee66..21b6d3c11c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPistonExtension.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPistonExtension.java
@@ -9,54 +9,54 @@ public final class CraftPistonExtension extends org.bukkit.craftbukkit.block.dat
         super();
     }
 
-    public CraftPistonExtension(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftPistonExtension(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftPistonHead
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean SHORT = getBoolean(net.minecraft.world.level.block.piston.BlockPistonExtension.class, "short");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty SHORT = getBoolean(net.minecraft.world.level.block.piston.PistonHeadBlock.class, "short");
 
     @Override
     public boolean isShort() {
-        return get(SHORT);
+        return this.get(CraftPistonExtension.SHORT);
     }
 
     @Override
     public void setShort(boolean _short) {
-        set(SHORT, _short);
+        this.set(CraftPistonExtension.SHORT, _short);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftTechnicalPiston
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> TYPE = getEnum(net.minecraft.world.level.block.piston.BlockPistonExtension.class, "type");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> TYPE = getEnum(net.minecraft.world.level.block.piston.PistonHeadBlock.class, "type");
 
     @Override
     public org.bukkit.block.data.type.TechnicalPiston.Type getType() {
-        return get(TYPE, org.bukkit.block.data.type.TechnicalPiston.Type.class);
+        return this.get(CraftPistonExtension.TYPE, org.bukkit.block.data.type.TechnicalPiston.Type.class);
     }
 
     @Override
     public void setType(org.bukkit.block.data.type.TechnicalPiston.Type type) {
-        set(TYPE, type);
+        this.set(CraftPistonExtension.TYPE, type);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.piston.BlockPistonExtension.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.piston.PistonHeadBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftPistonExtension.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftPistonExtension.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftPistonExtension.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPistonMoving.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPistonMoving.java
index 0d20624e0a..497843a5e6 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPistonMoving.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPistonMoving.java
@@ -9,40 +9,40 @@ public final class CraftPistonMoving extends org.bukkit.craftbukkit.block.data.C
         super();
     }
 
-    public CraftPistonMoving(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftPistonMoving(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftTechnicalPiston
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> TYPE = getEnum(net.minecraft.world.level.block.piston.BlockPistonMoving.class, "type");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> TYPE = getEnum(net.minecraft.world.level.block.piston.MovingPistonBlock.class, "type");
 
     @Override
     public org.bukkit.block.data.type.TechnicalPiston.Type getType() {
-        return get(TYPE, org.bukkit.block.data.type.TechnicalPiston.Type.class);
+        return this.get(CraftPistonMoving.TYPE, org.bukkit.block.data.type.TechnicalPiston.Type.class);
     }
 
     @Override
     public void setType(org.bukkit.block.data.type.TechnicalPiston.Type type) {
-        set(TYPE, type);
+        this.set(CraftPistonMoving.TYPE, type);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.piston.BlockPistonMoving.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.piston.MovingPistonBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftPistonMoving.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftPistonMoving.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftPistonMoving.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPitcherCrop.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPitcherCrop.java
index d529867f06..e21d374ad9 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPitcherCrop.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPitcherCrop.java
@@ -9,40 +9,40 @@ public final class CraftPitcherCrop extends org.bukkit.craftbukkit.block.data.Cr
         super();
     }
 
-    public CraftPitcherCrop(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftPitcherCrop(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAgeable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.PitcherCropBlock.class, "age");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty AGE = getInteger(net.minecraft.world.level.block.PitcherCropBlock.class, "age");
 
     @Override
     public int getAge() {
-        return get(AGE);
+        return this.get(CraftPitcherCrop.AGE);
     }
 
     @Override
     public void setAge(int age) {
-        set(AGE, age);
+        this.set(CraftPitcherCrop.AGE, age);
     }
 
     @Override
     public int getMaximumAge() {
-        return getMax(AGE);
+        return getMax(CraftPitcherCrop.AGE);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftBisected
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> HALF = getEnum(net.minecraft.world.level.block.PitcherCropBlock.class, "half");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> HALF = getEnum(net.minecraft.world.level.block.PitcherCropBlock.class, "half");
 
     @Override
     public org.bukkit.block.data.Bisected.Half getHalf() {
-        return get(HALF, org.bukkit.block.data.Bisected.Half.class);
+        return this.get(CraftPitcherCrop.HALF, org.bukkit.block.data.Bisected.Half.class);
     }
 
     @Override
     public void setHalf(org.bukkit.block.data.Bisected.Half half) {
-        set(HALF, half);
+        this.set(CraftPitcherCrop.HALF, half);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPointedDripstone.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPointedDripstone.java
index a1b320d775..bdf6d3fce9 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPointedDripstone.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPointedDripstone.java
@@ -9,51 +9,51 @@ public final class CraftPointedDripstone extends org.bukkit.craftbukkit.block.da
         super();
     }
 
-    public CraftPointedDripstone(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftPointedDripstone(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftPointedDripstone
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> VERTICAL_DIRECTION = getEnum(net.minecraft.world.level.block.PointedDripstoneBlock.class, "vertical_direction");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> THICKNESS = getEnum(net.minecraft.world.level.block.PointedDripstoneBlock.class, "thickness");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> VERTICAL_DIRECTION = getEnum(net.minecraft.world.level.block.PointedDripstoneBlock.class, "vertical_direction");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> THICKNESS = getEnum(net.minecraft.world.level.block.PointedDripstoneBlock.class, "thickness");
 
     @Override
     public org.bukkit.block.BlockFace getVerticalDirection() {
-        return get(VERTICAL_DIRECTION, org.bukkit.block.BlockFace.class);
+        return this.get(CraftPointedDripstone.VERTICAL_DIRECTION, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setVerticalDirection(org.bukkit.block.BlockFace direction) {
-        set(VERTICAL_DIRECTION, direction);
+        this.set(CraftPointedDripstone.VERTICAL_DIRECTION, direction);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getVerticalDirections() {
-        return getValues(VERTICAL_DIRECTION, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftPointedDripstone.VERTICAL_DIRECTION, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public org.bukkit.block.data.type.PointedDripstone.Thickness getThickness() {
-        return get(THICKNESS, org.bukkit.block.data.type.PointedDripstone.Thickness.class);
+        return this.get(CraftPointedDripstone.THICKNESS, org.bukkit.block.data.type.PointedDripstone.Thickness.class);
     }
 
     @Override
     public void setThickness(org.bukkit.block.data.type.PointedDripstone.Thickness thickness) {
-        set(THICKNESS, thickness);
+        this.set(CraftPointedDripstone.THICKNESS, thickness);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.PointedDripstoneBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.PointedDripstoneBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftPointedDripstone.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftPointedDripstone.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPortal.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPortal.java
index b74a7783e4..0f182381c1 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPortal.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPortal.java
@@ -9,26 +9,26 @@ public final class CraftPortal extends org.bukkit.craftbukkit.block.data.CraftBl
         super();
     }
 
-    public CraftPortal(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftPortal(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftOrientable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> AXIS = getEnum(net.minecraft.world.level.block.BlockPortal.class, "axis");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> AXIS = getEnum(net.minecraft.world.level.block.NetherPortalBlock.class, "axis");
 
     @Override
     public org.bukkit.Axis getAxis() {
-        return get(AXIS, org.bukkit.Axis.class);
+        return this.get(CraftPortal.AXIS, org.bukkit.Axis.class);
     }
 
     @Override
     public void setAxis(org.bukkit.Axis axis) {
-        set(AXIS, axis);
+        this.set(CraftPortal.AXIS, axis);
     }
 
     @Override
     public java.util.Set<org.bukkit.Axis> getAxes() {
-        return getValues(AXIS, org.bukkit.Axis.class);
+        return this.getValues(CraftPortal.AXIS, org.bukkit.Axis.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPotatoes.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPotatoes.java
index 7b43c937c4..ee3faab6b3 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPotatoes.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPotatoes.java
@@ -9,26 +9,26 @@ public final class CraftPotatoes extends org.bukkit.craftbukkit.block.data.Craft
         super();
     }
 
-    public CraftPotatoes(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftPotatoes(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAgeable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockPotatoes.class, "age");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty AGE = getInteger(net.minecraft.world.level.block.PotatoBlock.class, "age");
 
     @Override
     public int getAge() {
-        return get(AGE);
+        return this.get(CraftPotatoes.AGE);
     }
 
     @Override
     public void setAge(int age) {
-        set(AGE, age);
+        this.set(CraftPotatoes.AGE, age);
     }
 
     @Override
     public int getMaximumAge() {
-        return getMax(AGE);
+        return getMax(CraftPotatoes.AGE);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPoweredRail.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPoweredRail.java
index dd73032341..a52e3dcedf 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPoweredRail.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPoweredRail.java
@@ -9,54 +9,54 @@ public final class CraftPoweredRail extends org.bukkit.craftbukkit.block.data.Cr
         super();
     }
 
-    public CraftPoweredRail(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftPoweredRail(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockPoweredRail.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.PoweredRailBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftPoweredRail.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftPoweredRail.POWERED, powered);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftRail
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> SHAPE = getEnum(net.minecraft.world.level.block.BlockPoweredRail.class, "shape");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> SHAPE = getEnum(net.minecraft.world.level.block.PoweredRailBlock.class, "shape");
 
     @Override
     public org.bukkit.block.data.Rail.Shape getShape() {
-        return get(SHAPE, org.bukkit.block.data.Rail.Shape.class);
+        return this.get(CraftPoweredRail.SHAPE, org.bukkit.block.data.Rail.Shape.class);
     }
 
     @Override
     public void setShape(org.bukkit.block.data.Rail.Shape shape) {
-        set(SHAPE, shape);
+        this.set(CraftPoweredRail.SHAPE, shape);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.data.Rail.Shape> getShapes() {
-        return getValues(SHAPE, org.bukkit.block.data.Rail.Shape.class);
+        return this.getValues(CraftPoweredRail.SHAPE, org.bukkit.block.data.Rail.Shape.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockPoweredRail.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.PoweredRailBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftPoweredRail.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftPoweredRail.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPressurePlateBinary.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPressurePlateBinary.java
index 4239183d50..05c7662f44 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPressurePlateBinary.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPressurePlateBinary.java
@@ -9,21 +9,21 @@ public final class CraftPressurePlateBinary extends org.bukkit.craftbukkit.block
         super();
     }
 
-    public CraftPressurePlateBinary(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftPressurePlateBinary(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockPressurePlateBinary.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.PressurePlateBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftPressurePlateBinary.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftPressurePlateBinary.POWERED, powered);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPressurePlateWeighted.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPressurePlateWeighted.java
index 4477c73fd6..0eb4b7bdee 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPressurePlateWeighted.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPressurePlateWeighted.java
@@ -9,26 +9,26 @@ public final class CraftPressurePlateWeighted extends org.bukkit.craftbukkit.blo
         super();
     }
 
-    public CraftPressurePlateWeighted(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftPressurePlateWeighted(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAnaloguePowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger POWER = getInteger(net.minecraft.world.level.block.BlockPressurePlateWeighted.class, "power");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty POWER = getInteger(net.minecraft.world.level.block.WeightedPressurePlateBlock.class, "power");
 
     @Override
     public int getPower() {
-        return get(POWER);
+        return this.get(CraftPressurePlateWeighted.POWER);
     }
 
     @Override
     public void setPower(int power) {
-        set(POWER, power);
+        this.set(CraftPressurePlateWeighted.POWER, power);
     }
 
     @Override
     public int getMaximumPower() {
-        return getMax(POWER);
+        return getMax(CraftPressurePlateWeighted.POWER);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPumpkinCarved.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPumpkinCarved.java
index cf2822bd22..ddd573ae55 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPumpkinCarved.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftPumpkinCarved.java
@@ -9,26 +9,26 @@ public final class CraftPumpkinCarved extends org.bukkit.craftbukkit.block.data.
         super();
     }
 
-    public CraftPumpkinCarved(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftPumpkinCarved(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockPumpkinCarved.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.CarvedPumpkinBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftPumpkinCarved.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftPumpkinCarved.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftPumpkinCarved.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneComparator.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneComparator.java
index 5d33c10b3e..d3d68ae06e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneComparator.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneComparator.java
@@ -9,54 +9,54 @@ public final class CraftRedstoneComparator extends org.bukkit.craftbukkit.block.
         super();
     }
 
-    public CraftRedstoneComparator(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftRedstoneComparator(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftComparator
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> MODE = getEnum(net.minecraft.world.level.block.BlockRedstoneComparator.class, "mode");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> MODE = getEnum(net.minecraft.world.level.block.ComparatorBlock.class, "mode");
 
     @Override
     public org.bukkit.block.data.type.Comparator.Mode getMode() {
-        return get(MODE, org.bukkit.block.data.type.Comparator.Mode.class);
+        return this.get(CraftRedstoneComparator.MODE, org.bukkit.block.data.type.Comparator.Mode.class);
     }
 
     @Override
     public void setMode(org.bukkit.block.data.type.Comparator.Mode mode) {
-        set(MODE, mode);
+        this.set(CraftRedstoneComparator.MODE, mode);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockRedstoneComparator.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.ComparatorBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftRedstoneComparator.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftRedstoneComparator.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftRedstoneComparator.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockRedstoneComparator.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.ComparatorBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftRedstoneComparator.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftRedstoneComparator.POWERED, powered);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneLamp.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneLamp.java
index ceb0ab3e30..99ea9327b1 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneLamp.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneLamp.java
@@ -9,21 +9,21 @@ public final class CraftRedstoneLamp extends org.bukkit.craftbukkit.block.data.C
         super();
     }
 
-    public CraftRedstoneLamp(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftRedstoneLamp(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftLightable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LIT = getBoolean(net.minecraft.world.level.block.BlockRedstoneLamp.class, "lit");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty LIT = getBoolean(net.minecraft.world.level.block.RedstoneLampBlock.class, "lit");
 
     @Override
     public boolean isLit() {
-        return get(LIT);
+        return this.get(CraftRedstoneLamp.LIT);
     }
 
     @Override
     public void setLit(boolean lit) {
-        set(LIT, lit);
+        this.set(CraftRedstoneLamp.LIT, lit);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneOre.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneOre.java
index 116331495d..5069c1ba07 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneOre.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneOre.java
@@ -9,21 +9,21 @@ public final class CraftRedstoneOre extends org.bukkit.craftbukkit.block.data.Cr
         super();
     }
 
-    public CraftRedstoneOre(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftRedstoneOre(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftLightable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LIT = getBoolean(net.minecraft.world.level.block.BlockRedstoneOre.class, "lit");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty LIT = getBoolean(net.minecraft.world.level.block.RedStoneOreBlock.class, "lit");
 
     @Override
     public boolean isLit() {
-        return get(LIT);
+        return this.get(CraftRedstoneOre.LIT);
     }
 
     @Override
     public void setLit(boolean lit) {
-        set(LIT, lit);
+        this.set(CraftRedstoneOre.LIT, lit);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneTorch.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneTorch.java
index cc346ac044..9ffd14f886 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneTorch.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneTorch.java
@@ -9,21 +9,21 @@ public final class CraftRedstoneTorch extends org.bukkit.craftbukkit.block.data.
         super();
     }
 
-    public CraftRedstoneTorch(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftRedstoneTorch(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftLightable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LIT = getBoolean(net.minecraft.world.level.block.BlockRedstoneTorch.class, "lit");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty LIT = getBoolean(net.minecraft.world.level.block.RedstoneTorchBlock.class, "lit");
 
     @Override
     public boolean isLit() {
-        return get(LIT);
+        return this.get(CraftRedstoneTorch.LIT);
     }
 
     @Override
     public void setLit(boolean lit) {
-        set(LIT, lit);
+        this.set(CraftRedstoneTorch.LIT, lit);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneTorchWall.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneTorchWall.java
index db64e31e9a..4df2452825 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneTorchWall.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneTorchWall.java
@@ -9,40 +9,40 @@ public final class CraftRedstoneTorchWall extends org.bukkit.craftbukkit.block.d
         super();
     }
 
-    public CraftRedstoneTorchWall(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftRedstoneTorchWall(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockRedstoneTorchWall.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.RedstoneWallTorchBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftRedstoneTorchWall.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftRedstoneTorchWall.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftRedstoneTorchWall.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftLightable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LIT = getBoolean(net.minecraft.world.level.block.BlockRedstoneTorchWall.class, "lit");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty LIT = getBoolean(net.minecraft.world.level.block.RedstoneWallTorchBlock.class, "lit");
 
     @Override
     public boolean isLit() {
-        return get(LIT);
+        return this.get(CraftRedstoneTorchWall.LIT);
     }
 
     @Override
     public void setLit(boolean lit) {
-        set(LIT, lit);
+        this.set(CraftRedstoneTorchWall.LIT, lit);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneWire.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneWire.java
index e05ae0efa6..009be1c9a4 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneWire.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRedstoneWire.java
@@ -9,28 +9,28 @@ public final class CraftRedstoneWire extends org.bukkit.craftbukkit.block.data.C
         super();
     }
 
-    public CraftRedstoneWire(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftRedstoneWire(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftRedstoneWire
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> NORTH = getEnum(net.minecraft.world.level.block.BlockRedstoneWire.class, "north");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> EAST = getEnum(net.minecraft.world.level.block.BlockRedstoneWire.class, "east");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> SOUTH = getEnum(net.minecraft.world.level.block.BlockRedstoneWire.class, "south");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> WEST = getEnum(net.minecraft.world.level.block.BlockRedstoneWire.class, "west");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> NORTH = getEnum(net.minecraft.world.level.block.RedStoneWireBlock.class, "north");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> EAST = getEnum(net.minecraft.world.level.block.RedStoneWireBlock.class, "east");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> SOUTH = getEnum(net.minecraft.world.level.block.RedStoneWireBlock.class, "south");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> WEST = getEnum(net.minecraft.world.level.block.RedStoneWireBlock.class, "west");
 
     @Override
     public org.bukkit.block.data.type.RedstoneWire.Connection getFace(org.bukkit.block.BlockFace face) {
         switch (face) {
             case NORTH:
-                return get(NORTH, org.bukkit.block.data.type.RedstoneWire.Connection.class);
+                return this.get(CraftRedstoneWire.NORTH, org.bukkit.block.data.type.RedstoneWire.Connection.class);
             case EAST:
-                return get(EAST, org.bukkit.block.data.type.RedstoneWire.Connection.class);
+                return this.get(CraftRedstoneWire.EAST, org.bukkit.block.data.type.RedstoneWire.Connection.class);
             case SOUTH:
-                return get(SOUTH, org.bukkit.block.data.type.RedstoneWire.Connection.class);
+                return this.get(CraftRedstoneWire.SOUTH, org.bukkit.block.data.type.RedstoneWire.Connection.class);
             case WEST:
-                return get(WEST, org.bukkit.block.data.type.RedstoneWire.Connection.class);
+                return this.get(CraftRedstoneWire.WEST, org.bukkit.block.data.type.RedstoneWire.Connection.class);
             default:
                 throw new IllegalArgumentException("Cannot have face " + face);
         }
@@ -40,16 +40,16 @@ public final class CraftRedstoneWire extends org.bukkit.craftbukkit.block.data.C
     public void setFace(org.bukkit.block.BlockFace face, org.bukkit.block.data.type.RedstoneWire.Connection connection) {
         switch (face) {
             case NORTH:
-                set(NORTH, connection);
+                this.set(CraftRedstoneWire.NORTH, connection);
                 break;
             case EAST:
-                set(EAST, connection);
+                this.set(CraftRedstoneWire.EAST, connection);
                 break;
             case SOUTH:
-                set(SOUTH, connection);
+                this.set(CraftRedstoneWire.SOUTH, connection);
                 break;
             case WEST:
-                set(WEST, connection);
+                this.set(CraftRedstoneWire.WEST, connection);
                 break;
             default:
                 throw new IllegalArgumentException("Cannot have face " + face);
@@ -63,20 +63,20 @@ public final class CraftRedstoneWire extends org.bukkit.craftbukkit.block.data.C
 
     // org.bukkit.craftbukkit.block.data.CraftAnaloguePowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger POWER = getInteger(net.minecraft.world.level.block.BlockRedstoneWire.class, "power");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty POWER = getInteger(net.minecraft.world.level.block.RedStoneWireBlock.class, "power");
 
     @Override
     public int getPower() {
-        return get(POWER);
+        return this.get(CraftRedstoneWire.POWER);
     }
 
     @Override
     public void setPower(int power) {
-        set(POWER, power);
+        this.set(CraftRedstoneWire.POWER, power);
     }
 
     @Override
     public int getMaximumPower() {
-        return getMax(POWER);
+        return getMax(CraftRedstoneWire.POWER);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftReed.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftReed.java
index f3a8aca157..4d613c6703 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftReed.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftReed.java
@@ -9,26 +9,26 @@ public final class CraftReed extends org.bukkit.craftbukkit.block.data.CraftBloc
         super();
     }
 
-    public CraftReed(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftReed(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAgeable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockReed.class, "age");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty AGE = getInteger(net.minecraft.world.level.block.SugarCaneBlock.class, "age");
 
     @Override
     public int getAge() {
-        return get(AGE);
+        return this.get(CraftReed.AGE);
     }
 
     @Override
     public void setAge(int age) {
-        set(AGE, age);
+        this.set(CraftReed.AGE, age);
     }
 
     @Override
     public int getMaximumAge() {
-        return getMax(AGE);
+        return getMax(CraftReed.AGE);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRepeater.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRepeater.java
index 85772e365c..5894cea1d0 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRepeater.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRepeater.java
@@ -9,75 +9,75 @@ public final class CraftRepeater extends org.bukkit.craftbukkit.block.data.Craft
         super();
     }
 
-    public CraftRepeater(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftRepeater(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftRepeater
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger DELAY = getInteger(net.minecraft.world.level.block.BlockRepeater.class, "delay");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LOCKED = getBoolean(net.minecraft.world.level.block.BlockRepeater.class, "locked");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty DELAY = getInteger(net.minecraft.world.level.block.RepeaterBlock.class, "delay");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty LOCKED = getBoolean(net.minecraft.world.level.block.RepeaterBlock.class, "locked");
 
     @Override
     public int getDelay() {
-        return get(DELAY);
+        return this.get(CraftRepeater.DELAY);
     }
 
     @Override
     public void setDelay(int delay) {
-        set(DELAY, delay);
+        this.set(CraftRepeater.DELAY, delay);
     }
 
     @Override
     public int getMinimumDelay() {
-        return getMin(DELAY);
+        return getMin(CraftRepeater.DELAY);
     }
 
     @Override
     public int getMaximumDelay() {
-        return getMax(DELAY);
+        return getMax(CraftRepeater.DELAY);
     }
 
     @Override
     public boolean isLocked() {
-        return get(LOCKED);
+        return this.get(CraftRepeater.LOCKED);
     }
 
     @Override
     public void setLocked(boolean locked) {
-        set(LOCKED, locked);
+        this.set(CraftRepeater.LOCKED, locked);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockRepeater.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.RepeaterBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftRepeater.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftRepeater.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftRepeater.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockRepeater.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.RepeaterBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftRepeater.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftRepeater.POWERED, powered);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRespawnAnchor.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRespawnAnchor.java
index 316ea5204b..4ee32a2513 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRespawnAnchor.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRespawnAnchor.java
@@ -9,26 +9,26 @@ public final class CraftRespawnAnchor extends org.bukkit.craftbukkit.block.data.
         super();
     }
 
-    public CraftRespawnAnchor(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftRespawnAnchor(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftRespawnAnchor
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger CHARGES = getInteger(net.minecraft.world.level.block.BlockRespawnAnchor.class, "charges");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty CHARGES = getInteger(net.minecraft.world.level.block.RespawnAnchorBlock.class, "charges");
 
     @Override
     public int getCharges() {
-        return get(CHARGES);
+        return this.get(CraftRespawnAnchor.CHARGES);
     }
 
     @Override
     public void setCharges(int charges) {
-        set(CHARGES, charges);
+        this.set(CraftRespawnAnchor.CHARGES, charges);
     }
 
     @Override
     public int getMaximumCharges() {
-        return getMax(CHARGES);
+        return getMax(CraftRespawnAnchor.CHARGES);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRotatable.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRotatable.java
index b14166e5b0..4f28a405db 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRotatable.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftRotatable.java
@@ -9,26 +9,26 @@ public final class CraftRotatable extends org.bukkit.craftbukkit.block.data.Craf
         super();
     }
 
-    public CraftRotatable(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftRotatable(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftOrientable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> AXIS = getEnum(net.minecraft.world.level.block.BlockRotatable.class, "axis");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> AXIS = getEnum(net.minecraft.world.level.block.RotatedPillarBlock.class, "axis");
 
     @Override
     public org.bukkit.Axis getAxis() {
-        return get(AXIS, org.bukkit.Axis.class);
+        return this.get(CraftRotatable.AXIS, org.bukkit.Axis.class);
     }
 
     @Override
     public void setAxis(org.bukkit.Axis axis) {
-        set(AXIS, axis);
+        this.set(CraftRotatable.AXIS, axis);
     }
 
     @Override
     public java.util.Set<org.bukkit.Axis> getAxes() {
-        return getValues(AXIS, org.bukkit.Axis.class);
+        return this.getValues(CraftRotatable.AXIS, org.bukkit.Axis.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSapling.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSapling.java
index b9a0b14668..9ba586d5ce 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSapling.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSapling.java
@@ -9,26 +9,26 @@ public final class CraftSapling extends org.bukkit.craftbukkit.block.data.CraftB
         super();
     }
 
-    public CraftSapling(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftSapling(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftSapling
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger STAGE = getInteger(net.minecraft.world.level.block.BlockSapling.class, "stage");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty STAGE = getInteger(net.minecraft.world.level.block.SaplingBlock.class, "stage");
 
     @Override
     public int getStage() {
-        return get(STAGE);
+        return this.get(CraftSapling.STAGE);
     }
 
     @Override
     public void setStage(int stage) {
-        set(STAGE, stage);
+        this.set(CraftSapling.STAGE, stage);
     }
 
     @Override
     public int getMaximumStage() {
-        return getMax(STAGE);
+        return getMax(CraftSapling.STAGE);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftScaffolding.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftScaffolding.java
index 10c2442492..4b4f6853dc 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftScaffolding.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftScaffolding.java
@@ -9,51 +9,51 @@ public final class CraftScaffolding extends org.bukkit.craftbukkit.block.data.Cr
         super();
     }
 
-    public CraftScaffolding(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftScaffolding(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftScaffolding
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean BOTTOM = getBoolean(net.minecraft.world.level.block.BlockScaffolding.class, "bottom");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger DISTANCE = getInteger(net.minecraft.world.level.block.BlockScaffolding.class, "distance");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty BOTTOM = getBoolean(net.minecraft.world.level.block.ScaffoldingBlock.class, "bottom");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty DISTANCE = getInteger(net.minecraft.world.level.block.ScaffoldingBlock.class, "distance");
 
     @Override
     public boolean isBottom() {
-        return get(BOTTOM);
+        return this.get(CraftScaffolding.BOTTOM);
     }
 
     @Override
     public void setBottom(boolean bottom) {
-        set(BOTTOM, bottom);
+        this.set(CraftScaffolding.BOTTOM, bottom);
     }
 
     @Override
     public int getDistance() {
-        return get(DISTANCE);
+        return this.get(CraftScaffolding.DISTANCE);
     }
 
     @Override
     public void setDistance(int distance) {
-        set(DISTANCE, distance);
+        this.set(CraftScaffolding.DISTANCE, distance);
     }
 
     @Override
     public int getMaximumDistance() {
-        return getMax(DISTANCE);
+        return getMax(CraftScaffolding.DISTANCE);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockScaffolding.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.ScaffoldingBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftScaffolding.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftScaffolding.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSculkCatalyst.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSculkCatalyst.java
index 504659903c..653cb1930d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSculkCatalyst.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSculkCatalyst.java
@@ -9,21 +9,21 @@ public final class CraftSculkCatalyst extends org.bukkit.craftbukkit.block.data.
         super();
     }
 
-    public CraftSculkCatalyst(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftSculkCatalyst(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftSculkCatalyst
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean BLOOM = getBoolean(net.minecraft.world.level.block.SculkCatalystBlock.class, "bloom");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty BLOOM = getBoolean(net.minecraft.world.level.block.SculkCatalystBlock.class, "bloom");
 
     @Override
     public boolean isBloom() {
-        return get(BLOOM);
+        return this.get(CraftSculkCatalyst.BLOOM);
     }
 
     @Override
     public void setBloom(boolean bloom) {
-        set(BLOOM, bloom);
+        this.set(CraftSculkCatalyst.BLOOM, bloom);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSculkSensor.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSculkSensor.java
index 8ba6b02b77..10eb0ac019 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSculkSensor.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSculkSensor.java
@@ -9,54 +9,54 @@ public final class CraftSculkSensor extends org.bukkit.craftbukkit.block.data.Cr
         super();
     }
 
-    public CraftSculkSensor(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftSculkSensor(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftSculkSensor
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> PHASE = getEnum(net.minecraft.world.level.block.SculkSensorBlock.class, "sculk_sensor_phase");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> PHASE = getEnum(net.minecraft.world.level.block.SculkSensorBlock.class, "sculk_sensor_phase");
 
     @Override
     public org.bukkit.block.data.type.SculkSensor.Phase getPhase() {
-        return get(PHASE, org.bukkit.block.data.type.SculkSensor.Phase.class);
+        return this.get(CraftSculkSensor.PHASE, org.bukkit.block.data.type.SculkSensor.Phase.class);
     }
 
     @Override
     public void setPhase(org.bukkit.block.data.type.SculkSensor.Phase phase) {
-        set(PHASE, phase);
+        this.set(CraftSculkSensor.PHASE, phase);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAnaloguePowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger POWER = getInteger(net.minecraft.world.level.block.SculkSensorBlock.class, "power");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty POWER = getInteger(net.minecraft.world.level.block.SculkSensorBlock.class, "power");
 
     @Override
     public int getPower() {
-        return get(POWER);
+        return this.get(CraftSculkSensor.POWER);
     }
 
     @Override
     public void setPower(int power) {
-        set(POWER, power);
+        this.set(CraftSculkSensor.POWER, power);
     }
 
     @Override
     public int getMaximumPower() {
-        return getMax(POWER);
+        return getMax(CraftSculkSensor.POWER);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.SculkSensorBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.SculkSensorBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftSculkSensor.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftSculkSensor.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSculkShrieker.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSculkShrieker.java
index c53927dfd6..099169583a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSculkShrieker.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSculkShrieker.java
@@ -9,46 +9,46 @@ public final class CraftSculkShrieker extends org.bukkit.craftbukkit.block.data.
         super();
     }
 
-    public CraftSculkShrieker(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftSculkShrieker(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftSculkShrieker
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean CAN_SUMMON = getBoolean(net.minecraft.world.level.block.SculkShriekerBlock.class, "can_summon");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean SHRIEKING = getBoolean(net.minecraft.world.level.block.SculkShriekerBlock.class, "shrieking");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty CAN_SUMMON = getBoolean(net.minecraft.world.level.block.SculkShriekerBlock.class, "can_summon");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty SHRIEKING = getBoolean(net.minecraft.world.level.block.SculkShriekerBlock.class, "shrieking");
 
     @Override
     public boolean isCanSummon() {
-        return get(CAN_SUMMON);
+        return this.get(CraftSculkShrieker.CAN_SUMMON);
     }
 
     @Override
     public void setCanSummon(boolean can_summon) {
-        set(CAN_SUMMON, can_summon);
+        this.set(CraftSculkShrieker.CAN_SUMMON, can_summon);
     }
 
     @Override
     public boolean isShrieking() {
-        return get(SHRIEKING);
+        return this.get(CraftSculkShrieker.SHRIEKING);
     }
 
     @Override
     public void setShrieking(boolean shrieking) {
-        set(SHRIEKING, shrieking);
+        this.set(CraftSculkShrieker.SHRIEKING, shrieking);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.SculkShriekerBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.SculkShriekerBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftSculkShrieker.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftSculkShrieker.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSculkVein.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSculkVein.java
index fe3321bfa9..c753e94075 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSculkVein.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSculkVein.java
@@ -9,40 +9,40 @@ public final class CraftSculkVein extends org.bukkit.craftbukkit.block.data.Craf
         super();
     }
 
-    public CraftSculkVein(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftSculkVein(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftMultipleFacing
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] FACES = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty[] FACES = new net.minecraft.world.level.block.state.properties.BooleanProperty[]{
         getBoolean(net.minecraft.world.level.block.SculkVeinBlock.class, "north", true), getBoolean(net.minecraft.world.level.block.SculkVeinBlock.class, "east", true), getBoolean(net.minecraft.world.level.block.SculkVeinBlock.class, "south", true), getBoolean(net.minecraft.world.level.block.SculkVeinBlock.class, "west", true), getBoolean(net.minecraft.world.level.block.SculkVeinBlock.class, "up", true), getBoolean(net.minecraft.world.level.block.SculkVeinBlock.class, "down", true)
     };
 
     @Override
     public boolean hasFace(org.bukkit.block.BlockFace face) {
-        net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
+        net.minecraft.world.level.block.state.properties.BooleanProperty state = CraftSculkVein.FACES[face.ordinal()];
         if (state == null) {
             throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
         }
-        return get(state);
+        return this.get(state);
     }
 
     @Override
     public void setFace(org.bukkit.block.BlockFace face, boolean has) {
-        net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
+        net.minecraft.world.level.block.state.properties.BooleanProperty state = CraftSculkVein.FACES[face.ordinal()];
         if (state == null) {
             throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
         }
-        set(state, has);
+        this.set(state, has);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
         com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
 
-        for (int i = 0; i < FACES.length; i++) {
-            if (FACES[i] != null && get(FACES[i])) {
+        for (int i = 0; i < CraftSculkVein.FACES.length; i++) {
+            if (CraftSculkVein.FACES[i] != null && this.get(CraftSculkVein.FACES[i])) {
                 faces.add(org.bukkit.block.BlockFace.values()[i]);
             }
         }
@@ -54,8 +54,8 @@ public final class CraftSculkVein extends org.bukkit.craftbukkit.block.data.Craf
     public java.util.Set<org.bukkit.block.BlockFace> getAllowedFaces() {
         com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
 
-        for (int i = 0; i < FACES.length; i++) {
-            if (FACES[i] != null) {
+        for (int i = 0; i < CraftSculkVein.FACES.length; i++) {
+            if (CraftSculkVein.FACES[i] != null) {
                 faces.add(org.bukkit.block.BlockFace.values()[i]);
             }
         }
@@ -65,15 +65,15 @@ public final class CraftSculkVein extends org.bukkit.craftbukkit.block.data.Craf
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.SculkVeinBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.SculkVeinBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftSculkVein.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftSculkVein.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSeaPickle.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSeaPickle.java
index 154e4bddbb..37d1b9c8fc 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSeaPickle.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSeaPickle.java
@@ -9,45 +9,45 @@ public final class CraftSeaPickle extends org.bukkit.craftbukkit.block.data.Craf
         super();
     }
 
-    public CraftSeaPickle(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftSeaPickle(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftSeaPickle
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger PICKLES = getInteger(net.minecraft.world.level.block.BlockSeaPickle.class, "pickles");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty PICKLES = getInteger(net.minecraft.world.level.block.SeaPickleBlock.class, "pickles");
 
     @Override
     public int getPickles() {
-        return get(PICKLES);
+        return this.get(CraftSeaPickle.PICKLES);
     }
 
     @Override
     public void setPickles(int pickles) {
-        set(PICKLES, pickles);
+        this.set(CraftSeaPickle.PICKLES, pickles);
     }
 
     @Override
     public int getMinimumPickles() {
-        return getMin(PICKLES);
+        return getMin(CraftSeaPickle.PICKLES);
     }
 
     @Override
     public int getMaximumPickles() {
-        return getMax(PICKLES);
+        return getMax(CraftSeaPickle.PICKLES);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockSeaPickle.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.SeaPickleBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftSeaPickle.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftSeaPickle.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftShulkerBox.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftShulkerBox.java
index 2310a2573e..37b0253538 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftShulkerBox.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftShulkerBox.java
@@ -9,26 +9,26 @@ public final class CraftShulkerBox extends org.bukkit.craftbukkit.block.data.Cra
         super();
     }
 
-    public CraftShulkerBox(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftShulkerBox(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockShulkerBox.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.ShulkerBoxBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftShulkerBox.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftShulkerBox.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftShulkerBox.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkull.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkull.java
index c216b26c67..49f0ee79f4 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkull.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkull.java
@@ -9,31 +9,31 @@ public final class CraftSkull extends org.bukkit.craftbukkit.block.data.CraftBlo
         super();
     }
 
-    public CraftSkull(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftSkull(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockSkull.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.SkullBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftSkull.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftSkull.POWERED, powered);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftRotatable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger ROTATION = getInteger(net.minecraft.world.level.block.BlockSkull.class, "rotation");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty ROTATION = getInteger(net.minecraft.world.level.block.SkullBlock.class, "rotation");
 
     @Override
     public org.bukkit.block.BlockFace getRotation() {
-        int data = get(ROTATION);
+        int data = this.get(CraftSkull.ROTATION);
         switch (data) {
             case 0x0:
                 return org.bukkit.block.BlockFace.SOUTH;
@@ -127,6 +127,6 @@ public final class CraftSkull extends org.bukkit.craftbukkit.block.data.CraftBlo
             default:
                 throw new IllegalArgumentException("Illegal rotation " + rotation);
         }
-        set(ROTATION, val);
+        this.set(CraftSkull.ROTATION, val);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkullPlayer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkullPlayer.java
index 42398dd641..9f956fd19c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkullPlayer.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkullPlayer.java
@@ -9,31 +9,31 @@ public final class CraftSkullPlayer extends org.bukkit.craftbukkit.block.data.Cr
         super();
     }
 
-    public CraftSkullPlayer(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftSkullPlayer(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockSkullPlayer.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.PlayerHeadBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftSkullPlayer.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftSkullPlayer.POWERED, powered);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftRotatable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger ROTATION = getInteger(net.minecraft.world.level.block.BlockSkullPlayer.class, "rotation");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty ROTATION = getInteger(net.minecraft.world.level.block.PlayerHeadBlock.class, "rotation");
 
     @Override
     public org.bukkit.block.BlockFace getRotation() {
-        int data = get(ROTATION);
+        int data = this.get(CraftSkullPlayer.ROTATION);
         switch (data) {
             case 0x0:
                 return org.bukkit.block.BlockFace.SOUTH;
@@ -127,6 +127,6 @@ public final class CraftSkullPlayer extends org.bukkit.craftbukkit.block.data.Cr
             default:
                 throw new IllegalArgumentException("Illegal rotation " + rotation);
         }
-        set(ROTATION, val);
+        this.set(CraftSkullPlayer.ROTATION, val);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkullPlayerWall.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkullPlayerWall.java
index 9e8cc352be..c73be942b0 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkullPlayerWall.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkullPlayerWall.java
@@ -9,40 +9,40 @@ public final class CraftSkullPlayerWall extends org.bukkit.craftbukkit.block.dat
         super();
     }
 
-    public CraftSkullPlayerWall(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftSkullPlayerWall(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockSkullPlayerWall.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.PlayerWallHeadBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftSkullPlayerWall.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftSkullPlayerWall.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftSkullPlayerWall.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockSkullPlayerWall.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.PlayerWallHeadBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftSkullPlayerWall.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftSkullPlayerWall.POWERED, powered);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkullWall.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkullWall.java
index 60f038d628..538fd08e8c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkullWall.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSkullWall.java
@@ -9,40 +9,40 @@ public final class CraftSkullWall extends org.bukkit.craftbukkit.block.data.Craf
         super();
     }
 
-    public CraftSkullWall(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftSkullWall(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockSkullWall.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.WallSkullBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftSkullWall.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftSkullWall.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftSkullWall.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockSkullWall.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.WallSkullBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftSkullWall.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftSkullWall.POWERED, powered);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSmallDripleaf.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSmallDripleaf.java
index bcc5980fe5..34a41353d1 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSmallDripleaf.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSmallDripleaf.java
@@ -9,54 +9,54 @@ public final class CraftSmallDripleaf extends org.bukkit.craftbukkit.block.data.
         super();
     }
 
-    public CraftSmallDripleaf(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftSmallDripleaf(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftBisected
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> HALF = getEnum(net.minecraft.world.level.block.SmallDripleafBlock.class, "half");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> HALF = getEnum(net.minecraft.world.level.block.SmallDripleafBlock.class, "half");
 
     @Override
     public org.bukkit.block.data.Bisected.Half getHalf() {
-        return get(HALF, org.bukkit.block.data.Bisected.Half.class);
+        return this.get(CraftSmallDripleaf.HALF, org.bukkit.block.data.Bisected.Half.class);
     }
 
     @Override
     public void setHalf(org.bukkit.block.data.Bisected.Half half) {
-        set(HALF, half);
+        this.set(CraftSmallDripleaf.HALF, half);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.SmallDripleafBlock.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.SmallDripleafBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftSmallDripleaf.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftSmallDripleaf.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftSmallDripleaf.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.SmallDripleafBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.SmallDripleafBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftSmallDripleaf.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftSmallDripleaf.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSmoker.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSmoker.java
index 5dd456a460..5eb2508d64 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSmoker.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSmoker.java
@@ -9,40 +9,40 @@ public final class CraftSmoker extends org.bukkit.craftbukkit.block.data.CraftBl
         super();
     }
 
-    public CraftSmoker(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftSmoker(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockSmoker.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.SmokerBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftSmoker.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftSmoker.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftSmoker.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftLightable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LIT = getBoolean(net.minecraft.world.level.block.BlockSmoker.class, "lit");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty LIT = getBoolean(net.minecraft.world.level.block.SmokerBlock.class, "lit");
 
     @Override
     public boolean isLit() {
-        return get(LIT);
+        return this.get(CraftSmoker.LIT);
     }
 
     @Override
     public void setLit(boolean lit) {
-        set(LIT, lit);
+        this.set(CraftSmoker.LIT, lit);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSnifferEgg.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSnifferEgg.java
index 53957ea2f6..35978b240e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSnifferEgg.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSnifferEgg.java
@@ -9,26 +9,26 @@ public final class CraftSnifferEgg extends org.bukkit.craftbukkit.block.data.Cra
         super();
     }
 
-    public CraftSnifferEgg(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftSnifferEgg(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftHatchable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger HATCH = getInteger(net.minecraft.world.level.block.SnifferEggBlock.class, "hatch");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty HATCH = getInteger(net.minecraft.world.level.block.SnifferEggBlock.class, "hatch");
 
     @Override
     public int getHatch() {
-        return get(HATCH);
+        return this.get(CraftSnifferEgg.HATCH);
     }
 
     @Override
     public void setHatch(int hatch) {
-        set(HATCH, hatch);
+        this.set(CraftSnifferEgg.HATCH, hatch);
     }
 
     @Override
     public int getMaximumHatch() {
-        return getMax(HATCH);
+        return getMax(CraftSnifferEgg.HATCH);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSnow.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSnow.java
index fd54c47cae..ff340637f1 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSnow.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSnow.java
@@ -9,31 +9,31 @@ public final class CraftSnow extends org.bukkit.craftbukkit.block.data.CraftBloc
         super();
     }
 
-    public CraftSnow(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftSnow(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftSnow
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger LAYERS = getInteger(net.minecraft.world.level.block.BlockSnow.class, "layers");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty LAYERS = getInteger(net.minecraft.world.level.block.SnowLayerBlock.class, "layers");
 
     @Override
     public int getLayers() {
-        return get(LAYERS);
+        return this.get(CraftSnow.LAYERS);
     }
 
     @Override
     public void setLayers(int layers) {
-        set(LAYERS, layers);
+        this.set(CraftSnow.LAYERS, layers);
     }
 
     @Override
     public int getMinimumLayers() {
-        return getMin(LAYERS);
+        return getMin(CraftSnow.LAYERS);
     }
 
     @Override
     public int getMaximumLayers() {
-        return getMax(LAYERS);
+        return getMax(CraftSnow.LAYERS);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSoil.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSoil.java
index 9c0e6a32a6..56f701e9f0 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSoil.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSoil.java
@@ -9,26 +9,26 @@ public final class CraftSoil extends org.bukkit.craftbukkit.block.data.CraftBloc
         super();
     }
 
-    public CraftSoil(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftSoil(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftFarmland
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger MOISTURE = getInteger(net.minecraft.world.level.block.BlockSoil.class, "moisture");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty MOISTURE = getInteger(net.minecraft.world.level.block.FarmBlock.class, "moisture");
 
     @Override
     public int getMoisture() {
-        return get(MOISTURE);
+        return this.get(CraftSoil.MOISTURE);
     }
 
     @Override
     public void setMoisture(int moisture) {
-        set(MOISTURE, moisture);
+        this.set(CraftSoil.MOISTURE, moisture);
     }
 
     @Override
     public int getMaximumMoisture() {
-        return getMax(MOISTURE);
+        return getMax(CraftSoil.MOISTURE);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStainedGlassPane.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStainedGlassPane.java
index 983a2fcc20..91467410bb 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStainedGlassPane.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStainedGlassPane.java
@@ -9,40 +9,40 @@ public final class CraftStainedGlassPane extends org.bukkit.craftbukkit.block.da
         super();
     }
 
-    public CraftStainedGlassPane(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftStainedGlassPane(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftMultipleFacing
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] FACES = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{
-        getBoolean(net.minecraft.world.level.block.BlockStainedGlassPane.class, "north", true), getBoolean(net.minecraft.world.level.block.BlockStainedGlassPane.class, "east", true), getBoolean(net.minecraft.world.level.block.BlockStainedGlassPane.class, "south", true), getBoolean(net.minecraft.world.level.block.BlockStainedGlassPane.class, "west", true), getBoolean(net.minecraft.world.level.block.BlockStainedGlassPane.class, "up", true), getBoolean(net.minecraft.world.level.block.BlockStainedGlassPane.class, "down", true)
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty[] FACES = new net.minecraft.world.level.block.state.properties.BooleanProperty[]{
+        getBoolean(net.minecraft.world.level.block.StainedGlassPaneBlock.class, "north", true), getBoolean(net.minecraft.world.level.block.StainedGlassPaneBlock.class, "east", true), getBoolean(net.minecraft.world.level.block.StainedGlassPaneBlock.class, "south", true), getBoolean(net.minecraft.world.level.block.StainedGlassPaneBlock.class, "west", true), getBoolean(net.minecraft.world.level.block.StainedGlassPaneBlock.class, "up", true), getBoolean(net.minecraft.world.level.block.StainedGlassPaneBlock.class, "down", true)
     };
 
     @Override
     public boolean hasFace(org.bukkit.block.BlockFace face) {
-        net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
+        net.minecraft.world.level.block.state.properties.BooleanProperty state = CraftStainedGlassPane.FACES[face.ordinal()];
         if (state == null) {
             throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
         }
-        return get(state);
+        return this.get(state);
     }
 
     @Override
     public void setFace(org.bukkit.block.BlockFace face, boolean has) {
-        net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
+        net.minecraft.world.level.block.state.properties.BooleanProperty state = CraftStainedGlassPane.FACES[face.ordinal()];
         if (state == null) {
             throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
         }
-        set(state, has);
+        this.set(state, has);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
         com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
 
-        for (int i = 0; i < FACES.length; i++) {
-            if (FACES[i] != null && get(FACES[i])) {
+        for (int i = 0; i < CraftStainedGlassPane.FACES.length; i++) {
+            if (CraftStainedGlassPane.FACES[i] != null && this.get(CraftStainedGlassPane.FACES[i])) {
                 faces.add(org.bukkit.block.BlockFace.values()[i]);
             }
         }
@@ -54,8 +54,8 @@ public final class CraftStainedGlassPane extends org.bukkit.craftbukkit.block.da
     public java.util.Set<org.bukkit.block.BlockFace> getAllowedFaces() {
         com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
 
-        for (int i = 0; i < FACES.length; i++) {
-            if (FACES[i] != null) {
+        for (int i = 0; i < CraftStainedGlassPane.FACES.length; i++) {
+            if (CraftStainedGlassPane.FACES[i] != null) {
                 faces.add(org.bukkit.block.BlockFace.values()[i]);
             }
         }
@@ -65,15 +65,15 @@ public final class CraftStainedGlassPane extends org.bukkit.craftbukkit.block.da
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockStainedGlassPane.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.StainedGlassPaneBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftStainedGlassPane.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftStainedGlassPane.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStairs.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStairs.java
index 603447b2be..4cec825496 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStairs.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStairs.java
@@ -9,68 +9,68 @@ public final class CraftStairs extends org.bukkit.craftbukkit.block.data.CraftBl
         super();
     }
 
-    public CraftStairs(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftStairs(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftStairs
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> SHAPE = getEnum(net.minecraft.world.level.block.BlockStairs.class, "shape");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> SHAPE = getEnum(net.minecraft.world.level.block.StairBlock.class, "shape");
 
     @Override
     public org.bukkit.block.data.type.Stairs.Shape getShape() {
-        return get(SHAPE, org.bukkit.block.data.type.Stairs.Shape.class);
+        return this.get(CraftStairs.SHAPE, org.bukkit.block.data.type.Stairs.Shape.class);
     }
 
     @Override
     public void setShape(org.bukkit.block.data.type.Stairs.Shape shape) {
-        set(SHAPE, shape);
+        this.set(CraftStairs.SHAPE, shape);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftBisected
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> HALF = getEnum(net.minecraft.world.level.block.BlockStairs.class, "half");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> HALF = getEnum(net.minecraft.world.level.block.StairBlock.class, "half");
 
     @Override
     public org.bukkit.block.data.Bisected.Half getHalf() {
-        return get(HALF, org.bukkit.block.data.Bisected.Half.class);
+        return this.get(CraftStairs.HALF, org.bukkit.block.data.Bisected.Half.class);
     }
 
     @Override
     public void setHalf(org.bukkit.block.data.Bisected.Half half) {
-        set(HALF, half);
+        this.set(CraftStairs.HALF, half);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockStairs.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.StairBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftStairs.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftStairs.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftStairs.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockStairs.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.StairBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftStairs.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftStairs.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStem.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStem.java
index 9c0e2a1214..e85eaca094 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStem.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStem.java
@@ -9,26 +9,26 @@ public final class CraftStem extends org.bukkit.craftbukkit.block.data.CraftBloc
         super();
     }
 
-    public CraftStem(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftStem(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAgeable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockStem.class, "age");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty AGE = getInteger(net.minecraft.world.level.block.StemBlock.class, "age");
 
     @Override
     public int getAge() {
-        return get(AGE);
+        return this.get(CraftStem.AGE);
     }
 
     @Override
     public void setAge(int age) {
-        set(AGE, age);
+        this.set(CraftStem.AGE, age);
     }
 
     @Override
     public int getMaximumAge() {
-        return getMax(AGE);
+        return getMax(CraftStem.AGE);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStemAttached.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStemAttached.java
index 6297c45c2e..6da1ae7a8f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStemAttached.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStemAttached.java
@@ -9,26 +9,26 @@ public final class CraftStemAttached extends org.bukkit.craftbukkit.block.data.C
         super();
     }
 
-    public CraftStemAttached(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftStemAttached(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockStemAttached.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.AttachedStemBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftStemAttached.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftStemAttached.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftStemAttached.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStepAbstract.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStepAbstract.java
index eeaae4fa69..a0d01902c4 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStepAbstract.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStepAbstract.java
@@ -9,35 +9,35 @@ public final class CraftStepAbstract extends org.bukkit.craftbukkit.block.data.C
         super();
     }
 
-    public CraftStepAbstract(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftStepAbstract(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftSlab
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> TYPE = getEnum(net.minecraft.world.level.block.BlockStepAbstract.class, "type");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> TYPE = getEnum(net.minecraft.world.level.block.SlabBlock.class, "type");
 
     @Override
     public org.bukkit.block.data.type.Slab.Type getType() {
-        return get(TYPE, org.bukkit.block.data.type.Slab.Type.class);
+        return this.get(CraftStepAbstract.TYPE, org.bukkit.block.data.type.Slab.Type.class);
     }
 
     @Override
     public void setType(org.bukkit.block.data.type.Slab.Type type) {
-        set(TYPE, type);
+        this.set(CraftStepAbstract.TYPE, type);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockStepAbstract.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.SlabBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftStepAbstract.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftStepAbstract.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStonecutter.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStonecutter.java
index 5d3ab776d4..40bc47547f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStonecutter.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStonecutter.java
@@ -9,26 +9,26 @@ public final class CraftStonecutter extends org.bukkit.craftbukkit.block.data.Cr
         super();
     }
 
-    public CraftStonecutter(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftStonecutter(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockStonecutter.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.StonecutterBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftStonecutter.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftStonecutter.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftStonecutter.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStructure.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStructure.java
index 297070b8f6..f505d440b9 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStructure.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftStructure.java
@@ -9,21 +9,21 @@ public final class CraftStructure extends org.bukkit.craftbukkit.block.data.Craf
         super();
     }
 
-    public CraftStructure(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftStructure(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftStructureBlock
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> MODE = getEnum(net.minecraft.world.level.block.BlockStructure.class, "mode");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> MODE = getEnum(net.minecraft.world.level.block.StructureBlock.class, "mode");
 
     @Override
     public org.bukkit.block.data.type.StructureBlock.Mode getMode() {
-        return get(MODE, org.bukkit.block.data.type.StructureBlock.Mode.class);
+        return this.get(CraftStructure.MODE, org.bukkit.block.data.type.StructureBlock.Mode.class);
     }
 
     @Override
     public void setMode(org.bukkit.block.data.type.StructureBlock.Mode mode) {
-        set(MODE, mode);
+        this.set(CraftStructure.MODE, mode);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSweetBerryBush.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSweetBerryBush.java
index 39e9375e87..9f135401ee 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSweetBerryBush.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftSweetBerryBush.java
@@ -9,26 +9,26 @@ public final class CraftSweetBerryBush extends org.bukkit.craftbukkit.block.data
         super();
     }
 
-    public CraftSweetBerryBush(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftSweetBerryBush(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAgeable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockSweetBerryBush.class, "age");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty AGE = getInteger(net.minecraft.world.level.block.SweetBerryBushBlock.class, "age");
 
     @Override
     public int getAge() {
-        return get(AGE);
+        return this.get(CraftSweetBerryBush.AGE);
     }
 
     @Override
     public void setAge(int age) {
-        set(AGE, age);
+        this.set(CraftSweetBerryBush.AGE, age);
     }
 
     @Override
     public int getMaximumAge() {
-        return getMax(AGE);
+        return getMax(CraftSweetBerryBush.AGE);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTNT.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTNT.java
index 4b08b54deb..75fc4fe977 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTNT.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTNT.java
@@ -9,21 +9,21 @@ public final class CraftTNT extends org.bukkit.craftbukkit.block.data.CraftBlock
         super();
     }
 
-    public CraftTNT(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftTNT(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftTNT
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean UNSTABLE = getBoolean(net.minecraft.world.level.block.BlockTNT.class, "unstable");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty UNSTABLE = getBoolean(net.minecraft.world.level.block.TntBlock.class, "unstable");
 
     @Override
     public boolean isUnstable() {
-        return get(UNSTABLE);
+        return this.get(CraftTNT.UNSTABLE);
     }
 
     @Override
     public void setUnstable(boolean unstable) {
-        set(UNSTABLE, unstable);
+        this.set(CraftTNT.UNSTABLE, unstable);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallPlant.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallPlant.java
index 8e753b21a1..0bbe254ba2 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallPlant.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallPlant.java
@@ -9,21 +9,21 @@ public final class CraftTallPlant extends org.bukkit.craftbukkit.block.data.Craf
         super();
     }
 
-    public CraftTallPlant(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftTallPlant(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftBisected
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> HALF = getEnum(net.minecraft.world.level.block.BlockTallPlant.class, "half");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> HALF = getEnum(net.minecraft.world.level.block.DoublePlantBlock.class, "half");
 
     @Override
     public org.bukkit.block.data.Bisected.Half getHalf() {
-        return get(HALF, org.bukkit.block.data.Bisected.Half.class);
+        return this.get(CraftTallPlant.HALF, org.bukkit.block.data.Bisected.Half.class);
     }
 
     @Override
     public void setHalf(org.bukkit.block.data.Bisected.Half half) {
-        set(HALF, half);
+        this.set(CraftTallPlant.HALF, half);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallPlantFlower.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallPlantFlower.java
index 50490d2739..f13cdcd3af 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallPlantFlower.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallPlantFlower.java
@@ -9,21 +9,21 @@ public final class CraftTallPlantFlower extends org.bukkit.craftbukkit.block.dat
         super();
     }
 
-    public CraftTallPlantFlower(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftTallPlantFlower(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftBisected
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> HALF = getEnum(net.minecraft.world.level.block.BlockTallPlantFlower.class, "half");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> HALF = getEnum(net.minecraft.world.level.block.TallFlowerBlock.class, "half");
 
     @Override
     public org.bukkit.block.data.Bisected.Half getHalf() {
-        return get(HALF, org.bukkit.block.data.Bisected.Half.class);
+        return this.get(CraftTallPlantFlower.HALF, org.bukkit.block.data.Bisected.Half.class);
     }
 
     @Override
     public void setHalf(org.bukkit.block.data.Bisected.Half half) {
-        set(HALF, half);
+        this.set(CraftTallPlantFlower.HALF, half);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallSeagrass.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallSeagrass.java
index 2cd6f5526b..a69b28f41c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallSeagrass.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTallSeagrass.java
@@ -9,21 +9,21 @@ public final class CraftTallSeagrass extends org.bukkit.craftbukkit.block.data.C
         super();
     }
 
-    public CraftTallSeagrass(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftTallSeagrass(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftBisected
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> HALF = getEnum(net.minecraft.world.level.block.TallSeagrassBlock.class, "half");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> HALF = getEnum(net.minecraft.world.level.block.TallSeagrassBlock.class, "half");
 
     @Override
     public org.bukkit.block.data.Bisected.Half getHalf() {
-        return get(HALF, org.bukkit.block.data.Bisected.Half.class);
+        return this.get(CraftTallSeagrass.HALF, org.bukkit.block.data.Bisected.Half.class);
     }
 
     @Override
     public void setHalf(org.bukkit.block.data.Bisected.Half half) {
-        set(HALF, half);
+        this.set(CraftTallSeagrass.HALF, half);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTarget.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTarget.java
index f1c73016aa..baae9feace 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTarget.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTarget.java
@@ -9,26 +9,26 @@ public final class CraftTarget extends org.bukkit.craftbukkit.block.data.CraftBl
         super();
     }
 
-    public CraftTarget(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftTarget(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAnaloguePowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger POWER = getInteger(net.minecraft.world.level.block.BlockTarget.class, "power");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty POWER = getInteger(net.minecraft.world.level.block.TargetBlock.class, "power");
 
     @Override
     public int getPower() {
-        return get(POWER);
+        return this.get(CraftTarget.POWER);
     }
 
     @Override
     public void setPower(int power) {
-        set(POWER, power);
+        this.set(CraftTarget.POWER, power);
     }
 
     @Override
     public int getMaximumPower() {
-        return getMax(POWER);
+        return getMax(CraftTarget.POWER);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTorchWall.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTorchWall.java
index fc307680ea..2d5eefabb2 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTorchWall.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTorchWall.java
@@ -9,26 +9,26 @@ public final class CraftTorchWall extends org.bukkit.craftbukkit.block.data.Craf
         super();
     }
 
-    public CraftTorchWall(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftTorchWall(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockTorchWall.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.WallTorchBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftTorchWall.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftTorchWall.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftTorchWall.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTorchflowerCrop.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTorchflowerCrop.java
index 8d8cd4f1be..2a4ade3518 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTorchflowerCrop.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTorchflowerCrop.java
@@ -9,26 +9,26 @@ public final class CraftTorchflowerCrop extends org.bukkit.craftbukkit.block.dat
         super();
     }
 
-    public CraftTorchflowerCrop(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftTorchflowerCrop(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAgeable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.TorchflowerCropBlock.class, "age");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty AGE = getInteger(net.minecraft.world.level.block.TorchflowerCropBlock.class, "age");
 
     @Override
     public int getAge() {
-        return get(AGE);
+        return this.get(CraftTorchflowerCrop.AGE);
     }
 
     @Override
     public void setAge(int age) {
-        set(AGE, age);
+        this.set(CraftTorchflowerCrop.AGE, age);
     }
 
     @Override
     public int getMaximumAge() {
-        return getMax(AGE);
+        return getMax(CraftTorchflowerCrop.AGE);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTrapdoor.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTrapdoor.java
index c8c6ae2c8e..5e88ff74bb 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTrapdoor.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTrapdoor.java
@@ -9,82 +9,82 @@ public final class CraftTrapdoor extends org.bukkit.craftbukkit.block.data.Craft
         super();
     }
 
-    public CraftTrapdoor(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftTrapdoor(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftBisected
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> HALF = getEnum(net.minecraft.world.level.block.BlockTrapdoor.class, "half");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> HALF = getEnum(net.minecraft.world.level.block.TrapDoorBlock.class, "half");
 
     @Override
     public org.bukkit.block.data.Bisected.Half getHalf() {
-        return get(HALF, org.bukkit.block.data.Bisected.Half.class);
+        return this.get(CraftTrapdoor.HALF, org.bukkit.block.data.Bisected.Half.class);
     }
 
     @Override
     public void setHalf(org.bukkit.block.data.Bisected.Half half) {
-        set(HALF, half);
+        this.set(CraftTrapdoor.HALF, half);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockTrapdoor.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.TrapDoorBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftTrapdoor.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftTrapdoor.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftTrapdoor.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftOpenable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean OPEN = getBoolean(net.minecraft.world.level.block.BlockTrapdoor.class, "open");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty OPEN = getBoolean(net.minecraft.world.level.block.TrapDoorBlock.class, "open");
 
     @Override
     public boolean isOpen() {
-        return get(OPEN);
+        return this.get(CraftTrapdoor.OPEN);
     }
 
     @Override
     public void setOpen(boolean open) {
-        set(OPEN, open);
+        this.set(CraftTrapdoor.OPEN, open);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockTrapdoor.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.TrapDoorBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftTrapdoor.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftTrapdoor.POWERED, powered);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockTrapdoor.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.TrapDoorBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftTrapdoor.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftTrapdoor.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTrialSpawner.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTrialSpawner.java
index 298f703272..f510ff9c84 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTrialSpawner.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTrialSpawner.java
@@ -9,32 +9,32 @@ public final class CraftTrialSpawner extends org.bukkit.craftbukkit.block.data.C
         super();
     }
 
-    public CraftTrialSpawner(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftTrialSpawner(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftTrialSpawner
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> TRIAL_SPAWNER_STATE = getEnum(net.minecraft.world.level.block.TrialSpawnerBlock.class, "trial_spawner_state");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean OMINOUS = getBoolean(net.minecraft.world.level.block.TrialSpawnerBlock.class, "ominous");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> TRIAL_SPAWNER_STATE = getEnum(net.minecraft.world.level.block.TrialSpawnerBlock.class, "trial_spawner_state");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty OMINOUS = getBoolean(net.minecraft.world.level.block.TrialSpawnerBlock.class, "ominous");
 
     @Override
     public org.bukkit.block.data.type.TrialSpawner.State getTrialSpawnerState() {
-        return get(TRIAL_SPAWNER_STATE, org.bukkit.block.data.type.TrialSpawner.State.class);
+        return this.get(CraftTrialSpawner.TRIAL_SPAWNER_STATE, org.bukkit.block.data.type.TrialSpawner.State.class);
     }
 
     @Override
     public void setTrialSpawnerState(org.bukkit.block.data.type.TrialSpawner.State state) {
-        set(TRIAL_SPAWNER_STATE, state);
+        this.set(CraftTrialSpawner.TRIAL_SPAWNER_STATE, state);
     }
 
     @Override
     public boolean isOminous() {
-        return get(OMINOUS);
+        return this.get(CraftTrialSpawner.OMINOUS);
     }
 
     @Override
     public void setOminous(boolean ominous) {
-        set(OMINOUS, ominous);
+        this.set(CraftTrialSpawner.OMINOUS, ominous);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTripwire.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTripwire.java
index b8e01c7b2f..83375648cc 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTripwire.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTripwire.java
@@ -9,68 +9,68 @@ public final class CraftTripwire extends org.bukkit.craftbukkit.block.data.Craft
         super();
     }
 
-    public CraftTripwire(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftTripwire(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftTripwire
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean DISARMED = getBoolean(net.minecraft.world.level.block.BlockTripwire.class, "disarmed");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty DISARMED = getBoolean(net.minecraft.world.level.block.TripWireBlock.class, "disarmed");
 
     @Override
     public boolean isDisarmed() {
-        return get(DISARMED);
+        return this.get(CraftTripwire.DISARMED);
     }
 
     @Override
     public void setDisarmed(boolean disarmed) {
-        set(DISARMED, disarmed);
+        this.set(CraftTripwire.DISARMED, disarmed);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAttachable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean ATTACHED = getBoolean(net.minecraft.world.level.block.BlockTripwire.class, "attached");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty ATTACHED = getBoolean(net.minecraft.world.level.block.TripWireBlock.class, "attached");
 
     @Override
     public boolean isAttached() {
-        return get(ATTACHED);
+        return this.get(CraftTripwire.ATTACHED);
     }
 
     @Override
     public void setAttached(boolean attached) {
-        set(ATTACHED, attached);
+        this.set(CraftTripwire.ATTACHED, attached);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftMultipleFacing
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] FACES = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{
-        getBoolean(net.minecraft.world.level.block.BlockTripwire.class, "north", true), getBoolean(net.minecraft.world.level.block.BlockTripwire.class, "east", true), getBoolean(net.minecraft.world.level.block.BlockTripwire.class, "south", true), getBoolean(net.minecraft.world.level.block.BlockTripwire.class, "west", true), getBoolean(net.minecraft.world.level.block.BlockTripwire.class, "up", true), getBoolean(net.minecraft.world.level.block.BlockTripwire.class, "down", true)
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty[] FACES = new net.minecraft.world.level.block.state.properties.BooleanProperty[]{
+        getBoolean(net.minecraft.world.level.block.TripWireBlock.class, "north", true), getBoolean(net.minecraft.world.level.block.TripWireBlock.class, "east", true), getBoolean(net.minecraft.world.level.block.TripWireBlock.class, "south", true), getBoolean(net.minecraft.world.level.block.TripWireBlock.class, "west", true), getBoolean(net.minecraft.world.level.block.TripWireBlock.class, "up", true), getBoolean(net.minecraft.world.level.block.TripWireBlock.class, "down", true)
     };
 
     @Override
     public boolean hasFace(org.bukkit.block.BlockFace face) {
-        net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
+        net.minecraft.world.level.block.state.properties.BooleanProperty state = CraftTripwire.FACES[face.ordinal()];
         if (state == null) {
             throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
         }
-        return get(state);
+        return this.get(state);
     }
 
     @Override
     public void setFace(org.bukkit.block.BlockFace face, boolean has) {
-        net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
+        net.minecraft.world.level.block.state.properties.BooleanProperty state = CraftTripwire.FACES[face.ordinal()];
         if (state == null) {
             throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
         }
-        set(state, has);
+        this.set(state, has);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
         com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
 
-        for (int i = 0; i < FACES.length; i++) {
-            if (FACES[i] != null && get(FACES[i])) {
+        for (int i = 0; i < CraftTripwire.FACES.length; i++) {
+            if (CraftTripwire.FACES[i] != null && this.get(CraftTripwire.FACES[i])) {
                 faces.add(org.bukkit.block.BlockFace.values()[i]);
             }
         }
@@ -82,8 +82,8 @@ public final class CraftTripwire extends org.bukkit.craftbukkit.block.data.Craft
     public java.util.Set<org.bukkit.block.BlockFace> getAllowedFaces() {
         com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
 
-        for (int i = 0; i < FACES.length; i++) {
-            if (FACES[i] != null) {
+        for (int i = 0; i < CraftTripwire.FACES.length; i++) {
+            if (CraftTripwire.FACES[i] != null) {
                 faces.add(org.bukkit.block.BlockFace.values()[i]);
             }
         }
@@ -93,15 +93,15 @@ public final class CraftTripwire extends org.bukkit.craftbukkit.block.data.Craft
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockTripwire.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.TripWireBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftTripwire.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftTripwire.POWERED, powered);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTripwireHook.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTripwireHook.java
index ccd34c0e31..e072799d84 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTripwireHook.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTripwireHook.java
@@ -9,54 +9,54 @@ public final class CraftTripwireHook extends org.bukkit.craftbukkit.block.data.C
         super();
     }
 
-    public CraftTripwireHook(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftTripwireHook(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAttachable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean ATTACHED = getBoolean(net.minecraft.world.level.block.BlockTripwireHook.class, "attached");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty ATTACHED = getBoolean(net.minecraft.world.level.block.TripWireHookBlock.class, "attached");
 
     @Override
     public boolean isAttached() {
-        return get(ATTACHED);
+        return this.get(CraftTripwireHook.ATTACHED);
     }
 
     @Override
     public void setAttached(boolean attached) {
-        set(ATTACHED, attached);
+        this.set(CraftTripwireHook.ATTACHED, attached);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockTripwireHook.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.TripWireHookBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftTripwireHook.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftTripwireHook.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftTripwireHook.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockTripwireHook.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.TripWireHookBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftTripwireHook.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftTripwireHook.POWERED, powered);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTurtleEgg.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTurtleEgg.java
index 99937123c3..e4fac5e181 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTurtleEgg.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTurtleEgg.java
@@ -9,50 +9,50 @@ public final class CraftTurtleEgg extends org.bukkit.craftbukkit.block.data.Craf
         super();
     }
 
-    public CraftTurtleEgg(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftTurtleEgg(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftTurtleEgg
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger EGGS = getInteger(net.minecraft.world.level.block.BlockTurtleEgg.class, "eggs");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty EGGS = getInteger(net.minecraft.world.level.block.TurtleEggBlock.class, "eggs");
 
     @Override
     public int getEggs() {
-        return get(EGGS);
+        return this.get(CraftTurtleEgg.EGGS);
     }
 
     @Override
     public void setEggs(int eggs) {
-        set(EGGS, eggs);
+        this.set(CraftTurtleEgg.EGGS, eggs);
     }
 
     @Override
     public int getMinimumEggs() {
-        return getMin(EGGS);
+        return getMin(CraftTurtleEgg.EGGS);
     }
 
     @Override
     public int getMaximumEggs() {
-        return getMax(EGGS);
+        return getMax(CraftTurtleEgg.EGGS);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftHatchable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger HATCH = getInteger(net.minecraft.world.level.block.BlockTurtleEgg.class, "hatch");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty HATCH = getInteger(net.minecraft.world.level.block.TurtleEggBlock.class, "hatch");
 
     @Override
     public int getHatch() {
-        return get(HATCH);
+        return this.get(CraftTurtleEgg.HATCH);
     }
 
     @Override
     public void setHatch(int hatch) {
-        set(HATCH, hatch);
+        this.set(CraftTurtleEgg.HATCH, hatch);
     }
 
     @Override
     public int getMaximumHatch() {
-        return getMax(HATCH);
+        return getMax(CraftTurtleEgg.HATCH);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTwistingVines.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTwistingVines.java
index b3455ee4d2..116bb8706c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTwistingVines.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftTwistingVines.java
@@ -9,26 +9,26 @@ public final class CraftTwistingVines extends org.bukkit.craftbukkit.block.data.
         super();
     }
 
-    public CraftTwistingVines(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftTwistingVines(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAgeable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockTwistingVines.class, "age");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty AGE = getInteger(net.minecraft.world.level.block.TwistingVinesBlock.class, "age");
 
     @Override
     public int getAge() {
-        return get(AGE);
+        return this.get(CraftTwistingVines.AGE);
     }
 
     @Override
     public void setAge(int age) {
-        set(AGE, age);
+        this.set(CraftTwistingVines.AGE, age);
     }
 
     @Override
     public int getMaximumAge() {
-        return getMax(AGE);
+        return getMax(CraftTwistingVines.AGE);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftVault.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftVault.java
index 12fff941ac..15e91d1bfa 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftVault.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftVault.java
@@ -9,61 +9,61 @@ public final class CraftVault extends org.bukkit.craftbukkit.block.data.CraftBlo
         super();
     }
 
-    public CraftVault(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftVault(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftVault
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> VAULT_STATE = getEnum(net.minecraft.world.level.block.VaultBlock.class, "vault_state");
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean OMINOUS = getBoolean(net.minecraft.world.level.block.VaultBlock.class, "ominous");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> VAULT_STATE = getEnum(net.minecraft.world.level.block.VaultBlock.class, "vault_state");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty OMINOUS = getBoolean(net.minecraft.world.level.block.VaultBlock.class, "ominous");
 
     @Override
     public org.bukkit.block.data.type.Vault.State getVaultState() {
-        return get(VAULT_STATE, org.bukkit.block.data.type.Vault.State.class);
+        return this.get(CraftVault.VAULT_STATE, org.bukkit.block.data.type.Vault.State.class);
     }
 
     @Override
     public org.bukkit.block.data.type.Vault.State getTrialSpawnerState() {
-        return getVaultState();
+        return this.getVaultState();
     }
 
     @Override
     public void setVaultState(org.bukkit.block.data.type.Vault.State state) {
-        set(VAULT_STATE, state);
+        this.set(CraftVault.VAULT_STATE, state);
     }
 
     @Override
     public void setTrialSpawnerState(org.bukkit.block.data.type.Vault.State state) {
-        setVaultState(state);
+        this.setVaultState(state);
     }
 
     @Override
     public boolean isOminous() {
-        return get(OMINOUS);
+        return this.get(CraftVault.OMINOUS);
     }
 
     @Override
     public void setOminous(boolean ominous) {
-        set(OMINOUS, ominous);
+        this.set(CraftVault.OMINOUS, ominous);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.VaultBlock.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.VaultBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftVault.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftVault.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftVault.FACING, org.bukkit.block.BlockFace.class);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftVine.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftVine.java
index f954ea5412..d595dac1bd 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftVine.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftVine.java
@@ -9,40 +9,40 @@ public final class CraftVine extends org.bukkit.craftbukkit.block.data.CraftBloc
         super();
     }
 
-    public CraftVine(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftVine(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftMultipleFacing
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean[] FACES = new net.minecraft.world.level.block.state.properties.BlockStateBoolean[]{
-        getBoolean(net.minecraft.world.level.block.BlockVine.class, "north", true), getBoolean(net.minecraft.world.level.block.BlockVine.class, "east", true), getBoolean(net.minecraft.world.level.block.BlockVine.class, "south", true), getBoolean(net.minecraft.world.level.block.BlockVine.class, "west", true), getBoolean(net.minecraft.world.level.block.BlockVine.class, "up", true), getBoolean(net.minecraft.world.level.block.BlockVine.class, "down", true)
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty[] FACES = new net.minecraft.world.level.block.state.properties.BooleanProperty[]{
+        getBoolean(net.minecraft.world.level.block.VineBlock.class, "north", true), getBoolean(net.minecraft.world.level.block.VineBlock.class, "east", true), getBoolean(net.minecraft.world.level.block.VineBlock.class, "south", true), getBoolean(net.minecraft.world.level.block.VineBlock.class, "west", true), getBoolean(net.minecraft.world.level.block.VineBlock.class, "up", true), getBoolean(net.minecraft.world.level.block.VineBlock.class, "down", true)
     };
 
     @Override
     public boolean hasFace(org.bukkit.block.BlockFace face) {
-        net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
+        net.minecraft.world.level.block.state.properties.BooleanProperty state = CraftVine.FACES[face.ordinal()];
         if (state == null) {
             throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
         }
-        return get(state);
+        return this.get(state);
     }
 
     @Override
     public void setFace(org.bukkit.block.BlockFace face, boolean has) {
-        net.minecraft.world.level.block.state.properties.BlockStateBoolean state = FACES[face.ordinal()];
+        net.minecraft.world.level.block.state.properties.BooleanProperty state = CraftVine.FACES[face.ordinal()];
         if (state == null) {
             throw new IllegalArgumentException("Non-allowed face " + face + ". Check MultipleFacing.getAllowedFaces.");
         }
-        set(state, has);
+        this.set(state, has);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
         com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
 
-        for (int i = 0; i < FACES.length; i++) {
-            if (FACES[i] != null && get(FACES[i])) {
+        for (int i = 0; i < CraftVine.FACES.length; i++) {
+            if (CraftVine.FACES[i] != null && this.get(CraftVine.FACES[i])) {
                 faces.add(org.bukkit.block.BlockFace.values()[i]);
             }
         }
@@ -54,8 +54,8 @@ public final class CraftVine extends org.bukkit.craftbukkit.block.data.CraftBloc
     public java.util.Set<org.bukkit.block.BlockFace> getAllowedFaces() {
         com.google.common.collect.ImmutableSet.Builder<org.bukkit.block.BlockFace> faces = com.google.common.collect.ImmutableSet.builder();
 
-        for (int i = 0; i < FACES.length; i++) {
-            if (FACES[i] != null) {
+        for (int i = 0; i < CraftVine.FACES.length; i++) {
+            if (CraftVine.FACES[i] != null) {
                 faces.add(org.bukkit.block.BlockFace.values()[i]);
             }
         }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWallHangingSign.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWallHangingSign.java
index 68b65d34af..1f30973fd6 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWallHangingSign.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWallHangingSign.java
@@ -9,40 +9,40 @@ public final class CraftWallHangingSign extends org.bukkit.craftbukkit.block.dat
         super();
     }
 
-    public CraftWallHangingSign(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftWallHangingSign(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.WallHangingSignBlock.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.WallHangingSignBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftWallHangingSign.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftWallHangingSign.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftWallHangingSign.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.WallHangingSignBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.WallHangingSignBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftWallHangingSign.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftWallHangingSign.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWallSign.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWallSign.java
index e8f92efad1..573d189b6e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWallSign.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWallSign.java
@@ -9,40 +9,40 @@ public final class CraftWallSign extends org.bukkit.craftbukkit.block.data.Craft
         super();
     }
 
-    public CraftWallSign(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftWallSign(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockWallSign.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.WallSignBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftWallSign.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftWallSign.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftWallSign.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.BlockWallSign.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.WallSignBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftWallSign.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftWallSign.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWaterloggedTransparent.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWaterloggedTransparent.java
index ccb7642194..4bde4b7b16 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWaterloggedTransparent.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWaterloggedTransparent.java
@@ -9,21 +9,21 @@ public final class CraftWaterloggedTransparent extends org.bukkit.craftbukkit.bl
         super();
     }
 
-    public CraftWaterloggedTransparent(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftWaterloggedTransparent(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.WaterloggedTransparentBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.WaterloggedTransparentBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftWaterloggedTransparent.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftWaterloggedTransparent.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeatheringCopperBulb.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeatheringCopperBulb.java
index 58b5632388..bb4aa08507 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeatheringCopperBulb.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeatheringCopperBulb.java
@@ -9,35 +9,35 @@ public final class CraftWeatheringCopperBulb extends org.bukkit.craftbukkit.bloc
         super();
     }
 
-    public CraftWeatheringCopperBulb(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftWeatheringCopperBulb(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftLightable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean LIT = getBoolean(net.minecraft.world.level.block.WeatheringCopperBulbBlock.class, "lit");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty LIT = getBoolean(net.minecraft.world.level.block.WeatheringCopperBulbBlock.class, "lit");
 
     @Override
     public boolean isLit() {
-        return get(LIT);
+        return this.get(CraftWeatheringCopperBulb.LIT);
     }
 
     @Override
     public void setLit(boolean lit) {
-        set(LIT, lit);
+        this.set(CraftWeatheringCopperBulb.LIT, lit);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.WeatheringCopperBulbBlock.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.WeatheringCopperBulbBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftWeatheringCopperBulb.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftWeatheringCopperBulb.POWERED, powered);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeatheringCopperDoor.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeatheringCopperDoor.java
index 792095fa86..32371d4992 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeatheringCopperDoor.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeatheringCopperDoor.java
@@ -9,82 +9,82 @@ public final class CraftWeatheringCopperDoor extends org.bukkit.craftbukkit.bloc
         super();
     }
 
-    public CraftWeatheringCopperDoor(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftWeatheringCopperDoor(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftDoor
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> HINGE = getEnum(net.minecraft.world.level.block.WeatheringCopperDoorBlock.class, "hinge");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> HINGE = getEnum(net.minecraft.world.level.block.WeatheringCopperDoorBlock.class, "hinge");
 
     @Override
     public org.bukkit.block.data.type.Door.Hinge getHinge() {
-        return get(HINGE, org.bukkit.block.data.type.Door.Hinge.class);
+        return this.get(CraftWeatheringCopperDoor.HINGE, org.bukkit.block.data.type.Door.Hinge.class);
     }
 
     @Override
     public void setHinge(org.bukkit.block.data.type.Door.Hinge hinge) {
-        set(HINGE, hinge);
+        this.set(CraftWeatheringCopperDoor.HINGE, hinge);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftBisected
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> HALF = getEnum(net.minecraft.world.level.block.WeatheringCopperDoorBlock.class, "half");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> HALF = getEnum(net.minecraft.world.level.block.WeatheringCopperDoorBlock.class, "half");
 
     @Override
     public org.bukkit.block.data.Bisected.Half getHalf() {
-        return get(HALF, org.bukkit.block.data.Bisected.Half.class);
+        return this.get(CraftWeatheringCopperDoor.HALF, org.bukkit.block.data.Bisected.Half.class);
     }
 
     @Override
     public void setHalf(org.bukkit.block.data.Bisected.Half half) {
-        set(HALF, half);
+        this.set(CraftWeatheringCopperDoor.HALF, half);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.WeatheringCopperDoorBlock.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.WeatheringCopperDoorBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftWeatheringCopperDoor.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftWeatheringCopperDoor.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftWeatheringCopperDoor.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftOpenable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean OPEN = getBoolean(net.minecraft.world.level.block.WeatheringCopperDoorBlock.class, "open");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty OPEN = getBoolean(net.minecraft.world.level.block.WeatheringCopperDoorBlock.class, "open");
 
     @Override
     public boolean isOpen() {
-        return get(OPEN);
+        return this.get(CraftWeatheringCopperDoor.OPEN);
     }
 
     @Override
     public void setOpen(boolean open) {
-        set(OPEN, open);
+        this.set(CraftWeatheringCopperDoor.OPEN, open);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.WeatheringCopperDoorBlock.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.WeatheringCopperDoorBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftWeatheringCopperDoor.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftWeatheringCopperDoor.POWERED, powered);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeatheringCopperGrate.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeatheringCopperGrate.java
index dd7d552378..8c695d8f99 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeatheringCopperGrate.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeatheringCopperGrate.java
@@ -9,21 +9,21 @@ public final class CraftWeatheringCopperGrate extends org.bukkit.craftbukkit.blo
         super();
     }
 
-    public CraftWeatheringCopperGrate(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftWeatheringCopperGrate(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.WeatheringCopperGrateBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.WeatheringCopperGrateBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftWeatheringCopperGrate.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftWeatheringCopperGrate.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeatheringCopperSlab.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeatheringCopperSlab.java
index 4b62dc648a..61ba7dedfc 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeatheringCopperSlab.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeatheringCopperSlab.java
@@ -9,35 +9,35 @@ public final class CraftWeatheringCopperSlab extends org.bukkit.craftbukkit.bloc
         super();
     }
 
-    public CraftWeatheringCopperSlab(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftWeatheringCopperSlab(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftSlab
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> TYPE = getEnum(net.minecraft.world.level.block.WeatheringCopperSlabBlock.class, "type");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> TYPE = getEnum(net.minecraft.world.level.block.WeatheringCopperSlabBlock.class, "type");
 
     @Override
     public org.bukkit.block.data.type.Slab.Type getType() {
-        return get(TYPE, org.bukkit.block.data.type.Slab.Type.class);
+        return this.get(CraftWeatheringCopperSlab.TYPE, org.bukkit.block.data.type.Slab.Type.class);
     }
 
     @Override
     public void setType(org.bukkit.block.data.type.Slab.Type type) {
-        set(TYPE, type);
+        this.set(CraftWeatheringCopperSlab.TYPE, type);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.WeatheringCopperSlabBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.WeatheringCopperSlabBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftWeatheringCopperSlab.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftWeatheringCopperSlab.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeatheringCopperStair.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeatheringCopperStair.java
index 41f34f9844..1229a2864a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeatheringCopperStair.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeatheringCopperStair.java
@@ -9,68 +9,68 @@ public final class CraftWeatheringCopperStair extends org.bukkit.craftbukkit.blo
         super();
     }
 
-    public CraftWeatheringCopperStair(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftWeatheringCopperStair(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.type.CraftStairs
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> SHAPE = getEnum(net.minecraft.world.level.block.WeatheringCopperStairBlock.class, "shape");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> SHAPE = getEnum(net.minecraft.world.level.block.WeatheringCopperStairBlock.class, "shape");
 
     @Override
     public org.bukkit.block.data.type.Stairs.Shape getShape() {
-        return get(SHAPE, org.bukkit.block.data.type.Stairs.Shape.class);
+        return this.get(CraftWeatheringCopperStair.SHAPE, org.bukkit.block.data.type.Stairs.Shape.class);
     }
 
     @Override
     public void setShape(org.bukkit.block.data.type.Stairs.Shape shape) {
-        set(SHAPE, shape);
+        this.set(CraftWeatheringCopperStair.SHAPE, shape);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftBisected
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> HALF = getEnum(net.minecraft.world.level.block.WeatheringCopperStairBlock.class, "half");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> HALF = getEnum(net.minecraft.world.level.block.WeatheringCopperStairBlock.class, "half");
 
     @Override
     public org.bukkit.block.data.Bisected.Half getHalf() {
-        return get(HALF, org.bukkit.block.data.Bisected.Half.class);
+        return this.get(CraftWeatheringCopperStair.HALF, org.bukkit.block.data.Bisected.Half.class);
     }
 
     @Override
     public void setHalf(org.bukkit.block.data.Bisected.Half half) {
-        set(HALF, half);
+        this.set(CraftWeatheringCopperStair.HALF, half);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.WeatheringCopperStairBlock.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.WeatheringCopperStairBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftWeatheringCopperStair.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftWeatheringCopperStair.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftWeatheringCopperStair.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.WeatheringCopperStairBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.WeatheringCopperStairBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftWeatheringCopperStair.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftWeatheringCopperStair.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeatheringCopperTrapDoor.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeatheringCopperTrapDoor.java
index e0ad47c661..c50a8f6b2e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeatheringCopperTrapDoor.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeatheringCopperTrapDoor.java
@@ -9,82 +9,82 @@ public final class CraftWeatheringCopperTrapDoor extends org.bukkit.craftbukkit.
         super();
     }
 
-    public CraftWeatheringCopperTrapDoor(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftWeatheringCopperTrapDoor(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftBisected
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> HALF = getEnum(net.minecraft.world.level.block.WeatheringCopperTrapDoorBlock.class, "half");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> HALF = getEnum(net.minecraft.world.level.block.WeatheringCopperTrapDoorBlock.class, "half");
 
     @Override
     public org.bukkit.block.data.Bisected.Half getHalf() {
-        return get(HALF, org.bukkit.block.data.Bisected.Half.class);
+        return this.get(CraftWeatheringCopperTrapDoor.HALF, org.bukkit.block.data.Bisected.Half.class);
     }
 
     @Override
     public void setHalf(org.bukkit.block.data.Bisected.Half half) {
-        set(HALF, half);
+        this.set(CraftWeatheringCopperTrapDoor.HALF, half);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.WeatheringCopperTrapDoorBlock.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.WeatheringCopperTrapDoorBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftWeatheringCopperTrapDoor.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftWeatheringCopperTrapDoor.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftWeatheringCopperTrapDoor.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftOpenable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean OPEN = getBoolean(net.minecraft.world.level.block.WeatheringCopperTrapDoorBlock.class, "open");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty OPEN = getBoolean(net.minecraft.world.level.block.WeatheringCopperTrapDoorBlock.class, "open");
 
     @Override
     public boolean isOpen() {
-        return get(OPEN);
+        return this.get(CraftWeatheringCopperTrapDoor.OPEN);
     }
 
     @Override
     public void setOpen(boolean open) {
-        set(OPEN, open);
+        this.set(CraftWeatheringCopperTrapDoor.OPEN, open);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.WeatheringCopperTrapDoorBlock.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.WeatheringCopperTrapDoorBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftWeatheringCopperTrapDoor.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftWeatheringCopperTrapDoor.POWERED, powered);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftWaterlogged
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean WATERLOGGED = getBoolean(net.minecraft.world.level.block.WeatheringCopperTrapDoorBlock.class, "waterlogged");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty WATERLOGGED = getBoolean(net.minecraft.world.level.block.WeatheringCopperTrapDoorBlock.class, "waterlogged");
 
     @Override
     public boolean isWaterlogged() {
-        return get(WATERLOGGED);
+        return this.get(CraftWeatheringCopperTrapDoor.WATERLOGGED);
     }
 
     @Override
     public void setWaterlogged(boolean waterlogged) {
-        set(WATERLOGGED, waterlogged);
+        this.set(CraftWeatheringCopperTrapDoor.WATERLOGGED, waterlogged);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeepingVines.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeepingVines.java
index f54f798cd4..6a7202cb84 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeepingVines.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWeepingVines.java
@@ -9,26 +9,26 @@ public final class CraftWeepingVines extends org.bukkit.craftbukkit.block.data.C
         super();
     }
 
-    public CraftWeepingVines(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftWeepingVines(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftAgeable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger AGE = getInteger(net.minecraft.world.level.block.BlockWeepingVines.class, "age");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty AGE = getInteger(net.minecraft.world.level.block.WeepingVinesBlock.class, "age");
 
     @Override
     public int getAge() {
-        return get(AGE);
+        return this.get(CraftWeepingVines.AGE);
     }
 
     @Override
     public void setAge(int age) {
-        set(AGE, age);
+        this.set(CraftWeepingVines.AGE, age);
     }
 
     @Override
     public int getMaximumAge() {
-        return getMax(AGE);
+        return getMax(CraftWeepingVines.AGE);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWitherSkull.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWitherSkull.java
index f7dc11eed6..21ea363a90 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWitherSkull.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWitherSkull.java
@@ -9,31 +9,31 @@ public final class CraftWitherSkull extends org.bukkit.craftbukkit.block.data.Cr
         super();
     }
 
-    public CraftWitherSkull(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftWitherSkull(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockWitherSkull.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.WitherSkullBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftWitherSkull.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftWitherSkull.POWERED, powered);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftRotatable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateInteger ROTATION = getInteger(net.minecraft.world.level.block.BlockWitherSkull.class, "rotation");
+    private static final net.minecraft.world.level.block.state.properties.IntegerProperty ROTATION = getInteger(net.minecraft.world.level.block.WitherSkullBlock.class, "rotation");
 
     @Override
     public org.bukkit.block.BlockFace getRotation() {
-        int data = get(ROTATION);
+        int data = this.get(CraftWitherSkull.ROTATION);
         switch (data) {
             case 0x0:
                 return org.bukkit.block.BlockFace.SOUTH;
@@ -127,6 +127,6 @@ public final class CraftWitherSkull extends org.bukkit.craftbukkit.block.data.Cr
             default:
                 throw new IllegalArgumentException("Illegal rotation " + rotation);
         }
-        set(ROTATION, val);
+        this.set(CraftWitherSkull.ROTATION, val);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWitherSkullWall.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWitherSkullWall.java
index 7298580603..b43db5180f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWitherSkullWall.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/impl/CraftWitherSkullWall.java
@@ -9,40 +9,40 @@ public final class CraftWitherSkullWall extends org.bukkit.craftbukkit.block.dat
         super();
     }
 
-    public CraftWitherSkullWall(net.minecraft.world.level.block.state.IBlockData state) {
+    public CraftWitherSkullWall(net.minecraft.world.level.block.state.BlockState state) {
         super(state);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftDirectional
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateEnum<?> FACING = getEnum(net.minecraft.world.level.block.BlockWitherSkullWall.class, "facing");
+    private static final net.minecraft.world.level.block.state.properties.EnumProperty<?> FACING = getEnum(net.minecraft.world.level.block.WitherWallSkullBlock.class, "facing");
 
     @Override
     public org.bukkit.block.BlockFace getFacing() {
-        return get(FACING, org.bukkit.block.BlockFace.class);
+        return this.get(CraftWitherSkullWall.FACING, org.bukkit.block.BlockFace.class);
     }
 
     @Override
     public void setFacing(org.bukkit.block.BlockFace facing) {
-        set(FACING, facing);
+        this.set(CraftWitherSkullWall.FACING, facing);
     }
 
     @Override
     public java.util.Set<org.bukkit.block.BlockFace> getFaces() {
-        return getValues(FACING, org.bukkit.block.BlockFace.class);
+        return this.getValues(CraftWitherSkullWall.FACING, org.bukkit.block.BlockFace.class);
     }
 
     // org.bukkit.craftbukkit.block.data.CraftPowerable
 
-    private static final net.minecraft.world.level.block.state.properties.BlockStateBoolean POWERED = getBoolean(net.minecraft.world.level.block.BlockWitherSkullWall.class, "powered");
+    private static final net.minecraft.world.level.block.state.properties.BooleanProperty POWERED = getBoolean(net.minecraft.world.level.block.WitherWallSkullBlock.class, "powered");
 
     @Override
     public boolean isPowered() {
-        return get(POWERED);
+        return this.get(CraftWitherSkullWall.POWERED);
     }
 
     @Override
     public void setPowered(boolean powered) {
-        set(POWERED, powered);
+        this.set(CraftWitherSkullWall.POWERED, powered);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/block/sign/CraftSignSide.java b/paper-server/src/main/java/org/bukkit/craftbukkit/block/sign/CraftSignSide.java
index 4a6d7a14d6..d4724c812f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/block/sign/CraftSignSide.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/block/sign/CraftSignSide.java
@@ -1,7 +1,6 @@
 package org.bukkit.craftbukkit.block.sign;
 
-import net.minecraft.network.chat.IChatBaseComponent;
-import net.minecraft.world.item.EnumColor;
+import net.minecraft.network.chat.Component;
 import net.minecraft.world.level.block.entity.SignText;
 import org.bukkit.DyeColor;
 import org.bukkit.block.sign.SignSide;
@@ -24,60 +23,60 @@ public class CraftSignSide implements SignSide {
     @NotNull
     @Override
     public String[] getLines() {
-        if (lines == null) {
+        if (this.lines == null) {
             // Lazy initialization:
-            IChatBaseComponent[] messages = signText.getMessages(false);
-            lines = new String[messages.length];
-            System.arraycopy(CraftSign.revertComponents(messages), 0, lines, 0, lines.length);
-            originalLines = new String[lines.length];
-            System.arraycopy(lines, 0, originalLines, 0, originalLines.length);
+            Component[] messages = this.signText.getMessages(false);
+            this.lines = new String[messages.length];
+            System.arraycopy(CraftSign.revertComponents(messages), 0, this.lines, 0, this.lines.length);
+            this.originalLines = new String[this.lines.length];
+            System.arraycopy(this.lines, 0, this.originalLines, 0, this.originalLines.length);
         }
-        return lines;
+        return this.lines;
     }
 
     @NotNull
     @Override
     public String getLine(int index) throws IndexOutOfBoundsException {
-        return getLines()[index];
+        return this.getLines()[index];
     }
 
     @Override
     public void setLine(int index, @NotNull String line) throws IndexOutOfBoundsException {
-        getLines()[index] = line;
+        this.getLines()[index] = line;
     }
 
     @Override
     public boolean isGlowingText() {
-        return signText.hasGlowingText();
+        return this.signText.hasGlowingText();
     }
 
     @Override
     public void setGlowingText(boolean glowing) {
-        signText = signText.setHasGlowingText(glowing);
+        this.signText = this.signText.setHasGlowingText(glowing);
     }
 
     @Nullable
     @Override
     public DyeColor getColor() {
-        return DyeColor.getByWoolData((byte) signText.getColor().getId());
+        return DyeColor.getByWoolData((byte) this.signText.getColor().getId());
     }
 
     @Override
     public void setColor(@NotNull DyeColor color) {
-        signText = signText.setColor(EnumColor.byId(color.getWoolData()));
+        this.signText = this.signText.setColor(net.minecraft.world.item.DyeColor.byId(color.getWoolData()));
     }
 
     public SignText applyLegacyStringToSignSide() {
-        if (lines != null) {
-            for (int i = 0; i < lines.length; i++) {
-                String line = (lines[i] == null) ? "" : lines[i];
-                if (line.equals(originalLines[i])) {
+        if (this.lines != null) {
+            for (int i = 0; i < this.lines.length; i++) {
+                String line = (this.lines[i] == null) ? "" : this.lines[i];
+                if (line.equals(this.originalLines[i])) {
                     continue; // The line contents are still the same, skip.
                 }
-                signText = signText.setMessage(i, CraftChatMessage.fromString(line)[0]);
+                this.signText = this.signText.setMessage(i, CraftChatMessage.fromString(line)[0]);
             }
         }
 
-        return signText;
+        return this.signText;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/bootstrap/Main.java b/paper-server/src/main/java/org/bukkit/craftbukkit/bootstrap/Main.java
index 02c6eb1988..8a4f95049c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/bootstrap/Main.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/bootstrap/Main.java
@@ -29,7 +29,7 @@ public class Main {
 
     private void run(String[] argv) {
         try {
-            String defaultMainClassName = readResource("main-class", BufferedReader::readLine);
+            String defaultMainClassName = this.readResource("main-class", BufferedReader::readLine);
             String mainClassName = System.getProperty("bundlerMainClass", defaultMainClassName);
 
             String repoDir = System.getProperty("bundlerRepoDir", "bundler");
@@ -42,8 +42,8 @@ public class Main {
 
             boolean readOnly = Boolean.getBoolean("bundlerReadOnly");
             List<URL> extractedUrls = new ArrayList<>();
-            readAndExtractDir("versions", outputDir, extractedUrls, readOnly);
-            readAndExtractDir("libraries", outputDir, extractedUrls, readOnly);
+            this.readAndExtractDir("versions", outputDir, extractedUrls, readOnly);
+            this.readAndExtractDir("libraries", outputDir, extractedUrls, readOnly);
 
             if (mainClassName == null || mainClassName.isEmpty()) {
                 System.out.println("Empty main class specified, exiting");
@@ -73,7 +73,7 @@ public class Main {
 
     private <T> T readResource(String resource, ResourceParser<T> parser) throws Exception {
         String fullPath = "/META-INF/" + resource;
-        try (InputStream is = getClass().getResourceAsStream(fullPath)) {
+        try (InputStream is = this.getClass().getResourceAsStream(fullPath)) {
             if (is == null) {
                 throw new IllegalStateException("Resource " + fullPath + " not found");
             }
@@ -82,7 +82,7 @@ public class Main {
     }
 
     private void readAndExtractDir(String subdir, Path outputDir, List<URL> extractedUrls, boolean readOnly) throws Exception {
-        List<FileEntry> entries = readResource(subdir + ".list", reader -> reader.lines().map(FileEntry::parseLine).toList());
+        List<FileEntry> entries = this.readResource(subdir + ".list", reader -> reader.lines().map(FileEntry::parseLine).toList());
         Path subdirPath = outputDir.resolve(subdir);
         for (FileEntry entry : entries) {
             if (entry.path.startsWith("minecraft-server")) {
@@ -90,23 +90,23 @@ public class Main {
             }
             Path outputFile = subdirPath.resolve(entry.path);
             if (!readOnly) {
-                checkAndExtractJar(subdir, entry, outputFile);
+                this.checkAndExtractJar(subdir, entry, outputFile);
             }
             extractedUrls.add(outputFile.toUri().toURL());
         }
     }
 
     private void checkAndExtractJar(String subdir, FileEntry entry, Path outputFile) throws Exception {
-        if (!Files.exists(outputFile) || !checkIntegrity(outputFile, entry.hash())) {
+        if (!Files.exists(outputFile) || !Main.checkIntegrity(outputFile, entry.hash())) {
             System.out.printf("Unpacking %s (%s:%s) to %s%n", entry.path, subdir, entry.id, outputFile);
-            extractJar(subdir, entry.path, outputFile);
+            this.extractJar(subdir, entry.path, outputFile);
         }
     }
 
     private void extractJar(String subdir, String jarPath, Path outputFile) throws IOException {
         Files.createDirectories(outputFile.getParent());
 
-        try (InputStream input = getClass().getResourceAsStream("/META-INF/" + subdir + "/" + jarPath)) {
+        try (InputStream input = this.getClass().getResourceAsStream("/META-INF/" + subdir + "/" + jarPath)) {
             if (input == null) {
                 throw new IllegalStateException("Declared library " + jarPath + " not found");
             }
@@ -121,7 +121,7 @@ public class Main {
         try (InputStream output = Files.newInputStream(file)) {
             output.transferTo(new DigestOutputStream(OutputStream.nullOutputStream(), digest));
 
-            String actualHash = byteToHex(digest.digest());
+            String actualHash = Main.byteToHex(digest.digest());
             if (actualHash.equalsIgnoreCase(expectedHash)) {
                 return true;
             }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java b/paper-server/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java
index 3987087351..a2e195f6f1 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/boss/CraftBossBar.java
@@ -7,10 +7,10 @@ import java.util.List;
 import java.util.Map;
 import java.util.function.Consumer;
 import java.util.function.Supplier;
-import net.minecraft.network.protocol.game.PacketPlayOutBoss;
-import net.minecraft.server.level.BossBattleServer;
-import net.minecraft.server.level.EntityPlayer;
-import net.minecraft.world.BossBattle;
+import net.minecraft.network.protocol.game.ClientboundBossEventPacket;
+import net.minecraft.server.level.ServerBossEvent;
+import net.minecraft.server.level.ServerPlayer;
+import net.minecraft.world.BossEvent;
 import org.bukkit.boss.BarColor;
 import org.bukkit.boss.BarFlag;
 import org.bukkit.boss.BarStyle;
@@ -21,14 +21,14 @@ import org.bukkit.entity.Player;
 
 public class CraftBossBar implements BossBar {
 
-    private final BossBattleServer handle;
+    private final ServerBossEvent handle;
     private Map<BarFlag, FlagContainer> flags;
 
     public CraftBossBar(String title, BarColor color, BarStyle style, BarFlag... flags) {
-        handle = new BossBattleServer(
+        this.handle = new ServerBossEvent(
                 CraftChatMessage.fromString(title, true)[0],
-                convertColor(color),
-                convertStyle(style)
+                this.convertColor(color),
+                this.convertStyle(style)
         );
 
         this.initialize();
@@ -41,7 +41,7 @@ public class CraftBossBar implements BossBar {
         this.setStyle(style);
     }
 
-    public CraftBossBar(BossBattleServer bossBattleServer) {
+    public CraftBossBar(ServerBossEvent bossBattleServer) {
         this.handle = bossBattleServer;
         this.initialize();
     }
@@ -53,33 +53,33 @@ public class CraftBossBar implements BossBar {
         this.flags.put(BarFlag.CREATE_FOG, new FlagContainer(handle::shouldCreateWorldFog, handle::setCreateWorldFog));
     }
 
-    private BarColor convertColor(BossBattle.BarColor color) {
+    private BarColor convertColor(BossEvent.BossBarColor color) {
         BarColor bukkitColor = BarColor.valueOf(color.name());
         return (bukkitColor == null) ? BarColor.WHITE : bukkitColor;
     }
 
-    private BossBattle.BarColor convertColor(BarColor color) {
-        BossBattle.BarColor nmsColor = BossBattle.BarColor.valueOf(color.name());
-        return (nmsColor == null) ? BossBattle.BarColor.WHITE : nmsColor;
+    private BossEvent.BossBarColor convertColor(BarColor color) {
+        BossEvent.BossBarColor nmsColor = BossEvent.BossBarColor.valueOf(color.name());
+        return (nmsColor == null) ? BossEvent.BossBarColor.WHITE : nmsColor;
     }
 
-    private BossBattle.BarStyle convertStyle(BarStyle style) {
+    private BossEvent.BossBarOverlay convertStyle(BarStyle style) {
         switch (style) {
             default:
             case SOLID:
-                return BossBattle.BarStyle.PROGRESS;
+                return BossEvent.BossBarOverlay.PROGRESS;
             case SEGMENTED_6:
-                return BossBattle.BarStyle.NOTCHED_6;
+                return BossEvent.BossBarOverlay.NOTCHED_6;
             case SEGMENTED_10:
-                return BossBattle.BarStyle.NOTCHED_10;
+                return BossEvent.BossBarOverlay.NOTCHED_10;
             case SEGMENTED_12:
-                return BossBattle.BarStyle.NOTCHED_12;
+                return BossEvent.BossBarOverlay.NOTCHED_12;
             case SEGMENTED_20:
-                return BossBattle.BarStyle.NOTCHED_20;
+                return BossEvent.BossBarOverlay.NOTCHED_20;
         }
     }
 
-    private BarStyle convertStyle(BossBattle.BarStyle style) {
+    private BarStyle convertStyle(BossEvent.BossBarOverlay style) {
         switch (style) {
             default:
             case PROGRESS:
@@ -97,40 +97,40 @@ public class CraftBossBar implements BossBar {
 
     @Override
     public String getTitle() {
-        return CraftChatMessage.fromComponent(handle.name);
+        return CraftChatMessage.fromComponent(this.handle.name);
     }
 
     @Override
     public void setTitle(String title) {
-        handle.name = CraftChatMessage.fromString(title, true)[0];
-        handle.broadcast(PacketPlayOutBoss::createUpdateNamePacket);
+        this.handle.name = CraftChatMessage.fromString(title, true)[0];
+        this.handle.broadcast(ClientboundBossEventPacket::createUpdateNamePacket);
     }
 
     @Override
     public BarColor getColor() {
-        return convertColor(handle.color);
+        return this.convertColor(this.handle.color);
     }
 
     @Override
     public void setColor(BarColor color) {
-        handle.color = convertColor(color);
-        handle.broadcast(PacketPlayOutBoss::createUpdateStylePacket);
+        this.handle.color = this.convertColor(color);
+        this.handle.broadcast(ClientboundBossEventPacket::createUpdateStylePacket);
     }
 
     @Override
     public BarStyle getStyle() {
-        return convertStyle(handle.overlay);
+        return this.convertStyle(this.handle.overlay);
     }
 
     @Override
     public void setStyle(BarStyle style) {
-        handle.overlay = convertStyle(style);
-        handle.broadcast(PacketPlayOutBoss::createUpdateStylePacket);
+        this.handle.overlay = this.convertStyle(style);
+        this.handle.broadcast(ClientboundBossEventPacket::createUpdateStylePacket);
     }
 
     @Override
     public void addFlag(BarFlag flag) {
-        FlagContainer flagContainer = flags.get(flag);
+        FlagContainer flagContainer = this.flags.get(flag);
         if (flagContainer != null) {
             flagContainer.set.accept(true);
         }
@@ -138,7 +138,7 @@ public class CraftBossBar implements BossBar {
 
     @Override
     public void removeFlag(BarFlag flag) {
-        FlagContainer flagContainer = flags.get(flag);
+        FlagContainer flagContainer = this.flags.get(flag);
         if (flagContainer != null) {
             flagContainer.set.accept(false);
         }
@@ -146,7 +146,7 @@ public class CraftBossBar implements BossBar {
 
     @Override
     public boolean hasFlag(BarFlag flag) {
-        FlagContainer flagContainer = flags.get(flag);
+        FlagContainer flagContainer = this.flags.get(flag);
         if (flagContainer != null) {
             return flagContainer.get.get();
         }
@@ -156,12 +156,12 @@ public class CraftBossBar implements BossBar {
     @Override
     public void setProgress(double progress) {
         Preconditions.checkArgument(progress >= 0.0 && progress <= 1.0, "Progress must be between 0.0 and 1.0 (%s)", progress);
-        handle.setProgress((float) progress);
+        this.handle.setProgress((float) progress);
     }
 
     @Override
     public double getProgress() {
-        return handle.getProgress();
+        return this.handle.getProgress();
     }
 
     @Override
@@ -169,20 +169,20 @@ public class CraftBossBar implements BossBar {
         Preconditions.checkArgument(player != null, "player == null");
         Preconditions.checkArgument(((CraftPlayer) player).getHandle().connection != null, "player is not fully connected (wait for PlayerJoinEvent)");
 
-        handle.addPlayer(((CraftPlayer) player).getHandle());
+        this.handle.addPlayer(((CraftPlayer) player).getHandle());
     }
 
     @Override
     public void removePlayer(Player player) {
         Preconditions.checkArgument(player != null, "player == null");
 
-        handle.removePlayer(((CraftPlayer) player).getHandle());
+        this.handle.removePlayer(((CraftPlayer) player).getHandle());
     }
 
     @Override
     public List<Player> getPlayers() {
         ImmutableList.Builder<Player> players = ImmutableList.builder();
-        for (EntityPlayer p : handle.getPlayers()) {
+        for (ServerPlayer p : this.handle.getPlayers()) {
             players.add(p.getBukkitEntity());
         }
         return players.build();
@@ -190,28 +190,28 @@ public class CraftBossBar implements BossBar {
 
     @Override
     public void setVisible(boolean visible) {
-        handle.setVisible(visible);
+        this.handle.setVisible(visible);
     }
 
     @Override
     public boolean isVisible() {
-        return handle.visible;
+        return this.handle.visible;
     }
 
     @Override
     public void show() {
-        handle.setVisible(true);
+        this.handle.setVisible(true);
     }
 
     @Override
     public void hide() {
-        handle.setVisible(false);
+        this.handle.setVisible(false);
     }
 
     @Override
     public void removeAll() {
-        for (Player player : getPlayers()) {
-            removePlayer(player);
+        for (Player player : this.getPlayers()) {
+            this.removePlayer(player);
         }
     }
 
@@ -226,7 +226,7 @@ public class CraftBossBar implements BossBar {
         }
     }
 
-    public BossBattleServer getHandle() {
-        return handle;
+    public ServerBossEvent getHandle() {
+        return this.handle;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/boss/CraftDragonBattle.java b/paper-server/src/main/java/org/bukkit/craftbukkit/boss/CraftDragonBattle.java
index 0506fc3f27..dc7fdc120f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/boss/CraftDragonBattle.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/boss/CraftDragonBattle.java
@@ -6,9 +6,9 @@ import java.util.Collection;
 import java.util.Collections;
 import java.util.stream.Collectors;
 import net.minecraft.world.entity.Entity;
-import net.minecraft.world.level.block.state.pattern.ShapeDetector;
-import net.minecraft.world.level.dimension.end.EnderDragonBattle;
-import net.minecraft.world.level.dimension.end.EnumDragonRespawn;
+import net.minecraft.world.level.block.state.pattern.BlockPattern;
+import net.minecraft.world.level.dimension.end.DragonRespawnAnimation;
+import net.minecraft.world.level.dimension.end.EndDragonFight;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.boss.BossBar;
@@ -21,26 +21,26 @@ import org.bukkit.entity.EnderDragon;
 
 public class CraftDragonBattle implements DragonBattle {
 
-    private final EnderDragonBattle handle;
+    private final EndDragonFight handle;
 
-    public CraftDragonBattle(EnderDragonBattle handle) {
+    public CraftDragonBattle(EndDragonFight handle) {
         this.handle = handle;
     }
 
     @Override
     public EnderDragon getEnderDragon() {
-        Entity entity = handle.level.getEntity(handle.dragonUUID);
+        Entity entity = this.handle.level.getEntity(this.handle.dragonUUID);
         return (entity != null) ? (EnderDragon) entity.getBukkitEntity() : null;
     }
 
     @Override
     public BossBar getBossBar() {
-        return new CraftBossBar(handle.dragonEvent);
+        return new CraftBossBar(this.handle.dragonEvent);
     }
 
     @Override
     public Location getEndPortalLocation() {
-        if (handle.portalLocation == null) {
+        if (this.handle.portalLocation == null) {
             return null;
         }
 
@@ -49,7 +49,7 @@ public class CraftDragonBattle implements DragonBattle {
 
     @Override
     public boolean generateEndPortal(boolean withPortals) {
-        if (handle.portalLocation != null || handle.findExitPortal() != null) {
+        if (this.handle.portalLocation != null || this.handle.findExitPortal() != null) {
             return false;
         }
 
@@ -59,12 +59,12 @@ public class CraftDragonBattle implements DragonBattle {
 
     @Override
     public boolean hasBeenPreviouslyKilled() {
-        return handle.hasPreviouslyKilledDragon();
+        return this.handle.hasPreviouslyKilledDragon();
     }
 
     @Override
     public void setPreviouslyKilled(boolean previouslyKilled) {
-        handle.previouslyKilled = previouslyKilled;
+        this.handle.previouslyKilled = previouslyKilled;
     }
 
     @Override
@@ -74,10 +74,10 @@ public class CraftDragonBattle implements DragonBattle {
 
     @Override
     public boolean initiateRespawn(Collection<EnderCrystal> list) {
-        if (hasBeenPreviouslyKilled() && getRespawnPhase() == RespawnPhase.NONE) {
+        if (this.hasBeenPreviouslyKilled() && this.getRespawnPhase() == RespawnPhase.NONE) {
             // Copy from EnderDragonBattle#tryRespawn for generate exit portal if not exists
             if (this.handle.portalLocation == null) {
-                ShapeDetector.ShapeDetectorCollection shapedetector_shapedetectorcollection = this.handle.findExitPortal();
+                BlockPattern.BlockPatternMatch shapedetector_shapedetectorcollection = this.handle.findExitPortal();
                 if (shapedetector_shapedetectorcollection == null) {
                     this.handle.spawnExitPortal(true);
                 }
@@ -90,7 +90,7 @@ public class CraftDragonBattle implements DragonBattle {
                 }
 
                 World world = enderCrystal.getWorld();
-                return !((CraftWorld) world).getHandle().equals(handle.level);
+                return !((CraftWorld) world).getHandle().equals(this.handle.level);
             });
 
             return this.handle.respawnDragon(list.stream().map(enderCrystal -> ((CraftEnderCrystal) enderCrystal).getHandle()).collect(Collectors.toList()));
@@ -100,18 +100,18 @@ public class CraftDragonBattle implements DragonBattle {
 
     @Override
     public RespawnPhase getRespawnPhase() {
-        return toBukkitRespawnPhase(handle.respawnStage);
+        return this.toBukkitRespawnPhase(this.handle.respawnStage);
     }
 
     @Override
     public boolean setRespawnPhase(RespawnPhase phase) {
         Preconditions.checkArgument(phase != null && phase != RespawnPhase.NONE, "Invalid respawn phase provided: %s", phase);
 
-        if (handle.respawnStage == null) {
+        if (this.handle.respawnStage == null) {
             return false;
         }
 
-        this.handle.setRespawnStage(toNMSRespawnPhase(phase));
+        this.handle.setRespawnStage(this.toNMSRespawnPhase(phase));
         return true;
     }
 
@@ -122,7 +122,7 @@ public class CraftDragonBattle implements DragonBattle {
 
     @Override
     public int hashCode() {
-        return handle.hashCode();
+        return this.handle.hashCode();
     }
 
     @Override
@@ -130,11 +130,11 @@ public class CraftDragonBattle implements DragonBattle {
         return obj instanceof CraftDragonBattle && ((CraftDragonBattle) obj).handle == this.handle;
     }
 
-    private RespawnPhase toBukkitRespawnPhase(EnumDragonRespawn phase) {
+    private RespawnPhase toBukkitRespawnPhase(DragonRespawnAnimation phase) {
         return (phase != null) ? RespawnPhase.values()[phase.ordinal()] : RespawnPhase.NONE;
     }
 
-    private EnumDragonRespawn toNMSRespawnPhase(RespawnPhase phase) {
-        return (phase != RespawnPhase.NONE) ? EnumDragonRespawn.values()[phase.ordinal()] : null;
+    private DragonRespawnAnimation toNMSRespawnPhase(RespawnPhase phase) {
+        return (phase != RespawnPhase.NONE) ? DragonRespawnAnimation.values()[phase.ordinal()] : null;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/boss/CraftKeyedBossbar.java b/paper-server/src/main/java/org/bukkit/craftbukkit/boss/CraftKeyedBossbar.java
index cf4a9b150b..e380793e34 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/boss/CraftKeyedBossbar.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/boss/CraftKeyedBossbar.java
@@ -1,23 +1,23 @@
 package org.bukkit.craftbukkit.boss;
 
-import net.minecraft.server.bossevents.BossBattleCustom;
+import net.minecraft.server.bossevents.CustomBossEvent;
 import org.bukkit.NamespacedKey;
 import org.bukkit.boss.KeyedBossBar;
 import org.bukkit.craftbukkit.util.CraftNamespacedKey;
 
 public class CraftKeyedBossbar extends CraftBossBar implements KeyedBossBar {
 
-    public CraftKeyedBossbar(BossBattleCustom bossBattleCustom) {
+    public CraftKeyedBossbar(CustomBossEvent bossBattleCustom) {
         super(bossBattleCustom);
     }
 
     @Override
     public NamespacedKey getKey() {
-        return CraftNamespacedKey.fromMinecraft(getHandle().getTextId());
+        return CraftNamespacedKey.fromMinecraft(this.getHandle().getTextId());
     }
 
     @Override
-    public BossBattleCustom getHandle() {
-        return (BossBattleCustom) super.getHandle();
+    public CustomBossEvent getHandle() {
+        return (CustomBossEvent) super.getHandle();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/command/BukkitCommandWrapper.java b/paper-server/src/main/java/org/bukkit/craftbukkit/command/BukkitCommandWrapper.java
index 0c50cdddcc..83d81b9371 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/command/BukkitCommandWrapper.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/command/BukkitCommandWrapper.java
@@ -14,13 +14,13 @@ import java.util.List;
 import java.util.concurrent.CompletableFuture;
 import java.util.function.Predicate;
 import java.util.logging.Level;
-import net.minecraft.commands.CommandListenerWrapper;
+import net.minecraft.commands.CommandSourceStack;
 import org.bukkit.command.Command;
 import org.bukkit.command.CommandException;
 import org.bukkit.command.CommandSender;
 import org.bukkit.craftbukkit.CraftServer;
 
-public class BukkitCommandWrapper implements com.mojang.brigadier.Command<CommandListenerWrapper>, Predicate<CommandListenerWrapper>, SuggestionProvider<CommandListenerWrapper> {
+public class BukkitCommandWrapper implements com.mojang.brigadier.Command<CommandSourceStack>, Predicate<CommandSourceStack>, SuggestionProvider<CommandSourceStack> {
 
     private final CraftServer server;
     private final Command command;
@@ -30,34 +30,34 @@ public class BukkitCommandWrapper implements com.mojang.brigadier.Command<Comman
         this.command = command;
     }
 
-    public LiteralCommandNode<CommandListenerWrapper> register(CommandDispatcher<CommandListenerWrapper> dispatcher, String label) {
+    public LiteralCommandNode<CommandSourceStack> register(CommandDispatcher<CommandSourceStack> dispatcher, String label) {
         return dispatcher.register(
-                LiteralArgumentBuilder.<CommandListenerWrapper>literal(label).requires(this).executes(this)
-                .then(RequiredArgumentBuilder.<CommandListenerWrapper, String>argument("args", StringArgumentType.greedyString()).suggests(this).executes(this))
+                LiteralArgumentBuilder.<CommandSourceStack>literal(label).requires(this).executes(this)
+                .then(RequiredArgumentBuilder.<CommandSourceStack, String>argument("args", StringArgumentType.greedyString()).suggests(this).executes(this))
         );
     }
 
     @Override
-    public boolean test(CommandListenerWrapper wrapper) {
-        return command.testPermissionSilent(wrapper.getBukkitSender());
+    public boolean test(CommandSourceStack wrapper) {
+        return this.command.testPermissionSilent(wrapper.getBukkitSender());
     }
 
     @Override
-    public int run(CommandContext<CommandListenerWrapper> context) throws CommandSyntaxException {
+    public int run(CommandContext<CommandSourceStack> context) throws CommandSyntaxException {
         CommandSender sender = context.getSource().getBukkitSender();
 
         try {
-            return server.dispatchCommand(sender, context.getInput()) ? 1 : 0;
+            return this.server.dispatchCommand(sender, context.getInput()) ? 1 : 0;
         } catch (CommandException ex) {
             sender.sendMessage(org.bukkit.ChatColor.RED + "An internal error occurred while attempting to perform this command");
-            server.getLogger().log(Level.SEVERE, null, ex);
+            this.server.getLogger().log(Level.SEVERE, null, ex);
             return 0;
         }
     }
 
     @Override
-    public CompletableFuture<Suggestions> getSuggestions(CommandContext<CommandListenerWrapper> context, SuggestionsBuilder builder) throws CommandSyntaxException {
-        List<String> results = server.tabComplete(context.getSource().getBukkitSender(), builder.getInput(), context.getSource().getLevel(), context.getSource().getPosition(), true);
+    public CompletableFuture<Suggestions> getSuggestions(CommandContext<CommandSourceStack> context, SuggestionsBuilder builder) throws CommandSyntaxException {
+        List<String> results = this.server.tabComplete(context.getSource().getBukkitSender(), builder.getInput(), context.getSource().getLevel(), context.getSource().getPosition(), true);
 
         // Defaults to sub nodes, but we have just one giant args node, so offset accordingly
         builder = builder.createOffset(builder.getInput().lastIndexOf(' ') + 1);
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java b/paper-server/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java
index 4580642e0e..bcf1c36d07 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/command/ColouredConsoleSender.java
@@ -19,47 +19,47 @@ public class ColouredConsoleSender extends CraftConsoleCommandSender {
     private final ChatColor[] colors = ChatColor.values();
     private final boolean jansiPassthrough;
     private static final char ANSI_ESC_CHAR = '\u001B';
-    private static final String RGB_STRING = String.valueOf(ANSI_ESC_CHAR) + "[38;2;%d;%d;%dm";
+    private static final String RGB_STRING = String.valueOf(ColouredConsoleSender.ANSI_ESC_CHAR) + "[38;2;%d;%d;%dm";
     private static final Pattern RBG_TRANSLATE = Pattern.compile(String.valueOf(ChatColor.COLOR_CHAR) + "x(" + String.valueOf(ChatColor.COLOR_CHAR) + "[A-F0-9]){6}", Pattern.CASE_INSENSITIVE);
 
     protected ColouredConsoleSender() {
         super();
-        this.terminal = ((CraftServer) getServer()).getReader().getTerminal();
+        this.terminal = ((CraftServer) this.getServer()).getReader().getTerminal();
         this.jansiPassthrough = Boolean.getBoolean("jansi.passthrough");
 
-        replacements.put(ChatColor.BLACK, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.BLACK).boldOff().toString());
-        replacements.put(ChatColor.DARK_BLUE, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.BLUE).boldOff().toString());
-        replacements.put(ChatColor.DARK_GREEN, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.GREEN).boldOff().toString());
-        replacements.put(ChatColor.DARK_AQUA, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.CYAN).boldOff().toString());
-        replacements.put(ChatColor.DARK_RED, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.RED).boldOff().toString());
-        replacements.put(ChatColor.DARK_PURPLE, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.MAGENTA).boldOff().toString());
-        replacements.put(ChatColor.GOLD, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.YELLOW).boldOff().toString());
-        replacements.put(ChatColor.GRAY, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.WHITE).boldOff().toString());
-        replacements.put(ChatColor.DARK_GRAY, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.BLACK).bold().toString());
-        replacements.put(ChatColor.BLUE, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.BLUE).bold().toString());
-        replacements.put(ChatColor.GREEN, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.GREEN).bold().toString());
-        replacements.put(ChatColor.AQUA, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.CYAN).bold().toString());
-        replacements.put(ChatColor.RED, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.RED).bold().toString());
-        replacements.put(ChatColor.LIGHT_PURPLE, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.MAGENTA).bold().toString());
-        replacements.put(ChatColor.YELLOW, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.YELLOW).bold().toString());
-        replacements.put(ChatColor.WHITE, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.WHITE).bold().toString());
-        replacements.put(ChatColor.MAGIC, Ansi.ansi().a(Attribute.BLINK_SLOW).toString());
-        replacements.put(ChatColor.BOLD, Ansi.ansi().a(Attribute.UNDERLINE_DOUBLE).toString());
-        replacements.put(ChatColor.STRIKETHROUGH, Ansi.ansi().a(Attribute.STRIKETHROUGH_ON).toString());
-        replacements.put(ChatColor.UNDERLINE, Ansi.ansi().a(Attribute.UNDERLINE).toString());
-        replacements.put(ChatColor.ITALIC, Ansi.ansi().a(Attribute.ITALIC).toString());
-        replacements.put(ChatColor.RESET, Ansi.ansi().a(Attribute.RESET).toString());
+        this.replacements.put(ChatColor.BLACK, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.BLACK).boldOff().toString());
+        this.replacements.put(ChatColor.DARK_BLUE, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.BLUE).boldOff().toString());
+        this.replacements.put(ChatColor.DARK_GREEN, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.GREEN).boldOff().toString());
+        this.replacements.put(ChatColor.DARK_AQUA, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.CYAN).boldOff().toString());
+        this.replacements.put(ChatColor.DARK_RED, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.RED).boldOff().toString());
+        this.replacements.put(ChatColor.DARK_PURPLE, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.MAGENTA).boldOff().toString());
+        this.replacements.put(ChatColor.GOLD, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.YELLOW).boldOff().toString());
+        this.replacements.put(ChatColor.GRAY, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.WHITE).boldOff().toString());
+        this.replacements.put(ChatColor.DARK_GRAY, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.BLACK).bold().toString());
+        this.replacements.put(ChatColor.BLUE, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.BLUE).bold().toString());
+        this.replacements.put(ChatColor.GREEN, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.GREEN).bold().toString());
+        this.replacements.put(ChatColor.AQUA, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.CYAN).bold().toString());
+        this.replacements.put(ChatColor.RED, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.RED).bold().toString());
+        this.replacements.put(ChatColor.LIGHT_PURPLE, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.MAGENTA).bold().toString());
+        this.replacements.put(ChatColor.YELLOW, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.YELLOW).bold().toString());
+        this.replacements.put(ChatColor.WHITE, Ansi.ansi().a(Attribute.RESET).fg(Ansi.Color.WHITE).bold().toString());
+        this.replacements.put(ChatColor.MAGIC, Ansi.ansi().a(Attribute.BLINK_SLOW).toString());
+        this.replacements.put(ChatColor.BOLD, Ansi.ansi().a(Attribute.UNDERLINE_DOUBLE).toString());
+        this.replacements.put(ChatColor.STRIKETHROUGH, Ansi.ansi().a(Attribute.STRIKETHROUGH_ON).toString());
+        this.replacements.put(ChatColor.UNDERLINE, Ansi.ansi().a(Attribute.UNDERLINE).toString());
+        this.replacements.put(ChatColor.ITALIC, Ansi.ansi().a(Attribute.ITALIC).toString());
+        this.replacements.put(ChatColor.RESET, Ansi.ansi().a(Attribute.RESET).toString());
     }
 
     @Override
     public void sendMessage(String message) {
         // support jansi passthrough VM option when jansi doesn't detect an ANSI supported terminal
-        if (jansiPassthrough || terminal.isAnsiSupported()) {
-            if (!conversationTracker.isConversingModaly()) {
-                String result = convertRGBColors(message);
-                for (ChatColor color : colors) {
-                    if (replacements.containsKey(color)) {
-                        result = result.replaceAll("(?i)" + color.toString(), replacements.get(color));
+        if (this.jansiPassthrough || this.terminal.isAnsiSupported()) {
+            if (!this.conversationTracker.isConversingModaly()) {
+                String result = ColouredConsoleSender.convertRGBColors(message);
+                for (ChatColor color : this.colors) {
+                    if (this.replacements.containsKey(color)) {
+                        result = result.replaceAll("(?i)" + color.toString(), this.replacements.get(color));
                     } else {
                         result = result.replaceAll("(?i)" + color.toString(), "");
                     }
@@ -72,7 +72,7 @@ public class ColouredConsoleSender extends CraftConsoleCommandSender {
     }
 
     private static String convertRGBColors(String input) {
-        Matcher matcher = RBG_TRANSLATE.matcher(input);
+        Matcher matcher = ColouredConsoleSender.RBG_TRANSLATE.matcher(input);
         StringBuffer buffer = new StringBuffer();
         while (matcher.find()) {
             String s = matcher.group().replace("§", "").replace('x', '#');
@@ -80,7 +80,7 @@ public class ColouredConsoleSender extends CraftConsoleCommandSender {
             int red = color.getRed();
             int blue = color.getBlue();
             int green = color.getGreen();
-            String replacement = String.format(RGB_STRING, red, green, blue);
+            String replacement = String.format(ColouredConsoleSender.RGB_STRING, red, green, blue);
             matcher.appendReplacement(buffer, replacement);
         }
         matcher.appendTail(buffer);
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java b/paper-server/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
index befcc19f9b..0b4c62387c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/command/ConsoleCommandCompleter.java
@@ -21,10 +21,10 @@ public class ConsoleCommandCompleter implements Completer {
         Waitable<List<String>> waitable = new Waitable<List<String>>() {
             @Override
             protected List<String> evaluate() {
-                List<String> offers = server.getCommandMap().tabComplete(server.getConsoleSender(), buffer);
+                List<String> offers = ConsoleCommandCompleter.this.server.getCommandMap().tabComplete(ConsoleCommandCompleter.this.server.getConsoleSender(), buffer);
 
-                TabCompleteEvent tabEvent = new TabCompleteEvent(server.getConsoleSender(), buffer, (offers == null) ? Collections.EMPTY_LIST : offers);
-                server.getPluginManager().callEvent(tabEvent);
+                TabCompleteEvent tabEvent = new TabCompleteEvent(ConsoleCommandCompleter.this.server.getConsoleSender(), buffer, (offers == null) ? Collections.EMPTY_LIST : offers);
+                ConsoleCommandCompleter.this.server.getPluginManager().callEvent(tabEvent);
 
                 return tabEvent.isCancelled() ? Collections.EMPTY_LIST : tabEvent.getCompletions();
             }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java b/paper-server/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java
index 39d7ac626a..f2e8b63d78 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/command/CraftBlockCommandSender.java
@@ -1,8 +1,8 @@
 package org.bukkit.craftbukkit.command;
 
-import net.minecraft.commands.CommandListenerWrapper;
-import net.minecraft.network.chat.IChatBaseComponent;
-import net.minecraft.world.level.block.entity.TileEntity;
+import net.minecraft.commands.CommandSourceStack;
+import net.minecraft.network.chat.Component;
+import net.minecraft.world.level.block.entity.BlockEntity;
 import org.bukkit.block.Block;
 import org.bukkit.command.BlockCommandSender;
 import org.bukkit.craftbukkit.block.CraftBlock;
@@ -28,50 +28,50 @@ public class CraftBlockCommandSender extends ServerCommandSender implements Bloc
             throw new UnsupportedOperationException("Cannot change operator status of a block");
         }
     });
-    private final CommandListenerWrapper block;
-    private final TileEntity tile;
+    private final CommandSourceStack block;
+    private final BlockEntity tile;
 
-    public CraftBlockCommandSender(CommandListenerWrapper commandBlockListenerAbstract, TileEntity tile) {
-        super(SHARED_PERM);
+    public CraftBlockCommandSender(CommandSourceStack commandBlockListenerAbstract, BlockEntity tile) {
+        super(CraftBlockCommandSender.SHARED_PERM);
         this.block = commandBlockListenerAbstract;
         this.tile = tile;
     }
 
     @Override
     public Block getBlock() {
-        return CraftBlock.at(tile.getLevel(), tile.getBlockPos());
+        return CraftBlock.at(this.tile.getLevel(), this.tile.getBlockPos());
     }
 
     @Override
     public void sendMessage(String message) {
-        for (IChatBaseComponent component : CraftChatMessage.fromString(message)) {
-            block.source.sendSystemMessage(component);
+        for (Component component : CraftChatMessage.fromString(message)) {
+            this.block.source.sendSystemMessage(component);
         }
     }
 
     @Override
     public void sendMessage(String... messages) {
         for (String message : messages) {
-            sendMessage(message);
+            this.sendMessage(message);
         }
     }
 
     @Override
     public String getName() {
-        return block.getTextName();
+        return this.block.getTextName();
     }
 
     @Override
     public boolean isOp() {
-        return SHARED_PERM.isOp();
+        return CraftBlockCommandSender.SHARED_PERM.isOp();
     }
 
     @Override
     public void setOp(boolean value) {
-        SHARED_PERM.setOp(value);
+        CraftBlockCommandSender.SHARED_PERM.setOp(value);
     }
 
-    public CommandListenerWrapper getWrapper() {
-        return block;
+    public CommandSourceStack getWrapper() {
+        return this.block;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/command/CraftCommandMap.java b/paper-server/src/main/java/org/bukkit/craftbukkit/command/CraftCommandMap.java
index 2fd69c0f91..4b1ac1fe7e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/command/CraftCommandMap.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/command/CraftCommandMap.java
@@ -12,6 +12,6 @@ public class CraftCommandMap extends SimpleCommandMap {
     }
 
     public Map<String, Command> getKnownCommands() {
-        return knownCommands;
+        return this.knownCommands;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java b/paper-server/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java
index f6f0aeec35..f3cb4102ab 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/command/CraftConsoleCommandSender.java
@@ -21,7 +21,7 @@ public class CraftConsoleCommandSender extends ServerCommandSender implements Co
 
     @Override
     public void sendMessage(String message) {
-        sendRawMessage(message);
+        this.sendRawMessage(message);
     }
 
     @Override
@@ -37,7 +37,7 @@ public class CraftConsoleCommandSender extends ServerCommandSender implements Co
     @Override
     public void sendMessage(String... messages) {
         for (String message : messages) {
-            sendMessage(message);
+            this.sendMessage(message);
         }
     }
 
@@ -58,26 +58,26 @@ public class CraftConsoleCommandSender extends ServerCommandSender implements Co
 
     @Override
     public boolean beginConversation(Conversation conversation) {
-        return conversationTracker.beginConversation(conversation);
+        return this.conversationTracker.beginConversation(conversation);
     }
 
     @Override
     public void abandonConversation(Conversation conversation) {
-        conversationTracker.abandonConversation(conversation, new ConversationAbandonedEvent(conversation, new ManuallyAbandonedConversationCanceller()));
+        this.conversationTracker.abandonConversation(conversation, new ConversationAbandonedEvent(conversation, new ManuallyAbandonedConversationCanceller()));
     }
 
     @Override
     public void abandonConversation(Conversation conversation, ConversationAbandonedEvent details) {
-        conversationTracker.abandonConversation(conversation, details);
+        this.conversationTracker.abandonConversation(conversation, details);
     }
 
     @Override
     public void acceptConversationInput(String input) {
-        conversationTracker.acceptConversationInput(input);
+        this.conversationTracker.acceptConversationInput(input);
     }
 
     @Override
     public boolean isConversing() {
-        return conversationTracker.isConversing();
+        return this.conversationTracker.isConversing();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java b/paper-server/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java
index 3d7381bb8c..e3c7fa50fa 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/command/CraftRemoteConsoleCommandSender.java
@@ -1,36 +1,36 @@
 package org.bukkit.craftbukkit.command;
 
 import java.net.SocketAddress;
-import net.minecraft.network.chat.IChatBaseComponent;
-import net.minecraft.server.rcon.RemoteControlCommandListener;
+import net.minecraft.network.chat.Component;
+import net.minecraft.server.rcon.RconConsoleSource;
 import org.bukkit.command.RemoteConsoleCommandSender;
 
 public class CraftRemoteConsoleCommandSender extends ServerCommandSender implements RemoteConsoleCommandSender {
 
-    private final RemoteControlCommandListener listener;
+    private final RconConsoleSource listener;
 
-    public CraftRemoteConsoleCommandSender(RemoteControlCommandListener listener) {
+    public CraftRemoteConsoleCommandSender(RconConsoleSource listener) {
         this.listener = listener;
     }
 
-    public RemoteControlCommandListener getListener() {
-        return listener;
+    public RconConsoleSource getListener() {
+        return this.listener;
     }
 
     @Override
     public SocketAddress getAddress() {
-       return listener.socketAddress;
+       return this.listener.socketAddress;
     }
 
     @Override
     public void sendMessage(String message) {
-        listener.sendSystemMessage(IChatBaseComponent.literal(message + "\n")); // Send a newline after each message, to preserve formatting.
+        this.listener.sendSystemMessage(Component.literal(message + "\n")); // Send a newline after each message, to preserve formatting.
     }
 
     @Override
     public void sendMessage(String... messages) {
         for (String message : messages) {
-            sendMessage(message);
+            this.sendMessage(message);
         }
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/command/ProxiedNativeCommandSender.java b/paper-server/src/main/java/org/bukkit/craftbukkit/command/ProxiedNativeCommandSender.java
index f9d3b5a499..093b5ae6ba 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/command/ProxiedNativeCommandSender.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/command/ProxiedNativeCommandSender.java
@@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.command;
 
 import java.util.Set;
 import java.util.UUID;
-import net.minecraft.commands.CommandListenerWrapper;
+import net.minecraft.commands.CommandSourceStack;
 import org.bukkit.Server;
 import org.bukkit.command.CommandSender;
 import org.bukkit.command.ProxiedCommandSender;
@@ -13,123 +13,123 @@ import org.bukkit.plugin.Plugin;
 
 public class ProxiedNativeCommandSender implements ProxiedCommandSender {
 
-    private final CommandListenerWrapper orig;
+    private final CommandSourceStack orig;
     private final CommandSender caller;
     private final CommandSender callee;
 
-    public ProxiedNativeCommandSender(CommandListenerWrapper orig, CommandSender caller, CommandSender callee) {
+    public ProxiedNativeCommandSender(CommandSourceStack orig, CommandSender caller, CommandSender callee) {
         this.orig = orig;
         this.caller = caller;
         this.callee = callee;
     }
 
-    public CommandListenerWrapper getHandle() {
-        return orig;
+    public CommandSourceStack getHandle() {
+        return this.orig;
     }
 
     @Override
     public CommandSender getCaller() {
-        return caller;
+        return this.caller;
     }
 
     @Override
     public CommandSender getCallee() {
-        return callee;
+        return this.callee;
     }
 
     @Override
     public void sendMessage(String message) {
-        getCaller().sendMessage(message);
+        this.getCaller().sendMessage(message);
     }
 
     @Override
     public void sendMessage(String... messages) {
-        getCaller().sendMessage(messages);
+        this.getCaller().sendMessage(messages);
     }
 
     @Override
     public void sendMessage(UUID sender, String message) {
-        getCaller().sendMessage(sender, message);
+        this.getCaller().sendMessage(sender, message);
     }
 
     @Override
     public void sendMessage(UUID sender, String... messages) {
-        getCaller().sendMessage(sender, messages);
+        this.getCaller().sendMessage(sender, messages);
     }
 
     @Override
     public Server getServer() {
-        return getCallee().getServer();
+        return this.getCallee().getServer();
     }
 
     @Override
     public String getName() {
-        return getCallee().getName();
+        return this.getCallee().getName();
     }
 
     @Override
     public boolean isPermissionSet(String name) {
-        return getCaller().isPermissionSet(name);
+        return this.getCaller().isPermissionSet(name);
     }
 
     @Override
     public boolean isPermissionSet(Permission perm) {
-        return getCaller().isPermissionSet(perm);
+        return this.getCaller().isPermissionSet(perm);
     }
 
     @Override
     public boolean hasPermission(String name) {
-        return getCaller().hasPermission(name);
+        return this.getCaller().hasPermission(name);
     }
 
     @Override
     public boolean hasPermission(Permission perm) {
-        return getCaller().hasPermission(perm);
+        return this.getCaller().hasPermission(perm);
     }
 
     @Override
     public PermissionAttachment addAttachment(Plugin plugin, String name, boolean value) {
-        return getCaller().addAttachment(plugin, name, value);
+        return this.getCaller().addAttachment(plugin, name, value);
     }
 
     @Override
     public PermissionAttachment addAttachment(Plugin plugin) {
-        return getCaller().addAttachment(plugin);
+        return this.getCaller().addAttachment(plugin);
     }
 
     @Override
     public PermissionAttachment addAttachment(Plugin plugin, String name, boolean value, int ticks) {
-        return getCaller().addAttachment(plugin, name, value, ticks);
+        return this.getCaller().addAttachment(plugin, name, value, ticks);
     }
 
     @Override
     public PermissionAttachment addAttachment(Plugin plugin, int ticks) {
-        return getCaller().addAttachment(plugin, ticks);
+        return this.getCaller().addAttachment(plugin, ticks);
     }
 
     @Override
     public void removeAttachment(PermissionAttachment attachment) {
-        getCaller().removeAttachment(attachment);
+        this.getCaller().removeAttachment(attachment);
     }
 
     @Override
     public void recalculatePermissions() {
-        getCaller().recalculatePermissions();
+        this.getCaller().recalculatePermissions();
     }
 
     @Override
     public Set<PermissionAttachmentInfo> getEffectivePermissions() {
-        return getCaller().getEffectivePermissions();
+        return this.getCaller().getEffectivePermissions();
     }
 
     @Override
     public boolean isOp() {
-        return getCaller().isOp();
+        return this.getCaller().isOp();
     }
 
     @Override
     public void setOp(boolean value) {
-        getCaller().setOp(value);
+        this.getCaller().setOp(value);
     }
 
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/command/ServerCommandSender.java b/paper-server/src/main/java/org/bukkit/craftbukkit/command/ServerCommandSender.java
index be10d200e5..964d998069 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/command/ServerCommandSender.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/command/ServerCommandSender.java
@@ -24,7 +24,7 @@ public abstract class ServerCommandSender implements CommandSender {
 
     @Override
     public boolean isPermissionSet(String name) {
-        return perm.isPermissionSet(name);
+        return this.perm.isPermissionSet(name);
     }
 
     @Override
@@ -34,7 +34,7 @@ public abstract class ServerCommandSender implements CommandSender {
 
     @Override
     public boolean hasPermission(String name) {
-        return perm.hasPermission(name);
+        return this.perm.hasPermission(name);
     }
 
     @Override
@@ -44,37 +44,37 @@ public abstract class ServerCommandSender implements CommandSender {
 
     @Override
     public PermissionAttachment addAttachment(Plugin plugin, String name, boolean value) {
-        return perm.addAttachment(plugin, name, value);
+        return this.perm.addAttachment(plugin, name, value);
     }
 
     @Override
     public PermissionAttachment addAttachment(Plugin plugin) {
-        return perm.addAttachment(plugin);
+        return this.perm.addAttachment(plugin);
     }
 
     @Override
     public PermissionAttachment addAttachment(Plugin plugin, String name, boolean value, int ticks) {
-        return perm.addAttachment(plugin, name, value, ticks);
+        return this.perm.addAttachment(plugin, name, value, ticks);
     }
 
     @Override
     public PermissionAttachment addAttachment(Plugin plugin, int ticks) {
-        return perm.addAttachment(plugin, ticks);
+        return this.perm.addAttachment(plugin, ticks);
     }
 
     @Override
     public void removeAttachment(PermissionAttachment attachment) {
-        perm.removeAttachment(attachment);
+        this.perm.removeAttachment(attachment);
     }
 
     @Override
     public void recalculatePermissions() {
-        perm.recalculatePermissions();
+        this.perm.recalculatePermissions();
     }
 
     @Override
     public Set<PermissionAttachmentInfo> getEffectivePermissions() {
-        return perm.getEffectivePermissions();
+        return this.perm.getEffectivePermissions();
     }
 
     public boolean isPlayer() {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java b/paper-server/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
index fb9656e077..9b453830e4 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/command/VanillaCommandWrapper.java
@@ -7,10 +7,10 @@ import com.mojang.brigadier.tree.CommandNode;
 import java.util.ArrayList;
 import java.util.Collections;
 import java.util.List;
-import net.minecraft.commands.CommandDispatcher;
-import net.minecraft.commands.CommandListenerWrapper;
-import net.minecraft.server.level.WorldServer;
-import net.minecraft.world.entity.vehicle.EntityMinecartCommandBlock;
+import net.minecraft.commands.CommandSourceStack;
+import net.minecraft.commands.Commands;
+import net.minecraft.server.level.ServerLevel;
+import net.minecraft.world.entity.vehicle.MinecartCommandBlock;
 import org.bukkit.Location;
 import org.bukkit.command.BlockCommandSender;
 import org.bukkit.command.CommandSender;
@@ -26,22 +26,22 @@ import org.bukkit.entity.minecart.CommandMinecart;
 
 public final class VanillaCommandWrapper extends BukkitCommand {
 
-    private final CommandDispatcher dispatcher;
-    public final CommandNode<CommandListenerWrapper> vanillaCommand;
+    private final Commands dispatcher;
+    public final CommandNode<CommandSourceStack> vanillaCommand;
 
-    public VanillaCommandWrapper(CommandDispatcher dispatcher, CommandNode<CommandListenerWrapper> vanillaCommand) {
+    public VanillaCommandWrapper(Commands dispatcher, CommandNode<CommandSourceStack> vanillaCommand) {
         super(vanillaCommand.getName(), "A Mojang provided command.", vanillaCommand.getUsageText(), Collections.EMPTY_LIST);
         this.dispatcher = dispatcher;
         this.vanillaCommand = vanillaCommand;
-        this.setPermission(getPermission(vanillaCommand));
+        this.setPermission(VanillaCommandWrapper.getPermission(vanillaCommand));
     }
 
     @Override
     public boolean execute(CommandSender sender, String commandLabel, String[] args) {
-        if (!testPermission(sender)) return true;
+        if (!this.testPermission(sender)) return true;
 
-        CommandListenerWrapper icommandlistener = getListener(sender);
-        dispatcher.performPrefixedCommand(icommandlistener, toDispatcher(args, getName()), toDispatcher(args, commandLabel));
+        CommandSourceStack icommandlistener = VanillaCommandWrapper.getListener(sender);
+        this.dispatcher.performPrefixedCommand(icommandlistener, this.toDispatcher(args, this.getName()), this.toDispatcher(args, commandLabel));
         return true;
     }
 
@@ -51,28 +51,28 @@ public final class VanillaCommandWrapper extends BukkitCommand {
         Preconditions.checkArgument(args != null, "Arguments cannot be null");
         Preconditions.checkArgument(alias != null, "Alias cannot be null");
 
-        CommandListenerWrapper icommandlistener = getListener(sender);
-        ParseResults<CommandListenerWrapper> parsed = dispatcher.getDispatcher().parse(toDispatcher(args, getName()), icommandlistener);
+        CommandSourceStack icommandlistener = VanillaCommandWrapper.getListener(sender);
+        ParseResults<CommandSourceStack> parsed = this.dispatcher.getDispatcher().parse(this.toDispatcher(args, this.getName()), icommandlistener);
 
         List<String> results = new ArrayList<>();
-        dispatcher.getDispatcher().getCompletionSuggestions(parsed).thenAccept((suggestions) -> {
+        this.dispatcher.getDispatcher().getCompletionSuggestions(parsed).thenAccept((suggestions) -> {
             suggestions.getList().forEach((s) -> results.add(s.getText()));
         });
 
         return results;
     }
 
-    public static CommandListenerWrapper getListener(CommandSender sender) {
+    public static CommandSourceStack getListener(CommandSender sender) {
         if (sender instanceof CraftEntity entity) {
             if (sender instanceof CommandMinecart) {
-                return ((EntityMinecartCommandBlock) ((CraftMinecartCommand) sender).getHandle()).getCommandBlock().createCommandSourceStack();
+                return ((MinecartCommandBlock) ((CraftMinecartCommand) sender).getHandle()).getCommandBlock().createCommandSourceStack();
             }
 
             if (sender instanceof CraftPlayer player) {
                 return player.getHandle().createCommandSourceStack();
             }
 
-            return entity.getHandle().createCommandSourceStackForNameResolution((WorldServer) entity.getHandle().level());
+            return entity.getHandle().createCommandSourceStackForNameResolution((ServerLevel) entity.getHandle().level());
         }
         if (sender instanceof BlockCommandSender) {
             return ((CraftBlockCommandSender) sender).getWrapper();
@@ -90,7 +90,7 @@ public final class VanillaCommandWrapper extends BukkitCommand {
         throw new IllegalArgumentException("Cannot make " + sender + " a vanilla command listener");
     }
 
-    public static String getPermission(CommandNode<CommandListenerWrapper> vanillaCommand) {
+    public static String getPermission(CommandNode<CommandSourceStack> vanillaCommand) {
         return "minecraft.command." + ((vanillaCommand.getRedirect() == null) ? vanillaCommand.getName() : vanillaCommand.getRedirect().getName());
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/configuration/ConfigSerializationUtil.java b/paper-server/src/main/java/org/bukkit/craftbukkit/configuration/ConfigSerializationUtil.java
index 6548814b0a..4bf58b0b90 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/configuration/ConfigSerializationUtil.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/configuration/ConfigSerializationUtil.java
@@ -11,7 +11,7 @@ import org.bukkit.configuration.serialization.ConfigurationSerializable;
 public final class ConfigSerializationUtil {
 
     public static String getString(Map<?, ?> map, String key, boolean nullable) {
-        return getObject(String.class, map, key, nullable);
+        return ConfigSerializationUtil.getObject(String.class, map, key, nullable);
     }
 
     public static UUID getUuid(Map<?, ?> map, String key, boolean nullable) {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/conversations/ConversationTracker.java b/paper-server/src/main/java/org/bukkit/craftbukkit/conversations/ConversationTracker.java
index 72127dde54..335939ac12 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/conversations/ConversationTracker.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/conversations/ConversationTracker.java
@@ -14,9 +14,9 @@ public class ConversationTracker {
     private LinkedList<Conversation> conversationQueue = new LinkedList<Conversation>();
 
     public synchronized boolean beginConversation(Conversation conversation) {
-        if (!conversationQueue.contains(conversation)) {
-            conversationQueue.addLast(conversation);
-            if (conversationQueue.getFirst() == conversation) {
+        if (!this.conversationQueue.contains(conversation)) {
+            this.conversationQueue.addLast(conversation);
+            if (this.conversationQueue.getFirst() == conversation) {
                 conversation.begin();
                 conversation.outputNextPrompt();
                 return true;
@@ -26,23 +26,23 @@ public class ConversationTracker {
     }
 
     public synchronized void abandonConversation(Conversation conversation, ConversationAbandonedEvent details) {
-        if (!conversationQueue.isEmpty()) {
-            if (conversationQueue.getFirst() == conversation) {
+        if (!this.conversationQueue.isEmpty()) {
+            if (this.conversationQueue.getFirst() == conversation) {
                 conversation.abandon(details);
             }
-            if (conversationQueue.contains(conversation)) {
-                conversationQueue.remove(conversation);
+            if (this.conversationQueue.contains(conversation)) {
+                this.conversationQueue.remove(conversation);
             }
-            if (!conversationQueue.isEmpty()) {
-                conversationQueue.getFirst().outputNextPrompt();
+            if (!this.conversationQueue.isEmpty()) {
+                this.conversationQueue.getFirst().outputNextPrompt();
             }
         }
     }
 
     public synchronized void abandonAllConversations() {
 
-        LinkedList<Conversation> oldQueue = conversationQueue;
-        conversationQueue = new LinkedList<Conversation>();
+        LinkedList<Conversation> oldQueue = this.conversationQueue;
+        this.conversationQueue = new LinkedList<Conversation>();
         for (Conversation conversation : oldQueue) {
             try {
                 conversation.abandon(new ConversationAbandonedEvent(conversation, new ManuallyAbandonedConversationCanceller()));
@@ -53,8 +53,8 @@ public class ConversationTracker {
     }
 
     public synchronized void acceptConversationInput(String input) {
-        if (isConversing()) {
-            Conversation conversation = conversationQueue.getFirst();
+        if (this.isConversing()) {
+            Conversation conversation = this.conversationQueue.getFirst();
             try {
                 conversation.acceptInput(input);
             } catch (Throwable t) {
@@ -67,10 +67,10 @@ public class ConversationTracker {
     }
 
     public synchronized boolean isConversing() {
-        return !conversationQueue.isEmpty();
+        return !this.conversationQueue.isEmpty();
     }
 
     public synchronized boolean isConversingModaly() {
-        return isConversing() && conversationQueue.getFirst().isModal();
+        return this.isConversing() && this.conversationQueue.getFirst().isModal();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/damage/CraftDamageEffect.java b/paper-server/src/main/java/org/bukkit/craftbukkit/damage/CraftDamageEffect.java
index 1f1474bbb7..e472a61c16 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/damage/CraftDamageEffect.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/damage/CraftDamageEffect.java
@@ -25,7 +25,7 @@ public class CraftDamageEffect implements DamageEffect {
     public static DamageEffect getById(String id) {
         for (DamageEffects damageEffects : DamageEffects.values()) {
             if (damageEffects.getSerializedName().equalsIgnoreCase(id)) {
-                return toBukkit(damageEffects);
+                return CraftDamageEffect.toBukkit(damageEffects);
             }
         }
         return null;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/damage/CraftDamageSource.java b/paper-server/src/main/java/org/bukkit/craftbukkit/damage/CraftDamageSource.java
index 907f95dd55..8532324060 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/damage/CraftDamageSource.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/damage/CraftDamageSource.java
@@ -1,7 +1,7 @@
 package org.bukkit.craftbukkit.damage;
 
 import java.util.Objects;
-import net.minecraft.world.phys.Vec3D;
+import net.minecraft.world.phys.Vec3;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.block.Block;
@@ -26,7 +26,7 @@ public class CraftDamageSource implements DamageSource {
     }
 
     public World getCausingEntityWorld() {
-        org.bukkit.entity.Entity causingEntity = getCausingEntity();
+        org.bukkit.entity.Entity causingEntity = this.getCausingEntity();
         return causingEntity != null ? causingEntity.getWorld() : null;
     }
 
@@ -53,13 +53,13 @@ public class CraftDamageSource implements DamageSource {
 
     @Override
     public Location getDamageLocation() {
-        Vec3D vec3D = this.getHandle().sourcePositionRaw();
+        Vec3 vec3D = this.getHandle().sourcePositionRaw();
         return (vec3D != null) ? CraftLocation.toBukkit(vec3D, this.getCausingEntityWorld()) : null;
     }
 
     @Override
     public Location getSourceLocation() {
-        Vec3D vec3D = this.getHandle().getSourcePosition();
+        Vec3 vec3D = this.getHandle().getSourcePosition();
         return (vec3D != null) ? CraftLocation.toBukkit(vec3D, this.getCausingEntityWorld()) : null;
     }
 
@@ -121,7 +121,7 @@ public class CraftDamageSource implements DamageSource {
             nmsDirectEntity = craftDirectEntity.getHandle();
         }
 
-        Vec3D vec3D = (damageLocation == null) ? null : CraftLocation.toVec3D(damageLocation);
+        Vec3 vec3D = (damageLocation == null) ? null : CraftLocation.toVec3D(damageLocation);
 
         return new CraftDamageSource(new net.minecraft.world.damagesource.DamageSource(holderDamageType, nmsDirectEntity, nmsCausingEntity, vec3D));
     }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/damage/CraftDamageSourceBuilder.java b/paper-server/src/main/java/org/bukkit/craftbukkit/damage/CraftDamageSourceBuilder.java
index c9b12caa3d..4c6e15535f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/damage/CraftDamageSourceBuilder.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/damage/CraftDamageSourceBuilder.java
@@ -41,6 +41,6 @@ public class CraftDamageSourceBuilder implements DamageSource.Builder {
 
     @Override
     public DamageSource build() {
-        return CraftDamageSource.buildFromBukkit(damageType, causingEntity, directEntity, damageLocation);
+        return CraftDamageSource.buildFromBukkit(this.damageType, this.causingEntity, this.directEntity, this.damageLocation);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/damage/CraftDamageType.java b/paper-server/src/main/java/org/bukkit/craftbukkit/damage/CraftDamageType.java
index 9ec7b6c9dd..d486412429 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/damage/CraftDamageType.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/damage/CraftDamageType.java
@@ -2,7 +2,6 @@ package org.bukkit.craftbukkit.damage;
 
 import com.google.common.base.Preconditions;
 import net.minecraft.core.Holder;
-import net.minecraft.core.IRegistry;
 import net.minecraft.core.registries.Registries;
 import org.bukkit.NamespacedKey;
 import org.bukkit.Registry;
@@ -35,7 +34,7 @@ public class CraftDamageType implements DamageType, Handleable<net.minecraft.wor
 
     @Override
     public DamageScaling getDamageScaling() {
-        return damageScalingToBukkit(this.getHandle().scaling());
+        return CraftDamageType.damageScalingToBukkit(this.getHandle().scaling());
     }
 
     @Override
@@ -45,7 +44,7 @@ public class CraftDamageType implements DamageType, Handleable<net.minecraft.wor
 
     @Override
     public DeathMessageType getDeathMessageType() {
-        return deathMessageTypeToBukkit(this.getHandle().deathMessageType());
+        return CraftDamageType.deathMessageTypeToBukkit(this.getHandle().deathMessageType());
     }
 
     @Override
@@ -100,15 +99,15 @@ public class CraftDamageType implements DamageType, Handleable<net.minecraft.wor
     }
 
     public static DamageType minecraftHolderToBukkit(Holder<net.minecraft.world.damagesource.DamageType> minecraftHolder) {
-        return minecraftToBukkit(minecraftHolder.value());
+        return CraftDamageType.minecraftToBukkit(minecraftHolder.value());
     }
 
     public static Holder<net.minecraft.world.damagesource.DamageType> bukkitToMinecraftHolder(DamageType bukkitDamageType) {
         Preconditions.checkArgument(bukkitDamageType != null);
 
-        IRegistry<net.minecraft.world.damagesource.DamageType> registry = CraftRegistry.getMinecraftRegistry(Registries.DAMAGE_TYPE);
+        net.minecraft.core.Registry<net.minecraft.world.damagesource.DamageType> registry = CraftRegistry.getMinecraftRegistry(Registries.DAMAGE_TYPE);
 
-        if (registry.wrapAsHolder(bukkitToMinecraft(bukkitDamageType)) instanceof Holder.c<net.minecraft.world.damagesource.DamageType> holder) {
+        if (registry.wrapAsHolder(CraftDamageType.bukkitToMinecraft(bukkitDamageType)) instanceof Holder.Reference<net.minecraft.world.damagesource.DamageType> holder) {
             return holder;
         }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java b/paper-server/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java
index a8d96dfdf5..2d0c82ca24 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/enchantments/CraftEnchantment.java
@@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.enchantments;
 
 import com.google.common.base.Preconditions;
 import java.util.Locale;
-import net.minecraft.SystemUtils;
+import net.minecraft.Util;
 import net.minecraft.core.Holder;
 import net.minecraft.core.registries.Registries;
 import net.minecraft.tags.EnchantmentTags;
@@ -25,7 +25,7 @@ public class CraftEnchantment extends Enchantment implements Handleable<net.mine
     }
 
     public static Enchantment minecraftHolderToBukkit(Holder<net.minecraft.world.item.enchantment.Enchantment> minecraft) {
-        return minecraftToBukkit(minecraft.value());
+        return CraftEnchantment.minecraftToBukkit(minecraft.value());
     }
 
     public static net.minecraft.world.item.enchantment.Enchantment bukkitToMinecraft(Enchantment bukkit) {
@@ -65,22 +65,22 @@ public class CraftEnchantment extends Enchantment implements Handleable<net.mine
 
     @Override
     public net.minecraft.world.item.enchantment.Enchantment getHandle() {
-        return handle.value();
+        return this.handle.value();
     }
 
     @Override
     public NamespacedKey getKey() {
-        return key;
+        return this.key;
     }
 
     @Override
     public int getMaxLevel() {
-        return getHandle().getMaxLevel();
+        return this.getHandle().getMaxLevel();
     }
 
     @Override
     public int getStartLevel() {
-        return getHandle().getMinLevel();
+        return this.getHandle().getMinLevel();
     }
 
     @Override
@@ -90,26 +90,26 @@ public class CraftEnchantment extends Enchantment implements Handleable<net.mine
 
     @Override
     public boolean isTreasure() {
-        return !handle.is(EnchantmentTags.IN_ENCHANTING_TABLE);
+        return !this.handle.is(EnchantmentTags.IN_ENCHANTING_TABLE);
     }
 
     @Override
     public boolean isCursed() {
-        return handle.is(EnchantmentTags.CURSE);
+        return this.handle.is(EnchantmentTags.CURSE);
     }
 
     @Override
     public boolean canEnchantItem(ItemStack item) {
-        return getHandle().canEnchant(CraftItemStack.asNMSCopy(item));
+        return this.getHandle().canEnchant(CraftItemStack.asNMSCopy(item));
     }
 
     @Override
     public String getName() {
         // PAIL: migration paths
-        if (!getKey().getNamespace().equals(NamespacedKey.MINECRAFT)) {
-            return getKey().toString();
+        if (!this.getKey().getNamespace().equals(NamespacedKey.MINECRAFT)) {
+            return this.getKey().toString();
         }
-        String keyName = getKey().getKey().toUpperCase(Locale.ROOT);
+        String keyName = this.getKey().getKey().toUpperCase(Locale.ROOT);
         return switch (keyName) {
             case "PROTECTION" -> "PROTECTION_ENVIRONMENTAL";
             case "FIRE_PROTECTION" -> "PROTECTION_FIRE";
@@ -143,12 +143,12 @@ public class CraftEnchantment extends Enchantment implements Handleable<net.mine
             return false;
         }
         CraftEnchantment ench = (CraftEnchantment) other;
-        return !net.minecraft.world.item.enchantment.Enchantment.areCompatible(handle, ench.handle);
+        return !net.minecraft.world.item.enchantment.Enchantment.areCompatible(this.handle, ench.handle);
     }
 
     @Override
     public String getTranslationKey() {
-        return SystemUtils.makeDescriptionId("enchantment", handle.unwrapKey().get().location());
+        return Util.makeDescriptionId("enchantment", this.handle.unwrapKey().get().location());
     }
 
     @Override
@@ -161,16 +161,16 @@ public class CraftEnchantment extends Enchantment implements Handleable<net.mine
             return false;
         }
 
-        return getKey().equals(((Enchantment) other).getKey());
+        return this.getKey().equals(((Enchantment) other).getKey());
     }
 
     @Override
     public int hashCode() {
-        return getKey().hashCode();
+        return this.getKey().hashCode();
     }
 
     @Override
     public String toString() {
-        return "CraftEnchantment[" + getKey() + "]";
+        return "CraftEnchantment[" + this.getKey() + "]";
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractArrow.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractArrow.java
index c0c800a55c..0f85c1f991 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractArrow.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractArrow.java
@@ -1,8 +1,7 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.core.BlockPosition;
-import net.minecraft.world.entity.projectile.EntityArrow;
+import net.minecraft.core.BlockPos;
 import net.minecraft.world.item.Items;
 import org.bukkit.block.Block;
 import org.bukkit.craftbukkit.CraftServer;
@@ -14,7 +13,7 @@ import org.bukkit.projectiles.ProjectileSource;
 
 public class CraftAbstractArrow extends AbstractProjectile implements AbstractArrow {
 
-    public CraftAbstractArrow(CraftServer server, EntityArrow entity) {
+    public CraftAbstractArrow(CraftServer server, net.minecraft.world.entity.projectile.AbstractArrow entity) {
         super(server, entity);
     }
 
@@ -29,76 +28,76 @@ public class CraftAbstractArrow extends AbstractProjectile implements AbstractAr
 
     @Override
     public double getDamage() {
-        return getHandle().getBaseDamage();
+        return this.getHandle().getBaseDamage();
     }
 
     @Override
     public void setDamage(double damage) {
         Preconditions.checkArgument(damage >= 0, "Damage value (%s) must be positive", damage);
-        getHandle().setBaseDamage(damage);
+        this.getHandle().setBaseDamage(damage);
     }
 
     @Override
     public int getPierceLevel() {
-        return getHandle().getPierceLevel();
+        return this.getHandle().getPierceLevel();
     }
 
     @Override
     public void setPierceLevel(int pierceLevel) {
         Preconditions.checkArgument(0 <= pierceLevel && pierceLevel <= Byte.MAX_VALUE, "Pierce level (%s) out of range, expected 0 < level < 127", pierceLevel);
 
-        getHandle().setPierceLevel((byte) pierceLevel);
+        this.getHandle().setPierceLevel((byte) pierceLevel);
     }
 
     @Override
     public boolean isCritical() {
-        return getHandle().isCritArrow();
+        return this.getHandle().isCritArrow();
     }
 
     @Override
     public void setCritical(boolean critical) {
-        getHandle().setCritArrow(critical);
+        this.getHandle().setCritArrow(critical);
     }
 
     @Override
     public ProjectileSource getShooter() {
-        return getHandle().projectileSource;
+        return this.getHandle().projectileSource;
     }
 
     @Override
     public void setShooter(ProjectileSource shooter) {
         if (shooter instanceof Entity) {
-            getHandle().setOwner(((CraftEntity) shooter).getHandle());
+            this.getHandle().setOwner(((CraftEntity) shooter).getHandle());
         } else {
-            getHandle().setOwner(null);
+            this.getHandle().setOwner(null);
         }
-        getHandle().projectileSource = shooter;
+        this.getHandle().projectileSource = shooter;
     }
 
     @Override
     public boolean isInBlock() {
-        return getHandle().isInGround();
+        return this.getHandle().isInGround();
     }
 
     @Override
     public Block getAttachedBlock() {
-        if (!isInBlock()) {
+        if (!this.isInBlock()) {
             return null;
         }
 
-        BlockPosition pos = getHandle().blockPosition();
-        return getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ());
+        BlockPos pos = this.getHandle().blockPosition();
+        return this.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ());
     }
 
     @Override
     public PickupStatus getPickupStatus() {
-        return PickupStatus.values()[getHandle().pickup.ordinal()];
+        return PickupStatus.values()[this.getHandle().pickup.ordinal()];
     }
 
     @Override
     public void setPickupStatus(PickupStatus status) {
         Preconditions.checkArgument(status != null, "PickupStatus cannot be null");
-        getHandle().pickup = EntityArrow.PickupStatus.byOrdinal(status.ordinal());
+        this.getHandle().pickup = net.minecraft.world.entity.projectile.AbstractArrow.Pickup.byOrdinal(status.ordinal());
     }
 
     @Override
@@ -106,12 +105,12 @@ public class CraftAbstractArrow extends AbstractProjectile implements AbstractAr
         super.setTicksLived(value);
 
         // Second field for EntityArrow
-        getHandle().life = value;
+        this.getHandle().life = value;
     }
 
     @Override
     public boolean isShotFromCrossbow() {
-        net.minecraft.world.item.ItemStack firedFromWeapon = getHandle().getWeaponItem();
+        net.minecraft.world.item.ItemStack firedFromWeapon = this.getHandle().getWeaponItem();
 
         return firedFromWeapon != null && firedFromWeapon.is(Items.CROSSBOW);
     }
@@ -122,31 +121,31 @@ public class CraftAbstractArrow extends AbstractProjectile implements AbstractAr
 
     @Override
     public ItemStack getItem() {
-        return CraftItemStack.asBukkitCopy(getHandle().pickupItemStack);
+        return CraftItemStack.asBukkitCopy(this.getHandle().pickupItemStack);
     }
 
     @Override
     public void setItem(ItemStack item) {
         Preconditions.checkArgument(item != null, "ItemStack cannot be null");
 
-        getHandle().pickupItemStack = CraftItemStack.asNMSCopy(item);
+        this.getHandle().pickupItemStack = CraftItemStack.asNMSCopy(item);
     }
 
     @Override
     public ItemStack getWeapon() {
-        return CraftItemStack.asBukkitCopy(getHandle().getWeaponItem());
+        return CraftItemStack.asBukkitCopy(this.getHandle().getWeaponItem());
     }
 
     @Override
     public void setWeapon(ItemStack item) {
         Preconditions.checkArgument(item != null, "ItemStack cannot be null");
 
-        getHandle().firedFromWeapon = CraftItemStack.asNMSCopy(item);
+        this.getHandle().firedFromWeapon = CraftItemStack.asNMSCopy(item);
     }
 
     @Override
-    public EntityArrow getHandle() {
-        return (EntityArrow) entity;
+    public net.minecraft.world.entity.projectile.AbstractArrow getHandle() {
+        return (net.minecraft.world.entity.projectile.AbstractArrow) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
index 830e84f3ba..3b7a355945 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractHorse.java
@@ -2,8 +2,7 @@ package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
 import java.util.UUID;
-import net.minecraft.world.entity.ai.attributes.GenericAttributes;
-import net.minecraft.world.entity.animal.horse.EntityHorseAbstract;
+import net.minecraft.world.entity.ai.attributes.Attributes;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.craftbukkit.inventory.CraftInventoryAbstractHorse;
 import org.bukkit.entity.AbstractHorse;
@@ -13,13 +12,13 @@ import org.bukkit.inventory.AbstractHorseInventory;
 
 public abstract class CraftAbstractHorse extends CraftAnimals implements AbstractHorse {
 
-    public CraftAbstractHorse(CraftServer server, EntityHorseAbstract entity) {
+    public CraftAbstractHorse(CraftServer server, net.minecraft.world.entity.animal.horse.AbstractHorse entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityHorseAbstract getHandle() {
-        return (EntityHorseAbstract) entity;
+    public net.minecraft.world.entity.animal.horse.AbstractHorse getHandle() {
+        return (net.minecraft.world.entity.animal.horse.AbstractHorse) this.entity;
     }
 
     @Override
@@ -29,85 +28,85 @@ public abstract class CraftAbstractHorse extends CraftAnimals implements Abstrac
 
     @Override
     public int getDomestication() {
-        return getHandle().getTemper();
+        return this.getHandle().getTemper();
     }
 
     @Override
     public void setDomestication(int value) {
         Preconditions.checkArgument(value >= 0 && value <= this.getMaxDomestication(), "Domestication level (%s) need to be between %s and %s (max domestication)", value, 0, this.getMaxDomestication());
-        getHandle().setTemper(value);
+        this.getHandle().setTemper(value);
     }
 
     @Override
     public int getMaxDomestication() {
-        return getHandle().getMaxTemper();
+        return this.getHandle().getMaxTemper();
     }
 
     @Override
     public void setMaxDomestication(int value) {
         Preconditions.checkArgument(value > 0, "Max domestication (%s) cannot be zero or less", value);
-        getHandle().maxDomestication = value;
+        this.getHandle().maxDomestication = value;
     }
 
     @Override
     public double getJumpStrength() {
-        return getHandle().getAttributeValue(GenericAttributes.JUMP_STRENGTH);
+        return this.getHandle().getAttributeValue(Attributes.JUMP_STRENGTH);
     }
 
     @Override
     public void setJumpStrength(double strength) {
         Preconditions.checkArgument(strength >= 0, "Jump strength (%s) cannot be less than zero", strength);
-        getHandle().getAttribute(GenericAttributes.JUMP_STRENGTH).setBaseValue(strength);
+        this.getHandle().getAttribute(Attributes.JUMP_STRENGTH).setBaseValue(strength);
     }
 
     @Override
     public boolean isTamed() {
-        return getHandle().isTamed();
+        return this.getHandle().isTamed();
     }
 
     @Override
     public void setTamed(boolean tamed) {
-        getHandle().setTamed(tamed);
+        this.getHandle().setTamed(tamed);
     }
 
     @Override
     public AnimalTamer getOwner() {
-        if (getOwnerUUID() == null) return null;
-        return getServer().getOfflinePlayer(getOwnerUUID());
+        if (this.getOwnerUUID() == null) return null;
+        return this.getServer().getOfflinePlayer(this.getOwnerUUID());
     }
 
     @Override
     public void setOwner(AnimalTamer owner) {
         if (owner != null) {
-            setTamed(true);
-            getHandle().setTarget(null, null, false);
-            setOwnerUUID(owner.getUniqueId());
+            this.setTamed(true);
+            this.getHandle().setTarget(null, null, false);
+            this.setOwnerUUID(owner.getUniqueId());
         } else {
-            setTamed(false);
-            setOwnerUUID(null);
+            this.setTamed(false);
+            this.setOwnerUUID(null);
         }
     }
 
     public UUID getOwnerUUID() {
-        return getHandle().getOwnerUUID();
+        return this.getHandle().getOwnerUUID();
     }
 
     public void setOwnerUUID(UUID uuid) {
-        getHandle().setOwnerUUID(uuid);
+        this.getHandle().setOwnerUUID(uuid);
     }
 
     @Override
     public boolean isEatingHaystack() {
-        return getHandle().isEating();
+        return this.getHandle().isEating();
     }
 
     @Override
     public void setEatingHaystack(boolean eatingHaystack) {
-        getHandle().setEating(eatingHaystack);
+        this.getHandle().setEating(eatingHaystack);
     }
 
     @Override
     public AbstractHorseInventory getInventory() {
-        return new CraftInventoryAbstractHorse(getHandle().inventory);
+        return new CraftInventoryAbstractHorse(this.getHandle().inventory);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractSkeleton.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractSkeleton.java
index 650556fdd1..db6ad6eea8 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractSkeleton.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractSkeleton.java
@@ -1,13 +1,12 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntitySkeletonAbstract;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.AbstractSkeleton;
 import org.bukkit.entity.Skeleton;
 
 public abstract class CraftAbstractSkeleton extends CraftMonster implements AbstractSkeleton {
 
-    public CraftAbstractSkeleton(CraftServer server, EntitySkeletonAbstract entity) {
+    public CraftAbstractSkeleton(CraftServer server, net.minecraft.world.entity.monster.AbstractSkeleton entity) {
         super(server, entity);
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java
index 7d72133545..e5f733a765 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAbstractVillager.java
@@ -1,8 +1,7 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.npc.EntityVillager;
-import net.minecraft.world.entity.npc.EntityVillagerAbstract;
-import net.minecraft.world.item.trading.IMerchant;
+import net.minecraft.world.entity.npc.Villager;
+import net.minecraft.world.item.trading.Merchant;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.craftbukkit.inventory.CraftInventory;
 import org.bukkit.craftbukkit.inventory.CraftMerchant;
@@ -12,18 +11,18 @@ import org.bukkit.inventory.InventoryHolder;
 
 public class CraftAbstractVillager extends CraftAgeable implements CraftMerchant, AbstractVillager, InventoryHolder {
 
-    public CraftAbstractVillager(CraftServer server, EntityVillagerAbstract entity) {
+    public CraftAbstractVillager(CraftServer server, net.minecraft.world.entity.npc.AbstractVillager entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityVillagerAbstract getHandle() {
-        return (EntityVillager) entity;
+    public net.minecraft.world.entity.npc.AbstractVillager getHandle() {
+        return (Villager) this.entity;
     }
 
     @Override
-    public IMerchant getMerchant() {
-        return getHandle();
+    public Merchant getMerchant() {
+        return this.getHandle();
     }
 
     @Override
@@ -33,6 +32,6 @@ public class CraftAbstractVillager extends CraftAgeable implements CraftMerchant
 
     @Override
     public Inventory getInventory() {
-        return new CraftInventory(getHandle().getInventory());
+        return new CraftInventory(this.getHandle().getInventory());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAgeable.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAgeable.java
index e8f57ccb35..ae16e8d1bf 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAgeable.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAgeable.java
@@ -1,71 +1,71 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.EntityAgeable;
+import net.minecraft.world.entity.AgeableMob;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Ageable;
 
 public class CraftAgeable extends CraftCreature implements Ageable {
-    public CraftAgeable(CraftServer server, EntityAgeable entity) {
+    public CraftAgeable(CraftServer server, AgeableMob entity) {
         super(server, entity);
     }
 
     @Override
     public int getAge() {
-        return getHandle().getAge();
+        return this.getHandle().getAge();
     }
 
     @Override
     public void setAge(int age) {
-        getHandle().setAge(age);
+        this.getHandle().setAge(age);
     }
 
     @Override
     public void setAgeLock(boolean lock) {
-        getHandle().ageLocked = lock;
+        this.getHandle().ageLocked = lock;
     }
 
     @Override
     public boolean getAgeLock() {
-        return getHandle().ageLocked;
+        return this.getHandle().ageLocked;
     }
 
     @Override
     public void setBaby() {
-        if (isAdult()) {
-            setAge(-24000);
+        if (this.isAdult()) {
+            this.setAge(-24000);
         }
     }
 
     @Override
     public void setAdult() {
-        if (!isAdult()) {
-            setAge(0);
+        if (!this.isAdult()) {
+            this.setAge(0);
         }
     }
 
     @Override
     public boolean isAdult() {
-        return getAge() >= 0;
+        return this.getAge() >= 0;
     }
 
 
     @Override
     public boolean canBreed() {
-        return getAge() == 0;
+        return this.getAge() == 0;
     }
 
     @Override
     public void setBreed(boolean breed) {
         if (breed) {
-            setAge(0);
-        } else if (isAdult()) {
-            setAge(6000);
+            this.setAge(0);
+        } else if (this.isAdult()) {
+            this.setAge(6000);
         }
     }
 
     @Override
-    public EntityAgeable getHandle() {
-        return (EntityAgeable) entity;
+    public AgeableMob getHandle() {
+        return (AgeableMob) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAllay.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAllay.java
index 56884f6530..1d04df8752 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAllay.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAllay.java
@@ -1,7 +1,7 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
 import net.minecraft.world.entity.animal.allay.Allay;
 import org.bukkit.Location;
 import org.bukkit.Material;
@@ -18,7 +18,7 @@ public class CraftAllay extends CraftCreature implements org.bukkit.entity.Allay
 
     @Override
     public Allay getHandle() {
-        return (Allay) entity;
+        return (Allay) this.entity;
     }
 
     @Override
@@ -28,67 +28,67 @@ public class CraftAllay extends CraftCreature implements org.bukkit.entity.Allay
 
     @Override
     public Inventory getInventory() {
-        return new CraftInventory(getHandle().getInventory());
+        return new CraftInventory(this.getHandle().getInventory());
     }
 
     @Override
     public boolean canDuplicate() {
-        return getHandle().canDuplicate();
+        return this.getHandle().canDuplicate();
     }
 
     @Override
     public void setCanDuplicate(boolean canDuplicate) {
-        getHandle().setCanDuplicate(canDuplicate);
+        this.getHandle().setCanDuplicate(canDuplicate);
     }
 
     @Override
     public long getDuplicationCooldown() {
-        return getHandle().duplicationCooldown;
+        return this.getHandle().duplicationCooldown;
     }
 
     @Override
     public void setDuplicationCooldown(long l) {
-        getHandle().duplicationCooldown = l;
+        this.getHandle().duplicationCooldown = l;
     }
 
     @Override
     public void resetDuplicationCooldown() {
-        getHandle().resetDuplicationCooldown();
+        this.getHandle().resetDuplicationCooldown();
     }
 
     @Override
     public boolean isDancing() {
-        return getHandle().isDancing();
+        return this.getHandle().isDancing();
     }
 
     @Override
     public void startDancing(Location location) {
         Preconditions.checkArgument(location != null, "Location cannot be null");
         Preconditions.checkArgument(location.getBlock().getType().equals(Material.JUKEBOX), "The Block in the Location need to be a JukeBox");
-        getHandle().setJukeboxPlaying(CraftLocation.toBlockPosition(location), true);
+        this.getHandle().setJukeboxPlaying(CraftLocation.toBlockPosition(location), true);
     }
 
     @Override
     public void startDancing() {
-        getHandle().forceDancing = true;
-        getHandle().setDancing(true);
+        this.getHandle().forceDancing = true;
+        this.getHandle().setDancing(true);
     }
 
     @Override
     public void stopDancing() {
-        getHandle().forceDancing = false;
-        getHandle().jukeboxPos = null;
-        getHandle().setJukeboxPlaying(null, false);
+        this.getHandle().forceDancing = false;
+        this.getHandle().jukeboxPos = null;
+        this.getHandle().setJukeboxPlaying(null, false);
     }
 
     @Override
     public org.bukkit.entity.Allay duplicateAllay() {
-        Allay nmsAllay = getHandle().duplicateAllay();
+        Allay nmsAllay = this.getHandle().duplicateAllay();
         return (nmsAllay != null) ? (org.bukkit.entity.Allay) nmsAllay.getBukkitEntity() : null;
     }
 
     public Location getJukebox() {
-        BlockPosition nmsJukeboxPos = getHandle().jukeboxPos;
-        return (nmsJukeboxPos != null) ? CraftLocation.toBukkit(nmsJukeboxPos, getWorld()) : null;
+        BlockPos nmsJukeboxPos = this.getHandle().jukeboxPos;
+        return (nmsJukeboxPos != null) ? CraftLocation.toBukkit(nmsJukeboxPos, this.getWorld()) : null;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAmbient.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAmbient.java
index 7f0ba4f5e5..2a2f9f0907 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAmbient.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAmbient.java
@@ -1,17 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.ambient.EntityAmbient;
+import net.minecraft.world.entity.ambient.AmbientCreature;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Ambient;
 
 public class CraftAmbient extends CraftMob implements Ambient {
-    public CraftAmbient(CraftServer server, EntityAmbient entity) {
+    public CraftAmbient(CraftServer server, AmbientCreature entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityAmbient getHandle() {
-        return (EntityAmbient) entity;
+    public AmbientCreature getHandle() {
+        return (AmbientCreature) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAnimals.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAnimals.java
index 83d00577b8..ab42bc721d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAnimals.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAnimals.java
@@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
 import java.util.UUID;
-import net.minecraft.world.entity.animal.EntityAnimal;
+import net.minecraft.world.entity.animal.Animal;
 import org.bukkit.Material;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.craftbukkit.inventory.CraftItemStack;
@@ -11,13 +11,13 @@ import org.bukkit.inventory.ItemStack;
 
 public class CraftAnimals extends CraftAgeable implements Animals {
 
-    public CraftAnimals(CraftServer server, EntityAnimal entity) {
+    public CraftAnimals(CraftServer server, Animal entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityAnimal getHandle() {
-        return (EntityAnimal) entity;
+    public Animal getHandle() {
+        return (Animal) this.entity;
     }
 
     @Override
@@ -27,37 +27,37 @@ public class CraftAnimals extends CraftAgeable implements Animals {
 
     @Override
     public UUID getBreedCause() {
-        return getHandle().loveCause;
+        return this.getHandle().loveCause;
     }
 
     @Override
     public void setBreedCause(UUID uuid) {
-        getHandle().loveCause = uuid;
+        this.getHandle().loveCause = uuid;
     }
 
     @Override
     public boolean isLoveMode() {
-        return getHandle().isInLove();
+        return this.getHandle().isInLove();
     }
 
     @Override
     public void setLoveModeTicks(int ticks) {
         Preconditions.checkArgument(ticks >= 0, "Love mode ticks must be positive or 0");
-        getHandle().setInLoveTime(ticks);
+        this.getHandle().setInLoveTime(ticks);
     }
 
     @Override
     public int getLoveModeTicks() {
-        return getHandle().inLove;
+        return this.getHandle().inLove;
     }
 
     @Override
     public boolean isBreedItem(ItemStack itemStack) {
-        return getHandle().isFood(CraftItemStack.asNMSCopy(itemStack));
+        return this.getHandle().isFood(CraftItemStack.asNMSCopy(itemStack));
     }
 
     @Override
     public boolean isBreedItem(Material material) {
-        return isBreedItem(new ItemStack(material));
+        return this.isBreedItem(new ItemStack(material));
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java
index 218e98746b..17bffb4545 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAreaEffectCloud.java
@@ -5,9 +5,7 @@ import java.util.List;
 import java.util.Optional;
 import net.minecraft.core.Holder;
 import net.minecraft.world.effect.MobEffect;
-import net.minecraft.world.effect.MobEffectList;
-import net.minecraft.world.entity.EntityAreaEffectCloud;
-import net.minecraft.world.entity.EntityLiving;
+import net.minecraft.world.effect.MobEffectInstance;
 import net.minecraft.world.item.alchemy.PotionContents;
 import org.bukkit.Color;
 import org.bukkit.Particle;
@@ -26,13 +24,13 @@ import org.bukkit.projectiles.ProjectileSource;
 
 public class CraftAreaEffectCloud extends CraftEntity implements AreaEffectCloud {
 
-    public CraftAreaEffectCloud(CraftServer server, EntityAreaEffectCloud entity) {
+    public CraftAreaEffectCloud(CraftServer server, net.minecraft.world.entity.AreaEffectCloud entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityAreaEffectCloud getHandle() {
-        return (EntityAreaEffectCloud) super.getHandle();
+    public net.minecraft.world.entity.AreaEffectCloud getHandle() {
+        return (net.minecraft.world.entity.AreaEffectCloud) super.getHandle();
     }
 
     @Override
@@ -42,124 +40,124 @@ public class CraftAreaEffectCloud extends CraftEntity implements AreaEffectCloud
 
     @Override
     public int getDuration() {
-        return getHandle().getDuration();
+        return this.getHandle().getDuration();
     }
 
     @Override
     public void setDuration(int duration) {
-        getHandle().setDuration(duration);
+        this.getHandle().setDuration(duration);
     }
 
     @Override
     public int getWaitTime() {
-        return getHandle().waitTime;
+        return this.getHandle().waitTime;
     }
 
     @Override
     public void setWaitTime(int waitTime) {
-        getHandle().setWaitTime(waitTime);
+        this.getHandle().setWaitTime(waitTime);
     }
 
     @Override
     public int getReapplicationDelay() {
-        return getHandle().reapplicationDelay;
+        return this.getHandle().reapplicationDelay;
     }
 
     @Override
     public void setReapplicationDelay(int delay) {
-        getHandle().reapplicationDelay = delay;
+        this.getHandle().reapplicationDelay = delay;
     }
 
     @Override
     public int getDurationOnUse() {
-        return getHandle().durationOnUse;
+        return this.getHandle().durationOnUse;
     }
 
     @Override
     public void setDurationOnUse(int duration) {
-        getHandle().durationOnUse = duration;
+        this.getHandle().durationOnUse = duration;
     }
 
     @Override
     public float getRadius() {
-        return getHandle().getRadius();
+        return this.getHandle().getRadius();
     }
 
     @Override
     public void setRadius(float radius) {
-        getHandle().setRadius(radius);
+        this.getHandle().setRadius(radius);
     }
 
     @Override
     public float getRadiusOnUse() {
-        return getHandle().radiusOnUse;
+        return this.getHandle().radiusOnUse;
     }
 
     @Override
     public void setRadiusOnUse(float radius) {
-        getHandle().setRadiusOnUse(radius);
+        this.getHandle().setRadiusOnUse(radius);
     }
 
     @Override
     public float getRadiusPerTick() {
-        return getHandle().radiusPerTick;
+        return this.getHandle().radiusPerTick;
     }
 
     @Override
     public void setRadiusPerTick(float radius) {
-        getHandle().setRadiusPerTick(radius);
+        this.getHandle().setRadiusPerTick(radius);
     }
 
     @Override
     public Particle getParticle() {
-        return CraftParticle.minecraftToBukkit(getHandle().getParticle().getType());
+        return CraftParticle.minecraftToBukkit(this.getHandle().getParticle().getType());
     }
 
     @Override
     public void setParticle(Particle particle) {
-        setParticle(particle, null);
+        this.setParticle(particle, null);
     }
 
     @Override
     public <T> void setParticle(Particle particle, T data) {
-        getHandle().setParticle(CraftParticle.createParticleParam(particle, data));
+        this.getHandle().setParticle(CraftParticle.createParticleParam(particle, data));
     }
 
     @Override
     public Color getColor() {
-        return Color.fromRGB(getHandle().potionContents.getColor());
+        return Color.fromRGB(this.getHandle().potionContents.getColor());
     }
 
     @Override
     public void setColor(Color color) {
-        PotionContents old = getHandle().potionContents;
-        getHandle().setPotionContents(new PotionContents(old.potion(), Optional.of(color.asRGB()), old.customEffects(), old.customName()));
+        PotionContents old = this.getHandle().potionContents;
+        this.getHandle().setPotionContents(new PotionContents(old.potion(), Optional.of(color.asRGB()), old.customEffects(), old.customName()));
     }
 
     @Override
     public boolean addCustomEffect(PotionEffect effect, boolean override) {
-        if (hasCustomEffect(effect.getType())) {
+        if (this.hasCustomEffect(effect.getType())) {
             if (!override) {
                 return false;
             }
-            removeCustomEffect(effect.getType());
+            this.removeCustomEffect(effect.getType());
         }
-        getHandle().addEffect(CraftPotionUtil.fromBukkit(effect));
-        getHandle().updateColor();
+        this.getHandle().addEffect(CraftPotionUtil.fromBukkit(effect));
+        this.getHandle().updateColor();
         return true;
     }
 
     @Override
     public void clearCustomEffects() {
-        PotionContents old = getHandle().potionContents;
-        getHandle().setPotionContents(new PotionContents(old.potion(), old.customColor(), List.of(), old.customName()));
-        getHandle().updateColor();
+        PotionContents old = this.getHandle().potionContents;
+        this.getHandle().setPotionContents(new PotionContents(old.potion(), old.customColor(), List.of(), old.customName()));
+        this.getHandle().updateColor();
     }
 
     @Override
     public List<PotionEffect> getCustomEffects() {
         ImmutableList.Builder<PotionEffect> builder = ImmutableList.builder();
-        for (MobEffect effect : getHandle().potionContents.customEffects()) {
+        for (MobEffectInstance effect : this.getHandle().potionContents.customEffects()) {
             builder.add(CraftPotionUtil.toBukkit(effect));
         }
         return builder.build();
@@ -167,7 +165,7 @@ public class CraftAreaEffectCloud extends CraftEntity implements AreaEffectCloud
 
     @Override
     public boolean hasCustomEffect(PotionEffectType type) {
-        for (MobEffect effect : getHandle().potionContents.customEffects()) {
+        for (MobEffectInstance effect : this.getHandle().potionContents.customEffects()) {
             if (CraftPotionUtil.equals(effect.getEffect(), type)) {
                 return true;
             }
@@ -177,58 +175,58 @@ public class CraftAreaEffectCloud extends CraftEntity implements AreaEffectCloud
 
     @Override
     public boolean hasCustomEffects() {
-        return !getHandle().potionContents.customEffects().isEmpty();
+        return !this.getHandle().potionContents.customEffects().isEmpty();
     }
 
     @Override
     public boolean removeCustomEffect(PotionEffectType effect) {
-        if (!hasCustomEffect(effect)) {
+        if (!this.hasCustomEffect(effect)) {
             return false;
         }
-        Holder<MobEffectList> minecraft = CraftPotionEffectType.bukkitToMinecraftHolder(effect);
+        Holder<MobEffect> minecraft = CraftPotionEffectType.bukkitToMinecraftHolder(effect);
 
-        PotionContents old = getHandle().potionContents;
-        getHandle().setPotionContents(new PotionContents(old.potion(), old.customColor(), old.customEffects().stream().filter((mobEffect) -> !mobEffect.getEffect().equals(minecraft)).toList(), old.customName()));
+        PotionContents old = this.getHandle().potionContents;
+        this.getHandle().setPotionContents(new PotionContents(old.potion(), old.customColor(), old.customEffects().stream().filter((mobEffect) -> !mobEffect.getEffect().equals(minecraft)).toList(), old.customName()));
         return true;
     }
 
     @Override
     public void setBasePotionData(PotionData data) {
-        setBasePotionType(CraftPotionUtil.fromBukkit(data));
+        this.setBasePotionType(CraftPotionUtil.fromBukkit(data));
     }
 
     @Override
     public PotionData getBasePotionData() {
-        return CraftPotionUtil.toBukkit(getBasePotionType());
+        return CraftPotionUtil.toBukkit(this.getBasePotionType());
     }
 
     @Override
     public void setBasePotionType(PotionType potionType) {
         if (potionType != null) {
-            getHandle().setPotionContents(getHandle().potionContents.withPotion(CraftPotionType.bukkitToMinecraftHolder(potionType)));
+            this.getHandle().setPotionContents(this.getHandle().potionContents.withPotion(CraftPotionType.bukkitToMinecraftHolder(potionType)));
         } else {
-            PotionContents old = getHandle().potionContents;
-            getHandle().setPotionContents(new PotionContents(Optional.empty(), old.customColor(), old.customEffects(), old.customName()));
+            PotionContents old = this.getHandle().potionContents;
+            this.getHandle().setPotionContents(new PotionContents(Optional.empty(), old.customColor(), old.customEffects(), old.customName()));
         }
     }
 
     @Override
     public PotionType getBasePotionType() {
-        return getHandle().potionContents.potion().map(CraftPotionType::minecraftHolderToBukkit).orElse(null);
+        return this.getHandle().potionContents.potion().map(CraftPotionType::minecraftHolderToBukkit).orElse(null);
     }
 
     @Override
     public ProjectileSource getSource() {
-        EntityLiving source = getHandle().getOwner();
+        net.minecraft.world.entity.LivingEntity source = this.getHandle().getOwner();
         return (source == null) ? null : (LivingEntity) source.getBukkitEntity();
     }
 
     @Override
     public void setSource(ProjectileSource shooter) {
         if (shooter instanceof CraftLivingEntity craftLivingEntity) {
-            getHandle().setOwner(craftLivingEntity.getHandle());
+            this.getHandle().setOwner(craftLivingEntity.getHandle());
         } else {
-            getHandle().setOwner(null);
+            this.getHandle().setOwner(null);
         }
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
index 33f8cd2c8b..9ed8d22872 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftArmorStand.java
@@ -1,7 +1,6 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.core.Vector3f;
-import net.minecraft.world.entity.decoration.EntityArmorStand;
+import net.minecraft.core.Rotations;
 import org.bukkit.craftbukkit.CraftEquipmentSlot;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.ArmorStand;
@@ -12,7 +11,7 @@ import org.bukkit.util.EulerAngle;
 
 public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
 
-    public CraftArmorStand(CraftServer server, EntityArmorStand entity) {
+    public CraftArmorStand(CraftServer server, net.minecraft.world.entity.decoration.ArmorStand entity) {
         super(server, entity);
     }
 
@@ -22,168 +21,168 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
     }
 
     @Override
-    public EntityArmorStand getHandle() {
-        return (EntityArmorStand) super.getHandle();
+    public net.minecraft.world.entity.decoration.ArmorStand getHandle() {
+        return (net.minecraft.world.entity.decoration.ArmorStand) super.getHandle();
     }
 
     @Override
     public ItemStack getItemInHand() {
-        return getEquipment().getItemInHand();
+        return this.getEquipment().getItemInHand();
     }
 
     @Override
     public void setItemInHand(ItemStack item) {
-        getEquipment().setItemInHand(item);
+        this.getEquipment().setItemInHand(item);
     }
 
     @Override
     public ItemStack getBoots() {
-        return getEquipment().getBoots();
+        return this.getEquipment().getBoots();
     }
 
     @Override
     public void setBoots(ItemStack item) {
-        getEquipment().setBoots(item);
+        this.getEquipment().setBoots(item);
     }
 
     @Override
     public ItemStack getLeggings() {
-        return getEquipment().getLeggings();
+        return this.getEquipment().getLeggings();
     }
 
     @Override
     public void setLeggings(ItemStack item) {
-        getEquipment().setLeggings(item);
+        this.getEquipment().setLeggings(item);
     }
 
     @Override
     public ItemStack getChestplate() {
-        return getEquipment().getChestplate();
+        return this.getEquipment().getChestplate();
     }
 
     @Override
     public void setChestplate(ItemStack item) {
-        getEquipment().setChestplate(item);
+        this.getEquipment().setChestplate(item);
     }
 
     @Override
     public ItemStack getHelmet() {
-        return getEquipment().getHelmet();
+        return this.getEquipment().getHelmet();
     }
 
     @Override
     public void setHelmet(ItemStack item) {
-        getEquipment().setHelmet(item);
+        this.getEquipment().setHelmet(item);
     }
 
     @Override
     public EulerAngle getBodyPose() {
-        return fromNMS(getHandle().bodyPose);
+        return CraftArmorStand.fromNMS(this.getHandle().bodyPose);
     }
 
     @Override
     public void setBodyPose(EulerAngle pose) {
-        getHandle().setBodyPose(toNMS(pose));
+        this.getHandle().setBodyPose(CraftArmorStand.toNMS(pose));
     }
 
     @Override
     public EulerAngle getLeftArmPose() {
-        return fromNMS(getHandle().leftArmPose);
+        return CraftArmorStand.fromNMS(this.getHandle().leftArmPose);
     }
 
     @Override
     public void setLeftArmPose(EulerAngle pose) {
-        getHandle().setLeftArmPose(toNMS(pose));
+        this.getHandle().setLeftArmPose(CraftArmorStand.toNMS(pose));
     }
 
     @Override
     public EulerAngle getRightArmPose() {
-        return fromNMS(getHandle().rightArmPose);
+        return CraftArmorStand.fromNMS(this.getHandle().rightArmPose);
     }
 
     @Override
     public void setRightArmPose(EulerAngle pose) {
-        getHandle().setRightArmPose(toNMS(pose));
+        this.getHandle().setRightArmPose(CraftArmorStand.toNMS(pose));
     }
 
     @Override
     public EulerAngle getLeftLegPose() {
-        return fromNMS(getHandle().leftLegPose);
+        return CraftArmorStand.fromNMS(this.getHandle().leftLegPose);
     }
 
     @Override
     public void setLeftLegPose(EulerAngle pose) {
-        getHandle().setLeftLegPose(toNMS(pose));
+        this.getHandle().setLeftLegPose(CraftArmorStand.toNMS(pose));
     }
 
     @Override
     public EulerAngle getRightLegPose() {
-        return fromNMS(getHandle().rightLegPose);
+        return CraftArmorStand.fromNMS(this.getHandle().rightLegPose);
     }
 
     @Override
     public void setRightLegPose(EulerAngle pose) {
-        getHandle().setRightLegPose(toNMS(pose));
+        this.getHandle().setRightLegPose(CraftArmorStand.toNMS(pose));
     }
 
     @Override
     public EulerAngle getHeadPose() {
-        return fromNMS(getHandle().headPose);
+        return CraftArmorStand.fromNMS(this.getHandle().headPose);
     }
 
     @Override
     public void setHeadPose(EulerAngle pose) {
-        getHandle().setHeadPose(toNMS(pose));
+        this.getHandle().setHeadPose(CraftArmorStand.toNMS(pose));
     }
 
     @Override
     public boolean hasBasePlate() {
-        return getHandle().showBasePlate();
+        return this.getHandle().showBasePlate();
     }
 
     @Override
     public void setBasePlate(boolean basePlate) {
-        getHandle().setNoBasePlate(!basePlate);
+        this.getHandle().setNoBasePlate(!basePlate);
     }
 
     @Override
     public void setGravity(boolean gravity) {
         super.setGravity(gravity);
         // Armor stands are special
-        getHandle().noPhysics = !gravity;
+        this.getHandle().noPhysics = !gravity;
     }
 
     @Override
     public boolean isVisible() {
-        return !getHandle().isInvisible();
+        return !this.getHandle().isInvisible();
     }
 
     @Override
     public void setVisible(boolean visible) {
-        getHandle().setInvisible(!visible);
+        this.getHandle().setInvisible(!visible);
     }
 
     @Override
     public boolean hasArms() {
-        return getHandle().showArms();
+        return this.getHandle().showArms();
     }
 
     @Override
     public void setArms(boolean arms) {
-        getHandle().setShowArms(arms);
+        this.getHandle().setShowArms(arms);
     }
 
     @Override
     public boolean isSmall() {
-        return getHandle().isSmall();
+        return this.getHandle().isSmall();
     }
 
     @Override
     public void setSmall(boolean small) {
-        getHandle().setSmall(small);
+        this.getHandle().setSmall(small);
     }
 
-    private static EulerAngle fromNMS(Vector3f old) {
+    private static EulerAngle fromNMS(Rotations old) {
         return new EulerAngle(
             Math.toRadians(old.getX()),
             Math.toRadians(old.getY()),
@@ -191,8 +190,8 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
         );
     }
 
-    private static Vector3f toNMS(EulerAngle old) {
-        return new Vector3f(
+    private static Rotations toNMS(EulerAngle old) {
+        return new Rotations(
             (float) Math.toDegrees(old.getX()),
             (float) Math.toDegrees(old.getY()),
             (float) Math.toDegrees(old.getZ())
@@ -201,26 +200,26 @@ public class CraftArmorStand extends CraftLivingEntity implements ArmorStand {
 
     @Override
     public boolean isMarker() {
-        return getHandle().isMarker();
+        return this.getHandle().isMarker();
     }
 
     @Override
     public void setMarker(boolean marker) {
-        getHandle().setMarker(marker);
+        this.getHandle().setMarker(marker);
     }
 
     @Override
     public void addEquipmentLock(EquipmentSlot equipmentSlot, LockType lockType) {
-        getHandle().disabledSlots |= (1 << CraftEquipmentSlot.getNMS(equipmentSlot).getFilterBit(lockType.ordinal() * 8));
+        this.getHandle().disabledSlots |= (1 << CraftEquipmentSlot.getNMS(equipmentSlot).getFilterBit(lockType.ordinal() * 8));
     }
 
     @Override
     public void removeEquipmentLock(EquipmentSlot equipmentSlot, LockType lockType) {
-        getHandle().disabledSlots &= ~(1 << CraftEquipmentSlot.getNMS(equipmentSlot).getFilterBit(lockType.ordinal() * 8));
+        this.getHandle().disabledSlots &= ~(1 << CraftEquipmentSlot.getNMS(equipmentSlot).getFilterBit(lockType.ordinal() * 8));
     }
 
     @Override
     public boolean hasEquipmentLock(EquipmentSlot equipmentSlot, LockType lockType) {
-        return (getHandle().disabledSlots & (1 << CraftEquipmentSlot.getNMS(equipmentSlot).getFilterBit(lockType.ordinal() * 8))) != 0;
+        return (this.getHandle().disabledSlots & (1 << CraftEquipmentSlot.getNMS(equipmentSlot).getFilterBit(lockType.ordinal() * 8))) != 0;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
index 980b295bd8..199d5836dc 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftArrow.java
@@ -5,8 +5,7 @@ import java.util.List;
 import java.util.Optional;
 import net.minecraft.core.Holder;
 import net.minecraft.world.effect.MobEffect;
-import net.minecraft.world.effect.MobEffectList;
-import net.minecraft.world.entity.projectile.EntityTippedArrow;
+import net.minecraft.world.effect.MobEffectInstance;
 import net.minecraft.world.item.alchemy.PotionContents;
 import org.bukkit.Color;
 import org.bukkit.craftbukkit.CraftServer;
@@ -21,13 +20,13 @@ import org.bukkit.potion.PotionType;
 
 public class CraftArrow extends CraftAbstractArrow implements Arrow {
 
-    public CraftArrow(CraftServer server, EntityTippedArrow entity) {
+    public CraftArrow(CraftServer server, net.minecraft.world.entity.projectile.Arrow entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityTippedArrow getHandle() {
-        return (EntityTippedArrow) entity;
+    public net.minecraft.world.entity.projectile.Arrow getHandle() {
+        return (net.minecraft.world.entity.projectile.Arrow) this.entity;
     }
 
     @Override
@@ -37,28 +36,28 @@ public class CraftArrow extends CraftAbstractArrow implements Arrow {
 
     @Override
     public boolean addCustomEffect(PotionEffect effect, boolean override) {
-        if (hasCustomEffect(effect.getType())) {
+        if (this.hasCustomEffect(effect.getType())) {
             if (!override) {
                 return false;
             }
-            removeCustomEffect(effect.getType());
+            this.removeCustomEffect(effect.getType());
         }
-        getHandle().addEffect(CraftPotionUtil.fromBukkit(effect));
-        getHandle().updateColor();
+        this.getHandle().addEffect(CraftPotionUtil.fromBukkit(effect));
+        this.getHandle().updateColor();
         return true;
     }
 
     @Override
     public void clearCustomEffects() {
-        PotionContents old = getHandle().getPotionContents();
-        getHandle().setPotionContents(new PotionContents(old.potion(), old.customColor(), List.of(), old.customName()));
-        getHandle().updateColor();
+        PotionContents old = this.getHandle().getPotionContents();
+        this.getHandle().setPotionContents(new PotionContents(old.potion(), old.customColor(), List.of(), old.customName()));
+        this.getHandle().updateColor();
     }
 
     @Override
     public List<PotionEffect> getCustomEffects() {
         ImmutableList.Builder<PotionEffect> builder = ImmutableList.builder();
-        for (MobEffect effect : getHandle().getPotionContents().customEffects()) {
+        for (MobEffectInstance effect : this.getHandle().getPotionContents().customEffects()) {
             builder.add(CraftPotionUtil.toBukkit(effect));
         }
         return builder.build();
@@ -66,7 +65,7 @@ public class CraftArrow extends CraftAbstractArrow implements Arrow {
 
     @Override
     public boolean hasCustomEffect(PotionEffectType type) {
-        for (MobEffect effect : getHandle().getPotionContents().customEffects()) {
+        for (MobEffectInstance effect : this.getHandle().getPotionContents().customEffects()) {
             if (CraftPotionUtil.equals(effect.getEffect(), type)) {
                 return true;
             }
@@ -76,58 +75,58 @@ public class CraftArrow extends CraftAbstractArrow implements Arrow {
 
     @Override
     public boolean hasCustomEffects() {
-        return !getHandle().getPotionContents().customEffects().isEmpty();
+        return !this.getHandle().getPotionContents().customEffects().isEmpty();
     }
 
     @Override
     public boolean removeCustomEffect(PotionEffectType effect) {
-        if (!hasCustomEffect(effect)) {
+        if (!this.hasCustomEffect(effect)) {
             return false;
         }
-        Holder<MobEffectList> minecraft = CraftPotionEffectType.bukkitToMinecraftHolder(effect);
+        Holder<MobEffect> minecraft = CraftPotionEffectType.bukkitToMinecraftHolder(effect);
 
-        PotionContents old = getHandle().getPotionContents();
-        getHandle().setPotionContents(new PotionContents(old.potion(), old.customColor(), old.customEffects().stream().filter((mobEffect) -> !mobEffect.getEffect().equals(minecraft)).toList(), old.customName()));
+        PotionContents old = this.getHandle().getPotionContents();
+        this.getHandle().setPotionContents(new PotionContents(old.potion(), old.customColor(), old.customEffects().stream().filter((mobEffect) -> !mobEffect.getEffect().equals(minecraft)).toList(), old.customName()));
         return true;
     }
 
     @Override
     public void setBasePotionData(PotionData data) {
-        setBasePotionType(CraftPotionUtil.fromBukkit(data));
+        this.setBasePotionType(CraftPotionUtil.fromBukkit(data));
     }
 
     @Override
     public PotionData getBasePotionData() {
-        return CraftPotionUtil.toBukkit(getBasePotionType());
+        return CraftPotionUtil.toBukkit(this.getBasePotionType());
     }
 
     @Override
     public void setBasePotionType(PotionType potionType) {
         if (potionType != null) {
-            getHandle().setPotionContents(getHandle().getPotionContents().withPotion(CraftPotionType.bukkitToMinecraftHolder(potionType)));
+            this.getHandle().setPotionContents(this.getHandle().getPotionContents().withPotion(CraftPotionType.bukkitToMinecraftHolder(potionType)));
         } else {
-            PotionContents old = getHandle().getPotionContents();
-            getHandle().setPotionContents(new PotionContents(Optional.empty(), old.customColor(), old.customEffects(), old.customName()));
+            PotionContents old = this.getHandle().getPotionContents();
+            this.getHandle().setPotionContents(new PotionContents(Optional.empty(), old.customColor(), old.customEffects(), old.customName()));
         }
     }
 
     @Override
     public PotionType getBasePotionType() {
-        return getHandle().getPotionContents().potion().map(CraftPotionType::minecraftHolderToBukkit).orElse(null);
+        return this.getHandle().getPotionContents().potion().map(CraftPotionType::minecraftHolderToBukkit).orElse(null);
     }
 
     @Override
     public void setColor(Color color) {
         int colorRGB = (color == null) ? -1 : color.asRGB();
-        PotionContents old = getHandle().getPotionContents();
-        getHandle().setPotionContents(new PotionContents(old.potion(), Optional.of(colorRGB), old.customEffects(), old.customName()));
+        PotionContents old = this.getHandle().getPotionContents();
+        this.getHandle().setPotionContents(new PotionContents(old.potion(), Optional.of(colorRGB), old.customEffects(), old.customName()));
     }
 
     @Override
     public Color getColor() {
-        if (getHandle().getColor() <= -1) {
+        if (this.getHandle().getColor() <= -1) {
             return null;
         }
-        return Color.fromRGB(getHandle().getColor());
+        return Color.fromRGB(this.getHandle().getColor());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAxolotl.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAxolotl.java
index 366f573c0b..e730292edc 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAxolotl.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftAxolotl.java
@@ -22,23 +22,23 @@ public class CraftAxolotl extends CraftAnimals implements Axolotl {
 
     @Override
     public boolean isPlayingDead() {
-        return getHandle().isPlayingDead();
+        return this.getHandle().isPlayingDead();
     }
 
     @Override
     public void setPlayingDead(boolean playingDead) {
-        getHandle().setPlayingDead(playingDead);
+        this.getHandle().setPlayingDead(playingDead);
     }
 
     @Override
     public Variant getVariant() {
-        return Variant.values()[getHandle().getVariant().ordinal()];
+        return Variant.values()[this.getHandle().getVariant().ordinal()];
     }
 
     @Override
     public void setVariant(Variant variant) {
         Preconditions.checkArgument(variant != null, "variant");
 
-        getHandle().setVariant(net.minecraft.world.entity.animal.axolotl.Axolotl.Variant.byId(variant.ordinal()));
+        this.getHandle().setVariant(net.minecraft.world.entity.animal.axolotl.Axolotl.Variant.byId(variant.ordinal()));
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBat.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBat.java
index 5f633d633b..b0a3531476 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBat.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBat.java
@@ -1,17 +1,16 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.ambient.EntityBat;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Bat;
 
 public class CraftBat extends CraftAmbient implements Bat {
-    public CraftBat(CraftServer server, EntityBat entity) {
+    public CraftBat(CraftServer server, net.minecraft.world.entity.ambient.Bat entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityBat getHandle() {
-        return (EntityBat) entity;
+    public net.minecraft.world.entity.ambient.Bat getHandle() {
+        return (net.minecraft.world.entity.ambient.Bat) this.entity;
     }
 
     @Override
@@ -21,11 +20,11 @@ public class CraftBat extends CraftAmbient implements Bat {
 
     @Override
     public boolean isAwake() {
-        return !getHandle().isResting();
+        return !this.getHandle().isResting();
     }
 
     @Override
     public void setAwake(boolean state) {
-        getHandle().setResting(!state);
+        this.getHandle().setResting(!state);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBee.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBee.java
index 280706a32c..cfff1be6a4 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBee.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBee.java
@@ -1,8 +1,7 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.core.BlockPosition;
-import net.minecraft.world.entity.animal.EntityBee;
+import net.minecraft.core.BlockPos;
 import org.bukkit.Location;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.craftbukkit.util.CraftLocation;
@@ -10,13 +9,13 @@ import org.bukkit.entity.Bee;
 
 public class CraftBee extends CraftAnimals implements Bee {
 
-    public CraftBee(CraftServer server, EntityBee entity) {
+    public CraftBee(CraftServer server, net.minecraft.world.entity.animal.Bee entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityBee getHandle() {
-        return (EntityBee) entity;
+    public net.minecraft.world.entity.animal.Bee getHandle() {
+        return (net.minecraft.world.entity.animal.Bee) this.entity;
     }
 
     @Override
@@ -26,65 +25,65 @@ public class CraftBee extends CraftAnimals implements Bee {
 
     @Override
     public Location getHive() {
-        BlockPosition hive = getHandle().getHivePos();
-        return (hive == null) ? null : CraftLocation.toBukkit(hive, getWorld());
+        BlockPos hive = this.getHandle().getHivePos();
+        return (hive == null) ? null : CraftLocation.toBukkit(hive, this.getWorld());
     }
 
     @Override
     public void setHive(Location location) {
         Preconditions.checkArgument(location == null || this.getWorld().equals(location.getWorld()), "Hive must be in same world");
-        getHandle().hivePos = (location == null) ? null : CraftLocation.toBlockPosition(location);
+        this.getHandle().hivePos = (location == null) ? null : CraftLocation.toBlockPosition(location);
     }
 
     @Override
     public Location getFlower() {
-        BlockPosition flower = getHandle().getSavedFlowerPos();
-        return (flower == null) ? null : CraftLocation.toBukkit(flower, getWorld());
+        BlockPos flower = this.getHandle().getSavedFlowerPos();
+        return (flower == null) ? null : CraftLocation.toBukkit(flower, this.getWorld());
     }
 
     @Override
     public void setFlower(Location location) {
         Preconditions.checkArgument(location == null || this.getWorld().equals(location.getWorld()), "Flower must be in same world");
-        getHandle().setSavedFlowerPos(location == null ? null : CraftLocation.toBlockPosition(location));
+        this.getHandle().setSavedFlowerPos(location == null ? null : CraftLocation.toBlockPosition(location));
     }
 
     @Override
     public boolean hasNectar() {
-        return getHandle().hasNectar();
+        return this.getHandle().hasNectar();
     }
 
     @Override
     public void setHasNectar(boolean nectar) {
-        getHandle().setHasNectar(nectar);
+        this.getHandle().setHasNectar(nectar);
     }
 
     @Override
     public boolean hasStung() {
-        return getHandle().hasStung();
+        return this.getHandle().hasStung();
     }
 
     @Override
     public void setHasStung(boolean stung) {
-        getHandle().setHasStung(stung);
+        this.getHandle().setHasStung(stung);
     }
 
     @Override
     public int getAnger() {
-        return getHandle().getRemainingPersistentAngerTime();
+        return this.getHandle().getRemainingPersistentAngerTime();
     }
 
     @Override
     public void setAnger(int anger) {
-        getHandle().setRemainingPersistentAngerTime(anger);
+        this.getHandle().setRemainingPersistentAngerTime(anger);
     }
 
     @Override
     public int getCannotEnterHiveTicks() {
-        return getHandle().stayOutOfHiveCountdown;
+        return this.getHandle().stayOutOfHiveCountdown;
     }
 
     @Override
     public void setCannotEnterHiveTicks(int ticks) {
-        getHandle().setStayOutOfHiveCountdown(ticks);
+        this.getHandle().setStayOutOfHiveCountdown(ticks);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBlaze.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBlaze.java
index 973d8b8988..a4c9c73691 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBlaze.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBlaze.java
@@ -1,17 +1,16 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntityBlaze;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Blaze;
 
 public class CraftBlaze extends CraftMonster implements Blaze {
-    public CraftBlaze(CraftServer server, EntityBlaze entity) {
+    public CraftBlaze(CraftServer server, net.minecraft.world.entity.monster.Blaze entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityBlaze getHandle() {
-        return (EntityBlaze) entity;
+    public net.minecraft.world.entity.monster.Blaze getHandle() {
+        return (net.minecraft.world.entity.monster.Blaze) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBlockAttachedEntity.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBlockAttachedEntity.java
index d26d4a5027..5b0dd9aae3 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBlockAttachedEntity.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBlockAttachedEntity.java
@@ -10,7 +10,7 @@ public class CraftBlockAttachedEntity extends CraftEntity {
 
     @Override
     public BlockAttachedEntity getHandle() {
-        return (BlockAttachedEntity) entity;
+        return (BlockAttachedEntity) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBlockDisplay.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBlockDisplay.java
index a2095d5ded..dd91de8f24 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBlockDisplay.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBlockDisplay.java
@@ -24,13 +24,13 @@ public class CraftBlockDisplay extends CraftDisplay implements BlockDisplay {
 
     @Override
     public BlockData getBlock() {
-        return CraftBlockData.fromData(getHandle().getBlockState());
+        return CraftBlockData.fromData(this.getHandle().getBlockState());
     }
 
     @Override
     public void setBlock(BlockData block) {
         Preconditions.checkArgument(block != null, "Block cannot be null");
 
-        getHandle().setBlockState(((CraftBlockData) block).getState());
+        this.getHandle().setBlockState(((CraftBlockData) block).getState());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java
index d92cc51ec8..eaa46bf595 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBoat.java
@@ -1,9 +1,8 @@
 package org.bukkit.craftbukkit.entity;
 
 import java.util.stream.Collectors;
-import net.minecraft.world.entity.EntityTypes;
+import net.minecraft.world.entity.EntityType;
 import net.minecraft.world.entity.vehicle.AbstractBoat;
-import net.minecraft.world.entity.vehicle.EntityBoat;
 import org.bukkit.TreeSpecies;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Boat;
@@ -17,7 +16,7 @@ public abstract class CraftBoat extends CraftVehicle implements Boat {
 
     @Override
     public TreeSpecies getWoodType() {
-        return getTreeSpecies(getHandle().getType());
+        return CraftBoat.getTreeSpecies(this.getHandle().getType());
     }
 
     @Override
@@ -27,7 +26,7 @@ public abstract class CraftBoat extends CraftVehicle implements Boat {
 
     @Override
     public Type getBoatType() {
-        return boatTypeFromNms(getHandle().getType());
+        return CraftBoat.boatTypeFromNms(this.getHandle().getType());
     }
 
     @Override
@@ -37,104 +36,104 @@ public abstract class CraftBoat extends CraftVehicle implements Boat {
 
     @Override
     public double getMaxSpeed() {
-        return getHandle().maxSpeed;
+        return this.getHandle().maxSpeed;
     }
 
     @Override
     public void setMaxSpeed(double speed) {
         if (speed >= 0D) {
-            getHandle().maxSpeed = speed;
+            this.getHandle().maxSpeed = speed;
         }
     }
 
     @Override
     public double getOccupiedDeceleration() {
-        return getHandle().occupiedDeceleration;
+        return this.getHandle().occupiedDeceleration;
     }
 
     @Override
     public void setOccupiedDeceleration(double speed) {
         if (speed >= 0D) {
-            getHandle().occupiedDeceleration = speed;
+            this.getHandle().occupiedDeceleration = speed;
         }
     }
 
     @Override
     public double getUnoccupiedDeceleration() {
-        return getHandle().unoccupiedDeceleration;
+        return this.getHandle().unoccupiedDeceleration;
     }
 
     @Override
     public void setUnoccupiedDeceleration(double speed) {
-        getHandle().unoccupiedDeceleration = speed;
+        this.getHandle().unoccupiedDeceleration = speed;
     }
 
     @Override
     public boolean getWorkOnLand() {
-        return getHandle().landBoats;
+        return this.getHandle().landBoats;
     }
 
     @Override
     public void setWorkOnLand(boolean workOnLand) {
-        getHandle().landBoats = workOnLand;
+        this.getHandle().landBoats = workOnLand;
     }
 
     @Override
     public Status getStatus() {
-        return boatStatusFromNms(getHandle().status);
+        return CraftBoat.boatStatusFromNms(this.getHandle().status);
     }
 
     @Override
     public AbstractBoat getHandle() {
-        return (AbstractBoat) entity;
+        return (AbstractBoat) this.entity;
     }
 
     @Override
     public String toString() {
-        return "CraftBoat{boatType=" + getBoatType() + ",status=" + getStatus() + ",passengers=" + getPassengers().stream().map(Entity::toString).collect(Collectors.joining("-", "{", "}")) + "}";
+        return "CraftBoat{boatType=" + this.getBoatType() + ",status=" + this.getStatus() + ",passengers=" + this.getPassengers().stream().map(Entity::toString).collect(Collectors.joining("-", "{", "}")) + "}";
     }
 
-    public static Boat.Type boatTypeFromNms(EntityTypes<?> boatType) {
-        if (boatType == EntityTypes.OAK_BOAT || boatType == EntityTypes.OAK_CHEST_BOAT) {
+    public static Boat.Type boatTypeFromNms(EntityType<?> boatType) {
+        if (boatType == EntityType.OAK_BOAT || boatType == EntityType.OAK_CHEST_BOAT) {
             return Type.OAK;
         }
 
-        if (boatType == EntityTypes.BIRCH_BOAT || boatType == EntityTypes.BIRCH_CHEST_BOAT) {
+        if (boatType == EntityType.BIRCH_BOAT || boatType == EntityType.BIRCH_CHEST_BOAT) {
             return Type.BIRCH;
         }
 
-        if (boatType == EntityTypes.ACACIA_BOAT || boatType == EntityTypes.ACACIA_CHEST_BOAT) {
+        if (boatType == EntityType.ACACIA_BOAT || boatType == EntityType.ACACIA_CHEST_BOAT) {
             return Type.ACACIA;
         }
 
-        if (boatType == EntityTypes.CHERRY_BOAT || boatType == EntityTypes.CHERRY_CHEST_BOAT) {
+        if (boatType == EntityType.CHERRY_BOAT || boatType == EntityType.CHERRY_CHEST_BOAT) {
             return Type.CHERRY;
         }
 
-        if (boatType == EntityTypes.JUNGLE_BOAT || boatType == EntityTypes.JUNGLE_CHEST_BOAT) {
+        if (boatType == EntityType.JUNGLE_BOAT || boatType == EntityType.JUNGLE_CHEST_BOAT) {
             return Type.JUNGLE;
         }
 
-        if (boatType == EntityTypes.SPRUCE_BOAT || boatType == EntityTypes.SPRUCE_CHEST_BOAT) {
+        if (boatType == EntityType.SPRUCE_BOAT || boatType == EntityType.SPRUCE_CHEST_BOAT) {
             return Type.SPRUCE;
         }
 
-        if (boatType == EntityTypes.DARK_OAK_BOAT || boatType == EntityTypes.DARK_OAK_CHEST_BOAT) {
+        if (boatType == EntityType.DARK_OAK_BOAT || boatType == EntityType.DARK_OAK_CHEST_BOAT) {
             return Type.DARK_OAK;
         }
 
-        if (boatType == EntityTypes.MANGROVE_BOAT || boatType == EntityTypes.MANGROVE_CHEST_BOAT) {
+        if (boatType == EntityType.MANGROVE_BOAT || boatType == EntityType.MANGROVE_CHEST_BOAT) {
             return Type.MANGROVE;
         }
 
-        if (boatType == EntityTypes.BAMBOO_RAFT || boatType == EntityTypes.BAMBOO_CHEST_RAFT) {
+        if (boatType == EntityType.BAMBOO_RAFT || boatType == EntityType.BAMBOO_CHEST_RAFT) {
             return Type.BAMBOO;
         }
 
         throw new EnumConstantNotPresentException(Type.class, boatType.toString());
     }
 
-    public static Status boatStatusFromNms(EntityBoat.EnumStatus enumStatus) {
+    public static Status boatStatusFromNms(net.minecraft.world.entity.vehicle.Boat.EnumStatus enumStatus) {
         return switch (enumStatus) {
             default -> throw new EnumConstantNotPresentException(Status.class, enumStatus.name());
             case IN_AIR -> Status.IN_AIR;
@@ -146,24 +145,24 @@ public abstract class CraftBoat extends CraftVehicle implements Boat {
     }
 
     @Deprecated
-    public static TreeSpecies getTreeSpecies(EntityTypes<?> boatType) {
-        if (boatType == EntityTypes.SPRUCE_BOAT || boatType == EntityTypes.SPRUCE_CHEST_BOAT) {
+    public static TreeSpecies getTreeSpecies(EntityType<?> boatType) {
+        if (boatType == EntityType.SPRUCE_BOAT || boatType == EntityType.SPRUCE_CHEST_BOAT) {
             return TreeSpecies.REDWOOD;
         }
 
-        if (boatType == EntityTypes.BIRCH_BOAT || boatType == EntityTypes.BIRCH_CHEST_BOAT) {
+        if (boatType == EntityType.BIRCH_BOAT || boatType == EntityType.BIRCH_CHEST_BOAT) {
             return TreeSpecies.BIRCH;
         }
 
-        if (boatType == EntityTypes.JUNGLE_BOAT || boatType == EntityTypes.JUNGLE_CHEST_BOAT) {
+        if (boatType == EntityType.JUNGLE_BOAT || boatType == EntityType.JUNGLE_CHEST_BOAT) {
             return TreeSpecies.JUNGLE;
         }
 
-        if (boatType == EntityTypes.ACACIA_BOAT || boatType == EntityTypes.ACACIA_CHEST_BOAT) {
+        if (boatType == EntityType.ACACIA_BOAT || boatType == EntityType.ACACIA_CHEST_BOAT) {
             return TreeSpecies.ACACIA;
         }
 
-        if (boatType == EntityTypes.DARK_OAK_BOAT || boatType == EntityTypes.DARK_OAK_CHEST_BOAT) {
+        if (boatType == EntityType.DARK_OAK_BOAT || boatType == EntityType.DARK_OAK_CHEST_BOAT) {
             return TreeSpecies.DARK_OAK;
         }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBogged.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBogged.java
index aac6d15380..0139e85c07 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBogged.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBogged.java
@@ -12,7 +12,7 @@ public class CraftBogged extends CraftAbstractSkeleton implements Bogged {
 
     @Override
     public net.minecraft.world.entity.monster.Bogged getHandle() {
-        return (net.minecraft.world.entity.monster.Bogged) entity;
+        return (net.minecraft.world.entity.monster.Bogged) this.entity;
     }
 
     @Override
@@ -27,11 +27,11 @@ public class CraftBogged extends CraftAbstractSkeleton implements Bogged {
 
     @Override
     public boolean isSheared() {
-        return getHandle().isSheared();
+        return this.getHandle().isSheared();
     }
 
     @Override
     public void setSheared(boolean flag) {
-        getHandle().setSheared(flag);
+        this.getHandle().setSheared(flag);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBreeze.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBreeze.java
index 7223fabab6..7648e2c700 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBreeze.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftBreeze.java
@@ -1,6 +1,5 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.EntityLiving;
 import net.minecraft.world.entity.ai.memory.MemoryModuleType;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Breeze;
@@ -14,13 +13,13 @@ public class CraftBreeze extends CraftMonster implements Breeze {
 
     @Override
     public net.minecraft.world.entity.monster.breeze.Breeze getHandle() {
-        return (net.minecraft.world.entity.monster.breeze.Breeze) entity;
+        return (net.minecraft.world.entity.monster.breeze.Breeze) this.entity;
     }
 
     @Override
     public void setTarget(LivingEntity target) {
         super.setTarget(target);
-        EntityLiving entityLivingTarget = (target instanceof CraftLivingEntity craftLivingEntity) ? craftLivingEntity.getHandle() : null;
+        net.minecraft.world.entity.LivingEntity entityLivingTarget = (target instanceof CraftLivingEntity craftLivingEntity) ? craftLivingEntity.getHandle() : null;
         this.getHandle().getBrain().setMemory(MemoryModuleType.ATTACK_TARGET, entityLivingTarget); // SPIGOT-7957: We need override memory for set target and trigger attack behaviours
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCamel.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCamel.java
index ee0727ce6c..80e571c977 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCamel.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCamel.java
@@ -1,6 +1,6 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.EntityPose;
+import net.minecraft.world.entity.Pose;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Camel;
 import org.bukkit.entity.Horse;
@@ -28,25 +28,25 @@ public class CraftCamel extends CraftAbstractHorse implements Camel {
 
     @Override
     public boolean isDashing() {
-        return getHandle().isDashing();
+        return this.getHandle().isDashing();
     }
 
     @Override
     public void setDashing(boolean dashing) {
-        getHandle().setDashing(dashing);
+        this.getHandle().setDashing(dashing);
     }
 
     @Override
     public boolean isSitting() {
-        return getHandle().getPose() == EntityPose.SITTING;
+        return this.getHandle().getPose() == Pose.SITTING;
     }
 
     @Override
     public void setSitting(boolean sitting) {
         if (sitting) {
-            getHandle().sitDown();
+            this.getHandle().sitDown();
         } else {
-            getHandle().standUp();
+            this.getHandle().standUp();
         }
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java
index 221bf57e94..5766412496 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCat.java
@@ -5,8 +5,6 @@ import java.util.Locale;
 import net.minecraft.core.Holder;
 import net.minecraft.core.registries.Registries;
 import net.minecraft.world.entity.animal.CatVariant;
-import net.minecraft.world.entity.animal.EntityCat;
-import net.minecraft.world.item.EnumColor;
 import org.bukkit.DyeColor;
 import org.bukkit.NamespacedKey;
 import org.bukkit.Registry;
@@ -17,13 +15,13 @@ import org.bukkit.entity.Cat;
 
 public class CraftCat extends CraftTameableAnimal implements Cat {
 
-    public CraftCat(CraftServer server, EntityCat entity) {
+    public CraftCat(CraftServer server, net.minecraft.world.entity.animal.Cat entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityCat getHandle() {
-        return (EntityCat) super.getHandle();
+    public net.minecraft.world.entity.animal.Cat getHandle() {
+        return (net.minecraft.world.entity.animal.Cat) super.getHandle();
     }
 
     @Override
@@ -33,24 +31,24 @@ public class CraftCat extends CraftTameableAnimal implements Cat {
 
     @Override
     public Type getCatType() {
-        return CraftType.minecraftHolderToBukkit(getHandle().getVariant());
+        return CraftType.minecraftHolderToBukkit(this.getHandle().getVariant());
     }
 
     @Override
     public void setCatType(Type type) {
         Preconditions.checkArgument(type != null, "Cannot have null Type");
 
-        getHandle().setVariant(CraftType.bukkitToMinecraftHolder(type));
+        this.getHandle().setVariant(CraftType.bukkitToMinecraftHolder(type));
     }
 
     @Override
     public DyeColor getCollarColor() {
-        return DyeColor.getByWoolData((byte) getHandle().getCollarColor().getId());
+        return DyeColor.getByWoolData((byte) this.getHandle().getCollarColor().getId());
     }
 
     @Override
     public void setCollarColor(DyeColor color) {
-        getHandle().setCollarColor(EnumColor.byId(color.getWoolData()));
+        this.getHandle().setCollarColor(net.minecraft.world.item.DyeColor.byId(color.getWoolData()));
     }
 
     public static class CraftType implements Type, Handleable<CatVariant> {
@@ -61,7 +59,7 @@ public class CraftCat extends CraftTameableAnimal implements Cat {
         }
 
         public static Type minecraftHolderToBukkit(Holder<CatVariant> minecraft) {
-            return minecraftToBukkit(minecraft.value());
+            return CraftType.minecraftToBukkit(minecraft.value());
         }
 
         public static CatVariant bukkitToMinecraft(Type bukkit) {
@@ -89,38 +87,38 @@ public class CraftCat extends CraftTameableAnimal implements Cat {
             } else {
                 this.name = key.toString();
             }
-            this.ordinal = count++;
+            this.ordinal = CraftType.count++;
         }
 
         @Override
         public CatVariant getHandle() {
-            return catVariant;
+            return this.catVariant;
         }
 
         @Override
         public NamespacedKey getKey() {
-            return key;
+            return this.key;
         }
 
         @Override
         public int compareTo(Type variant) {
-            return ordinal - variant.ordinal();
+            return this.ordinal - variant.ordinal();
         }
 
         @Override
         public String name() {
-            return name;
+            return this.name;
         }
 
         @Override
         public int ordinal() {
-            return ordinal;
+            return this.ordinal;
         }
 
         @Override
         public String toString() {
             // For backwards compatibility
-            return name();
+            return this.name();
         }
 
         @Override
@@ -133,12 +131,12 @@ public class CraftCat extends CraftTameableAnimal implements Cat {
                 return false;
             }
 
-            return getKey().equals(((CraftType) other).getKey());
+            return this.getKey().equals(((CraftType) other).getKey());
         }
 
         @Override
         public int hashCode() {
-            return getKey().hashCode();
+            return this.getKey().hashCode();
         }
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCaveSpider.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCaveSpider.java
index bc780cd073..4f661fbdb8 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCaveSpider.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCaveSpider.java
@@ -1,17 +1,16 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntityCaveSpider;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.CaveSpider;
 
 public class CraftCaveSpider extends CraftSpider implements CaveSpider {
-    public CraftCaveSpider(CraftServer server, EntityCaveSpider entity) {
+    public CraftCaveSpider(CraftServer server, net.minecraft.world.entity.monster.CaveSpider entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityCaveSpider getHandle() {
-        return (EntityCaveSpider) entity;
+    public net.minecraft.world.entity.monster.CaveSpider getHandle() {
+        return (net.minecraft.world.entity.monster.CaveSpider) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java
index a359e8a26e..62accb5513 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftChestBoat.java
@@ -13,12 +13,12 @@ public abstract class CraftChestBoat extends CraftBoat implements org.bukkit.ent
 
     public CraftChestBoat(CraftServer server, AbstractChestBoat entity) {
         super(server, entity);
-        inventory = new CraftInventory(entity);
+        this.inventory = new CraftInventory(entity);
     }
 
     @Override
     public AbstractChestBoat getHandle() {
-        return (AbstractChestBoat) entity;
+        return (AbstractChestBoat) this.entity;
     }
 
     @Override
@@ -28,31 +28,31 @@ public abstract class CraftChestBoat extends CraftBoat implements org.bukkit.ent
 
     @Override
     public Inventory getInventory() {
-        return inventory;
+        return this.inventory;
     }
 
     @Override
     public void setLootTable(LootTable table) {
-        setLootTable(table, getSeed());
+        this.setLootTable(table, this.getSeed());
     }
 
     @Override
     public LootTable getLootTable() {
-        return CraftLootTable.minecraftToBukkit(getHandle().getContainerLootTable());
+        return CraftLootTable.minecraftToBukkit(this.getHandle().getContainerLootTable());
     }
 
     @Override
     public void setSeed(long seed) {
-        setLootTable(getLootTable(), seed);
+        this.setLootTable(this.getLootTable(), seed);
     }
 
     @Override
     public long getSeed() {
-        return getHandle().getContainerLootTableSeed();
+        return this.getHandle().getContainerLootTableSeed();
     }
 
     private void setLootTable(LootTable table, long seed) {
-        getHandle().setContainerLootTable(CraftLootTable.bukkitToMinecraft(table));
-        getHandle().setContainerLootTableSeed(seed);
+        this.getHandle().setContainerLootTable(CraftLootTable.bukkitToMinecraft(table));
+        this.getHandle().setContainerLootTableSeed(seed);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftChestedHorse.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftChestedHorse.java
index 723a429a9b..40ee96e31d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftChestedHorse.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftChestedHorse.java
@@ -1,29 +1,29 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.animal.horse.EntityHorseChestedAbstract;
+import net.minecraft.world.entity.animal.horse.AbstractChestedHorse;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.ChestedHorse;
 
 public abstract class CraftChestedHorse extends CraftAbstractHorse implements ChestedHorse {
 
-    public CraftChestedHorse(CraftServer server, EntityHorseChestedAbstract entity) {
+    public CraftChestedHorse(CraftServer server, AbstractChestedHorse entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityHorseChestedAbstract getHandle() {
-        return (EntityHorseChestedAbstract) super.getHandle();
+    public AbstractChestedHorse getHandle() {
+        return (AbstractChestedHorse) super.getHandle();
     }
 
     @Override
     public boolean isCarryingChest() {
-        return getHandle().hasChest();
+        return this.getHandle().hasChest();
     }
 
     @Override
     public void setCarryingChest(boolean chest) {
-        if (chest == isCarryingChest()) return;
-        getHandle().setChest(chest);
-        getHandle().createInventory();
+        if (chest == this.isCarryingChest()) return;
+        this.getHandle().setChest(chest);
+        this.getHandle().createInventory();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftChicken.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftChicken.java
index 0cd521678e..64b75682a9 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftChicken.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftChicken.java
@@ -1,18 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.animal.EntityChicken;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Chicken;
 
 public class CraftChicken extends CraftAnimals implements Chicken {
 
-    public CraftChicken(CraftServer server, EntityChicken entity) {
+    public CraftChicken(CraftServer server, net.minecraft.world.entity.animal.Chicken entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityChicken getHandle() {
-        return (EntityChicken) entity;
+    public net.minecraft.world.entity.animal.Chicken getHandle() {
+        return (net.minecraft.world.entity.animal.Chicken) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCod.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCod.java
index a656284231..fa0bf7db88 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCod.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCod.java
@@ -1,18 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.animal.EntityCod;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Cod;
 
 public class CraftCod extends CraftFish implements Cod {
 
-    public CraftCod(CraftServer server, EntityCod entity) {
+    public CraftCod(CraftServer server, net.minecraft.world.entity.animal.Cod entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityCod getHandle() {
-        return (EntityCod) super.getHandle();
+    public net.minecraft.world.entity.animal.Cod getHandle() {
+        return (net.minecraft.world.entity.animal.Cod) super.getHandle();
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexPart.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexPart.java
index 6b43294c66..c2583982d8 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexPart.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftComplexPart.java
@@ -1,40 +1,40 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.boss.EntityComplexPart;
-import net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon;
+import net.minecraft.world.entity.boss.EnderDragonPart;
+import net.minecraft.world.entity.boss.enderdragon.EnderDragon;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.ComplexEntityPart;
 import org.bukkit.entity.ComplexLivingEntity;
 import org.bukkit.event.entity.EntityDamageEvent;
 
 public class CraftComplexPart extends CraftEntity implements ComplexEntityPart {
-    public CraftComplexPart(CraftServer server, EntityComplexPart entity) {
+    public CraftComplexPart(CraftServer server, EnderDragonPart entity) {
         super(server, entity);
     }
 
     @Override
     public ComplexLivingEntity getParent() {
-        return (ComplexLivingEntity) ((EntityEnderDragon) getHandle().parentMob).getBukkitEntity();
+        return (ComplexLivingEntity) ((EnderDragon) this.getHandle().parentMob).getBukkitEntity();
     }
 
     @Override
     public void setLastDamageCause(EntityDamageEvent cause) {
-        getParent().setLastDamageCause(cause);
+        this.getParent().setLastDamageCause(cause);
     }
 
     @Override
     public EntityDamageEvent getLastDamageCause() {
-        return getParent().getLastDamageCause();
+        return this.getParent().getLastDamageCause();
     }
 
     @Override
     public boolean isValid() {
-        return getParent().isValid();
+        return this.getParent().isValid();
     }
 
     @Override
-    public EntityComplexPart getHandle() {
-        return (EntityComplexPart) entity;
+    public EnderDragonPart getHandle() {
+        return (EnderDragonPart) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCow.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCow.java
index ac0143a69b..7babc404e4 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCow.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCow.java
@@ -1,18 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.animal.EntityCow;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Cow;
 
 public class CraftCow extends CraftAnimals implements Cow {
 
-    public CraftCow(CraftServer server, EntityCow entity) {
+    public CraftCow(CraftServer server, net.minecraft.world.entity.animal.Cow entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityCow getHandle() {
-        return (EntityCow) entity;
+    public net.minecraft.world.entity.animal.Cow getHandle() {
+        return (net.minecraft.world.entity.animal.Cow) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCreaking.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCreaking.java
index a896da43b8..267f3c8505 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCreaking.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCreaking.java
@@ -11,7 +11,7 @@ public class CraftCreaking extends CraftMonster implements org.bukkit.entity.Cre
 
     @Override
     public Creaking getHandle() {
-        return (Creaking) entity;
+        return (Creaking) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java
index b9f2e5e8ae..664d9c1793 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCreature.java
@@ -1,17 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.EntityCreature;
+import net.minecraft.world.entity.PathfinderMob;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Creature;
 
 public class CraftCreature extends CraftMob implements Creature {
-    public CraftCreature(CraftServer server, EntityCreature entity) {
+    public CraftCreature(CraftServer server, PathfinderMob entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityCreature getHandle() {
-        return (EntityCreature) entity;
+    public PathfinderMob getHandle() {
+        return (PathfinderMob) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java
index fd3adff544..15bd44f8bd 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftCreeper.java
@@ -1,7 +1,6 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.monster.EntityCreeper;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Creeper;
 import org.bukkit.entity.Entity;
@@ -9,13 +8,13 @@ import org.bukkit.event.entity.CreeperPowerEvent;
 
 public class CraftCreeper extends CraftMonster implements Creeper {
 
-    public CraftCreeper(CraftServer server, EntityCreeper entity) {
+    public CraftCreeper(CraftServer server, net.minecraft.world.entity.monster.Creeper entity) {
         super(server, entity);
     }
 
     @Override
     public boolean isPowered() {
-        return getHandle().isPowered();
+        return this.getHandle().isPowered();
     }
 
     @Override
@@ -23,14 +22,14 @@ public class CraftCreeper extends CraftMonster implements Creeper {
         CreeperPowerEvent.PowerCause cause = powered ? CreeperPowerEvent.PowerCause.SET_ON : CreeperPowerEvent.PowerCause.SET_OFF;
 
         // only call event when we are not in world generation
-        if (getHandle().generation || !callPowerEvent(cause)) {
-            getHandle().setPowered(powered);
+        if (this.getHandle().generation || !this.callPowerEvent(cause)) {
+            this.getHandle().setPowered(powered);
         }
     }
 
     private boolean callPowerEvent(CreeperPowerEvent.PowerCause cause) {
-        CreeperPowerEvent event = new CreeperPowerEvent((Creeper) getHandle().getBukkitEntity(), cause);
-        server.getPluginManager().callEvent(event);
+        CreeperPowerEvent event = new CreeperPowerEvent((Creeper) this.getHandle().getBukkitEntity(), cause);
+        this.server.getPluginManager().callEvent(event);
         return event.isCancelled();
     }
 
@@ -38,64 +37,64 @@ public class CraftCreeper extends CraftMonster implements Creeper {
     public void setMaxFuseTicks(int ticks) {
         Preconditions.checkArgument(ticks >= 0, "ticks < 0");
 
-        getHandle().maxSwell = ticks;
+        this.getHandle().maxSwell = ticks;
     }
 
     @Override
     public int getMaxFuseTicks() {
-        return getHandle().maxSwell;
+        return this.getHandle().maxSwell;
     }
 
     @Override
     public void setFuseTicks(int ticks) {
         Preconditions.checkArgument(ticks >= 0, "ticks < 0");
-        Preconditions.checkArgument(ticks <= getMaxFuseTicks(), "ticks > maxFuseTicks");
+        Preconditions.checkArgument(ticks <= this.getMaxFuseTicks(), "ticks > maxFuseTicks");
 
-        getHandle().swell = ticks;
+        this.getHandle().swell = ticks;
     }
 
     @Override
     public int getFuseTicks() {
-        return getHandle().swell;
+        return this.getHandle().swell;
     }
 
     @Override
     public void setExplosionRadius(int radius) {
         Preconditions.checkArgument(radius >= 0, "radius < 0");
 
-        getHandle().explosionRadius = radius;
+        this.getHandle().explosionRadius = radius;
     }
 
     @Override
     public int getExplosionRadius() {
-        return getHandle().explosionRadius;
+        return this.getHandle().explosionRadius;
     }
 
     @Override
     public void explode() {
-        getHandle().explodeCreeper();
+        this.getHandle().explodeCreeper();
     }
 
     @Override
     public void ignite(Entity entity) {
         Preconditions.checkNotNull(entity, "entity cannot be null");
-        getHandle().entityIgniter = ((CraftEntity) entity).getHandle();
-        getHandle().ignite();
+        this.getHandle().entityIgniter = ((CraftEntity) entity).getHandle();
+        this.getHandle().ignite();
     }
 
     @Override
     public void ignite() {
-        getHandle().ignite();
+        this.getHandle().ignite();
     }
 
     @Override
     public Entity getIgniter() {
-        return (getHandle().entityIgniter != null) ? getHandle().entityIgniter.getBukkitEntity() : null;
+        return (this.getHandle().entityIgniter != null) ? this.getHandle().entityIgniter.getBukkitEntity() : null;
     }
 
     @Override
-    public EntityCreeper getHandle() {
-        return (EntityCreeper) entity;
+    public net.minecraft.world.entity.monster.Creeper getHandle() {
+        return (net.minecraft.world.entity.monster.Creeper) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftDisplay.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftDisplay.java
index 0f70d076ef..48eeb1d9ba 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftDisplay.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftDisplay.java
@@ -24,7 +24,7 @@ public class CraftDisplay extends CraftEntity implements Display {
 
     @Override
     public Transformation getTransformation() {
-        com.mojang.math.Transformation nms = net.minecraft.world.entity.Display.createTransformation(getHandle().getEntityData());
+        com.mojang.math.Transformation nms = net.minecraft.world.entity.Display.createTransformation(this.getHandle().getEntityData());
 
         return new Transformation(nms.getTranslation(), nms.getLeftRotation(), nms.getScale(), nms.getRightRotation());
     }
@@ -33,24 +33,24 @@ public class CraftDisplay extends CraftEntity implements Display {
     public void setTransformation(Transformation transformation) {
         Preconditions.checkArgument(transformation != null, "Transformation cannot be null");
 
-        getHandle().setTransformation(new com.mojang.math.Transformation(transformation.getTranslation(), transformation.getLeftRotation(), transformation.getScale(), transformation.getRightRotation()));
+        this.getHandle().setTransformation(new com.mojang.math.Transformation(transformation.getTranslation(), transformation.getLeftRotation(), transformation.getScale(), transformation.getRightRotation()));
     }
 
     @Override
     public void setTransformationMatrix(org.joml.Matrix4f transformationMatrix) {
         Preconditions.checkArgument(transformationMatrix != null, "Transformation matrix cannot be null");
 
-        getHandle().setTransformation(new com.mojang.math.Transformation(transformationMatrix));
+        this.getHandle().setTransformation(new com.mojang.math.Transformation(transformationMatrix));
     }
 
     @Override
     public int getInterpolationDuration() {
-        return getHandle().getTransformationInterpolationDuration();
+        return this.getHandle().getTransformationInterpolationDuration();
     }
 
     @Override
     public void setInterpolationDuration(int duration) {
-        getHandle().setTransformationInterpolationDuration(duration);
+        this.getHandle().setTransformationInterpolationDuration(duration);
     }
 
     @Override
@@ -66,79 +66,79 @@ public class CraftDisplay extends CraftEntity implements Display {
 
     @Override
     public float getViewRange() {
-        return getHandle().getViewRange();
+        return this.getHandle().getViewRange();
     }
 
     @Override
     public void setViewRange(float range) {
-        getHandle().setViewRange(range);
+        this.getHandle().setViewRange(range);
     }
 
     @Override
     public float getShadowRadius() {
-        return getHandle().getShadowRadius();
+        return this.getHandle().getShadowRadius();
     }
 
     @Override
     public void setShadowRadius(float radius) {
-        getHandle().setShadowRadius(radius);
+        this.getHandle().setShadowRadius(radius);
     }
 
     @Override
     public float getShadowStrength() {
-        return getHandle().getShadowStrength();
+        return this.getHandle().getShadowStrength();
     }
 
     @Override
     public void setShadowStrength(float strength) {
-        getHandle().setShadowStrength(strength);
+        this.getHandle().setShadowStrength(strength);
     }
 
     @Override
     public float getDisplayWidth() {
-        return getHandle().getWidth();
+        return this.getHandle().getWidth();
     }
 
     @Override
     public void setDisplayWidth(float width) {
-        getHandle().setWidth(width);
+        this.getHandle().setWidth(width);
     }
 
     @Override
     public float getDisplayHeight() {
-        return getHandle().getHeight();
+        return this.getHandle().getHeight();
     }
 
     @Override
     public void setDisplayHeight(float height) {
-        getHandle().setHeight(height);
+        this.getHandle().setHeight(height);
     }
 
     @Override
     public int getInterpolationDelay() {
-        return getHandle().getTransformationInterpolationDelay();
+        return this.getHandle().getTransformationInterpolationDelay();
     }
 
     @Override
     public void setInterpolationDelay(int ticks) {
-        getHandle().setTransformationInterpolationDelay(ticks);
+        this.getHandle().setTransformationInterpolationDelay(ticks);
     }
 
     @Override
     public Billboard getBillboard() {
-        return Billboard.valueOf(getHandle().getBillboardConstraints().name());
+        return Billboard.valueOf(this.getHandle().getBillboardConstraints().name());
     }
 
     @Override
     public void setBillboard(Billboard billboard) {
         Preconditions.checkArgument(billboard != null, "Billboard cannot be null");
 
-        getHandle().setBillboardConstraints(net.minecraft.world.entity.Display.BillboardConstraints.valueOf(billboard.name()));
+        this.getHandle().setBillboardConstraints(net.minecraft.world.entity.Display.BillboardConstraints.valueOf(billboard.name()));
     }
 
     @Override
     public Color getGlowColorOverride() {
-        int color = getHandle().getGlowColorOverride();
+        int color = this.getHandle().getGlowColorOverride();
 
         return (color == -1) ? null : Color.fromARGB(color);
     }
@@ -146,15 +146,15 @@ public class CraftDisplay extends CraftEntity implements Display {
     @Override
     public void setGlowColorOverride(Color color) {
         if (color == null) {
-            getHandle().setGlowColorOverride(-1);
+            this.getHandle().setGlowColorOverride(-1);
         } else {
-            getHandle().setGlowColorOverride(color.asARGB());
+            this.getHandle().setGlowColorOverride(color.asARGB());
         }
     }
 
     @Override
     public Brightness getBrightness() {
-        net.minecraft.util.Brightness nms = getHandle().getBrightnessOverride();
+        net.minecraft.util.Brightness nms = this.getHandle().getBrightnessOverride();
 
         return (nms != null) ? new Brightness(nms.block(), nms.sky()) : null;
     }
@@ -162,9 +162,9 @@ public class CraftDisplay extends CraftEntity implements Display {
     @Override
     public void setBrightness(Brightness brightness) {
         if (brightness != null) {
-            getHandle().setBrightnessOverride(new net.minecraft.util.Brightness(brightness.getBlockLight(), brightness.getSkyLight()));
+            this.getHandle().setBrightnessOverride(new net.minecraft.util.Brightness(brightness.getBlockLight(), brightness.getSkyLight()));
         } else {
-            getHandle().setBrightnessOverride(null);
+            this.getHandle().setBrightnessOverride(null);
         }
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftDolphin.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftDolphin.java
index 13ee061e14..5bae70ad16 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftDolphin.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftDolphin.java
@@ -1,18 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.animal.EntityDolphin;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Dolphin;
 
 public class CraftDolphin extends CraftAgeable implements Dolphin {
 
-    public CraftDolphin(CraftServer server, EntityDolphin entity) {
+    public CraftDolphin(CraftServer server, net.minecraft.world.entity.animal.Dolphin entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityDolphin getHandle() {
-        return (EntityDolphin) super.getHandle();
+    public net.minecraft.world.entity.animal.Dolphin getHandle() {
+        return (net.minecraft.world.entity.animal.Dolphin) super.getHandle();
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftDonkey.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftDonkey.java
index 9b534229dd..955a1c92a9 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftDonkey.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftDonkey.java
@@ -1,13 +1,12 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.animal.horse.EntityHorseDonkey;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Donkey;
 import org.bukkit.entity.Horse.Variant;
 
 public class CraftDonkey extends CraftChestedHorse implements Donkey {
 
-    public CraftDonkey(CraftServer server, EntityHorseDonkey entity) {
+    public CraftDonkey(CraftServer server, net.minecraft.world.entity.animal.horse.Donkey entity) {
         super(server, entity);
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftDragonFireball.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftDragonFireball.java
index 1ab864f3e8..b884c6b080 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftDragonFireball.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftDragonFireball.java
@@ -1,11 +1,10 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.projectile.EntityDragonFireball;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.DragonFireball;
 
 public class CraftDragonFireball extends CraftFireball implements DragonFireball {
-    public CraftDragonFireball(CraftServer server, EntityDragonFireball entity) {
+    public CraftDragonFireball(CraftServer server, net.minecraft.world.entity.projectile.DragonFireball entity) {
         super(server, entity);
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftDrowned.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftDrowned.java
index ea524837ec..c0e59845a7 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftDrowned.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftDrowned.java
@@ -1,18 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntityDrowned;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Drowned;
 
 public class CraftDrowned extends CraftZombie implements Drowned {
 
-    public CraftDrowned(CraftServer server, EntityDrowned entity) {
+    public CraftDrowned(CraftServer server, net.minecraft.world.entity.monster.Drowned entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityDrowned getHandle() {
-        return (EntityDrowned) entity;
+    public net.minecraft.world.entity.monster.Drowned getHandle() {
+        return (net.minecraft.world.entity.monster.Drowned) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEgg.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEgg.java
index fe3dbd1319..010e9e922a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEgg.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEgg.java
@@ -1,17 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.projectile.EntityEgg;
+import net.minecraft.world.entity.projectile.ThrownEgg;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Egg;
 
 public class CraftEgg extends CraftThrowableProjectile implements Egg {
-    public CraftEgg(CraftServer server, EntityEgg entity) {
+    public CraftEgg(CraftServer server, ThrownEgg entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityEgg getHandle() {
-        return (EntityEgg) entity;
+    public ThrownEgg getHandle() {
+        return (ThrownEgg) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftElderGuardian.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftElderGuardian.java
index 91d954f684..0e5d7ba2a3 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftElderGuardian.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftElderGuardian.java
@@ -1,12 +1,11 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntityGuardianElder;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.ElderGuardian;
 
 public class CraftElderGuardian extends CraftGuardian implements ElderGuardian {
 
-    public CraftElderGuardian(CraftServer server, EntityGuardianElder entity) {
+    public CraftElderGuardian(CraftServer server, net.minecraft.world.entity.monster.ElderGuardian entity) {
         super(server, entity);
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java
index 13d68f0e93..676dd5331b 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderCrystal.java
@@ -1,47 +1,47 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.core.BlockPosition;
-import net.minecraft.world.entity.boss.enderdragon.EntityEnderCrystal;
+import net.minecraft.core.BlockPos;
+import net.minecraft.world.entity.boss.enderdragon.EndCrystal;
 import org.bukkit.Location;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.craftbukkit.util.CraftLocation;
 import org.bukkit.entity.EnderCrystal;
 
 public class CraftEnderCrystal extends CraftEntity implements EnderCrystal {
-    public CraftEnderCrystal(CraftServer server, EntityEnderCrystal entity) {
+    public CraftEnderCrystal(CraftServer server, EndCrystal entity) {
         super(server, entity);
     }
 
     @Override
     public boolean isShowingBottom() {
-        return getHandle().showsBottom();
+        return this.getHandle().showsBottom();
     }
 
     @Override
     public void setShowingBottom(boolean showing) {
-        getHandle().setShowBottom(showing);
+        this.getHandle().setShowBottom(showing);
     }
 
     @Override
     public Location getBeamTarget() {
-        BlockPosition pos = getHandle().getBeamTarget();
-        return pos == null ? null : CraftLocation.toBukkit(pos, getWorld());
+        BlockPos pos = this.getHandle().getBeamTarget();
+        return pos == null ? null : CraftLocation.toBukkit(pos, this.getWorld());
     }
 
     @Override
     public void setBeamTarget(Location location) {
         if (location == null) {
-            getHandle().setBeamTarget((BlockPosition) null);
-        } else if (location.getWorld() != getWorld()) {
+            this.getHandle().setBeamTarget((BlockPos) null);
+        } else if (location.getWorld() != this.getWorld()) {
             throw new IllegalArgumentException("Cannot set beam target location to different world");
         } else {
-            getHandle().setBeamTarget(CraftLocation.toBlockPosition(location));
+            this.getHandle().setBeamTarget(CraftLocation.toBlockPosition(location));
         }
     }
 
     @Override
-    public EntityEnderCrystal getHandle() {
-        return (EntityEnderCrystal) entity;
+    public EndCrystal getHandle() {
+        return (EndCrystal) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java
index e676b2ef66..25b3d889a1 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragon.java
@@ -3,9 +3,8 @@ package org.bukkit.craftbukkit.entity;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.ImmutableSet.Builder;
 import java.util.Set;
-import net.minecraft.world.entity.boss.EntityComplexPart;
-import net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon;
-import net.minecraft.world.entity.boss.enderdragon.phases.DragonControllerPhase;
+import net.minecraft.world.entity.boss.EnderDragonPart;
+import net.minecraft.world.entity.boss.enderdragon.phases.EnderDragonPhase;
 import org.bukkit.boss.BossBar;
 import org.bukkit.boss.DragonBattle;
 import org.bukkit.craftbukkit.CraftServer;
@@ -16,7 +15,7 @@ import org.bukkit.entity.EnderDragon.Phase;
 
 public class CraftEnderDragon extends CraftMob implements EnderDragon, CraftEnemy {
 
-    public CraftEnderDragon(CraftServer server, EntityEnderDragon entity) {
+    public CraftEnderDragon(CraftServer server, net.minecraft.world.entity.boss.enderdragon.EnderDragon entity) {
         super(server, entity);
     }
 
@@ -24,7 +23,7 @@ public class CraftEnderDragon extends CraftMob implements EnderDragon, CraftEnem
     public Set<ComplexEntityPart> getParts() {
         Builder<ComplexEntityPart> builder = ImmutableSet.builder();
 
-        for (EntityComplexPart part : getHandle().subEntities) {
+        for (EnderDragonPart part : this.getHandle().subEntities) {
             builder.add((ComplexEntityPart) part.getBukkitEntity());
         }
 
@@ -32,8 +31,8 @@ public class CraftEnderDragon extends CraftMob implements EnderDragon, CraftEnem
     }
 
     @Override
-    public EntityEnderDragon getHandle() {
-        return (EntityEnderDragon) entity;
+    public net.minecraft.world.entity.boss.enderdragon.EnderDragon getHandle() {
+        return (net.minecraft.world.entity.boss.enderdragon.EnderDragon) this.entity;
     }
 
     @Override
@@ -43,35 +42,35 @@ public class CraftEnderDragon extends CraftMob implements EnderDragon, CraftEnem
 
     @Override
     public Phase getPhase() {
-        return Phase.values()[getHandle().getEntityData().get(EntityEnderDragon.DATA_PHASE)];
+        return Phase.values()[this.getHandle().getEntityData().get(net.minecraft.world.entity.boss.enderdragon.EnderDragon.DATA_PHASE)];
     }
 
     @Override
     public void setPhase(Phase phase) {
-        getHandle().getPhaseManager().setPhase(getMinecraftPhase(phase));
+        this.getHandle().getPhaseManager().setPhase(CraftEnderDragon.getMinecraftPhase(phase));
     }
 
-    public static Phase getBukkitPhase(DragonControllerPhase phase) {
+    public static Phase getBukkitPhase(EnderDragonPhase phase) {
         return Phase.values()[phase.getId()];
     }
 
-    public static DragonControllerPhase getMinecraftPhase(Phase phase) {
-        return DragonControllerPhase.getById(phase.ordinal());
+    public static EnderDragonPhase getMinecraftPhase(Phase phase) {
+        return EnderDragonPhase.getById(phase.ordinal());
     }
 
     @Override
     public BossBar getBossBar() {
-        DragonBattle battle = getDragonBattle();
+        DragonBattle battle = this.getDragonBattle();
         return battle != null ? battle.getBossBar() : null;
     }
 
     @Override
     public DragonBattle getDragonBattle() {
-        return getHandle().getDragonFight() != null ? new CraftDragonBattle(getHandle().getDragonFight()) : null;
+        return this.getHandle().getDragonFight() != null ? new CraftDragonBattle(this.getHandle().getDragonFight()) : null;
     }
 
     @Override
     public int getDeathAnimationTicks() {
-        return getHandle().dragonDeathTime;
+        return this.getHandle().dragonDeathTime;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragonPart.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragonPart.java
index d4000873c0..cc4194ac9d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragonPart.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderDragonPart.java
@@ -1,6 +1,5 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.boss.EntityComplexPart;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.damage.DamageSource;
 import org.bukkit.entity.EnderDragon;
@@ -8,7 +7,7 @@ import org.bukkit.entity.EnderDragonPart;
 import org.bukkit.entity.Entity;
 
 public class CraftEnderDragonPart extends CraftComplexPart implements EnderDragonPart {
-    public CraftEnderDragonPart(CraftServer server, EntityComplexPart entity) {
+    public CraftEnderDragonPart(CraftServer server, net.minecraft.world.entity.boss.EnderDragonPart entity) {
         super(server, entity);
     }
 
@@ -18,8 +17,8 @@ public class CraftEnderDragonPart extends CraftComplexPart implements EnderDrago
     }
 
     @Override
-    public EntityComplexPart getHandle() {
-        return (EntityComplexPart) entity;
+    public net.minecraft.world.entity.boss.EnderDragonPart getHandle() {
+        return (net.minecraft.world.entity.boss.EnderDragonPart) this.entity;
     }
 
     @Override
@@ -29,51 +28,51 @@ public class CraftEnderDragonPart extends CraftComplexPart implements EnderDrago
 
     @Override
     public void damage(double amount, DamageSource damageSource) {
-        getParent().damage(amount, damageSource);
+        this.getParent().damage(amount, damageSource);
     }
 
     @Override
     public void damage(double amount) {
-        getParent().damage(amount);
+        this.getParent().damage(amount);
     }
 
     @Override
     public void damage(double amount, Entity source) {
-        getParent().damage(amount, source);
+        this.getParent().damage(amount, source);
     }
 
     @Override
     public double getHealth() {
-        return getParent().getHealth();
+        return this.getParent().getHealth();
     }
 
     @Override
     public void setHealth(double health) {
-        getParent().setHealth(health);
+        this.getParent().setHealth(health);
     }
 
     @Override
     public double getAbsorptionAmount() {
-        return getParent().getAbsorptionAmount();
+        return this.getParent().getAbsorptionAmount();
     }
 
     @Override
     public void setAbsorptionAmount(double amount) {
-        getParent().setAbsorptionAmount(amount);
+        this.getParent().setAbsorptionAmount(amount);
     }
 
     @Override
     public double getMaxHealth() {
-        return getParent().getMaxHealth();
+        return this.getParent().getMaxHealth();
     }
 
     @Override
     public void setMaxHealth(double health) {
-        getParent().setMaxHealth(health);
+        this.getParent().setMaxHealth(health);
     }
 
     @Override
     public void resetMaxHealth() {
-        getParent().resetMaxHealth();
+        this.getParent().resetMaxHealth();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderPearl.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderPearl.java
index 5d7e5f798e..3bb8d74f2b 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderPearl.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderPearl.java
@@ -1,17 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.projectile.EntityEnderPearl;
+import net.minecraft.world.entity.projectile.ThrownEnderpearl;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.EnderPearl;
 
 public class CraftEnderPearl extends CraftThrowableProjectile implements EnderPearl {
-    public CraftEnderPearl(CraftServer server, EntityEnderPearl entity) {
+    public CraftEnderPearl(CraftServer server, ThrownEnderpearl entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityEnderPearl getHandle() {
-        return (EntityEnderPearl) entity;
+    public ThrownEnderpearl getHandle() {
+        return (ThrownEnderpearl) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java
index f978df7201..d4dfc7a026 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderSignal.java
@@ -1,7 +1,7 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.projectile.EntityEnderSignal;
+import net.minecraft.world.entity.projectile.EyeOfEnder;
 import net.minecraft.world.item.Items;
 import org.bukkit.Location;
 import org.bukkit.craftbukkit.CraftServer;
@@ -11,13 +11,13 @@ import org.bukkit.entity.EnderSignal;
 import org.bukkit.inventory.ItemStack;
 
 public class CraftEnderSignal extends CraftEntity implements EnderSignal {
-    public CraftEnderSignal(CraftServer server, EntityEnderSignal entity) {
+    public CraftEnderSignal(CraftServer server, EyeOfEnder entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityEnderSignal getHandle() {
-        return (EntityEnderSignal) entity;
+    public EyeOfEnder getHandle() {
+        return (EyeOfEnder) this.entity;
     }
 
     @Override
@@ -27,42 +27,42 @@ public class CraftEnderSignal extends CraftEntity implements EnderSignal {
 
     @Override
     public Location getTargetLocation() {
-        return new Location(getWorld(), getHandle().tx, getHandle().ty, getHandle().tz, getHandle().getYRot(), getHandle().getXRot());
+        return new Location(this.getWorld(), this.getHandle().tx, this.getHandle().ty, this.getHandle().tz, this.getHandle().getYRot(), this.getHandle().getXRot());
     }
 
     @Override
     public void setTargetLocation(Location location) {
-        Preconditions.checkArgument(getWorld().equals(location.getWorld()), "Cannot target EnderSignal across worlds");
-        getHandle().signalTo(CraftLocation.toBlockPosition(location));
+        Preconditions.checkArgument(this.getWorld().equals(location.getWorld()), "Cannot target EnderSignal across worlds");
+        this.getHandle().signalTo(CraftLocation.toBlockPosition(location));
     }
 
     @Override
     public boolean getDropItem() {
-        return getHandle().surviveAfterDeath;
+        return this.getHandle().surviveAfterDeath;
     }
 
     @Override
     public void setDropItem(boolean shouldDropItem) {
-        getHandle().surviveAfterDeath = shouldDropItem;
+        this.getHandle().surviveAfterDeath = shouldDropItem;
     }
 
     @Override
     public ItemStack getItem() {
-        return CraftItemStack.asBukkitCopy(getHandle().getItem());
+        return CraftItemStack.asBukkitCopy(this.getHandle().getItem());
     }
 
     @Override
     public void setItem(ItemStack item) {
-        getHandle().setItem(item != null ? CraftItemStack.asNMSCopy(item) : Items.ENDER_EYE.getDefaultInstance());
+        this.getHandle().setItem(item != null ? CraftItemStack.asNMSCopy(item) : Items.ENDER_EYE.getDefaultInstance());
     }
 
     @Override
     public int getDespawnTimer() {
-        return getHandle().life;
+        return this.getHandle().life;
     }
 
     @Override
     public void setDespawnTimer(int time) {
-        getHandle().life = time;
+        this.getHandle().life = time;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java
index 05441b8611..9074ef5427 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnderman.java
@@ -1,8 +1,8 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.monster.EntityEnderman;
-import net.minecraft.world.level.block.state.IBlockData;
+import net.minecraft.world.entity.monster.EnderMan;
+import net.minecraft.world.level.block.state.BlockState;
 import org.bukkit.Material;
 import org.bukkit.block.data.BlockData;
 import org.bukkit.craftbukkit.CraftServer;
@@ -13,35 +13,35 @@ import org.bukkit.entity.Entity;
 import org.bukkit.material.MaterialData;
 
 public class CraftEnderman extends CraftMonster implements Enderman {
-    public CraftEnderman(CraftServer server, EntityEnderman entity) {
+    public CraftEnderman(CraftServer server, EnderMan entity) {
         super(server, entity);
     }
 
     @Override
     public MaterialData getCarriedMaterial() {
-        IBlockData blockData = getHandle().getCarriedBlock();
+        BlockState blockData = this.getHandle().getCarriedBlock();
         return (blockData == null) ? Material.AIR.getNewData((byte) 0) : CraftMagicNumbers.getMaterial(blockData);
     }
 
     @Override
     public BlockData getCarriedBlock() {
-        IBlockData blockData = getHandle().getCarriedBlock();
+        BlockState blockData = this.getHandle().getCarriedBlock();
         return (blockData == null) ? null : CraftBlockData.fromData(blockData);
     }
 
     @Override
     public void setCarriedMaterial(MaterialData data) {
-        getHandle().setCarriedBlock(CraftMagicNumbers.getBlock(data));
+        this.getHandle().setCarriedBlock(CraftMagicNumbers.getBlock(data));
     }
 
     @Override
     public void setCarriedBlock(BlockData blockData) {
-        getHandle().setCarriedBlock(blockData == null ? null : ((CraftBlockData) blockData).getState());
+        this.getHandle().setCarriedBlock(blockData == null ? null : ((CraftBlockData) blockData).getState());
     }
 
     @Override
-    public EntityEnderman getHandle() {
-        return (EntityEnderman) entity;
+    public EnderMan getHandle() {
+        return (EnderMan) this.entity;
     }
 
     @Override
@@ -51,13 +51,13 @@ public class CraftEnderman extends CraftMonster implements Enderman {
 
     @Override
     public boolean teleport() {
-        return getHandle().teleport();
+        return this.getHandle().teleport();
     }
 
     @Override
     public boolean teleportTowards(Entity entity) {
         Preconditions.checkArgument(entity != null, "entity cannot be null");
 
-        return getHandle().teleportTowards(((CraftEntity) entity).getHandle());
+        return this.getHandle().teleportTowards(((CraftEntity) entity).getHandle());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEndermite.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEndermite.java
index bb72a1a733..fc0f0e841d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEndermite.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEndermite.java
@@ -1,18 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntityEndermite;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Endermite;
 
 public class CraftEndermite extends CraftMonster implements Endermite {
 
-    public CraftEndermite(CraftServer server, EntityEndermite entity) {
+    public CraftEndermite(CraftServer server, net.minecraft.world.entity.monster.Endermite entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityEndermite getHandle() {
-        return (EntityEndermite) super.getHandle();
+    public net.minecraft.world.entity.monster.Endermite getHandle() {
+        return (net.minecraft.world.entity.monster.Endermite) super.getHandle();
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnemy.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnemy.java
index f17df43884..123979a091 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnemy.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEnemy.java
@@ -1,9 +1,8 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.IMonster;
 import org.bukkit.entity.Enemy;
 
 public interface CraftEnemy extends Enemy {
 
-    IMonster getHandle();
+    net.minecraft.world.entity.monster.Enemy getHandle();
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
index 1ffd115276..23e0fde78b 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntity.java
@@ -8,23 +8,21 @@ import com.google.common.collect.Lists;
 import java.util.List;
 import java.util.Set;
 import java.util.UUID;
-import net.minecraft.nbt.NBTBase;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.network.chat.IChatBaseComponent;
-import net.minecraft.server.level.EntityPlayer;
-import net.minecraft.server.level.PlayerChunkMap;
-import net.minecraft.server.level.WorldServer;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.nbt.Tag;
+import net.minecraft.network.chat.Component;
+import net.minecraft.server.level.ChunkMap;
+import net.minecraft.server.level.ServerLevel;
+import net.minecraft.server.level.ServerPlayer;
 import net.minecraft.server.network.ServerPlayerConnection;
 import net.minecraft.world.entity.Entity;
 import net.minecraft.world.entity.EntitySpawnReason;
-import net.minecraft.world.entity.EntityTypes;
-import net.minecraft.world.entity.boss.EntityComplexPart;
-import net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon;
-import net.minecraft.world.entity.player.EntityHuman;
-import net.minecraft.world.entity.projectile.EntityArrow;
+import net.minecraft.world.entity.boss.EnderDragonPart;
+import net.minecraft.world.entity.boss.enderdragon.EnderDragon;
+import net.minecraft.world.entity.projectile.AbstractArrow;
 import net.minecraft.world.level.portal.TeleportTransition;
-import net.minecraft.world.phys.AxisAlignedBB;
-import net.minecraft.world.phys.Vec3D;
+import net.minecraft.world.phys.AABB;
+import net.minecraft.world.phys.Vec3;
 import org.bukkit.EntityEffect;
 import org.bukkit.Location;
 import org.bukkit.Server;
@@ -69,7 +67,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
     protected Entity entity;
     private final EntityType entityType;
     private EntityDamageEvent lastDamageEvent;
-    private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY);
+    private final CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftEntity.DATA_TYPE_REGISTRY);
 
     public CraftEntity(final CraftServer server, final Entity entity) {
         this.server = server;
@@ -81,13 +79,13 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
         Preconditions.checkArgument(entity != null, "Unknown entity");
 
         // Special case human, since bukkit use Player interface for ...
-        if (entity instanceof EntityHuman && !(entity instanceof EntityPlayer)) {
-            return new CraftHumanEntity(server, (EntityHuman) entity);
+        if (entity instanceof net.minecraft.world.entity.player.Player && !(entity instanceof ServerPlayer)) {
+            return new CraftHumanEntity(server, (net.minecraft.world.entity.player.Player) entity);
         }
 
         // Special case complex part, since there is no extra entity type for them
-        if (entity instanceof EntityComplexPart complexPart) {
-            if (complexPart.parentMob instanceof EntityEnderDragon) {
+        if (entity instanceof EnderDragonPart complexPart) {
+            if (complexPart.parentMob instanceof EnderDragon) {
                 return new CraftEnderDragonPart(server, complexPart);
             } else {
                 return new CraftComplexPart(server, complexPart);
@@ -105,18 +103,18 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
 
     @Override
     public Location getLocation() {
-        return CraftLocation.toBukkit(entity.position(), getWorld(), entity.getBukkitYaw(), entity.getXRot());
+        return CraftLocation.toBukkit(this.entity.position(), this.getWorld(), this.entity.getBukkitYaw(), this.entity.getXRot());
     }
 
     @Override
     public Location getLocation(Location loc) {
         if (loc != null) {
-            loc.setWorld(getWorld());
-            loc.setX(entity.getX());
-            loc.setY(entity.getY());
-            loc.setZ(entity.getZ());
-            loc.setYaw(entity.getBukkitYaw());
-            loc.setPitch(entity.getXRot());
+            loc.setWorld(this.getWorld());
+            loc.setX(this.entity.getX());
+            loc.setY(this.entity.getY());
+            loc.setZ(this.entity.getZ());
+            loc.setYaw(this.entity.getBukkitYaw());
+            loc.setPitch(this.entity.getXRot());
         }
 
         return loc;
@@ -124,49 +122,49 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
 
     @Override
     public Vector getVelocity() {
-        return CraftVector.toBukkit(entity.getDeltaMovement());
+        return CraftVector.toBukkit(this.entity.getDeltaMovement());
     }
 
     @Override
     public void setVelocity(Vector velocity) {
         Preconditions.checkArgument(velocity != null, "velocity");
         velocity.checkFinite();
-        entity.setDeltaMovement(CraftVector.toNMS(velocity));
-        entity.hurtMarked = true;
+        this.entity.setDeltaMovement(CraftVector.toNMS(velocity));
+        this.entity.hurtMarked = true;
     }
 
     @Override
     public double getHeight() {
-        return getHandle().getBbHeight();
+        return this.getHandle().getBbHeight();
     }
 
     @Override
     public double getWidth() {
-        return getHandle().getBbWidth();
+        return this.getHandle().getBbWidth();
     }
 
     @Override
     public BoundingBox getBoundingBox() {
-        AxisAlignedBB bb = getHandle().getBoundingBox();
+        AABB bb = this.getHandle().getBoundingBox();
         return new BoundingBox(bb.minX, bb.minY, bb.minZ, bb.maxX, bb.maxY, bb.maxZ);
     }
 
     @Override
     public boolean isOnGround() {
-        if (entity instanceof EntityArrow) {
-            return ((EntityArrow) entity).isInGround();
+        if (this.entity instanceof AbstractArrow) {
+            return ((AbstractArrow) this.entity).isInGround();
         }
-        return entity.onGround();
+        return this.entity.onGround();
     }
 
     @Override
     public boolean isInWater() {
-        return entity.isInWater();
+        return this.entity.isInWater();
     }
 
     @Override
     public World getWorld() {
-        return entity.level().getWorld();
+        return this.entity.level().getWorld();
     }
 
     @Override
@@ -177,16 +175,16 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
         yaw = Location.normalizeYaw(yaw);
         pitch = Location.normalizePitch(pitch);
 
-        entity.setYRot(yaw);
-        entity.setXRot(pitch);
-        entity.yRotO = yaw;
-        entity.xRotO = pitch;
-        entity.setYHeadRot(yaw);
+        this.entity.setYRot(yaw);
+        this.entity.setXRot(pitch);
+        this.entity.yRotO = yaw;
+        this.entity.xRotO = pitch;
+        this.entity.setYHeadRot(yaw);
     }
 
     @Override
     public boolean teleport(Location location) {
-        return teleport(location, TeleportCause.PLUGIN);
+        return this.teleport(location, TeleportCause.PLUGIN);
     }
 
     @Override
@@ -194,44 +192,44 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
         Preconditions.checkArgument(location != null, "location cannot be null");
         location.checkFinite();
 
-        if (entity.isVehicle() || entity.isRemoved()) {
+        if (this.entity.isVehicle() || this.entity.isRemoved()) {
             return false;
         }
 
         // If this entity is riding another entity, we must dismount before teleporting.
-        entity.stopRiding();
+        this.entity.stopRiding();
 
         // Let the server handle cross world teleports
-        if (location.getWorld() != null && !location.getWorld().equals(getWorld())) {
+        if (location.getWorld() != null && !location.getWorld().equals(this.getWorld())) {
             // Prevent teleportation to an other world during world generation
-            Preconditions.checkState(!entity.generation, "Cannot teleport entity to an other world during world generation");
-            entity.teleport(new TeleportTransition(((CraftWorld) location.getWorld()).getHandle(), CraftLocation.toVec3D(location), Vec3D.ZERO, location.getPitch(), location.getYaw(), Set.of(), TeleportTransition.DO_NOTHING, TeleportCause.PLUGIN));
+            Preconditions.checkState(!this.entity.generation, "Cannot teleport entity to an other world during world generation");
+            this.entity.teleport(new TeleportTransition(((CraftWorld) location.getWorld()).getHandle(), CraftLocation.toVec3D(location), Vec3.ZERO, location.getPitch(), location.getYaw(), Set.of(), TeleportTransition.DO_NOTHING, TeleportCause.PLUGIN));
             return true;
         }
 
         // entity.setLocation() throws no event, and so cannot be cancelled
-        entity.absMoveTo(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
+        this.entity.absMoveTo(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
         // SPIGOT-619: Force sync head rotation also
-        entity.setYHeadRot(location.getYaw());
+        this.entity.setYHeadRot(location.getYaw());
 
         return true;
     }
 
     @Override
     public boolean teleport(org.bukkit.entity.Entity destination) {
-        return teleport(destination.getLocation());
+        return this.teleport(destination.getLocation());
     }
 
     @Override
     public boolean teleport(org.bukkit.entity.Entity destination, TeleportCause cause) {
-        return teleport(destination.getLocation(), cause);
+        return this.teleport(destination.getLocation(), cause);
     }
 
     @Override
     public List<org.bukkit.entity.Entity> getNearbyEntities(double x, double y, double z) {
-        Preconditions.checkState(!entity.generation, "Cannot get nearby entities during world generation");
+        Preconditions.checkState(!this.entity.generation, "Cannot get nearby entities during world generation");
 
-        List<Entity> notchEntityList = entity.level().getEntities(entity, entity.getBoundingBox().inflate(x, y, z), Predicates.alwaysTrue());
+        List<Entity> notchEntityList = this.entity.level().getEntities(this.entity, this.entity.getBoundingBox().inflate(x, y, z), Predicates.alwaysTrue());
         List<org.bukkit.entity.Entity> bukkitEntityList = new java.util.ArrayList<org.bukkit.entity.Entity>(notchEntityList.size());
 
         for (Entity e : notchEntityList) {
@@ -242,106 +240,106 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
 
     @Override
     public int getEntityId() {
-        return entity.getId();
+        return this.entity.getId();
     }
 
     @Override
     public int getFireTicks() {
-        return entity.getRemainingFireTicks();
+        return this.entity.getRemainingFireTicks();
     }
 
     @Override
     public int getMaxFireTicks() {
-        return entity.getFireImmuneTicks();
+        return this.entity.getFireImmuneTicks();
     }
 
     @Override
     public void setFireTicks(int ticks) {
-        entity.setRemainingFireTicks(ticks);
+        this.entity.setRemainingFireTicks(ticks);
     }
 
     @Override
     public void setVisualFire(boolean fire) {
-        getHandle().hasVisualFire = fire;
+        this.getHandle().hasVisualFire = fire;
     }
 
     @Override
     public boolean isVisualFire() {
-        return getHandle().hasVisualFire;
+        return this.getHandle().hasVisualFire;
     }
 
     @Override
     public int getFreezeTicks() {
-        return getHandle().getTicksFrozen();
+        return this.getHandle().getTicksFrozen();
     }
 
     @Override
     public int getMaxFreezeTicks() {
-        return getHandle().getTicksRequiredToFreeze();
+        return this.getHandle().getTicksRequiredToFreeze();
     }
 
     @Override
     public void setFreezeTicks(int ticks) {
         Preconditions.checkArgument(0 <= ticks, "Ticks (%s) cannot be less than 0", ticks);
 
-        getHandle().setTicksFrozen(ticks);
+        this.getHandle().setTicksFrozen(ticks);
     }
 
     @Override
     public boolean isFrozen() {
-        return getHandle().isFullyFrozen();
+        return this.getHandle().isFullyFrozen();
     }
 
     @Override
     public void remove() {
-        entity.pluginRemoved = true;
-        entity.discard(getHandle().generation ? null : EntityRemoveEvent.Cause.PLUGIN);
+        this.entity.pluginRemoved = true;
+        this.entity.discard(this.getHandle().generation ? null : EntityRemoveEvent.Cause.PLUGIN);
     }
 
     @Override
     public boolean isDead() {
-        return !entity.isAlive();
+        return !this.entity.isAlive();
     }
 
     @Override
     public boolean isValid() {
-        return entity.isAlive() && entity.valid && entity.isChunkLoaded() && isInWorld();
+        return this.entity.isAlive() && this.entity.valid && this.entity.isChunkLoaded() && this.isInWorld();
     }
 
     @Override
     public Server getServer() {
-        return server;
+        return this.server;
     }
 
     @Override
     public boolean isPersistent() {
-        return entity.persist;
+        return this.entity.persist;
     }
 
     @Override
     public void setPersistent(boolean persistent) {
-        entity.persist = persistent;
+        this.entity.persist = persistent;
     }
 
     public Vector getMomentum() {
-        return getVelocity();
+        return this.getVelocity();
     }
 
     public void setMomentum(Vector value) {
-        setVelocity(value);
+        this.setVelocity(value);
     }
 
     @Override
     public org.bukkit.entity.Entity getPassenger() {
-        return isEmpty() ? null : getHandle().passengers.get(0).getBukkitEntity();
+        return this.isEmpty() ? null : this.getHandle().passengers.get(0).getBukkitEntity();
     }
 
     @Override
     public boolean setPassenger(org.bukkit.entity.Entity passenger) {
         Preconditions.checkArgument(!this.equals(passenger), "Entity cannot ride itself.");
         if (passenger instanceof CraftEntity) {
-            eject();
-            return ((CraftEntity) passenger).getHandle().startRiding(getHandle());
+            this.eject();
+            return ((CraftEntity) passenger).getHandle().startRiding(this.getHandle());
         } else {
             return false;
         }
@@ -349,7 +347,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
 
     @Override
     public List<org.bukkit.entity.Entity> getPassengers() {
-        return Lists.newArrayList(Lists.transform(getHandle().passengers, (Function<Entity, org.bukkit.entity.Entity>) input -> input.getBukkitEntity()));
+        return Lists.newArrayList(Lists.transform(this.getHandle().passengers, (Function<Entity, org.bukkit.entity.Entity>) input -> input.getBukkitEntity()));
     }
 
     @Override
@@ -357,7 +355,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
         Preconditions.checkArgument(passenger != null, "Entity passenger cannot be null");
         Preconditions.checkArgument(!this.equals(passenger), "Entity cannot ride itself.");
 
-        return ((CraftEntity) passenger).getHandle().startRiding(getHandle(), true);
+        return ((CraftEntity) passenger).getHandle().startRiding(this.getHandle(), true);
     }
 
     @Override
@@ -370,87 +368,87 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
 
     @Override
     public boolean isEmpty() {
-        return !getHandle().isVehicle();
+        return !this.getHandle().isVehicle();
     }
 
     @Override
     public boolean eject() {
-        if (isEmpty()) {
+        if (this.isEmpty()) {
             return false;
         }
 
-        getHandle().ejectPassengers();
+        this.getHandle().ejectPassengers();
         return true;
     }
 
     @Override
     public float getFallDistance() {
-        return getHandle().fallDistance;
+        return this.getHandle().fallDistance;
     }
 
     @Override
     public void setFallDistance(float distance) {
-        getHandle().fallDistance = distance;
+        this.getHandle().fallDistance = distance;
     }
 
     @Override
     public void setLastDamageCause(EntityDamageEvent event) {
-        lastDamageEvent = event;
+        this.lastDamageEvent = event;
     }
 
     @Override
     public EntityDamageEvent getLastDamageCause() {
-        return lastDamageEvent;
+        return this.lastDamageEvent;
     }
 
     @Override
     public UUID getUniqueId() {
-        return getHandle().getUUID();
+        return this.getHandle().getUUID();
     }
 
     @Override
     public int getTicksLived() {
-        return getHandle().tickCount;
+        return this.getHandle().tickCount;
     }
 
     @Override
     public void setTicksLived(int value) {
         Preconditions.checkArgument(value > 0, "Age value (%s) must be greater than 0", value);
-        getHandle().tickCount = value;
+        this.getHandle().tickCount = value;
     }
 
     public Entity getHandle() {
-        return entity;
+        return this.entity;
     }
 
     @Override
     public final EntityType getType() {
-        return entityType;
+        return this.entityType;
     }
 
     @Override
     public void playEffect(EntityEffect type) {
         Preconditions.checkArgument(type != null, "Type cannot be null");
-        Preconditions.checkState(!entity.generation, "Cannot play effect during world generation");
+        Preconditions.checkState(!this.entity.generation, "Cannot play effect during world generation");
 
         if (type.getApplicable().isInstance(this)) {
-            this.getHandle().level().broadcastEntityEvent(getHandle(), type.getData());
+            this.getHandle().level().broadcastEntityEvent(this.getHandle(), type.getData());
         }
     }
 
     @Override
     public Sound getSwimSound() {
-        return CraftSound.minecraftToBukkit(getHandle().getSwimSound0());
+        return CraftSound.minecraftToBukkit(this.getHandle().getSwimSound0());
     }
 
     @Override
     public Sound getSwimSplashSound() {
-        return CraftSound.minecraftToBukkit(getHandle().getSwimSplashSound0());
+        return CraftSound.minecraftToBukkit(this.getHandle().getSwimSplashSound0());
     }
 
     @Override
     public Sound getSwimHighSpeedSplashSound() {
-        return CraftSound.minecraftToBukkit(getHandle().getSwimHighSpeedSplashSound0());
+        return CraftSound.minecraftToBukkit(this.getHandle().getSwimHighSpeedSplashSound0());
     }
 
     public void setHandle(final Entity entity) {
@@ -459,7 +457,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
 
     @Override
     public String toString() {
-        return "CraftEntity{" + "id=" + getEntityId() + '}';
+        return "CraftEntity{" + "id=" + this.getEntityId() + '}';
     }
 
     @Override
@@ -467,7 +465,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
         if (obj == null) {
             return false;
         }
-        if (getClass() != obj.getClass()) {
+        if (this.getClass() != obj.getClass()) {
             return false;
         }
         final CraftEntity other = (CraftEntity) obj;
@@ -483,46 +481,46 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
 
     @Override
     public void setMetadata(String metadataKey, MetadataValue newMetadataValue) {
-        server.getEntityMetadata().setMetadata(this, metadataKey, newMetadataValue);
+        this.server.getEntityMetadata().setMetadata(this, metadataKey, newMetadataValue);
     }
 
     @Override
     public List<MetadataValue> getMetadata(String metadataKey) {
-        return server.getEntityMetadata().getMetadata(this, metadataKey);
+        return this.server.getEntityMetadata().getMetadata(this, metadataKey);
     }
 
     @Override
     public boolean hasMetadata(String metadataKey) {
-        return server.getEntityMetadata().hasMetadata(this, metadataKey);
+        return this.server.getEntityMetadata().hasMetadata(this, metadataKey);
     }
 
     @Override
     public void removeMetadata(String metadataKey, Plugin owningPlugin) {
-        server.getEntityMetadata().removeMetadata(this, metadataKey, owningPlugin);
+        this.server.getEntityMetadata().removeMetadata(this, metadataKey, owningPlugin);
     }
 
     @Override
     public boolean isInsideVehicle() {
-        return getHandle().isPassenger();
+        return this.getHandle().isPassenger();
     }
 
     @Override
     public boolean leaveVehicle() {
-        if (!isInsideVehicle()) {
+        if (!this.isInsideVehicle()) {
             return false;
         }
 
-        getHandle().stopRiding();
+        this.getHandle().stopRiding();
         return true;
     }
 
     @Override
     public org.bukkit.entity.Entity getVehicle() {
-        if (!isInsideVehicle()) {
+        if (!this.isInsideVehicle()) {
             return null;
         }
 
-        return getHandle().getVehicle().getBukkitEntity();
+        return this.getHandle().getVehicle().getBukkitEntity();
     }
 
     @Override
@@ -532,12 +530,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
             name = name.substring(0, 256);
         }
 
-        getHandle().setCustomName(CraftChatMessage.fromStringOrNull(name));
+        this.getHandle().setCustomName(CraftChatMessage.fromStringOrNull(name));
     }
 
     @Override
     public String getCustomName() {
-        IChatBaseComponent name = getHandle().getCustomName();
+        Component name = this.getHandle().getCustomName();
 
         if (name == null) {
             return null;
@@ -548,45 +546,45 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
 
     @Override
     public void setCustomNameVisible(boolean flag) {
-        getHandle().setCustomNameVisible(flag);
+        this.getHandle().setCustomNameVisible(flag);
     }
 
     @Override
     public boolean isCustomNameVisible() {
-        return getHandle().isCustomNameVisible();
+        return this.getHandle().isCustomNameVisible();
     }
 
     @Override
     public void setVisibleByDefault(boolean visible) {
-        if (getHandle().visibleByDefault != visible) {
+        if (this.getHandle().visibleByDefault != visible) {
             if (visible) {
                 // Making visible by default, reset and show to all players
-                for (Player player : server.getOnlinePlayers()) {
+                for (Player player : this.server.getOnlinePlayers()) {
                     ((CraftPlayer) player).resetAndShowEntity(this);
                 }
             } else {
                 // Hiding by default, reset and hide from all players
-                for (Player player : server.getOnlinePlayers()) {
+                for (Player player : this.server.getOnlinePlayers()) {
                     ((CraftPlayer) player).resetAndHideEntity(this);
                 }
             }
 
-            getHandle().visibleByDefault = visible;
+            this.getHandle().visibleByDefault = visible;
         }
     }
 
     @Override
     public boolean isVisibleByDefault() {
-        return getHandle().visibleByDefault;
+        return this.getHandle().visibleByDefault;
     }
 
     @Override
     public Set<Player> getTrackedBy() {
-        Preconditions.checkState(!entity.generation, "Cannot get tracking players during world generation");
+        Preconditions.checkState(!this.entity.generation, "Cannot get tracking players during world generation");
         ImmutableSet.Builder<Player> players = ImmutableSet.builder();
 
-        WorldServer world = ((CraftWorld) getWorld()).getHandle();
-        PlayerChunkMap.EntityTracker entityTracker = world.getChunkSource().chunkMap.entityMap.get(getEntityId());
+        ServerLevel world = ((CraftWorld) this.getWorld()).getHandle();
+        ChunkMap.TrackedEntity entityTracker = world.getChunkSource().chunkMap.entityMap.get(this.getEntityId());
 
         if (entityTracker != null) {
             for (ServerPlayerConnection connection : entityTracker.seenBy) {
@@ -619,12 +617,12 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
 
     @Override
     public String getName() {
-        return CraftChatMessage.fromComponent(getHandle().getName());
+        return CraftChatMessage.fromComponent(this.getHandle().getName());
     }
 
     @Override
     public boolean isPermissionSet(String name) {
-        return getPermissibleBase().isPermissionSet(name);
+        return CraftEntity.getPermissibleBase().isPermissionSet(name);
     }
 
     @Override
@@ -634,159 +632,159 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
 
     @Override
     public boolean hasPermission(String name) {
-        return getPermissibleBase().hasPermission(name);
+        return CraftEntity.getPermissibleBase().hasPermission(name);
     }
 
     @Override
     public boolean hasPermission(Permission perm) {
-        return getPermissibleBase().hasPermission(perm);
+        return CraftEntity.getPermissibleBase().hasPermission(perm);
     }
 
     @Override
     public PermissionAttachment addAttachment(Plugin plugin, String name, boolean value) {
-        return getPermissibleBase().addAttachment(plugin, name, value);
+        return CraftEntity.getPermissibleBase().addAttachment(plugin, name, value);
     }
 
     @Override
     public PermissionAttachment addAttachment(Plugin plugin) {
-        return getPermissibleBase().addAttachment(plugin);
+        return CraftEntity.getPermissibleBase().addAttachment(plugin);
     }
 
     @Override
     public PermissionAttachment addAttachment(Plugin plugin, String name, boolean value, int ticks) {
-        return getPermissibleBase().addAttachment(plugin, name, value, ticks);
+        return CraftEntity.getPermissibleBase().addAttachment(plugin, name, value, ticks);
     }
 
     @Override
     public PermissionAttachment addAttachment(Plugin plugin, int ticks) {
-        return getPermissibleBase().addAttachment(plugin, ticks);
+        return CraftEntity.getPermissibleBase().addAttachment(plugin, ticks);
     }
 
     @Override
     public void removeAttachment(PermissionAttachment attachment) {
-        getPermissibleBase().removeAttachment(attachment);
+        CraftEntity.getPermissibleBase().removeAttachment(attachment);
     }
 
     @Override
     public void recalculatePermissions() {
-        getPermissibleBase().recalculatePermissions();
+        CraftEntity.getPermissibleBase().recalculatePermissions();
     }
 
     @Override
     public Set<PermissionAttachmentInfo> getEffectivePermissions() {
-        return getPermissibleBase().getEffectivePermissions();
+        return CraftEntity.getPermissibleBase().getEffectivePermissions();
     }
 
     @Override
     public boolean isOp() {
-        return getPermissibleBase().isOp();
+        return CraftEntity.getPermissibleBase().isOp();
     }
 
     @Override
     public void setOp(boolean value) {
-        getPermissibleBase().setOp(value);
+        CraftEntity.getPermissibleBase().setOp(value);
     }
 
     @Override
     public void setGlowing(boolean flag) {
-        getHandle().setGlowingTag(flag);
+        this.getHandle().setGlowingTag(flag);
     }
 
     @Override
     public boolean isGlowing() {
-        return getHandle().isCurrentlyGlowing();
+        return this.getHandle().isCurrentlyGlowing();
     }
 
     @Override
     public void setInvulnerable(boolean flag) {
-        getHandle().setInvulnerable(flag);
+        this.getHandle().setInvulnerable(flag);
     }
 
     @Override
     public boolean isInvulnerable() {
-        return getHandle().isInvulnerableToBase(getHandle().damageSources().generic());
+        return this.getHandle().isInvulnerableToBase(this.getHandle().damageSources().generic());
     }
 
     @Override
     public boolean isSilent() {
-        return getHandle().isSilent();
+        return this.getHandle().isSilent();
     }
 
     @Override
     public void setSilent(boolean flag) {
-        getHandle().setSilent(flag);
+        this.getHandle().setSilent(flag);
     }
 
     @Override
     public boolean hasGravity() {
-        return !getHandle().isNoGravity();
+        return !this.getHandle().isNoGravity();
     }
 
     @Override
     public void setGravity(boolean gravity) {
-        getHandle().setNoGravity(!gravity);
+        this.getHandle().setNoGravity(!gravity);
     }
 
     @Override
     public int getPortalCooldown() {
-        return getHandle().portalCooldown;
+        return this.getHandle().portalCooldown;
     }
 
     @Override
     public void setPortalCooldown(int cooldown) {
-        getHandle().portalCooldown = cooldown;
+        this.getHandle().portalCooldown = cooldown;
     }
 
     @Override
     public Set<String> getScoreboardTags() {
-        return getHandle().getTags();
+        return this.getHandle().getTags();
     }
 
     @Override
     public boolean addScoreboardTag(String tag) {
-        return getHandle().addTag(tag);
+        return this.getHandle().addTag(tag);
     }
 
     @Override
     public boolean removeScoreboardTag(String tag) {
-        return getHandle().removeTag(tag);
+        return this.getHandle().removeTag(tag);
     }
 
     @Override
     public PistonMoveReaction getPistonMoveReaction() {
-        return PistonMoveReaction.getById(getHandle().getPistonPushReaction().ordinal());
+        return PistonMoveReaction.getById(this.getHandle().getPistonPushReaction().ordinal());
     }
 
     @Override
     public BlockFace getFacing() {
         // Use this method over getDirection because it handles boats and minecarts.
-        return CraftBlock.notchToBlockFace(getHandle().getMotionDirection());
+        return CraftBlock.notchToBlockFace(this.getHandle().getMotionDirection());
     }
 
     @Override
     public CraftPersistentDataContainer getPersistentDataContainer() {
-        return persistentDataContainer;
+        return this.persistentDataContainer;
     }
 
     @Override
     public Pose getPose() {
-        return Pose.values()[getHandle().getPose().ordinal()];
+        return Pose.values()[this.getHandle().getPose().ordinal()];
     }
 
     @Override
     public SpawnCategory getSpawnCategory() {
-        return CraftSpawnCategory.toBukkit(getHandle().getType().getCategory());
+        return CraftSpawnCategory.toBukkit(this.getHandle().getType().getCategory());
     }
 
     @Override
     public boolean isInWorld() {
-        return getHandle().inWorld;
+        return this.getHandle().inWorld;
     }
 
     @Override
     public String getAsString() {
-        NBTTagCompound tag = new NBTTagCompound();
-        if (!getHandle().saveAsPassenger(tag, false)) {
+        CompoundTag tag = new CompoundTag();
+        if (!this.getHandle().saveAsPassenger(tag, false)) {
             return null;
         }
 
@@ -800,7 +798,7 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
 
     @Override
     public org.bukkit.entity.Entity copy() {
-        Entity copy = copy(getHandle().level());
+        Entity copy = this.copy(this.getHandle().level());
         Preconditions.checkArgument(copy != null, "Error creating new entity.");
 
         return copy.getBukkitEntity();
@@ -810,76 +808,76 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
     public org.bukkit.entity.Entity copy(Location location) {
         Preconditions.checkArgument(location.getWorld() != null, "Location has no world");
 
-        Entity copy = copy(((CraftWorld) location.getWorld()).getHandle());
+        Entity copy = this.copy(((CraftWorld) location.getWorld()).getHandle());
         Preconditions.checkArgument(copy != null, "Error creating new entity.");
 
         copy.setPos(location.getX(), location.getY(), location.getZ());
         return location.getWorld().addEntity(copy.getBukkitEntity());
     }
 
-    private Entity copy(net.minecraft.world.level.World level) {
-        NBTTagCompound compoundTag = new NBTTagCompound();
-        getHandle().saveAsPassenger(compoundTag, false);
+    private Entity copy(net.minecraft.world.level.Level level) {
+        CompoundTag compoundTag = new CompoundTag();
+        this.getHandle().saveAsPassenger(compoundTag, false);
 
-        return EntityTypes.loadEntityRecursive(compoundTag, level, EntitySpawnReason.LOAD, java.util.function.Function.identity());
+        return net.minecraft.world.entity.EntityType.loadEntityRecursive(compoundTag, level, EntitySpawnReason.LOAD, java.util.function.Function.identity());
     }
 
-    public void storeBukkitValues(NBTTagCompound c) {
+    public void storeBukkitValues(CompoundTag c) {
         if (!this.persistentDataContainer.isEmpty()) {
             c.put("BukkitValues", this.persistentDataContainer.toTagCompound());
         }
     }
 
-    public void readBukkitValues(NBTTagCompound c) {
-        NBTBase base = c.get("BukkitValues");
-        if (base instanceof NBTTagCompound) {
-            this.persistentDataContainer.putAll((NBTTagCompound) base);
+    public void readBukkitValues(CompoundTag c) {
+        Tag base = c.get("BukkitValues");
+        if (base instanceof CompoundTag) {
+            this.persistentDataContainer.putAll((CompoundTag) base);
         }
     }
 
-    protected NBTTagCompound save() {
-        NBTTagCompound nbttagcompound = new NBTTagCompound();
+    protected CompoundTag save() {
+        CompoundTag nbttagcompound = new CompoundTag();
 
-        nbttagcompound.putString("id", getHandle().getEncodeId());
-        getHandle().saveWithoutId(nbttagcompound);
+        nbttagcompound.putString("id", this.getHandle().getEncodeId());
+        this.getHandle().saveWithoutId(nbttagcompound);
 
         return nbttagcompound;
     }
 
     // re-sends the spawn entity packet to updated values which cannot be updated otherwise
     protected void update() {
-        if (!getHandle().isAlive()) {
+        if (!this.getHandle().isAlive()) {
             return;
         }
 
-        WorldServer world = ((CraftWorld) getWorld()).getHandle();
-        PlayerChunkMap.EntityTracker entityTracker = world.getChunkSource().chunkMap.entityMap.get(getEntityId());
+        ServerLevel world = ((CraftWorld) this.getWorld()).getHandle();
+        ChunkMap.TrackedEntity entityTracker = world.getChunkSource().chunkMap.entityMap.get(this.getEntityId());
 
         if (entityTracker == null) {
             return;
         }
 
-        entityTracker.broadcast(getHandle().getAddEntityPacket(entityTracker.serverEntity));
+        entityTracker.broadcast(this.getHandle().getAddEntityPacket(entityTracker.serverEntity));
     }
 
-    public void update(EntityPlayer player) {
-        if (!getHandle().isAlive()) {
+    public void update(ServerPlayer player) {
+        if (!this.getHandle().isAlive()) {
             return;
         }
 
-        WorldServer world = ((CraftWorld) getWorld()).getHandle();
-        PlayerChunkMap.EntityTracker entityTracker = world.getChunkSource().chunkMap.entityMap.get(getEntityId());
+        ServerLevel world = ((CraftWorld) this.getWorld()).getHandle();
+        ChunkMap.TrackedEntity entityTracker = world.getChunkSource().chunkMap.entityMap.get(this.getEntityId());
 
         if (entityTracker == null) {
             return;
         }
 
-        player.connection.send(getHandle().getAddEntityPacket(entityTracker.serverEntity));
+        player.connection.send(this.getHandle().getAddEntityPacket(entityTracker.serverEntity));
     }
 
     private static PermissibleBase getPermissibleBase() {
-        if (perm == null) {
-            perm = new PermissibleBase(new ServerOperator() {
+        if (CraftEntity.perm == null) {
+            CraftEntity.perm = new PermissibleBase(new ServerOperator() {
 
                 @Override
                 public boolean isOp() {
@@ -892,6 +890,6 @@ public abstract class CraftEntity implements org.bukkit.entity.Entity {
                 }
             });
         }
-        return perm;
+        return CraftEntity.perm;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityFactory.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityFactory.java
index caa492d9bd..b605924b96 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityFactory.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityFactory.java
@@ -2,9 +2,9 @@ package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
 import com.mojang.brigadier.exceptions.CommandSyntaxException;
-import net.minecraft.nbt.MojangsonParser;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.entity.EntityTypes;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.nbt.TagParser;
+import net.minecraft.world.entity.EntityType;
 import org.bukkit.entity.EntityFactory;
 import org.bukkit.entity.EntitySnapshot;
 
@@ -23,14 +23,14 @@ public class CraftEntityFactory implements EntityFactory {
     public EntitySnapshot createEntitySnapshot(String input) {
         Preconditions.checkArgument(input != null, "Input string cannot be null");
 
-        NBTTagCompound tag;
+        CompoundTag tag;
         try {
-            tag = MojangsonParser.parseTag(input);
+            tag = TagParser.parseTag(input);
         } catch (CommandSyntaxException e) {
             throw new IllegalArgumentException("Could not parse Entity: " + input, e);
         }
 
-        EntityTypes<?> type = EntityTypes.by(tag).orElse(null);
+        EntityType<?> type = EntityType.by(tag).orElse(null);
         if (type == null) {
             throw new IllegalArgumentException("Could not parse Entity: " + input);
         }
@@ -39,6 +39,6 @@ public class CraftEntityFactory implements EntityFactory {
     }
 
     public static CraftEntityFactory instance() {
-        return instance;
+        return CraftEntityFactory.instance;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntitySnapshot.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntitySnapshot.java
index b3409ee182..6642bdc117 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntitySnapshot.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntitySnapshot.java
@@ -2,9 +2,8 @@ package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
 import java.util.function.Function;
-import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.CompoundTag;
 import net.minecraft.world.entity.EntitySpawnReason;
-import net.minecraft.world.entity.EntityTypes;
 import org.bukkit.Location;
 import org.bukkit.World;
 import org.bukkit.craftbukkit.CraftWorld;
@@ -13,22 +12,22 @@ import org.bukkit.entity.EntitySnapshot;
 import org.bukkit.entity.EntityType;
 
 public class CraftEntitySnapshot implements EntitySnapshot {
-    private final NBTTagCompound data;
+    private final CompoundTag data;
     private final EntityType type;
 
-    private CraftEntitySnapshot(NBTTagCompound data, EntityType type) {
+    private CraftEntitySnapshot(CompoundTag data, EntityType type) {
         this.data = data;
         this.type = type;
     }
 
     @Override
     public EntityType getEntityType() {
-        return type;
+        return this.type;
     }
 
     @Override
     public Entity createEntity(World world) {
-        net.minecraft.world.entity.Entity internal = createInternal(world);
+        net.minecraft.world.entity.Entity internal = this.createInternal(world);
 
         return internal.getBukkitEntity();
     }
@@ -37,7 +36,7 @@ public class CraftEntitySnapshot implements EntitySnapshot {
     public Entity createEntity(Location location) {
         Preconditions.checkArgument(location.getWorld() != null, "Location has no world");
 
-        net.minecraft.world.entity.Entity internal = createInternal(location.getWorld());
+        net.minecraft.world.entity.Entity internal = this.createInternal(location.getWorld());
 
         internal.setPos(location.getX(), location.getY(), location.getZ());
         return location.getWorld().addEntity(internal.getBukkitEntity());
@@ -45,28 +44,28 @@ public class CraftEntitySnapshot implements EntitySnapshot {
 
     @Override
     public String getAsString() {
-        return data.getAsString();
+        return this.data.getAsString();
     }
 
     private net.minecraft.world.entity.Entity createInternal(World world) {
-        net.minecraft.world.level.World nms = ((CraftWorld) world).getHandle();
-        net.minecraft.world.entity.Entity internal = EntityTypes.loadEntityRecursive(data, nms, EntitySpawnReason.LOAD, Function.identity());
+        net.minecraft.world.level.Level nms = ((CraftWorld) world).getHandle();
+        net.minecraft.world.entity.Entity internal = net.minecraft.world.entity.EntityType.loadEntityRecursive(this.data, nms, EntitySpawnReason.LOAD, Function.identity());
         if (internal == null) { // Try creating by type
-            internal = CraftEntityType.bukkitToMinecraft(type).create(nms, EntitySpawnReason.LOAD);
+            internal = CraftEntityType.bukkitToMinecraft(this.type).create(nms, EntitySpawnReason.LOAD);
         }
 
         Preconditions.checkArgument(internal != null, "Error creating new entity."); // This should only fail if the stored NBTTagCompound is malformed.
-        internal.load(data);
+        internal.load(this.data);
 
         return internal;
     }
 
-    public NBTTagCompound getData() {
-        return data;
+    public CompoundTag getData() {
+        return this.data;
     }
 
     public static CraftEntitySnapshot create(CraftEntity entity) {
-        NBTTagCompound tag = new NBTTagCompound();
+        CompoundTag tag = new CompoundTag();
         if (!entity.getHandle().saveAsPassenger(tag, false)) {
             return null;
         }
@@ -74,7 +73,7 @@ public class CraftEntitySnapshot implements EntitySnapshot {
         return new CraftEntitySnapshot(tag, entity.getType());
     }
 
-    public static CraftEntitySnapshot create(NBTTagCompound tag, EntityType type) {
+    public static CraftEntitySnapshot create(CompoundTag tag, EntityType type) {
         if (tag == null || tag.isEmpty() || type == null) {
             return null;
         }
@@ -82,8 +81,8 @@ public class CraftEntitySnapshot implements EntitySnapshot {
         return new CraftEntitySnapshot(tag, type);
     }
 
-    public static CraftEntitySnapshot create(NBTTagCompound tag) {
-        EntityType type = EntityTypes.by(tag).map(CraftEntityType::minecraftToBukkit).orElse(null);
-        return create(tag, type);
+    public static CraftEntitySnapshot create(CompoundTag tag) {
+        EntityType type = net.minecraft.world.entity.EntityType.by(tag).map(CraftEntityType::minecraftToBukkit).orElse(null);
+        return CraftEntitySnapshot.create(tag, type);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityType.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityType.java
index a561fd00b8..6cf8af0c85 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityType.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityType.java
@@ -3,9 +3,7 @@ package org.bukkit.craftbukkit.entity;
 import com.google.common.base.Preconditions;
 import java.util.Locale;
 import net.minecraft.core.Holder;
-import net.minecraft.core.IRegistry;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.world.entity.EntityTypes;
 import org.bukkit.NamespacedKey;
 import org.bukkit.Registry;
 import org.bukkit.craftbukkit.CraftRegistry;
@@ -16,10 +14,10 @@ import org.bukkit.entity.EntityType;
 
 public class CraftEntityType {
 
-    public static EntityType minecraftToBukkit(EntityTypes<?> minecraft) {
+    public static EntityType minecraftToBukkit(net.minecraft.world.entity.EntityType<?> minecraft) {
         Preconditions.checkArgument(minecraft != null);
 
-        IRegistry<EntityTypes<?>> registry = CraftRegistry.getMinecraftRegistry(Registries.ENTITY_TYPE);
+        net.minecraft.core.Registry<net.minecraft.world.entity.EntityType<?>> registry = CraftRegistry.getMinecraftRegistry(Registries.ENTITY_TYPE);
         EntityType bukkit = Registry.ENTITY_TYPE.get(CraftNamespacedKey.fromMinecraft(registry.getResourceKey(minecraft).orElseThrow().location()));
 
         Preconditions.checkArgument(bukkit != null);
@@ -27,19 +25,19 @@ public class CraftEntityType {
         return bukkit;
     }
 
-    public static EntityTypes<?> bukkitToMinecraft(EntityType bukkit) {
+    public static net.minecraft.world.entity.EntityType<?> bukkitToMinecraft(EntityType bukkit) {
         Preconditions.checkArgument(bukkit != null);
 
         return CraftRegistry.getMinecraftRegistry(Registries.ENTITY_TYPE)
                 .getOptional(CraftNamespacedKey.toMinecraft(bukkit.getKey())).orElseThrow();
     }
 
-    public static Holder<EntityTypes<?>> bukkitToMinecraftHolder(EntityType bukkit) {
+    public static Holder<net.minecraft.world.entity.EntityType<?>> bukkitToMinecraftHolder(EntityType bukkit) {
         Preconditions.checkArgument(bukkit != null);
 
-        IRegistry<EntityTypes<?>> registry = CraftRegistry.getMinecraftRegistry(Registries.ENTITY_TYPE);
+        net.minecraft.core.Registry<net.minecraft.world.entity.EntityType<?>> registry = CraftRegistry.getMinecraftRegistry(Registries.ENTITY_TYPE);
 
-        if (registry.wrapAsHolder(bukkitToMinecraft(bukkit)) instanceof Holder.c<EntityTypes<?>> holder) {
+        if (registry.wrapAsHolder(CraftEntityType.bukkitToMinecraft(bukkit)) instanceof Holder.Reference<net.minecraft.world.entity.EntityType<?>> holder) {
             return holder;
         }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
index 77e1c6da76..807e4a7a83 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEntityTypes.java
@@ -8,36 +8,27 @@ import java.util.Map;
 import java.util.function.BiConsumer;
 import java.util.function.BiFunction;
 import java.util.function.Function;
-import net.minecraft.core.BlockPosition;
-import net.minecraft.core.EnumDirection;
-import net.minecraft.world.entity.EntityAreaEffectCloud;
-import net.minecraft.world.entity.EntityExperienceOrb;
+import net.minecraft.core.BlockPos;
+import net.minecraft.core.Direction;
 import net.minecraft.world.entity.EntitySpawnReason;
-import net.minecraft.world.entity.EntityTypes;
-import net.minecraft.world.entity.boss.enderdragon.EntityEnderDragon;
-import net.minecraft.world.entity.decoration.EntityHanging;
-import net.minecraft.world.entity.decoration.EntityItemFrame;
-import net.minecraft.world.entity.decoration.EntityLeash;
-import net.minecraft.world.entity.decoration.EntityPainting;
-import net.minecraft.world.entity.item.EntityFallingBlock;
-import net.minecraft.world.entity.item.EntityItem;
-import net.minecraft.world.entity.item.EntityTNTPrimed;
-import net.minecraft.world.entity.projectile.EntityEgg;
-import net.minecraft.world.entity.projectile.EntityEnderSignal;
-import net.minecraft.world.entity.projectile.EntityEvokerFangs;
-import net.minecraft.world.entity.projectile.EntityFireball;
-import net.minecraft.world.entity.projectile.EntityFireworks;
-import net.minecraft.world.entity.projectile.EntityPotion;
-import net.minecraft.world.entity.projectile.EntitySnowball;
-import net.minecraft.world.entity.vehicle.EntityMinecartAbstract;
+import net.minecraft.world.entity.decoration.HangingEntity;
+import net.minecraft.world.entity.decoration.LeashFenceKnotEntity;
+import net.minecraft.world.entity.item.FallingBlockEntity;
+import net.minecraft.world.entity.item.ItemEntity;
+import net.minecraft.world.entity.item.PrimedTnt;
+import net.minecraft.world.entity.projectile.AbstractHurtingProjectile;
+import net.minecraft.world.entity.projectile.EyeOfEnder;
+import net.minecraft.world.entity.projectile.FireworkRocketEntity;
+import net.minecraft.world.entity.projectile.ThrownEgg;
+import net.minecraft.world.entity.vehicle.AbstractMinecart;
 import net.minecraft.world.item.ItemStack;
 import net.minecraft.world.item.Items;
-import net.minecraft.world.level.GeneratorAccessSeed;
-import net.minecraft.world.level.World;
-import net.minecraft.world.level.block.BlockDiodeAbstract;
-import net.minecraft.world.level.block.state.IBlockData;
-import net.minecraft.world.phys.AxisAlignedBB;
-import net.minecraft.world.phys.Vec3D;
+import net.minecraft.world.level.Level;
+import net.minecraft.world.level.WorldGenLevel;
+import net.minecraft.world.level.block.DiodeBlock;
+import net.minecraft.world.level.block.state.BlockState;
+import net.minecraft.world.phys.AABB;
+import net.minecraft.world.phys.Vec3;
 import org.bukkit.Bukkit;
 import org.bukkit.Location;
 import org.bukkit.block.BlockFace;
@@ -225,29 +216,29 @@ public final class CraftEntityTypes {
                                                                                                 Function<SpawnData, M> spawnFunction) {
     }
 
-    public record SpawnData(GeneratorAccessSeed world, Location location, boolean randomizeData, boolean normalWorld) {
+    public record SpawnData(WorldGenLevel world, Location location, boolean randomizeData, boolean normalWorld) {
         double x() {
-            return location().getX();
+            return this.location().getX();
         }
 
         double y() {
-            return location().getY();
+            return this.location().getY();
         }
 
         double z() {
-            return location().getZ();
+            return this.location().getZ();
         }
 
         float yaw() {
-            return location().getYaw();
+            return this.location().getYaw();
         }
 
         float pitch() {
-            return location().getPitch();
+            return this.location().getPitch();
         }
 
-        World minecraftWorld() {
-            return world().getMinecraftWorld();
+        Level minecraftWorld() {
+            return this.world().getMinecraftWorld();
         }
     }
 
@@ -258,206 +249,206 @@ public final class CraftEntityTypes {
     };
     private static final BiConsumer<SpawnData, net.minecraft.world.entity.Entity> MOVE = (spawnData, entity) -> entity.moveTo(spawnData.x(), spawnData.y(), spawnData.z(), spawnData.yaw(), spawnData.pitch());
     private static final BiConsumer<SpawnData, net.minecraft.world.entity.Entity> MOVE_EMPTY_ROT = (spawnData, entity) -> entity.moveTo(spawnData.x(), spawnData.y(), spawnData.z(), 0, 0);
-    private static final BiConsumer<SpawnData, EntityFireball> DIRECTION = (spawnData, entity) -> {
+    private static final BiConsumer<SpawnData, AbstractHurtingProjectile> DIRECTION = (spawnData, entity) -> {
         Vector direction = spawnData.location().getDirection();
-        entity.assignDirectionalMovement(new Vec3D(direction.getX(), direction.getY(), direction.getZ()), 1.0);
+        entity.assignDirectionalMovement(new Vec3(direction.getX(), direction.getY(), direction.getZ()), 1.0);
     };
     private static final Map<Class<?>, EntityTypeData<?, ?>> CLASS_TYPE_DATA = new HashMap<>();
     private static final Map<EntityType, EntityTypeData<?, ?>> ENTITY_TYPE_DATA = new HashMap<>();
 
     static {
         // Living
-        register(new EntityTypeData<>(EntityType.ELDER_GUARDIAN, ElderGuardian.class, CraftElderGuardian::new, createLiving(EntityTypes.ELDER_GUARDIAN)));
-        register(new EntityTypeData<>(EntityType.WITHER_SKELETON, WitherSkeleton.class, CraftWitherSkeleton::new, createLiving(EntityTypes.WITHER_SKELETON)));
-        register(new EntityTypeData<>(EntityType.STRAY, Stray.class, CraftStray::new, createLiving(EntityTypes.STRAY)));
-        register(new EntityTypeData<>(EntityType.BOGGED, Bogged.class, CraftBogged::new, createLiving(EntityTypes.BOGGED)));
-        register(new EntityTypeData<>(EntityType.HUSK, Husk.class, CraftHusk::new, createLiving(EntityTypes.HUSK)));
-        register(new EntityTypeData<>(EntityType.ZOMBIE_VILLAGER, ZombieVillager.class, CraftVillagerZombie::new, createLiving(EntityTypes.ZOMBIE_VILLAGER)));
-        register(new EntityTypeData<>(EntityType.SKELETON_HORSE, SkeletonHorse.class, CraftSkeletonHorse::new, createLiving(EntityTypes.SKELETON_HORSE)));
-        register(new EntityTypeData<>(EntityType.ZOMBIE_HORSE, ZombieHorse.class, CraftZombieHorse::new, createLiving(EntityTypes.ZOMBIE_HORSE)));
-        register(new EntityTypeData<>(EntityType.ARMOR_STAND, ArmorStand.class, CraftArmorStand::new, createLiving(EntityTypes.ARMOR_STAND)));
-        register(new EntityTypeData<>(EntityType.DONKEY, Donkey.class, CraftDonkey::new, createLiving(EntityTypes.DONKEY)));
-        register(new EntityTypeData<>(EntityType.MULE, Mule.class, CraftMule::new, createLiving(EntityTypes.MULE)));
-        register(new EntityTypeData<>(EntityType.EVOKER, Evoker.class, CraftEvoker::new, createLiving(EntityTypes.EVOKER)));
-        register(new EntityTypeData<>(EntityType.VEX, Vex.class, CraftVex::new, createLiving(EntityTypes.VEX)));
-        register(new EntityTypeData<>(EntityType.VINDICATOR, Vindicator.class, CraftVindicator::new, createLiving(EntityTypes.VINDICATOR)));
-        register(new EntityTypeData<>(EntityType.ILLUSIONER, Illusioner.class, CraftIllusioner::new, createLiving(EntityTypes.ILLUSIONER)));
-        register(new EntityTypeData<>(EntityType.CREEPER, Creeper.class, CraftCreeper::new, createLiving(EntityTypes.CREEPER)));
-        register(new EntityTypeData<>(EntityType.SKELETON, Skeleton.class, CraftSkeleton::new, createLiving(EntityTypes.SKELETON)));
-        register(new EntityTypeData<>(EntityType.SPIDER, Spider.class, CraftSpider::new, createLiving(EntityTypes.SPIDER)));
-        register(new EntityTypeData<>(EntityType.GIANT, Giant.class, CraftGiant::new, createLiving(EntityTypes.GIANT)));
-        register(new EntityTypeData<>(EntityType.ZOMBIE, Zombie.class, CraftZombie::new, createLiving(EntityTypes.ZOMBIE)));
-        register(new EntityTypeData<>(EntityType.SLIME, Slime.class, CraftSlime::new, createLiving(EntityTypes.SLIME)));
-        register(new EntityTypeData<>(EntityType.GHAST, Ghast.class, CraftGhast::new, createLiving(EntityTypes.GHAST)));
-        register(new EntityTypeData<>(EntityType.ZOMBIFIED_PIGLIN, PigZombie.class, CraftPigZombie::new, createLiving(EntityTypes.ZOMBIFIED_PIGLIN)));
-        register(new EntityTypeData<>(EntityType.ENDERMAN, Enderman.class, CraftEnderman::new, createLiving(EntityTypes.ENDERMAN)));
-        register(new EntityTypeData<>(EntityType.CAVE_SPIDER, CaveSpider.class, CraftCaveSpider::new, createLiving(EntityTypes.CAVE_SPIDER)));
-        register(new EntityTypeData<>(EntityType.SILVERFISH, Silverfish.class, CraftSilverfish::new, createLiving(EntityTypes.SILVERFISH)));
-        register(new EntityTypeData<>(EntityType.BLAZE, Blaze.class, CraftBlaze::new, createLiving(EntityTypes.BLAZE)));
-        register(new EntityTypeData<>(EntityType.MAGMA_CUBE, MagmaCube.class, CraftMagmaCube::new, createLiving(EntityTypes.MAGMA_CUBE)));
-        register(new EntityTypeData<>(EntityType.WITHER, Wither.class, CraftWither::new, createLiving(EntityTypes.WITHER)));
-        register(new EntityTypeData<>(EntityType.BAT, Bat.class, CraftBat::new, createLiving(EntityTypes.BAT)));
-        register(new EntityTypeData<>(EntityType.WITCH, Witch.class, CraftWitch::new, createLiving(EntityTypes.WITCH)));
-        register(new EntityTypeData<>(EntityType.ENDERMITE, Endermite.class, CraftEndermite::new, createLiving(EntityTypes.ENDERMITE)));
-        register(new EntityTypeData<>(EntityType.GUARDIAN, Guardian.class, CraftGuardian::new, createLiving(EntityTypes.GUARDIAN)));
-        register(new EntityTypeData<>(EntityType.SHULKER, Shulker.class, CraftShulker::new, createLiving(EntityTypes.SHULKER)));
-        register(new EntityTypeData<>(EntityType.PIG, Pig.class, CraftPig::new, createLiving(EntityTypes.PIG)));
-        register(new EntityTypeData<>(EntityType.SHEEP, Sheep.class, CraftSheep::new, createLiving(EntityTypes.SHEEP)));
-        register(new EntityTypeData<>(EntityType.COW, Cow.class, CraftCow::new, createLiving(EntityTypes.COW)));
-        register(new EntityTypeData<>(EntityType.CHICKEN, Chicken.class, CraftChicken::new, createLiving(EntityTypes.CHICKEN)));
-        register(new EntityTypeData<>(EntityType.SQUID, Squid.class, CraftSquid::new, createLiving(EntityTypes.SQUID)));
-        register(new EntityTypeData<>(EntityType.WOLF, Wolf.class, CraftWolf::new, createLiving(EntityTypes.WOLF)));
-        register(new EntityTypeData<>(EntityType.MOOSHROOM, MushroomCow.class, CraftMushroomCow::new, createLiving(EntityTypes.MOOSHROOM)));
-        register(new EntityTypeData<>(EntityType.SNOW_GOLEM, Snowman.class, CraftSnowman::new, createLiving(EntityTypes.SNOW_GOLEM)));
-        register(new EntityTypeData<>(EntityType.OCELOT, Ocelot.class, CraftOcelot::new, createLiving(EntityTypes.OCELOT)));
-        register(new EntityTypeData<>(EntityType.IRON_GOLEM, IronGolem.class, CraftIronGolem::new, createLiving(EntityTypes.IRON_GOLEM)));
-        register(new EntityTypeData<>(EntityType.HORSE, Horse.class, CraftHorse::new, createLiving(EntityTypes.HORSE)));
-        register(new EntityTypeData<>(EntityType.RABBIT, Rabbit.class, CraftRabbit::new, createLiving(EntityTypes.RABBIT)));
-        register(new EntityTypeData<>(EntityType.POLAR_BEAR, PolarBear.class, CraftPolarBear::new, createLiving(EntityTypes.POLAR_BEAR)));
-        register(new EntityTypeData<>(EntityType.LLAMA, Llama.class, CraftLlama::new, createLiving(EntityTypes.LLAMA)));
-        register(new EntityTypeData<>(EntityType.PARROT, Parrot.class, CraftParrot::new, createLiving(EntityTypes.PARROT)));
-        register(new EntityTypeData<>(EntityType.VILLAGER, Villager.class, CraftVillager::new, createLiving(EntityTypes.VILLAGER)));
-        register(new EntityTypeData<>(EntityType.TURTLE, Turtle.class, CraftTurtle::new, createLiving(EntityTypes.TURTLE)));
-        register(new EntityTypeData<>(EntityType.PHANTOM, Phantom.class, CraftPhantom::new, createLiving(EntityTypes.PHANTOM)));
-        register(new EntityTypeData<>(EntityType.COD, Cod.class, CraftCod::new, createLiving(EntityTypes.COD)));
-        register(new EntityTypeData<>(EntityType.SALMON, Salmon.class, CraftSalmon::new, createLiving(EntityTypes.SALMON)));
-        register(new EntityTypeData<>(EntityType.PUFFERFISH, PufferFish.class, CraftPufferFish::new, createLiving(EntityTypes.PUFFERFISH)));
-        register(new EntityTypeData<>(EntityType.TROPICAL_FISH, TropicalFish.class, CraftTropicalFish::new, createLiving(EntityTypes.TROPICAL_FISH)));
-        register(new EntityTypeData<>(EntityType.DROWNED, Drowned.class, CraftDrowned::new, createLiving(EntityTypes.DROWNED)));
-        register(new EntityTypeData<>(EntityType.DOLPHIN, Dolphin.class, CraftDolphin::new, createLiving(EntityTypes.DOLPHIN)));
-        register(new EntityTypeData<>(EntityType.CAT, Cat.class, CraftCat::new, createLiving(EntityTypes.CAT)));
-        register(new EntityTypeData<>(EntityType.PANDA, Panda.class, CraftPanda::new, createLiving(EntityTypes.PANDA)));
-        register(new EntityTypeData<>(EntityType.PILLAGER, Pillager.class, CraftPillager::new, createLiving(EntityTypes.PILLAGER)));
-        register(new EntityTypeData<>(EntityType.RAVAGER, Ravager.class, CraftRavager::new, createLiving(EntityTypes.RAVAGER)));
-        register(new EntityTypeData<>(EntityType.TRADER_LLAMA, TraderLlama.class, CraftTraderLlama::new, createLiving(EntityTypes.TRADER_LLAMA)));
-        register(new EntityTypeData<>(EntityType.WANDERING_TRADER, WanderingTrader.class, CraftWanderingTrader::new, createLiving(EntityTypes.WANDERING_TRADER)));
-        register(new EntityTypeData<>(EntityType.FOX, Fox.class, CraftFox::new, createLiving(EntityTypes.FOX)));
-        register(new EntityTypeData<>(EntityType.BEE, Bee.class, CraftBee::new, createLiving(EntityTypes.BEE)));
-        register(new EntityTypeData<>(EntityType.HOGLIN, Hoglin.class, CraftHoglin::new, createLiving(EntityTypes.HOGLIN)));
-        register(new EntityTypeData<>(EntityType.PIGLIN, Piglin.class, CraftPiglin::new, createLiving(EntityTypes.PIGLIN)));
-        register(new EntityTypeData<>(EntityType.STRIDER, Strider.class, CraftStrider::new, createLiving(EntityTypes.STRIDER)));
-        register(new EntityTypeData<>(EntityType.ZOGLIN, Zoglin.class, CraftZoglin::new, createLiving(EntityTypes.ZOGLIN)));
-        register(new EntityTypeData<>(EntityType.PIGLIN_BRUTE, PiglinBrute.class, CraftPiglinBrute::new, createLiving(EntityTypes.PIGLIN_BRUTE)));
-        register(new EntityTypeData<>(EntityType.AXOLOTL, Axolotl.class, CraftAxolotl::new, createLiving(EntityTypes.AXOLOTL)));
-        register(new EntityTypeData<>(EntityType.GLOW_SQUID, GlowSquid.class, CraftGlowSquid::new, createLiving(EntityTypes.GLOW_SQUID)));
-        register(new EntityTypeData<>(EntityType.GOAT, Goat.class, CraftGoat::new, createLiving(EntityTypes.GOAT)));
-        register(new EntityTypeData<>(EntityType.ALLAY, Allay.class, CraftAllay::new, createLiving(EntityTypes.ALLAY)));
-        register(new EntityTypeData<>(EntityType.FROG, Frog.class, CraftFrog::new, createLiving(EntityTypes.FROG)));
-        register(new EntityTypeData<>(EntityType.TADPOLE, Tadpole.class, CraftTadpole::new, createLiving(EntityTypes.TADPOLE)));
-        register(new EntityTypeData<>(EntityType.WARDEN, Warden.class, CraftWarden::new, createLiving(EntityTypes.WARDEN)));
-        register(new EntityTypeData<>(EntityType.CAMEL, Camel.class, CraftCamel::new, createLiving(EntityTypes.CAMEL)));
-        register(new EntityTypeData<>(EntityType.SNIFFER, Sniffer.class, CraftSniffer::new, createLiving(EntityTypes.SNIFFER)));
-        register(new EntityTypeData<>(EntityType.BREEZE, Breeze.class, CraftBreeze::new, createLiving(EntityTypes.BREEZE)));
-        register(new EntityTypeData<>(EntityType.ARMADILLO, Armadillo.class, CraftArmadillo::new, createLiving(EntityTypes.ARMADILLO)));
-        register(new EntityTypeData<>(EntityType.CREAKING, Creaking.class, CraftCreaking::new, createLiving(EntityTypes.CREAKING)));
+        register(new EntityTypeData<>(EntityType.ELDER_GUARDIAN, ElderGuardian.class, CraftElderGuardian::new, createLiving(net.minecraft.world.entity.EntityType.ELDER_GUARDIAN)));
+        register(new EntityTypeData<>(EntityType.WITHER_SKELETON, WitherSkeleton.class, CraftWitherSkeleton::new, createLiving(net.minecraft.world.entity.EntityType.WITHER_SKELETON)));
+        register(new EntityTypeData<>(EntityType.STRAY, Stray.class, CraftStray::new, createLiving(net.minecraft.world.entity.EntityType.STRAY)));
+        register(new EntityTypeData<>(EntityType.BOGGED, Bogged.class, CraftBogged::new, createLiving(net.minecraft.world.entity.EntityType.BOGGED)));
+        register(new EntityTypeData<>(EntityType.HUSK, Husk.class, CraftHusk::new, createLiving(net.minecraft.world.entity.EntityType.HUSK)));
+        register(new EntityTypeData<>(EntityType.ZOMBIE_VILLAGER, ZombieVillager.class, CraftVillagerZombie::new, createLiving(net.minecraft.world.entity.EntityType.ZOMBIE_VILLAGER)));
+        register(new EntityTypeData<>(EntityType.SKELETON_HORSE, SkeletonHorse.class, CraftSkeletonHorse::new, createLiving(net.minecraft.world.entity.EntityType.SKELETON_HORSE)));
+        register(new EntityTypeData<>(EntityType.ZOMBIE_HORSE, ZombieHorse.class, CraftZombieHorse::new, createLiving(net.minecraft.world.entity.EntityType.ZOMBIE_HORSE)));
+        register(new EntityTypeData<>(EntityType.ARMOR_STAND, ArmorStand.class, CraftArmorStand::new, createLiving(net.minecraft.world.entity.EntityType.ARMOR_STAND)));
+        register(new EntityTypeData<>(EntityType.DONKEY, Donkey.class, CraftDonkey::new, createLiving(net.minecraft.world.entity.EntityType.DONKEY)));
+        register(new EntityTypeData<>(EntityType.MULE, Mule.class, CraftMule::new, createLiving(net.minecraft.world.entity.EntityType.MULE)));
+        register(new EntityTypeData<>(EntityType.EVOKER, Evoker.class, CraftEvoker::new, createLiving(net.minecraft.world.entity.EntityType.EVOKER)));
+        register(new EntityTypeData<>(EntityType.VEX, Vex.class, CraftVex::new, createLiving(net.minecraft.world.entity.EntityType.VEX)));
+        register(new EntityTypeData<>(EntityType.VINDICATOR, Vindicator.class, CraftVindicator::new, createLiving(net.minecraft.world.entity.EntityType.VINDICATOR)));
+        register(new EntityTypeData<>(EntityType.ILLUSIONER, Illusioner.class, CraftIllusioner::new, createLiving(net.minecraft.world.entity.EntityType.ILLUSIONER)));
+        register(new EntityTypeData<>(EntityType.CREEPER, Creeper.class, CraftCreeper::new, createLiving(net.minecraft.world.entity.EntityType.CREEPER)));
+        register(new EntityTypeData<>(EntityType.SKELETON, Skeleton.class, CraftSkeleton::new, createLiving(net.minecraft.world.entity.EntityType.SKELETON)));
+        register(new EntityTypeData<>(EntityType.SPIDER, Spider.class, CraftSpider::new, createLiving(net.minecraft.world.entity.EntityType.SPIDER)));
+        register(new EntityTypeData<>(EntityType.GIANT, Giant.class, CraftGiant::new, createLiving(net.minecraft.world.entity.EntityType.GIANT)));
+        register(new EntityTypeData<>(EntityType.ZOMBIE, Zombie.class, CraftZombie::new, createLiving(net.minecraft.world.entity.EntityType.ZOMBIE)));
+        register(new EntityTypeData<>(EntityType.SLIME, Slime.class, CraftSlime::new, createLiving(net.minecraft.world.entity.EntityType.SLIME)));
+        register(new EntityTypeData<>(EntityType.GHAST, Ghast.class, CraftGhast::new, createLiving(net.minecraft.world.entity.EntityType.GHAST)));
+        register(new EntityTypeData<>(EntityType.ZOMBIFIED_PIGLIN, PigZombie.class, CraftPigZombie::new, createLiving(net.minecraft.world.entity.EntityType.ZOMBIFIED_PIGLIN)));
+        register(new EntityTypeData<>(EntityType.ENDERMAN, Enderman.class, CraftEnderman::new, createLiving(net.minecraft.world.entity.EntityType.ENDERMAN)));
+        register(new EntityTypeData<>(EntityType.CAVE_SPIDER, CaveSpider.class, CraftCaveSpider::new, createLiving(net.minecraft.world.entity.EntityType.CAVE_SPIDER)));
+        register(new EntityTypeData<>(EntityType.SILVERFISH, Silverfish.class, CraftSilverfish::new, createLiving(net.minecraft.world.entity.EntityType.SILVERFISH)));
+        register(new EntityTypeData<>(EntityType.BLAZE, Blaze.class, CraftBlaze::new, createLiving(net.minecraft.world.entity.EntityType.BLAZE)));
+        register(new EntityTypeData<>(EntityType.MAGMA_CUBE, MagmaCube.class, CraftMagmaCube::new, createLiving(net.minecraft.world.entity.EntityType.MAGMA_CUBE)));
+        register(new EntityTypeData<>(EntityType.WITHER, Wither.class, CraftWither::new, createLiving(net.minecraft.world.entity.EntityType.WITHER)));
+        register(new EntityTypeData<>(EntityType.BAT, Bat.class, CraftBat::new, createLiving(net.minecraft.world.entity.EntityType.BAT)));
+        register(new EntityTypeData<>(EntityType.WITCH, Witch.class, CraftWitch::new, createLiving(net.minecraft.world.entity.EntityType.WITCH)));
+        register(new EntityTypeData<>(EntityType.ENDERMITE, Endermite.class, CraftEndermite::new, createLiving(net.minecraft.world.entity.EntityType.ENDERMITE)));
+        register(new EntityTypeData<>(EntityType.GUARDIAN, Guardian.class, CraftGuardian::new, createLiving(net.minecraft.world.entity.EntityType.GUARDIAN)));
+        register(new EntityTypeData<>(EntityType.SHULKER, Shulker.class, CraftShulker::new, createLiving(net.minecraft.world.entity.EntityType.SHULKER)));
+        register(new EntityTypeData<>(EntityType.PIG, Pig.class, CraftPig::new, createLiving(net.minecraft.world.entity.EntityType.PIG)));
+        register(new EntityTypeData<>(EntityType.SHEEP, Sheep.class, CraftSheep::new, createLiving(net.minecraft.world.entity.EntityType.SHEEP)));
+        register(new EntityTypeData<>(EntityType.COW, Cow.class, CraftCow::new, createLiving(net.minecraft.world.entity.EntityType.COW)));
+        register(new EntityTypeData<>(EntityType.CHICKEN, Chicken.class, CraftChicken::new, createLiving(net.minecraft.world.entity.EntityType.CHICKEN)));
+        register(new EntityTypeData<>(EntityType.SQUID, Squid.class, CraftSquid::new, createLiving(net.minecraft.world.entity.EntityType.SQUID)));
+        register(new EntityTypeData<>(EntityType.WOLF, Wolf.class, CraftWolf::new, createLiving(net.minecraft.world.entity.EntityType.WOLF)));
+        register(new EntityTypeData<>(EntityType.MOOSHROOM, MushroomCow.class, CraftMushroomCow::new, createLiving(net.minecraft.world.entity.EntityType.MOOSHROOM)));
+        register(new EntityTypeData<>(EntityType.SNOW_GOLEM, Snowman.class, CraftSnowman::new, createLiving(net.minecraft.world.entity.EntityType.SNOW_GOLEM)));
+        register(new EntityTypeData<>(EntityType.OCELOT, Ocelot.class, CraftOcelot::new, createLiving(net.minecraft.world.entity.EntityType.OCELOT)));
+        register(new EntityTypeData<>(EntityType.IRON_GOLEM, IronGolem.class, CraftIronGolem::new, createLiving(net.minecraft.world.entity.EntityType.IRON_GOLEM)));
+        register(new EntityTypeData<>(EntityType.HORSE, Horse.class, CraftHorse::new, createLiving(net.minecraft.world.entity.EntityType.HORSE)));
+        register(new EntityTypeData<>(EntityType.RABBIT, Rabbit.class, CraftRabbit::new, createLiving(net.minecraft.world.entity.EntityType.RABBIT)));
+        register(new EntityTypeData<>(EntityType.POLAR_BEAR, PolarBear.class, CraftPolarBear::new, createLiving(net.minecraft.world.entity.EntityType.POLAR_BEAR)));
+        register(new EntityTypeData<>(EntityType.LLAMA, Llama.class, CraftLlama::new, createLiving(net.minecraft.world.entity.EntityType.LLAMA)));
+        register(new EntityTypeData<>(EntityType.PARROT, Parrot.class, CraftParrot::new, createLiving(net.minecraft.world.entity.EntityType.PARROT)));
+        register(new EntityTypeData<>(EntityType.VILLAGER, Villager.class, CraftVillager::new, createLiving(net.minecraft.world.entity.EntityType.VILLAGER)));
+        register(new EntityTypeData<>(EntityType.TURTLE, Turtle.class, CraftTurtle::new, createLiving(net.minecraft.world.entity.EntityType.TURTLE)));
+        register(new EntityTypeData<>(EntityType.PHANTOM, Phantom.class, CraftPhantom::new, createLiving(net.minecraft.world.entity.EntityType.PHANTOM)));
+        register(new EntityTypeData<>(EntityType.COD, Cod.class, CraftCod::new, createLiving(net.minecraft.world.entity.EntityType.COD)));
+        register(new EntityTypeData<>(EntityType.SALMON, Salmon.class, CraftSalmon::new, createLiving(net.minecraft.world.entity.EntityType.SALMON)));
+        register(new EntityTypeData<>(EntityType.PUFFERFISH, PufferFish.class, CraftPufferFish::new, createLiving(net.minecraft.world.entity.EntityType.PUFFERFISH)));
+        register(new EntityTypeData<>(EntityType.TROPICAL_FISH, TropicalFish.class, CraftTropicalFish::new, createLiving(net.minecraft.world.entity.EntityType.TROPICAL_FISH)));
+        register(new EntityTypeData<>(EntityType.DROWNED, Drowned.class, CraftDrowned::new, createLiving(net.minecraft.world.entity.EntityType.DROWNED)));
+        register(new EntityTypeData<>(EntityType.DOLPHIN, Dolphin.class, CraftDolphin::new, createLiving(net.minecraft.world.entity.EntityType.DOLPHIN)));
+        register(new EntityTypeData<>(EntityType.CAT, Cat.class, CraftCat::new, createLiving(net.minecraft.world.entity.EntityType.CAT)));
+        register(new EntityTypeData<>(EntityType.PANDA, Panda.class, CraftPanda::new, createLiving(net.minecraft.world.entity.EntityType.PANDA)));
+        register(new EntityTypeData<>(EntityType.PILLAGER, Pillager.class, CraftPillager::new, createLiving(net.minecraft.world.entity.EntityType.PILLAGER)));
+        register(new EntityTypeData<>(EntityType.RAVAGER, Ravager.class, CraftRavager::new, createLiving(net.minecraft.world.entity.EntityType.RAVAGER)));
+        register(new EntityTypeData<>(EntityType.TRADER_LLAMA, TraderLlama.class, CraftTraderLlama::new, createLiving(net.minecraft.world.entity.EntityType.TRADER_LLAMA)));
+        register(new EntityTypeData<>(EntityType.WANDERING_TRADER, WanderingTrader.class, CraftWanderingTrader::new, createLiving(net.minecraft.world.entity.EntityType.WANDERING_TRADER)));
+        register(new EntityTypeData<>(EntityType.FOX, Fox.class, CraftFox::new, createLiving(net.minecraft.world.entity.EntityType.FOX)));
+        register(new EntityTypeData<>(EntityType.BEE, Bee.class, CraftBee::new, createLiving(net.minecraft.world.entity.EntityType.BEE)));
+        register(new EntityTypeData<>(EntityType.HOGLIN, Hoglin.class, CraftHoglin::new, createLiving(net.minecraft.world.entity.EntityType.HOGLIN)));
+        register(new EntityTypeData<>(EntityType.PIGLIN, Piglin.class, CraftPiglin::new, createLiving(net.minecraft.world.entity.EntityType.PIGLIN)));
+        register(new EntityTypeData<>(EntityType.STRIDER, Strider.class, CraftStrider::new, createLiving(net.minecraft.world.entity.EntityType.STRIDER)));
+        register(new EntityTypeData<>(EntityType.ZOGLIN, Zoglin.class, CraftZoglin::new, createLiving(net.minecraft.world.entity.EntityType.ZOGLIN)));
+        register(new EntityTypeData<>(EntityType.PIGLIN_BRUTE, PiglinBrute.class, CraftPiglinBrute::new, createLiving(net.minecraft.world.entity.EntityType.PIGLIN_BRUTE)));
+        register(new EntityTypeData<>(EntityType.AXOLOTL, Axolotl.class, CraftAxolotl::new, createLiving(net.minecraft.world.entity.EntityType.AXOLOTL)));
+        register(new EntityTypeData<>(EntityType.GLOW_SQUID, GlowSquid.class, CraftGlowSquid::new, createLiving(net.minecraft.world.entity.EntityType.GLOW_SQUID)));
+        register(new EntityTypeData<>(EntityType.GOAT, Goat.class, CraftGoat::new, createLiving(net.minecraft.world.entity.EntityType.GOAT)));
+        register(new EntityTypeData<>(EntityType.ALLAY, Allay.class, CraftAllay::new, createLiving(net.minecraft.world.entity.EntityType.ALLAY)));
+        register(new EntityTypeData<>(EntityType.FROG, Frog.class, CraftFrog::new, createLiving(net.minecraft.world.entity.EntityType.FROG)));
+        register(new EntityTypeData<>(EntityType.TADPOLE, Tadpole.class, CraftTadpole::new, createLiving(net.minecraft.world.entity.EntityType.TADPOLE)));
+        register(new EntityTypeData<>(EntityType.WARDEN, Warden.class, CraftWarden::new, createLiving(net.minecraft.world.entity.EntityType.WARDEN)));
+        register(new EntityTypeData<>(EntityType.CAMEL, Camel.class, CraftCamel::new, createLiving(net.minecraft.world.entity.EntityType.CAMEL)));
+        register(new EntityTypeData<>(EntityType.SNIFFER, Sniffer.class, CraftSniffer::new, createLiving(net.minecraft.world.entity.EntityType.SNIFFER)));
+        register(new EntityTypeData<>(EntityType.BREEZE, Breeze.class, CraftBreeze::new, createLiving(net.minecraft.world.entity.EntityType.BREEZE)));
+        register(new EntityTypeData<>(EntityType.ARMADILLO, Armadillo.class, CraftArmadillo::new, createLiving(net.minecraft.world.entity.EntityType.ARMADILLO)));
+        register(new EntityTypeData<>(EntityType.CREAKING, Creaking.class, CraftCreaking::new, createLiving(net.minecraft.world.entity.EntityType.CREAKING)));
 
-        Function<SpawnData, EntityEnderDragon> dragonFunction = createLiving(EntityTypes.ENDER_DRAGON);
+        Function<SpawnData, net.minecraft.world.entity.boss.enderdragon.EnderDragon> dragonFunction = createLiving(net.minecraft.world.entity.EntityType.ENDER_DRAGON);
         register(new EntityTypeData<>(EntityType.ENDER_DRAGON, EnderDragon.class, CraftEnderDragon::new, spawnData -> {
             Preconditions.checkArgument(spawnData.normalWorld(), "Cannot spawn entity %s during world generation", EnderDragon.class.getName());
             return dragonFunction.apply(spawnData);
         }));
 
         // Fireball
-        register(new EntityTypeData<>(EntityType.FIREBALL, LargeFireball.class, CraftLargeFireball::new, createFireball(EntityTypes.FIREBALL)));
-        register(new EntityTypeData<>(EntityType.SMALL_FIREBALL, SmallFireball.class, CraftSmallFireball::new, createFireball(EntityTypes.SMALL_FIREBALL)));
-        register(new EntityTypeData<>(EntityType.WITHER_SKULL, WitherSkull.class, CraftWitherSkull::new, createFireball(EntityTypes.WITHER_SKULL)));
-        register(new EntityTypeData<>(EntityType.DRAGON_FIREBALL, DragonFireball.class, CraftDragonFireball::new, createFireball(EntityTypes.DRAGON_FIREBALL)));
-        register(new EntityTypeData<>(EntityType.WIND_CHARGE, WindCharge.class, CraftWindCharge::new, createFireball(EntityTypes.WIND_CHARGE)));
-        register(new EntityTypeData<>(EntityType.BREEZE_WIND_CHARGE, BreezeWindCharge.class, CraftBreezeWindCharge::new, createFireball(EntityTypes.BREEZE_WIND_CHARGE)));
+        register(new EntityTypeData<>(EntityType.FIREBALL, LargeFireball.class, CraftLargeFireball::new, createFireball(net.minecraft.world.entity.EntityType.FIREBALL)));
+        register(new EntityTypeData<>(EntityType.SMALL_FIREBALL, SmallFireball.class, CraftSmallFireball::new, createFireball(net.minecraft.world.entity.EntityType.SMALL_FIREBALL)));
+        register(new EntityTypeData<>(EntityType.WITHER_SKULL, WitherSkull.class, CraftWitherSkull::new, createFireball(net.minecraft.world.entity.EntityType.WITHER_SKULL)));
+        register(new EntityTypeData<>(EntityType.DRAGON_FIREBALL, DragonFireball.class, CraftDragonFireball::new, createFireball(net.minecraft.world.entity.EntityType.DRAGON_FIREBALL)));
+        register(new EntityTypeData<>(EntityType.WIND_CHARGE, WindCharge.class, CraftWindCharge::new, createFireball(net.minecraft.world.entity.EntityType.WIND_CHARGE)));
+        register(new EntityTypeData<>(EntityType.BREEZE_WIND_CHARGE, BreezeWindCharge.class, CraftBreezeWindCharge::new, createFireball(net.minecraft.world.entity.EntityType.BREEZE_WIND_CHARGE)));
 
         // Hanging
         register(new EntityTypeData<>(EntityType.PAINTING, Painting.class, CraftPainting::new, createHanging(Painting.class, (spawnData, hangingData) -> {
                     if (spawnData.normalWorld && hangingData.randomize()) {
-                        return EntityPainting.create(spawnData.minecraftWorld(), hangingData.position(), hangingData.direction()).orElse(null);
+                        return net.minecraft.world.entity.decoration.Painting.create(spawnData.minecraftWorld(), hangingData.position(), hangingData.direction()).orElse(null);
                     } else {
-                        EntityPainting entity = new EntityPainting(EntityTypes.PAINTING, spawnData.minecraftWorld());
+                        net.minecraft.world.entity.decoration.Painting entity = new net.minecraft.world.entity.decoration.Painting(net.minecraft.world.entity.EntityType.PAINTING, spawnData.minecraftWorld());
                         entity.absMoveTo(spawnData.x(), spawnData.y(), spawnData.z(), spawnData.yaw(), spawnData.pitch());
                         entity.setDirection(hangingData.direction());
                         return entity;
                     }
                 }
         )));
-        register(new EntityTypeData<>(EntityType.ITEM_FRAME, ItemFrame.class, CraftItemFrame::new, createHanging(ItemFrame.class, (spawnData, hangingData) -> new EntityItemFrame(spawnData.minecraftWorld(), hangingData.position(), hangingData.direction()))));
+        register(new EntityTypeData<>(EntityType.ITEM_FRAME, ItemFrame.class, CraftItemFrame::new, createHanging(ItemFrame.class, (spawnData, hangingData) -> new net.minecraft.world.entity.decoration.ItemFrame(spawnData.minecraftWorld(), hangingData.position(), hangingData.direction()))));
         register(new EntityTypeData<>(EntityType.GLOW_ITEM_FRAME, GlowItemFrame.class, CraftGlowItemFrame::new, createHanging(GlowItemFrame.class, (spawnData, hangingData) -> new net.minecraft.world.entity.decoration.GlowItemFrame(spawnData.minecraftWorld(), hangingData.position(), hangingData.direction()))));
 
         // Move no rotation
-        register(new EntityTypeData<>(EntityType.ARROW, Arrow.class, CraftArrow::new, createAndMoveEmptyRot(EntityTypes.ARROW)));
-        register(new EntityTypeData<>(EntityType.ENDER_PEARL, EnderPearl.class, CraftEnderPearl::new, createAndMoveEmptyRot(EntityTypes.ENDER_PEARL)));
-        register(new EntityTypeData<>(EntityType.EXPERIENCE_BOTTLE, ThrownExpBottle.class, CraftThrownExpBottle::new, createAndMoveEmptyRot(EntityTypes.EXPERIENCE_BOTTLE)));
-        register(new EntityTypeData<>(EntityType.SPECTRAL_ARROW, SpectralArrow.class, CraftSpectralArrow::new, createAndMoveEmptyRot(EntityTypes.SPECTRAL_ARROW)));
-        register(new EntityTypeData<>(EntityType.END_CRYSTAL, EnderCrystal.class, CraftEnderCrystal::new, createAndMoveEmptyRot(EntityTypes.END_CRYSTAL)));
-        register(new EntityTypeData<>(EntityType.TRIDENT, Trident.class, CraftTrident::new, createAndMoveEmptyRot(EntityTypes.TRIDENT)));
-        register(new EntityTypeData<>(EntityType.LIGHTNING_BOLT, LightningStrike.class, CraftLightningStrike::new, createAndMoveEmptyRot(EntityTypes.LIGHTNING_BOLT)));
+        register(new EntityTypeData<>(EntityType.ARROW, Arrow.class, CraftArrow::new, createAndMoveEmptyRot(net.minecraft.world.entity.EntityType.ARROW)));
+        register(new EntityTypeData<>(EntityType.ENDER_PEARL, EnderPearl.class, CraftEnderPearl::new, createAndMoveEmptyRot(net.minecraft.world.entity.EntityType.ENDER_PEARL)));
+        register(new EntityTypeData<>(EntityType.EXPERIENCE_BOTTLE, ThrownExpBottle.class, CraftThrownExpBottle::new, createAndMoveEmptyRot(net.minecraft.world.entity.EntityType.EXPERIENCE_BOTTLE)));
+        register(new EntityTypeData<>(EntityType.SPECTRAL_ARROW, SpectralArrow.class, CraftSpectralArrow::new, createAndMoveEmptyRot(net.minecraft.world.entity.EntityType.SPECTRAL_ARROW)));
+        register(new EntityTypeData<>(EntityType.END_CRYSTAL, EnderCrystal.class, CraftEnderCrystal::new, createAndMoveEmptyRot(net.minecraft.world.entity.EntityType.END_CRYSTAL)));
+        register(new EntityTypeData<>(EntityType.TRIDENT, Trident.class, CraftTrident::new, createAndMoveEmptyRot(net.minecraft.world.entity.EntityType.TRIDENT)));
+        register(new EntityTypeData<>(EntityType.LIGHTNING_BOLT, LightningStrike.class, CraftLightningStrike::new, createAndMoveEmptyRot(net.minecraft.world.entity.EntityType.LIGHTNING_BOLT)));
 
         // Move
-        register(new EntityTypeData<>(EntityType.SHULKER_BULLET, ShulkerBullet.class, CraftShulkerBullet::new, createAndMove(EntityTypes.SHULKER_BULLET)));
-        register(new EntityTypeData<>(EntityType.LLAMA_SPIT, LlamaSpit.class, CraftLlamaSpit::new, createAndMove(EntityTypes.LLAMA_SPIT)));
-        register(new EntityTypeData<>(EntityType.OMINOUS_ITEM_SPAWNER, OminousItemSpawner.class, CraftOminousItemSpawner::new, createAndMove(EntityTypes.OMINOUS_ITEM_SPAWNER)));
+        register(new EntityTypeData<>(EntityType.SHULKER_BULLET, ShulkerBullet.class, CraftShulkerBullet::new, createAndMove(net.minecraft.world.entity.EntityType.SHULKER_BULLET)));
+        register(new EntityTypeData<>(EntityType.LLAMA_SPIT, LlamaSpit.class, CraftLlamaSpit::new, createAndMove(net.minecraft.world.entity.EntityType.LLAMA_SPIT)));
+        register(new EntityTypeData<>(EntityType.OMINOUS_ITEM_SPAWNER, OminousItemSpawner.class, CraftOminousItemSpawner::new, createAndMove(net.minecraft.world.entity.EntityType.OMINOUS_ITEM_SPAWNER)));
         // Move (boats)
-        register(new EntityTypeData<>(EntityType.ACACIA_BOAT, AcaciaBoat.class, CraftAcaciaBoat::new, createAndMove(EntityTypes.ACACIA_BOAT)));
-        register(new EntityTypeData<>(EntityType.ACACIA_CHEST_BOAT, AcaciaChestBoat.class, CraftAcaciaChestBoat::new, createAndMove(EntityTypes.ACACIA_CHEST_BOAT)));
-        register(new EntityTypeData<>(EntityType.BAMBOO_RAFT, BambooRaft.class, CraftBambooRaft::new, createAndMove(EntityTypes.BAMBOO_RAFT)));
-        register(new EntityTypeData<>(EntityType.BAMBOO_CHEST_RAFT, BambooChestRaft.class, CraftBambooChestRaft::new, createAndMove(EntityTypes.BAMBOO_CHEST_RAFT)));
-        register(new EntityTypeData<>(EntityType.BIRCH_BOAT, BirchBoat.class, CraftBirchBoat::new, createAndMove(EntityTypes.BIRCH_BOAT)));
-        register(new EntityTypeData<>(EntityType.BIRCH_CHEST_BOAT, BirchChestBoat.class, CraftBirchChestBoat::new, createAndMove(EntityTypes.BIRCH_CHEST_BOAT)));
-        register(new EntityTypeData<>(EntityType.CHERRY_BOAT, CherryBoat.class, CraftCherryBoat::new, createAndMove(EntityTypes.CHERRY_BOAT)));
-        register(new EntityTypeData<>(EntityType.CHERRY_CHEST_BOAT, CherryChestBoat.class, CraftCherryChestBoat::new, createAndMove(EntityTypes.CHERRY_CHEST_BOAT)));
-        register(new EntityTypeData<>(EntityType.DARK_OAK_BOAT, DarkOakBoat.class, CraftDarkOakBoat::new, createAndMove(EntityTypes.DARK_OAK_BOAT)));
-        register(new EntityTypeData<>(EntityType.DARK_OAK_CHEST_BOAT, DarkOakChestBoat.class, CraftDarkOakChestBoat::new, createAndMove(EntityTypes.DARK_OAK_CHEST_BOAT)));
-        register(new EntityTypeData<>(EntityType.JUNGLE_BOAT, JungleBoat.class, CraftJungleBoat::new, createAndMove(EntityTypes.JUNGLE_BOAT)));
-        register(new EntityTypeData<>(EntityType.JUNGLE_CHEST_BOAT, JungleChestBoat.class, CraftJungleChestBoat::new, createAndMove(EntityTypes.JUNGLE_CHEST_BOAT)));
-        register(new EntityTypeData<>(EntityType.MANGROVE_BOAT, MangroveBoat.class, CraftMangroveBoat::new, createAndMove(EntityTypes.MANGROVE_BOAT)));
-        register(new EntityTypeData<>(EntityType.MANGROVE_CHEST_BOAT, MangroveChestBoat.class, CraftMangroveChestBoat::new, createAndMove(EntityTypes.MANGROVE_CHEST_BOAT)));
-        register(new EntityTypeData<>(EntityType.OAK_BOAT, OakBoat.class, CraftOakBoat::new, createAndMove(EntityTypes.OAK_BOAT)));
-        register(new EntityTypeData<>(EntityType.OAK_CHEST_BOAT, OakChestBoat.class, CraftOakChestBoat::new, createAndMove(EntityTypes.OAK_CHEST_BOAT)));
-        register(new EntityTypeData<>(EntityType.PALE_OAK_BOAT, PaleOakBoat.class, CraftPaleOakBoat::new, createAndMove(EntityTypes.PALE_OAK_BOAT)));
-        register(new EntityTypeData<>(EntityType.PALE_OAK_CHEST_BOAT, PaleOakChestBoat.class, CraftPaleOakChestBoat::new, createAndMove(EntityTypes.PALE_OAK_CHEST_BOAT)));
-        register(new EntityTypeData<>(EntityType.SPRUCE_BOAT, SpruceBoat.class, CraftSpruceBoat::new, createAndMove(EntityTypes.SPRUCE_BOAT)));
-        register(new EntityTypeData<>(EntityType.SPRUCE_CHEST_BOAT, SpruceChestBoat.class, CraftSpruceChestBoat::new, createAndMove(EntityTypes.SPRUCE_CHEST_BOAT)));
+        register(new EntityTypeData<>(EntityType.ACACIA_BOAT, AcaciaBoat.class, CraftAcaciaBoat::new, createAndMove(net.minecraft.world.entity.EntityType.ACACIA_BOAT)));
+        register(new EntityTypeData<>(EntityType.ACACIA_CHEST_BOAT, AcaciaChestBoat.class, CraftAcaciaChestBoat::new, createAndMove(net.minecraft.world.entity.EntityType.ACACIA_CHEST_BOAT)));
+        register(new EntityTypeData<>(EntityType.BAMBOO_RAFT, BambooRaft.class, CraftBambooRaft::new, createAndMove(net.minecraft.world.entity.EntityType.BAMBOO_RAFT)));
+        register(new EntityTypeData<>(EntityType.BAMBOO_CHEST_RAFT, BambooChestRaft.class, CraftBambooChestRaft::new, createAndMove(net.minecraft.world.entity.EntityType.BAMBOO_CHEST_RAFT)));
+        register(new EntityTypeData<>(EntityType.BIRCH_BOAT, BirchBoat.class, CraftBirchBoat::new, createAndMove(net.minecraft.world.entity.EntityType.BIRCH_BOAT)));
+        register(new EntityTypeData<>(EntityType.BIRCH_CHEST_BOAT, BirchChestBoat.class, CraftBirchChestBoat::new, createAndMove(net.minecraft.world.entity.EntityType.BIRCH_CHEST_BOAT)));
+        register(new EntityTypeData<>(EntityType.CHERRY_BOAT, CherryBoat.class, CraftCherryBoat::new, createAndMove(net.minecraft.world.entity.EntityType.CHERRY_BOAT)));
+        register(new EntityTypeData<>(EntityType.CHERRY_CHEST_BOAT, CherryChestBoat.class, CraftCherryChestBoat::new, createAndMove(net.minecraft.world.entity.EntityType.CHERRY_CHEST_BOAT)));
+        register(new EntityTypeData<>(EntityType.DARK_OAK_BOAT, DarkOakBoat.class, CraftDarkOakBoat::new, createAndMove(net.minecraft.world.entity.EntityType.DARK_OAK_BOAT)));
+        register(new EntityTypeData<>(EntityType.DARK_OAK_CHEST_BOAT, DarkOakChestBoat.class, CraftDarkOakChestBoat::new, createAndMove(net.minecraft.world.entity.EntityType.DARK_OAK_CHEST_BOAT)));
+        register(new EntityTypeData<>(EntityType.JUNGLE_BOAT, JungleBoat.class, CraftJungleBoat::new, createAndMove(net.minecraft.world.entity.EntityType.JUNGLE_BOAT)));
+        register(new EntityTypeData<>(EntityType.JUNGLE_CHEST_BOAT, JungleChestBoat.class, CraftJungleChestBoat::new, createAndMove(net.minecraft.world.entity.EntityType.JUNGLE_CHEST_BOAT)));
+        register(new EntityTypeData<>(EntityType.MANGROVE_BOAT, MangroveBoat.class, CraftMangroveBoat::new, createAndMove(net.minecraft.world.entity.EntityType.MANGROVE_BOAT)));
+        register(new EntityTypeData<>(EntityType.MANGROVE_CHEST_BOAT, MangroveChestBoat.class, CraftMangroveChestBoat::new, createAndMove(net.minecraft.world.entity.EntityType.MANGROVE_CHEST_BOAT)));
+        register(new EntityTypeData<>(EntityType.OAK_BOAT, OakBoat.class, CraftOakBoat::new, createAndMove(net.minecraft.world.entity.EntityType.OAK_BOAT)));
+        register(new EntityTypeData<>(EntityType.OAK_CHEST_BOAT, OakChestBoat.class, CraftOakChestBoat::new, createAndMove(net.minecraft.world.entity.EntityType.OAK_CHEST_BOAT)));
+        register(new EntityTypeData<>(EntityType.PALE_OAK_BOAT, PaleOakBoat.class, CraftPaleOakBoat::new, createAndMove(net.minecraft.world.entity.EntityType.PALE_OAK_BOAT)));
+        register(new EntityTypeData<>(EntityType.PALE_OAK_CHEST_BOAT, PaleOakChestBoat.class, CraftPaleOakChestBoat::new, createAndMove(net.minecraft.world.entity.EntityType.PALE_OAK_CHEST_BOAT)));
+        register(new EntityTypeData<>(EntityType.SPRUCE_BOAT, SpruceBoat.class, CraftSpruceBoat::new, createAndMove(net.minecraft.world.entity.EntityType.SPRUCE_BOAT)));
+        register(new EntityTypeData<>(EntityType.SPRUCE_CHEST_BOAT, SpruceChestBoat.class, CraftSpruceChestBoat::new, createAndMove(net.minecraft.world.entity.EntityType.SPRUCE_CHEST_BOAT)));
 
         // Set pos
-        register(new EntityTypeData<>(EntityType.MARKER, Marker.class, CraftMarker::new, createAndSetPos(EntityTypes.MARKER)));
-        register(new EntityTypeData<>(EntityType.BLOCK_DISPLAY, BlockDisplay.class, CraftBlockDisplay::new, createAndSetPos(EntityTypes.BLOCK_DISPLAY)));
-        register(new EntityTypeData<>(EntityType.INTERACTION, Interaction.class, CraftInteraction::new, createAndSetPos(EntityTypes.INTERACTION)));
-        register(new EntityTypeData<>(EntityType.ITEM_DISPLAY, ItemDisplay.class, CraftItemDisplay::new, createAndSetPos(EntityTypes.ITEM_DISPLAY)));
-        register(new EntityTypeData<>(EntityType.TEXT_DISPLAY, TextDisplay.class, CraftTextDisplay::new, createAndSetPos(EntityTypes.TEXT_DISPLAY)));
+        register(new EntityTypeData<>(EntityType.MARKER, Marker.class, CraftMarker::new, createAndSetPos(net.minecraft.world.entity.EntityType.MARKER)));
+        register(new EntityTypeData<>(EntityType.BLOCK_DISPLAY, BlockDisplay.class, CraftBlockDisplay::new, createAndSetPos(net.minecraft.world.entity.EntityType.BLOCK_DISPLAY)));
+        register(new EntityTypeData<>(EntityType.INTERACTION, Interaction.class, CraftInteraction::new, createAndSetPos(net.minecraft.world.entity.EntityType.INTERACTION)));
+        register(new EntityTypeData<>(EntityType.ITEM_DISPLAY, ItemDisplay.class, CraftItemDisplay::new, createAndSetPos(net.minecraft.world.entity.EntityType.ITEM_DISPLAY)));
+        register(new EntityTypeData<>(EntityType.TEXT_DISPLAY, TextDisplay.class, CraftTextDisplay::new, createAndSetPos(net.minecraft.world.entity.EntityType.TEXT_DISPLAY)));
 
         // MISC
         register(new EntityTypeData<>(EntityType.ITEM, Item.class, CraftItem::new, spawnData -> {
             // We use stone instead of empty, to give the plugin developer a visual clue, that the spawn method is working,
             // and that the item stack should probably be changed.
             net.minecraft.world.item.ItemStack itemStack = new net.minecraft.world.item.ItemStack(Items.STONE);
-            EntityItem item = new EntityItem(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), itemStack);
+            ItemEntity item = new ItemEntity(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), itemStack);
             item.setPickUpDelay(10);
 
             return item;
         }));
         register(new EntityTypeData<>(EntityType.EXPERIENCE_ORB, ExperienceOrb.class, CraftExperienceOrb::new,
-                spawnData -> new EntityExperienceOrb(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), 0)
+                spawnData -> new net.minecraft.world.entity.ExperienceOrb(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), 0)
         ));
-        register(new EntityTypeData<>(EntityType.AREA_EFFECT_CLOUD, AreaEffectCloud.class, CraftAreaEffectCloud::new, spawnData -> new EntityAreaEffectCloud(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z())));
-        register(new EntityTypeData<>(EntityType.EGG, Egg.class, CraftEgg::new, spawnData -> new EntityEgg(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), new net.minecraft.world.item.ItemStack(Items.EGG))));
-        register(new EntityTypeData<>(EntityType.LEASH_KNOT, LeashHitch.class, CraftLeash::new, spawnData -> new EntityLeash(spawnData.minecraftWorld(), BlockPosition.containing(spawnData.x(), spawnData.y(), spawnData.z())))); // SPIGOT-5732: LeashHitch has no direction and is always centered at a block
-        register(new EntityTypeData<>(EntityType.SNOWBALL, Snowball.class, CraftSnowball::new, spawnData -> new EntitySnowball(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), new net.minecraft.world.item.ItemStack(Items.SNOWBALL))));
-        register(new EntityTypeData<>(EntityType.EYE_OF_ENDER, EnderSignal.class, CraftEnderSignal::new, spawnData -> new EntityEnderSignal(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z())));
+        register(new EntityTypeData<>(EntityType.AREA_EFFECT_CLOUD, AreaEffectCloud.class, CraftAreaEffectCloud::new, spawnData -> new net.minecraft.world.entity.AreaEffectCloud(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z())));
+        register(new EntityTypeData<>(EntityType.EGG, Egg.class, CraftEgg::new, spawnData -> new ThrownEgg(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), new net.minecraft.world.item.ItemStack(Items.EGG))));
+        register(new EntityTypeData<>(EntityType.LEASH_KNOT, LeashHitch.class, CraftLeash::new, spawnData -> new LeashFenceKnotEntity(spawnData.minecraftWorld(), BlockPos.containing(spawnData.x(), spawnData.y(), spawnData.z())))); // SPIGOT-5732: LeashHitch has no direction and is always centered at a block
+        register(new EntityTypeData<>(EntityType.SNOWBALL, Snowball.class, CraftSnowball::new, spawnData -> new net.minecraft.world.entity.projectile.Snowball(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), new net.minecraft.world.item.ItemStack(Items.SNOWBALL))));
+        register(new EntityTypeData<>(EntityType.EYE_OF_ENDER, EnderSignal.class, CraftEnderSignal::new, spawnData -> new EyeOfEnder(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z())));
         register(new EntityTypeData<>(EntityType.POTION, ThrownPotion.class, CraftThrownPotion::new, spawnData -> {
-            EntityPotion entity = new EntityPotion(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), new net.minecraft.world.item.ItemStack(Items.SPLASH_POTION));
+            net.minecraft.world.entity.projectile.ThrownPotion entity = new net.minecraft.world.entity.projectile.ThrownPotion(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), new net.minecraft.world.item.ItemStack(Items.SPLASH_POTION));
             return entity;
         }));
-        register(new EntityTypeData<>(EntityType.TNT, TNTPrimed.class, CraftTNTPrimed::new, spawnData -> new EntityTNTPrimed(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), null)));
+        register(new EntityTypeData<>(EntityType.TNT, TNTPrimed.class, CraftTNTPrimed::new, spawnData -> new PrimedTnt(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), null)));
         register(new EntityTypeData<>(EntityType.FALLING_BLOCK, FallingBlock.class, CraftFallingBlock::new, spawnData -> {
-            BlockPosition pos = BlockPosition.containing(spawnData.x(), spawnData.y(), spawnData.z());
-            return EntityFallingBlock.fall(spawnData.minecraftWorld(), pos, spawnData.world().getBlockState(pos));
+            BlockPos pos = BlockPos.containing(spawnData.x(), spawnData.y(), spawnData.z());
+            return FallingBlockEntity.fall(spawnData.minecraftWorld(), pos, spawnData.world().getBlockState(pos));
         }));
-        register(new EntityTypeData<>(EntityType.FIREWORK_ROCKET, Firework.class, CraftFirework::new, spawnData -> new EntityFireworks(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), net.minecraft.world.item.ItemStack.EMPTY)));
-        register(new EntityTypeData<>(EntityType.EVOKER_FANGS, EvokerFangs.class, CraftEvokerFangs::new, spawnData -> new EntityEvokerFangs(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), (float) Math.toRadians(spawnData.yaw()), 0, null)));
-        register(new EntityTypeData<>(EntityType.COMMAND_BLOCK_MINECART, CommandMinecart.class, CraftMinecartCommand::new, createMinecart(EntityTypes.COMMAND_BLOCK_MINECART)));
-        register(new EntityTypeData<>(EntityType.MINECART, RideableMinecart.class, CraftMinecartRideable::new, createMinecart(EntityTypes.MINECART)));
-        register(new EntityTypeData<>(EntityType.CHEST_MINECART, StorageMinecart.class, CraftMinecartChest::new, createMinecart(EntityTypes.CHEST_MINECART)));
-        register(new EntityTypeData<>(EntityType.FURNACE_MINECART, PoweredMinecart.class, CraftMinecartFurnace::new, createMinecart(EntityTypes.FURNACE_MINECART)));
-        register(new EntityTypeData<>(EntityType.TNT_MINECART, ExplosiveMinecart.class, CraftMinecartTNT::new, createMinecart(EntityTypes.TNT_MINECART)));
-        register(new EntityTypeData<>(EntityType.HOPPER_MINECART, HopperMinecart.class, CraftMinecartHopper::new, createMinecart(EntityTypes.HOPPER_MINECART)));
-        register(new EntityTypeData<>(EntityType.SPAWNER_MINECART, SpawnerMinecart.class, CraftMinecartMobSpawner::new, createMinecart(EntityTypes.SPAWNER_MINECART)));
+        register(new EntityTypeData<>(EntityType.FIREWORK_ROCKET, Firework.class, CraftFirework::new, spawnData -> new FireworkRocketEntity(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), net.minecraft.world.item.ItemStack.EMPTY)));
+        register(new EntityTypeData<>(EntityType.EVOKER_FANGS, EvokerFangs.class, CraftEvokerFangs::new, spawnData -> new net.minecraft.world.entity.projectile.EvokerFangs(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), (float) Math.toRadians(spawnData.yaw()), 0, null)));
+        register(new EntityTypeData<>(EntityType.COMMAND_BLOCK_MINECART, CommandMinecart.class, CraftMinecartCommand::new, createMinecart(net.minecraft.world.entity.EntityType.COMMAND_BLOCK_MINECART)));
+        register(new EntityTypeData<>(EntityType.MINECART, RideableMinecart.class, CraftMinecartRideable::new, createMinecart(net.minecraft.world.entity.EntityType.MINECART)));
+        register(new EntityTypeData<>(EntityType.CHEST_MINECART, StorageMinecart.class, CraftMinecartChest::new, createMinecart(net.minecraft.world.entity.EntityType.CHEST_MINECART)));
+        register(new EntityTypeData<>(EntityType.FURNACE_MINECART, PoweredMinecart.class, CraftMinecartFurnace::new, createMinecart(net.minecraft.world.entity.EntityType.FURNACE_MINECART)));
+        register(new EntityTypeData<>(EntityType.TNT_MINECART, ExplosiveMinecart.class, CraftMinecartTNT::new, createMinecart(net.minecraft.world.entity.EntityType.TNT_MINECART)));
+        register(new EntityTypeData<>(EntityType.HOPPER_MINECART, HopperMinecart.class, CraftMinecartHopper::new, createMinecart(net.minecraft.world.entity.EntityType.HOPPER_MINECART)));
+        register(new EntityTypeData<>(EntityType.SPAWNER_MINECART, SpawnerMinecart.class, CraftMinecartMobSpawner::new, createMinecart(net.minecraft.world.entity.EntityType.SPAWNER_MINECART)));
 
         // None spawn able
         register(new EntityTypeData<>(EntityType.FISHING_BOBBER, FishHook.class, CraftFishHook::new, null)); // Cannot spawn a fish hook
@@ -465,55 +456,55 @@ public final class CraftEntityTypes {
     }
 
     private static void register(EntityTypeData<?, ?> typeData) {
-        EntityTypeData<?, ?> other = CLASS_TYPE_DATA.put(typeData.entityClass(), typeData);
+        EntityTypeData<?, ?> other = CraftEntityTypes.CLASS_TYPE_DATA.put(typeData.entityClass(), typeData);
         if (other != null) {
             Bukkit.getLogger().warning(String.format("Found multiple entity type data for class %s, replacing '%s' with new value '%s'", typeData.entityClass().getName(), other, typeData));
         }
 
-        other = ENTITY_TYPE_DATA.put(typeData.entityType(), typeData);
+        other = CraftEntityTypes.ENTITY_TYPE_DATA.put(typeData.entityType(), typeData);
         if (other != null) {
             Bukkit.getLogger().warning(String.format("Found multiple entity type data for entity type %s, replacing '%s' with new value '%s'", typeData.entityType().getKey(), other, typeData));
         }
     }
 
-    private static <R extends net.minecraft.world.entity.Entity> Function<SpawnData, R> fromEntityType(EntityTypes<R> entityTypes) {
+    private static <R extends net.minecraft.world.entity.Entity> Function<SpawnData, R> fromEntityType(net.minecraft.world.entity.EntityType<R> entityTypes) {
         return spawnData -> entityTypes.create(spawnData.minecraftWorld(), EntitySpawnReason.COMMAND);
     }
 
-    private static <R extends net.minecraft.world.entity.EntityLiving> Function<SpawnData, R> createLiving(EntityTypes<R> entityTypes) {
-        return combine(fromEntityType(entityTypes), ABS_MOVE);
+    private static <R extends net.minecraft.world.entity.LivingEntity> Function<SpawnData, R> createLiving(net.minecraft.world.entity.EntityType<R> entityTypes) {
+        return CraftEntityTypes.combine(CraftEntityTypes.fromEntityType(entityTypes), CraftEntityTypes.ABS_MOVE);
     }
 
-    private static <R extends EntityFireball> Function<SpawnData, R> createFireball(EntityTypes<R> entityTypes) {
-        return combine(createAndMove(entityTypes), DIRECTION);
+    private static <R extends AbstractHurtingProjectile> Function<SpawnData, R> createFireball(net.minecraft.world.entity.EntityType<R> entityTypes) {
+        return CraftEntityTypes.combine(CraftEntityTypes.createAndMove(entityTypes), CraftEntityTypes.DIRECTION);
     }
 
-    private static <R extends EntityMinecartAbstract> Function<SpawnData, R> createMinecart(EntityTypes<R> entityTypes) {
+    private static <R extends AbstractMinecart> Function<SpawnData, R> createMinecart(net.minecraft.world.entity.EntityType<R> entityTypes) {
         return spawnData -> {
             if (spawnData.normalWorld()) {
-                return EntityMinecartAbstract.createMinecart(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), entityTypes, EntitySpawnReason.TRIGGERED, ItemStack.EMPTY, null);
+                return AbstractMinecart.createMinecart(spawnData.minecraftWorld(), spawnData.x(), spawnData.y(), spawnData.z(), entityTypes, EntitySpawnReason.TRIGGERED, ItemStack.EMPTY, null);
             } else {
-                return combine(fromEntityType(entityTypes), (spawnData2, entity) -> entity.setInitialPos(spawnData.x(), spawnData.y(), spawnData.z())).apply(spawnData);
+                return CraftEntityTypes.combine(CraftEntityTypes.fromEntityType(entityTypes), (spawnData2, entity) -> entity.setInitialPos(spawnData.x(), spawnData.y(), spawnData.z())).apply(spawnData);
             }
         };
     }
 
-    private static <R extends net.minecraft.world.entity.Entity> Function<SpawnData, R> createAndMove(EntityTypes<R> entityTypes) {
-        return combine(fromEntityType(entityTypes), MOVE);
+    private static <R extends net.minecraft.world.entity.Entity> Function<SpawnData, R> createAndMove(net.minecraft.world.entity.EntityType<R> entityTypes) {
+        return CraftEntityTypes.combine(CraftEntityTypes.fromEntityType(entityTypes), CraftEntityTypes.MOVE);
     }
 
-    private static <R extends net.minecraft.world.entity.Entity> Function<SpawnData, R> createAndMoveEmptyRot(EntityTypes<R> entityTypes) {
-        return combine(fromEntityType(entityTypes), MOVE_EMPTY_ROT);
+    private static <R extends net.minecraft.world.entity.Entity> Function<SpawnData, R> createAndMoveEmptyRot(net.minecraft.world.entity.EntityType<R> entityTypes) {
+        return CraftEntityTypes.combine(CraftEntityTypes.fromEntityType(entityTypes), CraftEntityTypes.MOVE_EMPTY_ROT);
     }
 
-    private static <R extends net.minecraft.world.entity.Entity> Function<SpawnData, R> createAndSetPos(EntityTypes<R> entityTypes) {
-        return combine(fromEntityType(entityTypes), POS);
+    private static <R extends net.minecraft.world.entity.Entity> Function<SpawnData, R> createAndSetPos(net.minecraft.world.entity.EntityType<R> entityTypes) {
+        return CraftEntityTypes.combine(CraftEntityTypes.fromEntityType(entityTypes), CraftEntityTypes.POS);
     }
 
-    private record HangingData(boolean randomize, BlockPosition position, EnumDirection direction) {
+    private record HangingData(boolean randomize, BlockPos position, Direction direction) {
     }
 
-    private static <E extends Hanging, R extends EntityHanging> Function<SpawnData, R> createHanging(Class<E> clazz, BiFunction<SpawnData, HangingData, R> spawnFunction) {
+    private static <E extends Hanging, R extends HangingEntity> Function<SpawnData, R> createHanging(Class<E> clazz, BiFunction<SpawnData, HangingData, R> spawnFunction) {
         return spawnData -> {
             boolean randomizeData = spawnData.randomizeData();
             BlockFace face = BlockFace.SELF;
@@ -528,18 +519,18 @@ public final class CraftEntityTypes {
                 faces = new BlockFace[]{BlockFace.EAST, BlockFace.NORTH, BlockFace.WEST, BlockFace.SOUTH, BlockFace.UP, BlockFace.DOWN};
             }
 
-            final BlockPosition pos = BlockPosition.containing(spawnData.x(), spawnData.y(), spawnData.z());
+            final BlockPos pos = BlockPos.containing(spawnData.x(), spawnData.y(), spawnData.z());
             for (BlockFace dir : faces) {
-                IBlockData nmsBlock = spawnData.world().getBlockState(pos.relative(CraftBlock.blockFaceToNotch(dir)));
-                if (nmsBlock.isSolid() || BlockDiodeAbstract.isDiode(nmsBlock)) {
+                BlockState nmsBlock = spawnData.world().getBlockState(pos.relative(CraftBlock.blockFaceToNotch(dir)));
+                if (nmsBlock.isSolid() || DiodeBlock.isDiode(nmsBlock)) {
                     boolean taken = false;
-                    AxisAlignedBB bb = (ItemFrame.class.isAssignableFrom(clazz))
-                            ? EntityItemFrame.calculateBoundingBoxStatic(pos, CraftBlock.blockFaceToNotch(dir).getOpposite())
-                            : EntityPainting.calculateBoundingBoxStatic(pos, CraftBlock.blockFaceToNotch(dir).getOpposite(), width, height);
+                    AABB bb = (ItemFrame.class.isAssignableFrom(clazz))
+                            ? net.minecraft.world.entity.decoration.ItemFrame.calculateBoundingBoxStatic(pos, CraftBlock.blockFaceToNotch(dir).getOpposite())
+                            : net.minecraft.world.entity.decoration.Painting.calculateBoundingBoxStatic(pos, CraftBlock.blockFaceToNotch(dir).getOpposite(), width, height);
                     List<net.minecraft.world.entity.Entity> list = spawnData.world().getEntities(null, bb);
                     for (Iterator<net.minecraft.world.entity.Entity> it = list.iterator(); !taken && it.hasNext(); ) {
                         net.minecraft.world.entity.Entity e = it.next();
-                        if (e instanceof EntityHanging) {
+                        if (e instanceof HangingEntity) {
                             taken = true; // Hanging entities do not like hanging entities which intersect them.
                         }
                     }
@@ -558,7 +549,7 @@ public final class CraftEntityTypes {
                 randomizeData = false; // Don't randomize if no valid face is found, prevents null painting
             }
 
-            EnumDirection dir = CraftBlock.blockFaceToNotch(face).getOpposite();
+            Direction dir = CraftBlock.blockFaceToNotch(face).getOpposite();
             return spawnFunction.apply(spawnData, new HangingData(randomizeData, pos, dir));
         };
     }
@@ -572,11 +563,11 @@ public final class CraftEntityTypes {
     }
 
     public static <E extends Entity, M extends net.minecraft.world.entity.Entity> EntityTypeData<E, M> getEntityTypeData(EntityType entityType) {
-        return (EntityTypeData<E, M>) ENTITY_TYPE_DATA.get(entityType);
+        return (EntityTypeData<E, M>) CraftEntityTypes.ENTITY_TYPE_DATA.get(entityType);
     }
 
     public static <E extends Entity, M extends net.minecraft.world.entity.Entity> EntityTypeData<E, M> getEntityTypeData(Class<E> entityClass) {
-        return (EntityTypeData<E, M>) CLASS_TYPE_DATA.get(entityClass);
+        return (EntityTypeData<E, M>) CraftEntityTypes.CLASS_TYPE_DATA.get(entityClass);
     }
 
     private CraftEntityTypes() {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java
index d5d3766824..93ffe2ac37 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEvoker.java
@@ -1,19 +1,18 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntityEvoker;
-import net.minecraft.world.entity.monster.EntityIllagerWizard;
+import net.minecraft.world.entity.monster.SpellcasterIllager;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Evoker;
 
 public class CraftEvoker extends CraftSpellcaster implements Evoker {
 
-    public CraftEvoker(CraftServer server, EntityEvoker entity) {
+    public CraftEvoker(CraftServer server, net.minecraft.world.entity.monster.Evoker entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityEvoker getHandle() {
-        return (EntityEvoker) super.getHandle();
+    public net.minecraft.world.entity.monster.Evoker getHandle() {
+        return (net.minecraft.world.entity.monster.Evoker) super.getHandle();
     }
 
     @Override
@@ -23,11 +22,11 @@ public class CraftEvoker extends CraftSpellcaster implements Evoker {
 
     @Override
     public Evoker.Spell getCurrentSpell() {
-        return Evoker.Spell.values()[getHandle().getCurrentSpell().ordinal()];
+        return Evoker.Spell.values()[this.getHandle().getCurrentSpell().ordinal()];
     }
 
     @Override
     public void setCurrentSpell(Evoker.Spell spell) {
-        getHandle().setIsCastingSpell(spell == null ? EntityIllagerWizard.Spell.NONE : EntityIllagerWizard.Spell.byId(spell.ordinal()));
+        this.getHandle().setIsCastingSpell(spell == null ? SpellcasterIllager.IllagerSpell.NONE : SpellcasterIllager.IllagerSpell.byId(spell.ordinal()));
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEvokerFangs.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEvokerFangs.java
index 885fc3b2d4..19b368cc86 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEvokerFangs.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftEvokerFangs.java
@@ -1,21 +1,19 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.EntityLiving;
-import net.minecraft.world.entity.projectile.EntityEvokerFangs;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.EvokerFangs;
 import org.bukkit.entity.LivingEntity;
 
 public class CraftEvokerFangs extends CraftEntity implements EvokerFangs {
 
-    public CraftEvokerFangs(CraftServer server, EntityEvokerFangs entity) {
+    public CraftEvokerFangs(CraftServer server, net.minecraft.world.entity.projectile.EvokerFangs entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityEvokerFangs getHandle() {
-        return (EntityEvokerFangs) super.getHandle();
+    public net.minecraft.world.entity.projectile.EvokerFangs getHandle() {
+        return (net.minecraft.world.entity.projectile.EvokerFangs) super.getHandle();
     }
 
     @Override
@@ -25,25 +23,25 @@ public class CraftEvokerFangs extends CraftEntity implements EvokerFangs {
 
     @Override
     public LivingEntity getOwner() {
-        EntityLiving owner = getHandle().getOwner();
+        net.minecraft.world.entity.LivingEntity owner = this.getHandle().getOwner();
 
         return (owner == null) ? null : (LivingEntity) owner.getBukkitEntity();
     }
 
     @Override
     public void setOwner(LivingEntity owner) {
-        getHandle().setOwner(owner == null ? null : ((CraftLivingEntity) owner).getHandle());
+        this.getHandle().setOwner(owner == null ? null : ((CraftLivingEntity) owner).getHandle());
     }
 
     @Override
     public int getAttackDelay() {
-        return getHandle().warmupDelayTicks;
+        return this.getHandle().warmupDelayTicks;
     }
 
     @Override
     public void setAttackDelay(int delay) {
         Preconditions.checkArgument(delay >= 0, "Delay must be positive");
 
-        getHandle().warmupDelayTicks = delay;
+        this.getHandle().warmupDelayTicks = delay;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
index c3524a3bc7..9231511af4 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftExperienceOrb.java
@@ -1,27 +1,26 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.EntityExperienceOrb;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.ExperienceOrb;
 
 public class CraftExperienceOrb extends CraftEntity implements ExperienceOrb {
-    public CraftExperienceOrb(CraftServer server, EntityExperienceOrb entity) {
+    public CraftExperienceOrb(CraftServer server, net.minecraft.world.entity.ExperienceOrb entity) {
         super(server, entity);
     }
 
     @Override
     public int getExperience() {
-        return getHandle().value;
+        return this.getHandle().value;
     }
 
     @Override
     public void setExperience(int value) {
-        getHandle().value = value;
+        this.getHandle().value = value;
     }
 
     @Override
-    public EntityExperienceOrb getHandle() {
-        return (EntityExperienceOrb) entity;
+    public net.minecraft.world.entity.ExperienceOrb getHandle() {
+        return (net.minecraft.world.entity.ExperienceOrb) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java
index b5b6ce63f7..a7a3f74b84 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFallingBlock.java
@@ -1,7 +1,7 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.item.EntityFallingBlock;
+import net.minecraft.world.entity.item.FallingBlockEntity;
 import org.bukkit.Material;
 import org.bukkit.block.data.BlockData;
 import org.bukkit.craftbukkit.CraftServer;
@@ -10,13 +10,13 @@ import org.bukkit.entity.FallingBlock;
 
 public class CraftFallingBlock extends CraftEntity implements FallingBlock {
 
-    public CraftFallingBlock(CraftServer server, EntityFallingBlock entity) {
+    public CraftFallingBlock(CraftServer server, FallingBlockEntity entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityFallingBlock getHandle() {
-        return (EntityFallingBlock) entity;
+    public FallingBlockEntity getHandle() {
+        return (FallingBlockEntity) this.entity;
     }
 
     @Override
@@ -26,42 +26,42 @@ public class CraftFallingBlock extends CraftEntity implements FallingBlock {
 
     @Override
     public Material getMaterial() {
-        return getBlockData().getMaterial();
+        return this.getBlockData().getMaterial();
     }
 
     @Override
     public BlockData getBlockData() {
-        return CraftBlockData.fromData(getHandle().getBlockState());
+        return CraftBlockData.fromData(this.getHandle().getBlockState());
     }
 
     @Override
     public boolean getDropItem() {
-        return getHandle().dropItem;
+        return this.getHandle().dropItem;
     }
 
     @Override
     public void setDropItem(boolean drop) {
-        getHandle().dropItem = drop;
+        this.getHandle().dropItem = drop;
     }
 
     @Override
     public boolean getCancelDrop() {
-        return getHandle().cancelDrop;
+        return this.getHandle().cancelDrop;
     }
 
     @Override
     public void setCancelDrop(boolean cancelDrop) {
-        getHandle().cancelDrop = cancelDrop;
+        this.getHandle().cancelDrop = cancelDrop;
     }
 
     @Override
     public boolean canHurtEntities() {
-        return getHandle().hurtEntities;
+        return this.getHandle().hurtEntities;
     }
 
     @Override
     public void setHurtEntities(boolean hurtEntities) {
-        getHandle().hurtEntities = hurtEntities;
+        this.getHandle().hurtEntities = hurtEntities;
     }
 
     @Override
@@ -69,19 +69,19 @@ public class CraftFallingBlock extends CraftEntity implements FallingBlock {
         super.setTicksLived(value);
 
         // Second field for EntityFallingBlock
-        getHandle().time = value;
+        this.getHandle().time = value;
     }
 
     @Override
     public float getDamagePerBlock() {
-        return getHandle().fallDamagePerDistance;
+        return this.getHandle().fallDamagePerDistance;
     }
 
     @Override
     public void setDamagePerBlock(float damage) {
         Preconditions.checkArgument(damage >= 0.0, "damage must be >= 0.0, given %s", damage);
 
-        getHandle().fallDamagePerDistance = damage;
+        this.getHandle().fallDamagePerDistance = damage;
         if (damage > 0.0) {
             this.setHurtEntities(true);
         }
@@ -89,14 +89,14 @@ public class CraftFallingBlock extends CraftEntity implements FallingBlock {
 
     @Override
     public int getMaxDamage() {
-        return getHandle().fallDamageMax;
+        return this.getHandle().fallDamageMax;
     }
 
     @Override
     public void setMaxDamage(int damage) {
         Preconditions.checkArgument(damage >= 0, "damage must be >= 0, given %s", damage);
 
-        getHandle().fallDamageMax = damage;
+        this.getHandle().fallDamageMax = damage;
         if (damage > 0) {
             this.setHurtEntities(true);
         }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
index 7e5107378c..142f3e3257 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFireball.java
@@ -1,8 +1,8 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.projectile.EntityFireball;
-import net.minecraft.world.phys.Vec3D;
+import net.minecraft.world.entity.projectile.AbstractHurtingProjectile;
+import net.minecraft.world.phys.Vec3;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Fireball;
 import org.bukkit.projectiles.ProjectileSource;
@@ -10,62 +10,62 @@ import org.bukkit.util.Vector;
 import org.jetbrains.annotations.NotNull;
 
 public class CraftFireball extends AbstractProjectile implements Fireball {
-    public CraftFireball(CraftServer server, EntityFireball entity) {
+    public CraftFireball(CraftServer server, AbstractHurtingProjectile entity) {
         super(server, entity);
     }
 
     @Override
     public float getYield() {
-        return getHandle().bukkitYield;
+        return this.getHandle().bukkitYield;
     }
 
     @Override
     public boolean isIncendiary() {
-        return getHandle().isIncendiary;
+        return this.getHandle().isIncendiary;
     }
 
     @Override
     public void setIsIncendiary(boolean isIncendiary) {
-        getHandle().isIncendiary = isIncendiary;
+        this.getHandle().isIncendiary = isIncendiary;
     }
 
     @Override
     public void setYield(float yield) {
-        getHandle().bukkitYield = yield;
+        this.getHandle().bukkitYield = yield;
     }
 
     @Override
     public ProjectileSource getShooter() {
-        return getHandle().projectileSource;
+        return this.getHandle().projectileSource;
     }
 
     @Override
     public void setShooter(ProjectileSource shooter) {
         if (shooter instanceof CraftLivingEntity) {
-            getHandle().setOwner(((CraftLivingEntity) shooter).getHandle());
+            this.getHandle().setOwner(((CraftLivingEntity) shooter).getHandle());
         } else {
-            getHandle().setOwner(null);
+            this.getHandle().setOwner(null);
         }
-        getHandle().projectileSource = shooter;
+        this.getHandle().projectileSource = shooter;
     }
 
     @Override
     public Vector getDirection() {
-        return getAcceleration();
+        return this.getAcceleration();
     }
 
     @Override
     public void setDirection(Vector direction) {
         Preconditions.checkArgument(direction != null, "Vector direction cannot be null");
         if (direction.isZero()) {
-            setVelocity(direction);
-            setAcceleration(direction);
+            this.setVelocity(direction);
+            this.setAcceleration(direction);
             return;
         }
 
         direction = direction.clone().normalize();
-        setVelocity(direction.clone().multiply(getVelocity().length()));
-        setAcceleration(direction.multiply(getAcceleration().length()));
+        this.setVelocity(direction.clone().multiply(this.getVelocity().length()));
+        this.setAcceleration(direction.multiply(this.getAcceleration().length()));
     }
 
     @Override
@@ -73,20 +73,20 @@ public class CraftFireball extends AbstractProjectile implements Fireball {
         Preconditions.checkArgument(acceleration != null, "Vector acceleration cannot be null");
         // SPIGOT-6993: EntityFireball#assignPower will normalize the given values
         // Note: Because of MC-80142 the fireball will stutter on the client when setting the power to something other than 0 or the normalized vector * 0.1
-        getHandle().assignDirectionalMovement(new Vec3D(acceleration.getX(), acceleration.getY(), acceleration.getZ()), acceleration.length());
-        update(); // SPIGOT-6579
+        this.getHandle().assignDirectionalMovement(new Vec3(acceleration.getX(), acceleration.getY(), acceleration.getZ()), acceleration.length());
+        this.update(); // SPIGOT-6579
     }
 
     @NotNull
     @Override
     public Vector getAcceleration() {
-        Vec3D delta = getHandle().getDeltaMovement();
+        Vec3 delta = this.getHandle().getDeltaMovement();
         return new Vector(delta.x, delta.y, delta.z);
     }
 
     @Override
-    public EntityFireball getHandle() {
-        return (EntityFireball) entity;
+    public AbstractHurtingProjectile getHandle() {
+        return (AbstractHurtingProjectile) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
index cb76204dd3..5ae87c370e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFirework.java
@@ -2,8 +2,7 @@ package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
 import java.util.Random;
-import net.minecraft.world.entity.EntityLiving;
-import net.minecraft.world.entity.projectile.EntityFireworks;
+import net.minecraft.world.entity.projectile.FireworkRocketEntity;
 import net.minecraft.world.item.ItemStack;
 import net.minecraft.world.item.Items;
 import org.bukkit.Material;
@@ -18,14 +17,14 @@ public class CraftFirework extends CraftProjectile implements Firework {
     private final Random random = new Random();
     private final CraftItemStack item;
 
-    public CraftFirework(CraftServer server, EntityFireworks entity) {
+    public CraftFirework(CraftServer server, FireworkRocketEntity entity) {
         super(server, entity);
 
-        ItemStack item = getHandle().getEntityData().get(EntityFireworks.DATA_ID_FIREWORKS_ITEM);
+        ItemStack item = this.getHandle().getEntityData().get(FireworkRocketEntity.DATA_ID_FIREWORKS_ITEM);
 
         if (item.isEmpty()) {
             item = new ItemStack(Items.FIREWORK_ROCKET);
-            getHandle().getEntityData().set(EntityFireworks.DATA_ID_FIREWORKS_ITEM, item);
+            this.getHandle().getEntityData().set(FireworkRocketEntity.DATA_ID_FIREWORKS_ITEM, item);
         }
 
         this.item = CraftItemStack.asCraftMirror(item);
@@ -37,8 +36,8 @@ public class CraftFirework extends CraftProjectile implements Firework {
     }
 
     @Override
-    public EntityFireworks getHandle() {
-        return (EntityFireworks) entity;
+    public FireworkRocketEntity getHandle() {
+        return (FireworkRocketEntity) this.entity;
     }
 
     @Override
@@ -48,32 +47,32 @@ public class CraftFirework extends CraftProjectile implements Firework {
 
     @Override
     public FireworkMeta getFireworkMeta() {
-        return (FireworkMeta) item.getItemMeta();
+        return (FireworkMeta) this.item.getItemMeta();
     }
 
     @Override
     public void setFireworkMeta(FireworkMeta meta) {
-        item.setItemMeta(meta);
+        this.item.setItemMeta(meta);
 
         // Copied from EntityFireworks constructor, update firework lifetime/power
-        getHandle().lifetime = 10 * (1 + meta.getPower()) + random.nextInt(6) + random.nextInt(7);
+        this.getHandle().lifetime = 10 * (1 + meta.getPower()) + this.random.nextInt(6) + this.random.nextInt(7);
 
-        getHandle().getEntityData().markDirty(EntityFireworks.DATA_ID_FIREWORKS_ITEM);
+        this.getHandle().getEntityData().markDirty(FireworkRocketEntity.DATA_ID_FIREWORKS_ITEM);
     }
 
     @Override
     public boolean setAttachedTo(LivingEntity entity) {
-        if (isDetonated()) {
+        if (this.isDetonated()) {
             return false;
         }
 
-        getHandle().attachedToEntity = (entity != null) ? ((CraftLivingEntity) entity).getHandle() : null;
+        this.getHandle().attachedToEntity = (entity != null) ? ((CraftLivingEntity) entity).getHandle() : null;
         return true;
     }
 
     @Override
     public LivingEntity getAttachedTo() {
-        EntityLiving entity = getHandle().attachedToEntity;
+        net.minecraft.world.entity.LivingEntity entity = this.getHandle().attachedToEntity;
         return (entity != null) ? (LivingEntity) entity.getBukkitEntity() : null;
     }
 
@@ -81,53 +80,53 @@ public class CraftFirework extends CraftProjectile implements Firework {
     public boolean setLife(int ticks) {
         Preconditions.checkArgument(ticks >= 0, "ticks must be greater than or equal to 0");
 
-        if (isDetonated()) {
+        if (this.isDetonated()) {
             return false;
         }
 
-        getHandle().life = ticks;
+        this.getHandle().life = ticks;
         return true;
     }
 
     @Override
     public int getLife() {
-        return getHandle().life;
+        return this.getHandle().life;
     }
 
     @Override
     public boolean setMaxLife(int ticks) {
         Preconditions.checkArgument(ticks > 0, "ticks must be greater than 0");
 
-        if (isDetonated()) {
+        if (this.isDetonated()) {
             return false;
         }
 
-        getHandle().lifetime = ticks;
+        this.getHandle().lifetime = ticks;
         return true;
     }
 
     @Override
     public int getMaxLife() {
-        return getHandle().lifetime;
+        return this.getHandle().lifetime;
     }
 
     @Override
     public void detonate() {
-        this.setLife(getMaxLife() + 1);
+        this.setLife(this.getMaxLife() + 1);
     }
 
     @Override
     public boolean isDetonated() {
-        return getHandle().life > getHandle().lifetime;
+        return this.getHandle().life > this.getHandle().lifetime;
     }
 
     @Override
     public boolean isShotAtAngle() {
-        return getHandle().isShotAtAngle();
+        return this.getHandle().isShotAtAngle();
     }
 
     @Override
     public void setShotAtAngle(boolean shotAtAngle) {
-        getHandle().getEntityData().set(EntityFireworks.DATA_SHOT_AT_ANGLE, shotAtAngle);
+        this.getHandle().getEntityData().set(FireworkRocketEntity.DATA_SHOT_AT_ANGLE, shotAtAngle);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java
index ec4aa908ff..da5150f4ca 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFish.java
@@ -1,18 +1,18 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.animal.EntityFish;
+import net.minecraft.world.entity.animal.AbstractFish;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Fish;
 
 public class CraftFish extends CraftWaterMob implements Fish {
 
-    public CraftFish(CraftServer server, EntityFish entity) {
+    public CraftFish(CraftServer server, AbstractFish entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityFish getHandle() {
-        return (EntityFish) entity;
+    public AbstractFish getHandle() {
+        return (AbstractFish) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java
index 4b010e5322..6e2f914233 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFishHook.java
@@ -1,8 +1,8 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.core.BlockPosition;
-import net.minecraft.world.entity.projectile.EntityFishingHook;
+import net.minecraft.core.BlockPos;
+import net.minecraft.world.entity.projectile.FishingHook;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Entity;
 import org.bukkit.entity.FishHook;
@@ -10,13 +10,13 @@ import org.bukkit.entity.FishHook;
 public class CraftFishHook extends CraftProjectile implements FishHook {
     private double biteChance = -1;
 
-    public CraftFishHook(CraftServer server, EntityFishingHook entity) {
+    public CraftFishHook(CraftServer server, FishingHook entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityFishingHook getHandle() {
-        return (EntityFishingHook) entity;
+    public FishingHook getHandle() {
+        return (FishingHook) this.entity;
     }
 
     @Override
@@ -26,129 +26,129 @@ public class CraftFishHook extends CraftProjectile implements FishHook {
 
     @Override
     public int getMinWaitTime() {
-        return getHandle().minWaitTime;
+        return this.getHandle().minWaitTime;
     }
 
     @Override
     public void setMinWaitTime(int minWaitTime) {
         Preconditions.checkArgument(minWaitTime >= 0 && minWaitTime <= this.getMaxWaitTime(), "The minimum wait time should be between %s and %s (the maximum wait time)", 0, this.getMaxWaitTime());
-        EntityFishingHook hook = getHandle();
+        FishingHook hook = this.getHandle();
         hook.minWaitTime = minWaitTime;
     }
 
     @Override
     public int getMaxWaitTime() {
-        return getHandle().maxWaitTime;
+        return this.getHandle().maxWaitTime;
     }
 
     @Override
     public void setMaxWaitTime(int maxWaitTime) {
         Preconditions.checkArgument(maxWaitTime >= 0 && maxWaitTime >= this.getMinWaitTime(), "The maximum wait time should be between %s and %s (the minimum wait time)", 0, this.getMinWaitTime());
-        EntityFishingHook hook = getHandle();
+        FishingHook hook = this.getHandle();
         hook.maxWaitTime = maxWaitTime;
     }
 
     @Override
     public void setWaitTime(int min, int max) {
         Preconditions.checkArgument(min >= 0 && max >= 0 && min <= max, "The minimum/maximum wait time should be higher than or equal to 0 and the minimum wait time");
-        getHandle().minWaitTime = min;
-        getHandle().maxWaitTime = max;
+        this.getHandle().minWaitTime = min;
+        this.getHandle().maxWaitTime = max;
     }
 
     @Override
     public int getMinLureTime() {
-        return getHandle().minLureTime;
+        return this.getHandle().minLureTime;
     }
 
     @Override
     public void setMinLureTime(int minLureTime) {
         Preconditions.checkArgument(minLureTime >= 0 && minLureTime <= this.getMaxLureTime(), "The minimum lure time (%s) should be between 0 and %s (the maximum wait time)", minLureTime, this.getMaxLureTime());
-        getHandle().minLureTime = minLureTime;
+        this.getHandle().minLureTime = minLureTime;
     }
 
     @Override
     public int getMaxLureTime() {
-        return getHandle().maxLureTime;
+        return this.getHandle().maxLureTime;
     }
 
     @Override
     public void setMaxLureTime(int maxLureTime) {
         Preconditions.checkArgument(maxLureTime >= 0 && maxLureTime >= this.getMinLureTime(), "The maximum lure time (%s) should be higher than or equal to 0 and %s (the minimum wait time)", maxLureTime, this.getMinLureTime());
-        getHandle().maxLureTime = maxLureTime;
+        this.getHandle().maxLureTime = maxLureTime;
     }
 
     @Override
     public void setLureTime(int min, int max) {
         Preconditions.checkArgument(min >= 0 && max >= 0 && min <= max, "The minimum/maximum lure time should be higher than or equal to 0 and the minimum wait time.");
-        getHandle().minLureTime = min;
-        getHandle().maxLureTime = max;
+        this.getHandle().minLureTime = min;
+        this.getHandle().maxLureTime = max;
     }
 
     @Override
     public float getMinLureAngle() {
-        return getHandle().minLureAngle;
+        return this.getHandle().minLureAngle;
     }
 
     @Override
     public void setMinLureAngle(float minLureAngle) {
         Preconditions.checkArgument(minLureAngle <= this.getMaxLureAngle(), "The minimum lure angle (%s) should be less than %s (the maximum lure angle)", minLureAngle, this.getMaxLureAngle());
-        getHandle().minLureAngle = minLureAngle;
+        this.getHandle().minLureAngle = minLureAngle;
     }
 
     @Override
     public float getMaxLureAngle() {
-        return getHandle().maxLureAngle;
+        return this.getHandle().maxLureAngle;
     }
 
     @Override
     public void setMaxLureAngle(float maxLureAngle) {
         Preconditions.checkArgument(maxLureAngle >= this.getMinLureAngle(), "The minimum lure angle (%s) should be less than %s (the maximum lure angle)", maxLureAngle, this.getMinLureAngle());
-        getHandle().maxLureAngle = maxLureAngle;
+        this.getHandle().maxLureAngle = maxLureAngle;
     }
 
     @Override
     public void setLureAngle(float min, float max) {
         Preconditions.checkArgument(min <= max, "The minimum lure (%s) angle should be less than the maximum lure angle (%s)", min, max);
-        getHandle().minLureAngle = min;
-        getHandle().maxLureAngle = max;
+        this.getHandle().minLureAngle = min;
+        this.getHandle().maxLureAngle = max;
     }
 
     @Override
     public boolean isSkyInfluenced() {
-        return getHandle().skyInfluenced;
+        return this.getHandle().skyInfluenced;
     }
 
     @Override
     public void setSkyInfluenced(boolean skyInfluenced) {
-        getHandle().skyInfluenced = skyInfluenced;
+        this.getHandle().skyInfluenced = skyInfluenced;
     }
 
     @Override
     public boolean isRainInfluenced() {
-        return getHandle().rainInfluenced;
+        return this.getHandle().rainInfluenced;
     }
 
     @Override
     public void setRainInfluenced(boolean rainInfluenced) {
-        getHandle().rainInfluenced = rainInfluenced;
+        this.getHandle().rainInfluenced = rainInfluenced;
     }
 
     @Override
     public boolean getApplyLure() {
-        return getHandle().applyLure;
+        return this.getHandle().applyLure;
     }
 
     @Override
     public void setApplyLure(boolean applyLure) {
-        getHandle().applyLure = applyLure;
+        this.getHandle().applyLure = applyLure;
     }
 
     @Override
     public double getBiteChance() {
-        EntityFishingHook hook = getHandle();
+        FishingHook hook = this.getHandle();
 
         if (this.biteChance == -1) {
-            if (hook.level().isRainingAt(BlockPosition.containing(hook.position()).offset(0, 1, 0))) {
+            if (hook.level().isRainingAt(BlockPos.containing(hook.position()).offset(0, 1, 0))) {
                 return 1 / 300.0;
             }
             return 1 / 500.0;
@@ -164,26 +164,26 @@ public class CraftFishHook extends CraftProjectile implements FishHook {
 
     @Override
     public boolean isInOpenWater() {
-        return getHandle().isOpenWaterFishing();
+        return this.getHandle().isOpenWaterFishing();
     }
 
     @Override
     public Entity getHookedEntity() {
-        net.minecraft.world.entity.Entity hooked = getHandle().hookedIn;
+        net.minecraft.world.entity.Entity hooked = this.getHandle().hookedIn;
         return (hooked != null) ? hooked.getBukkitEntity() : null;
     }
 
     @Override
     public void setHookedEntity(Entity entity) {
-        EntityFishingHook hook = getHandle();
+        FishingHook hook = this.getHandle();
 
         hook.hookedIn = (entity != null) ? ((CraftEntity) entity).getHandle() : null;
-        hook.getEntityData().set(EntityFishingHook.DATA_HOOKED_ENTITY, hook.hookedIn != null ? hook.hookedIn.getId() + 1 : 0);
+        hook.getEntityData().set(FishingHook.DATA_HOOKED_ENTITY, hook.hookedIn != null ? hook.hookedIn.getId() + 1 : 0);
     }
 
     @Override
     public boolean pullHookedEntity() {
-        EntityFishingHook hook = getHandle();
+        FishingHook hook = this.getHandle();
         if (hook.hookedIn == null) {
             return false;
         }
@@ -194,6 +194,6 @@ public class CraftFishHook extends CraftProjectile implements FishHook {
 
     @Override
     public HookState getState() {
-        return HookState.values()[getHandle().currentState.ordinal()];
+        return HookState.values()[this.getHandle().currentState.ordinal()];
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFlying.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFlying.java
index a5ebbe73d3..8117faa0c8 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFlying.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFlying.java
@@ -1,18 +1,18 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.EntityFlying;
+import net.minecraft.world.entity.FlyingMob;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Flying;
 
 public class CraftFlying extends CraftMob implements Flying {
 
-    public CraftFlying(CraftServer server, EntityFlying entity) {
+    public CraftFlying(CraftServer server, FlyingMob entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityFlying getHandle() {
-        return (EntityFlying) entity;
+    public FlyingMob getHandle() {
+        return (FlyingMob) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java
index efcb213ea6..dd912be293 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFox.java
@@ -3,7 +3,6 @@ package org.bukkit.craftbukkit.entity;
 import com.google.common.base.Preconditions;
 import java.util.Optional;
 import java.util.UUID;
-import net.minecraft.world.entity.animal.EntityFox;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.AnimalTamer;
 import org.bukkit.entity.Fox;
@@ -11,13 +10,13 @@ import org.bukkit.entity.Fox.Type;
 
 public class CraftFox extends CraftAnimals implements Fox {
 
-    public CraftFox(CraftServer server, EntityFox entity) {
+    public CraftFox(CraftServer server, net.minecraft.world.entity.animal.Fox entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityFox getHandle() {
-        return (EntityFox) super.getHandle();
+    public net.minecraft.world.entity.animal.Fox getHandle() {
+        return (net.minecraft.world.entity.animal.Fox) super.getHandle();
     }
 
     @Override
@@ -27,51 +26,51 @@ public class CraftFox extends CraftAnimals implements Fox {
 
     @Override
     public Type getFoxType() {
-        return Type.values()[getHandle().getVariant().ordinal()];
+        return Type.values()[this.getHandle().getVariant().ordinal()];
     }
 
     @Override
     public void setFoxType(Type type) {
         Preconditions.checkArgument(type != null, "type");
 
-        getHandle().setVariant(EntityFox.Type.values()[type.ordinal()]);
+        this.getHandle().setVariant(net.minecraft.world.entity.animal.Fox.Variant.values()[type.ordinal()]);
     }
 
     @Override
     public boolean isCrouching() {
-        return getHandle().isCrouching();
+        return this.getHandle().isCrouching();
     }
 
     @Override
     public void setCrouching(boolean crouching) {
-        getHandle().setIsCrouching(crouching);
+        this.getHandle().setIsCrouching(crouching);
     }
 
     @Override
     public boolean isSitting() {
-        return getHandle().isSitting();
+        return this.getHandle().isSitting();
     }
 
     @Override
     public void setSitting(boolean sitting) {
-        getHandle().setSitting(sitting);
+        this.getHandle().setSitting(sitting);
     }
 
     @Override
     public void setSleeping(boolean sleeping) {
-        getHandle().setSleeping(sleeping);
+        this.getHandle().setSleeping(sleeping);
     }
 
     @Override
     public AnimalTamer getFirstTrustedPlayer() {
-        UUID uuid = getHandle().getEntityData().get(EntityFox.DATA_TRUSTED_ID_0).orElse(null);
+        UUID uuid = this.getHandle().getEntityData().get(net.minecraft.world.entity.animal.Fox.DATA_TRUSTED_ID_0).orElse(null);
         if (uuid == null) {
             return null;
         }
 
-        AnimalTamer player = getServer().getPlayer(uuid);
+        AnimalTamer player = this.getServer().getPlayer(uuid);
         if (player == null) {
-            player = getServer().getOfflinePlayer(uuid);
+            player = this.getServer().getOfflinePlayer(uuid);
         }
 
         return player;
@@ -80,22 +79,22 @@ public class CraftFox extends CraftAnimals implements Fox {
     @Override
     public void setFirstTrustedPlayer(AnimalTamer player) {
         if (player == null) {
-            Preconditions.checkState(getHandle().getEntityData().get(EntityFox.DATA_TRUSTED_ID_1).isEmpty(), "Must remove second trusted player first");
+            Preconditions.checkState(this.getHandle().getEntityData().get(net.minecraft.world.entity.animal.Fox.DATA_TRUSTED_ID_1).isEmpty(), "Must remove second trusted player first");
         }
 
-        getHandle().getEntityData().set(EntityFox.DATA_TRUSTED_ID_0, player == null ? Optional.empty() : Optional.of(player.getUniqueId()));
+        this.getHandle().getEntityData().set(net.minecraft.world.entity.animal.Fox.DATA_TRUSTED_ID_0, player == null ? Optional.empty() : Optional.of(player.getUniqueId()));
     }
 
     @Override
     public AnimalTamer getSecondTrustedPlayer() {
-        UUID uuid = getHandle().getEntityData().get(EntityFox.DATA_TRUSTED_ID_1).orElse(null);
+        UUID uuid = this.getHandle().getEntityData().get(net.minecraft.world.entity.animal.Fox.DATA_TRUSTED_ID_1).orElse(null);
         if (uuid == null) {
             return null;
         }
 
-        AnimalTamer player = getServer().getPlayer(uuid);
+        AnimalTamer player = this.getServer().getPlayer(uuid);
         if (player == null) {
-            player = getServer().getOfflinePlayer(uuid);
+            player = this.getServer().getOfflinePlayer(uuid);
         }
 
         return player;
@@ -104,14 +103,14 @@ public class CraftFox extends CraftAnimals implements Fox {
     @Override
     public void setSecondTrustedPlayer(AnimalTamer player) {
         if (player != null) {
-            Preconditions.checkState(getHandle().getEntityData().get(EntityFox.DATA_TRUSTED_ID_0).isPresent(), "Must add first trusted player first");
+            Preconditions.checkState(this.getHandle().getEntityData().get(net.minecraft.world.entity.animal.Fox.DATA_TRUSTED_ID_0).isPresent(), "Must add first trusted player first");
         }
 
-        getHandle().getEntityData().set(EntityFox.DATA_TRUSTED_ID_1, player == null ? Optional.empty() : Optional.of(player.getUniqueId()));
+        this.getHandle().getEntityData().set(net.minecraft.world.entity.animal.Fox.DATA_TRUSTED_ID_1, player == null ? Optional.empty() : Optional.of(player.getUniqueId()));
     }
 
     @Override
     public boolean isFaceplanted() {
-        return getHandle().isFaceplanted();
+        return this.getHandle().isFaceplanted();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFrog.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFrog.java
index 4a8e20bf61..ebf09c27e0 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFrog.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftFrog.java
@@ -21,7 +21,7 @@ public class CraftFrog extends CraftAnimals implements org.bukkit.entity.Frog {
 
     @Override
     public Frog getHandle() {
-        return (Frog) entity;
+        return (Frog) this.entity;
     }
 
     @Override
@@ -31,28 +31,28 @@ public class CraftFrog extends CraftAnimals implements org.bukkit.entity.Frog {
 
     @Override
     public Entity getTongueTarget() {
-        return getHandle().getTongueTarget().map(net.minecraft.world.entity.Entity::getBukkitEntity).orElse(null);
+        return this.getHandle().getTongueTarget().map(net.minecraft.world.entity.Entity::getBukkitEntity).orElse(null);
     }
 
     @Override
     public void setTongueTarget(Entity target) {
         if (target == null) {
-            getHandle().eraseTongueTarget();
+            this.getHandle().eraseTongueTarget();
         } else {
-            getHandle().setTongueTarget(((CraftEntity) target).getHandle());
+            this.getHandle().setTongueTarget(((CraftEntity) target).getHandle());
         }
     }
 
     @Override
     public Variant getVariant() {
-        return CraftVariant.minecraftHolderToBukkit(getHandle().getVariant());
+        return CraftVariant.minecraftHolderToBukkit(this.getHandle().getVariant());
     }
 
     @Override
     public void setVariant(Variant variant) {
         Preconditions.checkArgument(variant != null, "variant");
 
-        getHandle().setVariant(CraftVariant.bukkitToMinecraftHolder(variant));
+        this.getHandle().setVariant(CraftVariant.bukkitToMinecraftHolder(variant));
     }
 
     public static class CraftVariant implements Variant, Handleable<FrogVariant> {
@@ -63,7 +63,7 @@ public class CraftFrog extends CraftAnimals implements org.bukkit.entity.Frog {
         }
 
         public static Variant minecraftHolderToBukkit(Holder<FrogVariant> minecraft) {
-            return minecraftToBukkit(minecraft.value());
+            return CraftVariant.minecraftToBukkit(minecraft.value());
         }
 
         public static FrogVariant bukkitToMinecraft(Variant bukkit) {
@@ -91,38 +91,38 @@ public class CraftFrog extends CraftAnimals implements org.bukkit.entity.Frog {
             } else {
                 this.name = key.toString();
             }
-            this.ordinal = count++;
+            this.ordinal = CraftVariant.count++;
         }
 
         @Override
         public FrogVariant getHandle() {
-            return frogVariant;
+            return this.frogVariant;
         }
 
         @Override
         public NamespacedKey getKey() {
-            return key;
+            return this.key;
         }
 
         @Override
         public int compareTo(Variant variant) {
-            return ordinal - variant.ordinal();
+            return this.ordinal - variant.ordinal();
         }
 
         @Override
         public String name() {
-            return name;
+            return this.name;
         }
 
         @Override
         public int ordinal() {
-            return ordinal;
+            return this.ordinal;
         }
 
         @Override
         public String toString() {
             // For backwards compatibility
-            return name();
+            return this.name();
         }
 
         @Override
@@ -135,12 +135,12 @@ public class CraftFrog extends CraftAnimals implements org.bukkit.entity.Frog {
                 return false;
             }
 
-            return getKey().equals(((Variant) other).getKey());
+            return this.getKey().equals(((Variant) other).getKey());
         }
 
         @Override
         public int hashCode() {
-            return getKey().hashCode();
+            return this.getKey().hashCode();
         }
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGhast.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGhast.java
index c3fc57a2c5..2cec61a1bb 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGhast.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGhast.java
@@ -1,18 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntityGhast;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Ghast;
 
 public class CraftGhast extends CraftFlying implements Ghast, CraftEnemy {
 
-    public CraftGhast(CraftServer server, EntityGhast entity) {
+    public CraftGhast(CraftServer server, net.minecraft.world.entity.monster.Ghast entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityGhast getHandle() {
-        return (EntityGhast) entity;
+    public net.minecraft.world.entity.monster.Ghast getHandle() {
+        return (net.minecraft.world.entity.monster.Ghast) this.entity;
     }
 
     @Override
@@ -22,11 +21,11 @@ public class CraftGhast extends CraftFlying implements Ghast, CraftEnemy {
 
     @Override
     public boolean isCharging() {
-        return getHandle().isCharging();
+        return this.getHandle().isCharging();
     }
 
     @Override
     public void setCharging(boolean flag) {
-        getHandle().setCharging(flag);
+        this.getHandle().setCharging(flag);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGiant.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGiant.java
index c06fe4c054..5826205339 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGiant.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGiant.java
@@ -1,18 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntityGiantZombie;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Giant;
 
 public class CraftGiant extends CraftMonster implements Giant {
 
-    public CraftGiant(CraftServer server, EntityGiantZombie entity) {
+    public CraftGiant(CraftServer server, net.minecraft.world.entity.monster.Giant entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityGiantZombie getHandle() {
-        return (EntityGiantZombie) entity;
+    public net.minecraft.world.entity.monster.Giant getHandle() {
+        return (net.minecraft.world.entity.monster.Giant) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGlowItemFrame.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGlowItemFrame.java
index 7dd9d670a1..b9a7576d24 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGlowItemFrame.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGlowItemFrame.java
@@ -16,6 +16,6 @@ public class CraftGlowItemFrame extends CraftItemFrame implements GlowItemFrame
 
     @Override
     public String toString() {
-        return "CraftGlowItemFrame{item=" + getItem() + ", rotation=" + getRotation() + "}";
+        return "CraftGlowItemFrame{item=" + this.getItem() + ", rotation=" + this.getRotation() + "}";
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGlowSquid.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGlowSquid.java
index 21a0da5260..253a0d2f98 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGlowSquid.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGlowSquid.java
@@ -22,12 +22,12 @@ public class CraftGlowSquid extends CraftSquid implements GlowSquid {
 
     @Override
     public int getDarkTicksRemaining() {
-        return getHandle().getDarkTicksRemaining();
+        return this.getHandle().getDarkTicksRemaining();
     }
 
     @Override
     public void setDarkTicksRemaining(int darkTicksRemaining) {
         Preconditions.checkArgument(darkTicksRemaining >= 0, "darkTicksRemaining must be >= 0");
-        getHandle().setDarkTicks(darkTicksRemaining);
+        this.getHandle().setDarkTicks(darkTicksRemaining);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGoat.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGoat.java
index a07106ddb4..65fcb36e84 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGoat.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGoat.java
@@ -21,31 +21,31 @@ public class CraftGoat extends CraftAnimals implements Goat {
 
     @Override
     public boolean hasLeftHorn() {
-        return getHandle().hasLeftHorn();
+        return this.getHandle().hasLeftHorn();
     }
 
     @Override
     public void setLeftHorn(boolean hasHorn) {
-        getHandle().getEntityData().set(net.minecraft.world.entity.animal.goat.Goat.DATA_HAS_LEFT_HORN, hasHorn);
+        this.getHandle().getEntityData().set(net.minecraft.world.entity.animal.goat.Goat.DATA_HAS_LEFT_HORN, hasHorn);
     }
 
     @Override
     public boolean hasRightHorn() {
-        return getHandle().hasRightHorn();
+        return this.getHandle().hasRightHorn();
     }
 
     @Override
     public void setRightHorn(boolean hasHorn) {
-        getHandle().getEntityData().set(net.minecraft.world.entity.animal.goat.Goat.DATA_HAS_RIGHT_HORN, hasHorn);
+        this.getHandle().getEntityData().set(net.minecraft.world.entity.animal.goat.Goat.DATA_HAS_RIGHT_HORN, hasHorn);
     }
 
     @Override
     public boolean isScreaming() {
-        return getHandle().isScreamingGoat();
+        return this.getHandle().isScreamingGoat();
     }
 
     @Override
     public void setScreaming(boolean screaming) {
-        getHandle().setScreamingGoat(screaming);
+        this.getHandle().setScreamingGoat(screaming);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGolem.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGolem.java
index 12fa1a0923..e27e469894 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGolem.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGolem.java
@@ -1,17 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.animal.EntityGolem;
+import net.minecraft.world.entity.animal.AbstractGolem;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Golem;
 
 public class CraftGolem extends CraftCreature implements Golem {
-    public CraftGolem(CraftServer server, EntityGolem entity) {
+    public CraftGolem(CraftServer server, AbstractGolem entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityGolem getHandle() {
-        return (EntityGolem) entity;
+    public AbstractGolem getHandle() {
+        return (AbstractGolem) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java
index b1ad0243b7..e232350f2c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftGuardian.java
@@ -1,7 +1,6 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.monster.EntityGuardian;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Guardian;
 import org.bukkit.entity.LivingEntity;
@@ -10,13 +9,13 @@ public class CraftGuardian extends CraftMonster implements Guardian {
 
     private static final int MINIMUM_ATTACK_TICKS = -10;
 
-    public CraftGuardian(CraftServer server, EntityGuardian entity) {
+    public CraftGuardian(CraftServer server, net.minecraft.world.entity.monster.Guardian entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityGuardian getHandle() {
-        return (EntityGuardian) super.getHandle();
+    public net.minecraft.world.entity.monster.Guardian getHandle() {
+        return (net.minecraft.world.entity.monster.Guardian) super.getHandle();
     }
 
     @Override
@@ -30,21 +29,21 @@ public class CraftGuardian extends CraftMonster implements Guardian {
 
         // clean up laser target, when target is removed
         if (target == null) {
-            getHandle().setActiveAttackTarget(0);
+            this.getHandle().setActiveAttackTarget(0);
         }
     }
 
     @Override
     public boolean setLaser(boolean activated) {
         if (activated) {
-            LivingEntity target = getTarget();
+            LivingEntity target = this.getTarget();
             if (target == null) {
                 return false;
             }
 
-            getHandle().setActiveAttackTarget(target.getEntityId());
+            this.getHandle().setActiveAttackTarget(target.getEntityId());
         } else {
-            getHandle().setActiveAttackTarget(0);
+            this.getHandle().setActiveAttackTarget(0);
         }
 
         return true;
@@ -52,19 +51,19 @@ public class CraftGuardian extends CraftMonster implements Guardian {
 
     @Override
     public boolean hasLaser() {
-        return getHandle().hasActiveAttackTarget();
+        return this.getHandle().hasActiveAttackTarget();
     }
 
     @Override
     public int getLaserDuration() {
-        return getHandle().getAttackDuration();
+        return this.getHandle().getAttackDuration();
     }
 
     @Override
     public void setLaserTicks(int ticks) {
-        Preconditions.checkArgument(ticks >= MINIMUM_ATTACK_TICKS, "ticks must be >= %s. Given %s", MINIMUM_ATTACK_TICKS, ticks);
+        Preconditions.checkArgument(ticks >= CraftGuardian.MINIMUM_ATTACK_TICKS, "ticks must be >= %s. Given %s", CraftGuardian.MINIMUM_ATTACK_TICKS, ticks);
 
-        EntityGuardian.PathfinderGoalGuardianAttack goal = getHandle().guardianAttackGoal;
+        net.minecraft.world.entity.monster.Guardian.GuardianAttackGoal goal = this.getHandle().guardianAttackGoal;
         if (goal != null) {
             goal.attackTime = ticks;
         }
@@ -72,8 +71,8 @@ public class CraftGuardian extends CraftMonster implements Guardian {
 
     @Override
     public int getLaserTicks() {
-        EntityGuardian.PathfinderGoalGuardianAttack goal = getHandle().guardianAttackGoal;
-        return (goal != null) ? goal.attackTime : MINIMUM_ATTACK_TICKS;
+        net.minecraft.world.entity.monster.Guardian.GuardianAttackGoal goal = this.getHandle().guardianAttackGoal;
+        return (goal != null) ? goal.attackTime : CraftGuardian.MINIMUM_ATTACK_TICKS;
     }
 
     @Override
@@ -88,6 +87,6 @@ public class CraftGuardian extends CraftMonster implements Guardian {
 
     @Override
     public boolean isMoving() {
-        return getHandle().isMoving();
+        return this.getHandle().isMoving();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java
index 753f510267..f1e3f2b89b 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHanging.java
@@ -1,48 +1,48 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.core.EnumDirection;
-import net.minecraft.world.entity.decoration.EntityHanging;
+import net.minecraft.core.Direction;
+import net.minecraft.world.entity.decoration.HangingEntity;
 import org.bukkit.block.BlockFace;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.craftbukkit.block.CraftBlock;
 import org.bukkit.entity.Hanging;
 
 public class CraftHanging extends CraftBlockAttachedEntity implements Hanging {
-    public CraftHanging(CraftServer server, EntityHanging entity) {
+    public CraftHanging(CraftServer server, HangingEntity entity) {
         super(server, entity);
     }
 
     @Override
     public BlockFace getAttachedFace() {
-        return getFacing().getOppositeFace();
+        return this.getFacing().getOppositeFace();
     }
 
     @Override
     public void setFacingDirection(BlockFace face) {
-        setFacingDirection(face, false);
+        this.setFacingDirection(face, false);
     }
 
     @Override
     public boolean setFacingDirection(BlockFace face, boolean force) {
-        EntityHanging hanging = getHandle();
-        EnumDirection dir = hanging.getDirection();
+        HangingEntity hanging = this.getHandle();
+        Direction dir = hanging.getDirection();
         switch (face) {
             case SOUTH:
-                getHandle().setDirection(EnumDirection.SOUTH);
+                this.getHandle().setDirection(Direction.SOUTH);
                 break;
             case WEST:
-                getHandle().setDirection(EnumDirection.WEST);
+                this.getHandle().setDirection(Direction.WEST);
                 break;
             case NORTH:
-                getHandle().setDirection(EnumDirection.NORTH);
+                this.getHandle().setDirection(Direction.NORTH);
                 break;
             case EAST:
-                getHandle().setDirection(EnumDirection.EAST);
+                this.getHandle().setDirection(Direction.EAST);
                 break;
             default:
                 throw new IllegalArgumentException(String.format("%s is not a valid facing direction", face));
         }
-        if (!force && !getHandle().generation && !hanging.survives()) {
+        if (!force && !this.getHandle().generation && !hanging.survives()) {
             // Revert since it doesn't fit
             hanging.setDirection(dir);
             return false;
@@ -52,14 +52,14 @@ public class CraftHanging extends CraftBlockAttachedEntity implements Hanging {
 
     @Override
     public BlockFace getFacing() {
-        EnumDirection direction = this.getHandle().getDirection();
+        Direction direction = this.getHandle().getDirection();
         if (direction == null) return BlockFace.SELF;
         return CraftBlock.notchToBlockFace(direction);
     }
 
     @Override
-    public EntityHanging getHandle() {
-        return (EntityHanging) entity;
+    public HangingEntity getHandle() {
+        return (HangingEntity) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHoglin.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHoglin.java
index 0a5391b08e..37007775d2 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHoglin.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHoglin.java
@@ -1,60 +1,59 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.monster.hoglin.EntityHoglin;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Hoglin;
 
 public class CraftHoglin extends CraftAnimals implements Hoglin, CraftEnemy {
 
-    public CraftHoglin(CraftServer server, EntityHoglin entity) {
+    public CraftHoglin(CraftServer server, net.minecraft.world.entity.monster.hoglin.Hoglin entity) {
         super(server, entity);
     }
 
     @Override
     public boolean isImmuneToZombification() {
-        return getHandle().isImmuneToZombification();
+        return this.getHandle().isImmuneToZombification();
     }
 
     @Override
     public void setImmuneToZombification(boolean flag) {
-        getHandle().setImmuneToZombification(flag);
+        this.getHandle().setImmuneToZombification(flag);
     }
 
     @Override
     public boolean isAbleToBeHunted() {
-        return getHandle().cannotBeHunted;
+        return this.getHandle().cannotBeHunted;
     }
 
     @Override
     public void setIsAbleToBeHunted(boolean flag) {
-        getHandle().cannotBeHunted = flag;
+        this.getHandle().cannotBeHunted = flag;
     }
 
     @Override
     public int getConversionTime() {
-        Preconditions.checkState(isConverting(), "Entity not converting");
-        return getHandle().timeInOverworld;
+        Preconditions.checkState(this.isConverting(), "Entity not converting");
+        return this.getHandle().timeInOverworld;
     }
 
     @Override
     public void setConversionTime(int time) {
         if (time < 0) {
-            getHandle().timeInOverworld = -1;
-            getHandle().setImmuneToZombification(false);
+            this.getHandle().timeInOverworld = -1;
+            this.getHandle().setImmuneToZombification(false);
         } else {
-            getHandle().timeInOverworld = time;
+            this.getHandle().timeInOverworld = time;
         }
     }
 
     @Override
     public boolean isConverting() {
-        return getHandle().isConverting();
+        return this.getHandle().isConverting();
     }
 
     @Override
-    public EntityHoglin getHandle() {
-        return (EntityHoglin) entity;
+    public net.minecraft.world.entity.monster.hoglin.Hoglin getHandle() {
+        return (net.minecraft.world.entity.monster.hoglin.Hoglin) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHorse.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHorse.java
index 61f1fef5ba..9b6ff0f649 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHorse.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHorse.java
@@ -1,9 +1,7 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.animal.horse.EntityHorse;
-import net.minecraft.world.entity.animal.horse.HorseColor;
-import net.minecraft.world.entity.animal.horse.HorseStyle;
+import net.minecraft.world.entity.animal.horse.Markings;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.craftbukkit.inventory.CraftInventoryHorse;
 import org.bukkit.entity.Horse;
@@ -11,13 +9,13 @@ import org.bukkit.inventory.HorseInventory;
 
 public class CraftHorse extends CraftAbstractHorse implements Horse {
 
-    public CraftHorse(CraftServer server, EntityHorse entity) {
+    public CraftHorse(CraftServer server, net.minecraft.world.entity.animal.horse.Horse entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityHorse getHandle() {
-        return (EntityHorse) super.getHandle();
+    public net.minecraft.world.entity.animal.horse.Horse getHandle() {
+        return (net.minecraft.world.entity.animal.horse.Horse) super.getHandle();
     }
 
     @Override
@@ -27,24 +25,24 @@ public class CraftHorse extends CraftAbstractHorse implements Horse {
 
     @Override
     public Color getColor() {
-        return Color.values()[getHandle().getVariant().getId()];
+        return Color.values()[this.getHandle().getVariant().getId()];
     }
 
     @Override
     public void setColor(Color color) {
         Preconditions.checkArgument(color != null, "Color cannot be null");
-        getHandle().setVariantAndMarkings(HorseColor.byId(color.ordinal()), getHandle().getMarkings());
+        this.getHandle().setVariantAndMarkings(net.minecraft.world.entity.animal.horse.Variant.byId(color.ordinal()), this.getHandle().getMarkings());
     }
 
     @Override
     public Style getStyle() {
-        return Style.values()[getHandle().getMarkings().getId()];
+        return Style.values()[this.getHandle().getMarkings().getId()];
     }
 
     @Override
     public void setStyle(Style style) {
         Preconditions.checkArgument(style != null, "Style cannot be null");
-        getHandle().setVariantAndMarkings(getHandle().getVariant(), HorseStyle.byId(style.ordinal()));
+        this.getHandle().setVariantAndMarkings(this.getHandle().getVariant(), Markings.byId(style.ordinal()));
     }
 
     @Override
@@ -59,11 +57,11 @@ public class CraftHorse extends CraftAbstractHorse implements Horse {
 
     @Override
     public HorseInventory getInventory() {
-        return new CraftInventoryHorse(getHandle().inventory, getHandle().getBodyArmorAccess());
+        return new CraftInventoryHorse(this.getHandle().inventory, this.getHandle().getBodyArmorAccess());
     }
 
     @Override
     public String toString() {
-        return "CraftHorse{variant=" + getVariant() + ", owner=" + getOwner() + '}';
+        return "CraftHorse{variant=" + this.getVariant() + ", owner=" + this.getOwner() + '}';
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
index ae7cc82d6d..3091c174f7 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHumanEntity.java
@@ -7,30 +7,29 @@ import java.util.Arrays;
 import java.util.Collection;
 import java.util.Optional;
 import java.util.Set;
-import net.minecraft.core.BlockPosition;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.network.chat.IChatBaseComponent;
-import net.minecraft.network.protocol.game.PacketPlayInCloseWindow;
-import net.minecraft.network.protocol.game.PacketPlayOutOpenWindow;
-import net.minecraft.resources.MinecraftKey;
-import net.minecraft.server.level.EntityPlayer;
-import net.minecraft.world.ITileInventory;
+import net.minecraft.core.BlockPos;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.network.chat.Component;
+import net.minecraft.network.protocol.game.ClientboundOpenScreenPacket;
+import net.minecraft.network.protocol.game.ServerboundContainerClosePacket;
+import net.minecraft.resources.ResourceLocation;
+import net.minecraft.server.level.ServerPlayer;
+import net.minecraft.world.MenuProvider;
 import net.minecraft.world.entity.Entity;
 import net.minecraft.world.entity.EntitySpawnReason;
-import net.minecraft.world.entity.EntityTypes;
-import net.minecraft.world.entity.EnumMainHand;
-import net.minecraft.world.entity.player.EntityHuman;
-import net.minecraft.world.entity.projectile.EntityFireworks;
-import net.minecraft.world.inventory.Container;
-import net.minecraft.world.inventory.Containers;
-import net.minecraft.world.item.ItemCooldown;
-import net.minecraft.world.item.crafting.CraftingManager;
+import net.minecraft.world.entity.EntityType;
+import net.minecraft.world.entity.HumanoidArm;
+import net.minecraft.world.entity.player.Player;
+import net.minecraft.world.entity.projectile.FireworkRocketEntity;
+import net.minecraft.world.inventory.AbstractContainerMenu;
+import net.minecraft.world.inventory.MenuType;
+import net.minecraft.world.item.ItemCooldowns;
 import net.minecraft.world.item.crafting.RecipeHolder;
-import net.minecraft.world.item.trading.IMerchant;
-import net.minecraft.world.level.block.BlockBed;
+import net.minecraft.world.item.crafting.RecipeManager;
+import net.minecraft.world.level.block.BedBlock;
 import net.minecraft.world.level.block.Blocks;
-import net.minecraft.world.level.block.entity.TileEntity;
-import net.minecraft.world.level.block.state.IBlockData;
+import net.minecraft.world.level.block.entity.BlockEntity;
+import net.minecraft.world.level.block.state.BlockState;
 import org.bukkit.GameMode;
 import org.bukkit.Location;
 import org.bukkit.Material;
@@ -75,90 +74,90 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
     private boolean op;
     private GameMode mode;
 
-    public CraftHumanEntity(final CraftServer server, final EntityHuman entity) {
+    public CraftHumanEntity(final CraftServer server, final Player entity) {
         super(server, entity);
-        mode = server.getDefaultGameMode();
+        this.mode = server.getDefaultGameMode();
         this.inventory = new CraftInventoryPlayer(entity.getInventory());
-        enderChest = new CraftInventory(entity.getEnderChestInventory());
+        this.enderChest = new CraftInventory(entity.getEnderChestInventory());
     }
 
     @Override
     public PlayerInventory getInventory() {
-        return inventory;
+        return this.inventory;
     }
 
     @Override
     public EntityEquipment getEquipment() {
-        return inventory;
+        return this.inventory;
     }
 
     @Override
     public Inventory getEnderChest() {
-        return enderChest;
+        return this.enderChest;
     }
 
     @Override
     public MainHand getMainHand() {
-        return getHandle().getMainArm() == EnumMainHand.LEFT ? MainHand.LEFT : MainHand.RIGHT;
+        return this.getHandle().getMainArm() == HumanoidArm.LEFT ? MainHand.LEFT : MainHand.RIGHT;
     }
 
     @Override
     public ItemStack getItemInHand() {
-        return getInventory().getItemInHand();
+        return this.getInventory().getItemInHand();
     }
 
     @Override
     public void setItemInHand(ItemStack item) {
-        getInventory().setItemInHand(item);
+        this.getInventory().setItemInHand(item);
     }
 
     @Override
     public ItemStack getItemOnCursor() {
-        return CraftItemStack.asCraftMirror(getHandle().containerMenu.getCarried());
+        return CraftItemStack.asCraftMirror(this.getHandle().containerMenu.getCarried());
     }
 
     @Override
     public void setItemOnCursor(ItemStack item) {
         net.minecraft.world.item.ItemStack stack = CraftItemStack.asNMSCopy(item);
-        getHandle().containerMenu.setCarried(stack);
+        this.getHandle().containerMenu.setCarried(stack);
         if (this instanceof CraftPlayer) {
-            getHandle().containerMenu.broadcastCarriedItem(); // Send set slot for cursor
+            this.getHandle().containerMenu.broadcastCarriedItem(); // Send set slot for cursor
         }
     }
 
     @Override
     public int getSleepTicks() {
-        return getHandle().sleepCounter;
+        return this.getHandle().sleepCounter;
     }
 
     @Override
     public boolean sleep(Location location, boolean force) {
         Preconditions.checkArgument(location != null, "Location cannot be null");
         Preconditions.checkArgument(location.getWorld() != null, "Location needs to be in a world");
-        Preconditions.checkArgument(location.getWorld().equals(getWorld()), "Cannot sleep across worlds");
+        Preconditions.checkArgument(location.getWorld().equals(this.getWorld()), "Cannot sleep across worlds");
 
-        BlockPosition blockposition = CraftLocation.toBlockPosition(location);
-        IBlockData iblockdata = getHandle().level().getBlockState(blockposition);
-        if (!(iblockdata.getBlock() instanceof BlockBed)) {
+        BlockPos blockposition = CraftLocation.toBlockPosition(location);
+        BlockState iblockdata = this.getHandle().level().getBlockState(blockposition);
+        if (!(iblockdata.getBlock() instanceof BedBlock)) {
             return false;
         }
 
-        if (getHandle().startSleepInBed(blockposition, force).left().isPresent()) {
+        if (this.getHandle().startSleepInBed(blockposition, force).left().isPresent()) {
             return false;
         }
 
         // From BlockBed
-        iblockdata = iblockdata.setValue(BlockBed.OCCUPIED, true);
-        getHandle().level().setBlock(blockposition, iblockdata, 4);
+        iblockdata = iblockdata.setValue(BedBlock.OCCUPIED, true);
+        this.getHandle().level().setBlock(blockposition, iblockdata, 4);
 
         return true;
     }
 
     @Override
     public void wakeup(boolean setSpawnLocation) {
-        Preconditions.checkState(isSleeping(), "Cannot wakeup if not sleeping");
+        Preconditions.checkState(this.isSleeping(), "Cannot wakeup if not sleeping");
 
-        getHandle().stopSleepInBed(true, setSpawnLocation);
+        this.getHandle().stopSleepInBed(true, setSpawnLocation);
     }
 
     @Override
@@ -166,30 +165,30 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
         Preconditions.checkArgument(duration > 0, "Duration must be greater than 0");
         Preconditions.checkArgument(damage >= 0, "Damage must not be negative");
 
-        getHandle().startAutoSpinAttack(duration, damage, CraftItemStack.asNMSCopy(attackItem));
+        this.getHandle().startAutoSpinAttack(duration, damage, CraftItemStack.asNMSCopy(attackItem));
     }
 
     @Override
     public Location getBedLocation() {
-        Preconditions.checkState(isSleeping(), "Not sleeping");
+        Preconditions.checkState(this.isSleeping(), "Not sleeping");
 
-        BlockPosition bed = getHandle().getSleepingPos().get();
-        return CraftLocation.toBukkit(bed, getWorld());
+        BlockPos bed = this.getHandle().getSleepingPos().get();
+        return CraftLocation.toBukkit(bed, this.getWorld());
     }
 
     @Override
     public String getName() {
-        return getHandle().getScoreboardName();
+        return this.getHandle().getScoreboardName();
     }
 
     @Override
     public boolean isOp() {
-        return op;
+        return this.op;
     }
 
     @Override
     public boolean isPermissionSet(String name) {
-        return perm.isPermissionSet(name);
+        return this.perm.isPermissionSet(name);
     }
 
     @Override
@@ -199,7 +198,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
 
     @Override
     public boolean hasPermission(String name) {
-        return perm.hasPermission(name);
+        return this.perm.hasPermission(name);
     }
 
     @Override
@@ -209,48 +208,48 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
 
     @Override
     public PermissionAttachment addAttachment(Plugin plugin, String name, boolean value) {
-        return perm.addAttachment(plugin, name, value);
+        return this.perm.addAttachment(plugin, name, value);
     }
 
     @Override
     public PermissionAttachment addAttachment(Plugin plugin) {
-        return perm.addAttachment(plugin);
+        return this.perm.addAttachment(plugin);
     }
 
     @Override
     public PermissionAttachment addAttachment(Plugin plugin, String name, boolean value, int ticks) {
-        return perm.addAttachment(plugin, name, value, ticks);
+        return this.perm.addAttachment(plugin, name, value, ticks);
     }
 
     @Override
     public PermissionAttachment addAttachment(Plugin plugin, int ticks) {
-        return perm.addAttachment(plugin, ticks);
+        return this.perm.addAttachment(plugin, ticks);
     }
 
     @Override
     public void removeAttachment(PermissionAttachment attachment) {
-        perm.removeAttachment(attachment);
+        this.perm.removeAttachment(attachment);
     }
 
     @Override
     public void recalculatePermissions() {
-        perm.recalculatePermissions();
+        this.perm.recalculatePermissions();
     }
 
     @Override
     public void setOp(boolean value) {
         this.op = value;
-        perm.recalculatePermissions();
+        this.perm.recalculatePermissions();
     }
 
     @Override
     public Set<PermissionAttachmentInfo> getEffectivePermissions() {
-        return perm.getEffectivePermissions();
+        return this.perm.getEffectivePermissions();
     }
 
     @Override
     public GameMode getGameMode() {
-        return mode;
+        return this.mode;
     }
 
     @Override
@@ -261,79 +260,79 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
     }
 
     @Override
-    public EntityHuman getHandle() {
-        return (EntityHuman) entity;
+    public Player getHandle() {
+        return (Player) this.entity;
     }
 
-    public void setHandle(final EntityHuman entity) {
+    public void setHandle(final Player entity) {
         super.setHandle(entity);
         this.inventory = new CraftInventoryPlayer(entity.getInventory());
     }
 
     @Override
     public String toString() {
-        return "CraftHumanEntity{" + "id=" + getEntityId() + "name=" + getName() + '}';
+        return "CraftHumanEntity{" + "id=" + this.getEntityId() + "name=" + this.getName() + '}';
     }
 
     @Override
     public InventoryView getOpenInventory() {
-        return getHandle().containerMenu.getBukkitView();
+        return this.getHandle().containerMenu.getBukkitView();
     }
 
     @Override
     public InventoryView openInventory(Inventory inventory) {
-        if (!(getHandle() instanceof EntityPlayer)) return null;
-        EntityPlayer player = (EntityPlayer) getHandle();
-        Container formerContainer = getHandle().containerMenu;
+        if (!(this.getHandle() instanceof ServerPlayer)) return null;
+        ServerPlayer player = (ServerPlayer) this.getHandle();
+        AbstractContainerMenu formerContainer = this.getHandle().containerMenu;
 
-        ITileInventory tileInventory = null;
+        MenuProvider tileInventory = null;
         if (inventory instanceof CraftInventoryDoubleChest) {
             tileInventory = ((CraftInventoryDoubleChest) inventory).tile;
         } else if (inventory instanceof CraftInventoryLectern) {
             tileInventory = ((CraftInventoryLectern) inventory).tile;
         } else if (inventory instanceof CraftInventory) {
             CraftInventory craft = (CraftInventory) inventory;
-            if (craft.getInventory() instanceof ITileInventory) {
-                tileInventory = (ITileInventory) craft.getInventory();
+            if (craft.getInventory() instanceof MenuProvider) {
+                tileInventory = (MenuProvider) craft.getInventory();
             }
         }
 
-        if (tileInventory instanceof ITileInventory) {
-            if (tileInventory instanceof TileEntity) {
-                TileEntity te = (TileEntity) tileInventory;
+        if (tileInventory instanceof MenuProvider) {
+            if (tileInventory instanceof BlockEntity) {
+                BlockEntity te = (BlockEntity) tileInventory;
                 if (!te.hasLevel()) {
-                    te.setLevel(getHandle().level());
+                    te.setLevel(this.getHandle().level());
                 }
             }
         }
 
-        if (tileInventory instanceof ITileInventory) {
-            getHandle().openMenu(tileInventory);
+        if (tileInventory instanceof MenuProvider) {
+            this.getHandle().openMenu(tileInventory);
         } else if (inventory instanceof CraftInventoryAbstractHorse craft && craft.getInventory().getOwner() instanceof CraftAbstractHorse horse) {
-            getHandle().openHorseInventory(horse.getHandle(), craft.getInventory());
+            this.getHandle().openHorseInventory(horse.getHandle(), craft.getInventory());
         } else {
-            Containers<?> container = CraftContainer.getNotchInventoryType(inventory);
-            openCustomInventory(inventory, player, container);
+            MenuType<?> container = CraftContainer.getNotchInventoryType(inventory);
+            CraftHumanEntity.openCustomInventory(inventory, player, container);
         }
 
-        if (getHandle().containerMenu == formerContainer) {
+        if (this.getHandle().containerMenu == formerContainer) {
             return null;
         }
-        getHandle().containerMenu.checkReachable = false;
-        return getHandle().containerMenu.getBukkitView();
+        this.getHandle().containerMenu.checkReachable = false;
+        return this.getHandle().containerMenu.getBukkitView();
     }
 
-    private static void openCustomInventory(Inventory inventory, EntityPlayer player, Containers<?> windowType) {
+    private static void openCustomInventory(Inventory inventory, ServerPlayer player, MenuType<?> windowType) {
         if (player.connection == null) return;
         Preconditions.checkArgument(windowType != null, "Unknown windowType");
-        Container container = new CraftContainer(inventory, player, player.nextContainerCounter());
+        AbstractContainerMenu container = new CraftContainer(inventory, player, player.nextContainerCounter());
 
         container = CraftEventFactory.callInventoryOpenEvent(player, container);
         if (container == null) return;
 
         String title = container.getBukkitView().getTitle();
 
-        player.connection.send(new PacketPlayOutOpenWindow(container.containerId, windowType, CraftChatMessage.fromString(title)[0]));
+        player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, CraftChatMessage.fromString(title)[0]));
         player.containerMenu = container;
         player.initMenu(container);
     }
@@ -341,7 +340,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
     @Override
     public InventoryView openWorkbench(Location location, boolean force) {
         if (location == null) {
-            location = getLocation();
+            location = this.getLocation();
         }
         if (!force) {
             Block block = location.getBlock();
@@ -349,17 +348,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
                 return null;
             }
         }
-        getHandle().openMenu(Blocks.CRAFTING_TABLE.defaultBlockState().getMenuProvider(getHandle().level(), CraftLocation.toBlockPosition(location)));
+        this.getHandle().openMenu(Blocks.CRAFTING_TABLE.defaultBlockState().getMenuProvider(this.getHandle().level(), CraftLocation.toBlockPosition(location)));
         if (force) {
-            getHandle().containerMenu.checkReachable = false;
+            this.getHandle().containerMenu.checkReachable = false;
         }
-        return getHandle().containerMenu.getBukkitView();
+        return this.getHandle().containerMenu.getBukkitView();
     }
 
     @Override
     public InventoryView openEnchanting(Location location, boolean force) {
         if (location == null) {
-            location = getLocation();
+            location = this.getLocation();
         }
         if (!force) {
             Block block = location.getBlock();
@@ -369,26 +368,26 @@ 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.
-        BlockPosition pos = CraftLocation.toBlockPosition(location);
-        getHandle().openMenu(Blocks.ENCHANTING_TABLE.defaultBlockState().getMenuProvider(getHandle().level(), pos));
+        BlockPos pos = CraftLocation.toBlockPosition(location);
+        this.getHandle().openMenu(Blocks.ENCHANTING_TABLE.defaultBlockState().getMenuProvider(this.getHandle().level(), pos));
 
         if (force) {
-            getHandle().containerMenu.checkReachable = false;
+            this.getHandle().containerMenu.checkReachable = false;
         }
-        return getHandle().containerMenu.getBukkitView();
+        return this.getHandle().containerMenu.getBukkitView();
     }
 
     @Override
     public void openInventory(InventoryView inventory) {
         Preconditions.checkArgument(this.equals(inventory.getPlayer()), "InventoryView must belong to the opening player");
-        if (!(getHandle() instanceof EntityPlayer)) return; // TODO: NPC support?
-        if (((EntityPlayer) getHandle()).connection == null) return;
-        if (getHandle().containerMenu != getHandle().inventoryMenu) {
+        if (!(this.getHandle() instanceof ServerPlayer)) return; // TODO: NPC support?
+        if (((ServerPlayer) this.getHandle()).connection == null) return;
+        if (this.getHandle().containerMenu != this.getHandle().inventoryMenu) {
             // fire INVENTORY_CLOSE if one already open
-            ((EntityPlayer) getHandle()).connection.handleContainerClose(new PacketPlayInCloseWindow(getHandle().containerMenu.containerId));
+            ((ServerPlayer) this.getHandle()).connection.handleContainerClose(new ServerboundContainerClosePacket(this.getHandle().containerMenu.containerId));
         }
-        EntityPlayer player = (EntityPlayer) getHandle();
-        Container container;
+        ServerPlayer player = (ServerPlayer) this.getHandle();
+        AbstractContainerMenu container;
         if (inventory instanceof CraftInventoryView) {
             container = ((CraftInventoryView) inventory).getHandle();
         } else {
@@ -402,9 +401,9 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
         }
 
         // Now open the window
-        Containers<?> windowType = CraftContainer.getNotchInventoryType(inventory.getTopInventory());
+        MenuType<?> windowType = CraftContainer.getNotchInventoryType(inventory.getTopInventory());
         String title = inventory.getTitle();
-        player.connection.send(new PacketPlayOutOpenWindow(container.containerId, windowType, CraftChatMessage.fromString(title)[0]));
+        player.connection.send(new ClientboundOpenScreenPacket(container.containerId, windowType, CraftChatMessage.fromString(title)[0]));
         player.containerMenu = container;
         player.initMenu(container);
     }
@@ -427,8 +426,8 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
             merchant.getTrader().closeInventory();
         }
 
-        IMerchant mcMerchant;
-        IChatBaseComponent name;
+        net.minecraft.world.item.trading.Merchant mcMerchant;
+        Component name;
         int level = 1; // note: using level 0 with active 'is-regular-villager'-flag allows hiding the name suffix
         if (merchant instanceof CraftAbstractVillager) {
             mcMerchant = ((CraftAbstractVillager) merchant).getHandle();
@@ -451,17 +450,17 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
 
     @Override
     public void closeInventory() {
-        getHandle().closeContainer();
+        this.getHandle().closeContainer();
     }
 
     @Override
     public boolean isBlocking() {
-        return getHandle().isBlocking();
+        return this.getHandle().isBlocking();
     }
 
     @Override
     public boolean isHandRaised() {
-        return getHandle().isUsingItem();
+        return this.getHandle().isUsingItem();
     }
 
     @Override
@@ -471,22 +470,22 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
 
     @Override
     public int getEnchantmentSeed() {
-        return getHandle().enchantmentSeed;
+        return this.getHandle().enchantmentSeed;
     }
 
     @Override
     public void setEnchantmentSeed(int i) {
-        getHandle().enchantmentSeed = i;
+        this.getHandle().enchantmentSeed = i;
     }
 
     @Override
     public int getExpToLevel() {
-        return getHandle().getXpNeededForNextLevel();
+        return this.getHandle().getXpNeededForNextLevel();
     }
 
     @Override
     public float getAttackCooldown() {
-        return getHandle().getAttackStrengthScale(0.5f);
+        return this.getHandle().getAttackStrengthScale(0.5f);
     }
 
     @Override
@@ -494,7 +493,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
         Preconditions.checkArgument(material != null, "Material cannot be null");
         Preconditions.checkArgument(material.isItem(), "Material %s is not an item", material);
 
-        return hasCooldown(new ItemStack(material));
+        return this.hasCooldown(new ItemStack(material));
     }
 
     @Override
@@ -502,32 +501,32 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
         Preconditions.checkArgument(material != null, "Material cannot be null");
         Preconditions.checkArgument(material.isItem(), "Material %s is not an item", material);
 
-        return getCooldown(new ItemStack(material));
+        return this.getCooldown(new ItemStack(material));
     }
 
     @Override
     public void setCooldown(Material material, int ticks) {
-        setCooldown(new ItemStack(material), ticks);
+        this.setCooldown(new ItemStack(material), ticks);
     }
 
     @Override
     public boolean hasCooldown(ItemStack item) {
         Preconditions.checkArgument(item != null, "Material cannot be null");
 
-        return getHandle().getCooldowns().isOnCooldown(CraftItemStack.asNMSCopy(item));
+        return this.getHandle().getCooldowns().isOnCooldown(CraftItemStack.asNMSCopy(item));
     }
 
     @Override
     public int getCooldown(ItemStack item) {
         Preconditions.checkArgument(item != null, "Material cannot be null");
 
-        MinecraftKey group = getHandle().getCooldowns().getCooldownGroup(CraftItemStack.asNMSCopy(item));
+        ResourceLocation group = this.getHandle().getCooldowns().getCooldownGroup(CraftItemStack.asNMSCopy(item));
         if (group == null) {
             return 0;
         }
 
-        ItemCooldown.Info cooldown = getHandle().getCooldowns().cooldowns.get(group);
-        return (cooldown == null) ? 0 : Math.max(0, cooldown.endTime - getHandle().getCooldowns().tickCount);
+        ItemCooldowns.CooldownInstance cooldown = this.getHandle().getCooldowns().cooldowns.get(group);
+        return (cooldown == null) ? 0 : Math.max(0, cooldown.endTime - this.getHandle().getCooldowns().tickCount);
     }
 
     @Override
@@ -535,27 +534,27 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
         Preconditions.checkArgument(item != null, "Material cannot be null");
         Preconditions.checkArgument(ticks >= 0, "Cannot have negative cooldown");
 
-        getHandle().getCooldowns().addCooldown(CraftItemStack.asNMSCopy(item), ticks);
+        this.getHandle().getCooldowns().addCooldown(CraftItemStack.asNMSCopy(item), ticks);
     }
 
     @Override
     public boolean discoverRecipe(NamespacedKey recipe) {
-        return discoverRecipes(Arrays.asList(recipe)) != 0;
+        return this.discoverRecipes(Arrays.asList(recipe)) != 0;
     }
 
     @Override
     public int discoverRecipes(Collection<NamespacedKey> recipes) {
-        return getHandle().awardRecipes(bukkitKeysToMinecraftRecipes(recipes));
+        return this.getHandle().awardRecipes(this.bukkitKeysToMinecraftRecipes(recipes));
     }
 
     @Override
     public boolean undiscoverRecipe(NamespacedKey recipe) {
-        return undiscoverRecipes(Arrays.asList(recipe)) != 0;
+        return this.undiscoverRecipes(Arrays.asList(recipe)) != 0;
     }
 
     @Override
     public int undiscoverRecipes(Collection<NamespacedKey> recipes) {
-        return getHandle().resetRecipes(bukkitKeysToMinecraftRecipes(recipes));
+        return this.getHandle().resetRecipes(this.bukkitKeysToMinecraftRecipes(recipes));
     }
 
     @Override
@@ -570,7 +569,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
 
     private Collection<RecipeHolder<?>> bukkitKeysToMinecraftRecipes(Collection<NamespacedKey> recipeKeys) {
         Collection<RecipeHolder<?>> recipes = new ArrayList<>();
-        CraftingManager manager = getHandle().level().getServer().getRecipeManager();
+        RecipeManager manager = this.getHandle().level().getServer().getRecipeManager();
 
         for (NamespacedKey recipeKey : recipeKeys) {
             Optional<? extends RecipeHolder<?>> recipe = manager.byKey(CraftRecipe.toMinecraft(recipeKey));
@@ -586,8 +585,8 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
 
     @Override
     public org.bukkit.entity.Entity getShoulderEntityLeft() {
-        if (!getHandle().getShoulderEntityLeft().isEmpty()) {
-            Optional<Entity> shoulder = EntityTypes.create(getHandle().getShoulderEntityLeft(), getHandle().level(), EntitySpawnReason.LOAD);
+        if (!this.getHandle().getShoulderEntityLeft().isEmpty()) {
+            Optional<Entity> shoulder = EntityType.create(this.getHandle().getShoulderEntityLeft(), this.getHandle().level(), EntitySpawnReason.LOAD);
 
             return (!shoulder.isPresent()) ? null : shoulder.get().getBukkitEntity();
         }
@@ -597,7 +596,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
 
     @Override
     public void setShoulderEntityLeft(org.bukkit.entity.Entity entity) {
-        getHandle().setShoulderEntityLeft(entity == null ? new NBTTagCompound() : ((CraftEntity) entity).save());
+        this.getHandle().setShoulderEntityLeft(entity == null ? new CompoundTag() : ((CraftEntity) entity).save());
         if (entity != null) {
             entity.remove();
         }
@@ -605,8 +604,8 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
 
     @Override
     public org.bukkit.entity.Entity getShoulderEntityRight() {
-        if (!getHandle().getShoulderEntityRight().isEmpty()) {
-            Optional<Entity> shoulder = EntityTypes.create(getHandle().getShoulderEntityRight(), getHandle().level(), EntitySpawnReason.LOAD);
+        if (!this.getHandle().getShoulderEntityRight().isEmpty()) {
+            Optional<Entity> shoulder = EntityType.create(this.getHandle().getShoulderEntityRight(), this.getHandle().level(), EntitySpawnReason.LOAD);
 
             return (!shoulder.isPresent()) ? null : shoulder.get().getBukkitEntity();
         }
@@ -616,7 +615,7 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
 
     @Override
     public void setShoulderEntityRight(org.bukkit.entity.Entity entity) {
-        getHandle().setShoulderEntityRight(entity == null ? new NBTTagCompound() : ((CraftEntity) entity).save());
+        this.getHandle().setShoulderEntityRight(entity == null ? new CompoundTag() : ((CraftEntity) entity).save());
         if (entity != null) {
             entity.remove();
         }
@@ -624,81 +623,81 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
 
     @Override
     public boolean dropItem(boolean dropAll) {
-        if (!(getHandle() instanceof EntityPlayer)) return false;
-        return ((EntityPlayer) getHandle()).drop(dropAll);
+        if (!(this.getHandle() instanceof ServerPlayer)) return false;
+        return ((ServerPlayer) this.getHandle()).drop(dropAll);
     }
 
     @Override
     public float getExhaustion() {
-        return getHandle().getFoodData().exhaustionLevel;
+        return this.getHandle().getFoodData().exhaustionLevel;
     }
 
     @Override
     public void setExhaustion(float value) {
-        getHandle().getFoodData().exhaustionLevel = value;
+        this.getHandle().getFoodData().exhaustionLevel = value;
     }
 
     @Override
     public float getSaturation() {
-        return getHandle().getFoodData().saturationLevel;
+        return this.getHandle().getFoodData().saturationLevel;
     }
 
     @Override
     public void setSaturation(float value) {
-        getHandle().getFoodData().saturationLevel = value;
+        this.getHandle().getFoodData().saturationLevel = value;
     }
 
     @Override
     public int getFoodLevel() {
-        return getHandle().getFoodData().foodLevel;
+        return this.getHandle().getFoodData().foodLevel;
     }
 
     @Override
     public void setFoodLevel(int value) {
-        getHandle().getFoodData().foodLevel = value;
+        this.getHandle().getFoodData().foodLevel = value;
     }
 
     @Override
     public int getSaturatedRegenRate() {
-        return getHandle().getFoodData().saturatedRegenRate;
+        return this.getHandle().getFoodData().saturatedRegenRate;
     }
 
     @Override
     public void setSaturatedRegenRate(int i) {
-        getHandle().getFoodData().saturatedRegenRate = i;
+        this.getHandle().getFoodData().saturatedRegenRate = i;
     }
 
     @Override
     public int getUnsaturatedRegenRate() {
-        return getHandle().getFoodData().unsaturatedRegenRate;
+        return this.getHandle().getFoodData().unsaturatedRegenRate;
     }
 
     @Override
     public void setUnsaturatedRegenRate(int i) {
-        getHandle().getFoodData().unsaturatedRegenRate = i;
+        this.getHandle().getFoodData().unsaturatedRegenRate = i;
     }
 
     @Override
     public int getStarvationRate() {
-        return getHandle().getFoodData().starvationRate;
+        return this.getHandle().getFoodData().starvationRate;
     }
 
     @Override
     public void setStarvationRate(int i) {
-        getHandle().getFoodData().starvationRate = i;
+        this.getHandle().getFoodData().starvationRate = i;
     }
 
     @Override
     public Location getLastDeathLocation() {
-        return getHandle().getLastDeathLocation().map(CraftMemoryMapper::fromNms).orElse(null);
+        return this.getHandle().getLastDeathLocation().map(CraftMemoryMapper::fromNms).orElse(null);
     }
 
     @Override
     public void setLastDeathLocation(Location location) {
         if (location == null) {
-            getHandle().setLastDeathLocation(Optional.empty());
+            this.getHandle().setLastDeathLocation(Optional.empty());
         } else {
-            getHandle().setLastDeathLocation(Optional.of(CraftMemoryMapper.toNms(location)));
+            this.getHandle().setLastDeathLocation(Optional.of(CraftMemoryMapper.toNms(location)));
         }
     }
 
@@ -707,8 +706,8 @@ public class CraftHumanEntity extends CraftLivingEntity implements HumanEntity {
         Preconditions.checkArgument(fireworkItemStack != null, "fireworkItemStack must not be null");
         Preconditions.checkArgument(fireworkItemStack.getType() == Material.FIREWORK_ROCKET, "fireworkItemStack must be of type %s", Material.FIREWORK_ROCKET);
 
-        EntityFireworks fireworks = new EntityFireworks(getHandle().level(), CraftItemStack.asNMSCopy(fireworkItemStack), getHandle());
-        boolean success = getHandle().level().addFreshEntity(fireworks, SpawnReason.CUSTOM);
+        FireworkRocketEntity fireworks = new FireworkRocketEntity(this.getHandle().level(), CraftItemStack.asNMSCopy(fireworkItemStack), this.getHandle());
+        boolean success = this.getHandle().level().addFreshEntity(fireworks, SpawnReason.CUSTOM);
         return success ? (Firework) fireworks.getBukkitEntity() : null;
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHusk.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHusk.java
index 76f4d809f4..4822c744cc 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHusk.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftHusk.java
@@ -1,12 +1,11 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntityZombieHusk;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Husk;
 
 public class CraftHusk extends CraftZombie implements Husk {
 
-    public CraftHusk(CraftServer server, EntityZombieHusk entity) {
+    public CraftHusk(CraftServer server, net.minecraft.world.entity.monster.Husk entity) {
         super(server, entity);
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftIllager.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftIllager.java
index c8be77045d..fb3c518f02 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftIllager.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftIllager.java
@@ -1,18 +1,18 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntityIllagerAbstract;
+import net.minecraft.world.entity.monster.AbstractIllager;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Illager;
 
 public class CraftIllager extends CraftRaider implements Illager {
 
-    public CraftIllager(CraftServer server, EntityIllagerAbstract entity) {
+    public CraftIllager(CraftServer server, AbstractIllager entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityIllagerAbstract getHandle() {
-        return (EntityIllagerAbstract) super.getHandle();
+    public AbstractIllager getHandle() {
+        return (AbstractIllager) super.getHandle();
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java
index b4116f6b83..995c77ee53 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftIllusioner.java
@@ -1,18 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntityIllagerIllusioner;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Illusioner;
 
 public class CraftIllusioner extends CraftSpellcaster implements Illusioner {
 
-    public CraftIllusioner(CraftServer server, EntityIllagerIllusioner entity) {
+    public CraftIllusioner(CraftServer server, net.minecraft.world.entity.monster.Illusioner entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityIllagerIllusioner getHandle() {
-        return (EntityIllagerIllusioner) super.getHandle();
+    public net.minecraft.world.entity.monster.Illusioner getHandle() {
+        return (net.minecraft.world.entity.monster.Illusioner) super.getHandle();
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftInteraction.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftInteraction.java
index d60ad11733..caa3016bf9 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftInteraction.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftInteraction.java
@@ -24,44 +24,44 @@ public class CraftInteraction extends CraftEntity implements Interaction {
 
     @Override
     public float getInteractionWidth() {
-        return getHandle().getWidth();
+        return this.getHandle().getWidth();
     }
 
     @Override
     public void setInteractionWidth(float width) {
-        getHandle().setWidth(width);
+        this.getHandle().setWidth(width);
     }
 
     @Override
     public float getInteractionHeight() {
-        return getHandle().getHeight();
+        return this.getHandle().getHeight();
     }
 
     @Override
     public void setInteractionHeight(float height) {
-        getHandle().setHeight(height);
+        this.getHandle().setHeight(height);
     }
 
     @Override
     public boolean isResponsive() {
-        return getHandle().getResponse();
+        return this.getHandle().getResponse();
     }
 
     @Override
     public void setResponsive(boolean response) {
-        getHandle().setResponse(response);
+        this.getHandle().setResponse(response);
     }
 
     @Override
     public PreviousInteraction getLastAttack() {
-        net.minecraft.world.entity.Interaction.PlayerAction last = getHandle().attack;
+        net.minecraft.world.entity.Interaction.PlayerAction last = this.getHandle().attack;
 
         return (last != null) ? new CraftPreviousInteraction(last.player(), last.timestamp()) : null;
     }
 
     @Override
     public PreviousInteraction getLastInteraction() {
-        net.minecraft.world.entity.Interaction.PlayerAction last = getHandle().interaction;
+        net.minecraft.world.entity.Interaction.PlayerAction last = this.getHandle().interaction;
 
         return (last != null) ? new CraftPreviousInteraction(last.player(), last.timestamp()) : null;
     }
@@ -78,12 +78,12 @@ public class CraftInteraction extends CraftEntity implements Interaction {
 
         @Override
         public OfflinePlayer getPlayer() {
-            return Bukkit.getOfflinePlayer(uuid);
+            return Bukkit.getOfflinePlayer(this.uuid);
         }
 
         @Override
         public long getTimestamp() {
-            return timestamp;
+            return this.timestamp;
         }
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftIronGolem.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftIronGolem.java
index cb60fe8bfd..63cae1a2e9 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftIronGolem.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftIronGolem.java
@@ -1,17 +1,16 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.animal.EntityIronGolem;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.IronGolem;
 
 public class CraftIronGolem extends CraftGolem implements IronGolem {
-    public CraftIronGolem(CraftServer server, EntityIronGolem entity) {
+    public CraftIronGolem(CraftServer server, net.minecraft.world.entity.animal.IronGolem entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityIronGolem getHandle() {
-        return (EntityIronGolem) entity;
+    public net.minecraft.world.entity.animal.IronGolem getHandle() {
+        return (net.minecraft.world.entity.animal.IronGolem) this.entity;
     }
 
     @Override
@@ -21,11 +20,11 @@ public class CraftIronGolem extends CraftGolem implements IronGolem {
 
     @Override
     public boolean isPlayerCreated() {
-        return getHandle().isPlayerCreated();
+        return this.getHandle().isPlayerCreated();
     }
 
     @Override
     public void setPlayerCreated(boolean playerCreated) {
-        getHandle().setPlayerCreated(playerCreated);
+        this.getHandle().setPlayerCreated(playerCreated);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
index 29cc100eaa..fb3738f4c5 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftItem.java
@@ -1,7 +1,7 @@
 package org.bukkit.craftbukkit.entity;
 
 import java.util.UUID;
-import net.minecraft.world.entity.item.EntityItem;
+import net.minecraft.world.entity.item.ItemEntity;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.craftbukkit.inventory.CraftItemStack;
 import org.bukkit.entity.Item;
@@ -9,48 +9,48 @@ import org.bukkit.inventory.ItemStack;
 
 public class CraftItem extends CraftEntity implements Item {
 
-    public CraftItem(CraftServer server, EntityItem entity) {
+    public CraftItem(CraftServer server, ItemEntity entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityItem getHandle() {
-        return (EntityItem) entity;
+    public ItemEntity getHandle() {
+        return (ItemEntity) this.entity;
     }
 
     @Override
     public ItemStack getItemStack() {
-        return CraftItemStack.asCraftMirror(getHandle().getItem());
+        return CraftItemStack.asCraftMirror(this.getHandle().getItem());
     }
 
     @Override
     public void setItemStack(ItemStack stack) {
-        getHandle().setItem(CraftItemStack.asNMSCopy(stack));
+        this.getHandle().setItem(CraftItemStack.asNMSCopy(stack));
     }
 
     @Override
     public int getPickupDelay() {
-        return getHandle().pickupDelay;
+        return this.getHandle().pickupDelay;
     }
 
     @Override
     public void setPickupDelay(int delay) {
-        getHandle().pickupDelay = Math.min(delay, Short.MAX_VALUE);
+        this.getHandle().pickupDelay = Math.min(delay, Short.MAX_VALUE);
     }
 
     @Override
     public void setUnlimitedLifetime(boolean unlimited) {
         if (unlimited) {
             // See EntityItem#INFINITE_LIFETIME
-            getHandle().age = Short.MIN_VALUE;
+            this.getHandle().age = Short.MIN_VALUE;
         } else {
-            getHandle().age = getTicksLived();
+            this.getHandle().age = this.getTicksLived();
         }
     }
 
     @Override
     public boolean isUnlimitedLifetime() {
-        return getHandle().age == Short.MIN_VALUE;
+        return this.getHandle().age == Short.MIN_VALUE;
     }
 
     @Override
@@ -58,29 +58,29 @@ public class CraftItem extends CraftEntity implements Item {
         super.setTicksLived(value);
 
         // Second field for EntityItem (don't set if lifetime is unlimited)
-        if (!isUnlimitedLifetime()) {
-            getHandle().age = value;
+        if (!this.isUnlimitedLifetime()) {
+            this.getHandle().age = value;
         }
     }
 
     @Override
     public void setOwner(UUID uuid) {
-        getHandle().setTarget(uuid);
+        this.getHandle().setTarget(uuid);
     }
 
     @Override
     public UUID getOwner() {
-        return getHandle().target;
+        return this.getHandle().target;
     }
 
     @Override
     public void setThrower(UUID uuid) {
-        getHandle().thrower = uuid;
+        this.getHandle().thrower = uuid;
     }
 
     @Override
     public UUID getThrower() {
-        return getHandle().thrower;
+        return this.getHandle().thrower;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftItemDisplay.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftItemDisplay.java
index fbfdbe31f3..787f91566f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftItemDisplay.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftItemDisplay.java
@@ -25,23 +25,23 @@ public class CraftItemDisplay extends CraftDisplay implements ItemDisplay {
 
     @Override
     public ItemStack getItemStack() {
-        return CraftItemStack.asBukkitCopy(getHandle().getItemStack());
+        return CraftItemStack.asBukkitCopy(this.getHandle().getItemStack());
     }
 
     @Override
     public void setItemStack(ItemStack item) {
-        getHandle().setItemStack(CraftItemStack.asNMSCopy(item));
+        this.getHandle().setItemStack(CraftItemStack.asNMSCopy(item));
     }
 
     @Override
     public ItemDisplayTransform getItemDisplayTransform() {
-        return ItemDisplayTransform.values()[getHandle().getItemTransform().ordinal()];
+        return ItemDisplayTransform.values()[this.getHandle().getItemTransform().ordinal()];
     }
 
     @Override
     public void setItemDisplayTransform(ItemDisplayTransform display) {
         Preconditions.checkArgument(display != null, "Display cannot be null");
 
-        getHandle().setItemTransform(ItemDisplayContext.BY_ID.apply(display.ordinal()));
+        this.getHandle().setItemTransform(ItemDisplayContext.BY_ID.apply(display.ordinal()));
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java
index 2097f9106c..f3a9b33802 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftItemFrame.java
@@ -1,9 +1,8 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.core.EnumDirection;
-import net.minecraft.world.entity.decoration.EntityHanging;
-import net.minecraft.world.entity.decoration.EntityItemFrame;
+import net.minecraft.core.Direction;
+import net.minecraft.world.entity.decoration.HangingEntity;
 import net.minecraft.world.level.block.Blocks;
 import org.bukkit.Rotation;
 import org.bukkit.block.BlockFace;
@@ -13,25 +12,25 @@ import org.bukkit.craftbukkit.inventory.CraftItemStack;
 import org.bukkit.entity.ItemFrame;
 
 public class CraftItemFrame extends CraftHanging implements ItemFrame {
-    public CraftItemFrame(CraftServer server, EntityItemFrame entity) {
+    public CraftItemFrame(CraftServer server, net.minecraft.world.entity.decoration.ItemFrame entity) {
         super(server, entity);
     }
 
     @Override
     public boolean setFacingDirection(BlockFace face, boolean force) {
-        EntityHanging hanging = getHandle();
-        EnumDirection oldDir = hanging.getDirection();
-        EnumDirection newDir = CraftBlock.blockFaceToNotch(face);
+        HangingEntity hanging = this.getHandle();
+        Direction oldDir = hanging.getDirection();
+        Direction newDir = CraftBlock.blockFaceToNotch(face);
 
         Preconditions.checkArgument(newDir != null, "%s is not a valid facing direction", face);
 
-        getHandle().setDirection(newDir);
-        if (!force && !getHandle().generation && !hanging.survives()) {
+        this.getHandle().setDirection(newDir);
+        if (!force && !this.getHandle().generation && !hanging.survives()) {
             hanging.setDirection(oldDir);
             return false;
         }
 
-        update();
+        this.update();
 
         return true;
     }
@@ -41,45 +40,45 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame {
         super.update();
 
         // mark dirty, so that the client gets updated with item and rotation
-        getHandle().getEntityData().markDirty(EntityItemFrame.DATA_ITEM);
-        getHandle().getEntityData().markDirty(EntityItemFrame.DATA_ROTATION);
+        this.getHandle().getEntityData().markDirty(net.minecraft.world.entity.decoration.ItemFrame.DATA_ITEM);
+        this.getHandle().getEntityData().markDirty(net.minecraft.world.entity.decoration.ItemFrame.DATA_ROTATION);
 
         // update redstone
-        if (!getHandle().generation) {
-            getHandle().level().updateNeighbourForOutputSignal(getHandle().getPos(), Blocks.AIR);
+        if (!this.getHandle().generation) {
+            this.getHandle().level().updateNeighbourForOutputSignal(this.getHandle().getPos(), Blocks.AIR);
         }
     }
 
     @Override
     public void setItem(org.bukkit.inventory.ItemStack item) {
-        setItem(item, true);
+        this.setItem(item, true);
     }
 
     @Override
     public void setItem(org.bukkit.inventory.ItemStack item, boolean playSound) {
         // only updated redstone and play sound when it is not in generation
-        getHandle().setItem(CraftItemStack.asNMSCopy(item), !getHandle().generation, !getHandle().generation && playSound);
+        this.getHandle().setItem(CraftItemStack.asNMSCopy(item), !this.getHandle().generation, !this.getHandle().generation && playSound);
     }
 
     @Override
     public org.bukkit.inventory.ItemStack getItem() {
-        return CraftItemStack.asBukkitCopy(getHandle().getItem());
+        return CraftItemStack.asBukkitCopy(this.getHandle().getItem());
     }
 
     @Override
     public float getItemDropChance() {
-        return getHandle().dropChance;
+        return this.getHandle().dropChance;
     }
 
     @Override
     public void setItemDropChance(float chance) {
         Preconditions.checkArgument(0.0 <= chance && chance <= 1.0, "Chance (%s) outside range [0, 1]", chance);
-        getHandle().dropChance = chance;
+        this.getHandle().dropChance = chance;
     }
 
     @Override
     public Rotation getRotation() {
-        return toBukkitRotation(getHandle().getRotation());
+        return this.toBukkitRotation(this.getHandle().getRotation());
     }
 
     Rotation toBukkitRotation(int value) {
@@ -102,14 +101,14 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame {
         case 7:
             return Rotation.COUNTER_CLOCKWISE_45;
         default:
-            throw new AssertionError("Unknown rotation " + value + " for " + getHandle());
+            throw new AssertionError("Unknown rotation " + value + " for " + this.getHandle());
         }
     }
 
     @Override
     public void setRotation(Rotation rotation) {
         Preconditions.checkArgument(rotation != null, "Rotation cannot be null");
-        getHandle().setRotation(toInteger(rotation));
+        this.getHandle().setRotation(CraftItemFrame.toInteger(rotation));
     }
 
     static int toInteger(Rotation rotation) {
@@ -138,31 +137,31 @@ public class CraftItemFrame extends CraftHanging implements ItemFrame {
 
     @Override
     public boolean isVisible() {
-        return !getHandle().isInvisible();
+        return !this.getHandle().isInvisible();
     }
 
     @Override
     public void setVisible(boolean visible) {
-        getHandle().setInvisible(!visible);
+        this.getHandle().setInvisible(!visible);
     }
 
     @Override
     public boolean isFixed() {
-        return getHandle().fixed;
+        return this.getHandle().fixed;
     }
 
     @Override
     public void setFixed(boolean fixed) {
-        getHandle().fixed = fixed;
+        this.getHandle().fixed = fixed;
     }
 
     @Override
-    public EntityItemFrame getHandle() {
-        return (EntityItemFrame) entity;
+    public net.minecraft.world.entity.decoration.ItemFrame getHandle() {
+        return (net.minecraft.world.entity.decoration.ItemFrame) this.entity;
     }
 
     @Override
     public String toString() {
-        return "CraftItemFrame{item=" + getItem() + ", rotation=" + getRotation() + "}";
+        return "CraftItemFrame{item=" + this.getItem() + ", rotation=" + this.getRotation() + "}";
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLargeFireball.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLargeFireball.java
index ffd05382be..0848963e61 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLargeFireball.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLargeFireball.java
@@ -1,23 +1,22 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.projectile.EntityLargeFireball;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.LargeFireball;
 
 public class CraftLargeFireball extends CraftSizedFireball implements LargeFireball {
-    public CraftLargeFireball(CraftServer server, EntityLargeFireball entity) {
+    public CraftLargeFireball(CraftServer server, net.minecraft.world.entity.projectile.LargeFireball entity) {
         super(server, entity);
     }
 
     @Override
     public void setYield(float yield) {
         super.setYield(yield);
-        getHandle().explosionPower = (int) yield;
+        this.getHandle().explosionPower = (int) yield;
     }
 
     @Override
-    public EntityLargeFireball getHandle() {
-        return (EntityLargeFireball) entity;
+    public net.minecraft.world.entity.projectile.LargeFireball getHandle() {
+        return (net.minecraft.world.entity.projectile.LargeFireball) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLeash.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLeash.java
index eed038271b..76a7fc3d6c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLeash.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLeash.java
@@ -1,13 +1,13 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.decoration.EntityLeash;
+import net.minecraft.world.entity.decoration.LeashFenceKnotEntity;
 import org.bukkit.block.BlockFace;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.LeashHitch;
 
 public class CraftLeash extends CraftBlockAttachedEntity implements LeashHitch {
-    public CraftLeash(CraftServer server, EntityLeash entity) {
+    public CraftLeash(CraftServer server, LeashFenceKnotEntity entity) {
         super(server, entity);
     }
 
@@ -15,7 +15,7 @@ public class CraftLeash extends CraftBlockAttachedEntity implements LeashHitch {
     public boolean setFacingDirection(BlockFace face, boolean force) {
         Preconditions.checkArgument(face == BlockFace.SELF, "%s is not a valid facing direction", face);
 
-        return force || getHandle().generation || getHandle().survives();
+        return force || this.getHandle().generation || this.getHandle().survives();
     }
 
     @Override
@@ -36,8 +36,8 @@ public class CraftLeash extends CraftBlockAttachedEntity implements LeashHitch {
     }
 
     @Override
-    public EntityLeash getHandle() {
-        return (EntityLeash) entity;
+    public LeashFenceKnotEntity getHandle() {
+        return (LeashFenceKnotEntity) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java
index 3a4fb14bff..e2e2aafdea 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLightningStrike.java
@@ -1,49 +1,49 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.server.level.EntityPlayer;
-import net.minecraft.world.entity.EntityLightning;
+import net.minecraft.server.level.ServerPlayer;
+import net.minecraft.world.entity.LightningBolt;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.LightningStrike;
 import org.bukkit.entity.Player;
 
 public class CraftLightningStrike extends CraftEntity implements LightningStrike {
-    public CraftLightningStrike(final CraftServer server, final EntityLightning entity) {
+    public CraftLightningStrike(final CraftServer server, final LightningBolt entity) {
         super(server, entity);
     }
 
     @Override
     public boolean isEffect() {
-        return getHandle().visualOnly;
+        return this.getHandle().visualOnly;
     }
 
     public int getFlashes() {
-        return getHandle().flashes;
+        return this.getHandle().flashes;
     }
 
     public void setFlashes(int flashes) {
-        getHandle().flashes = flashes;
+        this.getHandle().flashes = flashes;
     }
 
     public int getLifeTicks() {
-        return getHandle().life;
+        return this.getHandle().life;
     }
 
     public void setLifeTicks(int ticks) {
-        getHandle().life = ticks;
+        this.getHandle().life = ticks;
     }
 
     public Player getCausingPlayer() {
-        EntityPlayer player = getHandle().getCause();
+        ServerPlayer player = this.getHandle().getCause();
         return (player != null) ? player.getBukkitEntity() : null;
     }
 
     public void setCausingPlayer(Player player) {
-        getHandle().setCause((player != null) ? ((CraftPlayer) player).getHandle() : null);
+        this.getHandle().setCause((player != null) ? ((CraftPlayer) player).getHandle() : null);
     }
 
     @Override
-    public EntityLightning getHandle() {
-        return (EntityLightning) entity;
+    public LightningBolt getHandle() {
+        return (LightningBolt) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
index 0d5d34ecdf..e92bd027d1 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLivingEntity.java
@@ -10,42 +10,30 @@ import java.util.Set;
 import java.util.UUID;
 import net.minecraft.core.component.DataComponents;
 import net.minecraft.network.protocol.game.ClientboundHurtAnimationPacket;
-import net.minecraft.server.level.WorldServer;
-import net.minecraft.sounds.SoundEffect;
-import net.minecraft.sounds.SoundEffects;
-import net.minecraft.world.EnumHand;
+import net.minecraft.server.level.ServerLevel;
+import net.minecraft.sounds.SoundEvent;
+import net.minecraft.sounds.SoundEvents;
+import net.minecraft.world.InteractionHand;
 import net.minecraft.world.damagesource.DamageSource;
-import net.minecraft.world.effect.MobEffect;
-import net.minecraft.world.entity.EntityInsentient;
-import net.minecraft.world.entity.EntityLiving;
+import net.minecraft.world.effect.MobEffectInstance;
 import net.minecraft.world.entity.EntitySpawnReason;
-import net.minecraft.world.entity.EntityTypes;
-import net.minecraft.world.entity.ai.attributes.GenericAttributes;
-import net.minecraft.world.entity.boss.wither.EntityWither;
-import net.minecraft.world.entity.decoration.EntityArmorStand;
-import net.minecraft.world.entity.player.EntityHuman;
-import net.minecraft.world.entity.projectile.EntityArrow;
-import net.minecraft.world.entity.projectile.EntityDragonFireball;
-import net.minecraft.world.entity.projectile.EntityEgg;
-import net.minecraft.world.entity.projectile.EntityEnderPearl;
-import net.minecraft.world.entity.projectile.EntityFireball;
-import net.minecraft.world.entity.projectile.EntityFireworks;
-import net.minecraft.world.entity.projectile.EntityFishingHook;
-import net.minecraft.world.entity.projectile.EntityLargeFireball;
-import net.minecraft.world.entity.projectile.EntityLlamaSpit;
-import net.minecraft.world.entity.projectile.EntityPotion;
-import net.minecraft.world.entity.projectile.EntityProjectile;
-import net.minecraft.world.entity.projectile.EntityShulkerBullet;
-import net.minecraft.world.entity.projectile.EntitySmallFireball;
-import net.minecraft.world.entity.projectile.EntitySnowball;
-import net.minecraft.world.entity.projectile.EntitySpectralArrow;
-import net.minecraft.world.entity.projectile.EntityThrownExpBottle;
-import net.minecraft.world.entity.projectile.EntityThrownTrident;
-import net.minecraft.world.entity.projectile.EntityTippedArrow;
-import net.minecraft.world.entity.projectile.EntityWitherSkull;
+import net.minecraft.world.entity.EntityType;
+import net.minecraft.world.entity.Mob;
+import net.minecraft.world.entity.ai.attributes.Attributes;
+import net.minecraft.world.entity.boss.wither.WitherBoss;
+import net.minecraft.world.entity.decoration.ArmorStand;
+import net.minecraft.world.entity.projectile.AbstractHurtingProjectile;
+import net.minecraft.world.entity.projectile.FireworkRocketEntity;
+import net.minecraft.world.entity.projectile.FishingHook;
+import net.minecraft.world.entity.projectile.LargeFireball;
+import net.minecraft.world.entity.projectile.ThrowableProjectile;
+import net.minecraft.world.entity.projectile.ThrownEgg;
+import net.minecraft.world.entity.projectile.ThrownEnderpearl;
+import net.minecraft.world.entity.projectile.ThrownExperienceBottle;
+import net.minecraft.world.entity.projectile.ThrownTrident;
 import net.minecraft.world.item.Items;
 import net.minecraft.world.item.component.Consumable;
-import net.minecraft.world.phys.Vec3D;
+import net.minecraft.world.phys.Vec3;
 import org.bukkit.FluidCollisionMode;
 import org.bukkit.Location;
 import org.bukkit.Material;
@@ -104,17 +92,17 @@ import org.bukkit.util.Vector;
 public class CraftLivingEntity extends CraftEntity implements LivingEntity {
     private CraftEntityEquipment equipment;
 
-    public CraftLivingEntity(final CraftServer server, final EntityLiving entity) {
+    public CraftLivingEntity(final CraftServer server, final net.minecraft.world.entity.LivingEntity entity) {
         super(server, entity);
 
-        if (entity instanceof EntityInsentient || entity instanceof EntityArmorStand) {
-            equipment = new CraftEntityEquipment(this);
+        if (entity instanceof Mob || entity instanceof ArmorStand) {
+            this.equipment = new CraftEntityEquipment(this);
         }
     }
 
     @Override
     public double getHealth() {
-        return Math.min(Math.max(0, getHandle().getHealth()), getMaxHealth());
+        return Math.min(Math.max(0, this.getHandle().getHealth()), this.getMaxHealth());
     }
 
     @Override
@@ -123,63 +111,63 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
         Preconditions.checkArgument(health >= 0 && health <= this.getMaxHealth(), "Health value (%s) must be between 0 and %s", health, this.getMaxHealth());
 
         // during world generation, we don't want to run logic for dropping items and xp
-        if (getHandle().generation && health == 0) {
-            getHandle().discard(null); // Add Bukkit remove cause
+        if (this.getHandle().generation && health == 0) {
+            this.getHandle().discard(null); // Add Bukkit remove cause
             return;
         }
 
-        getHandle().setHealth((float) health);
+        this.getHandle().setHealth((float) health);
 
         if (health == 0) {
-            getHandle().die(getHandle().damageSources().generic());
+            this.getHandle().die(this.getHandle().damageSources().generic());
         }
     }
 
     @Override
     public double getAbsorptionAmount() {
-        return getHandle().getAbsorptionAmount();
+        return this.getHandle().getAbsorptionAmount();
     }
 
     @Override
     public void setAbsorptionAmount(double amount) {
         Preconditions.checkArgument(amount >= 0 && Double.isFinite(amount), "amount < 0 or non-finite");
 
-        getHandle().setAbsorptionAmount((float) amount);
+        this.getHandle().setAbsorptionAmount((float) amount);
     }
 
     @Override
     public double getMaxHealth() {
-        return getHandle().getMaxHealth();
+        return this.getHandle().getMaxHealth();
     }
 
     @Override
     public void setMaxHealth(double amount) {
         Preconditions.checkArgument(amount > 0, "Max health amount (%s) must be greater than 0", amount);
 
-        getHandle().getAttribute(GenericAttributes.MAX_HEALTH).setBaseValue(amount);
+        this.getHandle().getAttribute(Attributes.MAX_HEALTH).setBaseValue(amount);
 
-        if (getHealth() > amount) {
-            setHealth(amount);
+        if (this.getHealth() > amount) {
+            this.setHealth(amount);
         }
     }
 
     @Override
     public void resetMaxHealth() {
-        setMaxHealth(getHandle().getAttribute(GenericAttributes.MAX_HEALTH).getAttribute().value().getDefaultValue());
+        this.setMaxHealth(this.getHandle().getAttribute(Attributes.MAX_HEALTH).getAttribute().value().getDefaultValue());
     }
 
     @Override
     public double getEyeHeight() {
-        return getHandle().getEyeHeight();
+        return this.getHandle().getEyeHeight();
     }
 
     @Override
     public double getEyeHeight(boolean ignorePose) {
-        return getEyeHeight();
+        return this.getEyeHeight();
     }
 
     private List<Block> getLineOfSight(Set<Material> transparent, int maxDistance, int maxLength) {
-        Preconditions.checkState(!getHandle().generation, "Cannot get line of sight during world generation");
+        Preconditions.checkState(!this.getHandle().generation, "Cannot get line of sight during world generation");
 
         if (transparent == null) {
             transparent = Sets.newHashSet(Material.AIR, Material.CAVE_AIR, Material.VOID_AIR);
@@ -205,18 +193,18 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
 
     @Override
     public List<Block> getLineOfSight(Set<Material> transparent, int maxDistance) {
-        return getLineOfSight(transparent, maxDistance, 0);
+        return this.getLineOfSight(transparent, maxDistance, 0);
     }
 
     @Override
     public Block getTargetBlock(Set<Material> transparent, int maxDistance) {
-        List<Block> blocks = getLineOfSight(transparent, maxDistance, 1);
+        List<Block> blocks = this.getLineOfSight(transparent, maxDistance, 1);
         return blocks.get(0);
     }
 
     @Override
     public List<Block> getLastTwoTargetBlocks(Set<Material> transparent, int maxDistance) {
-        return getLineOfSight(transparent, maxDistance, 2);
+        return this.getLineOfSight(transparent, maxDistance, 2);
     }
 
     @Override
@@ -237,7 +225,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
 
     @Override
     public RayTraceResult rayTraceBlocks(double maxDistance, FluidCollisionMode fluidCollisionMode) {
-        Preconditions.checkState(!getHandle().generation, "Cannot ray tray blocks during world generation");
+        Preconditions.checkState(!this.getHandle().generation, "Cannot ray tray blocks during world generation");
 
         Location eyeLocation = this.getEyeLocation();
         Vector direction = eyeLocation.getDirection();
@@ -246,173 +234,173 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
 
     @Override
     public int getRemainingAir() {
-        return getHandle().getAirSupply();
+        return this.getHandle().getAirSupply();
     }
 
     @Override
     public void setRemainingAir(int ticks) {
-        getHandle().setAirSupply(ticks);
+        this.getHandle().setAirSupply(ticks);
     }
 
     @Override
     public int getMaximumAir() {
-        return getHandle().maxAirTicks;
+        return this.getHandle().maxAirTicks;
     }
 
     @Override
     public void setMaximumAir(int ticks) {
-        getHandle().maxAirTicks = ticks;
+        this.getHandle().maxAirTicks = ticks;
     }
 
     @Override
     public ItemStack getItemInUse() {
-        net.minecraft.world.item.ItemStack item = getHandle().getUseItem();
+        net.minecraft.world.item.ItemStack item = this.getHandle().getUseItem();
         return item.isEmpty() ? null : CraftItemStack.asCraftMirror(item);
     }
 
     @Override
     public int getItemInUseTicks() {
-        return getHandle().getUseItemRemainingTicks();
+        return this.getHandle().getUseItemRemainingTicks();
     }
 
     @Override
     public void setItemInUseTicks(int ticks) {
-        getHandle().useItemRemaining = ticks;
+        this.getHandle().useItemRemaining = ticks;
     }
 
     @Override
     public int getArrowCooldown() {
-        return getHandle().removeArrowTime;
+        return this.getHandle().removeArrowTime;
     }
 
     @Override
     public void setArrowCooldown(int ticks) {
-        getHandle().removeArrowTime = ticks;
+        this.getHandle().removeArrowTime = ticks;
     }
 
     @Override
     public int getArrowsInBody() {
-        return getHandle().getArrowCount();
+        return this.getHandle().getArrowCount();
     }
 
     @Override
     public void setArrowsInBody(int count) {
         Preconditions.checkArgument(count >= 0, "New arrow amount must be >= 0");
-        getHandle().getEntityData().set(EntityLiving.DATA_ARROW_COUNT_ID, count);
+        this.getHandle().getEntityData().set(net.minecraft.world.entity.LivingEntity.DATA_ARROW_COUNT_ID, count);
     }
 
     @Override
     public boolean isInvulnerable() {
-        return getHandle().isInvulnerableTo((WorldServer) getHandle().level(), getHandle().damageSources().generic());
+        return this.getHandle().isInvulnerableTo((ServerLevel) this.getHandle().level(), this.getHandle().damageSources().generic());
     }
 
     @Override
     public void damage(double amount) {
-        damage(amount, getHandle().damageSources().generic());
+        this.damage(amount, this.getHandle().damageSources().generic());
     }
 
     @Override
     public void damage(double amount, org.bukkit.entity.Entity source) {
-        DamageSource reason = getHandle().damageSources().generic();
+        DamageSource reason = this.getHandle().damageSources().generic();
 
         if (source instanceof HumanEntity) {
-            reason = getHandle().damageSources().playerAttack(((CraftHumanEntity) source).getHandle());
+            reason = this.getHandle().damageSources().playerAttack(((CraftHumanEntity) source).getHandle());
         } else if (source instanceof LivingEntity) {
-            reason = getHandle().damageSources().mobAttack(((CraftLivingEntity) source).getHandle());
+            reason = this.getHandle().damageSources().mobAttack(((CraftLivingEntity) source).getHandle());
         }
 
-        damage(amount, reason);
+        this.damage(amount, reason);
     }
 
     @Override
     public void damage(double amount, org.bukkit.damage.DamageSource damageSource) {
         Preconditions.checkArgument(damageSource != null, "damageSource cannot be null");
 
-        damage(amount, ((CraftDamageSource) damageSource).getHandle());
+        this.damage(amount, ((CraftDamageSource) damageSource).getHandle());
     }
 
     private void damage(double amount, DamageSource damageSource) {
         Preconditions.checkArgument(damageSource != null, "damageSource cannot be null");
-        Preconditions.checkState(!getHandle().generation, "Cannot damage entity during world generation");
+        Preconditions.checkState(!this.getHandle().generation, "Cannot damage entity during world generation");
 
-        entity.hurt(damageSource, (float) amount);
+        this.entity.hurt(damageSource, (float) amount);
     }
 
     @Override
     public Location getEyeLocation() {
-        Location loc = getLocation();
-        loc.setY(loc.getY() + getEyeHeight());
+        Location loc = this.getLocation();
+        loc.setY(loc.getY() + this.getEyeHeight());
         return loc;
     }
 
     @Override
     public int getMaximumNoDamageTicks() {
-        return getHandle().invulnerableDuration;
+        return this.getHandle().invulnerableDuration;
     }
 
     @Override
     public void setMaximumNoDamageTicks(int ticks) {
-        getHandle().invulnerableDuration = ticks;
+        this.getHandle().invulnerableDuration = ticks;
     }
 
     @Override
     public double getLastDamage() {
-        return getHandle().lastHurt;
+        return this.getHandle().lastHurt;
     }
 
     @Override
     public void setLastDamage(double damage) {
-        getHandle().lastHurt = (float) damage;
+        this.getHandle().lastHurt = (float) damage;
     }
 
     @Override
     public int getNoDamageTicks() {
-        return getHandle().invulnerableTime;
+        return this.getHandle().invulnerableTime;
     }
 
     @Override
     public void setNoDamageTicks(int ticks) {
-        getHandle().invulnerableTime = ticks;
+        this.getHandle().invulnerableTime = ticks;
     }
 
     @Override
     public int getNoActionTicks() {
-        return getHandle().getNoActionTime();
+        return this.getHandle().getNoActionTime();
     }
 
     @Override
     public void setNoActionTicks(int ticks) {
         Preconditions.checkArgument(ticks >= 0, "ticks must be >= 0");
-        getHandle().setNoActionTime(ticks);
+        this.getHandle().setNoActionTime(ticks);
     }
 
     @Override
-    public EntityLiving getHandle() {
-        return (EntityLiving) entity;
+    public net.minecraft.world.entity.LivingEntity getHandle() {
+        return (net.minecraft.world.entity.LivingEntity) this.entity;
     }
 
-    public void setHandle(final EntityLiving entity) {
+    public void setHandle(final net.minecraft.world.entity.LivingEntity entity) {
         super.setHandle(entity);
     }
 
     @Override
     public String toString() {
-        return "CraftLivingEntity{" + "id=" + getEntityId() + '}';
+        return "CraftLivingEntity{" + "id=" + this.getEntityId() + '}';
     }
 
     @Override
     public Player getKiller() {
-        return getHandle().lastHurtByPlayer == null ? null : (Player) getHandle().lastHurtByPlayer.getBukkitEntity();
+        return this.getHandle().lastHurtByPlayer == null ? null : (Player) this.getHandle().lastHurtByPlayer.getBukkitEntity();
     }
 
     @Override
     public boolean addPotionEffect(PotionEffect effect) {
-        return addPotionEffect(effect, false);
+        return this.addPotionEffect(effect, false);
     }
 
     @Override
     public boolean addPotionEffect(PotionEffect effect, boolean force) {
-        getHandle().addEffect(new MobEffect(CraftPotionEffectType.bukkitToMinecraftHolder(effect.getType()), effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles()), EntityPotionEffectEvent.Cause.PLUGIN);
+        this.getHandle().addEffect(new MobEffectInstance(CraftPotionEffectType.bukkitToMinecraftHolder(effect.getType()), effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles()), EntityPotionEffectEvent.Cause.PLUGIN);
         return true;
     }
 
@@ -420,31 +408,31 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
     public boolean addPotionEffects(Collection<PotionEffect> effects) {
         boolean success = true;
         for (PotionEffect effect : effects) {
-            success &= addPotionEffect(effect);
+            success &= this.addPotionEffect(effect);
         }
         return success;
     }
 
     @Override
     public boolean hasPotionEffect(PotionEffectType type) {
-        return getHandle().hasEffect(CraftPotionEffectType.bukkitToMinecraftHolder(type));
+        return this.getHandle().hasEffect(CraftPotionEffectType.bukkitToMinecraftHolder(type));
     }
 
     @Override
     public PotionEffect getPotionEffect(PotionEffectType type) {
-        MobEffect handle = getHandle().getEffect(CraftPotionEffectType.bukkitToMinecraftHolder(type));
+        MobEffectInstance handle = this.getHandle().getEffect(CraftPotionEffectType.bukkitToMinecraftHolder(type));
         return (handle == null) ? null : new PotionEffect(CraftPotionEffectType.minecraftHolderToBukkit(handle.getEffect()), handle.getDuration(), handle.getAmplifier(), handle.isAmbient(), handle.isVisible());
     }
 
     @Override
     public void removePotionEffect(PotionEffectType type) {
-        getHandle().removeEffect(CraftPotionEffectType.bukkitToMinecraftHolder(type), EntityPotionEffectEvent.Cause.PLUGIN);
+        this.getHandle().removeEffect(CraftPotionEffectType.bukkitToMinecraftHolder(type), EntityPotionEffectEvent.Cause.PLUGIN);
     }
 
     @Override
     public Collection<PotionEffect> getActivePotionEffects() {
         List<PotionEffect> effects = new ArrayList<PotionEffect>();
-        for (MobEffect handle : getHandle().activeEffects.values()) {
+        for (MobEffectInstance handle : this.getHandle().activeEffects.values()) {
             effects.add(new PotionEffect(CraftPotionEffectType.minecraftHolderToBukkit(handle.getEffect()), handle.getDuration(), handle.getAmplifier(), handle.isAmbient(), handle.isVisible()));
         }
         return effects;
@@ -452,94 +440,94 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
 
     @Override
     public <T extends Projectile> T launchProjectile(Class<? extends T> projectile) {
-        return launchProjectile(projectile, null);
+        return this.launchProjectile(projectile, null);
     }
 
     @Override
     @SuppressWarnings("unchecked")
     public <T extends Projectile> T launchProjectile(Class<? extends T> projectile, Vector velocity) {
-        Preconditions.checkState(!getHandle().generation, "Cannot launch projectile during world generation");
+        Preconditions.checkState(!this.getHandle().generation, "Cannot launch projectile during world generation");
 
-        net.minecraft.world.level.World world = ((CraftWorld) getWorld()).getHandle();
+        net.minecraft.world.level.Level world = ((CraftWorld) this.getWorld()).getHandle();
         net.minecraft.world.entity.Entity launch = null;
 
         if (Snowball.class.isAssignableFrom(projectile)) {
-            launch = new EntitySnowball(world, getHandle(), new net.minecraft.world.item.ItemStack(Items.SNOWBALL));
-            ((EntityProjectile) launch).shootFromRotation(getHandle(), getHandle().getXRot(), getHandle().getYRot(), 0.0F, 1.5F, 1.0F); // ItemSnowball
+            launch = new net.minecraft.world.entity.projectile.Snowball(world, this.getHandle(), new net.minecraft.world.item.ItemStack(Items.SNOWBALL));
+            ((ThrowableProjectile) launch).shootFromRotation(this.getHandle(), this.getHandle().getXRot(), this.getHandle().getYRot(), 0.0F, 1.5F, 1.0F); // ItemSnowball
         } else if (Egg.class.isAssignableFrom(projectile)) {
-            launch = new EntityEgg(world, getHandle(), new net.minecraft.world.item.ItemStack(Items.EGG));
-            ((EntityProjectile) launch).shootFromRotation(getHandle(), getHandle().getXRot(), getHandle().getYRot(), 0.0F, 1.5F, 1.0F); // ItemEgg
+            launch = new ThrownEgg(world, this.getHandle(), new net.minecraft.world.item.ItemStack(Items.EGG));
+            ((ThrowableProjectile) launch).shootFromRotation(this.getHandle(), this.getHandle().getXRot(), this.getHandle().getYRot(), 0.0F, 1.5F, 1.0F); // ItemEgg
         } else if (EnderPearl.class.isAssignableFrom(projectile)) {
-            launch = new EntityEnderPearl(world, getHandle(), new net.minecraft.world.item.ItemStack(Items.ENDER_PEARL));
-            ((EntityProjectile) launch).shootFromRotation(getHandle(), getHandle().getXRot(), getHandle().getYRot(), 0.0F, 1.5F, 1.0F); // ItemEnderPearl
+            launch = new ThrownEnderpearl(world, this.getHandle(), new net.minecraft.world.item.ItemStack(Items.ENDER_PEARL));
+            ((ThrowableProjectile) launch).shootFromRotation(this.getHandle(), this.getHandle().getXRot(), this.getHandle().getYRot(), 0.0F, 1.5F, 1.0F); // ItemEnderPearl
         } else if (AbstractArrow.class.isAssignableFrom(projectile)) {
             if (TippedArrow.class.isAssignableFrom(projectile)) {
-                launch = new EntityTippedArrow(world, getHandle(), new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.ARROW), null);
+                launch = new net.minecraft.world.entity.projectile.Arrow(world, this.getHandle(), new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.ARROW), null);
                 ((Arrow) launch.getBukkitEntity()).setBasePotionType(PotionType.WATER);
             } else if (SpectralArrow.class.isAssignableFrom(projectile)) {
-                launch = new EntitySpectralArrow(world, getHandle(), new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.SPECTRAL_ARROW), null);
+                launch = new net.minecraft.world.entity.projectile.SpectralArrow(world, this.getHandle(), new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.SPECTRAL_ARROW), null);
             } else if (Trident.class.isAssignableFrom(projectile)) {
-                launch = new EntityThrownTrident(world, getHandle(), new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.TRIDENT));
+                launch = new ThrownTrident(world, this.getHandle(), new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.TRIDENT));
             } else {
-                launch = new EntityTippedArrow(world, getHandle(), new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.ARROW), null);
+                launch = new net.minecraft.world.entity.projectile.Arrow(world, this.getHandle(), new net.minecraft.world.item.ItemStack(net.minecraft.world.item.Items.ARROW), null);
             }
-            ((EntityArrow) launch).shootFromRotation(getHandle(), getHandle().getXRot(), getHandle().getYRot(), 0.0F, 3.0F, 1.0F); // ItemBow
+            ((net.minecraft.world.entity.projectile.AbstractArrow) launch).shootFromRotation(this.getHandle(), this.getHandle().getXRot(), this.getHandle().getYRot(), 0.0F, 3.0F, 1.0F); // ItemBow
         } else if (ThrownPotion.class.isAssignableFrom(projectile)) {
             if (LingeringPotion.class.isAssignableFrom(projectile)) {
-                launch = new EntityPotion(world, getHandle(), new net.minecraft.world.item.ItemStack(Items.LINGERING_POTION));
+                launch = new net.minecraft.world.entity.projectile.ThrownPotion(world, this.getHandle(), new net.minecraft.world.item.ItemStack(Items.LINGERING_POTION));
             } else {
-                launch = new EntityPotion(world, getHandle(), new net.minecraft.world.item.ItemStack(Items.SPLASH_POTION));
+                launch = new net.minecraft.world.entity.projectile.ThrownPotion(world, this.getHandle(), new net.minecraft.world.item.ItemStack(Items.SPLASH_POTION));
             }
-            ((EntityProjectile) launch).shootFromRotation(getHandle(), getHandle().getXRot(), getHandle().getYRot(), -20.0F, 0.5F, 1.0F); // ItemSplashPotion
+            ((ThrowableProjectile) launch).shootFromRotation(this.getHandle(), this.getHandle().getXRot(), this.getHandle().getYRot(), -20.0F, 0.5F, 1.0F); // ItemSplashPotion
         } else if (ThrownExpBottle.class.isAssignableFrom(projectile)) {
-            launch = new EntityThrownExpBottle(world, getHandle(), new net.minecraft.world.item.ItemStack(Items.EXPERIENCE_BOTTLE));
-            ((EntityProjectile) launch).shootFromRotation(getHandle(), getHandle().getXRot(), getHandle().getYRot(), -20.0F, 0.7F, 1.0F); // ItemExpBottle
-        } else if (FishHook.class.isAssignableFrom(projectile) && getHandle() instanceof EntityHuman) {
-            launch = new EntityFishingHook((EntityHuman) getHandle(), world, 0, 0);
+            launch = new ThrownExperienceBottle(world, this.getHandle(), new net.minecraft.world.item.ItemStack(Items.EXPERIENCE_BOTTLE));
+            ((ThrowableProjectile) launch).shootFromRotation(this.getHandle(), this.getHandle().getXRot(), this.getHandle().getYRot(), -20.0F, 0.7F, 1.0F); // ItemExpBottle
+        } else if (FishHook.class.isAssignableFrom(projectile) && this.getHandle() instanceof net.minecraft.world.entity.player.Player) {
+            launch = new FishingHook((net.minecraft.world.entity.player.Player) this.getHandle(), world, 0, 0);
         } else if (Fireball.class.isAssignableFrom(projectile)) {
-            Location location = getEyeLocation();
+            Location location = this.getEyeLocation();
             Vector direction = location.getDirection().multiply(10);
-            Vec3D vec = new Vec3D(direction.getX(), direction.getY(), direction.getZ());
+            Vec3 vec = new Vec3(direction.getX(), direction.getY(), direction.getZ());
 
             if (SmallFireball.class.isAssignableFrom(projectile)) {
-                launch = new EntitySmallFireball(world, getHandle(), vec);
+                launch = new net.minecraft.world.entity.projectile.SmallFireball(world, this.getHandle(), vec);
             } else if (WitherSkull.class.isAssignableFrom(projectile)) {
-                launch = new EntityWitherSkull(world, getHandle(), vec);
+                launch = new net.minecraft.world.entity.projectile.WitherSkull(world, this.getHandle(), vec);
             } else if (DragonFireball.class.isAssignableFrom(projectile)) {
-                launch = new EntityDragonFireball(world, getHandle(), vec);
+                launch = new net.minecraft.world.entity.projectile.DragonFireball(world, this.getHandle(), vec);
             } else if (AbstractWindCharge.class.isAssignableFrom(projectile)) {
                 if (BreezeWindCharge.class.isAssignableFrom(projectile)) {
-                    launch = EntityTypes.BREEZE_WIND_CHARGE.create(world, EntitySpawnReason.TRIGGERED);
+                    launch = EntityType.BREEZE_WIND_CHARGE.create(world, EntitySpawnReason.TRIGGERED);
                 } else {
-                    launch = EntityTypes.WIND_CHARGE.create(world, EntitySpawnReason.TRIGGERED);
+                    launch = EntityType.WIND_CHARGE.create(world, EntitySpawnReason.TRIGGERED);
                 }
 
-                ((net.minecraft.world.entity.projectile.windcharge.AbstractWindCharge) launch).setOwner(getHandle());
-                ((net.minecraft.world.entity.projectile.windcharge.AbstractWindCharge) launch).shootFromRotation(getHandle(), getHandle().getXRot(), getHandle().getYRot(), 0.0F, 1.5F, 1.0F); // WindChargeItem
+                ((net.minecraft.world.entity.projectile.windcharge.AbstractWindCharge) launch).setOwner(this.getHandle());
+                ((net.minecraft.world.entity.projectile.windcharge.AbstractWindCharge) launch).shootFromRotation(this.getHandle(), this.getHandle().getXRot(), this.getHandle().getYRot(), 0.0F, 1.5F, 1.0F); // WindChargeItem
             } else {
-                launch = new EntityLargeFireball(world, getHandle(), vec, 1);
+                launch = new LargeFireball(world, this.getHandle(), vec, 1);
             }
 
-            ((EntityFireball) launch).projectileSource = this;
+            ((AbstractHurtingProjectile) launch).projectileSource = this;
             launch.moveTo(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
         } else if (LlamaSpit.class.isAssignableFrom(projectile)) {
-            Location location = getEyeLocation();
+            Location location = this.getEyeLocation();
             Vector direction = location.getDirection();
 
-            launch = EntityTypes.LLAMA_SPIT.create(world, EntitySpawnReason.TRIGGERED);
+            launch = EntityType.LLAMA_SPIT.create(world, EntitySpawnReason.TRIGGERED);
 
-            ((EntityLlamaSpit) launch).setOwner(getHandle());
-            ((EntityLlamaSpit) launch).shoot(direction.getX(), direction.getY(), direction.getZ(), 1.5F, 10.0F); // EntityLlama
+            ((net.minecraft.world.entity.projectile.LlamaSpit) launch).setOwner(this.getHandle());
+            ((net.minecraft.world.entity.projectile.LlamaSpit) launch).shoot(direction.getX(), direction.getY(), direction.getZ(), 1.5F, 10.0F); // EntityLlama
             launch.moveTo(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
         } else if (ShulkerBullet.class.isAssignableFrom(projectile)) {
-            Location location = getEyeLocation();
+            Location location = this.getEyeLocation();
 
-            launch = new EntityShulkerBullet(world, getHandle(), null, null);
+            launch = new net.minecraft.world.entity.projectile.ShulkerBullet(world, this.getHandle(), null, null);
             launch.moveTo(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
         } else if (Firework.class.isAssignableFrom(projectile)) {
-            Location location = getEyeLocation();
+            Location location = this.getEyeLocation();
 
-            launch = new EntityFireworks(world, net.minecraft.world.item.ItemStack.EMPTY, getHandle());
+            launch = new FireworkRocketEntity(world, net.minecraft.world.item.ItemStack.EMPTY, this.getHandle());
             launch.moveTo(location.getX(), location.getY(), location.getZ(), location.getYaw(), location.getPitch());
         }
 
@@ -555,49 +543,49 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
 
     @Override
     public boolean hasLineOfSight(Entity other) {
-        Preconditions.checkState(!getHandle().generation, "Cannot check line of sight during world generation");
+        Preconditions.checkState(!this.getHandle().generation, "Cannot check line of sight during world generation");
 
-        return getHandle().hasLineOfSight(((CraftEntity) other).getHandle());
+        return this.getHandle().hasLineOfSight(((CraftEntity) other).getHandle());
     }
 
     @Override
     public boolean getRemoveWhenFarAway() {
-        return getHandle() instanceof EntityInsentient && !((EntityInsentient) getHandle()).isPersistenceRequired();
+        return this.getHandle() instanceof Mob && !((Mob) this.getHandle()).isPersistenceRequired();
     }
 
     @Override
     public void setRemoveWhenFarAway(boolean remove) {
-        if (getHandle() instanceof EntityInsentient) {
-            ((EntityInsentient) getHandle()).setPersistenceRequired(!remove);
+        if (this.getHandle() instanceof Mob) {
+            ((Mob) this.getHandle()).setPersistenceRequired(!remove);
         }
     }
 
     @Override
     public EntityEquipment getEquipment() {
-        return equipment;
+        return this.equipment;
     }
 
     @Override
     public void setCanPickupItems(boolean pickup) {
-        if (getHandle() instanceof EntityInsentient) {
-            ((EntityInsentient) getHandle()).setCanPickUpLoot(pickup);
+        if (this.getHandle() instanceof Mob) {
+            ((Mob) this.getHandle()).setCanPickUpLoot(pickup);
         } else {
-            getHandle().bukkitPickUpLoot = pickup;
+            this.getHandle().bukkitPickUpLoot = pickup;
         }
     }
 
     @Override
     public boolean getCanPickupItems() {
-        if (getHandle() instanceof EntityInsentient) {
-            return ((EntityInsentient) getHandle()).canPickUpLoot();
+        if (this.getHandle() instanceof Mob) {
+            return ((Mob) this.getHandle()).canPickUpLoot();
         } else {
-            return getHandle().bukkitPickUpLoot;
+            return this.getHandle().bukkitPickUpLoot;
         }
     }
 
     @Override
     public boolean teleport(Location location, PlayerTeleportEvent.TeleportCause cause) {
-        if (getHealth() == 0) {
+        if (this.getHealth() == 0) {
             return false;
         }
 
@@ -606,199 +594,199 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
 
     @Override
     public boolean isLeashed() {
-        if (!(getHandle() instanceof EntityInsentient)) {
+        if (!(this.getHandle() instanceof Mob)) {
             return false;
         }
-        return ((EntityInsentient) getHandle()).getLeashHolder() != null;
+        return ((Mob) this.getHandle()).getLeashHolder() != null;
     }
 
     @Override
     public Entity getLeashHolder() throws IllegalStateException {
-        Preconditions.checkState(isLeashed(), "Entity not leashed");
-        return ((EntityInsentient) getHandle()).getLeashHolder().getBukkitEntity();
+        Preconditions.checkState(this.isLeashed(), "Entity not leashed");
+        return ((Mob) this.getHandle()).getLeashHolder().getBukkitEntity();
     }
 
     private boolean unleash() {
-        if (!isLeashed()) {
+        if (!this.isLeashed()) {
             return false;
         }
-        ((EntityInsentient) getHandle()).removeLeash();
+        ((Mob) this.getHandle()).removeLeash();
         return true;
     }
 
     @Override
     public boolean setLeashHolder(Entity holder) {
-        if (getHandle().generation || (getHandle() instanceof EntityWither) || !(getHandle() instanceof EntityInsentient)) {
+        if (this.getHandle().generation || (this.getHandle() instanceof WitherBoss) || !(this.getHandle() instanceof Mob)) {
             return false;
         }
 
         if (holder == null) {
-            return unleash();
+            return this.unleash();
         }
 
         if (holder.isDead()) {
             return false;
         }
 
-        unleash();
-        ((EntityInsentient) getHandle()).setLeashedTo(((CraftEntity) holder).getHandle(), true);
+        this.unleash();
+        ((Mob) this.getHandle()).setLeashedTo(((CraftEntity) holder).getHandle(), true);
         return true;
     }
 
     @Override
     public boolean isGliding() {
-        return getHandle().getSharedFlag(7);
+        return this.getHandle().getSharedFlag(7);
     }
 
     @Override
     public void setGliding(boolean gliding) {
-        getHandle().setSharedFlag(7, gliding);
+        this.getHandle().setSharedFlag(7, gliding);
     }
 
     @Override
     public boolean isSwimming() {
-        return getHandle().isSwimming();
+        return this.getHandle().isSwimming();
     }
 
     @Override
     public void setSwimming(boolean swimming) {
-        getHandle().setSwimming(swimming);
+        this.getHandle().setSwimming(swimming);
     }
 
     @Override
     public boolean isRiptiding() {
-        return getHandle().isAutoSpinAttack();
+        return this.getHandle().isAutoSpinAttack();
     }
 
     @Override
     public void setRiptiding(boolean riptiding) {
-        getHandle().setLivingEntityFlag(EntityLiving.LIVING_ENTITY_FLAG_SPIN_ATTACK, riptiding);
+        this.getHandle().setLivingEntityFlag(net.minecraft.world.entity.LivingEntity.LIVING_ENTITY_FLAG_SPIN_ATTACK, riptiding);
     }
 
     @Override
     public boolean isSleeping() {
-        return getHandle().isSleeping();
+        return this.getHandle().isSleeping();
     }
 
     @Override
     public boolean isClimbing() {
-        Preconditions.checkState(!getHandle().generation, "Cannot check if climbing during world generation");
+        Preconditions.checkState(!this.getHandle().generation, "Cannot check if climbing during world generation");
 
-        return getHandle().onClimbable();
+        return this.getHandle().onClimbable();
     }
 
     @Override
     public AttributeInstance getAttribute(Attribute attribute) {
-        return getHandle().craftAttributes.getAttribute(attribute);
+        return this.getHandle().craftAttributes.getAttribute(attribute);
     }
 
     @Override
     public void setAI(boolean ai) {
-        if (this.getHandle() instanceof EntityInsentient) {
-            ((EntityInsentient) this.getHandle()).setNoAi(!ai);
+        if (this.getHandle() instanceof Mob) {
+            ((Mob) this.getHandle()).setNoAi(!ai);
         }
     }
 
     @Override
     public boolean hasAI() {
-        return (this.getHandle() instanceof EntityInsentient) ? !((EntityInsentient) this.getHandle()).isNoAi() : false;
+        return (this.getHandle() instanceof Mob) ? !((Mob) this.getHandle()).isNoAi() : false;
     }
 
     @Override
     public void attack(Entity target) {
         Preconditions.checkArgument(target != null, "target == null");
-        Preconditions.checkState(!getHandle().generation, "Cannot attack during world generation");
+        Preconditions.checkState(!this.getHandle().generation, "Cannot attack during world generation");
 
-        if (getHandle() instanceof EntityHuman) {
-            ((EntityHuman) getHandle()).attack(((CraftEntity) target).getHandle());
+        if (this.getHandle() instanceof net.minecraft.world.entity.player.Player) {
+            ((net.minecraft.world.entity.player.Player) this.getHandle()).attack(((CraftEntity) target).getHandle());
         } else {
-            getHandle().doHurtTarget((WorldServer) ((CraftEntity) target).getHandle().level(), ((CraftEntity) target).getHandle());
+            this.getHandle().doHurtTarget((ServerLevel) ((CraftEntity) target).getHandle().level(), ((CraftEntity) target).getHandle());
         }
     }
 
     @Override
     public void swingMainHand() {
-        Preconditions.checkState(!getHandle().generation, "Cannot swing hand during world generation");
+        Preconditions.checkState(!this.getHandle().generation, "Cannot swing hand during world generation");
 
-        getHandle().swing(EnumHand.MAIN_HAND, true);
+        this.getHandle().swing(InteractionHand.MAIN_HAND, true);
     }
 
     @Override
     public void swingOffHand() {
-        Preconditions.checkState(!getHandle().generation, "Cannot swing hand during world generation");
+        Preconditions.checkState(!this.getHandle().generation, "Cannot swing hand during world generation");
 
-        getHandle().swing(EnumHand.OFF_HAND, true);
+        this.getHandle().swing(InteractionHand.OFF_HAND, true);
     }
 
     @Override
     public void playHurtAnimation(float yaw) {
-        if (getHandle().level() instanceof WorldServer world) {
+        if (this.getHandle().level() instanceof ServerLevel world) {
             /*
              * Vanilla degrees state that 0 = left, 90 = front, 180 = right, and 270 = behind.
              * This makes no sense. We'll add 90 to it so that 0 = front, clockwise from there.
              */
             float actualYaw = yaw + 90;
-            ClientboundHurtAnimationPacket packet = new ClientboundHurtAnimationPacket(getEntityId(), actualYaw);
+            ClientboundHurtAnimationPacket packet = new ClientboundHurtAnimationPacket(this.getEntityId(), actualYaw);
 
-            world.getChunkSource().broadcastAndSend(getHandle(), packet);
+            world.getChunkSource().broadcastAndSend(this.getHandle(), packet);
         }
     }
 
     @Override
     public void setCollidable(boolean collidable) {
-        getHandle().collides = collidable;
+        this.getHandle().collides = collidable;
     }
 
     @Override
     public boolean isCollidable() {
-        return getHandle().collides;
+        return this.getHandle().collides;
     }
 
     @Override
     public Set<UUID> getCollidableExemptions() {
-        return getHandle().collidableExemptions;
+        return this.getHandle().collidableExemptions;
     }
 
     @Override
     public <T> T getMemory(MemoryKey<T> memoryKey) {
-        return (T) getHandle().getBrain().getMemory(CraftMemoryKey.bukkitToMinecraft(memoryKey)).map(CraftMemoryMapper::fromNms).orElse(null);
+        return (T) this.getHandle().getBrain().getMemory(CraftMemoryKey.bukkitToMinecraft(memoryKey)).map(CraftMemoryMapper::fromNms).orElse(null);
     }
 
     @Override
     public <T> void setMemory(MemoryKey<T> memoryKey, T t) {
-        getHandle().getBrain().setMemory(CraftMemoryKey.bukkitToMinecraft(memoryKey), CraftMemoryMapper.toNms(t));
+        this.getHandle().getBrain().setMemory(CraftMemoryKey.bukkitToMinecraft(memoryKey), CraftMemoryMapper.toNms(t));
     }
 
     @Override
     public Sound getHurtSound() {
-        SoundEffect sound = getHandle().getHurtSound0(getHandle().damageSources().generic());
+        SoundEvent sound = this.getHandle().getHurtSound0(this.getHandle().damageSources().generic());
         return (sound != null) ? CraftSound.minecraftToBukkit(sound) : null;
     }
 
     @Override
     public Sound getDeathSound() {
-        SoundEffect sound = getHandle().getDeathSound0();
+        SoundEvent sound = this.getHandle().getDeathSound0();
         return (sound != null) ? CraftSound.minecraftToBukkit(sound) : null;
     }
 
     @Override
     public Sound getFallDamageSound(int fallHeight) {
-        return CraftSound.minecraftToBukkit(getHandle().getFallDamageSound0(fallHeight));
+        return CraftSound.minecraftToBukkit(this.getHandle().getFallDamageSound0(fallHeight));
     }
 
     @Override
     public Sound getFallDamageSoundSmall() {
-        return CraftSound.minecraftToBukkit(getHandle().getFallSounds().small());
+        return CraftSound.minecraftToBukkit(this.getHandle().getFallSounds().small());
     }
 
     @Override
     public Sound getFallDamageSoundBig() {
-        return CraftSound.minecraftToBukkit(getHandle().getFallSounds().big());
+        return CraftSound.minecraftToBukkit(this.getHandle().getFallSounds().big());
     }
 
     @Override
     public Sound getDrinkingSound(ItemStack itemStack) {
-        return getEatingSound(itemStack);
+        return this.getEatingSound(itemStack);
     }
 
     @Override
@@ -807,13 +795,13 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
 
         net.minecraft.world.item.ItemStack nms = CraftItemStack.asNMSCopy(itemStack);
         Consumable consumable = nms.get(DataComponents.CONSUMABLE);
-        SoundEffect soundeffect = SoundEffects.GENERIC_DRINK.value();
+        SoundEvent soundeffect = SoundEvents.GENERIC_DRINK.value();
 
         if (consumable != null) {
-            if (getHandle() instanceof Consumable.b consumable_b) {
+            if (this.getHandle() instanceof Consumable.OverrideConsumeSound consumable_b) {
                 soundeffect = consumable_b.getConsumeSound(nms);
             } else {
-                soundeffect = (SoundEffect) consumable.sound().value();
+                soundeffect = (SoundEvent) consumable.sound().value();
             }
         }
 
@@ -822,7 +810,7 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
 
     @Override
     public boolean canBreatheUnderwater() {
-        return getHandle().canBreatheUnderwater();
+        return this.getHandle().canBreatheUnderwater();
     }
 
     @Override
@@ -832,12 +820,12 @@ public class CraftLivingEntity extends CraftEntity implements LivingEntity {
 
     @Override
     public boolean isInvisible() {
-        return getHandle().isInvisible();
+        return this.getHandle().isInvisible();
     }
 
     @Override
     public void setInvisible(boolean invisible) {
-        getHandle().persistentInvisibility = invisible;
-        getHandle().setSharedFlag(5, invisible);
+        this.getHandle().persistentInvisibility = invisible;
+        this.getHandle().setSharedFlag(5, invisible);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java
index 9082667bcd..189b5ac97f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLlama.java
@@ -1,7 +1,6 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.animal.horse.EntityLlama;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.craftbukkit.inventory.CraftInventoryLlama;
 import org.bukkit.entity.Horse;
@@ -11,43 +10,43 @@ import org.bukkit.inventory.LlamaInventory;
 
 public class CraftLlama extends CraftChestedHorse implements Llama {
 
-    public CraftLlama(CraftServer server, EntityLlama entity) {
+    public CraftLlama(CraftServer server, net.minecraft.world.entity.animal.horse.Llama entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityLlama getHandle() {
-        return (EntityLlama) super.getHandle();
+    public net.minecraft.world.entity.animal.horse.Llama getHandle() {
+        return (net.minecraft.world.entity.animal.horse.Llama) super.getHandle();
     }
 
     @Override
     public Color getColor() {
-        return Color.values()[getHandle().getVariant().ordinal()];
+        return Color.values()[this.getHandle().getVariant().ordinal()];
     }
 
     @Override
     public void setColor(Color color) {
         Preconditions.checkArgument(color != null, "color");
 
-        getHandle().setVariant(EntityLlama.Variant.byId(color.ordinal()));
+        this.getHandle().setVariant(net.minecraft.world.entity.animal.horse.Llama.Variant.byId(color.ordinal()));
     }
 
     @Override
     public LlamaInventory getInventory() {
-        return new CraftInventoryLlama(getHandle().inventory, getHandle().getBodyArmorAccess());
+        return new CraftInventoryLlama(this.getHandle().inventory, this.getHandle().getBodyArmorAccess());
     }
 
     @Override
     public int getStrength() {
-       return getHandle().getStrength();
+       return this.getHandle().getStrength();
     }
 
     @Override
     public void setStrength(int strength) {
         Preconditions.checkArgument(1 <= strength && strength <= 5, "strength must be [1,5]");
-        if (strength == getStrength()) return;
-        getHandle().setStrengthPublic(strength);
-        getHandle().createInventory();
+        if (strength == this.getStrength()) return;
+        this.getHandle().setStrengthPublic(strength);
+        this.getHandle().createInventory();
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLlamaSpit.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLlamaSpit.java
index e128c9310c..70cbc6c668 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLlamaSpit.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftLlamaSpit.java
@@ -1,19 +1,18 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.projectile.EntityLlamaSpit;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.LlamaSpit;
 import org.bukkit.projectiles.ProjectileSource;
 
 public class CraftLlamaSpit extends AbstractProjectile implements LlamaSpit {
 
-    public CraftLlamaSpit(CraftServer server, EntityLlamaSpit entity) {
+    public CraftLlamaSpit(CraftServer server, net.minecraft.world.entity.projectile.LlamaSpit entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityLlamaSpit getHandle() {
-        return (EntityLlamaSpit) super.getHandle();
+    public net.minecraft.world.entity.projectile.LlamaSpit getHandle() {
+        return (net.minecraft.world.entity.projectile.LlamaSpit) super.getHandle();
     }
 
     @Override
@@ -23,11 +22,11 @@ public class CraftLlamaSpit extends AbstractProjectile implements LlamaSpit {
 
     @Override
     public ProjectileSource getShooter() {
-        return (getHandle().getOwner() != null) ? (ProjectileSource) getHandle().getOwner().getBukkitEntity() : null;
+        return (this.getHandle().getOwner() != null) ? (ProjectileSource) this.getHandle().getOwner().getBukkitEntity() : null;
     }
 
     @Override
     public void setShooter(ProjectileSource source) {
-        getHandle().setOwner((source != null) ? ((CraftLivingEntity) source).getHandle() : null);
+        this.getHandle().setOwner((source != null) ? ((CraftLivingEntity) source).getHandle() : null);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMagmaCube.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMagmaCube.java
index ac38b7b903..58b638ffd3 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMagmaCube.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMagmaCube.java
@@ -1,18 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntityMagmaCube;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.MagmaCube;
 
 public class CraftMagmaCube extends CraftSlime implements MagmaCube {
 
-    public CraftMagmaCube(CraftServer server, EntityMagmaCube entity) {
+    public CraftMagmaCube(CraftServer server, net.minecraft.world.entity.monster.MagmaCube entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityMagmaCube getHandle() {
-        return (EntityMagmaCube) entity;
+    public net.minecraft.world.entity.monster.MagmaCube getHandle() {
+        return (net.minecraft.world.entity.monster.MagmaCube) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java
index 8b45c0ee5b..c4db7c00c6 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecart.java
@@ -1,9 +1,9 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.server.level.WorldServer;
-import net.minecraft.world.entity.vehicle.EntityMinecartAbstract;
+import net.minecraft.server.level.ServerLevel;
+import net.minecraft.world.entity.vehicle.AbstractMinecart;
 import net.minecraft.world.level.block.Blocks;
-import net.minecraft.world.level.block.state.IBlockData;
+import net.minecraft.world.level.block.state.BlockState;
 import org.bukkit.block.data.BlockData;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.craftbukkit.block.data.CraftBlockData;
@@ -13,71 +13,71 @@ import org.bukkit.material.MaterialData;
 import org.bukkit.util.Vector;
 
 public abstract class CraftMinecart extends CraftVehicle implements Minecart {
-    public CraftMinecart(CraftServer server, EntityMinecartAbstract entity) {
+    public CraftMinecart(CraftServer server, AbstractMinecart entity) {
         super(server, entity);
     }
 
     @Override
     public void setDamage(double damage) {
-        getHandle().setDamage((float) damage);
+        this.getHandle().setDamage((float) damage);
     }
 
     @Override
     public double getDamage() {
-        return getHandle().getDamage();
+        return this.getHandle().getDamage();
     }
 
     @Override
     public double getMaxSpeed() {
-        return getHandle().getBehavior().getMaxSpeed((WorldServer) getHandle().level());
+        return this.getHandle().getBehavior().getMaxSpeed((ServerLevel) this.getHandle().level());
     }
 
     @Override
     public void setMaxSpeed(double speed) {
         if (speed >= 0D) {
-            getHandle().maxSpeed = speed;
+            this.getHandle().maxSpeed = speed;
         }
     }
 
     @Override
     public boolean isSlowWhenEmpty() {
-        return getHandle().slowWhenEmpty;
+        return this.getHandle().slowWhenEmpty;
     }
 
     @Override
     public void setSlowWhenEmpty(boolean slow) {
-        getHandle().slowWhenEmpty = slow;
+        this.getHandle().slowWhenEmpty = slow;
     }
 
     @Override
     public Vector getFlyingVelocityMod() {
-        return getHandle().getFlyingVelocityMod();
+        return this.getHandle().getFlyingVelocityMod();
     }
 
     @Override
     public void setFlyingVelocityMod(Vector flying) {
-        getHandle().setFlyingVelocityMod(flying);
+        this.getHandle().setFlyingVelocityMod(flying);
     }
 
     @Override
     public Vector getDerailedVelocityMod() {
-        return getHandle().getDerailedVelocityMod();
+        return this.getHandle().getDerailedVelocityMod();
     }
 
     @Override
     public void setDerailedVelocityMod(Vector derailed) {
-        getHandle().setDerailedVelocityMod(derailed);
+        this.getHandle().setDerailedVelocityMod(derailed);
     }
 
     @Override
-    public EntityMinecartAbstract getHandle() {
-        return (EntityMinecartAbstract) entity;
+    public AbstractMinecart getHandle() {
+        return (AbstractMinecart) this.entity;
     }
 
     @Override
     public void setDisplayBlock(MaterialData material) {
         if (material != null) {
-            IBlockData block = CraftMagicNumbers.getBlock(material);
+            BlockState block = CraftMagicNumbers.getBlock(material);
             this.getHandle().setDisplayBlockState(block);
         } else {
             // Set block to air (default) and set the flag to not have a display block.
@@ -89,7 +89,7 @@ public abstract class CraftMinecart extends CraftVehicle implements Minecart {
     @Override
     public void setDisplayBlockData(BlockData blockData) {
         if (blockData != null) {
-            IBlockData block = ((CraftBlockData) blockData).getState();
+            BlockState block = ((CraftBlockData) blockData).getState();
             this.getHandle().setDisplayBlockState(block);
         } else {
             // Set block to air (default) and set the flag to not have a display block.
@@ -100,23 +100,23 @@ public abstract class CraftMinecart extends CraftVehicle implements Minecart {
 
     @Override
     public MaterialData getDisplayBlock() {
-        IBlockData blockData = getHandle().getDisplayBlockState();
+        BlockState blockData = this.getHandle().getDisplayBlockState();
         return CraftMagicNumbers.getMaterial(blockData);
     }
 
     @Override
     public BlockData getDisplayBlockData() {
-        IBlockData blockData = getHandle().getDisplayBlockState();
+        BlockState blockData = this.getHandle().getDisplayBlockState();
         return CraftBlockData.fromData(blockData);
     }
 
     @Override
     public void setDisplayBlockOffset(int offset) {
-        getHandle().setDisplayOffset(offset);
+        this.getHandle().setDisplayOffset(offset);
     }
 
     @Override
     public int getDisplayBlockOffset() {
-        return getHandle().getDisplayOffset();
+        return this.getHandle().getDisplayOffset();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java
index 2d2c80cf96..fd42f0b201 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartChest.java
@@ -1,6 +1,6 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.vehicle.EntityMinecartChest;
+import net.minecraft.world.entity.vehicle.MinecartChest;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.craftbukkit.inventory.CraftInventory;
 import org.bukkit.entity.minecart.StorageMinecart;
@@ -10,18 +10,18 @@ import org.bukkit.inventory.Inventory;
 public class CraftMinecartChest extends CraftMinecartContainer implements StorageMinecart {
     private final CraftInventory inventory;
 
-    public CraftMinecartChest(CraftServer server, EntityMinecartChest entity) {
+    public CraftMinecartChest(CraftServer server, MinecartChest entity) {
         super(server, entity);
-        inventory = new CraftInventory(entity);
+        this.inventory = new CraftInventory(entity);
     }
 
     @Override
     public Inventory getInventory() {
-        return inventory;
+        return this.inventory;
     }
 
     @Override
     public String toString() {
-        return "CraftMinecartChest{" + "inventory=" + inventory + '}';
+        return "CraftMinecartChest{" + "inventory=" + this.inventory + '}';
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartCommand.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartCommand.java
index dd9b8f1848..55945b83a5 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartCommand.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartCommand.java
@@ -1,7 +1,7 @@
 package org.bukkit.craftbukkit.entity;
 
 import java.util.Set;
-import net.minecraft.world.entity.vehicle.EntityMinecartCommandBlock;
+import net.minecraft.world.entity.vehicle.MinecartCommandBlock;
 import org.bukkit.Bukkit;
 import org.bukkit.Server;
 import org.bukkit.craftbukkit.CraftServer;
@@ -16,29 +16,29 @@ import org.bukkit.plugin.Plugin;
 public class CraftMinecartCommand extends CraftMinecart implements CommandMinecart {
     private final PermissibleBase perm = new PermissibleBase(this);
 
-    public CraftMinecartCommand(CraftServer server, EntityMinecartCommandBlock entity) {
+    public CraftMinecartCommand(CraftServer server, MinecartCommandBlock entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityMinecartCommandBlock getHandle() {
-        return (EntityMinecartCommandBlock) entity;
+    public MinecartCommandBlock getHandle() {
+        return (MinecartCommandBlock) this.entity;
     }
 
     @Override
     public String getCommand() {
-        return getHandle().getCommandBlock().getCommand();
+        return this.getHandle().getCommandBlock().getCommand();
     }
 
     @Override
     public void setCommand(String command) {
-        getHandle().getCommandBlock().setCommand(command != null ? command : "");
-        getHandle().getEntityData().set(EntityMinecartCommandBlock.DATA_ID_COMMAND_NAME, getHandle().getCommandBlock().getCommand());
+        this.getHandle().getCommandBlock().setCommand(command != null ? command : "");
+        this.getHandle().getEntityData().set(MinecartCommandBlock.DATA_ID_COMMAND_NAME, this.getHandle().getCommandBlock().getCommand());
     }
 
     @Override
     public void setName(String name) {
-        getHandle().getCommandBlock().setCustomName(CraftChatMessage.fromStringOrNull(name));
+        this.getHandle().getCommandBlock().setCustomName(CraftChatMessage.fromStringOrNull(name));
     }
 
     @Override
@@ -56,7 +56,7 @@ public class CraftMinecartCommand extends CraftMinecart implements CommandMineca
 
     @Override
     public String getName() {
-        return CraftChatMessage.fromComponent(getHandle().getCommandBlock().getName());
+        return CraftChatMessage.fromComponent(this.getHandle().getCommandBlock().getName());
     }
 
     @Override
@@ -71,7 +71,7 @@ public class CraftMinecartCommand extends CraftMinecart implements CommandMineca
 
     @Override
     public boolean isPermissionSet(String name) {
-        return perm.isPermissionSet(name);
+        return this.perm.isPermissionSet(name);
     }
 
     @Override
@@ -81,7 +81,7 @@ public class CraftMinecartCommand extends CraftMinecart implements CommandMineca
 
     @Override
     public boolean hasPermission(String name) {
-        return perm.hasPermission(name);
+        return this.perm.hasPermission(name);
     }
 
     @Override
@@ -91,37 +91,37 @@ public class CraftMinecartCommand extends CraftMinecart implements CommandMineca
 
     @Override
     public PermissionAttachment addAttachment(Plugin plugin, String name, boolean value) {
-        return perm.addAttachment(plugin, name, value);
+        return this.perm.addAttachment(plugin, name, value);
     }
 
     @Override
     public PermissionAttachment addAttachment(Plugin plugin) {
-        return perm.addAttachment(plugin);
+        return this.perm.addAttachment(plugin);
     }
 
     @Override
     public PermissionAttachment addAttachment(Plugin plugin, String name, boolean value, int ticks) {
-        return perm.addAttachment(plugin, name, value, ticks);
+        return this.perm.addAttachment(plugin, name, value, ticks);
     }
 
     @Override
     public PermissionAttachment addAttachment(Plugin plugin, int ticks) {
-        return perm.addAttachment(plugin, ticks);
+        return this.perm.addAttachment(plugin, ticks);
     }
 
     @Override
     public void removeAttachment(PermissionAttachment attachment) {
-        perm.removeAttachment(attachment);
+        this.perm.removeAttachment(attachment);
     }
 
     @Override
     public void recalculatePermissions() {
-        perm.recalculatePermissions();
+        this.perm.recalculatePermissions();
     }
 
     @Override
     public Set<PermissionAttachmentInfo> getEffectivePermissions() {
-        return perm.getEffectivePermissions();
+        return this.perm.getEffectivePermissions();
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java
index 420341cadc..4388cd0303 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartContainer.java
@@ -1,7 +1,7 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.vehicle.EntityMinecartAbstract;
-import net.minecraft.world.entity.vehicle.EntityMinecartContainer;
+import net.minecraft.world.entity.vehicle.AbstractMinecart;
+import net.minecraft.world.entity.vehicle.AbstractMinecartContainer;
 import org.bukkit.craftbukkit.CraftLootTable;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.loot.LootTable;
@@ -9,36 +9,36 @@ import org.bukkit.loot.Lootable;
 
 public abstract class CraftMinecartContainer extends CraftMinecart implements Lootable {
 
-    public CraftMinecartContainer(CraftServer server, EntityMinecartAbstract entity) {
+    public CraftMinecartContainer(CraftServer server, AbstractMinecart entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityMinecartContainer getHandle() {
-        return (EntityMinecartContainer) entity;
+    public AbstractMinecartContainer getHandle() {
+        return (AbstractMinecartContainer) this.entity;
     }
 
     @Override
     public void setLootTable(LootTable table) {
-        setLootTable(table, getSeed());
+        this.setLootTable(table, this.getSeed());
     }
 
     @Override
     public LootTable getLootTable() {
-        return CraftLootTable.minecraftToBukkit(getHandle().lootTable);
+        return CraftLootTable.minecraftToBukkit(this.getHandle().lootTable);
     }
 
     @Override
     public void setSeed(long seed) {
-        setLootTable(getLootTable(), seed);
+        this.setLootTable(this.getLootTable(), seed);
     }
 
     @Override
     public long getSeed() {
-        return getHandle().lootTableSeed;
+        return this.getHandle().lootTableSeed;
     }
 
-    private void setLootTable(LootTable table, long seed) {
-        getHandle().setLootTable(CraftLootTable.bukkitToMinecraft(table), seed);
+    public void setLootTable(LootTable table, long seed) {
+        this.getHandle().setLootTable(CraftLootTable.bukkitToMinecraft(table), seed);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartFurnace.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartFurnace.java
index a810eb05e5..53042b75b4 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartFurnace.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartFurnace.java
@@ -1,30 +1,30 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.vehicle.EntityMinecartFurnace;
+import net.minecraft.world.entity.vehicle.MinecartFurnace;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.minecart.PoweredMinecart;
 
 @SuppressWarnings("deprecation")
 public class CraftMinecartFurnace extends CraftMinecart implements PoweredMinecart {
-    public CraftMinecartFurnace(CraftServer server, EntityMinecartFurnace entity) {
+    public CraftMinecartFurnace(CraftServer server, MinecartFurnace entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityMinecartFurnace getHandle() {
-        return (EntityMinecartFurnace) entity;
+    public MinecartFurnace getHandle() {
+        return (MinecartFurnace) this.entity;
     }
 
     @Override
     public int getFuel() {
-        return getHandle().fuel;
+        return this.getHandle().fuel;
     }
 
     @Override
     public void setFuel(int fuel) {
         Preconditions.checkArgument(fuel >= 0, "ticks cannot be negative");
-        getHandle().fuel = fuel;
+        this.getHandle().fuel = fuel;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java
index 3bceeac62e..39427b4f28 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartHopper.java
@@ -1,6 +1,6 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.vehicle.EntityMinecartHopper;
+import net.minecraft.world.entity.vehicle.MinecartHopper;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.craftbukkit.inventory.CraftInventory;
 import org.bukkit.entity.minecart.HopperMinecart;
@@ -9,28 +9,28 @@ import org.bukkit.inventory.Inventory;
 public final class CraftMinecartHopper extends CraftMinecartContainer implements HopperMinecart {
     private final CraftInventory inventory;
 
-    public CraftMinecartHopper(CraftServer server, EntityMinecartHopper entity) {
+    public CraftMinecartHopper(CraftServer server, MinecartHopper entity) {
         super(server, entity);
-        inventory = new CraftInventory(entity);
+        this.inventory = new CraftInventory(entity);
     }
 
     @Override
     public String toString() {
-        return "CraftMinecartHopper{" + "inventory=" + inventory + '}';
+        return "CraftMinecartHopper{" + "inventory=" + this.inventory + '}';
     }
 
     @Override
     public Inventory getInventory() {
-        return inventory;
+        return this.inventory;
     }
 
     @Override
     public boolean isEnabled() {
-        return ((EntityMinecartHopper) getHandle()).isEnabled();
+        return ((MinecartHopper) this.getHandle()).isEnabled();
     }
 
     @Override
     public void setEnabled(boolean enabled) {
-        ((EntityMinecartHopper) getHandle()).setEnabled(enabled);
+        ((MinecartHopper) this.getHandle()).setEnabled(enabled);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartMobSpawner.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartMobSpawner.java
index 546472fda4..72e34dbfad 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartMobSpawner.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartMobSpawner.java
@@ -6,9 +6,8 @@ import java.util.List;
 import java.util.Optional;
 import net.minecraft.util.RandomSource;
 import net.minecraft.util.random.SimpleWeightedRandomList;
-import net.minecraft.world.entity.EntityTypes;
-import net.minecraft.world.entity.vehicle.EntityMinecartMobSpawner;
-import net.minecraft.world.level.MobSpawnerData;
+import net.minecraft.world.entity.vehicle.MinecartSpawner;
+import net.minecraft.world.level.SpawnData;
 import org.bukkit.block.spawner.SpawnRule;
 import org.bukkit.block.spawner.SpawnerEntry;
 import org.bukkit.craftbukkit.CraftServer;
@@ -18,37 +17,37 @@ import org.bukkit.entity.EntityType;
 import org.bukkit.entity.minecart.SpawnerMinecart;
 
 final class CraftMinecartMobSpawner extends CraftMinecart implements SpawnerMinecart {
-    CraftMinecartMobSpawner(CraftServer server, EntityMinecartMobSpawner entity) {
+    CraftMinecartMobSpawner(CraftServer server, MinecartSpawner entity) {
         super(server, entity);
     }
 
     @Override
     public EntityType getSpawnedType() {
-        MobSpawnerData spawnData = getHandle().getSpawner().nextSpawnData;
+        SpawnData spawnData = this.getHandle().getSpawner().nextSpawnData;
         if (spawnData == null) {
             return null;
         }
 
-        Optional<EntityTypes<?>> type = EntityTypes.by(spawnData.getEntityToSpawn());
+        Optional<net.minecraft.world.entity.EntityType<?>> type = net.minecraft.world.entity.EntityType.by(spawnData.getEntityToSpawn());
         return type.map(CraftEntityType::minecraftToBukkit).orElse(null);
     }
 
     @Override
     public void setSpawnedType(EntityType entityType) {
         if (entityType == null) {
-            getHandle().getSpawner().spawnPotentials = SimpleWeightedRandomList.empty(); // need clear the spawnPotentials to avoid nextSpawnData being replaced later
-            getHandle().getSpawner().nextSpawnData = new MobSpawnerData();
+            this.getHandle().getSpawner().spawnPotentials = SimpleWeightedRandomList.empty(); // need clear the spawnPotentials to avoid nextSpawnData being replaced later
+            this.getHandle().getSpawner().nextSpawnData = new SpawnData();
             return;
         }
         Preconditions.checkArgument(entityType != EntityType.UNKNOWN, "Can't spawn EntityType %s from mob spawners!", entityType);
 
-        RandomSource rand = getHandle().level().getRandom();
-        getHandle().getSpawner().setEntityId(CraftEntityType.bukkitToMinecraft(entityType), getHandle().level(), rand, getHandle().blockPosition());
+        RandomSource rand = this.getHandle().level().getRandom();
+        this.getHandle().getSpawner().setEntityId(CraftEntityType.bukkitToMinecraft(entityType), this.getHandle().level(), rand, this.getHandle().blockPosition());
     }
 
     @Override
     public EntitySnapshot getSpawnedEntity() {
-        MobSpawnerData spawnData = getHandle().getSpawner().nextSpawnData;
+        SpawnData spawnData = this.getHandle().getSpawner().nextSpawnData;
         if (spawnData == null) {
             return null;
         }
@@ -58,114 +57,114 @@ final class CraftMinecartMobSpawner extends CraftMinecart implements SpawnerMine
 
     @Override
     public void setSpawnedEntity(EntitySnapshot snapshot) {
-        CraftCreatureSpawner.setSpawnedEntity(getHandle().getSpawner(), snapshot, null, null);
+        CraftCreatureSpawner.setSpawnedEntity(this.getHandle().getSpawner(), snapshot, null, null);
     }
 
     @Override
     public void setSpawnedEntity(SpawnerEntry spawnerEntry) {
         Preconditions.checkArgument(spawnerEntry != null, "Entry cannot be null");
 
-        CraftCreatureSpawner.setSpawnedEntity(getHandle().getSpawner(), spawnerEntry.getSnapshot(), spawnerEntry.getSpawnRule(), spawnerEntry.getEquipment());
+        CraftCreatureSpawner.setSpawnedEntity(this.getHandle().getSpawner(), spawnerEntry.getSnapshot(), spawnerEntry.getSpawnRule(), spawnerEntry.getEquipment());
     }
 
     @Override
     public void addPotentialSpawn(EntitySnapshot snapshot, int weight, SpawnRule spawnRule) {
-        CraftCreatureSpawner.addPotentialSpawn(getHandle().getSpawner(), snapshot, weight, spawnRule, null);
+        CraftCreatureSpawner.addPotentialSpawn(this.getHandle().getSpawner(), snapshot, weight, spawnRule, null);
     }
 
     @Override
     public void addPotentialSpawn(SpawnerEntry spawnerEntry) {
         Preconditions.checkArgument(spawnerEntry != null, "Entry cannot be null");
 
-        CraftCreatureSpawner.addPotentialSpawn(getHandle().getSpawner(), spawnerEntry.getSnapshot(), spawnerEntry.getSpawnWeight(), spawnerEntry.getSpawnRule(), spawnerEntry.getEquipment());
+        CraftCreatureSpawner.addPotentialSpawn(this.getHandle().getSpawner(), spawnerEntry.getSnapshot(), spawnerEntry.getSpawnWeight(), spawnerEntry.getSpawnRule(), spawnerEntry.getEquipment());
     }
 
     @Override
     public void setPotentialSpawns(Collection<SpawnerEntry> entries) {
-        CraftCreatureSpawner.setPotentialSpawns(getHandle().getSpawner(), entries);
+        CraftCreatureSpawner.setPotentialSpawns(this.getHandle().getSpawner(), entries);
     }
 
     @Override
     public List<SpawnerEntry> getPotentialSpawns() {
-        return CraftCreatureSpawner.getPotentialSpawns(getHandle().getSpawner());
+        return CraftCreatureSpawner.getPotentialSpawns(this.getHandle().getSpawner());
     }
 
     @Override
     public int getDelay() {
-        return getHandle().getSpawner().spawnDelay;
+        return this.getHandle().getSpawner().spawnDelay;
     }
 
     @Override
     public void setDelay(int delay) {
-        getHandle().getSpawner().spawnDelay = delay;
+        this.getHandle().getSpawner().spawnDelay = delay;
     }
 
     @Override
     public int getMinSpawnDelay() {
-        return getHandle().getSpawner().minSpawnDelay;
+        return this.getHandle().getSpawner().minSpawnDelay;
     }
 
     @Override
     public void setMinSpawnDelay(int spawnDelay) {
-        Preconditions.checkArgument(spawnDelay <= getMaxSpawnDelay(), "Minimum Spawn Delay must be less than or equal to Maximum Spawn Delay");
-        getHandle().getSpawner().minSpawnDelay = spawnDelay;
+        Preconditions.checkArgument(spawnDelay <= this.getMaxSpawnDelay(), "Minimum Spawn Delay must be less than or equal to Maximum Spawn Delay");
+        this.getHandle().getSpawner().minSpawnDelay = spawnDelay;
     }
 
     @Override
     public int getMaxSpawnDelay() {
-        return getHandle().getSpawner().maxSpawnDelay;
+        return this.getHandle().getSpawner().maxSpawnDelay;
     }
 
     @Override
     public void setMaxSpawnDelay(int spawnDelay) {
         Preconditions.checkArgument(spawnDelay > 0, "Maximum Spawn Delay must be greater than 0.");
-        Preconditions.checkArgument(spawnDelay >= getMinSpawnDelay(), "Maximum Spawn Delay must be greater than or equal to Minimum Spawn Delay");
-        getHandle().getSpawner().maxSpawnDelay = spawnDelay;
+        Preconditions.checkArgument(spawnDelay >= this.getMinSpawnDelay(), "Maximum Spawn Delay must be greater than or equal to Minimum Spawn Delay");
+        this.getHandle().getSpawner().maxSpawnDelay = spawnDelay;
     }
 
     @Override
     public int getMaxNearbyEntities() {
-        return getHandle().getSpawner().maxNearbyEntities;
+        return this.getHandle().getSpawner().maxNearbyEntities;
     }
 
     @Override
     public void setMaxNearbyEntities(int maxNearbyEntities) {
-        getHandle().getSpawner().maxNearbyEntities = maxNearbyEntities;
+        this.getHandle().getSpawner().maxNearbyEntities = maxNearbyEntities;
     }
 
     @Override
     public int getSpawnCount() {
-        return getHandle().getSpawner().spawnCount;
+        return this.getHandle().getSpawner().spawnCount;
     }
 
     @Override
     public void setSpawnCount(int count) {
-        getHandle().getSpawner().spawnCount = count;
+        this.getHandle().getSpawner().spawnCount = count;
     }
 
     @Override
     public int getRequiredPlayerRange() {
-        return getHandle().getSpawner().requiredPlayerRange;
+        return this.getHandle().getSpawner().requiredPlayerRange;
     }
 
     @Override
     public void setRequiredPlayerRange(int requiredPlayerRange) {
-        getHandle().getSpawner().requiredPlayerRange = requiredPlayerRange;
+        this.getHandle().getSpawner().requiredPlayerRange = requiredPlayerRange;
     }
 
     @Override
     public int getSpawnRange() {
-        return getHandle().getSpawner().spawnRange;
+        return this.getHandle().getSpawner().spawnRange;
     }
 
     @Override
     public void setSpawnRange(int spawnRange) {
-        getHandle().getSpawner().spawnRange = spawnRange;
+        this.getHandle().getSpawner().spawnRange = spawnRange;
     }
 
     @Override
-    public EntityMinecartMobSpawner getHandle() {
-        return (EntityMinecartMobSpawner) entity;
+    public MinecartSpawner getHandle() {
+        return (MinecartSpawner) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartRideable.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartRideable.java
index b618113475..2f8c3f907e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartRideable.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartRideable.java
@@ -1,11 +1,11 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.vehicle.EntityMinecartAbstract;
+import net.minecraft.world.entity.vehicle.AbstractMinecart;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.minecart.RideableMinecart;
 
 public class CraftMinecartRideable extends CraftMinecart implements RideableMinecart {
-    public CraftMinecartRideable(CraftServer server, EntityMinecartAbstract entity) {
+    public CraftMinecartRideable(CraftServer server, AbstractMinecart entity) {
         super(server, entity);
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java
index 31da5d03ed..15184e7fc3 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMinecartTNT.java
@@ -1,80 +1,80 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.vehicle.EntityMinecartTNT;
+import net.minecraft.world.entity.vehicle.MinecartTNT;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.minecart.ExplosiveMinecart;
 
 public final class CraftMinecartTNT extends CraftMinecart implements ExplosiveMinecart {
-    CraftMinecartTNT(CraftServer server, EntityMinecartTNT entity) {
+    CraftMinecartTNT(CraftServer server, MinecartTNT entity) {
         super(server, entity);
     }
 
     @Override
     public float getYield() {
-        return getHandle().explosionPowerBase;
+        return this.getHandle().explosionPowerBase;
     }
 
     @Override
     public boolean isIncendiary() {
-        return getHandle().isIncendiary;
+        return this.getHandle().isIncendiary;
     }
 
     @Override
     public void setIsIncendiary(boolean isIncendiary) {
-        getHandle().isIncendiary = isIncendiary;
+        this.getHandle().isIncendiary = isIncendiary;
     }
 
     @Override
     public void setYield(float yield) {
-        getHandle().explosionPowerBase = yield;
+        this.getHandle().explosionPowerBase = yield;
     }
 
     @Override
     public float getExplosionSpeedFactor() {
-        return getHandle().explosionSpeedFactor;
+        return this.getHandle().explosionSpeedFactor;
     }
 
     @Override
     public void setExplosionSpeedFactor(float factor) {
-        getHandle().explosionSpeedFactor = factor;
+        this.getHandle().explosionSpeedFactor = factor;
     }
 
     @Override
     public void setFuseTicks(int ticks) {
-        getHandle().fuse = ticks;
+        this.getHandle().fuse = ticks;
     }
 
     @Override
     public int getFuseTicks() {
-        return getHandle().getFuse();
+        return this.getHandle().getFuse();
     }
 
     @Override
     public void ignite() {
-        getHandle().primeFuse();
+        this.getHandle().primeFuse();
     }
 
     @Override
     public boolean isIgnited() {
-        return getHandle().isPrimed();
+        return this.getHandle().isPrimed();
     }
 
     @Override
     public void explode() {
-        getHandle().explode(getHandle().getDeltaMovement().horizontalDistanceSqr());
+        this.getHandle().explode(this.getHandle().getDeltaMovement().horizontalDistanceSqr());
     }
 
     @Override
     public void explode(double power) {
         Preconditions.checkArgument(0 <= power && power <= 5, "Power must be in range [0, 5] (got %s)", power);
 
-        getHandle().explode(power);
+        this.getHandle().explode(power);
     }
 
     @Override
-    public EntityMinecartTNT getHandle() {
-        return (EntityMinecartTNT) super.getHandle();
+    public MinecartTNT getHandle() {
+        return (MinecartTNT) super.getHandle();
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
index 4a52c56f07..31f7b19b89 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMob.java
@@ -2,8 +2,7 @@ package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
 import java.util.Optional;
-import net.minecraft.sounds.SoundEffect;
-import net.minecraft.world.entity.EntityInsentient;
+import net.minecraft.sounds.SoundEvent;
 import org.bukkit.Sound;
 import org.bukkit.craftbukkit.CraftLootTable;
 import org.bukkit.craftbukkit.CraftServer;
@@ -13,15 +12,15 @@ import org.bukkit.entity.Mob;
 import org.bukkit.loot.LootTable;
 
 public abstract class CraftMob extends CraftLivingEntity implements Mob {
-    public CraftMob(CraftServer server, EntityInsentient entity) {
+    public CraftMob(CraftServer server, net.minecraft.world.entity.Mob entity) {
         super(server, entity);
     }
 
     @Override
     public void setTarget(LivingEntity target) {
-        Preconditions.checkState(!getHandle().generation, "Cannot set target during world generation");
+        Preconditions.checkState(!this.getHandle().generation, "Cannot set target during world generation");
 
-        EntityInsentient entity = getHandle();
+        net.minecraft.world.entity.Mob entity = this.getHandle();
         if (target == null) {
             entity.setTarget(null, null, false);
         } else if (target instanceof CraftLivingEntity) {
@@ -31,30 +30,30 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {
 
     @Override
     public CraftLivingEntity getTarget() {
-        if (getHandle().getTarget() == null) return null;
+        if (this.getHandle().getTarget() == null) return null;
 
-        return (CraftLivingEntity) getHandle().getTarget().getBukkitEntity();
+        return (CraftLivingEntity) this.getHandle().getTarget().getBukkitEntity();
     }
 
     @Override
     public void setAware(boolean aware) {
-        getHandle().aware = aware;
+        this.getHandle().aware = aware;
     }
 
     @Override
     public boolean isAware() {
-        return getHandle().aware;
+        return this.getHandle().aware;
     }
 
     @Override
     public Sound getAmbientSound() {
-        SoundEffect sound = getHandle().getAmbientSound0();
+        SoundEvent sound = this.getHandle().getAmbientSound0();
         return (sound != null) ? CraftSound.minecraftToBukkit(sound) : null;
     }
 
     @Override
-    public EntityInsentient getHandle() {
-        return (EntityInsentient) entity;
+    public net.minecraft.world.entity.Mob getHandle() {
+        return (net.minecraft.world.entity.Mob) this.entity;
     }
 
     @Override
@@ -64,21 +63,21 @@ public abstract class CraftMob extends CraftLivingEntity implements Mob {
 
     @Override
     public void setLootTable(LootTable table) {
-        getHandle().lootTable = Optional.ofNullable(CraftLootTable.bukkitToMinecraft(table));
+        this.getHandle().lootTable = Optional.ofNullable(CraftLootTable.bukkitToMinecraft(table));
     }
 
     @Override
     public LootTable getLootTable() {
-        return CraftLootTable.minecraftToBukkit(getHandle().getLootTable().orElse(null));
+        return CraftLootTable.minecraftToBukkit(this.getHandle().getLootTable().orElse(null));
     }
 
     @Override
     public void setSeed(long seed) {
-        getHandle().lootTableSeed = seed;
+        this.getHandle().lootTableSeed = seed;
     }
 
     @Override
     public long getSeed() {
-        return getHandle().lootTableSeed;
+        return this.getHandle().lootTableSeed;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMonster.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMonster.java
index dd3ef68954..706c74c832 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMonster.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMonster.java
@@ -1,18 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntityMonster;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Monster;
 
 public class CraftMonster extends CraftCreature implements Monster, CraftEnemy {
 
-    public CraftMonster(CraftServer server, EntityMonster entity) {
+    public CraftMonster(CraftServer server, net.minecraft.world.entity.monster.Monster entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityMonster getHandle() {
-        return (EntityMonster) entity;
+    public net.minecraft.world.entity.monster.Monster getHandle() {
+        return (net.minecraft.world.entity.monster.Monster) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMule.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMule.java
index 18cfc80f6b..97820a5da3 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMule.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMule.java
@@ -1,13 +1,12 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.animal.horse.EntityHorseMule;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Horse.Variant;
 import org.bukkit.entity.Mule;
 
 public class CraftMule extends CraftChestedHorse implements Mule {
 
-    public CraftMule(CraftServer server, EntityHorseMule entity) {
+    public CraftMule(CraftServer server, net.minecraft.world.entity.animal.horse.Mule entity) {
         super(server, entity);
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java
index 2dff422897..901b751c85 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftMushroomCow.java
@@ -5,8 +5,7 @@ import com.google.common.collect.ImmutableList;
 import java.util.List;
 import net.minecraft.core.Holder;
 import net.minecraft.world.effect.MobEffect;
-import net.minecraft.world.effect.MobEffectList;
-import net.minecraft.world.entity.animal.EntityMushroomCow;
+import net.minecraft.world.effect.MobEffectInstance;
 import net.minecraft.world.item.component.SuspiciousStewEffects;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.craftbukkit.potion.CraftPotionEffectType;
@@ -16,7 +15,7 @@ import org.bukkit.potion.PotionEffect;
 import org.bukkit.potion.PotionEffectType;
 
 public class CraftMushroomCow extends CraftCow implements MushroomCow {
-    public CraftMushroomCow(CraftServer server, EntityMushroomCow entity) {
+    public CraftMushroomCow(CraftServer server, net.minecraft.world.entity.animal.MushroomCow entity) {
         super(server, entity);
     }
 
@@ -38,7 +37,7 @@ public class CraftMushroomCow extends CraftCow implements MushroomCow {
     @Override
     public boolean addEffectToNextStew(PotionEffect potionEffect, boolean overwrite) {
         Preconditions.checkArgument(potionEffect != null, "PotionEffect cannot be null");
-        MobEffect minecraftPotionEffect = CraftPotionUtil.fromBukkit(potionEffect);
+        MobEffectInstance minecraftPotionEffect = CraftPotionUtil.fromBukkit(potionEffect);
         if (!overwrite && this.hasEffectForNextStew(potionEffect.getType())) {
             return false;
         }
@@ -46,16 +45,16 @@ public class CraftMushroomCow extends CraftCow implements MushroomCow {
         if (stewEffects == null) {
             stewEffects = SuspiciousStewEffects.EMPTY;
         }
-        SuspiciousStewEffects.a recordSuspiciousEffect = new SuspiciousStewEffects.a(minecraftPotionEffect.getEffect(), minecraftPotionEffect.getDuration());
+        SuspiciousStewEffects.Entry recordSuspiciousEffect = new SuspiciousStewEffects.Entry(minecraftPotionEffect.getEffect(), minecraftPotionEffect.getDuration());
         this.removeEffectFromNextStew(potionEffect.getType()); // Avoid duplicates of effects
-        getHandle().stewEffects = stewEffects.withEffectAdded(recordSuspiciousEffect);
+        this.getHandle().stewEffects = stewEffects.withEffectAdded(recordSuspiciousEffect);
         return true;
     }
 
     @Override
     public boolean removeEffectFromNextStew(PotionEffectType potionEffectType) {
         Preconditions.checkArgument(potionEffectType != null, "potionEffectType cannot be null");
-        if (!hasEffectForNextStew(potionEffectType)) {
+        if (!this.hasEffectForNextStew(potionEffectType)) {
             return false;
         }
 
@@ -64,8 +63,8 @@ public class CraftMushroomCow extends CraftCow implements MushroomCow {
             return false;
         }
 
-        Holder<MobEffectList> minecraftPotionEffectType = CraftPotionEffectType.bukkitToMinecraftHolder(potionEffectType);
-        getHandle().stewEffects = new SuspiciousStewEffects(stewEffects.effects().stream().filter((effect) -> !effect.effect().equals(minecraftPotionEffectType)).toList());
+        Holder<MobEffect> minecraftPotionEffectType = CraftPotionEffectType.bukkitToMinecraftHolder(potionEffectType);
+        this.getHandle().stewEffects = new SuspiciousStewEffects(stewEffects.effects().stream().filter((effect) -> !effect.effect().equals(minecraftPotionEffectType)).toList());
         return true;
     }
 
@@ -76,7 +75,7 @@ public class CraftMushroomCow extends CraftCow implements MushroomCow {
         if (stewEffects == null) {
             return false;
         }
-        Holder<MobEffectList> minecraftPotionEffectType = CraftPotionEffectType.bukkitToMinecraftHolder(potionEffectType);
+        Holder<MobEffect> minecraftPotionEffectType = CraftPotionEffectType.bukkitToMinecraftHolder(potionEffectType);
         return stewEffects.effects().stream().anyMatch(recordSuspiciousEffect -> recordSuspiciousEffect.effect().equals(minecraftPotionEffectType));
     }
 
@@ -86,20 +85,20 @@ public class CraftMushroomCow extends CraftCow implements MushroomCow {
     }
 
     @Override
-    public EntityMushroomCow getHandle() {
-        return (EntityMushroomCow) entity;
+    public net.minecraft.world.entity.animal.MushroomCow getHandle() {
+        return (net.minecraft.world.entity.animal.MushroomCow) this.entity;
     }
 
     @Override
     public Variant getVariant() {
-        return Variant.values()[getHandle().getVariant().ordinal()];
+        return Variant.values()[this.getHandle().getVariant().ordinal()];
     }
 
     @Override
     public void setVariant(Variant variant) {
         Preconditions.checkArgument(variant != null, "Variant cannot be null");
 
-        getHandle().setVariant(EntityMushroomCow.Type.values()[variant.ordinal()]);
+        this.getHandle().setVariant(net.minecraft.world.entity.animal.MushroomCow.Variant.values()[variant.ordinal()]);
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftOcelot.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftOcelot.java
index 38807f0edf..5c60a30e80 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftOcelot.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftOcelot.java
@@ -1,28 +1,27 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.animal.EntityOcelot;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Ocelot;
 import org.bukkit.entity.Ocelot.Type;
 
 public class CraftOcelot extends CraftAnimals implements Ocelot {
-    public CraftOcelot(CraftServer server, EntityOcelot ocelot) {
+    public CraftOcelot(CraftServer server, net.minecraft.world.entity.animal.Ocelot ocelot) {
         super(server, ocelot);
     }
 
     @Override
-    public EntityOcelot getHandle() {
-        return (EntityOcelot) entity;
+    public net.minecraft.world.entity.animal.Ocelot getHandle() {
+        return (net.minecraft.world.entity.animal.Ocelot) this.entity;
     }
 
     @Override
     public boolean isTrusting() {
-        return getHandle().isTrusting();
+        return this.getHandle().isTrusting();
     }
 
     @Override
     public void setTrusting(boolean trust) {
-        getHandle().setTrusting(trust);
+        this.getHandle().setTrusting(trust);
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftOminousItemSpawner.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftOminousItemSpawner.java
index 4aa00b24a7..ecdac2cf74 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftOminousItemSpawner.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftOminousItemSpawner.java
@@ -13,7 +13,7 @@ public class CraftOminousItemSpawner extends CraftEntity implements OminousItemS
 
     @Override
     public net.minecraft.world.entity.OminousItemSpawner getHandle() {
-        return (net.minecraft.world.entity.OminousItemSpawner) entity;
+        return (net.minecraft.world.entity.OminousItemSpawner) this.entity;
     }
 
     @Override
@@ -23,21 +23,21 @@ public class CraftOminousItemSpawner extends CraftEntity implements OminousItemS
 
     @Override
     public ItemStack getItem() {
-        return CraftItemStack.asBukkitCopy(getHandle().getItem());
+        return CraftItemStack.asBukkitCopy(this.getHandle().getItem());
     }
 
     @Override
     public void setItem(ItemStack item) {
-        getHandle().setItem(CraftItemStack.asNMSCopy(item));
+        this.getHandle().setItem(CraftItemStack.asNMSCopy(item));
     }
 
     @Override
     public long getSpawnItemAfterTicks() {
-        return getHandle().spawnItemAfterTicks;
+        return this.getHandle().spawnItemAfterTicks;
     }
 
     @Override
     public void setSpawnItemAfterTicks(long ticks) {
-        getHandle().spawnItemAfterTicks = ticks;
+        this.getHandle().spawnItemAfterTicks = ticks;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPainting.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPainting.java
index c8f74b33c7..dd02cec9a8 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPainting.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPainting.java
@@ -1,7 +1,6 @@
 package org.bukkit.craftbukkit.entity;
 
 import net.minecraft.core.Holder;
-import net.minecraft.world.entity.decoration.EntityPainting;
 import net.minecraft.world.entity.decoration.PaintingVariant;
 import org.bukkit.Art;
 import org.bukkit.block.BlockFace;
@@ -11,27 +10,27 @@ import org.bukkit.entity.Painting;
 
 public class CraftPainting extends CraftHanging implements Painting {
 
-    public CraftPainting(CraftServer server, EntityPainting entity) {
+    public CraftPainting(CraftServer server, net.minecraft.world.entity.decoration.Painting entity) {
         super(server, entity);
     }
 
     @Override
     public Art getArt() {
-        return CraftArt.minecraftHolderToBukkit(getHandle().getVariant());
+        return CraftArt.minecraftHolderToBukkit(this.getHandle().getVariant());
     }
 
     @Override
     public boolean setArt(Art art) {
-        return setArt(art, false);
+        return this.setArt(art, false);
     }
 
     @Override
     public boolean setArt(Art art, boolean force) {
-        EntityPainting painting = this.getHandle();
+        net.minecraft.world.entity.decoration.Painting painting = this.getHandle();
         Holder<PaintingVariant> oldArt = painting.getVariant();
         painting.setVariant(CraftArt.bukkitToMinecraftHolder(art));
         painting.setDirection(painting.getDirection());
-        if (!force && !getHandle().generation && !painting.survives()) {
+        if (!force && !this.getHandle().generation && !painting.survives()) {
             // Revert painting since it doesn't fit
             painting.setVariant(oldArt);
             painting.setDirection(painting.getDirection());
@@ -44,7 +43,7 @@ public class CraftPainting extends CraftHanging implements Painting {
     @Override
     public boolean setFacingDirection(BlockFace face, boolean force) {
         if (super.setFacingDirection(face, force)) {
-            update();
+            this.update();
             return true;
         }
 
@@ -52,12 +51,12 @@ public class CraftPainting extends CraftHanging implements Painting {
     }
 
     @Override
-    public EntityPainting getHandle() {
-        return (EntityPainting) entity;
+    public net.minecraft.world.entity.decoration.Painting getHandle() {
+        return (net.minecraft.world.entity.decoration.Painting) this.entity;
     }
 
     @Override
     public String toString() {
-        return "CraftPainting{art=" + getArt() + "}";
+        return "CraftPainting{art=" + this.getArt() + "}";
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java
index 514af4e3d9..5467e4a74b 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPanda.java
@@ -1,20 +1,19 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.animal.EntityPanda;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Panda;
 import org.bukkit.entity.Panda.Gene;
 
 public class CraftPanda extends CraftAnimals implements Panda {
 
-    public CraftPanda(CraftServer server, EntityPanda entity) {
+    public CraftPanda(CraftServer server, net.minecraft.world.entity.animal.Panda entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityPanda getHandle() {
-        return (EntityPanda) super.getHandle();
+    public net.minecraft.world.entity.animal.Panda getHandle() {
+        return (net.minecraft.world.entity.animal.Panda) super.getHandle();
     }
 
     @Override
@@ -24,93 +23,93 @@ public class CraftPanda extends CraftAnimals implements Panda {
 
     @Override
     public Gene getMainGene() {
-        return fromNms(getHandle().getMainGene());
+        return CraftPanda.fromNms(this.getHandle().getMainGene());
     }
 
     @Override
     public void setMainGene(Gene gene) {
-        getHandle().setMainGene(toNms(gene));
+        this.getHandle().setMainGene(CraftPanda.toNms(gene));
     }
 
     @Override
     public Gene getHiddenGene() {
-        return fromNms(getHandle().getHiddenGene());
+        return CraftPanda.fromNms(this.getHandle().getHiddenGene());
     }
 
     @Override
     public void setHiddenGene(Gene gene) {
-        getHandle().setHiddenGene(toNms(gene));
+        this.getHandle().setHiddenGene(CraftPanda.toNms(gene));
     }
 
     @Override
     public boolean isRolling() {
-        return getHandle().isRolling();
+        return this.getHandle().isRolling();
     }
 
     @Override
     public void setRolling(boolean flag) {
-        getHandle().roll(flag);
+        this.getHandle().roll(flag);
     }
 
     @Override
     public boolean isSneezing() {
-        return getHandle().isSneezing();
+        return this.getHandle().isSneezing();
     }
 
     @Override
     public void setSneezing(boolean flag) {
-        getHandle().sneeze(flag);
+        this.getHandle().sneeze(flag);
     }
 
     @Override
     public boolean isSitting() {
-        return getHandle().isSitting();
+        return this.getHandle().isSitting();
     }
 
     @Override
     public void setSitting(boolean flag) {
-        getHandle().sit(flag);
+        this.getHandle().sit(flag);
     }
 
     @Override
     public boolean isOnBack() {
-        return getHandle().isOnBack();
+        return this.getHandle().isOnBack();
     }
 
     @Override
     public void setOnBack(boolean flag) {
-        getHandle().setOnBack(flag);
+        this.getHandle().setOnBack(flag);
     }
 
     @Override
     public boolean isEating() {
-        return getHandle().isEating();
+        return this.getHandle().isEating();
     }
 
     @Override
     public void setEating(boolean flag) {
-        getHandle().eat(flag);
+        this.getHandle().eat(flag);
     }
 
     @Override
     public boolean isScared() {
-        return getHandle().isScared();
+        return this.getHandle().isScared();
     }
 
     @Override
     public int getUnhappyTicks() {
-        return getHandle().getUnhappyCounter();
+        return this.getHandle().getUnhappyCounter();
     }
 
-    public static Gene fromNms(EntityPanda.Gene gene) {
+    public static Gene fromNms(net.minecraft.world.entity.animal.Panda.Gene gene) {
         Preconditions.checkArgument(gene != null, "Gene may not be null");
 
         return Gene.values()[gene.ordinal()];
     }
 
-    public static EntityPanda.Gene toNms(Gene gene) {
+    public static net.minecraft.world.entity.animal.Panda.Gene toNms(Gene gene) {
         Preconditions.checkArgument(gene != null, "Gene may not be null");
 
-        return EntityPanda.Gene.values()[gene.ordinal()];
+        return net.minecraft.world.entity.animal.Panda.Gene.values()[gene.ordinal()];
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftParrot.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftParrot.java
index 16c2afba95..04d6cf6a1f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftParrot.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftParrot.java
@@ -1,32 +1,31 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.animal.EntityParrot;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Parrot;
 import org.bukkit.entity.Parrot.Variant;
 
 public class CraftParrot extends CraftTameableAnimal implements Parrot {
 
-    public CraftParrot(CraftServer server, EntityParrot parrot) {
+    public CraftParrot(CraftServer server, net.minecraft.world.entity.animal.Parrot parrot) {
         super(server, parrot);
     }
 
     @Override
-    public EntityParrot getHandle() {
-        return (EntityParrot) entity;
+    public net.minecraft.world.entity.animal.Parrot getHandle() {
+        return (net.minecraft.world.entity.animal.Parrot) this.entity;
     }
 
     @Override
     public Variant getVariant() {
-        return Variant.values()[getHandle().getVariant().ordinal()];
+        return Variant.values()[this.getHandle().getVariant().ordinal()];
     }
 
     @Override
     public void setVariant(Variant variant) {
         Preconditions.checkArgument(variant != null, "variant");
 
-        getHandle().setVariant(EntityParrot.Variant.byId(variant.ordinal()));
+        this.getHandle().setVariant(net.minecraft.world.entity.animal.Parrot.Variant.byId(variant.ordinal()));
     }
 
     @Override
@@ -36,6 +35,6 @@ public class CraftParrot extends CraftTameableAnimal implements Parrot {
 
     @Override
     public boolean isDancing() {
-        return getHandle().isPartyParrot();
+        return this.getHandle().isPartyParrot();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java
index 877429f154..0359c16144 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPhantom.java
@@ -1,28 +1,27 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntityPhantom;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Phantom;
 
 public class CraftPhantom extends CraftFlying implements Phantom, CraftEnemy {
 
-    public CraftPhantom(CraftServer server, EntityPhantom entity) {
+    public CraftPhantom(CraftServer server, net.minecraft.world.entity.monster.Phantom entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityPhantom getHandle() {
-        return (EntityPhantom) super.getHandle();
+    public net.minecraft.world.entity.monster.Phantom getHandle() {
+        return (net.minecraft.world.entity.monster.Phantom) super.getHandle();
     }
 
     @Override
     public int getSize() {
-        return getHandle().getPhantomSize();
+        return this.getHandle().getPhantomSize();
     }
 
     @Override
     public void setSize(int sz) {
-        getHandle().setPhantomSize(sz);
+        this.getHandle().setPhantomSize(sz);
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java
index e18445804b..8016c810ae 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPig.java
@@ -1,51 +1,50 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.animal.EntityPig;
 import org.bukkit.Material;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Pig;
 
 public class CraftPig extends CraftAnimals implements Pig {
 
-    public CraftPig(CraftServer server, EntityPig entity) {
+    public CraftPig(CraftServer server, net.minecraft.world.entity.animal.Pig entity) {
         super(server, entity);
     }
 
     @Override
     public boolean hasSaddle() {
-        return getHandle().isSaddled();
+        return this.getHandle().isSaddled();
     }
 
     @Override
     public void setSaddle(boolean saddled) {
-        getHandle().steering.setSaddle(saddled);
+        this.getHandle().steering.setSaddle(saddled);
     }
 
     @Override
     public int getBoostTicks() {
-        return getHandle().steering.boosting ? getHandle().steering.boostTimeTotal() : 0;
+        return this.getHandle().steering.boosting ? this.getHandle().steering.boostTimeTotal() : 0;
     }
 
     @Override
     public void setBoostTicks(int ticks) {
         Preconditions.checkArgument(ticks >= 0, "ticks must be >= 0");
 
-        getHandle().steering.setBoostTicks(ticks);
+        this.getHandle().steering.setBoostTicks(ticks);
     }
 
     @Override
     public int getCurrentBoostTicks() {
-        return getHandle().steering.boosting ? getHandle().steering.boostTime : 0;
+        return this.getHandle().steering.boosting ? this.getHandle().steering.boostTime : 0;
     }
 
     @Override
     public void setCurrentBoostTicks(int ticks) {
-        if (!getHandle().steering.boosting) {
+        if (!this.getHandle().steering.boosting) {
             return;
         }
 
-        int max = getHandle().steering.boostTimeTotal();
+        int max = this.getHandle().steering.boostTimeTotal();
         Preconditions.checkArgument(ticks >= 0 && ticks <= max, "boost ticks must not exceed 0 or %d (inclusive)", max);
 
         this.getHandle().steering.boostTime = ticks;
@@ -57,8 +56,8 @@ public class CraftPig extends CraftAnimals implements Pig {
     }
 
     @Override
-    public EntityPig getHandle() {
-        return (EntityPig) entity;
+    public net.minecraft.world.entity.animal.Pig getHandle() {
+        return (net.minecraft.world.entity.animal.Pig) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPigZombie.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPigZombie.java
index fcd97b822c..49beb836d2 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPigZombie.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPigZombie.java
@@ -1,38 +1,38 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntityPigZombie;
+import net.minecraft.world.entity.monster.ZombifiedPiglin;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.PigZombie;
 
 public class CraftPigZombie extends CraftZombie implements PigZombie {
 
-    public CraftPigZombie(CraftServer server, EntityPigZombie entity) {
+    public CraftPigZombie(CraftServer server, ZombifiedPiglin entity) {
         super(server, entity);
     }
 
     @Override
     public int getAnger() {
-        return getHandle().getRemainingPersistentAngerTime();
+        return this.getHandle().getRemainingPersistentAngerTime();
     }
 
     @Override
     public void setAnger(int level) {
-        getHandle().setRemainingPersistentAngerTime(level);
+        this.getHandle().setRemainingPersistentAngerTime(level);
     }
 
     @Override
     public void setAngry(boolean angry) {
-        setAnger(angry ? 400 : 0);
+        this.setAnger(angry ? 400 : 0);
     }
 
     @Override
     public boolean isAngry() {
-        return getAnger() > 0;
+        return this.getAnger() > 0;
     }
 
     @Override
-    public EntityPigZombie getHandle() {
-        return (EntityPigZombie) entity;
+    public ZombifiedPiglin getHandle() {
+        return (ZombifiedPiglin) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglin.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglin.java
index f7d443de8c..9426395c17 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglin.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglin.java
@@ -4,7 +4,6 @@ import com.google.common.base.Preconditions;
 import java.util.Collections;
 import java.util.Set;
 import java.util.stream.Collectors;
-import net.minecraft.world.entity.monster.piglin.EntityPiglin;
 import net.minecraft.world.item.Item;
 import org.bukkit.Material;
 import org.bukkit.craftbukkit.CraftServer;
@@ -15,18 +14,18 @@ import org.bukkit.inventory.Inventory;
 
 public class CraftPiglin extends CraftPiglinAbstract implements Piglin {
 
-    public CraftPiglin(CraftServer server, EntityPiglin entity) {
+    public CraftPiglin(CraftServer server, net.minecraft.world.entity.monster.piglin.Piglin entity) {
         super(server, entity);
     }
 
     @Override
     public boolean isAbleToHunt() {
-        return getHandle().cannotHunt;
+        return this.getHandle().cannotHunt;
     }
 
     @Override
     public void setIsAbleToHunt(boolean flag) {
-        getHandle().cannotHunt = flag;
+        this.getHandle().cannotHunt = flag;
     }
 
     @Override
@@ -34,7 +33,7 @@ public class CraftPiglin extends CraftPiglinAbstract implements Piglin {
         Preconditions.checkArgument(material != null, "material cannot be null");
 
         Item item = CraftItemType.bukkitToMinecraft(material);
-        return getHandle().allowedBarterItems.add(item);
+        return this.getHandle().allowedBarterItems.add(item);
     }
 
     @Override
@@ -42,7 +41,7 @@ public class CraftPiglin extends CraftPiglinAbstract implements Piglin {
         Preconditions.checkArgument(material != null, "material cannot be null");
 
         Item item = CraftItemType.bukkitToMinecraft(material);
-        return getHandle().allowedBarterItems.remove(item);
+        return this.getHandle().allowedBarterItems.remove(item);
     }
 
     @Override
@@ -50,7 +49,7 @@ public class CraftPiglin extends CraftPiglinAbstract implements Piglin {
         Preconditions.checkArgument(material != null, "material cannot be null");
 
         Item item = CraftItemType.bukkitToMinecraft(material);
-        return getHandle().interestItems.add(item);
+        return this.getHandle().interestItems.add(item);
     }
 
     @Override
@@ -58,27 +57,27 @@ public class CraftPiglin extends CraftPiglinAbstract implements Piglin {
         Preconditions.checkArgument(material != null, "material cannot be null");
 
         Item item = CraftItemType.bukkitToMinecraft(material);
-        return getHandle().interestItems.remove(item);
+        return this.getHandle().interestItems.remove(item);
     }
 
     @Override
     public Set<Material> getInterestList() {
-        return Collections.unmodifiableSet(getHandle().interestItems.stream().map(CraftItemType::minecraftToBukkit).collect(Collectors.toSet()));
+        return Collections.unmodifiableSet(this.getHandle().interestItems.stream().map(CraftItemType::minecraftToBukkit).collect(Collectors.toSet()));
     }
 
     @Override
     public Set<Material> getBarterList() {
-        return Collections.unmodifiableSet(getHandle().allowedBarterItems.stream().map(CraftItemType::minecraftToBukkit).collect(Collectors.toSet()));
+        return Collections.unmodifiableSet(this.getHandle().allowedBarterItems.stream().map(CraftItemType::minecraftToBukkit).collect(Collectors.toSet()));
     }
 
     @Override
     public Inventory getInventory() {
-        return new CraftInventory(getHandle().inventory);
+        return new CraftInventory(this.getHandle().inventory);
     }
 
     @Override
-    public EntityPiglin getHandle() {
-        return (EntityPiglin) super.getHandle();
+    public net.minecraft.world.entity.monster.piglin.Piglin getHandle() {
+        return (net.minecraft.world.entity.monster.piglin.Piglin) super.getHandle();
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglinAbstract.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglinAbstract.java
index ca64b9f423..e7957d6051 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglinAbstract.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglinAbstract.java
@@ -1,65 +1,65 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.monster.piglin.EntityPiglinAbstract;
+import net.minecraft.world.entity.monster.piglin.AbstractPiglin;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.PiglinAbstract;
 
 public class CraftPiglinAbstract extends CraftMonster implements PiglinAbstract {
 
-    public CraftPiglinAbstract(CraftServer server, EntityPiglinAbstract entity) {
+    public CraftPiglinAbstract(CraftServer server, AbstractPiglin entity) {
         super(server, entity);
     }
 
     @Override
     public boolean isImmuneToZombification() {
-        return getHandle().isImmuneToZombification();
+        return this.getHandle().isImmuneToZombification();
     }
 
     @Override
     public void setImmuneToZombification(boolean flag) {
-        getHandle().setImmuneToZombification(flag);
+        this.getHandle().setImmuneToZombification(flag);
     }
 
     @Override
     public int getConversionTime() {
-        Preconditions.checkState(isConverting(), "Entity not converting");
-        return getHandle().timeInOverworld;
+        Preconditions.checkState(this.isConverting(), "Entity not converting");
+        return this.getHandle().timeInOverworld;
     }
 
     @Override
     public void setConversionTime(int time) {
         if (time < 0) {
-            getHandle().timeInOverworld = -1;
-            getHandle().setImmuneToZombification(false);
+            this.getHandle().timeInOverworld = -1;
+            this.getHandle().setImmuneToZombification(false);
         } else {
-            getHandle().timeInOverworld = time;
+            this.getHandle().timeInOverworld = time;
         }
     }
 
     @Override
     public boolean isConverting() {
-        return getHandle().isConverting();
+        return this.getHandle().isConverting();
     }
 
     @Override
     public boolean isBaby() {
-        return getHandle().isBaby();
+        return this.getHandle().isBaby();
     }
 
     @Override
     public void setBaby(boolean flag) {
-        getHandle().setBaby(flag);
+        this.getHandle().setBaby(flag);
     }
 
     @Override
     public int getAge() {
-        return getHandle().isBaby() ? -1 : 0;
+        return this.getHandle().isBaby() ? -1 : 0;
     }
 
     @Override
     public void setAge(int i) {
-        getHandle().setBaby(i < 0);
+        this.getHandle().setBaby(i < 0);
     }
 
     @Override
@@ -73,17 +73,17 @@ public class CraftPiglinAbstract extends CraftMonster implements PiglinAbstract
 
     @Override
     public void setBaby() {
-        getHandle().setBaby(true);
+        this.getHandle().setBaby(true);
     }
 
     @Override
     public void setAdult() {
-        getHandle().setBaby(false);
+        this.getHandle().setBaby(false);
     }
 
     @Override
     public boolean isAdult() {
-        return !getHandle().isBaby();
+        return !this.getHandle().isBaby();
     }
 
     @Override
@@ -96,7 +96,7 @@ public class CraftPiglinAbstract extends CraftMonster implements PiglinAbstract
     }
 
     @Override
-    public EntityPiglinAbstract getHandle() {
-        return (EntityPiglinAbstract) super.getHandle();
+    public AbstractPiglin getHandle() {
+        return (AbstractPiglin) super.getHandle();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglinBrute.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglinBrute.java
index db41b1006b..be874dc973 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglinBrute.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPiglinBrute.java
@@ -1,18 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.piglin.EntityPiglinBrute;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.PiglinBrute;
 
 public class CraftPiglinBrute extends CraftPiglinAbstract implements PiglinBrute {
 
-    public CraftPiglinBrute(CraftServer server, EntityPiglinBrute entity) {
+    public CraftPiglinBrute(CraftServer server, net.minecraft.world.entity.monster.piglin.PiglinBrute entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityPiglinBrute getHandle() {
-        return (EntityPiglinBrute) super.getHandle();
+    public net.minecraft.world.entity.monster.piglin.PiglinBrute getHandle() {
+        return (net.minecraft.world.entity.monster.piglin.PiglinBrute) super.getHandle();
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPillager.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPillager.java
index be108be93b..d82cea48d9 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPillager.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPillager.java
@@ -1,6 +1,5 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntityPillager;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.craftbukkit.inventory.CraftInventory;
 import org.bukkit.entity.Pillager;
@@ -8,13 +7,13 @@ import org.bukkit.inventory.Inventory;
 
 public class CraftPillager extends CraftIllager implements Pillager {
 
-    public CraftPillager(CraftServer server, EntityPillager entity) {
+    public CraftPillager(CraftServer server, net.minecraft.world.entity.monster.Pillager entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityPillager getHandle() {
-        return (EntityPillager) super.getHandle();
+    public net.minecraft.world.entity.monster.Pillager getHandle() {
+        return (net.minecraft.world.entity.monster.Pillager) super.getHandle();
     }
 
     @Override
@@ -24,6 +23,6 @@ public class CraftPillager extends CraftIllager implements Pillager {
 
     @Override
     public Inventory getInventory() {
-        return new CraftInventory(getHandle().inventory);
+        return new CraftInventory(this.getHandle().inventory);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
index 92025bae9a..e017e8d1c2 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPlayer.java
@@ -37,12 +37,12 @@ import java.util.logging.Logger;
 import java.util.stream.Collectors;
 import javax.annotation.Nullable;
 import net.minecraft.advancements.AdvancementProgress;
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
 import net.minecraft.core.Holder;
-import net.minecraft.core.SectionPosition;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.network.EnumProtocol;
-import net.minecraft.network.chat.IChatBaseComponent;
+import net.minecraft.core.SectionPos;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.network.ConnectionProtocol;
+import net.minecraft.network.chat.Component;
 import net.minecraft.network.chat.PlayerChatMessage;
 import net.minecraft.network.protocol.Packet;
 import net.minecraft.network.protocol.common.ClientboundCustomPayloadPacket;
@@ -54,64 +54,60 @@ import net.minecraft.network.protocol.common.ClientboundTransferPacket;
 import net.minecraft.network.protocol.common.custom.DiscardedPayload;
 import net.minecraft.network.protocol.cookie.ClientboundCookieRequestPacket;
 import net.minecraft.network.protocol.cookie.ServerboundCookieResponsePacket;
+import net.minecraft.network.protocol.game.ClientboundBlockDestructionPacket;
+import net.minecraft.network.protocol.game.ClientboundBlockEntityDataPacket;
+import net.minecraft.network.protocol.game.ClientboundBlockUpdatePacket;
 import net.minecraft.network.protocol.game.ClientboundClearTitlesPacket;
 import net.minecraft.network.protocol.game.ClientboundCustomChatCompletionsPacket;
+import net.minecraft.network.protocol.game.ClientboundGameEventPacket;
 import net.minecraft.network.protocol.game.ClientboundHurtAnimationPacket;
+import net.minecraft.network.protocol.game.ClientboundLevelEventPacket;
+import net.minecraft.network.protocol.game.ClientboundLevelParticlesPacket;
+import net.minecraft.network.protocol.game.ClientboundMapItemDataPacket;
 import net.minecraft.network.protocol.game.ClientboundPlayerInfoRemovePacket;
 import net.minecraft.network.protocol.game.ClientboundPlayerInfoUpdatePacket;
+import net.minecraft.network.protocol.game.ClientboundRemoveMobEffectPacket;
+import net.minecraft.network.protocol.game.ClientboundSectionBlocksUpdatePacket;
 import net.minecraft.network.protocol.game.ClientboundSetBorderCenterPacket;
 import net.minecraft.network.protocol.game.ClientboundSetBorderLerpSizePacket;
 import net.minecraft.network.protocol.game.ClientboundSetBorderSizePacket;
 import net.minecraft.network.protocol.game.ClientboundSetBorderWarningDelayPacket;
 import net.minecraft.network.protocol.game.ClientboundSetBorderWarningDistancePacket;
+import net.minecraft.network.protocol.game.ClientboundSetDefaultSpawnPositionPacket;
+import net.minecraft.network.protocol.game.ClientboundSetEquipmentPacket;
+import net.minecraft.network.protocol.game.ClientboundSetExperiencePacket;
+import net.minecraft.network.protocol.game.ClientboundSetHealthPacket;
 import net.minecraft.network.protocol.game.ClientboundSetSubtitleTextPacket;
 import net.minecraft.network.protocol.game.ClientboundSetTitleTextPacket;
 import net.minecraft.network.protocol.game.ClientboundSetTitlesAnimationPacket;
-import net.minecraft.network.protocol.game.PacketPlayOutBlockBreakAnimation;
-import net.minecraft.network.protocol.game.PacketPlayOutBlockChange;
-import net.minecraft.network.protocol.game.PacketPlayOutEntityEffect;
-import net.minecraft.network.protocol.game.PacketPlayOutEntityEquipment;
-import net.minecraft.network.protocol.game.PacketPlayOutEntitySound;
-import net.minecraft.network.protocol.game.PacketPlayOutExperience;
-import net.minecraft.network.protocol.game.PacketPlayOutGameStateChange;
-import net.minecraft.network.protocol.game.PacketPlayOutMap;
-import net.minecraft.network.protocol.game.PacketPlayOutMultiBlockChange;
-import net.minecraft.network.protocol.game.PacketPlayOutNamedSoundEffect;
-import net.minecraft.network.protocol.game.PacketPlayOutPlayerListHeaderFooter;
-import net.minecraft.network.protocol.game.PacketPlayOutRemoveEntityEffect;
-import net.minecraft.network.protocol.game.PacketPlayOutSpawnPosition;
-import net.minecraft.network.protocol.game.PacketPlayOutStopSound;
-import net.minecraft.network.protocol.game.PacketPlayOutTileEntityData;
-import net.minecraft.network.protocol.game.PacketPlayOutUpdateAttributes;
-import net.minecraft.network.protocol.game.PacketPlayOutUpdateHealth;
-import net.minecraft.network.protocol.game.PacketPlayOutWorldEvent;
-import net.minecraft.network.protocol.game.PacketPlayOutWorldParticles;
-import net.minecraft.resources.MinecraftKey;
-import net.minecraft.server.AdvancementDataPlayer;
-import net.minecraft.server.level.EntityPlayer;
-import net.minecraft.server.level.PlayerChunkMap;
-import net.minecraft.server.level.WorldServer;
-import net.minecraft.server.network.PlayerConnection;
-import net.minecraft.server.players.WhiteListEntry;
-import net.minecraft.sounds.SoundEffect;
+import net.minecraft.network.protocol.game.ClientboundSoundEntityPacket;
+import net.minecraft.network.protocol.game.ClientboundSoundPacket;
+import net.minecraft.network.protocol.game.ClientboundStopSoundPacket;
+import net.minecraft.network.protocol.game.ClientboundTabListPacket;
+import net.minecraft.network.protocol.game.ClientboundUpdateAttributesPacket;
+import net.minecraft.network.protocol.game.ClientboundUpdateMobEffectPacket;
+import net.minecraft.resources.ResourceLocation;
+import net.minecraft.server.PlayerAdvancements;
+import net.minecraft.server.level.ChunkMap;
+import net.minecraft.server.level.ServerLevel;
+import net.minecraft.server.level.ServerPlayer;
+import net.minecraft.server.network.ServerGamePacketListenerImpl;
+import net.minecraft.server.players.UserWhiteListEntry;
+import net.minecraft.sounds.SoundEvent;
 import net.minecraft.world.entity.Entity;
-import net.minecraft.world.entity.EntityLiving;
-import net.minecraft.world.entity.EnumItemSlot;
-import net.minecraft.world.entity.ai.attributes.AttributeMapBase;
-import net.minecraft.world.entity.ai.attributes.AttributeModifiable;
-import net.minecraft.world.entity.ai.attributes.GenericAttributes;
-import net.minecraft.world.food.FoodMetaData;
-import net.minecraft.world.inventory.Container;
-import net.minecraft.world.item.EnumColor;
-import net.minecraft.world.level.EnumGamemode;
+import net.minecraft.world.entity.ai.attributes.AttributeInstance;
+import net.minecraft.world.entity.ai.attributes.AttributeMap;
+import net.minecraft.world.entity.ai.attributes.Attributes;
+import net.minecraft.world.food.FoodData;
+import net.minecraft.world.inventory.AbstractContainerMenu;
+import net.minecraft.world.level.GameType;
 import net.minecraft.world.level.block.Blocks;
+import net.minecraft.world.level.block.entity.SignBlockEntity;
 import net.minecraft.world.level.block.entity.SignText;
-import net.minecraft.world.level.block.entity.TileEntitySign;
-import net.minecraft.world.level.block.state.IBlockData;
-import net.minecraft.world.level.border.IWorldBorderListener;
-import net.minecraft.world.level.saveddata.maps.MapIcon;
+import net.minecraft.world.level.border.BorderChangeListener;
+import net.minecraft.world.level.saveddata.maps.MapDecoration;
 import net.minecraft.world.level.saveddata.maps.MapId;
-import net.minecraft.world.level.saveddata.maps.WorldMap;
+import net.minecraft.world.level.saveddata.maps.MapItemSavedData;
 import org.bukkit.BanEntry;
 import org.bukkit.BanList;
 import org.bukkit.Bukkit;
@@ -214,57 +210,57 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
     private boolean scaledHealth = false;
     private double healthScale = 20;
     private CraftWorldBorder clientWorldBorder = null;
-    private IWorldBorderListener clientWorldBorderListener = createWorldBorderListener();
+    private BorderChangeListener clientWorldBorderListener = this.createWorldBorderListener();
 
-    public CraftPlayer(CraftServer server, EntityPlayer entity) {
+    public CraftPlayer(CraftServer server, ServerPlayer entity) {
         super(server, entity);
 
-        firstPlayed = System.currentTimeMillis();
+        this.firstPlayed = System.currentTimeMillis();
     }
 
     public GameProfile getProfile() {
-        return getHandle().getGameProfile();
+        return this.getHandle().getGameProfile();
     }
 
     @Override
     public void remove() {
         // Will lead to an inconsistent player state if we remove the player as any other entity.
-        throw new UnsupportedOperationException(String.format("Cannot remove player %s, use Player#kickPlayer(String) instead.", getName()));
+        throw new UnsupportedOperationException(String.format("Cannot remove player %s, use Player#kickPlayer(String) instead.", this.getName()));
     }
 
     @Override
     public boolean isOp() {
-        return server.getHandle().isOp(getProfile());
+        return this.server.getHandle().isOp(this.getProfile());
     }
 
     @Override
     public void setOp(boolean value) {
-        if (value == isOp()) return;
+        if (value == this.isOp()) return;
 
         if (value) {
-            server.getHandle().op(getProfile());
+            this.server.getHandle().op(this.getProfile());
         } else {
-            server.getHandle().deop(getProfile());
+            this.server.getHandle().deop(this.getProfile());
         }
 
-        perm.recalculatePermissions();
+        this.perm.recalculatePermissions();
     }
 
     @Override
     public boolean isOnline() {
-        return server.getPlayer(getUniqueId()) != null;
+        return this.server.getPlayer(this.getUniqueId()) != null;
     }
 
     @Override
     public PlayerProfile getPlayerProfile() {
-        return new CraftPlayerProfile(getProfile());
+        return new CraftPlayerProfile(this.getProfile());
     }
 
     @Override
     public InetSocketAddress getAddress() {
-        if (getHandle().connection.protocol() == null) return null;
+        if (this.getHandle().connection.protocol() == null) return null;
 
-        SocketAddress addr = getHandle().connection.getRemoteAddress();
+        SocketAddress addr = this.getHandle().connection.getRemoteAddress();
         if (addr instanceof InetSocketAddress) {
             return (InetSocketAddress) addr;
         } else {
@@ -276,27 +272,27 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
 
         boolean isTransferred();
 
-        EnumProtocol getProtocol();
+        ConnectionProtocol getProtocol();
 
         void sendPacket(Packet<?> packet);
 
-        void kickPlayer(IChatBaseComponent reason);
+        void kickPlayer(Component reason);
     }
 
-    public record CookieFuture(MinecraftKey key, CompletableFuture<byte[]> future) {
+    public record CookieFuture(ResourceLocation key, CompletableFuture<byte[]> future) {
 
     }
     private final Queue<CookieFuture> requestedCookies = new LinkedList<>();
 
     public boolean isAwaitingCookies() {
-        return !requestedCookies.isEmpty();
+        return !this.requestedCookies.isEmpty();
     }
 
     public boolean handleCookieResponse(ServerboundCookieResponsePacket response) {
-        CookieFuture future = requestedCookies.peek();
+        CookieFuture future = this.requestedCookies.peek();
         if (future != null) {
             if (future.key.equals(response.key())) {
-                Preconditions.checkState(future == requestedCookies.poll(), "requestedCookies queue mismatch");
+                Preconditions.checkState(future == this.requestedCookies.poll(), "requestedCookies queue mismatch");
 
                 future.future().complete(response.payload());
                 return true;
@@ -308,7 +304,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
 
     @Override
     public boolean isTransferred() {
-        return getHandle().transferCookieConnection.isTransferred();
+        return this.getHandle().transferCookieConnection.isTransferred();
     }
 
     @Override
@@ -316,10 +312,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         Preconditions.checkArgument(key != null, "Cookie key cannot be null");
 
         CompletableFuture<byte[]> future = new CompletableFuture<>();
-        MinecraftKey nms = CraftNamespacedKey.toMinecraft(key);
-        requestedCookies.add(new CookieFuture(nms, future));
+        ResourceLocation nms = CraftNamespacedKey.toMinecraft(key);
+        this.requestedCookies.add(new CookieFuture(nms, future));
 
-        getHandle().transferCookieConnection.sendPacket(new ClientboundCookieRequestPacket(nms));
+        this.getHandle().transferCookieConnection.sendPacket(new ClientboundCookieRequestPacket(nms));
 
         return future;
     }
@@ -329,17 +325,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         Preconditions.checkArgument(key != null, "Cookie key cannot be null");
         Preconditions.checkArgument(value != null, "Cookie value cannot be null");
         Preconditions.checkArgument(value.length <= 5120, "Cookie value too large, must be smaller than 5120 bytes");
-        Preconditions.checkState(getHandle().transferCookieConnection.getProtocol() == EnumProtocol.CONFIGURATION || getHandle().transferCookieConnection.getProtocol() == EnumProtocol.PLAY, "Can only store cookie in CONFIGURATION or PLAY protocol.");
+        Preconditions.checkState(this.getHandle().transferCookieConnection.getProtocol() == ConnectionProtocol.CONFIGURATION || this.getHandle().transferCookieConnection.getProtocol() == ConnectionProtocol.PLAY, "Can only store cookie in CONFIGURATION or PLAY protocol.");
 
-        getHandle().transferCookieConnection.sendPacket(new ClientboundStoreCookiePacket(CraftNamespacedKey.toMinecraft(key), value));
+        this.getHandle().transferCookieConnection.sendPacket(new ClientboundStoreCookiePacket(CraftNamespacedKey.toMinecraft(key), value));
     }
 
     @Override
     public void transfer(String host, int port) {
         Preconditions.checkArgument(host != null, "Host cannot be null");
-        Preconditions.checkState(getHandle().transferCookieConnection.getProtocol() == EnumProtocol.CONFIGURATION || getHandle().transferCookieConnection.getProtocol() == EnumProtocol.PLAY, "Can only transfer in CONFIGURATION or PLAY protocol.");
+        Preconditions.checkState(this.getHandle().transferCookieConnection.getProtocol() == ConnectionProtocol.CONFIGURATION || this.getHandle().transferCookieConnection.getProtocol() == ConnectionProtocol.PLAY, "Can only transfer in CONFIGURATION or PLAY protocol.");
 
-        getHandle().transferCookieConnection.sendPacket(new ClientboundTransferPacket(host, port));
+        this.getHandle().transferCookieConnection.sendPacket(new ClientboundTransferPacket(host, port));
     }
 
     @Override
@@ -347,7 +343,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         if (ignorePose) {
             return 1.62D;
         } else {
-            return getEyeHeight();
+            return this.getEyeHeight();
         }
     }
 
@@ -360,16 +356,16 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
     public void sendRawMessage(UUID sender, String message) {
         Preconditions.checkArgument(message != null, "message cannot be null");
 
-        if (getHandle().connection == null) return;
+        if (this.getHandle().connection == null) return;
 
-        for (IChatBaseComponent component : CraftChatMessage.fromString(message)) {
-            getHandle().sendSystemMessage(component);
+        for (Component component : CraftChatMessage.fromString(message)) {
+            this.getHandle().sendSystemMessage(component);
         }
     }
 
     @Override
     public void sendMessage(String message) {
-        if (!conversationTracker.isConversingModaly()) {
+        if (!this.conversationTracker.isConversingModaly()) {
             this.sendRawMessage(message);
         }
     }
@@ -377,13 +373,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
     @Override
     public void sendMessage(String... messages) {
         for (String message : messages) {
-            sendMessage(message);
+            this.sendMessage(message);
         }
     }
 
     @Override
     public void sendMessage(UUID sender, String message) {
-        if (!conversationTracker.isConversingModaly()) {
+        if (!this.conversationTracker.isConversingModaly()) {
             this.sendRawMessage(sender, message);
         }
     }
@@ -391,87 +387,87 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
     @Override
     public void sendMessage(UUID sender, String... messages) {
         for (String message : messages) {
-            sendMessage(sender, message);
+            this.sendMessage(sender, message);
         }
     }
 
     @Override
     public String getDisplayName() {
-        return getHandle().displayName;
+        return this.getHandle().displayName;
     }
 
     @Override
     public void setDisplayName(final String name) {
-        getHandle().displayName = name == null ? getName() : name;
+        this.getHandle().displayName = name == null ? this.getName() : name;
     }
 
     @Override
     public String getPlayerListName() {
-        return getHandle().listName == null ? getName() : CraftChatMessage.fromComponent(getHandle().listName);
+        return this.getHandle().listName == null ? this.getName() : CraftChatMessage.fromComponent(this.getHandle().listName);
     }
 
     @Override
     public void setPlayerListName(String name) {
         if (name == null) {
-            name = getName();
+            name = this.getName();
         }
-        getHandle().listName = name.equals(getName()) ? null : CraftChatMessage.fromStringOrNull(name);
-        for (EntityPlayer player : (List<EntityPlayer>) server.getHandle().players) {
+        this.getHandle().listName = name.equals(this.getName()) ? null : CraftChatMessage.fromStringOrNull(name);
+        for (ServerPlayer player : (List<ServerPlayer>) this.server.getHandle().players) {
             if (player.getBukkitEntity().canSee(this)) {
-                player.connection.send(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.a.UPDATE_DISPLAY_NAME, getHandle()));
+                player.connection.send(new ClientboundPlayerInfoUpdatePacket(ClientboundPlayerInfoUpdatePacket.Action.UPDATE_DISPLAY_NAME, this.getHandle()));
             }
         }
     }
 
     @Override
     public int getPlayerListOrder() {
-        return getHandle().listOrder;
+        return this.getHandle().listOrder;
     }
 
     @Override
     public void setPlayerListOrder(int order) {
         Preconditions.checkArgument(order >= 0, "order cannot be negative");
 
-        getHandle().listOrder = order;
+        this.getHandle().listOrder = order;
     }
 
-    private IChatBaseComponent playerListHeader;
-    private IChatBaseComponent playerListFooter;
+    private Component playerListHeader;
+    private Component playerListFooter;
 
     @Override
     public String getPlayerListHeader() {
-        return (playerListHeader == null) ? null : CraftChatMessage.fromComponent(playerListHeader);
+        return (this.playerListHeader == null) ? null : CraftChatMessage.fromComponent(this.playerListHeader);
     }
 
     @Override
     public String getPlayerListFooter() {
-        return (playerListFooter == null) ? null : CraftChatMessage.fromComponent(playerListFooter);
+        return (this.playerListFooter == null) ? null : CraftChatMessage.fromComponent(this.playerListFooter);
     }
 
     @Override
     public void setPlayerListHeader(String header) {
         this.playerListHeader = CraftChatMessage.fromStringOrNull(header, true);
-        updatePlayerListHeaderFooter();
+        this.updatePlayerListHeaderFooter();
     }
 
     @Override
     public void setPlayerListFooter(String footer) {
         this.playerListFooter = CraftChatMessage.fromStringOrNull(footer, true);
-        updatePlayerListHeaderFooter();
+        this.updatePlayerListHeaderFooter();
     }
 
     @Override
     public void setPlayerListHeaderFooter(String header, String footer) {
         this.playerListHeader = CraftChatMessage.fromStringOrNull(header, true);
         this.playerListFooter = CraftChatMessage.fromStringOrNull(footer, true);
-        updatePlayerListHeaderFooter();
+        this.updatePlayerListHeaderFooter();
     }
 
     private void updatePlayerListHeaderFooter() {
-        if (getHandle().connection == null) return;
+        if (this.getHandle().connection == null) return;
 
-        PacketPlayOutPlayerListHeaderFooter packet = new PacketPlayOutPlayerListHeaderFooter((this.playerListHeader == null) ? IChatBaseComponent.empty() : this.playerListHeader, (this.playerListFooter == null) ? IChatBaseComponent.empty() : this.playerListFooter);
-        getHandle().connection.send(packet);
+        ClientboundTabListPacket packet = new ClientboundTabListPacket((this.playerListHeader == null) ? Component.empty() : this.playerListHeader, (this.playerListFooter == null) ? Component.empty() : this.playerListFooter);
+        this.getHandle().connection.send(packet);
     }
 
     @Override
@@ -496,42 +492,42 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
 
     @Override
     public void kickPlayer(String message) {
-        getHandle().transferCookieConnection.kickPlayer(CraftChatMessage.fromStringOrEmpty(message, true));
+        this.getHandle().transferCookieConnection.kickPlayer(CraftChatMessage.fromStringOrEmpty(message, true));
     }
 
     @Override
     public void setCompassTarget(Location loc) {
         Preconditions.checkArgument(loc != null, "Location cannot be null");
 
-        if (getHandle().connection == null) return;
+        if (this.getHandle().connection == null) return;
 
         // Do not directly assign here, from the packethandler we'll assign it.
-        getHandle().connection.send(new PacketPlayOutSpawnPosition(CraftLocation.toBlockPosition(loc), loc.getYaw()));
+        this.getHandle().connection.send(new ClientboundSetDefaultSpawnPositionPacket(CraftLocation.toBlockPosition(loc), loc.getYaw()));
     }
 
     @Override
     public Location getCompassTarget() {
-        return getHandle().compassTarget;
+        return this.getHandle().compassTarget;
     }
 
     @Override
     public void chat(String msg) {
         Preconditions.checkArgument(msg != null, "msg cannot be null");
 
-        if (getHandle().connection == null) return;
+        if (this.getHandle().connection == null) return;
 
-        getHandle().connection.chat(msg, PlayerChatMessage.system(msg), false);
+        this.getHandle().connection.chat(msg, PlayerChatMessage.system(msg), false);
     }
 
     @Override
     public boolean performCommand(String command) {
         Preconditions.checkArgument(command != null, "command cannot be null");
-        return server.dispatchCommand(this, command);
+        return this.server.dispatchCommand(this, command);
     }
 
     @Override
     public void playNote(Location loc, byte instrument, byte note) {
-        playNote(loc, Instrument.getByType(instrument), new Note(note));
+        this.playNote(loc, Instrument.getByType(instrument), new Note(note));
     }
 
     @Override
@@ -540,138 +536,138 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         Preconditions.checkArgument(instrument != null, "Instrument cannot be null");
         Preconditions.checkArgument(note != null, "Note cannot be null");
 
-        if (getHandle().connection == null) return;
+        if (this.getHandle().connection == null) return;
 
         Sound instrumentSound = instrument.getSound();
         if (instrumentSound == null) return;
 
         float pitch = note.getPitch();
-        getHandle().connection.send(new PacketPlayOutNamedSoundEffect(CraftSound.bukkitToMinecraftHolder(instrumentSound), net.minecraft.sounds.SoundCategory.RECORDS, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), 3.0f, pitch, getHandle().getRandom().nextLong()));
+        this.getHandle().connection.send(new ClientboundSoundPacket(CraftSound.bukkitToMinecraftHolder(instrumentSound), net.minecraft.sounds.SoundSource.RECORDS, loc.getBlockX(), loc.getBlockY(), loc.getBlockZ(), 3.0f, pitch, this.getHandle().getRandom().nextLong()));
     }
 
     @Override
     public void playSound(Location loc, Sound sound, float volume, float pitch) {
-        playSound(loc, sound, org.bukkit.SoundCategory.MASTER, volume, pitch);
+        this.playSound(loc, sound, org.bukkit.SoundCategory.MASTER, volume, pitch);
     }
 
     @Override
     public void playSound(Location loc, String sound, float volume, float pitch) {
-        playSound(loc, sound, org.bukkit.SoundCategory.MASTER, volume, pitch);
+        this.playSound(loc, sound, org.bukkit.SoundCategory.MASTER, volume, pitch);
     }
 
     @Override
     public void playSound(Location loc, Sound sound, org.bukkit.SoundCategory category, float volume, float pitch) {
-        playSound(loc, sound, category, volume, pitch, getHandle().random.nextLong());
+        this.playSound(loc, sound, category, volume, pitch, this.getHandle().random.nextLong());
     }
 
     @Override
     public void playSound(Location loc, String sound, org.bukkit.SoundCategory category, float volume, float pitch) {
-        playSound(loc, sound, category, volume, pitch, getHandle().random.nextLong());
+        this.playSound(loc, sound, category, volume, pitch, this.getHandle().random.nextLong());
     }
 
     @Override
     public void playSound(Location loc, Sound sound, org.bukkit.SoundCategory category, float volume, float pitch, long seed) {
-        if (loc == null || sound == null || category == null || getHandle().connection == null) return;
+        if (loc == null || sound == null || category == null || this.getHandle().connection == null) return;
 
-        playSound0(loc, CraftSound.bukkitToMinecraftHolder(sound), net.minecraft.sounds.SoundCategory.valueOf(category.name()), volume, pitch, seed);
+        this.playSound0(loc, CraftSound.bukkitToMinecraftHolder(sound), net.minecraft.sounds.SoundSource.valueOf(category.name()), volume, pitch, seed);
     }
 
     @Override
     public void playSound(Location loc, String sound, org.bukkit.SoundCategory category, float volume, float pitch, long seed) {
-        if (loc == null || sound == null || category == null || getHandle().connection == null) return;
+        if (loc == null || sound == null || category == null || this.getHandle().connection == null) return;
 
-        playSound0(loc, Holder.direct(SoundEffect.createVariableRangeEvent(MinecraftKey.parse(sound))), net.minecraft.sounds.SoundCategory.valueOf(category.name()), volume, pitch, seed);
+        this.playSound0(loc, Holder.direct(SoundEvent.createVariableRangeEvent(ResourceLocation.parse(sound))), net.minecraft.sounds.SoundSource.valueOf(category.name()), volume, pitch, seed);
     }
 
-    private void playSound0(Location loc, Holder<SoundEffect> soundEffectHolder, net.minecraft.sounds.SoundCategory categoryNMS, float volume, float pitch, long seed) {
+    private void playSound0(Location loc, Holder<SoundEvent> soundEffectHolder, net.minecraft.sounds.SoundSource categoryNMS, float volume, float pitch, long seed) {
         Preconditions.checkArgument(loc != null, "Location cannot be null");
 
-        if (getHandle().connection == null) return;
+        if (this.getHandle().connection == null) return;
 
-        PacketPlayOutNamedSoundEffect packet = new PacketPlayOutNamedSoundEffect(soundEffectHolder, categoryNMS, loc.getX(), loc.getY(), loc.getZ(), volume, pitch, seed);
-        getHandle().connection.send(packet);
+        ClientboundSoundPacket packet = new ClientboundSoundPacket(soundEffectHolder, categoryNMS, loc.getX(), loc.getY(), loc.getZ(), volume, pitch, seed);
+        this.getHandle().connection.send(packet);
     }
 
     @Override
     public void playSound(org.bukkit.entity.Entity entity, Sound sound, float volume, float pitch) {
-        playSound(entity, sound, org.bukkit.SoundCategory.MASTER, volume, pitch);
+        this.playSound(entity, sound, org.bukkit.SoundCategory.MASTER, volume, pitch);
     }
 
     @Override
     public void playSound(org.bukkit.entity.Entity entity, String sound, float volume, float pitch) {
-        playSound(entity, sound, org.bukkit.SoundCategory.MASTER, volume, pitch);
+        this.playSound(entity, sound, org.bukkit.SoundCategory.MASTER, volume, pitch);
     }
 
     @Override
     public void playSound(org.bukkit.entity.Entity entity, Sound sound, org.bukkit.SoundCategory category, float volume, float pitch) {
-        playSound(entity, sound, category, volume, pitch, getHandle().random.nextLong());
+        this.playSound(entity, sound, category, volume, pitch, this.getHandle().random.nextLong());
     }
 
     @Override
     public void playSound(org.bukkit.entity.Entity entity, String sound, org.bukkit.SoundCategory category, float volume, float pitch) {
-        playSound(entity, sound, category, volume, pitch, getHandle().random.nextLong());
+        this.playSound(entity, sound, category, volume, pitch, this.getHandle().random.nextLong());
     }
 
     @Override
     public void playSound(org.bukkit.entity.Entity entity, Sound sound, org.bukkit.SoundCategory category, float volume, float pitch, long seed) {
-        if (!(entity instanceof CraftEntity craftEntity) || sound == null || category == null || getHandle().connection == null) return;
+        if (!(entity instanceof CraftEntity craftEntity) || sound == null || category == null || this.getHandle().connection == null) return;
 
-        playSound0(entity, CraftSound.bukkitToMinecraftHolder(sound), net.minecraft.sounds.SoundCategory.valueOf(category.name()), volume, pitch, seed);
+        this.playSound0(entity, CraftSound.bukkitToMinecraftHolder(sound), net.minecraft.sounds.SoundSource.valueOf(category.name()), volume, pitch, seed);
     }
 
     @Override
     public void playSound(org.bukkit.entity.Entity entity, String sound, org.bukkit.SoundCategory category, float volume, float pitch, long seed) {
-        if (!(entity instanceof CraftEntity craftEntity) || sound == null || category == null || getHandle().connection == null) return;
+        if (!(entity instanceof CraftEntity craftEntity) || sound == null || category == null || this.getHandle().connection == null) return;
 
-        playSound0(entity, Holder.direct(SoundEffect.createVariableRangeEvent(MinecraftKey.parse(sound))), net.minecraft.sounds.SoundCategory.valueOf(category.name()), volume, pitch, seed);
+        this.playSound0(entity, Holder.direct(SoundEvent.createVariableRangeEvent(ResourceLocation.parse(sound))), net.minecraft.sounds.SoundSource.valueOf(category.name()), volume, pitch, seed);
     }
 
-    private void playSound0(org.bukkit.entity.Entity entity, Holder<SoundEffect> soundEffectHolder, net.minecraft.sounds.SoundCategory categoryNMS, float volume, float pitch, long seed) {
+    private void playSound0(org.bukkit.entity.Entity entity, Holder<SoundEvent> soundEffectHolder, net.minecraft.sounds.SoundSource categoryNMS, float volume, float pitch, long seed) {
         Preconditions.checkArgument(entity != null, "Entity cannot be null");
         Preconditions.checkArgument(soundEffectHolder != null, "Holder of SoundEffect cannot be null");
         Preconditions.checkArgument(categoryNMS != null, "SoundCategory cannot be null");
 
-        if (getHandle().connection == null) return;
+        if (this.getHandle().connection == null) return;
         if (!(entity instanceof CraftEntity craftEntity)) return;
 
-        PacketPlayOutEntitySound packet = new PacketPlayOutEntitySound(soundEffectHolder, categoryNMS, craftEntity.getHandle(), volume, pitch, seed);
-        getHandle().connection.send(packet);
+        ClientboundSoundEntityPacket packet = new ClientboundSoundEntityPacket(soundEffectHolder, categoryNMS, craftEntity.getHandle(), volume, pitch, seed);
+        this.getHandle().connection.send(packet);
     }
 
     @Override
     public void stopSound(Sound sound) {
-        stopSound(sound, null);
+        this.stopSound(sound, null);
     }
 
     @Override
     public void stopSound(String sound) {
-        stopSound(sound, null);
+        this.stopSound(sound, null);
     }
 
     @Override
     public void stopSound(Sound sound, org.bukkit.SoundCategory category) {
-        stopSound(sound.getKey().getKey(), category);
+        this.stopSound(sound.getKey().getKey(), category);
     }
 
     @Override
     public void stopSound(String sound, org.bukkit.SoundCategory category) {
-        if (getHandle().connection == null) return;
+        if (this.getHandle().connection == null) return;
 
-        getHandle().connection.send(new PacketPlayOutStopSound(MinecraftKey.parse(sound), category == null ? net.minecraft.sounds.SoundCategory.MASTER : net.minecraft.sounds.SoundCategory.valueOf(category.name())));
+        this.getHandle().connection.send(new ClientboundStopSoundPacket(ResourceLocation.parse(sound), category == null ? net.minecraft.sounds.SoundSource.MASTER : net.minecraft.sounds.SoundSource.valueOf(category.name())));
     }
 
     @Override
     public void stopSound(org.bukkit.SoundCategory category) {
-        if (getHandle().connection == null) return;
+        if (this.getHandle().connection == null) return;
 
-        getHandle().connection.send(new PacketPlayOutStopSound(null, net.minecraft.sounds.SoundCategory.valueOf(category.name())));
+        this.getHandle().connection.send(new ClientboundStopSoundPacket(null, net.minecraft.sounds.SoundSource.valueOf(category.name())));
     }
 
     @Override
     public void stopAllSounds() {
-        if (getHandle().connection == null) return;
+        if (this.getHandle().connection == null) return;
 
-        getHandle().connection.send(new PacketPlayOutStopSound(null, null));
+        this.getHandle().connection.send(new ClientboundStopSoundPacket(null, null));
     }
 
     @Override
@@ -679,11 +675,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         Preconditions.checkArgument(effect != null, "Effect cannot be null");
         Preconditions.checkArgument(loc != null, "Location cannot be null");
 
-        if (getHandle().connection == null) return;
+        if (this.getHandle().connection == null) return;
 
         int packetData = effect.getId();
-        PacketPlayOutWorldEvent packet = new PacketPlayOutWorldEvent(packetData, CraftLocation.toBlockPosition(loc), data, false);
-        getHandle().connection.send(packet);
+        ClientboundLevelEventPacket packet = new ClientboundLevelEventPacket(packetData, CraftLocation.toBlockPosition(loc), data, false);
+        this.getHandle().connection.send(packet);
     }
 
     @Override
@@ -698,61 +694,61 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         }
 
         int datavalue = CraftEffect.getDataValue(effect, data);
-        playEffect(loc, effect, datavalue);
+        this.playEffect(loc, effect, datavalue);
     }
 
     @Override
     public boolean breakBlock(Block block) {
         Preconditions.checkArgument(block != null, "Block cannot be null");
-        Preconditions.checkArgument(block.getWorld().equals(getWorld()), "Cannot break blocks across worlds");
+        Preconditions.checkArgument(block.getWorld().equals(this.getWorld()), "Cannot break blocks across worlds");
 
-        return getHandle().gameMode.destroyBlock(new BlockPosition(block.getX(), block.getY(), block.getZ()));
+        return this.getHandle().gameMode.destroyBlock(new BlockPos(block.getX(), block.getY(), block.getZ()));
     }
 
     @Override
     public void sendBlockChange(Location loc, Material material, byte data) {
-        if (getHandle().connection == null) return;
+        if (this.getHandle().connection == null) return;
 
-        PacketPlayOutBlockChange packet = new PacketPlayOutBlockChange(CraftLocation.toBlockPosition(loc), CraftMagicNumbers.getBlock(material, data));
-        getHandle().connection.send(packet);
+        ClientboundBlockUpdatePacket packet = new ClientboundBlockUpdatePacket(CraftLocation.toBlockPosition(loc), CraftMagicNumbers.getBlock(material, data));
+        this.getHandle().connection.send(packet);
     }
 
     @Override
     public void sendBlockChange(Location loc, BlockData block) {
-        if (getHandle().connection == null) return;
+        if (this.getHandle().connection == null) return;
 
-        PacketPlayOutBlockChange packet = new PacketPlayOutBlockChange(CraftLocation.toBlockPosition(loc), ((CraftBlockData) block).getState());
-        getHandle().connection.send(packet);
+        ClientboundBlockUpdatePacket packet = new ClientboundBlockUpdatePacket(CraftLocation.toBlockPosition(loc), ((CraftBlockData) block).getState());
+        this.getHandle().connection.send(packet);
     }
 
     @Override
     public void sendBlockChanges(Collection<BlockState> blocks) {
         Preconditions.checkArgument(blocks != null, "blocks must not be null");
 
-        if (getHandle().connection == null || blocks.isEmpty()) {
+        if (this.getHandle().connection == null || blocks.isEmpty()) {
             return;
         }
 
-        Map<SectionPosition, ChunkSectionChanges> changes = new HashMap<>();
+        Map<SectionPos, ChunkSectionChanges> changes = new HashMap<>();
         for (BlockState state : blocks) {
             CraftBlockState cstate = (CraftBlockState) state;
-            BlockPosition blockPosition = cstate.getPosition();
+            BlockPos blockPosition = cstate.getPosition();
 
             // The coordinates of the chunk section in which the block is located, aka chunk x, y, and z
-            SectionPosition sectionPosition = SectionPosition.of(blockPosition);
+            SectionPos sectionPosition = SectionPos.of(blockPosition);
 
             // Push the block change position and block data to the final change map
             ChunkSectionChanges sectionChanges = changes.computeIfAbsent(sectionPosition, (ignore) -> new ChunkSectionChanges());
 
-            sectionChanges.positions().add(SectionPosition.sectionRelativePos(blockPosition));
+            sectionChanges.positions().add(SectionPos.sectionRelativePos(blockPosition));
             sectionChanges.blockData().add(cstate.getHandle());
         }
 
         // Construct the packets using the data allocated above and send then to the players
-        for (Map.Entry<SectionPosition, ChunkSectionChanges> entry : changes.entrySet()) {
+        for (Map.Entry<SectionPos, ChunkSectionChanges> entry : changes.entrySet()) {
             ChunkSectionChanges chunkChanges = entry.getValue();
-            PacketPlayOutMultiBlockChange packet = new PacketPlayOutMultiBlockChange(entry.getKey(), chunkChanges.positions(), chunkChanges.blockData().toArray(IBlockData[]::new));
-            getHandle().connection.send(packet);
+            ClientboundSectionBlocksUpdatePacket packet = new ClientboundSectionBlocksUpdatePacket(entry.getKey(), chunkChanges.positions(), chunkChanges.blockData().toArray(net.minecraft.world.level.block.state.BlockState[]::new));
+            this.getHandle().connection.send(packet);
         }
     }
 
@@ -761,7 +757,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         this.sendBlockChanges(blocks);
     }
 
-    private record ChunkSectionChanges(ShortSet positions, List<IBlockData> blockData) {
+    private record ChunkSectionChanges(ShortSet positions, List<net.minecraft.world.level.block.state.BlockState> blockData) {
 
         public ChunkSectionChanges() {
             this(new ShortArraySet(), new ArrayList<>());
@@ -770,7 +766,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
 
     @Override
     public void sendBlockDamage(Location loc, float progress) {
-        this.sendBlockDamage(loc, progress, getEntityId());
+        this.sendBlockDamage(loc, progress, this.getEntityId());
     }
 
     @Override
@@ -784,25 +780,25 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         Preconditions.checkArgument(loc != null, "loc must not be null");
         Preconditions.checkArgument(progress >= 0.0 && progress <= 1.0, "progress must be between 0.0 and 1.0 (inclusive)");
 
-        if (getHandle().connection == null) return;
+        if (this.getHandle().connection == null) return;
 
         int stage = (int) (9 * progress); // There are 0 - 9 damage states
         if (progress == 0.0F) {
             stage = -1; // The protocol states that any other value will reset the damage, which this API promises
         }
 
-        PacketPlayOutBlockBreakAnimation packet = new PacketPlayOutBlockBreakAnimation(sourceId, CraftLocation.toBlockPosition(loc), stage);
-        getHandle().connection.send(packet);
+        ClientboundBlockDestructionPacket packet = new ClientboundBlockDestructionPacket(sourceId, CraftLocation.toBlockPosition(loc), stage);
+        this.getHandle().connection.send(packet);
     }
 
     @Override
     public void sendSignChange(Location loc, String[] lines) {
-        sendSignChange(loc, lines, DyeColor.BLACK);
+        this.sendSignChange(loc, lines, DyeColor.BLACK);
     }
 
     @Override
     public void sendSignChange(Location loc, String[] lines, DyeColor dyeColor) {
-        sendSignChange(loc, lines, dyeColor, false);
+        this.sendSignChange(loc, lines, dyeColor, false);
     }
 
     @Override
@@ -815,19 +811,19 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         }
         Preconditions.checkArgument(lines.length >= 4, "Must have at least 4 lines (%s)", lines.length);
 
-        if (getHandle().connection == null) return;
+        if (this.getHandle().connection == null) return;
 
-        IChatBaseComponent[] components = CraftSign.sanitizeLines(lines);
-        TileEntitySign sign = new TileEntitySign(CraftLocation.toBlockPosition(loc), Blocks.OAK_SIGN.defaultBlockState());
+        Component[] components = CraftSign.sanitizeLines(lines);
+        SignBlockEntity sign = new SignBlockEntity(CraftLocation.toBlockPosition(loc), Blocks.OAK_SIGN.defaultBlockState());
         SignText text = sign.getFrontText();
-        text = text.setColor(EnumColor.byId(dyeColor.getWoolData()));
+        text = text.setColor(net.minecraft.world.item.DyeColor.byId(dyeColor.getWoolData()));
         text = text.setHasGlowingText(hasGlowingText);
         for (int i = 0; i < components.length; i++) {
             text = text.setMessage(i, components[i]);
         }
         sign.setText(text, true);
 
-        getHandle().connection.send(new PacketPlayOutTileEntityData(sign.getBlockPos(), sign.getType(), sign.getUpdateTag(getHandle().registryAccess())));
+        this.getHandle().connection.send(new ClientboundBlockEntityDataPacket(sign.getBlockPos(), sign.getType(), sign.getUpdateTag(this.getHandle().registryAccess())));
     }
 
     @Override
@@ -835,10 +831,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         Preconditions.checkArgument(location != null, "Location can not be null");
         Preconditions.checkArgument(tileState != null, "TileState can not be null");
 
-        if (getHandle().connection == null) return;
+        if (this.getHandle().connection == null) return;
 
         CraftBlockEntityState<?> craftState = ((CraftBlockEntityState<?>) tileState);
-        getHandle().connection.send(craftState.getUpdatePacket(location));
+        this.getHandle().connection.send(craftState.getUpdatePacket(location));
     }
 
     @Override
@@ -851,11 +847,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         Preconditions.checkArgument(entity != null, "Entity cannot be null");
         Preconditions.checkArgument(items != null, "items cannot be null");
 
-        if (getHandle().connection == null) {
+        if (this.getHandle().connection == null) {
             return;
         }
 
-        List<Pair<EnumItemSlot, net.minecraft.world.item.ItemStack>> equipment = new ArrayList<>(items.size());
+        List<Pair<net.minecraft.world.entity.EquipmentSlot, net.minecraft.world.item.ItemStack>> equipment = new ArrayList<>(items.size());
         for (Map.Entry<EquipmentSlot, ItemStack> entry : items.entrySet()) {
             EquipmentSlot slot = entry.getKey();
             Preconditions.checkArgument(slot != null, "Cannot set null EquipmentSlot");
@@ -863,7 +859,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
             equipment.add(new Pair<>(CraftEquipmentSlot.getNMS(slot), CraftItemStack.asNMSCopy(entry.getValue())));
         }
 
-        getHandle().connection.send(new PacketPlayOutEntityEquipment(entity.getEntityId(), equipment));
+        this.getHandle().connection.send(new ClientboundSetEquipmentPacket(entity.getEntityId(), equipment));
     }
 
     @Override
@@ -871,11 +867,11 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         Preconditions.checkArgument(entity != null, "Entity cannot be null");
         Preconditions.checkArgument(effect != null, "Effect cannot be null");
 
-        if (getHandle().connection == null) {
+        if (this.getHandle().connection == null) {
             return;
         }
 
-        getHandle().connection.send(new PacketPlayOutEntityEffect(entity.getEntityId(), CraftPotionUtil.fromBukkit(effect), true));
+        this.getHandle().connection.send(new ClientboundUpdateMobEffectPacket(entity.getEntityId(), CraftPotionUtil.fromBukkit(effect), true));
     }
 
     @Override
@@ -883,43 +879,43 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         Preconditions.checkArgument(entity != null, "Entity cannot be null");
         Preconditions.checkArgument(type != null, "Type cannot be null");
 
-        if (getHandle().connection == null) {
+        if (this.getHandle().connection == null) {
             return;
         }
 
-        getHandle().connection.send(new PacketPlayOutRemoveEntityEffect(entity.getEntityId(), CraftPotionEffectType.bukkitToMinecraftHolder(type)));
+        this.getHandle().connection.send(new ClientboundRemoveMobEffectPacket(entity.getEntityId(), CraftPotionEffectType.bukkitToMinecraftHolder(type)));
     }
 
     @Override
     public WorldBorder getWorldBorder() {
-        return clientWorldBorder;
+        return this.clientWorldBorder;
     }
 
     @Override
     public void setWorldBorder(WorldBorder border) {
         CraftWorldBorder craftBorder = (CraftWorldBorder) border;
 
-        if (border != null && !craftBorder.isVirtual() && !craftBorder.getWorld().equals(getWorld())) {
+        if (border != null && !craftBorder.isVirtual() && !craftBorder.getWorld().equals(this.getWorld())) {
             throw new UnsupportedOperationException("Cannot set player world border to that of another world");
         }
 
         // Nullify the old client-sided world border listeners so that calls to it will not affect this player
-        if (clientWorldBorder != null) {
-            this.clientWorldBorder.getHandle().removeListener(clientWorldBorderListener);
+        if (this.clientWorldBorder != null) {
+            this.clientWorldBorder.getHandle().removeListener(this.clientWorldBorderListener);
         }
 
         net.minecraft.world.level.border.WorldBorder newWorldBorder;
         if (craftBorder == null || !craftBorder.isVirtual()) {
             this.clientWorldBorder = null;
-            newWorldBorder = ((CraftWorldBorder) getWorld().getWorldBorder()).getHandle();
+            newWorldBorder = ((CraftWorldBorder) this.getWorld().getWorldBorder()).getHandle();
         } else {
             this.clientWorldBorder = craftBorder;
-            this.clientWorldBorder.getHandle().addListener(clientWorldBorderListener);
-            newWorldBorder = clientWorldBorder.getHandle();
+            this.clientWorldBorder.getHandle().addListener(this.clientWorldBorderListener);
+            newWorldBorder = this.clientWorldBorder.getHandle();
         }
 
         // Send all world border update packets to the player
-        PlayerConnection connection = getHandle().connection;
+        ServerGamePacketListenerImpl connection = this.getHandle().connection;
         connection.send(new ClientboundSetBorderSizePacket(newWorldBorder));
         connection.send(new ClientboundSetBorderLerpSizePacket(newWorldBorder));
         connection.send(new ClientboundSetBorderCenterPacket(newWorldBorder));
@@ -927,64 +923,64 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         connection.send(new ClientboundSetBorderWarningDistancePacket(newWorldBorder));
     }
 
-    private IWorldBorderListener createWorldBorderListener() {
-        return new IWorldBorderListener() {
+    private BorderChangeListener createWorldBorderListener() {
+        return new BorderChangeListener() {
             @Override
             public void onBorderSizeSet(net.minecraft.world.level.border.WorldBorder border, double size) {
-                getHandle().connection.send(new ClientboundSetBorderSizePacket(border));
+                CraftPlayer.this.getHandle().connection.send(new ClientboundSetBorderSizePacket(border));
             }
 
             @Override
-            public void onBorderSizeLerping(net.minecraft.world.level.border.WorldBorder border, double size, double newSize, long time) {
-                getHandle().connection.send(new ClientboundSetBorderLerpSizePacket(border));
+            public void onBorderSizeLerping(net.minecraft.world.level.border.WorldBorder border, double fromSize, double toSize, long time) {
+                CraftPlayer.this.getHandle().connection.send(new ClientboundSetBorderLerpSizePacket(border));
             }
 
             @Override
-            public void onBorderCenterSet(net.minecraft.world.level.border.WorldBorder border, double x, double z) {
-                getHandle().connection.send(new ClientboundSetBorderCenterPacket(border));
+            public void onBorderCenterSet(net.minecraft.world.level.border.WorldBorder border, double centerX, double centerZ) {
+                CraftPlayer.this.getHandle().connection.send(new ClientboundSetBorderCenterPacket(border));
             }
 
             @Override
             public void onBorderSetWarningTime(net.minecraft.world.level.border.WorldBorder border, int warningTime) {
-                getHandle().connection.send(new ClientboundSetBorderWarningDelayPacket(border));
+                CraftPlayer.this.getHandle().connection.send(new ClientboundSetBorderWarningDelayPacket(border));
             }
 
             @Override
-            public void onBorderSetWarningBlocks(net.minecraft.world.level.border.WorldBorder border, int warningBlocks) {
-                getHandle().connection.send(new ClientboundSetBorderWarningDistancePacket(border));
+            public void onBorderSetWarningBlocks(net.minecraft.world.level.border.WorldBorder border, int warningBlockDistance) {
+                CraftPlayer.this.getHandle().connection.send(new ClientboundSetBorderWarningDistancePacket(border));
             }
 
             @Override
-            public void onBorderSetDamagePerBlock(net.minecraft.world.level.border.WorldBorder border, double damage) {} // NO OP
+            public void onBorderSetDamagePerBlock(net.minecraft.world.level.border.WorldBorder border, double damagePerBlock) {} // NO OP
 
             @Override
-            public void onBorderSetDamageSafeZOne(net.minecraft.world.level.border.WorldBorder border, double blocks) {} // NO OP
+            public void onBorderSetDamageSafeZOne(net.minecraft.world.level.border.WorldBorder border, double safeZoneRadius) {} // NO OP
         };
     }
 
     public boolean hasClientWorldBorder() {
-        return clientWorldBorder != null;
+        return this.clientWorldBorder != null;
     }
 
     @Override
     public void sendMap(MapView map) {
-        if (getHandle().connection == null) return;
+        if (this.getHandle().connection == null) return;
 
         RenderData data = ((CraftMapView) map).render(this);
-        Collection<MapIcon> icons = new ArrayList<MapIcon>();
+        Collection<MapDecoration> icons = new ArrayList<MapDecoration>();
         for (MapCursor cursor : data.cursors) {
             if (cursor.isVisible()) {
-                icons.add(new MapIcon(CraftMapCursor.CraftType.bukkitToMinecraftHolder(cursor.getType()), cursor.getX(), cursor.getY(), cursor.getDirection(), CraftChatMessage.fromStringOrOptional(cursor.getCaption())));
+                icons.add(new MapDecoration(CraftMapCursor.CraftType.bukkitToMinecraftHolder(cursor.getType()), cursor.getX(), cursor.getY(), cursor.getDirection(), CraftChatMessage.fromStringOrOptional(cursor.getCaption())));
             }
         }
 
-        PacketPlayOutMap packet = new PacketPlayOutMap(new MapId(map.getId()), map.getScale().getValue(), map.isLocked(), icons, new WorldMap.c(0, 0, 128, 128, data.buffer));
-        getHandle().connection.send(packet);
+        ClientboundMapItemDataPacket packet = new ClientboundMapItemDataPacket(new MapId(map.getId()), map.getScale().getValue(), map.isLocked(), icons, new MapItemSavedData.MapPatch(0, 0, 128, 128, data.buffer));
+        this.getHandle().connection.send(packet);
     }
 
     @Override
     public void sendHurtAnimation(float yaw) {
-        if (getHandle().connection == null) {
+        if (this.getHandle().connection == null) {
             return;
         }
 
@@ -993,18 +989,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
          * This makes no sense. We'll add 90 to it so that 0 = front, clockwise from there.
          */
         float actualYaw = yaw + 90;
-        getHandle().connection.send(new ClientboundHurtAnimationPacket(getEntityId(), actualYaw));
+        this.getHandle().connection.send(new ClientboundHurtAnimationPacket(this.getEntityId(), actualYaw));
     }
 
     @Override
     public void sendLinks(ServerLinks links) {
-        if (getHandle().connection == null) {
+        if (this.getHandle().connection == null) {
             return;
         }
         Preconditions.checkArgument(links != null, "links cannot be null");
 
         net.minecraft.server.ServerLinks nms = ((CraftServerLinks) links).getServerLinks();
-        getHandle().connection.send(new ClientboundServerLinksPacket(nms.untrust()));
+        this.getHandle().connection.send(new ClientboundServerLinksPacket(nms.untrust()));
     }
 
     @Override
@@ -1023,10 +1019,10 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
     }
 
     private void sendCustomChatCompletionPacket(Collection<String> completions, ClientboundCustomChatCompletionsPacket.Action action) {
-        if (getHandle().connection == null) return;
+        if (this.getHandle().connection == null) return;
 
         ClientboundCustomChatCompletionsPacket packet = new ClientboundCustomChatCompletionsPacket(action, new ArrayList<>(completions));
-        getHandle().connection.send(packet);
+        this.getHandle().connection.send(packet);
     }
 
     @Override
@@ -1040,9 +1036,9 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         Preconditions.checkArgument(location.getWorld() != null, "location.world");
         location.checkFinite();
 
-        EntityPlayer entity = getHandle();
+        ServerPlayer entity = this.getHandle();
 
-        if (getHealth() == 0 || entity.isRemoved()) {
+        if (this.getHealth() == 0 || entity.isRemoved()) {
             return false;
         }
 
@@ -1060,7 +1056,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         Location to = location;
         // Create & Call the Teleport Event.
         PlayerTeleportEvent event = new PlayerTeleportEvent(this, from, to, cause);
-        server.getPluginManager().callEvent(event);
+        this.server.getPluginManager().callEvent(event);
 
         // Return False to inform the Plugin that the Teleport was unsuccessful/cancelled.
         if (event.isCancelled()) {
@@ -1080,12 +1076,12 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         // Grab the new To Location dependent on whether the event was cancelled.
         to = event.getTo();
         // Grab the To and From World Handles.
-        WorldServer fromWorld = ((CraftWorld) from.getWorld()).getHandle();
-        WorldServer toWorld = ((CraftWorld) to.getWorld()).getHandle();
+        ServerLevel fromWorld = ((CraftWorld) from.getWorld()).getHandle();
+        ServerLevel toWorld = ((CraftWorld) to.getWorld()).getHandle();
 
         // Close any foreign inventory
-        if (getHandle().containerMenu != getHandle().inventoryMenu) {
-            getHandle().closeContainer();
+        if (this.getHandle().containerMenu != this.getHandle().inventoryMenu) {
+            this.getHandle().closeContainer();
         }
 
         // Check if the fromWorld and toWorld are the same.
@@ -1094,72 +1090,72 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         } else {
             entity.portalProcess = null; // SPIGOT-7785: there is no need to carry this over as it contains the old world/location and we might run into trouble if there is a portal in the same spot in both worlds
             // The respawn reason should never be used if the passed location is non null.
-            server.getHandle().respawn(entity, true, Entity.RemovalReason.CHANGED_DIMENSION, null, to);
+            this.server.getHandle().respawn(entity, true, Entity.RemovalReason.CHANGED_DIMENSION, null, to);
         }
         return true;
     }
 
     @Override
     public void setSneaking(boolean sneak) {
-        getHandle().setShiftKeyDown(sneak);
+        this.getHandle().setShiftKeyDown(sneak);
     }
 
     @Override
     public boolean isSneaking() {
-        return getHandle().isShiftKeyDown();
+        return this.getHandle().isShiftKeyDown();
     }
 
     @Override
     public boolean isSprinting() {
-        return getHandle().isSprinting();
+        return this.getHandle().isSprinting();
     }
 
     @Override
     public void setSprinting(boolean sprinting) {
-        getHandle().setSprinting(sprinting);
+        this.getHandle().setSprinting(sprinting);
     }
 
     @Override
     public void loadData() {
-        server.getHandle().playerIo.load(getHandle());
+        this.server.getHandle().playerIo.load(this.getHandle());
     }
 
     @Override
     public void saveData() {
-        server.getHandle().playerIo.save(getHandle());
+        this.server.getHandle().playerIo.save(this.getHandle());
     }
 
     @Deprecated
     @Override
     public void updateInventory() {
-        getHandle().containerMenu.sendAllDataToRemote();
+        this.getHandle().containerMenu.sendAllDataToRemote();
     }
 
     @Override
     public void setSleepingIgnored(boolean isSleeping) {
-        getHandle().fauxSleeping = isSleeping;
-        ((CraftWorld) getWorld()).getHandle().updateSleepingPlayerList();
+        this.getHandle().fauxSleeping = isSleeping;
+        ((CraftWorld) this.getWorld()).getHandle().updateSleepingPlayerList();
     }
 
     @Override
     public boolean isSleepingIgnored() {
-        return getHandle().fauxSleeping;
+        return this.getHandle().fauxSleeping;
     }
 
     @Override
     public Location getBedSpawnLocation() {
-        return getRespawnLocation();
+        return this.getRespawnLocation();
     }
 
     @Override
     public Location getRespawnLocation() {
-        WorldServer world = getHandle().server.getLevel(getHandle().getRespawnDimension());
-        BlockPosition bed = getHandle().getRespawnPosition();
+        ServerLevel world = this.getHandle().server.getLevel(this.getHandle().getRespawnDimension());
+        BlockPos bed = this.getHandle().getRespawnPosition();
 
         if (world != null && bed != null) {
-            Optional<EntityPlayer.RespawnPosAngle> spawnLoc = EntityPlayer.findRespawnAndUseSpawnBlock(world, bed, getHandle().getRespawnAngle(), getHandle().isRespawnForced(), true);
+            Optional<ServerPlayer.RespawnPosAngle> spawnLoc = ServerPlayer.findRespawnAndUseSpawnBlock(world, bed, this.getHandle().getRespawnAngle(), this.getHandle().isRespawnForced(), true);
             if (spawnLoc.isPresent()) {
-                EntityPlayer.RespawnPosAngle vec = spawnLoc.get();
+                ServerPlayer.RespawnPosAngle vec = spawnLoc.get();
                 return CraftLocation.toBukkit(vec.position(), world.getWorld(), vec.yaw(), 0);
             }
         }
@@ -1168,203 +1164,203 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
 
     @Override
     public void setBedSpawnLocation(Location location) {
-        setBedSpawnLocation(location, false);
+        this.setBedSpawnLocation(location, false);
     }
 
     @Override
     public void setRespawnLocation(Location location) {
-        setRespawnLocation(location, false);
+        this.setRespawnLocation(location, false);
     }
 
     @Override
     public void setBedSpawnLocation(Location location, boolean override) {
-        setRespawnLocation(location, override);
+        this.setRespawnLocation(location, override);
     }
 
     @Override
     public void setRespawnLocation(Location location, boolean override) {
         if (location == null) {
-            getHandle().setRespawnPosition(null, null, 0.0F, override, false, PlayerSpawnChangeEvent.Cause.PLUGIN);
+            this.getHandle().setRespawnPosition(null, null, 0.0F, override, false, PlayerSpawnChangeEvent.Cause.PLUGIN);
         } else {
-            getHandle().setRespawnPosition(((CraftWorld) location.getWorld()).getHandle().dimension(), CraftLocation.toBlockPosition(location), location.getYaw(), override, false, PlayerSpawnChangeEvent.Cause.PLUGIN);
+            this.getHandle().setRespawnPosition(((CraftWorld) location.getWorld()).getHandle().dimension(), CraftLocation.toBlockPosition(location), location.getYaw(), override, false, PlayerSpawnChangeEvent.Cause.PLUGIN);
         }
     }
 
     @Override
     public Collection<EnderPearl> getEnderPearls() {
-        return getHandle().getEnderPearls().stream().map((e) -> (EnderPearl) e.getBukkitEntity()).collect(Collectors.toList());
+        return this.getHandle().getEnderPearls().stream().map((e) -> (EnderPearl) e.getBukkitEntity()).collect(Collectors.toList());
     }
 
     @Override
     public Input getCurrentInput() {
-        return new CraftInput(getHandle().getLastClientInput());
+        return new CraftInput(this.getHandle().getLastClientInput());
     }
 
     @Override
     public Location getBedLocation() {
-        Preconditions.checkState(isSleeping(), "Not sleeping");
+        Preconditions.checkState(this.isSleeping(), "Not sleeping");
 
-        BlockPosition bed = getHandle().getRespawnPosition();
-        return CraftLocation.toBukkit(bed, getWorld());
+        BlockPos bed = this.getHandle().getRespawnPosition();
+        return CraftLocation.toBukkit(bed, this.getWorld());
     }
 
     @Override
     public boolean hasDiscoveredRecipe(NamespacedKey recipe) {
         Preconditions.checkArgument(recipe != null, "recipe cannot be null");
-        return getHandle().getRecipeBook().contains(CraftRecipe.toMinecraft(recipe));
+        return this.getHandle().getRecipeBook().contains(CraftRecipe.toMinecraft(recipe));
     }
 
     @Override
     public Set<NamespacedKey> getDiscoveredRecipes() {
         ImmutableSet.Builder<NamespacedKey> bukkitRecipeKeys = ImmutableSet.builder();
-        getHandle().getRecipeBook().known.forEach(key -> bukkitRecipeKeys.add(CraftNamespacedKey.fromMinecraft(key.location())));
+        this.getHandle().getRecipeBook().known.forEach(key -> bukkitRecipeKeys.add(CraftNamespacedKey.fromMinecraft(key.location())));
         return bukkitRecipeKeys.build();
     }
 
     @Override
     public void incrementStatistic(Statistic statistic) {
-        CraftStatistic.incrementStatistic(getHandle().getStats(), statistic, getHandle());
+        CraftStatistic.incrementStatistic(this.getHandle().getStats(), statistic, this.getHandle());
     }
 
     @Override
     public void decrementStatistic(Statistic statistic) {
-        CraftStatistic.decrementStatistic(getHandle().getStats(), statistic, getHandle());
+        CraftStatistic.decrementStatistic(this.getHandle().getStats(), statistic, this.getHandle());
     }
 
     @Override
     public int getStatistic(Statistic statistic) {
-        return CraftStatistic.getStatistic(getHandle().getStats(), statistic);
+        return CraftStatistic.getStatistic(this.getHandle().getStats(), statistic);
     }
 
     @Override
     public void incrementStatistic(Statistic statistic, int amount) {
-        CraftStatistic.incrementStatistic(getHandle().getStats(), statistic, amount, getHandle());
+        CraftStatistic.incrementStatistic(this.getHandle().getStats(), statistic, amount, this.getHandle());
     }
 
     @Override
     public void decrementStatistic(Statistic statistic, int amount) {
-        CraftStatistic.decrementStatistic(getHandle().getStats(), statistic, amount, getHandle());
+        CraftStatistic.decrementStatistic(this.getHandle().getStats(), statistic, amount, this.getHandle());
     }
 
     @Override
     public void setStatistic(Statistic statistic, int newValue) {
-        CraftStatistic.setStatistic(getHandle().getStats(), statistic, newValue, getHandle());
+        CraftStatistic.setStatistic(this.getHandle().getStats(), statistic, newValue, this.getHandle());
     }
 
     @Override
     public void incrementStatistic(Statistic statistic, Material material) {
-        CraftStatistic.incrementStatistic(getHandle().getStats(), statistic, material, getHandle());
+        CraftStatistic.incrementStatistic(this.getHandle().getStats(), statistic, material, this.getHandle());
     }
 
     @Override
     public void decrementStatistic(Statistic statistic, Material material) {
-        CraftStatistic.decrementStatistic(getHandle().getStats(), statistic, material, getHandle());
+        CraftStatistic.decrementStatistic(this.getHandle().getStats(), statistic, material, this.getHandle());
     }
 
     @Override
     public int getStatistic(Statistic statistic, Material material) {
-        return CraftStatistic.getStatistic(getHandle().getStats(), statistic, material);
+        return CraftStatistic.getStatistic(this.getHandle().getStats(), statistic, material);
     }
 
     @Override
     public void incrementStatistic(Statistic statistic, Material material, int amount) {
-        CraftStatistic.incrementStatistic(getHandle().getStats(), statistic, material, amount, getHandle());
+        CraftStatistic.incrementStatistic(this.getHandle().getStats(), statistic, material, amount, this.getHandle());
     }
 
     @Override
     public void decrementStatistic(Statistic statistic, Material material, int amount) {
-        CraftStatistic.decrementStatistic(getHandle().getStats(), statistic, material, amount, getHandle());
+        CraftStatistic.decrementStatistic(this.getHandle().getStats(), statistic, material, amount, this.getHandle());
     }
 
     @Override
     public void setStatistic(Statistic statistic, Material material, int newValue) {
-        CraftStatistic.setStatistic(getHandle().getStats(), statistic, material, newValue, getHandle());
+        CraftStatistic.setStatistic(this.getHandle().getStats(), statistic, material, newValue, this.getHandle());
     }
 
     @Override
     public void incrementStatistic(Statistic statistic, EntityType entityType) {
-        CraftStatistic.incrementStatistic(getHandle().getStats(), statistic, entityType, getHandle());
+        CraftStatistic.incrementStatistic(this.getHandle().getStats(), statistic, entityType, this.getHandle());
     }
 
     @Override
     public void decrementStatistic(Statistic statistic, EntityType entityType) {
-        CraftStatistic.decrementStatistic(getHandle().getStats(), statistic, entityType, getHandle());
+        CraftStatistic.decrementStatistic(this.getHandle().getStats(), statistic, entityType, this.getHandle());
     }
 
     @Override
     public int getStatistic(Statistic statistic, EntityType entityType) {
-        return CraftStatistic.getStatistic(getHandle().getStats(), statistic, entityType);
+        return CraftStatistic.getStatistic(this.getHandle().getStats(), statistic, entityType);
     }
 
     @Override
     public void incrementStatistic(Statistic statistic, EntityType entityType, int amount) {
-        CraftStatistic.incrementStatistic(getHandle().getStats(), statistic, entityType, amount, getHandle());
+        CraftStatistic.incrementStatistic(this.getHandle().getStats(), statistic, entityType, amount, this.getHandle());
     }
 
     @Override
     public void decrementStatistic(Statistic statistic, EntityType entityType, int amount) {
-        CraftStatistic.decrementStatistic(getHandle().getStats(), statistic, entityType, amount, getHandle());
+        CraftStatistic.decrementStatistic(this.getHandle().getStats(), statistic, entityType, amount, this.getHandle());
     }
 
     @Override
     public void setStatistic(Statistic statistic, EntityType entityType, int newValue) {
-        CraftStatistic.setStatistic(getHandle().getStats(), statistic, entityType, newValue, getHandle());
+        CraftStatistic.setStatistic(this.getHandle().getStats(), statistic, entityType, newValue, this.getHandle());
     }
 
     @Override
     public void setPlayerTime(long time, boolean relative) {
-        getHandle().timeOffset = time;
-        getHandle().relativeTime = relative;
+        this.getHandle().timeOffset = time;
+        this.getHandle().relativeTime = relative;
     }
 
     @Override
     public long getPlayerTimeOffset() {
-        return getHandle().timeOffset;
+        return this.getHandle().timeOffset;
     }
 
     @Override
     public long getPlayerTime() {
-        return getHandle().getPlayerTime();
+        return this.getHandle().getPlayerTime();
     }
 
     @Override
     public boolean isPlayerTimeRelative() {
-        return getHandle().relativeTime;
+        return this.getHandle().relativeTime;
     }
 
     @Override
     public void resetPlayerTime() {
-        setPlayerTime(0, true);
+        this.setPlayerTime(0, true);
     }
 
     @Override
     public void setPlayerWeather(WeatherType type) {
-        getHandle().setPlayerWeather(type, true);
+        this.getHandle().setPlayerWeather(type, true);
     }
 
     @Override
     public WeatherType getPlayerWeather() {
-        return getHandle().getPlayerWeather();
+        return this.getHandle().getPlayerWeather();
     }
 
     @Override
     public int getExpCooldown() {
-        return getHandle().takeXpDelay;
+        return this.getHandle().takeXpDelay;
     }
 
     @Override
     public void setExpCooldown(int ticks) {
-        getHandle().takeXpDelay = CraftEventFactory.callPlayerXpCooldownEvent(this.getHandle(), ticks, PlayerExpCooldownChangeEvent.ChangeReason.PLUGIN).getNewCooldown();
+        this.getHandle().takeXpDelay = CraftEventFactory.callPlayerXpCooldownEvent(this.getHandle(), ticks, PlayerExpCooldownChangeEvent.ChangeReason.PLUGIN).getNewCooldown();
     }
 
     @Override
     public void resetPlayerWeather() {
-        getHandle().resetPlayerWeather();
+        this.getHandle().resetPlayerWeather();
     }
 
     @Override
     public boolean isBanned() {
-        return ((ProfileBanList) server.getBanList(BanList.Type.PROFILE)).isBanned(getPlayerProfile());
+        return ((ProfileBanList) this.server.getBanList(BanList.Type.PROFILE)).isBanned(this.getPlayerProfile());
     }
 
     @Override
@@ -1374,17 +1370,17 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
 
     @Override
     public BanEntry<PlayerProfile> ban(String reason, Instant expires, String source) {
-        return ban(reason, expires != null ? Date.from(expires) : null, source);
+        return this.ban(reason, expires != null ? Date.from(expires) : null, source);
     }
 
     @Override
     public BanEntry<PlayerProfile> ban(String reason, Duration duration, String source) {
-        return ban(reason, duration != null ? Instant.now().plus(duration) : null, source);
+        return this.ban(reason, duration != null ? Instant.now().plus(duration) : null, source);
     }
 
     @Override
     public BanEntry<PlayerProfile> ban(String reason, Date expires, String source, boolean kickPlayer) {
-        BanEntry<PlayerProfile> banEntry = ((ProfileBanList) server.getBanList(BanList.Type.PROFILE)).addBan(getPlayerProfile(), reason, expires, source);
+        BanEntry<PlayerProfile> banEntry = ((ProfileBanList) this.server.getBanList(BanList.Type.PROFILE)).addBan(this.getPlayerProfile(), reason, expires, source);
         if (kickPlayer) {
             this.kickPlayer(reason);
         }
@@ -1393,18 +1389,18 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
 
     @Override
     public BanEntry<PlayerProfile> ban(String reason, Instant instant, String source, boolean kickPlayer) {
-        return ban(reason, instant != null ? Date.from(instant) : null, source, kickPlayer);
+        return this.ban(reason, instant != null ? Date.from(instant) : null, source, kickPlayer);
     }
 
     @Override
     public BanEntry<PlayerProfile> ban(String reason, Duration duration, String source, boolean kickPlayer) {
-        return ban(reason, duration != null ? Instant.now().plus(duration) : null, source, kickPlayer);
+        return this.ban(reason, duration != null ? Instant.now().plus(duration) : null, source, kickPlayer);
     }
 
     @Override
     public BanEntry<InetAddress> banIp(String reason, Date expires, String source, boolean kickPlayer) {
-        Preconditions.checkArgument(getAddress() != null, "The Address of this Player is null");
-        BanEntry<InetAddress> banEntry = ((IpBanList) server.getBanList(BanList.Type.IP)).addBan(getAddress().getAddress(), reason, expires, source);
+        Preconditions.checkArgument(this.getAddress() != null, "The Address of this Player is null");
+        BanEntry<InetAddress> banEntry = ((IpBanList) this.server.getBanList(BanList.Type.IP)).addBan(this.getAddress().getAddress(), reason, expires, source);
         if (kickPlayer) {
             this.kickPlayer(reason);
         }
@@ -1413,96 +1409,96 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
 
     @Override
     public BanEntry<InetAddress> banIp(String reason, Instant instant, String source, boolean kickPlayer) {
-        return banIp(reason, instant != null ? Date.from(instant) : null, source, kickPlayer);
+        return this.banIp(reason, instant != null ? Date.from(instant) : null, source, kickPlayer);
     }
 
     @Override
     public BanEntry<InetAddress> banIp(String reason, Duration duration, String source, boolean kickPlayer) {
-        return banIp(reason, duration != null ? Instant.now().plus(duration) : null, source, kickPlayer);
+        return this.banIp(reason, duration != null ? Instant.now().plus(duration) : null, source, kickPlayer);
     }
 
     @Override
     public boolean isWhitelisted() {
-        return server.getHandle().getWhiteList().isWhiteListed(getProfile());
+        return this.server.getHandle().getWhiteList().isWhiteListed(this.getProfile());
     }
 
     @Override
     public void setWhitelisted(boolean value) {
         if (value) {
-            server.getHandle().getWhiteList().add(new WhiteListEntry(getProfile()));
+            this.server.getHandle().getWhiteList().add(new UserWhiteListEntry(this.getProfile()));
         } else {
-            server.getHandle().getWhiteList().remove(getProfile());
+            this.server.getHandle().getWhiteList().remove(this.getProfile());
         }
     }
 
     @Override
     public void setGameMode(GameMode mode) {
         Preconditions.checkArgument(mode != null, "GameMode cannot be null");
-        if (getHandle().connection == null) return;
+        if (this.getHandle().connection == null) return;
 
-        getHandle().setGameMode(EnumGamemode.byId(mode.getValue()));
+        this.getHandle().setGameMode(GameType.byId(mode.getValue()));
     }
 
     @Override
     public GameMode getGameMode() {
-        return GameMode.getByValue(getHandle().gameMode.getGameModeForPlayer().getId());
+        return GameMode.getByValue(this.getHandle().gameMode.getGameModeForPlayer().getId());
     }
 
     @Override
     public GameMode getPreviousGameMode() {
-        EnumGamemode previousGameMode = getHandle().gameMode.getPreviousGameModeForPlayer();
+        GameType previousGameMode = this.getHandle().gameMode.getPreviousGameModeForPlayer();
 
         return (previousGameMode == null) ? null : GameMode.getByValue(previousGameMode.getId());
     }
 
     @Override
     public void giveExp(int exp) {
-        getHandle().giveExperiencePoints(exp);
+        this.getHandle().giveExperiencePoints(exp);
     }
 
     @Override
     public void giveExpLevels(int levels) {
-        getHandle().giveExperienceLevels(levels);
+        this.getHandle().giveExperienceLevels(levels);
     }
 
     @Override
     public float getExp() {
-        return getHandle().experienceProgress;
+        return this.getHandle().experienceProgress;
     }
 
     @Override
     public void setExp(float exp) {
         Preconditions.checkArgument(exp >= 0.0 && exp <= 1.0, "Experience progress must be between 0.0 and 1.0 (%s)", exp);
-        getHandle().experienceProgress = exp;
-        getHandle().lastSentExp = -1;
+        this.getHandle().experienceProgress = exp;
+        this.getHandle().lastSentExp = -1;
     }
 
     @Override
     public int getLevel() {
-        return getHandle().experienceLevel;
+        return this.getHandle().experienceLevel;
     }
 
     @Override
     public void setLevel(int level) {
         Preconditions.checkArgument(level >= 0, "Experience level must not be negative (%s)", level);
-        getHandle().experienceLevel = level;
-        getHandle().lastSentExp = -1;
+        this.getHandle().experienceLevel = level;
+        this.getHandle().lastSentExp = -1;
     }
 
     @Override
     public int getTotalExperience() {
-        return getHandle().totalExperience;
+        return this.getHandle().totalExperience;
     }
 
     @Override
     public void setTotalExperience(int exp) {
         Preconditions.checkArgument(exp >= 0, "Total experience points must not be negative (%s)", exp);
-        getHandle().totalExperience = exp;
+        this.getHandle().totalExperience = exp;
     }
 
     @Override
     public void sendExperienceChange(float progress) {
-        sendExperienceChange(progress, getLevel());
+        this.sendExperienceChange(progress, this.getLevel());
     }
 
     @Override
@@ -1510,28 +1506,28 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         Preconditions.checkArgument(progress >= 0.0 && progress <= 1.0, "Experience progress must be between 0.0 and 1.0 (%s)", progress);
         Preconditions.checkArgument(level >= 0, "Experience level must not be negative (%s)", level);
 
-        if (getHandle().connection == null) {
+        if (this.getHandle().connection == null) {
             return;
         }
 
-        PacketPlayOutExperience packet = new PacketPlayOutExperience(progress, getTotalExperience(), level);
-        getHandle().connection.send(packet);
+        ClientboundSetExperiencePacket packet = new ClientboundSetExperiencePacket(progress, this.getTotalExperience(), level);
+        this.getHandle().connection.send(packet);
     }
 
     @Nullable
     private static WeakReference<Plugin> getPluginWeakReference(@Nullable Plugin plugin) {
-        return (plugin == null) ? null : pluginWeakReferences.computeIfAbsent(plugin, WeakReference::new);
+        return (plugin == null) ? null : CraftPlayer.pluginWeakReferences.computeIfAbsent(plugin, WeakReference::new);
     }
 
     @Override
     @Deprecated
     public void hidePlayer(Player player) {
-        hideEntity0(null, player);
+        this.hideEntity0(null, player);
     }
 
     @Override
     public void hidePlayer(Plugin plugin, Player player) {
-        hideEntity(plugin, player);
+        this.hideEntity(plugin, player);
     }
 
     @Override
@@ -1539,81 +1535,81 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         Preconditions.checkArgument(plugin != null, "Plugin cannot be null");
         Preconditions.checkArgument(plugin.isEnabled(), "Plugin (%s) cannot be disabled", plugin.getName());
 
-        hideEntity0(plugin, entity);
+        this.hideEntity0(plugin, entity);
     }
 
     private void hideEntity0(@Nullable Plugin plugin, org.bukkit.entity.Entity entity) {
         Preconditions.checkArgument(entity != null, "Entity hidden cannot be null");
-        if (getHandle().connection == null) return;
-        if (equals(entity)) return;
+        if (this.getHandle().connection == null) return;
+        if (this.equals(entity)) return;
 
         boolean shouldHide;
         if (entity.isVisibleByDefault()) {
-            shouldHide = addInvertedVisibility(plugin, entity);
+            shouldHide = this.addInvertedVisibility(plugin, entity);
         } else {
-            shouldHide = removeInvertedVisibility(plugin, entity);
+            shouldHide = this.removeInvertedVisibility(plugin, entity);
         }
 
         if (shouldHide) {
-            untrackAndHideEntity(entity);
+            this.untrackAndHideEntity(entity);
         }
     }
 
     private boolean addInvertedVisibility(@Nullable Plugin plugin, org.bukkit.entity.Entity entity) {
-        Set<WeakReference<Plugin>> invertedPlugins = invertedVisibilityEntities.get(entity.getUniqueId());
+        Set<WeakReference<Plugin>> invertedPlugins = this.invertedVisibilityEntities.get(entity.getUniqueId());
         if (invertedPlugins != null) {
             // Some plugins are already inverting the entity. Just mark that this
             // plugin wants the entity inverted too and end.
-            invertedPlugins.add(getPluginWeakReference(plugin));
+            invertedPlugins.add(CraftPlayer.getPluginWeakReference(plugin));
             return false;
         }
         invertedPlugins = new HashSet<>();
-        invertedPlugins.add(getPluginWeakReference(plugin));
-        invertedVisibilityEntities.put(entity.getUniqueId(), invertedPlugins);
+        invertedPlugins.add(CraftPlayer.getPluginWeakReference(plugin));
+        this.invertedVisibilityEntities.put(entity.getUniqueId(), invertedPlugins);
 
         return true;
     }
 
     private void untrackAndHideEntity(org.bukkit.entity.Entity entity) {
         // Remove this entity from the hidden player's EntityTrackerEntry
-        PlayerChunkMap tracker = ((WorldServer) getHandle().level()).getChunkSource().chunkMap;
+        ChunkMap tracker = ((ServerLevel) this.getHandle().level()).getChunkSource().chunkMap;
         Entity other = ((CraftEntity) entity).getHandle();
-        PlayerChunkMap.EntityTracker entry = tracker.entityMap.get(other.getId());
+        ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId());
         if (entry != null) {
-            entry.removePlayer(getHandle());
+            entry.removePlayer(this.getHandle());
         }
 
         // Remove the hidden entity from this player user list, if they're on it
-        if (other instanceof EntityPlayer) {
-            EntityPlayer otherPlayer = (EntityPlayer) other;
+        if (other instanceof ServerPlayer) {
+            ServerPlayer otherPlayer = (ServerPlayer) other;
             if (otherPlayer.sentListPacket) {
-                getHandle().connection.send(new ClientboundPlayerInfoRemovePacket(List.of(otherPlayer.getUUID())));
+                this.getHandle().connection.send(new ClientboundPlayerInfoRemovePacket(List.of(otherPlayer.getUUID())));
             }
         }
 
-        server.getPluginManager().callEvent(new PlayerHideEntityEvent(this, entity));
+        this.server.getPluginManager().callEvent(new PlayerHideEntityEvent(this, entity));
     }
 
     void resetAndHideEntity(org.bukkit.entity.Entity entity) {
         // SPIGOT-7312: Can't show/hide self
-        if (equals(entity)) {
+        if (this.equals(entity)) {
             return;
         }
 
-        if (invertedVisibilityEntities.remove(entity.getUniqueId()) == null) {
-            untrackAndHideEntity(entity);
+        if (this.invertedVisibilityEntities.remove(entity.getUniqueId()) == null) {
+            this.untrackAndHideEntity(entity);
         }
     }
 
     @Override
     @Deprecated
     public void showPlayer(Player player) {
-        showEntity0(null, player);
+        this.showEntity0(null, player);
     }
 
     @Override
     public void showPlayer(Plugin plugin, Player player) {
-        showEntity(plugin, player);
+        this.showEntity(plugin, player);
     }
 
     @Override
@@ -1621,93 +1617,93 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         Preconditions.checkArgument(plugin != null, "Plugin cannot be null");
         // Don't require that plugin be enabled. A plugin must be allowed to call
         // showPlayer during its onDisable() method.
-        showEntity0(plugin, entity);
+        this.showEntity0(plugin, entity);
     }
 
     private void showEntity0(@Nullable Plugin plugin, org.bukkit.entity.Entity entity) {
         Preconditions.checkArgument(entity != null, "Entity show cannot be null");
-        if (getHandle().connection == null) return;
-        if (equals(entity)) return;
+        if (this.getHandle().connection == null) return;
+        if (this.equals(entity)) return;
 
         boolean shouldShow;
         if (entity.isVisibleByDefault()) {
-            shouldShow = removeInvertedVisibility(plugin, entity);
+            shouldShow = this.removeInvertedVisibility(plugin, entity);
         } else {
-            shouldShow = addInvertedVisibility(plugin, entity);
+            shouldShow = this.addInvertedVisibility(plugin, entity);
         }
 
         if (shouldShow) {
-            trackAndShowEntity(entity);
+            this.trackAndShowEntity(entity);
         }
     }
 
     private boolean removeInvertedVisibility(@Nullable Plugin plugin, org.bukkit.entity.Entity entity) {
-        Set<WeakReference<Plugin>> invertedPlugins = invertedVisibilityEntities.get(entity.getUniqueId());
+        Set<WeakReference<Plugin>> invertedPlugins = this.invertedVisibilityEntities.get(entity.getUniqueId());
         if (invertedPlugins == null) {
             return false; // Entity isn't inverted
         }
-        invertedPlugins.remove(getPluginWeakReference(plugin));
+        invertedPlugins.remove(CraftPlayer.getPluginWeakReference(plugin));
         if (!invertedPlugins.isEmpty()) {
             return false; // Some other plugins still want the entity inverted
         }
-        invertedVisibilityEntities.remove(entity.getUniqueId());
+        this.invertedVisibilityEntities.remove(entity.getUniqueId());
 
         return true;
     }
 
     private void trackAndShowEntity(org.bukkit.entity.Entity entity) {
-        PlayerChunkMap tracker = ((WorldServer) getHandle().level()).getChunkSource().chunkMap;
+        ChunkMap tracker = ((ServerLevel) this.getHandle().level()).getChunkSource().chunkMap;
         Entity other = ((CraftEntity) entity).getHandle();
 
-        if (other instanceof EntityPlayer) {
-            EntityPlayer otherPlayer = (EntityPlayer) other;
-            getHandle().connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(otherPlayer)));
+        if (other instanceof ServerPlayer) {
+            ServerPlayer otherPlayer = (ServerPlayer) other;
+            this.getHandle().connection.send(ClientboundPlayerInfoUpdatePacket.createPlayerInitializing(List.of(otherPlayer)));
         }
 
-        PlayerChunkMap.EntityTracker entry = tracker.entityMap.get(other.getId());
-        if (entry != null && !entry.seenBy.contains(getHandle().connection)) {
-            entry.updatePlayer(getHandle());
+        ChunkMap.TrackedEntity entry = tracker.entityMap.get(other.getId());
+        if (entry != null && !entry.seenBy.contains(this.getHandle().connection)) {
+            entry.updatePlayer(this.getHandle());
         }
 
-        server.getPluginManager().callEvent(new PlayerShowEntityEvent(this, entity));
+        this.server.getPluginManager().callEvent(new PlayerShowEntityEvent(this, entity));
     }
 
     void resetAndShowEntity(org.bukkit.entity.Entity entity) {
         // SPIGOT-7312: Can't show/hide self
-        if (equals(entity)) {
+        if (this.equals(entity)) {
             return;
         }
 
-        if (invertedVisibilityEntities.remove(entity.getUniqueId()) == null) {
-            trackAndShowEntity(entity);
+        if (this.invertedVisibilityEntities.remove(entity.getUniqueId()) == null) {
+            this.trackAndShowEntity(entity);
         }
     }
 
     public void onEntityRemove(Entity entity) {
-        invertedVisibilityEntities.remove(entity.getUUID());
+        this.invertedVisibilityEntities.remove(entity.getUUID());
     }
 
     @Override
     public boolean canSee(Player player) {
-        return canSee((org.bukkit.entity.Entity) player);
+        return this.canSee((org.bukkit.entity.Entity) player);
     }
 
     @Override
     public boolean canSee(org.bukkit.entity.Entity entity) {
-        return equals(entity) || entity.isVisibleByDefault() ^ invertedVisibilityEntities.containsKey(entity.getUniqueId()); // SPIGOT-7312: Can always see self
+        return this.equals(entity) || entity.isVisibleByDefault() ^ this.invertedVisibilityEntities.containsKey(entity.getUniqueId()); // SPIGOT-7312: Can always see self
     }
 
     public boolean canSeePlayer(UUID uuid) {
-        org.bukkit.entity.Entity entity = getServer().getPlayer(uuid);
+        org.bukkit.entity.Entity entity = this.getServer().getPlayer(uuid);
 
-        return (entity != null) ? canSee(entity) : false; // If we can't find it, we can't see it
+        return (entity != null) ? this.canSee(entity) : false; // If we can't find it, we can't see it
     }
 
     @Override
     public Map<String, Object> serialize() {
         Map<String, Object> result = new LinkedHashMap<String, Object>();
 
-        result.put("name", getName());
+        result.put("name", this.getName());
 
         return result;
     }
@@ -1718,58 +1714,58 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
     }
 
     @Override
-    public EntityPlayer getHandle() {
-        return (EntityPlayer) entity;
+    public ServerPlayer getHandle() {
+        return (ServerPlayer) this.entity;
     }
 
-    public void setHandle(final EntityPlayer entity) {
+    public void setHandle(final ServerPlayer entity) {
         super.setHandle(entity);
     }
 
     @Override
     public String toString() {
-        return "CraftPlayer{" + "name=" + getName() + '}';
+        return "CraftPlayer{" + "name=" + this.getName() + '}';
     }
 
     @Override
     public int hashCode() {
-        if (hash == 0 || hash == 485) {
-            hash = 97 * 5 + (this.getUniqueId() != null ? this.getUniqueId().hashCode() : 0);
+        if (this.hash == 0 || this.hash == 485) {
+            this.hash = 97 * 5 + (this.getUniqueId() != null ? this.getUniqueId().hashCode() : 0);
         }
-        return hash;
+        return this.hash;
     }
 
     @Override
     public long getFirstPlayed() {
-        return firstPlayed;
+        return this.firstPlayed;
     }
 
     @Override
     public long getLastPlayed() {
-        return lastPlayed;
+        return this.lastPlayed;
     }
 
     @Override
     public boolean hasPlayedBefore() {
-        return hasPlayedBefore;
+        return this.hasPlayedBefore;
     }
 
     public void setFirstPlayed(long firstPlayed) {
         this.firstPlayed = firstPlayed;
     }
 
-    public void readExtraData(NBTTagCompound nbttagcompound) {
-        hasPlayedBefore = true;
+    public void readExtraData(CompoundTag nbttagcompound) {
+        this.hasPlayedBefore = true;
         if (nbttagcompound.contains("bukkit")) {
-            NBTTagCompound data = nbttagcompound.getCompound("bukkit");
+            CompoundTag data = nbttagcompound.getCompound("bukkit");
 
             if (data.contains("firstPlayed")) {
-                firstPlayed = data.getLong("firstPlayed");
-                lastPlayed = data.getLong("lastPlayed");
+                this.firstPlayed = data.getLong("firstPlayed");
+                this.lastPlayed = data.getLong("lastPlayed");
             }
 
             if (data.contains("newExp")) {
-                EntityPlayer handle = getHandle();
+                ServerPlayer handle = this.getHandle();
                 handle.newExp = data.getInt("newExp");
                 handle.newTotalExp = data.getInt("newTotalExp");
                 handle.newLevel = data.getInt("newLevel");
@@ -1779,94 +1775,94 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         }
     }
 
-    public void setExtraData(NBTTagCompound nbttagcompound) {
+    public void setExtraData(CompoundTag nbttagcompound) {
         if (!nbttagcompound.contains("bukkit")) {
-            nbttagcompound.put("bukkit", new NBTTagCompound());
+            nbttagcompound.put("bukkit", new CompoundTag());
         }
 
-        NBTTagCompound data = nbttagcompound.getCompound("bukkit");
-        EntityPlayer handle = getHandle();
+        CompoundTag data = nbttagcompound.getCompound("bukkit");
+        ServerPlayer handle = this.getHandle();
         data.putInt("newExp", handle.newExp);
         data.putInt("newTotalExp", handle.newTotalExp);
         data.putInt("newLevel", handle.newLevel);
         data.putInt("expToDrop", handle.expToDrop);
         data.putBoolean("keepLevel", handle.keepLevel);
-        data.putLong("firstPlayed", getFirstPlayed());
+        data.putLong("firstPlayed", this.getFirstPlayed());
         data.putLong("lastPlayed", System.currentTimeMillis());
         data.putString("lastKnownName", handle.getScoreboardName());
     }
 
     @Override
     public boolean beginConversation(Conversation conversation) {
-        return conversationTracker.beginConversation(conversation);
+        return this.conversationTracker.beginConversation(conversation);
     }
 
     @Override
     public void abandonConversation(Conversation conversation) {
-        conversationTracker.abandonConversation(conversation, new ConversationAbandonedEvent(conversation, new ManuallyAbandonedConversationCanceller()));
+        this.conversationTracker.abandonConversation(conversation, new ConversationAbandonedEvent(conversation, new ManuallyAbandonedConversationCanceller()));
     }
 
     @Override
     public void abandonConversation(Conversation conversation, ConversationAbandonedEvent details) {
-        conversationTracker.abandonConversation(conversation, details);
+        this.conversationTracker.abandonConversation(conversation, details);
     }
 
     @Override
     public void acceptConversationInput(String input) {
-        conversationTracker.acceptConversationInput(input);
+        this.conversationTracker.acceptConversationInput(input);
     }
 
     @Override
     public boolean isConversing() {
-        return conversationTracker.isConversing();
+        return this.conversationTracker.isConversing();
     }
 
     @Override
     public void sendPluginMessage(Plugin source, String channel, byte[] message) {
-        StandardMessenger.validatePluginMessage(server.getMessenger(), source, channel, message);
-        if (getHandle().connection == null) return;
+        StandardMessenger.validatePluginMessage(this.server.getMessenger(), source, channel, message);
+        if (this.getHandle().connection == null) return;
 
-        if (channels.contains(channel)) {
-            MinecraftKey id = MinecraftKey.parse(StandardMessenger.validateAndCorrectChannel(channel));
-            sendCustomPayload(id, message);
+        if (this.channels.contains(channel)) {
+            ResourceLocation id = ResourceLocation.parse(StandardMessenger.validateAndCorrectChannel(channel));
+            this.sendCustomPayload(id, message);
         }
     }
 
-    private void sendCustomPayload(MinecraftKey id, byte[] message) {
+    private void sendCustomPayload(ResourceLocation id, byte[] message) {
         ClientboundCustomPayloadPacket packet = new ClientboundCustomPayloadPacket(new DiscardedPayload(id, Unpooled.wrappedBuffer(message)));
-        getHandle().connection.send(packet);
+        this.getHandle().connection.send(packet);
     }
 
     @Override
     public void setTexturePack(String url) {
-        setResourcePack(url);
+        this.setResourcePack(url);
     }
 
     @Override
     public void setResourcePack(String url) {
-        setResourcePack(url, null);
+        this.setResourcePack(url, null);
     }
 
     @Override
     public void setResourcePack(String url, byte[] hash) {
-        setResourcePack(url, hash, false);
+        this.setResourcePack(url, hash, false);
     }
 
     @Override
     public void setResourcePack(String url, byte[] hash, String prompt) {
-        setResourcePack(url, hash, prompt, false);
+        this.setResourcePack(url, hash, prompt, false);
     }
 
     @Override
     public void setResourcePack(String url, byte[] hash, boolean force) {
-        setResourcePack(url, hash, null, force);
+        this.setResourcePack(url, hash, null, force);
     }
 
     @Override
     public void setResourcePack(String url, byte[] hash, String prompt, boolean force) {
         Preconditions.checkArgument(url != null, "Resource pack URL cannot be null");
 
-        setResourcePack(UUID.nameUUIDFromBytes(url.getBytes(StandardCharsets.UTF_8)), url, hash, prompt, force);
+        this.setResourcePack(UUID.nameUUIDFromBytes(url.getBytes(StandardCharsets.UTF_8)), url, hash, prompt, force);
     }
 
     @Override
@@ -1899,48 +1895,48 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
     @Override
     public void removeResourcePack(UUID id) {
         Preconditions.checkArgument(id != null, "Resource pack id cannot be null");
-        if (getHandle().connection == null) return;
-        getHandle().connection.send(new ClientboundResourcePackPopPacket(Optional.of(id)));
+        if (this.getHandle().connection == null) return;
+        this.getHandle().connection.send(new ClientboundResourcePackPopPacket(Optional.of(id)));
     }
 
     @Override
     public void removeResourcePacks() {
-        if (getHandle().connection == null) return;
-        getHandle().connection.send(new ClientboundResourcePackPopPacket(Optional.empty()));
+        if (this.getHandle().connection == null) return;
+        this.getHandle().connection.send(new ClientboundResourcePackPopPacket(Optional.empty()));
     }
 
     private void handlePushResourcePack(ClientboundResourcePackPushPacket resourcePackPushPacket, boolean resetBeforePush) {
-        if (getHandle().connection == null) return;
+        if (this.getHandle().connection == null) return;
 
         if (resetBeforePush) {
             this.removeResourcePacks();
         }
-        getHandle().connection.send(resourcePackPushPacket);
+        this.getHandle().connection.send(resourcePackPushPacket);
     }
 
     public void addChannel(String channel) {
-        Preconditions.checkState(channels.size() < 128, "Cannot register channel '%s'. Too many channels registered!", channel);
+        Preconditions.checkState(this.channels.size() < 128, "Cannot register channel '%s'. Too many channels registered!", channel);
         channel = StandardMessenger.validateAndCorrectChannel(channel);
-        if (channels.add(channel)) {
-            server.getPluginManager().callEvent(new PlayerRegisterChannelEvent(this, channel));
+        if (this.channels.add(channel)) {
+            this.server.getPluginManager().callEvent(new PlayerRegisterChannelEvent(this, channel));
         }
     }
 
     public void removeChannel(String channel) {
         channel = StandardMessenger.validateAndCorrectChannel(channel);
-        if (channels.remove(channel)) {
-            server.getPluginManager().callEvent(new PlayerUnregisterChannelEvent(this, channel));
+        if (this.channels.remove(channel)) {
+            this.server.getPluginManager().callEvent(new PlayerUnregisterChannelEvent(this, channel));
         }
     }
 
     @Override
     public Set<String> getListeningPluginChannels() {
-        return ImmutableSet.copyOf(channels);
+        return ImmutableSet.copyOf(this.channels);
     }
 
     public void sendSupportedChannels() {
-        if (getHandle().connection == null) return;
-        Set<String> listening = server.getMessenger().getIncomingChannels();
+        if (this.getHandle().connection == null) return;
+        Set<String> listening = this.server.getMessenger().getIncomingChannels();
 
         if (!listening.isEmpty()) {
             ByteArrayOutputStream stream = new ByteArrayOutputStream();
@@ -1950,37 +1946,37 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
                     stream.write(channel.getBytes("UTF8"));
                     stream.write((byte) 0);
                 } catch (IOException ex) {
-                    Logger.getLogger(CraftPlayer.class.getName()).log(Level.SEVERE, "Could not send Plugin Channel REGISTER to " + getName(), ex);
+                    Logger.getLogger(CraftPlayer.class.getName()).log(Level.SEVERE, "Could not send Plugin Channel REGISTER to " + this.getName(), ex);
                 }
             }
 
-            sendCustomPayload(MinecraftKey.withDefaultNamespace("register"), stream.toByteArray());
+            this.sendCustomPayload(ResourceLocation.withDefaultNamespace("register"), stream.toByteArray());
         }
     }
 
     @Override
     public void setMetadata(String metadataKey, MetadataValue newMetadataValue) {
-        server.getPlayerMetadata().setMetadata(this, metadataKey, newMetadataValue);
+        this.server.getPlayerMetadata().setMetadata(this, metadataKey, newMetadataValue);
     }
 
     @Override
     public List<MetadataValue> getMetadata(String metadataKey) {
-        return server.getPlayerMetadata().getMetadata(this, metadataKey);
+        return this.server.getPlayerMetadata().getMetadata(this, metadataKey);
     }
 
     @Override
     public boolean hasMetadata(String metadataKey) {
-        return server.getPlayerMetadata().hasMetadata(this, metadataKey);
+        return this.server.getPlayerMetadata().hasMetadata(this, metadataKey);
     }
 
     @Override
     public void removeMetadata(String metadataKey, Plugin owningPlugin) {
-        server.getPlayerMetadata().removeMetadata(this, metadataKey, owningPlugin);
+        this.server.getPlayerMetadata().removeMetadata(this, metadataKey, owningPlugin);
     }
 
     @Override
     public boolean setWindowProperty(Property prop, int value) {
-        Container container = getHandle().containerMenu;
+        AbstractContainerMenu container = this.getHandle().containerMenu;
         if (container.getBukkitView().getType() != prop.getType()) {
             return false;
         }
@@ -1989,44 +1985,44 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
     }
 
     public void disconnect(String reason) {
-        conversationTracker.abandonAllConversations();
-        perm.clearPermissions();
+        this.conversationTracker.abandonAllConversations();
+        this.perm.clearPermissions();
     }
 
     @Override
     public boolean isFlying() {
-        return getHandle().getAbilities().flying;
+        return this.getHandle().getAbilities().flying;
     }
 
     @Override
     public void setFlying(boolean value) {
-        if (!getAllowFlight()) {
+        if (!this.getAllowFlight()) {
             Preconditions.checkArgument(!value, "Player is not allowed to fly (check #getAllowFlight())");
         }
 
-        getHandle().getAbilities().flying = value;
-        getHandle().onUpdateAbilities();
+        this.getHandle().getAbilities().flying = value;
+        this.getHandle().onUpdateAbilities();
     }
 
     @Override
     public boolean getAllowFlight() {
-        return getHandle().getAbilities().mayfly;
+        return this.getHandle().getAbilities().mayfly;
     }
 
     @Override
     public void setAllowFlight(boolean value) {
-        if (isFlying() && !value) {
-            getHandle().getAbilities().flying = false;
+        if (this.isFlying() && !value) {
+            this.getHandle().getAbilities().flying = false;
         }
 
-        getHandle().getAbilities().mayfly = value;
-        getHandle().onUpdateAbilities();
+        this.getHandle().getAbilities().mayfly = value;
+        this.getHandle().onUpdateAbilities();
     }
 
     @Override
     public void setFlySpeed(float value) {
-        validateSpeed(value);
-        EntityPlayer player = getHandle();
+        this.validateSpeed(value);
+        ServerPlayer player = this.getHandle();
         player.getAbilities().flyingSpeed = value / 2f;
         player.onUpdateAbilities();
 
@@ -2034,21 +2030,21 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
 
     @Override
     public void setWalkSpeed(float value) {
-        validateSpeed(value);
-        EntityPlayer player = getHandle();
+        this.validateSpeed(value);
+        ServerPlayer player = this.getHandle();
         player.getAbilities().walkingSpeed = value / 2f;
         player.onUpdateAbilities();
-        getHandle().getAttribute(GenericAttributes.MOVEMENT_SPEED).setBaseValue(player.getAbilities().walkingSpeed); // SPIGOT-5833: combination of the two in 1.16+
+        this.getHandle().getAttribute(Attributes.MOVEMENT_SPEED).setBaseValue(player.getAbilities().walkingSpeed); // SPIGOT-5833: combination of the two in 1.16+
     }
 
     @Override
     public float getFlySpeed() {
-        return (float) getHandle().getAbilities().flyingSpeed * 2f;
+        return (float) this.getHandle().getAbilities().flyingSpeed * 2f;
     }
 
     @Override
     public float getWalkSpeed() {
-        return getHandle().getAbilities().walkingSpeed * 2f;
+        return this.getHandle().getAbilities().walkingSpeed * 2f;
     }
 
     private void validateSpeed(float value) {
@@ -2059,13 +2055,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
     public void setMaxHealth(double amount) {
         super.setMaxHealth(amount);
         this.health = Math.min(this.health, amount);
-        getHandle().resetSentInfo();
+        this.getHandle().resetSentInfo();
     }
 
     @Override
     public void resetMaxHealth() {
         super.resetMaxHealth();
-        getHandle().resetSentInfo();
+        this.getHandle().resetSentInfo();
     }
 
     @Override
@@ -2076,7 +2072,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
     @Override
     public void setScoreboard(Scoreboard scoreboard) {
         Preconditions.checkArgument(scoreboard != null, "Scoreboard cannot be null");
-        Preconditions.checkState(getHandle().connection != null, "Cannot set scoreboard yet (invalid player connection)");
+        Preconditions.checkState(this.getHandle().connection != null, "Cannot set scoreboard yet (invalid player connection)");
 
         this.server.getScoreboardManager().setPlayerBoard(this, scoreboard);
     }
@@ -2084,35 +2080,35 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
     @Override
     public void setHealthScale(double value) {
         Preconditions.checkArgument(value > 0F, "Health value (%s) must be greater than 0", value);
-        healthScale = value;
-        scaledHealth = true;
-        updateScaledHealth();
+        this.healthScale = value;
+        this.scaledHealth = true;
+        this.updateScaledHealth();
     }
 
     @Override
     public double getHealthScale() {
-        return healthScale;
+        return this.healthScale;
     }
 
     @Override
     public void setHealthScaled(boolean scale) {
-        if (scaledHealth != (scaledHealth = scale)) {
-            updateScaledHealth();
+        if (this.scaledHealth != (this.scaledHealth = scale)) {
+            this.updateScaledHealth();
         }
     }
 
     @Override
     public boolean isHealthScaled() {
-        return scaledHealth;
+        return this.scaledHealth;
     }
 
     public float getScaledHealth() {
-        return (float) (isHealthScaled() ? getHealth() * getHealthScale() / getMaxHealth() : getHealth());
+        return (float) (this.isHealthScaled() ? this.getHealth() * this.getHealthScale() / this.getMaxHealth() : this.getHealth());
     }
 
     @Override
     public double getHealth() {
-        return health;
+        return this.health;
     }
 
     public void setRealHealth(double health) {
@@ -2120,161 +2116,161 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
     }
 
     public void updateScaledHealth() {
-        updateScaledHealth(true);
+        this.updateScaledHealth(true);
     }
 
     public void updateScaledHealth(boolean sendHealth) {
-        AttributeMapBase attributemapserver = getHandle().getAttributes();
-        Collection<AttributeModifiable> set = attributemapserver.getSyncableAttributes();
+        AttributeMap attributemapserver = this.getHandle().getAttributes();
+        Collection<AttributeInstance> set = attributemapserver.getSyncableAttributes();
 
-        injectScaledMaxHealth(set, true);
+        this.injectScaledMaxHealth(set, true);
 
         // SPIGOT-3813: Attributes before health
-        if (getHandle().connection != null) {
-            getHandle().connection.send(new PacketPlayOutUpdateAttributes(getHandle().getId(), set));
+        if (this.getHandle().connection != null) {
+            this.getHandle().connection.send(new ClientboundUpdateAttributesPacket(this.getHandle().getId(), set));
             if (sendHealth) {
-                sendHealthUpdate();
+                this.sendHealthUpdate();
             }
         }
-        getHandle().getEntityData().set(EntityLiving.DATA_HEALTH_ID, (float) getScaledHealth());
+        this.getHandle().getEntityData().set(net.minecraft.world.entity.LivingEntity.DATA_HEALTH_ID, (float) this.getScaledHealth());
 
-        getHandle().maxHealthCache = getMaxHealth();
+        this.getHandle().maxHealthCache = this.getMaxHealth();
     }
 
     @Override
     public void sendHealthUpdate(double health, int foodLevel, float saturation) {
-        getHandle().connection.send(new PacketPlayOutUpdateHealth((float) health, foodLevel, saturation));
+        this.getHandle().connection.send(new ClientboundSetHealthPacket((float) health, foodLevel, saturation));
     }
 
     @Override
     public void sendHealthUpdate() {
-        FoodMetaData foodData = getHandle().getFoodData();
-        sendHealthUpdate(getScaledHealth(), foodData.getFoodLevel(), foodData.getSaturationLevel());
+        FoodData foodData = this.getHandle().getFoodData();
+        this.sendHealthUpdate(this.getScaledHealth(), foodData.getFoodLevel(), foodData.getSaturationLevel());
     }
 
-    public void injectScaledMaxHealth(Collection<AttributeModifiable> collection, boolean force) {
-        if (!scaledHealth && !force) {
+    public void injectScaledMaxHealth(Collection<AttributeInstance> collection, boolean force) {
+        if (!this.scaledHealth && !force) {
             return;
         }
-        for (AttributeModifiable genericInstance : collection) {
-            if (genericInstance.getAttribute() == GenericAttributes.MAX_HEALTH) {
+        for (AttributeInstance genericInstance : collection) {
+            if (genericInstance.getAttribute() == Attributes.MAX_HEALTH) {
                 collection.remove(genericInstance);
                 break;
             }
         }
-        AttributeModifiable dummy = new AttributeModifiable(GenericAttributes.MAX_HEALTH, (attribute) -> { });
-        dummy.setBaseValue(scaledHealth ? healthScale : getMaxHealth());
+        AttributeInstance dummy = new AttributeInstance(Attributes.MAX_HEALTH, (attribute) -> { });
+        dummy.setBaseValue(this.scaledHealth ? this.healthScale : this.getMaxHealth());
         collection.add(dummy);
     }
 
     @Override
     public org.bukkit.entity.Entity getSpectatorTarget() {
-        Entity followed = getHandle().getCamera();
-        return followed == getHandle() ? null : followed.getBukkitEntity();
+        Entity followed = this.getHandle().getCamera();
+        return followed == this.getHandle() ? null : followed.getBukkitEntity();
     }
 
     @Override
     public void setSpectatorTarget(org.bukkit.entity.Entity entity) {
-        Preconditions.checkArgument(getGameMode() == GameMode.SPECTATOR, "Player must be in spectator mode");
-        getHandle().setCamera((entity == null) ? null : ((CraftEntity) entity).getHandle());
+        Preconditions.checkArgument(this.getGameMode() == GameMode.SPECTATOR, "Player must be in spectator mode");
+        this.getHandle().setCamera((entity == null) ? null : ((CraftEntity) entity).getHandle());
     }
 
     @Override
     public void sendTitle(String title, String subtitle) {
-        sendTitle(title, subtitle, 10, 70, 20);
+        this.sendTitle(title, subtitle, 10, 70, 20);
     }
 
     @Override
     public void sendTitle(String title, String subtitle, int fadeIn, int stay, int fadeOut) {
         ClientboundSetTitlesAnimationPacket times = new ClientboundSetTitlesAnimationPacket(fadeIn, stay, fadeOut);
-        getHandle().connection.send(times);
+        this.getHandle().connection.send(times);
 
         if (title != null) {
             ClientboundSetTitleTextPacket packetTitle = new ClientboundSetTitleTextPacket(CraftChatMessage.fromString(title)[0]);
-            getHandle().connection.send(packetTitle);
+            this.getHandle().connection.send(packetTitle);
         }
 
         if (subtitle != null) {
             ClientboundSetSubtitleTextPacket packetSubtitle = new ClientboundSetSubtitleTextPacket(CraftChatMessage.fromString(subtitle)[0]);
-            getHandle().connection.send(packetSubtitle);
+            this.getHandle().connection.send(packetSubtitle);
         }
     }
 
     @Override
     public void resetTitle() {
         ClientboundClearTitlesPacket packetReset = new ClientboundClearTitlesPacket(true);
-        getHandle().connection.send(packetReset);
+        this.getHandle().connection.send(packetReset);
     }
 
     @Override
     public void spawnParticle(Particle particle, Location location, int count) {
-        spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count);
+        this.spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count);
     }
 
     @Override
     public void spawnParticle(Particle particle, double x, double y, double z, int count) {
-        spawnParticle(particle, x, y, z, count, null);
+        this.spawnParticle(particle, x, y, z, count, null);
     }
 
     @Override
     public <T> void spawnParticle(Particle particle, Location location, int count, T data) {
-        spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, data);
+        this.spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, data);
     }
 
     @Override
     public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, T data) {
-        spawnParticle(particle, x, y, z, count, 0, 0, 0, data);
+        this.spawnParticle(particle, x, y, z, count, 0, 0, 0, data);
     }
 
     @Override
     public void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ) {
-        spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, offsetX, offsetY, offsetZ);
+        this.spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, offsetX, offsetY, offsetZ);
     }
 
     @Override
     public void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ) {
-        spawnParticle(particle, x, y, z, count, offsetX, offsetY, offsetZ, null);
+        this.spawnParticle(particle, x, y, z, count, offsetX, offsetY, offsetZ, null);
     }
 
     @Override
     public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, T data) {
-        spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, offsetX, offsetY, offsetZ, data);
+        this.spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, offsetX, offsetY, offsetZ, data);
     }
 
     @Override
     public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, T data) {
-        spawnParticle(particle, x, y, z, count, offsetX, offsetY, offsetZ, 1, data);
+        this.spawnParticle(particle, x, y, z, count, offsetX, offsetY, offsetZ, 1, data);
     }
 
     @Override
     public void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra) {
-        spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, offsetX, offsetY, offsetZ, extra);
+        this.spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, offsetX, offsetY, offsetZ, extra);
     }
 
     @Override
     public void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra) {
-        spawnParticle(particle, x, y, z, count, offsetX, offsetY, offsetZ, extra, null);
+        this.spawnParticle(particle, x, y, z, count, offsetX, offsetY, offsetZ, extra, null);
     }
 
     @Override
     public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) {
-        spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, offsetX, offsetY, offsetZ, extra, data);
+        this.spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, offsetX, offsetY, offsetZ, extra, data);
     }
 
     @Override
     public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data) {
-        spawnParticle(particle, x, y, z, count, offsetX, offsetY, offsetZ, extra, data, false);
+        this.spawnParticle(particle, x, y, z, count, offsetX, offsetY, offsetZ, extra, data, false);
     }
 
     @Override
     public <T> void spawnParticle(Particle particle, Location location, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) {
-        spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, offsetX, offsetY, offsetZ, extra, data, force);
+        this.spawnParticle(particle, location.getX(), location.getY(), location.getZ(), count, offsetX, offsetY, offsetZ, extra, data, force);
     }
 
     @Override
     public <T> void spawnParticle(Particle particle, double x, double y, double z, int count, double offsetX, double offsetY, double offsetZ, double extra, T data, boolean force) {
-        PacketPlayOutWorldParticles packetplayoutworldparticles = new PacketPlayOutWorldParticles(CraftParticle.createParticleParam(particle, data), false, force, (float) x, (float) y, (float) z, (float) offsetX, (float) offsetY, (float) offsetZ, (float) extra, count);
-        getHandle().connection.send(packetplayoutworldparticles);
+        ClientboundLevelParticlesPacket packetplayoutworldparticles = new ClientboundLevelParticlesPacket(CraftParticle.createParticleParam(particle, data), false, force, (float) x, (float) y, (float) z, (float) offsetX, (float) offsetY, (float) offsetZ, (float) extra, count);
+        this.getHandle().connection.send(packetplayoutworldparticles);
     }
 
     @Override
@@ -2282,7 +2278,7 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         Preconditions.checkArgument(advancement != null, "advancement");
 
         CraftAdvancement craft = (CraftAdvancement) advancement;
-        AdvancementDataPlayer data = getHandle().getAdvancements();
+        PlayerAdvancements data = this.getHandle().getAdvancements();
         AdvancementProgress progress = data.getOrStartProgress(craft.getHandle());
 
         return new CraftAdvancementProgress(craft, data, progress);
@@ -2290,24 +2286,24 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
 
     @Override
     public int getClientViewDistance() {
-        return (getHandle().requestedViewDistance() == 0) ? Bukkit.getViewDistance() : getHandle().requestedViewDistance();
+        return (this.getHandle().requestedViewDistance() == 0) ? Bukkit.getViewDistance() : this.getHandle().requestedViewDistance();
     }
 
     @Override
     public int getPing() {
-        return getHandle().connection.latency();
+        return this.getHandle().connection.latency();
     }
 
     @Override
     public String getLocale() {
-        return getHandle().language;
+        return this.getHandle().language;
     }
 
     @Override
     public void updateCommands() {
-        if (getHandle().connection == null) return;
+        if (this.getHandle().connection == null) return;
 
-        getHandle().server.getCommands().sendCommands(getHandle());
+        this.getHandle().server.getCommands().sendCommands(this.getHandle());
     }
 
     @Override
@@ -2315,15 +2311,15 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
         Preconditions.checkArgument(book != null, "ItemStack cannot be null");
         Preconditions.checkArgument(book.getType() == Material.WRITTEN_BOOK, "ItemStack Material (%s) must be Material.WRITTEN_BOOK", book.getType());
 
-        ItemStack hand = getInventory().getItemInMainHand();
-        getInventory().setItemInMainHand(book);
-        getHandle().openItemGui(org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(book), net.minecraft.world.EnumHand.MAIN_HAND);
-        getInventory().setItemInMainHand(hand);
+        ItemStack hand = this.getInventory().getItemInMainHand();
+        this.getInventory().setItemInMainHand(book);
+        this.getHandle().openItemGui(org.bukkit.craftbukkit.inventory.CraftItemStack.asNMSCopy(book), net.minecraft.world.InteractionHand.MAIN_HAND);
+        this.getInventory().setItemInMainHand(hand);
     }
 
     @Override
     public void openSign(Sign sign) {
-        openSign(sign, Side.FRONT);
+        this.openSign(sign, Side.FRONT);
     }
 
     @Override
@@ -2333,13 +2329,13 @@ public class CraftPlayer extends CraftHumanEntity implements Player {
 
     @Override
     public void showDemoScreen() {
-        if (getHandle().connection == null) return;
+        if (this.getHandle().connection == null) return;
 
-        getHandle().connection.send(new PacketPlayOutGameStateChange(PacketPlayOutGameStateChange.DEMO_EVENT, PacketPlayOutGameStateChange.DEMO_PARAM_INTRO));
+        this.getHandle().connection.send(new ClientboundGameEventPacket(ClientboundGameEventPacket.DEMO_EVENT, ClientboundGameEventPacket.DEMO_PARAM_INTRO));
     }
 
     @Override
     public boolean isAllowingServerListings() {
-        return getHandle().allowsListing();
+        return this.getHandle().allowsListing();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPolarBear.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPolarBear.java
index 89478ab067..c7aec6f28e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPolarBear.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPolarBear.java
@@ -1,17 +1,16 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.animal.EntityPolarBear;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.PolarBear;
 
 public class CraftPolarBear extends CraftAnimals implements PolarBear {
 
-    public CraftPolarBear(CraftServer server, EntityPolarBear entity) {
+    public CraftPolarBear(CraftServer server, net.minecraft.world.entity.animal.PolarBear entity) {
         super(server, entity);
     }
     @Override
-    public EntityPolarBear getHandle() {
-        return (EntityPolarBear) entity;
+    public net.minecraft.world.entity.animal.PolarBear getHandle() {
+        return (net.minecraft.world.entity.animal.PolarBear) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java
index 339fcfe7d1..696fdfa723 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftProjectile.java
@@ -1,34 +1,33 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.EntityLiving;
-import net.minecraft.world.entity.projectile.IProjectile;
+import net.minecraft.world.entity.LivingEntity;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Projectile;
 import org.bukkit.projectiles.ProjectileSource;
 
 public abstract class CraftProjectile extends AbstractProjectile implements Projectile {
-    public CraftProjectile(CraftServer server, net.minecraft.world.entity.projectile.IProjectile entity) {
+    public CraftProjectile(CraftServer server, net.minecraft.world.entity.projectile.Projectile entity) {
         super(server, entity);
     }
 
     @Override
     public ProjectileSource getShooter() {
-        return getHandle().projectileSource;
+        return this.getHandle().projectileSource;
     }
 
     @Override
     public void setShooter(ProjectileSource shooter) {
         if (shooter instanceof CraftLivingEntity) {
-            getHandle().setOwner((EntityLiving) ((CraftLivingEntity) shooter).entity);
+            this.getHandle().setOwner((LivingEntity) ((CraftLivingEntity) shooter).entity);
         } else {
-            getHandle().setOwner(null);
+            this.getHandle().setOwner(null);
         }
-        getHandle().projectileSource = shooter;
+        this.getHandle().projectileSource = shooter;
     }
 
     @Override
-    public IProjectile getHandle() {
-        return (IProjectile) entity;
+    public net.minecraft.world.entity.projectile.Projectile getHandle() {
+        return (net.minecraft.world.entity.projectile.Projectile) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPufferFish.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPufferFish.java
index 6468400bc3..35a8219734 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPufferFish.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftPufferFish.java
@@ -1,28 +1,28 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.animal.EntityPufferFish;
+import net.minecraft.world.entity.animal.Pufferfish;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.PufferFish;
 
 public class CraftPufferFish extends CraftFish implements PufferFish {
 
-    public CraftPufferFish(CraftServer server, EntityPufferFish entity) {
+    public CraftPufferFish(CraftServer server, Pufferfish entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityPufferFish getHandle() {
-        return (EntityPufferFish) super.getHandle();
+    public Pufferfish getHandle() {
+        return (Pufferfish) super.getHandle();
     }
 
     @Override
     public int getPuffState() {
-        return getHandle().getPuffState();
+        return this.getHandle().getPuffState();
     }
 
     @Override
     public void setPuffState(int state) {
-        getHandle().setPuffState(state);
+        this.getHandle().setPuffState(state);
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java
index 5009cc7f5f..6b48b117a9 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftRabbit.java
@@ -1,33 +1,32 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.animal.EntityRabbit;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Rabbit;
 import org.bukkit.entity.Rabbit.Type;
 
 public class CraftRabbit extends CraftAnimals implements Rabbit {
 
-    public CraftRabbit(CraftServer server, EntityRabbit entity) {
+    public CraftRabbit(CraftServer server, net.minecraft.world.entity.animal.Rabbit entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityRabbit getHandle() {
-        return (EntityRabbit) entity;
+    public net.minecraft.world.entity.animal.Rabbit getHandle() {
+        return (net.minecraft.world.entity.animal.Rabbit) this.entity;
     }
 
     @Override
     public String toString() {
-        return "CraftRabbit{RabbitType=" + getRabbitType() + "}";
+        return "CraftRabbit{RabbitType=" + this.getRabbitType() + "}";
     }
 
     @Override
     public Type getRabbitType() {
-        return Type.values()[getHandle().getVariant().ordinal()];
+        return Type.values()[this.getHandle().getVariant().ordinal()];
     }
 
     @Override
     public void setRabbitType(Type type) {
-        getHandle().setVariant(EntityRabbit.Variant.values()[type.ordinal()]);
+        this.getHandle().setVariant(net.minecraft.world.entity.animal.Rabbit.Variant.values()[type.ordinal()]);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftRaider.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftRaider.java
index 2deb3c1ee6..763c368e29 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftRaider.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftRaider.java
@@ -1,7 +1,6 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.raid.EntityRaider;
 import org.bukkit.Raid;
 import org.bukkit.Sound;
 import org.bukkit.block.Block;
@@ -13,13 +12,13 @@ import org.bukkit.entity.Raider;
 
 public abstract class CraftRaider extends CraftMonster implements Raider {
 
-    public CraftRaider(CraftServer server, EntityRaider entity) {
+    public CraftRaider(CraftServer server, net.minecraft.world.entity.raid.Raider entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityRaider getHandle() {
-        return (EntityRaider) super.getHandle();
+    public net.minecraft.world.entity.raid.Raider getHandle() {
+        return (net.minecraft.world.entity.raid.Raider) super.getHandle();
     }
 
     @Override
@@ -29,83 +28,83 @@ public abstract class CraftRaider extends CraftMonster implements Raider {
 
     @Override
     public void setRaid(Raid raid) {
-        getHandle().setCurrentRaid(raid != null ? ((CraftRaid) raid).getHandle() : null);
+        this.getHandle().setCurrentRaid(raid != null ? ((CraftRaid) raid).getHandle() : null);
     }
 
     @Override
     public Raid getRaid() {
-        return getHandle().getCurrentRaid() == null ? null : new CraftRaid(getHandle().getCurrentRaid());
+        return this.getHandle().getCurrentRaid() == null ? null : new CraftRaid(this.getHandle().getCurrentRaid());
     }
 
     @Override
     public void setWave(int wave) {
         Preconditions.checkArgument(wave >= 0, "wave must be >= 0");
-        getHandle().setWave(wave);
+        this.getHandle().setWave(wave);
     }
 
     @Override
     public int getWave() {
-        return getHandle().getWave();
+        return this.getHandle().getWave();
     }
 
     @Override
     public Block getPatrolTarget() {
-        return getHandle().getPatrolTarget() == null ? null : CraftBlock.at(getHandle().level(), getHandle().getPatrolTarget());
+        return this.getHandle().getPatrolTarget() == null ? null : CraftBlock.at(this.getHandle().level(), this.getHandle().getPatrolTarget());
     }
 
     @Override
     public void setPatrolTarget(Block block) {
         if (block == null) {
-            getHandle().setPatrolTarget(null);
+            this.getHandle().setPatrolTarget(null);
         } else {
             Preconditions.checkArgument(block.getWorld().equals(this.getWorld()), "Block must be in same world");
-            getHandle().setPatrolTarget(((CraftBlock) block).getPosition());
+            this.getHandle().setPatrolTarget(((CraftBlock) block).getPosition());
         }
     }
 
     @Override
     public boolean isPatrolLeader() {
-        return getHandle().isPatrolLeader();
+        return this.getHandle().isPatrolLeader();
     }
 
     @Override
     public void setPatrolLeader(boolean leader) {
-        getHandle().setPatrolLeader(leader);
+        this.getHandle().setPatrolLeader(leader);
     }
 
     @Override
     public boolean isCanJoinRaid() {
-        return getHandle().canJoinRaid();
+        return this.getHandle().canJoinRaid();
     }
 
     @Override
     public void setCanJoinRaid(boolean join) {
-        getHandle().setCanJoinRaid(join);
+        this.getHandle().setCanJoinRaid(join);
     }
 
     @Override
     public boolean isCelebrating() {
-        return getHandle().isCelebrating();
+        return this.getHandle().isCelebrating();
     }
 
     @Override
     public void setCelebrating(boolean celebrating) {
-        getHandle().setCelebrating(celebrating);
+        this.getHandle().setCelebrating(celebrating);
     }
 
     @Override
     public int getTicksOutsideRaid() {
-        return getHandle().getTicksOutsideRaid();
+        return this.getHandle().getTicksOutsideRaid();
     }
 
     @Override
     public void setTicksOutsideRaid(int ticks) {
         Preconditions.checkArgument(ticks >= 0, "ticks must be >= 0");
-        getHandle().setTicksOutsideRaid(ticks);
+        this.getHandle().setTicksOutsideRaid(ticks);
     }
 
     @Override
     public Sound getCelebrationSound() {
-        return CraftSound.minecraftToBukkit(getHandle().getCelebrateSound());
+        return CraftSound.minecraftToBukkit(this.getHandle().getCelebrateSound());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftRavager.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftRavager.java
index f17f0884de..cae59f77c7 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftRavager.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftRavager.java
@@ -1,18 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntityRavager;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Ravager;
 
 public class CraftRavager extends CraftRaider implements Ravager {
 
-    public CraftRavager(CraftServer server, EntityRavager entity) {
+    public CraftRavager(CraftServer server, net.minecraft.world.entity.monster.Ravager entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityRavager getHandle() {
-        return (EntityRavager) super.getHandle();
+    public net.minecraft.world.entity.monster.Ravager getHandle() {
+        return (net.minecraft.world.entity.monster.Ravager) super.getHandle();
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSalmon.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSalmon.java
index 171691e15f..551c30cb0f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSalmon.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSalmon.java
@@ -1,19 +1,18 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.animal.EntitySalmon;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Salmon;
 
 public class CraftSalmon extends CraftFish implements Salmon {
 
-    public CraftSalmon(CraftServer server, EntitySalmon entity) {
+    public CraftSalmon(CraftServer server, net.minecraft.world.entity.animal.Salmon entity) {
         super(server, entity);
     }
 
     @Override
-    public EntitySalmon getHandle() {
-        return (EntitySalmon) super.getHandle();
+    public net.minecraft.world.entity.animal.Salmon getHandle() {
+        return (net.minecraft.world.entity.animal.Salmon) super.getHandle();
     }
 
     @Override
@@ -23,13 +22,13 @@ public class CraftSalmon extends CraftFish implements Salmon {
 
     @Override
     public Variant getVariant() {
-        return Variant.values()[getHandle().getVariant().ordinal()];
+        return Variant.values()[this.getHandle().getVariant().ordinal()];
     }
 
     @Override
     public void setVariant(Variant variant) {
         Preconditions.checkArgument(variant != null, "variant");
 
-        getHandle().setVariant(EntitySalmon.a.values()[variant.ordinal()]);
+        this.getHandle().setVariant(net.minecraft.world.entity.animal.Salmon.Variant.values()[variant.ordinal()]);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java
index a498b9c69d..030bf7b631 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSheep.java
@@ -1,39 +1,37 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.animal.EntitySheep;
-import net.minecraft.world.item.EnumColor;
 import org.bukkit.DyeColor;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Sheep;
 
 public class CraftSheep extends CraftAnimals implements Sheep {
-    public CraftSheep(CraftServer server, EntitySheep entity) {
+    public CraftSheep(CraftServer server, net.minecraft.world.entity.animal.Sheep entity) {
         super(server, entity);
     }
 
     @Override
     public DyeColor getColor() {
-        return DyeColor.getByWoolData((byte) getHandle().getColor().getId());
+        return DyeColor.getByWoolData((byte) this.getHandle().getColor().getId());
     }
 
     @Override
     public void setColor(DyeColor color) {
-        getHandle().setColor(EnumColor.byId(color.getWoolData()));
+        this.getHandle().setColor(net.minecraft.world.item.DyeColor.byId(color.getWoolData()));
     }
 
     @Override
     public boolean isSheared() {
-        return getHandle().isSheared();
+        return this.getHandle().isSheared();
     }
 
     @Override
     public void setSheared(boolean flag) {
-        getHandle().setSheared(flag);
+        this.getHandle().setSheared(flag);
     }
 
     @Override
-    public EntitySheep getHandle() {
-        return (EntitySheep) entity;
+    public net.minecraft.world.entity.animal.Sheep getHandle() {
+        return (net.minecraft.world.entity.animal.Sheep) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftShulker.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftShulker.java
index 7c89d088c2..05ec06b716 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftShulker.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftShulker.java
@@ -1,7 +1,6 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.monster.EntityShulker;
 import org.bukkit.DyeColor;
 import org.bukkit.block.BlockFace;
 import org.bukkit.craftbukkit.CraftServer;
@@ -10,7 +9,7 @@ import org.bukkit.entity.Shulker;
 
 public class CraftShulker extends CraftGolem implements Shulker, CraftEnemy {
 
-    public CraftShulker(CraftServer server, EntityShulker entity) {
+    public CraftShulker(CraftServer server, net.minecraft.world.entity.monster.Shulker entity) {
         super(server, entity);
     }
 
@@ -20,40 +19,40 @@ public class CraftShulker extends CraftGolem implements Shulker, CraftEnemy {
     }
 
     @Override
-    public EntityShulker getHandle() {
-        return (EntityShulker) entity;
+    public net.minecraft.world.entity.monster.Shulker getHandle() {
+        return (net.minecraft.world.entity.monster.Shulker) this.entity;
     }
 
     @Override
     public DyeColor getColor() {
-        return DyeColor.getByWoolData(getHandle().getEntityData().get(EntityShulker.DATA_COLOR_ID));
+        return DyeColor.getByWoolData(this.getHandle().getEntityData().get(net.minecraft.world.entity.monster.Shulker.DATA_COLOR_ID));
     }
 
     @Override
     public void setColor(DyeColor color) {
-        getHandle().getEntityData().set(EntityShulker.DATA_COLOR_ID, (color == null) ? 16 : color.getWoolData());
+        this.getHandle().getEntityData().set(net.minecraft.world.entity.monster.Shulker.DATA_COLOR_ID, (color == null) ? 16 : color.getWoolData());
     }
 
     @Override
     public float getPeek() {
-        return (float) getHandle().getRawPeekAmount() / 100;
+        return (float) this.getHandle().getRawPeekAmount() / 100;
     }
 
     @Override
     public void setPeek(float value) {
         Preconditions.checkArgument(value >= 0 && value <= 1, "value needs to be in between or equal to 0 and 1");
-        getHandle().setRawPeekAmount((int) (value * 100));
+        this.getHandle().setRawPeekAmount((int) (value * 100));
     }
 
     @Override
     public BlockFace getAttachedFace() {
-        return CraftBlock.notchToBlockFace(getHandle().getAttachFace());
+        return CraftBlock.notchToBlockFace(this.getHandle().getAttachFace());
     }
 
     @Override
     public void setAttachedFace(BlockFace face) {
         Preconditions.checkNotNull(face, "face cannot be null");
         Preconditions.checkArgument(face.isCartesian(), "%s is not a valid block face to attach a shulker to, a cartesian block face is expected", face);
-        getHandle().setAttachFace(CraftBlock.blockFaceToNotch(face));
+        this.getHandle().setAttachFace(CraftBlock.blockFaceToNotch(face));
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftShulkerBullet.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftShulkerBullet.java
index ab21af41d5..d685d09cae 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftShulkerBullet.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftShulkerBullet.java
@@ -1,7 +1,6 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.projectile.EntityShulkerBullet;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Entity;
 import org.bukkit.entity.ShulkerBullet;
@@ -9,35 +8,35 @@ import org.bukkit.projectiles.ProjectileSource;
 
 public class CraftShulkerBullet extends AbstractProjectile implements ShulkerBullet {
 
-    public CraftShulkerBullet(CraftServer server, EntityShulkerBullet entity) {
+    public CraftShulkerBullet(CraftServer server, net.minecraft.world.entity.projectile.ShulkerBullet entity) {
         super(server, entity);
     }
 
     @Override
     public ProjectileSource getShooter() {
-        return getHandle().projectileSource;
+        return this.getHandle().projectileSource;
     }
 
     @Override
     public void setShooter(ProjectileSource shooter) {
         if (shooter instanceof Entity) {
-            getHandle().setOwner(((CraftEntity) shooter).getHandle());
+            this.getHandle().setOwner(((CraftEntity) shooter).getHandle());
         } else {
-            getHandle().setOwner(null);
+            this.getHandle().setOwner(null);
         }
-        getHandle().projectileSource = shooter;
+        this.getHandle().projectileSource = shooter;
     }
 
     @Override
     public org.bukkit.entity.Entity getTarget() {
-        return getHandle().getTarget() != null ? getHandle().getTarget().getBukkitEntity() : null;
+        return this.getHandle().getTarget() != null ? this.getHandle().getTarget().getBukkitEntity() : null;
     }
 
     @Override
     public void setTarget(org.bukkit.entity.Entity target) {
-        Preconditions.checkState(!getHandle().generation, "Cannot set target during world generation");
+        Preconditions.checkState(!this.getHandle().generation, "Cannot set target during world generation");
 
-        getHandle().setTarget(target == null ? null : ((CraftEntity) target).getHandle());
+        this.getHandle().setTarget(target == null ? null : ((CraftEntity) target).getHandle());
     }
 
     @Override
@@ -46,7 +45,7 @@ public class CraftShulkerBullet extends AbstractProjectile implements ShulkerBul
     }
 
     @Override
-    public EntityShulkerBullet getHandle() {
-        return (EntityShulkerBullet) entity;
+    public net.minecraft.world.entity.projectile.ShulkerBullet getHandle() {
+        return (net.minecraft.world.entity.projectile.ShulkerBullet) this.entity;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSilverfish.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSilverfish.java
index aaed9aa22d..7c75d78e5e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSilverfish.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSilverfish.java
@@ -1,17 +1,16 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntitySilverfish;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Silverfish;
 
 public class CraftSilverfish extends CraftMonster implements Silverfish {
-    public CraftSilverfish(CraftServer server, EntitySilverfish entity) {
+    public CraftSilverfish(CraftServer server, net.minecraft.world.entity.monster.Silverfish entity) {
         super(server, entity);
     }
 
     @Override
-    public EntitySilverfish getHandle() {
-        return (EntitySilverfish) entity;
+    public net.minecraft.world.entity.monster.Silverfish getHandle() {
+        return (net.minecraft.world.entity.monster.Silverfish) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSizedFireball.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSizedFireball.java
index 4c7627b104..de3327812c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSizedFireball.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSizedFireball.java
@@ -1,6 +1,6 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.projectile.EntityFireballFireball;
+import net.minecraft.world.entity.projectile.Fireball;
 import org.bukkit.Material;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.craftbukkit.inventory.CraftItemStack;
@@ -9,26 +9,26 @@ import org.bukkit.inventory.ItemStack;
 
 public class CraftSizedFireball extends CraftFireball implements SizedFireball {
 
-    public CraftSizedFireball(CraftServer server, EntityFireballFireball entity) {
+    public CraftSizedFireball(CraftServer server, Fireball entity) {
         super(server, entity);
     }
 
     @Override
     public ItemStack getDisplayItem() {
-        if (getHandle().getItem().isEmpty()) {
+        if (this.getHandle().getItem().isEmpty()) {
             return new ItemStack(Material.FIRE_CHARGE);
         } else {
-            return CraftItemStack.asBukkitCopy(getHandle().getItem());
+            return CraftItemStack.asBukkitCopy(this.getHandle().getItem());
         }
     }
 
     @Override
     public void setDisplayItem(ItemStack item) {
-        getHandle().setItem(CraftItemStack.asNMSCopy(item));
+        this.getHandle().setItem(CraftItemStack.asNMSCopy(item));
     }
 
     @Override
-    public EntityFireballFireball getHandle() {
-        return (EntityFireballFireball) entity;
+    public Fireball getHandle() {
+        return (Fireball) this.entity;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
index 09de7114d1..a0ea54181d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeleton.java
@@ -1,13 +1,12 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.monster.EntitySkeleton;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Skeleton;
 
 public class CraftSkeleton extends CraftAbstractSkeleton implements Skeleton {
 
-    public CraftSkeleton(CraftServer server, EntitySkeleton entity) {
+    public CraftSkeleton(CraftServer server, net.minecraft.world.entity.monster.Skeleton entity) {
         super(server, entity);
     }
 
@@ -26,15 +25,15 @@ public class CraftSkeleton extends CraftAbstractSkeleton implements Skeleton {
     public void setConversionTime(int time) {
         if (time < 0) {
             this.getHandle().conversionTime = -1;
-            this.getHandle().getEntityData().set(EntitySkeleton.DATA_STRAY_CONVERSION_ID, false);
+            this.getHandle().getEntityData().set(net.minecraft.world.entity.monster.Skeleton.DATA_STRAY_CONVERSION_ID, false);
         } else {
             this.getHandle().startFreezeConversion(time);
         }
     }
 
     @Override
-    public EntitySkeleton getHandle() {
-        return (EntitySkeleton) entity;
+    public net.minecraft.world.entity.monster.Skeleton getHandle() {
+        return (net.minecraft.world.entity.monster.Skeleton) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeletonHorse.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeletonHorse.java
index b24e24b438..248e4febbe 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeletonHorse.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSkeletonHorse.java
@@ -1,13 +1,12 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.animal.horse.EntityHorseSkeleton;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Horse.Variant;
 import org.bukkit.entity.SkeletonHorse;
 
 public class CraftSkeletonHorse extends CraftAbstractHorse implements SkeletonHorse {
 
-    public CraftSkeletonHorse(CraftServer server, EntityHorseSkeleton entity) {
+    public CraftSkeletonHorse(CraftServer server, net.minecraft.world.entity.animal.horse.SkeletonHorse entity) {
         super(server, entity);
     }
 
@@ -22,27 +21,27 @@ public class CraftSkeletonHorse extends CraftAbstractHorse implements SkeletonHo
     }
 
     @Override
-    public EntityHorseSkeleton getHandle() {
-        return (EntityHorseSkeleton) entity;
+    public net.minecraft.world.entity.animal.horse.SkeletonHorse getHandle() {
+        return (net.minecraft.world.entity.animal.horse.SkeletonHorse) this.entity;
     }
 
     @Override
     public boolean isTrapped() {
-        return getHandle().isTrap();
+        return this.getHandle().isTrap();
     }
 
     @Override
     public void setTrapped(boolean trapped) {
-        getHandle().setTrap(trapped);
+        this.getHandle().setTrap(trapped);
     }
 
     @Override
     public int getTrapTime() {
-        return getHandle().trapTime;
+        return this.getHandle().trapTime;
     }
 
     @Override
     public void setTrapTime(int trapTime) {
-        getHandle().trapTime = trapTime;
+        this.getHandle().trapTime = trapTime;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java
index 75097983b7..3d991d9d93 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSlime.java
@@ -1,28 +1,27 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntitySlime;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Slime;
 
 public class CraftSlime extends CraftMob implements Slime, CraftEnemy {
 
-    public CraftSlime(CraftServer server, EntitySlime entity) {
+    public CraftSlime(CraftServer server, net.minecraft.world.entity.monster.Slime entity) {
         super(server, entity);
     }
 
     @Override
     public int getSize() {
-        return getHandle().getSize();
+        return this.getHandle().getSize();
     }
 
     @Override
     public void setSize(int size) {
-        getHandle().setSize(size, true);
+        this.getHandle().setSize(size, true);
     }
 
     @Override
-    public EntitySlime getHandle() {
-        return (EntitySlime) entity;
+    public net.minecraft.world.entity.monster.Slime getHandle() {
+        return (net.minecraft.world.entity.monster.Slime) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSmallFireball.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSmallFireball.java
index 24083c8b0e..072df20685 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSmallFireball.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSmallFireball.java
@@ -1,17 +1,16 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.projectile.EntitySmallFireball;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.SmallFireball;
 
 public class CraftSmallFireball extends CraftSizedFireball implements SmallFireball {
-    public CraftSmallFireball(CraftServer server, EntitySmallFireball entity) {
+    public CraftSmallFireball(CraftServer server, net.minecraft.world.entity.projectile.SmallFireball entity) {
         super(server, entity);
     }
 
     @Override
-    public EntitySmallFireball getHandle() {
-        return (EntitySmallFireball) entity;
+    public net.minecraft.world.entity.projectile.SmallFireball getHandle() {
+        return (net.minecraft.world.entity.projectile.SmallFireball) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSniffer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSniffer.java
index 795f30fee3..6025110737 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSniffer.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSniffer.java
@@ -3,7 +3,7 @@ package org.bukkit.craftbukkit.entity;
 import com.google.common.base.Preconditions;
 import java.util.Collection;
 import java.util.stream.Collectors;
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
 import net.minecraft.world.entity.ai.memory.MemoryModuleType;
 import org.bukkit.Location;
 import org.bukkit.craftbukkit.CraftServer;
@@ -34,18 +34,18 @@ public class CraftSniffer extends CraftAnimals implements Sniffer {
     @Override
     public void removeExploredLocation(Location location) {
         Preconditions.checkArgument(location != null, "location cannot be null");
-        if (location.getWorld() != getWorld()) {
+        if (location.getWorld() != this.getWorld()) {
             return;
         }
 
-        BlockPosition blockPosition = CraftLocation.toBlockPosition(location);
+        BlockPos blockPosition = CraftLocation.toBlockPosition(location);
         this.getHandle().getBrain().setMemory(MemoryModuleType.SNIFFER_EXPLORED_POSITIONS, this.getHandle().getExploredPositions().filter(blockPositionExplored -> !blockPositionExplored.equals(blockPosition)).collect(Collectors.toList()));
     }
 
     @Override
     public void addExploredLocation(Location location) {
         Preconditions.checkArgument(location != null, "location cannot be null");
-        if (location.getWorld() != getWorld()) {
+        if (location.getWorld() != this.getWorld()) {
             return;
         }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java
index 32447e2e96..d959825fd1 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowball.java
@@ -1,17 +1,16 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.projectile.EntitySnowball;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Snowball;
 
 public class CraftSnowball extends CraftThrowableProjectile implements Snowball {
-    public CraftSnowball(CraftServer server, EntitySnowball entity) {
+    public CraftSnowball(CraftServer server, net.minecraft.world.entity.projectile.Snowball entity) {
         super(server, entity);
     }
 
     @Override
-    public EntitySnowball getHandle() {
-        return (EntitySnowball) entity;
+    public net.minecraft.world.entity.projectile.Snowball getHandle() {
+        return (net.minecraft.world.entity.projectile.Snowball) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java
index b00b0a72e1..1f373896cc 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSnowman.java
@@ -1,27 +1,27 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.animal.EntitySnowman;
+import net.minecraft.world.entity.animal.SnowGolem;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Snowman;
 
 public class CraftSnowman extends CraftGolem implements Snowman {
-    public CraftSnowman(CraftServer server, EntitySnowman entity) {
+    public CraftSnowman(CraftServer server, SnowGolem entity) {
         super(server, entity);
     }
 
     @Override
     public boolean isDerp() {
-        return !getHandle().hasPumpkin();
+        return !this.getHandle().hasPumpkin();
     }
 
     @Override
     public void setDerp(boolean derpMode) {
-        getHandle().setPumpkin(!derpMode);
+        this.getHandle().setPumpkin(!derpMode);
     }
 
     @Override
-    public EntitySnowman getHandle() {
-        return (EntitySnowman) entity;
+    public SnowGolem getHandle() {
+        return (SnowGolem) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSpectralArrow.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSpectralArrow.java
index d30553b6d8..70f1f87400 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSpectralArrow.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSpectralArrow.java
@@ -1,18 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.projectile.EntitySpectralArrow;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.SpectralArrow;
 
 public class CraftSpectralArrow extends CraftAbstractArrow implements SpectralArrow {
 
-    public CraftSpectralArrow(CraftServer server, EntitySpectralArrow entity) {
+    public CraftSpectralArrow(CraftServer server, net.minecraft.world.entity.projectile.SpectralArrow entity) {
         super(server, entity);
     }
 
     @Override
-    public EntitySpectralArrow getHandle() {
-        return (EntitySpectralArrow) entity;
+    public net.minecraft.world.entity.projectile.SpectralArrow getHandle() {
+        return (net.minecraft.world.entity.projectile.SpectralArrow) this.entity;
     }
 
     @Override
@@ -22,11 +21,11 @@ public class CraftSpectralArrow extends CraftAbstractArrow implements SpectralAr
 
     @Override
     public int getGlowingTicks() {
-        return getHandle().duration;
+        return this.getHandle().duration;
     }
 
     @Override
     public void setGlowingTicks(int duration) {
-        getHandle().duration = duration;
+        this.getHandle().duration = duration;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSpellcaster.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSpellcaster.java
index 83eb3ff0b6..525827f174 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSpellcaster.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSpellcaster.java
@@ -1,20 +1,20 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.monster.EntityIllagerWizard;
+import net.minecraft.world.entity.monster.SpellcasterIllager;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Spellcaster;
 import org.bukkit.entity.Spellcaster.Spell;
 
 public class CraftSpellcaster extends CraftIllager implements Spellcaster {
 
-    public CraftSpellcaster(CraftServer server, EntityIllagerWizard entity) {
+    public CraftSpellcaster(CraftServer server, SpellcasterIllager entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityIllagerWizard getHandle() {
-        return (EntityIllagerWizard) super.getHandle();
+    public SpellcasterIllager getHandle() {
+        return (SpellcasterIllager) super.getHandle();
     }
 
     @Override
@@ -24,21 +24,21 @@ public class CraftSpellcaster extends CraftIllager implements Spellcaster {
 
     @Override
     public Spell getSpell() {
-        return toBukkitSpell(getHandle().getCurrentSpell());
+        return CraftSpellcaster.toBukkitSpell(this.getHandle().getCurrentSpell());
     }
 
     @Override
     public void setSpell(Spell spell) {
         Preconditions.checkArgument(spell != null, "Use Spell.NONE");
 
-        getHandle().setIsCastingSpell(toNMSSpell(spell));
+        this.getHandle().setIsCastingSpell(CraftSpellcaster.toNMSSpell(spell));
     }
 
-    public static Spell toBukkitSpell(EntityIllagerWizard.Spell spell) {
+    public static Spell toBukkitSpell(SpellcasterIllager.IllagerSpell spell) {
         return Spell.valueOf(spell.name());
     }
 
-    public static EntityIllagerWizard.Spell toNMSSpell(Spell spell) {
-        return EntityIllagerWizard.Spell.byId(spell.ordinal());
+    public static SpellcasterIllager.IllagerSpell toNMSSpell(Spell spell) {
+        return SpellcasterIllager.IllagerSpell.byId(spell.ordinal());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSpider.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSpider.java
index 6e1876e96e..b4afc37c21 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSpider.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSpider.java
@@ -1,18 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntitySpider;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Spider;
 
 public class CraftSpider extends CraftMonster implements Spider {
 
-    public CraftSpider(CraftServer server, EntitySpider entity) {
+    public CraftSpider(CraftServer server, net.minecraft.world.entity.monster.Spider entity) {
         super(server, entity);
     }
 
     @Override
-    public EntitySpider getHandle() {
-        return (EntitySpider) entity;
+    public net.minecraft.world.entity.monster.Spider getHandle() {
+        return (net.minecraft.world.entity.monster.Spider) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSquid.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSquid.java
index 25df325da4..067a95ea50 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSquid.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftSquid.java
@@ -1,18 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.animal.EntitySquid;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Squid;
 
 public class CraftSquid extends CraftAgeable implements Squid {
 
-    public CraftSquid(CraftServer server, EntitySquid entity) {
+    public CraftSquid(CraftServer server, net.minecraft.world.entity.animal.Squid entity) {
         super(server, entity);
     }
 
     @Override
-    public EntitySquid getHandle() {
-        return (EntitySquid) entity;
+    public net.minecraft.world.entity.animal.Squid getHandle() {
+        return (net.minecraft.world.entity.animal.Squid) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftStray.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftStray.java
index 335f3f103b..833290525b 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftStray.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftStray.java
@@ -1,13 +1,12 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntitySkeletonStray;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Skeleton.SkeletonType;
 import org.bukkit.entity.Stray;
 
 public class CraftStray extends CraftAbstractSkeleton implements Stray {
 
-    public CraftStray(CraftServer server, EntitySkeletonStray entity) {
+    public CraftStray(CraftServer server, net.minecraft.world.entity.monster.Stray entity) {
         super(server, entity);
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftStrider.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftStrider.java
index d57b6a975d..9472a6f9c9 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftStrider.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftStrider.java
@@ -1,20 +1,19 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.monster.EntityStrider;
 import org.bukkit.Material;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Strider;
 
 public class CraftStrider extends CraftAnimals implements Strider {
 
-    public CraftStrider(CraftServer server, EntityStrider entity) {
+    public CraftStrider(CraftServer server, net.minecraft.world.entity.monster.Strider entity) {
         super(server, entity);
     }
 
     @Override
     public boolean isShivering() {
-        return getHandle().isSuffocating();
+        return this.getHandle().isSuffocating();
     }
 
     @Override
@@ -24,38 +23,38 @@ public class CraftStrider extends CraftAnimals implements Strider {
 
     @Override
     public boolean hasSaddle() {
-        return getHandle().isSaddled();
+        return this.getHandle().isSaddled();
     }
 
     @Override
     public void setSaddle(boolean saddled) {
-        getHandle().steering.setSaddle(saddled);
+        this.getHandle().steering.setSaddle(saddled);
     }
 
     @Override
     public int getBoostTicks() {
-        return getHandle().steering.boosting ? getHandle().steering.boostTimeTotal() : 0;
+        return this.getHandle().steering.boosting ? this.getHandle().steering.boostTimeTotal() : 0;
     }
 
     @Override
     public void setBoostTicks(int ticks) {
         Preconditions.checkArgument(ticks >= 0, "ticks must be >= 0");
 
-        getHandle().steering.setBoostTicks(ticks);
+        this.getHandle().steering.setBoostTicks(ticks);
     }
 
     @Override
     public int getCurrentBoostTicks() {
-        return getHandle().steering.boosting ? getHandle().steering.boostTime : 0;
+        return this.getHandle().steering.boosting ? this.getHandle().steering.boostTime : 0;
     }
 
     @Override
     public void setCurrentBoostTicks(int ticks) {
-        if (!getHandle().steering.boosting) {
+        if (!this.getHandle().steering.boosting) {
             return;
         }
 
-        int max = getHandle().steering.boostTimeTotal();
+        int max = this.getHandle().steering.boostTimeTotal();
         Preconditions.checkArgument(ticks >= 0 && ticks <= max, "boost ticks must not exceed 0 or %d (inclusive)", max);
 
         this.getHandle().steering.boostTime = ticks;
@@ -67,8 +66,8 @@ public class CraftStrider extends CraftAnimals implements Strider {
     }
 
     @Override
-    public EntityStrider getHandle() {
-        return (EntityStrider) entity;
+    public net.minecraft.world.entity.monster.Strider getHandle() {
+        return (net.minecraft.world.entity.monster.Strider) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java
index 872642b24d..36ab282e2c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTNTPrimed.java
@@ -1,7 +1,6 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.EntityLiving;
-import net.minecraft.world.entity.item.EntityTNTPrimed;
+import net.minecraft.world.entity.item.PrimedTnt;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Entity;
 import org.bukkit.entity.LivingEntity;
@@ -9,43 +8,43 @@ import org.bukkit.entity.TNTPrimed;
 
 public class CraftTNTPrimed extends CraftEntity implements TNTPrimed {
 
-    public CraftTNTPrimed(CraftServer server, EntityTNTPrimed entity) {
+    public CraftTNTPrimed(CraftServer server, PrimedTnt entity) {
         super(server, entity);
     }
 
     @Override
     public float getYield() {
-        return getHandle().explosionPower;
+        return this.getHandle().explosionPower;
     }
 
     @Override
     public boolean isIncendiary() {
-        return getHandle().isIncendiary;
+        return this.getHandle().isIncendiary;
     }
 
     @Override
     public void setIsIncendiary(boolean isIncendiary) {
-        getHandle().isIncendiary = isIncendiary;
+        this.getHandle().isIncendiary = isIncendiary;
     }
 
     @Override
     public void setYield(float yield) {
-        getHandle().explosionPower = yield;
+        this.getHandle().explosionPower = yield;
     }
 
     @Override
     public int getFuseTicks() {
-        return getHandle().getFuse();
+        return this.getHandle().getFuse();
     }
 
     @Override
     public void setFuseTicks(int fuseTicks) {
-        getHandle().setFuse(fuseTicks);
+        this.getHandle().setFuse(fuseTicks);
     }
 
     @Override
-    public EntityTNTPrimed getHandle() {
-        return (EntityTNTPrimed) entity;
+    public PrimedTnt getHandle() {
+        return (PrimedTnt) this.entity;
     }
 
     @Override
@@ -55,7 +54,7 @@ public class CraftTNTPrimed extends CraftEntity implements TNTPrimed {
 
     @Override
     public Entity getSource() {
-        EntityLiving source = getHandle().getOwner();
+        net.minecraft.world.entity.LivingEntity source = this.getHandle().getOwner();
 
         return (source != null) ? source.getBukkitEntity() : null;
     }
@@ -63,9 +62,9 @@ public class CraftTNTPrimed extends CraftEntity implements TNTPrimed {
     @Override
     public void setSource(Entity source) {
         if (source instanceof LivingEntity) {
-            getHandle().owner = ((CraftLivingEntity) source).getHandle();
+            this.getHandle().owner = ((CraftLivingEntity) source).getHandle();
         } else {
-            getHandle().owner = null;
+            this.getHandle().owner = null;
         }
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTadpole.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTadpole.java
index c4f117704d..451a9bfd9b 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTadpole.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTadpole.java
@@ -11,7 +11,7 @@ public class CraftTadpole extends CraftFish implements org.bukkit.entity.Tadpole
 
     @Override
     public Tadpole getHandle() {
-        return (Tadpole) entity;
+        return (Tadpole) this.entity;
     }
 
     @Override
@@ -21,11 +21,11 @@ public class CraftTadpole extends CraftFish implements org.bukkit.entity.Tadpole
 
     @Override
     public int getAge() {
-        return getHandle().age;
+        return this.getHandle().age;
     }
 
     @Override
     public void setAge(int age) {
-        getHandle().age = age;
+        this.getHandle().age = age;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java
index dc4466f39b..3d19a077db 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTameableAnimal.java
@@ -1,43 +1,43 @@
 package org.bukkit.craftbukkit.entity;
 
 import java.util.UUID;
-import net.minecraft.world.entity.EntityTameableAnimal;
+import net.minecraft.world.entity.TamableAnimal;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.AnimalTamer;
 import org.bukkit.entity.Creature;
 import org.bukkit.entity.Tameable;
 
 public class CraftTameableAnimal extends CraftAnimals implements Tameable, Creature {
-    public CraftTameableAnimal(CraftServer server, EntityTameableAnimal entity) {
+    public CraftTameableAnimal(CraftServer server, TamableAnimal entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityTameableAnimal getHandle() {
-        return (EntityTameableAnimal) super.getHandle();
+    public TamableAnimal getHandle() {
+        return (TamableAnimal) super.getHandle();
     }
 
     public UUID getOwnerUUID() {
         try {
-            return getHandle().getOwnerUUID();
+            return this.getHandle().getOwnerUUID();
         } catch (IllegalArgumentException ex) {
             return null;
         }
     }
 
     public void setOwnerUUID(UUID uuid) {
-        getHandle().setOwnerUUID(uuid);
+        this.getHandle().setOwnerUUID(uuid);
     }
 
     @Override
     public AnimalTamer getOwner() {
-        if (getOwnerUUID() == null) {
+        if (this.getOwnerUUID() == null) {
             return null;
         }
 
-        AnimalTamer owner = getServer().getPlayer(getOwnerUUID());
+        AnimalTamer owner = this.getServer().getPlayer(this.getOwnerUUID());
         if (owner == null) {
-            owner = getServer().getOfflinePlayer(getOwnerUUID());
+            owner = this.getServer().getOfflinePlayer(this.getOwnerUUID());
         }
 
         return owner;
@@ -45,40 +45,40 @@ public class CraftTameableAnimal extends CraftAnimals implements Tameable, Creat
 
     @Override
     public boolean isTamed() {
-        return getHandle().isTame();
+        return this.getHandle().isTame();
     }
 
     @Override
     public void setOwner(AnimalTamer tamer) {
         if (tamer != null) {
-            setTamed(true);
-            getHandle().setTarget(null, null, false);
-            setOwnerUUID(tamer.getUniqueId());
+            this.setTamed(true);
+            this.getHandle().setTarget(null, null, false);
+            this.setOwnerUUID(tamer.getUniqueId());
         } else {
-            setTamed(false);
-            setOwnerUUID(null);
+            this.setTamed(false);
+            this.setOwnerUUID(null);
         }
     }
 
     @Override
     public void setTamed(boolean tame) {
-        getHandle().setTame(tame, true);
+        this.getHandle().setTame(tame, true);
         if (!tame) {
-            setOwnerUUID(null);
+            this.setOwnerUUID(null);
         }
     }
 
     public boolean isSitting() {
-        return getHandle().isInSittingPose();
+        return this.getHandle().isInSittingPose();
     }
 
     public void setSitting(boolean sitting) {
-        getHandle().setInSittingPose(sitting);
-        getHandle().setOrderedToSit(sitting);
+        this.getHandle().setInSittingPose(sitting);
+        this.getHandle().setOrderedToSit(sitting);
     }
 
     @Override
     public String toString() {
-        return getClass().getSimpleName() + "{owner=" + getOwner() + ",tamed=" + isTamed() + "}";
+        return this.getClass().getSimpleName() + "{owner=" + this.getOwner() + ",tamed=" + this.isTamed() + "}";
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTextDisplay.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTextDisplay.java
index a1d8c2c59e..5725b0281a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTextDisplay.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTextDisplay.java
@@ -25,27 +25,27 @@ public class CraftTextDisplay extends CraftDisplay implements TextDisplay {
 
     @Override
     public String getText() {
-        return CraftChatMessage.fromComponent(getHandle().getText());
+        return CraftChatMessage.fromComponent(this.getHandle().getText());
     }
 
     @Override
     public void setText(String text) {
-        getHandle().setText(CraftChatMessage.fromString(text, true)[0]);
+        this.getHandle().setText(CraftChatMessage.fromString(text, true)[0]);
     }
 
     @Override
     public int getLineWidth() {
-        return getHandle().getLineWidth();
+        return this.getHandle().getLineWidth();
     }
 
     @Override
     public void setLineWidth(int width) {
-        getHandle().getEntityData().set(Display.TextDisplay.DATA_LINE_WIDTH_ID, width);
+        this.getHandle().getEntityData().set(Display.TextDisplay.DATA_LINE_WIDTH_ID, width);
     }
 
     @Override
     public Color getBackgroundColor() {
-        int color = getHandle().getBackgroundColor();
+        int color = this.getHandle().getBackgroundColor();
 
         return (color == -1) ? null : Color.fromARGB(color);
     }
@@ -53,55 +53,55 @@ public class CraftTextDisplay extends CraftDisplay implements TextDisplay {
     @Override
     public void setBackgroundColor(Color color) {
         if (color == null) {
-            getHandle().getEntityData().set(Display.TextDisplay.DATA_BACKGROUND_COLOR_ID, -1);
+            this.getHandle().getEntityData().set(Display.TextDisplay.DATA_BACKGROUND_COLOR_ID, -1);
         } else {
-            getHandle().getEntityData().set(Display.TextDisplay.DATA_BACKGROUND_COLOR_ID, color.asARGB());
+            this.getHandle().getEntityData().set(Display.TextDisplay.DATA_BACKGROUND_COLOR_ID, color.asARGB());
         }
     }
 
     @Override
     public byte getTextOpacity() {
-        return getHandle().getTextOpacity();
+        return this.getHandle().getTextOpacity();
     }
 
     @Override
     public void setTextOpacity(byte opacity) {
-        getHandle().setTextOpacity(opacity);
+        this.getHandle().setTextOpacity(opacity);
     }
 
     @Override
     public boolean isShadowed() {
-        return getFlag(Display.TextDisplay.FLAG_SHADOW);
+        return this.getFlag(Display.TextDisplay.FLAG_SHADOW);
     }
 
     @Override
     public void setShadowed(boolean shadow) {
-        setFlag(Display.TextDisplay.FLAG_SHADOW, shadow);
+        this.setFlag(Display.TextDisplay.FLAG_SHADOW, shadow);
     }
 
     @Override
     public boolean isSeeThrough() {
-        return getFlag(Display.TextDisplay.FLAG_SEE_THROUGH);
+        return this.getFlag(Display.TextDisplay.FLAG_SEE_THROUGH);
     }
 
     @Override
     public void setSeeThrough(boolean seeThrough) {
-        setFlag(Display.TextDisplay.FLAG_SEE_THROUGH, seeThrough);
+        this.setFlag(Display.TextDisplay.FLAG_SEE_THROUGH, seeThrough);
     }
 
     @Override
     public boolean isDefaultBackground() {
-        return getFlag(Display.TextDisplay.FLAG_USE_DEFAULT_BACKGROUND);
+        return this.getFlag(Display.TextDisplay.FLAG_USE_DEFAULT_BACKGROUND);
     }
 
     @Override
     public void setDefaultBackground(boolean defaultBackground) {
-        setFlag(Display.TextDisplay.FLAG_USE_DEFAULT_BACKGROUND, defaultBackground);
+        this.setFlag(Display.TextDisplay.FLAG_USE_DEFAULT_BACKGROUND, defaultBackground);
     }
 
     @Override
     public TextAlignment getAlignment() {
-        Display.TextDisplay.Align nms = Display.TextDisplay.getAlign(getHandle().getFlags());
+        Display.TextDisplay.Align nms = Display.TextDisplay.getAlign(this.getHandle().getFlags());
         return TextAlignment.valueOf(nms.name());
     }
 
@@ -111,16 +111,16 @@ public class CraftTextDisplay extends CraftDisplay implements TextDisplay {
 
         switch (alignment) {
             case LEFT:
-                setFlag(Display.TextDisplay.FLAG_ALIGN_LEFT, true);
-                setFlag(Display.TextDisplay.FLAG_ALIGN_RIGHT, false);
+                this.setFlag(Display.TextDisplay.FLAG_ALIGN_LEFT, true);
+                this.setFlag(Display.TextDisplay.FLAG_ALIGN_RIGHT, false);
                 break;
             case RIGHT:
-                setFlag(Display.TextDisplay.FLAG_ALIGN_LEFT, false);
-                setFlag(Display.TextDisplay.FLAG_ALIGN_RIGHT, true);
+                this.setFlag(Display.TextDisplay.FLAG_ALIGN_LEFT, false);
+                this.setFlag(Display.TextDisplay.FLAG_ALIGN_RIGHT, true);
                 break;
             case CENTER:
-                setFlag(Display.TextDisplay.FLAG_ALIGN_LEFT, false);
-                setFlag(Display.TextDisplay.FLAG_ALIGN_RIGHT, false);
+                this.setFlag(Display.TextDisplay.FLAG_ALIGN_LEFT, false);
+                this.setFlag(Display.TextDisplay.FLAG_ALIGN_RIGHT, false);
                 break;
             default:
                 throw new IllegalArgumentException("Unknown alignment " + alignment);
@@ -128,11 +128,11 @@ public class CraftTextDisplay extends CraftDisplay implements TextDisplay {
     }
 
     private boolean getFlag(int flag) {
-        return (getHandle().getFlags() & flag) != 0;
+        return (this.getHandle().getFlags() & flag) != 0;
     }
 
     private void setFlag(int flag, boolean set) {
-        byte flagBits = getHandle().getFlags();
+        byte flagBits = this.getHandle().getFlags();
 
         if (set) {
             flagBits |= flag;
@@ -140,6 +140,6 @@ public class CraftTextDisplay extends CraftDisplay implements TextDisplay {
             flagBits &= ~flag;
         }
 
-        getHandle().setFlags(flagBits);
+        this.getHandle().setFlags(flagBits);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftThrowableProjectile.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftThrowableProjectile.java
index e56754a38a..bf7b111abd 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftThrowableProjectile.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftThrowableProjectile.java
@@ -1,6 +1,6 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.projectile.EntityProjectileThrowable;
+import net.minecraft.world.entity.projectile.ThrowableItemProjectile;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.craftbukkit.inventory.CraftItemStack;
 import org.bukkit.entity.ThrowableProjectile;
@@ -8,26 +8,26 @@ import org.bukkit.inventory.ItemStack;
 
 public abstract class CraftThrowableProjectile extends CraftProjectile implements ThrowableProjectile {
 
-    public CraftThrowableProjectile(CraftServer server, EntityProjectileThrowable entity) {
+    public CraftThrowableProjectile(CraftServer server, ThrowableItemProjectile entity) {
         super(server, entity);
     }
 
     @Override
     public ItemStack getItem() {
-        if (getHandle().getItem().isEmpty()) {
-            return CraftItemStack.asBukkitCopy(new net.minecraft.world.item.ItemStack(getHandle().getDefaultItemPublic()));
+        if (this.getHandle().getItem().isEmpty()) {
+            return CraftItemStack.asBukkitCopy(new net.minecraft.world.item.ItemStack(this.getHandle().getDefaultItemPublic()));
         } else {
-            return CraftItemStack.asBukkitCopy(getHandle().getItem());
+            return CraftItemStack.asBukkitCopy(this.getHandle().getItem());
         }
     }
 
     @Override
     public void setItem(ItemStack item) {
-        getHandle().setItem(CraftItemStack.asNMSCopy(item));
+        this.getHandle().setItem(CraftItemStack.asNMSCopy(item));
     }
 
     @Override
-    public EntityProjectileThrowable getHandle() {
-        return (EntityProjectileThrowable) entity;
+    public ThrowableItemProjectile getHandle() {
+        return (ThrowableItemProjectile) this.entity;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownExpBottle.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownExpBottle.java
index 884ca109a1..5e7fef664c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownExpBottle.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownExpBottle.java
@@ -1,17 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.projectile.EntityThrownExpBottle;
+import net.minecraft.world.entity.projectile.ThrownExperienceBottle;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.ThrownExpBottle;
 
 public class CraftThrownExpBottle extends CraftThrowableProjectile implements ThrownExpBottle {
-    public CraftThrownExpBottle(CraftServer server, EntityThrownExpBottle entity) {
+    public CraftThrownExpBottle(CraftServer server, ThrownExperienceBottle entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityThrownExpBottle getHandle() {
-        return (EntityThrownExpBottle) entity;
+    public ThrownExperienceBottle getHandle() {
+        return (ThrownExperienceBottle) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java
index 868b3de947..d67a80161b 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftThrownPotion.java
@@ -4,8 +4,7 @@ import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableList;
 import java.util.Collection;
 import net.minecraft.core.component.DataComponents;
-import net.minecraft.world.effect.MobEffect;
-import net.minecraft.world.entity.projectile.EntityPotion;
+import net.minecraft.world.effect.MobEffectInstance;
 import net.minecraft.world.item.alchemy.PotionContents;
 import org.bukkit.Material;
 import org.bukkit.craftbukkit.CraftServer;
@@ -16,14 +15,14 @@ import org.bukkit.inventory.ItemStack;
 import org.bukkit.potion.PotionEffect;
 
 public class CraftThrownPotion extends CraftThrowableProjectile implements ThrownPotion {
-    public CraftThrownPotion(CraftServer server, EntityPotion entity) {
+    public CraftThrownPotion(CraftServer server, net.minecraft.world.entity.projectile.ThrownPotion entity) {
         super(server, entity);
     }
 
     @Override
     public Collection<PotionEffect> getEffects() {
         ImmutableList.Builder<PotionEffect> builder = ImmutableList.builder();
-        for (MobEffect effect : getHandle().getItem().getOrDefault(DataComponents.POTION_CONTENTS, PotionContents.EMPTY).getAllEffects()) {
+        for (MobEffectInstance effect : this.getHandle().getItem().getOrDefault(DataComponents.POTION_CONTENTS, PotionContents.EMPTY).getAllEffects()) {
             builder.add(CraftPotionUtil.toBukkit(effect));
         }
         return builder.build();
@@ -31,7 +30,7 @@ public class CraftThrownPotion extends CraftThrowableProjectile implements Throw
 
     @Override
     public ItemStack getItem() {
-        return CraftItemStack.asBukkitCopy(getHandle().getItem());
+        return CraftItemStack.asBukkitCopy(this.getHandle().getItem());
     }
 
     @Override
@@ -39,11 +38,11 @@ public class CraftThrownPotion extends CraftThrowableProjectile implements Throw
         Preconditions.checkArgument(item != null, "ItemStack cannot be null");
         Preconditions.checkArgument(item.getType() == Material.LINGERING_POTION || item.getType() == Material.SPLASH_POTION, "ItemStack material must be Material.LINGERING_POTION or Material.SPLASH_POTION but was Material.%s", item.getType());
 
-        getHandle().setItem(CraftItemStack.asNMSCopy(item));
+        this.getHandle().setItem(CraftItemStack.asNMSCopy(item));
     }
 
     @Override
-    public EntityPotion getHandle() {
-        return (EntityPotion) entity;
+    public net.minecraft.world.entity.projectile.ThrownPotion getHandle() {
+        return (net.minecraft.world.entity.projectile.ThrownPotion) this.entity;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTraderLlama.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTraderLlama.java
index 129d63184d..4b3a764114 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTraderLlama.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTraderLlama.java
@@ -1,18 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.animal.horse.EntityLlamaTrader;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.TraderLlama;
 
 public class CraftTraderLlama extends CraftLlama implements TraderLlama {
 
-    public CraftTraderLlama(CraftServer server, EntityLlamaTrader entity) {
+    public CraftTraderLlama(CraftServer server, net.minecraft.world.entity.animal.horse.TraderLlama entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityLlamaTrader getHandle() {
-        return (EntityLlamaTrader) super.getHandle();
+    public net.minecraft.world.entity.animal.horse.TraderLlama getHandle() {
+        return (net.minecraft.world.entity.animal.horse.TraderLlama) super.getHandle();
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTrident.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTrident.java
index dd0c3f7623..33d6e81217 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTrident.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTrident.java
@@ -1,6 +1,6 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.projectile.EntityThrownTrident;
+import net.minecraft.world.entity.projectile.ThrownTrident;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.craftbukkit.inventory.CraftItemStack;
 import org.bukkit.entity.Trident;
@@ -8,23 +8,23 @@ import org.bukkit.inventory.ItemStack;
 
 public class CraftTrident extends CraftAbstractArrow implements Trident {
 
-    public CraftTrident(CraftServer server, EntityThrownTrident entity) {
+    public CraftTrident(CraftServer server, ThrownTrident entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityThrownTrident getHandle() {
-        return (EntityThrownTrident) super.getHandle();
+    public ThrownTrident getHandle() {
+        return (ThrownTrident) super.getHandle();
     }
 
     @Override
     public ItemStack getItem() {
-        return CraftItemStack.asBukkitCopy(getHandle().pickupItemStack);
+        return CraftItemStack.asBukkitCopy(this.getHandle().pickupItemStack);
     }
 
     @Override
     public void setItem(ItemStack itemStack) {
-        getHandle().pickupItemStack = CraftItemStack.asNMSCopy(itemStack);
+        this.getHandle().pickupItemStack = CraftItemStack.asNMSCopy(itemStack);
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTropicalFish.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTropicalFish.java
index 60b16c5ae1..e3bde6d1c0 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTropicalFish.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTropicalFish.java
@@ -2,7 +2,6 @@ package org.bukkit.craftbukkit.entity;
 
 import java.util.HashMap;
 import java.util.Map;
-import net.minecraft.world.entity.animal.EntityTropicalFish;
 import org.bukkit.DyeColor;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.TropicalFish;
@@ -10,13 +9,13 @@ import org.bukkit.entity.TropicalFish.Pattern;
 
 public class CraftTropicalFish extends CraftFish implements TropicalFish {
 
-    public CraftTropicalFish(CraftServer server, EntityTropicalFish entity) {
+    public CraftTropicalFish(CraftServer server, net.minecraft.world.entity.animal.TropicalFish entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityTropicalFish getHandle() {
-        return (EntityTropicalFish) entity;
+    public net.minecraft.world.entity.animal.TropicalFish getHandle() {
+        return (net.minecraft.world.entity.animal.TropicalFish) this.entity;
     }
 
     @Override
@@ -26,32 +25,32 @@ public class CraftTropicalFish extends CraftFish implements TropicalFish {
 
     @Override
     public DyeColor getPatternColor() {
-        return getPatternColor(getHandle().getPackedVariant());
+        return CraftTropicalFish.getPatternColor(this.getHandle().getPackedVariant());
     }
 
     @Override
     public void setPatternColor(DyeColor color) {
-        getHandle().setPackedVariant(getData(color, getBodyColor(), getPattern()));
+        this.getHandle().setPackedVariant(CraftTropicalFish.getData(color, this.getBodyColor(), this.getPattern()));
     }
 
     @Override
     public DyeColor getBodyColor() {
-        return getBodyColor(getHandle().getPackedVariant());
+        return CraftTropicalFish.getBodyColor(this.getHandle().getPackedVariant());
     }
 
     @Override
     public void setBodyColor(DyeColor color) {
-        getHandle().setPackedVariant(getData(getPatternColor(), color, getPattern()));
+        this.getHandle().setPackedVariant(CraftTropicalFish.getData(this.getPatternColor(), color, this.getPattern()));
     }
 
     @Override
     public Pattern getPattern() {
-        return getPattern(getHandle().getPackedVariant());
+        return CraftTropicalFish.getPattern(this.getHandle().getPackedVariant());
     }
 
     @Override
     public void setPattern(Pattern pattern) {
-        getHandle().setPackedVariant(getData(getPatternColor(), getBodyColor(), pattern));
+        this.getHandle().setPackedVariant(CraftTropicalFish.getData(this.getPatternColor(), this.getBodyColor(), pattern));
     }
 
     public static enum CraftPattern {
@@ -90,7 +89,7 @@ public class CraftTropicalFish extends CraftFish implements TropicalFish {
         }
 
         public int getDataValue() {
-            return variant << 8 | ((large) ? 1 : 0);
+            return this.variant << 8 | ((this.large) ? 1 : 0);
         }
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTurtle.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTurtle.java
index 789e83dbc1..fac0317ff9 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTurtle.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftTurtle.java
@@ -1,18 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.animal.EntityTurtle;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Turtle;
 
 public class CraftTurtle extends CraftAnimals implements Turtle {
 
-    public CraftTurtle(CraftServer server, EntityTurtle entity) {
+    public CraftTurtle(CraftServer server, net.minecraft.world.entity.animal.Turtle entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityTurtle getHandle() {
-        return (EntityTurtle) super.getHandle();
+    public net.minecraft.world.entity.animal.Turtle getHandle() {
+        return (net.minecraft.world.entity.animal.Turtle) super.getHandle();
     }
 
     @Override
@@ -22,11 +21,11 @@ public class CraftTurtle extends CraftAnimals implements Turtle {
 
     @Override
     public boolean hasEgg() {
-        return getHandle().hasEgg();
+        return this.getHandle().hasEgg();
     }
 
     @Override
     public boolean isLayingEgg() {
-        return getHandle().isLayingEgg();
+        return this.getHandle().isLayingEgg();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftVehicle.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftVehicle.java
index 2a3ae470f5..59e5b417e8 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftVehicle.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftVehicle.java
@@ -10,6 +10,6 @@ public abstract class CraftVehicle extends CraftEntity implements Vehicle {
 
     @Override
     public String toString() {
-        return "CraftVehicle{passenger=" + getPassenger() + '}';
+        return "CraftVehicle{passenger=" + this.getPassenger() + '}';
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java
index 13e4da8232..f816e30e36 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftVex.java
@@ -1,8 +1,7 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.core.BlockPosition;
-import net.minecraft.world.entity.monster.EntityVex;
+import net.minecraft.core.BlockPos;
 import org.bukkit.Location;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.craftbukkit.util.CraftLocation;
@@ -10,13 +9,13 @@ import org.bukkit.entity.Vex;
 
 public class CraftVex extends CraftMonster implements Vex {
 
-    public CraftVex(CraftServer server, EntityVex entity) {
+    public CraftVex(CraftServer server, net.minecraft.world.entity.monster.Vex entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityVex getHandle() {
-        return (EntityVex) super.getHandle();
+    public net.minecraft.world.entity.monster.Vex getHandle() {
+        return (net.minecraft.world.entity.monster.Vex) super.getHandle();
     }
 
     @Override
@@ -26,45 +25,45 @@ public class CraftVex extends CraftMonster implements Vex {
 
     @Override
     public boolean isCharging() {
-        return getHandle().isCharging();
+        return this.getHandle().isCharging();
     }
 
     @Override
     public void setCharging(boolean charging) {
-        getHandle().setIsCharging(charging);
+        this.getHandle().setIsCharging(charging);
     }
 
     @Override
     public Location getBound() {
-        BlockPosition blockPosition = getHandle().getBoundOrigin();
-        return (blockPosition == null) ? null : CraftLocation.toBukkit(blockPosition, getWorld());
+        BlockPos blockPosition = this.getHandle().getBoundOrigin();
+        return (blockPosition == null) ? null : CraftLocation.toBukkit(blockPosition, this.getWorld());
     }
 
     @Override
     public void setBound(Location location) {
         if (location == null) {
-            getHandle().setBoundOrigin(null);
+            this.getHandle().setBoundOrigin(null);
         } else {
-            Preconditions.checkArgument(getWorld().equals(location.getWorld()), "The bound world cannot be different to the entity's world.");
-            getHandle().setBoundOrigin(CraftLocation.toBlockPosition(location));
+            Preconditions.checkArgument(this.getWorld().equals(location.getWorld()), "The bound world cannot be different to the entity's world.");
+            this.getHandle().setBoundOrigin(CraftLocation.toBlockPosition(location));
         }
     }
 
     @Override
     public int getLifeTicks() {
-        return getHandle().limitedLifeTicks;
+        return this.getHandle().limitedLifeTicks;
     }
 
     @Override
     public void setLifeTicks(int lifeTicks) {
-        getHandle().setLimitedLife(lifeTicks);
+        this.getHandle().setLimitedLife(lifeTicks);
         if (lifeTicks < 0) {
-            getHandle().hasLimitedLife = false;
+            this.getHandle().hasLimitedLife = false;
         }
     }
 
     @Override
     public boolean hasLimitedLife() {
-        return getHandle().hasLimitedLife;
+        return this.getHandle().hasLimitedLife;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
index 2c5e0b8940..1a7b666f97 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftVillager.java
@@ -2,15 +2,13 @@ package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
 import java.util.Locale;
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.world.entity.monster.EntityZombie;
-import net.minecraft.world.entity.monster.EntityZombieVillager;
-import net.minecraft.world.entity.npc.EntityVillager;
+import net.minecraft.world.entity.monster.Zombie;
 import net.minecraft.world.entity.npc.VillagerProfession;
 import net.minecraft.world.entity.npc.VillagerType;
-import net.minecraft.world.level.block.BlockBed;
-import net.minecraft.world.level.block.state.IBlockData;
+import net.minecraft.world.level.block.BedBlock;
+import net.minecraft.world.level.block.state.BlockState;
 import org.bukkit.Location;
 import org.bukkit.NamespacedKey;
 import org.bukkit.Registry;
@@ -25,13 +23,13 @@ import org.bukkit.event.entity.EntityTransformEvent;
 
 public class CraftVillager extends CraftAbstractVillager implements Villager {
 
-    public CraftVillager(CraftServer server, EntityVillager entity) {
+    public CraftVillager(CraftServer server, net.minecraft.world.entity.npc.Villager entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityVillager getHandle() {
-        return (EntityVillager) entity;
+    public net.minecraft.world.entity.npc.Villager getHandle() {
+        return (net.minecraft.world.entity.npc.Villager) this.entity;
     }
 
     @Override
@@ -41,90 +39,90 @@ public class CraftVillager extends CraftAbstractVillager implements Villager {
 
     @Override
     public void remove() {
-        getHandle().releaseAllPois();
+        this.getHandle().releaseAllPois();
 
         super.remove();
     }
 
     @Override
     public Profession getProfession() {
-        return CraftProfession.minecraftToBukkit(getHandle().getVillagerData().getProfession());
+        return CraftProfession.minecraftToBukkit(this.getHandle().getVillagerData().getProfession());
     }
 
     @Override
     public void setProfession(Profession profession) {
         Preconditions.checkArgument(profession != null, "Profession cannot be null");
-        getHandle().setVillagerData(getHandle().getVillagerData().setProfession(CraftProfession.bukkitToMinecraft(profession)));
+        this.getHandle().setVillagerData(this.getHandle().getVillagerData().setProfession(CraftProfession.bukkitToMinecraft(profession)));
     }
 
     @Override
     public Type getVillagerType() {
-        return CraftType.minecraftToBukkit(getHandle().getVillagerData().getType());
+        return CraftType.minecraftToBukkit(this.getHandle().getVillagerData().getType());
     }
 
     @Override
     public void setVillagerType(Type type) {
         Preconditions.checkArgument(type != null, "Type cannot be null");
-        getHandle().setVillagerData(getHandle().getVillagerData().setType(CraftType.bukkitToMinecraft(type)));
+        this.getHandle().setVillagerData(this.getHandle().getVillagerData().setType(CraftType.bukkitToMinecraft(type)));
     }
 
     @Override
     public int getVillagerLevel() {
-        return getHandle().getVillagerData().getLevel();
+        return this.getHandle().getVillagerData().getLevel();
     }
 
     @Override
     public void setVillagerLevel(int level) {
         Preconditions.checkArgument(1 <= level && level <= 5, "level (%s) must be between [1, 5]", level);
 
-        getHandle().setVillagerData(getHandle().getVillagerData().setLevel(level));
+        this.getHandle().setVillagerData(this.getHandle().getVillagerData().setLevel(level));
     }
 
     @Override
     public int getVillagerExperience() {
-        return getHandle().getVillagerXp();
+        return this.getHandle().getVillagerXp();
     }
 
     @Override
     public void setVillagerExperience(int experience) {
         Preconditions.checkArgument(experience >= 0, "Experience (%s) must be positive", experience);
 
-        getHandle().setVillagerXp(experience);
+        this.getHandle().setVillagerXp(experience);
     }
 
     @Override
     public boolean sleep(Location location) {
         Preconditions.checkArgument(location != null, "Location cannot be null");
         Preconditions.checkArgument(location.getWorld() != null, "Location needs to be in a world");
-        Preconditions.checkArgument(location.getWorld().equals(getWorld()), "Cannot sleep across worlds");
-        Preconditions.checkState(!getHandle().generation, "Cannot sleep during world generation");
+        Preconditions.checkArgument(location.getWorld().equals(this.getWorld()), "Cannot sleep across worlds");
+        Preconditions.checkState(!this.getHandle().generation, "Cannot sleep during world generation");
 
-        BlockPosition position = CraftLocation.toBlockPosition(location);
-        IBlockData iblockdata = getHandle().level().getBlockState(position);
-        if (!(iblockdata.getBlock() instanceof BlockBed)) {
+        BlockPos position = CraftLocation.toBlockPosition(location);
+        BlockState iblockdata = this.getHandle().level().getBlockState(position);
+        if (!(iblockdata.getBlock() instanceof BedBlock)) {
             return false;
         }
 
-        getHandle().startSleeping(position);
+        this.getHandle().startSleeping(position);
         return true;
     }
 
     @Override
     public void wakeup() {
-        Preconditions.checkState(isSleeping(), "Cannot wakeup if not sleeping");
-        Preconditions.checkState(!getHandle().generation, "Cannot wakeup during world generation");
+        Preconditions.checkState(this.isSleeping(), "Cannot wakeup if not sleeping");
+        Preconditions.checkState(!this.getHandle().generation, "Cannot wakeup during world generation");
 
-        getHandle().stopSleeping();
+        this.getHandle().stopSleeping();
     }
 
     @Override
     public void shakeHead() {
-        getHandle().setUnhappy();
+        this.getHandle().setUnhappy();
     }
 
     @Override
     public ZombieVillager zombify() {
-        EntityZombieVillager entityzombievillager = EntityZombie.convertVillagerToZombieVillager(getHandle().level().getMinecraftWorld(), getHandle(), getHandle().blockPosition(), isSilent(), EntityTransformEvent.TransformReason.INFECTION, CreatureSpawnEvent.SpawnReason.CUSTOM);
+        net.minecraft.world.entity.monster.ZombieVillager entityzombievillager = Zombie.convertVillagerToZombieVillager(this.getHandle().level().getMinecraftWorld(), this.getHandle(), this.getHandle().blockPosition(), this.isSilent(), EntityTransformEvent.TransformReason.INFECTION, CreatureSpawnEvent.SpawnReason.CUSTOM);
         return (entityzombievillager != null) ? (ZombieVillager) entityzombievillager.getBukkitEntity() : null;
     }
 
@@ -156,38 +154,38 @@ public class CraftVillager extends CraftAbstractVillager implements Villager {
             } else {
                 this.name = key.toString();
             }
-            this.ordinal = count++;
+            this.ordinal = CraftType.count++;
         }
 
         @Override
         public VillagerType getHandle() {
-            return villagerType;
+            return this.villagerType;
         }
 
         @Override
         public NamespacedKey getKey() {
-            return key;
+            return this.key;
         }
 
         @Override
         public int compareTo(Type type) {
-            return ordinal - type.ordinal();
+            return this.ordinal - type.ordinal();
         }
 
         @Override
         public String name() {
-            return name;
+            return this.name;
         }
 
         @Override
         public int ordinal() {
-            return ordinal;
+            return this.ordinal;
         }
 
         @Override
         public String toString() {
             // For backwards compatibility
-            return name();
+            return this.name();
         }
 
         @Override
@@ -200,12 +198,12 @@ public class CraftVillager extends CraftAbstractVillager implements Villager {
                 return false;
             }
 
-            return getKey().equals(((Type) other).getKey());
+            return this.getKey().equals(((Type) other).getKey());
         }
 
         @Override
         public int hashCode() {
-            return getKey().hashCode();
+            return this.getKey().hashCode();
         }
     }
 
@@ -237,38 +235,38 @@ public class CraftVillager extends CraftAbstractVillager implements Villager {
             } else {
                 this.name = key.toString();
             }
-            this.ordinal = count++;
+            this.ordinal = CraftProfession.count++;
         }
 
         @Override
         public VillagerProfession getHandle() {
-            return villagerProfession;
+            return this.villagerProfession;
         }
 
         @Override
         public NamespacedKey getKey() {
-            return key;
+            return this.key;
         }
 
         @Override
         public int compareTo(Profession profession) {
-            return ordinal - profession.ordinal();
+            return this.ordinal - profession.ordinal();
         }
 
         @Override
         public String name() {
-            return name;
+            return this.name;
         }
 
         @Override
         public int ordinal() {
-            return ordinal;
+            return this.ordinal;
         }
 
         @Override
         public String toString() {
             // For backwards compatibility
-            return name();
+            return this.name();
         }
 
         @Override
@@ -281,12 +279,12 @@ public class CraftVillager extends CraftAbstractVillager implements Villager {
                 return false;
             }
 
-            return getKey().equals(((Profession) other).getKey());
+            return this.getKey().equals(((Profession) other).getKey());
         }
 
         @Override
         public int hashCode() {
-            return getKey().hashCode();
+            return this.getKey().hashCode();
         }
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftVillagerZombie.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftVillagerZombie.java
index ccdd0fd828..e2a0c11867 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftVillagerZombie.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftVillagerZombie.java
@@ -2,7 +2,6 @@ package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
 import net.minecraft.world.effect.MobEffects;
-import net.minecraft.world.entity.monster.EntityZombieVillager;
 import org.bukkit.Bukkit;
 import org.bukkit.OfflinePlayer;
 import org.bukkit.craftbukkit.CraftServer;
@@ -11,13 +10,13 @@ import org.bukkit.entity.ZombieVillager;
 
 public class CraftVillagerZombie extends CraftZombie implements ZombieVillager {
 
-    public CraftVillagerZombie(CraftServer server, EntityZombieVillager entity) {
+    public CraftVillagerZombie(CraftServer server, net.minecraft.world.entity.monster.ZombieVillager entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityZombieVillager getHandle() {
-        return (EntityZombieVillager) super.getHandle();
+    public net.minecraft.world.entity.monster.ZombieVillager getHandle() {
+        return (net.minecraft.world.entity.monster.ZombieVillager) super.getHandle();
     }
 
     @Override
@@ -27,58 +26,58 @@ public class CraftVillagerZombie extends CraftZombie implements ZombieVillager {
 
     @Override
     public Villager.Profession getVillagerProfession() {
-        return CraftVillager.CraftProfession.minecraftToBukkit(getHandle().getVillagerData().getProfession());
+        return CraftVillager.CraftProfession.minecraftToBukkit(this.getHandle().getVillagerData().getProfession());
     }
 
     @Override
     public void setVillagerProfession(Villager.Profession profession) {
         Preconditions.checkArgument(profession != null, "Villager.Profession cannot be null");
-        getHandle().setVillagerData(getHandle().getVillagerData().setProfession(CraftVillager.CraftProfession.bukkitToMinecraft(profession)));
+        this.getHandle().setVillagerData(this.getHandle().getVillagerData().setProfession(CraftVillager.CraftProfession.bukkitToMinecraft(profession)));
     }
 
     @Override
     public Villager.Type getVillagerType() {
-        return CraftVillager.CraftType.minecraftToBukkit(getHandle().getVillagerData().getType());
+        return CraftVillager.CraftType.minecraftToBukkit(this.getHandle().getVillagerData().getType());
     }
 
     @Override
     public void setVillagerType(Villager.Type type) {
         Preconditions.checkArgument(type != null, "Villager.Type cannot be null");
-        getHandle().setVillagerData(getHandle().getVillagerData().setType(CraftVillager.CraftType.bukkitToMinecraft(type)));
+        this.getHandle().setVillagerData(this.getHandle().getVillagerData().setType(CraftVillager.CraftType.bukkitToMinecraft(type)));
     }
 
     @Override
     public boolean isConverting() {
-        return getHandle().isConverting();
+        return this.getHandle().isConverting();
     }
 
     @Override
     public int getConversionTime() {
-        Preconditions.checkState(isConverting(), "Entity not converting");
+        Preconditions.checkState(this.isConverting(), "Entity not converting");
 
-        return getHandle().villagerConversionTime;
+        return this.getHandle().villagerConversionTime;
     }
 
     @Override
     public void setConversionTime(int time) {
         if (time < 0) {
-            getHandle().villagerConversionTime = -1;
-            getHandle().getEntityData().set(EntityZombieVillager.DATA_CONVERTING_ID, false);
-            getHandle().conversionStarter = null;
-            getHandle().removeEffect(MobEffects.DAMAGE_BOOST, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.CONVERSION);
+            this.getHandle().villagerConversionTime = -1;
+            this.getHandle().getEntityData().set(net.minecraft.world.entity.monster.ZombieVillager.DATA_CONVERTING_ID, false);
+            this.getHandle().conversionStarter = null;
+            this.getHandle().removeEffect(MobEffects.DAMAGE_BOOST, org.bukkit.event.entity.EntityPotionEffectEvent.Cause.CONVERSION);
         } else {
-            getHandle().startConverting(null, time);
+            this.getHandle().startConverting(null, time);
         }
     }
 
     @Override
     public OfflinePlayer getConversionPlayer() {
-        return (getHandle().conversionStarter == null) ? null : Bukkit.getOfflinePlayer(getHandle().conversionStarter);
+        return (this.getHandle().conversionStarter == null) ? null : Bukkit.getOfflinePlayer(this.getHandle().conversionStarter);
     }
 
     @Override
     public void setConversionPlayer(OfflinePlayer conversionPlayer) {
         if (!this.isConverting()) return;
-        getHandle().conversionStarter = (conversionPlayer == null) ? null : conversionPlayer.getUniqueId();
+        this.getHandle().conversionStarter = (conversionPlayer == null) ? null : conversionPlayer.getUniqueId();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java
index c5f739c12a..bcd3370bc4 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftVindicator.java
@@ -1,18 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntityVindicator;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Vindicator;
 
 public class CraftVindicator extends CraftIllager implements Vindicator {
 
-    public CraftVindicator(CraftServer server, EntityVindicator entity) {
+    public CraftVindicator(CraftServer server, net.minecraft.world.entity.monster.Vindicator entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityVindicator getHandle() {
-        return (EntityVindicator) super.getHandle();
+    public net.minecraft.world.entity.monster.Vindicator getHandle() {
+        return (net.minecraft.world.entity.monster.Vindicator) super.getHandle();
     }
 
     @Override
@@ -22,11 +21,11 @@ public class CraftVindicator extends CraftIllager implements Vindicator {
 
     @Override
     public boolean isJohnny() {
-        return getHandle().isJohnny;
+        return this.getHandle().isJohnny;
     }
 
     @Override
     public void setJohnny(boolean johnny) {
-        getHandle().isJohnny = johnny;
+        this.getHandle().isJohnny = johnny;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWanderingTrader.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWanderingTrader.java
index 71bae8b314..08194a78c2 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWanderingTrader.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWanderingTrader.java
@@ -1,18 +1,17 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.npc.EntityVillagerTrader;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.WanderingTrader;
 
 public class CraftWanderingTrader extends CraftAbstractVillager implements WanderingTrader {
 
-    public CraftWanderingTrader(CraftServer server, EntityVillagerTrader entity) {
+    public CraftWanderingTrader(CraftServer server, net.minecraft.world.entity.npc.WanderingTrader entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityVillagerTrader getHandle() {
-        return (EntityVillagerTrader) entity;
+    public net.minecraft.world.entity.npc.WanderingTrader getHandle() {
+        return (net.minecraft.world.entity.npc.WanderingTrader) this.entity;
     }
 
     @Override
@@ -22,11 +21,11 @@ public class CraftWanderingTrader extends CraftAbstractVillager implements Wande
 
     @Override
     public int getDespawnDelay() {
-        return getHandle().getDespawnDelay();
+        return this.getHandle().getDespawnDelay();
     }
 
     @Override
     public void setDespawnDelay(int despawnDelay) {
-        getHandle().setDespawnDelay(despawnDelay);
+        this.getHandle().setDespawnDelay(despawnDelay);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWarden.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWarden.java
index 7b3239f4ac..794e4fe0a3 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWarden.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWarden.java
@@ -1,7 +1,7 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
 import net.minecraft.world.entity.monster.warden.Warden;
 import net.minecraft.world.entity.monster.warden.WardenAi;
 import org.bukkit.Location;
@@ -17,7 +17,7 @@ public class CraftWarden extends CraftMonster implements org.bukkit.entity.Warde
 
     @Override
     public Warden getHandle() {
-        return (Warden) entity;
+        return (Warden) this.entity;
     }
 
     @Override
@@ -27,53 +27,53 @@ public class CraftWarden extends CraftMonster implements org.bukkit.entity.Warde
 
     @Override
     public int getAnger() {
-        return getHandle().getAngerManagement().getActiveAnger(getHandle().getTarget());
+        return this.getHandle().getAngerManagement().getActiveAnger(this.getHandle().getTarget());
     }
 
     @Override
     public int getAnger(Entity entity) {
         Preconditions.checkArgument(entity != null, "Entity cannot be null");
 
-        return getHandle().getAngerManagement().getActiveAnger(((CraftEntity) entity).getHandle());
+        return this.getHandle().getAngerManagement().getActiveAnger(((CraftEntity) entity).getHandle());
     }
 
     @Override
     public void increaseAnger(Entity entity, int increase) {
         Preconditions.checkArgument(entity != null, "Entity cannot be null");
 
-        getHandle().getAngerManagement().increaseAnger(((CraftEntity) entity).getHandle(), increase);
+        this.getHandle().getAngerManagement().increaseAnger(((CraftEntity) entity).getHandle(), increase);
     }
 
     @Override
     public void setAnger(Entity entity, int anger) {
         Preconditions.checkArgument(entity != null, "Entity cannot be null");
 
-        getHandle().clearAnger(((CraftEntity) entity).getHandle());
-        getHandle().getAngerManagement().increaseAnger(((CraftEntity) entity).getHandle(), anger);
+        this.getHandle().clearAnger(((CraftEntity) entity).getHandle());
+        this.getHandle().getAngerManagement().increaseAnger(((CraftEntity) entity).getHandle(), anger);
     }
 
     @Override
     public void clearAnger(Entity entity) {
         Preconditions.checkArgument(entity != null, "Entity cannot be null");
 
-        getHandle().clearAnger(((CraftEntity) entity).getHandle());
+        this.getHandle().clearAnger(((CraftEntity) entity).getHandle());
     }
 
     @Override
     public LivingEntity getEntityAngryAt() {
-        return (LivingEntity) getHandle().getEntityAngryAt().map(net.minecraft.world.entity.Entity::getBukkitEntity).orElse(null);
+        return (LivingEntity) this.getHandle().getEntityAngryAt().map(net.minecraft.world.entity.Entity::getBukkitEntity).orElse(null);
     }
 
     @Override
     public void setDisturbanceLocation(Location location) {
         Preconditions.checkArgument(location != null, "Location cannot be null");
 
-        WardenAi.setDisturbanceLocation(getHandle(), BlockPosition.containing(location.getX(), location.getY(), location.getZ()));
+        WardenAi.setDisturbanceLocation(this.getHandle(), BlockPos.containing(location.getX(), location.getY(), location.getZ()));
     }
 
     @Override
     public AngerLevel getAngerLevel() {
-        return switch (getHandle().getAngerLevel()) {
+        return switch (this.getHandle().getAngerLevel()) {
             case CALM -> AngerLevel.CALM;
             case AGITATED -> AngerLevel.AGITATED;
             case ANGRY -> AngerLevel.ANGRY;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWaterMob.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWaterMob.java
index 4860475cdc..1b347deb6e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWaterMob.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWaterMob.java
@@ -1,18 +1,18 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.animal.EntityWaterAnimal;
+import net.minecraft.world.entity.animal.WaterAnimal;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.WaterMob;
 
 public class CraftWaterMob extends CraftCreature implements WaterMob {
 
-    public CraftWaterMob(CraftServer server, EntityWaterAnimal entity) {
+    public CraftWaterMob(CraftServer server, WaterAnimal entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityWaterAnimal getHandle() {
-        return (EntityWaterAnimal) entity;
+    public WaterAnimal getHandle() {
+        return (WaterAnimal) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java
index e5cb9e2077..bf6acf783d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWitch.java
@@ -1,17 +1,16 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntityWitch;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Witch;
 
 public class CraftWitch extends CraftRaider implements Witch {
-    public CraftWitch(CraftServer server, EntityWitch entity) {
+    public CraftWitch(CraftServer server, net.minecraft.world.entity.monster.Witch entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityWitch getHandle() {
-        return (EntityWitch) entity;
+    public net.minecraft.world.entity.monster.Witch getHandle() {
+        return (net.minecraft.world.entity.monster.Witch) this.entity;
     }
 
     @Override
@@ -21,6 +20,6 @@ public class CraftWitch extends CraftRaider implements Witch {
 
     @Override
     public boolean isDrinkingPotion() {
-        return getHandle().isDrinkingPotion();
+        return this.getHandle().isDrinkingPotion();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java
index 38db21cd3e..59bdb36ca1 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWither.java
@@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
 import net.minecraft.world.entity.Entity;
-import net.minecraft.world.entity.boss.wither.EntityWither;
+import net.minecraft.world.entity.boss.wither.WitherBoss;
 import org.bukkit.boss.BossBar;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.craftbukkit.boss.CraftBossBar;
@@ -13,7 +13,7 @@ public class CraftWither extends CraftMonster implements Wither {
 
     private BossBar bossBar;
 
-    public CraftWither(CraftServer server, EntityWither entity) {
+    public CraftWither(CraftServer server, WitherBoss entity) {
         super(server, entity);
 
         if (entity.bossEvent != null) {
@@ -22,8 +22,8 @@ public class CraftWither extends CraftMonster implements Wither {
     }
 
     @Override
-    public EntityWither getHandle() {
-        return (EntityWither) entity;
+    public WitherBoss getHandle() {
+        return (WitherBoss) this.entity;
     }
 
     @Override
@@ -33,7 +33,7 @@ public class CraftWither extends CraftMonster implements Wither {
 
     @Override
     public BossBar getBossBar() {
-        return bossBar;
+        return this.bossBar;
     }
 
     @Override
@@ -41,30 +41,30 @@ public class CraftWither extends CraftMonster implements Wither {
         Preconditions.checkArgument(head != null, "head cannot be null");
 
         int entityId = (livingEntity != null) ? livingEntity.getEntityId() : 0;
-        getHandle().setAlternativeTarget(head.ordinal(), entityId);
+        this.getHandle().setAlternativeTarget(head.ordinal(), entityId);
     }
 
     @Override
     public LivingEntity getTarget(Head head) {
         Preconditions.checkArgument(head != null, "head cannot be null");
 
-        int entityId = getHandle().getAlternativeTarget(head.ordinal());
+        int entityId = this.getHandle().getAlternativeTarget(head.ordinal());
         if (entityId == 0) {
             return null;
         }
-        Entity target = getHandle().level().getEntity(entityId);
+        Entity target = this.getHandle().level().getEntity(entityId);
         return (target != null) ? (LivingEntity) target.getBukkitEntity() : null;
     }
 
     @Override
     public int getInvulnerabilityTicks() {
-        return getHandle().getInvulnerableTicks();
+        return this.getHandle().getInvulnerableTicks();
     }
 
     @Override
     public void setInvulnerabilityTicks(int ticks) {
         Preconditions.checkArgument(ticks >= 0, "ticks must be >=0");
 
-        getHandle().setInvulnerableTicks(ticks);
+        this.getHandle().setInvulnerableTicks(ticks);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkeleton.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkeleton.java
index 6f96b750e7..ffee517b2d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkeleton.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkeleton.java
@@ -1,13 +1,12 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntitySkeletonWither;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Skeleton.SkeletonType;
 import org.bukkit.entity.WitherSkeleton;
 
 public class CraftWitherSkeleton extends CraftAbstractSkeleton implements WitherSkeleton {
 
-    public CraftWitherSkeleton(CraftServer server, EntitySkeletonWither entity) {
+    public CraftWitherSkeleton(CraftServer server, net.minecraft.world.entity.monster.WitherSkeleton entity) {
         super(server, entity);
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkull.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkull.java
index 5c09ceb7cf..bc97839125 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkull.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWitherSkull.java
@@ -1,27 +1,26 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.projectile.EntityWitherSkull;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.WitherSkull;
 
 public class CraftWitherSkull extends CraftFireball implements WitherSkull {
-    public CraftWitherSkull(CraftServer server, EntityWitherSkull entity) {
+    public CraftWitherSkull(CraftServer server, net.minecraft.world.entity.projectile.WitherSkull entity) {
         super(server, entity);
     }
 
     @Override
     public void setCharged(boolean charged) {
-        getHandle().setDangerous(charged);
+        this.getHandle().setDangerous(charged);
     }
 
     @Override
     public boolean isCharged() {
-        return getHandle().isDangerous();
+        return this.getHandle().isDangerous();
     }
 
     @Override
-    public EntityWitherSkull getHandle() {
-        return (EntityWitherSkull) entity;
+    public net.minecraft.world.entity.projectile.WitherSkull getHandle() {
+        return (net.minecraft.world.entity.projectile.WitherSkull) this.entity;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java
index 90129132b2..ecd33b4add 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftWolf.java
@@ -2,11 +2,8 @@ package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
 import net.minecraft.core.Holder;
-import net.minecraft.core.IRegistry;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.world.entity.animal.EntityWolf;
 import net.minecraft.world.entity.animal.WolfVariant;
-import net.minecraft.world.item.EnumColor;
 import org.bukkit.DyeColor;
 import org.bukkit.NamespacedKey;
 import org.bukkit.Registry;
@@ -16,69 +13,69 @@ import org.bukkit.craftbukkit.util.Handleable;
 import org.bukkit.entity.Wolf;
 
 public class CraftWolf extends CraftTameableAnimal implements Wolf {
-    public CraftWolf(CraftServer server, EntityWolf wolf) {
+    public CraftWolf(CraftServer server, net.minecraft.world.entity.animal.Wolf wolf) {
         super(server, wolf);
     }
 
     @Override
     public boolean isAngry() {
-        return getHandle().isAngry();
+        return this.getHandle().isAngry();
     }
 
     @Override
     public void setAngry(boolean angry) {
         if (angry) {
-            getHandle().startPersistentAngerTimer();
+            this.getHandle().startPersistentAngerTimer();
         } else {
-            getHandle().stopBeingAngry();
+            this.getHandle().stopBeingAngry();
         }
     }
 
     @Override
-    public EntityWolf getHandle() {
-        return (EntityWolf) entity;
+    public net.minecraft.world.entity.animal.Wolf getHandle() {
+        return (net.minecraft.world.entity.animal.Wolf) this.entity;
     }
 
     @Override
     public DyeColor getCollarColor() {
-        return DyeColor.getByWoolData((byte) getHandle().getCollarColor().getId());
+        return DyeColor.getByWoolData((byte) this.getHandle().getCollarColor().getId());
     }
 
     @Override
     public void setCollarColor(DyeColor color) {
-        getHandle().setCollarColor(EnumColor.byId(color.getWoolData()));
+        this.getHandle().setCollarColor(net.minecraft.world.item.DyeColor.byId(color.getWoolData()));
     }
 
     @Override
     public boolean isWet() {
-        return getHandle().isWet;
+        return this.getHandle().isWet;
     }
 
     @Override
     public float getTailAngle() {
-        return getHandle().getTailAngle();
+        return this.getHandle().getTailAngle();
     }
 
     @Override
     public boolean isInterested() {
-        return getHandle().isInterested();
+        return this.getHandle().isInterested();
     }
 
     @Override
     public void setInterested(boolean flag) {
-        getHandle().setIsInterested(flag);
+        this.getHandle().setIsInterested(flag);
     }
 
     @Override
     public Variant getVariant() {
-        return CraftVariant.minecraftHolderToBukkit(getHandle().getVariant());
+        return CraftVariant.minecraftHolderToBukkit(this.getHandle().getVariant());
     }
 
     @Override
     public void setVariant(Variant variant) {
         Preconditions.checkArgument(variant != null, "variant");
 
-        getHandle().setVariant(CraftVariant.bukkitToMinecraftHolder(variant));
+        this.getHandle().setVariant(CraftVariant.bukkitToMinecraftHolder(variant));
     }
 
     public static class CraftVariant implements Variant, Handleable<WolfVariant> {
@@ -88,7 +85,7 @@ public class CraftWolf extends CraftTameableAnimal implements Wolf {
         }
 
         public static Variant minecraftHolderToBukkit(Holder<WolfVariant> minecraft) {
-            return minecraftToBukkit(minecraft.value());
+            return CraftVariant.minecraftToBukkit(minecraft.value());
         }
 
         public static WolfVariant bukkitToMinecraft(Variant bukkit) {
@@ -98,9 +95,9 @@ public class CraftWolf extends CraftTameableAnimal implements Wolf {
         public static Holder<WolfVariant> bukkitToMinecraftHolder(Variant bukkit) {
             Preconditions.checkArgument(bukkit != null);
 
-            IRegistry<WolfVariant> registry = CraftRegistry.getMinecraftRegistry(Registries.WOLF_VARIANT);
+            net.minecraft.core.Registry<WolfVariant> registry = CraftRegistry.getMinecraftRegistry(Registries.WOLF_VARIANT);
 
-            if (registry.wrapAsHolder(bukkitToMinecraft(bukkit)) instanceof Holder.c<WolfVariant> holder) {
+            if (registry.wrapAsHolder(CraftVariant.bukkitToMinecraft(bukkit)) instanceof Holder.Reference<WolfVariant> holder) {
                 return holder;
             }
 
@@ -118,17 +115,17 @@ public class CraftWolf extends CraftTameableAnimal implements Wolf {
 
         @Override
         public WolfVariant getHandle() {
-            return variant;
+            return this.variant;
         }
 
         @Override
         public NamespacedKey getKey() {
-            return key;
+            return this.key;
         }
 
         @Override
         public String toString() {
-            return key.toString();
+            return this.key.toString();
         }
 
         @Override
@@ -141,12 +138,12 @@ public class CraftWolf extends CraftTameableAnimal implements Wolf {
                 return false;
             }
 
-            return getKey().equals(otherVariant.getKey());
+            return this.getKey().equals(otherVariant.getKey());
         }
 
         @Override
         public int hashCode() {
-            return getKey().hashCode();
+            return this.getKey().hashCode();
         }
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftZoglin.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftZoglin.java
index 6b4907a369..c134c4bb8c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftZoglin.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftZoglin.java
@@ -1,28 +1,27 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.monster.EntityZoglin;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Zoglin;
 
 public class CraftZoglin extends CraftMonster implements Zoglin {
 
-    public CraftZoglin(CraftServer server, EntityZoglin entity) {
+    public CraftZoglin(CraftServer server, net.minecraft.world.entity.monster.Zoglin entity) {
         super(server, entity);
     }
 
     @Override
     public boolean isBaby() {
-        return getHandle().isBaby();
+        return this.getHandle().isBaby();
     }
 
     @Override
     public void setBaby(boolean flag) {
-        getHandle().setBaby(flag);
+        this.getHandle().setBaby(flag);
     }
 
     @Override
-    public EntityZoglin getHandle() {
-        return (EntityZoglin) entity;
+    public net.minecraft.world.entity.monster.Zoglin getHandle() {
+        return (net.minecraft.world.entity.monster.Zoglin) this.entity;
     }
 
     @Override
@@ -32,12 +31,12 @@ public class CraftZoglin extends CraftMonster implements Zoglin {
 
     @Override
     public int getAge() {
-        return getHandle().isBaby() ? -1 : 0;
+        return this.getHandle().isBaby() ? -1 : 0;
     }
 
     @Override
     public void setAge(int i) {
-        getHandle().setBaby(i < 0);
+        this.getHandle().setBaby(i < 0);
     }
 
     @Override
@@ -51,17 +50,17 @@ public class CraftZoglin extends CraftMonster implements Zoglin {
 
     @Override
     public void setBaby() {
-        getHandle().setBaby(true);
+        this.getHandle().setBaby(true);
     }
 
     @Override
     public void setAdult() {
-        getHandle().setBaby(false);
+        this.getHandle().setBaby(false);
     }
 
     @Override
     public boolean isAdult() {
-        return !getHandle().isBaby();
+        return !this.getHandle().isBaby();
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
index 100d3aa17c..99dcaa8278 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftZombie.java
@@ -1,21 +1,20 @@
 package org.bukkit.craftbukkit.entity;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.monster.EntityZombie;
-import net.minecraft.world.entity.monster.EntityZombieVillager;
+import net.minecraft.world.entity.monster.ZombieVillager;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Villager;
 import org.bukkit.entity.Zombie;
 
 public class CraftZombie extends CraftMonster implements Zombie {
 
-    public CraftZombie(CraftServer server, EntityZombie entity) {
+    public CraftZombie(CraftServer server, net.minecraft.world.entity.monster.Zombie entity) {
         super(server, entity);
     }
 
     @Override
-    public EntityZombie getHandle() {
-        return (EntityZombie) entity;
+    public net.minecraft.world.entity.monster.Zombie getHandle() {
+        return (net.minecraft.world.entity.monster.Zombie) this.entity;
     }
 
     @Override
@@ -25,17 +24,17 @@ public class CraftZombie extends CraftMonster implements Zombie {
 
     @Override
     public boolean isBaby() {
-        return getHandle().isBaby();
+        return this.getHandle().isBaby();
     }
 
     @Override
     public void setBaby(boolean flag) {
-        getHandle().setBaby(flag);
+        this.getHandle().setBaby(flag);
     }
 
     @Override
     public boolean isVillager() {
-        return getHandle() instanceof EntityZombieVillager;
+        return this.getHandle() instanceof ZombieVillager;
     }
 
     @Override
@@ -55,34 +54,34 @@ public class CraftZombie extends CraftMonster implements Zombie {
 
     @Override
     public boolean isConverting() {
-        return getHandle().isUnderWaterConverting();
+        return this.getHandle().isUnderWaterConverting();
     }
 
     @Override
     public int getConversionTime() {
-        Preconditions.checkState(isConverting(), "Entity not converting");
+        Preconditions.checkState(this.isConverting(), "Entity not converting");
 
-        return getHandle().conversionTime;
+        return this.getHandle().conversionTime;
     }
 
     @Override
     public void setConversionTime(int time) {
         if (time < 0) {
-            getHandle().conversionTime = -1;
-            getHandle().getEntityData().set(EntityZombie.DATA_DROWNED_CONVERSION_ID, false);
+            this.getHandle().conversionTime = -1;
+            this.getHandle().getEntityData().set(net.minecraft.world.entity.monster.Zombie.DATA_DROWNED_CONVERSION_ID, false);
         } else {
-            getHandle().startUnderWaterConversion(time);
+            this.getHandle().startUnderWaterConversion(time);
         }
     }
 
     @Override
     public int getAge() {
-        return getHandle().isBaby() ? -1 : 0;
+        return this.getHandle().isBaby() ? -1 : 0;
     }
 
     @Override
     public void setAge(int i) {
-        getHandle().setBaby(i < 0);
+        this.getHandle().setBaby(i < 0);
     }
 
     @Override
@@ -96,17 +95,17 @@ public class CraftZombie extends CraftMonster implements Zombie {
 
     @Override
     public void setBaby() {
-        getHandle().setBaby(true);
+        this.getHandle().setBaby(true);
     }
 
     @Override
     public void setAdult() {
-        getHandle().setBaby(false);
+        this.getHandle().setBaby(false);
     }
 
     @Override
     public boolean isAdult() {
-        return !getHandle().isBaby();
+        return !this.getHandle().isBaby();
     }
 
     @Override
@@ -120,11 +119,11 @@ public class CraftZombie extends CraftMonster implements Zombie {
 
     @Override
     public boolean canBreakDoors() {
-        return getHandle().canBreakDoors();
+        return this.getHandle().canBreakDoors();
     }
 
     @Override
     public void setCanBreakDoors(boolean flag) {
-        getHandle().setCanBreakDoors(flag);
+        this.getHandle().setCanBreakDoors(flag);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftZombieHorse.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftZombieHorse.java
index 4a69d07c2f..2c47ea42df 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftZombieHorse.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/CraftZombieHorse.java
@@ -1,13 +1,12 @@
 package org.bukkit.craftbukkit.entity;
 
-import net.minecraft.world.entity.animal.horse.EntityHorseZombie;
 import org.bukkit.craftbukkit.CraftServer;
 import org.bukkit.entity.Horse.Variant;
 import org.bukkit.entity.ZombieHorse;
 
 public class CraftZombieHorse extends CraftAbstractHorse implements ZombieHorse {
 
-    public CraftZombieHorse(CraftServer server, EntityHorseZombie entity) {
+    public CraftZombieHorse(CraftServer server, net.minecraft.world.entity.animal.horse.ZombieHorse entity) {
         super(server, entity);
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/memory/CraftMemoryKey.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/memory/CraftMemoryKey.java
index b6ebc8769b..43cd5ef2dc 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/memory/CraftMemoryKey.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/memory/CraftMemoryKey.java
@@ -1,6 +1,5 @@
 package org.bukkit.craftbukkit.entity.memory;
 
-import net.minecraft.core.IRegistry;
 import net.minecraft.core.registries.Registries;
 import net.minecraft.world.entity.ai.memory.MemoryModuleType;
 import org.bukkit.Registry;
@@ -17,7 +16,7 @@ public final class CraftMemoryKey {
             return null;
         }
 
-        IRegistry<MemoryModuleType<?>> registry = CraftRegistry.getMinecraftRegistry(Registries.MEMORY_MODULE_TYPE);
+        net.minecraft.core.Registry<MemoryModuleType<?>> registry = CraftRegistry.getMinecraftRegistry(Registries.MEMORY_MODULE_TYPE);
         MemoryKey<U> bukkit = Registry.MEMORY_MODULE_TYPE.get(CraftNamespacedKey.fromMinecraft(registry.getResourceKey(minecraft).orElseThrow().location()));
 
         return bukkit;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/memory/CraftMemoryMapper.java b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/memory/CraftMemoryMapper.java
index 33dc274f92..ad42f2bf5d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/entity/memory/CraftMemoryMapper.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/entity/memory/CraftMemoryMapper.java
@@ -1,7 +1,7 @@
 package org.bukkit.craftbukkit.entity.memory;
 
 import java.util.UUID;
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
 import net.minecraft.core.GlobalPos;
 import org.bukkit.Bukkit;
 import org.bukkit.Location;
@@ -14,7 +14,7 @@ public final class CraftMemoryMapper {
 
     public static Object fromNms(Object object) {
         if (object instanceof GlobalPos) {
-            return fromNms((GlobalPos) object);
+            return CraftMemoryMapper.fromNms((GlobalPos) object);
         } else if (object instanceof Long) {
             return (Long) object;
         } else if (object instanceof UUID) {
@@ -32,7 +32,7 @@ public final class CraftMemoryMapper {
         if (object == null) {
             return null;
         } else if (object instanceof Location) {
-            return toNms((Location) object);
+            return CraftMemoryMapper.toNms((Location) object);
         } else if (object instanceof Long) {
             return (Long) object;
         } else if (object instanceof UUID) {
@@ -51,6 +51,6 @@ public final class CraftMemoryMapper {
     }
 
     public static GlobalPos toNms(Location location) {
-        return GlobalPos.of(((CraftWorld) location.getWorld()).getHandle().dimension(), BlockPosition.containing(location.getX(), location.getY(), location.getZ()));
+        return GlobalPos.of(((CraftWorld) location.getWorld()).getHandle().dimension(), BlockPos.containing(location.getX(), location.getY(), location.getZ()));
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java b/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
index bc49380ba8..274b24369e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftEventFactory.java
@@ -15,67 +15,53 @@ import java.util.Map;
 import java.util.stream.Collectors;
 import java.util.stream.Stream;
 import javax.annotation.Nullable;
-import net.minecraft.core.BlockPosition;
-import net.minecraft.core.EnumDirection;
-import net.minecraft.network.protocol.game.PacketPlayInCloseWindow;
-import net.minecraft.resources.MinecraftKey;
-import net.minecraft.server.level.EntityPlayer;
-import net.minecraft.server.level.WorldServer;
+import net.minecraft.core.BlockPos;
+import net.minecraft.core.Direction;
+import net.minecraft.network.protocol.game.ServerboundContainerClosePacket;
+import net.minecraft.resources.ResourceLocation;
+import net.minecraft.server.level.ServerLevel;
+import net.minecraft.server.level.ServerPlayer;
 import net.minecraft.tags.DamageTypeTags;
 import net.minecraft.util.Unit;
-import net.minecraft.world.EnumHand;
-import net.minecraft.world.IInventory;
+import net.minecraft.world.Container;
+import net.minecraft.world.InteractionHand;
 import net.minecraft.world.damagesource.DamageSource;
 import net.minecraft.world.damagesource.DamageTypes;
-import net.minecraft.world.effect.MobEffect;
+import net.minecraft.world.effect.MobEffectInstance;
 import net.minecraft.world.entity.Entity;
-import net.minecraft.world.entity.EntityAreaEffectCloud;
-import net.minecraft.world.entity.EntityExperienceOrb;
-import net.minecraft.world.entity.EntityInsentient;
-import net.minecraft.world.entity.EntityLiving;
-import net.minecraft.world.entity.EntityTypes;
-import net.minecraft.world.entity.EnumItemSlot;
-import net.minecraft.world.entity.animal.EntityAnimal;
-import net.minecraft.world.entity.animal.EntityFish;
-import net.minecraft.world.entity.animal.EntityGolem;
-import net.minecraft.world.entity.animal.EntityWaterAnimal;
-import net.minecraft.world.entity.item.EntityItem;
-import net.minecraft.world.entity.monster.EntityGhast;
-import net.minecraft.world.entity.monster.EntityIllagerWizard;
-import net.minecraft.world.entity.monster.EntityMonster;
-import net.minecraft.world.entity.monster.EntitySlime;
-import net.minecraft.world.entity.monster.EntityStrider;
-import net.minecraft.world.entity.monster.piglin.EntityPiglin;
-import net.minecraft.world.entity.npc.EntityVillager;
-import net.minecraft.world.entity.player.EntityHuman;
-import net.minecraft.world.entity.projectile.EntityFireworks;
-import net.minecraft.world.entity.projectile.EntityPotion;
-import net.minecraft.world.entity.projectile.IProjectile;
-import net.minecraft.world.entity.raid.EntityRaider;
+import net.minecraft.world.entity.Mob;
+import net.minecraft.world.entity.animal.AbstractFish;
+import net.minecraft.world.entity.animal.AbstractGolem;
+import net.minecraft.world.entity.animal.Animal;
+import net.minecraft.world.entity.animal.WaterAnimal;
+import net.minecraft.world.entity.item.ItemEntity;
+import net.minecraft.world.entity.monster.Ghast;
+import net.minecraft.world.entity.monster.Monster;
+import net.minecraft.world.entity.monster.Slime;
+import net.minecraft.world.entity.monster.SpellcasterIllager;
+import net.minecraft.world.entity.projectile.FireworkRocketEntity;
 import net.minecraft.world.entity.raid.Raid;
-import net.minecraft.world.inventory.Container;
-import net.minecraft.world.inventory.ContainerMerchant;
-import net.minecraft.world.inventory.InventoryCrafting;
+import net.minecraft.world.inventory.AbstractContainerMenu;
+import net.minecraft.world.inventory.CraftingContainer;
+import net.minecraft.world.inventory.MerchantMenu;
 import net.minecraft.world.inventory.RecipeBookType;
 import net.minecraft.world.item.ItemStack;
 import net.minecraft.world.item.Items;
-import net.minecraft.world.item.context.ItemActionContext;
-import net.minecraft.world.item.crafting.RecipeCrafting;
+import net.minecraft.world.item.context.UseOnContext;
 import net.minecraft.world.item.crafting.RecipeHolder;
-import net.minecraft.world.level.ChunkCoordIntPair;
+import net.minecraft.world.level.ChunkPos;
 import net.minecraft.world.level.Explosion;
-import net.minecraft.world.level.GeneratorAccess;
-import net.minecraft.world.level.World;
-import net.minecraft.world.level.block.entity.TileEntitySign;
-import net.minecraft.world.level.block.state.IBlockData;
-import net.minecraft.world.level.block.state.properties.BlockPropertyInstrument;
+import net.minecraft.world.level.Level;
+import net.minecraft.world.level.LevelAccessor;
+import net.minecraft.world.level.block.entity.SignBlockEntity;
+import net.minecraft.world.level.block.state.properties.NoteBlockInstrument;
+import net.minecraft.world.level.storage.loot.LootContext;
 import net.minecraft.world.level.storage.loot.LootTable;
-import net.minecraft.world.level.storage.loot.LootTableInfo;
-import net.minecraft.world.level.storage.loot.parameters.LootContextParameters;
-import net.minecraft.world.phys.MovingObjectPosition;
-import net.minecraft.world.phys.MovingObjectPositionBlock;
-import net.minecraft.world.phys.MovingObjectPositionEntity;
-import net.minecraft.world.phys.Vec3D;
+import net.minecraft.world.level.storage.loot.parameters.LootContextParams;
+import net.minecraft.world.phys.BlockHitResult;
+import net.minecraft.world.phys.EntityHitResult;
+import net.minecraft.world.phys.HitResult;
+import net.minecraft.world.phys.Vec3;
 import org.bukkit.Bukkit;
 import org.bukkit.Location;
 import org.bukkit.Material;
@@ -272,15 +258,15 @@ import org.bukkit.util.Vector;
 public class CraftEventFactory {
 
     // helper methods
-    private static boolean canBuild(WorldServer world, Player player, int x, int z) {
+    private static boolean canBuild(ServerLevel world, Player player, int x, int z) {
         int spawnSize = Bukkit.getServer().getSpawnRadius();
 
-        if (world.dimension() != World.OVERWORLD) return true;
+        if (world.dimension() != Level.OVERWORLD) return true;
         if (spawnSize <= 0) return true;
         if (((CraftServer) Bukkit.getServer()).getHandle().getOps().isEmpty()) return true;
         if (player.isOp()) return true;
 
-        BlockPosition chunkcoordinates = world.getSharedSpawnPos();
+        BlockPos chunkcoordinates = world.getSharedSpawnPos();
 
         int distanceFromSpawn = Math.max(Math.abs(x - chunkcoordinates.getX()), Math.abs(z - chunkcoordinates.getZ()));
         return distanceFromSpawn > spawnSize;
@@ -294,11 +280,11 @@ public class CraftEventFactory {
     /**
      * PlayerSignOpenEvent
      */
-    public static boolean callPlayerSignOpenEvent(EntityHuman player, TileEntitySign tileEntitySign, boolean front, PlayerSignOpenEvent.Cause cause) {
+    public static boolean callPlayerSignOpenEvent(net.minecraft.world.entity.player.Player player, SignBlockEntity tileEntitySign, boolean front, PlayerSignOpenEvent.Cause cause) {
         final Block block = CraftBlock.at(tileEntitySign.getLevel(), tileEntitySign.getBlockPos());
         final Sign sign = (Sign) CraftBlockStates.getBlockState(block);
         final Side side = (front) ? Side.FRONT : Side.BACK;
-        return callPlayerSignOpenEvent((Player) player.getBukkitEntity(), sign, side, cause);
+        return CraftEventFactory.callPlayerSignOpenEvent((Player) player.getBukkitEntity(), sign, side, cause);
     }
 
     /**
@@ -313,10 +299,10 @@ public class CraftEventFactory {
     /**
      * PlayerBedEnterEvent
      */
-    public static Either<EntityHuman.EnumBedResult, Unit> callPlayerBedEnterEvent(EntityHuman player, BlockPosition bed, Either<EntityHuman.EnumBedResult, Unit> nmsBedResult) {
-        BedEnterResult bedEnterResult = nmsBedResult.mapBoth(new Function<EntityHuman.EnumBedResult, BedEnterResult>() {
+    public static Either<net.minecraft.world.entity.player.Player.BedSleepingProblem, Unit> callPlayerBedEnterEvent(net.minecraft.world.entity.player.Player player, BlockPos bed, Either<net.minecraft.world.entity.player.Player.BedSleepingProblem, Unit> nmsBedResult) {
+        BedEnterResult bedEnterResult = nmsBedResult.mapBoth(new Function<net.minecraft.world.entity.player.Player.BedSleepingProblem, BedEnterResult>() {
             @Override
-            public BedEnterResult apply(EntityHuman.EnumBedResult t) {
+            public BedEnterResult apply(net.minecraft.world.entity.player.Player.BedSleepingProblem t) {
                 switch (t) {
                     case NOT_POSSIBLE_HERE:
                         return BedEnterResult.NOT_POSSIBLE_HERE;
@@ -339,7 +325,7 @@ public class CraftEventFactory {
         if (result == Result.ALLOW) {
             return Either.right(Unit.INSTANCE);
         } else if (result == Result.DENY) {
-            return Either.left(EntityHuman.EnumBedResult.OTHER_PROBLEM);
+            return Either.left(net.minecraft.world.entity.player.Player.BedSleepingProblem.OTHER_PROBLEM);
         }
 
         return nmsBedResult;
@@ -348,7 +334,7 @@ public class CraftEventFactory {
     /**
      * Entity Enter Love Mode Event
      */
-    public static EntityEnterLoveModeEvent callEntityEnterLoveModeEvent(EntityHuman entityHuman, EntityAnimal entityAnimal, int loveTicks) {
+    public static EntityEnterLoveModeEvent callEntityEnterLoveModeEvent(net.minecraft.world.entity.player.Player entityHuman, Animal entityAnimal, int loveTicks) {
         EntityEnterLoveModeEvent entityEnterLoveModeEvent = new EntityEnterLoveModeEvent((Animals) entityAnimal.getBukkitEntity(), entityHuman != null ? (HumanEntity) entityHuman.getBukkitEntity() : null, loveTicks);
         Bukkit.getPluginManager().callEvent(entityEnterLoveModeEvent);
         return entityEnterLoveModeEvent;
@@ -357,7 +343,7 @@ public class CraftEventFactory {
     /**
      * Player Harvest Block Event
      */
-    public static PlayerHarvestBlockEvent callPlayerHarvestBlockEvent(World world, BlockPosition blockposition, EntityHuman who, EnumHand enumhand, List<ItemStack> itemsToHarvest) {
+    public static PlayerHarvestBlockEvent callPlayerHarvestBlockEvent(Level world, BlockPos blockposition, net.minecraft.world.entity.player.Player who, InteractionHand enumhand, List<ItemStack> itemsToHarvest) {
         List<org.bukkit.inventory.ItemStack> bukkitItemsToHarvest = new ArrayList<>(itemsToHarvest.stream().map(CraftItemStack::asBukkitCopy).collect(Collectors.toList()));
         Player player = (Player) who.getBukkitEntity();
         PlayerHarvestBlockEvent playerHarvestBlockEvent = new PlayerHarvestBlockEvent(player, CraftBlock.at(world, blockposition), CraftEquipmentSlot.getHand(enumhand), bukkitItemsToHarvest);
@@ -368,12 +354,12 @@ public class CraftEventFactory {
     /**
      * Player Fish Bucket Event
      */
-    public static PlayerBucketEntityEvent callPlayerFishBucketEvent(EntityLiving fish, EntityHuman entityHuman, ItemStack originalBucket, ItemStack entityBucket, EnumHand enumhand) {
+    public static PlayerBucketEntityEvent callPlayerFishBucketEvent(net.minecraft.world.entity.LivingEntity fish, net.minecraft.world.entity.player.Player entityHuman, ItemStack originalBucket, ItemStack entityBucket, InteractionHand enumhand) {
         Player player = (Player) entityHuman.getBukkitEntity();
         EquipmentSlot hand = CraftEquipmentSlot.getHand(enumhand);
 
         PlayerBucketEntityEvent event;
-        if (fish instanceof EntityFish) {
+        if (fish instanceof AbstractFish) {
             event = new PlayerBucketFishEvent(player, (Fish) fish.getBukkitEntity(), CraftItemStack.asBukkitCopy(originalBucket), CraftItemStack.asBukkitCopy(entityBucket), hand);
         } else {
             event = new PlayerBucketEntityEvent(player, fish.getBukkitEntity(), CraftItemStack.asBukkitCopy(originalBucket), CraftItemStack.asBukkitCopy(entityBucket), hand);
@@ -385,13 +371,13 @@ public class CraftEventFactory {
     /**
      * Trade Index Change Event
      */
-    public static TradeSelectEvent callTradeSelectEvent(EntityPlayer player, int newIndex, ContainerMerchant merchant) {
+    public static TradeSelectEvent callTradeSelectEvent(ServerPlayer player, int newIndex, MerchantMenu merchant) {
         TradeSelectEvent tradeSelectEvent = new TradeSelectEvent(merchant.getBukkitView(), newIndex);
         Bukkit.getPluginManager().callEvent(tradeSelectEvent);
         return tradeSelectEvent;
     }
 
-    public static boolean handleBellRingEvent(World world, BlockPosition position, EnumDirection direction, Entity entity) {
+    public static boolean handleBellRingEvent(Level world, BlockPos position, Direction direction, Entity entity) {
         Block block = CraftBlock.at(world, position);
         BlockFace bukkitDirection = CraftBlock.notchToBlockFace(direction);
         BellRingEvent event = new BellRingEvent(block, bukkitDirection, (entity != null) ? entity.getBukkitEntity() : null);
@@ -399,7 +385,7 @@ public class CraftEventFactory {
         return !event.isCancelled();
     }
 
-    public static Stream<EntityLiving> handleBellResonateEvent(World world, BlockPosition position, List<LivingEntity> bukkitEntities) {
+    public static Stream<net.minecraft.world.entity.LivingEntity> handleBellResonateEvent(Level world, BlockPos position, List<LivingEntity> bukkitEntities) {
         Block block = CraftBlock.at(world, position);
         BellResonateEvent event = new BellResonateEvent(block, bukkitEntities);
         Bukkit.getPluginManager().callEvent(event);
@@ -409,7 +395,7 @@ public class CraftEventFactory {
     /**
      * Block place methods
      */
-    public static BlockMultiPlaceEvent callBlockMultiPlaceEvent(WorldServer world, EntityHuman who, EnumHand hand, List<BlockState> blockStates, int clickedX, int clickedY, int clickedZ) {
+    public static BlockMultiPlaceEvent callBlockMultiPlaceEvent(ServerLevel world, net.minecraft.world.entity.player.Player who, InteractionHand hand, List<BlockState> blockStates, int clickedX, int clickedY, int clickedZ) {
         CraftWorld craftWorld = world.getWorld();
         CraftServer craftServer = world.getCraftServer();
         Player player = (Player) who.getBukkitEntity();
@@ -418,14 +404,14 @@ public class CraftEventFactory {
 
         boolean canBuild = true;
         for (int i = 0; i < blockStates.size(); i++) {
-            if (!canBuild(world, player, blockStates.get(i).getX(), blockStates.get(i).getZ())) {
+            if (!CraftEventFactory.canBuild(world, player, blockStates.get(i).getX(), blockStates.get(i).getZ())) {
                 canBuild = false;
                 break;
             }
         }
 
         org.bukkit.inventory.ItemStack item;
-        if (hand == EnumHand.MAIN_HAND) {
+        if (hand == InteractionHand.MAIN_HAND) {
             item = player.getInventory().getItemInMainHand();
         } else {
             item = player.getInventory().getItemInOffHand();
@@ -437,7 +423,7 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static BlockPlaceEvent callBlockPlaceEvent(WorldServer world, EntityHuman who, EnumHand hand, BlockState replacedBlockState, int clickedX, int clickedY, int clickedZ) {
+    public static BlockPlaceEvent callBlockPlaceEvent(ServerLevel world, net.minecraft.world.entity.player.Player who, InteractionHand hand, BlockState replacedBlockState, int clickedX, int clickedY, int clickedZ) {
         CraftWorld craftWorld = world.getWorld();
         CraftServer craftServer = world.getCraftServer();
 
@@ -446,11 +432,11 @@ public class CraftEventFactory {
         Block blockClicked = craftWorld.getBlockAt(clickedX, clickedY, clickedZ);
         Block placedBlock = replacedBlockState.getBlock();
 
-        boolean canBuild = canBuild(world, player, placedBlock.getX(), placedBlock.getZ());
+        boolean canBuild = CraftEventFactory.canBuild(world, player, placedBlock.getX(), placedBlock.getZ());
 
         org.bukkit.inventory.ItemStack item;
         EquipmentSlot equipmentSlot;
-        if (hand == EnumHand.MAIN_HAND) {
+        if (hand == InteractionHand.MAIN_HAND) {
             item = player.getInventory().getItemInMainHand();
             equipmentSlot = EquipmentSlot.HAND;
         } else {
@@ -464,22 +450,22 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static void handleBlockDropItemEvent(Block block, BlockState state, EntityPlayer player, List<EntityItem> items) {
+    public static void handleBlockDropItemEvent(Block block, BlockState state, ServerPlayer player, List<ItemEntity> items) {
         BlockDropItemEvent event = new BlockDropItemEvent(block, state, player.getBukkitEntity(), Lists.transform(items, (item) -> (org.bukkit.entity.Item) item.getBukkitEntity()));
         Bukkit.getPluginManager().callEvent(event);
 
         if (!event.isCancelled()) {
-            for (EntityItem item : items) {
+            for (ItemEntity item : items) {
                 item.level().addFreshEntity(item);
             }
         }
     }
 
-    public static EntityPlaceEvent callEntityPlaceEvent(ItemActionContext itemactioncontext, Entity entity) {
-        return callEntityPlaceEvent(itemactioncontext.getLevel(), itemactioncontext.getClickedPos(), itemactioncontext.getClickedFace(), itemactioncontext.getPlayer(), entity, itemactioncontext.getHand());
+    public static EntityPlaceEvent callEntityPlaceEvent(UseOnContext itemactioncontext, Entity entity) {
+        return CraftEventFactory.callEntityPlaceEvent(itemactioncontext.getLevel(), itemactioncontext.getClickedPos(), itemactioncontext.getClickedFace(), itemactioncontext.getPlayer(), entity, itemactioncontext.getHand());
     }
 
-    public static EntityPlaceEvent callEntityPlaceEvent(World world, BlockPosition clickPosition, EnumDirection clickedFace, EntityHuman human, Entity entity, EnumHand enumhand) {
+    public static EntityPlaceEvent callEntityPlaceEvent(Level world, BlockPos clickPosition, Direction clickedFace, net.minecraft.world.entity.player.Player human, Entity entity, InteractionHand enumhand) {
         Player who = (human == null) ? null : (Player) human.getBukkitEntity();
         org.bukkit.block.Block blockClicked = CraftBlock.at(world, clickPosition);
         org.bukkit.block.BlockFace blockFace = org.bukkit.craftbukkit.block.CraftBlock.notchToBlockFace(clickedFace);
@@ -493,15 +479,15 @@ public class CraftEventFactory {
     /**
      * Bucket methods
      */
-    public static PlayerBucketEmptyEvent callPlayerBucketEmptyEvent(WorldServer world, EntityHuman who, BlockPosition changed, BlockPosition clicked, EnumDirection clickedFace, ItemStack itemInHand, EnumHand enumhand) {
-        return (PlayerBucketEmptyEvent) getPlayerBucketEvent(false, world, who, changed, clicked, clickedFace, itemInHand, Items.BUCKET, enumhand);
+    public static PlayerBucketEmptyEvent callPlayerBucketEmptyEvent(ServerLevel world, net.minecraft.world.entity.player.Player who, BlockPos changed, BlockPos clicked, Direction clickedFace, ItemStack itemInHand, InteractionHand enumhand) {
+        return (PlayerBucketEmptyEvent) CraftEventFactory.getPlayerBucketEvent(false, world, who, changed, clicked, clickedFace, itemInHand, Items.BUCKET, enumhand);
     }
 
-    public static PlayerBucketFillEvent callPlayerBucketFillEvent(WorldServer world, EntityHuman who, BlockPosition changed, BlockPosition clicked, EnumDirection clickedFace, ItemStack itemInHand, net.minecraft.world.item.Item bucket, EnumHand enumhand) {
-        return (PlayerBucketFillEvent) getPlayerBucketEvent(true, world, who, clicked, changed, clickedFace, itemInHand, bucket, enumhand);
+    public static PlayerBucketFillEvent callPlayerBucketFillEvent(ServerLevel world, net.minecraft.world.entity.player.Player who, BlockPos changed, BlockPos clicked, Direction clickedFace, ItemStack itemInHand, net.minecraft.world.item.Item bucket, InteractionHand enumhand) {
+        return (PlayerBucketFillEvent) CraftEventFactory.getPlayerBucketEvent(true, world, who, clicked, changed, clickedFace, itemInHand, bucket, enumhand);
     }
 
-    private static PlayerEvent getPlayerBucketEvent(boolean isFilling, WorldServer world, EntityHuman who, BlockPosition changed, BlockPosition clicked, EnumDirection clickedFace, ItemStack itemstack, net.minecraft.world.item.Item item, EnumHand enumhand) {
+    private static PlayerEvent getPlayerBucketEvent(boolean isFilling, ServerLevel world, net.minecraft.world.entity.player.Player who, BlockPos changed, BlockPos clicked, Direction clickedFace, ItemStack itemstack, net.minecraft.world.item.Item item, InteractionHand enumhand) {
         Player player = (Player) who.getBukkitEntity();
         CraftItemStack itemInHand = CraftItemStack.asNewCraftStack(item);
         Material bucket = CraftItemType.minecraftToBukkit(itemstack.getItem());
@@ -516,10 +502,10 @@ public class CraftEventFactory {
         PlayerEvent event;
         if (isFilling) {
             event = new PlayerBucketFillEvent(player, block, blockClicked, blockFace, bucket, itemInHand, hand);
-            ((PlayerBucketFillEvent) event).setCancelled(!canBuild(world, player, changed.getX(), changed.getZ()));
+            ((PlayerBucketFillEvent) event).setCancelled(!CraftEventFactory.canBuild(world, player, changed.getX(), changed.getZ()));
         } else {
             event = new PlayerBucketEmptyEvent(player, block, blockClicked, blockFace, bucket, itemInHand, hand);
-            ((PlayerBucketEmptyEvent) event).setCancelled(!canBuild(world, player, changed.getX(), changed.getZ()));
+            ((PlayerBucketEmptyEvent) event).setCancelled(!CraftEventFactory.canBuild(world, player, changed.getX(), changed.getZ()));
         }
 
         craftServer.getPluginManager().callEvent(event);
@@ -530,24 +516,24 @@ public class CraftEventFactory {
     /**
      * Player Interact event
      */
-    public static PlayerInteractEvent callPlayerInteractEvent(EntityHuman who, Action action, ItemStack itemstack, EnumHand hand) {
+    public static PlayerInteractEvent callPlayerInteractEvent(net.minecraft.world.entity.player.Player who, Action action, ItemStack itemstack, InteractionHand hand) {
         if (action != Action.LEFT_CLICK_AIR && action != Action.RIGHT_CLICK_AIR) {
             throw new AssertionError(String.format("%s performing %s with %s", who, action, itemstack));
         }
-        return callPlayerInteractEvent(who, action, null, EnumDirection.SOUTH, itemstack, hand);
+        return CraftEventFactory.callPlayerInteractEvent(who, action, null, Direction.SOUTH, itemstack, hand);
     }
 
-    public static PlayerInteractEvent callPlayerInteractEvent(EntityHuman who, Action action, BlockPosition position, EnumDirection direction, ItemStack itemstack, EnumHand hand) {
-        return callPlayerInteractEvent(who, action, position, direction, itemstack, false, hand, null);
+    public static PlayerInteractEvent callPlayerInteractEvent(net.minecraft.world.entity.player.Player who, Action action, BlockPos position, Direction direction, ItemStack itemstack, InteractionHand hand) {
+        return CraftEventFactory.callPlayerInteractEvent(who, action, position, direction, itemstack, false, hand, null);
     }
 
-    public static PlayerInteractEvent callPlayerInteractEvent(EntityHuman who, Action action, BlockPosition position, EnumDirection direction, ItemStack itemstack, boolean cancelledBlock, EnumHand hand, Vec3D targetPos) {
+    public static PlayerInteractEvent callPlayerInteractEvent(net.minecraft.world.entity.player.Player who, Action action, BlockPos position, Direction direction, ItemStack itemstack, boolean cancelledBlock, InteractionHand hand, Vec3 targetPos) {
         Player player = (who == null) ? null : (Player) who.getBukkitEntity();
         CraftItemStack itemInHand = CraftItemStack.asCraftMirror(itemstack);
 
         Vector clickedPos = null;
         if (position != null && targetPos != null) {
-            clickedPos = CraftVector.toBukkit(targetPos.subtract(Vec3D.atLowerCornerOf(position)));
+            clickedPos = CraftVector.toBukkit(targetPos.subtract(Vec3.atLowerCornerOf(position)));
         }
 
         CraftWorld craftWorld = (CraftWorld) player.getWorld();
@@ -572,7 +558,7 @@ public class CraftEventFactory {
             itemInHand = null;
         }
 
-        PlayerInteractEvent event = new PlayerInteractEvent(player, action, itemInHand, blockClicked, blockFace, (hand == null) ? null : ((hand == EnumHand.OFF_HAND) ? EquipmentSlot.OFF_HAND : EquipmentSlot.HAND), clickedPos);
+        PlayerInteractEvent event = new PlayerInteractEvent(player, action, itemInHand, blockClicked, blockFace, (hand == null) ? null : ((hand == InteractionHand.OFF_HAND) ? EquipmentSlot.OFF_HAND : EquipmentSlot.HAND), clickedPos);
         if (cancelledBlock) {
             event.setUseInteractedBlock(Event.Result.DENY);
         }
@@ -584,16 +570,16 @@ public class CraftEventFactory {
     /**
      * EntityTransformEvent
      */
-    public static EntityTransformEvent callEntityTransformEvent(EntityLiving original, EntityLiving coverted, EntityTransformEvent.TransformReason transformReason) {
-        return callEntityTransformEvent(original, Collections.singletonList(coverted), transformReason);
+    public static EntityTransformEvent callEntityTransformEvent(net.minecraft.world.entity.LivingEntity original, net.minecraft.world.entity.LivingEntity coverted, EntityTransformEvent.TransformReason transformReason) {
+        return CraftEventFactory.callEntityTransformEvent(original, Collections.singletonList(coverted), transformReason);
     }
 
     /**
      * EntityTransformEvent
      */
-    public static EntityTransformEvent callEntityTransformEvent(EntityLiving original, List<EntityLiving> convertedList, EntityTransformEvent.TransformReason convertType) {
+    public static EntityTransformEvent callEntityTransformEvent(net.minecraft.world.entity.LivingEntity original, List<net.minecraft.world.entity.LivingEntity> convertedList, EntityTransformEvent.TransformReason convertType) {
         List<org.bukkit.entity.Entity> list = new ArrayList<>();
-        for (EntityLiving entityLiving : convertedList) {
+        for (net.minecraft.world.entity.LivingEntity entityLiving : convertedList) {
             list.add(entityLiving.getBukkitEntity());
         }
 
@@ -606,12 +592,12 @@ public class CraftEventFactory {
     /**
      * EntityShootBowEvent
      */
-    public static EntityShootBowEvent callEntityShootBowEvent(EntityLiving who, ItemStack bow, ItemStack consumableItem, Entity entityArrow, EnumHand hand, float force, boolean consumeItem) {
+    public static EntityShootBowEvent callEntityShootBowEvent(net.minecraft.world.entity.LivingEntity who, ItemStack bow, ItemStack consumableItem, Entity entityArrow, InteractionHand hand, float force, boolean consumeItem) {
         LivingEntity shooter = (LivingEntity) who.getBukkitEntity();
         CraftItemStack itemInHand = CraftItemStack.asCraftMirror(bow);
         CraftItemStack itemConsumable = CraftItemStack.asCraftMirror(consumableItem);
         org.bukkit.entity.Entity arrow = entityArrow.getBukkitEntity();
-        EquipmentSlot handSlot = (hand == EnumHand.MAIN_HAND) ? EquipmentSlot.HAND : EquipmentSlot.OFF_HAND;
+        EquipmentSlot handSlot = (hand == InteractionHand.MAIN_HAND) ? EquipmentSlot.HAND : EquipmentSlot.OFF_HAND;
 
         if (itemInHand != null && (itemInHand.getType() == Material.AIR || itemInHand.getAmount() == 0)) {
             itemInHand = null;
@@ -626,7 +612,7 @@ public class CraftEventFactory {
     /**
      * VillagerCareerChangeEvent
      */
-    public static VillagerCareerChangeEvent callVillagerCareerChangeEvent(EntityVillager vilager, Profession future, VillagerCareerChangeEvent.ChangeReason reason) {
+    public static VillagerCareerChangeEvent callVillagerCareerChangeEvent(net.minecraft.world.entity.npc.Villager vilager, Profession future, VillagerCareerChangeEvent.ChangeReason reason) {
         VillagerCareerChangeEvent event = new VillagerCareerChangeEvent((Villager) vilager.getBukkitEntity(), future, reason);
         Bukkit.getPluginManager().callEvent(event);
 
@@ -636,7 +622,7 @@ public class CraftEventFactory {
     /**
      * BlockDamageEvent
      */
-    public static BlockDamageEvent callBlockDamageEvent(EntityPlayer who, BlockPosition pos, ItemStack itemstack, boolean instaBreak) {
+    public static BlockDamageEvent callBlockDamageEvent(ServerPlayer who, BlockPos pos, ItemStack itemstack, boolean instaBreak) {
         Player player = who.getBukkitEntity();
         CraftItemStack itemInHand = CraftItemStack.asCraftMirror(itemstack);
 
@@ -648,7 +634,7 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static BlockDamageAbortEvent callBlockDamageAbortEvent(EntityPlayer who, BlockPosition pos, ItemStack itemstack) {
+    public static BlockDamageAbortEvent callBlockDamageAbortEvent(ServerPlayer who, BlockPos pos, ItemStack itemstack) {
         Player player = who.getBukkitEntity();
         CraftItemStack itemInHand = CraftItemStack.asCraftMirror(itemstack);
 
@@ -660,13 +646,13 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static boolean doEntityAddEventCalling(World world, Entity entity, SpawnReason spawnReason) {
+    public static boolean doEntityAddEventCalling(Level world, Entity entity, SpawnReason spawnReason) {
         if (entity == null) return false;
 
         org.bukkit.event.Cancellable event = null;
-        if (entity instanceof EntityLiving && !(entity instanceof EntityPlayer)) {
-            boolean isAnimal = entity instanceof EntityAnimal || entity instanceof EntityWaterAnimal || entity instanceof EntityGolem;
-            boolean isMonster = entity instanceof EntityMonster || entity instanceof EntityGhast || entity instanceof EntitySlime;
+        if (entity instanceof net.minecraft.world.entity.LivingEntity && !(entity instanceof ServerPlayer)) {
+            boolean isAnimal = entity instanceof Animal || entity instanceof WaterAnimal || entity instanceof AbstractGolem;
+            boolean isMonster = entity instanceof Monster || entity instanceof Ghast || entity instanceof Slime;
 
             if (spawnReason != SpawnReason.CUSTOM) {
                 if (isAnimal && !world.getWorld().getAllowAnimals() || isMonster && !world.getWorld().getAllowMonsters()) {
@@ -675,9 +661,9 @@ public class CraftEventFactory {
                 }
             }
 
-            event = CraftEventFactory.callCreatureSpawnEvent((EntityLiving) entity, spawnReason);
-        } else if (entity instanceof EntityItem) {
-            event = CraftEventFactory.callItemSpawnEvent((EntityItem) entity);
+            event = CraftEventFactory.callCreatureSpawnEvent((net.minecraft.world.entity.LivingEntity) entity, spawnReason);
+        } else if (entity instanceof ItemEntity) {
+            event = CraftEventFactory.callItemSpawnEvent((ItemEntity) entity);
         } else if (entity.getBukkitEntity() instanceof org.bukkit.entity.Projectile) {
             // Not all projectiles extend EntityProjectile, so check for Bukkit interface instead
             event = CraftEventFactory.callProjectileLaunchEvent(entity);
@@ -701,7 +687,7 @@ public class CraftEventFactory {
                 return true;
             }
             event = CraftEventFactory.callLightningStrikeEvent((LightningStrike) entity.getBukkitEntity(), cause);
-        } else if (!(entity instanceof EntityPlayer)) {
+        } else if (!(entity instanceof ServerPlayer)) {
             event = CraftEventFactory.callEntitySpawnEvent(entity);
         }
 
@@ -734,7 +720,7 @@ public class CraftEventFactory {
     /**
      * CreatureSpawnEvent
      */
-    public static CreatureSpawnEvent callCreatureSpawnEvent(EntityLiving entityliving, SpawnReason spawnReason) {
+    public static CreatureSpawnEvent callCreatureSpawnEvent(net.minecraft.world.entity.LivingEntity entityliving, SpawnReason spawnReason) {
         LivingEntity entity = (LivingEntity) entityliving.getBukkitEntity();
         CraftServer craftServer = (CraftServer) entity.getServer();
 
@@ -746,7 +732,7 @@ public class CraftEventFactory {
     /**
      * EntityTameEvent
      */
-    public static EntityTameEvent callEntityTameEvent(EntityInsentient entity, EntityHuman tamer) {
+    public static EntityTameEvent callEntityTameEvent(Mob entity, net.minecraft.world.entity.player.Player tamer) {
         org.bukkit.entity.Entity bukkitEntity = entity.getBukkitEntity();
         org.bukkit.entity.AnimalTamer bukkitTamer = (tamer != null ? tamer.getBukkitEntity() : null);
         CraftServer craftServer = (CraftServer) bukkitEntity.getServer();
@@ -759,7 +745,7 @@ public class CraftEventFactory {
     /**
      * ItemSpawnEvent
      */
-    public static ItemSpawnEvent callItemSpawnEvent(EntityItem entityitem) {
+    public static ItemSpawnEvent callItemSpawnEvent(ItemEntity entityitem) {
         org.bukkit.entity.Item entity = (org.bukkit.entity.Item) entityitem.getBukkitEntity();
         CraftServer craftServer = (CraftServer) entity.getServer();
 
@@ -772,7 +758,7 @@ public class CraftEventFactory {
     /**
      * ItemDespawnEvent
      */
-    public static ItemDespawnEvent callItemDespawnEvent(EntityItem entityitem) {
+    public static ItemDespawnEvent callItemDespawnEvent(ItemEntity entityitem) {
         org.bukkit.entity.Item entity = (org.bukkit.entity.Item) entityitem.getBukkitEntity();
 
         ItemDespawnEvent event = new ItemDespawnEvent(entity, entity.getLocation());
@@ -784,7 +770,7 @@ public class CraftEventFactory {
     /**
      * ItemMergeEvent
      */
-    public static boolean callItemMergeEvent(EntityItem merging, EntityItem mergingWith) {
+    public static boolean callItemMergeEvent(ItemEntity merging, ItemEntity mergingWith) {
         org.bukkit.entity.Item entityMerging = (org.bukkit.entity.Item) merging.getBukkitEntity();
         org.bukkit.entity.Item entityMergingWith = (org.bukkit.entity.Item) mergingWith.getBukkitEntity();
 
@@ -797,20 +783,20 @@ public class CraftEventFactory {
     /**
      * PotionSplashEvent
      */
-    public static PotionSplashEvent callPotionSplashEvent(EntityPotion potion, MovingObjectPosition position, Map<LivingEntity, Double> affectedEntities) {
+    public static PotionSplashEvent callPotionSplashEvent(net.minecraft.world.entity.projectile.ThrownPotion potion, HitResult position, Map<LivingEntity, Double> affectedEntities) {
         ThrownPotion thrownPotion = (ThrownPotion) potion.getBukkitEntity();
 
         Block hitBlock = null;
         BlockFace hitFace = null;
-        if (position.getType() == MovingObjectPosition.EnumMovingObjectType.BLOCK) {
-            MovingObjectPositionBlock positionBlock = (MovingObjectPositionBlock) position;
+        if (position.getType() == HitResult.Type.BLOCK) {
+            BlockHitResult positionBlock = (BlockHitResult) position;
             hitBlock = CraftBlock.at(potion.level(), positionBlock.getBlockPos());
             hitFace = CraftBlock.notchToBlockFace(positionBlock.getDirection());
         }
 
         org.bukkit.entity.Entity hitEntity = null;
-        if (position.getType() == MovingObjectPosition.EnumMovingObjectType.ENTITY) {
-            hitEntity = ((MovingObjectPositionEntity) position).getEntity().getBukkitEntity();
+        if (position.getType() == HitResult.Type.ENTITY) {
+            hitEntity = ((EntityHitResult) position).getEntity().getBukkitEntity();
         }
 
         PotionSplashEvent event = new PotionSplashEvent(thrownPotion, hitEntity, hitBlock, hitFace, affectedEntities);
@@ -818,21 +804,21 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static LingeringPotionSplashEvent callLingeringPotionSplashEvent(EntityPotion potion, MovingObjectPosition position, EntityAreaEffectCloud cloud) {
+    public static LingeringPotionSplashEvent callLingeringPotionSplashEvent(net.minecraft.world.entity.projectile.ThrownPotion potion, HitResult position, net.minecraft.world.entity.AreaEffectCloud cloud) {
         ThrownPotion thrownPotion = (ThrownPotion) potion.getBukkitEntity();
         AreaEffectCloud effectCloud = (AreaEffectCloud) cloud.getBukkitEntity();
 
         Block hitBlock = null;
         BlockFace hitFace = null;
-        if (position.getType() == MovingObjectPosition.EnumMovingObjectType.BLOCK) {
-            MovingObjectPositionBlock positionBlock = (MovingObjectPositionBlock) position;
+        if (position.getType() == HitResult.Type.BLOCK) {
+            BlockHitResult positionBlock = (BlockHitResult) position;
             hitBlock = CraftBlock.at(potion.level(), positionBlock.getBlockPos());
             hitFace = CraftBlock.notchToBlockFace(positionBlock.getDirection());
         }
 
         org.bukkit.entity.Entity hitEntity = null;
-        if (position.getType() == MovingObjectPosition.EnumMovingObjectType.ENTITY) {
-            hitEntity = ((MovingObjectPositionEntity) position).getEntity().getBukkitEntity();
+        if (position.getType() == HitResult.Type.ENTITY) {
+            hitEntity = ((EntityHitResult) position).getEntity().getBukkitEntity();
         }
 
         LingeringPotionSplashEvent event = new LingeringPotionSplashEvent(thrownPotion, hitEntity, hitBlock, hitFace, effectCloud);
@@ -843,7 +829,7 @@ public class CraftEventFactory {
     /**
      * BlockFadeEvent
      */
-    public static BlockFadeEvent callBlockFadeEvent(GeneratorAccess world, BlockPosition pos, IBlockData newBlock) {
+    public static BlockFadeEvent callBlockFadeEvent(LevelAccessor world, BlockPos pos, net.minecraft.world.level.block.state.BlockState newBlock) {
         CraftBlockState state = CraftBlockStates.getBlockState(world, pos);
         state.setData(newBlock);
 
@@ -852,7 +838,7 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static boolean handleMoistureChangeEvent(World world, BlockPosition pos, IBlockData newBlock, int flag) {
+    public static boolean handleMoistureChangeEvent(Level world, BlockPos pos, net.minecraft.world.level.block.state.BlockState newBlock, int flag) {
         CraftBlockState state = CraftBlockStates.getBlockState(world, pos, flag);
         state.setData(newBlock);
 
@@ -865,15 +851,15 @@ public class CraftEventFactory {
         return !event.isCancelled();
     }
 
-    public static boolean handleBlockSpreadEvent(World world, BlockPosition source, BlockPosition target, IBlockData block) {
-        return handleBlockSpreadEvent(world, source, target, block, 2);
+    public static boolean handleBlockSpreadEvent(Level world, BlockPos source, BlockPos target, net.minecraft.world.level.block.state.BlockState block) {
+        return CraftEventFactory.handleBlockSpreadEvent(world, source, target, block, 2);
     }
 
-    public static BlockPosition sourceBlockOverride = null; // SPIGOT-7068: Add source block override, not the most elegant way but better than passing down a BlockPosition up to five methods deep.
+    public static BlockPos sourceBlockOverride = null; // SPIGOT-7068: Add source block override, not the most elegant way but better than passing down a BlockPosition up to five methods deep.
 
-    public static boolean handleBlockSpreadEvent(GeneratorAccess world, BlockPosition source, BlockPosition target, IBlockData block, int flag) {
+    public static boolean handleBlockSpreadEvent(LevelAccessor world, BlockPos source, BlockPos target, net.minecraft.world.level.block.state.BlockState block, int flag) {
         // Suppress during worldgen
-        if (!(world instanceof World)) {
+        if (!(world instanceof Level)) {
             world.setBlock(target, block, flag);
             return true;
         }
@@ -881,7 +867,7 @@ public class CraftEventFactory {
         CraftBlockState state = CraftBlockStates.getBlockState(world, target, flag);
         state.setData(block);
 
-        BlockSpreadEvent event = new BlockSpreadEvent(state.getBlock(), CraftBlock.at(world, sourceBlockOverride != null ? sourceBlockOverride : source), state);
+        BlockSpreadEvent event = new BlockSpreadEvent(state.getBlock(), CraftBlock.at(world, CraftEventFactory.sourceBlockOverride != null ? CraftEventFactory.sourceBlockOverride : source), state);
         Bukkit.getPluginManager().callEvent(event);
 
         if (!event.isCancelled()) {
@@ -890,11 +876,11 @@ public class CraftEventFactory {
         return !event.isCancelled();
     }
 
-    public static EntityDeathEvent callEntityDeathEvent(EntityLiving victim, DamageSource damageSource) {
-        return callEntityDeathEvent(victim, damageSource, new ArrayList<org.bukkit.inventory.ItemStack>(0));
+    public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, DamageSource damageSource) {
+        return CraftEventFactory.callEntityDeathEvent(victim, damageSource, new ArrayList<org.bukkit.inventory.ItemStack>(0));
     }
 
-    public static EntityDeathEvent callEntityDeathEvent(EntityLiving victim, DamageSource damageSource, List<org.bukkit.inventory.ItemStack> drops) {
+    public static EntityDeathEvent callEntityDeathEvent(net.minecraft.world.entity.LivingEntity victim, DamageSource damageSource, List<org.bukkit.inventory.ItemStack> drops) {
         CraftLivingEntity entity = (CraftLivingEntity) victim.getBukkitEntity();
         CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource);
         CraftWorld world = (CraftWorld) entity.getWorld();
@@ -912,7 +898,7 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static PlayerDeathEvent callPlayerDeathEvent(EntityPlayer victim, DamageSource damageSource, List<org.bukkit.inventory.ItemStack> drops, String deathMessage, boolean keepInventory) {
+    public static PlayerDeathEvent callPlayerDeathEvent(ServerPlayer victim, DamageSource damageSource, List<org.bukkit.inventory.ItemStack> drops, String deathMessage, boolean keepInventory) {
         CraftPlayer entity = victim.getBukkitEntity();
         CraftDamageSource bukkitDamageSource = new CraftDamageSource(damageSource);
         PlayerDeathEvent event = new PlayerDeathEvent(entity, bukkitDamageSource, drops, victim.getExpReward(victim.serverLevel(), damageSource.getEntity()), 0, deathMessage);
@@ -951,7 +937,7 @@ public class CraftEventFactory {
     }
 
     private static EntityDamageEvent handleEntityDamageEvent(Entity entity, DamageSource source, Map<DamageModifier, Double> modifiers, Map<DamageModifier, Function<? super Double, Double>> modifierFunctions) {
-        return handleEntityDamageEvent(entity, source, modifiers, modifierFunctions, false);
+        return CraftEventFactory.handleEntityDamageEvent(entity, source, modifiers, modifierFunctions, false);
     }
 
     private static EntityDamageEvent handleEntityDamageEvent(Entity entity, DamageSource source, Map<DamageModifier, Double> modifiers, Map<DamageModifier, Function<? super Double, Double>> modifierFunctions, boolean cancelled) {
@@ -959,14 +945,14 @@ public class CraftEventFactory {
         Entity damager = (source.getDamager() != null) ? source.getDamager() : source.getEntity();
         if (source.is(DamageTypeTags.IS_EXPLOSION)) {
             if (damager == null) {
-                return callEntityDamageEvent(source.getDirectBlock(), source.getDirectBlockState(), entity, DamageCause.BLOCK_EXPLOSION, bukkitDamageSource, modifiers, modifierFunctions, cancelled);
+                return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), source.getDirectBlockState(), entity, DamageCause.BLOCK_EXPLOSION, bukkitDamageSource, modifiers, modifierFunctions, cancelled);
             }
             DamageCause damageCause = (damager.getBukkitEntity() instanceof org.bukkit.entity.TNTPrimed) ? DamageCause.BLOCK_EXPLOSION : DamageCause.ENTITY_EXPLOSION;
-            return callEntityDamageEvent(damager, entity, damageCause, bukkitDamageSource, modifiers, modifierFunctions, cancelled);
+            return CraftEventFactory.callEntityDamageEvent(damager, entity, damageCause, bukkitDamageSource, modifiers, modifierFunctions, cancelled);
         } else if (damager != null || source.getDirectEntity() != null) {
             DamageCause cause = (source.isSweep()) ? DamageCause.ENTITY_SWEEP_ATTACK : DamageCause.ENTITY_ATTACK;
 
-            if (damager instanceof IProjectile) {
+            if (damager instanceof net.minecraft.world.entity.projectile.Projectile) {
                 if (damager.getBukkitEntity() instanceof ThrownPotion) {
                     cause = DamageCause.MAGIC;
                 } else if (damager.getBukkitEntity() instanceof Projectile) {
@@ -988,11 +974,11 @@ public class CraftEventFactory {
                 cause = DamageCause.MAGIC;
             }
 
-            return callEntityDamageEvent(damager, entity, cause, bukkitDamageSource, modifiers, modifierFunctions, cancelled);
+            return CraftEventFactory.callEntityDamageEvent(damager, entity, cause, bukkitDamageSource, modifiers, modifierFunctions, cancelled);
         } else if (source.is(DamageTypes.FELL_OUT_OF_WORLD)) {
-            return callEntityDamageEvent(source.getDirectBlock(), source.getDirectBlockState(), entity, DamageCause.VOID, bukkitDamageSource, modifiers, modifierFunctions, cancelled);
+            return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), source.getDirectBlockState(), entity, DamageCause.VOID, bukkitDamageSource, modifiers, modifierFunctions, cancelled);
         } else if (source.is(DamageTypes.LAVA)) {
-            return callEntityDamageEvent(source.getDirectBlock(), source.getDirectBlockState(), entity, DamageCause.LAVA, bukkitDamageSource, modifiers, modifierFunctions, cancelled);
+            return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), source.getDirectBlockState(), entity, DamageCause.LAVA, bukkitDamageSource, modifiers, modifierFunctions, cancelled);
         } else if (source.getDirectBlock() != null) {
             DamageCause cause;
             if (source.is(DamageTypes.CACTUS) || source.is(DamageTypes.SWEET_BERRY_BUSH) || source.is(DamageTypes.STALAGMITE) || source.is(DamageTypes.FALLING_STALACTITE) || source.is(DamageTypes.FALLING_ANVIL)) {
@@ -1008,7 +994,7 @@ public class CraftEventFactory {
             } else {
                 throw new IllegalStateException(String.format("Unhandled damage of %s by %s from %s [%s]", entity, source.getDirectBlock(), source.getMsgId(), source.typeHolder().getRegisteredName()));
             }
-            return callEntityDamageEvent(source.getDirectBlock(), source.getDirectBlockState(), entity, cause, bukkitDamageSource, modifiers, modifierFunctions, cancelled);
+            return CraftEventFactory.callEntityDamageEvent(source.getDirectBlock(), source.getDirectBlockState(), entity, cause, bukkitDamageSource, modifiers, modifierFunctions, cancelled);
         }
 
         DamageCause cause;
@@ -1048,7 +1034,7 @@ public class CraftEventFactory {
             cause = DamageCause.CUSTOM;
         }
 
-        return callEntityDamageEvent((Entity) null, entity, cause, bukkitDamageSource, modifiers, modifierFunctions, cancelled);
+        return CraftEventFactory.callEntityDamageEvent((Entity) null, entity, cause, bukkitDamageSource, modifiers, modifierFunctions, cancelled);
     }
 
     private static EntityDamageEvent callEntityDamageEvent(Entity damager, Entity damagee, DamageCause cause, org.bukkit.damage.DamageSource bukkitDamageSource, Map<DamageModifier, Double> modifiers, Map<DamageModifier, Function<? super Double, Double>> modifierFunctions, boolean cancelled) {
@@ -1058,17 +1044,17 @@ public class CraftEventFactory {
         } else {
             event = new EntityDamageEvent(damagee.getBukkitEntity(), cause, bukkitDamageSource, modifiers, modifierFunctions);
         }
-        return callEntityDamageEvent(event, damagee, cancelled);
+        return CraftEventFactory.callEntityDamageEvent(event, damagee, cancelled);
     }
 
     private static EntityDamageEvent callEntityDamageEvent(Block damager, BlockState damagerState, Entity damagee, DamageCause cause, org.bukkit.damage.DamageSource bukkitDamageSource, Map<DamageModifier, Double> modifiers, Map<DamageModifier, Function<? super Double, Double>> modifierFunctions, boolean cancelled) {
         EntityDamageByBlockEvent event = new EntityDamageByBlockEvent(damager, damagerState, damagee.getBukkitEntity(), cause, bukkitDamageSource, modifiers, modifierFunctions);
-        return callEntityDamageEvent(event, damagee, cancelled);
+        return CraftEventFactory.callEntityDamageEvent(event, damagee, cancelled);
     }
 
     private static EntityDamageEvent callEntityDamageEvent(EntityDamageEvent event, Entity damagee, boolean cancelled) {
         event.setCancelled(cancelled);
-        callEvent(event);
+        CraftEventFactory.callEvent(event);
 
         if (!event.isCancelled()) {
             event.getEntity().setLastDamageCause(event);
@@ -1085,7 +1071,7 @@ public class CraftEventFactory {
         Map<DamageModifier, Double> modifiers = new EnumMap<>(DamageModifier.class);
         Map<DamageModifier, Function<? super Double, Double>> modifierFunctions = new EnumMap<>(DamageModifier.class);
         modifiers.put(DamageModifier.BASE, rawDamage);
-        modifierFunctions.put(DamageModifier.BASE, ZERO);
+        modifierFunctions.put(DamageModifier.BASE, CraftEventFactory.ZERO);
         if (source.is(DamageTypes.FREEZE)) {
             modifiers.put(DamageModifier.FREEZING, freezingModifier);
             modifierFunctions.put(DamageModifier.FREEZING, freezing);
@@ -1094,7 +1080,7 @@ public class CraftEventFactory {
             modifiers.put(DamageModifier.HARD_HAT, hardHatModifier);
             modifierFunctions.put(DamageModifier.HARD_HAT, hardHat);
         }
-        if (damagee instanceof EntityHuman) {
+        if (damagee instanceof net.minecraft.world.entity.player.Player) {
             modifiers.put(DamageModifier.BLOCKING, blockingModifier);
             modifierFunctions.put(DamageModifier.BLOCKING, blocking);
         }
@@ -1106,16 +1092,16 @@ public class CraftEventFactory {
         modifierFunctions.put(DamageModifier.MAGIC, magic);
         modifiers.put(DamageModifier.ABSORPTION, absorptionModifier);
         modifierFunctions.put(DamageModifier.ABSORPTION, absorption);
-        return handleEntityDamageEvent(damagee, source, modifiers, modifierFunctions);
+        return CraftEventFactory.handleEntityDamageEvent(damagee, source, modifiers, modifierFunctions);
     }
 
     // Non-Living Entities such as EntityEnderCrystal and EntityFireball need to call this
     public static boolean handleNonLivingEntityDamageEvent(Entity entity, DamageSource source, double damage) {
-        return handleNonLivingEntityDamageEvent(entity, source, damage, true);
+        return CraftEventFactory.handleNonLivingEntityDamageEvent(entity, source, damage, true);
     }
 
     public static boolean handleNonLivingEntityDamageEvent(Entity entity, DamageSource source, double damage, boolean cancelOnZeroDamage) {
-        return handleNonLivingEntityDamageEvent(entity, source, damage, cancelOnZeroDamage, false);
+        return CraftEventFactory.handleNonLivingEntityDamageEvent(entity, source, damage, cancelOnZeroDamage, false);
     }
 
     public static EntityDamageEvent callNonLivingEntityDamageEvent(Entity entity, DamageSource source, double damage, boolean cancelled) {
@@ -1123,13 +1109,13 @@ public class CraftEventFactory {
         final EnumMap<DamageModifier, Function<? super Double, Double>> functions = new EnumMap(DamageModifier.class);
 
         modifiers.put(DamageModifier.BASE, damage);
-        functions.put(DamageModifier.BASE, ZERO);
+        functions.put(DamageModifier.BASE, CraftEventFactory.ZERO);
 
-        return handleEntityDamageEvent(entity, source, modifiers, functions, cancelled);
+        return CraftEventFactory.handleEntityDamageEvent(entity, source, modifiers, functions, cancelled);
     }
 
     public static boolean handleNonLivingEntityDamageEvent(Entity entity, DamageSource source, double damage, boolean cancelOnZeroDamage, boolean cancelled) {
-        final EntityDamageEvent event = callNonLivingEntityDamageEvent(entity, source, damage, cancelled);
+        final EntityDamageEvent event = CraftEventFactory.callNonLivingEntityDamageEvent(entity, source, damage, cancelled);
 
         if (event == null) {
             return false;
@@ -1143,21 +1129,21 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static PlayerExpChangeEvent callPlayerExpChangeEvent(EntityHuman entity, int expAmount) {
+    public static PlayerExpChangeEvent callPlayerExpChangeEvent(net.minecraft.world.entity.player.Player entity, int expAmount) {
         Player player = (Player) entity.getBukkitEntity();
         PlayerExpChangeEvent event = new PlayerExpChangeEvent(player, expAmount);
         Bukkit.getPluginManager().callEvent(event);
         return event;
     }
 
-    public static PlayerExpCooldownChangeEvent callPlayerXpCooldownEvent(EntityHuman entity, int newCooldown, PlayerExpCooldownChangeEvent.ChangeReason changeReason) {
+    public static PlayerExpCooldownChangeEvent callPlayerXpCooldownEvent(net.minecraft.world.entity.player.Player entity, int newCooldown, PlayerExpCooldownChangeEvent.ChangeReason changeReason) {
         Player player = (Player) entity.getBukkitEntity();
         PlayerExpCooldownChangeEvent event = new PlayerExpCooldownChangeEvent(player, newCooldown, changeReason);
         Bukkit.getPluginManager().callEvent(event);
         return event;
     }
 
-    public static PlayerItemMendEvent callPlayerItemMendEvent(EntityHuman entity, EntityExperienceOrb orb, net.minecraft.world.item.ItemStack nmsMendedItem, EnumItemSlot slot, int repairAmount) {
+    public static PlayerItemMendEvent callPlayerItemMendEvent(net.minecraft.world.entity.player.Player entity, net.minecraft.world.entity.ExperienceOrb orb, net.minecraft.world.item.ItemStack nmsMendedItem, net.minecraft.world.entity.EquipmentSlot slot, int repairAmount) {
         Player player = (Player) entity.getBukkitEntity();
         org.bukkit.inventory.ItemStack bukkitStack = CraftItemStack.asCraftMirror(nmsMendedItem);
         PlayerItemMendEvent event = new PlayerItemMendEvent(player, bukkitStack, CraftEquipmentSlot.getSlot(slot), (ExperienceOrb) orb.getBukkitEntity(), repairAmount);
@@ -1165,11 +1151,11 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static boolean handleBlockGrowEvent(World world, BlockPosition pos, IBlockData block) {
-        return handleBlockGrowEvent(world, pos, block, 3);
+    public static boolean handleBlockGrowEvent(Level world, BlockPos pos, net.minecraft.world.level.block.state.BlockState block) {
+        return CraftEventFactory.handleBlockGrowEvent(world, pos, block, 3);
     }
 
-    public static boolean handleBlockGrowEvent(World world, BlockPosition pos, IBlockData newData, int flag) {
+    public static boolean handleBlockGrowEvent(Level world, BlockPos pos, net.minecraft.world.level.block.state.BlockState newData, int flag) {
         Block block = world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ());
         CraftBlockState state = (CraftBlockState) block.getState();
         state.setData(newData);
@@ -1184,17 +1170,17 @@ public class CraftEventFactory {
         return !event.isCancelled();
     }
 
-    public static FluidLevelChangeEvent callFluidLevelChangeEvent(World world, BlockPosition block, IBlockData newData) {
+    public static FluidLevelChangeEvent callFluidLevelChangeEvent(Level world, BlockPos block, net.minecraft.world.level.block.state.BlockState newData) {
         FluidLevelChangeEvent event = new FluidLevelChangeEvent(CraftBlock.at(world, block), CraftBlockData.fromData(newData));
         world.getCraftServer().getPluginManager().callEvent(event);
         return event;
     }
 
-    public static FoodLevelChangeEvent callFoodLevelChangeEvent(EntityHuman entity, int level) {
-        return callFoodLevelChangeEvent(entity, level, null);
+    public static FoodLevelChangeEvent callFoodLevelChangeEvent(net.minecraft.world.entity.player.Player entity, int level) {
+        return CraftEventFactory.callFoodLevelChangeEvent(entity, level, null);
     }
 
-    public static FoodLevelChangeEvent callFoodLevelChangeEvent(EntityHuman entity, int level, ItemStack item) {
+    public static FoodLevelChangeEvent callFoodLevelChangeEvent(net.minecraft.world.entity.player.Player entity, int level, ItemStack item) {
         FoodLevelChangeEvent event = new FoodLevelChangeEvent(entity.getBukkitEntity(), level, (item == null) ? null : CraftItemStack.asBukkitCopy(item));
         entity.getBukkitEntity().getServer().getPluginManager().callEvent(event);
         return event;
@@ -1212,11 +1198,11 @@ public class CraftEventFactory {
         return !event.isCancelled();
     }
 
-    public static boolean callEntityChangeBlockEvent(Entity entity, BlockPosition position, IBlockData newBlock) {
-        return callEntityChangeBlockEvent(entity, position, newBlock, false);
+    public static boolean callEntityChangeBlockEvent(Entity entity, BlockPos position, net.minecraft.world.level.block.state.BlockState newBlock) {
+        return CraftEventFactory.callEntityChangeBlockEvent(entity, position, newBlock, false);
     }
 
-    public static boolean callEntityChangeBlockEvent(Entity entity, BlockPosition position, IBlockData newBlock, boolean cancelled) {
+    public static boolean callEntityChangeBlockEvent(Entity entity, BlockPos position, net.minecraft.world.level.block.state.BlockState newBlock, boolean cancelled) {
         Block block = entity.level().getWorld().getBlockAt(position.getX(), position.getY(), position.getZ());
 
         EntityChangeBlockEvent event = new EntityChangeBlockEvent(entity.getBukkitEntity(), block, CraftBlockData.fromData(newBlock));
@@ -1237,13 +1223,13 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static EntityTargetLivingEntityEvent callEntityTargetLivingEvent(Entity entity, EntityLiving target, EntityTargetEvent.TargetReason reason) {
+    public static EntityTargetLivingEntityEvent callEntityTargetLivingEvent(Entity entity, net.minecraft.world.entity.LivingEntity target, EntityTargetEvent.TargetReason reason) {
         EntityTargetLivingEntityEvent event = new EntityTargetLivingEntityEvent(entity.getBukkitEntity(), (target == null) ? null : (LivingEntity) target.getBukkitEntity(), reason);
         entity.getBukkitEntity().getServer().getPluginManager().callEvent(event);
         return event;
     }
 
-    public static EntityBreakDoorEvent callEntityBreakDoorEvent(Entity entity, BlockPosition pos) {
+    public static EntityBreakDoorEvent callEntityBreakDoorEvent(Entity entity, BlockPos pos) {
         org.bukkit.entity.Entity entity1 = entity.getBukkitEntity();
         Block block = CraftBlock.at(entity.level(), pos);
 
@@ -1253,13 +1239,13 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static Container callInventoryOpenEvent(EntityPlayer player, Container container) {
-        return callInventoryOpenEvent(player, container, false);
+    public static AbstractContainerMenu callInventoryOpenEvent(ServerPlayer player, AbstractContainerMenu container) {
+        return CraftEventFactory.callInventoryOpenEvent(player, container, false);
     }
 
-    public static Container callInventoryOpenEvent(EntityPlayer player, Container container, boolean cancelled) {
+    public static AbstractContainerMenu callInventoryOpenEvent(ServerPlayer player, AbstractContainerMenu container, boolean cancelled) {
         if (player.containerMenu != player.inventoryMenu) { // fire INVENTORY_CLOSE if one already open
-            player.connection.handleContainerClose(new PacketPlayInCloseWindow(player.containerMenu.containerId));
+            player.connection.handleContainerClose(new ServerboundContainerClosePacket(player.containerMenu.containerId));
         }
 
         CraftServer server = player.level().getCraftServer();
@@ -1278,7 +1264,7 @@ public class CraftEventFactory {
         return container;
     }
 
-    public static ItemStack callPreCraftEvent(InventoryCrafting matrix, IInventory resultInventory, ItemStack result, InventoryView lastCraftView, boolean isRepair) {
+    public static ItemStack callPreCraftEvent(CraftingContainer matrix, Container resultInventory, ItemStack result, InventoryView lastCraftView, boolean isRepair) {
         CraftInventoryCrafting inventory = new CraftInventoryCrafting(matrix, resultInventory);
         inventory.setResult(CraftItemStack.asCraftMirror(result));
 
@@ -1290,7 +1276,7 @@ public class CraftEventFactory {
         return CraftItemStack.asNMSCopy(bitem);
     }
 
-    public static CrafterCraftEvent callCrafterCraftEvent(BlockPosition pos, World world, InventoryCrafting inventoryCrafting, ItemStack result, RecipeHolder<RecipeCrafting> holder) {
+    public static CrafterCraftEvent callCrafterCraftEvent(BlockPos pos, Level world, CraftingContainer inventoryCrafting, ItemStack result, RecipeHolder<net.minecraft.world.item.crafting.CraftingRecipe> holder) {
         CraftBlock block = CraftBlock.at(world, pos);
         CraftItemStack itemStack = CraftItemStack.asCraftMirror(result);
         CraftingRecipe craftingRecipe = (CraftingRecipe) holder.toBukkitRecipe();
@@ -1307,22 +1293,22 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static ProjectileHitEvent callProjectileHitEvent(Entity entity, MovingObjectPosition position) {
-        if (position.getType() == MovingObjectPosition.EnumMovingObjectType.MISS) {
+    public static ProjectileHitEvent callProjectileHitEvent(Entity entity, HitResult position) {
+        if (position.getType() == HitResult.Type.MISS) {
             return null;
         }
 
         Block hitBlock = null;
         BlockFace hitFace = null;
-        if (position.getType() == MovingObjectPosition.EnumMovingObjectType.BLOCK) {
-            MovingObjectPositionBlock positionBlock = (MovingObjectPositionBlock) position;
+        if (position.getType() == HitResult.Type.BLOCK) {
+            BlockHitResult positionBlock = (BlockHitResult) position;
             hitBlock = CraftBlock.at(entity.level(), positionBlock.getBlockPos());
             hitFace = CraftBlock.notchToBlockFace(positionBlock.getDirection());
         }
 
         org.bukkit.entity.Entity hitEntity = null;
-        if (position.getType() == MovingObjectPosition.EnumMovingObjectType.ENTITY) {
-            hitEntity = ((MovingObjectPositionEntity) position).getEntity().getBukkitEntity();
+        if (position.getType() == HitResult.Type.ENTITY) {
+            hitEntity = ((EntityHitResult) position).getEntity().getBukkitEntity();
         }
 
         ProjectileHitEvent event = new ProjectileHitEvent((Projectile) entity.getBukkitEntity(), hitEntity, hitBlock, hitFace);
@@ -1330,20 +1316,20 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static ExpBottleEvent callExpBottleEvent(Entity entity, MovingObjectPosition position, int exp) {
+    public static ExpBottleEvent callExpBottleEvent(Entity entity, HitResult position, int exp) {
         ThrownExpBottle bottle = (ThrownExpBottle) entity.getBukkitEntity();
 
         Block hitBlock = null;
         BlockFace hitFace = null;
-        if (position.getType() == MovingObjectPosition.EnumMovingObjectType.BLOCK) {
-            MovingObjectPositionBlock positionBlock = (MovingObjectPositionBlock) position;
+        if (position.getType() == HitResult.Type.BLOCK) {
+            BlockHitResult positionBlock = (BlockHitResult) position;
             hitBlock = CraftBlock.at(entity.level(), positionBlock.getBlockPos());
             hitFace = CraftBlock.notchToBlockFace(positionBlock.getDirection());
         }
 
         org.bukkit.entity.Entity hitEntity = null;
-        if (position.getType() == MovingObjectPosition.EnumMovingObjectType.ENTITY) {
-            hitEntity = ((MovingObjectPositionEntity) position).getEntity().getBukkitEntity();
+        if (position.getType() == HitResult.Type.ENTITY) {
+            hitEntity = ((EntityHitResult) position).getEntity().getBukkitEntity();
         }
 
         ExpBottleEvent event = new ExpBottleEvent(bottle, hitEntity, hitBlock, hitFace, exp);
@@ -1351,25 +1337,25 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static BlockRedstoneEvent callRedstoneChange(World world, BlockPosition pos, int oldCurrent, int newCurrent) {
+    public static BlockRedstoneEvent callRedstoneChange(Level world, BlockPos pos, int oldCurrent, int newCurrent) {
         BlockRedstoneEvent event = new BlockRedstoneEvent(world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()), oldCurrent, newCurrent);
         world.getCraftServer().getPluginManager().callEvent(event);
         return event;
     }
 
-    public static NotePlayEvent callNotePlayEvent(World world, BlockPosition pos, BlockPropertyInstrument instrument, int note) {
+    public static NotePlayEvent callNotePlayEvent(Level world, BlockPos pos, NoteBlockInstrument instrument, int note) {
         NotePlayEvent event = new NotePlayEvent(world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()), org.bukkit.Instrument.getByType((byte) instrument.ordinal()), new org.bukkit.Note(note));
         world.getCraftServer().getPluginManager().callEvent(event);
         return event;
     }
 
-    public static void callPlayerItemBreakEvent(EntityPlayer human, ItemStack brokenItem) {
+    public static void callPlayerItemBreakEvent(ServerPlayer human, ItemStack brokenItem) {
         CraftItemStack item = CraftItemStack.asCraftMirror(brokenItem);
         PlayerItemBreakEvent event = new PlayerItemBreakEvent(human.getBukkitEntity(), item);
         Bukkit.getPluginManager().callEvent(event);
     }
 
-    public static BlockIgniteEvent callBlockIgniteEvent(World world, BlockPosition block, BlockPosition source) {
+    public static BlockIgniteEvent callBlockIgniteEvent(Level world, BlockPos block, BlockPos source) {
         org.bukkit.World bukkitWorld = world.getWorld();
         Block igniter = bukkitWorld.getBlockAt(source.getX(), source.getY(), source.getZ());
         IgniteCause cause;
@@ -1390,7 +1376,7 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static BlockIgniteEvent callBlockIgniteEvent(World world, BlockPosition pos, Entity igniter) {
+    public static BlockIgniteEvent callBlockIgniteEvent(Level world, BlockPos pos, Entity igniter) {
         org.bukkit.World bukkitWorld = world.getWorld();
         org.bukkit.entity.Entity bukkitIgniter = igniter.getBukkitEntity();
         IgniteCause cause;
@@ -1412,8 +1398,8 @@ public class CraftEventFactory {
                 cause = IgniteCause.FLINT_AND_STEEL;
         }
 
-        if (igniter instanceof IProjectile) {
-            Entity shooter = ((IProjectile) igniter).getOwner();
+        if (igniter instanceof net.minecraft.world.entity.projectile.Projectile) {
+            Entity shooter = ((net.minecraft.world.entity.projectile.Projectile) igniter).getOwner();
             if (shooter != null) {
                 bukkitIgniter = shooter.getBukkitEntity();
             }
@@ -1424,7 +1410,7 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static BlockIgniteEvent callBlockIgniteEvent(World world, BlockPosition blockposition, Explosion explosion) {
+    public static BlockIgniteEvent callBlockIgniteEvent(Level world, BlockPos blockposition, Explosion explosion) {
         org.bukkit.entity.Entity igniter = explosion.getDirectSourceEntity() == null ? null : explosion.getDirectSourceEntity().getBukkitEntity();
 
         BlockIgniteEvent event = new BlockIgniteEvent(CraftBlock.at(world, blockposition), IgniteCause.EXPLOSION, igniter);
@@ -1432,19 +1418,19 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static BlockIgniteEvent callBlockIgniteEvent(World world, BlockPosition pos, IgniteCause cause, Entity igniter) {
+    public static BlockIgniteEvent callBlockIgniteEvent(Level world, BlockPos pos, IgniteCause cause, Entity igniter) {
         BlockIgniteEvent event = new BlockIgniteEvent(world.getWorld().getBlockAt(pos.getX(), pos.getY(), pos.getZ()), cause, igniter.getBukkitEntity());
         world.getCraftServer().getPluginManager().callEvent(event);
         return event;
     }
 
-    public static void handleInventoryCloseEvent(EntityHuman human) {
+    public static void handleInventoryCloseEvent(net.minecraft.world.entity.player.Player human) {
         InventoryCloseEvent event = new InventoryCloseEvent(human.containerMenu.getBukkitView());
         human.level().getCraftServer().getPluginManager().callEvent(event);
         human.containerMenu.transferTo(human.inventoryMenu, human.getBukkitEntity());
     }
 
-    public static ItemStack handleEditBookEvent(EntityPlayer player, int itemInHandIndex, ItemStack itemInHand, ItemStack newBookItem) {
+    public static ItemStack handleEditBookEvent(ServerPlayer player, int itemInHandIndex, ItemStack itemInHand, ItemStack newBookItem) {
         PlayerEditBookEvent editBookEvent = new PlayerEditBookEvent(player.getBukkitEntity(), (itemInHandIndex >= 0 && itemInHandIndex <= 8) ? itemInHandIndex : -1, (BookMeta) CraftItemStack.getItemMeta(itemInHand), (BookMeta) CraftItemStack.getItemMeta(newBookItem), newBookItem.getItem() == Items.WRITTEN_BOOK);
         player.level().getCraftServer().getPluginManager().callEvent(editBookEvent);
 
@@ -1464,24 +1450,24 @@ public class CraftEventFactory {
         return itemInHand;
     }
 
-    public static void callRecipeBookSettingsEvent(EntityPlayer player, RecipeBookType type, boolean open, boolean filter) {
+    public static void callRecipeBookSettingsEvent(ServerPlayer player, RecipeBookType type, boolean open, boolean filter) {
         PlayerRecipeBookSettingsChangeEvent.RecipeBookType bukkitType = PlayerRecipeBookSettingsChangeEvent.RecipeBookType.values()[type.ordinal()];
         Bukkit.getPluginManager().callEvent(new PlayerRecipeBookSettingsChangeEvent(player.getBukkitEntity(), bukkitType, open, filter));
     }
 
-    public static PlayerUnleashEntityEvent callPlayerUnleashEntityEvent(Entity entity, EntityHuman player, EnumHand enumhand) {
+    public static PlayerUnleashEntityEvent callPlayerUnleashEntityEvent(Entity entity, net.minecraft.world.entity.player.Player player, InteractionHand enumhand) {
         PlayerUnleashEntityEvent event = new PlayerUnleashEntityEvent(entity.getBukkitEntity(), (Player) player.getBukkitEntity(), CraftEquipmentSlot.getHand(enumhand));
         entity.level().getCraftServer().getPluginManager().callEvent(event);
         return event;
     }
 
-    public static PlayerLeashEntityEvent callPlayerLeashEntityEvent(Entity entity, Entity leashHolder, EntityHuman player, EnumHand enumhand) {
+    public static PlayerLeashEntityEvent callPlayerLeashEntityEvent(Entity entity, Entity leashHolder, net.minecraft.world.entity.player.Player player, InteractionHand enumhand) {
         PlayerLeashEntityEvent event = new PlayerLeashEntityEvent(entity.getBukkitEntity(), leashHolder.getBukkitEntity(), (Player) player.getBukkitEntity(), CraftEquipmentSlot.getHand(enumhand));
         entity.level().getCraftServer().getPluginManager().callEvent(event);
         return event;
     }
 
-    public static void callPlayerRiptideEvent(EntityHuman player, ItemStack tridentItemStack, float velocityX, float velocityY, float velocityZ) {
+    public static void callPlayerRiptideEvent(net.minecraft.world.entity.player.Player player, ItemStack tridentItemStack, float velocityX, float velocityY, float velocityZ) {
         PlayerRiptideEvent event = new PlayerRiptideEvent((Player) player.getBukkitEntity(), CraftItemStack.asCraftMirror(tridentItemStack), new Vector(velocityX, velocityY, velocityZ));
         player.level().getCraftServer().getPluginManager().callEvent(event);
     }
@@ -1492,18 +1478,18 @@ public class CraftEventFactory {
         return bse;
     }
 
-    public static boolean handlePlayerShearEntityEvent(EntityHuman player, Entity sheared, ItemStack shears, EnumHand hand) {
-        if (!(player instanceof EntityPlayer)) {
+    public static boolean handlePlayerShearEntityEvent(net.minecraft.world.entity.player.Player player, Entity sheared, ItemStack shears, InteractionHand hand) {
+        if (!(player instanceof ServerPlayer)) {
             return true;
         }
 
-        PlayerShearEntityEvent event = new PlayerShearEntityEvent((Player) player.getBukkitEntity(), sheared.getBukkitEntity(), CraftItemStack.asCraftMirror(shears), (hand == EnumHand.OFF_HAND ? EquipmentSlot.OFF_HAND : EquipmentSlot.HAND));
+        PlayerShearEntityEvent event = new PlayerShearEntityEvent((Player) player.getBukkitEntity(), sheared.getBukkitEntity(), CraftItemStack.asCraftMirror(shears), (hand == InteractionHand.OFF_HAND ? EquipmentSlot.OFF_HAND : EquipmentSlot.HAND));
         Bukkit.getPluginManager().callEvent(event);
         return !event.isCancelled();
     }
 
-    public static Cancellable handleStatisticsIncrease(EntityHuman entityHuman, net.minecraft.stats.Statistic<?> statistic, int current, int newValue) {
-        Player player = ((EntityPlayer) entityHuman).getBukkitEntity();
+    public static Cancellable handleStatisticsIncrease(net.minecraft.world.entity.player.Player entityHuman, net.minecraft.stats.Stat<?> statistic, int current, int newValue) {
+        Player player = ((ServerPlayer) entityHuman).getBukkitEntity();
         Event event;
         if (true) {
             org.bukkit.Statistic stat = CraftStatistic.getBukkitStatistic(statistic);
@@ -1539,7 +1525,7 @@ public class CraftEventFactory {
             if (stat.getType() == Type.UNTYPED) {
                 event = new PlayerStatisticIncrementEvent(player, stat, current, newValue);
             } else if (stat.getType() == Type.ENTITY) {
-                EntityType entityType = CraftStatistic.getEntityTypeFromStatistic((net.minecraft.stats.Statistic<EntityTypes<?>>) statistic);
+                EntityType entityType = CraftStatistic.getEntityTypeFromStatistic((net.minecraft.stats.Stat<net.minecraft.world.entity.EntityType<?>>) statistic);
                 event = new PlayerStatisticIncrementEvent(player, stat, current, newValue, entityType);
             } else {
                 Material material = CraftStatistic.getMaterialFromStatistic(statistic);
@@ -1550,7 +1536,7 @@ public class CraftEventFactory {
         return (Cancellable) event;
     }
 
-    public static FireworkExplodeEvent callFireworkExplodeEvent(EntityFireworks firework) {
+    public static FireworkExplodeEvent callFireworkExplodeEvent(FireworkRocketEntity firework) {
         FireworkExplodeEvent event = new FireworkExplodeEvent((Firework) firework.getBukkitEntity());
         firework.level().getCraftServer().getPluginManager().callEvent(event);
         return event;
@@ -1580,7 +1566,7 @@ public class CraftEventFactory {
     /**
      * Mob spawner event.
      */
-    public static SpawnerSpawnEvent callSpawnerSpawnEvent(Entity spawnee, BlockPosition pos) {
+    public static SpawnerSpawnEvent callSpawnerSpawnEvent(Entity spawnee, BlockPos pos) {
         org.bukkit.craftbukkit.entity.CraftEntity entity = spawnee.getBukkitEntity();
         BlockState state = CraftBlock.at(spawnee.level(), pos).getState();
         if (!(state instanceof org.bukkit.block.CreatureSpawner)) {
@@ -1595,7 +1581,7 @@ public class CraftEventFactory {
     /**
      * Trial Mob spawner event.
      */
-    public static TrialSpawnerSpawnEvent callTrialSpawnerSpawnEvent(Entity spawnee, BlockPosition pos) {
+    public static TrialSpawnerSpawnEvent callTrialSpawnerSpawnEvent(Entity spawnee, BlockPos pos) {
         org.bukkit.craftbukkit.entity.CraftEntity entity = spawnee.getBukkitEntity();
         BlockState state = CraftBlock.at(spawnee.level(), pos).getState();
         if (!(state instanceof org.bukkit.block.TrialSpawner)) {
@@ -1607,7 +1593,7 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static BlockDispenseLootEvent callBlockDispenseLootEvent(WorldServer worldServer, BlockPosition blockPosition, EntityHuman player, List<ItemStack> rewardLoot) {
+    public static BlockDispenseLootEvent callBlockDispenseLootEvent(ServerLevel worldServer, BlockPos blockPosition, net.minecraft.world.entity.player.Player player, List<ItemStack> rewardLoot) {
         List<org.bukkit.inventory.ItemStack> craftItemStacks = rewardLoot.stream().map(CraftItemStack::asBukkitCopy).collect(Collectors.toList());
 
         BlockDispenseLootEvent event = new BlockDispenseLootEvent((player == null) ? null : (Player) player.getBukkitEntity(), CraftBlock.at(worldServer, blockPosition), craftItemStacks);
@@ -1615,25 +1601,25 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static VaultDisplayItemEvent callVaultDisplayItemEvent(WorldServer worldServer, BlockPosition blockPosition, ItemStack displayitemStack) {
+    public static VaultDisplayItemEvent callVaultDisplayItemEvent(ServerLevel worldServer, BlockPos blockPosition, ItemStack displayitemStack) {
         VaultDisplayItemEvent event = new VaultDisplayItemEvent(CraftBlock.at(worldServer, blockPosition), CraftItemStack.asBukkitCopy(displayitemStack));
         Bukkit.getPluginManager().callEvent(event);
         return event;
     }
 
-    public static EntityToggleGlideEvent callToggleGlideEvent(EntityLiving entity, boolean gliding) {
+    public static EntityToggleGlideEvent callToggleGlideEvent(net.minecraft.world.entity.LivingEntity entity, boolean gliding) {
         EntityToggleGlideEvent event = new EntityToggleGlideEvent((LivingEntity) entity.getBukkitEntity(), gliding);
         entity.level().getCraftServer().getPluginManager().callEvent(event);
         return event;
     }
 
-    public static EntityToggleSwimEvent callToggleSwimEvent(EntityLiving entity, boolean swimming) {
+    public static EntityToggleSwimEvent callToggleSwimEvent(net.minecraft.world.entity.LivingEntity entity, boolean swimming) {
         EntityToggleSwimEvent event = new EntityToggleSwimEvent((LivingEntity) entity.getBukkitEntity(), swimming);
         entity.level().getCraftServer().getPluginManager().callEvent(event);
         return event;
     }
 
-    public static AreaEffectCloudApplyEvent callAreaEffectCloudApplyEvent(EntityAreaEffectCloud cloud, List<LivingEntity> entities) {
+    public static AreaEffectCloudApplyEvent callAreaEffectCloudApplyEvent(net.minecraft.world.entity.AreaEffectCloud cloud, List<LivingEntity> entities) {
         AreaEffectCloudApplyEvent event = new AreaEffectCloudApplyEvent((AreaEffectCloud) cloud.getBukkitEntity(), entities);
         cloud.level().getCraftServer().getPluginManager().callEvent(event);
         return event;
@@ -1646,7 +1632,7 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static EntityBreedEvent callEntityBreedEvent(EntityLiving child, EntityLiving mother, EntityLiving father, EntityLiving breeder, ItemStack bredWith, int experience) {
+    public static EntityBreedEvent callEntityBreedEvent(net.minecraft.world.entity.LivingEntity child, net.minecraft.world.entity.LivingEntity mother, net.minecraft.world.entity.LivingEntity father, net.minecraft.world.entity.LivingEntity breeder, ItemStack bredWith, int experience) {
         org.bukkit.entity.LivingEntity breederEntity = (LivingEntity) (breeder == null ? null : breeder.getBukkitEntity());
         CraftItemStack bredWithStack = bredWith == null ? null : CraftItemStack.asCraftMirror(bredWith).clone();
 
@@ -1655,29 +1641,29 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static BlockPhysicsEvent callBlockPhysicsEvent(GeneratorAccess world, BlockPosition blockposition) {
+    public static BlockPhysicsEvent callBlockPhysicsEvent(LevelAccessor world, BlockPos blockposition) {
         org.bukkit.block.Block block = CraftBlock.at(world, blockposition);
         BlockPhysicsEvent event = new BlockPhysicsEvent(block, block.getBlockData());
         // Suppress during worldgen
-        if (world instanceof World) {
-            ((World) world).getServer().server.getPluginManager().callEvent(event);
+        if (world instanceof Level) {
+            ((Level) world).getServer().server.getPluginManager().callEvent(event);
         }
         return event;
     }
 
-    public static boolean handleBlockFormEvent(World world, BlockPosition pos, IBlockData block) {
-        return handleBlockFormEvent(world, pos, block, 3);
+    public static boolean handleBlockFormEvent(Level world, BlockPos pos, net.minecraft.world.level.block.state.BlockState block) {
+        return CraftEventFactory.handleBlockFormEvent(world, pos, block, 3);
     }
 
-    public static EntityPotionEffectEvent callEntityPotionEffectChangeEvent(EntityLiving entity, @Nullable MobEffect oldEffect, @Nullable MobEffect newEffect, EntityPotionEffectEvent.Cause cause) {
-        return callEntityPotionEffectChangeEvent(entity, oldEffect, newEffect, cause, true);
+    public static EntityPotionEffectEvent callEntityPotionEffectChangeEvent(net.minecraft.world.entity.LivingEntity entity, @Nullable MobEffectInstance oldEffect, @Nullable MobEffectInstance newEffect, EntityPotionEffectEvent.Cause cause) {
+        return CraftEventFactory.callEntityPotionEffectChangeEvent(entity, oldEffect, newEffect, cause, true);
     }
 
-    public static EntityPotionEffectEvent callEntityPotionEffectChangeEvent(EntityLiving entity, @Nullable MobEffect oldEffect, @Nullable MobEffect newEffect, EntityPotionEffectEvent.Cause cause, EntityPotionEffectEvent.Action action) {
-        return callEntityPotionEffectChangeEvent(entity, oldEffect, newEffect, cause, action, true);
+    public static EntityPotionEffectEvent callEntityPotionEffectChangeEvent(net.minecraft.world.entity.LivingEntity entity, @Nullable MobEffectInstance oldEffect, @Nullable MobEffectInstance newEffect, EntityPotionEffectEvent.Cause cause, EntityPotionEffectEvent.Action action) {
+        return CraftEventFactory.callEntityPotionEffectChangeEvent(entity, oldEffect, newEffect, cause, action, true);
     }
 
-    public static EntityPotionEffectEvent callEntityPotionEffectChangeEvent(EntityLiving entity, @Nullable MobEffect oldEffect, @Nullable MobEffect newEffect, EntityPotionEffectEvent.Cause cause, boolean willOverride) {
+    public static EntityPotionEffectEvent callEntityPotionEffectChangeEvent(net.minecraft.world.entity.LivingEntity entity, @Nullable MobEffectInstance oldEffect, @Nullable MobEffectInstance newEffect, EntityPotionEffectEvent.Cause cause, boolean willOverride) {
         EntityPotionEffectEvent.Action action = EntityPotionEffectEvent.Action.CHANGED;
         if (oldEffect == null) {
             action = EntityPotionEffectEvent.Action.ADDED;
@@ -1685,10 +1671,10 @@ public class CraftEventFactory {
             action = EntityPotionEffectEvent.Action.REMOVED;
         }
 
-        return callEntityPotionEffectChangeEvent(entity, oldEffect, newEffect, cause, action, willOverride);
+        return CraftEventFactory.callEntityPotionEffectChangeEvent(entity, oldEffect, newEffect, cause, action, willOverride);
     }
 
-    public static EntityPotionEffectEvent callEntityPotionEffectChangeEvent(EntityLiving entity, @Nullable MobEffect oldEffect, @Nullable MobEffect newEffect, EntityPotionEffectEvent.Cause cause, EntityPotionEffectEvent.Action action, boolean willOverride) {
+    public static EntityPotionEffectEvent callEntityPotionEffectChangeEvent(net.minecraft.world.entity.LivingEntity entity, @Nullable MobEffectInstance oldEffect, @Nullable MobEffectInstance newEffect, EntityPotionEffectEvent.Cause cause, EntityPotionEffectEvent.Action action, boolean willOverride) {
         PotionEffect bukkitOldEffect = (oldEffect == null) ? null : CraftPotionUtil.toBukkit(oldEffect);
         PotionEffect bukkitNewEffect = (newEffect == null) ? null : CraftPotionUtil.toBukkit(newEffect);
 
@@ -1700,15 +1686,15 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static boolean handleBlockFormEvent(World world, BlockPosition pos, IBlockData block, @Nullable Entity entity) {
-        return handleBlockFormEvent(world, pos, block, 3, entity);
+    public static boolean handleBlockFormEvent(Level world, BlockPos pos, net.minecraft.world.level.block.state.BlockState block, @Nullable Entity entity) {
+        return CraftEventFactory.handleBlockFormEvent(world, pos, block, 3, entity);
     }
 
-    public static boolean handleBlockFormEvent(World world, BlockPosition pos, IBlockData block, int flag) {
-        return handleBlockFormEvent(world, pos, block, flag, null);
+    public static boolean handleBlockFormEvent(Level world, BlockPos pos, net.minecraft.world.level.block.state.BlockState block, int flag) {
+        return CraftEventFactory.handleBlockFormEvent(world, pos, block, flag, null);
     }
 
-    public static boolean handleBlockFormEvent(World world, BlockPosition pos, IBlockData block, int flag, @Nullable Entity entity) {
+    public static boolean handleBlockFormEvent(Level world, BlockPos pos, net.minecraft.world.level.block.state.BlockState block, int flag, @Nullable Entity entity) {
         CraftBlockState blockState = CraftBlockStates.getBlockState(world, pos, flag);
         blockState.setData(block);
 
@@ -1728,13 +1714,13 @@ public class CraftEventFactory {
         return !event.isCancelled();
     }
 
-    public static boolean handlePlayerRecipeListUpdateEvent(EntityHuman who, MinecraftKey recipe) {
+    public static boolean handlePlayerRecipeListUpdateEvent(net.minecraft.world.entity.player.Player who, ResourceLocation recipe) {
         PlayerRecipeDiscoverEvent event = new PlayerRecipeDiscoverEvent((Player) who.getBukkitEntity(), CraftNamespacedKey.fromMinecraft(recipe));
         Bukkit.getPluginManager().callEvent(event);
         return !event.isCancelled();
     }
 
-    public static EntityPickupItemEvent callEntityPickupItemEvent(Entity who, EntityItem item, int remaining, boolean cancelled) {
+    public static EntityPickupItemEvent callEntityPickupItemEvent(Entity who, ItemEntity item, int remaining, boolean cancelled) {
         EntityPickupItemEvent event = new EntityPickupItemEvent((LivingEntity) who.getBukkitEntity(), (Item) item.getBukkitEntity(), remaining);
         event.setCancelled(cancelled);
         Bukkit.getPluginManager().callEvent(event);
@@ -1750,7 +1736,7 @@ public class CraftEventFactory {
     /**
      * Raid events
      */
-    public static boolean callRaidTriggerEvent(Raid raid, EntityPlayer player) {
+    public static boolean callRaidTriggerEvent(Raid raid, ServerPlayer player) {
         RaidTriggerEvent event = new RaidTriggerEvent(new CraftRaid(raid), raid.getLevel().getWorld(), player.getBukkitEntity());
         Bukkit.getPluginManager().callEvent(event);
         return !event.isCancelled();
@@ -1766,19 +1752,19 @@ public class CraftEventFactory {
         Bukkit.getPluginManager().callEvent(event);
     }
 
-    public static void callRaidSpawnWaveEvent(Raid raid, EntityRaider leader, List<EntityRaider> raiders) {
+    public static void callRaidSpawnWaveEvent(Raid raid, net.minecraft.world.entity.raid.Raider leader, List<net.minecraft.world.entity.raid.Raider> raiders) {
         Raider craftLeader = (CraftRaider) leader.getBukkitEntity();
         List<Raider> craftRaiders = new ArrayList<>();
-        for (EntityRaider entityRaider : raiders) {
+        for (net.minecraft.world.entity.raid.Raider entityRaider : raiders) {
             craftRaiders.add((Raider) entityRaider.getBukkitEntity());
         }
         RaidSpawnWaveEvent event = new RaidSpawnWaveEvent(new CraftRaid(raid), raid.getLevel().getWorld(), craftLeader, craftRaiders);
         Bukkit.getPluginManager().callEvent(event);
     }
 
-    public static LootGenerateEvent callLootGenerateEvent(IInventory inventory, LootTable lootTable, LootTableInfo lootInfo, List<ItemStack> loot, boolean plugin) {
+    public static LootGenerateEvent callLootGenerateEvent(Container inventory, LootTable lootTable, LootContext lootInfo, List<ItemStack> loot, boolean plugin) {
         CraftWorld world = lootInfo.getLevel().getWorld();
-        Entity entity = lootInfo.getOptionalParameter(LootContextParameters.THIS_ENTITY);
+        Entity entity = lootInfo.getOptionalParameter(LootContextParams.THIS_ENTITY);
         List<org.bukkit.inventory.ItemStack> bukkitLoot = loot.stream().map(CraftItemStack::asCraftMirror).collect(Collectors.toCollection(ArrayList::new));
 
         LootGenerateEvent event = new LootGenerateEvent(world, (entity != null ? entity.getBukkitEntity() : null), inventory.getOwner(), lootTable.craftLootTable, CraftLootTable.convertContext(lootInfo), bukkitLoot, plugin);
@@ -1786,13 +1772,13 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static boolean callStriderTemperatureChangeEvent(EntityStrider strider, boolean shivering) {
+    public static boolean callStriderTemperatureChangeEvent(net.minecraft.world.entity.monster.Strider strider, boolean shivering) {
         StriderTemperatureChangeEvent event = new StriderTemperatureChangeEvent((Strider) strider.getBukkitEntity(), shivering);
         Bukkit.getPluginManager().callEvent(event);
         return !event.isCancelled();
     }
 
-    public static boolean handleEntitySpellCastEvent(EntityIllagerWizard caster, EntityIllagerWizard.Spell spell) {
+    public static boolean handleEntitySpellCastEvent(SpellcasterIllager caster, SpellcasterIllager.IllagerSpell spell) {
         EntitySpellCastEvent event = new EntitySpellCastEvent((Spellcaster) caster.getBukkitEntity(), CraftSpellcaster.toBukkitSpell(spell));
         Bukkit.getPluginManager().callEvent(event);
         return !event.isCancelled();
@@ -1801,7 +1787,7 @@ public class CraftEventFactory {
     /**
      * ArrowBodyCountChangeEvent
      */
-    public static ArrowBodyCountChangeEvent callArrowBodyCountChangeEvent(EntityLiving entity, int oldAmount, int newAmount, boolean isReset) {
+    public static ArrowBodyCountChangeEvent callArrowBodyCountChangeEvent(net.minecraft.world.entity.LivingEntity entity, int oldAmount, int newAmount, boolean isReset) {
         org.bukkit.entity.LivingEntity bukkitEntity = (LivingEntity) entity.getBukkitEntity();
 
         ArrowBodyCountChangeEvent event = new ArrowBodyCountChangeEvent(bukkitEntity, oldAmount, newAmount, isReset);
@@ -1810,32 +1796,32 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static EntityExhaustionEvent callPlayerExhaustionEvent(EntityHuman humanEntity, EntityExhaustionEvent.ExhaustionReason exhaustionReason, float exhaustion) {
+    public static EntityExhaustionEvent callPlayerExhaustionEvent(net.minecraft.world.entity.player.Player humanEntity, EntityExhaustionEvent.ExhaustionReason exhaustionReason, float exhaustion) {
         EntityExhaustionEvent event = new EntityExhaustionEvent(humanEntity.getBukkitEntity(), exhaustionReason, exhaustion);
         Bukkit.getPluginManager().callEvent(event);
 
         return event;
     }
 
-    public static PiglinBarterEvent callPiglinBarterEvent(EntityPiglin piglin, List<ItemStack> outcome, ItemStack input) {
+    public static PiglinBarterEvent callPiglinBarterEvent(net.minecraft.world.entity.monster.piglin.Piglin piglin, List<ItemStack> outcome, ItemStack input) {
         PiglinBarterEvent event = new PiglinBarterEvent((Piglin) piglin.getBukkitEntity(), CraftItemStack.asBukkitCopy(input), outcome.stream().map(CraftItemStack::asBukkitCopy).collect(Collectors.toList()));
         Bukkit.getPluginManager().callEvent(event);
         return event;
     }
 
-    public static void callEntitiesLoadEvent(World world, ChunkCoordIntPair coords, List<Entity> entities) {
+    public static void callEntitiesLoadEvent(Level world, ChunkPos coords, List<Entity> entities) {
         List<org.bukkit.entity.Entity> bukkitEntities = Collections.unmodifiableList(entities.stream().map(Entity::getBukkitEntity).collect(Collectors.toList()));
-        EntitiesLoadEvent event = new EntitiesLoadEvent(new CraftChunk((WorldServer) world, coords.x, coords.z), bukkitEntities);
+        EntitiesLoadEvent event = new EntitiesLoadEvent(new CraftChunk((ServerLevel) world, coords.x, coords.z), bukkitEntities);
         Bukkit.getPluginManager().callEvent(event);
     }
 
-    public static void callEntitiesUnloadEvent(World world, ChunkCoordIntPair coords, List<Entity> entities) {
+    public static void callEntitiesUnloadEvent(Level world, ChunkPos coords, List<Entity> entities) {
         List<org.bukkit.entity.Entity> bukkitEntities = Collections.unmodifiableList(entities.stream().map(Entity::getBukkitEntity).collect(Collectors.toList()));
-        EntitiesUnloadEvent event = new EntitiesUnloadEvent(new CraftChunk((WorldServer) world, coords.x, coords.z), bukkitEntities);
+        EntitiesUnloadEvent event = new EntitiesUnloadEvent(new CraftChunk((ServerLevel) world, coords.x, coords.z), bukkitEntities);
         Bukkit.getPluginManager().callEvent(event);
     }
 
-    public static boolean callTNTPrimeEvent(World world, BlockPosition pos, TNTPrimeEvent.PrimeCause cause, Entity causingEntity, BlockPosition causePosition) {
+    public static boolean callTNTPrimeEvent(Level world, BlockPos pos, TNTPrimeEvent.PrimeCause cause, Entity causingEntity, BlockPos causePosition) {
         org.bukkit.entity.Entity bukkitEntity = (causingEntity == null) ? null : causingEntity.getBukkitEntity();
         org.bukkit.block.Block bukkitBlock = (causePosition == null) ? null : CraftBlock.at(world, causePosition);
 
@@ -1845,7 +1831,7 @@ public class CraftEventFactory {
         return !event.isCancelled();
     }
 
-    public static PlayerRecipeBookClickEvent callRecipeBookClickEvent(EntityPlayer player, Recipe recipe, boolean shiftClick) {
+    public static PlayerRecipeBookClickEvent callRecipeBookClickEvent(ServerPlayer player, Recipe recipe, boolean shiftClick) {
         PlayerRecipeBookClickEvent event = new PlayerRecipeBookClickEvent(player.getBukkitEntity(), recipe, shiftClick);
         Bukkit.getPluginManager().callEvent(event);
         return event;
@@ -1854,7 +1840,7 @@ public class CraftEventFactory {
     public static EntityTeleportEvent callEntityTeleportEvent(Entity nmsEntity, double x, double y, double z) {
         CraftEntity entity = nmsEntity.getBukkitEntity();
         Location to = new Location(entity.getWorld(), x, y, z, nmsEntity.getYRot(), nmsEntity.getXRot());
-        return callEntityTeleportEvent(nmsEntity, to);
+        return CraftEventFactory.callEntityTeleportEvent(nmsEntity, to);
     }
 
     public static EntityTeleportEvent callEntityTeleportEvent(Entity nmsEntity, Location to) {
@@ -1873,13 +1859,13 @@ public class CraftEventFactory {
         return !event.isCancelled();
     }
 
-    public static EntityExplodeEvent callEntityExplodeEvent(Entity entity, List<Block> blocks, float yield, Explosion.Effect effect) {
+    public static EntityExplodeEvent callEntityExplodeEvent(Entity entity, List<Block> blocks, float yield, Explosion.BlockInteraction effect) {
         EntityExplodeEvent event = new EntityExplodeEvent(entity.getBukkitEntity(), entity.getBukkitEntity().getLocation(), blocks, yield, CraftExplosionResult.toBukkit(effect));
         Bukkit.getPluginManager().callEvent(event);
         return event;
     }
 
-    public static BlockExplodeEvent callBlockExplodeEvent(Block block, BlockState state, List<Block> blocks, float yield, Explosion.Effect effect) {
+    public static BlockExplodeEvent callBlockExplodeEvent(Block block, BlockState state, List<Block> blocks, float yield, Explosion.BlockInteraction effect) {
         BlockExplodeEvent event = new BlockExplodeEvent(block, state, blocks, yield, CraftExplosionResult.toBukkit(effect));
         Bukkit.getPluginManager().callEvent(event);
         return event;
@@ -1897,7 +1883,7 @@ public class CraftEventFactory {
         return event;
     }
 
-    public static EntityKnockbackEvent callEntityKnockbackEvent(CraftLivingEntity entity, Entity attacker, EntityKnockbackEvent.KnockbackCause cause, double force, Vec3D raw, double x, double y, double z) {
+    public static EntityKnockbackEvent callEntityKnockbackEvent(CraftLivingEntity entity, Entity attacker, EntityKnockbackEvent.KnockbackCause cause, double force, Vec3 raw, double x, double y, double z) {
         Vector bukkitRaw = new Vector(-raw.x, raw.y, -raw.z); // Due to how the knockback calculation works, we need to invert x and z.
 
         EntityKnockbackEvent event;
@@ -1912,7 +1898,7 @@ public class CraftEventFactory {
     }
 
     public static void callEntityRemoveEvent(Entity entity, EntityRemoveEvent.Cause cause) {
-        if (entity instanceof EntityPlayer) {
+        if (entity instanceof ServerPlayer) {
             return; // Don't call for player
         }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftPortalEvent.java b/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftPortalEvent.java
index 07712e75da..9c6ca54fca 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftPortalEvent.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/event/CraftPortalEvent.java
@@ -16,38 +16,38 @@ public class CraftPortalEvent {
     private final boolean cancelled;
 
     public CraftPortalEvent(EntityPortalEvent portalEvent) {
-        to = portalEvent.getTo();
-        searchRadius = portalEvent.getSearchRadius();
-        cancelled = portalEvent.isCancelled();
-        creationRadius = portalEvent.getCreationRadius();
-        canCreatePortal = portalEvent.getCanCreatePortal();
+        this.to = portalEvent.getTo();
+        this.searchRadius = portalEvent.getSearchRadius();
+        this.cancelled = portalEvent.isCancelled();
+        this.creationRadius = portalEvent.getCreationRadius();
+        this.canCreatePortal = portalEvent.getCanCreatePortal();
     }
 
     public CraftPortalEvent(PlayerPortalEvent portalEvent) {
-        to = portalEvent.getTo();
-        searchRadius = portalEvent.getSearchRadius();
-        creationRadius = portalEvent.getCreationRadius();
-        canCreatePortal = portalEvent.getCanCreatePortal();
-        cancelled = portalEvent.isCancelled();
+        this.to = portalEvent.getTo();
+        this.searchRadius = portalEvent.getSearchRadius();
+        this.creationRadius = portalEvent.getCreationRadius();
+        this.canCreatePortal = portalEvent.getCanCreatePortal();
+        this.cancelled = portalEvent.isCancelled();
     }
 
     public Location getTo() {
-        return to;
+        return this.to;
     }
 
     public int getSearchRadius() {
-        return searchRadius;
+        return this.searchRadius;
     }
 
     public int getCreationRadius() {
-        return creationRadius;
+        return this.creationRadius;
     }
 
     public boolean getCanCreatePortal() {
-        return canCreatePortal;
+        return this.canCreatePortal;
     }
 
     public boolean isCancelled() {
-        return cancelled;
+        return this.cancelled;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CraftBiomeParameterPoint.java b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CraftBiomeParameterPoint.java
index a6f4e7c5d9..3e90269411 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CraftBiomeParameterPoint.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CraftBiomeParameterPoint.java
@@ -13,7 +13,7 @@ public class CraftBiomeParameterPoint implements BiomeParameterPoint {
     private final double weirdness;
     private final Climate.Sampler sampler;
 
-    public static BiomeParameterPoint createBiomeParameterPoint(Climate.Sampler sampler, Climate.h targetPoint) {
+    public static BiomeParameterPoint createBiomeParameterPoint(Climate.Sampler sampler, Climate.TargetPoint targetPoint) {
         return new CraftBiomeParameterPoint(sampler, Climate.unquantizeCoord(targetPoint.temperature()), Climate.unquantizeCoord(targetPoint.humidity()), Climate.unquantizeCoord(targetPoint.continentalness()), Climate.unquantizeCoord(targetPoint.erosion()), Climate.unquantizeCoord(targetPoint.depth()), Climate.unquantizeCoord(targetPoint.weirdness()));
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
index 00fe52cf4a..c96aaa185d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CraftChunkData.java
@@ -2,12 +2,12 @@ package org.bukkit.craftbukkit.generator;
 
 import com.google.common.base.Preconditions;
 import java.lang.ref.WeakReference;
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
 import net.minecraft.world.level.block.Blocks;
-import net.minecraft.world.level.block.ITileEntity;
-import net.minecraft.world.level.block.entity.TileEntity;
-import net.minecraft.world.level.block.state.IBlockData;
-import net.minecraft.world.level.chunk.IChunkAccess;
+import net.minecraft.world.level.block.EntityBlock;
+import net.minecraft.world.level.block.entity.BlockEntity;
+import net.minecraft.world.level.block.state.BlockState;
+import net.minecraft.world.level.chunk.ChunkAccess;
 import org.bukkit.Material;
 import org.bukkit.World;
 import org.bukkit.block.Biome;
@@ -25,20 +25,20 @@ import org.bukkit.material.MaterialData;
 public final class CraftChunkData implements ChunkGenerator.ChunkData {
     private final int maxHeight;
     private final int minHeight;
-    private final WeakReference<IChunkAccess> weakChunk;
+    private final WeakReference<ChunkAccess> weakChunk;
 
-    public CraftChunkData(World world, IChunkAccess chunkAccess) {
+    public CraftChunkData(World world, ChunkAccess chunkAccess) {
         this(world.getMaxHeight(), world.getMinHeight(), chunkAccess);
     }
 
-    CraftChunkData(int maxHeight, int minHeight, IChunkAccess chunkAccess) {
+    CraftChunkData(int maxHeight, int minHeight, ChunkAccess chunkAccess) {
         this.maxHeight = maxHeight;
         this.minHeight = minHeight;
         this.weakChunk = new WeakReference<>(chunkAccess);
     }
 
-    public IChunkAccess getHandle() {
-        IChunkAccess access = weakChunk.get();
+    public ChunkAccess getHandle() {
+        ChunkAccess access = this.weakChunk.get();
 
         Preconditions.checkState(access != null, "IChunkAccess no longer present, are you using it in a different tick?");
 
@@ -46,79 +46,79 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData {
     }
 
     public void breakLink() {
-        weakChunk.clear();
+        this.weakChunk.clear();
     }
 
     @Override
     public int getMaxHeight() {
-        return maxHeight;
+        return this.maxHeight;
     }
 
     @Override
     public int getMinHeight() {
-        return minHeight;
+        return this.minHeight;
     }
 
     @Override
     public Biome getBiome(int x, int y, int z) {
-        return CraftBiome.minecraftHolderToBukkit(getHandle().getNoiseBiome(x >> 2, y >> 2, z >> 2));
+        return CraftBiome.minecraftHolderToBukkit(this.getHandle().getNoiseBiome(x >> 2, y >> 2, z >> 2));
     }
 
     @Override
     public void setBlock(int x, int y, int z, Material material) {
-        setBlock(x, y, z, material.createBlockData());
+        this.setBlock(x, y, z, material.createBlockData());
     }
 
     @Override
     public void setBlock(int x, int y, int z, MaterialData material) {
-        setBlock(x, y, z, CraftMagicNumbers.getBlock(material));
+        this.setBlock(x, y, z, CraftMagicNumbers.getBlock(material));
     }
 
     @Override
     public void setBlock(int x, int y, int z, BlockData blockData) {
-        setBlock(x, y, z, ((CraftBlockData) blockData).getState());
+        this.setBlock(x, y, z, ((CraftBlockData) blockData).getState());
     }
 
     @Override
     public void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, Material material) {
-        setRegion(xMin, yMin, zMin, xMax, yMax, zMax, material.createBlockData());
+        this.setRegion(xMin, yMin, zMin, xMax, yMax, zMax, material.createBlockData());
     }
 
     @Override
     public void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, MaterialData material) {
-        setRegion(xMin, yMin, zMin, xMax, yMax, zMax, CraftMagicNumbers.getBlock(material));
+        this.setRegion(xMin, yMin, zMin, xMax, yMax, zMax, CraftMagicNumbers.getBlock(material));
     }
 
     @Override
     public void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, BlockData blockData) {
-        setRegion(xMin, yMin, zMin, xMax, yMax, zMax, ((CraftBlockData) blockData).getState());
+        this.setRegion(xMin, yMin, zMin, xMax, yMax, zMax, ((CraftBlockData) blockData).getState());
     }
 
     @Override
     public Material getType(int x, int y, int z) {
-        return CraftBlockType.minecraftToBukkit(getTypeId(x, y, z).getBlock());
+        return CraftBlockType.minecraftToBukkit(this.getTypeId(x, y, z).getBlock());
     }
 
     @Override
     public MaterialData getTypeAndData(int x, int y, int z) {
-        return CraftMagicNumbers.getMaterial(getTypeId(x, y, z));
+        return CraftMagicNumbers.getMaterial(this.getTypeId(x, y, z));
     }
 
     @Override
     public BlockData getBlockData(int x, int y, int z) {
-        return CraftBlockData.fromData(getTypeId(x, y, z));
+        return CraftBlockData.fromData(this.getTypeId(x, y, z));
     }
 
-    public void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, IBlockData type) {
+    public void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, BlockState type) {
         // Clamp to sane values.
-        if (xMin > 0xf || yMin >= maxHeight || zMin > 0xf) {
+        if (xMin > 0xf || yMin >= this.maxHeight || zMin > 0xf) {
             return;
         }
         if (xMin < 0) {
             xMin = 0;
         }
-        if (yMin < minHeight) {
-            yMin = minHeight;
+        if (yMin < this.minHeight) {
+            yMin = this.minHeight;
         }
         if (zMin < 0) {
             zMin = 0;
@@ -126,8 +126,8 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData {
         if (xMax > 0x10) {
             xMax = 0x10;
         }
-        if (yMax > maxHeight) {
-            yMax = maxHeight;
+        if (yMax > this.maxHeight) {
+            yMax = this.maxHeight;
         }
         if (zMax > 0x10) {
             zMax = 0x10;
@@ -138,37 +138,37 @@ public final class CraftChunkData implements ChunkGenerator.ChunkData {
         for (int y = yMin; y < yMax; y++) {
             for (int x = xMin; x < xMax; x++) {
                 for (int z = zMin; z < zMax; z++) {
-                    setBlock(x, y, z, type);
+                    this.setBlock(x, y, z, type);
                 }
             }
         }
     }
 
-    public IBlockData getTypeId(int x, int y, int z) {
-        if (x != (x & 0xf) || y < minHeight || y >= maxHeight || z != (z & 0xf)) {
+    public BlockState getTypeId(int x, int y, int z) {
+        if (x != (x & 0xf) || y < this.minHeight || y >= this.maxHeight || z != (z & 0xf)) {
             return Blocks.AIR.defaultBlockState();
         }
 
-        IChunkAccess access = getHandle();
-        return access.getBlockState(new BlockPosition(access.getPos().getMinBlockX() + x, y, access.getPos().getMinBlockZ() + z));
+        ChunkAccess access = this.getHandle();
+        return access.getBlockState(new BlockPos(access.getPos().getMinBlockX() + x, y, access.getPos().getMinBlockZ() + z));
     }
 
     @Override
     public byte getData(int x, int y, int z) {
-        return CraftMagicNumbers.toLegacyData(getTypeId(x, y, z));
+        return CraftMagicNumbers.toLegacyData(this.getTypeId(x, y, z));
     }
 
-    private void setBlock(int x, int y, int z, IBlockData type) {
-        if (x != (x & 0xf) || y < minHeight || y >= maxHeight || z != (z & 0xf)) {
+    private void setBlock(int x, int y, int z, BlockState type) {
+        if (x != (x & 0xf) || y < this.minHeight || y >= this.maxHeight || z != (z & 0xf)) {
             return;
         }
 
-        IChunkAccess access = getHandle();
-        BlockPosition blockPosition = new BlockPosition(access.getPos().getMinBlockX() + x, y, access.getPos().getMinBlockZ() + z);
-        IBlockData oldBlockData = access.setBlockState(blockPosition, type, false);
+        ChunkAccess access = this.getHandle();
+        BlockPos blockPosition = new BlockPos(access.getPos().getMinBlockX() + x, y, access.getPos().getMinBlockZ() + z);
+        BlockState oldBlockData = access.setBlockState(blockPosition, type, false);
 
         if (type.hasBlockEntity()) {
-            TileEntity tileEntity = ((ITileEntity) type.getBlock()).newBlockEntity(blockPosition, type);
+            BlockEntity tileEntity = ((EntityBlock) type.getBlock()).newBlockEntity(blockPosition, type);
 
             // createTile can return null, currently only the case with material MOVING_PISTON
             if (tileEntity == null) {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CraftLimitedRegion.java b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CraftLimitedRegion.java
index ec0ad0f654..ca250dba42 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CraftLimitedRegion.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CraftLimitedRegion.java
@@ -7,15 +7,14 @@ import java.util.Collection;
 import java.util.List;
 import java.util.Random;
 import java.util.function.Consumer;
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
 import net.minecraft.core.Holder;
-import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.CompoundTag;
 import net.minecraft.world.entity.EntitySpawnReason;
-import net.minecraft.world.entity.EntityTypes;
-import net.minecraft.world.level.ChunkCoordIntPair;
-import net.minecraft.world.level.GeneratorAccessSeed;
-import net.minecraft.world.level.biome.BiomeBase;
-import net.minecraft.world.level.chunk.IChunkAccess;
+import net.minecraft.world.entity.EntityType;
+import net.minecraft.world.level.ChunkPos;
+import net.minecraft.world.level.WorldGenLevel;
+import net.minecraft.world.level.chunk.ChunkAccess;
 import net.minecraft.world.level.chunk.ProtoChunk;
 import net.minecraft.world.level.chunk.status.ChunkStatus;
 import org.bukkit.HeightMap;
@@ -34,7 +33,7 @@ import org.bukkit.util.BoundingBox;
 
 public class CraftLimitedRegion extends CraftRegionAccessor implements LimitedRegion {
 
-    private final WeakReference<GeneratorAccessSeed> weakAccess;
+    private final WeakReference<WorldGenLevel> weakAccess;
     private final int centerChunkX;
     private final int centerChunkZ;
     // Buffer is one chunk (16 blocks), can be seen in ChunkStatus#q
@@ -50,24 +49,24 @@ public class CraftLimitedRegion extends CraftRegionAccessor implements LimitedRe
     // Prevents crash for chunks which are converting from 1.17 to 1.18
     private final List<net.minecraft.world.entity.Entity> outsideEntities = new ArrayList<>();
 
-    public CraftLimitedRegion(GeneratorAccessSeed access, ChunkCoordIntPair center) {
+    public CraftLimitedRegion(WorldGenLevel access, ChunkPos center) {
         this.weakAccess = new WeakReference<>(access);
-        centerChunkX = center.x;
-        centerChunkZ = center.z;
+        this.centerChunkX = center.x;
+        this.centerChunkZ = center.z;
 
         World world = access.getMinecraftWorld().getWorld();
-        int xCenter = centerChunkX << 4;
-        int zCenter = centerChunkZ << 4;
-        int xMin = xCenter - getBuffer();
-        int zMin = zCenter - getBuffer();
-        int xMax = xCenter + getBuffer() + 16;
-        int zMax = zCenter + getBuffer() + 16;
+        int xCenter = this.centerChunkX << 4;
+        int zCenter = this.centerChunkZ << 4;
+        int xMin = xCenter - this.getBuffer();
+        int zMin = zCenter - this.getBuffer();
+        int xMax = xCenter + this.getBuffer() + 16;
+        int zMax = zCenter + this.getBuffer() + 16;
 
         this.region = new BoundingBox(xMin, world.getMinHeight(), zMin, xMax, world.getMaxHeight(), zMax);
     }
 
-    public GeneratorAccessSeed getHandle() {
-        GeneratorAccessSeed handle = weakAccess.get();
+    public WorldGenLevel getHandle() {
+        WorldGenLevel handle = this.weakAccess.get();
 
         Preconditions.checkState(handle != null, "GeneratorAccessSeed no longer present, are you using it in a different tick?");
 
@@ -75,22 +74,22 @@ public class CraftLimitedRegion extends CraftRegionAccessor implements LimitedRe
     }
 
     public void loadEntities() {
-        if (entitiesLoaded) {
+        if (this.entitiesLoaded) {
             return;
         }
 
-        GeneratorAccessSeed access = getHandle();
+        WorldGenLevel access = this.getHandle();
         // load entities which are already present
-        for (int x = -(buffer >> 4); x <= (buffer >> 4); x++) {
-            for (int z = -(buffer >> 4); z <= (buffer >> 4); z++) {
-                ProtoChunk chunk = (ProtoChunk) access.getChunk(centerChunkX + x, centerChunkZ + z);
-                for (NBTTagCompound compound : chunk.getEntities()) {
-                    EntityTypes.loadEntityRecursive(compound, access.getMinecraftWorld(), EntitySpawnReason.LOAD, (entity) -> {
-                        if (region.contains(entity.getX(), entity.getY(), entity.getZ())) {
+        for (int x = -(this.buffer >> 4); x <= (this.buffer >> 4); x++) {
+            for (int z = -(this.buffer >> 4); z <= (this.buffer >> 4); z++) {
+                ProtoChunk chunk = (ProtoChunk) access.getChunk(this.centerChunkX + x, this.centerChunkZ + z);
+                for (CompoundTag compound : chunk.getEntities()) {
+                    EntityType.loadEntityRecursive(compound, access.getMinecraftWorld(), EntitySpawnReason.LOAD, (entity) -> {
+                        if (this.region.contains(entity.getX(), entity.getY(), entity.getZ())) {
                             entity.generation = true;
-                            entities.add(entity);
+                            this.entities.add(entity);
                         } else {
-                            outsideEntities.add(entity);
+                            this.outsideEntities.add(entity);
                         }
                         return entity;
                     });
@@ -98,62 +97,62 @@ public class CraftLimitedRegion extends CraftRegionAccessor implements LimitedRe
             }
         }
 
-        entitiesLoaded = true;
+        this.entitiesLoaded = true;
     }
 
     public void saveEntities() {
-        GeneratorAccessSeed access = getHandle();
+        WorldGenLevel access = this.getHandle();
         // We don't clear existing entities when they are not loaded and therefore not modified
-        if (entitiesLoaded) {
-            for (int x = -(buffer >> 4); x <= (buffer >> 4); x++) {
-                for (int z = -(buffer >> 4); z <= (buffer >> 4); z++) {
-                    ProtoChunk chunk = (ProtoChunk) access.getChunk(centerChunkX + x, centerChunkZ + z);
+        if (this.entitiesLoaded) {
+            for (int x = -(this.buffer >> 4); x <= (this.buffer >> 4); x++) {
+                for (int z = -(this.buffer >> 4); z <= (this.buffer >> 4); z++) {
+                    ProtoChunk chunk = (ProtoChunk) access.getChunk(this.centerChunkX + x, this.centerChunkZ + z);
                     chunk.getEntities().clear();
                 }
             }
         }
 
-        for (net.minecraft.world.entity.Entity entity : entities) {
+        for (net.minecraft.world.entity.Entity entity : this.entities) {
             if (entity.isAlive()) {
                 // check if entity is still in region or if it got teleported outside it
-                Preconditions.checkState(region.contains(entity.getX(), entity.getY(), entity.getZ()), "Entity %s is not in the region", entity);
+                Preconditions.checkState(this.region.contains(entity.getX(), entity.getY(), entity.getZ()), "Entity %s is not in the region", entity);
                 access.addFreshEntityWithPassengers(entity);
             }
         }
 
-        for (net.minecraft.world.entity.Entity entity : outsideEntities) {
+        for (net.minecraft.world.entity.Entity entity : this.outsideEntities) {
             access.addFreshEntityWithPassengers(entity);
         }
     }
 
     public void breakLink() {
-        weakAccess.clear();
+        this.weakAccess.clear();
     }
 
     @Override
     public int getBuffer() {
-        return buffer;
+        return this.buffer;
     }
 
     @Override
     public boolean isInRegion(Location location) {
-        return region.contains(location.getX(), location.getY(), location.getZ());
+        return this.region.contains(location.getX(), location.getY(), location.getZ());
     }
 
     @Override
     public boolean isInRegion(int x, int y, int z) {
-        return region.contains(x, y, z);
+        return this.region.contains(x, y, z);
     }
 
     @Override
     public List<BlockState> getTileEntities() {
         List<BlockState> blockStates = new ArrayList<>();
 
-        for (int x = -(buffer >> 4); x <= (buffer >> 4); x++) {
-            for (int z = -(buffer >> 4); z <= (buffer >> 4); z++) {
-                ProtoChunk chunk = (ProtoChunk) getHandle().getChunk(centerChunkX + x, centerChunkZ + z);
-                for (BlockPosition position : chunk.getBlockEntitiesPos()) {
-                    blockStates.add(getBlockState(position.getX(), position.getY(), position.getZ()));
+        for (int x = -(this.buffer >> 4); x <= (this.buffer >> 4); x++) {
+            for (int z = -(this.buffer >> 4); z <= (this.buffer >> 4); z++) {
+                ProtoChunk chunk = (ProtoChunk) this.getHandle().getChunk(this.centerChunkX + x, this.centerChunkZ + z);
+                for (BlockPos position : chunk.getBlockEntitiesPos()) {
+                    blockStates.add(this.getBlockState(position.getX(), position.getY(), position.getZ()));
                 }
             }
         }
@@ -163,97 +162,97 @@ public class CraftLimitedRegion extends CraftRegionAccessor implements LimitedRe
 
     @Override
     public Biome getBiome(int x, int y, int z) {
-        Preconditions.checkArgument(isInRegion(x, y, z), "Coordinates %s, %s, %s are not in the region", x, y, z);
+        Preconditions.checkArgument(this.isInRegion(x, y, z), "Coordinates %s, %s, %s are not in the region", x, y, z);
         return super.getBiome(x, y, z);
     }
 
     @Override
-    public void setBiome(int x, int y, int z, Holder<BiomeBase> biomeBase) {
-        Preconditions.checkArgument(isInRegion(x, y, z), "Coordinates %s, %s, %s are not in the region", x, y, z);
-        IChunkAccess chunk = getHandle().getChunk(x >> 4, z >> 4, ChunkStatus.EMPTY);
+    public void setBiome(int x, int y, int z, Holder<net.minecraft.world.level.biome.Biome> biomeBase) {
+        Preconditions.checkArgument(this.isInRegion(x, y, z), "Coordinates %s, %s, %s are not in the region", x, y, z);
+        ChunkAccess chunk = this.getHandle().getChunk(x >> 4, z >> 4, ChunkStatus.EMPTY);
         chunk.setBiome(x >> 2, y >> 2, z >> 2, biomeBase);
     }
 
     @Override
     public BlockState getBlockState(int x, int y, int z) {
-        Preconditions.checkArgument(isInRegion(x, y, z), "Coordinates %s, %s, %s are not in the region", x, y, z);
+        Preconditions.checkArgument(this.isInRegion(x, y, z), "Coordinates %s, %s, %s are not in the region", x, y, z);
         return super.getBlockState(x, y, z);
     }
 
     @Override
     public BlockData getBlockData(int x, int y, int z) {
-        Preconditions.checkArgument(isInRegion(x, y, z), "Coordinates %s, %s, %s are not in the region", x, y, z);
+        Preconditions.checkArgument(this.isInRegion(x, y, z), "Coordinates %s, %s, %s are not in the region", x, y, z);
         return super.getBlockData(x, y, z);
     }
 
     @Override
     public Material getType(int x, int y, int z) {
-        Preconditions.checkArgument(isInRegion(x, y, z), "Coordinates %s, %s, %s are not in the region", x, y, z);
+        Preconditions.checkArgument(this.isInRegion(x, y, z), "Coordinates %s, %s, %s are not in the region", x, y, z);
         return super.getType(x, y, z);
     }
 
     @Override
     public void setBlockData(int x, int y, int z, BlockData blockData) {
-        Preconditions.checkArgument(isInRegion(x, y, z), "Coordinates %s, %s, %s are not in the region", x, y, z);
+        Preconditions.checkArgument(this.isInRegion(x, y, z), "Coordinates %s, %s, %s are not in the region", x, y, z);
         super.setBlockData(x, y, z, blockData);
     }
 
     @Override
     public int getHighestBlockYAt(int x, int z) {
-        Preconditions.checkArgument(isInRegion(x, region.getCenter().getBlockY(), z), "Coordinates %s, %s are not in the region", x, z);
+        Preconditions.checkArgument(this.isInRegion(x, this.region.getCenter().getBlockY(), z), "Coordinates %s, %s are not in the region", x, z);
         return super.getHighestBlockYAt(x, z);
     }
 
     @Override
     public int getHighestBlockYAt(Location location) {
-        Preconditions.checkArgument(isInRegion(location), "Coordinates %s, %s, %s are not in the region", location.getBlockX(), location.getBlockY(), location.getBlockZ());
+        Preconditions.checkArgument(this.isInRegion(location), "Coordinates %s, %s, %s are not in the region", location.getBlockX(), location.getBlockY(), location.getBlockZ());
         return super.getHighestBlockYAt(location);
     }
 
     @Override
     public int getHighestBlockYAt(int x, int z, HeightMap heightMap) {
-        Preconditions.checkArgument(isInRegion(x, region.getCenter().getBlockY(), z), "Coordinates %s, %s are not in the region", x, z);
+        Preconditions.checkArgument(this.isInRegion(x, this.region.getCenter().getBlockY(), z), "Coordinates %s, %s are not in the region", x, z);
         return super.getHighestBlockYAt(x, z, heightMap);
     }
 
     @Override
     public int getHighestBlockYAt(Location location, HeightMap heightMap) {
-        Preconditions.checkArgument(isInRegion(location), "Coordinates %s, %s, %s are not in the region", location.getBlockX(), location.getBlockY(), location.getBlockZ());
+        Preconditions.checkArgument(this.isInRegion(location), "Coordinates %s, %s, %s are not in the region", location.getBlockX(), location.getBlockY(), location.getBlockZ());
         return super.getHighestBlockYAt(location, heightMap);
     }
 
     @Override
     public boolean generateTree(Location location, Random random, TreeType treeType) {
-        Preconditions.checkArgument(isInRegion(location), "Coordinates %s, %s, %s are not in the region", location.getBlockX(), location.getBlockY(), location.getBlockZ());
+        Preconditions.checkArgument(this.isInRegion(location), "Coordinates %s, %s, %s are not in the region", location.getBlockX(), location.getBlockY(), location.getBlockZ());
         return super.generateTree(location, random, treeType);
     }
 
     @Override
     public boolean generateTree(Location location, Random random, TreeType treeType, Consumer<? super BlockState> consumer) {
-        Preconditions.checkArgument(isInRegion(location), "Coordinates %s, %s, %s are not in the region", location.getBlockX(), location.getBlockY(), location.getBlockZ());
+        Preconditions.checkArgument(this.isInRegion(location), "Coordinates %s, %s, %s are not in the region", location.getBlockX(), location.getBlockY(), location.getBlockZ());
         return super.generateTree(location, random, treeType, consumer);
     }
 
     @Override
     public Collection<net.minecraft.world.entity.Entity> getNMSEntities() {
         // Only load entities if we need them
-        loadEntities();
-        return new ArrayList<>(entities);
+        this.loadEntities();
+        return new ArrayList<>(this.entities);
     }
 
     @Override
     public <T extends Entity> T spawn(Location location, Class<T> clazz, Consumer<? super T> function, CreatureSpawnEvent.SpawnReason reason) throws IllegalArgumentException {
-        Preconditions.checkArgument(isInRegion(location), "Coordinates %s, %s, %s are not in the region", location.getBlockX(), location.getBlockY(), location.getBlockZ());
+        Preconditions.checkArgument(this.isInRegion(location), "Coordinates %s, %s, %s are not in the region", location.getBlockX(), location.getBlockY(), location.getBlockZ());
         return super.spawn(location, clazz, function, reason);
     }
 
     @Override
     public void addEntityToWorld(net.minecraft.world.entity.Entity entity, CreatureSpawnEvent.SpawnReason reason) {
-        entities.add(entity);
+        this.entities.add(entity);
     }
 
     @Override
     public void addEntityWithPassengers(net.minecraft.world.entity.Entity entity, CreatureSpawnEvent.SpawnReason reason) {
-        entities.add(entity);
+        this.entities.add(entity);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CraftWorldInfo.java b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CraftWorldInfo.java
index 8b7ce81a18..5d655d6cd3 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CraftWorldInfo.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CraftWorldInfo.java
@@ -1,10 +1,10 @@
 package org.bukkit.craftbukkit.generator;
 
 import java.util.UUID;
-import net.minecraft.world.level.dimension.DimensionManager;
-import net.minecraft.world.level.storage.Convertable;
-import net.minecraft.world.level.storage.IWorldDataServer;
-import net.minecraft.world.level.storage.WorldDataServer;
+import net.minecraft.world.level.dimension.DimensionType;
+import net.minecraft.world.level.storage.LevelStorageSource;
+import net.minecraft.world.level.storage.PrimaryLevelData;
+import net.minecraft.world.level.storage.ServerLevelData;
 import org.bukkit.World;
 import org.bukkit.craftbukkit.util.WorldUUID;
 import org.bukkit.generator.WorldInfo;
@@ -18,11 +18,11 @@ public class CraftWorldInfo implements WorldInfo {
     private final int minHeight;
     private final int maxHeight;
 
-    public CraftWorldInfo(IWorldDataServer worldDataServer, Convertable.ConversionSession session, World.Environment environment, DimensionManager dimensionManager) {
+    public CraftWorldInfo(ServerLevelData worldDataServer, LevelStorageSource.LevelStorageAccess session, World.Environment environment, DimensionType dimensionManager) {
         this.name = worldDataServer.getLevelName();
         this.uuid = WorldUUID.getUUID(session.levelDirectory.path().toFile());
         this.environment = environment;
-        this.seed = ((WorldDataServer) worldDataServer).worldGenOptions().seed();
+        this.seed = ((PrimaryLevelData) worldDataServer).worldGenOptions().seed();
         this.minHeight = dimensionManager.minY();
         this.maxHeight = dimensionManager.minY() + dimensionManager.height();
     }
@@ -38,31 +38,31 @@ public class CraftWorldInfo implements WorldInfo {
 
     @Override
     public String getName() {
-        return name;
+        return this.name;
     }
 
     @Override
     public UUID getUID() {
-        return uuid;
+        return this.uuid;
     }
 
     @Override
     public World.Environment getEnvironment() {
-        return environment;
+        return this.environment;
     }
 
     @Override
     public long getSeed() {
-        return seed;
+        return this.seed;
     }
 
     @Override
     public int getMinHeight() {
-        return minHeight;
+        return this.minHeight;
     }
 
     @Override
     public int getMaxHeight() {
-        return maxHeight;
+        return this.maxHeight;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
index ef1f476fe8..39377ba073 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CustomChunkGenerator.java
@@ -5,34 +5,33 @@ import com.mojang.serialization.MapCodec;
 import java.util.List;
 import java.util.Random;
 import java.util.concurrent.CompletableFuture;
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
 import net.minecraft.core.Holder;
-import net.minecraft.core.IRegistryCustom;
+import net.minecraft.core.RegistryAccess;
 import net.minecraft.resources.ResourceKey;
-import net.minecraft.server.level.RegionLimitedWorldAccess;
-import net.minecraft.server.level.WorldServer;
-import net.minecraft.util.MathHelper;
+import net.minecraft.server.level.ServerLevel;
+import net.minecraft.server.level.WorldGenRegion;
+import net.minecraft.util.Mth;
 import net.minecraft.util.random.WeightedRandomList;
-import net.minecraft.world.entity.EnumCreatureType;
-import net.minecraft.world.level.BlockColumn;
-import net.minecraft.world.level.GeneratorAccessSeed;
+import net.minecraft.world.entity.MobCategory;
+import net.minecraft.world.level.Level;
 import net.minecraft.world.level.LevelHeightAccessor;
+import net.minecraft.world.level.NoiseColumn;
 import net.minecraft.world.level.StructureManager;
-import net.minecraft.world.level.World;
-import net.minecraft.world.level.biome.BiomeBase;
+import net.minecraft.world.level.WorldGenLevel;
 import net.minecraft.world.level.biome.BiomeManager;
-import net.minecraft.world.level.biome.BiomeSettingsMobs;
-import net.minecraft.world.level.biome.WorldChunkManager;
-import net.minecraft.world.level.block.ITileEntity;
-import net.minecraft.world.level.block.entity.TileEntity;
-import net.minecraft.world.level.block.state.IBlockData;
+import net.minecraft.world.level.biome.BiomeSource;
+import net.minecraft.world.level.biome.MobSpawnSettings;
+import net.minecraft.world.level.block.EntityBlock;
+import net.minecraft.world.level.block.entity.BlockEntity;
+import net.minecraft.world.level.block.state.BlockState;
+import net.minecraft.world.level.chunk.ChunkAccess;
 import net.minecraft.world.level.chunk.ChunkGeneratorStructureState;
-import net.minecraft.world.level.chunk.ChunkSection;
-import net.minecraft.world.level.chunk.IChunkAccess;
-import net.minecraft.world.level.levelgen.HeightMap;
+import net.minecraft.world.level.chunk.LevelChunkSection;
+import net.minecraft.world.level.levelgen.Heightmap;
 import net.minecraft.world.level.levelgen.LegacyRandomSource;
 import net.minecraft.world.level.levelgen.RandomState;
-import net.minecraft.world.level.levelgen.SeededRandom;
+import net.minecraft.world.level.levelgen.WorldgenRandom;
 import net.minecraft.world.level.levelgen.blending.Blender;
 import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager;
 import org.bukkit.block.Biome;
@@ -47,7 +46,7 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
 
     private final net.minecraft.world.level.chunk.ChunkGenerator delegate;
     private final ChunkGenerator generator;
-    private final WorldServer world;
+    private final ServerLevel world;
     private final Random random = new Random();
     private boolean newApi;
     private boolean implementBaseHeight = true;
@@ -55,37 +54,37 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
     @Deprecated
     private class CustomBiomeGrid implements BiomeGrid {
 
-        private final IChunkAccess biome;
+        private final ChunkAccess biome;
 
-        public CustomBiomeGrid(IChunkAccess biome) {
+        public CustomBiomeGrid(ChunkAccess biome) {
             this.biome = biome;
         }
 
         @Override
         public Biome getBiome(int x, int z) {
-            return getBiome(x, 0, z);
+            return this.getBiome(x, 0, z);
         }
 
         @Override
         public void setBiome(int x, int z, Biome bio) {
-            for (int y = world.getWorld().getMinHeight(); y < world.getWorld().getMaxHeight(); y += 4) {
-                setBiome(x, y, z, bio);
+            for (int y = CustomChunkGenerator.this.world.getWorld().getMinHeight(); y < CustomChunkGenerator.this.world.getWorld().getMaxHeight(); y += 4) {
+                this.setBiome(x, y, z, bio);
             }
         }
 
         @Override
         public Biome getBiome(int x, int y, int z) {
-            return CraftBiome.minecraftHolderToBukkit(biome.getNoiseBiome(x >> 2, y >> 2, z >> 2));
+            return CraftBiome.minecraftHolderToBukkit(this.biome.getNoiseBiome(x >> 2, y >> 2, z >> 2));
         }
 
         @Override
         public void setBiome(int x, int y, int z, Biome bio) {
             Preconditions.checkArgument(bio != Biome.CUSTOM, "Cannot set the biome to %s", bio);
-            biome.setBiome(x >> 2, y >> 2, z >> 2, CraftBiome.bukkitToMinecraftHolder(bio));
+            this.biome.setBiome(x >> 2, y >> 2, z >> 2, CraftBiome.bukkitToMinecraftHolder(bio));
         }
     }
 
-    public CustomChunkGenerator(WorldServer world, net.minecraft.world.level.chunk.ChunkGenerator delegate, ChunkGenerator generator) {
+    public CustomChunkGenerator(ServerLevel world, net.minecraft.world.level.chunk.ChunkGenerator delegate, ChunkGenerator generator) {
         super(delegate.getBiomeSource(), delegate.generationSettingsGetter);
 
         this.world = world;
@@ -94,69 +93,69 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
     }
 
     public net.minecraft.world.level.chunk.ChunkGenerator getDelegate() {
-        return delegate;
+        return this.delegate;
     }
 
-    private static SeededRandom getSeededRandom() {
-        return new SeededRandom(new LegacyRandomSource(0));
+    private static WorldgenRandom getSeededRandom() {
+        return new WorldgenRandom(new LegacyRandomSource(0));
     }
 
     @Override
-    public WorldChunkManager getBiomeSource() {
-        return delegate.getBiomeSource();
+    public BiomeSource getBiomeSource() {
+        return this.delegate.getBiomeSource();
     }
 
     @Override
     public int getMinY() {
-        return delegate.getMinY();
+        return this.delegate.getMinY();
     }
 
     @Override
     public int getSeaLevel() {
-        return delegate.getSeaLevel();
+        return this.delegate.getSeaLevel();
     }
 
     @Override
-    public void createStructures(IRegistryCustom iregistrycustom, ChunkGeneratorStructureState chunkgeneratorstructurestate, StructureManager structuremanager, IChunkAccess ichunkaccess, StructureTemplateManager structuretemplatemanager, ResourceKey<World> resourcekey) {
-        SeededRandom random = getSeededRandom();
-        int x = ichunkaccess.getPos().x;
-        int z = ichunkaccess.getPos().z;
+    public void createStructures(RegistryAccess registryManager, ChunkGeneratorStructureState placementCalculator, StructureManager structureAccessor, ChunkAccess chunk, StructureTemplateManager structureTemplateManager, ResourceKey<Level> dimension) {
+        WorldgenRandom random = CustomChunkGenerator.getSeededRandom();
+        int x = chunk.getPos().x;
+        int z = chunk.getPos().z;
 
-        random.setSeed(MathHelper.getSeed(x, "should-structures".hashCode(), z) ^ world.getSeed());
-        if (generator.shouldGenerateStructures(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z)) {
-            super.createStructures(iregistrycustom, chunkgeneratorstructurestate, structuremanager, ichunkaccess, structuretemplatemanager, resourcekey);
+        random.setSeed(Mth.getSeed(x, "should-structures".hashCode(), z) ^ this.world.getSeed());
+        if (this.generator.shouldGenerateStructures(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z)) {
+            super.createStructures(registryManager, placementCalculator, structureAccessor, chunk, structureTemplateManager, dimension);
         }
     }
 
     @Override
-    public void buildSurface(RegionLimitedWorldAccess regionlimitedworldaccess, StructureManager structuremanager, RandomState randomstate, IChunkAccess ichunkaccess) {
-        SeededRandom random = getSeededRandom();
-        int x = ichunkaccess.getPos().x;
-        int z = ichunkaccess.getPos().z;
+    public void buildSurface(WorldGenRegion region, StructureManager structures, RandomState noiseConfig, ChunkAccess chunk) {
+        WorldgenRandom random = CustomChunkGenerator.getSeededRandom();
+        int x = chunk.getPos().x;
+        int z = chunk.getPos().z;
 
-        random.setSeed(MathHelper.getSeed(x, "should-surface".hashCode(), z) ^ regionlimitedworldaccess.getSeed());
-        if (generator.shouldGenerateSurface(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z)) {
-            delegate.buildSurface(regionlimitedworldaccess, structuremanager, randomstate, ichunkaccess);
+        random.setSeed(Mth.getSeed(x, "should-surface".hashCode(), z) ^ region.getSeed());
+        if (this.generator.shouldGenerateSurface(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z)) {
+            this.delegate.buildSurface(region, structures, noiseConfig, chunk);
         }
 
-        CraftChunkData chunkData = new CraftChunkData(this.world.getWorld(), ichunkaccess);
+        CraftChunkData chunkData = new CraftChunkData(this.world.getWorld(), chunk);
 
         random.setSeed((long) x * 341873128712L + (long) z * 132897987541L);
-        generator.generateSurface(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z, chunkData);
+        this.generator.generateSurface(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z, chunkData);
 
-        if (generator.shouldGenerateBedrock()) {
-            random = getSeededRandom();
+        if (this.generator.shouldGenerateBedrock()) {
+            random = CustomChunkGenerator.getSeededRandom();
             random.setSeed((long) x * 341873128712L + (long) z * 132897987541L);
             // delegate.buildBedrock(ichunkaccess, random);
         }
 
-        random = getSeededRandom();
+        random = CustomChunkGenerator.getSeededRandom();
         random.setSeed((long) x * 341873128712L + (long) z * 132897987541L);
-        generator.generateBedrock(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z, chunkData);
+        this.generator.generateBedrock(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z, chunkData);
         chunkData.breakLink();
 
         // return if new api is used
-        if (newApi) {
+        if (this.newApi) {
             return;
         }
 
@@ -165,27 +164,27 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
         this.random.setSeed((long) x * 341873128712L + (long) z * 132897987541L);
 
         // Get default biome data for chunk
-        CustomBiomeGrid biomegrid = new CustomBiomeGrid(ichunkaccess);
+        CustomBiomeGrid biomegrid = new CustomBiomeGrid(chunk);
 
         ChunkData data;
         try {
-            if (generator.isParallelCapable()) {
-                data = generator.generateChunkData(this.world.getWorld(), this.random, x, z, biomegrid);
+            if (this.generator.isParallelCapable()) {
+                data = this.generator.generateChunkData(this.world.getWorld(), this.random, x, z, biomegrid);
             } else {
                 synchronized (this) {
-                    data = generator.generateChunkData(this.world.getWorld(), this.random, x, z, biomegrid);
+                    data = this.generator.generateChunkData(this.world.getWorld(), this.random, x, z, biomegrid);
                 }
             }
         } catch (UnsupportedOperationException exception) {
-            newApi = true;
+            this.newApi = true;
             return;
         }
 
         Preconditions.checkArgument(data instanceof OldCraftChunkData, "Plugins must use createChunkData(World) rather than implementing ChunkData: %s", data);
         OldCraftChunkData craftData = (OldCraftChunkData) data;
-        ChunkSection[] sections = craftData.getRawChunkData();
+        LevelChunkSection[] sections = craftData.getRawChunkData();
 
-        ChunkSection[] csect = ichunkaccess.getSections();
+        LevelChunkSection[] csect = chunk.getSections();
         int scnt = Math.min(csect.length, sections.length);
 
         // Loop through returned sections
@@ -193,11 +192,11 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
             if (sections[sec] == null) {
                 continue;
             }
-            ChunkSection section = sections[sec];
+            LevelChunkSection section = sections[sec];
 
             // SPIGOT-6843: Copy biomes over to new section.
             // Not the most performant way, but has a small footprint and developer should move to the new api anyway
-            ChunkSection oldSection = csect[sec];
+            LevelChunkSection oldSection = csect[sec];
             for (int biomeX = 0; biomeX < 4; biomeX++) {
                 for (int biomeY = 0; biomeY < 4; biomeY++) {
                     for (int biomeZ = 0; biomeZ < 4; biomeZ++) {
@@ -210,127 +209,127 @@ public class CustomChunkGenerator extends InternalChunkGenerator {
         }
 
         if (craftData.getTiles() != null) {
-            for (BlockPosition pos : craftData.getTiles()) {
+            for (BlockPos pos : craftData.getTiles()) {
                 int tx = pos.getX();
                 int ty = pos.getY();
                 int tz = pos.getZ();
-                IBlockData block = craftData.getTypeId(tx, ty, tz);
+                BlockState block = craftData.getTypeId(tx, ty, tz);
 
                 if (block.hasBlockEntity()) {
-                    TileEntity tile = ((ITileEntity) block.getBlock()).newBlockEntity(new BlockPosition((x << 4) + tx, ty, (z << 4) + tz), block);
-                    ichunkaccess.setBlockEntity(tile);
+                    BlockEntity tile = ((EntityBlock) block.getBlock()).newBlockEntity(new BlockPos((x << 4) + tx, ty, (z << 4) + tz), block);
+                    chunk.setBlockEntity(tile);
                 }
             }
         }
     }
 
     @Override
-    public void applyCarvers(RegionLimitedWorldAccess regionlimitedworldaccess, long seed, RandomState randomstate, BiomeManager biomemanager, StructureManager structuremanager, IChunkAccess ichunkaccess) {
-        SeededRandom random = getSeededRandom();
-        int x = ichunkaccess.getPos().x;
-        int z = ichunkaccess.getPos().z;
+    public void applyCarvers(WorldGenRegion chunkRegion, long seed, RandomState noiseConfig, BiomeManager biomeAccess, StructureManager structureAccessor, ChunkAccess chunk) {
+        WorldgenRandom random = CustomChunkGenerator.getSeededRandom();
+        int x = chunk.getPos().x;
+        int z = chunk.getPos().z;
 
-        random.setSeed(MathHelper.getSeed(x, "should-caves".hashCode(), z) ^ regionlimitedworldaccess.getSeed());
-        if (generator.shouldGenerateCaves(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z)) {
-            delegate.applyCarvers(regionlimitedworldaccess, seed, randomstate, biomemanager, structuremanager, ichunkaccess);
+        random.setSeed(Mth.getSeed(x, "should-caves".hashCode(), z) ^ chunkRegion.getSeed());
+        if (this.generator.shouldGenerateCaves(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z)) {
+            this.delegate.applyCarvers(chunkRegion, seed, noiseConfig, biomeAccess, structureAccessor, chunk);
         }
 
         // Minecraft removed the LIQUID_CARVERS stage from world generation, without removing the LIQUID Carving enum.
         // Meaning this method is only called once for each chunk, so no check is required.
-        CraftChunkData chunkData = new CraftChunkData(this.world.getWorld(), ichunkaccess);
+        CraftChunkData chunkData = new CraftChunkData(this.world.getWorld(), chunk);
         random.setDecorationSeed(seed, 0, 0);
 
-        generator.generateCaves(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z, chunkData);
+        this.generator.generateCaves(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z, chunkData);
         chunkData.breakLink();
     }
 
     @Override
-    public CompletableFuture<IChunkAccess> fillFromNoise(Blender blender, RandomState randomstate, StructureManager structuremanager, IChunkAccess ichunkaccess) {
-        CompletableFuture<IChunkAccess> future = null;
-        SeededRandom random = getSeededRandom();
-        int x = ichunkaccess.getPos().x;
-        int z = ichunkaccess.getPos().z;
+    public CompletableFuture<ChunkAccess> fillFromNoise(Blender blender, RandomState noiseConfig, StructureManager structureAccessor, ChunkAccess chunk) {
+        CompletableFuture<ChunkAccess> future = null;
+        WorldgenRandom random = CustomChunkGenerator.getSeededRandom();
+        int x = chunk.getPos().x;
+        int z = chunk.getPos().z;
 
-        random.setSeed(MathHelper.getSeed(x, "should-noise".hashCode(), z) ^ this.world.getSeed());
-        if (generator.shouldGenerateNoise(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z)) {
-            future = delegate.fillFromNoise(blender, randomstate, structuremanager, ichunkaccess);
+        random.setSeed(Mth.getSeed(x, "should-noise".hashCode(), z) ^ this.world.getSeed());
+        if (this.generator.shouldGenerateNoise(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z)) {
+            future = this.delegate.fillFromNoise(blender, noiseConfig, structureAccessor, chunk);
         }
 
-        java.util.function.Function<IChunkAccess, IChunkAccess> function = (ichunkaccess1) -> {
+        java.util.function.Function<ChunkAccess, ChunkAccess> function = (ichunkaccess1) -> {
             CraftChunkData chunkData = new CraftChunkData(this.world.getWorld(), ichunkaccess1);
             random.setSeed((long) x * 341873128712L + (long) z * 132897987541L);
 
-            generator.generateNoise(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z, chunkData);
+            this.generator.generateNoise(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z, chunkData);
             chunkData.breakLink();
             return ichunkaccess1;
         };
 
-        return future == null ? CompletableFuture.supplyAsync(() -> function.apply(ichunkaccess), net.minecraft.SystemUtils.backgroundExecutor()) : future.thenApply(function);
+        return future == null ? CompletableFuture.supplyAsync(() -> function.apply(chunk), net.minecraft.Util.backgroundExecutor()) : future.thenApply(function);
     }
 
     @Override
-    public int getBaseHeight(int i, int j, HeightMap.Type heightmap_type, LevelHeightAccessor levelheightaccessor, RandomState randomstate) {
-        if (implementBaseHeight) {
+    public int getBaseHeight(int x, int z, Heightmap.Types heightmap, LevelHeightAccessor world, RandomState noiseConfig) {
+        if (this.implementBaseHeight) {
             try {
-                SeededRandom random = getSeededRandom();
-                int xChunk = i >> 4;
-                int zChunk = j >> 4;
+                WorldgenRandom random = CustomChunkGenerator.getSeededRandom();
+                int xChunk = x >> 4;
+                int zChunk = z >> 4;
                 random.setSeed((long) xChunk * 341873128712L + (long) zChunk * 132897987541L);
 
-                return generator.getBaseHeight(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), i, j, CraftHeightMap.fromNMS(heightmap_type));
+                return this.generator.getBaseHeight(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z, CraftHeightMap.fromNMS(heightmap));
             } catch (UnsupportedOperationException exception) {
-                implementBaseHeight = false;
+                this.implementBaseHeight = false;
             }
         }
 
-        return delegate.getBaseHeight(i, j, heightmap_type, levelheightaccessor, randomstate);
+        return this.delegate.getBaseHeight(x, z, heightmap, world, noiseConfig);
     }
 
     @Override
-    public WeightedRandomList<BiomeSettingsMobs.c> getMobsAt(Holder<BiomeBase> holder, StructureManager structuremanager, EnumCreatureType enumcreaturetype, BlockPosition blockposition) {
-        return delegate.getMobsAt(holder, structuremanager, enumcreaturetype, blockposition);
+    public WeightedRandomList<MobSpawnSettings.SpawnerData> getMobsAt(Holder<net.minecraft.world.level.biome.Biome> biome, StructureManager accessor, MobCategory group, BlockPos pos) {
+        return this.delegate.getMobsAt(biome, accessor, group, pos);
     }
 
     @Override
-    public void applyBiomeDecoration(GeneratorAccessSeed generatoraccessseed, IChunkAccess ichunkaccess, StructureManager structuremanager) {
-        SeededRandom random = getSeededRandom();
-        int x = ichunkaccess.getPos().x;
-        int z = ichunkaccess.getPos().z;
+    public void applyBiomeDecoration(WorldGenLevel world, ChunkAccess chunk, StructureManager structureAccessor) {
+        WorldgenRandom random = CustomChunkGenerator.getSeededRandom();
+        int x = chunk.getPos().x;
+        int z = chunk.getPos().z;
 
-        random.setSeed(MathHelper.getSeed(x, "should-decoration".hashCode(), z) ^ generatoraccessseed.getSeed());
-        super.applyBiomeDecoration(generatoraccessseed, ichunkaccess, structuremanager, generator.shouldGenerateDecorations(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z));
+        random.setSeed(Mth.getSeed(x, "should-decoration".hashCode(), z) ^ world.getSeed());
+        super.applyBiomeDecoration(world, chunk, structureAccessor, this.generator.shouldGenerateDecorations(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z));
     }
 
     @Override
-    public void addDebugScreenInfo(List<String> list, RandomState randomstate, BlockPosition blockposition) {
-        delegate.addDebugScreenInfo(list, randomstate, blockposition);
+    public void addDebugScreenInfo(List<String> text, RandomState noiseConfig, BlockPos pos) {
+        this.delegate.addDebugScreenInfo(text, noiseConfig, pos);
     }
 
     @Override
-    public void spawnOriginalMobs(RegionLimitedWorldAccess regionlimitedworldaccess) {
-        SeededRandom random = getSeededRandom();
-        int x = regionlimitedworldaccess.getCenter().x;
-        int z = regionlimitedworldaccess.getCenter().z;
+    public void spawnOriginalMobs(WorldGenRegion region) {
+        WorldgenRandom random = CustomChunkGenerator.getSeededRandom();
+        int x = region.getCenter().x;
+        int z = region.getCenter().z;
 
-        random.setSeed(MathHelper.getSeed(x, "should-mobs".hashCode(), z) ^ regionlimitedworldaccess.getSeed());
-        if (generator.shouldGenerateMobs(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z)) {
-            delegate.spawnOriginalMobs(regionlimitedworldaccess);
+        random.setSeed(Mth.getSeed(x, "should-mobs".hashCode(), z) ^ region.getSeed());
+        if (this.generator.shouldGenerateMobs(this.world.getWorld(), new RandomSourceWrapper.RandomWrapper(random), x, z)) {
+            this.delegate.spawnOriginalMobs(region);
         }
     }
 
     @Override
-    public int getSpawnHeight(LevelHeightAccessor levelheightaccessor) {
-        return delegate.getSpawnHeight(levelheightaccessor);
+    public int getSpawnHeight(LevelHeightAccessor world) {
+        return this.delegate.getSpawnHeight(world);
     }
 
     @Override
     public int getGenDepth() {
-        return delegate.getGenDepth();
+        return this.delegate.getGenDepth();
     }
 
     @Override
-    public BlockColumn getBaseColumn(int i, int j, LevelHeightAccessor levelheightaccessor, RandomState randomstate) {
-        return delegate.getBaseColumn(i, j, levelheightaccessor, randomstate);
+    public NoiseColumn getBaseColumn(int x, int z, LevelHeightAccessor world, RandomState noiseConfig) {
+        return this.delegate.getBaseColumn(x, z, world, noiseConfig);
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CustomWorldChunkManager.java b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CustomWorldChunkManager.java
index c63e645ed6..0063c4c17d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CustomWorldChunkManager.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/CustomWorldChunkManager.java
@@ -6,23 +6,22 @@ import java.util.ArrayList;
 import java.util.List;
 import java.util.stream.Stream;
 import net.minecraft.core.Holder;
-import net.minecraft.core.IRegistry;
-import net.minecraft.world.level.biome.BiomeBase;
+import net.minecraft.core.Registry;
+import net.minecraft.world.level.biome.BiomeSource;
 import net.minecraft.world.level.biome.Climate;
-import net.minecraft.world.level.biome.WorldChunkManager;
 import org.bukkit.block.Biome;
 import org.bukkit.craftbukkit.block.CraftBiome;
 import org.bukkit.generator.BiomeProvider;
 import org.bukkit.generator.WorldInfo;
 
-public class CustomWorldChunkManager extends WorldChunkManager {
+public class CustomWorldChunkManager extends BiomeSource {
 
     private final WorldInfo worldInfo;
     private final BiomeProvider biomeProvider;
-    private final IRegistry<BiomeBase> registry;
+    private final Registry<net.minecraft.world.level.biome.Biome> registry;
 
-    private static List<Holder<BiomeBase>> biomeListToBiomeBaseList(List<Biome> biomes, IRegistry<BiomeBase> registry) {
-        List<Holder<BiomeBase>> biomeBases = new ArrayList<>();
+    private static List<Holder<net.minecraft.world.level.biome.Biome>> biomeListToBiomeBaseList(List<Biome> biomes, Registry<net.minecraft.world.level.biome.Biome> registry) {
+        List<Holder<net.minecraft.world.level.biome.Biome>> biomeBases = new ArrayList<>();
 
         for (Biome biome : biomes) {
             Preconditions.checkArgument(biome != Biome.CUSTOM, "Cannot use the biome %s", biome);
@@ -32,27 +31,27 @@ public class CustomWorldChunkManager extends WorldChunkManager {
         return biomeBases;
     }
 
-    public CustomWorldChunkManager(WorldInfo worldInfo, BiomeProvider biomeProvider, IRegistry<BiomeBase> registry) {
+    public CustomWorldChunkManager(WorldInfo worldInfo, BiomeProvider biomeProvider, Registry<net.minecraft.world.level.biome.Biome> registry) {
         this.worldInfo = worldInfo;
         this.biomeProvider = biomeProvider;
         this.registry = registry;
     }
 
     @Override
-    protected MapCodec<? extends WorldChunkManager> codec() {
+    protected MapCodec<? extends BiomeSource> codec() {
         throw new UnsupportedOperationException("Cannot serialize CustomWorldChunkManager");
     }
 
     @Override
-    public Holder<BiomeBase> getNoiseBiome(int x, int y, int z, Climate.Sampler sampler) {
-        Biome biome = biomeProvider.getBiome(worldInfo, x << 2, y << 2, z << 2, CraftBiomeParameterPoint.createBiomeParameterPoint(sampler, sampler.sample(x, y, z)));
+    public Holder<net.minecraft.world.level.biome.Biome> getNoiseBiome(int x, int y, int z, Climate.Sampler noise) {
+        Biome biome = this.biomeProvider.getBiome(this.worldInfo, x << 2, y << 2, z << 2, CraftBiomeParameterPoint.createBiomeParameterPoint(noise, noise.sample(x, y, z)));
         Preconditions.checkArgument(biome != Biome.CUSTOM, "Cannot set the biome to %s", biome);
 
         return CraftBiome.bukkitToMinecraftHolder(biome);
     }
 
     @Override
-    protected Stream<Holder<BiomeBase>> collectPossibleBiomes() {
-        return biomeListToBiomeBaseList(biomeProvider.getBiomes(worldInfo), registry).stream();
+    protected Stream<Holder<net.minecraft.world.level.biome.Biome>> collectPossibleBiomes() {
+        return CustomWorldChunkManager.biomeListToBiomeBaseList(this.biomeProvider.getBiomes(this.worldInfo), this.registry).stream();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/InternalChunkGenerator.java b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/InternalChunkGenerator.java
index 05160224bb..7b4bad15d6 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/InternalChunkGenerator.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/InternalChunkGenerator.java
@@ -2,14 +2,14 @@ package org.bukkit.craftbukkit.generator;
 
 import java.util.function.Function;
 import net.minecraft.core.Holder;
-import net.minecraft.world.level.biome.BiomeBase;
-import net.minecraft.world.level.biome.BiomeSettingsGeneration;
-import net.minecraft.world.level.biome.WorldChunkManager;
+import net.minecraft.world.level.biome.Biome;
+import net.minecraft.world.level.biome.BiomeGenerationSettings;
+import net.minecraft.world.level.biome.BiomeSource;
 
 // Do not implement functions to this class, add to NormalChunkGenerator
 public abstract class InternalChunkGenerator extends net.minecraft.world.level.chunk.ChunkGenerator {
 
-    public InternalChunkGenerator(WorldChunkManager worldchunkmanager, Function<Holder<BiomeBase>, BiomeSettingsGeneration> function) {
-        super(worldchunkmanager, function);
+    public InternalChunkGenerator(BiomeSource biomeSource, Function<Holder<Biome>, BiomeGenerationSettings> generationSettingsGetter) {
+        super(biomeSource, generationSettingsGetter);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/OldCraftChunkData.java b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/OldCraftChunkData.java
index 0e731719c1..e7f7a246e9 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/OldCraftChunkData.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/OldCraftChunkData.java
@@ -2,12 +2,11 @@ package org.bukkit.craftbukkit.generator;
 
 import java.util.HashSet;
 import java.util.Set;
-import net.minecraft.core.BlockPosition;
-import net.minecraft.core.IRegistry;
-import net.minecraft.world.level.biome.BiomeBase;
+import net.minecraft.core.BlockPos;
+import net.minecraft.core.Registry;
 import net.minecraft.world.level.block.Blocks;
-import net.minecraft.world.level.block.state.IBlockData;
-import net.minecraft.world.level.chunk.ChunkSection;
+import net.minecraft.world.level.block.state.BlockState;
+import net.minecraft.world.level.chunk.LevelChunkSection;
 import org.bukkit.Material;
 import org.bukkit.block.Biome;
 import org.bukkit.block.data.BlockData;
@@ -24,26 +23,26 @@ import org.bukkit.material.MaterialData;
 public final class OldCraftChunkData implements ChunkGenerator.ChunkData {
     private final int minHeight;
     private final int maxHeight;
-    private final ChunkSection[] sections;
-    private final IRegistry<BiomeBase> biomes;
-    private Set<BlockPosition> tiles;
-    private final Set<BlockPosition> lights = new HashSet<>();
+    private final LevelChunkSection[] sections;
+    private final Registry<net.minecraft.world.level.biome.Biome> biomes;
+    private Set<BlockPos> tiles;
+    private final Set<BlockPos> lights = new HashSet<>();
 
-    public OldCraftChunkData(int minHeight, int maxHeight, IRegistry<BiomeBase> biomes) {
+    public OldCraftChunkData(int minHeight, int maxHeight, Registry<net.minecraft.world.level.biome.Biome> biomes) {
         this.minHeight = minHeight;
         this.maxHeight = maxHeight;
         this.biomes = biomes;
-        this.sections = new ChunkSection[(((maxHeight - 1) >> 4) + 1) - (minHeight >> 4)];
+        this.sections = new LevelChunkSection[(((maxHeight - 1) >> 4) + 1) - (minHeight >> 4)];
     }
 
     @Override
     public int getMinHeight() {
-        return minHeight;
+        return this.minHeight;
     }
 
     @Override
     public int getMaxHeight() {
-        return maxHeight;
+        return this.maxHeight;
     }
 
     @Override
@@ -53,59 +52,59 @@ public final class OldCraftChunkData implements ChunkGenerator.ChunkData {
 
     @Override
     public void setBlock(int x, int y, int z, Material material) {
-        setBlock(x, y, z, material.createBlockData());
+        this.setBlock(x, y, z, material.createBlockData());
     }
 
     @Override
     public void setBlock(int x, int y, int z, MaterialData material) {
-        setBlock(x, y, z, CraftMagicNumbers.getBlock(material));
+        this.setBlock(x, y, z, CraftMagicNumbers.getBlock(material));
     }
 
     @Override
     public void setBlock(int x, int y, int z, BlockData blockData) {
-        setBlock(x, y, z, ((CraftBlockData) blockData).getState());
+        this.setBlock(x, y, z, ((CraftBlockData) blockData).getState());
     }
 
     @Override
     public void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, Material material) {
-        setRegion(xMin, yMin, zMin, xMax, yMax, zMax, material.createBlockData());
+        this.setRegion(xMin, yMin, zMin, xMax, yMax, zMax, material.createBlockData());
     }
 
     @Override
     public void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, MaterialData material) {
-        setRegion(xMin, yMin, zMin, xMax, yMax, zMax, CraftMagicNumbers.getBlock(material));
+        this.setRegion(xMin, yMin, zMin, xMax, yMax, zMax, CraftMagicNumbers.getBlock(material));
     }
 
     @Override
     public void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, BlockData blockData) {
-        setRegion(xMin, yMin, zMin, xMax, yMax, zMax, ((CraftBlockData) blockData).getState());
+        this.setRegion(xMin, yMin, zMin, xMax, yMax, zMax, ((CraftBlockData) blockData).getState());
     }
 
     @Override
     public Material getType(int x, int y, int z) {
-        return CraftBlockType.minecraftToBukkit(getTypeId(x, y, z).getBlock());
+        return CraftBlockType.minecraftToBukkit(this.getTypeId(x, y, z).getBlock());
     }
 
     @Override
     public MaterialData getTypeAndData(int x, int y, int z) {
-        return CraftMagicNumbers.getMaterial(getTypeId(x, y, z));
+        return CraftMagicNumbers.getMaterial(this.getTypeId(x, y, z));
     }
 
     @Override
     public BlockData getBlockData(int x, int y, int z) {
-        return CraftBlockData.fromData(getTypeId(x, y, z));
+        return CraftBlockData.fromData(this.getTypeId(x, y, z));
     }
 
-    public void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, IBlockData type) {
+    public void setRegion(int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, BlockState type) {
         // Clamp to sane values.
-        if (xMin > 0xf || yMin >= maxHeight || zMin > 0xf) {
+        if (xMin > 0xf || yMin >= this.maxHeight || zMin > 0xf) {
             return;
         }
         if (xMin < 0) {
             xMin = 0;
         }
-        if (yMin < minHeight) {
-            yMin = minHeight;
+        if (yMin < this.minHeight) {
+            yMin = this.minHeight;
         }
         if (zMin < 0) {
             zMin = 0;
@@ -113,8 +112,8 @@ public final class OldCraftChunkData implements ChunkGenerator.ChunkData {
         if (xMax > 0x10) {
             xMax = 0x10;
         }
-        if (yMax > maxHeight) {
-            yMax = maxHeight;
+        if (yMax > this.maxHeight) {
+            yMax = this.maxHeight;
         }
         if (zMax > 0x10) {
             zMax = 0x10;
@@ -123,7 +122,7 @@ public final class OldCraftChunkData implements ChunkGenerator.ChunkData {
             return;
         }
         for (int y = yMin; y < yMax; y++) {
-            ChunkSection section = getChunkSection(y, true);
+            LevelChunkSection section = this.getChunkSection(y, true);
             int offsetBase = y & 0xf;
             for (int x = xMin; x < xMax; x++) {
                 for (int z = zMin; z < zMax; z++) {
@@ -133,11 +132,11 @@ public final class OldCraftChunkData implements ChunkGenerator.ChunkData {
         }
     }
 
-    public IBlockData getTypeId(int x, int y, int z) {
-        if (x != (x & 0xf) || y < minHeight || y >= maxHeight || z != (z & 0xf)) {
+    public BlockState getTypeId(int x, int y, int z) {
+        if (x != (x & 0xf) || y < this.minHeight || y >= this.maxHeight || z != (z & 0xf)) {
             return Blocks.AIR.defaultBlockState();
         }
-        ChunkSection section = getChunkSection(y, false);
+        LevelChunkSection section = this.getChunkSection(y, false);
         if (section == null) {
             return Blocks.AIR.defaultBlockState();
         } else {
@@ -147,50 +146,50 @@ public final class OldCraftChunkData implements ChunkGenerator.ChunkData {
 
     @Override
     public byte getData(int x, int y, int z) {
-        return CraftMagicNumbers.toLegacyData(getTypeId(x, y, z));
+        return CraftMagicNumbers.toLegacyData(this.getTypeId(x, y, z));
     }
 
-    private void setBlock(int x, int y, int z, IBlockData type) {
-        if (x != (x & 0xf) || y < minHeight || y >= maxHeight || z != (z & 0xf)) {
+    private void setBlock(int x, int y, int z, BlockState type) {
+        if (x != (x & 0xf) || y < this.minHeight || y >= this.maxHeight || z != (z & 0xf)) {
             return;
         }
-        ChunkSection section = getChunkSection(y, true);
+        LevelChunkSection section = this.getChunkSection(y, true);
         section.setBlockState(x, y & 0xf, z, type);
 
         // SPIGOT-1753: Capture light blocks, for light updates
         if (type.getLightEmission() > 0) {
-            lights.add(new BlockPosition(x, y, z));
+            this.lights.add(new BlockPos(x, y, z));
         } else {
-            lights.remove(new BlockPosition(x, y, z));
+            this.lights.remove(new BlockPos(x, y, z));
         }
 
         if (type.hasBlockEntity()) {
-            if (tiles == null) {
-                tiles = new HashSet<>();
+            if (this.tiles == null) {
+                this.tiles = new HashSet<>();
             }
 
-            tiles.add(new BlockPosition(x, y, z));
+            this.tiles.add(new BlockPos(x, y, z));
         }
     }
 
-    private ChunkSection getChunkSection(int y, boolean create) {
-        int offset = (y - minHeight) >> 4;
-        ChunkSection section = sections[offset];
+    private LevelChunkSection getChunkSection(int y, boolean create) {
+        int offset = (y - this.minHeight) >> 4;
+        LevelChunkSection section = this.sections[offset];
         if (create && section == null) {
-            sections[offset] = section = new ChunkSection(biomes);
+            this.sections[offset] = section = new LevelChunkSection(this.biomes);
         }
         return section;
     }
 
-    ChunkSection[] getRawChunkData() {
-        return sections;
+    LevelChunkSection[] getRawChunkData() {
+        return this.sections;
     }
 
-    Set<BlockPosition> getTiles() {
-        return tiles;
+    Set<BlockPos> getTiles() {
+        return this.tiles;
     }
 
-    Set<BlockPosition> getLights() {
-        return lights;
+    Set<BlockPos> getLights() {
+        return this.lights;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/structure/CraftGeneratedStructure.java b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/structure/CraftGeneratedStructure.java
index 99aee229a9..f6e36583a3 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/structure/CraftGeneratedStructure.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/structure/CraftGeneratedStructure.java
@@ -3,7 +3,6 @@ package org.bukkit.craftbukkit.generator.structure;
 import com.google.common.collect.ImmutableList;
 import java.util.Collection;
 import java.util.List;
-import net.minecraft.world.level.levelgen.structure.StructureBoundingBox;
 import net.minecraft.world.level.levelgen.structure.StructureStart;
 import org.bukkit.generator.structure.GeneratedStructure;
 import org.bukkit.generator.structure.Structure;
@@ -22,24 +21,24 @@ public class CraftGeneratedStructure implements GeneratedStructure {
 
     @Override
     public BoundingBox getBoundingBox() {
-        StructureBoundingBox bb = handle.getBoundingBox();
+        net.minecraft.world.level.levelgen.structure.BoundingBox bb = this.handle.getBoundingBox();
         return new BoundingBox(bb.minX(), bb.minY(), bb.minZ(), bb.maxX(), bb.maxY(), bb.maxZ());
     }
 
     @Override
     public Structure getStructure() {
-        return CraftStructure.minecraftToBukkit(handle.getStructure());
+        return CraftStructure.minecraftToBukkit(this.handle.getStructure());
     }
 
     @Override
     public Collection<StructurePiece> getPieces() {
-        if (pieces == null) { // Cache the pieces on first request
+        if (this.pieces == null) { // Cache the pieces on first request
             ImmutableList.Builder<StructurePiece> builder = new ImmutableList.Builder<>();
-            for (net.minecraft.world.level.levelgen.structure.StructurePiece piece : handle.getPieces()) {
+            for (net.minecraft.world.level.levelgen.structure.StructurePiece piece : this.handle.getPieces()) {
                 builder.add(new CraftStructurePiece(piece));
             }
 
-            pieces = builder.build();
+            this.pieces = builder.build();
         }
 
         return this.pieces;
@@ -47,6 +46,6 @@ public class CraftGeneratedStructure implements GeneratedStructure {
 
     @Override
     public PersistentDataContainer getPersistentDataContainer() {
-        return handle.persistentDataContainer;
+        return this.handle.persistentDataContainer;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/structure/CraftStructure.java b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/structure/CraftStructure.java
index 342ba3cbb4..09fd006244 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/structure/CraftStructure.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/structure/CraftStructure.java
@@ -32,16 +32,16 @@ public class CraftStructure extends Structure implements Handleable<net.minecraf
 
     @Override
     public net.minecraft.world.level.levelgen.structure.Structure getHandle() {
-        return structure;
+        return this.structure;
     }
 
     @Override
     public StructureType getStructureType() {
-        return structureType.get();
+        return this.structureType.get();
     }
 
     @Override
     public NamespacedKey getKey() {
-        return key;
+        return this.key;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/structure/CraftStructurePiece.java b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/structure/CraftStructurePiece.java
index 91cc6dc657..c15876ea25 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/structure/CraftStructurePiece.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/structure/CraftStructurePiece.java
@@ -1,6 +1,5 @@
 package org.bukkit.craftbukkit.generator.structure;
 
-import net.minecraft.world.level.levelgen.structure.StructureBoundingBox;
 import org.bukkit.generator.structure.StructurePiece;
 import org.bukkit.util.BoundingBox;
 
@@ -14,7 +13,7 @@ public class CraftStructurePiece implements StructurePiece {
 
     @Override
     public BoundingBox getBoundingBox() {
-        StructureBoundingBox bb = handle.getBoundingBox();
+        net.minecraft.world.level.levelgen.structure.BoundingBox bb = this.handle.getBoundingBox();
         return new BoundingBox(bb.minX(), bb.minY(), bb.minZ(), bb.maxX(), bb.maxY(), bb.maxZ());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/structure/CraftStructureType.java b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/structure/CraftStructureType.java
index af720ad955..7199847c7d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/generator/structure/CraftStructureType.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/generator/structure/CraftStructureType.java
@@ -27,11 +27,11 @@ public class CraftStructureType extends StructureType implements Handleable<net.
 
     @Override
     public net.minecraft.world.level.levelgen.structure.StructureType<?> getHandle() {
-        return structureType;
+        return this.structureType;
     }
 
     @Override
     public NamespacedKey getKey() {
-        return key;
+        return this.key;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/help/CommandAliasHelpTopic.java b/paper-server/src/main/java/org/bukkit/craftbukkit/help/CommandAliasHelpTopic.java
index da88fa68d1..7776cc0c35 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/help/CommandAliasHelpTopic.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/help/CommandAliasHelpTopic.java
@@ -22,8 +22,8 @@ public class CommandAliasHelpTopic extends HelpTopic {
     @Override
     public String getFullText(CommandSender forWho) {
         Preconditions.checkArgument(forWho != null, "CommandServer forWho cannot be null");
-        StringBuilder sb = new StringBuilder(shortText);
-        HelpTopic aliasForTopic = helpMap.getHelpTopic(aliasFor);
+        StringBuilder sb = new StringBuilder(this.shortText);
+        HelpTopic aliasForTopic = this.helpMap.getHelpTopic(this.aliasFor);
         if (aliasForTopic != null) {
             sb.append("\n");
             sb.append(aliasForTopic.getFullText(forWho));
@@ -34,15 +34,15 @@ public class CommandAliasHelpTopic extends HelpTopic {
     @Override
     public boolean canSee(CommandSender commandSender) {
         Preconditions.checkArgument(commandSender != null, "CommandServer cannot be null");
-        if (amendedPermission == null) {
-            HelpTopic aliasForTopic = helpMap.getHelpTopic(aliasFor);
+        if (this.amendedPermission == null) {
+            HelpTopic aliasForTopic = this.helpMap.getHelpTopic(this.aliasFor);
             if (aliasForTopic != null) {
                 return aliasForTopic.canSee(commandSender);
             } else {
                 return false;
             }
         } else {
-            return commandSender.hasPermission(amendedPermission);
+            return commandSender.hasPermission(this.amendedPermission);
         }
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/help/CustomHelpTopic.java b/paper-server/src/main/java/org/bukkit/craftbukkit/help/CustomHelpTopic.java
index 78b91bb2bb..a67018fc08 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/help/CustomHelpTopic.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/help/CustomHelpTopic.java
@@ -23,8 +23,8 @@ public class CustomHelpTopic extends HelpTopic {
             return true;
         }
 
-        if (!permissionNode.equals("")) {
-            return sender.hasPermission(permissionNode);
+        if (!this.permissionNode.equals("")) {
+            return sender.hasPermission(this.permissionNode);
         } else {
             return true;
         }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/help/CustomIndexHelpTopic.java b/paper-server/src/main/java/org/bukkit/craftbukkit/help/CustomIndexHelpTopic.java
index 77134d74bd..0e4ce9e9c1 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/help/CustomIndexHelpTopic.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/help/CustomIndexHelpTopic.java
@@ -22,16 +22,16 @@ public class CustomIndexHelpTopic extends IndexHelpTopic {
 
     @Override
     public String getFullText(CommandSender sender) {
-        if (futureTopics != null) {
+        if (this.futureTopics != null) {
             List<HelpTopic> topics = new LinkedList<HelpTopic>();
-            for (String futureTopic : futureTopics) {
-                HelpTopic topic = helpMap.getHelpTopic(futureTopic);
+            for (String futureTopic : this.futureTopics) {
+                HelpTopic topic = this.helpMap.getHelpTopic(futureTopic);
                 if (topic != null) {
                     topics.add(topic);
                 }
             }
-            setTopicsCollection(topics);
-            futureTopics = null;
+            this.setTopicsCollection(topics);
+            this.futureTopics = null;
         }
 
         return super.getFullText(sender);
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/help/HelpTopicAmendment.java b/paper-server/src/main/java/org/bukkit/craftbukkit/help/HelpTopicAmendment.java
index 4f0e00ec7e..b9cc1bb44b 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/help/HelpTopicAmendment.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/help/HelpTopicAmendment.java
@@ -21,7 +21,7 @@ public class HelpTopicAmendment {
      * @return the full text
      */
     public String getFullText() {
-        return fullText;
+        return this.fullText;
     }
 
     /**
@@ -29,7 +29,7 @@ public class HelpTopicAmendment {
      * @return the short text
      */
     public String getShortText() {
-        return shortText;
+        return this.shortText;
     }
 
     /**
@@ -37,7 +37,7 @@ public class HelpTopicAmendment {
      * @return the topic name
      */
     public String getTopicName() {
-        return topicName;
+        return this.topicName;
     }
 
     /**
@@ -45,6 +45,6 @@ public class HelpTopicAmendment {
      * @return the permission
      */
     public String getPermission() {
-        return permission;
+        return this.permission;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/help/HelpYamlReader.java b/paper-server/src/main/java/org/bukkit/craftbukkit/help/HelpYamlReader.java
index d3f17d4cde..5923d3c177 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/help/HelpYamlReader.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/help/HelpYamlReader.java
@@ -26,23 +26,23 @@ public class HelpYamlReader {
         this.server = server;
 
         File helpYamlFile = new File("help.yml");
-        YamlConfiguration defaultConfig = YamlConfiguration.loadConfiguration(new InputStreamReader(getClass().getClassLoader().getResourceAsStream("configurations/help.yml"), Charsets.UTF_8));
+        YamlConfiguration defaultConfig = YamlConfiguration.loadConfiguration(new InputStreamReader(this.getClass().getClassLoader().getResourceAsStream("configurations/help.yml"), Charsets.UTF_8));
 
         try {
-            helpYaml = YamlConfiguration.loadConfiguration(helpYamlFile);
-            helpYaml.options().copyDefaults(true);
-            helpYaml.setDefaults(defaultConfig);
+            this.helpYaml = YamlConfiguration.loadConfiguration(helpYamlFile);
+            this.helpYaml.options().copyDefaults(true);
+            this.helpYaml.setDefaults(defaultConfig);
 
             try {
                 if (!helpYamlFile.exists()) {
-                    helpYaml.save(helpYamlFile);
+                    this.helpYaml.save(helpYamlFile);
                 }
             } catch (IOException ex) {
                 server.getLogger().log(Level.SEVERE, "Could not save " + helpYamlFile, ex);
             }
         } catch (Exception ex) {
             server.getLogger().severe("Failed to load help.yml. Verify the yaml indentation is correct. Reverting to default help.yml.");
-            helpYaml = defaultConfig;
+            this.helpYaml = defaultConfig;
         }
     }
 
@@ -53,12 +53,12 @@ public class HelpYamlReader {
      */
     public List<HelpTopic> getGeneralTopics() {
         List<HelpTopic> topics = new LinkedList<HelpTopic>();
-        ConfigurationSection generalTopics = helpYaml.getConfigurationSection("general-topics");
+        ConfigurationSection generalTopics = this.helpYaml.getConfigurationSection("general-topics");
         if (generalTopics != null) {
             for (String topicName : generalTopics.getKeys(false)) {
                 ConfigurationSection section = generalTopics.getConfigurationSection(topicName);
-                String shortText = ChatColor.translateAlternateColorCodes(ALT_COLOR_CODE, section.getString("shortText", ""));
-                String fullText = ChatColor.translateAlternateColorCodes(ALT_COLOR_CODE, section.getString("fullText", ""));
+                String shortText = ChatColor.translateAlternateColorCodes(this.ALT_COLOR_CODE, section.getString("shortText", ""));
+                String fullText = ChatColor.translateAlternateColorCodes(this.ALT_COLOR_CODE, section.getString("fullText", ""));
                 String permission = section.getString("permission", "");
                 topics.add(new CustomHelpTopic(topicName, shortText, fullText, permission));
             }
@@ -73,15 +73,15 @@ public class HelpYamlReader {
      */
     public List<HelpTopic> getIndexTopics() {
         List<HelpTopic> topics = new LinkedList<HelpTopic>();
-        ConfigurationSection indexTopics = helpYaml.getConfigurationSection("index-topics");
+        ConfigurationSection indexTopics = this.helpYaml.getConfigurationSection("index-topics");
         if (indexTopics != null) {
             for (String topicName : indexTopics.getKeys(false)) {
                 ConfigurationSection section = indexTopics.getConfigurationSection(topicName);
-                String shortText = ChatColor.translateAlternateColorCodes(ALT_COLOR_CODE, section.getString("shortText", ""));
-                String preamble = ChatColor.translateAlternateColorCodes(ALT_COLOR_CODE, section.getString("preamble", ""));
-                String permission = ChatColor.translateAlternateColorCodes(ALT_COLOR_CODE, section.getString("permission", ""));
+                String shortText = ChatColor.translateAlternateColorCodes(this.ALT_COLOR_CODE, section.getString("shortText", ""));
+                String preamble = ChatColor.translateAlternateColorCodes(this.ALT_COLOR_CODE, section.getString("preamble", ""));
+                String permission = ChatColor.translateAlternateColorCodes(this.ALT_COLOR_CODE, section.getString("permission", ""));
                 List<String> commands = section.getStringList("commands");
-                topics.add(new CustomIndexHelpTopic(server.getHelpMap(), topicName, shortText, permission, commands, preamble));
+                topics.add(new CustomIndexHelpTopic(this.server.getHelpMap(), topicName, shortText, permission, commands, preamble));
             }
         }
         return topics;
@@ -94,12 +94,12 @@ public class HelpYamlReader {
      */
     public List<HelpTopicAmendment> getTopicAmendments() {
         List<HelpTopicAmendment> amendments = new LinkedList<HelpTopicAmendment>();
-        ConfigurationSection commandTopics = helpYaml.getConfigurationSection("amended-topics");
+        ConfigurationSection commandTopics = this.helpYaml.getConfigurationSection("amended-topics");
         if (commandTopics != null) {
             for (String topicName : commandTopics.getKeys(false)) {
                 ConfigurationSection section = commandTopics.getConfigurationSection(topicName);
-                String description = ChatColor.translateAlternateColorCodes(ALT_COLOR_CODE, section.getString("shortText", ""));
-                String usage = ChatColor.translateAlternateColorCodes(ALT_COLOR_CODE, section.getString("fullText", ""));
+                String description = ChatColor.translateAlternateColorCodes(this.ALT_COLOR_CODE, section.getString("shortText", ""));
+                String usage = ChatColor.translateAlternateColorCodes(this.ALT_COLOR_CODE, section.getString("fullText", ""));
                 String permission = section.getString("permission", "");
                 amendments.add(new HelpTopicAmendment(topicName, description, usage, permission));
             }
@@ -108,10 +108,10 @@ public class HelpYamlReader {
     }
 
     public List<String> getIgnoredPlugins() {
-        return helpYaml.getStringList("ignore-plugins");
+        return this.helpYaml.getStringList("ignore-plugins");
     }
 
     public boolean commandTopicsInMasterIndex() {
-        return helpYaml.getBoolean("command-topics-in-master-index", true);
+        return this.helpYaml.getBoolean("command-topics-in-master-index", true);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/help/MultipleCommandAliasHelpTopic.java b/paper-server/src/main/java/org/bukkit/craftbukkit/help/MultipleCommandAliasHelpTopic.java
index 6133235c17..95d791a975 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/help/MultipleCommandAliasHelpTopic.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/help/MultipleCommandAliasHelpTopic.java
@@ -17,7 +17,7 @@ public class MultipleCommandAliasHelpTopic extends HelpTopic {
     public MultipleCommandAliasHelpTopic(MultipleCommandAlias alias) {
         this.alias = alias;
 
-        name = "/" + alias.getLabel();
+        this.name = "/" + alias.getLabel();
 
         // Build short text
         StringBuilder sb = new StringBuilder();
@@ -28,20 +28,20 @@ public class MultipleCommandAliasHelpTopic extends HelpTopic {
             sb.append("/");
             sb.append(alias.getCommands()[i].getLabel());
         }
-        shortText = sb.toString();
+        this.shortText = sb.toString();
 
         // Build full text
-        fullText = ChatColor.GOLD + "Alias for: " + ChatColor.WHITE + getShortText();
+        this.fullText = ChatColor.GOLD + "Alias for: " + ChatColor.WHITE + this.getShortText();
     }
 
     @Override
     public boolean canSee(CommandSender sender) {
-        if (amendedPermission == null) {
+        if (this.amendedPermission == null) {
             if (sender instanceof ConsoleCommandSender) {
                 return true;
             }
 
-            for (Command command : alias.getCommands()) {
+            for (Command command : this.alias.getCommands()) {
                 if (!command.testPermissionSilent(sender)) {
                     return false;
                 }
@@ -49,7 +49,7 @@ public class MultipleCommandAliasHelpTopic extends HelpTopic {
 
             return true;
         } else {
-            return sender.hasPermission(amendedPermission);
+            return sender.hasPermission(this.amendedPermission);
         }
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/help/SimpleHelpMap.java b/paper-server/src/main/java/org/bukkit/craftbukkit/help/SimpleHelpMap.java
index 23bd9f09d5..05d3aecd4a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/help/SimpleHelpMap.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/help/SimpleHelpMap.java
@@ -46,23 +46,23 @@ public class SimpleHelpMap implements HelpMap {
         this.yaml = new HelpYamlReader(server);
 
         Predicate indexFilter = Predicates.not(Predicates.instanceOf(CommandAliasHelpTopic.class));
-        if (!yaml.commandTopicsInMasterIndex()) {
+        if (!this.yaml.commandTopicsInMasterIndex()) {
             indexFilter = Predicates.and(indexFilter, Predicates.not(new IsCommandTopicPredicate()));
         }
 
-        this.defaultTopic = new IndexHelpTopic("Index", null, null, Collections2.filter(helpTopics.values(), indexFilter), "Use /help [n] to get page n of help.");
+        this.defaultTopic = new IndexHelpTopic("Index", null, null, Collections2.filter(this.helpTopics.values(), indexFilter), "Use /help [n] to get page n of help.");
 
-        registerHelpTopicFactory(MultipleCommandAlias.class, new MultipleCommandAliasHelpTopicFactory());
+        this.registerHelpTopicFactory(MultipleCommandAlias.class, new MultipleCommandAliasHelpTopicFactory());
     }
 
     @Override
     public synchronized HelpTopic getHelpTopic(String topicName) {
         if (topicName.equals("")) {
-            return defaultTopic;
+            return this.defaultTopic;
         }
 
-        if (helpTopics.containsKey(topicName)) {
-            return helpTopics.get(topicName);
+        if (this.helpTopics.containsKey(topicName)) {
+            return this.helpTopics.get(topicName);
         }
 
         return null;
@@ -70,44 +70,44 @@ public class SimpleHelpMap implements HelpMap {
 
     @Override
     public Collection<HelpTopic> getHelpTopics() {
-        return helpTopics.values();
+        return this.helpTopics.values();
     }
 
     @Override
     public synchronized void addTopic(HelpTopic topic) {
         // Existing topics take priority
-        if (!helpTopics.containsKey(topic.getName())) {
-            helpTopics.put(topic.getName(), topic);
+        if (!this.helpTopics.containsKey(topic.getName())) {
+            this.helpTopics.put(topic.getName(), topic);
         }
     }
 
     @Override
     public synchronized void clear() {
-        helpTopics.clear();
+        this.helpTopics.clear();
     }
 
     @Override
     public List<String> getIgnoredPlugins() {
-        return yaml.getIgnoredPlugins();
+        return this.yaml.getIgnoredPlugins();
     }
 
     /**
      * Reads the general topics from help.yml and adds them to the help index.
      */
     public synchronized void initializeGeneralTopics() {
-        yaml = new HelpYamlReader(server);
+        this.yaml = new HelpYamlReader(this.server);
 
         // Initialize general help topics from the help.yml file
-        for (HelpTopic topic : yaml.getGeneralTopics()) {
-            addTopic(topic);
+        for (HelpTopic topic : this.yaml.getGeneralTopics()) {
+            this.addTopic(topic);
         }
 
         // Initialize index help topics from the help.yml file
-        for (HelpTopic topic : yaml.getIndexTopics()) {
+        for (HelpTopic topic : this.yaml.getIndexTopics()) {
             if (topic.getName().equals("Default")) {
-                defaultTopic = topic;
+                this.defaultTopic = topic;
             } else {
-                addTopic(topic);
+                this.addTopic(topic);
             }
         }
     }
@@ -117,7 +117,7 @@ public class SimpleHelpMap implements HelpMap {
      */
     public synchronized void initializeCommands() {
         // ** Load topics from highest to lowest priority order **
-        Set<String> ignoredPlugins = new HashSet<String>(yaml.getIgnoredPlugins());
+        Set<String> ignoredPlugins = new HashSet<String>(this.yaml.getIgnoredPlugins());
 
         // Don't load any automatic help topics if All is ignored
         if (ignoredPlugins.contains("All")) {
@@ -125,60 +125,60 @@ public class SimpleHelpMap implements HelpMap {
         }
 
         // Initialize help topics from the server's command map
-        outer: for (Command command : server.getCommandMap().getCommands()) {
-            if (commandInIgnoredPlugin(command, ignoredPlugins)) {
+        outer: for (Command command : this.server.getCommandMap().getCommands()) {
+            if (this.commandInIgnoredPlugin(command, ignoredPlugins)) {
                 continue;
             }
 
             // Register a topic
-            for (Class c : topicFactoryMap.keySet()) {
+            for (Class c : this.topicFactoryMap.keySet()) {
                 if (c.isAssignableFrom(command.getClass())) {
-                    HelpTopic t = topicFactoryMap.get(c).createTopic(command);
-                    if (t != null) addTopic(t);
+                    HelpTopic t = this.topicFactoryMap.get(c).createTopic(command);
+                    if (t != null) this.addTopic(t);
                     continue outer;
                 }
                 if (command instanceof PluginCommand && c.isAssignableFrom(((PluginCommand) command).getExecutor().getClass())) {
-                    HelpTopic t = topicFactoryMap.get(c).createTopic(command);
-                    if (t != null) addTopic(t);
+                    HelpTopic t = this.topicFactoryMap.get(c).createTopic(command);
+                    if (t != null) this.addTopic(t);
                     continue outer;
                 }
             }
-            addTopic(new GenericCommandHelpTopic(command));
+            this.addTopic(new GenericCommandHelpTopic(command));
         }
 
         // Initialize command alias help topics
-        for (Command command : server.getCommandMap().getCommands()) {
-            if (commandInIgnoredPlugin(command, ignoredPlugins)) {
+        for (Command command : this.server.getCommandMap().getCommands()) {
+            if (this.commandInIgnoredPlugin(command, ignoredPlugins)) {
                 continue;
             }
             for (String alias : command.getAliases()) {
                 // Only register if this command owns the alias
-                if (server.getCommandMap().getCommand(alias) == command) {
-                    addTopic(new CommandAliasHelpTopic("/" + alias, "/" + command.getLabel(), this));
+                if (this.server.getCommandMap().getCommand(alias) == command) {
+                    this.addTopic(new CommandAliasHelpTopic("/" + alias, "/" + command.getLabel(), this));
                 }
             }
         }
 
         // Add alias sub-index
-        Collection<HelpTopic> filteredTopics = Collections2.filter(helpTopics.values(), Predicates.instanceOf(CommandAliasHelpTopic.class));
+        Collection<HelpTopic> filteredTopics = Collections2.filter(this.helpTopics.values(), Predicates.instanceOf(CommandAliasHelpTopic.class));
         if (!filteredTopics.isEmpty()) {
-            addTopic(new IndexHelpTopic("Aliases", "Lists command aliases", null, filteredTopics));
+            this.addTopic(new IndexHelpTopic("Aliases", "Lists command aliases", null, filteredTopics));
         }
 
         // Initialize plugin-level sub-topics
         Map<String, Set<HelpTopic>> pluginIndexes = new HashMap<String, Set<HelpTopic>>();
-        fillPluginIndexes(pluginIndexes, server.getCommandMap().getCommands());
+        this.fillPluginIndexes(pluginIndexes, this.server.getCommandMap().getCommands());
 
         for (Map.Entry<String, Set<HelpTopic>> entry : pluginIndexes.entrySet()) {
-            addTopic(new IndexHelpTopic(entry.getKey(), "All commands for " + entry.getKey(), null, entry.getValue(), "Below is a list of all " + entry.getKey() + " commands:"));
+            this.addTopic(new IndexHelpTopic(entry.getKey(), "All commands for " + entry.getKey(), null, entry.getValue(), "Below is a list of all " + entry.getKey() + " commands:"));
         }
 
         // Amend help topics from the help.yml file
-        for (HelpTopicAmendment amendment : yaml.getTopicAmendments()) {
-            if (helpTopics.containsKey(amendment.getTopicName())) {
-                helpTopics.get(amendment.getTopicName()).amendTopic(amendment.getShortText(), amendment.getFullText());
+        for (HelpTopicAmendment amendment : this.yaml.getTopicAmendments()) {
+            if (this.helpTopics.containsKey(amendment.getTopicName())) {
+                this.helpTopics.get(amendment.getTopicName()).amendTopic(amendment.getShortText(), amendment.getFullText());
                 if (amendment.getPermission() != null) {
-                    helpTopics.get(amendment.getTopicName()).amendCanSee(amendment.getPermission());
+                    this.helpTopics.get(amendment.getTopicName()).amendCanSee(amendment.getPermission());
                 }
             }
         }
@@ -186,9 +186,9 @@ public class SimpleHelpMap implements HelpMap {
 
     private void fillPluginIndexes(Map<String, Set<HelpTopic>> pluginIndexes, Collection<? extends Command> commands) {
         for (Command command : commands) {
-            String pluginName = getCommandPluginName(command);
+            String pluginName = this.getCommandPluginName(command);
             if (pluginName != null) {
-                HelpTopic topic = getHelpTopic("/" + command.getLabel());
+                HelpTopic topic = this.getHelpTopic("/" + command.getLabel());
                 if (topic != null) {
                     if (!pluginIndexes.containsKey(pluginName)) {
                         pluginIndexes.put(pluginName, new TreeSet<HelpTopic>(HelpTopicComparator.helpTopicComparatorInstance())); //keep things in topic order
@@ -225,7 +225,7 @@ public class SimpleHelpMap implements HelpMap {
     @Override
     public void registerHelpTopicFactory(Class commandClass, HelpTopicFactory factory) {
         Preconditions.checkArgument(Command.class.isAssignableFrom(commandClass) || CommandExecutor.class.isAssignableFrom(commandClass), "commandClass (%s) must implement either Command or CommandExecutor", commandClass.getName());
-        topicFactoryMap.put(commandClass, factory);
+        this.topicFactoryMap.put(commandClass, factory);
     }
 
     private class IsCommandTopicPredicate implements Predicate<HelpTopic> {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftAbstractInventoryView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftAbstractInventoryView.java
index bc49532e57..1b93774c35 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftAbstractInventoryView.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftAbstractInventoryView.java
@@ -1,8 +1,8 @@
 package org.bukkit.craftbukkit.inventory;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.InventoryUtils;
-import net.minecraft.world.entity.player.EntityHuman;
+import net.minecraft.world.Containers;
+import net.minecraft.world.entity.player.Player;
 import org.bukkit.craftbukkit.entity.CraftHumanEntity;
 import org.bukkit.event.inventory.InventoryType;
 import org.bukkit.inventory.Inventory;
@@ -15,31 +15,31 @@ public abstract class CraftAbstractInventoryView implements InventoryView {
 
     @Override
     public void setItem(final int slot, @Nullable final ItemStack item) {
-        Inventory inventory = getInventory(slot);
+        Inventory inventory = this.getInventory(slot);
         if (inventory != null) {
-            inventory.setItem(convertSlot(slot), item);
+            inventory.setItem(this.convertSlot(slot), item);
         } else if (item != null) {
-            EntityHuman handle = ((CraftHumanEntity) getPlayer()).getHandle();
-            InventoryUtils.dropItemStack(handle.level(), handle.getX(), handle.getY(), handle.getZ(), CraftItemStack.asNMSCopy(item));
+            Player handle = ((CraftHumanEntity) this.getPlayer()).getHandle();
+            Containers.dropItemStack(handle.level(), handle.getX(), handle.getY(), handle.getZ(), CraftItemStack.asNMSCopy(item));
         }
     }
 
     @Nullable
     @Override
     public ItemStack getItem(final int slot) {
-        Inventory inventory = getInventory(slot);
-        return (inventory == null) ? null : inventory.getItem(convertSlot(slot));
+        Inventory inventory = this.getInventory(slot);
+        return (inventory == null) ? null : inventory.getItem(this.convertSlot(slot));
     }
 
     @Override
     public void setCursor(@Nullable final ItemStack item) {
-        getPlayer().setItemOnCursor(item);
+        this.getPlayer().setItemOnCursor(item);
     }
 
     @Nullable
     @Override
     public ItemStack getCursor() {
-        return getPlayer().getItemOnCursor();
+        return this.getPlayer().getItemOnCursor();
     }
 
     @Nullable
@@ -51,18 +51,18 @@ public abstract class CraftAbstractInventoryView implements InventoryView {
             return null;
         }
         Preconditions.checkArgument(rawSlot >= 0, "Negative, non outside slot %s", rawSlot);
-        Preconditions.checkArgument(rawSlot < countSlots(), "Slot %s greater than inventory slot count", rawSlot);
+        Preconditions.checkArgument(rawSlot < this.countSlots(), "Slot %s greater than inventory slot count", rawSlot);
 
-        if (rawSlot < getTopInventory().getSize()) {
-            return getTopInventory();
+        if (rawSlot < this.getTopInventory().getSize()) {
+            return this.getTopInventory();
         } else {
-            return getBottomInventory();
+            return this.getBottomInventory();
         }
     }
 
     @Override
     public int convertSlot(final int rawSlot) {
-        int numInTop = getTopInventory().getSize();
+        int numInTop = this.getTopInventory().getSize();
         // Index from the top inventory as having slots from [0,size]
         if (rawSlot < numInTop) {
             return rawSlot;
@@ -73,7 +73,7 @@ public abstract class CraftAbstractInventoryView implements InventoryView {
 
         // Player crafting slots are indexed differently. The matrix is caught by the first return.
         // Creative mode is the same, except that you can't see the crafting slots (but the IDs are still used)
-        if (getType() == InventoryType.CRAFTING || getType() == InventoryType.CREATIVE) {
+        if (this.getType() == InventoryType.CRAFTING || this.getType() == InventoryType.CREATIVE) {
             /*
              * Raw Slots:
              *
@@ -210,16 +210,16 @@ public abstract class CraftAbstractInventoryView implements InventoryView {
 
     @Override
     public void close() {
-        getPlayer().closeInventory();
+        this.getPlayer().closeInventory();
     }
 
     @Override
     public int countSlots() {
-        return getTopInventory().getSize() + getBottomInventory().getSize();
+        return this.getTopInventory().getSize() + this.getBottomInventory().getSize();
     }
 
     @Override
     public boolean setProperty(@NotNull final Property prop, final int value) {
-        return getPlayer().setWindowProperty(prop, value);
+        return this.getPlayer().setWindowProperty(prop, value);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftBlastingRecipe.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftBlastingRecipe.java
index ce66f373c1..24edf4f02e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftBlastingRecipe.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftBlastingRecipe.java
@@ -26,6 +26,6 @@ public class CraftBlastingRecipe extends BlastingRecipe implements CraftRecipe {
     public void addToCraftingManager() {
         ItemStack result = this.getResult();
 
-        MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftRecipe.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.RecipeBlasting(this.getGroup(), CraftRecipe.getCategory(this.getCategory()), toNMS(this.getInputChoice(), true), CraftItemStack.asNMSCopy(result), getExperience(), getCookingTime())));
+        MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftRecipe.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.BlastingRecipe(this.getGroup(), CraftRecipe.getCategory(this.getCategory()), this.toNMS(this.getInputChoice(), true), CraftItemStack.asNMSCopy(result), this.getExperience(), this.getCookingTime())));
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftBlockInventoryHolder.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftBlockInventoryHolder.java
index 8add96c015..7ae484b0fa 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftBlockInventoryHolder.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftBlockInventoryHolder.java
@@ -1,8 +1,8 @@
 package org.bukkit.craftbukkit.inventory;
 
-import net.minecraft.core.BlockPosition;
-import net.minecraft.world.IInventory;
-import net.minecraft.world.level.GeneratorAccess;
+import net.minecraft.core.BlockPos;
+import net.minecraft.world.Container;
+import net.minecraft.world.level.LevelAccessor;
 import org.bukkit.block.Block;
 import org.bukkit.craftbukkit.block.CraftBlock;
 import org.bukkit.inventory.BlockInventoryHolder;
@@ -13,18 +13,18 @@ public class CraftBlockInventoryHolder implements BlockInventoryHolder {
     private final Block block;
     private final Inventory inventory;
 
-    public CraftBlockInventoryHolder(GeneratorAccess world, BlockPosition pos, IInventory inv) {
+    public CraftBlockInventoryHolder(LevelAccessor world, BlockPos pos, Container inv) {
         this.block = CraftBlock.at(world, pos);
         this.inventory = new CraftInventory(inv);
     }
 
     @Override
     public Block getBlock() {
-        return block;
+        return this.block;
     }
 
     @Override
     public Inventory getInventory() {
-        return inventory;
+        return this.inventory;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftCampfireRecipe.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftCampfireRecipe.java
index ebb9f58023..c675facb0c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftCampfireRecipe.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftCampfireRecipe.java
@@ -26,6 +26,6 @@ public class CraftCampfireRecipe extends CampfireRecipe implements CraftRecipe {
     public void addToCraftingManager() {
         ItemStack result = this.getResult();
 
-        MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftRecipe.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.RecipeCampfire(this.getGroup(), CraftRecipe.getCategory(this.getCategory()), toNMS(this.getInputChoice(), true), CraftItemStack.asNMSCopy(result), getExperience(), getCookingTime())));
+        MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftRecipe.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.CampfireCookingRecipe(this.getGroup(), CraftRecipe.getCategory(this.getCategory()), this.toNMS(this.getInputChoice(), true), CraftItemStack.asNMSCopy(result), this.getExperience(), this.getCookingTime())));
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftComplexRecipe.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftComplexRecipe.java
index 453adee9a1..13e879ecd5 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftComplexRecipe.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftComplexRecipe.java
@@ -1,7 +1,7 @@
 package org.bukkit.craftbukkit.inventory;
 
 import net.minecraft.server.MinecraftServer;
-import net.minecraft.world.item.crafting.IRecipeComplex;
+import net.minecraft.world.item.crafting.CustomRecipe;
 import net.minecraft.world.item.crafting.RecipeHolder;
 import org.bukkit.NamespacedKey;
 import org.bukkit.inventory.ComplexRecipe;
@@ -10,15 +10,15 @@ import org.bukkit.inventory.ItemStack;
 
 public class CraftComplexRecipe extends CraftingRecipe implements CraftRecipe, ComplexRecipe {
 
-    private final IRecipeComplex recipe;
+    private final CustomRecipe recipe;
 
-    public CraftComplexRecipe(NamespacedKey key, ItemStack result, IRecipeComplex recipe) {
+    public CraftComplexRecipe(NamespacedKey key, ItemStack result, CustomRecipe recipe) {
         super(key, result);
         this.recipe = recipe;
     }
 
     @Override
     public void addToCraftingManager() {
-        MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftRecipe.toMinecraft(this.getKey()), recipe));
+        MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftRecipe.toMinecraft(this.getKey()), this.recipe));
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
index 576ed605b3..45a8d918d9 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftContainer.java
@@ -1,30 +1,28 @@
 package org.bukkit.craftbukkit.inventory;
 
-import net.minecraft.world.IInventory;
-import net.minecraft.world.entity.player.EntityHuman;
-import net.minecraft.world.entity.player.PlayerInventory;
-import net.minecraft.world.inventory.Container;
-import net.minecraft.world.inventory.ContainerAnvil;
-import net.minecraft.world.inventory.ContainerBeacon;
-import net.minecraft.world.inventory.ContainerBlastFurnace;
-import net.minecraft.world.inventory.ContainerBrewingStand;
-import net.minecraft.world.inventory.ContainerCartography;
-import net.minecraft.world.inventory.ContainerChest;
-import net.minecraft.world.inventory.ContainerDispenser;
-import net.minecraft.world.inventory.ContainerEnchantTable;
-import net.minecraft.world.inventory.ContainerFurnaceFurnace;
-import net.minecraft.world.inventory.ContainerGrindstone;
-import net.minecraft.world.inventory.ContainerHopper;
-import net.minecraft.world.inventory.ContainerLectern;
-import net.minecraft.world.inventory.ContainerLoom;
-import net.minecraft.world.inventory.ContainerMerchant;
-import net.minecraft.world.inventory.ContainerProperties;
-import net.minecraft.world.inventory.ContainerShulkerBox;
-import net.minecraft.world.inventory.ContainerSmoker;
-import net.minecraft.world.inventory.ContainerWorkbench;
-import net.minecraft.world.inventory.Containers;
+import net.minecraft.world.Container;
+import net.minecraft.world.entity.player.Player;
+import net.minecraft.world.inventory.AbstractContainerMenu;
+import net.minecraft.world.inventory.AnvilMenu;
+import net.minecraft.world.inventory.BeaconMenu;
+import net.minecraft.world.inventory.BlastFurnaceMenu;
+import net.minecraft.world.inventory.BrewingStandMenu;
+import net.minecraft.world.inventory.CartographyTableMenu;
+import net.minecraft.world.inventory.ChestMenu;
 import net.minecraft.world.inventory.CrafterMenu;
+import net.minecraft.world.inventory.CraftingMenu;
+import net.minecraft.world.inventory.DispenserMenu;
+import net.minecraft.world.inventory.EnchantmentMenu;
+import net.minecraft.world.inventory.FurnaceMenu;
+import net.minecraft.world.inventory.GrindstoneMenu;
+import net.minecraft.world.inventory.HopperMenu;
+import net.minecraft.world.inventory.LecternMenu;
+import net.minecraft.world.inventory.LoomMenu;
+import net.minecraft.world.inventory.MerchantMenu;
+import net.minecraft.world.inventory.ShulkerBoxMenu;
+import net.minecraft.world.inventory.SimpleContainerData;
 import net.minecraft.world.inventory.Slot;
+import net.minecraft.world.inventory.SmokerMenu;
 import net.minecraft.world.item.ItemStack;
 import org.bukkit.entity.HumanEntity;
 import org.bukkit.event.inventory.InventoryType;
@@ -32,27 +30,27 @@ import org.bukkit.inventory.Inventory;
 import org.bukkit.inventory.InventoryView;
 import org.bukkit.inventory.MenuType;
 
-public class CraftContainer extends Container {
+public class CraftContainer extends AbstractContainerMenu {
 
     private final InventoryView view;
     private InventoryType cachedType;
-    private Container delegate;
+    private AbstractContainerMenu delegate;
 
-    public CraftContainer(InventoryView view, EntityHuman player, int id) {
-        super(getNotchInventoryType(view.getTopInventory()), id);
+    public CraftContainer(InventoryView view, Player player, int id) {
+        super(CraftContainer.getNotchInventoryType(view.getTopInventory()), id);
         this.view = view;
         // TODO: Do we need to check that it really is a CraftInventory?
-        IInventory top = ((CraftInventory) view.getTopInventory()).getInventory();
-        PlayerInventory bottom = (PlayerInventory) ((CraftInventory) view.getBottomInventory()).getInventory();
-        cachedType = view.getType();
-        setupSlots(top, bottom, player);
+        Container top = ((CraftInventory) view.getTopInventory()).getInventory();
+        net.minecraft.world.entity.player.Inventory bottom = (net.minecraft.world.entity.player.Inventory) ((CraftInventory) view.getBottomInventory()).getInventory();
+        this.cachedType = view.getType();
+        this.setupSlots(top, bottom, player);
     }
 
-    public CraftContainer(final Inventory inventory, final EntityHuman player, int id) {
+    public CraftContainer(final Inventory inventory, final Player player, int id) {
         this(new CraftAbstractInventoryView() {
 
             private final String originalTitle = (inventory instanceof CraftInventoryCustom) ? ((CraftInventoryCustom.MinecraftInventory) ((CraftInventory) inventory).getInventory()).getTitle() : inventory.getType().getDefaultTitle();
-            private String title = originalTitle;
+            private String title = this.originalTitle;
 
             @Override
             public Inventory getTopInventory() {
@@ -61,7 +59,7 @@ public class CraftContainer extends Container {
 
             @Override
             public Inventory getBottomInventory() {
-                return getPlayer().getInventory();
+                return this.getPlayer().getInventory();
             }
 
             @Override
@@ -76,12 +74,12 @@ public class CraftContainer extends Container {
 
             @Override
             public String getTitle() {
-                return title;
+                return this.title;
             }
 
             @Override
             public String getOriginalTitle() {
-                return originalTitle;
+                return this.originalTitle;
             }
 
             @Override
@@ -95,10 +93,10 @@ public class CraftContainer extends Container {
 
     @Override
     public InventoryView getBukkitView() {
-        return view;
+        return this.view;
     }
 
-    public static Containers getNotchInventoryType(Inventory inventory) {
+    public static net.minecraft.world.inventory.MenuType getNotchInventoryType(Inventory inventory) {
         final InventoryType type = inventory.getType();
         switch (type) {
             case PLAYER:
@@ -107,122 +105,122 @@ public class CraftContainer extends Container {
             case BARREL:
                 switch (inventory.getSize()) {
                     case 9:
-                        return Containers.GENERIC_9x1;
+                        return net.minecraft.world.inventory.MenuType.GENERIC_9x1;
                     case 18:
-                        return Containers.GENERIC_9x2;
+                        return net.minecraft.world.inventory.MenuType.GENERIC_9x2;
                     case 27:
-                        return Containers.GENERIC_9x3;
+                        return net.minecraft.world.inventory.MenuType.GENERIC_9x3;
                     case 36:
                     case 41: // PLAYER
-                        return Containers.GENERIC_9x4;
+                        return net.minecraft.world.inventory.MenuType.GENERIC_9x4;
                     case 45:
-                        return Containers.GENERIC_9x5;
+                        return net.minecraft.world.inventory.MenuType.GENERIC_9x5;
                     case 54:
-                        return Containers.GENERIC_9x6;
+                        return net.minecraft.world.inventory.MenuType.GENERIC_9x6;
                     default:
                         throw new IllegalArgumentException("Unsupported custom inventory size " + inventory.getSize());
                 }
             default:
                 final MenuType menu = type.getMenuType();
                 if (menu == null) {
-                    return Containers.GENERIC_9x3;
+                    return net.minecraft.world.inventory.MenuType.GENERIC_9x3;
                 } else {
                     return ((CraftMenuType<?>) menu).getHandle();
                 }
         }
     }
 
-    private void setupSlots(IInventory top, PlayerInventory bottom, EntityHuman entityhuman) {
+    private void setupSlots(Container top, net.minecraft.world.entity.player.Inventory bottom, Player entityhuman) {
         int windowId = -1;
-        switch (cachedType) {
+        switch (this.cachedType) {
             case CREATIVE:
                 break; // TODO: This should be an error?
             case PLAYER:
             case CHEST:
             case ENDER_CHEST:
             case BARREL:
-                delegate = new ContainerChest(Containers.GENERIC_9x3, windowId, bottom, top, top.getContainerSize() / 9);
+                this.delegate = new ChestMenu(net.minecraft.world.inventory.MenuType.GENERIC_9x3, windowId, bottom, top, top.getContainerSize() / 9);
                 break;
             case DISPENSER:
             case DROPPER:
-                delegate = new ContainerDispenser(windowId, bottom, top);
+                this.delegate = new DispenserMenu(windowId, bottom, top);
                 break;
             case FURNACE:
-                delegate = new ContainerFurnaceFurnace(windowId, bottom, top, new ContainerProperties(4));
+                this.delegate = new FurnaceMenu(windowId, bottom, top, new SimpleContainerData(4));
                 break;
             case CRAFTING: // TODO: This should be an error?
             case WORKBENCH:
-                setupWorkbench(top, bottom); // SPIGOT-3812 - manually set up slots so we can use the delegated inventory and not the automatically created one
+                this.setupWorkbench(top, bottom); // SPIGOT-3812 - manually set up slots so we can use the delegated inventory and not the automatically created one
                 break;
             case ENCHANTING:
-                delegate = new ContainerEnchantTable(windowId, bottom);
+                this.delegate = new EnchantmentMenu(windowId, bottom);
                 break;
             case BREWING:
-                delegate = new ContainerBrewingStand(windowId, bottom, top, new ContainerProperties(2));
+                this.delegate = new BrewingStandMenu(windowId, bottom, top, new SimpleContainerData(2));
                 break;
             case HOPPER:
-                delegate = new ContainerHopper(windowId, bottom, top);
+                this.delegate = new HopperMenu(windowId, bottom, top);
                 break;
             case ANVIL:
-                setupAnvil(top, bottom); // SPIGOT-6783 - manually set up slots so we can use the delegated inventory and not the automatically created one
+                this.setupAnvil(top, bottom); // SPIGOT-6783 - manually set up slots so we can use the delegated inventory and not the automatically created one
                 break;
             case BEACON:
-                delegate = new ContainerBeacon(windowId, bottom);
+                this.delegate = new BeaconMenu(windowId, bottom);
                 break;
             case SHULKER_BOX:
-                delegate = new ContainerShulkerBox(windowId, bottom, top);
+                this.delegate = new ShulkerBoxMenu(windowId, bottom, top);
                 break;
             case BLAST_FURNACE:
-                delegate = new ContainerBlastFurnace(windowId, bottom, top, new ContainerProperties(4));
+                this.delegate = new BlastFurnaceMenu(windowId, bottom, top, new SimpleContainerData(4));
                 break;
             case LECTERN:
-                delegate = new ContainerLectern(windowId, top, new ContainerProperties(1), bottom);
+                this.delegate = new LecternMenu(windowId, top, new SimpleContainerData(1), bottom);
                 break;
             case SMOKER:
-                delegate = new ContainerSmoker(windowId, bottom, top, new ContainerProperties(4));
+                this.delegate = new SmokerMenu(windowId, bottom, top, new SimpleContainerData(4));
                 break;
             case LOOM:
-                delegate = new ContainerLoom(windowId, bottom);
+                this.delegate = new LoomMenu(windowId, bottom);
                 break;
             case CARTOGRAPHY:
-                delegate = new ContainerCartography(windowId, bottom);
+                this.delegate = new CartographyTableMenu(windowId, bottom);
                 break;
             case GRINDSTONE:
-                delegate = new ContainerGrindstone(windowId, bottom);
+                this.delegate = new GrindstoneMenu(windowId, bottom);
                 break;
             case STONECUTTER:
-                setupStoneCutter(top, bottom); // SPIGOT-7757 - manual setup required for individual slots
+                this.setupStoneCutter(top, bottom); // SPIGOT-7757 - manual setup required for individual slots
                 break;
             case MERCHANT:
-                delegate = new ContainerMerchant(windowId, bottom);
+                this.delegate = new MerchantMenu(windowId, bottom);
                 break;
             case SMITHING:
             case SMITHING_NEW:
-                setupSmithing(top, bottom); // SPIGOT-6783 - manually set up slots so we can use the delegated inventory and not the automatically created one
+                this.setupSmithing(top, bottom); // SPIGOT-6783 - manually set up slots so we can use the delegated inventory and not the automatically created one
                 break;
             case CRAFTER:
-                delegate = new CrafterMenu(windowId, bottom);
+                this.delegate = new CrafterMenu(windowId, bottom);
                 break;
         }
 
-        if (delegate != null) {
-            this.lastSlots = delegate.lastSlots;
-            this.slots = delegate.slots;
-            this.remoteSlots = delegate.remoteSlots;
+        if (this.delegate != null) {
+            this.lastSlots = this.delegate.lastSlots;
+            this.slots = this.delegate.slots;
+            this.remoteSlots = this.delegate.remoteSlots;
         }
 
         // SPIGOT-4598 - we should still delegate the shift click handler
-        switch (cachedType) {
+        switch (this.cachedType) {
             case WORKBENCH:
-                delegate = new ContainerWorkbench(windowId, bottom);
+                this.delegate = new CraftingMenu(windowId, bottom);
                 break;
             case ANVIL:
-                delegate = new ContainerAnvil(windowId, bottom);
+                this.delegate = new AnvilMenu(windowId, bottom);
                 break;
         }
     }
 
-    private void setupWorkbench(IInventory top, IInventory bottom) {
+    private void setupWorkbench(Container top, Container bottom) {
         // This code copied from ContainerWorkbench
         this.addSlot(new Slot(top, 0, 124, 35));
 
@@ -247,7 +245,7 @@ public class CraftContainer extends Container {
         // End copy from ContainerWorkbench
     }
 
-    private void setupAnvil(IInventory top, IInventory bottom) {
+    private void setupAnvil(Container top, Container bottom) {
         // This code copied from ContainerAnvilAbstract
         this.addSlot(new Slot(top, 0, 27, 47));
         this.addSlot(new Slot(top, 1, 76, 47));
@@ -268,7 +266,7 @@ public class CraftContainer extends Container {
         // End copy from ContainerAnvilAbstract
     }
 
-    private void setupSmithing(IInventory top, IInventory bottom) {
+    private void setupSmithing(Container top, Container bottom) {
         // This code copied from ContainerSmithing
         this.addSlot(new Slot(top, 0, 8, 48));
         this.addSlot(new Slot(top, 1, 26, 48));
@@ -290,7 +288,7 @@ public class CraftContainer extends Container {
         // End copy from ContainerSmithing
     }
 
-    private void setupStoneCutter(IInventory top, IInventory bottom) {
+    private void setupStoneCutter(Container top, Container bottom) {
         // This code copied from ContainerStonecutter
         this.addSlot(new Slot(top, 0, 20, 33));
         this.addSlot(new Slot(top, 1, 143, 33));
@@ -311,17 +309,17 @@ public class CraftContainer extends Container {
     }
 
     @Override
-    public ItemStack quickMoveStack(EntityHuman entityhuman, int i) {
-        return (delegate != null) ? delegate.quickMoveStack(entityhuman, i) : ItemStack.EMPTY;
+    public ItemStack quickMoveStack(Player player, int slot) {
+        return (this.delegate != null) ? this.delegate.quickMoveStack(player, slot) : ItemStack.EMPTY;
     }
 
     @Override
-    public boolean stillValid(EntityHuman entity) {
+    public boolean stillValid(Player player) {
         return true;
     }
 
     @Override
-    public Containers<?> getType() {
-        return getNotchInventoryType(view.getTopInventory());
+    public net.minecraft.world.inventory.MenuType<?> getType() {
+        return CraftContainer.getNotchInventoryType(this.view.getTopInventory());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftEntityEquipment.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftEntityEquipment.java
index dc4cb10f24..cb704cef38 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftEntityEquipment.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftEntityEquipment.java
@@ -1,8 +1,7 @@
 package org.bukkit.craftbukkit.inventory;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.entity.EntityInsentient;
-import net.minecraft.world.entity.EnumItemSlot;
+import net.minecraft.world.entity.Mob;
 import org.bukkit.craftbukkit.CraftEquipmentSlot;
 import org.bukkit.craftbukkit.entity.CraftLivingEntity;
 import org.bukkit.entity.Entity;
@@ -26,20 +25,20 @@ public class CraftEntityEquipment implements EntityEquipment {
     @Override
     public void setItem(EquipmentSlot slot, ItemStack item, boolean silent) {
         Preconditions.checkArgument(slot != null, "slot must not be null");
-        EnumItemSlot nmsSlot = CraftEquipmentSlot.getNMS(slot);
-        setEquipment(nmsSlot, item, silent);
+        net.minecraft.world.entity.EquipmentSlot nmsSlot = CraftEquipmentSlot.getNMS(slot);
+        this.setEquipment(nmsSlot, item, silent);
     }
 
     @Override
     public ItemStack getItem(EquipmentSlot slot) {
         Preconditions.checkArgument(slot != null, "slot must not be null");
-        EnumItemSlot nmsSlot = CraftEquipmentSlot.getNMS(slot);
-        return getEquipment(nmsSlot);
+        net.minecraft.world.entity.EquipmentSlot nmsSlot = CraftEquipmentSlot.getNMS(slot);
+        return this.getEquipment(nmsSlot);
     }
 
     @Override
     public ItemStack getItemInMainHand() {
-        return getEquipment(EnumItemSlot.MAINHAND);
+        return this.getEquipment(net.minecraft.world.entity.EquipmentSlot.MAINHAND);
     }
 
     @Override
@@ -49,12 +48,12 @@ public class CraftEntityEquipment implements EntityEquipment {
 
     @Override
     public void setItemInMainHand(ItemStack item, boolean silent) {
-        setEquipment(EnumItemSlot.MAINHAND, item, silent);
+        this.setEquipment(net.minecraft.world.entity.EquipmentSlot.MAINHAND, item, silent);
     }
 
     @Override
     public ItemStack getItemInOffHand() {
-        return getEquipment(EnumItemSlot.OFFHAND);
+        return this.getEquipment(net.minecraft.world.entity.EquipmentSlot.OFFHAND);
     }
 
     @Override
@@ -64,22 +63,22 @@ public class CraftEntityEquipment implements EntityEquipment {
 
     @Override
     public void setItemInOffHand(ItemStack item, boolean silent) {
-        setEquipment(EnumItemSlot.OFFHAND, item, silent);
+        this.setEquipment(net.minecraft.world.entity.EquipmentSlot.OFFHAND, item, silent);
     }
 
     @Override
     public ItemStack getItemInHand() {
-        return getItemInMainHand();
+        return this.getItemInMainHand();
     }
 
     @Override
     public void setItemInHand(ItemStack stack) {
-        setItemInMainHand(stack);
+        this.setItemInMainHand(stack);
     }
 
     @Override
     public ItemStack getHelmet() {
-        return getEquipment(EnumItemSlot.HEAD);
+        return this.getEquipment(net.minecraft.world.entity.EquipmentSlot.HEAD);
     }
 
     @Override
@@ -89,12 +88,12 @@ public class CraftEntityEquipment implements EntityEquipment {
 
     @Override
     public void setHelmet(ItemStack helmet, boolean silent) {
-        setEquipment(EnumItemSlot.HEAD, helmet, silent);
+        this.setEquipment(net.minecraft.world.entity.EquipmentSlot.HEAD, helmet, silent);
     }
 
     @Override
     public ItemStack getChestplate() {
-        return getEquipment(EnumItemSlot.CHEST);
+        return this.getEquipment(net.minecraft.world.entity.EquipmentSlot.CHEST);
     }
 
     @Override
@@ -104,12 +103,12 @@ public class CraftEntityEquipment implements EntityEquipment {
 
     @Override
     public void setChestplate(ItemStack chestplate, boolean silent) {
-        setEquipment(EnumItemSlot.CHEST, chestplate, silent);
+        this.setEquipment(net.minecraft.world.entity.EquipmentSlot.CHEST, chestplate, silent);
     }
 
     @Override
     public ItemStack getLeggings() {
-        return getEquipment(EnumItemSlot.LEGS);
+        return this.getEquipment(net.minecraft.world.entity.EquipmentSlot.LEGS);
     }
 
     @Override
@@ -119,12 +118,12 @@ public class CraftEntityEquipment implements EntityEquipment {
 
     @Override
     public void setLeggings(ItemStack leggings, boolean silent) {
-        setEquipment(EnumItemSlot.LEGS, leggings, silent);
+        this.setEquipment(net.minecraft.world.entity.EquipmentSlot.LEGS, leggings, silent);
     }
 
     @Override
     public ItemStack getBoots() {
-        return getEquipment(EnumItemSlot.FEET);
+        return this.getEquipment(net.minecraft.world.entity.EquipmentSlot.FEET);
     }
 
     @Override
@@ -134,137 +133,137 @@ public class CraftEntityEquipment implements EntityEquipment {
 
     @Override
     public void setBoots(ItemStack boots, boolean silent) {
-        setEquipment(EnumItemSlot.FEET, boots, silent);
+        this.setEquipment(net.minecraft.world.entity.EquipmentSlot.FEET, boots, silent);
     }
 
     @Override
     public ItemStack[] getArmorContents() {
         ItemStack[] armor = new ItemStack[]{
-                getEquipment(EnumItemSlot.FEET),
-                getEquipment(EnumItemSlot.LEGS),
-                getEquipment(EnumItemSlot.CHEST),
-                getEquipment(EnumItemSlot.HEAD),
+                this.getEquipment(net.minecraft.world.entity.EquipmentSlot.FEET),
+                this.getEquipment(net.minecraft.world.entity.EquipmentSlot.LEGS),
+                this.getEquipment(net.minecraft.world.entity.EquipmentSlot.CHEST),
+                this.getEquipment(net.minecraft.world.entity.EquipmentSlot.HEAD),
         };
         return armor;
     }
 
     @Override
     public void setArmorContents(ItemStack[] items) {
-        setEquipment(EnumItemSlot.FEET, items.length >= 1 ? items[0] : null, false);
-        setEquipment(EnumItemSlot.LEGS, items.length >= 2 ? items[1] : null, false);
-        setEquipment(EnumItemSlot.CHEST, items.length >= 3 ? items[2] : null, false);
-        setEquipment(EnumItemSlot.HEAD, items.length >= 4 ? items[3] : null, false);
+        this.setEquipment(net.minecraft.world.entity.EquipmentSlot.FEET, items.length >= 1 ? items[0] : null, false);
+        this.setEquipment(net.minecraft.world.entity.EquipmentSlot.LEGS, items.length >= 2 ? items[1] : null, false);
+        this.setEquipment(net.minecraft.world.entity.EquipmentSlot.CHEST, items.length >= 3 ? items[2] : null, false);
+        this.setEquipment(net.minecraft.world.entity.EquipmentSlot.HEAD, items.length >= 4 ? items[3] : null, false);
     }
 
-    private ItemStack getEquipment(EnumItemSlot slot) {
-        return CraftItemStack.asBukkitCopy(entity.getHandle().getItemBySlot(slot));
+    private ItemStack getEquipment(net.minecraft.world.entity.EquipmentSlot slot) {
+        return CraftItemStack.asBukkitCopy(this.entity.getHandle().getItemBySlot(slot));
     }
 
-    private void setEquipment(EnumItemSlot slot, ItemStack stack, boolean silent) {
-        entity.getHandle().setItemSlot(slot, CraftItemStack.asNMSCopy(stack), silent);
+    private void setEquipment(net.minecraft.world.entity.EquipmentSlot slot, ItemStack stack, boolean silent) {
+        this.entity.getHandle().setItemSlot(slot, CraftItemStack.asNMSCopy(stack), silent);
     }
 
     @Override
     public void clear() {
-        for (EnumItemSlot slot : EnumItemSlot.values()) {
-            setEquipment(slot, null, false);
+        for (net.minecraft.world.entity.EquipmentSlot slot : net.minecraft.world.entity.EquipmentSlot.values()) {
+            this.setEquipment(slot, null, false);
         }
     }
 
     @Override
     public Entity getHolder() {
-        return entity;
+        return this.entity;
     }
 
     @Override
     public float getItemInHandDropChance() {
-        return getItemInMainHandDropChance();
+        return this.getItemInMainHandDropChance();
     }
 
     @Override
     public void setItemInHandDropChance(float chance) {
-        setItemInMainHandDropChance(chance);
+        this.setItemInMainHandDropChance(chance);
     }
 
     @Override
     public float getItemInMainHandDropChance() {
-       return getDropChance(EnumItemSlot.MAINHAND);
+       return this.getDropChance(net.minecraft.world.entity.EquipmentSlot.MAINHAND);
     }
 
     @Override
     public void setItemInMainHandDropChance(float chance) {
-        setDropChance(EnumItemSlot.MAINHAND, chance);
+        this.setDropChance(net.minecraft.world.entity.EquipmentSlot.MAINHAND, chance);
     }
 
     @Override
     public float getItemInOffHandDropChance() {
-        return getDropChance(EnumItemSlot.OFFHAND);
+        return this.getDropChance(net.minecraft.world.entity.EquipmentSlot.OFFHAND);
     }
 
     @Override
     public void setItemInOffHandDropChance(float chance) {
-        setDropChance(EnumItemSlot.OFFHAND, chance);
+        this.setDropChance(net.minecraft.world.entity.EquipmentSlot.OFFHAND, chance);
     }
 
     @Override
     public float getHelmetDropChance() {
-        return getDropChance(EnumItemSlot.HEAD);
+        return this.getDropChance(net.minecraft.world.entity.EquipmentSlot.HEAD);
     }
 
     @Override
     public void setHelmetDropChance(float chance) {
-        setDropChance(EnumItemSlot.HEAD, chance);
+        this.setDropChance(net.minecraft.world.entity.EquipmentSlot.HEAD, chance);
     }
 
     @Override
     public float getChestplateDropChance() {
-        return getDropChance(EnumItemSlot.CHEST);
+        return this.getDropChance(net.minecraft.world.entity.EquipmentSlot.CHEST);
     }
 
     @Override
     public void setChestplateDropChance(float chance) {
-        setDropChance(EnumItemSlot.CHEST, chance);
+        this.setDropChance(net.minecraft.world.entity.EquipmentSlot.CHEST, chance);
     }
 
     @Override
     public float getLeggingsDropChance() {
-        return getDropChance(EnumItemSlot.LEGS);
+        return this.getDropChance(net.minecraft.world.entity.EquipmentSlot.LEGS);
     }
 
     @Override
     public void setLeggingsDropChance(float chance) {
-        setDropChance(EnumItemSlot.LEGS, chance);
+        this.setDropChance(net.minecraft.world.entity.EquipmentSlot.LEGS, chance);
     }
 
     @Override
     public float getBootsDropChance() {
-        return getDropChance(EnumItemSlot.FEET);
+        return this.getDropChance(net.minecraft.world.entity.EquipmentSlot.FEET);
     }
 
     @Override
     public void setBootsDropChance(float chance) {
-        setDropChance(EnumItemSlot.FEET, chance);
+        this.setDropChance(net.minecraft.world.entity.EquipmentSlot.FEET, chance);
     }
 
-    private void setDropChance(EnumItemSlot slot, float chance) {
-        Preconditions.checkArgument(entity.getHandle() instanceof EntityInsentient, "Cannot set drop chance for non-Mob entity");
+    private void setDropChance(net.minecraft.world.entity.EquipmentSlot slot, float chance) {
+        Preconditions.checkArgument(this.entity.getHandle() instanceof Mob, "Cannot set drop chance for non-Mob entity");
 
-        if (slot == EnumItemSlot.MAINHAND || slot == EnumItemSlot.OFFHAND) {
-            ((EntityInsentient) entity.getHandle()).handDropChances[slot.getIndex()] = chance;
+        if (slot == net.minecraft.world.entity.EquipmentSlot.MAINHAND || slot == net.minecraft.world.entity.EquipmentSlot.OFFHAND) {
+            ((Mob) this.entity.getHandle()).handDropChances[slot.getIndex()] = chance;
         } else {
-            ((EntityInsentient) entity.getHandle()).armorDropChances[slot.getIndex()] = chance;
+            ((Mob) this.entity.getHandle()).armorDropChances[slot.getIndex()] = chance;
         }
     }
 
-    private float getDropChance(EnumItemSlot slot) {
-        if (!(entity.getHandle() instanceof EntityInsentient)) {
+    private float getDropChance(net.minecraft.world.entity.EquipmentSlot slot) {
+        if (!(this.entity.getHandle() instanceof Mob)) {
             return 1;
         }
 
-        if (slot == EnumItemSlot.MAINHAND || slot == EnumItemSlot.OFFHAND) {
-            return ((EntityInsentient) entity.getHandle()).handDropChances[slot.getIndex()];
+        if (slot == net.minecraft.world.entity.EquipmentSlot.MAINHAND || slot == net.minecraft.world.entity.EquipmentSlot.OFFHAND) {
+            return ((Mob) this.entity.getHandle()).handDropChances[slot.getIndex()];
         } else {
-            return ((EntityInsentient) entity.getHandle()).armorDropChances[slot.getIndex()];
+            return ((Mob) this.entity.getHandle()).armorDropChances[slot.getIndex()];
         }
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java
index 4c620c9ab0..875d6793b4 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftFurnaceRecipe.java
@@ -26,6 +26,6 @@ public class CraftFurnaceRecipe extends FurnaceRecipe implements CraftRecipe {
     public void addToCraftingManager() {
         ItemStack result = this.getResult();
 
-        MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftRecipe.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.FurnaceRecipe(this.getGroup(), CraftRecipe.getCategory(this.getCategory()), toNMS(this.getInputChoice(), true), CraftItemStack.asNMSCopy(result), getExperience(), getCookingTime())));
+        MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftRecipe.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmeltingRecipe(this.getGroup(), CraftRecipe.getCategory(this.getCategory()), this.toNMS(this.getInputChoice(), true), CraftItemStack.asNMSCopy(result), this.getExperience(), this.getCookingTime())));
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
index 820d06ede0..35651063e7 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventory.java
@@ -4,25 +4,24 @@ import com.google.common.base.Preconditions;
 import java.util.HashMap;
 import java.util.List;
 import java.util.ListIterator;
-import net.minecraft.world.IInventory;
-import net.minecraft.world.entity.player.PlayerInventory;
-import net.minecraft.world.inventory.InventoryCrafting;
-import net.minecraft.world.inventory.InventoryEnderChest;
-import net.minecraft.world.inventory.InventoryMerchant;
-import net.minecraft.world.level.block.BlockComposter;
+import net.minecraft.world.Container;
+import net.minecraft.world.inventory.CraftingContainer;
+import net.minecraft.world.inventory.MerchantContainer;
+import net.minecraft.world.inventory.PlayerEnderChestContainer;
+import net.minecraft.world.level.block.ComposterBlock;
+import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity;
+import net.minecraft.world.level.block.entity.BarrelBlockEntity;
+import net.minecraft.world.level.block.entity.BlastFurnaceBlockEntity;
+import net.minecraft.world.level.block.entity.BrewingStandBlockEntity;
 import net.minecraft.world.level.block.entity.ChiseledBookShelfBlockEntity;
 import net.minecraft.world.level.block.entity.CrafterBlockEntity;
-import net.minecraft.world.level.block.entity.IHopper;
-import net.minecraft.world.level.block.entity.TileEntityBarrel;
-import net.minecraft.world.level.block.entity.TileEntityBlastFurnace;
-import net.minecraft.world.level.block.entity.TileEntityBrewingStand;
-import net.minecraft.world.level.block.entity.TileEntityDispenser;
-import net.minecraft.world.level.block.entity.TileEntityDropper;
-import net.minecraft.world.level.block.entity.TileEntityFurnace;
-import net.minecraft.world.level.block.entity.TileEntityJukeBox;
-import net.minecraft.world.level.block.entity.TileEntityLectern;
-import net.minecraft.world.level.block.entity.TileEntityShulkerBox;
-import net.minecraft.world.level.block.entity.TileEntitySmoker;
+import net.minecraft.world.level.block.entity.DispenserBlockEntity;
+import net.minecraft.world.level.block.entity.DropperBlockEntity;
+import net.minecraft.world.level.block.entity.Hopper;
+import net.minecraft.world.level.block.entity.JukeboxBlockEntity;
+import net.minecraft.world.level.block.entity.LecternBlockEntity;
+import net.minecraft.world.level.block.entity.ShulkerBoxBlockEntity;
+import net.minecraft.world.level.block.entity.SmokerBlockEntity;
 import org.bukkit.Location;
 import org.bukkit.Material;
 import org.bukkit.craftbukkit.util.CraftLegacy;
@@ -33,24 +32,24 @@ import org.bukkit.inventory.InventoryHolder;
 import org.bukkit.inventory.ItemStack;
 
 public class CraftInventory implements Inventory {
-    protected final IInventory inventory;
+    protected final Container inventory;
 
-    public CraftInventory(IInventory inventory) {
+    public CraftInventory(Container inventory) {
         this.inventory = inventory;
     }
 
-    public IInventory getInventory() {
-        return inventory;
+    public Container getInventory() {
+        return this.inventory;
     }
 
     @Override
     public int getSize() {
-        return getInventory().getContainerSize();
+        return this.getInventory().getContainerSize();
     }
 
     @Override
     public ItemStack getItem(int index) {
-        net.minecraft.world.item.ItemStack item = getInventory().getItem(index);
+        net.minecraft.world.item.ItemStack item = this.getInventory().getItem(index);
         return item.isEmpty() ? null : CraftItemStack.asCraftMirror(item);
     }
 
@@ -68,44 +67,44 @@ public class CraftInventory implements Inventory {
 
     @Override
     public ItemStack[] getStorageContents() {
-        return getContents();
+        return this.getContents();
     }
 
     @Override
     public void setStorageContents(ItemStack[] items) throws IllegalArgumentException {
-        setContents(items);
+        this.setContents(items);
     }
 
     @Override
     public ItemStack[] getContents() {
-        List<net.minecraft.world.item.ItemStack> mcItems = getInventory().getContents();
+        List<net.minecraft.world.item.ItemStack> mcItems = this.getInventory().getContents();
 
-        return asCraftMirror(mcItems);
+        return this.asCraftMirror(mcItems);
     }
 
     @Override
     public void setContents(ItemStack[] items) {
-        Preconditions.checkArgument(items.length <= getSize(), "Invalid inventory size (%s); expected %s or less", items.length, getSize());
+        Preconditions.checkArgument(items.length <= this.getSize(), "Invalid inventory size (%s); expected %s or less", items.length, this.getSize());
 
-        for (int i = 0; i < getSize(); i++) {
+        for (int i = 0; i < this.getSize(); i++) {
             if (i >= items.length) {
-                setItem(i, null);
+                this.setItem(i, null);
             } else {
-                setItem(i, items[i]);
+                this.setItem(i, items[i]);
             }
         }
     }
 
     @Override
     public void setItem(int index, ItemStack item) {
-        getInventory().setItem(index, CraftItemStack.asNMSCopy(item));
+        this.getInventory().setItem(index, CraftItemStack.asNMSCopy(item));
     }
 
     @Override
     public boolean contains(Material material) {
         Preconditions.checkArgument(material != null, "Material cannot be null");
         material = CraftLegacy.fromLegacy(material);
-        for (ItemStack item : getStorageContents()) {
+        for (ItemStack item : this.getStorageContents()) {
             if (item != null && item.getType() == material) {
                 return true;
             }
@@ -118,7 +117,7 @@ public class CraftInventory implements Inventory {
         if (item == null) {
             return false;
         }
-        for (ItemStack i : getStorageContents()) {
+        for (ItemStack i : this.getStorageContents()) {
             if (item.equals(i)) {
                 return true;
             }
@@ -133,7 +132,7 @@ public class CraftInventory implements Inventory {
         if (amount <= 0) {
             return true;
         }
-        for (ItemStack item : getStorageContents()) {
+        for (ItemStack item : this.getStorageContents()) {
             if (item != null && item.getType() == material) {
                 if ((amount -= item.getAmount()) <= 0) {
                     return true;
@@ -151,7 +150,7 @@ public class CraftInventory implements Inventory {
         if (amount <= 0) {
             return true;
         }
-        for (ItemStack i : getStorageContents()) {
+        for (ItemStack i : this.getStorageContents()) {
             if (item.equals(i) && --amount <= 0) {
                 return true;
             }
@@ -167,7 +166,7 @@ public class CraftInventory implements Inventory {
         if (amount <= 0) {
             return true;
         }
-        for (ItemStack i : getStorageContents()) {
+        for (ItemStack i : this.getStorageContents()) {
             if (item.isSimilar(i) && (amount -= i.getAmount()) <= 0) {
                 return true;
             }
@@ -181,7 +180,7 @@ public class CraftInventory implements Inventory {
         material = CraftLegacy.fromLegacy(material);
         HashMap<Integer, ItemStack> slots = new HashMap<>();
 
-        ItemStack[] inventory = getStorageContents();
+        ItemStack[] inventory = this.getStorageContents();
         for (int i = 0; i < inventory.length; i++) {
             ItemStack item = inventory[i];
             if (item != null && item.getType() == material) {
@@ -195,7 +194,7 @@ public class CraftInventory implements Inventory {
     public HashMap<Integer, ItemStack> all(ItemStack item) {
         HashMap<Integer, ItemStack> slots = new HashMap<>();
         if (item != null) {
-            ItemStack[] inventory = getStorageContents();
+            ItemStack[] inventory = this.getStorageContents();
             for (int i = 0; i < inventory.length; i++) {
                 if (item.equals(inventory[i])) {
                     slots.put(i, inventory[i]);
@@ -209,7 +208,7 @@ public class CraftInventory implements Inventory {
     public int first(Material material) {
         Preconditions.checkArgument(material != null, "Material cannot be null");
         material = CraftLegacy.fromLegacy(material);
-        ItemStack[] inventory = getStorageContents();
+        ItemStack[] inventory = this.getStorageContents();
         for (int i = 0; i < inventory.length; i++) {
             ItemStack item = inventory[i];
             if (item != null && item.getType() == material) {
@@ -221,14 +220,14 @@ public class CraftInventory implements Inventory {
 
     @Override
     public int first(ItemStack item) {
-        return first(item, true);
+        return this.first(item, true);
     }
 
     private int first(ItemStack item, boolean withAmount) {
         if (item == null) {
             return -1;
         }
-        ItemStack[] inventory = getStorageContents();
+        ItemStack[] inventory = this.getStorageContents();
         for (int i = 0; i < inventory.length; i++) {
             if (inventory[i] == null) continue;
 
@@ -241,7 +240,7 @@ public class CraftInventory implements Inventory {
 
     @Override
     public int firstEmpty() {
-        ItemStack[] inventory = getStorageContents();
+        ItemStack[] inventory = this.getStorageContents();
         for (int i = 0; i < inventory.length; i++) {
             if (inventory[i] == null) {
                 return i;
@@ -252,18 +251,18 @@ public class CraftInventory implements Inventory {
 
     @Override
     public boolean isEmpty() {
-        return inventory.isEmpty();
+        return this.inventory.isEmpty();
     }
 
     private int firstPartial(ItemStack item) {
-        ItemStack[] inventory = getStorageContents();
+        ItemStack[] inventory = this.getStorageContents();
         ItemStack filteredItem = CraftItemStack.asCraftCopy(item);
         if (item == null) {
             return -1;
         }
         for (int i = 0; i < inventory.length; i++) {
             ItemStack cItem = inventory[i];
-            if (cItem != null && cItem.getAmount() < getMaxItemStack(cItem) && cItem.isSimilar(filteredItem)) {
+            if (cItem != null && cItem.getAmount() < this.getMaxItemStack(cItem) && cItem.isSimilar(filteredItem)) {
                 return i;
             }
         }
@@ -286,12 +285,12 @@ public class CraftInventory implements Inventory {
             Preconditions.checkArgument(item != null, "ItemStack cannot be null");
             while (true) {
                 // Do we already have a stack of it?
-                int firstPartial = firstPartial(item);
+                int firstPartial = this.firstPartial(item);
 
                 // Drat! no partial stack
                 if (firstPartial == -1) {
                     // Find a free spot!
-                    int firstFree = firstEmpty();
+                    int firstFree = this.firstEmpty();
 
                     if (firstFree == -1) {
                         // No space at all!
@@ -299,38 +298,38 @@ public class CraftInventory implements Inventory {
                         break;
                     } else {
                         // More than a single stack!
-                        int maxAmount = getMaxItemStack(item);
+                        int maxAmount = this.getMaxItemStack(item);
                         if (item.getAmount() > maxAmount) {
                             CraftItemStack stack = CraftItemStack.asCraftCopy(item);
                             stack.setAmount(maxAmount);
-                            setItem(firstFree, stack);
+                            this.setItem(firstFree, stack);
                             item.setAmount(item.getAmount() - maxAmount);
                         } else {
                             // Just store it
-                            setItem(firstFree, item);
+                            this.setItem(firstFree, item);
                             break;
                         }
                     }
                 } else {
                     // So, apparently it might only partially fit, well lets do just that
-                    ItemStack partialItem = getItem(firstPartial);
+                    ItemStack partialItem = this.getItem(firstPartial);
 
                     int amount = item.getAmount();
                     int partialAmount = partialItem.getAmount();
-                    int maxAmount = getMaxItemStack(partialItem);
+                    int maxAmount = this.getMaxItemStack(partialItem);
 
                     // Check if it fully fits
                     if (amount + partialAmount <= maxAmount) {
                         partialItem.setAmount(amount + partialAmount);
                         // To make sure the packet is sent to the client
-                        setItem(firstPartial, partialItem);
+                        this.setItem(firstPartial, partialItem);
                         break;
                     }
 
                     // It fits partially
                     partialItem.setAmount(maxAmount);
                     // To make sure the packet is sent to the client
-                    setItem(firstPartial, partialItem);
+                    this.setItem(firstPartial, partialItem);
                     item.setAmount(amount + partialAmount - maxAmount);
                 }
             }
@@ -351,7 +350,7 @@ public class CraftInventory implements Inventory {
             int toDelete = item.getAmount();
 
             while (true) {
-                int first = first(item, false);
+                int first = this.first(item, false);
 
                 // Drat! we don't have this type in the inventory
                 if (first == -1) {
@@ -359,17 +358,17 @@ public class CraftInventory implements Inventory {
                     leftover.put(i, item);
                     break;
                 } else {
-                    ItemStack itemStack = getItem(first);
+                    ItemStack itemStack = this.getItem(first);
                     int amount = itemStack.getAmount();
 
                     if (amount <= toDelete) {
                         toDelete -= amount;
                         // clear the slot, all used up
-                        clear(first);
+                        this.clear(first);
                     } else {
                         // split the stack and store
                         itemStack.setAmount(amount - toDelete);
-                        setItem(first, itemStack);
+                        this.setItem(first, itemStack);
                         toDelete = 0;
                     }
                 }
@@ -384,40 +383,40 @@ public class CraftInventory implements Inventory {
     }
 
     private int getMaxItemStack(ItemStack itemstack) {
-        return Math.min(itemstack.getMaxStackSize(), getInventory().getMaxStackSize());
+        return Math.min(itemstack.getMaxStackSize(), this.getInventory().getMaxStackSize());
     }
 
     @Override
     public void remove(Material material) {
         Preconditions.checkArgument(material != null, "Material cannot be null");
         material = CraftLegacy.fromLegacy(material);
-        ItemStack[] items = getStorageContents();
+        ItemStack[] items = this.getStorageContents();
         for (int i = 0; i < items.length; i++) {
             if (items[i] != null && items[i].getType() == material) {
-                clear(i);
+                this.clear(i);
             }
         }
     }
 
     @Override
     public void remove(ItemStack item) {
-        ItemStack[] items = getStorageContents();
+        ItemStack[] items = this.getStorageContents();
         for (int i = 0; i < items.length; i++) {
             if (items[i] != null && items[i].equals(item)) {
-                clear(i);
+                this.clear(i);
             }
         }
     }
 
     @Override
     public void clear(int index) {
-        setItem(index, null);
+        this.setItem(index, null);
     }
 
     @Override
     public void clear() {
-        for (int i = 0; i < getSize(); i++) {
-            clear(i);
+        for (int i = 0; i < this.getSize(); i++) {
+            this.clear(i);
         }
     }
 
@@ -429,7 +428,7 @@ public class CraftInventory implements Inventory {
     @Override
     public ListIterator<ItemStack> iterator(int index) {
         if (index < 0) {
-            index += getSize() + 1; // ie, with -1, previous() will return the last element
+            index += this.getSize() + 1; // ie, with -1, previous() will return the last element
         }
         return new InventoryIterator(this, index);
     }
@@ -442,33 +441,33 @@ public class CraftInventory implements Inventory {
     @Override
     public InventoryType getType() {
         // Thanks to Droppers extending Dispensers, Blast Furnaces & Smokers extending Furnace, order is important.
-        if (inventory instanceof InventoryCrafting) {
-            if (inventory instanceof CrafterBlockEntity) {
+        if (this.inventory instanceof CraftingContainer) {
+            if (this.inventory instanceof CrafterBlockEntity) {
                 return InventoryType.CRAFTER;
             } else {
-                return inventory.getContainerSize() >= 9 ? InventoryType.WORKBENCH : InventoryType.CRAFTING;
+                return this.inventory.getContainerSize() >= 9 ? InventoryType.WORKBENCH : InventoryType.CRAFTING;
             }
-        } else if (inventory instanceof PlayerInventory) {
+        } else if (this.inventory instanceof net.minecraft.world.entity.player.Inventory) {
             return InventoryType.PLAYER;
-        } else if (inventory instanceof TileEntityDropper) {
+        } else if (this.inventory instanceof DropperBlockEntity) {
             return InventoryType.DROPPER;
-        } else if (inventory instanceof TileEntityDispenser) {
+        } else if (this.inventory instanceof DispenserBlockEntity) {
             return InventoryType.DISPENSER;
-        } else if (inventory instanceof TileEntityBlastFurnace) {
+        } else if (this.inventory instanceof BlastFurnaceBlockEntity) {
             return InventoryType.BLAST_FURNACE;
-        } else if (inventory instanceof TileEntitySmoker) {
+        } else if (this.inventory instanceof SmokerBlockEntity) {
             return InventoryType.SMOKER;
-        } else if (inventory instanceof TileEntityFurnace) {
+        } else if (this.inventory instanceof AbstractFurnaceBlockEntity) {
             return InventoryType.FURNACE;
         } else if (this instanceof CraftInventoryEnchanting) {
             return InventoryType.ENCHANTING;
-        } else if (inventory instanceof TileEntityBrewingStand) {
+        } else if (this.inventory instanceof BrewingStandBlockEntity) {
             return InventoryType.BREWING;
-        } else if (inventory instanceof CraftInventoryCustom.MinecraftInventory) {
-            return ((CraftInventoryCustom.MinecraftInventory) inventory).getType();
-        } else if (inventory instanceof InventoryEnderChest) {
+        } else if (this.inventory instanceof CraftInventoryCustom.MinecraftInventory) {
+            return ((CraftInventoryCustom.MinecraftInventory) this.inventory).getType();
+        } else if (this.inventory instanceof PlayerEnderChestContainer) {
             return InventoryType.ENDER_CHEST;
-        } else if (inventory instanceof InventoryMerchant) {
+        } else if (this.inventory instanceof MerchantContainer) {
             return InventoryType.MERCHANT;
         } else if (this instanceof CraftInventoryBeacon) {
             return InventoryType.BEACON;
@@ -476,15 +475,15 @@ public class CraftInventory implements Inventory {
             return InventoryType.ANVIL;
         } else if (this instanceof CraftInventorySmithing) {
             return InventoryType.SMITHING;
-        } else if (inventory instanceof IHopper) {
+        } else if (this.inventory instanceof Hopper) {
             return InventoryType.HOPPER;
-        } else if (inventory instanceof TileEntityShulkerBox) {
+        } else if (this.inventory instanceof ShulkerBoxBlockEntity) {
             return InventoryType.SHULKER_BOX;
-        } else if (inventory instanceof TileEntityBarrel) {
+        } else if (this.inventory instanceof BarrelBlockEntity) {
             return InventoryType.BARREL;
-        } else if (inventory instanceof TileEntityLectern.LecternInventory) {
+        } else if (this.inventory instanceof LecternBlockEntity.LecternInventory) {
             return InventoryType.LECTERN;
-        } else if (inventory instanceof ChiseledBookShelfBlockEntity) {
+        } else if (this.inventory instanceof ChiseledBookShelfBlockEntity) {
             return InventoryType.CHISELED_BOOKSHELF;
         } else if (this instanceof CraftInventoryLoom) {
             return InventoryType.LOOM;
@@ -494,9 +493,9 @@ public class CraftInventory implements Inventory {
             return InventoryType.GRINDSTONE;
         } else if (this instanceof CraftInventoryStonecutter) {
             return InventoryType.STONECUTTER;
-        } else if (inventory instanceof BlockComposter.ContainerEmpty || inventory instanceof BlockComposter.ContainerInput || inventory instanceof BlockComposter.ContainerOutput) {
+        } else if (this.inventory instanceof ComposterBlock.EmptyContainer || this.inventory instanceof ComposterBlock.InputContainer || this.inventory instanceof ComposterBlock.OutputContainer) {
             return InventoryType.COMPOSTER;
-        } else if (inventory instanceof TileEntityJukeBox) {
+        } else if (this.inventory instanceof JukeboxBlockEntity) {
             return InventoryType.JUKEBOX;
         } else {
             return InventoryType.CHEST;
@@ -505,22 +504,22 @@ public class CraftInventory implements Inventory {
 
     @Override
     public InventoryHolder getHolder() {
-        return inventory.getOwner();
+        return this.inventory.getOwner();
     }
 
     @Override
     public int getMaxStackSize() {
-        return inventory.getMaxStackSize();
+        return this.inventory.getMaxStackSize();
     }
 
     @Override
     public void setMaxStackSize(int size) {
-        inventory.setMaxStackSize(size);
+        this.inventory.setMaxStackSize(size);
     }
 
     @Override
     public int hashCode() {
-        return inventory.hashCode();
+        return this.inventory.hashCode();
     }
 
     @Override
@@ -530,6 +529,6 @@ public class CraftInventory implements Inventory {
 
     @Override
     public Location getLocation() {
-        return inventory.getLocation();
+        return this.inventory.getLocation();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAbstractHorse.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAbstractHorse.java
index add8d95b95..4946da5937 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAbstractHorse.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAbstractHorse.java
@@ -1,22 +1,22 @@
 package org.bukkit.craftbukkit.inventory;
 
-import net.minecraft.world.IInventory;
+import net.minecraft.world.Container;
 import org.bukkit.inventory.AbstractHorseInventory;
 import org.bukkit.inventory.ItemStack;
 
 public class CraftInventoryAbstractHorse extends CraftInventory implements AbstractHorseInventory {
 
-    public CraftInventoryAbstractHorse(IInventory inventory) {
+    public CraftInventoryAbstractHorse(Container inventory) {
         super(inventory);
     }
 
     @Override
     public ItemStack getSaddle() {
-        return getItem(0);
+        return this.getItem(0);
     }
 
     @Override
     public void setSaddle(ItemStack stack) {
-        setItem(0, stack);
+        this.setItem(0, stack);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAnvil.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAnvil.java
index 5258224dc4..792cb6adf0 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAnvil.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryAnvil.java
@@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.inventory;
 
 import com.google.common.base.Preconditions;
 import java.util.function.Consumer;
-import net.minecraft.world.IInventory;
+import net.minecraft.world.Container;
 import org.bukkit.Location;
 import org.bukkit.craftbukkit.inventory.view.CraftAnvilView;
 import org.bukkit.entity.HumanEntity;
@@ -20,53 +20,53 @@ public class CraftInventoryAnvil extends CraftResultInventory implements AnvilIn
     private int repairCostAmount;
     private int maximumRepairCost;
 
-    public CraftInventoryAnvil(Location location, IInventory inventory, IInventory resultInventory) {
+    public CraftInventoryAnvil(Location location, Container inventory, Container resultInventory) {
         super(inventory, resultInventory);
         this.location = location;
         this.renameText = null;
-        this.repairCost = DEFAULT_REPAIR_COST;
-        this.repairCostAmount = DEFAULT_REPAIR_COST_AMOUNT;
-        this.maximumRepairCost = DEFAULT_MAXIMUM_REPAIR_COST;
+        this.repairCost = CraftInventoryAnvil.DEFAULT_REPAIR_COST;
+        this.repairCostAmount = CraftInventoryAnvil.DEFAULT_REPAIR_COST_AMOUNT;
+        this.maximumRepairCost = CraftInventoryAnvil.DEFAULT_MAXIMUM_REPAIR_COST;
     }
 
     @Override
     public Location getLocation() {
-        return location;
+        return this.location;
     }
 
     @Override
     public String getRenameText() {
-        syncWithArbitraryViewValue((cav) -> this.renameText = cav.getRenameText());
+        this.syncWithArbitraryViewValue((cav) -> this.renameText = cav.getRenameText());
         return this.renameText;
     }
 
     @Override
     public int getRepairCostAmount() {
-        syncWithArbitraryViewValue((cav) -> this.repairCostAmount = cav.getRepairItemCountCost());
+        this.syncWithArbitraryViewValue((cav) -> this.repairCostAmount = cav.getRepairItemCountCost());
         return this.repairCostAmount;
     }
 
     @Override
     public void setRepairCostAmount(int amount) {
         this.repairCostAmount = amount;
-        syncViews((cav) -> cav.setRepairItemCountCost(amount));
+        this.syncViews((cav) -> cav.setRepairItemCountCost(amount));
     }
 
     @Override
     public int getRepairCost() {
-        syncWithArbitraryViewValue((cav) -> this.repairCost = cav.getRepairCost());
+        this.syncWithArbitraryViewValue((cav) -> this.repairCost = cav.getRepairCost());
         return this.repairCost;
     }
 
     @Override
     public void setRepairCost(int i) {
         this.repairCost = i;
-        syncViews((cav) -> cav.setRepairCost(i));
+        this.syncViews((cav) -> cav.setRepairCost(i));
     }
 
     @Override
     public int getMaximumRepairCost() {
-        syncWithArbitraryViewValue((cav) -> this.maximumRepairCost = cav.getMaximumRepairCost());
+        this.syncWithArbitraryViewValue((cav) -> this.maximumRepairCost = cav.getMaximumRepairCost());
         return this.maximumRepairCost;
     }
 
@@ -74,24 +74,24 @@ public class CraftInventoryAnvil extends CraftResultInventory implements AnvilIn
     public void setMaximumRepairCost(int levels) {
         Preconditions.checkArgument(levels >= 0, "Maximum repair cost must be positive (or 0)");
         this.maximumRepairCost = levels;
-        syncViews((cav) -> cav.setMaximumRepairCost(levels));
+        this.syncViews((cav) -> cav.setMaximumRepairCost(levels));
     }
 
     public boolean isRepairCostSet() {
-        return this.repairCost != DEFAULT_REPAIR_COST;
+        return this.repairCost != CraftInventoryAnvil.DEFAULT_REPAIR_COST;
     }
 
     public boolean isRepairCostAmountSet() {
-        return this.repairCostAmount != DEFAULT_REPAIR_COST_AMOUNT;
+        return this.repairCostAmount != CraftInventoryAnvil.DEFAULT_REPAIR_COST_AMOUNT;
     }
 
     public boolean isMaximumRepairCostSet() {
-        return this.maximumRepairCost != DEFAULT_MAXIMUM_REPAIR_COST;
+        return this.maximumRepairCost != CraftInventoryAnvil.DEFAULT_MAXIMUM_REPAIR_COST;
     }
 
     // used to lazily update and apply values from the view to the inventory
     private void syncViews(Consumer<CraftAnvilView> consumer) {
-        for (HumanEntity viewer : getViewers()) {
+        for (HumanEntity viewer : this.getViewers()) {
             if (viewer.getOpenInventory() instanceof CraftAnvilView cav) {
                 consumer.accept(cav);
             }
@@ -105,10 +105,10 @@ public class CraftInventoryAnvil extends CraftResultInventory implements AnvilIn
      * not the inventory.
      */
     private void syncWithArbitraryViewValue(Consumer<CraftAnvilView> consumer) {
-        if (getViewers().isEmpty()) {
+        if (this.getViewers().isEmpty()) {
             return;
         }
-        final HumanEntity entity = getViewers().get(0);
+        final HumanEntity entity = this.getViewers().get(0);
         if (entity != null && entity.getOpenInventory() instanceof CraftAnvilView cav) {
             consumer.accept(cav);
         }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryBeacon.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryBeacon.java
index 7fa1184ef3..06f462927f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryBeacon.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryBeacon.java
@@ -1,21 +1,21 @@
 package org.bukkit.craftbukkit.inventory;
 
-import net.minecraft.world.IInventory;
+import net.minecraft.world.Container;
 import org.bukkit.inventory.BeaconInventory;
 import org.bukkit.inventory.ItemStack;
 
 public class CraftInventoryBeacon extends CraftInventory implements BeaconInventory {
-    public CraftInventoryBeacon(IInventory beacon) {
+    public CraftInventoryBeacon(Container beacon) {
         super(beacon);
     }
 
     @Override
     public void setItem(ItemStack item) {
-        setItem(0, item);
+        this.setItem(0, item);
     }
 
     @Override
     public ItemStack getItem() {
-        return getItem(0);
+        return this.getItem(0);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryBrewer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryBrewer.java
index 6aaf363e7b..fa3a302283 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryBrewer.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryBrewer.java
@@ -1,37 +1,37 @@
 package org.bukkit.craftbukkit.inventory;
 
-import net.minecraft.world.IInventory;
+import net.minecraft.world.Container;
 import org.bukkit.block.BrewingStand;
 import org.bukkit.inventory.BrewerInventory;
 import org.bukkit.inventory.ItemStack;
 
 public class CraftInventoryBrewer extends CraftInventory implements BrewerInventory {
-    public CraftInventoryBrewer(IInventory inventory) {
+    public CraftInventoryBrewer(Container inventory) {
         super(inventory);
     }
 
     @Override
     public ItemStack getIngredient() {
-        return getItem(3);
+        return this.getItem(3);
     }
 
     @Override
     public void setIngredient(ItemStack ingredient) {
-        setItem(3, ingredient);
+        this.setItem(3, ingredient);
     }
 
     @Override
     public BrewingStand getHolder() {
-        return (BrewingStand) inventory.getOwner();
+        return (BrewingStand) this.inventory.getOwner();
     }
 
     @Override
     public ItemStack getFuel() {
-        return getItem(4);
+        return this.getItem(4);
     }
 
     @Override
     public void setFuel(ItemStack fuel) {
-        setItem(4, fuel);
+        this.setItem(4, fuel);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCartography.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCartography.java
index 5829745e3d..af455b3a4e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCartography.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCartography.java
@@ -1,11 +1,11 @@
 package org.bukkit.craftbukkit.inventory;
 
-import net.minecraft.world.IInventory;
+import net.minecraft.world.Container;
 import org.bukkit.inventory.CartographyInventory;
 
 public class CraftInventoryCartography extends CraftResultInventory implements CartographyInventory {
 
-    public CraftInventoryCartography(IInventory inventory, IInventory resultInventory) {
+    public CraftInventoryCartography(Container inventory, Container resultInventory) {
         super(inventory, resultInventory);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryChiseledBookshelf.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryChiseledBookshelf.java
index f775a4d60d..8b7ec54454 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryChiseledBookshelf.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryChiseledBookshelf.java
@@ -25,6 +25,6 @@ public class CraftInventoryChiseledBookshelf extends CraftInventory implements C
 
     @Override
     public ChiseledBookshelf getHolder() {
-        return (ChiseledBookshelf) inventory.getOwner();
+        return (ChiseledBookshelf) this.inventory.getOwner();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCrafter.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCrafter.java
index d0440cd85d..b177ab58aa 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCrafter.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCrafter.java
@@ -1,11 +1,11 @@
 package org.bukkit.craftbukkit.inventory;
 
-import net.minecraft.world.IInventory;
+import net.minecraft.world.Container;
 import org.bukkit.inventory.CrafterInventory;
 
 public class CraftInventoryCrafter extends CraftResultInventory implements CrafterInventory {
 
-    public CraftInventoryCrafter(IInventory inventory, IInventory resultInventory) {
+    public CraftInventoryCrafter(Container inventory, Container resultInventory) {
         super(inventory, resultInventory);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCrafting.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCrafting.java
index 48e80f6d19..9e6feea48d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCrafting.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCrafting.java
@@ -3,51 +3,51 @@ package org.bukkit.craftbukkit.inventory;
 import com.google.common.base.Preconditions;
 import java.util.Arrays;
 import java.util.List;
-import net.minecraft.world.IInventory;
-import net.minecraft.world.inventory.InventoryCrafting;
+import net.minecraft.world.Container;
+import net.minecraft.world.inventory.CraftingContainer;
 import net.minecraft.world.item.crafting.RecipeHolder;
 import org.bukkit.inventory.CraftingInventory;
 import org.bukkit.inventory.ItemStack;
 import org.bukkit.inventory.Recipe;
 
 public class CraftInventoryCrafting extends CraftInventory implements CraftingInventory {
-    private final IInventory resultInventory;
+    private final Container resultInventory;
 
-    public CraftInventoryCrafting(InventoryCrafting inventory, IInventory resultInventory) {
+    public CraftInventoryCrafting(CraftingContainer inventory, Container resultInventory) {
         super(inventory);
         this.resultInventory = resultInventory;
     }
 
-    public IInventory getResultInventory() {
-        return resultInventory;
+    public Container getResultInventory() {
+        return this.resultInventory;
     }
 
-    public InventoryCrafting getMatrixInventory() {
-        return (InventoryCrafting) inventory;
+    public CraftingContainer getMatrixInventory() {
+        return (CraftingContainer) this.inventory;
     }
 
     @Override
     public int getSize() {
-        return getResultInventory().getContainerSize() + getMatrixInventory().getContainerSize();
+        return this.getResultInventory().getContainerSize() + this.getMatrixInventory().getContainerSize();
     }
 
     @Override
     public void setContents(ItemStack[] items) {
-        Preconditions.checkArgument(items.length <= getSize(), "Invalid inventory size (%s); expected %s or less", items.length, getSize());
-        setContents(items[0], Arrays.copyOfRange(items, 1, items.length));
+        Preconditions.checkArgument(items.length <= this.getSize(), "Invalid inventory size (%s); expected %s or less", items.length, this.getSize());
+        this.setContents(items[0], Arrays.copyOfRange(items, 1, items.length));
     }
 
     @Override
     public ItemStack[] getContents() {
-        ItemStack[] items = new ItemStack[getSize()];
-        List<net.minecraft.world.item.ItemStack> mcResultItems = getResultInventory().getContents();
+        ItemStack[] items = new ItemStack[this.getSize()];
+        List<net.minecraft.world.item.ItemStack> mcResultItems = this.getResultInventory().getContents();
 
         int i = 0;
         for (i = 0; i < mcResultItems.size(); i++) {
             items[i] = CraftItemStack.asCraftMirror(mcResultItems.get(i));
         }
 
-        List<net.minecraft.world.item.ItemStack> mcItems = getMatrixInventory().getContents();
+        List<net.minecraft.world.item.ItemStack> mcItems = this.getMatrixInventory().getContents();
 
         for (int j = 0; j < mcItems.size(); j++) {
             items[i + j] = CraftItemStack.asCraftMirror(mcItems.get(j));
@@ -57,66 +57,66 @@ public class CraftInventoryCrafting extends CraftInventory implements CraftingIn
     }
 
     public void setContents(ItemStack result, ItemStack[] contents) {
-        setResult(result);
-        setMatrix(contents);
+        this.setResult(result);
+        this.setMatrix(contents);
     }
 
     @Override
     public CraftItemStack getItem(int index) {
-        if (index < getResultInventory().getContainerSize()) {
-            net.minecraft.world.item.ItemStack item = getResultInventory().getItem(index);
+        if (index < this.getResultInventory().getContainerSize()) {
+            net.minecraft.world.item.ItemStack item = this.getResultInventory().getItem(index);
             return item.isEmpty() ? null : CraftItemStack.asCraftMirror(item);
         } else {
-            net.minecraft.world.item.ItemStack item = getMatrixInventory().getItem(index - getResultInventory().getContainerSize());
+            net.minecraft.world.item.ItemStack item = this.getMatrixInventory().getItem(index - this.getResultInventory().getContainerSize());
             return item.isEmpty() ? null : CraftItemStack.asCraftMirror(item);
         }
     }
 
     @Override
     public void setItem(int index, ItemStack item) {
-        if (index < getResultInventory().getContainerSize()) {
-            getResultInventory().setItem(index, CraftItemStack.asNMSCopy(item));
+        if (index < this.getResultInventory().getContainerSize()) {
+            this.getResultInventory().setItem(index, CraftItemStack.asNMSCopy(item));
         } else {
-            getMatrixInventory().setItem((index - getResultInventory().getContainerSize()), CraftItemStack.asNMSCopy(item));
+            this.getMatrixInventory().setItem((index - this.getResultInventory().getContainerSize()), CraftItemStack.asNMSCopy(item));
         }
     }
 
     @Override
     public ItemStack[] getMatrix() {
-        List<net.minecraft.world.item.ItemStack> matrix = getMatrixInventory().getContents();
+        List<net.minecraft.world.item.ItemStack> matrix = this.getMatrixInventory().getContents();
 
-        return asCraftMirror(matrix);
+        return this.asCraftMirror(matrix);
     }
 
     @Override
     public ItemStack getResult() {
-        net.minecraft.world.item.ItemStack item = getResultInventory().getItem(0);
+        net.minecraft.world.item.ItemStack item = this.getResultInventory().getItem(0);
         if (!item.isEmpty()) return CraftItemStack.asCraftMirror(item);
         return null;
     }
 
     @Override
     public void setMatrix(ItemStack[] contents) {
-        Preconditions.checkArgument(contents.length <= getMatrixInventory().getContainerSize(), "Invalid inventory size (%s); expected %s or less", contents.length, getMatrixInventory().getContainerSize());
+        Preconditions.checkArgument(contents.length <= this.getMatrixInventory().getContainerSize(), "Invalid inventory size (%s); expected %s or less", contents.length, this.getMatrixInventory().getContainerSize());
 
-        for (int i = 0; i < getMatrixInventory().getContainerSize(); i++) {
+        for (int i = 0; i < this.getMatrixInventory().getContainerSize(); i++) {
             if (i < contents.length) {
-                getMatrixInventory().setItem(i, CraftItemStack.asNMSCopy(contents[i]));
+                this.getMatrixInventory().setItem(i, CraftItemStack.asNMSCopy(contents[i]));
             } else {
-                getMatrixInventory().setItem(i, net.minecraft.world.item.ItemStack.EMPTY);
+                this.getMatrixInventory().setItem(i, net.minecraft.world.item.ItemStack.EMPTY);
             }
         }
     }
 
     @Override
     public void setResult(ItemStack item) {
-        List<net.minecraft.world.item.ItemStack> contents = getResultInventory().getContents();
+        List<net.minecraft.world.item.ItemStack> contents = this.getResultInventory().getContents();
         contents.set(0, CraftItemStack.asNMSCopy(item));
     }
 
     @Override
     public Recipe getRecipe() {
-        RecipeHolder<?> recipe = getMatrixInventory().getCurrentRecipe();
+        RecipeHolder<?> recipe = this.getMatrixInventory().getCurrentRecipe();
         return recipe == null ? null : recipe.toBukkitRecipe();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java
index 38e2eae5aa..c9cc23757a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryCustom.java
@@ -5,8 +5,8 @@ import java.util.ArrayList;
 import java.util.Iterator;
 import java.util.List;
 import net.minecraft.core.NonNullList;
-import net.minecraft.world.IInventory;
-import net.minecraft.world.entity.player.EntityHuman;
+import net.minecraft.world.Container;
+import net.minecraft.world.entity.player.Player;
 import net.minecraft.world.item.ItemStack;
 import org.bukkit.Location;
 import org.bukkit.craftbukkit.entity.CraftHumanEntity;
@@ -31,7 +31,7 @@ public class CraftInventoryCustom extends CraftInventory {
         super(new MinecraftInventory(owner, size, title));
     }
 
-    static class MinecraftInventory implements IInventory {
+    static class MinecraftInventory implements Container {
         private final NonNullList<ItemStack> items;
         private int maxStack = MAX_STACK;
         private final List<HumanEntity> viewers;
@@ -64,37 +64,37 @@ public class CraftInventoryCustom extends CraftInventory {
 
         @Override
         public int getContainerSize() {
-            return items.size();
+            return this.items.size();
         }
 
         @Override
-        public ItemStack getItem(int i) {
-            return items.get(i);
+        public ItemStack getItem(int slot) {
+            return this.items.get(slot);
         }
 
         @Override
-        public ItemStack removeItem(int i, int j) {
-            ItemStack stack = this.getItem(i);
+        public ItemStack removeItem(int slot, int amount) {
+            ItemStack stack = this.getItem(slot);
             ItemStack result;
             if (stack == ItemStack.EMPTY) return stack;
-            if (stack.getCount() <= j) {
-                this.setItem(i, ItemStack.EMPTY);
+            if (stack.getCount() <= amount) {
+                this.setItem(slot, ItemStack.EMPTY);
                 result = stack;
             } else {
-                result = CraftItemStack.copyNMSStack(stack, j);
-                stack.shrink(j);
+                result = CraftItemStack.copyNMSStack(stack, amount);
+                stack.shrink(amount);
             }
             this.setChanged();
             return result;
         }
 
         @Override
-        public ItemStack removeItemNoUpdate(int i) {
-            ItemStack stack = this.getItem(i);
+        public ItemStack removeItemNoUpdate(int slot) {
+            ItemStack stack = this.getItem(slot);
             ItemStack result;
             if (stack == ItemStack.EMPTY) return stack;
             if (stack.getCount() <= 1) {
-                this.setItem(i, null);
+                this.setItem(slot, null);
                 result = stack;
             } else {
                 result = CraftItemStack.copyNMSStack(stack, 1);
@@ -104,78 +104,78 @@ public class CraftInventoryCustom extends CraftInventory {
         }
 
         @Override
-        public void setItem(int i, ItemStack itemstack) {
-            items.set(i, itemstack);
-            if (itemstack != ItemStack.EMPTY && this.getMaxStackSize() > 0 && itemstack.getCount() > this.getMaxStackSize()) {
-                itemstack.setCount(this.getMaxStackSize());
+        public void setItem(int slot, ItemStack stack) {
+            this.items.set(slot, stack);
+            if (stack != ItemStack.EMPTY && this.getMaxStackSize() > 0 && stack.getCount() > this.getMaxStackSize()) {
+                stack.setCount(this.getMaxStackSize());
             }
         }
 
         @Override
         public int getMaxStackSize() {
-            return maxStack;
+            return this.maxStack;
         }
 
         @Override
         public void setMaxStackSize(int size) {
-            maxStack = size;
+            this.maxStack = size;
         }
 
         @Override
         public void setChanged() {}
 
         @Override
-        public boolean stillValid(EntityHuman entityhuman) {
+        public boolean stillValid(Player player) {
             return true;
         }
 
         @Override
         public List<ItemStack> getContents() {
-            return items;
+            return this.items;
         }
 
         @Override
         public void onOpen(CraftHumanEntity who) {
-            viewers.add(who);
+            this.viewers.add(who);
         }
 
         @Override
         public void onClose(CraftHumanEntity who) {
-            viewers.remove(who);
+            this.viewers.remove(who);
         }
 
         @Override
         public List<HumanEntity> getViewers() {
-            return viewers;
+            return this.viewers;
         }
 
         public InventoryType getType() {
-            return type;
+            return this.type;
         }
 
         @Override
         public InventoryHolder getOwner() {
-            return owner;
+            return this.owner;
         }
 
         @Override
-        public boolean canPlaceItem(int i, ItemStack itemstack) {
+        public boolean canPlaceItem(int slot, ItemStack stack) {
             return true;
         }
 
         @Override
-        public void startOpen(EntityHuman entityHuman) {
+        public void startOpen(Player player) {
 
         }
 
         @Override
-        public void stopOpen(EntityHuman entityHuman) {
+        public void stopOpen(Player player) {
 
         }
 
         @Override
         public void clearContent() {
-            items.clear();
+            this.items.clear();
         }
 
         @Override
@@ -184,7 +184,7 @@ public class CraftInventoryCustom extends CraftInventory {
         }
 
         public String getTitle() {
-            return title;
+            return this.title;
         }
 
         @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDecoratedPot.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDecoratedPot.java
index d9c700381d..4f22425145 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDecoratedPot.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDecoratedPot.java
@@ -1,28 +1,28 @@
 package org.bukkit.craftbukkit.inventory;
 
-import net.minecraft.world.IInventory;
+import net.minecraft.world.Container;
 import org.bukkit.block.DecoratedPot;
 import org.bukkit.inventory.DecoratedPotInventory;
 import org.bukkit.inventory.ItemStack;
 
 public class CraftInventoryDecoratedPot extends CraftInventory implements DecoratedPotInventory {
 
-    public CraftInventoryDecoratedPot(IInventory inventory) {
+    public CraftInventoryDecoratedPot(Container inventory) {
         super(inventory);
     }
 
     @Override
     public void setItem(ItemStack item) {
-        setItem(0, item);
+        this.setItem(0, item);
     }
 
     @Override
     public ItemStack getItem() {
-        return getItem(0);
+        return this.getItem(0);
     }
 
     @Override
     public DecoratedPot getHolder() {
-        return (DecoratedPot) inventory.getOwner();
+        return (DecoratedPot) this.inventory.getOwner();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java
index 4caa7c0f71..c00c787a73 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryDoubleChest.java
@@ -1,9 +1,9 @@
 package org.bukkit.craftbukkit.inventory;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.ITileInventory;
-import net.minecraft.world.InventoryLargeChest;
-import net.minecraft.world.level.block.BlockChest;
+import net.minecraft.world.CompoundContainer;
+import net.minecraft.world.MenuProvider;
+import net.minecraft.world.level.block.ChestBlock;
 import org.bukkit.Location;
 import org.bukkit.block.DoubleChest;
 import org.bukkit.inventory.DoubleChestInventory;
@@ -11,50 +11,50 @@ import org.bukkit.inventory.Inventory;
 import org.bukkit.inventory.ItemStack;
 
 public class CraftInventoryDoubleChest extends CraftInventory implements DoubleChestInventory {
-    public ITileInventory tile;
+    public MenuProvider tile;
     private final CraftInventory left;
     private final CraftInventory right;
 
-    public CraftInventoryDoubleChest(BlockChest.DoubleInventory block) {
+    public CraftInventoryDoubleChest(ChestBlock.DoubleInventory block) {
         super(block.inventorylargechest);
         this.tile = block;
         this.left = new CraftInventory(block.inventorylargechest.container1);
         this.right = new CraftInventory(block.inventorylargechest.container2);
     }
 
-    public CraftInventoryDoubleChest(InventoryLargeChest largeChest) {
+    public CraftInventoryDoubleChest(CompoundContainer largeChest) {
         super(largeChest);
-        if (largeChest.container1 instanceof InventoryLargeChest) {
-            left = new CraftInventoryDoubleChest((InventoryLargeChest) largeChest.container1);
+        if (largeChest.container1 instanceof CompoundContainer) {
+            this.left = new CraftInventoryDoubleChest((CompoundContainer) largeChest.container1);
         } else {
-            left = new CraftInventory(largeChest.container1);
+            this.left = new CraftInventory(largeChest.container1);
         }
-        if (largeChest.container2 instanceof InventoryLargeChest) {
-            right = new CraftInventoryDoubleChest((InventoryLargeChest) largeChest.container2);
+        if (largeChest.container2 instanceof CompoundContainer) {
+            this.right = new CraftInventoryDoubleChest((CompoundContainer) largeChest.container2);
         } else {
-            right = new CraftInventory(largeChest.container2);
+            this.right = new CraftInventory(largeChest.container2);
         }
     }
 
     @Override
     public Inventory getLeftSide() {
-        return left;
+        return this.left;
     }
 
     @Override
     public Inventory getRightSide() {
-        return right;
+        return this.right;
     }
 
     @Override
     public void setContents(ItemStack[] items) {
-        Preconditions.checkArgument(items.length <= getInventory().getContainerSize(), "Invalid inventory size (%s); expected %s or less", items.length, getInventory().getContainerSize());
-        ItemStack[] leftItems = new ItemStack[left.getSize()], rightItems = new ItemStack[right.getSize()];
-        System.arraycopy(items, 0, leftItems, 0, Math.min(left.getSize(), items.length));
-        left.setContents(leftItems);
-        if (items.length >= left.getSize()) {
-            System.arraycopy(items, left.getSize(), rightItems, 0, Math.min(right.getSize(), items.length - left.getSize()));
-            right.setContents(rightItems);
+        Preconditions.checkArgument(items.length <= this.getInventory().getContainerSize(), "Invalid inventory size (%s); expected %s or less", items.length, this.getInventory().getContainerSize());
+        ItemStack[] leftItems = new ItemStack[this.left.getSize()], rightItems = new ItemStack[this.right.getSize()];
+        System.arraycopy(items, 0, leftItems, 0, Math.min(this.left.getSize(), items.length));
+        this.left.setContents(leftItems);
+        if (items.length >= this.left.getSize()) {
+            System.arraycopy(items, this.left.getSize(), rightItems, 0, Math.min(this.right.getSize(), items.length - this.left.getSize()));
+            this.right.setContents(rightItems);
         }
     }
 
@@ -65,6 +65,6 @@ public class CraftInventoryDoubleChest extends CraftInventory implements DoubleC
 
     @Override
     public Location getLocation() {
-        return getLeftSide().getLocation().add(getRightSide().getLocation()).multiply(0.5);
+        return this.getLeftSide().getLocation().add(this.getRightSide().getLocation()).multiply(0.5);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryEnchanting.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryEnchanting.java
index 34f6d05836..357aa749e6 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryEnchanting.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryEnchanting.java
@@ -1,31 +1,31 @@
 package org.bukkit.craftbukkit.inventory;
 
-import net.minecraft.world.IInventory;
+import net.minecraft.world.Container;
 import org.bukkit.inventory.EnchantingInventory;
 import org.bukkit.inventory.ItemStack;
 
 public class CraftInventoryEnchanting extends CraftInventory implements EnchantingInventory {
-    public CraftInventoryEnchanting(IInventory inventory) {
+    public CraftInventoryEnchanting(Container inventory) {
         super(inventory);
     }
 
     @Override
     public void setItem(ItemStack item) {
-        setItem(0, item);
+        this.setItem(0, item);
     }
 
     @Override
     public ItemStack getItem() {
-        return getItem(0);
+        return this.getItem(0);
     }
 
     @Override
     public void setSecondary(ItemStack item) {
-        setItem(1, item);
+        this.setItem(1, item);
     }
 
     @Override
     public ItemStack getSecondary() {
-        return getItem(1);
+        return this.getItem(1);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryFurnace.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryFurnace.java
index 09779f9996..29a8cd7667 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryFurnace.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryFurnace.java
@@ -1,47 +1,47 @@
 package org.bukkit.craftbukkit.inventory;
 
-import net.minecraft.world.level.block.entity.TileEntityFurnace;
+import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity;
 import org.bukkit.block.Furnace;
 import org.bukkit.inventory.FurnaceInventory;
 import org.bukkit.inventory.ItemStack;
 
 public class CraftInventoryFurnace extends CraftInventory implements FurnaceInventory {
-    public CraftInventoryFurnace(TileEntityFurnace inventory) {
+    public CraftInventoryFurnace(AbstractFurnaceBlockEntity inventory) {
         super(inventory);
     }
 
     @Override
     public ItemStack getResult() {
-        return getItem(2);
+        return this.getItem(2);
     }
 
     @Override
     public ItemStack getFuel() {
-        return getItem(1);
+        return this.getItem(1);
     }
 
     @Override
     public ItemStack getSmelting() {
-        return getItem(0);
+        return this.getItem(0);
     }
 
     @Override
     public void setFuel(ItemStack stack) {
-        setItem(1, stack);
+        this.setItem(1, stack);
     }
 
     @Override
     public void setResult(ItemStack stack) {
-        setItem(2, stack);
+        this.setItem(2, stack);
     }
 
     @Override
     public void setSmelting(ItemStack stack) {
-        setItem(0, stack);
+        this.setItem(0, stack);
     }
 
     @Override
     public Furnace getHolder() {
-        return (Furnace) inventory.getOwner();
+        return (Furnace) this.inventory.getOwner();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryGrindstone.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryGrindstone.java
index 6a128d638e..9adf5a4440 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryGrindstone.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryGrindstone.java
@@ -1,11 +1,11 @@
 package org.bukkit.craftbukkit.inventory;
 
-import net.minecraft.world.IInventory;
+import net.minecraft.world.Container;
 import org.bukkit.inventory.GrindstoneInventory;
 
 public class CraftInventoryGrindstone extends CraftResultInventory implements GrindstoneInventory {
 
-    public CraftInventoryGrindstone(IInventory inventory, IInventory resultInventory) {
+    public CraftInventoryGrindstone(Container inventory, Container resultInventory) {
         super(inventory, resultInventory);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java
index 478ac8cb8a..5686c13b77 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryHorse.java
@@ -1,26 +1,26 @@
 package org.bukkit.craftbukkit.inventory;
 
-import net.minecraft.world.IInventory;
+import net.minecraft.world.Container;
 import org.bukkit.inventory.HorseInventory;
 import org.bukkit.inventory.ItemStack;
 
 public class CraftInventoryHorse extends CraftInventoryAbstractHorse implements HorseInventory {
 
-    private final IInventory bodyArmorInventory;
+    private final Container bodyArmorInventory;
 
-    public CraftInventoryHorse(IInventory inventory, IInventory bodyArmorInventory) {
+    public CraftInventoryHorse(Container inventory, Container bodyArmorInventory) {
         super(inventory);
         this.bodyArmorInventory = bodyArmorInventory;
     }
 
     @Override
     public ItemStack getArmor() {
-        net.minecraft.world.item.ItemStack item = bodyArmorInventory.getItem(0);
+        net.minecraft.world.item.ItemStack item = this.bodyArmorInventory.getItem(0);
         return item.isEmpty() ? null : CraftItemStack.asCraftMirror(item);
     }
 
     @Override
     public void setArmor(ItemStack stack) {
-        bodyArmorInventory.setItem(0, CraftItemStack.asNMSCopy(stack));
+        this.bodyArmorInventory.setItem(0, CraftItemStack.asNMSCopy(stack));
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryJukebox.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryJukebox.java
index a864a17a44..3bdbd0f490 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryJukebox.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryJukebox.java
@@ -1,32 +1,32 @@
 package org.bukkit.craftbukkit.inventory;
 
-import net.minecraft.world.IInventory;
+import net.minecraft.world.Container;
 import org.bukkit.block.Jukebox;
 import org.bukkit.inventory.ItemStack;
 import org.bukkit.inventory.JukeboxInventory;
 
 public class CraftInventoryJukebox extends CraftInventory implements JukeboxInventory {
 
-    public CraftInventoryJukebox(IInventory inventory) {
+    public CraftInventoryJukebox(Container inventory) {
         super(inventory);
     }
 
     @Override
     public void setRecord(ItemStack item) {
         if (item == null) {
-            inventory.removeItem(0, 0); // Second parameter is unused in TileEntityJukebox
+            this.inventory.removeItem(0, 0); // Second parameter is unused in TileEntityJukebox
         } else {
-            setItem(0, item);
+            this.setItem(0, item);
         }
     }
 
     @Override
     public ItemStack getRecord() {
-        return getItem(0);
+        return this.getItem(0);
     }
 
     @Override
     public Jukebox getHolder() {
-        return (Jukebox) inventory.getOwner();
+        return (Jukebox) this.inventory.getOwner();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryLectern.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryLectern.java
index 1dc832abf4..3605c9573a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryLectern.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryLectern.java
@@ -1,24 +1,24 @@
 package org.bukkit.craftbukkit.inventory;
 
-import net.minecraft.world.IInventory;
-import net.minecraft.world.ITileInventory;
-import net.minecraft.world.level.block.entity.TileEntityLectern;
+import net.minecraft.world.Container;
+import net.minecraft.world.MenuProvider;
+import net.minecraft.world.level.block.entity.LecternBlockEntity;
 import org.bukkit.block.Lectern;
 import org.bukkit.inventory.LecternInventory;
 
 public class CraftInventoryLectern extends CraftInventory implements LecternInventory {
 
-    public ITileInventory tile;
+    public MenuProvider tile;
 
-    public CraftInventoryLectern(IInventory inventory) {
+    public CraftInventoryLectern(Container inventory) {
         super(inventory);
-        if (inventory instanceof TileEntityLectern.LecternInventory) {
-            this.tile = ((TileEntityLectern.LecternInventory) inventory).getLectern();
+        if (inventory instanceof LecternBlockEntity.LecternInventory) {
+            this.tile = ((LecternBlockEntity.LecternInventory) inventory).getLectern();
         }
     }
 
     @Override
     public Lectern getHolder() {
-        return (Lectern) inventory.getOwner();
+        return (Lectern) this.inventory.getOwner();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryLlama.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryLlama.java
index 729b334696..dcbc80646e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryLlama.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryLlama.java
@@ -1,26 +1,26 @@
 package org.bukkit.craftbukkit.inventory;
 
-import net.minecraft.world.IInventory;
+import net.minecraft.world.Container;
 import org.bukkit.inventory.ItemStack;
 import org.bukkit.inventory.LlamaInventory;
 
 public class CraftInventoryLlama extends CraftInventoryAbstractHorse implements LlamaInventory {
 
-    private final IInventory bodyArmorInventory;
+    private final Container bodyArmorInventory;
 
-    public CraftInventoryLlama(IInventory inventory, IInventory bodyArmorInventory) {
+    public CraftInventoryLlama(Container inventory, Container bodyArmorInventory) {
         super(inventory);
         this.bodyArmorInventory = bodyArmorInventory;
     }
 
     @Override
     public ItemStack getDecor() {
-        net.minecraft.world.item.ItemStack item = bodyArmorInventory.getItem(0);
+        net.minecraft.world.item.ItemStack item = this.bodyArmorInventory.getItem(0);
         return item.isEmpty() ? null : CraftItemStack.asCraftMirror(item);
     }
 
     @Override
     public void setDecor(ItemStack stack) {
-        bodyArmorInventory.setItem(0, CraftItemStack.asNMSCopy(stack));
+        this.bodyArmorInventory.setItem(0, CraftItemStack.asNMSCopy(stack));
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryLoom.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryLoom.java
index 2c6ab7d547..b9c8790d78 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryLoom.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryLoom.java
@@ -1,11 +1,11 @@
 package org.bukkit.craftbukkit.inventory;
 
-import net.minecraft.world.IInventory;
+import net.minecraft.world.Container;
 import org.bukkit.inventory.LoomInventory;
 
 public class CraftInventoryLoom extends CraftResultInventory implements LoomInventory {
 
-    public CraftInventoryLoom(IInventory inventory, IInventory resultInventory) {
+    public CraftInventoryLoom(Container inventory, Container resultInventory) {
         super(inventory, resultInventory);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryMerchant.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryMerchant.java
index 979ae513ae..9f2c4352c0 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryMerchant.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryMerchant.java
@@ -1,38 +1,37 @@
 package org.bukkit.craftbukkit.inventory;
 
-import net.minecraft.world.inventory.InventoryMerchant;
-import net.minecraft.world.item.trading.IMerchant;
+import net.minecraft.world.inventory.MerchantContainer;
 import org.bukkit.inventory.Merchant;
 import org.bukkit.inventory.MerchantInventory;
 import org.bukkit.inventory.MerchantRecipe;
 
 public class CraftInventoryMerchant extends CraftInventory implements MerchantInventory {
 
-    private final IMerchant merchant;
+    private final net.minecraft.world.item.trading.Merchant merchant;
 
-    public CraftInventoryMerchant(IMerchant merchant, InventoryMerchant inventory) {
+    public CraftInventoryMerchant(net.minecraft.world.item.trading.Merchant merchant, MerchantContainer inventory) {
         super(inventory);
         this.merchant = merchant;
     }
 
     @Override
     public int getSelectedRecipeIndex() {
-        return getInventory().selectionHint;
+        return this.getInventory().selectionHint;
     }
 
     @Override
     public MerchantRecipe getSelectedRecipe() {
-        net.minecraft.world.item.trading.MerchantRecipe nmsRecipe = getInventory().getActiveOffer();
+        net.minecraft.world.item.trading.MerchantOffer nmsRecipe = this.getInventory().getActiveOffer();
         return (nmsRecipe == null) ? null : nmsRecipe.asBukkit();
     }
 
     @Override
-    public InventoryMerchant getInventory() {
-        return (InventoryMerchant) inventory;
+    public MerchantContainer getInventory() {
+        return (MerchantContainer) this.inventory;
     }
 
     @Override
     public Merchant getMerchant() {
-        return merchant.getCraftMerchant();
+        return this.merchant.getCraftMerchant();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java
index 88327c35a5..f039c5041e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryPlayer.java
@@ -1,10 +1,10 @@
 package org.bukkit.craftbukkit.inventory;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.network.protocol.game.PacketPlayOutHeldItemSlot;
-import net.minecraft.network.protocol.game.PacketPlayOutSetSlot;
-import net.minecraft.server.level.EntityPlayer;
-import net.minecraft.world.entity.player.PlayerInventory;
+import net.minecraft.network.protocol.game.ClientboundContainerSetSlotPacket;
+import net.minecraft.network.protocol.game.ClientboundSetHeldSlotPacket;
+import net.minecraft.server.level.ServerPlayer;
+import net.minecraft.world.entity.player.Inventory;
 import org.bukkit.craftbukkit.entity.CraftPlayer;
 import org.bukkit.entity.HumanEntity;
 import org.bukkit.inventory.EntityEquipment;
@@ -12,67 +12,67 @@ import org.bukkit.inventory.EquipmentSlot;
 import org.bukkit.inventory.ItemStack;
 
 public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.inventory.PlayerInventory, EntityEquipment {
-    public CraftInventoryPlayer(net.minecraft.world.entity.player.PlayerInventory inventory) {
+    public CraftInventoryPlayer(net.minecraft.world.entity.player.Inventory inventory) {
         super(inventory);
     }
 
     @Override
-    public PlayerInventory getInventory() {
-        return (PlayerInventory) inventory;
+    public Inventory getInventory() {
+        return (Inventory) this.inventory;
     }
 
     @Override
     public ItemStack[] getStorageContents() {
-        return asCraftMirror(getInventory().items);
+        return this.asCraftMirror(this.getInventory().items);
     }
 
     @Override
     public ItemStack getItemInMainHand() {
-        return CraftItemStack.asCraftMirror(getInventory().getSelected());
+        return CraftItemStack.asCraftMirror(this.getInventory().getSelected());
     }
 
     @Override
     public void setItemInMainHand(ItemStack item) {
-        setItem(getHeldItemSlot(), item);
+        this.setItem(this.getHeldItemSlot(), item);
     }
 
     @Override
     public void setItemInMainHand(ItemStack item, boolean silent) {
-        setItemInMainHand(item); // Silence doesn't apply to players
+        this.setItemInMainHand(item); // Silence doesn't apply to players
     }
 
     @Override
     public ItemStack getItemInOffHand() {
-        return CraftItemStack.asCraftMirror(getInventory().offhand.get(0));
+        return CraftItemStack.asCraftMirror(this.getInventory().offhand.get(0));
     }
 
     @Override
     public void setItemInOffHand(ItemStack item) {
-        ItemStack[] extra = getExtraContents();
+        ItemStack[] extra = this.getExtraContents();
         extra[0] = item;
-        setExtraContents(extra);
+        this.setExtraContents(extra);
     }
 
     @Override
     public void setItemInOffHand(ItemStack item, boolean silent) {
-        setItemInOffHand(item); // Silence doesn't apply to players
+        this.setItemInOffHand(item); // Silence doesn't apply to players
     }
 
     @Override
     public ItemStack getItemInHand() {
-        return getItemInMainHand();
+        return this.getItemInMainHand();
     }
 
     @Override
     public void setItemInHand(ItemStack stack) {
-        setItemInMainHand(stack);
+        this.setItemInMainHand(stack);
     }
 
     @Override
     public void setItem(int index, ItemStack item) {
         super.setItem(index, item);
         if (this.getHolder() == null) return;
-        EntityPlayer player = ((CraftPlayer) this.getHolder()).getHandle();
+        ServerPlayer player = ((CraftPlayer) this.getHolder()).getHandle();
         if (player.connection == null) return;
         // PacketPlayOutSetSlot places the items differently than setItem()
         //
@@ -102,14 +102,14 @@ public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.i
         // to reverse the order of the index from 8. That means we need 0 to correspond to 8, 1 to correspond to 7,
         // 2 to correspond to 6, and 3 to correspond to 5. We do this simply by taking the result of (index - 36) and
         // subtracting that value from 8.
-        if (index < PlayerInventory.getSelectionSize()) {
+        if (index < Inventory.getSelectionSize()) {
             index += 36;
         } else if (index > 39) {
             index += 5; // Off hand
         } else if (index > 35) {
             index = 8 - (index - 36);
         }
-        player.connection.send(new PacketPlayOutSetSlot(player.inventoryMenu.containerId, player.inventoryMenu.incrementStateId(), index, CraftItemStack.asNMSCopy(item)));
+        player.connection.send(new ClientboundContainerSetSlotPacket(player.inventoryMenu.containerId, player.inventoryMenu.incrementStateId(), index, CraftItemStack.asNMSCopy(item)));
     }
 
     @Override
@@ -142,7 +142,7 @@ public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.i
 
     @Override
     public void setItem(EquipmentSlot slot, ItemStack item, boolean silent) {
-        setItem(slot, item); // Silence doesn't apply to players
+        this.setItem(slot, item); // Silence doesn't apply to players
     }
 
     @Override
@@ -151,17 +151,17 @@ public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.i
 
         switch (slot) {
             case HAND:
-                return getItemInMainHand();
+                return this.getItemInMainHand();
             case OFF_HAND:
-                return getItemInOffHand();
+                return this.getItemInOffHand();
             case FEET:
-                return getBoots();
+                return this.getBoots();
             case LEGS:
-                return getLeggings();
+                return this.getLeggings();
             case CHEST:
-                return getChestplate();
+                return this.getChestplate();
             case HEAD:
-                return getHelmet();
+                return this.getHelmet();
             default:
                 throw new IllegalArgumentException("Could not get slot " + slot + " - not a valid slot for PlayerInventory");
         }
@@ -169,79 +169,79 @@ public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.i
 
     @Override
     public int getHeldItemSlot() {
-        return getInventory().selected;
+        return this.getInventory().selected;
     }
 
     @Override
     public void setHeldItemSlot(int slot) {
-        Preconditions.checkArgument(slot >= 0 && slot < PlayerInventory.getSelectionSize(), "Slot (%s) is not between 0 and %s inclusive", slot, PlayerInventory.getSelectionSize() - 1);
+        Preconditions.checkArgument(slot >= 0 && slot < Inventory.getSelectionSize(), "Slot (%s) is not between 0 and %s inclusive", slot, Inventory.getSelectionSize() - 1);
         this.getInventory().selected = slot;
-        ((CraftPlayer) this.getHolder()).getHandle().connection.send(new PacketPlayOutHeldItemSlot(slot));
+        ((CraftPlayer) this.getHolder()).getHandle().connection.send(new ClientboundSetHeldSlotPacket(slot));
     }
 
     @Override
     public ItemStack getHelmet() {
-        return getItem(getSize() - 2);
+        return this.getItem(this.getSize() - 2);
     }
 
     @Override
     public ItemStack getChestplate() {
-        return getItem(getSize() - 3);
+        return this.getItem(this.getSize() - 3);
     }
 
     @Override
     public ItemStack getLeggings() {
-        return getItem(getSize() - 4);
+        return this.getItem(this.getSize() - 4);
     }
 
     @Override
     public ItemStack getBoots() {
-        return getItem(getSize() - 5);
+        return this.getItem(this.getSize() - 5);
     }
 
     @Override
     public void setHelmet(ItemStack helmet) {
-        setItem(getSize() - 2, helmet);
+        this.setItem(this.getSize() - 2, helmet);
     }
 
     @Override
     public void setHelmet(ItemStack helmet, boolean silent) {
-        setHelmet(helmet); // Silence doesn't apply to players
+        this.setHelmet(helmet); // Silence doesn't apply to players
     }
 
     @Override
     public void setChestplate(ItemStack chestplate) {
-        setItem(getSize() - 3, chestplate);
+        this.setItem(this.getSize() - 3, chestplate);
     }
 
     @Override
     public void setChestplate(ItemStack chestplate, boolean silent) {
-        setChestplate(chestplate); // Silence doesn't apply to players
+        this.setChestplate(chestplate); // Silence doesn't apply to players
     }
 
     @Override
     public void setLeggings(ItemStack leggings) {
-        setItem(getSize() - 4, leggings);
+        this.setItem(this.getSize() - 4, leggings);
     }
 
     @Override
     public void setLeggings(ItemStack leggings, boolean silent) {
-        setLeggings(leggings); // Silence doesn't apply to players
+        this.setLeggings(leggings); // Silence doesn't apply to players
     }
 
     @Override
     public void setBoots(ItemStack boots) {
-        setItem(getSize() - 5, boots);
+        this.setItem(this.getSize() - 5, boots);
     }
 
     @Override
     public void setBoots(ItemStack boots, boolean silent) {
-        setBoots(boots); // Silence doesn't apply to players
+        this.setBoots(boots); // Silence doesn't apply to players
     }
 
     @Override
     public ItemStack[] getArmorContents() {
-        return asCraftMirror(getInventory().armor);
+        return this.asCraftMirror(this.getInventory().armor);
     }
 
     private void setSlots(ItemStack[] items, int baseSlot, int length) {
@@ -252,46 +252,46 @@ public class CraftInventoryPlayer extends CraftInventory implements org.bukkit.i
 
         for (int i = 0; i < length; i++) {
             if (i >= items.length) {
-                setItem(baseSlot + i, null);
+                this.setItem(baseSlot + i, null);
             } else {
-                setItem(baseSlot + i, items[i]);
+                this.setItem(baseSlot + i, items[i]);
             }
         }
     }
 
     @Override
     public void setStorageContents(ItemStack[] items) throws IllegalArgumentException {
-        setSlots(items, 0, getInventory().items.size());
+        this.setSlots(items, 0, this.getInventory().items.size());
     }
 
     @Override
     public void setArmorContents(ItemStack[] items) {
-        setSlots(items, getInventory().items.size(), getInventory().armor.size());
+        this.setSlots(items, this.getInventory().items.size(), this.getInventory().armor.size());
     }
 
     @Override
     public ItemStack[] getExtraContents() {
-        return asCraftMirror(getInventory().offhand);
+        return this.asCraftMirror(this.getInventory().offhand);
     }
 
     @Override
     public void setExtraContents(ItemStack[] items) {
-        setSlots(items, getInventory().items.size() + getInventory().armor.size(), getInventory().offhand.size());
+        this.setSlots(items, this.getInventory().items.size() + this.getInventory().armor.size(), this.getInventory().offhand.size());
     }
 
     @Override
     public HumanEntity getHolder() {
-        return (HumanEntity) inventory.getOwner();
+        return (HumanEntity) this.inventory.getOwner();
     }
 
     @Override
     public float getItemInHandDropChance() {
-        return getItemInMainHandDropChance();
+        return this.getItemInMainHandDropChance();
     }
 
     @Override
     public void setItemInHandDropChance(float chance) {
-        setItemInMainHandDropChance(chance);
+        this.setItemInMainHandDropChance(chance);
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventorySmithing.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventorySmithing.java
index 3259b09d93..42c00a9eaf 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventorySmithing.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventorySmithing.java
@@ -1,7 +1,7 @@
 package org.bukkit.craftbukkit.inventory;
 
-import net.minecraft.world.IInventory;
-import net.minecraft.world.inventory.InventoryCraftResult;
+import net.minecraft.world.Container;
+import net.minecraft.world.inventory.ResultContainer;
 import net.minecraft.world.item.crafting.RecipeHolder;
 import org.bukkit.Location;
 import org.bukkit.inventory.ItemStack;
@@ -12,34 +12,34 @@ public class CraftInventorySmithing extends CraftResultInventory implements Smit
 
     private final Location location;
 
-    public CraftInventorySmithing(Location location, IInventory inventory, InventoryCraftResult resultInventory) {
+    public CraftInventorySmithing(Location location, Container inventory, ResultContainer resultInventory) {
         super(inventory, resultInventory);
         this.location = location;
     }
 
     @Override
-    public InventoryCraftResult getResultInventory() {
-        return (InventoryCraftResult) super.getResultInventory();
+    public ResultContainer getResultInventory() {
+        return (ResultContainer) super.getResultInventory();
     }
 
     @Override
     public Location getLocation() {
-        return location;
+        return this.location;
     }
 
     @Override
     public ItemStack getResult() {
-        return getItem(3);
+        return this.getItem(3);
     }
 
     @Override
     public void setResult(ItemStack item) {
-        setItem(3, item);
+        this.setItem(3, item);
     }
 
     @Override
     public Recipe getRecipe() {
-        RecipeHolder<?> recipe = getResultInventory().getRecipeUsed();
+        RecipeHolder<?> recipe = this.getResultInventory().getRecipeUsed();
         return (recipe == null) ? null : recipe.toBukkitRecipe();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryStonecutter.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryStonecutter.java
index 016aa57b3b..d0a2f4dab6 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryStonecutter.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryStonecutter.java
@@ -1,11 +1,11 @@
 package org.bukkit.craftbukkit.inventory;
 
-import net.minecraft.world.IInventory;
+import net.minecraft.world.Container;
 import org.bukkit.inventory.StonecutterInventory;
 
 public class CraftInventoryStonecutter extends CraftResultInventory implements StonecutterInventory {
 
-    public CraftInventoryStonecutter(IInventory inventory, IInventory resultInventory) {
+    public CraftInventoryStonecutter(Container inventory, Container resultInventory) {
         super(inventory, resultInventory);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java
index b3bab07922..d89b178dc8 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftInventoryView.java
@@ -1,10 +1,10 @@
 package org.bukkit.craftbukkit.inventory;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.network.protocol.game.PacketPlayOutOpenWindow;
-import net.minecraft.server.level.EntityPlayer;
-import net.minecraft.world.inventory.Container;
-import net.minecraft.world.inventory.Containers;
+import net.minecraft.network.protocol.game.ClientboundOpenScreenPacket;
+import net.minecraft.server.level.ServerPlayer;
+import net.minecraft.world.inventory.AbstractContainerMenu;
+import net.minecraft.world.inventory.MenuType;
 import org.bukkit.GameMode;
 import org.bukkit.craftbukkit.entity.CraftHumanEntity;
 import org.bukkit.craftbukkit.util.CraftChatMessage;
@@ -15,7 +15,7 @@ import org.bukkit.inventory.Inventory;
 import org.bukkit.inventory.InventoryView;
 import org.bukkit.inventory.ItemStack;
 
-public class CraftInventoryView<T extends Container, I extends Inventory> extends CraftAbstractInventoryView {
+public class CraftInventoryView<T extends AbstractContainerMenu, I extends Inventory> extends CraftAbstractInventoryView {
     protected final T container;
     private final CraftHumanEntity player;
     private final I viewing;
@@ -28,28 +28,28 @@ public class CraftInventoryView<T extends Container, I extends Inventory> extend
         this.viewing = viewing;
         this.container = container;
         this.originalTitle = CraftChatMessage.fromComponent(container.getTitle());
-        this.title = originalTitle;
+        this.title = this.originalTitle;
     }
 
     @Override
     public I getTopInventory() {
-        return viewing;
+        return this.viewing;
     }
 
     @Override
     public Inventory getBottomInventory() {
-        return player.getInventory();
+        return this.player.getInventory();
     }
 
     @Override
     public HumanEntity getPlayer() {
-        return player;
+        return this.player;
     }
 
     @Override
     public InventoryType getType() {
-        InventoryType type = viewing.getType();
-        if (type == InventoryType.CRAFTING && player.getGameMode() == GameMode.CREATIVE) {
+        InventoryType type = this.viewing.getType();
+        if (type == InventoryType.CRAFTING && this.player.getGameMode() == GameMode.CREATIVE) {
             return InventoryType.CREATIVE;
         }
         return type;
@@ -59,9 +59,9 @@ public class CraftInventoryView<T extends Container, I extends Inventory> extend
     public void setItem(int slot, ItemStack item) {
         net.minecraft.world.item.ItemStack stack = CraftItemStack.asNMSCopy(item);
         if (slot >= 0) {
-            container.getSlot(slot).set(stack);
+            this.container.getSlot(slot).set(stack);
         } else {
-            player.getHandle().drop(stack, false);
+            this.player.getHandle().drop(stack, false);
         }
     }
 
@@ -70,31 +70,31 @@ public class CraftInventoryView<T extends Container, I extends Inventory> extend
         if (slot < 0) {
             return null;
         }
-        return CraftItemStack.asCraftMirror(container.getSlot(slot).getItem());
+        return CraftItemStack.asCraftMirror(this.container.getSlot(slot).getItem());
     }
 
     @Override
     public String getTitle() {
-        return title;
+        return this.title;
     }
 
     @Override
     public String getOriginalTitle() {
-        return originalTitle;
+        return this.originalTitle;
     }
 
     @Override
     public void setTitle(String title) {
-        sendInventoryTitleChange(this, title);
+        CraftInventoryView.sendInventoryTitleChange(this, title);
         this.title = title;
     }
 
     public boolean isInTop(int rawSlot) {
-        return rawSlot < viewing.getSize();
+        return rawSlot < this.viewing.getSize();
     }
 
-    public Container getHandle() {
-        return container;
+    public AbstractContainerMenu getHandle() {
+        return this.container;
     }
 
     public static void sendInventoryTitleChange(InventoryView view, String title) {
@@ -103,10 +103,10 @@ public class CraftInventoryView<T extends Container, I extends Inventory> extend
         Preconditions.checkArgument(view.getPlayer() instanceof Player, "NPCs are not currently supported for this function");
         Preconditions.checkArgument(view.getTopInventory().getType().isCreatable(), "Only creatable inventories can have their title changed");
 
-        final EntityPlayer entityPlayer = (EntityPlayer) ((CraftHumanEntity) view.getPlayer()).getHandle();
+        final ServerPlayer entityPlayer = (ServerPlayer) ((CraftHumanEntity) view.getPlayer()).getHandle();
         final int containerId = entityPlayer.containerMenu.containerId;
-        final Containers<?> windowType = CraftContainer.getNotchInventoryType(view.getTopInventory());
-        entityPlayer.connection.send(new PacketPlayOutOpenWindow(containerId, windowType, CraftChatMessage.fromString(title)[0]));
+        final MenuType<?> windowType = CraftContainer.getNotchInventoryType(view.getTopInventory());
+        entityPlayer.connection.send(new ClientboundOpenScreenPacket(containerId, windowType, CraftChatMessage.fromString(title)[0]));
         ((Player) view.getPlayer()).updateInventory();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemCraftResult.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemCraftResult.java
index 44a919a45a..79a807e354 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemCraftResult.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemCraftResult.java
@@ -18,27 +18,27 @@ public final class CraftItemCraftResult implements ItemCraftResult {
         this.resultMatrix = new ItemStack[9];
         this.overflowItems = new ArrayList<>();
 
-        for (int i = 0; i < resultMatrix.length; i++) {
-            resultMatrix[i] = new ItemStack(Material.AIR);
+        for (int i = 0; i < this.resultMatrix.length; i++) {
+            this.resultMatrix[i] = new ItemStack(Material.AIR);
         }
     }
 
     @Override
     public ItemStack getResult() {
-        return result;
+        return this.result;
     }
 
     @Override
     public ItemStack[] getResultingMatrix() {
-        return resultMatrix;
+        return this.resultMatrix;
     }
 
     @Override
     public List<ItemStack> getOverflowItems() {
-        return overflowItems;
+        return this.overflowItems;
     }
 
     public void setResultMatrix(int i, ItemStack itemStack) {
-        resultMatrix[i] = Objects.requireNonNullElseGet(itemStack, () -> new ItemStack(Material.AIR));
+        this.resultMatrix[i] = Objects.requireNonNullElseGet(itemStack, () -> new ItemStack(Material.AIR));
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
index 9ee1629734..cc70796e0a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemFactory.java
@@ -4,19 +4,18 @@ import com.google.common.base.Preconditions;
 import com.mojang.brigadier.StringReader;
 import com.mojang.brigadier.exceptions.CommandSyntaxException;
 import java.util.Optional;
-import net.minecraft.commands.arguments.item.ArgumentParserItemStack;
+import net.minecraft.commands.arguments.item.ItemParser;
 import net.minecraft.core.HolderSet;
-import net.minecraft.core.IRegistryCustom;
+import net.minecraft.core.RegistryAccess;
 import net.minecraft.core.component.DataComponentPatch;
 import net.minecraft.core.registries.Registries;
 import net.minecraft.server.MinecraftServer;
 import net.minecraft.tags.EnchantmentTags;
 import net.minecraft.util.RandomSource;
-import net.minecraft.world.entity.EntityTypes;
 import net.minecraft.world.item.Item;
-import net.minecraft.world.item.ItemMonsterEgg;
+import net.minecraft.world.item.SpawnEggItem;
 import net.minecraft.world.item.enchantment.Enchantment;
-import net.minecraft.world.item.enchantment.EnchantmentManager;
+import net.minecraft.world.item.enchantment.EnchantmentHelper;
 import org.bukkit.Color;
 import org.bukkit.Material;
 import org.bukkit.World;
@@ -63,7 +62,7 @@ public final class CraftItemFactory implements ItemFactory {
         if (itemstack == null) {
             return false;
         }
-        return isApplicable(meta, itemstack.getType());
+        return this.isApplicable(meta, itemstack.getType());
     }
 
     @Override
@@ -81,7 +80,7 @@ public final class CraftItemFactory implements ItemFactory {
     @Override
     public ItemMeta getItemMeta(Material material) {
         Preconditions.checkArgument(material != null, "Material cannot be null");
-        return getItemMeta(material, null);
+        return this.getItemMeta(material, null);
     }
 
     private ItemMeta getItemMeta(Material material, CraftMetaItem meta) {
@@ -112,7 +111,7 @@ public final class CraftItemFactory implements ItemFactory {
             return ((CraftMetaItem) meta1).isEmpty();
         }
 
-        return equals((CraftMetaItem) meta1, (CraftMetaItem) meta2);
+        return this.equals((CraftMetaItem) meta1, (CraftMetaItem) meta2);
     }
 
     boolean equals(CraftMetaItem meta1, CraftMetaItem meta2) {
@@ -129,31 +128,31 @@ public final class CraftItemFactory implements ItemFactory {
     }
 
     public static CraftItemFactory instance() {
-        return instance;
+        return CraftItemFactory.instance;
     }
 
     @Override
     public ItemMeta asMetaFor(ItemMeta meta, ItemStack stack) {
         Preconditions.checkArgument(stack != null, "ItemStack stack cannot be null");
-        return asMetaFor(meta, stack.getType());
+        return this.asMetaFor(meta, stack.getType());
     }
 
     @Override
     public ItemMeta asMetaFor(ItemMeta meta, Material material) {
         Preconditions.checkArgument(material != null, "Material cannot be null");
         Preconditions.checkArgument(meta instanceof CraftMetaItem, "ItemMeta of %s not created by %s", (meta != null ? meta.getClass().toString() : "null"), CraftItemFactory.class.getName());
-        return getItemMeta(material, (CraftMetaItem) meta);
+        return this.getItemMeta(material, (CraftMetaItem) meta);
     }
 
     @Override
     public Color getDefaultLeatherColor() {
-        return DEFAULT_LEATHER_COLOR;
+        return CraftItemFactory.DEFAULT_LEATHER_COLOR;
     }
 
     @Override
     public ItemStack createItemStack(String input) throws IllegalArgumentException {
         try {
-            ArgumentParserItemStack.a arg = new ArgumentParserItemStack(MinecraftServer.getDefaultRegistryAccess()).parse(new StringReader(input));
+            ItemParser.ItemResult arg = new ItemParser(MinecraftServer.getDefaultRegistryAccess()).parse(new StringReader(input));
 
             Item item = arg.item().value();
             net.minecraft.world.item.ItemStack nmsItemStack = new net.minecraft.world.item.ItemStack(item);
@@ -174,8 +173,8 @@ public final class CraftItemFactory implements ItemFactory {
         if (type == EntityType.UNKNOWN) {
             return null;
         }
-        EntityTypes<?> nmsType = CraftEntityType.bukkitToMinecraft(type);
-        Item nmsItem = ItemMonsterEgg.byId(nmsType);
+        net.minecraft.world.entity.EntityType<?> nmsType = CraftEntityType.bukkitToMinecraft(type);
+        Item nmsItem = SpawnEggItem.byId(nmsType);
 
         if (nmsItem == null) {
             return null;
@@ -188,19 +187,19 @@ public final class CraftItemFactory implements ItemFactory {
     public ItemStack enchantItem(Entity entity, ItemStack itemStack, int level, boolean allowTreasures) {
         Preconditions.checkArgument(entity != null, "The entity must not be null");
 
-        return enchantItem(((CraftEntity) entity).getHandle().random, itemStack, level, allowTreasures);
+        return CraftItemFactory.enchantItem(((CraftEntity) entity).getHandle().random, itemStack, level, allowTreasures);
     }
 
     @Override
     public ItemStack enchantItem(final World world, final ItemStack itemStack, final int level, final boolean allowTreasures) {
         Preconditions.checkArgument(world != null, "The world must not be null");
 
-        return enchantItem(((CraftWorld) world).getHandle().random, itemStack, level, allowTreasures);
+        return CraftItemFactory.enchantItem(((CraftWorld) world).getHandle().random, itemStack, level, allowTreasures);
     }
 
     @Override
     public ItemStack enchantItem(final ItemStack itemStack, final int level, final boolean allowTreasures) {
-        return enchantItem(randomSource, itemStack, level, allowTreasures);
+        return CraftItemFactory.enchantItem(CraftItemFactory.randomSource, itemStack, level, allowTreasures);
     }
 
     private static ItemStack enchantItem(RandomSource source, ItemStack itemStack, int level, boolean allowTreasures) {
@@ -208,8 +207,8 @@ public final class CraftItemFactory implements ItemFactory {
         Preconditions.checkArgument(!itemStack.getType().isAir(), "ItemStack must not be air");
         itemStack = CraftItemStack.asCraftCopy(itemStack);
         CraftItemStack craft = (CraftItemStack) itemStack;
-        IRegistryCustom registry = CraftRegistry.getMinecraftRegistry();
+        RegistryAccess registry = CraftRegistry.getMinecraftRegistry();
         Optional<HolderSet.Named<Enchantment>> optional = (allowTreasures) ? Optional.empty() : registry.lookupOrThrow(Registries.ENCHANTMENT).get(EnchantmentTags.IN_ENCHANTING_TABLE);
-        return CraftItemStack.asCraftMirror(EnchantmentManager.enchantItem(source, craft.handle, level, registry, optional));
+        return CraftItemStack.asCraftMirror(EnchantmentHelper.enchantItem(source, craft.handle, level, registry, optional));
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java
index ca8009cb1d..7e3199567f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemMetas.java
@@ -2,15 +2,15 @@ package org.bukkit.craftbukkit.inventory;
 
 import java.util.function.BiFunction;
 import java.util.function.Function;
+import net.minecraft.world.item.BannerItem;
+import net.minecraft.world.item.BlockItem;
 import net.minecraft.world.item.BundleItem;
 import net.minecraft.world.item.Item;
-import net.minecraft.world.item.ItemBanner;
-import net.minecraft.world.item.ItemBlock;
-import net.minecraft.world.item.ItemMonsterEgg;
-import net.minecraft.world.item.ItemSign;
 import net.minecraft.world.item.ItemStack;
+import net.minecraft.world.item.SignItem;
+import net.minecraft.world.item.SpawnEggItem;
 import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.block.BlockShulkerBox;
+import net.minecraft.world.level.block.ShulkerBoxBlock;
 import org.bukkit.inventory.ItemType;
 import org.bukkit.inventory.meta.ArmorMeta;
 import org.bukkit.inventory.meta.AxolotlBucketMeta;
@@ -159,22 +159,22 @@ public final class CraftItemMetas {
     // which would result in dead memory once all ItemTypes have cached the data.
     public static <I extends ItemMeta> ItemMetaData<I> getItemMetaData(CraftItemType<?> itemType) {
         Item itemHandle = itemType.getHandle();
-        Block blockHandle = (itemHandle instanceof ItemBlock itemBlock) ? itemBlock.getBlock() : null;
+        Block blockHandle = (itemHandle instanceof BlockItem itemBlock) ? itemBlock.getBlock() : null;
 
         if (itemType == ItemType.AIR) {
-            return asType(EMPTY_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.EMPTY_META_DATA);
         }
         if (itemType == ItemType.WRITTEN_BOOK) {
-            return asType(SIGNED_BOOK_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.SIGNED_BOOK_META_DATA);
         }
         if (itemType == ItemType.WRITABLE_BOOK) {
-            return asType(WRITABLE_BOOK_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.WRITABLE_BOOK_META_DATA);
         }
         if (itemType == ItemType.CREEPER_HEAD || itemType == ItemType.DRAGON_HEAD
                 || itemType == ItemType.PIGLIN_HEAD || itemType == ItemType.PLAYER_HEAD
                 || itemType == ItemType.SKELETON_SKULL || itemType == ItemType.WITHER_SKELETON_SKULL
                 || itemType == ItemType.ZOMBIE_HEAD) {
-            return asType(SKULL_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.SKULL_META_DATA);
         }
         if (itemType == ItemType.CHAINMAIL_HELMET || itemType == ItemType.CHAINMAIL_CHESTPLATE
                 || itemType == ItemType.CHAINMAIL_LEGGINGS || itemType == ItemType.CHAINMAIL_BOOTS
@@ -187,54 +187,54 @@ public final class CraftItemMetas {
                 || itemType == ItemType.NETHERITE_HELMET || itemType == ItemType.NETHERITE_CHESTPLATE
                 || itemType == ItemType.NETHERITE_LEGGINGS || itemType == ItemType.NETHERITE_BOOTS
                 || itemType == ItemType.TURTLE_HELMET) {
-            return asType(ARMOR_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.ARMOR_META_DATA);
         }
         if (itemType == ItemType.LEATHER_HELMET || itemType == ItemType.LEATHER_CHESTPLATE
                 || itemType == ItemType.LEATHER_LEGGINGS || itemType == ItemType.LEATHER_BOOTS
                 || itemType == ItemType.WOLF_ARMOR) {
-            return asType(COLORABLE_ARMOR_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.COLORABLE_ARMOR_META_DATA);
         }
         if (itemType == ItemType.LEATHER_HORSE_ARMOR) {
-            return asType(LEATHER_ARMOR_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.LEATHER_ARMOR_META_DATA);
         }
         if (itemType == ItemType.POTION || itemType == ItemType.SPLASH_POTION
                 || itemType == ItemType.LINGERING_POTION || itemType == ItemType.TIPPED_ARROW) {
-            return asType(POTION_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.POTION_META_DATA);
         }
         if (itemType == ItemType.FILLED_MAP) {
-            return asType(MAP_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.MAP_META_DATA);
         }
         if (itemType == ItemType.FIREWORK_ROCKET) {
-            return asType(FIREWORK_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.FIREWORK_META_DATA);
         }
         if (itemType == ItemType.FIREWORK_STAR) {
-            return asType(CHARGE_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.CHARGE_META_DATA);
         }
         if (itemType == ItemType.ENCHANTED_BOOK) {
-            return asType(ENCHANTED_BOOK_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.ENCHANTED_BOOK_META_DATA);
         }
-        if (itemHandle instanceof ItemBanner) {
-            return asType(BANNER_META_DATA);
+        if (itemHandle instanceof BannerItem) {
+            return CraftItemMetas.asType(CraftItemMetas.BANNER_META_DATA);
         }
-        if (itemHandle instanceof ItemMonsterEgg) {
-            return asType(SPAWN_EGG_META_DATA);
+        if (itemHandle instanceof SpawnEggItem) {
+            return CraftItemMetas.asType(CraftItemMetas.SPAWN_EGG_META_DATA);
         }
         if (itemType == ItemType.ARMOR_STAND) {
-            return asType(ARMOR_STAND_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.ARMOR_STAND_META_DATA);
         }
         if (itemType == ItemType.KNOWLEDGE_BOOK) {
-            return asType(KNOWLEDGE_BOOK_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.KNOWLEDGE_BOOK_META_DATA);
         }
         if (itemType == ItemType.FURNACE || itemType == ItemType.CHEST
                 || itemType == ItemType.TRAPPED_CHEST || itemType == ItemType.JUKEBOX
                 || itemType == ItemType.DISPENSER || itemType == ItemType.DROPPER
-                || itemHandle instanceof ItemSign || itemType == ItemType.SPAWNER
+                || itemHandle instanceof SignItem || itemType == ItemType.SPAWNER
                 || itemType == ItemType.BREWING_STAND || itemType == ItemType.ENCHANTING_TABLE
                 || itemType == ItemType.COMMAND_BLOCK || itemType == ItemType.REPEATING_COMMAND_BLOCK
                 || itemType == ItemType.CHAIN_COMMAND_BLOCK || itemType == ItemType.BEACON
                 || itemType == ItemType.DAYLIGHT_DETECTOR || itemType == ItemType.HOPPER
                 || itemType == ItemType.COMPARATOR || itemType == ItemType.STRUCTURE_BLOCK
-                || blockHandle instanceof BlockShulkerBox
+                || blockHandle instanceof ShulkerBoxBlock
                 || itemType == ItemType.ENDER_CHEST || itemType == ItemType.BARREL
                 || itemType == ItemType.BELL || itemType == ItemType.BLAST_FURNACE
                 || itemType == ItemType.CAMPFIRE || itemType == ItemType.SOUL_CAMPFIRE
@@ -247,43 +247,43 @@ public final class CraftItemMetas {
                 || itemType == ItemType.SUSPICIOUS_GRAVEL || itemType == ItemType.CRAFTER
                 || itemType == ItemType.TRIAL_SPAWNER || itemType == ItemType.VAULT
                 || itemType == ItemType.CREAKING_HEART) {
-            return asType(BLOCK_STATE_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.BLOCK_STATE_META_DATA);
         }
         if (itemType == ItemType.SHIELD) {
-            return asType(SHIELD_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.SHIELD_META_DATA);
         }
         if (itemType == ItemType.TROPICAL_FISH_BUCKET) {
-            return asType(TROPICAL_FISH_BUCKET_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.TROPICAL_FISH_BUCKET_META_DATA);
         }
         if (itemType == ItemType.AXOLOTL_BUCKET) {
-            return asType(AXOLOTL_BUCKET_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.AXOLOTL_BUCKET_META_DATA);
         }
         if (itemType == ItemType.CROSSBOW) {
-            return asType(CROSSBOW_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.CROSSBOW_META_DATA);
         }
         if (itemType == ItemType.SUSPICIOUS_STEW) {
-            return asType(SUSPICIOUS_STEW_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.SUSPICIOUS_STEW_META_DATA);
         }
         if (itemType == ItemType.COD_BUCKET || itemType == ItemType.PUFFERFISH_BUCKET
                 || itemType == ItemType.SALMON_BUCKET || itemType == ItemType.ITEM_FRAME
                 || itemType == ItemType.GLOW_ITEM_FRAME || itemType == ItemType.PAINTING) {
-            return asType(ENTITY_TAG_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.ENTITY_TAG_META_DATA);
         }
         if (itemType == ItemType.COMPASS) {
-            return asType(COMPASS_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.COMPASS_META_DATA);
         }
         if (itemHandle instanceof BundleItem) {
-            return asType(BUNDLE_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.BUNDLE_META_DATA);
         }
         if (itemType == ItemType.GOAT_HORN) {
-            return asType(MUSIC_INSTRUMENT_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.MUSIC_INSTRUMENT_META_DATA);
         }
 
         if (itemType == ItemType.OMINOUS_BOTTLE) {
-            return asType(OMINOUS_BOTTLE_META_DATA);
+            return CraftItemMetas.asType(CraftItemMetas.OMINOUS_BOTTLE_META_DATA);
         }
 
-        return asType(ITEM_META_DATA);
+        return CraftItemMetas.asType(CraftItemMetas.ITEM_META_DATA);
     }
 
     private static <I extends ItemMeta> ItemMetaData<I> asType(ItemMetaData<?> metaData) {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
index 83653c1f38..f6e6f0ddef 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemStack.java
@@ -5,8 +5,8 @@ import com.google.common.collect.ImmutableMap;
 import java.util.Collections;
 import java.util.Map;
 import java.util.Optional;
-import net.minecraft.advancements.critereon.CriterionConditionItem;
-import net.minecraft.advancements.critereon.CriterionConditionValue;
+import net.minecraft.advancements.critereon.ItemPredicate;
+import net.minecraft.advancements.critereon.MinMaxBounds;
 import net.minecraft.core.Holder;
 import net.minecraft.core.HolderSet;
 import net.minecraft.core.component.DataComponentMap;
@@ -15,7 +15,7 @@ import net.minecraft.core.component.DataComponentPredicate;
 import net.minecraft.core.component.DataComponents;
 import net.minecraft.core.component.PatchedDataComponentMap;
 import net.minecraft.world.item.Item;
-import net.minecraft.world.item.enchantment.EnchantmentManager;
+import net.minecraft.world.item.enchantment.EnchantmentHelper;
 import net.minecraft.world.item.enchantment.ItemEnchantments;
 import org.bukkit.Material;
 import org.bukkit.configuration.serialization.DelegateDeserialization;
@@ -48,7 +48,7 @@ public final class CraftItemStack extends ItemStack {
 
         net.minecraft.world.item.ItemStack stack = new net.minecraft.world.item.ItemStack(item, original.getAmount());
         if (original.hasItemMeta()) {
-            setItemMeta(stack, original.getItemMeta());
+            CraftItemStack.setItemMeta(stack, original.getItemMeta());
         }
         return stack;
     }
@@ -67,8 +67,8 @@ public final class CraftItemStack extends ItemStack {
             return new ItemStack(Material.AIR);
         }
         ItemStack stack = new ItemStack(CraftItemType.minecraftToBukkit(original.getItem()), original.getCount());
-        if (hasItemMeta(original)) {
-            stack.setItemMeta(getItemMeta(original));
+        if (CraftItemStack.hasItemMeta(original)) {
+            stack.setItemMeta(CraftItemStack.getItemMeta(original));
         }
         return stack;
     }
@@ -86,21 +86,21 @@ public final class CraftItemStack extends ItemStack {
     }
 
     public static CraftItemStack asNewCraftStack(Item item) {
-        return asNewCraftStack(item, 1);
+        return CraftItemStack.asNewCraftStack(item, 1);
     }
 
     public static CraftItemStack asNewCraftStack(Item item, int amount) {
         return new CraftItemStack(CraftItemType.minecraftToBukkit(item), amount, (short) 0, null);
     }
 
-    public static CriterionConditionItem asCriterionConditionItem(ItemStack original) {
+    public static ItemPredicate asCriterionConditionItem(ItemStack original) {
         net.minecraft.world.item.ItemStack nms = CraftItemStack.asNMSCopy(original);
         DataComponentPredicate predicate = DataComponentPredicate.allOf(PatchedDataComponentMap.fromPatch(DataComponentMap.EMPTY, nms.getComponentsPatch()));
 
-        return new CriterionConditionItem(Optional.of(HolderSet.direct(nms.getItemHolder())), CriterionConditionValue.IntegerRange.ANY, predicate, Collections.emptyMap());
+        return new ItemPredicate(Optional.of(HolderSet.direct(nms.getItemHolder())), MinMaxBounds.Ints.ANY, predicate, Collections.emptyMap());
     }
 
-    net.minecraft.world.item.ItemStack handle;
+    public net.minecraft.world.item.ItemStack handle;
     private boolean isForInventoryDrop;
 
     /**
@@ -115,10 +115,10 @@ public final class CraftItemStack extends ItemStack {
     }
 
     private CraftItemStack(Material type, int amount, short durability, ItemMeta itemMeta) {
-        setType(type);
-        setAmount(amount);
-        setDurability(durability);
-        setItemMeta(itemMeta);
+        this.setType(type);
+        this.setAmount(amount);
+        this.setDurability(durability);
+        this.setItemMeta(itemMeta);
     }
 
     /**
@@ -144,63 +144,63 @@ public final class CraftItemStack extends ItemStack {
 
     @Override
     public MaterialData getData() {
-        return handle != null ? CraftMagicNumbers.getMaterialData(handle.getItem()) : super.getData();
+        return this.handle != null ? CraftMagicNumbers.getMaterialData(this.handle.getItem()) : super.getData();
     }
 
     @Override
     public Material getType() {
-        return handle != null ? CraftItemType.minecraftToBukkit(handle.getItem()) : Material.AIR;
+        return this.handle != null ? CraftItemType.minecraftToBukkit(this.handle.getItem()) : Material.AIR;
     }
 
     @Override
     public void setType(Material type) {
-        if (getType() == type) {
+        if (this.getType() == type) {
             return;
         } else if (type == Material.AIR) {
-            handle = null;
+            this.handle = null;
         } else if (CraftItemType.bukkitToMinecraft(type) == null) { // :(
-            handle = null;
-        } else if (handle == null) {
-            handle = new net.minecraft.world.item.ItemStack(CraftItemType.bukkitToMinecraft(type), 1);
+            this.handle = null;
+        } else if (this.handle == null) {
+            this.handle = new net.minecraft.world.item.ItemStack(CraftItemType.bukkitToMinecraft(type), 1);
         } else {
-            handle.setItem(CraftItemType.bukkitToMinecraft(type));
-            if (hasItemMeta()) {
+            this.handle.setItem(CraftItemType.bukkitToMinecraft(type));
+            if (this.hasItemMeta()) {
                 // This will create the appropriate item meta, which will contain all the data we intend to keep
-                setItemMeta(handle, getItemMeta(handle));
+                CraftItemStack.setItemMeta(this.handle, CraftItemStack.getItemMeta(this.handle));
             }
         }
-        setData(null);
+        this.setData(null);
     }
 
     @Override
     public int getAmount() {
-        return handle != null ? handle.getCount() : 0;
+        return this.handle != null ? this.handle.getCount() : 0;
     }
 
     @Override
     public void setAmount(int amount) {
-        if (handle == null) {
+        if (this.handle == null) {
             return;
         }
 
-        handle.setCount(amount);
+        this.handle.setCount(amount);
         if (amount == 0) {
-            handle = null;
+            this.handle = null;
         }
     }
 
     @Override
     public void setDurability(final short durability) {
         // Ignore damage if item is null
-        if (handle != null) {
-            handle.setDamageValue(durability);
+        if (this.handle != null) {
+            this.handle.setDamageValue(durability);
         }
     }
 
     @Override
     public short getDurability() {
-        if (handle != null) {
-            return (short) handle.getDamageValue();
+        if (this.handle != null) {
+            return (short) this.handle.getDamageValue();
         } else {
             return -1;
         }
@@ -208,23 +208,23 @@ public final class CraftItemStack extends ItemStack {
 
     @Override
     public int getMaxStackSize() {
-        return (handle == null) ? Material.AIR.getMaxStackSize() : handle.getMaxStackSize();
+        return (this.handle == null) ? Material.AIR.getMaxStackSize() : this.handle.getMaxStackSize();
     }
 
     @Override
     public void addUnsafeEnchantment(Enchantment ench, int level) {
         Preconditions.checkArgument(ench != null, "Enchantment cannot be null");
 
-        if (!makeTag(handle)) {
+        if (!CraftItemStack.makeTag(this.handle)) {
             return;
         }
-        ItemEnchantments list = getEnchantmentList(handle);
+        ItemEnchantments list = CraftItemStack.getEnchantmentList(this.handle);
         if (list == null) {
             list = ItemEnchantments.EMPTY;
         }
-        ItemEnchantments.a listCopy = new ItemEnchantments.a(list);
+        ItemEnchantments.Mutable listCopy = new ItemEnchantments.Mutable(list);
         listCopy.set(CraftEnchantment.bukkitToMinecraftHolder(ench), level);
-        handle.set(DataComponents.ENCHANTMENTS, listCopy.toImmutable());
+        this.handle.set(DataComponents.ENCHANTMENTS, listCopy.toImmutable());
     }
 
     static boolean makeTag(net.minecraft.world.item.ItemStack item) {
@@ -237,52 +237,52 @@ public final class CraftItemStack extends ItemStack {
 
     @Override
     public boolean containsEnchantment(Enchantment ench) {
-        return getEnchantmentLevel(ench) > 0;
+        return this.getEnchantmentLevel(ench) > 0;
     }
 
     @Override
     public int getEnchantmentLevel(Enchantment ench) {
         Preconditions.checkArgument(ench != null, "Enchantment cannot be null");
-        if (handle == null) {
+        if (this.handle == null) {
             return 0;
         }
-        return EnchantmentManager.getItemEnchantmentLevel(CraftEnchantment.bukkitToMinecraftHolder(ench), handle);
+        return EnchantmentHelper.getItemEnchantmentLevel(CraftEnchantment.bukkitToMinecraftHolder(ench), this.handle);
     }
 
     @Override
     public int removeEnchantment(Enchantment ench) {
         Preconditions.checkArgument(ench != null, "Enchantment cannot be null");
 
-        ItemEnchantments list = getEnchantmentList(handle);
+        ItemEnchantments list = CraftItemStack.getEnchantmentList(this.handle);
         if (list == null) {
             return 0;
         }
-        int level = getEnchantmentLevel(ench);
+        int level = this.getEnchantmentLevel(ench);
         if (level <= 0) {
             return 0;
         }
         int size = list.size();
 
         if (size == 1) {
-            handle.remove(DataComponents.ENCHANTMENTS);
+            this.handle.remove(DataComponents.ENCHANTMENTS);
             return level;
         }
 
-        ItemEnchantments.a listCopy = new ItemEnchantments.a(list);
+        ItemEnchantments.Mutable listCopy = new ItemEnchantments.Mutable(list);
         listCopy.set(CraftEnchantment.bukkitToMinecraftHolder(ench), -1); // Negative to remove
-        handle.set(DataComponents.ENCHANTMENTS, listCopy.toImmutable());
+        this.handle.set(DataComponents.ENCHANTMENTS, listCopy.toImmutable());
 
         return level;
     }
 
     @Override
     public void removeEnchantments() {
-        handle.remove(DataComponents.ENCHANTMENTS);
+        this.handle.remove(DataComponents.ENCHANTMENTS);
     }
 
     @Override
     public Map<Enchantment, Integer> getEnchantments() {
-        return getEnchantments(handle);
+        return CraftItemStack.getEnchantments(this.handle);
     }
 
     static Map<Enchantment, Integer> getEnchantments(net.minecraft.world.item.ItemStack item) {
@@ -322,12 +322,12 @@ public final class CraftItemStack extends ItemStack {
 
     @Override
     public ItemMeta getItemMeta() {
-        return getItemMeta(handle);
+        return CraftItemStack.getItemMeta(this.handle);
     }
 
     public static ItemMeta getItemMeta(net.minecraft.world.item.ItemStack item) {
-        if (!hasItemMeta(item)) {
-            return CraftItemFactory.instance().getItemMeta(getType(item));
+        if (!CraftItemStack.hasItemMeta(item)) {
+            return CraftItemFactory.instance().getItemMeta(CraftItemStack.getType(item));
         }
 
         return ((CraftItemType<?>) CraftItemType.minecraftToBukkitNew(item.getItem())).getItemMeta(item);
@@ -339,7 +339,7 @@ public final class CraftItemStack extends ItemStack {
 
     @Override
     public boolean setItemMeta(ItemMeta itemMeta) {
-        return setItemMeta(handle, itemMeta);
+        return CraftItemStack.setItemMeta(this.handle, itemMeta);
     }
 
     public static boolean setItemMeta(net.minecraft.world.item.ItemStack item, ItemMeta itemMeta) {
@@ -350,11 +350,11 @@ public final class CraftItemStack extends ItemStack {
             item.restorePatch(DataComponentPatch.EMPTY);
             return true;
         }
-        if (!CraftItemFactory.instance().isApplicable(itemMeta, getType(item))) {
+        if (!CraftItemFactory.instance().isApplicable(itemMeta, CraftItemStack.getType(item))) {
             return false;
         }
 
-        itemMeta = CraftItemFactory.instance().asMetaFor(itemMeta, getType(item));
+        itemMeta = CraftItemFactory.instance().asMetaFor(itemMeta, CraftItemStack.getType(item));
         if (itemMeta == null) return true;
 
         if (!((CraftMetaItem) itemMeta).isEmpty()) {
@@ -384,22 +384,22 @@ public final class CraftItemStack extends ItemStack {
         }
 
         CraftItemStack that = (CraftItemStack) stack;
-        if (handle == that.handle) {
+        if (this.handle == that.handle) {
             return true;
         }
-        if (handle == null || that.handle == null) {
+        if (this.handle == null || that.handle == null) {
             return false;
         }
         Material comparisonType = CraftLegacy.fromLegacy(that.getType()); // This may be called from legacy item stacks, try to get the right material
-        if (!(comparisonType == getType() && getDurability() == that.getDurability())) {
+        if (!(comparisonType == this.getType() && this.getDurability() == that.getDurability())) {
             return false;
         }
-        return hasItemMeta() ? that.hasItemMeta() && handle.getComponents().equals(that.handle.getComponents()) : !that.hasItemMeta();
+        return this.hasItemMeta() ? that.hasItemMeta() && this.handle.getComponents().equals(that.handle.getComponents()) : !that.hasItemMeta();
     }
 
     @Override
     public boolean hasItemMeta() {
-        return hasItemMeta(handle) && !CraftItemFactory.instance().equals(getItemMeta(), null);
+        return CraftItemStack.hasItemMeta(this.handle) && !CraftItemFactory.instance().equals(this.getItemMeta(), null);
     }
 
     static boolean hasItemMeta(net.minecraft.world.item.ItemStack item) {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java
index 235909405a..0e9d3d8236 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftItemType.java
@@ -9,10 +9,10 @@ import java.util.function.Supplier;
 import net.minecraft.core.component.DataComponents;
 import net.minecraft.core.registries.Registries;
 import net.minecraft.server.MinecraftServer;
+import net.minecraft.world.item.BlockItem;
 import net.minecraft.world.item.Item;
-import net.minecraft.world.item.ItemBlock;
 import net.minecraft.world.item.component.ItemAttributeModifiers;
-import net.minecraft.world.level.block.BlockComposter;
+import net.minecraft.world.level.block.ComposterBlock;
 import org.bukkit.Material;
 import org.bukkit.NamespacedKey;
 import org.bukkit.Registry;
@@ -111,27 +111,27 @@ public class CraftItemType<M extends ItemMeta> implements ItemType.Typed<M>, Han
 
     @Override
     public Item getHandle() {
-        return item;
+        return this.item;
     }
 
     public M getItemMeta(net.minecraft.world.item.ItemStack itemStack) {
-        return itemMetaData.get().fromItemStack().apply(itemStack);
+        return this.itemMetaData.get().fromItemStack().apply(itemStack);
     }
 
     public M getItemMeta(ItemMeta itemMeta) {
-        return itemMetaData.get().fromItemMeta().apply(this, (CraftMetaItem) itemMeta);
+        return this.itemMetaData.get().fromItemMeta().apply(this, (CraftMetaItem) itemMeta);
     }
 
     @Override
     public boolean hasBlockType() {
-        return item instanceof ItemBlock;
+        return this.item instanceof BlockItem;
     }
 
     @NotNull
     @Override
     public BlockType getBlockType() {
-        if (!(item instanceof ItemBlock block)) {
-            throw new IllegalStateException("The item type " + getKey() + " has no corresponding block type");
+        if (!(this.item instanceof BlockItem block)) {
+            throw new IllegalStateException("The item type " + this.getKey() + " has no corresponding block type");
         }
 
         return CraftBlockType.minecraftToBukkitNew(block.getBlock());
@@ -142,7 +142,7 @@ public class CraftItemType<M extends ItemMeta> implements ItemType.Typed<M>, Han
         if (this == ItemType.AIR) {
             throw new UnsupportedOperationException("Air does not have ItemMeta");
         }
-        return itemMetaData.get().metaClass();
+        return this.itemMetaData.get().metaClass();
     }
 
     @Override
@@ -152,44 +152,44 @@ public class CraftItemType<M extends ItemMeta> implements ItemType.Typed<M>, Han
         if (this == AIR) {
             return 0;
         }
-        return item.components().getOrDefault(DataComponents.MAX_STACK_SIZE, 64);
+        return this.item.components().getOrDefault(DataComponents.MAX_STACK_SIZE, 64);
     }
 
     @Override
     public short getMaxDurability() {
-        return item.components().getOrDefault(DataComponents.MAX_DAMAGE, 0).shortValue();
+        return this.item.components().getOrDefault(DataComponents.MAX_DAMAGE, 0).shortValue();
     }
 
     @Override
     public boolean isEdible() {
-        return item.components().has(DataComponents.FOOD);
+        return this.item.components().has(DataComponents.FOOD);
     }
 
     @Override
     public boolean isRecord() {
-        return item.components().has(DataComponents.JUKEBOX_PLAYABLE);
+        return this.item.components().has(DataComponents.JUKEBOX_PLAYABLE);
     }
 
     @Override
     public boolean isFuel() {
-        return MinecraftServer.getServer().fuelValues().isFuel(new net.minecraft.world.item.ItemStack(item));
+        return MinecraftServer.getServer().fuelValues().isFuel(new net.minecraft.world.item.ItemStack(this.item));
     }
 
     @Override
     public boolean isCompostable() {
-        return BlockComposter.COMPOSTABLES.containsKey(item);
+        return ComposterBlock.COMPOSTABLES.containsKey(this.item);
     }
 
     @Override
     public float getCompostChance() {
-        Preconditions.checkArgument(isCompostable(), "The item type " + getKey() + " is not compostable");
-        return BlockComposter.COMPOSTABLES.getFloat(item);
+        Preconditions.checkArgument(this.isCompostable(), "The item type " + this.getKey() + " is not compostable");
+        return ComposterBlock.COMPOSTABLES.getFloat(this.item);
     }
 
     @Override
     public ItemType getCraftingRemainingItem() {
-        net.minecraft.world.item.ItemStack expectedItem = item.getCraftingRemainder();
-        return expectedItem.isEmpty() ? null : minecraftToBukkitNew(expectedItem.getItem());
+        net.minecraft.world.item.ItemStack expectedItem = this.item.getCraftingRemainder();
+        return expectedItem.isEmpty() ? null : CraftItemType.minecraftToBukkitNew(expectedItem.getItem());
     }
 
 //    @Override
@@ -201,7 +201,7 @@ public class CraftItemType<M extends ItemMeta> implements ItemType.Typed<M>, Han
     public Multimap<Attribute, AttributeModifier> getDefaultAttributeModifiers(EquipmentSlot slot) {
         ImmutableMultimap.Builder<Attribute, AttributeModifier> defaultAttributes = ImmutableMultimap.builder();
 
-        ItemAttributeModifiers nmsDefaultAttributes = item.components().getOrDefault(DataComponents.ATTRIBUTE_MODIFIERS, ItemAttributeModifiers.EMPTY);
+        ItemAttributeModifiers nmsDefaultAttributes = this.item.components().getOrDefault(DataComponents.ATTRIBUTE_MODIFIERS, ItemAttributeModifiers.EMPTY);
 
         nmsDefaultAttributes.forEach(CraftEquipmentSlot.getNMS(slot), (key, value) -> {
             Attribute attribute = CraftAttribute.minecraftToBukkit(key.value());
@@ -219,18 +219,18 @@ public class CraftItemType<M extends ItemMeta> implements ItemType.Typed<M>, Han
     @Override
     public boolean isEnabledByFeature(@NotNull World world) {
         Preconditions.checkNotNull(world, "World cannot be null");
-        return getHandle().isEnabled(((CraftWorld) world).getHandle().enabledFeatures());
+        return this.getHandle().isEnabled(((CraftWorld) world).getHandle().enabledFeatures());
     }
 
     @NotNull
     @Override
     public String getTranslationKey() {
-        return item.getDescriptionId();
+        return this.item.getDescriptionId();
     }
 
     @Override
     public NamespacedKey getKey() {
-        return key;
+        return this.key;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMenuType.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMenuType.java
index 52c9833567..b09f794abd 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMenuType.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMenuType.java
@@ -5,9 +5,8 @@ import com.google.common.base.Suppliers;
 import java.util.function.Supplier;
 import net.minecraft.core.Holder;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.server.level.EntityPlayer;
-import net.minecraft.world.inventory.Container;
-import net.minecraft.world.inventory.Containers;
+import net.minecraft.server.level.ServerPlayer;
+import net.minecraft.world.inventory.AbstractContainerMenu;
 import org.bukkit.NamespacedKey;
 import org.bukkit.Registry;
 import org.bukkit.craftbukkit.CraftRegistry;
@@ -19,20 +18,20 @@ import org.bukkit.entity.HumanEntity;
 import org.bukkit.inventory.InventoryView;
 import org.bukkit.inventory.MenuType;
 
-public class CraftMenuType<V extends InventoryView> implements MenuType.Typed<V>, Handleable<Containers<?>> {
+public class CraftMenuType<V extends InventoryView> implements MenuType.Typed<V>, Handleable<net.minecraft.world.inventory.MenuType<?>> {
 
     private final NamespacedKey key;
-    private final Containers<?> handle;
+    private final net.minecraft.world.inventory.MenuType<?> handle;
     private final Supplier<CraftMenus.MenuTypeData<V>> typeData;
 
-    public CraftMenuType(NamespacedKey key, Containers<?> handle) {
+    public CraftMenuType(NamespacedKey key, net.minecraft.world.inventory.MenuType<?> handle) {
         this.key = key;
         this.handle = handle;
         this.typeData = Suppliers.memoize(() -> CraftMenus.getMenuTypeData(this));
     }
 
     @Override
-    public Containers<?> getHandle() {
+    public net.minecraft.world.inventory.MenuType<?> getHandle() {
         return this.handle;
     }
 
@@ -42,10 +41,10 @@ public class CraftMenuType<V extends InventoryView> implements MenuType.Typed<V>
         Preconditions.checkArgument(title != null, "The given title must not be null");
         Preconditions.checkArgument(player instanceof CraftHumanEntity, "The given player must be a CraftHumanEntity");
         final CraftHumanEntity craftHuman = (CraftHumanEntity) player;
-        Preconditions.checkArgument(craftHuman.getHandle() instanceof EntityPlayer, "The given player must be an EntityPlayer");
-        final EntityPlayer serverPlayer = (EntityPlayer) craftHuman.getHandle();
+        Preconditions.checkArgument(craftHuman.getHandle() instanceof ServerPlayer, "The given player must be an EntityPlayer");
+        final ServerPlayer serverPlayer = (ServerPlayer) craftHuman.getHandle();
 
-        final Container container = typeData.get().menuBuilder().build(serverPlayer, this.handle);
+        final AbstractContainerMenu container = this.typeData.get().menuBuilder().build(serverPlayer, this.handle);
         container.setTitle(CraftChatMessage.fromString(title)[0]);
         container.checkReachable = false;
         return (V) container.getBukkitView();
@@ -58,7 +57,7 @@ public class CraftMenuType<V extends InventoryView> implements MenuType.Typed<V>
 
     @Override
     public <V extends InventoryView> Typed<V> typed(Class<V> clazz) {
-        if (clazz.isAssignableFrom(typeData.get().viewClass())) {
+        if (clazz.isAssignableFrom(this.typeData.get().viewClass())) {
             return (Typed<V>) this;
         }
 
@@ -67,7 +66,7 @@ public class CraftMenuType<V extends InventoryView> implements MenuType.Typed<V>
 
     @Override
     public Class<? extends InventoryView> getInventoryViewClass() {
-        return typeData.get().viewClass();
+        return this.typeData.get().viewClass();
     }
 
     @Override
@@ -75,15 +74,15 @@ public class CraftMenuType<V extends InventoryView> implements MenuType.Typed<V>
         return this.key;
     }
 
-    public static Containers<?> bukkitToMinecraft(MenuType bukkit) {
+    public static net.minecraft.world.inventory.MenuType<?> bukkitToMinecraft(MenuType bukkit) {
         return CraftRegistry.bukkitToMinecraft(bukkit);
     }
 
-    public static MenuType minecraftToBukkit(Containers<?> minecraft) {
+    public static MenuType minecraftToBukkit(net.minecraft.world.inventory.MenuType<?> minecraft) {
         return CraftRegistry.minecraftToBukkit(minecraft, Registries.MENU, Registry.MENU);
     }
 
-    public static MenuType minecraftHolderToBukkit(Holder<Containers<?>> minecraft) {
-        return minecraftToBukkit(minecraft.value());
+    public static MenuType minecraftHolderToBukkit(Holder<net.minecraft.world.inventory.MenuType<?>> minecraft) {
+        return CraftMenuType.minecraftToBukkit(minecraft.value());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchant.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchant.java
index df3b721905..770686757a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchant.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchant.java
@@ -4,22 +4,21 @@ import com.google.common.base.Function;
 import com.google.common.collect.Lists;
 import java.util.Collections;
 import java.util.List;
-import net.minecraft.world.entity.player.EntityHuman;
-import net.minecraft.world.item.trading.IMerchant;
-import net.minecraft.world.item.trading.MerchantRecipeList;
+import net.minecraft.world.entity.player.Player;
+import net.minecraft.world.item.trading.MerchantOffers;
 import org.bukkit.entity.HumanEntity;
 import org.bukkit.inventory.Merchant;
 import org.bukkit.inventory.MerchantRecipe;
 
 public interface CraftMerchant extends Merchant {
 
-    IMerchant getMerchant();
+    net.minecraft.world.item.trading.Merchant getMerchant();
 
     @Override
     default List<MerchantRecipe> getRecipes() {
-        return Collections.unmodifiableList(Lists.transform(getMerchant().getOffers(), new Function<net.minecraft.world.item.trading.MerchantRecipe, MerchantRecipe>() {
+        return Collections.unmodifiableList(Lists.transform(this.getMerchant().getOffers(), new Function<net.minecraft.world.item.trading.MerchantOffer, MerchantRecipe>() {
             @Override
-            public MerchantRecipe apply(net.minecraft.world.item.trading.MerchantRecipe recipe) {
+            public MerchantRecipe apply(net.minecraft.world.item.trading.MerchantOffer recipe) {
                 return recipe.asBukkit();
             }
         }));
@@ -27,7 +26,7 @@ public interface CraftMerchant extends Merchant {
 
     @Override
     default void setRecipes(List<MerchantRecipe> recipes) {
-        MerchantRecipeList recipesList = getMerchant().getOffers();
+        MerchantOffers recipesList = this.getMerchant().getOffers();
         recipesList.clear();
         for (MerchantRecipe recipe : recipes) {
             recipesList.add(CraftMerchantRecipe.fromBukkit(recipe).toMinecraft());
@@ -36,27 +35,27 @@ public interface CraftMerchant extends Merchant {
 
     @Override
     default MerchantRecipe getRecipe(int i) {
-        return getMerchant().getOffers().get(i).asBukkit();
+        return this.getMerchant().getOffers().get(i).asBukkit();
     }
 
     @Override
     default void setRecipe(int i, MerchantRecipe merchantRecipe) {
-        getMerchant().getOffers().set(i, CraftMerchantRecipe.fromBukkit(merchantRecipe).toMinecraft());
+        this.getMerchant().getOffers().set(i, CraftMerchantRecipe.fromBukkit(merchantRecipe).toMinecraft());
     }
 
     @Override
     default int getRecipeCount() {
-        return getMerchant().getOffers().size();
+        return this.getMerchant().getOffers().size();
     }
 
     @Override
     default boolean isTrading() {
-        return getTrader() != null;
+        return this.getTrader() != null;
     }
 
     @Override
     default HumanEntity getTrader() {
-        EntityHuman eh = getMerchant().getTradingPlayer();
+        Player eh = this.getMerchant().getTradingPlayer();
         return eh == null ? null : eh.getBukkitEntity();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java
index 3f91111e4c..13f8689b8c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantCustom.java
@@ -1,14 +1,14 @@
 package org.bukkit.craftbukkit.inventory;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.network.chat.IChatBaseComponent;
-import net.minecraft.sounds.SoundEffect;
-import net.minecraft.sounds.SoundEffects;
-import net.minecraft.world.entity.player.EntityHuman;
+import net.minecraft.network.chat.Component;
+import net.minecraft.sounds.SoundEvent;
+import net.minecraft.sounds.SoundEvents;
+import net.minecraft.world.entity.player.Player;
 import net.minecraft.world.item.ItemStack;
-import net.minecraft.world.item.trading.IMerchant;
-import net.minecraft.world.item.trading.MerchantRecipe;
-import net.minecraft.world.item.trading.MerchantRecipeList;
+import net.minecraft.world.item.trading.Merchant;
+import net.minecraft.world.item.trading.MerchantOffer;
+import net.minecraft.world.item.trading.MerchantOffers;
 import org.bukkit.craftbukkit.util.CraftChatMessage;
 
 public class CraftMerchantCustom implements CraftMerchant {
@@ -17,7 +17,7 @@ public class CraftMerchantCustom implements CraftMerchant {
 
     public CraftMerchantCustom(String title) {
         this.merchant = new MinecraftMerchant(title);
-        getMerchant().craftMerchant = this;
+        this.getMerchant().craftMerchant = this;
     }
 
     @Override
@@ -30,11 +30,11 @@ public class CraftMerchantCustom implements CraftMerchant {
         return this.merchant;
     }
 
-    public static class MinecraftMerchant implements IMerchant {
+    public static class MinecraftMerchant implements Merchant {
 
-        private final IChatBaseComponent title;
-        private final MerchantRecipeList trades = new MerchantRecipeList();
-        private EntityHuman tradingPlayer;
+        private final Component title;
+        private final MerchantOffers trades = new MerchantOffers();
+        private Player tradingPlayer;
         protected CraftMerchant craftMerchant;
 
         public MinecraftMerchant(String title) {
@@ -44,36 +44,36 @@ public class CraftMerchantCustom implements CraftMerchant {
 
         @Override
         public CraftMerchant getCraftMerchant() {
-            return craftMerchant;
+            return this.craftMerchant;
         }
 
         @Override
-        public void setTradingPlayer(EntityHuman entityhuman) {
-            this.tradingPlayer = entityhuman;
+        public void setTradingPlayer(Player customer) {
+            this.tradingPlayer = customer;
         }
 
         @Override
-        public EntityHuman getTradingPlayer() {
+        public Player getTradingPlayer() {
             return this.tradingPlayer;
         }
 
         @Override
-        public MerchantRecipeList getOffers() {
+        public MerchantOffers getOffers() {
             return this.trades;
         }
 
         @Override
-        public void notifyTrade(MerchantRecipe merchantrecipe) {
+        public void notifyTrade(MerchantOffer offer) {
             // increase recipe's uses
-            merchantrecipe.increaseUses();
+            offer.increaseUses();
         }
 
         @Override
-        public void notifyTradeUpdated(ItemStack itemstack) {
+        public void notifyTradeUpdated(ItemStack stack) {
         }
 
-        public IChatBaseComponent getScoreboardDisplayName() {
-            return title;
+        public Component getScoreboardDisplayName() {
+            return this.title;
         }
 
         @Override
@@ -82,7 +82,7 @@ public class CraftMerchantCustom implements CraftMerchant {
         }
 
         @Override
-        public void overrideXp(int i) {
+        public void overrideXp(int experience) {
         }
 
         @Override
@@ -91,12 +91,12 @@ public class CraftMerchantCustom implements CraftMerchant {
         }
 
         @Override
-        public SoundEffect getNotifyTradeSound() {
-            return SoundEffects.VILLAGER_YES;
+        public SoundEvent getNotifyTradeSound() {
+            return SoundEvents.VILLAGER_YES;
         }
 
         @Override
-        public void overrideOffers(MerchantRecipeList merchantrecipelist) {
+        public void overrideOffers(MerchantOffers offers) {
         }
 
         @Override
@@ -105,8 +105,8 @@ public class CraftMerchantCustom implements CraftMerchant {
         }
 
         @Override
-        public boolean stillValid(EntityHuman entityhuman) {
-            return this.tradingPlayer == entityhuman;
+        public boolean stillValid(Player player) {
+            return this.tradingPlayer == player;
         }
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantRecipe.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantRecipe.java
index 6030c56252..bc1a92707c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantRecipe.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMerchantRecipe.java
@@ -13,13 +13,13 @@ import org.bukkit.inventory.MerchantRecipe;
 
 public class CraftMerchantRecipe extends MerchantRecipe {
 
-    private final net.minecraft.world.item.trading.MerchantRecipe handle;
+    private final net.minecraft.world.item.trading.MerchantOffer handle;
 
-    public CraftMerchantRecipe(net.minecraft.world.item.trading.MerchantRecipe merchantRecipe) {
+    public CraftMerchantRecipe(net.minecraft.world.item.trading.MerchantOffer merchantRecipe) {
         super(CraftItemStack.asBukkitCopy(merchantRecipe.result), 0);
         this.handle = merchantRecipe;
-        addIngredient(CraftItemStack.asBukkitCopy(merchantRecipe.baseCostA.itemStack()));
-        merchantRecipe.costB.ifPresent((costB) -> addIngredient(CraftItemStack.asBukkitCopy(costB.itemStack())));
+        this.addIngredient(CraftItemStack.asBukkitCopy(merchantRecipe.baseCostA.itemStack()));
+        merchantRecipe.costB.ifPresent((costB) -> this.addIngredient(CraftItemStack.asBukkitCopy(costB.itemStack())));
     }
 
     @Deprecated
@@ -29,7 +29,7 @@ public class CraftMerchantRecipe extends MerchantRecipe {
 
     public CraftMerchantRecipe(ItemStack result, int uses, int maxUses, boolean experienceReward, int experience, float priceMultiplier, int demand, int specialPrice) {
         super(result, uses, maxUses, experienceReward, experience, priceMultiplier, demand, specialPrice);
-        this.handle = new net.minecraft.world.item.trading.MerchantRecipe(
+        this.handle = new net.minecraft.world.item.trading.MerchantOffer(
                 new ItemCost(Items.AIR),
                 Optional.empty(),
                 CraftItemStack.asNMSCopy(result),
@@ -46,88 +46,88 @@ public class CraftMerchantRecipe extends MerchantRecipe {
 
     @Override
     public int getSpecialPrice() {
-        return handle.getSpecialPriceDiff();
+        return this.handle.getSpecialPriceDiff();
     }
 
     @Override
     public void setSpecialPrice(int specialPrice) {
-        handle.specialPriceDiff = specialPrice;
+        this.handle.specialPriceDiff = specialPrice;
     }
 
     @Override
     public int getDemand() {
-        return handle.demand;
+        return this.handle.demand;
     }
 
     @Override
     public void setDemand(int demand) {
-        handle.demand = demand;
+        this.handle.demand = demand;
     }
 
     @Override
     public int getUses() {
-        return handle.uses;
+        return this.handle.uses;
     }
 
     @Override
     public void setUses(int uses) {
-        handle.uses = uses;
+        this.handle.uses = uses;
     }
 
     @Override
     public int getMaxUses() {
-        return handle.maxUses;
+        return this.handle.maxUses;
     }
 
     @Override
     public void setMaxUses(int maxUses) {
-        handle.maxUses = maxUses;
+        this.handle.maxUses = maxUses;
     }
 
     @Override
     public boolean hasExperienceReward() {
-        return handle.rewardExp;
+        return this.handle.rewardExp;
     }
 
     @Override
     public void setExperienceReward(boolean flag) {
-        handle.rewardExp = flag;
+        this.handle.rewardExp = flag;
     }
 
     @Override
     public int getVillagerExperience() {
-        return handle.xp;
+        return this.handle.xp;
     }
 
     @Override
     public void setVillagerExperience(int villagerExperience) {
-        handle.xp = villagerExperience;
+        this.handle.xp = villagerExperience;
     }
 
     @Override
     public float getPriceMultiplier() {
-        return handle.priceMultiplier;
+        return this.handle.priceMultiplier;
     }
 
     @Override
     public void setPriceMultiplier(float priceMultiplier) {
-        handle.priceMultiplier = priceMultiplier;
+        this.handle.priceMultiplier = priceMultiplier;
     }
 
-    public net.minecraft.world.item.trading.MerchantRecipe toMinecraft() {
-        List<ItemStack> ingredients = getIngredients();
+    public net.minecraft.world.item.trading.MerchantOffer toMinecraft() {
+        List<ItemStack> ingredients = this.getIngredients();
         Preconditions.checkState(!ingredients.isEmpty(), "No offered ingredients");
         net.minecraft.world.item.ItemStack baseCostA = CraftItemStack.asNMSCopy(ingredients.get(0));
         DataComponentPredicate baseCostAPredicate = DataComponentPredicate.allOf(PatchedDataComponentMap.fromPatch(DataComponentMap.EMPTY, baseCostA.getComponentsPatch()));
-        handle.baseCostA = new ItemCost(baseCostA.getItemHolder(), baseCostA.getCount(), baseCostAPredicate, baseCostA);
+        this.handle.baseCostA = new ItemCost(baseCostA.getItemHolder(), baseCostA.getCount(), baseCostAPredicate, baseCostA);
         if (ingredients.size() > 1) {
             net.minecraft.world.item.ItemStack costB = CraftItemStack.asNMSCopy(ingredients.get(1));
             DataComponentPredicate costBPredicate = DataComponentPredicate.allOf(PatchedDataComponentMap.fromPatch(DataComponentMap.EMPTY, costB.getComponentsPatch()));
-            handle.costB = Optional.of(new ItemCost(costB.getItemHolder(), costB.getCount(), costBPredicate, costB));
+            this.handle.costB = Optional.of(new ItemCost(costB.getItemHolder(), costB.getCount(), costBPredicate, costB));
         } else {
-            handle.costB = Optional.empty();
+            this.handle.costB = Optional.empty();
         }
-        return handle;
+        return this.handle;
     }
 
     public static CraftMerchantRecipe fromBukkit(MerchantRecipe recipe) {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java
index a1c65d946d..0fdd9dd475 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmor.java
@@ -37,14 +37,14 @@ public class CraftMetaArmor extends CraftMetaItem implements ArmorMeta {
     CraftMetaArmor(DataComponentPatch tag) {
         super(tag);
 
-        getOrEmpty(tag, TRIM).ifPresent((trimCompound) -> {
+        getOrEmpty(tag, CraftMetaArmor.TRIM).ifPresent((trimCompound) -> {
             TrimMaterial trimMaterial = CraftTrimMaterial.minecraftHolderToBukkit(trimCompound.material());
             TrimPattern trimPattern = CraftTrimPattern.minecraftHolderToBukkit(trimCompound.pattern());
 
             this.trim = new ArmorTrim(trimMaterial, trimPattern);
 
             if (!trimCompound.showInTooltip()) {
-                addItemFlags(ItemFlag.HIDE_ARMOR_TRIM);
+                this.addItemFlags(ItemFlag.HIDE_ARMOR_TRIM);
             }
         });
     }
@@ -52,10 +52,10 @@ public class CraftMetaArmor extends CraftMetaItem implements ArmorMeta {
     CraftMetaArmor(Map<String, Object> map) {
         super(map);
 
-        Map<?, ?> trimData = SerializableMeta.getObject(Map.class, map, TRIM.BUKKIT, true);
+        Map<?, ?> trimData = SerializableMeta.getObject(Map.class, map, CraftMetaArmor.TRIM.BUKKIT, true);
         if (trimData != null) {
-            String materialKeyString = SerializableMeta.getString(trimData, TRIM_MATERIAL.BUKKIT, true);
-            String patternKeyString = SerializableMeta.getString(trimData, TRIM_PATTERN.BUKKIT, true);
+            String materialKeyString = SerializableMeta.getString(trimData, CraftMetaArmor.TRIM_MATERIAL.BUKKIT, true);
+            String patternKeyString = SerializableMeta.getString(trimData, CraftMetaArmor.TRIM_PATTERN.BUKKIT, true);
 
             if (materialKeyString != null && patternKeyString != null) {
                 NamespacedKey materialKey = NamespacedKey.fromString(materialKeyString);
@@ -77,8 +77,8 @@ public class CraftMetaArmor extends CraftMetaItem implements ArmorMeta {
     void applyToItem(CraftMetaItem.Applicator itemTag) {
         super.applyToItem(itemTag);
 
-        if (hasTrim()) {
-            itemTag.put(TRIM, new net.minecraft.world.item.equipment.trim.ArmorTrim(CraftTrimMaterial.bukkitToMinecraftHolder(trim.getMaterial()), CraftTrimPattern.bukkitToMinecraftHolder(trim.getPattern()), !hasItemFlag(ItemFlag.HIDE_ARMOR_TRIM)));
+        if (this.hasTrim()) {
+            itemTag.put(CraftMetaArmor.TRIM, new net.minecraft.world.item.equipment.trim.ArmorTrim(CraftTrimMaterial.bukkitToMinecraftHolder(this.trim.getMaterial()), CraftTrimPattern.bukkitToMinecraftHolder(this.trim.getPattern()), !this.hasItemFlag(ItemFlag.HIDE_ARMOR_TRIM)));
         }
     }
 
@@ -89,7 +89,7 @@ public class CraftMetaArmor extends CraftMetaItem implements ArmorMeta {
         }
 
         if (that instanceof CraftMetaArmor armorMeta) {
-            return Objects.equals(trim, armorMeta.trim);
+            return Objects.equals(this.trim, armorMeta.trim);
         }
 
         return true;
@@ -97,16 +97,16 @@ public class CraftMetaArmor extends CraftMetaItem implements ArmorMeta {
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaArmor || isArmorEmpty());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaArmor || this.isArmorEmpty());
     }
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && isArmorEmpty();
+        return super.isEmpty() && this.isArmorEmpty();
     }
 
     private boolean isArmorEmpty() {
-        return !hasTrim();
+        return !this.hasTrim();
     }
 
     @Override
@@ -114,8 +114,8 @@ public class CraftMetaArmor extends CraftMetaItem implements ArmorMeta {
         final int original;
         int hash = original = super.applyHash();
 
-        if (hasTrim()) {
-            hash = 61 * hash + trim.hashCode();
+        if (this.hasTrim()) {
+            hash = 61 * hash + this.trim.hashCode();
         }
 
         return original != hash ? CraftMetaArmor.class.hashCode() ^ hash : hash;
@@ -132,11 +132,11 @@ public class CraftMetaArmor extends CraftMetaItem implements ArmorMeta {
     Builder<String, Object> serialize(Builder<String, Object> builder) {
         super.serialize(builder);
 
-        if (hasTrim()) {
+        if (this.hasTrim()) {
             Map<String, String> trimData = new HashMap<>();
-            trimData.put(TRIM_MATERIAL.BUKKIT, trim.getMaterial().getKey().toString());
-            trimData.put(TRIM_PATTERN.BUKKIT, trim.getPattern().getKey().toString());
-            builder.put(TRIM.BUKKIT, trimData);
+            trimData.put(CraftMetaArmor.TRIM_MATERIAL.BUKKIT, this.trim.getMaterial().getKey().toString());
+            trimData.put(CraftMetaArmor.TRIM_PATTERN.BUKKIT, this.trim.getPattern().getKey().toString());
+            builder.put(CraftMetaArmor.TRIM.BUKKIT, trimData);
         }
 
         return builder;
@@ -144,7 +144,7 @@ public class CraftMetaArmor extends CraftMetaItem implements ArmorMeta {
 
     @Override
     public boolean hasTrim() {
-        return trim != null;
+        return this.trim != null;
     }
 
     @Override
@@ -154,6 +154,6 @@ public class CraftMetaArmor extends CraftMetaItem implements ArmorMeta {
 
     @Override
     public ArmorTrim getTrim() {
-        return trim;
+        return this.trim;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
index 7d02f8eca0..c4f12f96e3 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaArmorStand.java
@@ -4,8 +4,8 @@ import com.google.common.collect.ImmutableMap.Builder;
 import java.util.Map;
 import net.minecraft.core.component.DataComponentPatch;
 import net.minecraft.core.component.DataComponents;
-import net.minecraft.nbt.NBTBase;
-import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.nbt.Tag;
 import net.minecraft.world.item.component.CustomData;
 import org.bukkit.Material;
 import org.bukkit.configuration.serialization.DelegateDeserialization;
@@ -14,7 +14,7 @@ import org.bukkit.configuration.serialization.DelegateDeserialization;
 public class CraftMetaArmorStand extends CraftMetaItem {
 
     static final ItemMetaKeyType<CustomData> ENTITY_TAG = new ItemMetaKeyType<>(DataComponents.ENTITY_DATA, "entity-tag");
-    NBTTagCompound entityTag;
+    CompoundTag entityTag;
 
     CraftMetaArmorStand(CraftMetaItem meta) {
         super(meta);
@@ -30,8 +30,8 @@ public class CraftMetaArmorStand extends CraftMetaItem {
     CraftMetaArmorStand(DataComponentPatch tag) {
         super(tag);
 
-        getOrEmpty(tag, ENTITY_TAG).ifPresent((nbt) -> {
-            entityTag = nbt.copyTag();
+        getOrEmpty(tag, CraftMetaArmorStand.ENTITY_TAG).ifPresent((nbt) -> {
+            this.entityTag = nbt.copyTag();
         });
     }
 
@@ -40,18 +40,18 @@ public class CraftMetaArmorStand extends CraftMetaItem {
     }
 
     @Override
-    void deserializeInternal(NBTTagCompound tag, Object context) {
+    void deserializeInternal(CompoundTag tag, Object context) {
         super.deserializeInternal(tag, context);
 
-        if (tag.contains(ENTITY_TAG.NBT)) {
-            entityTag = tag.getCompound(ENTITY_TAG.NBT);
+        if (tag.contains(CraftMetaArmorStand.ENTITY_TAG.NBT)) {
+            this.entityTag = tag.getCompound(CraftMetaArmorStand.ENTITY_TAG.NBT);
         }
     }
 
     @Override
-    void serializeInternal(Map<String, NBTBase> internalTags) {
-        if (entityTag != null && !entityTag.isEmpty()) {
-            internalTags.put(ENTITY_TAG.NBT, entityTag);
+    void serializeInternal(Map<String, Tag> internalTags) {
+        if (this.entityTag != null && !this.entityTag.isEmpty()) {
+            internalTags.put(CraftMetaArmorStand.ENTITY_TAG.NBT, this.entityTag);
         }
     }
 
@@ -59,8 +59,8 @@ public class CraftMetaArmorStand extends CraftMetaItem {
     void applyToItem(CraftMetaItem.Applicator tag) {
         super.applyToItem(tag);
 
-        if (entityTag != null) {
-            tag.put(ENTITY_TAG, CustomData.of(entityTag));
+        if (this.entityTag != null) {
+            tag.put(CraftMetaArmorStand.ENTITY_TAG, CustomData.of(this.entityTag));
         }
     }
 
@@ -71,11 +71,11 @@ public class CraftMetaArmorStand extends CraftMetaItem {
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && isArmorStandEmpty();
+        return super.isEmpty() && this.isArmorStandEmpty();
     }
 
     boolean isArmorStandEmpty() {
-        return !(entityTag != null);
+        return !(this.entityTag != null);
     }
 
     @Override
@@ -86,14 +86,14 @@ public class CraftMetaArmorStand extends CraftMetaItem {
         if (meta instanceof CraftMetaArmorStand) {
             CraftMetaArmorStand that = (CraftMetaArmorStand) meta;
 
-            return entityTag != null ? that.entityTag != null && this.entityTag.equals(that.entityTag) : entityTag == null;
+            return this.entityTag != null ? that.entityTag != null && this.entityTag.equals(that.entityTag) : this.entityTag == null;
         }
         return true;
     }
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaArmorStand || isArmorStandEmpty());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaArmorStand || this.isArmorStandEmpty());
     }
 
     @Override
@@ -101,8 +101,8 @@ public class CraftMetaArmorStand extends CraftMetaItem {
         final int original;
         int hash = original = super.applyHash();
 
-        if (entityTag != null) {
-            hash = 73 * hash + entityTag.hashCode();
+        if (this.entityTag != null) {
+            hash = 73 * hash + this.entityTag.hashCode();
         }
 
         return original != hash ? CraftMetaArmorStand.class.hashCode() ^ hash : hash;
@@ -119,8 +119,8 @@ public class CraftMetaArmorStand extends CraftMetaItem {
     public CraftMetaArmorStand clone() {
         CraftMetaArmorStand clone = (CraftMetaArmorStand) super.clone();
 
-        if (entityTag != null) {
-            clone.entityTag = entityTag.copy();
+        if (this.entityTag != null) {
+            clone.entityTag = this.entityTag.copy();
         }
 
         return clone;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaAxolotlBucket.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaAxolotlBucket.java
index e43e68c3f1..c4beb94d8e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaAxolotlBucket.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaAxolotlBucket.java
@@ -4,8 +4,8 @@ import com.google.common.collect.ImmutableMap;
 import java.util.Map;
 import net.minecraft.core.component.DataComponentPatch;
 import net.minecraft.core.component.DataComponents;
-import net.minecraft.nbt.NBTBase;
-import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.nbt.Tag;
 import net.minecraft.world.item.component.CustomData;
 import org.bukkit.configuration.serialization.DelegateDeserialization;
 import org.bukkit.craftbukkit.util.CraftMagicNumbers;
@@ -20,8 +20,8 @@ public class CraftMetaAxolotlBucket extends CraftMetaItem implements AxolotlBuck
     static final ItemMetaKeyType<CustomData> BUCKET_ENTITY_TAG = new ItemMetaKeyType<>(DataComponents.BUCKET_ENTITY_DATA, "bucket-entity-tag");
 
     private Integer variant;
-    private NBTTagCompound entityTag;
-    private NBTTagCompound bucketEntityTag;
+    private CompoundTag entityTag;
+    private CompoundTag bucketEntityTag;
 
     CraftMetaAxolotlBucket(CraftMetaItem meta) {
         super(meta);
@@ -39,18 +39,18 @@ public class CraftMetaAxolotlBucket extends CraftMetaItem implements AxolotlBuck
     CraftMetaAxolotlBucket(DataComponentPatch tag) {
         super(tag);
 
-        getOrEmpty(tag, ENTITY_TAG).ifPresent((nbt) -> {
-            entityTag = nbt.copyTag();
+        getOrEmpty(tag, CraftMetaAxolotlBucket.ENTITY_TAG).ifPresent((nbt) -> {
+            this.entityTag = nbt.copyTag();
 
-            if (entityTag.contains(VARIANT.NBT, CraftMagicNumbers.NBT.TAG_INT)) {
-                this.variant = entityTag.getInt(VARIANT.NBT);
+            if (this.entityTag.contains(CraftMetaAxolotlBucket.VARIANT.NBT, CraftMagicNumbers.NBT.TAG_INT)) {
+                this.variant = this.entityTag.getInt(CraftMetaAxolotlBucket.VARIANT.NBT);
             }
         });
-        getOrEmpty(tag, BUCKET_ENTITY_TAG).ifPresent((nbt) -> {
-            bucketEntityTag = nbt.copyTag();
+        getOrEmpty(tag, CraftMetaAxolotlBucket.BUCKET_ENTITY_TAG).ifPresent((nbt) -> {
+            this.bucketEntityTag = nbt.copyTag();
 
-            if (bucketEntityTag.contains(VARIANT.NBT, CraftMagicNumbers.NBT.TAG_INT)) {
-                this.variant = bucketEntityTag.getInt(VARIANT.NBT);
+            if (this.bucketEntityTag.contains(CraftMetaAxolotlBucket.VARIANT.NBT, CraftMagicNumbers.NBT.TAG_INT)) {
+                this.variant = this.bucketEntityTag.getInt(CraftMetaAxolotlBucket.VARIANT.NBT);
             }
         });
     }
@@ -58,31 +58,31 @@ public class CraftMetaAxolotlBucket extends CraftMetaItem implements AxolotlBuck
     CraftMetaAxolotlBucket(Map<String, Object> map) {
         super(map);
 
-        Integer variant = SerializableMeta.getObject(Integer.class, map, VARIANT.BUKKIT, true);
+        Integer variant = SerializableMeta.getObject(Integer.class, map, CraftMetaAxolotlBucket.VARIANT.BUKKIT, true);
         if (variant != null) {
             this.variant = variant;
         }
     }
 
     @Override
-    void deserializeInternal(NBTTagCompound tag, Object context) {
+    void deserializeInternal(CompoundTag tag, Object context) {
         super.deserializeInternal(tag, context);
 
-        if (tag.contains(ENTITY_TAG.NBT)) {
-            entityTag = tag.getCompound(ENTITY_TAG.NBT);
+        if (tag.contains(CraftMetaAxolotlBucket.ENTITY_TAG.NBT)) {
+            this.entityTag = tag.getCompound(CraftMetaAxolotlBucket.ENTITY_TAG.NBT);
         }
-        if (tag.contains(BUCKET_ENTITY_TAG.NBT)) {
-            bucketEntityTag = tag.getCompound(BUCKET_ENTITY_TAG.NBT);
+        if (tag.contains(CraftMetaAxolotlBucket.BUCKET_ENTITY_TAG.NBT)) {
+            this.bucketEntityTag = tag.getCompound(CraftMetaAxolotlBucket.BUCKET_ENTITY_TAG.NBT);
         }
     }
 
     @Override
-    void serializeInternal(Map<String, NBTBase> internalTags) {
-        if (entityTag != null && !entityTag.isEmpty()) {
-            internalTags.put(ENTITY_TAG.NBT, entityTag);
+    void serializeInternal(Map<String, Tag> internalTags) {
+        if (this.entityTag != null && !this.entityTag.isEmpty()) {
+            internalTags.put(CraftMetaAxolotlBucket.ENTITY_TAG.NBT, this.entityTag);
         }
-        if (bucketEntityTag != null && !bucketEntityTag.isEmpty()) {
-            internalTags.put(BUCKET_ENTITY_TAG.NBT, bucketEntityTag);
+        if (this.bucketEntityTag != null && !this.bucketEntityTag.isEmpty()) {
+            internalTags.put(CraftMetaAxolotlBucket.BUCKET_ENTITY_TAG.NBT, this.bucketEntityTag);
         }
     }
 
@@ -90,35 +90,35 @@ public class CraftMetaAxolotlBucket extends CraftMetaItem implements AxolotlBuck
     void applyToItem(CraftMetaItem.Applicator tag) {
         super.applyToItem(tag);
 
-        if (entityTag != null) {
-            tag.put(ENTITY_TAG, CustomData.of(entityTag));
+        if (this.entityTag != null) {
+            tag.put(CraftMetaAxolotlBucket.ENTITY_TAG, CustomData.of(this.entityTag));
         }
 
-        NBTTagCompound bucketEntityTag = (this.bucketEntityTag != null) ? this.bucketEntityTag.copy() : null;
-        if (hasVariant()) {
+        CompoundTag bucketEntityTag = (this.bucketEntityTag != null) ? this.bucketEntityTag.copy() : null;
+        if (this.hasVariant()) {
             if (bucketEntityTag == null) {
-                bucketEntityTag = new NBTTagCompound();
+                bucketEntityTag = new CompoundTag();
             }
-            bucketEntityTag.putInt(VARIANT.NBT, variant);
+            bucketEntityTag.putInt(CraftMetaAxolotlBucket.VARIANT.NBT, this.variant);
         }
 
         if (bucketEntityTag != null) {
-            tag.put(BUCKET_ENTITY_TAG, CustomData.of(bucketEntityTag));
+            tag.put(CraftMetaAxolotlBucket.BUCKET_ENTITY_TAG, CustomData.of(bucketEntityTag));
         }
     }
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && isBucketEmpty();
+        return super.isEmpty() && this.isBucketEmpty();
     }
 
     boolean isBucketEmpty() {
-        return !(hasVariant() || entityTag != null || bucketEntityTag != null);
+        return !(this.hasVariant() || this.entityTag != null || this.bucketEntityTag != null);
     }
 
     @Override
     public Axolotl.Variant getVariant() {
-        return Axolotl.Variant.values()[variant];
+        return Axolotl.Variant.values()[this.variant];
     }
 
     @Override
@@ -131,7 +131,7 @@ public class CraftMetaAxolotlBucket extends CraftMetaItem implements AxolotlBuck
 
     @Override
     public boolean hasVariant() {
-        return variant != null;
+        return this.variant != null;
     }
 
     @Override
@@ -142,16 +142,16 @@ public class CraftMetaAxolotlBucket extends CraftMetaItem implements AxolotlBuck
         if (meta instanceof CraftMetaAxolotlBucket) {
             CraftMetaAxolotlBucket that = (CraftMetaAxolotlBucket) meta;
 
-            return (hasVariant() ? that.hasVariant() && this.variant.equals(that.variant) : !that.hasVariant())
-                    && (entityTag != null ? that.entityTag != null && this.entityTag.equals(that.entityTag) : that.entityTag == null)
-                    && (bucketEntityTag != null ? that.bucketEntityTag != null && this.bucketEntityTag.equals(that.bucketEntityTag) : that.bucketEntityTag == null);
+            return (this.hasVariant() ? that.hasVariant() && this.variant.equals(that.variant) : !that.hasVariant())
+                    && (this.entityTag != null ? that.entityTag != null && this.entityTag.equals(that.entityTag) : that.entityTag == null)
+                    && (this.bucketEntityTag != null ? that.bucketEntityTag != null && this.bucketEntityTag.equals(that.bucketEntityTag) : that.bucketEntityTag == null);
         }
         return true;
     }
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaAxolotlBucket || isBucketEmpty());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaAxolotlBucket || this.isBucketEmpty());
     }
 
     @Override
@@ -159,14 +159,14 @@ public class CraftMetaAxolotlBucket extends CraftMetaItem implements AxolotlBuck
         final int original;
         int hash = original = super.applyHash();
 
-        if (hasVariant()) {
-            hash = 61 * hash + variant;
+        if (this.hasVariant()) {
+            hash = 61 * hash + this.variant;
         }
-        if (entityTag != null) {
-            hash = 61 * hash + entityTag.hashCode();
+        if (this.entityTag != null) {
+            hash = 61 * hash + this.entityTag.hashCode();
         }
-        if (bucketEntityTag != null) {
-            hash = 61 * hash + bucketEntityTag.hashCode();
+        if (this.bucketEntityTag != null) {
+            hash = 61 * hash + this.bucketEntityTag.hashCode();
         }
 
         return original != hash ? CraftMetaAxolotlBucket.class.hashCode() ^ hash : hash;
@@ -176,11 +176,11 @@ public class CraftMetaAxolotlBucket extends CraftMetaItem implements AxolotlBuck
     public CraftMetaAxolotlBucket clone() {
         CraftMetaAxolotlBucket clone = (CraftMetaAxolotlBucket) super.clone();
 
-        if (entityTag != null) {
-            clone.entityTag = entityTag.copy();
+        if (this.entityTag != null) {
+            clone.entityTag = this.entityTag.copy();
         }
-        if (bucketEntityTag != null) {
-            clone.bucketEntityTag = bucketEntityTag.copy();
+        if (this.bucketEntityTag != null) {
+            clone.bucketEntityTag = this.bucketEntityTag.copy();
         }
 
         return clone;
@@ -190,8 +190,8 @@ public class CraftMetaAxolotlBucket extends CraftMetaItem implements AxolotlBuck
     ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
         super.serialize(builder);
 
-        if (hasVariant()) {
-            builder.put(VARIANT.BUKKIT, variant);
+        if (this.hasVariant()) {
+            builder.put(CraftMetaAxolotlBucket.VARIANT.BUKKIT, this.variant);
         }
 
         return builder;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java
index 74b62d6dfa..1c1a2d66d1 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBanner.java
@@ -8,7 +8,6 @@ import java.util.List;
 import java.util.Map;
 import net.minecraft.core.component.DataComponentPatch;
 import net.minecraft.core.component.DataComponents;
-import net.minecraft.world.item.EnumColor;
 import net.minecraft.world.level.block.entity.BannerPatternLayers;
 import org.bukkit.DyeColor;
 import org.bukkit.block.banner.Pattern;
@@ -32,16 +31,16 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta {
         }
 
         CraftMetaBanner banner = (CraftMetaBanner) meta;
-        patterns = new ArrayList<Pattern>(banner.patterns);
+        this.patterns = new ArrayList<Pattern>(banner.patterns);
     }
 
     CraftMetaBanner(DataComponentPatch tag) {
         super(tag);
 
-        getOrEmpty(tag, PATTERNS).ifPresent((entityTag) -> {
-            List<BannerPatternLayers.b> patterns = entityTag.layers();
+        getOrEmpty(tag, CraftMetaBanner.PATTERNS).ifPresent((entityTag) -> {
+            List<BannerPatternLayers.Layer> patterns = entityTag.layers();
             for (int i = 0; i < Math.min(patterns.size(), 20); i++) {
-                BannerPatternLayers.b p = patterns.get(i);
+                BannerPatternLayers.Layer p = patterns.get(i);
                 DyeColor color = DyeColor.getByWoolData((byte) p.color().getId());
                 PatternType pattern = CraftPatternType.minecraftHolderToBukkit(p.pattern());
 
@@ -55,14 +54,14 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta {
     CraftMetaBanner(Map<String, Object> map) {
         super(map);
 
-        Iterable<?> rawPatternList = SerializableMeta.getObject(Iterable.class, map, PATTERNS.BUKKIT, true);
+        Iterable<?> rawPatternList = SerializableMeta.getObject(Iterable.class, map, CraftMetaBanner.PATTERNS.BUKKIT, true);
         if (rawPatternList == null) {
             return;
         }
 
         for (Object obj : rawPatternList) {
             Preconditions.checkArgument(obj instanceof Pattern, "Object (%s) in pattern list is not valid", obj.getClass());
-            addPattern((Pattern) obj);
+            this.addPattern((Pattern) obj);
         }
     }
 
@@ -70,18 +69,18 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta {
     void applyToItem(CraftMetaItem.Applicator tag) {
         super.applyToItem(tag);
 
-        List<BannerPatternLayers.b> newPatterns = new ArrayList<>();
+        List<BannerPatternLayers.Layer> newPatterns = new ArrayList<>();
 
-        for (Pattern p : patterns) {
-            newPatterns.add(new BannerPatternLayers.b(CraftPatternType.bukkitToMinecraftHolder(p.getPattern()), EnumColor.byId(p.getColor().getWoolData())));
+        for (Pattern p : this.patterns) {
+            newPatterns.add(new BannerPatternLayers.Layer(CraftPatternType.bukkitToMinecraftHolder(p.getPattern()), net.minecraft.world.item.DyeColor.byId(p.getColor().getWoolData())));
         }
 
-        tag.put(PATTERNS, new BannerPatternLayers(newPatterns));
+        tag.put(CraftMetaBanner.PATTERNS, new BannerPatternLayers(newPatterns));
     }
 
     @Override
     public List<Pattern> getPatterns() {
-        return new ArrayList<Pattern>(patterns);
+        return new ArrayList<Pattern>(this.patterns);
     }
 
     @Override
@@ -91,35 +90,35 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta {
 
     @Override
     public void addPattern(Pattern pattern) {
-        patterns.add(pattern);
+        this.patterns.add(pattern);
     }
 
     @Override
     public Pattern getPattern(int i) {
-        return patterns.get(i);
+        return this.patterns.get(i);
     }
 
     @Override
     public Pattern removePattern(int i) {
-        return patterns.remove(i);
+        return this.patterns.remove(i);
     }
 
     @Override
     public void setPattern(int i, Pattern pattern) {
-        patterns.set(i, pattern);
+        this.patterns.set(i, pattern);
     }
 
     @Override
     public int numberOfPatterns() {
-        return patterns.size();
+        return this.patterns.size();
     }
 
     @Override
     ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
         super.serialize(builder);
 
-        if (!patterns.isEmpty()) {
-            builder.put(PATTERNS.BUKKIT, ImmutableList.copyOf(patterns));
+        if (!this.patterns.isEmpty()) {
+            builder.put(CraftMetaBanner.PATTERNS.BUKKIT, ImmutableList.copyOf(this.patterns));
         }
 
         return builder;
@@ -129,8 +128,8 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta {
     int applyHash() {
         final int original;
         int hash = original = super.applyHash();
-        if (!patterns.isEmpty()) {
-            hash = 31 * hash + patterns.hashCode();
+        if (!this.patterns.isEmpty()) {
+            hash = 31 * hash + this.patterns.hashCode();
         }
         return original != hash ? CraftMetaBanner.class.hashCode() ^ hash : hash;
     }
@@ -143,25 +142,25 @@ public class CraftMetaBanner extends CraftMetaItem implements BannerMeta {
         if (meta instanceof CraftMetaBanner) {
             CraftMetaBanner that = (CraftMetaBanner) meta;
 
-            return patterns.equals(that.patterns);
+            return this.patterns.equals(that.patterns);
         }
         return true;
     }
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaBanner || patterns.isEmpty());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaBanner || this.patterns.isEmpty());
     }
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && patterns.isEmpty();
+        return super.isEmpty() && this.patterns.isEmpty();
     }
 
     @Override
     public CraftMetaBanner clone() {
         CraftMetaBanner meta = (CraftMetaBanner) super.clone();
-        meta.patterns = new ArrayList<>(patterns);
+        meta.patterns = new ArrayList<>(this.patterns);
         return meta;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java
index 487d07b838..e70b917698 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBlockState.java
@@ -6,18 +6,17 @@ import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Sets;
 import java.util.Map;
 import java.util.Set;
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
 import net.minecraft.core.component.DataComponentMap;
 import net.minecraft.core.component.DataComponentPatch;
 import net.minecraft.core.component.DataComponentType;
 import net.minecraft.core.component.DataComponents;
 import net.minecraft.core.component.PatchedDataComponentMap;
 import net.minecraft.core.component.TypedDataComponent;
-import net.minecraft.nbt.NBTBase;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.world.item.EnumColor;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.nbt.Tag;
 import net.minecraft.world.item.component.CustomData;
-import net.minecraft.world.level.block.entity.TileEntity;
+import net.minecraft.world.level.block.entity.BlockEntity;
 import org.bukkit.DyeColor;
 import org.bukkit.Material;
 import org.bukkit.block.BlockState;
@@ -57,7 +56,7 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
     final Material material;
     private CraftBlockEntityState<?> blockEntityTag;
     private BlockVector position;
-    private NBTTagCompound internalTag;
+    private CompoundTag internalTag;
 
     CraftMetaBlockState(CraftMetaItem meta, Material material) {
         super(meta);
@@ -65,7 +64,7 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
 
         if (!(meta instanceof CraftMetaBlockState)
                 || ((CraftMetaBlockState) meta).material != material) {
-            blockEntityTag = null;
+            this.blockEntityTag = null;
             return;
         }
 
@@ -78,19 +77,19 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
         super(tag);
         this.material = material;
 
-        getOrEmpty(tag, BLOCK_ENTITY_TAG).ifPresent((blockTag) -> {
-            NBTTagCompound nbt = blockTag.copyTag();
+        getOrEmpty(tag, CraftMetaBlockState.BLOCK_ENTITY_TAG).ifPresent((blockTag) -> {
+            CompoundTag nbt = blockTag.copyTag();
 
-            blockEntityTag = getBlockState(material, nbt);
+            this.blockEntityTag = CraftMetaBlockState.getBlockState(material, nbt);
             if (nbt.contains("x", CraftMagicNumbers.NBT.TAG_ANY_NUMBER) && nbt.contains("y", CraftMagicNumbers.NBT.TAG_ANY_NUMBER) && nbt.contains("z", CraftMagicNumbers.NBT.TAG_ANY_NUMBER)) {
-                position = new BlockVector(nbt.getInt("x"), nbt.getInt("y"), nbt.getInt("z"));
+                this.position = new BlockVector(nbt.getInt("x"), nbt.getInt("y"), nbt.getInt("z"));
             }
         });
 
         if (!tag.isEmpty()) {
             CraftBlockEntityState<?> blockEntityTag = this.blockEntityTag;
             if (blockEntityTag == null) {
-                blockEntityTag = getBlockState(material, null);
+                blockEntityTag = CraftMetaBlockState.getBlockState(material, null);
             }
 
             // Convert to map
@@ -100,7 +99,7 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
             Set<DataComponentType<?>> applied = blockEntityTag.applyComponents(map, tag);
             // Mark applied components as handled
             for (DataComponentType<?> seen : applied) {
-                unhandledTags.clear(seen);
+                this.unhandledTags.clear(seen);
             }
             // Only set blockEntityTag if something was applied
             if (!applied.isEmpty()) {
@@ -114,71 +113,71 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
         String matName = SerializableMeta.getString(map, "blockMaterial", true);
         Material m = Material.getMaterial(matName);
         if (m != null) {
-            material = m;
+            this.material = m;
         } else {
-            material = Material.AIR;
+            this.material = Material.AIR;
         }
-        if (internalTag != null) {
-            blockEntityTag = getBlockState(material, internalTag);
-            internalTag = null;
+        if (this.internalTag != null) {
+            this.blockEntityTag = CraftMetaBlockState.getBlockState(this.material, this.internalTag);
+            this.internalTag = null;
         }
-        position = SerializableMeta.getObject(BlockVector.class, map, "blockPosition", true);
+        this.position = SerializableMeta.getObject(BlockVector.class, map, "blockPosition", true);
     }
 
     @Override
     void applyToItem(CraftMetaItem.Applicator tag) {
         super.applyToItem(tag);
 
-        NBTTagCompound nbt = null;
-        if (blockEntityTag != null) {
-            nbt = blockEntityTag.getItemNBT();
+        CompoundTag nbt = null;
+        if (this.blockEntityTag != null) {
+            nbt = this.blockEntityTag.getItemNBT();
 
-            for (TypedDataComponent<?> component : blockEntityTag.collectComponents()) {
+            for (TypedDataComponent<?> component : this.blockEntityTag.collectComponents()) {
                 tag.putIfAbsent(component);
             }
         }
 
-        if (position != null) {
+        if (this.position != null) {
             if (nbt == null) {
-                nbt = new NBTTagCompound();
+                nbt = new CompoundTag();
             }
 
-            nbt.putInt("x", position.getBlockX());
-            nbt.putInt("y", position.getBlockY());
-            nbt.putInt("z", position.getBlockZ());
+            nbt.putInt("x", this.position.getBlockX());
+            nbt.putInt("y", this.position.getBlockY());
+            nbt.putInt("z", this.position.getBlockZ());
         }
 
         if (nbt != null && !nbt.isEmpty()) {
-            CraftBlockEntityState<?> tile = (blockEntityTag != null) ? blockEntityTag : getBlockState(material, null);
+            CraftBlockEntityState<?> tile = (this.blockEntityTag != null) ? this.blockEntityTag : CraftMetaBlockState.getBlockState(this.material, null);
             // See ItemBlock#setBlockEntityData
             tile.addEntityType(nbt);
 
-            tag.put(BLOCK_ENTITY_TAG, CustomData.of(nbt));
+            tag.put(CraftMetaBlockState.BLOCK_ENTITY_TAG, CustomData.of(nbt));
         }
     }
 
     @Override
-    void deserializeInternal(NBTTagCompound tag, Object context) {
+    void deserializeInternal(CompoundTag tag, Object context) {
         super.deserializeInternal(tag, context);
 
-        if (tag.contains(BLOCK_ENTITY_TAG.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND)) {
-            internalTag = tag.getCompound(BLOCK_ENTITY_TAG.NBT);
+        if (tag.contains(CraftMetaBlockState.BLOCK_ENTITY_TAG.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND)) {
+            this.internalTag = tag.getCompound(CraftMetaBlockState.BLOCK_ENTITY_TAG.NBT);
         }
     }
 
     @Override
-    void serializeInternal(final Map<String, NBTBase> internalTags) {
-        if (blockEntityTag != null) {
-            internalTags.put(BLOCK_ENTITY_TAG.NBT, blockEntityTag.getSnapshotNBT());
+    void serializeInternal(final Map<String, Tag> internalTags) {
+        if (this.blockEntityTag != null) {
+            internalTags.put(CraftMetaBlockState.BLOCK_ENTITY_TAG.NBT, this.blockEntityTag.getSnapshotNBT());
         }
     }
 
     @Override
     ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
         super.serialize(builder);
-        builder.put("blockMaterial", material.name());
-        if (position != null) {
-            builder.put("blockPosition", position);
+        builder.put("blockMaterial", this.material.name());
+        if (this.position != null) {
+            builder.put("blockPosition", this.position);
         }
         return builder;
     }
@@ -187,10 +186,10 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
     int applyHash() {
         final int original;
         int hash = original = super.applyHash();
-        if (blockEntityTag != null) {
+        if (this.blockEntityTag != null) {
             hash = 61 * hash + this.blockEntityTag.hashCode();
         }
-        if (position != null) {
+        if (this.position != null) {
             hash = 61 * hash + this.position.hashCode();
         }
         return original != hash ? CraftMetaBlockState.class.hashCode() ^ hash : hash;
@@ -210,54 +209,54 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
     }
 
     boolean isBlockStateEmpty() {
-        return !(blockEntityTag != null || position != null);
+        return !(this.blockEntityTag != null || this.position != null);
     }
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaBlockState || isBlockStateEmpty());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaBlockState || this.isBlockStateEmpty());
     }
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && isBlockStateEmpty();
+        return super.isEmpty() && this.isBlockStateEmpty();
     }
 
     @Override
     public CraftMetaBlockState clone() {
         CraftMetaBlockState meta = (CraftMetaBlockState) super.clone();
-        if (blockEntityTag != null) {
-            meta.blockEntityTag = blockEntityTag.copy();
+        if (this.blockEntityTag != null) {
+            meta.blockEntityTag = this.blockEntityTag.copy();
         }
-        if (position != null) {
-            meta.position = position.clone();
+        if (this.position != null) {
+            meta.position = this.position.clone();
         }
         return meta;
     }
 
     @Override
     public boolean hasBlockState() {
-        return blockEntityTag != null;
+        return this.blockEntityTag != null;
     }
 
     @Override
     public BlockState getBlockState() {
-        return (blockEntityTag != null) ? blockEntityTag.copy() : getBlockState(material, null);
+        return (this.blockEntityTag != null) ? this.blockEntityTag.copy() : CraftMetaBlockState.getBlockState(this.material, null);
     }
 
-    private static CraftBlockEntityState<?> getBlockState(Material material, NBTTagCompound blockEntityTag) {
-        BlockPosition pos = BlockPosition.ZERO;
-        Material stateMaterial = (material != Material.SHIELD) ? material : shieldToBannerHack(blockEntityTag); // Only actually used for jigsaws
+    private static CraftBlockEntityState<?> getBlockState(Material material, CompoundTag blockEntityTag) {
+        BlockPos pos = BlockPos.ZERO;
+        Material stateMaterial = (material != Material.SHIELD) ? material : CraftMetaBlockState.shieldToBannerHack(blockEntityTag); // Only actually used for jigsaws
         if (blockEntityTag != null) {
             if (material == Material.SHIELD) {
                 blockEntityTag.putString("id", "minecraft:banner");
             } else if (material == Material.BEE_NEST || material == Material.BEEHIVE) {
                 blockEntityTag.putString("id", "minecraft:beehive");
-            } else if (SHULKER_BOX_MATERIALS.contains(material)) {
+            } else if (CraftMetaBlockState.SHULKER_BOX_MATERIALS.contains(material)) {
                 blockEntityTag.putString("id", "minecraft:shulker_box");
             }
 
-            pos = TileEntity.getPosFromTag(blockEntityTag);
+            pos = BlockEntity.getPosFromTag(blockEntityTag);
         }
 
         // This is expected to always return a CraftBlockEntityState for the passed material:
@@ -268,19 +267,19 @@ public class CraftMetaBlockState extends CraftMetaItem implements BlockStateMeta
     public void setBlockState(BlockState blockState) {
         Preconditions.checkArgument(blockState != null, "blockState must not be null");
 
-        Material stateMaterial = (material != Material.SHIELD) ? material : shieldToBannerHack(null);
+        Material stateMaterial = (this.material != Material.SHIELD) ? this.material : CraftMetaBlockState.shieldToBannerHack(null);
         Class<?> blockStateType = CraftBlockStates.getBlockStateType(stateMaterial);
-        Preconditions.checkArgument(blockStateType == blockState.getClass() && blockState instanceof CraftBlockEntityState, "Invalid blockState for %s", material);
+        Preconditions.checkArgument(blockStateType == blockState.getClass() && blockState instanceof CraftBlockEntityState, "Invalid blockState for %s", this.material);
 
         this.blockEntityTag = (CraftBlockEntityState<?>) blockState;
     }
 
-    private static Material shieldToBannerHack(NBTTagCompound tag) {
+    private static Material shieldToBannerHack(CompoundTag tag) {
         if (tag != null) {
             if (tag.contains("components", CraftMagicNumbers.NBT.TAG_COMPOUND)) {
-                NBTTagCompound components = tag.getCompound("components");
+                CompoundTag components = tag.getCompound("components");
                 if (components.contains("minecraft:base_color", CraftMagicNumbers.NBT.TAG_STRING)) {
-                    DyeColor color = DyeColor.getByWoolData((byte) EnumColor.byName(components.getString("minecraft:base_color"), EnumColor.WHITE).getId());
+                    DyeColor color = DyeColor.getByWoolData((byte) net.minecraft.world.item.DyeColor.byName(components.getString("minecraft:base_color"), net.minecraft.world.item.DyeColor.WHITE).getId());
 
                     return CraftMetaShield.shieldToBannerHack(color);
                 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
index d338430fde..910fa92e08 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBook.java
@@ -41,7 +41,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta, WritableBo
             if (bookMeta.pages != null) {
                 this.pages = new ArrayList<String>(bookMeta.pages.size());
 
-                pages.addAll(bookMeta.pages);
+                this.pages.addAll(bookMeta.pages);
             }
         } else if (meta instanceof CraftMetaBookSigned) {
             CraftMetaBookSigned bookMeta = (CraftMetaBookSigned) meta;
@@ -50,7 +50,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta, WritableBo
                 this.pages = new ArrayList<String>(bookMeta.pages.size());
 
                 // Convert from JSON to plain Strings:
-                pages.addAll(Lists.transform(bookMeta.pages, CraftChatMessage::fromComponent));
+                this.pages.addAll(Lists.transform(bookMeta.pages, CraftChatMessage::fromComponent));
             }
         }
     }
@@ -58,15 +58,15 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta, WritableBo
     CraftMetaBook(DataComponentPatch tag) {
         super(tag);
 
-        getOrEmpty(tag, BOOK_CONTENT).ifPresent((writable) -> {
+        getOrEmpty(tag, CraftMetaBook.BOOK_CONTENT).ifPresent((writable) -> {
             List<Filterable<String>> pages = writable.pages();
             this.pages = new ArrayList<String>(pages.size());
 
             // Note: We explicitly check for and truncate oversized books and pages,
             // because they can come directly from clients when handling book edits.
-            for (int i = 0; i < Math.min(pages.size(), MAX_PAGES); i++) {
+            for (int i = 0; i < Math.min(pages.size(), CraftMetaBook.MAX_PAGES); i++) {
                 String page = pages.get(i).raw();
-                page = validatePage(page);
+                page = this.validatePage(page);
 
                 this.pages.add(page);
             }
@@ -76,12 +76,12 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta, WritableBo
     CraftMetaBook(Map<String, Object> map) {
         super(map);
 
-        Iterable<?> pages = SerializableMeta.getObject(Iterable.class, map, BOOK_PAGES.BUKKIT, true);
+        Iterable<?> pages = SerializableMeta.getObject(Iterable.class, map, CraftMetaBook.BOOK_PAGES.BUKKIT, true);
         if (pages != null) {
             this.pages = new ArrayList<String>();
             for (Object page : pages) {
                 if (page instanceof String) {
-                    internalAddPage(validatePage((String) page));
+                    this.internalAddPage(this.validatePage((String) page));
                 }
             }
         }
@@ -91,22 +91,22 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta, WritableBo
     void applyToItem(CraftMetaItem.Applicator itemData) {
         super.applyToItem(itemData);
 
-        if (pages != null) {
+        if (this.pages != null) {
             List<Filterable<String>> list = new ArrayList<>();
-            for (String page : pages) {
+            for (String page : this.pages) {
                 list.add(Filterable.from(FilteredText.passThrough(page)));
             }
-            itemData.put(BOOK_CONTENT, new WritableBookContent(list));
+            itemData.put(CraftMetaBook.BOOK_CONTENT, new WritableBookContent(list));
         }
     }
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && isBookEmpty();
+        return super.isEmpty() && this.isBookEmpty();
     }
 
     boolean isBookEmpty() {
-        return !(pages != null);
+        return !(this.pages != null);
     }
 
     @Override
@@ -126,7 +126,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta, WritableBo
 
     @Override
     public boolean hasPages() {
-        return (pages != null) && !pages.isEmpty();
+        return (this.pages != null) && !this.pages.isEmpty();
     }
 
     @Override
@@ -164,38 +164,38 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta, WritableBo
 
     @Override
     public String getPage(final int page) {
-        Preconditions.checkArgument(isValidPage(page), "Invalid page number (%s)", page);
+        Preconditions.checkArgument(this.isValidPage(page), "Invalid page number (%s)", page);
         // assert: pages != null
-        return pages.get(page - 1);
+        return this.pages.get(page - 1);
     }
 
     @Override
     public void setPage(final int page, final String text) {
-        Preconditions.checkArgument(isValidPage(page), "Invalid page number (%s/%s)", page, getPageCount());
+        Preconditions.checkArgument(this.isValidPage(page), "Invalid page number (%s/%s)", page, this.getPageCount());
         // assert: pages != null
 
-        String newText = validatePage(text);
-        pages.set(page - 1, newText);
+        String newText = this.validatePage(text);
+        this.pages.set(page - 1, newText);
     }
 
     @Override
     public void setPages(final String... pages) {
-        setPages(Arrays.asList(pages));
+        this.setPages(Arrays.asList(pages));
     }
 
     @Override
     public void addPage(final String... pages) {
         for (String page : pages) {
-            page = validatePage(page);
-            internalAddPage(page);
+            page = this.validatePage(page);
+            this.internalAddPage(page);
         }
     }
 
     String validatePage(String page) {
         if (page == null) {
             page = "";
-        } else if (page.length() > MAX_PAGE_LENGTH) {
-            page = page.substring(0, MAX_PAGE_LENGTH);
+        } else if (page.length() > CraftMetaBook.MAX_PAGE_LENGTH) {
+            page = page.substring(0, CraftMetaBook.MAX_PAGE_LENGTH);
         }
         return page;
     }
@@ -204,7 +204,7 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta, WritableBo
         // asserted: page != null
         if (this.pages == null) {
             this.pages = new ArrayList<String>();
-        } else if (this.pages.size() >= MAX_PAGES) {
+        } else if (this.pages.size() >= CraftMetaBook.MAX_PAGES) {
             return;
         }
         this.pages.add(page);
@@ -212,13 +212,13 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta, WritableBo
 
     @Override
     public int getPageCount() {
-        return (pages == null) ? 0 : pages.size();
+        return (this.pages == null) ? 0 : this.pages.size();
     }
 
     @Override
     public List<String> getPages() {
-        if (pages == null) return ImmutableList.of();
-        return pages.stream().collect(ImmutableList.toImmutableList());
+        if (this.pages == null) return ImmutableList.of();
+        return this.pages.stream().collect(ImmutableList.toImmutableList());
     }
 
     @Override
@@ -232,12 +232,12 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta, WritableBo
             this.pages.clear();
         }
         for (String page : pages) {
-            addPage(page);
+            this.addPage(page);
         }
     }
 
     private boolean isValidPage(int page) {
-        return page > 0 && page <= getPageCount();
+        return page > 0 && page <= this.getPageCount();
     }
 
     @Override
@@ -273,15 +273,15 @@ public class CraftMetaBook extends CraftMetaItem implements BookMeta, WritableBo
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaBook || isBookEmpty());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaBook || this.isBookEmpty());
     }
 
     @Override
     Builder<String, Object> serialize(Builder<String, Object> builder) {
         super.serialize(builder);
 
-        if (pages != null) {
-            builder.put(BOOK_PAGES.BUKKIT, ImmutableList.copyOf(pages));
+        if (this.pages != null) {
+            builder.put(CraftMetaBook.BOOK_PAGES.BUKKIT, ImmutableList.copyOf(this.pages));
         }
 
         return builder;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java
index 7a7c71927d..fd804f497c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBookSigned.java
@@ -11,7 +11,7 @@ import java.util.Map;
 import java.util.Objects;
 import net.minecraft.core.component.DataComponentPatch;
 import net.minecraft.core.component.DataComponents;
-import net.minecraft.network.chat.IChatBaseComponent;
+import net.minecraft.network.chat.Component;
 import net.minecraft.server.network.Filterable;
 import net.minecraft.server.network.FilteredText;
 import net.minecraft.world.item.component.WritableBookContent;
@@ -37,7 +37,7 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta {
     protected String title;
     protected String author;
     // Stored as components and serialized as JSON. See SPIGOT-5063, SPIGOT-5350, SPIGOT-3206
-    protected List<IChatBaseComponent> pages; // null and empty are two different states internally
+    protected List<Component> pages; // null and empty are two different states internally
     protected boolean resolved;
     protected int generation;
 
@@ -52,21 +52,21 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta {
             this.generation = bookMeta.generation;
 
             if (bookMeta.pages != null) {
-                this.pages = new ArrayList<IChatBaseComponent>(bookMeta.pages.size());
-                pages.addAll(bookMeta.pages);
+                this.pages = new ArrayList<Component>(bookMeta.pages.size());
+                this.pages.addAll(bookMeta.pages);
             }
         } else if (meta instanceof CraftMetaBook) {
             CraftMetaBook bookMeta = (CraftMetaBook) meta;
 
             if (bookMeta.pages != null) {
-                this.pages = new ArrayList<IChatBaseComponent>(bookMeta.pages.size());
+                this.pages = new ArrayList<Component>(bookMeta.pages.size());
 
                 // Convert from plain Strings to JSON:
                 // This happens for example during book signing.
                 for (String page : bookMeta.pages) {
                     // We don't insert any non-plain text features (such as clickable links) during this conversion.
-                    IChatBaseComponent component = CraftChatMessage.fromString(page, true, true)[0];
-                    pages.add(component);
+                    Component component = CraftChatMessage.fromString(page, true, true)[0];
+                    this.pages.add(component);
                 }
             }
         }
@@ -75,18 +75,18 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta {
     CraftMetaBookSigned(DataComponentPatch tag) {
         super(tag);
 
-        getOrEmpty(tag, BOOK_CONTENT).ifPresent((written) -> {
+        getOrEmpty(tag, CraftMetaBookSigned.BOOK_CONTENT).ifPresent((written) -> {
             this.title = written.title().raw();
             this.author = written.author();
             this.resolved = written.resolved();
             this.generation = written.generation();
 
-            List<Filterable<IChatBaseComponent>> pages = written.pages();
-            this.pages = new ArrayList<IChatBaseComponent>(pages.size());
+            List<Filterable<Component>> pages = written.pages();
+            this.pages = new ArrayList<Component>(pages.size());
             // Note: We explicitly check for and truncate oversized books and pages,
             // because they can come directly from clients when handling book edits.
-            for (int i = 0; i < Math.min(pages.size(), MAX_PAGES); i++) {
-                IChatBaseComponent page = pages.get(i).raw();
+            for (int i = 0; i < Math.min(pages.size(), CraftMetaBookSigned.MAX_PAGES); i++) {
+                Component page = pages.get(i).raw();
 
                 this.pages.add(page);
             }
@@ -96,44 +96,44 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta {
     CraftMetaBookSigned(Map<String, Object> map) {
         super(map);
 
-        setAuthor(SerializableMeta.getString(map, BOOK_AUTHOR.BUKKIT, true));
+        this.setAuthor(SerializableMeta.getString(map, CraftMetaBookSigned.BOOK_AUTHOR.BUKKIT, true));
 
-        setTitle(SerializableMeta.getString(map, BOOK_TITLE.BUKKIT, true));
+        this.setTitle(SerializableMeta.getString(map, CraftMetaBookSigned.BOOK_TITLE.BUKKIT, true));
 
-        Iterable<?> pages = SerializableMeta.getObject(Iterable.class, map, BOOK_PAGES.BUKKIT, true);
+        Iterable<?> pages = SerializableMeta.getObject(Iterable.class, map, CraftMetaBookSigned.BOOK_PAGES.BUKKIT, true);
         if (pages != null) {
-            this.pages = new ArrayList<IChatBaseComponent>();
+            this.pages = new ArrayList<Component>();
             for (Object page : pages) {
                 if (page instanceof String) {
-                    internalAddPage(CraftChatMessage.fromJSONOrString((String) page, false, true, MAX_PAGE_LENGTH, false));
+                    this.internalAddPage(CraftChatMessage.fromJSONOrString((String) page, false, true, CraftMetaBookSigned.MAX_PAGE_LENGTH, false));
                 }
             }
         }
 
-        resolved = SerializableMeta.getBoolean(map, RESOLVED.BUKKIT);
-        generation = SerializableMeta.getInteger(map, GENERATION.BUKKIT);
+        this.resolved = SerializableMeta.getBoolean(map, CraftMetaBookSigned.RESOLVED.BUKKIT);
+        this.generation = SerializableMeta.getInteger(map, CraftMetaBookSigned.GENERATION.BUKKIT);
     }
 
     @Override
     void applyToItem(CraftMetaItem.Applicator itemData) {
         super.applyToItem(itemData);
 
-        if (pages != null) {
-            List<Filterable<IChatBaseComponent>> list = new ArrayList<>();
-            for (IChatBaseComponent page : pages) {
+        if (this.pages != null) {
+            List<Filterable<Component>> list = new ArrayList<>();
+            for (Component page : this.pages) {
                 list.add(Filterable.passThrough(page));
             }
-            itemData.put(BOOK_CONTENT, new WrittenBookContent(Filterable.from(FilteredText.passThrough(title)), this.author, this.generation, list, this.resolved));
+            itemData.put(CraftMetaBookSigned.BOOK_CONTENT, new WrittenBookContent(Filterable.from(FilteredText.passThrough(this.title)), this.author, this.generation, list, this.resolved));
         }
     }
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && isBookEmpty();
+        return super.isEmpty() && this.isBookEmpty();
     }
 
     boolean isBookEmpty() {
-        return !((pages != null) || hasAuthor() || hasTitle() || hasGeneration() || resolved);
+        return !((this.pages != null) || this.hasAuthor() || this.hasTitle() || this.hasGeneration() || this.resolved);
     }
 
     @Override
@@ -153,12 +153,12 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta {
 
     @Override
     public boolean hasPages() {
-        return (pages != null) && !pages.isEmpty();
+        return (this.pages != null) && !this.pages.isEmpty();
     }
 
     @Override
     public boolean hasGeneration() {
-        return generation != 0;
+        return this.generation != 0;
     }
 
     @Override
@@ -171,7 +171,7 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta {
         if (title == null) {
             this.title = null;
             return true;
-        } else if (title.length() > MAX_TITLE_LENGTH) {
+        } else if (title.length() > CraftMetaBookSigned.MAX_TITLE_LENGTH) {
             return false;
         }
 
@@ -191,7 +191,7 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta {
 
     @Override
     public Generation getGeneration() {
-        return Generation.values()[generation];
+        return Generation.values()[this.generation];
     }
 
     @Override
@@ -201,47 +201,47 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta {
 
     @Override
     public String getPage(final int page) {
-        Preconditions.checkArgument(isValidPage(page), "Invalid page number (%s)", page);
+        Preconditions.checkArgument(this.isValidPage(page), "Invalid page number (%s)", page);
         // assert: pages != null
-        return CraftChatMessage.fromComponent(pages.get(page - 1));
+        return CraftChatMessage.fromComponent(this.pages.get(page - 1));
     }
 
     @Override
     public void setPage(final int page, final String text) {
-        Preconditions.checkArgument(isValidPage(page), "Invalid page number (%s/%s)", page, getPageCount());
+        Preconditions.checkArgument(this.isValidPage(page), "Invalid page number (%s/%s)", page, this.getPageCount());
         // assert: pages != null
 
-        String newText = validatePage(text);
-        pages.set(page - 1, CraftChatMessage.fromStringOrEmpty(newText, true));
+        String newText = this.validatePage(text);
+        this.pages.set(page - 1, CraftChatMessage.fromStringOrEmpty(newText, true));
     }
 
     @Override
     public void setPages(final String... pages) {
-        setPages(Arrays.asList(pages));
+        this.setPages(Arrays.asList(pages));
     }
 
     @Override
     public void addPage(final String... pages) {
         for (String page : pages) {
-            page = validatePage(page);
-            internalAddPage(CraftChatMessage.fromStringOrEmpty(page, true));
+            page = this.validatePage(page);
+            this.internalAddPage(CraftChatMessage.fromStringOrEmpty(page, true));
         }
     }
 
     String validatePage(String page) {
         if (page == null) {
             page = "";
-        } else if (page.length() > MAX_PAGE_LENGTH) {
-            page = page.substring(0, MAX_PAGE_LENGTH);
+        } else if (page.length() > CraftMetaBookSigned.MAX_PAGE_LENGTH) {
+            page = page.substring(0, CraftMetaBookSigned.MAX_PAGE_LENGTH);
         }
         return page;
     }
 
-    private void internalAddPage(IChatBaseComponent page) {
+    private void internalAddPage(Component page) {
         // asserted: page != null
         if (this.pages == null) {
-            this.pages = new ArrayList<IChatBaseComponent>();
-        } else if (this.pages.size() >= MAX_PAGES) {
+            this.pages = new ArrayList<Component>();
+        } else if (this.pages.size() >= CraftMetaBookSigned.MAX_PAGES) {
             return;
         }
         this.pages.add(page);
@@ -249,13 +249,13 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta {
 
     @Override
     public int getPageCount() {
-        return (pages == null) ? 0 : pages.size();
+        return (this.pages == null) ? 0 : this.pages.size();
     }
 
     @Override
     public List<String> getPages() {
-        if (pages == null) return ImmutableList.of();
-        return pages.stream().map(CraftChatMessage::fromComponent).collect(ImmutableList.toImmutableList());
+        if (this.pages == null) return ImmutableList.of();
+        return this.pages.stream().map(CraftChatMessage::fromComponent).collect(ImmutableList.toImmutableList());
     }
 
     @Override
@@ -269,17 +269,17 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta {
             this.pages.clear();
         }
         for (String page : pages) {
-            addPage(page);
+            this.addPage(page);
         }
     }
 
     private boolean isValidPage(int page) {
-        return page > 0 && page <= getPageCount();
+        return page > 0 && page <= this.getPageCount();
     }
 
     // TODO Expose this attribute in Bukkit?
     public boolean isResolved() {
-        return resolved;
+        return this.resolved;
     }
 
     public void setResolved(boolean resolved) {
@@ -290,7 +290,7 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta {
     public CraftMetaBookSigned clone() {
         CraftMetaBookSigned meta = (CraftMetaBookSigned) super.clone();
         if (this.pages != null) {
-            meta.pages = new ArrayList<IChatBaseComponent>(this.pages);
+            meta.pages = new ArrayList<Component>(this.pages);
         }
         return meta;
     }
@@ -299,10 +299,10 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta {
     int applyHash() {
         final int original;
         int hash = original = super.applyHash();
-        if (hasTitle()) {
+        if (this.hasTitle()) {
             hash = 61 * hash + this.title.hashCode();
         }
-        if (hasAuthor()) {
+        if (this.hasAuthor()) {
             hash = 61 * hash + 13 * this.author.hashCode();
         }
         if (this.pages != null) {
@@ -311,7 +311,7 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta {
         if (this.resolved) {
             hash = 61 * hash + 17 * Boolean.hashCode(this.resolved);
         }
-        if (hasGeneration()) {
+        if (this.hasGeneration()) {
             hash = 61 * hash + 19 * Integer.hashCode(this.generation);
         }
         return original != hash ? CraftMetaBook.class.hashCode() ^ hash : hash;
@@ -324,8 +324,8 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta {
         }
         if (meta instanceof CraftMetaBookSigned that) {
 
-            return (hasTitle() ? that.hasTitle() && this.title.equals(that.title) : !that.hasTitle())
-                    && (hasAuthor() ? that.hasAuthor() && this.author.equals(that.author) : !that.hasAuthor())
+            return (this.hasTitle() ? that.hasTitle() && this.title.equals(that.title) : !that.hasTitle())
+                    && (this.hasAuthor() ? that.hasAuthor() && this.author.equals(that.author) : !that.hasAuthor())
                     && (Objects.equals(this.pages, that.pages))
                     && (Objects.equals(this.resolved, that.resolved))
                     && (Objects.equals(this.generation, that.generation));
@@ -335,31 +335,31 @@ public class CraftMetaBookSigned extends CraftMetaItem implements BookMeta {
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaBookSigned || isBookEmpty());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaBookSigned || this.isBookEmpty());
     }
 
     @Override
     Builder<String, Object> serialize(Builder<String, Object> builder) {
         super.serialize(builder);
 
-        if (hasTitle()) {
-            builder.put(BOOK_TITLE.BUKKIT, title);
+        if (this.hasTitle()) {
+            builder.put(CraftMetaBookSigned.BOOK_TITLE.BUKKIT, this.title);
         }
 
-        if (hasAuthor()) {
-            builder.put(BOOK_AUTHOR.BUKKIT, author);
+        if (this.hasAuthor()) {
+            builder.put(CraftMetaBookSigned.BOOK_AUTHOR.BUKKIT, this.author);
         }
 
-        if (pages != null) {
-            builder.put(BOOK_PAGES.BUKKIT, ImmutableList.copyOf(Lists.transform(pages, CraftChatMessage::toJSON)));
+        if (this.pages != null) {
+            builder.put(CraftMetaBookSigned.BOOK_PAGES.BUKKIT, ImmutableList.copyOf(Lists.transform(this.pages, CraftChatMessage::toJSON)));
         }
 
-        if (resolved) {
-            builder.put(RESOLVED.BUKKIT, resolved);
+        if (this.resolved) {
+            builder.put(CraftMetaBookSigned.RESOLVED.BUKKIT, this.resolved);
         }
 
-        if (generation != 0) {
-            builder.put(GENERATION.BUKKIT, generation);
+        if (this.generation != 0) {
+            builder.put(CraftMetaBookSigned.GENERATION.BUKKIT, this.generation);
         }
 
         return builder;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBundle.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBundle.java
index f1ad91a9bc..30533ce683 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBundle.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaBundle.java
@@ -37,12 +37,12 @@ public class CraftMetaBundle extends CraftMetaItem implements BundleMeta {
     CraftMetaBundle(DataComponentPatch tag) {
         super(tag);
 
-        getOrEmpty(tag, ITEMS).ifPresent((bundle) -> {
+        getOrEmpty(tag, CraftMetaBundle.ITEMS).ifPresent((bundle) -> {
             bundle.items().forEach((item) -> {
                 ItemStack itemStack = CraftItemStack.asCraftMirror(item);
 
                 if (!itemStack.getType().isAir()) { // SPIGOT-7174 - Avoid adding air
-                    addItem(itemStack);
+                    this.addItem(itemStack);
                 }
             });
         });
@@ -51,11 +51,11 @@ public class CraftMetaBundle extends CraftMetaItem implements BundleMeta {
     CraftMetaBundle(Map<String, Object> map) {
         super(map);
 
-        Iterable<?> items = SerializableMeta.getObject(Iterable.class, map, ITEMS.BUKKIT, true);
+        Iterable<?> items = SerializableMeta.getObject(Iterable.class, map, CraftMetaBundle.ITEMS.BUKKIT, true);
         if (items != null) {
             for (Object stack : items) {
                 if (stack instanceof ItemStack itemStack && !itemStack.getType().isAir()) { // SPIGOT-7174 - Avoid adding air
-                    addItem(itemStack);
+                    this.addItem(itemStack);
                 }
             }
         }
@@ -65,34 +65,34 @@ public class CraftMetaBundle extends CraftMetaItem implements BundleMeta {
     void applyToItem(CraftMetaItem.Applicator tag) {
         super.applyToItem(tag);
 
-        if (hasItems()) {
+        if (this.hasItems()) {
             List<net.minecraft.world.item.ItemStack> list = new ArrayList<>();
 
-            for (ItemStack item : items) {
+            for (ItemStack item : this.items) {
                 list.add(CraftItemStack.asNMSCopy(item));
             }
 
-            tag.put(ITEMS, new BundleContents(list));
+            tag.put(CraftMetaBundle.ITEMS, new BundleContents(list));
         }
     }
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && isBundleEmpty();
+        return super.isEmpty() && this.isBundleEmpty();
     }
 
     boolean isBundleEmpty() {
-        return !(hasItems());
+        return !(this.hasItems());
     }
 
     @Override
     public boolean hasItems() {
-        return items != null && !items.isEmpty();
+        return this.items != null && !this.items.isEmpty();
     }
 
     @Override
     public List<ItemStack> getItems() {
-        return (items == null) ? ImmutableList.of() : ImmutableList.copyOf(items);
+        return (this.items == null) ? ImmutableList.of() : ImmutableList.copyOf(this.items);
     }
 
     @Override
@@ -104,7 +104,7 @@ public class CraftMetaBundle extends CraftMetaItem implements BundleMeta {
         }
 
         for (ItemStack i : items) {
-            addItem(i);
+            this.addItem(i);
         }
     }
 
@@ -112,11 +112,11 @@ public class CraftMetaBundle extends CraftMetaItem implements BundleMeta {
     public void addItem(ItemStack item) {
         Preconditions.checkArgument(item != null && !item.getType().isAir(), "item is null or air");
 
-        if (items == null) {
-            items = new ArrayList<>();
+        if (this.items == null) {
+            this.items = new ArrayList<>();
         }
 
-        items.add(item);
+        this.items.add(item);
     }
 
     @Override
@@ -127,14 +127,14 @@ public class CraftMetaBundle extends CraftMetaItem implements BundleMeta {
         if (meta instanceof CraftMetaBundle) {
             CraftMetaBundle that = (CraftMetaBundle) meta;
 
-            return (hasItems() ? that.hasItems() && this.items.equals(that.items) : !that.hasItems());
+            return (this.hasItems() ? that.hasItems() && this.items.equals(that.items) : !that.hasItems());
         }
         return true;
     }
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaBundle || isBundleEmpty());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaBundle || this.isBundleEmpty());
     }
 
     @Override
@@ -142,8 +142,8 @@ public class CraftMetaBundle extends CraftMetaItem implements BundleMeta {
         final int original;
         int hash = original = super.applyHash();
 
-        if (hasItems()) {
-            hash = 61 * hash + items.hashCode();
+        if (this.hasItems()) {
+            hash = 61 * hash + this.items.hashCode();
         }
 
         return original != hash ? CraftMetaBundle.class.hashCode() ^ hash : hash;
@@ -158,8 +158,8 @@ public class CraftMetaBundle extends CraftMetaItem implements BundleMeta {
     ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
         super.serialize(builder);
 
-        if (hasItems()) {
-            builder.put(ITEMS.BUKKIT, items);
+        if (this.hasItems()) {
+            builder.put(CraftMetaBundle.ITEMS.BUKKIT, this.items);
         }
 
         return builder;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java
index 2e3e70b896..72340e7269 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCharge.java
@@ -19,22 +19,22 @@ class CraftMetaCharge extends CraftMetaItem implements FireworkEffectMeta {
         super(meta);
 
         if (meta instanceof CraftMetaCharge) {
-            effect = ((CraftMetaCharge) meta).effect;
+            this.effect = ((CraftMetaCharge) meta).effect;
         }
     }
 
     CraftMetaCharge(Map<String, Object> map) {
         super(map);
 
-        setEffect(SerializableMeta.getObject(FireworkEffect.class, map, EXPLOSION.BUKKIT, true));
+        this.setEffect(SerializableMeta.getObject(FireworkEffect.class, map, CraftMetaCharge.EXPLOSION.BUKKIT, true));
     }
 
     CraftMetaCharge(DataComponentPatch tag) {
         super(tag);
 
-        getOrEmpty(tag, EXPLOSION).ifPresent((f) -> {
+        getOrEmpty(tag, CraftMetaCharge.EXPLOSION).ifPresent((f) -> {
             try {
-                effect = CraftMetaFirework.getEffect(f);
+                this.effect = CraftMetaFirework.getEffect(f);
             } catch (IllegalArgumentException ex) {
                 // Ignore invalid effects
             }
@@ -48,30 +48,30 @@ class CraftMetaCharge extends CraftMetaItem implements FireworkEffectMeta {
 
     @Override
     public boolean hasEffect() {
-        return effect != null;
+        return this.effect != null;
     }
 
     @Override
     public FireworkEffect getEffect() {
-        return effect;
+        return this.effect;
     }
 
     @Override
     void applyToItem(CraftMetaItem.Applicator itemTag) {
         super.applyToItem(itemTag);
 
-        if (hasEffect()) {
-            itemTag.put(EXPLOSION, CraftMetaFirework.getExplosion(effect));
+        if (this.hasEffect()) {
+            itemTag.put(CraftMetaCharge.EXPLOSION, CraftMetaFirework.getExplosion(this.effect));
         }
     }
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && !hasChargeMeta();
+        return super.isEmpty() && !this.hasChargeMeta();
     }
 
     boolean hasChargeMeta() {
-        return hasEffect();
+        return this.hasEffect();
     }
 
     @Override
@@ -82,14 +82,14 @@ class CraftMetaCharge extends CraftMetaItem implements FireworkEffectMeta {
         if (meta instanceof CraftMetaCharge) {
             CraftMetaCharge that = (CraftMetaCharge) meta;
 
-            return (hasEffect() ? that.hasEffect() && this.effect.equals(that.effect) : !that.hasEffect());
+            return (this.hasEffect() ? that.hasEffect() && this.effect.equals(that.effect) : !that.hasEffect());
         }
         return true;
     }
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaCharge || !hasChargeMeta());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaCharge || !this.hasChargeMeta());
     }
 
     @Override
@@ -97,8 +97,8 @@ class CraftMetaCharge extends CraftMetaItem implements FireworkEffectMeta {
         final int original;
         int hash = original = super.applyHash();
 
-        if (hasEffect()) {
-            hash = 61 * hash + effect.hashCode();
+        if (this.hasEffect()) {
+            hash = 61 * hash + this.effect.hashCode();
         }
 
         return hash != original ? CraftMetaCharge.class.hashCode() ^ hash : hash;
@@ -113,8 +113,8 @@ class CraftMetaCharge extends CraftMetaItem implements FireworkEffectMeta {
     Builder<String, Object> serialize(Builder<String, Object> builder) {
         super.serialize(builder);
 
-        if (hasEffect()) {
-            builder.put(EXPLOSION.BUKKIT, effect);
+        if (this.hasEffect()) {
+            builder.put(CraftMetaCharge.EXPLOSION.BUKKIT, this.effect);
         }
 
         return builder;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java
index fb4fe1d25f..366fec1aee 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaColorableArmor.java
@@ -36,11 +36,11 @@ public class CraftMetaColorableArmor extends CraftMetaArmor implements Colorable
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && isLeatherArmorEmpty();
+        return super.isEmpty() && this.isLeatherArmorEmpty();
     }
 
     boolean isLeatherArmorEmpty() {
-        return !(hasColor());
+        return !(this.hasColor());
     }
 
     @Override
@@ -52,7 +52,7 @@ public class CraftMetaColorableArmor extends CraftMetaArmor implements Colorable
 
     @Override
     public Color getColor() {
-        return color;
+        return this.color;
     }
 
     @Override
@@ -81,22 +81,22 @@ public class CraftMetaColorableArmor extends CraftMetaArmor implements Colorable
         if (meta instanceof CraftMetaColorableArmor) {
             CraftMetaColorableArmor that = (CraftMetaColorableArmor) meta;
 
-            return color.equals(that.color);
+            return this.color.equals(that.color);
         }
         return true;
     }
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaColorableArmor || isLeatherArmorEmpty());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaColorableArmor || this.isLeatherArmorEmpty());
     }
 
     @Override
     int applyHash() {
         final int original;
         int hash = original = super.applyHash();
-        if (hasColor()) {
-            hash ^= color.hashCode();
+        if (this.hasColor()) {
+            hash ^= this.color.hashCode();
         }
         return original != hash ? CraftMetaColorableArmor.class.hashCode() ^ hash : hash;
     }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCompass.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCompass.java
index 8dc6589e69..607e230403 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCompass.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCompass.java
@@ -4,15 +4,15 @@ import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableMap.Builder;
 import java.util.Map;
 import java.util.Optional;
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
 import net.minecraft.core.GlobalPos;
 import net.minecraft.core.component.DataComponentPatch;
 import net.minecraft.core.component.DataComponents;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.resources.MinecraftKey;
 import net.minecraft.resources.ResourceKey;
+import net.minecraft.resources.ResourceLocation;
 import net.minecraft.server.MinecraftServer;
-import net.minecraft.server.level.WorldServer;
+import net.minecraft.server.level.ServerLevel;
 import net.minecraft.world.item.component.LodestoneTracker;
 import org.bukkit.Location;
 import org.bukkit.World;
@@ -31,7 +31,7 @@ public class CraftMetaCompass extends CraftMetaItem implements CompassMeta {
     static final ItemMetaKey LODESTONE_POS_Z = new ItemMetaKey("LodestonePosZ");
     static final ItemMetaKey LODESTONE_TRACKED = new ItemMetaKey("LodestoneTracked");
 
-    private ResourceKey<net.minecraft.world.level.World> lodestoneWorld;
+    private ResourceKey<net.minecraft.world.level.Level> lodestoneWorld;
     private int lodestoneX;
     private int lodestoneY;
     private int lodestoneZ;
@@ -43,43 +43,43 @@ public class CraftMetaCompass extends CraftMetaItem implements CompassMeta {
             return;
         }
         CraftMetaCompass compassMeta = (CraftMetaCompass) meta;
-        lodestoneWorld = compassMeta.lodestoneWorld;
-        lodestoneX = compassMeta.lodestoneX;
-        lodestoneY = compassMeta.lodestoneY;
-        lodestoneZ = compassMeta.lodestoneZ;
-        tracked = compassMeta.tracked;
+        this.lodestoneWorld = compassMeta.lodestoneWorld;
+        this.lodestoneX = compassMeta.lodestoneX;
+        this.lodestoneY = compassMeta.lodestoneY;
+        this.lodestoneZ = compassMeta.lodestoneZ;
+        this.tracked = compassMeta.tracked;
     }
 
     CraftMetaCompass(DataComponentPatch tag) {
         super(tag);
-        getOrEmpty(tag, LODESTONE_TARGET).ifPresent((lodestoneTarget) -> {
+        getOrEmpty(tag, CraftMetaCompass.LODESTONE_TARGET).ifPresent((lodestoneTarget) -> {
             lodestoneTarget.target().ifPresent((target) -> {
-                lodestoneWorld = target.dimension();
-                BlockPosition pos = target.pos();
-                lodestoneX = pos.getX();
-                lodestoneY = pos.getY();
-                lodestoneZ = pos.getZ();
+                this.lodestoneWorld = target.dimension();
+                BlockPos pos = target.pos();
+                this.lodestoneX = pos.getX();
+                this.lodestoneY = pos.getY();
+                this.lodestoneZ = pos.getZ();
             });
-            tracked = lodestoneTarget.tracked();
+            this.tracked = lodestoneTarget.tracked();
         });
     }
 
     CraftMetaCompass(Map<String, Object> map) {
         super(map);
-        String lodestoneWorldString = SerializableMeta.getString(map, LODESTONE_POS_WORLD.BUKKIT, true);
+        String lodestoneWorldString = SerializableMeta.getString(map, CraftMetaCompass.LODESTONE_POS_WORLD.BUKKIT, true);
         if (lodestoneWorldString != null) {
-            lodestoneWorld = ResourceKey.create(Registries.DIMENSION, MinecraftKey.tryParse(lodestoneWorldString));
-            lodestoneX = (Integer) map.get(LODESTONE_POS_X.BUKKIT);
-            lodestoneY = (Integer) map.get(LODESTONE_POS_Y.BUKKIT);
-            lodestoneZ = (Integer) map.get(LODESTONE_POS_Z.BUKKIT);
+            this.lodestoneWorld = ResourceKey.create(Registries.DIMENSION, ResourceLocation.tryParse(lodestoneWorldString));
+            this.lodestoneX = (Integer) map.get(CraftMetaCompass.LODESTONE_POS_X.BUKKIT);
+            this.lodestoneY = (Integer) map.get(CraftMetaCompass.LODESTONE_POS_Y.BUKKIT);
+            this.lodestoneZ = (Integer) map.get(CraftMetaCompass.LODESTONE_POS_Z.BUKKIT);
         } else {
             // legacy
-            Location lodestone = SerializableMeta.getObject(Location.class, map, LODESTONE_POS.BUKKIT, true);
+            Location lodestone = SerializableMeta.getObject(Location.class, map, CraftMetaCompass.LODESTONE_POS.BUKKIT, true);
             if (lodestone != null && lodestone.getWorld() != null) {
-                setLodestone(lodestone);
+                this.setLodestone(lodestone);
             }
         }
-        tracked = SerializableMeta.getBoolean(map, LODESTONE_TRACKED.BUKKIT);
+        this.tracked = SerializableMeta.getBoolean(map, CraftMetaCompass.LODESTONE_TRACKED.BUKKIT);
     }
 
     @Override
@@ -87,22 +87,22 @@ public class CraftMetaCompass extends CraftMetaItem implements CompassMeta {
         super.applyToItem(tag);
 
         Optional<GlobalPos> target = Optional.empty();
-        if (lodestoneWorld != null) {
-            target = Optional.of(new GlobalPos(lodestoneWorld, new BlockPosition(lodestoneX, lodestoneY, lodestoneZ)));
+        if (this.lodestoneWorld != null) {
+            target = Optional.of(new GlobalPos(this.lodestoneWorld, new BlockPos(this.lodestoneX, this.lodestoneY, this.lodestoneZ)));
         }
 
-        if (target.isPresent() || hasLodestoneTracked()) {
-            tag.put(LODESTONE_TARGET, new LodestoneTracker(target, tracked));
+        if (target.isPresent() || this.hasLodestoneTracked()) {
+            tag.put(CraftMetaCompass.LODESTONE_TARGET, new LodestoneTracker(target, this.tracked));
         }
     }
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && isCompassEmpty();
+        return super.isEmpty() && this.isCompassEmpty();
     }
 
     boolean isCompassEmpty() {
-        return !(hasLodestone() || hasLodestoneTracked());
+        return !(this.hasLodestone() || this.hasLodestoneTracked());
     }
 
     @Override
@@ -113,17 +113,17 @@ public class CraftMetaCompass extends CraftMetaItem implements CompassMeta {
 
     @Override
     public boolean hasLodestone() {
-        return lodestoneWorld != null;
+        return this.lodestoneWorld != null;
     }
 
     @Override
     public Location getLodestone() {
-        if (lodestoneWorld == null) {
+        if (this.lodestoneWorld == null) {
             return null;
         }
-        WorldServer worldServer = MinecraftServer.getServer().getLevel(lodestoneWorld);
+        ServerLevel worldServer = MinecraftServer.getServer().getLevel(this.lodestoneWorld);
         World world = worldServer != null ? worldServer.getWorld() : null;
-        return new Location(world, lodestoneX, lodestoneY, lodestoneZ); // world may be null here, if the referenced world is not loaded
+        return new Location(world, this.lodestoneX, this.lodestoneY, this.lodestoneZ); // world may be null here, if the referenced world is not loaded
     }
 
     @Override
@@ -140,12 +140,12 @@ public class CraftMetaCompass extends CraftMetaItem implements CompassMeta {
     }
 
     boolean hasLodestoneTracked() {
-        return !tracked;
+        return !this.tracked;
     }
 
     @Override
     public boolean isLodestoneTracked() {
-        return tracked;
+        return this.tracked;
     }
 
     @Override
@@ -157,14 +157,14 @@ public class CraftMetaCompass extends CraftMetaItem implements CompassMeta {
     int applyHash() {
         final int original;
         int hash = original = super.applyHash();
-        if (hasLodestone()) {
-            hash = 73 * hash + lodestoneWorld.hashCode();
-            hash = 73 * hash + lodestoneX;
-            hash = 73 * hash + lodestoneY;
-            hash = 73 * hash + lodestoneZ;
+        if (this.hasLodestone()) {
+            hash = 73 * hash + this.lodestoneWorld.hashCode();
+            hash = 73 * hash + this.lodestoneX;
+            hash = 73 * hash + this.lodestoneY;
+            hash = 73 * hash + this.lodestoneZ;
         }
-        if (hasLodestoneTracked()) {
-            hash = 73 * hash + (isLodestoneTracked() ? 1231 : 1237);
+        if (this.hasLodestoneTracked()) {
+            hash = 73 * hash + (this.isLodestoneTracked() ? 1231 : 1237);
         }
 
         return original != hash ? CraftMetaCompass.class.hashCode() ^ hash : hash;
@@ -188,21 +188,21 @@ public class CraftMetaCompass extends CraftMetaItem implements CompassMeta {
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaCompass || isCompassEmpty());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaCompass || this.isCompassEmpty());
     }
 
     @Override
     Builder<String, Object> serialize(Builder<String, Object> builder) {
         super.serialize(builder);
 
-        if (hasLodestone()) {
-            builder.put(LODESTONE_POS_WORLD.BUKKIT, lodestoneWorld.location().toString());
-            builder.put(LODESTONE_POS_X.BUKKIT, lodestoneX);
-            builder.put(LODESTONE_POS_Y.BUKKIT, lodestoneY);
-            builder.put(LODESTONE_POS_Z.BUKKIT, lodestoneZ);
+        if (this.hasLodestone()) {
+            builder.put(CraftMetaCompass.LODESTONE_POS_WORLD.BUKKIT, this.lodestoneWorld.location().toString());
+            builder.put(CraftMetaCompass.LODESTONE_POS_X.BUKKIT, this.lodestoneX);
+            builder.put(CraftMetaCompass.LODESTONE_POS_Y.BUKKIT, this.lodestoneY);
+            builder.put(CraftMetaCompass.LODESTONE_POS_Z.BUKKIT, this.lodestoneZ);
         }
-        if (hasLodestoneTracked()) {
-            builder.put(LODESTONE_TRACKED.BUKKIT, tracked);
+        if (this.hasLodestoneTracked()) {
+            builder.put(CraftMetaCompass.LODESTONE_TRACKED.BUKKIT, this.tracked);
         }
 
         return builder;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCrossbow.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCrossbow.java
index 2660a01973..c278af5193 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCrossbow.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaCrossbow.java
@@ -8,7 +8,7 @@ import java.util.List;
 import java.util.Map;
 import net.minecraft.core.component.DataComponentPatch;
 import net.minecraft.core.component.DataComponents;
-import net.minecraft.world.item.ItemArrow;
+import net.minecraft.world.item.ArrowItem;
 import net.minecraft.world.item.component.ChargedProjectiles;
 import org.bukkit.Material;
 import org.bukkit.configuration.serialization.DelegateDeserialization;
@@ -39,16 +39,16 @@ public class CraftMetaCrossbow extends CraftMetaItem implements CrossbowMeta {
     CraftMetaCrossbow(DataComponentPatch tag) {
         super(tag);
 
-        getOrEmpty(tag, CHARGED_PROJECTILES).ifPresent((p) -> {
+        getOrEmpty(tag, CraftMetaCrossbow.CHARGED_PROJECTILES).ifPresent((p) -> {
             List<net.minecraft.world.item.ItemStack> list = p.getItems();
 
             if (list != null && !list.isEmpty()) {
-                chargedProjectiles = new ArrayList<>();
+                this.chargedProjectiles = new ArrayList<>();
 
                 for (int i = 0; i < list.size(); i++) {
                     net.minecraft.world.item.ItemStack nbttagcompound1 = list.get(i);
 
-                    chargedProjectiles.add(CraftItemStack.asCraftMirror(nbttagcompound1));
+                    this.chargedProjectiles.add(CraftItemStack.asCraftMirror(nbttagcompound1));
                 }
             }
         });
@@ -57,11 +57,11 @@ public class CraftMetaCrossbow extends CraftMetaItem implements CrossbowMeta {
     CraftMetaCrossbow(Map<String, Object> map) {
         super(map);
 
-        Iterable<?> projectiles = SerializableMeta.getObject(Iterable.class, map, CHARGED_PROJECTILES.BUKKIT, true);
+        Iterable<?> projectiles = SerializableMeta.getObject(Iterable.class, map, CraftMetaCrossbow.CHARGED_PROJECTILES.BUKKIT, true);
         if (projectiles != null) {
             for (Object stack : projectiles) {
                 if (stack instanceof ItemStack) {
-                    addChargedProjectile((ItemStack) stack);
+                    this.addChargedProjectile((ItemStack) stack);
                 }
             }
         }
@@ -71,59 +71,59 @@ public class CraftMetaCrossbow extends CraftMetaItem implements CrossbowMeta {
     void applyToItem(CraftMetaItem.Applicator tag) {
         super.applyToItem(tag);
 
-        if (hasChargedProjectiles()) {
+        if (this.hasChargedProjectiles()) {
             List<net.minecraft.world.item.ItemStack> list = new ArrayList<>();
 
-            for (ItemStack item : chargedProjectiles) {
+            for (ItemStack item : this.chargedProjectiles) {
                 list.add(CraftItemStack.asNMSCopy(item));
             }
 
-            tag.put(CHARGED_PROJECTILES, ChargedProjectiles.of(list));
+            tag.put(CraftMetaCrossbow.CHARGED_PROJECTILES, ChargedProjectiles.of(list));
         }
     }
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && isCrossbowEmpty();
+        return super.isEmpty() && this.isCrossbowEmpty();
     }
 
     boolean isCrossbowEmpty() {
-        return !(hasChargedProjectiles());
+        return !(this.hasChargedProjectiles());
     }
 
     @Override
     public boolean hasChargedProjectiles() {
-        return chargedProjectiles != null;
+        return this.chargedProjectiles != null;
     }
 
     @Override
     public List<ItemStack> getChargedProjectiles() {
-        return (chargedProjectiles == null) ? ImmutableList.of() : ImmutableList.copyOf(chargedProjectiles);
+        return (this.chargedProjectiles == null) ? ImmutableList.of() : ImmutableList.copyOf(this.chargedProjectiles);
     }
 
     @Override
     public void setChargedProjectiles(List<ItemStack> projectiles) {
-        chargedProjectiles = null;
+        this.chargedProjectiles = null;
 
         if (projectiles == null) {
             return;
         }
 
         for (ItemStack i : projectiles) {
-            addChargedProjectile(i);
+            this.addChargedProjectile(i);
         }
     }
 
     @Override
     public void addChargedProjectile(ItemStack item) {
         Preconditions.checkArgument(item != null, "item");
-        Preconditions.checkArgument(item.getType() == Material.FIREWORK_ROCKET || CraftItemType.bukkitToMinecraft(item.getType()) instanceof ItemArrow, "Item %s is not an arrow or firework rocket", item);
+        Preconditions.checkArgument(item.getType() == Material.FIREWORK_ROCKET || CraftItemType.bukkitToMinecraft(item.getType()) instanceof ArrowItem, "Item %s is not an arrow or firework rocket", item);
 
-        if (chargedProjectiles == null) {
-            chargedProjectiles = new ArrayList<>();
+        if (this.chargedProjectiles == null) {
+            this.chargedProjectiles = new ArrayList<>();
         }
 
-        chargedProjectiles.add(item);
+        this.chargedProjectiles.add(item);
     }
 
     @Override
@@ -134,14 +134,14 @@ public class CraftMetaCrossbow extends CraftMetaItem implements CrossbowMeta {
         if (meta instanceof CraftMetaCrossbow) {
             CraftMetaCrossbow that = (CraftMetaCrossbow) meta;
 
-            return (hasChargedProjectiles() ? that.hasChargedProjectiles() && this.chargedProjectiles.equals(that.chargedProjectiles) : !that.hasChargedProjectiles());
+            return (this.hasChargedProjectiles() ? that.hasChargedProjectiles() && this.chargedProjectiles.equals(that.chargedProjectiles) : !that.hasChargedProjectiles());
         }
         return true;
     }
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaCrossbow || isCrossbowEmpty());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaCrossbow || this.isCrossbowEmpty());
     }
 
     @Override
@@ -149,8 +149,8 @@ public class CraftMetaCrossbow extends CraftMetaItem implements CrossbowMeta {
         final int original;
         int hash = original = super.applyHash();
 
-        if (hasChargedProjectiles()) {
-            hash = 61 * hash + chargedProjectiles.hashCode();
+        if (this.hasChargedProjectiles()) {
+            hash = 61 * hash + this.chargedProjectiles.hashCode();
         }
 
         return original != hash ? CraftMetaCrossbow.class.hashCode() ^ hash : hash;
@@ -165,8 +165,8 @@ public class CraftMetaCrossbow extends CraftMetaItem implements CrossbowMeta {
     ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
         super.serialize(builder);
 
-        if (hasChargedProjectiles()) {
-            builder.put(CHARGED_PROJECTILES.BUKKIT, chargedProjectiles);
+        if (this.hasChargedProjectiles()) {
+            builder.put(CraftMetaCrossbow.CHARGED_PROJECTILES.BUKKIT, this.chargedProjectiles);
         }
 
         return builder;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java
index ad1ab6ad05..73fe41322e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEnchantedBook.java
@@ -35,10 +35,10 @@ class CraftMetaEnchantedBook extends CraftMetaItem implements EnchantmentStorage
     CraftMetaEnchantedBook(DataComponentPatch tag) {
         super(tag);
 
-        getOrEmpty(tag, STORED_ENCHANTMENTS).ifPresent((itemEnchantments) -> {
-            enchantments = buildEnchantments(itemEnchantments);
+        getOrEmpty(tag, CraftMetaEnchantedBook.STORED_ENCHANTMENTS).ifPresent((itemEnchantments) -> {
+            this.enchantments = buildEnchantments(itemEnchantments);
             if (!itemEnchantments.showInTooltip) {
-                addItemFlags(ItemFlag.HIDE_ADDITIONAL_TOOLTIP);
+                this.addItemFlags(ItemFlag.HIDE_ADDITIONAL_TOOLTIP);
             }
         });
     }
@@ -46,19 +46,19 @@ class CraftMetaEnchantedBook extends CraftMetaItem implements EnchantmentStorage
     CraftMetaEnchantedBook(Map<String, Object> map) {
         super(map);
 
-        enchantments = buildEnchantments(map, STORED_ENCHANTMENTS);
+        this.enchantments = buildEnchantments(map, CraftMetaEnchantedBook.STORED_ENCHANTMENTS);
     }
 
     @Override
     void applyToItem(CraftMetaItem.Applicator itemTag) {
         super.applyToItem(itemTag);
 
-        applyEnchantments(enchantments, itemTag, STORED_ENCHANTMENTS, ItemFlag.HIDE_ADDITIONAL_TOOLTIP);
+        this.applyEnchantments(this.enchantments, itemTag, CraftMetaEnchantedBook.STORED_ENCHANTMENTS, ItemFlag.HIDE_ADDITIONAL_TOOLTIP);
     }
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && isEnchantedEmpty();
+        return super.isEmpty() && this.isEnchantedEmpty();
     }
 
     @Override
@@ -69,14 +69,14 @@ class CraftMetaEnchantedBook extends CraftMetaItem implements EnchantmentStorage
         if (meta instanceof CraftMetaEnchantedBook) {
             CraftMetaEnchantedBook that = (CraftMetaEnchantedBook) meta;
 
-            return (hasStoredEnchants() ? that.hasStoredEnchants() && this.enchantments.equals(that.enchantments) : !that.hasStoredEnchants());
+            return (this.hasStoredEnchants() ? that.hasStoredEnchants() && this.enchantments.equals(that.enchantments) : !that.hasStoredEnchants());
         }
         return true;
     }
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaEnchantedBook || isEnchantedEmpty());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaEnchantedBook || this.isEnchantedEmpty());
     }
 
     @Override
@@ -84,8 +84,8 @@ class CraftMetaEnchantedBook extends CraftMetaItem implements EnchantmentStorage
         final int original;
         int hash = original = super.applyHash();
 
-        if (hasStoredEnchants()) {
-            hash = 61 * hash + enchantments.hashCode();
+        if (this.hasStoredEnchants()) {
+            hash = 61 * hash + this.enchantments.hashCode();
         }
 
         return original != hash ? CraftMetaEnchantedBook.class.hashCode() ^ hash : hash;
@@ -106,23 +106,23 @@ class CraftMetaEnchantedBook extends CraftMetaItem implements EnchantmentStorage
     Builder<String, Object> serialize(Builder<String, Object> builder) {
         super.serialize(builder);
 
-        serializeEnchantments(enchantments, builder, STORED_ENCHANTMENTS);
+        serializeEnchantments(this.enchantments, builder, CraftMetaEnchantedBook.STORED_ENCHANTMENTS);
 
         return builder;
     }
 
     boolean isEnchantedEmpty() {
-        return !hasStoredEnchants();
+        return !this.hasStoredEnchants();
     }
 
     @Override
     public boolean hasStoredEnchant(Enchantment ench) {
-        return hasStoredEnchants() && enchantments.containsKey(ench);
+        return this.hasStoredEnchants() && this.enchantments.containsKey(ench);
     }
 
     @Override
     public int getStoredEnchantLevel(Enchantment ench) {
-        Integer level = hasStoredEnchants() ? enchantments.get(ench) : null;
+        Integer level = this.hasStoredEnchants() ? this.enchantments.get(ench) : null;
         if (level == null) {
             return 0;
         }
@@ -131,17 +131,17 @@ class CraftMetaEnchantedBook extends CraftMetaItem implements EnchantmentStorage
 
     @Override
     public Map<Enchantment, Integer> getStoredEnchants() {
-        return hasStoredEnchants() ? ImmutableMap.copyOf(enchantments) : ImmutableMap.<Enchantment, Integer>of();
+        return this.hasStoredEnchants() ? ImmutableMap.copyOf(this.enchantments) : ImmutableMap.<Enchantment, Integer>of();
     }
 
     @Override
     public boolean addStoredEnchant(Enchantment ench, int level, boolean ignoreRestrictions) {
-        if (enchantments == null) {
-            enchantments = new LinkedHashMap<Enchantment, Integer>(4);
+        if (this.enchantments == null) {
+            this.enchantments = new LinkedHashMap<Enchantment, Integer>(4);
         }
 
         if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {
-            Integer old = enchantments.put(ench, level);
+            Integer old = this.enchantments.put(ench, level);
             return old == null || old != level;
         }
         return false;
@@ -149,16 +149,16 @@ class CraftMetaEnchantedBook extends CraftMetaItem implements EnchantmentStorage
 
     @Override
     public boolean removeStoredEnchant(Enchantment ench) {
-        return hasStoredEnchants() && enchantments.remove(ench) != null;
+        return this.hasStoredEnchants() && this.enchantments.remove(ench) != null;
     }
 
     @Override
     public boolean hasStoredEnchants() {
-        return !(enchantments == null || enchantments.isEmpty());
+        return !(this.enchantments == null || this.enchantments.isEmpty());
     }
 
     @Override
     public boolean hasConflictingStoredEnchant(Enchantment ench) {
-        return checkConflictingEnchants(enchantments, ench);
+        return checkConflictingEnchants(this.enchantments, ench);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEntityTag.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEntityTag.java
index 6721b8453d..27af7ca9d6 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEntityTag.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaEntityTag.java
@@ -6,8 +6,8 @@ import java.util.Map;
 import java.util.Set;
 import net.minecraft.core.component.DataComponentPatch;
 import net.minecraft.core.component.DataComponents;
-import net.minecraft.nbt.NBTBase;
-import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.nbt.Tag;
 import net.minecraft.world.item.component.CustomData;
 import org.bukkit.Material;
 import org.bukkit.configuration.serialization.DelegateDeserialization;
@@ -25,7 +25,7 @@ public class CraftMetaEntityTag extends CraftMetaItem {
     );
 
     static final ItemMetaKeyType<CustomData> ENTITY_TAG = new ItemMetaKeyType<>(DataComponents.ENTITY_DATA, "EntityTag", "entity-tag");
-    NBTTagCompound entityTag;
+    CompoundTag entityTag;
 
     CraftMetaEntityTag(CraftMetaItem meta) {
         super(meta);
@@ -41,8 +41,8 @@ public class CraftMetaEntityTag extends CraftMetaItem {
     CraftMetaEntityTag(DataComponentPatch tag) {
         super(tag);
 
-        getOrEmpty(tag, ENTITY_TAG).ifPresent((nbt) -> {
-            entityTag = nbt.copyTag();
+        getOrEmpty(tag, CraftMetaEntityTag.ENTITY_TAG).ifPresent((nbt) -> {
+            this.entityTag = nbt.copyTag();
         });
     }
 
@@ -51,18 +51,18 @@ public class CraftMetaEntityTag extends CraftMetaItem {
     }
 
     @Override
-    void deserializeInternal(NBTTagCompound tag, Object context) {
+    void deserializeInternal(CompoundTag tag, Object context) {
         super.deserializeInternal(tag, context);
 
-        if (tag.contains(ENTITY_TAG.NBT)) {
-            entityTag = tag.getCompound(ENTITY_TAG.NBT);
+        if (tag.contains(CraftMetaEntityTag.ENTITY_TAG.NBT)) {
+            this.entityTag = tag.getCompound(CraftMetaEntityTag.ENTITY_TAG.NBT);
         }
     }
 
     @Override
-    void serializeInternal(Map<String, NBTBase> internalTags) {
-        if (entityTag != null && !entityTag.isEmpty()) {
-            internalTags.put(ENTITY_TAG.NBT, entityTag);
+    void serializeInternal(Map<String, Tag> internalTags) {
+        if (this.entityTag != null && !this.entityTag.isEmpty()) {
+            internalTags.put(CraftMetaEntityTag.ENTITY_TAG.NBT, this.entityTag);
         }
     }
 
@@ -70,23 +70,23 @@ public class CraftMetaEntityTag extends CraftMetaItem {
     void applyToItem(CraftMetaItem.Applicator tag) {
         super.applyToItem(tag);
 
-        if (entityTag != null) {
-            tag.put(ENTITY_TAG, CustomData.of(entityTag));
+        if (this.entityTag != null) {
+            tag.put(CraftMetaEntityTag.ENTITY_TAG, CustomData.of(this.entityTag));
         }
     }
 
     @Override
     boolean applicableTo(Material type) {
-        return ENTITY_TAGGABLE_MATERIALS.contains(type);
+        return CraftMetaEntityTag.ENTITY_TAGGABLE_MATERIALS.contains(type);
     }
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && isEntityTagEmpty();
+        return super.isEmpty() && this.isEntityTagEmpty();
     }
 
     boolean isEntityTagEmpty() {
-        return !(entityTag != null);
+        return !(this.entityTag != null);
     }
 
     @Override
@@ -97,14 +97,14 @@ public class CraftMetaEntityTag extends CraftMetaItem {
         if (meta instanceof CraftMetaEntityTag) {
             CraftMetaEntityTag that = (CraftMetaEntityTag) meta;
 
-            return entityTag != null ? that.entityTag != null && this.entityTag.equals(that.entityTag) : entityTag == null;
+            return this.entityTag != null ? that.entityTag != null && this.entityTag.equals(that.entityTag) : this.entityTag == null;
         }
         return true;
     }
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaEntityTag || isEntityTagEmpty());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaEntityTag || this.isEntityTagEmpty());
     }
 
     @Override
@@ -112,8 +112,8 @@ public class CraftMetaEntityTag extends CraftMetaItem {
         final int original;
         int hash = original = super.applyHash();
 
-        if (entityTag != null) {
-            hash = 73 * hash + entityTag.hashCode();
+        if (this.entityTag != null) {
+            hash = 73 * hash + this.entityTag.hashCode();
         }
 
         return original != hash ? CraftMetaEntityTag.class.hashCode() ^ hash : hash;
@@ -130,8 +130,8 @@ public class CraftMetaEntityTag extends CraftMetaItem {
     public CraftMetaEntityTag clone() {
         CraftMetaEntityTag clone = (CraftMetaEntityTag) super.clone();
 
-        if (entityTag != null) {
-            clone.entityTag = entityTag.copy();
+        if (this.entityTag != null) {
+            clone.entityTag = this.entityTag.copy();
         }
 
         return clone;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java
index 681aed86bb..4921fc085c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaFirework.java
@@ -21,7 +21,7 @@ import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey.Specific;
 import org.bukkit.craftbukkit.inventory.CraftMetaItem.ItemMetaKey.Specific.To;
 import org.bukkit.inventory.meta.FireworkMeta;
 
-@DelegateDeserialization(SerializableMeta.class)
+public @DelegateDeserialization(SerializableMeta.class)
 class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
     /*
        "Fireworks", "Explosion", "Explosions", "Flight", "Type", "Trail", "Flicker", "Colors", "FadeColors";
@@ -44,7 +44,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
     static final ItemMetaKey EXPLOSIONS = new ItemMetaKey("firework-effects");
 
     private List<FireworkEffect> effects;
-    private Integer power;
+    public Integer power;
 
     CraftMetaFirework(CraftMetaItem meta) {
         super(meta);
@@ -63,15 +63,15 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
     CraftMetaFirework(DataComponentPatch tag) {
         super(tag);
 
-        getOrEmpty(tag, FIREWORKS).ifPresent((fireworks) -> {
-            power = fireworks.flightDuration();
+        getOrEmpty(tag, CraftMetaFirework.FIREWORKS).ifPresent((fireworks) -> {
+            this.power = fireworks.flightDuration();
 
             List<FireworkExplosion> fireworkEffects = fireworks.explosions();
             List<FireworkEffect> effects = this.effects = new ArrayList<FireworkEffect>(fireworkEffects.size());
 
             for (int i = 0; i < fireworkEffects.size(); i++) {
                 try {
-                    effects.add(getEffect(fireworkEffects.get(i)));
+                    effects.add(CraftMetaFirework.getEffect(fireworkEffects.get(i)));
                 } catch (IllegalArgumentException ex) {
                     // Ignore invalid effects
                 }
@@ -82,20 +82,20 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
     CraftMetaFirework(Map<String, Object> map) {
         super(map);
 
-        Integer power = SerializableMeta.getObject(Integer.class, map, FLIGHT.BUKKIT, true);
+        Integer power = SerializableMeta.getObject(Integer.class, map, CraftMetaFirework.FLIGHT.BUKKIT, true);
         if (power != null) {
             this.power = power;
         }
 
-        Iterable<?> effects = SerializableMeta.getObject(Iterable.class, map, EXPLOSIONS.BUKKIT, true);
-        safelyAddEffects(effects);
+        Iterable<?> effects = SerializableMeta.getObject(Iterable.class, map, CraftMetaFirework.EXPLOSIONS.BUKKIT, true);
+        this.safelyAddEffects(effects);
     }
 
     static FireworkEffect getEffect(FireworkExplosion explosion) {
         FireworkEffect.Builder effect = FireworkEffect.builder()
                 .flicker(explosion.hasTwinkle())
                 .trail(explosion.hasTrail())
-                .with(getEffectType(explosion.shape()));
+                .with(CraftMetaFirework.getEffectType(explosion.shape()));
 
         IntList colors = explosion.colors();
         // People using buggy command generators specify a list rather than an int here, so recover with dummy data.
@@ -117,30 +117,30 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
     }
 
     static FireworkExplosion getExplosion(FireworkEffect effect) {
-        IntList colors = addColors(effect.getColors());
-        IntList fadeColors = addColors(effect.getFadeColors());
+        IntList colors = CraftMetaFirework.addColors(effect.getColors());
+        IntList fadeColors = CraftMetaFirework.addColors(effect.getFadeColors());
 
-        return new FireworkExplosion(getNBT(effect.getType()), colors, fadeColors, effect.hasTrail(), effect.hasFlicker());
+        return new FireworkExplosion(CraftMetaFirework.getNBT(effect.getType()), colors, fadeColors, effect.hasTrail(), effect.hasFlicker());
     }
 
-    static FireworkExplosion.a getNBT(Type type) {
+    static FireworkExplosion.Shape getNBT(Type type) {
         switch (type) {
             case BALL:
-                return FireworkExplosion.a.SMALL_BALL;
+                return FireworkExplosion.Shape.SMALL_BALL;
             case BALL_LARGE:
-                return FireworkExplosion.a.LARGE_BALL;
+                return FireworkExplosion.Shape.LARGE_BALL;
             case STAR:
-                return FireworkExplosion.a.STAR;
+                return FireworkExplosion.Shape.STAR;
             case CREEPER:
-                return FireworkExplosion.a.CREEPER;
+                return FireworkExplosion.Shape.CREEPER;
             case BURST:
-                return FireworkExplosion.a.BURST;
+                return FireworkExplosion.Shape.BURST;
             default:
                 throw new IllegalArgumentException("Unknown effect type " + type);
         }
     }
 
-    static Type getEffectType(FireworkExplosion.a nbt) {
+    static Type getEffectType(FireworkExplosion.Shape nbt) {
         switch (nbt) {
             case SMALL_BALL:
                 return Type.BALL;
@@ -159,7 +159,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
 
     @Override
     public boolean hasEffects() {
-        return !(effects == null || effects.isEmpty());
+        return !(this.effects == null || this.effects.isEmpty());
     }
 
     void safelyAddEffects(Iterable<?> collection) {
@@ -181,18 +181,18 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
     @Override
     void applyToItem(CraftMetaItem.Applicator itemTag) {
         super.applyToItem(itemTag);
-        if (isFireworkEmpty()) {
+        if (this.isFireworkEmpty()) {
             return;
         }
 
         List<FireworkExplosion> effects = new ArrayList<>();
-        if (hasEffects()) {
+        if (this.hasEffects()) {
             for (FireworkEffect effect : this.effects) {
-                effects.add(getExplosion(effect));
+                effects.add(CraftMetaFirework.getExplosion(effect));
             }
         }
 
-        itemTag.put(FIREWORKS, new Fireworks(this.getPower(), effects));
+        itemTag.put(CraftMetaFirework.FIREWORKS, new Fireworks(this.getPower(), effects));
     }
 
     static IntList addColors(List<Color> colors) {
@@ -211,11 +211,11 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && isFireworkEmpty();
+        return super.isEmpty() && this.isFireworkEmpty();
     }
 
     boolean isFireworkEmpty() {
-        return !(hasEffects() || hasPower());
+        return !(this.hasEffects() || this.hasPower());
     }
 
     @Override
@@ -232,7 +232,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
         if (meta instanceof CraftMetaFirework that) {
 
             return (Objects.equals(this.power, that.power))
-                    && (hasEffects() ? that.hasEffects() && this.effects.equals(that.effects) : !that.hasEffects());
+                    && (this.hasEffects() ? that.hasEffects() && this.effects.equals(that.effects) : !that.hasEffects());
         }
 
         return true;
@@ -240,18 +240,18 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaFirework || isFireworkEmpty());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaFirework || this.isFireworkEmpty());
     }
 
     @Override
     int applyHash() {
         final int original;
         int hash = original = super.applyHash();
-        if (hasPower()) {
-            hash = 61 * hash + power;
+        if (this.hasPower()) {
+            hash = 61 * hash + this.power;
         }
-        if (hasEffects()) {
-            hash = 61 * hash + 13 * effects.hashCode();
+        if (this.hasEffects()) {
+            hash = 61 * hash + 13 * this.effects.hashCode();
         }
         return hash != original ? CraftMetaFirework.class.hashCode() ^ hash : hash;
     }
@@ -260,12 +260,12 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
     Builder<String, Object> serialize(Builder<String, Object> builder) {
         super.serialize(builder);
 
-        if (hasEffects()) {
-            builder.put(EXPLOSIONS.BUKKIT, ImmutableList.copyOf(effects));
+        if (this.hasEffects()) {
+            builder.put(CraftMetaFirework.EXPLOSIONS.BUKKIT, ImmutableList.copyOf(this.effects));
         }
 
-        if (hasPower()) {
-            builder.put(FLIGHT.BUKKIT, power);
+        if (this.hasPower()) {
+            builder.put(CraftMetaFirework.FLIGHT.BUKKIT, this.power);
         }
 
         return builder;
@@ -312,7 +312,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
     @Override
     public void addEffects(Iterable<FireworkEffect> effects) {
         Preconditions.checkArgument(effects != null, "effects cannot be null");
-        safelyAddEffects(effects);
+        this.safelyAddEffects(effects);
     }
 
     @Override
@@ -341,7 +341,7 @@ class CraftMetaFirework extends CraftMetaItem implements FireworkMeta {
 
     @Override
     public int getPower() {
-        return hasPower() ? this.power : 0;
+        return this.hasPower() ? this.power : 0;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
index 8bc8cb093d..92dcf22ee3 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaItem.java
@@ -40,33 +40,30 @@ import java.util.logging.Logger;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 import net.minecraft.core.Holder;
-import net.minecraft.core.IRegistry;
-import net.minecraft.core.IRegistryCustom;
+import net.minecraft.core.Registry;
+import net.minecraft.core.RegistryAccess;
 import net.minecraft.core.component.DataComponentPatch;
 import net.minecraft.core.component.DataComponentType;
 import net.minecraft.core.component.DataComponents;
 import net.minecraft.core.component.TypedDataComponent;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.nbt.DynamicOpsNBT;
-import net.minecraft.nbt.NBTBase;
-import net.minecraft.nbt.NBTCompressedStreamTools;
-import net.minecraft.nbt.NBTReadLimiter;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagList;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.nbt.ListTag;
+import net.minecraft.nbt.NbtAccounter;
+import net.minecraft.nbt.NbtIo;
+import net.minecraft.nbt.NbtOps;
 import net.minecraft.nbt.SnbtPrinterTagVisitor;
-import net.minecraft.network.chat.IChatBaseComponent;
-import net.minecraft.resources.MinecraftKey;
+import net.minecraft.network.chat.Component;
+import net.minecraft.resources.ResourceLocation;
 import net.minecraft.server.MinecraftServer;
 import net.minecraft.tags.TagKey;
 import net.minecraft.util.Unit;
-import net.minecraft.world.entity.EnumItemSlot;
 import net.minecraft.world.entity.EquipmentSlotGroup;
-import net.minecraft.world.entity.ai.attributes.AttributeBase;
-import net.minecraft.world.food.FoodInfo;
+import net.minecraft.world.food.FoodProperties;
 import net.minecraft.world.item.EitherHolder;
-import net.minecraft.world.item.EnumItemRarity;
 import net.minecraft.world.item.JukeboxPlayable;
 import net.minecraft.world.item.JukeboxSongs;
+import net.minecraft.world.item.Rarity;
 import net.minecraft.world.item.component.BlockItemStateProperties;
 import net.minecraft.world.item.component.CustomData;
 import net.minecraft.world.item.component.CustomModelData;
@@ -80,7 +77,7 @@ import net.minecraft.world.item.component.UseRemainder;
 import net.minecraft.world.item.enchantment.Enchantable;
 import net.minecraft.world.item.enchantment.ItemEnchantments;
 import net.minecraft.world.item.equipment.Equippable;
-import net.minecraft.world.level.block.state.IBlockData;
+import net.minecraft.world.level.block.state.BlockState;
 import org.bukkit.Bukkit;
 import org.bukkit.Material;
 import org.bukkit.NamespacedKey;
@@ -204,27 +201,27 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
     static final class Applicator {
 
-        private final DataComponentPatch.a builder = DataComponentPatch.builder();
+        private final DataComponentPatch.Builder builder = DataComponentPatch.builder();
 
         <T> Applicator put(ItemMetaKeyType<T> key, T value) {
-            builder.set(key.TYPE, value);
+            this.builder.set(key.TYPE, value);
             return this;
         }
 
         <T> Applicator putIfAbsent(TypedDataComponent<?> component) {
-            if (!builder.isSet(component.type())) {
-                builder.set(component);
+            if (!this.builder.isSet(component.type())) {
+                this.builder.set(component);
             }
             return this;
         }
 
         DataComponentPatch build() {
-            return builder.build();
+            return this.builder.build();
         }
     }
 
-    static final ItemMetaKeyType<IChatBaseComponent> NAME = new ItemMetaKeyType(DataComponents.CUSTOM_NAME, "display-name");
-    static final ItemMetaKeyType<IChatBaseComponent> ITEM_NAME = new ItemMetaKeyType(DataComponents.ITEM_NAME, "item-name");
+    static final ItemMetaKeyType<Component> NAME = new ItemMetaKeyType(DataComponents.CUSTOM_NAME, "display-name");
+    static final ItemMetaKeyType<Component> ITEM_NAME = new ItemMetaKeyType(DataComponents.ITEM_NAME, "item-name");
     static final ItemMetaKeyType<ItemLore> LORE = new ItemMetaKeyType<>(DataComponents.LORE, "lore");
     static final ItemMetaKeyType<CustomModelData> CUSTOM_MODEL_DATA = new ItemMetaKeyType<>(DataComponents.CUSTOM_MODEL_DATA, "custom-model-data");
     static final ItemMetaKeyType<Enchantable> ENCHANTABLE = new ItemMetaKeyType<>(DataComponents.ENCHANTABLE, "enchantable");
@@ -240,9 +237,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
     @Specific(Specific.To.NBT)
     static final ItemMetaKeyType<Unit> HIDE_TOOLTIP = new ItemMetaKeyType<>(DataComponents.HIDE_TOOLTIP, "hide-tool-tip");
     @Specific(Specific.To.NBT)
-    static final ItemMetaKeyType<MinecraftKey> TOOLTIP_STYLE = new ItemMetaKeyType<>(DataComponents.TOOLTIP_STYLE, "tool-tip-style");
+    static final ItemMetaKeyType<ResourceLocation> TOOLTIP_STYLE = new ItemMetaKeyType<>(DataComponents.TOOLTIP_STYLE, "tool-tip-style");
     @Specific(Specific.To.NBT)
-    static final ItemMetaKeyType<MinecraftKey> ITEM_MODEL = new ItemMetaKeyType<>(DataComponents.ITEM_MODEL, "item-model");
+    static final ItemMetaKeyType<ResourceLocation> ITEM_MODEL = new ItemMetaKeyType<>(DataComponents.ITEM_MODEL, "item-model");
     @Specific(Specific.To.NBT)
     static final ItemMetaKeyType<Unbreakable> UNBREAKABLE = new ItemMetaKeyType<>(DataComponents.UNBREAKABLE, "Unbreakable");
     @Specific(Specific.To.NBT)
@@ -254,13 +251,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
     @Specific(Specific.To.NBT)
     static final ItemMetaKeyType<Integer> MAX_STACK_SIZE = new ItemMetaKeyType<>(DataComponents.MAX_STACK_SIZE, "max-stack-size");
     @Specific(Specific.To.NBT)
-    static final ItemMetaKeyType<EnumItemRarity> RARITY = new ItemMetaKeyType<>(DataComponents.RARITY, "rarity");
+    static final ItemMetaKeyType<Rarity> RARITY = new ItemMetaKeyType<>(DataComponents.RARITY, "rarity");
     @Specific(Specific.To.NBT)
     static final ItemMetaKeyType<UseRemainder> USE_REMAINDER = new ItemMetaKeyType<>(DataComponents.USE_REMAINDER, "use-remainder");
     @Specific(Specific.To.NBT)
     static final ItemMetaKeyType<UseCooldown> USE_COOLDOWN = new ItemMetaKeyType<>(DataComponents.USE_COOLDOWN, "use-cooldown");
     @Specific(Specific.To.NBT)
-    static final ItemMetaKeyType<FoodInfo> FOOD = new ItemMetaKeyType<>(DataComponents.FOOD, "food");
+    static final ItemMetaKeyType<FoodProperties> FOOD = new ItemMetaKeyType<>(DataComponents.FOOD, "food");
     @Specific(Specific.To.NBT)
     static final ItemMetaKeyType<Tool> TOOL = new ItemMetaKeyType<>(DataComponents.TOOL, "tool");
     @Specific(Specific.To.NBT)
@@ -280,9 +277,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
     static final ItemMetaKeyType<CustomData> CUSTOM_DATA = new ItemMetaKeyType<>(DataComponents.CUSTOM_DATA);
 
     // We store the raw original JSON representation of all text data. See SPIGOT-5063, SPIGOT-5656, SPIGOT-5304
-    private IChatBaseComponent displayName;
-    private IChatBaseComponent itemName;
-    private List<IChatBaseComponent> lore; // null and empty are two different states internally
+    private Component displayName;
+    private Component itemName;
+    private List<Component> lore; // null and empty are two different states internally
     private CraftCustomModelDataComponent customModelData;
     private Integer enchantableValue;
     private Map<String, String> blockData;
@@ -311,10 +308,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
     private static final Set<DataComponentType> HANDLED_TAGS = Sets.newHashSet();
     private static final CraftPersistentDataTypeRegistry DATA_TYPE_REGISTRY = new CraftPersistentDataTypeRegistry();
 
-    private NBTTagCompound customTag;
-    protected DataComponentPatch.a unhandledTags = DataComponentPatch.builder();
+    private CompoundTag customTag;
+    protected DataComponentPatch.Builder unhandledTags = DataComponentPatch.builder();
     private Set<DataComponentType<?>> removedTags = Sets.newHashSet();
-    private CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(DATA_TYPE_REGISTRY);
+    private CraftPersistentDataContainer persistentDataContainer = new CraftPersistentDataContainer(CraftMetaItem.DATA_TYPE_REGISTRY);
 
     private int version = CraftMagicNumbers.INSTANCE.getDataVersion(); // Internal use only
 
@@ -327,7 +324,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
         this.itemName = meta.itemName;
 
         if (meta.lore != null) {
-            this.lore = new ArrayList<IChatBaseComponent>(meta.lore);
+            this.lore = new ArrayList<Component>(meta.lore);
         }
 
         if (meta.hasCustomModelData()) {
@@ -385,133 +382,133 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
     }
 
     CraftMetaItem(DataComponentPatch tag) {
-        getOrEmpty(tag, NAME).ifPresent((component) -> {
-            displayName = component;
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.NAME).ifPresent((component) -> {
+            this.displayName = component;
         });
-        getOrEmpty(tag, ITEM_NAME).ifPresent((component) -> {
-            itemName = component;
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.ITEM_NAME).ifPresent((component) -> {
+            this.itemName = component;
         });
 
-        getOrEmpty(tag, LORE).ifPresent((l) -> {
-            List<IChatBaseComponent> list = l.lines();
-            lore = new ArrayList<IChatBaseComponent>(list.size());
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.LORE).ifPresent((l) -> {
+            List<Component> list = l.lines();
+            this.lore = new ArrayList<Component>(list.size());
             for (int index = 0; index < list.size(); index++) {
-                IChatBaseComponent line = list.get(index);
-                lore.add(line);
+                Component line = list.get(index);
+                this.lore.add(line);
             }
         });
 
-        getOrEmpty(tag, CUSTOM_MODEL_DATA).ifPresent((i) -> {
-            customModelData = new CraftCustomModelDataComponent(i);
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.CUSTOM_MODEL_DATA).ifPresent((i) -> {
+            this.customModelData = new CraftCustomModelDataComponent(i);
         });
-        getOrEmpty(tag, ENCHANTABLE).ifPresent((i) -> {
-            enchantableValue = i.value();
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.ENCHANTABLE).ifPresent((i) -> {
+            this.enchantableValue = i.value();
         });
-        getOrEmpty(tag, BLOCK_DATA).ifPresent((t) -> {
-            blockData = t.properties();
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.BLOCK_DATA).ifPresent((t) -> {
+            this.blockData = t.properties();
         });
 
-        getOrEmpty(tag, ENCHANTMENTS).ifPresent((en) -> {
-            this.enchantments = buildEnchantments(en);
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.ENCHANTMENTS).ifPresent((en) -> {
+            this.enchantments = CraftMetaItem.buildEnchantments(en);
             if (!en.showInTooltip) {
-                addItemFlags(ItemFlag.HIDE_ENCHANTS);
+                this.addItemFlags(ItemFlag.HIDE_ENCHANTS);
             }
         });
-        getOrEmpty(tag, ATTRIBUTES).ifPresent((en) -> {
-            this.attributeModifiers = buildModifiers(en);
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.ATTRIBUTES).ifPresent((en) -> {
+            this.attributeModifiers = CraftMetaItem.buildModifiers(en);
             if (!en.showInTooltip()) {
-                addItemFlags(ItemFlag.HIDE_ATTRIBUTES);
+                this.addItemFlags(ItemFlag.HIDE_ATTRIBUTES);
             }
         });
 
-        getOrEmpty(tag, REPAIR).ifPresent((i) -> {
-            repairCost = i;
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.REPAIR).ifPresent((i) -> {
+            this.repairCost = i;
         });
 
-        getOrEmpty(tag, HIDE_ADDITIONAL_TOOLTIP).ifPresent((h) -> {
-            addItemFlags(ItemFlag.HIDE_ADDITIONAL_TOOLTIP);
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.HIDE_ADDITIONAL_TOOLTIP).ifPresent((h) -> {
+            this.addItemFlags(ItemFlag.HIDE_ADDITIONAL_TOOLTIP);
         });
-        getOrEmpty(tag, HIDE_TOOLTIP).ifPresent((u) -> {
-            hideTooltip = true;
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.HIDE_TOOLTIP).ifPresent((u) -> {
+            this.hideTooltip = true;
         });
-        getOrEmpty(tag, TOOLTIP_STYLE).ifPresent((key) -> {
-            tooltipStyle = CraftNamespacedKey.fromMinecraft(key);
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.TOOLTIP_STYLE).ifPresent((key) -> {
+            this.tooltipStyle = CraftNamespacedKey.fromMinecraft(key);
         });
-        getOrEmpty(tag, ITEM_MODEL).ifPresent((key) -> {
-            itemModel = CraftNamespacedKey.fromMinecraft(key);
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.ITEM_MODEL).ifPresent((key) -> {
+            this.itemModel = CraftNamespacedKey.fromMinecraft(key);
         });
-        getOrEmpty(tag, UNBREAKABLE).ifPresent((u) -> {
-            unbreakable = true;
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.UNBREAKABLE).ifPresent((u) -> {
+            this.unbreakable = true;
             if (!u.showInTooltip()) {
-                addItemFlags(ItemFlag.HIDE_UNBREAKABLE);
+                this.addItemFlags(ItemFlag.HIDE_UNBREAKABLE);
             }
         });
-        getOrEmpty(tag, ENCHANTMENT_GLINT_OVERRIDE).ifPresent((override) -> {
-            enchantmentGlintOverride = override;
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.ENCHANTMENT_GLINT_OVERRIDE).ifPresent((override) -> {
+            this.enchantmentGlintOverride = override;
         });
-        getOrEmpty(tag, GLIDER).ifPresent((u) -> {
-            glider = true;
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.GLIDER).ifPresent((u) -> {
+            this.glider = true;
         });
-        getOrEmpty(tag, DAMAGE_RESISTANT).ifPresent((tags) -> {
-            damageResistant = tags.types();
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.DAMAGE_RESISTANT).ifPresent((tags) -> {
+            this.damageResistant = tags.types();
         });
-        getOrEmpty(tag, MAX_STACK_SIZE).ifPresent((i) -> {
-            maxStackSize = i;
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.MAX_STACK_SIZE).ifPresent((i) -> {
+            this.maxStackSize = i;
         });
-        getOrEmpty(tag, RARITY).ifPresent((enumItemRarity) -> {
-            rarity = ItemRarity.valueOf(enumItemRarity.name());
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.RARITY).ifPresent((enumItemRarity) -> {
+            this.rarity = ItemRarity.valueOf(enumItemRarity.name());
         });
-        getOrEmpty(tag, USE_REMAINDER).ifPresent((remainder) -> {
-            useRemainder = CraftItemStack.asCraftMirror(remainder.convertInto());
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.USE_REMAINDER).ifPresent((remainder) -> {
+            this.useRemainder = CraftItemStack.asCraftMirror(remainder.convertInto());
         });
-        getOrEmpty(tag, USE_COOLDOWN).ifPresent((cooldown) -> {
-            useCooldown = new CraftUseCooldownComponent(cooldown);
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.USE_COOLDOWN).ifPresent((cooldown) -> {
+            this.useCooldown = new CraftUseCooldownComponent(cooldown);
         });
-        getOrEmpty(tag, FOOD).ifPresent((foodInfo) -> {
-            food = new CraftFoodComponent(foodInfo);
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.FOOD).ifPresent((foodInfo) -> {
+            this.food = new CraftFoodComponent(foodInfo);
         });
-        getOrEmpty(tag, TOOL).ifPresent((toolInfo) -> {
-            tool = new CraftToolComponent(toolInfo);
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.TOOL).ifPresent((toolInfo) -> {
+            this.tool = new CraftToolComponent(toolInfo);
         });
-        getOrEmpty(tag, EQUIPPABLE).ifPresent((equippableInfo) -> {
-            equippable = new CraftEquippableComponent(equippableInfo);
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.EQUIPPABLE).ifPresent((equippableInfo) -> {
+            this.equippable = new CraftEquippableComponent(equippableInfo);
         });
-        getOrEmpty(tag, JUKEBOX_PLAYABLE).ifPresent((jukeboxPlayable) -> {
-            jukebox = new CraftJukeboxComponent(jukeboxPlayable);
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.JUKEBOX_PLAYABLE).ifPresent((jukeboxPlayable) -> {
+            this.jukebox = new CraftJukeboxComponent(jukeboxPlayable);
         });
-        getOrEmpty(tag, DAMAGE).ifPresent((i) -> {
-            damage = i;
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.DAMAGE).ifPresent((i) -> {
+            this.damage = i;
         });
-        getOrEmpty(tag, MAX_DAMAGE).ifPresent((i) -> {
-            maxDamage = i;
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.MAX_DAMAGE).ifPresent((i) -> {
+            this.maxDamage = i;
         });
-        getOrEmpty(tag, CUSTOM_DATA).ifPresent((customData) -> {
-            customTag = customData.copyTag();
-            if (customTag.contains(BUKKIT_CUSTOM_TAG.NBT)) {
-                NBTTagCompound compound = customTag.getCompound(BUKKIT_CUSTOM_TAG.NBT);
+        CraftMetaItem.getOrEmpty(tag, CraftMetaItem.CUSTOM_DATA).ifPresent((customData) -> {
+            this.customTag = customData.copyTag();
+            if (this.customTag.contains(CraftMetaItem.BUKKIT_CUSTOM_TAG.NBT)) {
+                CompoundTag compound = this.customTag.getCompound(CraftMetaItem.BUKKIT_CUSTOM_TAG.NBT);
                 Set<String> keys = compound.getAllKeys();
                 for (String key : keys) {
-                    persistentDataContainer.put(key, compound.get(key).copy());
+                    this.persistentDataContainer.put(key, compound.get(key).copy());
                 }
 
-                customTag.remove(BUKKIT_CUSTOM_TAG.NBT);
+                this.customTag.remove(CraftMetaItem.BUKKIT_CUSTOM_TAG.NBT);
             }
 
-            if (customTag.isEmpty()) {
-                customTag = null;
+            if (this.customTag.isEmpty()) {
+                this.customTag = null;
             }
         });
 
         Set<Map.Entry<DataComponentType<?>, Optional<?>>> keys = tag.entrySet();
         for (Map.Entry<DataComponentType<?>, Optional<?>> key : keys) {
-            if (!getHandledTags().contains(key.getKey())) {
+            if (!CraftMetaItem.getHandledTags().contains(key.getKey())) {
                 key.getValue().ifPresent((value) -> {
-                    unhandledTags.set((DataComponentType) key.getKey(), value);
+                    this.unhandledTags.set((DataComponentType) key.getKey(), value);
                 });
             }
 
             if (key.getValue().isEmpty()) {
-                removedTags.add(key.getKey());
+                this.removedTags.add(key.getKey());
             }
         }
     }
@@ -534,11 +531,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
     static Multimap<Attribute, AttributeModifier> buildModifiers(ItemAttributeModifiers tag) {
         Multimap<Attribute, AttributeModifier> modifiers = LinkedHashMultimap.create();
-        List<ItemAttributeModifiers.b> mods = tag.modifiers();
+        List<ItemAttributeModifiers.Entry> mods = tag.modifiers();
         int size = mods.size();
 
         for (int i = 0; i < size; i++) {
-            ItemAttributeModifiers.b entry = mods.get(i);
+            ItemAttributeModifiers.Entry entry = mods.get(i);
             net.minecraft.world.entity.ai.attributes.AttributeModifier nmsModifier = entry.modifier();
             if (nmsModifier == null) {
                 continue;
@@ -578,26 +575,26 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
     }
 
     CraftMetaItem(Map<String, Object> map) {
-        displayName = CraftChatMessage.fromJSONOrString(SerializableMeta.getString(map, NAME.BUKKIT, true), true, false);
-        itemName = CraftChatMessage.fromJSONOrNull(SerializableMeta.getString(map, ITEM_NAME.BUKKIT, true));
+        this.displayName = CraftChatMessage.fromJSONOrString(SerializableMeta.getString(map, CraftMetaItem.NAME.BUKKIT, true), true, false);
+        this.itemName = CraftChatMessage.fromJSONOrNull(SerializableMeta.getString(map, CraftMetaItem.ITEM_NAME.BUKKIT, true));
 
-        Iterable<?> lore = SerializableMeta.getObject(Iterable.class, map, LORE.BUKKIT, true);
+        Iterable<?> lore = SerializableMeta.getObject(Iterable.class, map, CraftMetaItem.LORE.BUKKIT, true);
         if (lore != null) {
-            safelyAdd(lore, this.lore = new ArrayList<IChatBaseComponent>(), true);
+            CraftMetaItem.safelyAdd(lore, this.lore = new ArrayList<Component>(), true);
         }
 
-        Object customModelData = SerializableMeta.getObject(Object.class, map, CUSTOM_MODEL_DATA.BUKKIT, true);
+        Object customModelData = SerializableMeta.getObject(Object.class, map, CraftMetaItem.CUSTOM_MODEL_DATA.BUKKIT, true);
         if (customModelData instanceof CustomModelDataComponent component) {
-            setCustomModelDataComponent(component);
+            this.setCustomModelDataComponent(component);
         } else {
-            setCustomModelData((Integer) customModelData);
+            this.setCustomModelData((Integer) customModelData);
         }
-        Integer enchantmentValue = SerializableMeta.getObject(Integer.class, map, ENCHANTABLE.BUKKIT, true);
+        Integer enchantmentValue = SerializableMeta.getObject(Integer.class, map, CraftMetaItem.ENCHANTABLE.BUKKIT, true);
         if (enchantmentValue != null) {
-            setEnchantable(enchantmentValue);
+            this.setEnchantable(enchantmentValue);
         }
 
-        Object blockData = SerializableMeta.getObject(Object.class, map, BLOCK_DATA.BUKKIT, true);
+        Object blockData = SerializableMeta.getObject(Object.class, map, CraftMetaItem.BLOCK_DATA.BUKKIT, true);
         if (blockData != null) {
             Map<String, String> mapBlockData = new HashMap<>();
 
@@ -607,7 +604,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
                 }
             } else {
                 // Legacy pre 1.20.5:
-                NBTTagCompound nbtBlockData = (NBTTagCompound) CraftNBTTagConfigSerializer.deserialize(blockData);
+                CompoundTag nbtBlockData = (CompoundTag) CraftNBTTagConfigSerializer.deserialize(blockData);
                 for (String key : nbtBlockData.getAllKeys()) {
                     mapBlockData.put(key, nbtBlockData.getString(key));
                 }
@@ -616,121 +613,121 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
             this.blockData = mapBlockData;
         }
 
-        enchantments = buildEnchantments(map, ENCHANTMENTS);
-        attributeModifiers = buildModifiers(map, ATTRIBUTES);
+        this.enchantments = CraftMetaItem.buildEnchantments(map, CraftMetaItem.ENCHANTMENTS);
+        this.attributeModifiers = CraftMetaItem.buildModifiers(map, CraftMetaItem.ATTRIBUTES);
 
-        Integer repairCost = SerializableMeta.getObject(Integer.class, map, REPAIR.BUKKIT, true);
+        Integer repairCost = SerializableMeta.getObject(Integer.class, map, CraftMetaItem.REPAIR.BUKKIT, true);
         if (repairCost != null) {
-            setRepairCost(repairCost);
+            this.setRepairCost(repairCost);
         }
 
-        Iterable<?> hideFlags = SerializableMeta.getObject(Iterable.class, map, HIDEFLAGS.BUKKIT, true);
+        Iterable<?> hideFlags = SerializableMeta.getObject(Iterable.class, map, CraftMetaItem.HIDEFLAGS.BUKKIT, true);
         if (hideFlags != null) {
             for (Object hideFlagObject : hideFlags) {
                 String hideFlagString = (String) hideFlagObject;
                 try {
                     ItemFlag hideFlatEnum = CraftItemFlag.stringToBukkit(hideFlagString);
-                    addItemFlags(hideFlatEnum);
+                    this.addItemFlags(hideFlatEnum);
                 } catch (IllegalArgumentException ex) {
                     // Ignore when we got a old String which does not map to a Enum value anymore
                 }
             }
         }
 
-        Boolean hideTooltip = SerializableMeta.getObject(Boolean.class, map, HIDE_TOOLTIP.BUKKIT, true);
+        Boolean hideTooltip = SerializableMeta.getObject(Boolean.class, map, CraftMetaItem.HIDE_TOOLTIP.BUKKIT, true);
         if (hideTooltip != null) {
-            setHideTooltip(hideTooltip);
+            this.setHideTooltip(hideTooltip);
         }
 
-        String tooltipStyle = SerializableMeta.getString(map, TOOLTIP_STYLE.BUKKIT, true);
+        String tooltipStyle = SerializableMeta.getString(map, CraftMetaItem.TOOLTIP_STYLE.BUKKIT, true);
         if (tooltipStyle != null) {
-            setTooltipStyle(NamespacedKey.fromString(tooltipStyle));
+            this.setTooltipStyle(NamespacedKey.fromString(tooltipStyle));
         }
 
-        String itemModel = SerializableMeta.getString(map, ITEM_MODEL.BUKKIT, true);
+        String itemModel = SerializableMeta.getString(map, CraftMetaItem.ITEM_MODEL.BUKKIT, true);
         if (itemModel != null) {
-            setItemModel(NamespacedKey.fromString(itemModel));
+            this.setItemModel(NamespacedKey.fromString(itemModel));
         }
 
-        Boolean unbreakable = SerializableMeta.getObject(Boolean.class, map, UNBREAKABLE.BUKKIT, true);
+        Boolean unbreakable = SerializableMeta.getObject(Boolean.class, map, CraftMetaItem.UNBREAKABLE.BUKKIT, true);
         if (unbreakable != null) {
-            setUnbreakable(unbreakable);
+            this.setUnbreakable(unbreakable);
         }
 
-        Boolean enchantmentGlintOverride = SerializableMeta.getObject(Boolean.class, map, ENCHANTMENT_GLINT_OVERRIDE.BUKKIT, true);
+        Boolean enchantmentGlintOverride = SerializableMeta.getObject(Boolean.class, map, CraftMetaItem.ENCHANTMENT_GLINT_OVERRIDE.BUKKIT, true);
         if (enchantmentGlintOverride != null) {
-            setEnchantmentGlintOverride(enchantmentGlintOverride);
+            this.setEnchantmentGlintOverride(enchantmentGlintOverride);
         }
 
-        Boolean glider = SerializableMeta.getObject(Boolean.class, map, GLIDER.BUKKIT, true);
+        Boolean glider = SerializableMeta.getObject(Boolean.class, map, CraftMetaItem.GLIDER.BUKKIT, true);
         if (glider != null) {
-            setGlider(glider);
+            this.setGlider(glider);
         }
 
-        String damageResistant = SerializableMeta.getString(map, DAMAGE_RESISTANT.BUKKIT, true);
+        String damageResistant = SerializableMeta.getString(map, CraftMetaItem.DAMAGE_RESISTANT.BUKKIT, true);
         if (damageResistant != null) {
             Tag<DamageType> tag = Bukkit.getTag(DamageTypeTags.REGISTRY_DAMAGE_TYPES, NamespacedKey.fromString(damageResistant), DamageType.class);
             if (tag != null) {
-                setDamageResistant(tag);
+                this.setDamageResistant(tag);
             }
         }
 
-        Integer maxStackSize = SerializableMeta.getObject(Integer.class, map, MAX_STACK_SIZE.BUKKIT, true);
+        Integer maxStackSize = SerializableMeta.getObject(Integer.class, map, CraftMetaItem.MAX_STACK_SIZE.BUKKIT, true);
         if (maxStackSize != null) {
-            setMaxStackSize(maxStackSize);
+            this.setMaxStackSize(maxStackSize);
         }
 
-        String rarity = SerializableMeta.getString(map, RARITY.BUKKIT, true);
+        String rarity = SerializableMeta.getString(map, CraftMetaItem.RARITY.BUKKIT, true);
         if (rarity != null) {
-            setRarity(ItemRarity.valueOf(rarity));
+            this.setRarity(ItemRarity.valueOf(rarity));
         }
 
-        ItemStack remainder = SerializableMeta.getObject(ItemStack.class, map, USE_REMAINDER.BUKKIT, true);
+        ItemStack remainder = SerializableMeta.getObject(ItemStack.class, map, CraftMetaItem.USE_REMAINDER.BUKKIT, true);
         if (remainder != null) {
-            setUseRemainder(remainder);
+            this.setUseRemainder(remainder);
         }
 
-        CraftUseCooldownComponent cooldown = SerializableMeta.getObject(CraftUseCooldownComponent.class, map, USE_COOLDOWN.BUKKIT, true);
+        CraftUseCooldownComponent cooldown = SerializableMeta.getObject(CraftUseCooldownComponent.class, map, CraftMetaItem.USE_COOLDOWN.BUKKIT, true);
         if (cooldown != null) {
-            setUseCooldown(cooldown);
+            this.setUseCooldown(cooldown);
         }
 
-        CraftFoodComponent food = SerializableMeta.getObject(CraftFoodComponent.class, map, FOOD.BUKKIT, true);
+        CraftFoodComponent food = SerializableMeta.getObject(CraftFoodComponent.class, map, CraftMetaItem.FOOD.BUKKIT, true);
         if (food != null) {
-            setFood(food);
+            this.setFood(food);
         }
 
-        CraftToolComponent tool = SerializableMeta.getObject(CraftToolComponent.class, map, TOOL.BUKKIT, true);
+        CraftToolComponent tool = SerializableMeta.getObject(CraftToolComponent.class, map, CraftMetaItem.TOOL.BUKKIT, true);
         if (tool != null) {
-            setTool(tool);
+            this.setTool(tool);
         }
 
-        CraftEquippableComponent equippable = SerializableMeta.getObject(CraftEquippableComponent.class, map, EQUIPPABLE.BUKKIT, true);
+        CraftEquippableComponent equippable = SerializableMeta.getObject(CraftEquippableComponent.class, map, CraftMetaItem.EQUIPPABLE.BUKKIT, true);
         if (equippable != null) {
-            setEquippable(equippable);
+            this.setEquippable(equippable);
         }
 
-        CraftJukeboxComponent jukeboxPlayable = SerializableMeta.getObject(CraftJukeboxComponent.class, map, JUKEBOX_PLAYABLE.BUKKIT, true);
+        CraftJukeboxComponent jukeboxPlayable = SerializableMeta.getObject(CraftJukeboxComponent.class, map, CraftMetaItem.JUKEBOX_PLAYABLE.BUKKIT, true);
         if (jukeboxPlayable != null) {
-            setJukeboxPlayable(jukeboxPlayable);
+            this.setJukeboxPlayable(jukeboxPlayable);
         }
 
-        Integer damage = SerializableMeta.getObject(Integer.class, map, DAMAGE.BUKKIT, true);
+        Integer damage = SerializableMeta.getObject(Integer.class, map, CraftMetaItem.DAMAGE.BUKKIT, true);
         if (damage != null) {
-            setDamage(damage);
+            this.setDamage(damage);
         }
 
-        Integer maxDamage = SerializableMeta.getObject(Integer.class, map, MAX_DAMAGE.BUKKIT, true);
+        Integer maxDamage = SerializableMeta.getObject(Integer.class, map, CraftMetaItem.MAX_DAMAGE.BUKKIT, true);
         if (maxDamage != null) {
-            setMaxDamage(maxDamage);
+            this.setMaxDamage(maxDamage);
         }
 
         String internal = SerializableMeta.getString(map, "internal", true);
         if (internal != null) {
             ByteArrayInputStream buf = new ByteArrayInputStream(Base64.getDecoder().decode(internal));
             try {
-                NBTTagCompound internalTag = NBTCompressedStreamTools.readCompressed(buf, NBTReadLimiter.unlimitedHeap());
-                deserializeInternal(internalTag, map);
+                CompoundTag internalTag = NbtIo.readCompressed(buf, NbtAccounter.unlimitedHeap());
+                this.deserializeInternal(internalTag, map);
             } catch (IOException ex) {
                 Logger.getLogger(CraftMetaItem.class.getName()).log(Level.SEVERE, null, ex);
             }
@@ -740,8 +737,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
         if (unhandled != null) {
             ByteArrayInputStream buf = new ByteArrayInputStream(Base64.getDecoder().decode(unhandled));
             try {
-                NBTTagCompound unhandledTag = NBTCompressedStreamTools.readCompressed(buf, NBTReadLimiter.unlimitedHeap());
-                DataComponentPatch unhandledPatch = DataComponentPatch.CODEC.parse(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(DynamicOpsNBT.INSTANCE), unhandledTag).result().get();
+                CompoundTag unhandledTag = NbtIo.readCompressed(buf, NbtAccounter.unlimitedHeap());
+                DataComponentPatch unhandledPatch = DataComponentPatch.CODEC.parse(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(NbtOps.INSTANCE), unhandledTag).result().get();
                 this.unhandledTags.copy(unhandledPatch);
 
                 for (Entry<DataComponentType<?>, Optional<?>> entry : unhandledPatch.entrySet()) {
@@ -760,52 +757,52 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
         Iterable<?> removed = SerializableMeta.getObject(Iterable.class, map, "removed", true);
         if (removed != null) {
-            IRegistryCustom registryAccess = CraftRegistry.getMinecraftRegistry();
-            IRegistry<DataComponentType<?>> componentTypeRegistry = registryAccess.lookupOrThrow(Registries.DATA_COMPONENT_TYPE);
+            RegistryAccess registryAccess = CraftRegistry.getMinecraftRegistry();
+            Registry<DataComponentType<?>> componentTypeRegistry = registryAccess.lookupOrThrow(Registries.DATA_COMPONENT_TYPE);
 
             for (Object removedObject : removed) {
                 String removedString = (String) removedObject;
 
-                DataComponentType<?> component = componentTypeRegistry.getValue(MinecraftKey.parse(removedString));
+                DataComponentType<?> component = componentTypeRegistry.getValue(ResourceLocation.parse(removedString));
                 if (component != null) {
                     this.removedTags.add(component);
                 }
             }
         }
 
-        Object nbtMap = SerializableMeta.getObject(Object.class, map, BUKKIT_CUSTOM_TAG.BUKKIT, true); // We read both legacy maps and potential modern snbt strings here
+        Object nbtMap = SerializableMeta.getObject(Object.class, map, CraftMetaItem.BUKKIT_CUSTOM_TAG.BUKKIT, true); // We read both legacy maps and potential modern snbt strings here
         if (nbtMap != null) {
-            this.persistentDataContainer.putAll((NBTTagCompound) CraftNBTTagConfigSerializer.deserialize(nbtMap));
+            this.persistentDataContainer.putAll((CompoundTag) CraftNBTTagConfigSerializer.deserialize(nbtMap));
         }
 
         String custom = SerializableMeta.getString(map, "custom", true);
         if (custom != null) {
             ByteArrayInputStream buf = new ByteArrayInputStream(Base64.getDecoder().decode(custom));
             try {
-                customTag = NBTCompressedStreamTools.readCompressed(buf, NBTReadLimiter.unlimitedHeap());
+                this.customTag = NbtIo.readCompressed(buf, NbtAccounter.unlimitedHeap());
             } catch (IOException ex) {
                 Logger.getLogger(CraftMetaItem.class.getName()).log(Level.SEVERE, null, ex);
             }
         }
     }
 
-    void deserializeInternal(NBTTagCompound tag, Object context) {
+    void deserializeInternal(CompoundTag tag, Object context) {
         // SPIGOT-4576: Need to migrate from internal to proper data
-        if (tag.contains(ATTRIBUTES.NBT, CraftMagicNumbers.NBT.TAG_LIST)) {
-            this.attributeModifiers = buildModifiersLegacy(tag, ATTRIBUTES);
+        if (tag.contains(CraftMetaItem.ATTRIBUTES.NBT, CraftMagicNumbers.NBT.TAG_LIST)) {
+            this.attributeModifiers = CraftMetaItem.buildModifiersLegacy(tag, CraftMetaItem.ATTRIBUTES);
         }
     }
 
-    private static Multimap<Attribute, AttributeModifier> buildModifiersLegacy(NBTTagCompound tag, ItemMetaKey key) {
+    private static Multimap<Attribute, AttributeModifier> buildModifiersLegacy(CompoundTag tag, ItemMetaKey key) {
         Multimap<Attribute, AttributeModifier> modifiers = LinkedHashMultimap.create();
         if (!tag.contains(key.NBT, CraftMagicNumbers.NBT.TAG_LIST)) {
             return modifiers;
         }
-        NBTTagList mods = tag.getList(key.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND);
+        ListTag mods = tag.getList(key.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND);
         int size = mods.size();
 
         for (int i = 0; i < size; i++) {
-            NBTTagCompound entry = mods.getCompound(i);
+            CompoundTag entry = mods.getCompound(i);
             if (entry.isEmpty()) {
                 // entry is not an actual NBTTagCompound. getCompound returns empty NBTTagCompound in that case
                 continue;
@@ -817,7 +814,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
             AttributeModifier attribMod = CraftAttributeInstance.convert(nmsModifier);
 
-            String attributeName = entry.getString(ATTRIBUTES_IDENTIFIER.NBT);
+            String attributeName = entry.getString(CraftMetaItem.ATTRIBUTES_IDENTIFIER.NBT);
             if (attributeName == null || attributeName.isEmpty()) {
                 continue;
             }
@@ -827,8 +824,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
                 continue;
             }
 
-            if (entry.contains(ATTRIBUTES_SLOT.NBT, CraftMagicNumbers.NBT.TAG_STRING)) {
-                String slotName = entry.getString(ATTRIBUTES_SLOT.NBT);
+            if (entry.contains(CraftMetaItem.ATTRIBUTES_SLOT.NBT, CraftMagicNumbers.NBT.TAG_STRING)) {
+                String slotName = entry.getString(CraftMetaItem.ATTRIBUTES_SLOT.NBT);
                 if (slotName == null || slotName.isEmpty()) {
                     modifiers.put(attribute, attribMod);
                     continue;
@@ -836,7 +833,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
                 EquipmentSlot slot = null;
                 try {
-                    slot = CraftEquipmentSlot.getSlot(EnumItemSlot.byName(slotName.toLowerCase(Locale.ROOT)));
+                    slot = CraftEquipmentSlot.getSlot(net.minecraft.world.entity.EquipmentSlot.byName(slotName.toLowerCase(Locale.ROOT)));
                 } catch (IllegalArgumentException ex) {
                     // SPIGOT-4551 - Slot is invalid, should really match nothing but this is undefined behaviour anyway
                 }
@@ -908,149 +905,149 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
     @Overridden
     void applyToItem(CraftMetaItem.Applicator itemTag) {
-        if (hasDisplayName()) {
-            itemTag.put(NAME, displayName);
+        if (this.hasDisplayName()) {
+            itemTag.put(CraftMetaItem.NAME, this.displayName);
         }
 
-        if (hasItemName()) {
-            itemTag.put(ITEM_NAME, itemName);
+        if (this.hasItemName()) {
+            itemTag.put(CraftMetaItem.ITEM_NAME, this.itemName);
         }
 
-        if (lore != null) {
-            itemTag.put(LORE, new ItemLore(lore));
+        if (this.lore != null) {
+            itemTag.put(CraftMetaItem.LORE, new ItemLore(this.lore));
         }
 
-        if (hasCustomModelData()) {
-            itemTag.put(CUSTOM_MODEL_DATA, customModelData.getHandle());
+        if (this.hasCustomModelData()) {
+            itemTag.put(CraftMetaItem.CUSTOM_MODEL_DATA, this.customModelData.getHandle());
         }
 
-        if (hasEnchantable()) {
-            itemTag.put(ENCHANTABLE, new Enchantable(enchantableValue));
+        if (this.hasEnchantable()) {
+            itemTag.put(CraftMetaItem.ENCHANTABLE, new Enchantable(this.enchantableValue));
         }
 
-        if (hasBlockData()) {
-            itemTag.put(BLOCK_DATA, new BlockItemStateProperties(blockData));
+        if (this.hasBlockData()) {
+            itemTag.put(CraftMetaItem.BLOCK_DATA, new BlockItemStateProperties(this.blockData));
         }
 
-        if (hideFlag != 0) {
-            if (hasItemFlag(ItemFlag.HIDE_ADDITIONAL_TOOLTIP)) {
-                itemTag.put(HIDE_ADDITIONAL_TOOLTIP, Unit.INSTANCE);
+        if (this.hideFlag != 0) {
+            if (this.hasItemFlag(ItemFlag.HIDE_ADDITIONAL_TOOLTIP)) {
+                itemTag.put(CraftMetaItem.HIDE_ADDITIONAL_TOOLTIP, Unit.INSTANCE);
             }
         }
 
-        applyEnchantments(enchantments, itemTag, ENCHANTMENTS, ItemFlag.HIDE_ENCHANTS);
-        applyModifiers(attributeModifiers, itemTag);
+        this.applyEnchantments(this.enchantments, itemTag, CraftMetaItem.ENCHANTMENTS, ItemFlag.HIDE_ENCHANTS);
+        this.applyModifiers(this.attributeModifiers, itemTag);
 
-        if (hasRepairCost()) {
-            itemTag.put(REPAIR, repairCost);
+        if (this.hasRepairCost()) {
+            itemTag.put(CraftMetaItem.REPAIR, this.repairCost);
         }
 
-        if (isHideTooltip()) {
-            itemTag.put(HIDE_TOOLTIP, Unit.INSTANCE);
+        if (this.isHideTooltip()) {
+            itemTag.put(CraftMetaItem.HIDE_TOOLTIP, Unit.INSTANCE);
         }
 
-        if (hasTooltipStyle()) {
-            itemTag.put(TOOLTIP_STYLE, CraftNamespacedKey.toMinecraft(getTooltipStyle()));
+        if (this.hasTooltipStyle()) {
+            itemTag.put(CraftMetaItem.TOOLTIP_STYLE, CraftNamespacedKey.toMinecraft(this.getTooltipStyle()));
         }
 
-        if (hasItemModel()) {
-            itemTag.put(ITEM_MODEL, CraftNamespacedKey.toMinecraft(getItemModel()));
+        if (this.hasItemModel()) {
+            itemTag.put(CraftMetaItem.ITEM_MODEL, CraftNamespacedKey.toMinecraft(this.getItemModel()));
         }
 
-        if (isUnbreakable()) {
-            itemTag.put(UNBREAKABLE, new Unbreakable(!hasItemFlag(ItemFlag.HIDE_UNBREAKABLE)));
+        if (this.isUnbreakable()) {
+            itemTag.put(CraftMetaItem.UNBREAKABLE, new Unbreakable(!this.hasItemFlag(ItemFlag.HIDE_UNBREAKABLE)));
         }
 
-        if (hasEnchantmentGlintOverride()) {
-            itemTag.put(ENCHANTMENT_GLINT_OVERRIDE, getEnchantmentGlintOverride());
+        if (this.hasEnchantmentGlintOverride()) {
+            itemTag.put(CraftMetaItem.ENCHANTMENT_GLINT_OVERRIDE, this.getEnchantmentGlintOverride());
         }
 
-        if (isGlider()) {
-            itemTag.put(GLIDER, Unit.INSTANCE);
+        if (this.isGlider()) {
+            itemTag.put(CraftMetaItem.GLIDER, Unit.INSTANCE);
         }
 
-        if (hasDamageResistant()) {
-            itemTag.put(DAMAGE_RESISTANT, new DamageResistant(damageResistant));
+        if (this.hasDamageResistant()) {
+            itemTag.put(CraftMetaItem.DAMAGE_RESISTANT, new DamageResistant(this.damageResistant));
         }
 
-        if (hasMaxStackSize()) {
-            itemTag.put(MAX_STACK_SIZE, maxStackSize);
+        if (this.hasMaxStackSize()) {
+            itemTag.put(CraftMetaItem.MAX_STACK_SIZE, this.maxStackSize);
         }
 
-        if (hasRarity()) {
-            itemTag.put(RARITY, EnumItemRarity.valueOf(rarity.name()));
+        if (this.hasRarity()) {
+            itemTag.put(CraftMetaItem.RARITY, Rarity.valueOf(this.rarity.name()));
         }
 
-        if (hasUseRemainder()) {
-            itemTag.put(USE_REMAINDER, new UseRemainder(CraftItemStack.asNMSCopy(useRemainder)));
+        if (this.hasUseRemainder()) {
+            itemTag.put(CraftMetaItem.USE_REMAINDER, new UseRemainder(CraftItemStack.asNMSCopy(this.useRemainder)));
         }
 
-        if (hasUseCooldown()) {
-            itemTag.put(USE_COOLDOWN, useCooldown.getHandle());
+        if (this.hasUseCooldown()) {
+            itemTag.put(CraftMetaItem.USE_COOLDOWN, this.useCooldown.getHandle());
         }
 
-        if (hasFood()) {
-            itemTag.put(FOOD, food.getHandle());
+        if (this.hasFood()) {
+            itemTag.put(CraftMetaItem.FOOD, this.food.getHandle());
         }
 
-        if (hasTool()) {
-            itemTag.put(TOOL, tool.getHandle());
+        if (this.hasTool()) {
+            itemTag.put(CraftMetaItem.TOOL, this.tool.getHandle());
         }
 
-        if (hasEquippable()) {
-            itemTag.put(EQUIPPABLE, equippable.getHandle());
+        if (this.hasEquippable()) {
+            itemTag.put(CraftMetaItem.EQUIPPABLE, this.equippable.getHandle());
         }
 
-        if (hasJukeboxPlayable()) {
-            itemTag.put(JUKEBOX_PLAYABLE, jukebox.getHandle());
+        if (this.hasJukeboxPlayable()) {
+            itemTag.put(CraftMetaItem.JUKEBOX_PLAYABLE, this.jukebox.getHandle());
         }
 
-        if (hasDamage()) {
-            itemTag.put(DAMAGE, damage);
+        if (this.hasDamage()) {
+            itemTag.put(CraftMetaItem.DAMAGE, this.damage);
         }
 
-        if (hasMaxDamage()) {
-            itemTag.put(MAX_DAMAGE, maxDamage);
+        if (this.hasMaxDamage()) {
+            itemTag.put(CraftMetaItem.MAX_DAMAGE, this.maxDamage);
         }
 
-        for (Map.Entry<DataComponentType<?>, Optional<?>> e : unhandledTags.build().entrySet()) {
+        for (Map.Entry<DataComponentType<?>, Optional<?>> e : this.unhandledTags.build().entrySet()) {
             e.getValue().ifPresent((value) -> {
                 itemTag.builder.set((DataComponentType) e.getKey(), value);
             });
         }
 
-        for (DataComponentType<?> removed : removedTags) {
+        for (DataComponentType<?> removed : this.removedTags) {
             if (!itemTag.builder.isSet(removed)) {
                 itemTag.builder.remove(removed);
             }
         }
 
-        NBTTagCompound customTag = (this.customTag != null) ? this.customTag.copy() : null;
-        if (!persistentDataContainer.isEmpty()) {
-            NBTTagCompound bukkitCustomCompound = new NBTTagCompound();
-            Map<String, NBTBase> rawPublicMap = persistentDataContainer.getRaw();
+        CompoundTag customTag = (this.customTag != null) ? this.customTag.copy() : null;
+        if (!this.persistentDataContainer.isEmpty()) {
+            CompoundTag bukkitCustomCompound = new CompoundTag();
+            Map<String, net.minecraft.nbt.Tag> rawPublicMap = this.persistentDataContainer.getRaw();
 
-            for (Map.Entry<String, NBTBase> nbtBaseEntry : rawPublicMap.entrySet()) {
+            for (Map.Entry<String, net.minecraft.nbt.Tag> nbtBaseEntry : rawPublicMap.entrySet()) {
                 bukkitCustomCompound.put(nbtBaseEntry.getKey(), nbtBaseEntry.getValue());
             }
 
             if (customTag == null) {
-                customTag = new NBTTagCompound();
+                customTag = new CompoundTag();
             }
-            customTag.put(BUKKIT_CUSTOM_TAG.BUKKIT, bukkitCustomCompound);
+            customTag.put(CraftMetaItem.BUKKIT_CUSTOM_TAG.BUKKIT, bukkitCustomCompound);
         }
 
         if (customTag != null) {
-            itemTag.put(CUSTOM_DATA, CustomData.of(customTag));
+            itemTag.put(CraftMetaItem.CUSTOM_DATA, CustomData.of(customTag));
         }
     }
 
     void applyEnchantments(Map<Enchantment, Integer> enchantments, CraftMetaItem.Applicator tag, ItemMetaKeyType<ItemEnchantments> key, ItemFlag itemFlag) {
-        if (enchantments == null && !hasItemFlag(itemFlag)) {
+        if (enchantments == null && !this.hasItemFlag(itemFlag)) {
             return;
         }
 
-        ItemEnchantments.a list = new ItemEnchantments.a(ItemEnchantments.EMPTY);
+        ItemEnchantments.Mutable list = new ItemEnchantments.Mutable(ItemEnchantments.EMPTY);
 
         if (enchantments != null) {
             for (Map.Entry<Enchantment, Integer> entry : enchantments.entrySet()) {
@@ -1058,26 +1055,26 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
             }
         }
 
-        list.showInTooltip = !hasItemFlag(itemFlag);
+        list.showInTooltip = !this.hasItemFlag(itemFlag);
         tag.put(key, list.toImmutable());
     }
 
     void applyModifiers(Multimap<Attribute, AttributeModifier> modifiers, CraftMetaItem.Applicator tag) {
         if (modifiers == null || modifiers.isEmpty()) {
-            if (hasItemFlag(ItemFlag.HIDE_ATTRIBUTES)) {
-                tag.put(ATTRIBUTES, new ItemAttributeModifiers(Collections.emptyList(), false));
+            if (this.hasItemFlag(ItemFlag.HIDE_ATTRIBUTES)) {
+                tag.put(CraftMetaItem.ATTRIBUTES, new ItemAttributeModifiers(Collections.emptyList(), false));
             }
             return;
         }
 
-        ItemAttributeModifiers.a list = ItemAttributeModifiers.builder();
+        ItemAttributeModifiers.Builder list = ItemAttributeModifiers.builder();
         for (Map.Entry<Attribute, AttributeModifier> entry : modifiers.entries()) {
             if (entry.getKey() == null || entry.getValue() == null) {
                 continue;
             }
             net.minecraft.world.entity.ai.attributes.AttributeModifier nmsModifier = CraftAttributeInstance.convert(entry.getValue());
 
-            Holder<AttributeBase> name = CraftAttribute.bukkitToMinecraftHolder(entry.getKey());
+            Holder<net.minecraft.world.entity.ai.attributes.Attribute> name = CraftAttribute.bukkitToMinecraftHolder(entry.getKey());
             if (name == null) {
                 continue;
             }
@@ -1085,7 +1082,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
             EquipmentSlotGroup group = CraftEquipmentSlot.getNMSGroup(entry.getValue().getSlotGroup());
             list.add(name, nmsModifier, group);
         }
-        tag.put(ATTRIBUTES, list.build().withTooltip(!hasItemFlag(ItemFlag.HIDE_ATTRIBUTES)));
+        tag.put(CraftMetaItem.ATTRIBUTES, list.build().withTooltip(!this.hasItemFlag(ItemFlag.HIDE_ATTRIBUTES)));
     }
 
     boolean applicableTo(Material type) {
@@ -1093,22 +1090,22 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
             return false;
         }
 
-        if (getClass() == CraftMetaItem.class) {
+        if (this.getClass() == CraftMetaItem.class) {
             return true;
         }
 
         // We assume that the corresponding bukkit interface is always the first one
-        return type.asItemType().getItemMetaClass() == getClass().getInterfaces()[0];
+        return type.asItemType().getItemMetaClass() == this.getClass().getInterfaces()[0];
     }
 
     @Overridden
     boolean isEmpty() {
-        return !(hasDisplayName() || hasItemName() || hasLocalizedName() || hasEnchants() || (lore != null) || hasCustomModelData() || hasEnchantable() || hasBlockData() || hasRepairCost() || !unhandledTags.build().isEmpty() || !removedTags.isEmpty() || !persistentDataContainer.isEmpty() || hideFlag != 0 || isHideTooltip() || hasTooltipStyle() || hasItemModel() || isUnbreakable() || hasEnchantmentGlintOverride() || isGlider() || hasDamageResistant() || hasMaxStackSize() || hasRarity() || hasUseRemainder() || hasUseCooldown() || hasFood() || hasTool() || hasJukeboxPlayable() || hasEquippable() || hasDamage() || hasMaxDamage() || hasAttributeModifiers() || customTag != null);
+        return !(this.hasDisplayName() || this.hasItemName() || this.hasLocalizedName() || this.hasEnchants() || (this.lore != null) || this.hasCustomModelData() || this.hasEnchantable() || this.hasBlockData() || this.hasRepairCost() || !this.unhandledTags.build().isEmpty() || !this.removedTags.isEmpty() || !this.persistentDataContainer.isEmpty() || this.hideFlag != 0 || this.isHideTooltip() || this.hasTooltipStyle() || this.hasItemModel() || this.isUnbreakable() || this.hasEnchantmentGlintOverride() || this.isGlider() || this.hasDamageResistant() || this.hasMaxStackSize() || this.hasRarity() || this.hasUseRemainder() || this.hasUseCooldown() || this.hasFood() || this.hasTool() || this.hasJukeboxPlayable() || this.hasEquippable() || this.hasDamage() || this.hasMaxDamage() || this.hasAttributeModifiers() || this.customTag != null);
     }
 
     @Override
     public String getDisplayName() {
-        return CraftChatMessage.fromComponent(displayName);
+        return CraftChatMessage.fromComponent(this.displayName);
     }
 
     @Override
@@ -1118,12 +1115,12 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
     @Override
     public boolean hasDisplayName() {
-        return displayName != null;
+        return this.displayName != null;
     }
 
     @Override
     public String getItemName() {
-        return CraftChatMessage.fromComponent(itemName);
+        return CraftChatMessage.fromComponent(this.itemName);
     }
 
     @Override
@@ -1133,12 +1130,12 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
     @Override
     public boolean hasItemName() {
-        return itemName != null;
+        return this.itemName != null;
     }
 
     @Override
     public String getLocalizedName() {
-        return getDisplayName();
+        return this.getDisplayName();
     }
 
     @Override
@@ -1157,19 +1154,19 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
     @Override
     public boolean hasRepairCost() {
-        return repairCost > 0;
+        return this.repairCost > 0;
     }
 
     @Override
     public boolean hasEnchant(Enchantment ench) {
         Preconditions.checkArgument(ench != null, "Enchantment cannot be null");
-        return hasEnchants() && enchantments.containsKey(ench);
+        return this.hasEnchants() && this.enchantments.containsKey(ench);
     }
 
     @Override
     public int getEnchantLevel(Enchantment ench) {
         Preconditions.checkArgument(ench != null, "Enchantment cannot be null");
-        Integer level = hasEnchants() ? enchantments.get(ench) : null;
+        Integer level = this.hasEnchants() ? this.enchantments.get(ench) : null;
         if (level == null) {
             return 0;
         }
@@ -1178,18 +1175,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
     @Override
     public Map<Enchantment, Integer> getEnchants() {
-        return hasEnchants() ? ImmutableMap.copyOf(enchantments) : ImmutableMap.<Enchantment, Integer>of();
+        return this.hasEnchants() ? ImmutableMap.copyOf(this.enchantments) : ImmutableMap.<Enchantment, Integer>of();
     }
 
     @Override
     public boolean addEnchant(Enchantment ench, int level, boolean ignoreRestrictions) {
         Preconditions.checkArgument(ench != null, "Enchantment cannot be null");
-        if (enchantments == null) {
-            enchantments = new LinkedHashMap<Enchantment, Integer>(4);
+        if (this.enchantments == null) {
+            this.enchantments = new LinkedHashMap<Enchantment, Integer>(4);
         }
 
         if (ignoreRestrictions || level >= ench.getStartLevel() && level <= ench.getMaxLevel()) {
-            Integer old = enchantments.put(ench, level);
+            Integer old = this.enchantments.put(ench, level);
             return old == null || old != level;
         }
         return false;
@@ -1198,42 +1195,42 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
     @Override
     public boolean removeEnchant(Enchantment ench) {
         Preconditions.checkArgument(ench != null, "Enchantment cannot be null");
-        boolean enchantmentRemoved = hasEnchants() && enchantments.remove(ench) != null;
+        boolean enchantmentRemoved = this.hasEnchants() && this.enchantments.remove(ench) != null;
         // If we no longer have any enchantments, then clear enchantment tag
-        if (enchantmentRemoved && enchantments.isEmpty()) {
-            enchantments = null;
+        if (enchantmentRemoved && this.enchantments.isEmpty()) {
+            this.enchantments = null;
         }
         return enchantmentRemoved;
     }
 
     @Override
     public void removeEnchantments() {
-        if (hasEnchants()) {
-            enchantments.clear();
+        if (this.hasEnchants()) {
+            this.enchantments.clear();
         }
     }
 
     @Override
     public boolean hasEnchants() {
-        return !(enchantments == null || enchantments.isEmpty());
+        return !(this.enchantments == null || this.enchantments.isEmpty());
     }
 
     @Override
     public boolean hasConflictingEnchant(Enchantment ench) {
-        return checkConflictingEnchants(enchantments, ench);
+        return CraftMetaItem.checkConflictingEnchants(this.enchantments, ench);
     }
 
     @Override
     public void addItemFlags(ItemFlag... hideFlags) {
         for (ItemFlag f : hideFlags) {
-            this.hideFlag |= getBitModifier(f);
+            this.hideFlag |= this.getBitModifier(f);
         }
     }
 
     @Override
     public void removeItemFlags(ItemFlag... hideFlags) {
         for (ItemFlag f : hideFlags) {
-            this.hideFlag &= ~getBitModifier(f);
+            this.hideFlag &= ~this.getBitModifier(f);
         }
     }
 
@@ -1242,7 +1239,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
         Set<ItemFlag> currentFlags = EnumSet.noneOf(ItemFlag.class);
 
         for (ItemFlag f : ItemFlag.values()) {
-            if (hasItemFlag(f)) {
+            if (this.hasItemFlag(f)) {
                 currentFlags.add(f);
             }
         }
@@ -1252,7 +1249,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
     @Override
     public boolean hasItemFlag(ItemFlag flag) {
-        int bitModifier = getBitModifier(flag);
+        int bitModifier = this.getBitModifier(flag);
         return (this.hideFlag & bitModifier) == bitModifier;
     }
 
@@ -1271,24 +1268,24 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
             this.lore = null;
         } else {
             if (this.lore == null) {
-                this.lore = new ArrayList<IChatBaseComponent>(lore.size());
+                this.lore = new ArrayList<Component>(lore.size());
             } else {
                 this.lore.clear();
             }
-            safelyAdd(lore, this.lore, false);
+            CraftMetaItem.safelyAdd(lore, this.lore, false);
         }
     }
 
     @Override
     public boolean hasCustomModelData() {
-        return customModelData != null;
+        return this.customModelData != null;
     }
 
     @Override
     public int getCustomModelData() {
-        Preconditions.checkState(hasCustomModelData(), "We don't have CustomModelData! Check hasCustomModelData first!");
+        Preconditions.checkState(this.hasCustomModelData(), "We don't have CustomModelData! Check hasCustomModelData first!");
 
-        List<Float> floats = customModelData.getFloats();
+        List<Float> floats = this.customModelData.getFloats();
         Preconditions.checkState(!floats.isEmpty(), "No numeric custom model data");
         return floats.get(0).intValue();
     }
@@ -1310,13 +1307,13 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
     @Override
     public boolean hasEnchantable() {
-        return enchantableValue != null;
+        return this.enchantableValue != null;
     }
 
     @Override
     public int getEnchantable() {
-        Preconditions.checkState(hasEnchantable(), "We don't have Enchantable! Check hasEnchantable first!");
-        return enchantableValue;
+        Preconditions.checkState(this.hasEnchantable(), "We don't have Enchantable! Check hasEnchantable first!");
+        return this.enchantableValue;
     }
 
     @Override
@@ -1331,8 +1328,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
     @Override
     public BlockData getBlockData(Material material) {
-        IBlockData defaultData = CraftBlockType.bukkitToMinecraft(material).defaultBlockState();
-        return CraftBlockData.fromData((hasBlockData()) ? new BlockItemStateProperties(blockData).apply(defaultData) : defaultData);
+        BlockState defaultData = CraftBlockType.bukkitToMinecraft(material).defaultBlockState();
+        return CraftBlockData.fromData((this.hasBlockData()) ? new BlockItemStateProperties(this.blockData).apply(defaultData) : defaultData);
     }
 
     @Override
@@ -1342,12 +1339,12 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
     @Override
     public int getRepairCost() {
-        return repairCost;
+        return this.repairCost;
     }
 
     @Override
     public void setRepairCost(int cost) { // TODO: Does this have limits?
-        repairCost = cost;
+        this.repairCost = cost;
     }
 
     @Override
@@ -1392,7 +1389,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
     @Override
     public boolean isUnbreakable() {
-        return unbreakable;
+        return this.unbreakable;
     }
 
     @Override
@@ -1407,7 +1404,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
     @Override
     public Boolean getEnchantmentGlintOverride() {
-        Preconditions.checkState(hasEnchantmentGlintOverride(), "We don't have enchantment_glint_override! Check hasEnchantmentGlintOverride first!");
+        Preconditions.checkState(this.hasEnchantmentGlintOverride(), "We don't have enchantment_glint_override! Check hasEnchantmentGlintOverride first!");
         return this.enchantmentGlintOverride;
     }
 
@@ -1428,12 +1425,12 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
     @Override
     public boolean isFireResistant() {
-        return hasDamageResistant() && DamageTypeTags.IS_FIRE.equals(getDamageResistant());
+        return this.hasDamageResistant() && DamageTypeTags.IS_FIRE.equals(this.getDamageResistant());
     }
 
     @Override
     public void setFireResistant(boolean fireResistant) {
-        setDamageResistant(DamageTypeTags.IS_FIRE);
+        this.setDamageResistant(DamageTypeTags.IS_FIRE);
     }
 
     @Override
@@ -1443,7 +1440,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
     @Override
     public Tag<DamageType> getDamageResistant() {
-        return (hasDamageResistant()) ? Bukkit.getTag(DamageTypeTags.REGISTRY_DAMAGE_TYPES, CraftNamespacedKey.fromMinecraft(this.damageResistant.location()), DamageType.class) : null;
+        return (this.hasDamageResistant()) ? Bukkit.getTag(DamageTypeTags.REGISTRY_DAMAGE_TYPES, CraftNamespacedKey.fromMinecraft(this.damageResistant.location()), DamageType.class) : null;
     }
 
     @Override
@@ -1458,7 +1455,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
     @Override
     public int getMaxStackSize() {
-        Preconditions.checkState(hasMaxStackSize(), "We don't have max_stack_size! Check hasMaxStackSize first!");
+        Preconditions.checkState(this.hasMaxStackSize(), "We don't have max_stack_size! Check hasMaxStackSize first!");
         return this.maxStackSize;
     }
 
@@ -1476,7 +1473,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
     @Override
     public ItemRarity getRarity() {
-        Preconditions.checkState(hasRarity(), "We don't have rarity! Check hasRarity first!");
+        Preconditions.checkState(this.hasRarity(), "We don't have rarity! Check hasRarity first!");
         return this.rarity;
     }
 
@@ -1522,7 +1519,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
     @Override
     public FoodComponent getFood() {
-        return (this.hasFood()) ? new CraftFoodComponent(this.food) : new CraftFoodComponent(new FoodInfo(0, 0, false));
+        return (this.hasFood()) ? new CraftFoodComponent(this.food) : new CraftFoodComponent(new FoodProperties(0, 0, false));
     }
 
     @Override
@@ -1552,7 +1549,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
     @Override
     public EquippableComponent getEquippable() {
-        return (this.hasEquippable()) ? new CraftEquippableComponent(this.equippable) : new CraftEquippableComponent(Equippable.builder(EnumItemSlot.HEAD).build());
+        return (this.hasEquippable()) ? new CraftEquippableComponent(this.equippable) : new CraftEquippableComponent(Equippable.builder(net.minecraft.world.entity.EquipmentSlot.HEAD).build());
     }
 
     @Override
@@ -1577,25 +1574,25 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
     @Override
     public boolean hasAttributeModifiers() {
-        return attributeModifiers != null && !attributeModifiers.isEmpty();
+        return this.attributeModifiers != null && !this.attributeModifiers.isEmpty();
     }
 
     @Override
     public Multimap<Attribute, AttributeModifier> getAttributeModifiers() {
-        return hasAttributeModifiers() ? ImmutableMultimap.copyOf(attributeModifiers) : null;
+        return this.hasAttributeModifiers() ? ImmutableMultimap.copyOf(this.attributeModifiers) : null;
     }
 
     private void checkAttributeList() {
-        if (attributeModifiers == null) {
-            attributeModifiers = LinkedHashMultimap.create();
+        if (this.attributeModifiers == null) {
+            this.attributeModifiers = LinkedHashMultimap.create();
         }
     }
 
     @Override
     public Multimap<Attribute, AttributeModifier> getAttributeModifiers(@Nullable EquipmentSlot slot) {
-        checkAttributeList();
+        this.checkAttributeList();
         SetMultimap<Attribute, AttributeModifier> result = LinkedHashMultimap.create();
-        for (Map.Entry<Attribute, AttributeModifier> entry : attributeModifiers.entries()) {
+        for (Map.Entry<Attribute, AttributeModifier> entry : this.attributeModifiers.entries()) {
             if (entry.getValue().getSlot() == null || entry.getValue().getSlot() == slot) {
                 result.put(entry.getKey(), entry.getValue());
             }
@@ -1606,18 +1603,18 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
     @Override
     public Collection<AttributeModifier> getAttributeModifiers(@Nonnull Attribute attribute) {
         Preconditions.checkNotNull(attribute, "Attribute cannot be null");
-        return attributeModifiers.containsKey(attribute) ? ImmutableList.copyOf(attributeModifiers.get(attribute)) : null;
+        return this.attributeModifiers.containsKey(attribute) ? ImmutableList.copyOf(this.attributeModifiers.get(attribute)) : null;
     }
 
     @Override
     public boolean addAttributeModifier(@Nonnull Attribute attribute, @Nonnull AttributeModifier modifier) {
         Preconditions.checkNotNull(attribute, "Attribute cannot be null");
         Preconditions.checkNotNull(modifier, "AttributeModifier cannot be null");
-        checkAttributeList();
-        for (Map.Entry<Attribute, AttributeModifier> entry : attributeModifiers.entries()) {
+        this.checkAttributeList();
+        for (Map.Entry<Attribute, AttributeModifier> entry : this.attributeModifiers.entries()) {
             Preconditions.checkArgument(!entry.getValue().getKey().equals(modifier.getKey()), "Cannot register AttributeModifier. Modifier is already applied! %s", modifier);
         }
-        return attributeModifiers.put(attribute, modifier);
+        return this.attributeModifiers.put(attribute, modifier);
     }
 
     @Override
@@ -1627,7 +1624,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
             return;
         }
 
-        checkAttributeList();
+        this.checkAttributeList();
         this.attributeModifiers.clear();
 
         Iterator<Map.Entry<Attribute, AttributeModifier>> iterator = attributeModifiers.entries().iterator();
@@ -1645,15 +1642,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
     @Override
     public boolean removeAttributeModifier(@Nonnull Attribute attribute) {
         Preconditions.checkNotNull(attribute, "Attribute cannot be null");
-        checkAttributeList();
-        return !attributeModifiers.removeAll(attribute).isEmpty();
+        this.checkAttributeList();
+        return !this.attributeModifiers.removeAll(attribute).isEmpty();
     }
 
     @Override
     public boolean removeAttributeModifier(@Nullable EquipmentSlot slot) {
-        checkAttributeList();
+        this.checkAttributeList();
         int removed = 0;
-        Iterator<Map.Entry<Attribute, AttributeModifier>> iter = attributeModifiers.entries().iterator();
+        Iterator<Map.Entry<Attribute, AttributeModifier>> iter = this.attributeModifiers.entries().iterator();
 
         while (iter.hasNext()) {
             Map.Entry<Attribute, AttributeModifier> entry = iter.next();
@@ -1671,9 +1668,9 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
     public boolean removeAttributeModifier(@Nonnull Attribute attribute, @Nonnull AttributeModifier modifier) {
         Preconditions.checkNotNull(attribute, "Attribute cannot be null");
         Preconditions.checkNotNull(modifier, "AttributeModifier cannot be null");
-        checkAttributeList();
+        this.checkAttributeList();
         int removed = 0;
-        Iterator<Map.Entry<Attribute, AttributeModifier>> iter = attributeModifiers.entries().iterator();
+        Iterator<Map.Entry<Attribute, AttributeModifier>> iter = this.attributeModifiers.entries().iterator();
 
         while (iter.hasNext()) {
             Map.Entry<Attribute, AttributeModifier> entry = iter.next();
@@ -1694,21 +1691,21 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
     @Override
     public String getAsString() {
         CraftMetaItem.Applicator tag = new CraftMetaItem.Applicator();
-        applyToItem(tag);
+        this.applyToItem(tag);
         DataComponentPatch patch = tag.build();
-        NBTBase nbt = DataComponentPatch.CODEC.encodeStart(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(DynamicOpsNBT.INSTANCE), patch).getOrThrow();
+        net.minecraft.nbt.Tag nbt = DataComponentPatch.CODEC.encodeStart(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(NbtOps.INSTANCE), patch).getOrThrow();
         return nbt.toString();
     }
 
     @Override
     public String getAsComponentString() {
         CraftMetaItem.Applicator tag = new CraftMetaItem.Applicator();
-        applyToItem(tag);
+        this.applyToItem(tag);
         DataComponentPatch patch = tag.build();
 
-        IRegistryCustom registryAccess = CraftRegistry.getMinecraftRegistry();
-        DynamicOps<NBTBase> ops = registryAccess.createSerializationContext(DynamicOpsNBT.INSTANCE);
-        IRegistry<DataComponentType<?>> componentTypeRegistry = registryAccess.lookupOrThrow(Registries.DATA_COMPONENT_TYPE);
+        RegistryAccess registryAccess = CraftRegistry.getMinecraftRegistry();
+        DynamicOps<net.minecraft.nbt.Tag> ops = registryAccess.createSerializationContext(NbtOps.INSTANCE);
+        Registry<DataComponentType<?>> componentTypeRegistry = registryAccess.lookupOrThrow(Registries.DATA_COMPONENT_TYPE);
 
         StringJoiner componentString = new StringJoiner(",", "[", "]");
         for (Entry<DataComponentType<?>, Optional<?>> entry : patch.entrySet()) {
@@ -1717,7 +1714,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
             String componentKey = componentTypeRegistry.getResourceKey(componentType).orElseThrow().location().toString();
 
             if (componentValue.isPresent()) {
-                NBTBase componentValueAsNBT = (NBTBase) ((DataComponentType) componentType).codecOrThrow().encodeStart(ops, componentValue.get()).getOrThrow();
+                net.minecraft.nbt.Tag componentValueAsNBT = (net.minecraft.nbt.Tag) ((DataComponentType) componentType).codecOrThrow().encodeStart(ops, componentValue.get()).getOrThrow();
                 String componentValueAsNBTString = new SnbtPrinterTagVisitor("", 0, new ArrayList<>()).visit(componentValueAsNBT);
                 componentString.add(componentKey + "=" + componentValueAsNBTString);
             } else {
@@ -1757,12 +1754,12 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
     @Override
     public boolean hasDamage() {
-        return damage > 0;
+        return this.damage > 0;
     }
 
     @Override
     public int getDamage() {
-        return damage;
+        return this.damage;
     }
 
     @Override
@@ -1777,7 +1774,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
     @Override
     public int getMaxDamage() {
-        Preconditions.checkState(hasMaxDamage(), "We don't have max_damage! Check hasMaxDamage first!");
+        Preconditions.checkState(this.hasMaxDamage(), "We don't have max_damage! Check hasMaxDamage first!");
         return this.maxDamage;
     }
 
@@ -1815,7 +1812,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
                 && (this.hasEnchantable() ? that.hasEnchantable() && this.enchantableValue.equals(that.enchantableValue) : !that.hasEnchantable())
                 && (this.hasBlockData() ? that.hasBlockData() && this.blockData.equals(that.blockData) : !that.hasBlockData())
                 && (this.hasRepairCost() ? that.hasRepairCost() && this.repairCost == that.repairCost : !that.hasRepairCost())
-                && (this.hasAttributeModifiers() ? that.hasAttributeModifiers() && compareModifiers(this.attributeModifiers, that.attributeModifiers) : !that.hasAttributeModifiers())
+                && (this.hasAttributeModifiers() ? that.hasAttributeModifiers() && CraftMetaItem.compareModifiers(this.attributeModifiers, that.attributeModifiers) : !that.hasAttributeModifiers())
                 && (this.unhandledTags.equals(that.unhandledTags))
                 && (this.removedTags.equals(that.removedTags))
                 && (Objects.equals(this.customTag, that.customTag))
@@ -1853,44 +1850,44 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
     @Override
     public final int hashCode() {
-        return applyHash();
+        return this.applyHash();
     }
 
     @Overridden
     int applyHash() {
         int hash = 3;
-        hash = 61 * hash + (hasDisplayName() ? this.displayName.hashCode() : 0);
-        hash = 61 * hash + (hasItemName() ? this.itemName.hashCode() : 0);
-        hash = 61 * hash + ((lore != null) ? this.lore.hashCode() : 0);
-        hash = 61 * hash + (hasCustomModelData() ? this.customModelData.hashCode() : 0);
-        hash = 61 * hash + (hasEnchantable() ? this.enchantableValue.hashCode() : 0);
-        hash = 61 * hash + (hasBlockData() ? this.blockData.hashCode() : 0);
-        hash = 61 * hash + (hasEnchants() ? this.enchantments.hashCode() : 0);
-        hash = 61 * hash + (hasRepairCost() ? this.repairCost : 0);
-        hash = 61 * hash + unhandledTags.hashCode();
-        hash = 61 * hash + removedTags.hashCode();
-        hash = 61 * hash + ((customTag != null) ? this.customTag.hashCode() : 0);
-        hash = 61 * hash + (!persistentDataContainer.isEmpty() ? persistentDataContainer.hashCode() : 0);
-        hash = 61 * hash + hideFlag;
-        hash = 61 * hash + (isHideTooltip() ? 1231 : 1237);
-        hash = 61 * hash + (hasTooltipStyle() ? this.tooltipStyle.hashCode() : 0);
-        hash = 61 * hash + (hasItemModel() ? this.itemModel.hashCode() : 0);
-        hash = 61 * hash + (isUnbreakable() ? 1231 : 1237);
-        hash = 61 * hash + (hasEnchantmentGlintOverride() ? this.enchantmentGlintOverride.hashCode() : 0);
-        hash = 61 * hash + (isGlider() ? 1231 : 1237);
-        hash = 61 * hash + (hasDamageResistant() ? this.damageResistant.hashCode() : 0);
-        hash = 61 * hash + (hasMaxStackSize() ? this.maxStackSize.hashCode() : 0);
-        hash = 61 * hash + (hasRarity() ? this.rarity.hashCode() : 0);
-        hash = 61 * hash + (hasUseRemainder() ? this.useRemainder.hashCode() : 0);
-        hash = 61 * hash + (hasUseCooldown() ? this.useCooldown.hashCode() : 0);
-        hash = 61 * hash + (hasFood() ? this.food.hashCode() : 0);
-        hash = 61 * hash + (hasTool() ? this.tool.hashCode() : 0);
-        hash = 61 * hash + (hasJukeboxPlayable() ? this.jukebox.hashCode() : 0);
-        hash = 61 * hash + (hasEquippable() ? this.equippable.hashCode() : 0);
-        hash = 61 * hash + (hasDamage() ? this.damage : 0);
-        hash = 61 * hash + (hasMaxDamage() ? 1231 : 1237);
-        hash = 61 * hash + (hasAttributeModifiers() ? this.attributeModifiers.hashCode() : 0);
-        hash = 61 * hash + version;
+        hash = 61 * hash + (this.hasDisplayName() ? this.displayName.hashCode() : 0);
+        hash = 61 * hash + (this.hasItemName() ? this.itemName.hashCode() : 0);
+        hash = 61 * hash + ((this.lore != null) ? this.lore.hashCode() : 0);
+        hash = 61 * hash + (this.hasCustomModelData() ? this.customModelData.hashCode() : 0);
+        hash = 61 * hash + (this.hasEnchantable() ? this.enchantableValue.hashCode() : 0);
+        hash = 61 * hash + (this.hasBlockData() ? this.blockData.hashCode() : 0);
+        hash = 61 * hash + (this.hasEnchants() ? this.enchantments.hashCode() : 0);
+        hash = 61 * hash + (this.hasRepairCost() ? this.repairCost : 0);
+        hash = 61 * hash + this.unhandledTags.hashCode();
+        hash = 61 * hash + this.removedTags.hashCode();
+        hash = 61 * hash + ((this.customTag != null) ? this.customTag.hashCode() : 0);
+        hash = 61 * hash + (!this.persistentDataContainer.isEmpty() ? this.persistentDataContainer.hashCode() : 0);
+        hash = 61 * hash + this.hideFlag;
+        hash = 61 * hash + (this.isHideTooltip() ? 1231 : 1237);
+        hash = 61 * hash + (this.hasTooltipStyle() ? this.tooltipStyle.hashCode() : 0);
+        hash = 61 * hash + (this.hasItemModel() ? this.itemModel.hashCode() : 0);
+        hash = 61 * hash + (this.isUnbreakable() ? 1231 : 1237);
+        hash = 61 * hash + (this.hasEnchantmentGlintOverride() ? this.enchantmentGlintOverride.hashCode() : 0);
+        hash = 61 * hash + (this.isGlider() ? 1231 : 1237);
+        hash = 61 * hash + (this.hasDamageResistant() ? this.damageResistant.hashCode() : 0);
+        hash = 61 * hash + (this.hasMaxStackSize() ? this.maxStackSize.hashCode() : 0);
+        hash = 61 * hash + (this.hasRarity() ? this.rarity.hashCode() : 0);
+        hash = 61 * hash + (this.hasUseRemainder() ? this.useRemainder.hashCode() : 0);
+        hash = 61 * hash + (this.hasUseCooldown() ? this.useCooldown.hashCode() : 0);
+        hash = 61 * hash + (this.hasFood() ? this.food.hashCode() : 0);
+        hash = 61 * hash + (this.hasTool() ? this.tool.hashCode() : 0);
+        hash = 61 * hash + (this.hasJukeboxPlayable() ? this.jukebox.hashCode() : 0);
+        hash = 61 * hash + (this.hasEquippable() ? this.equippable.hashCode() : 0);
+        hash = 61 * hash + (this.hasDamage() ? this.damage : 0);
+        hash = 61 * hash + (this.hasMaxDamage() ? 1231 : 1237);
+        hash = 61 * hash + (this.hasAttributeModifiers() ? this.attributeModifiers.hashCode() : 0);
+        hash = 61 * hash + this.version;
         return hash;
     }
 
@@ -1900,10 +1897,10 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
         try {
             CraftMetaItem clone = (CraftMetaItem) super.clone();
             if (this.lore != null) {
-                clone.lore = new ArrayList<IChatBaseComponent>(this.lore);
+                clone.lore = new ArrayList<Component>(this.lore);
             }
             if (this.hasCustomModelData()) {
-                clone.customModelData = new CraftCustomModelDataComponent(customModelData);
+                clone.customModelData = new CraftCustomModelDataComponent(this.customModelData);
             }
             clone.enchantableValue = this.enchantableValue;
             clone.blockData = this.blockData;
@@ -1917,34 +1914,34 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
                 clone.customTag = this.customTag.copy();
             }
             clone.removedTags = Sets.newHashSet(this.removedTags);
-            clone.persistentDataContainer = new CraftPersistentDataContainer(this.persistentDataContainer.getRaw(), DATA_TYPE_REGISTRY);
+            clone.persistentDataContainer = new CraftPersistentDataContainer(this.persistentDataContainer.getRaw(), CraftMetaItem.DATA_TYPE_REGISTRY);
             clone.hideFlag = this.hideFlag;
             clone.hideTooltip = this.hideTooltip;
             clone.tooltipStyle = this.tooltipStyle;
             clone.itemModel = this.itemModel;
             clone.unbreakable = this.unbreakable;
             clone.enchantmentGlintOverride = this.enchantmentGlintOverride;
-            clone.glider = glider;
-            clone.damageResistant = damageResistant;
-            clone.maxStackSize = maxStackSize;
-            clone.rarity = rarity;
+            clone.glider = this.glider;
+            clone.damageResistant = this.damageResistant;
+            clone.maxStackSize = this.maxStackSize;
+            clone.rarity = this.rarity;
             if (this.hasUseRemainder()) {
-                clone.useRemainder = useRemainder.clone();
+                clone.useRemainder = this.useRemainder.clone();
             }
             if (this.hasUseCooldown()) {
-                clone.useCooldown = new CraftUseCooldownComponent(useCooldown);
+                clone.useCooldown = new CraftUseCooldownComponent(this.useCooldown);
             }
             if (this.hasFood()) {
-                clone.food = new CraftFoodComponent(food);
+                clone.food = new CraftFoodComponent(this.food);
             }
             if (this.hasTool()) {
-                clone.tool = new CraftToolComponent(tool);
+                clone.tool = new CraftToolComponent(this.tool);
             }
             if (this.hasEquippable()) {
-                clone.equippable = new CraftEquippableComponent(equippable);
+                clone.equippable = new CraftEquippableComponent(this.equippable);
             }
             if (this.hasJukeboxPlayable()) {
-                clone.jukebox = new CraftJukeboxComponent(jukebox);
+                clone.jukebox = new CraftJukeboxComponent(this.jukebox);
             }
             clone.damage = this.damage;
             clone.maxDamage = this.maxDamage;
@@ -1958,146 +1955,146 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
     @Override
     public final Map<String, Object> serialize() {
         ImmutableMap.Builder<String, Object> map = ImmutableMap.builder();
-        map.put(SerializableMeta.TYPE_FIELD, SerializableMeta.classMap.get(getClass()));
-        serialize(map);
+        map.put(SerializableMeta.TYPE_FIELD, SerializableMeta.classMap.get(this.getClass()));
+        this.serialize(map);
         return map.build();
     }
 
     @Overridden
     ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
-        if (hasDisplayName()) {
-            builder.put(NAME.BUKKIT, CraftChatMessage.toJSON(displayName));
+        if (this.hasDisplayName()) {
+            builder.put(CraftMetaItem.NAME.BUKKIT, CraftChatMessage.toJSON(this.displayName));
         }
 
-        if (hasItemName()) {
-            builder.put(ITEM_NAME.BUKKIT, CraftChatMessage.toJSON(itemName));
+        if (this.hasItemName()) {
+            builder.put(CraftMetaItem.ITEM_NAME.BUKKIT, CraftChatMessage.toJSON(this.itemName));
         }
 
-        if (hasLore()) {
+        if (this.hasLore()) {
             // SPIGOT-7625: Convert lore to json before serializing it
             List<String> jsonLore = new ArrayList<>();
 
-            for (IChatBaseComponent component : lore) {
+            for (Component component : this.lore) {
                 jsonLore.add(CraftChatMessage.toJSON(component));
             }
 
-            builder.put(LORE.BUKKIT, jsonLore);
+            builder.put(CraftMetaItem.LORE.BUKKIT, jsonLore);
         }
 
-        if (hasCustomModelData()) {
-            builder.put(CUSTOM_MODEL_DATA.BUKKIT, customModelData);
+        if (this.hasCustomModelData()) {
+            builder.put(CraftMetaItem.CUSTOM_MODEL_DATA.BUKKIT, this.customModelData);
         }
-        if (hasEnchantable()) {
-            builder.put(ENCHANTABLE.BUKKIT, enchantableValue);
+        if (this.hasEnchantable()) {
+            builder.put(CraftMetaItem.ENCHANTABLE.BUKKIT, this.enchantableValue);
         }
-        if (hasBlockData()) {
-            builder.put(BLOCK_DATA.BUKKIT, blockData);
+        if (this.hasBlockData()) {
+            builder.put(CraftMetaItem.BLOCK_DATA.BUKKIT, this.blockData);
         }
 
-        serializeEnchantments(enchantments, builder, ENCHANTMENTS);
-        serializeModifiers(attributeModifiers, builder, ATTRIBUTES);
+        CraftMetaItem.serializeEnchantments(this.enchantments, builder, CraftMetaItem.ENCHANTMENTS);
+        CraftMetaItem.serializeModifiers(this.attributeModifiers, builder, CraftMetaItem.ATTRIBUTES);
 
-        if (hasRepairCost()) {
-            builder.put(REPAIR.BUKKIT, repairCost);
+        if (this.hasRepairCost()) {
+            builder.put(CraftMetaItem.REPAIR.BUKKIT, this.repairCost);
         }
 
         List<String> hideFlags = new ArrayList<String>();
-        for (ItemFlag hideFlagEnum : getItemFlags()) {
+        for (ItemFlag hideFlagEnum : this.getItemFlags()) {
             hideFlags.add(CraftItemFlag.bukkitToString(hideFlagEnum));
         }
         if (!hideFlags.isEmpty()) {
-            builder.put(HIDEFLAGS.BUKKIT, hideFlags);
+            builder.put(CraftMetaItem.HIDEFLAGS.BUKKIT, hideFlags);
         }
 
-        if (isHideTooltip()) {
-            builder.put(HIDE_TOOLTIP.BUKKIT, hideTooltip);
+        if (this.isHideTooltip()) {
+            builder.put(CraftMetaItem.HIDE_TOOLTIP.BUKKIT, this.hideTooltip);
         }
 
-        if (hasTooltipStyle()) {
-            builder.put(TOOLTIP_STYLE.BUKKIT, tooltipStyle.toString());
+        if (this.hasTooltipStyle()) {
+            builder.put(CraftMetaItem.TOOLTIP_STYLE.BUKKIT, this.tooltipStyle.toString());
         }
 
-        if (hasItemModel()) {
-            builder.put(ITEM_MODEL.BUKKIT, itemModel.toString());
+        if (this.hasItemModel()) {
+            builder.put(CraftMetaItem.ITEM_MODEL.BUKKIT, this.itemModel.toString());
         }
 
-        if (isUnbreakable()) {
-            builder.put(UNBREAKABLE.BUKKIT, unbreakable);
+        if (this.isUnbreakable()) {
+            builder.put(CraftMetaItem.UNBREAKABLE.BUKKIT, this.unbreakable);
         }
 
-        if (hasEnchantmentGlintOverride()) {
-            builder.put(ENCHANTMENT_GLINT_OVERRIDE.BUKKIT, enchantmentGlintOverride);
+        if (this.hasEnchantmentGlintOverride()) {
+            builder.put(CraftMetaItem.ENCHANTMENT_GLINT_OVERRIDE.BUKKIT, this.enchantmentGlintOverride);
         }
 
-        if (isGlider()) {
-            builder.put(GLIDER.BUKKIT, glider);
+        if (this.isGlider()) {
+            builder.put(CraftMetaItem.GLIDER.BUKKIT, this.glider);
         }
 
-        if (hasDamageResistant()) {
-            builder.put(DAMAGE_RESISTANT.BUKKIT, damageResistant.location().toString());
+        if (this.hasDamageResistant()) {
+            builder.put(CraftMetaItem.DAMAGE_RESISTANT.BUKKIT, this.damageResistant.location().toString());
         }
 
-        if (hasMaxStackSize()) {
-            builder.put(MAX_STACK_SIZE.BUKKIT, maxStackSize);
+        if (this.hasMaxStackSize()) {
+            builder.put(CraftMetaItem.MAX_STACK_SIZE.BUKKIT, this.maxStackSize);
         }
 
-        if (hasRarity()) {
-            builder.put(RARITY.BUKKIT, rarity.name());
+        if (this.hasRarity()) {
+            builder.put(CraftMetaItem.RARITY.BUKKIT, this.rarity.name());
         }
 
-        if (hasUseRemainder()) {
-            builder.put(USE_REMAINDER.BUKKIT, useRemainder);
+        if (this.hasUseRemainder()) {
+            builder.put(CraftMetaItem.USE_REMAINDER.BUKKIT, this.useRemainder);
         }
 
-        if (hasUseCooldown()) {
-            builder.put(USE_COOLDOWN.BUKKIT, useCooldown);
+        if (this.hasUseCooldown()) {
+            builder.put(CraftMetaItem.USE_COOLDOWN.BUKKIT, this.useCooldown);
         }
 
-        if (hasFood()) {
-            builder.put(FOOD.BUKKIT, food);
+        if (this.hasFood()) {
+            builder.put(CraftMetaItem.FOOD.BUKKIT, this.food);
         }
 
-        if (hasTool()) {
-            builder.put(TOOL.BUKKIT, tool);
+        if (this.hasTool()) {
+            builder.put(CraftMetaItem.TOOL.BUKKIT, this.tool);
         }
 
-        if (hasEquippable()) {
-            builder.put(EQUIPPABLE.BUKKIT, equippable);
+        if (this.hasEquippable()) {
+            builder.put(CraftMetaItem.EQUIPPABLE.BUKKIT, this.equippable);
         }
 
-        if (hasJukeboxPlayable()) {
-            builder.put(JUKEBOX_PLAYABLE.BUKKIT, jukebox);
+        if (this.hasJukeboxPlayable()) {
+            builder.put(CraftMetaItem.JUKEBOX_PLAYABLE.BUKKIT, this.jukebox);
         }
 
-        if (hasDamage()) {
-            builder.put(DAMAGE.BUKKIT, damage);
+        if (this.hasDamage()) {
+            builder.put(CraftMetaItem.DAMAGE.BUKKIT, this.damage);
         }
 
-        if (hasMaxDamage()) {
-            builder.put(MAX_DAMAGE.BUKKIT, maxDamage);
+        if (this.hasMaxDamage()) {
+            builder.put(CraftMetaItem.MAX_DAMAGE.BUKKIT, this.maxDamage);
         }
 
-        final Map<String, NBTBase> internalTags = new HashMap<String, NBTBase>();
-        serializeInternal(internalTags);
+        final Map<String, net.minecraft.nbt.Tag> internalTags = new HashMap<String, net.minecraft.nbt.Tag>();
+        this.serializeInternal(internalTags);
         if (!internalTags.isEmpty()) {
-            NBTTagCompound internal = new NBTTagCompound();
-            for (Map.Entry<String, NBTBase> e : internalTags.entrySet()) {
+            CompoundTag internal = new CompoundTag();
+            for (Map.Entry<String, net.minecraft.nbt.Tag> e : internalTags.entrySet()) {
                 internal.put(e.getKey(), e.getValue());
             }
             try {
                 ByteArrayOutputStream buf = new ByteArrayOutputStream();
-                NBTCompressedStreamTools.writeCompressed(internal, buf);
+                NbtIo.writeCompressed(internal, buf);
                 builder.put("internal", Base64.getEncoder().encodeToString(buf.toByteArray()));
             } catch (IOException ex) {
                 Logger.getLogger(CraftMetaItem.class.getName()).log(Level.SEVERE, null, ex);
             }
         }
 
-        if (!unhandledTags.isEmpty()) {
-            NBTBase unhandled = DataComponentPatch.CODEC.encodeStart(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(DynamicOpsNBT.INSTANCE), unhandledTags.build()).getOrThrow(IllegalStateException::new);
+        if (!this.unhandledTags.isEmpty()) {
+            net.minecraft.nbt.Tag unhandled = DataComponentPatch.CODEC.encodeStart(MinecraftServer.getDefaultRegistryAccess().createSerializationContext(NbtOps.INSTANCE), this.unhandledTags.build()).getOrThrow(IllegalStateException::new);
             try {
                 ByteArrayOutputStream buf = new ByteArrayOutputStream();
-                NBTCompressedStreamTools.writeCompressed((NBTTagCompound) unhandled, buf);
+                NbtIo.writeCompressed((CompoundTag) unhandled, buf);
                 builder.put("unhandled", Base64.getEncoder().encodeToString(buf.toByteArray()));
             } catch (IOException ex) {
                 Logger.getLogger(CraftMetaItem.class.getName()).log(Level.SEVERE, null, ex);
@@ -2105,8 +2102,8 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
         }
 
         if (!this.removedTags.isEmpty()) {
-            IRegistryCustom registryAccess = CraftRegistry.getMinecraftRegistry();
-            IRegistry<DataComponentType<?>> componentTypeRegistry = registryAccess.lookupOrThrow(Registries.DATA_COMPONENT_TYPE);
+            RegistryAccess registryAccess = CraftRegistry.getMinecraftRegistry();
+            Registry<DataComponentType<?>> componentTypeRegistry = registryAccess.lookupOrThrow(Registries.DATA_COMPONENT_TYPE);
 
             List<String> removedTags = new ArrayList<>();
             for (DataComponentType<?> removed : this.removedTags) {
@@ -2118,14 +2115,14 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
             builder.put("removed", removedTags);
         }
 
-        if (!persistentDataContainer.isEmpty()) { // Store custom tags, wrapped in their compound
-            builder.put(BUKKIT_CUSTOM_TAG.BUKKIT, persistentDataContainer.serialize());
+        if (!this.persistentDataContainer.isEmpty()) { // Store custom tags, wrapped in their compound
+            builder.put(CraftMetaItem.BUKKIT_CUSTOM_TAG.BUKKIT, this.persistentDataContainer.serialize());
         }
 
-        if (customTag != null) {
+        if (this.customTag != null) {
             try {
                 ByteArrayOutputStream buf = new ByteArrayOutputStream();
-                NBTCompressedStreamTools.writeCompressed(customTag, buf);
+                NbtIo.writeCompressed(this.customTag, buf);
                 builder.put("custom", Base64.getEncoder().encodeToString(buf.toByteArray()));
             } catch (IOException ex) {
                 Logger.getLogger(CraftMetaItem.class.getName()).log(Level.SEVERE, null, ex);
@@ -2135,7 +2132,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
         return builder;
     }
 
-    void serializeInternal(final Map<String, NBTBase> unhandledTags) {
+    void serializeInternal(final Map<String, net.minecraft.nbt.Tag> unhandledTags) {
     }
 
     static void serializeEnchantments(Map<Enchantment, Integer> enchantments, ImmutableMap.Builder<String, Object> builder, ItemMetaKey key) {
@@ -2170,7 +2167,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
         builder.put(key.BUKKIT, mods);
     }
 
-    static void safelyAdd(Iterable<?> addFrom, Collection<IChatBaseComponent> addTo, boolean possiblyJsonInput) {
+    static void safelyAdd(Iterable<?> addFrom, Collection<Component> addTo, boolean possiblyJsonInput) {
         if (addFrom == null) {
             return;
         }
@@ -2184,15 +2181,15 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
                     throw new IllegalArgumentException(addFrom + " cannot contain non-string " + object.getClass().getName());
                 }
 
-                addTo.add(IChatBaseComponent.empty());
+                addTo.add(Component.empty());
             } else {
                 String entry = object.toString();
-                IChatBaseComponent component = (possiblyJsonInput) ? CraftChatMessage.fromJSONOrString(entry) : CraftChatMessage.fromStringOrNull(entry);
+                Component component = (possiblyJsonInput) ? CraftChatMessage.fromJSONOrString(entry) : CraftChatMessage.fromStringOrNull(entry);
 
                 if (component != null) {
                     addTo.add(component);
                 } else {
-                    addTo.add(IChatBaseComponent.empty());
+                    addTo.add(Component.empty());
                 }
             }
         }
@@ -2214,11 +2211,11 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
 
     @Override
     public final String toString() {
-        return SerializableMeta.classMap.get(getClass()) + "_META:" + serialize(); // TODO: cry
+        return SerializableMeta.classMap.get(this.getClass()) + "_META:" + this.serialize(); // TODO: cry
     }
 
     public int getVersion() {
-        return version;
+        return this.version;
     }
 
     @Override
@@ -2227,37 +2224,37 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
     }
 
     public static Set<DataComponentType> getHandledTags() {
-        synchronized (HANDLED_TAGS) {
-            if (HANDLED_TAGS.isEmpty()) {
-                HANDLED_TAGS.addAll(Arrays.asList(
-                        NAME.TYPE,
-                        ITEM_NAME.TYPE,
-                        LORE.TYPE,
-                        CUSTOM_MODEL_DATA.TYPE,
-                        ENCHANTABLE.TYPE,
-                        BLOCK_DATA.TYPE,
-                        REPAIR.TYPE,
-                        ENCHANTMENTS.TYPE,
-                        HIDE_ADDITIONAL_TOOLTIP.TYPE,
-                        HIDE_TOOLTIP.TYPE,
-                        TOOLTIP_STYLE.TYPE,
-                        ITEM_MODEL.TYPE,
-                        UNBREAKABLE.TYPE,
-                        ENCHANTMENT_GLINT_OVERRIDE.TYPE,
-                        GLIDER.TYPE,
-                        DAMAGE_RESISTANT.TYPE,
-                        MAX_STACK_SIZE.TYPE,
-                        RARITY.TYPE,
-                        USE_REMAINDER.TYPE,
-                        USE_COOLDOWN.TYPE,
-                        FOOD.TYPE,
-                        TOOL.TYPE,
-                        EQUIPPABLE.TYPE,
-                        JUKEBOX_PLAYABLE.TYPE,
-                        DAMAGE.TYPE,
-                        MAX_DAMAGE.TYPE,
-                        CUSTOM_DATA.TYPE,
-                        ATTRIBUTES.TYPE,
+        synchronized (CraftMetaItem.HANDLED_TAGS) {
+            if (CraftMetaItem.HANDLED_TAGS.isEmpty()) {
+                CraftMetaItem.HANDLED_TAGS.addAll(Arrays.asList(
+                        CraftMetaItem.NAME.TYPE,
+                        CraftMetaItem.ITEM_NAME.TYPE,
+                        CraftMetaItem.LORE.TYPE,
+                        CraftMetaItem.CUSTOM_MODEL_DATA.TYPE,
+                        CraftMetaItem.ENCHANTABLE.TYPE,
+                        CraftMetaItem.BLOCK_DATA.TYPE,
+                        CraftMetaItem.REPAIR.TYPE,
+                        CraftMetaItem.ENCHANTMENTS.TYPE,
+                        CraftMetaItem.HIDE_ADDITIONAL_TOOLTIP.TYPE,
+                        CraftMetaItem.HIDE_TOOLTIP.TYPE,
+                        CraftMetaItem.TOOLTIP_STYLE.TYPE,
+                        CraftMetaItem.ITEM_MODEL.TYPE,
+                        CraftMetaItem.UNBREAKABLE.TYPE,
+                        CraftMetaItem.ENCHANTMENT_GLINT_OVERRIDE.TYPE,
+                        CraftMetaItem.GLIDER.TYPE,
+                        CraftMetaItem.DAMAGE_RESISTANT.TYPE,
+                        CraftMetaItem.MAX_STACK_SIZE.TYPE,
+                        CraftMetaItem.RARITY.TYPE,
+                        CraftMetaItem.USE_REMAINDER.TYPE,
+                        CraftMetaItem.USE_COOLDOWN.TYPE,
+                        CraftMetaItem.FOOD.TYPE,
+                        CraftMetaItem.TOOL.TYPE,
+                        CraftMetaItem.EQUIPPABLE.TYPE,
+                        CraftMetaItem.JUKEBOX_PLAYABLE.TYPE,
+                        CraftMetaItem.DAMAGE.TYPE,
+                        CraftMetaItem.MAX_DAMAGE.TYPE,
+                        CraftMetaItem.CUSTOM_DATA.TYPE,
+                        CraftMetaItem.ATTRIBUTES.TYPE,
                         CraftMetaArmor.TRIM.TYPE,
                         CraftMetaArmorStand.ENTITY_TAG.TYPE,
                         CraftMetaBanner.PATTERNS.TYPE,
@@ -2290,7 +2287,7 @@ class CraftMetaItem implements ItemMeta, Damageable, Repairable, BlockDataMeta {
                         CraftMetaOminousBottle.OMINOUS_BOTTLE_AMPLIFIER.TYPE
                 ));
             }
-            return HANDLED_TAGS;
+            return CraftMetaItem.HANDLED_TAGS;
         }
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java
index 334f809c92..68c0a6d5e0 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaKnowledgeBook.java
@@ -7,9 +7,9 @@ import java.util.List;
 import java.util.Map;
 import net.minecraft.core.component.DataComponentPatch;
 import net.minecraft.core.component.DataComponents;
-import net.minecraft.resources.MinecraftKey;
 import net.minecraft.resources.ResourceKey;
-import net.minecraft.world.item.crafting.IRecipe;
+import net.minecraft.resources.ResourceLocation;
+import net.minecraft.world.item.crafting.Recipe;
 import org.bukkit.NamespacedKey;
 import org.bukkit.configuration.serialization.DelegateDeserialization;
 import org.bukkit.craftbukkit.util.CraftNamespacedKey;
@@ -18,7 +18,7 @@ import org.bukkit.inventory.meta.KnowledgeBookMeta;
 @DelegateDeserialization(SerializableMeta.class)
 public class CraftMetaKnowledgeBook extends CraftMetaItem implements KnowledgeBookMeta {
 
-    static final ItemMetaKeyType<List<ResourceKey<IRecipe<?>>>> BOOK_RECIPES = new ItemMetaKeyType<>(DataComponents.RECIPES, "Recipes");
+    static final ItemMetaKeyType<List<ResourceKey<Recipe<?>>>> BOOK_RECIPES = new ItemMetaKeyType<>(DataComponents.RECIPES, "Recipes");
     static final int MAX_RECIPES = Short.MAX_VALUE;
 
     protected List<NamespacedKey> recipes = new ArrayList<NamespacedKey>();
@@ -35,11 +35,11 @@ public class CraftMetaKnowledgeBook extends CraftMetaItem implements KnowledgeBo
     CraftMetaKnowledgeBook(DataComponentPatch tag) {
         super(tag);
 
-        getOrEmpty(tag, BOOK_RECIPES).ifPresent((pages) -> {
+        getOrEmpty(tag, CraftMetaKnowledgeBook.BOOK_RECIPES).ifPresent((pages) -> {
             for (int i = 0; i < pages.size(); i++) {
-                MinecraftKey recipe = pages.get(i).location();
+                ResourceLocation recipe = pages.get(i).location();
 
-                addRecipe(CraftNamespacedKey.fromMinecraft(recipe));
+                this.addRecipe(CraftNamespacedKey.fromMinecraft(recipe));
             }
         });
     }
@@ -47,11 +47,11 @@ public class CraftMetaKnowledgeBook extends CraftMetaItem implements KnowledgeBo
     CraftMetaKnowledgeBook(Map<String, Object> map) {
         super(map);
 
-        Iterable<?> pages = SerializableMeta.getObject(Iterable.class, map, BOOK_RECIPES.BUKKIT, true);
+        Iterable<?> pages = SerializableMeta.getObject(Iterable.class, map, CraftMetaKnowledgeBook.BOOK_RECIPES.BUKKIT, true);
         if (pages != null) {
             for (Object page : pages) {
                 if (page instanceof String) {
-                    addRecipe(CraftNamespacedKey.fromString((String) page));
+                    this.addRecipe(CraftNamespacedKey.fromString((String) page));
                 }
             }
         }
@@ -61,34 +61,34 @@ public class CraftMetaKnowledgeBook extends CraftMetaItem implements KnowledgeBo
     void applyToItem(CraftMetaItem.Applicator itemData) {
         super.applyToItem(itemData);
 
-        if (hasRecipes()) {
-            List<ResourceKey<IRecipe<?>>> list = new ArrayList<>();
+        if (this.hasRecipes()) {
+            List<ResourceKey<Recipe<?>>> list = new ArrayList<>();
             for (NamespacedKey recipe : this.recipes) {
                 list.add(CraftRecipe.toMinecraft(recipe));
             }
-            itemData.put(BOOK_RECIPES, list);
+            itemData.put(CraftMetaKnowledgeBook.BOOK_RECIPES, list);
         }
     }
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && isBookEmpty();
+        return super.isEmpty() && this.isBookEmpty();
     }
 
     boolean isBookEmpty() {
-        return !(hasRecipes());
+        return !(this.hasRecipes());
     }
 
     @Override
     public boolean hasRecipes() {
-        return !recipes.isEmpty();
+        return !this.recipes.isEmpty();
     }
 
     @Override
     public void addRecipe(NamespacedKey... recipes) {
         for (NamespacedKey recipe : recipes) {
             if (recipe != null) {
-                if (this.recipes.size() >= MAX_RECIPES) {
+                if (this.recipes.size() >= CraftMetaKnowledgeBook.MAX_RECIPES) {
                     return;
                 }
 
@@ -99,21 +99,21 @@ public class CraftMetaKnowledgeBook extends CraftMetaItem implements KnowledgeBo
 
     @Override
     public List<NamespacedKey> getRecipes() {
-        return Collections.unmodifiableList(recipes);
+        return Collections.unmodifiableList(this.recipes);
     }
 
     @Override
     public void setRecipes(List<NamespacedKey> recipes) {
         this.recipes.clear();
         for (NamespacedKey recipe : recipes) {
-            addRecipe(recipe);
+            this.addRecipe(recipe);
         }
     }
 
     @Override
     public CraftMetaKnowledgeBook clone() {
         CraftMetaKnowledgeBook meta = (CraftMetaKnowledgeBook) super.clone();
-        meta.recipes = new ArrayList<NamespacedKey>(recipes);
+        meta.recipes = new ArrayList<NamespacedKey>(this.recipes);
         return meta;
     }
 
@@ -121,7 +121,7 @@ public class CraftMetaKnowledgeBook extends CraftMetaItem implements KnowledgeBo
     int applyHash() {
         final int original;
         int hash = original = super.applyHash();
-        if (hasRecipes()) {
+        if (this.hasRecipes()) {
             hash = 61 * hash + 17 * this.recipes.hashCode();
         }
         return original != hash ? CraftMetaKnowledgeBook.class.hashCode() ^ hash : hash;
@@ -135,26 +135,26 @@ public class CraftMetaKnowledgeBook extends CraftMetaItem implements KnowledgeBo
         if (meta instanceof CraftMetaKnowledgeBook) {
             CraftMetaKnowledgeBook that = (CraftMetaKnowledgeBook) meta;
 
-            return (hasRecipes() ? that.hasRecipes() && this.recipes.equals(that.recipes) : !that.hasRecipes());
+            return (this.hasRecipes() ? that.hasRecipes() && this.recipes.equals(that.recipes) : !that.hasRecipes());
         }
         return true;
     }
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaKnowledgeBook || isBookEmpty());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaKnowledgeBook || this.isBookEmpty());
     }
 
     @Override
     Builder<String, Object> serialize(Builder<String, Object> builder) {
         super.serialize(builder);
 
-        if (hasRecipes()) {
+        if (this.hasRecipes()) {
             List<String> recipesString = new ArrayList<String>();
-            for (NamespacedKey recipe : recipes) {
+            for (NamespacedKey recipe : this.recipes) {
                 recipesString.add(recipe.toString());
             }
-            builder.put(BOOK_RECIPES.BUKKIT, recipesString);
+            builder.put(CraftMetaKnowledgeBook.BOOK_RECIPES.BUKKIT, recipesString);
         }
 
         return builder;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java
index e4f521d913..75a8ad6990 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaLeatherArmor.java
@@ -22,32 +22,32 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta {
 
     CraftMetaLeatherArmor(CraftMetaItem meta) {
         super(meta);
-        readColor(this, meta);
+        CraftMetaLeatherArmor.readColor(this, meta);
     }
 
     CraftMetaLeatherArmor(DataComponentPatch tag) {
         super(tag);
-        readColor(this, tag);
+        CraftMetaLeatherArmor.readColor(this, tag);
     }
 
     CraftMetaLeatherArmor(Map<String, Object> map) {
         super(map);
-        readColor(this, map);
+        CraftMetaLeatherArmor.readColor(this, map);
     }
 
     @Override
     void applyToItem(CraftMetaItem.Applicator itemTag) {
         super.applyToItem(itemTag);
-        applyColor(this, itemTag);
+        CraftMetaLeatherArmor.applyColor(this, itemTag);
     }
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && isLeatherArmorEmpty();
+        return super.isEmpty() && this.isLeatherArmorEmpty();
     }
 
     boolean isLeatherArmorEmpty() {
-        return !(hasColor());
+        return !(this.hasColor());
     }
 
     @Override
@@ -66,7 +66,7 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta {
 
     @Override
     public Color getColor() {
-        return color;
+        return this.color;
     }
 
     @Override
@@ -75,14 +75,14 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta {
     }
 
     boolean hasColor() {
-        return hasColor(this);
+        return CraftMetaLeatherArmor.hasColor(this);
     }
 
     @Override
     Builder<String, Object> serialize(Builder<String, Object> builder) {
         super.serialize(builder);
 
-        serialize(this, builder);
+        CraftMetaLeatherArmor.serialize(this, builder);
 
         return builder;
     }
@@ -95,22 +95,22 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta {
         if (meta instanceof CraftMetaLeatherArmor) {
             CraftMetaLeatherArmor that = (CraftMetaLeatherArmor) meta;
 
-            return color.equals(that.color);
+            return this.color.equals(that.color);
         }
         return true;
     }
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaLeatherArmor || isLeatherArmorEmpty());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaLeatherArmor || this.isLeatherArmorEmpty());
     }
 
     @Override
     int applyHash() {
         final int original;
         int hash = original = super.applyHash();
-        if (hasColor()) {
-            hash ^= color.hashCode();
+        if (this.hasColor()) {
+            hash ^= this.color.hashCode();
         }
         return original != hash ? CraftMetaLeatherArmor.class.hashCode() ^ hash : hash;
     }
@@ -124,7 +124,7 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta {
     }
 
     static void readColor(LeatherArmorMeta meta, DataComponentPatch tag) {
-        getOrEmpty(tag, COLOR).ifPresent((dyedItemColor) -> {
+        getOrEmpty(tag, CraftMetaLeatherArmor.COLOR).ifPresent((dyedItemColor) -> {
             if (!dyedItemColor.showInTooltip()) {
                 meta.addItemFlags(ItemFlag.HIDE_DYE);
             }
@@ -138,7 +138,7 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta {
     }
 
     static void readColor(LeatherArmorMeta meta, Map<String, Object> map) {
-        meta.setColor(SerializableMeta.getObject(Color.class, map, COLOR.BUKKIT, true));
+        meta.setColor(SerializableMeta.getObject(Color.class, map, CraftMetaLeatherArmor.COLOR.BUKKIT, true));
     }
 
     static boolean hasColor(LeatherArmorMeta meta) {
@@ -146,14 +146,14 @@ class CraftMetaLeatherArmor extends CraftMetaItem implements LeatherArmorMeta {
     }
 
     static void applyColor(LeatherArmorMeta meta, CraftMetaItem.Applicator tag) {
-        if (hasColor(meta)) {
-            tag.put(COLOR, new DyedItemColor(meta.getColor().asRGB(), !meta.hasItemFlag(ItemFlag.HIDE_DYE)));
+        if (CraftMetaLeatherArmor.hasColor(meta)) {
+            tag.put(CraftMetaLeatherArmor.COLOR, new DyedItemColor(meta.getColor().asRGB(), !meta.hasItemFlag(ItemFlag.HIDE_DYE)));
         }
     }
 
     static void serialize(LeatherArmorMeta meta, Builder<String, Object> builder) {
-        if (hasColor(meta)) {
-            builder.put(COLOR.BUKKIT, meta.getColor());
+        if (CraftMetaLeatherArmor.hasColor(meta)) {
+            builder.put(CraftMetaLeatherArmor.COLOR.BUKKIT, meta.getColor());
         }
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java
index 4936b3bd69..08e18dcabb 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMap.java
@@ -28,7 +28,7 @@ class CraftMetaMap extends CraftMetaItem implements MapMeta {
     static final byte SCALING_FALSE = (byte) 2;
 
     private Integer mapId;
-    private byte scaling = SCALING_EMPTY;
+    private byte scaling = CraftMetaMap.SCALING_EMPTY;
     private Color color;
 
     CraftMetaMap(CraftMetaItem meta) {
@@ -47,17 +47,17 @@ class CraftMetaMap extends CraftMetaItem implements MapMeta {
     CraftMetaMap(DataComponentPatch tag) {
         super(tag);
 
-        getOrEmpty(tag, MAP_ID).ifPresent((mapId) -> {
+        getOrEmpty(tag, CraftMetaMap.MAP_ID).ifPresent((mapId) -> {
             this.mapId = mapId.id();
         });
 
-        getOrEmpty(tag, MAP_POST_PROCESSING).ifPresent((mapPostProcessing) -> {
-            this.scaling = (mapPostProcessing == MapPostProcessing.SCALE) ? SCALING_TRUE : SCALING_FALSE;
+        getOrEmpty(tag, CraftMetaMap.MAP_POST_PROCESSING).ifPresent((mapPostProcessing) -> {
+            this.scaling = (mapPostProcessing == MapPostProcessing.SCALE) ? CraftMetaMap.SCALING_TRUE : CraftMetaMap.SCALING_FALSE;
         });
 
-        getOrEmpty(tag, MAP_COLOR).ifPresent((mapColor) -> {
+        getOrEmpty(tag, CraftMetaMap.MAP_COLOR).ifPresent((mapColor) -> {
             try {
-                color = Color.fromRGB(mapColor.rgb());
+                this.color = Color.fromRGB(mapColor.rgb());
             } catch (IllegalArgumentException ex) {
                 // Invalid colour
             }
@@ -67,24 +67,24 @@ class CraftMetaMap extends CraftMetaItem implements MapMeta {
     CraftMetaMap(Map<String, Object> map) {
         super(map);
 
-        Integer id = SerializableMeta.getObject(Integer.class, map, MAP_ID.BUKKIT, true);
+        Integer id = SerializableMeta.getObject(Integer.class, map, CraftMetaMap.MAP_ID.BUKKIT, true);
         if (id != null) {
-            setMapId(id);
+            this.setMapId(id);
         }
 
-        Boolean scaling = SerializableMeta.getObject(Boolean.class, map, MAP_SCALING.BUKKIT, true);
+        Boolean scaling = SerializableMeta.getObject(Boolean.class, map, CraftMetaMap.MAP_SCALING.BUKKIT, true);
         if (scaling != null) {
-            setScaling(scaling);
+            this.setScaling(scaling);
         }
 
-        String locName = SerializableMeta.getString(map, MAP_LOC_NAME.BUKKIT, true);
+        String locName = SerializableMeta.getString(map, CraftMetaMap.MAP_LOC_NAME.BUKKIT, true);
         if (locName != null) {
-            setLocationName(locName);
+            this.setLocationName(locName);
         }
 
-        Color color = SerializableMeta.getObject(Color.class, map, MAP_COLOR.BUKKIT, true);
+        Color color = SerializableMeta.getObject(Color.class, map, CraftMetaMap.MAP_COLOR.BUKKIT, true);
         if (color != null) {
-            setColor(color);
+            this.setColor(color);
         }
     }
 
@@ -92,36 +92,36 @@ class CraftMetaMap extends CraftMetaItem implements MapMeta {
     void applyToItem(CraftMetaItem.Applicator tag) {
         super.applyToItem(tag);
 
-        if (hasMapId()) {
-            tag.put(MAP_ID, new MapId(getMapId()));
+        if (this.hasMapId()) {
+            tag.put(CraftMetaMap.MAP_ID, new MapId(this.getMapId()));
         }
 
-        if (hasScaling()) {
-            tag.put(MAP_POST_PROCESSING, (isScaling()) ? MapPostProcessing.SCALE : MapPostProcessing.LOCK);
+        if (this.hasScaling()) {
+            tag.put(CraftMetaMap.MAP_POST_PROCESSING, (this.isScaling()) ? MapPostProcessing.SCALE : MapPostProcessing.LOCK);
         }
 
-        if (hasColor()) {
-            tag.put(MAP_COLOR, new MapItemColor(color.asRGB()));
+        if (this.hasColor()) {
+            tag.put(CraftMetaMap.MAP_COLOR, new MapItemColor(this.color.asRGB()));
         }
     }
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && isMapEmpty();
+        return super.isEmpty() && this.isMapEmpty();
     }
 
     boolean isMapEmpty() {
-        return !(hasMapId() || hasScaling() | hasLocationName() || hasColor());
+        return !(this.hasMapId() || this.hasScaling() | this.hasLocationName() || this.hasColor());
     }
 
     @Override
     public boolean hasMapId() {
-        return mapId != null;
+        return this.mapId != null;
     }
 
     @Override
     public int getMapId() {
-        return mapId;
+        return this.mapId;
     }
 
     @Override
@@ -131,13 +131,13 @@ class CraftMetaMap extends CraftMetaItem implements MapMeta {
 
     @Override
     public boolean hasMapView() {
-        return mapId != null;
+        return this.mapId != null;
     }
 
     @Override
     public MapView getMapView() {
-        Preconditions.checkState(hasMapView(), "Item does not have map associated - check hasMapView() first!");
-        return Bukkit.getMap(mapId);
+        Preconditions.checkState(this.hasMapView(), "Item does not have map associated - check hasMapView() first!");
+        return Bukkit.getMap(this.mapId);
     }
 
     @Override
@@ -146,17 +146,17 @@ class CraftMetaMap extends CraftMetaItem implements MapMeta {
     }
 
     boolean hasScaling() {
-        return scaling != SCALING_EMPTY;
+        return this.scaling != CraftMetaMap.SCALING_EMPTY;
     }
 
     @Override
     public boolean isScaling() {
-        return scaling == SCALING_TRUE;
+        return this.scaling == CraftMetaMap.SCALING_TRUE;
     }
 
     @Override
     public void setScaling(boolean scaling) {
-        this.scaling = scaling ? SCALING_TRUE : SCALING_FALSE;
+        this.scaling = scaling ? CraftMetaMap.SCALING_TRUE : CraftMetaMap.SCALING_FALSE;
     }
 
     @Override
@@ -198,15 +198,15 @@ class CraftMetaMap extends CraftMetaItem implements MapMeta {
             CraftMetaMap that = (CraftMetaMap) meta;
 
             return (this.scaling == that.scaling)
-                    && (hasMapId() ? that.hasMapId() && this.mapId.equals(that.mapId) : !that.hasMapId())
-                    && (hasColor() ? that.hasColor() && this.color.equals(that.color) : !that.hasColor());
+                    && (this.hasMapId() ? that.hasMapId() && this.mapId.equals(that.mapId) : !that.hasMapId())
+                    && (this.hasColor() ? that.hasColor() && this.color.equals(that.color) : !that.hasColor());
         }
         return true;
     }
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaMap || isMapEmpty());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaMap || this.isMapEmpty());
     }
 
     @Override
@@ -214,14 +214,14 @@ class CraftMetaMap extends CraftMetaItem implements MapMeta {
         final int original;
         int hash = original = super.applyHash();
 
-        if (hasMapId()) {
-            hash = 61 * hash + mapId.hashCode();
+        if (this.hasMapId()) {
+            hash = 61 * hash + this.mapId.hashCode();
         }
-        if (hasScaling()) {
-            hash ^= 0x22222222 << (isScaling() ? 1 : -1);
+        if (this.hasScaling()) {
+            hash ^= 0x22222222 << (this.isScaling() ? 1 : -1);
         }
-        if (hasColor()) {
-            hash = 61 * hash + color.hashCode();
+        if (this.hasColor()) {
+            hash = 61 * hash + this.color.hashCode();
         }
 
         return original != hash ? CraftMetaMap.class.hashCode() ^ hash : hash;
@@ -237,16 +237,16 @@ class CraftMetaMap extends CraftMetaItem implements MapMeta {
     ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
         super.serialize(builder);
 
-        if (hasMapId()) {
-            builder.put(MAP_ID.BUKKIT, getMapId());
+        if (this.hasMapId()) {
+            builder.put(CraftMetaMap.MAP_ID.BUKKIT, this.getMapId());
         }
 
-        if (hasScaling()) {
-            builder.put(MAP_SCALING.BUKKIT, isScaling());
+        if (this.hasScaling()) {
+            builder.put(CraftMetaMap.MAP_SCALING.BUKKIT, this.isScaling());
         }
 
-        if (hasColor()) {
-            builder.put(MAP_COLOR.BUKKIT, getColor());
+        if (this.hasColor()) {
+            builder.put(CraftMetaMap.MAP_COLOR.BUKKIT, this.getColor());
         }
 
         return builder;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMusicInstrument.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMusicInstrument.java
index 1492081b48..478059eb3a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMusicInstrument.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaMusicInstrument.java
@@ -29,7 +29,7 @@ public class CraftMetaMusicInstrument extends CraftMetaItem implements MusicInst
     CraftMetaMusicInstrument(DataComponentPatch tag) {
         super(tag);
 
-        getOrEmpty(tag, GOAT_HORN_INSTRUMENT).ifPresent((instrument) -> {
+        getOrEmpty(tag, CraftMetaMusicInstrument.GOAT_HORN_INSTRUMENT).ifPresent((instrument) -> {
             this.instrument = CraftMusicInstrument.minecraftHolderToBukkit(instrument);
         });
     }
@@ -37,7 +37,7 @@ public class CraftMetaMusicInstrument extends CraftMetaItem implements MusicInst
     CraftMetaMusicInstrument(Map<String, Object> map) {
         super(map);
 
-        String instrumentString = SerializableMeta.getString(map, GOAT_HORN_INSTRUMENT.BUKKIT, true);
+        String instrumentString = SerializableMeta.getString(map, CraftMetaMusicInstrument.GOAT_HORN_INSTRUMENT.BUKKIT, true);
         if (instrumentString != null) {
             this.instrument = CraftMusicInstrument.stringToBukkit(instrumentString);
         }
@@ -47,8 +47,8 @@ public class CraftMetaMusicInstrument extends CraftMetaItem implements MusicInst
     void applyToItem(CraftMetaItem.Applicator tag) {
         super.applyToItem(tag);
 
-        if (instrument != null) {
-            tag.put(GOAT_HORN_INSTRUMENT, CraftMusicInstrument.bukkitToMinecraftHolder(instrument));
+        if (this.instrument != null) {
+            tag.put(CraftMetaMusicInstrument.GOAT_HORN_INSTRUMENT, CraftMusicInstrument.bukkitToMinecraftHolder(this.instrument));
         }
     }
 
@@ -66,16 +66,16 @@ public class CraftMetaMusicInstrument extends CraftMetaItem implements MusicInst
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaMusicInstrument || isInstrumentEmpty());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaMusicInstrument || this.isInstrumentEmpty());
     }
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && isInstrumentEmpty();
+        return super.isEmpty() && this.isInstrumentEmpty();
     }
 
     boolean isInstrumentEmpty() {
-        return instrument == null;
+        return this.instrument == null;
     }
 
     @Override
@@ -83,8 +83,8 @@ public class CraftMetaMusicInstrument extends CraftMetaItem implements MusicInst
         final int orginal;
         int hash = orginal = super.applyHash();
 
-        if (hasInstrument()) {
-            hash = 61 * hash + instrument.hashCode();
+        if (this.hasInstrument()) {
+            hash = 61 * hash + this.instrument.hashCode();
         }
 
         return orginal != hash ? CraftMetaMusicInstrument.class.hashCode() ^ hash : hash;
@@ -101,8 +101,8 @@ public class CraftMetaMusicInstrument extends CraftMetaItem implements MusicInst
     ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
         super.serialize(builder);
 
-        if (hasInstrument()) {
-            builder.put(GOAT_HORN_INSTRUMENT.BUKKIT, CraftMusicInstrument.bukkitToString(instrument));
+        if (this.hasInstrument()) {
+            builder.put(CraftMetaMusicInstrument.GOAT_HORN_INSTRUMENT.BUKKIT, CraftMusicInstrument.bukkitToString(this.instrument));
         }
 
         return builder;
@@ -110,11 +110,11 @@ public class CraftMetaMusicInstrument extends CraftMetaItem implements MusicInst
 
     @Override
     public MusicInstrument getInstrument() {
-        return instrument;
+        return this.instrument;
     }
 
     public boolean hasInstrument() {
-        return instrument != null;
+        return this.instrument != null;
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaOminousBottle.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaOminousBottle.java
index 182aa30034..ed272c7eb4 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaOminousBottle.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaOminousBottle.java
@@ -21,21 +21,21 @@ public class CraftMetaOminousBottle extends CraftMetaItem implements OminousBott
             return;
         }
         CraftMetaOminousBottle bottleMeta = (CraftMetaOminousBottle) meta;
-        ominousBottleAmplifier = bottleMeta.ominousBottleAmplifier;
+        this.ominousBottleAmplifier = bottleMeta.ominousBottleAmplifier;
     }
 
     CraftMetaOminousBottle(DataComponentPatch tag) {
         super(tag);
-        getOrEmpty(tag, OMINOUS_BOTTLE_AMPLIFIER).ifPresent((amplifier) -> {
-            ominousBottleAmplifier = amplifier.value();
+        getOrEmpty(tag, CraftMetaOminousBottle.OMINOUS_BOTTLE_AMPLIFIER).ifPresent((amplifier) -> {
+            this.ominousBottleAmplifier = amplifier.value();
         });
     }
 
     CraftMetaOminousBottle(Map<String, Object> map) {
         super(map);
-        Integer ominousBottleAmplifier = SerializableMeta.getObject(Integer.class, map, OMINOUS_BOTTLE_AMPLIFIER.BUKKIT, true);
+        Integer ominousBottleAmplifier = SerializableMeta.getObject(Integer.class, map, CraftMetaOminousBottle.OMINOUS_BOTTLE_AMPLIFIER.BUKKIT, true);
         if (ominousBottleAmplifier != null) {
-            setAmplifier(ominousBottleAmplifier);
+            this.setAmplifier(ominousBottleAmplifier);
         }
     }
 
@@ -43,18 +43,18 @@ public class CraftMetaOminousBottle extends CraftMetaItem implements OminousBott
     void applyToItem(CraftMetaItem.Applicator tag) {
         super.applyToItem(tag);
 
-        if (hasAmplifier()) {
-            tag.put(OMINOUS_BOTTLE_AMPLIFIER, new OminousBottleAmplifier(ominousBottleAmplifier));
+        if (this.hasAmplifier()) {
+            tag.put(CraftMetaOminousBottle.OMINOUS_BOTTLE_AMPLIFIER, new OminousBottleAmplifier(this.ominousBottleAmplifier));
         }
     }
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && isBottleEmpty();
+        return super.isEmpty() && this.isBottleEmpty();
     }
 
     boolean isBottleEmpty() {
-        return !(hasAmplifier());
+        return !(this.hasAmplifier());
     }
 
     @Override
@@ -65,12 +65,12 @@ public class CraftMetaOminousBottle extends CraftMetaItem implements OminousBott
 
     @Override
     public boolean hasAmplifier() {
-        return ominousBottleAmplifier != null;
+        return this.ominousBottleAmplifier != null;
     }
 
     @Override
     public int getAmplifier() {
-        return ominousBottleAmplifier;
+        return this.ominousBottleAmplifier;
     }
 
     @Override
@@ -83,8 +83,8 @@ public class CraftMetaOminousBottle extends CraftMetaItem implements OminousBott
     int applyHash() {
         final int original;
         int hash = original = super.applyHash();
-        if (hasAmplifier()) {
-            hash = 61 * hash + ominousBottleAmplifier.hashCode();
+        if (this.hasAmplifier()) {
+            hash = 61 * hash + this.ominousBottleAmplifier.hashCode();
         }
 
         return original != hash ? CraftMetaOminousBottle.class.hashCode() ^ hash : hash;
@@ -98,22 +98,22 @@ public class CraftMetaOminousBottle extends CraftMetaItem implements OminousBott
         if (meta instanceof CraftMetaOminousBottle) {
             CraftMetaOminousBottle that = (CraftMetaOminousBottle) meta;
 
-            return (hasAmplifier() ? that.hasAmplifier() && this.ominousBottleAmplifier.equals(that.ominousBottleAmplifier) : !that.hasAmplifier());
+            return (this.hasAmplifier() ? that.hasAmplifier() && this.ominousBottleAmplifier.equals(that.ominousBottleAmplifier) : !that.hasAmplifier());
         }
         return true;
     }
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaOminousBottle || isBottleEmpty());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaOminousBottle || this.isBottleEmpty());
     }
 
     @Override
     Builder<String, Object> serialize(Builder<String, Object> builder) {
         super.serialize(builder);
 
-        if (hasAmplifier()) {
-            builder.put(OMINOUS_BOTTLE_AMPLIFIER.BUKKIT, ominousBottleAmplifier);
+        if (this.hasAmplifier()) {
+            builder.put(CraftMetaOminousBottle.OMINOUS_BOTTLE_AMPLIFIER.BUKKIT, this.ominousBottleAmplifier);
         }
 
         return builder;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java
index 1aec60cbe8..533c600d63 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaPotion.java
@@ -12,9 +12,9 @@ import java.util.Optional;
 import net.minecraft.core.Holder;
 import net.minecraft.core.component.DataComponentPatch;
 import net.minecraft.core.component.DataComponents;
-import net.minecraft.world.effect.MobEffect;
+import net.minecraft.world.effect.MobEffectInstance;
+import net.minecraft.world.item.alchemy.Potion;
 import net.minecraft.world.item.alchemy.PotionContents;
-import net.minecraft.world.item.alchemy.PotionRegistry;
 import org.bukkit.Color;
 import org.bukkit.configuration.serialization.DelegateDeserialization;
 import org.bukkit.craftbukkit.potion.CraftPotionEffectType;
@@ -56,29 +56,29 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
 
     CraftMetaPotion(DataComponentPatch tag) {
         super(tag);
-        getOrEmpty(tag, POTION_CONTENTS).ifPresent((potionContents) -> {
+        getOrEmpty(tag, CraftMetaPotion.POTION_CONTENTS).ifPresent((potionContents) -> {
             potionContents.potion().ifPresent((potion) -> {
-                type = CraftPotionType.minecraftHolderToBukkit(potion);
+                this.type = CraftPotionType.minecraftHolderToBukkit(potion);
             });
 
             potionContents.customColor().ifPresent((customColor) -> {
                 try {
-                    color = Color.fromRGB(customColor);
+                    this.color = Color.fromRGB(customColor);
                 } catch (IllegalArgumentException ex) {
                     // Invalid colour
                 }
             });
 
             potionContents.customName().ifPresent((name) -> {
-                customName = name;
+                this.customName = name;
             });
 
-            List<MobEffect> list = potionContents.customEffects();
+            List<MobEffectInstance> list = potionContents.customEffects();
             int length = list.size();
-            customEffects = new ArrayList<>(length);
+            this.customEffects = new ArrayList<>(length);
 
             for (int i = 0; i < length; i++) {
-                MobEffect effect = list.get(i);
+                MobEffectInstance effect = list.get(i);
                 PotionEffectType type = CraftPotionEffectType.minecraftHolderToBukkit(effect.getEffect());
                 // SPIGOT-4047: Vanilla just disregards these
                 if (type == null) {
@@ -90,36 +90,36 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
                 boolean ambient = effect.isAmbient();
                 boolean particles = effect.isVisible();
                 boolean icon = effect.showIcon();
-                customEffects.add(new PotionEffect(type, duration, amp, ambient, particles, icon));
+                this.customEffects.add(new PotionEffect(type, duration, amp, ambient, particles, icon));
             }
         });
     }
 
     CraftMetaPotion(Map<String, Object> map) {
         super(map);
-        String typeString = SerializableMeta.getString(map, DEFAULT_POTION.BUKKIT, true);
+        String typeString = SerializableMeta.getString(map, CraftMetaPotion.DEFAULT_POTION.BUKKIT, true);
         if (typeString != null) {
-            type = CraftPotionType.stringToBukkit(typeString);
+            this.type = CraftPotionType.stringToBukkit(typeString);
         }
 
-        Color color = SerializableMeta.getObject(Color.class, map, POTION_COLOR.BUKKIT, true);
+        Color color = SerializableMeta.getObject(Color.class, map, CraftMetaPotion.POTION_COLOR.BUKKIT, true);
         if (color != null) {
-            setColor(color);
+            this.setColor(color);
         }
 
-        String name = SerializableMeta.getString(map, CUSTOM_NAME.BUKKIT, true);
+        String name = SerializableMeta.getString(map, CraftMetaPotion.CUSTOM_NAME.BUKKIT, true);
         if (name != null) {
-            setCustomName(name);
+            this.setCustomName(name);
         }
 
-        Iterable<?> rawEffectList = SerializableMeta.getObject(Iterable.class, map, POTION_EFFECTS.BUKKIT, true);
+        Iterable<?> rawEffectList = SerializableMeta.getObject(Iterable.class, map, CraftMetaPotion.POTION_EFFECTS.BUKKIT, true);
         if (rawEffectList == null) {
             return;
         }
 
         for (Object obj : rawEffectList) {
             Preconditions.checkArgument(obj instanceof PotionEffect, "Object (%s) in effect list is not valid", obj.getClass());
-            addCustomEffect((PotionEffect) obj, true);
+            this.addCustomEffect((PotionEffect) obj, true);
         }
     }
 
@@ -127,37 +127,37 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
     void applyToItem(CraftMetaItem.Applicator tag) {
         super.applyToItem(tag);
 
-        if (isPotionEmpty()) {
+        if (this.isPotionEmpty()) {
             return;
         }
 
-        Optional<Holder<PotionRegistry>> defaultPotion = (hasBasePotionType()) ? Optional.of(CraftPotionType.bukkitToMinecraftHolder(type)) : Optional.empty();
-        Optional<Integer> potionColor = (hasColor()) ? Optional.of(this.color.asRGB()) : Optional.empty();
+        Optional<Holder<Potion>> defaultPotion = (this.hasBasePotionType()) ? Optional.of(CraftPotionType.bukkitToMinecraftHolder(this.type)) : Optional.empty();
+        Optional<Integer> potionColor = (this.hasColor()) ? Optional.of(this.color.asRGB()) : Optional.empty();
         Optional<String> customName = Optional.ofNullable(this.customName);
 
-        List<MobEffect> effectList = new ArrayList<>();
-        if (customEffects != null) {
-            for (PotionEffect effect : customEffects) {
-                effectList.add(new MobEffect(CraftPotionEffectType.bukkitToMinecraftHolder(effect.getType()), effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles(), effect.hasIcon()));
+        List<MobEffectInstance> effectList = new ArrayList<>();
+        if (this.customEffects != null) {
+            for (PotionEffect effect : this.customEffects) {
+                effectList.add(new MobEffectInstance(CraftPotionEffectType.bukkitToMinecraftHolder(effect.getType()), effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles(), effect.hasIcon()));
             }
         }
 
-        tag.put(POTION_CONTENTS, new PotionContents(defaultPotion, potionColor, effectList, customName));
+        tag.put(CraftMetaPotion.POTION_CONTENTS, new PotionContents(defaultPotion, potionColor, effectList, customName));
     }
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && isPotionEmpty();
+        return super.isEmpty() && this.isPotionEmpty();
     }
 
     boolean isPotionEmpty() {
-        return (type == null) && !(hasCustomEffects() || hasColor() || hasCustomName());
+        return (this.type == null) && !(this.hasCustomEffects() || this.hasColor() || this.hasCustomName());
     }
 
     @Override
     public CraftMetaPotion clone() {
         CraftMetaPotion clone = (CraftMetaPotion) super.clone();
-        clone.type = type;
+        clone.type = this.type;
         if (this.customEffects != null) {
             clone.customEffects = new ArrayList<>(this.customEffects);
         }
@@ -166,38 +166,38 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
 
     @Override
     public void setBasePotionData(PotionData data) {
-        setBasePotionType(CraftPotionUtil.fromBukkit(data));
+        this.setBasePotionType(CraftPotionUtil.fromBukkit(data));
     }
 
     @Override
     public PotionData getBasePotionData() {
-        return CraftPotionUtil.toBukkit(getBasePotionType());
+        return CraftPotionUtil.toBukkit(this.getBasePotionType());
     }
 
     @Override
     public void setBasePotionType(PotionType potionType) {
-        type = potionType;
+        this.type = potionType;
     }
 
     @Override
     public PotionType getBasePotionType() {
-        return type;
+        return this.type;
     }
 
     @Override
     public boolean hasBasePotionType() {
-        return type != null;
+        return this.type != null;
     }
 
     @Override
     public boolean hasCustomEffects() {
-        return customEffects != null && !customEffects.isEmpty();
+        return this.customEffects != null && !this.customEffects.isEmpty();
     }
 
     @Override
     public List<PotionEffect> getCustomEffects() {
-        if (hasCustomEffects()) {
-            return ImmutableList.copyOf(customEffects);
+        if (this.hasCustomEffects()) {
+            return ImmutableList.copyOf(this.customEffects);
         }
         return ImmutableList.of();
     }
@@ -206,23 +206,23 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
     public boolean addCustomEffect(PotionEffect effect, boolean overwrite) {
         Preconditions.checkArgument(effect != null, "Potion effect cannot be null");
 
-        int index = indexOfEffect(effect.getType());
+        int index = this.indexOfEffect(effect.getType());
         if (index != -1) {
             if (overwrite) {
-                PotionEffect old = customEffects.get(index);
+                PotionEffect old = this.customEffects.get(index);
                 if (old.getAmplifier() == effect.getAmplifier() && old.getDuration() == effect.getDuration() && old.isAmbient() == effect.isAmbient()) {
                     return false;
                 }
-                customEffects.set(index, effect);
+                this.customEffects.set(index, effect);
                 return true;
             } else {
                 return false;
             }
         } else {
-            if (customEffects == null) {
-                customEffects = new ArrayList<>();
+            if (this.customEffects == null) {
+                this.customEffects = new ArrayList<>();
             }
-            customEffects.add(effect);
+            this.customEffects.add(effect);
             return true;
         }
     }
@@ -231,12 +231,12 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
     public boolean removeCustomEffect(PotionEffectType type) {
         Preconditions.checkArgument(type != null, "Potion effect type cannot be null");
 
-        if (!hasCustomEffects()) {
+        if (!this.hasCustomEffects()) {
             return false;
         }
 
         boolean changed = false;
-        Iterator<PotionEffect> iterator = customEffects.iterator();
+        Iterator<PotionEffect> iterator = this.customEffects.iterator();
         while (iterator.hasNext()) {
             PotionEffect effect = iterator.next();
             if (type.equals(effect.getType())) {
@@ -244,8 +244,8 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
                 changed = true;
             }
         }
-        if (customEffects.isEmpty()) {
-            customEffects = null;
+        if (this.customEffects.isEmpty()) {
+            this.customEffects = null;
         }
         return changed;
     }
@@ -253,30 +253,30 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
     @Override
     public boolean hasCustomEffect(PotionEffectType type) {
         Preconditions.checkArgument(type != null, "Potion effect type cannot be null");
-        return indexOfEffect(type) != -1;
+        return this.indexOfEffect(type) != -1;
     }
 
     @Override
     public boolean setMainEffect(PotionEffectType type) {
         Preconditions.checkArgument(type != null, "Potion effect type cannot be null");
-        int index = indexOfEffect(type);
+        int index = this.indexOfEffect(type);
         if (index == -1 || index == 0) {
             return false;
         }
 
-        PotionEffect old = customEffects.get(0);
-        customEffects.set(0, customEffects.get(index));
-        customEffects.set(index, old);
+        PotionEffect old = this.customEffects.get(0);
+        this.customEffects.set(0, this.customEffects.get(index));
+        this.customEffects.set(index, old);
         return true;
     }
 
     private int indexOfEffect(PotionEffectType type) {
-        if (!hasCustomEffects()) {
+        if (!this.hasCustomEffects()) {
             return -1;
         }
 
-        for (int i = 0; i < customEffects.size(); i++) {
-            if (customEffects.get(i).getType().equals(type)) {
+        for (int i = 0; i < this.customEffects.size(); i++) {
+            if (this.customEffects.get(i).getType().equals(type)) {
                 return i;
             }
         }
@@ -285,19 +285,19 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
 
     @Override
     public boolean clearCustomEffects() {
-        boolean changed = hasCustomEffects();
-        customEffects = null;
+        boolean changed = this.hasCustomEffects();
+        this.customEffects = null;
         return changed;
     }
 
     @Override
     public boolean hasColor() {
-        return color != null;
+        return this.color != null;
     }
 
     @Override
     public Color getColor() {
-        return color;
+        return this.color;
     }
 
     @Override
@@ -324,17 +324,17 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
     int applyHash() {
         final int original;
         int hash = original = super.applyHash();
-        if (type != null) {
-            hash = 73 * hash + type.hashCode();
+        if (this.type != null) {
+            hash = 73 * hash + this.type.hashCode();
         }
-        if (hasColor()) {
-            hash = 73 * hash + color.hashCode();
+        if (this.hasColor()) {
+            hash = 73 * hash + this.color.hashCode();
         }
-        if (hasCustomName()) {
-            hash = 73 * hash + customName.hashCode();
+        if (this.hasCustomName()) {
+            hash = 73 * hash + this.customName.hashCode();
         }
-        if (hasCustomEffects()) {
-            hash = 73 * hash + customEffects.hashCode();
+        if (this.hasCustomEffects()) {
+            hash = 73 * hash + this.customEffects.hashCode();
         }
         return original != hash ? CraftMetaPotion.class.hashCode() ^ hash : hash;
     }
@@ -347,7 +347,7 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
         if (meta instanceof CraftMetaPotion) {
             CraftMetaPotion that = (CraftMetaPotion) meta;
 
-            return Objects.equals(type, that.type)
+            return Objects.equals(this.type, that.type)
                     && (this.hasCustomEffects() ? that.hasCustomEffects() && this.customEffects.equals(that.customEffects) : !that.hasCustomEffects())
                     && (this.hasColor() ? that.hasColor() && this.color.equals(that.color) : !that.hasColor())
                     && (this.hasCustomName() ? that.hasCustomName() && this.customName.equals(that.customName) : !that.hasCustomName());
@@ -357,26 +357,26 @@ class CraftMetaPotion extends CraftMetaItem implements PotionMeta {
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaPotion || isPotionEmpty());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaPotion || this.isPotionEmpty());
     }
 
     @Override
     Builder<String, Object> serialize(Builder<String, Object> builder) {
         super.serialize(builder);
-        if (type != null) {
-            builder.put(DEFAULT_POTION.BUKKIT, CraftPotionType.bukkitToString(type));
+        if (this.type != null) {
+            builder.put(CraftMetaPotion.DEFAULT_POTION.BUKKIT, CraftPotionType.bukkitToString(this.type));
         }
 
-        if (hasColor()) {
-            builder.put(POTION_COLOR.BUKKIT, getColor());
+        if (this.hasColor()) {
+            builder.put(CraftMetaPotion.POTION_COLOR.BUKKIT, this.getColor());
         }
 
-        if (hasCustomName()) {
-            builder.put(CUSTOM_NAME.BUKKIT, getCustomName());
+        if (this.hasCustomName()) {
+            builder.put(CraftMetaPotion.CUSTOM_NAME.BUKKIT, this.getCustomName());
         }
 
-        if (hasCustomEffects()) {
-            builder.put(POTION_EFFECTS.BUKKIT, ImmutableList.copyOf(this.customEffects));
+        if (this.hasCustomEffects()) {
+            builder.put(CraftMetaPotion.POTION_EFFECTS.BUKKIT, ImmutableList.copyOf(this.customEffects));
         }
 
         return builder;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaShield.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaShield.java
index 64ffa1849f..3542c6e72f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaShield.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaShield.java
@@ -6,10 +6,9 @@ import com.google.common.collect.ImmutableMap;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Map;
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
 import net.minecraft.core.component.DataComponentPatch;
 import net.minecraft.core.component.DataComponents;
-import net.minecraft.world.item.EnumColor;
 import net.minecraft.world.level.block.entity.BannerPatternLayers;
 import org.bukkit.DyeColor;
 import org.bukkit.Material;
@@ -26,7 +25,7 @@ import org.bukkit.inventory.meta.ShieldMeta;
 @DelegateDeserialization(SerializableMeta.class)
 public class CraftMetaShield extends CraftMetaItem implements ShieldMeta, BlockStateMeta {
 
-    static final ItemMetaKeyType<EnumColor> BASE_COLOR = new ItemMetaKeyType<>(DataComponents.BASE_COLOR, "Base", "base-color");
+    static final ItemMetaKeyType<net.minecraft.world.item.DyeColor> BASE_COLOR = new ItemMetaKeyType<>(DataComponents.BASE_COLOR, "Base", "base-color");
 
     private Banner banner;
 
@@ -45,19 +44,19 @@ public class CraftMetaShield extends CraftMetaItem implements ShieldMeta, BlockS
     CraftMetaShield(DataComponentPatch tag) {
         super(tag);
 
-        getOrEmpty(tag, BASE_COLOR).ifPresent((color) -> {
-            banner = getBlockState(DyeColor.getByWoolData((byte) color.getId()));
+        getOrEmpty(tag, CraftMetaShield.BASE_COLOR).ifPresent((color) -> {
+            this.banner = CraftMetaShield.getBlockState(DyeColor.getByWoolData((byte) color.getId()));
         });
 
         getOrEmpty(tag, CraftMetaBanner.PATTERNS).ifPresent((entityTag) -> {
-            List<BannerPatternLayers.b> patterns = entityTag.layers();
+            List<BannerPatternLayers.Layer> patterns = entityTag.layers();
             for (int i = 0; i < Math.min(patterns.size(), 20); i++) {
-                BannerPatternLayers.b p = patterns.get(i);
+                BannerPatternLayers.Layer p = patterns.get(i);
                 DyeColor color = DyeColor.getByWoolData((byte) p.color().getId());
                 PatternType pattern = CraftPatternType.minecraftHolderToBukkit(p.pattern());
 
                 if (color != null && pattern != null) {
-                    addPattern(new Pattern(color, pattern));
+                    this.addPattern(new Pattern(color, pattern));
                 }
             }
         });
@@ -66,9 +65,9 @@ public class CraftMetaShield extends CraftMetaItem implements ShieldMeta, BlockS
     CraftMetaShield(Map<String, Object> map) {
         super(map);
 
-        String baseColor = SerializableMeta.getString(map, BASE_COLOR.BUKKIT, true);
+        String baseColor = SerializableMeta.getString(map, CraftMetaShield.BASE_COLOR.BUKKIT, true);
         if (baseColor != null) {
-            banner = getBlockState(DyeColor.valueOf(baseColor));
+            this.banner = CraftMetaShield.getBlockState(DyeColor.valueOf(baseColor));
         }
 
         Iterable<?> rawPatternList = SerializableMeta.getObject(Iterable.class, map, CraftMetaBanner.PATTERNS.BUKKIT, true);
@@ -78,7 +77,7 @@ public class CraftMetaShield extends CraftMetaItem implements ShieldMeta, BlockS
 
         for (Object obj : rawPatternList) {
             Preconditions.checkArgument(obj instanceof Pattern, "Object (%s) in pattern list is not valid", obj.getClass());
-            addPattern((Pattern) obj);
+            this.addPattern((Pattern) obj);
         }
     }
 
@@ -86,14 +85,14 @@ public class CraftMetaShield extends CraftMetaItem implements ShieldMeta, BlockS
     void applyToItem(CraftMetaItem.Applicator tag) {
         super.applyToItem(tag);
 
-        if (banner != null) {
-            tag.put(BASE_COLOR, EnumColor.byId(banner.getBaseColor().getWoolData()));
+        if (this.banner != null) {
+            tag.put(CraftMetaShield.BASE_COLOR, net.minecraft.world.item.DyeColor.byId(this.banner.getBaseColor().getWoolData()));
 
-            if (banner.numberOfPatterns() > 0) {
-                List<BannerPatternLayers.b> newPatterns = new ArrayList<>();
+            if (this.banner.numberOfPatterns() > 0) {
+                List<BannerPatternLayers.Layer> newPatterns = new ArrayList<>();
 
-                for (Pattern p : banner.getPatterns()) {
-                    newPatterns.add(new BannerPatternLayers.b(CraftPatternType.bukkitToMinecraftHolder(p.getPattern()), EnumColor.byId(p.getColor().getWoolData())));
+                for (Pattern p : this.banner.getPatterns()) {
+                    newPatterns.add(new BannerPatternLayers.Layer(CraftPatternType.bukkitToMinecraftHolder(p.getPattern()), net.minecraft.world.item.DyeColor.byId(p.getColor().getWoolData())));
                 }
 
                 tag.put(CraftMetaBanner.PATTERNS, new BannerPatternLayers(newPatterns));
@@ -103,94 +102,94 @@ public class CraftMetaShield extends CraftMetaItem implements ShieldMeta, BlockS
 
     @Override
     public List<Pattern> getPatterns() {
-        if (banner == null) {
+        if (this.banner == null) {
             return new ArrayList<>();
         }
 
-        return banner.getPatterns();
+        return this.banner.getPatterns();
     }
 
     @Override
     public void setPatterns(List<Pattern> patterns) {
-        if (banner == null) {
+        if (this.banner == null) {
             if (patterns.isEmpty()) {
                 return;
             }
 
-            banner = getBlockState(null);
+            this.banner = CraftMetaShield.getBlockState(null);
         }
 
-        banner.setPatterns(patterns);
+        this.banner.setPatterns(patterns);
     }
 
     @Override
     public void addPattern(Pattern pattern) {
-        if (banner == null) {
-            banner = getBlockState(null);
+        if (this.banner == null) {
+            this.banner = CraftMetaShield.getBlockState(null);
         }
 
-        banner.addPattern(pattern);
+        this.banner.addPattern(pattern);
     }
 
     @Override
     public Pattern getPattern(int i) {
-        if (banner == null) {
+        if (this.banner == null) {
             throw new IndexOutOfBoundsException(i);
         }
 
-        return banner.getPattern(i);
+        return this.banner.getPattern(i);
     }
 
     @Override
     public Pattern removePattern(int i) {
-        if (banner == null) {
+        if (this.banner == null) {
             throw new IndexOutOfBoundsException(i);
         }
 
-        return banner.removePattern(i);
+        return this.banner.removePattern(i);
     }
 
     @Override
     public void setPattern(int i, Pattern pattern) {
-        if (banner == null) {
+        if (this.banner == null) {
             throw new IndexOutOfBoundsException(i);
         }
 
-        banner.setPattern(i, pattern);
+        this.banner.setPattern(i, pattern);
     }
 
     @Override
     public int numberOfPatterns() {
-        if (banner == null) {
+        if (this.banner == null) {
             return 0;
         }
 
-        return banner.numberOfPatterns();
+        return this.banner.numberOfPatterns();
     }
 
     @Override
     public DyeColor getBaseColor() {
-        if (banner == null) {
+        if (this.banner == null) {
             return null;
         }
 
-        return banner.getBaseColor();
+        return this.banner.getBaseColor();
     }
 
     @Override
     public void setBaseColor(DyeColor baseColor) {
         if (baseColor == null) {
-            if (banner.numberOfPatterns() > 0) {
-                banner.setBaseColor(DyeColor.WHITE);
+            if (this.banner.numberOfPatterns() > 0) {
+                this.banner.setBaseColor(DyeColor.WHITE);
             } else {
-                banner = null;
+                this.banner = null;
             }
         } else {
-            if (banner == null) {
-                banner = getBlockState(baseColor);
+            if (this.banner == null) {
+                this.banner = CraftMetaShield.getBlockState(baseColor);
             }
 
-            banner.setBaseColor(baseColor);
+            this.banner.setBaseColor(baseColor);
         }
     }
 
@@ -198,11 +197,11 @@ public class CraftMetaShield extends CraftMetaItem implements ShieldMeta, BlockS
     ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
         super.serialize(builder);
 
-        if (banner != null) {
-            builder.put(BASE_COLOR.BUKKIT, banner.getBaseColor().toString());
+        if (this.banner != null) {
+            builder.put(CraftMetaShield.BASE_COLOR.BUKKIT, this.banner.getBaseColor().toString());
 
-            if (banner.numberOfPatterns() > 0) {
-                builder.put(CraftMetaBanner.PATTERNS.BUKKIT, banner.getPatterns());
+            if (this.banner.numberOfPatterns() > 0) {
+                builder.put(CraftMetaBanner.PATTERNS.BUKKIT, this.banner.getPatterns());
             }
         }
 
@@ -213,8 +212,8 @@ public class CraftMetaShield extends CraftMetaItem implements ShieldMeta, BlockS
     int applyHash() {
         final int original;
         int hash = original = super.applyHash();
-        if (banner != null) {
-            hash = 61 * hash + banner.hashCode();
+        if (this.banner != null) {
+            hash = 61 * hash + this.banner.hashCode();
         }
         return original != hash ? CraftMetaShield.class.hashCode() ^ hash : hash;
     }
@@ -242,12 +241,12 @@ public class CraftMetaShield extends CraftMetaItem implements ShieldMeta, BlockS
 
     @Override
     public boolean hasBlockState() {
-        return banner != null;
+        return this.banner != null;
     }
 
     @Override
     public BlockState getBlockState() {
-        return (banner != null) ? banner.copy() : getBlockState(null);
+        return (this.banner != null) ? this.banner.copy() : CraftMetaShield.getBlockState(null);
     }
 
     @Override
@@ -259,8 +258,8 @@ public class CraftMetaShield extends CraftMetaItem implements ShieldMeta, BlockS
     }
 
     private static Banner getBlockState(DyeColor color) {
-        BlockPosition pos = BlockPosition.ZERO;
-        Material stateMaterial = shieldToBannerHack(color);
+        BlockPos pos = BlockPos.ZERO;
+        Material stateMaterial = CraftMetaShield.shieldToBannerHack(color);
 
         return (Banner) CraftBlockStates.getBlockState(pos, stateMaterial, null);
     }
@@ -269,7 +268,7 @@ public class CraftMetaShield extends CraftMetaItem implements ShieldMeta, BlockS
     public CraftMetaShield clone() {
         CraftMetaShield meta = (CraftMetaShield) super.clone();
         if (this.banner != null) {
-            meta.banner = (Banner) banner.copy();
+            meta.banner = (Banner) this.banner.copy();
         }
         return meta;
     }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
index 65bb9730c8..43609c9934 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSkull.java
@@ -5,12 +5,12 @@ import com.mojang.authlib.GameProfile;
 import java.util.Map;
 import java.util.Objects;
 import java.util.UUID;
-import net.minecraft.SystemUtils;
+import net.minecraft.Util;
 import net.minecraft.core.component.DataComponentPatch;
 import net.minecraft.core.component.DataComponents;
-import net.minecraft.nbt.DynamicOpsNBT;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.resources.MinecraftKey;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.nbt.NbtOps;
+import net.minecraft.resources.ResourceLocation;
 import net.minecraft.world.item.component.ResolvableProfile;
 import org.bukkit.Bukkit;
 import org.bukkit.NamespacedKey;
@@ -33,11 +33,11 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
 
     @ItemMetaKey.Specific(ItemMetaKey.Specific.To.NBT)
     static final ItemMetaKey BLOCK_ENTITY_TAG = new ItemMetaKey("BlockEntityTag");
-    static final ItemMetaKeyType<MinecraftKey> NOTE_BLOCK_SOUND = new ItemMetaKeyType<>(DataComponents.NOTE_BLOCK_SOUND, "note_block_sound");
+    static final ItemMetaKeyType<ResourceLocation> NOTE_BLOCK_SOUND = new ItemMetaKeyType<>(DataComponents.NOTE_BLOCK_SOUND, "note_block_sound");
     static final int MAX_OWNER_LENGTH = 16;
 
     private ResolvableProfile profile;
-    private MinecraftKey noteBlockSound;
+    private ResourceLocation noteBlockSound;
 
     CraftMetaSkull(CraftMetaItem meta) {
         super(meta);
@@ -51,49 +51,49 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
     CraftMetaSkull(DataComponentPatch tag) {
         super(tag);
 
-        getOrEmpty(tag, SKULL_PROFILE).ifPresent(this::setProfile);
+        getOrEmpty(tag, CraftMetaSkull.SKULL_PROFILE).ifPresent(this::setProfile);
 
-        getOrEmpty(tag, NOTE_BLOCK_SOUND).ifPresent((minecraftKey) -> this.noteBlockSound = minecraftKey);
+        getOrEmpty(tag, CraftMetaSkull.NOTE_BLOCK_SOUND).ifPresent((minecraftKey) -> this.noteBlockSound = minecraftKey);
     }
 
     CraftMetaSkull(Map<String, Object> map) {
         super(map);
-        if (profile == null) {
-            Object object = map.get(SKULL_OWNER.BUKKIT);
+        if (this.profile == null) {
+            Object object = map.get(CraftMetaSkull.SKULL_OWNER.BUKKIT);
             if (object instanceof PlayerProfile playerProfile) {
-                setOwnerProfile(playerProfile);
+                this.setOwnerProfile(playerProfile);
             } else {
-                setOwner(SerializableMeta.getString(map, SKULL_OWNER.BUKKIT, true));
+                this.setOwner(SerializableMeta.getString(map, CraftMetaSkull.SKULL_OWNER.BUKKIT, true));
             }
         }
 
-        if (noteBlockSound == null) {
-            Object object = map.get(NOTE_BLOCK_SOUND.BUKKIT);
+        if (this.noteBlockSound == null) {
+            Object object = map.get(CraftMetaSkull.NOTE_BLOCK_SOUND.BUKKIT);
             if (object != null) {
-                setNoteBlockSound(NamespacedKey.fromString(object.toString()));
+                this.setNoteBlockSound(NamespacedKey.fromString(object.toString()));
             }
         }
     }
 
     @Override
-    void deserializeInternal(NBTTagCompound tag, Object context) {
+    void deserializeInternal(CompoundTag tag, Object context) {
         super.deserializeInternal(tag, context);
 
-        if (tag.contains(SKULL_PROFILE.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND)) {
-            NBTTagCompound skullTag = tag.getCompound(SKULL_PROFILE.NBT);
+        if (tag.contains(CraftMetaSkull.SKULL_PROFILE.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND)) {
+            CompoundTag skullTag = tag.getCompound(CraftMetaSkull.SKULL_PROFILE.NBT);
             // convert type of stored Id from String to UUID for backwards compatibility
             if (skullTag.contains("Id", CraftMagicNumbers.NBT.TAG_STRING)) {
                 UUID uuid = UUID.fromString(skullTag.getString("Id"));
                 skullTag.putUUID("Id", uuid);
             }
 
-            ResolvableProfile.CODEC.parse(DynamicOpsNBT.INSTANCE, skullTag).result().ifPresent(this::setProfile);
+            ResolvableProfile.CODEC.parse(NbtOps.INSTANCE, skullTag).result().ifPresent(this::setProfile);
         }
 
-        if (tag.contains(BLOCK_ENTITY_TAG.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND)) {
-            NBTTagCompound nbtTagCompound = tag.getCompound(BLOCK_ENTITY_TAG.NBT).copy();
-            if (nbtTagCompound.contains(NOTE_BLOCK_SOUND.NBT, 8)) {
-                this.noteBlockSound = MinecraftKey.tryParse(nbtTagCompound.getString(NOTE_BLOCK_SOUND.NBT));
+        if (tag.contains(CraftMetaSkull.BLOCK_ENTITY_TAG.NBT, CraftMagicNumbers.NBT.TAG_COMPOUND)) {
+            CompoundTag nbtTagCompound = tag.getCompound(CraftMetaSkull.BLOCK_ENTITY_TAG.NBT).copy();
+            if (nbtTagCompound.contains(CraftMetaSkull.NOTE_BLOCK_SOUND.NBT, 8)) {
+                this.noteBlockSound = ResourceLocation.tryParse(nbtTagCompound.getString(CraftMetaSkull.NOTE_BLOCK_SOUND.NBT));
             }
         }
     }
@@ -106,31 +106,31 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
     void applyToItem(CraftMetaItem.Applicator tag) {
         super.applyToItem(tag);
 
-        if (hasOwner()) {
+        if (this.hasOwner()) {
             // SPIGOT-6558: Set initial textures
-            tag.put(SKULL_PROFILE, profile);
+            tag.put(CraftMetaSkull.SKULL_PROFILE, this.profile);
             // Fill in textures
-            PlayerProfile ownerProfile = new CraftPlayerProfile(profile); // getOwnerProfile may return null
+            PlayerProfile ownerProfile = new CraftPlayerProfile(this.profile); // getOwnerProfile may return null
             if (ownerProfile.getTextures().isEmpty()) {
                 ownerProfile.update().thenAccept((filledProfile) -> {
-                    setOwnerProfile(filledProfile);
-                    tag.put(SKULL_PROFILE, profile);
+                    this.setOwnerProfile(filledProfile);
+                    tag.put(CraftMetaSkull.SKULL_PROFILE, this.profile);
                 });
             }
         }
 
-        if (noteBlockSound != null) {
-            tag.put(NOTE_BLOCK_SOUND, this.noteBlockSound);
+        if (this.noteBlockSound != null) {
+            tag.put(CraftMetaSkull.NOTE_BLOCK_SOUND, this.noteBlockSound);
         }
     }
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && isSkullEmpty();
+        return super.isEmpty() && this.isSkullEmpty();
     }
 
     boolean isSkullEmpty() {
-        return profile == null && noteBlockSound == null;
+        return this.profile == null && this.noteBlockSound == null;
     }
 
     @Override
@@ -140,23 +140,23 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
 
     @Override
     public boolean hasOwner() {
-        return profile != null;
+        return this.profile != null;
     }
 
     @Override
     public String getOwner() {
-        return hasOwner() ? profile.name().orElse(null) : null;
+        return this.hasOwner() ? this.profile.name().orElse(null) : null;
     }
 
     @Override
     public OfflinePlayer getOwningPlayer() {
-        if (hasOwner()) {
-            if (profile.id().filter(u -> !u.equals(SystemUtils.NIL_UUID)).isPresent()) {
-                return Bukkit.getOfflinePlayer(profile.id().get());
+        if (this.hasOwner()) {
+            if (this.profile.id().filter(u -> !u.equals(Util.NIL_UUID)).isPresent()) {
+                return Bukkit.getOfflinePlayer(this.profile.id().get());
             }
 
-            if (profile.name().filter(s -> !s.isEmpty()).isPresent()) {
-                return Bukkit.getOfflinePlayer(profile.name().get());
+            if (this.profile.name().filter(s -> !s.isEmpty()).isPresent()) {
+                return Bukkit.getOfflinePlayer(this.profile.name().get());
             }
         }
 
@@ -165,14 +165,14 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
 
     @Override
     public boolean setOwner(String name) {
-        if (name != null && name.length() > MAX_OWNER_LENGTH) {
+        if (name != null && name.length() > CraftMetaSkull.MAX_OWNER_LENGTH) {
             return false;
         }
 
         if (name == null) {
-            setProfile(null);
+            this.setProfile(null);
         } else {
-            setProfile(new ResolvableProfile(new GameProfile(SystemUtils.NIL_UUID, name)));
+            this.setProfile(new ResolvableProfile(new GameProfile(Util.NIL_UUID, name)));
         }
 
         return true;
@@ -181,11 +181,11 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
     @Override
     public boolean setOwningPlayer(OfflinePlayer owner) {
         if (owner == null) {
-            setProfile(null);
+            this.setProfile(null);
         } else if (owner instanceof CraftPlayer craftPlayer) {
-            setProfile(new ResolvableProfile(craftPlayer.getProfile()));
+            this.setProfile(new ResolvableProfile(craftPlayer.getProfile()));
         } else {
-            setProfile(new ResolvableProfile(new GameProfile(owner.getUniqueId(), (owner.getName() == null) ? "" : owner.getName())));
+            this.setProfile(new ResolvableProfile(new GameProfile(owner.getUniqueId(), (owner.getName() == null) ? "" : owner.getName())));
         }
 
         return true;
@@ -193,19 +193,19 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
 
     @Override
     public PlayerProfile getOwnerProfile() {
-        if (!hasOwner()) {
+        if (!this.hasOwner()) {
             return null;
         }
 
-        return new CraftPlayerProfile(profile);
+        return new CraftPlayerProfile(this.profile);
     }
 
     @Override
     public void setOwnerProfile(PlayerProfile profile) {
         if (profile instanceof CraftPlayerProfile craftPlayerProfile) {
-            setProfile(CraftPlayerProfile.validateSkullProfile(craftPlayerProfile.buildResolvableProfile()));
+            this.setProfile(CraftPlayerProfile.validateSkullProfile(craftPlayerProfile.buildResolvableProfile()));
         } else {
-            setProfile(null);
+            this.setProfile(null);
         }
     }
 
@@ -227,11 +227,11 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
     int applyHash() {
         final int original;
         int hash = original = super.applyHash();
-        if (hasOwner()) {
-            hash = 61 * hash + profile.hashCode();
+        if (this.hasOwner()) {
+            hash = 61 * hash + this.profile.hashCode();
         }
         if (this.noteBlockSound != null) {
-            hash = 61 * hash + noteBlockSound.hashCode();
+            hash = 61 * hash + this.noteBlockSound.hashCode();
         }
         return original != hash ? CraftMetaSkull.class.hashCode() ^ hash : hash;
     }
@@ -249,7 +249,7 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaSkull || isSkullEmpty());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaSkull || this.isSkullEmpty());
     }
 
     @Override
@@ -257,12 +257,12 @@ class CraftMetaSkull extends CraftMetaItem implements SkullMeta {
         super.serialize(builder);
 
         if (this.hasOwner()) {
-            builder.put(SKULL_OWNER.BUKKIT, new CraftPlayerProfile(this.profile));
+            builder.put(CraftMetaSkull.SKULL_OWNER.BUKKIT, new CraftPlayerProfile(this.profile));
         }
 
         NamespacedKey namespacedKeyNB = this.getNoteBlockSound();
         if (namespacedKeyNB != null) {
-            builder.put(NOTE_BLOCK_SOUND.BUKKIT, namespacedKeyNB.toString());
+            builder.put(CraftMetaSkull.NOTE_BLOCK_SOUND.BUKKIT, namespacedKeyNB.toString());
         }
 
         return builder;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java
index 9c3b541440..ea9937ad27 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSpawnEgg.java
@@ -5,8 +5,8 @@ import com.google.common.collect.ImmutableMap.Builder;
 import java.util.Map;
 import net.minecraft.core.component.DataComponentPatch;
 import net.minecraft.core.component.DataComponents;
-import net.minecraft.nbt.NBTBase;
-import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.nbt.Tag;
 import net.minecraft.world.item.component.CustomData;
 import org.bukkit.configuration.serialization.DelegateDeserialization;
 import org.bukkit.craftbukkit.entity.CraftEntitySnapshot;
@@ -21,7 +21,7 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta {
     @ItemMetaKey.Specific(ItemMetaKey.Specific.To.NBT)
     static final ItemMetaKey ENTITY_ID = new ItemMetaKey("id");
 
-    private NBTTagCompound entityTag;
+    private CompoundTag entityTag;
 
     CraftMetaSpawnEgg(CraftMetaItem meta) {
         super(meta);
@@ -36,8 +36,8 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta {
     CraftMetaSpawnEgg(DataComponentPatch tag) {
         super(tag);
 
-        getOrEmpty(tag, ENTITY_TAG).ifPresent((nbt) -> {
-            entityTag = nbt.copyTag();
+        getOrEmpty(tag, CraftMetaSpawnEgg.ENTITY_TAG).ifPresent((nbt) -> {
+            this.entityTag = nbt.copyTag();
         });
     }
 
@@ -46,14 +46,14 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta {
     }
 
     @Override
-    void deserializeInternal(NBTTagCompound tag, Object context) {
+    void deserializeInternal(CompoundTag tag, Object context) {
         super.deserializeInternal(tag, context);
 
-        if (tag.contains(ENTITY_TAG.NBT)) {
-            entityTag = tag.getCompound(ENTITY_TAG.NBT);
+        if (tag.contains(CraftMetaSpawnEgg.ENTITY_TAG.NBT)) {
+            this.entityTag = tag.getCompound(CraftMetaSpawnEgg.ENTITY_TAG.NBT);
 
             // Tag still has some other data, lets try our luck with a conversion
-            if (!entityTag.isEmpty()) {
+            if (!this.entityTag.isEmpty()) {
                 // SPIGOT-4128: This is hopeless until we start versioning stacks. RIP data.
                 // entityTag = (NBTTagCompound) MinecraftServer.getServer().dataConverterManager.update(DataConverterTypes.ENTITY, new Dynamic(DynamicOpsNBT.a, entityTag), -1, CraftMagicNumbers.DATA_VERSION).getValue();
             }
@@ -61,9 +61,9 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta {
     }
 
     @Override
-    void serializeInternal(Map<String, NBTBase> internalTags) {
-        if (entityTag != null && !entityTag.isEmpty()) {
-            internalTags.put(ENTITY_TAG.NBT, entityTag);
+    void serializeInternal(Map<String, Tag> internalTags) {
+        if (this.entityTag != null && !this.entityTag.isEmpty()) {
+            internalTags.put(CraftMetaSpawnEgg.ENTITY_TAG.NBT, this.entityTag);
         }
     }
 
@@ -71,18 +71,18 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta {
     void applyToItem(CraftMetaItem.Applicator tag) {
         super.applyToItem(tag);
 
-        if (entityTag != null) {
-            tag.put(ENTITY_TAG, CustomData.of(entityTag));
+        if (this.entityTag != null) {
+            tag.put(CraftMetaSpawnEgg.ENTITY_TAG, CustomData.of(this.entityTag));
         }
     }
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && isSpawnEggEmpty();
+        return super.isEmpty() && this.isSpawnEggEmpty();
     }
 
     boolean isSpawnEggEmpty() {
-        return !(entityTag != null);
+        return !(this.entityTag != null);
     }
 
     @Override
@@ -114,14 +114,14 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta {
         if (meta instanceof CraftMetaSpawnEgg) {
             CraftMetaSpawnEgg that = (CraftMetaSpawnEgg) meta;
 
-            return entityTag != null ? that.entityTag != null && this.entityTag.equals(that.entityTag) : entityTag == null;
+            return this.entityTag != null ? that.entityTag != null && this.entityTag.equals(that.entityTag) : this.entityTag == null;
         }
         return true;
     }
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaSpawnEgg || isSpawnEggEmpty());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaSpawnEgg || this.isSpawnEggEmpty());
     }
 
     @Override
@@ -129,8 +129,8 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta {
         final int original;
         int hash = original = super.applyHash();
 
-        if (entityTag != null) {
-            hash = 73 * hash + entityTag.hashCode();
+        if (this.entityTag != null) {
+            hash = 73 * hash + this.entityTag.hashCode();
         }
 
         return original != hash ? CraftMetaSpawnEgg.class.hashCode() ^ hash : hash;
@@ -147,8 +147,8 @@ public class CraftMetaSpawnEgg extends CraftMetaItem implements SpawnEggMeta {
     public CraftMetaSpawnEgg clone() {
         CraftMetaSpawnEgg clone = (CraftMetaSpawnEgg) super.clone();
 
-        if (entityTag != null) {
-            clone.entityTag = entityTag.copy();
+        if (this.entityTag != null) {
+            clone.entityTag = this.entityTag.copy();
         }
 
         return clone;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSuspiciousStew.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSuspiciousStew.java
index 356c3d2948..248efddbad 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSuspiciousStew.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaSuspiciousStew.java
@@ -35,19 +35,19 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious
 
     CraftMetaSuspiciousStew(DataComponentPatch tag) {
         super(tag);
-        getOrEmpty(tag, EFFECTS).ifPresent((suspiciousStewEffects) -> {
-            List<SuspiciousStewEffects.a> list = suspiciousStewEffects.effects();
+        getOrEmpty(tag, CraftMetaSuspiciousStew.EFFECTS).ifPresent((suspiciousStewEffects) -> {
+            List<SuspiciousStewEffects.Entry> list = suspiciousStewEffects.effects();
             int length = list.size();
-            customEffects = new ArrayList<>(length);
+            this.customEffects = new ArrayList<>(length);
 
             for (int i = 0; i < length; i++) {
-                SuspiciousStewEffects.a effect = list.get(i);
+                SuspiciousStewEffects.Entry effect = list.get(i);
                 PotionEffectType type = CraftPotionEffectType.minecraftHolderToBukkit(effect.effect());
                 if (type == null) {
                     continue;
                 }
                 int duration = effect.duration();
-                customEffects.add(new PotionEffect(type, duration, 0));
+                this.customEffects.add(new PotionEffect(type, duration, 0));
             }
         });
     }
@@ -55,14 +55,14 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious
     CraftMetaSuspiciousStew(Map<String, Object> map) {
         super(map);
 
-        Iterable<?> rawEffectList = SerializableMeta.getObject(Iterable.class, map, EFFECTS.BUKKIT, true);
+        Iterable<?> rawEffectList = SerializableMeta.getObject(Iterable.class, map, CraftMetaSuspiciousStew.EFFECTS.BUKKIT, true);
         if (rawEffectList == null) {
             return;
         }
 
         for (Object obj : rawEffectList) {
             Preconditions.checkArgument(obj instanceof PotionEffect, "Object (%s) in effect list is not valid", obj.getClass());
-            addCustomEffect((PotionEffect) obj, true);
+            this.addCustomEffect((PotionEffect) obj, true);
         }
     }
 
@@ -70,23 +70,23 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious
     void applyToItem(CraftMetaItem.Applicator tag) {
         super.applyToItem(tag);
 
-        if (customEffects != null) {
-            List<SuspiciousStewEffects.a> effectList = new ArrayList<>();
+        if (this.customEffects != null) {
+            List<SuspiciousStewEffects.Entry> effectList = new ArrayList<>();
 
-            for (PotionEffect effect : customEffects) {
-                effectList.add(new net.minecraft.world.item.component.SuspiciousStewEffects.a(CraftPotionEffectType.bukkitToMinecraftHolder(effect.getType()), effect.getDuration()));
+            for (PotionEffect effect : this.customEffects) {
+                effectList.add(new net.minecraft.world.item.component.SuspiciousStewEffects.Entry(CraftPotionEffectType.bukkitToMinecraftHolder(effect.getType()), effect.getDuration()));
             }
-            tag.put(EFFECTS, new SuspiciousStewEffects(effectList));
+            tag.put(CraftMetaSuspiciousStew.EFFECTS, new SuspiciousStewEffects(effectList));
         }
     }
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && isStewEmpty();
+        return super.isEmpty() && this.isStewEmpty();
     }
 
     boolean isStewEmpty() {
-        return !hasCustomEffects();
+        return !this.hasCustomEffects();
     }
 
     @Override
@@ -100,13 +100,13 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious
 
     @Override
     public boolean hasCustomEffects() {
-        return customEffects != null;
+        return this.customEffects != null;
     }
 
     @Override
     public List<PotionEffect> getCustomEffects() {
-        if (hasCustomEffects()) {
-            return ImmutableList.copyOf(customEffects);
+        if (this.hasCustomEffects()) {
+            return ImmutableList.copyOf(this.customEffects);
         }
         return ImmutableList.of();
     }
@@ -115,23 +115,23 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious
     public boolean addCustomEffect(PotionEffect effect, boolean overwrite) {
         Preconditions.checkArgument(effect != null, "Potion effect cannot be null");
 
-        int index = indexOfEffect(effect.getType());
+        int index = this.indexOfEffect(effect.getType());
         if (index != -1) {
             if (overwrite) {
-                PotionEffect old = customEffects.get(index);
+                PotionEffect old = this.customEffects.get(index);
                 if (old.getDuration() == effect.getDuration()) {
                     return false;
                 }
-                customEffects.set(index, effect);
+                this.customEffects.set(index, effect);
                 return true;
             } else {
                 return false;
             }
         } else {
-            if (customEffects == null) {
-                customEffects = new ArrayList<>();
+            if (this.customEffects == null) {
+                this.customEffects = new ArrayList<>();
             }
-            customEffects.add(effect);
+            this.customEffects.add(effect);
             return true;
         }
     }
@@ -140,12 +140,12 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious
     public boolean removeCustomEffect(PotionEffectType type) {
         Preconditions.checkArgument(type != null, "Potion effect type cannot be null");
 
-        if (!hasCustomEffects()) {
+        if (!this.hasCustomEffects()) {
             return false;
         }
 
         boolean changed = false;
-        Iterator<PotionEffect> iterator = customEffects.iterator();
+        Iterator<PotionEffect> iterator = this.customEffects.iterator();
         while (iterator.hasNext()) {
             PotionEffect effect = iterator.next();
             if (type.equals(effect.getType())) {
@@ -153,8 +153,8 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious
                 changed = true;
             }
         }
-        if (customEffects.isEmpty()) {
-            customEffects = null;
+        if (this.customEffects.isEmpty()) {
+            this.customEffects = null;
         }
         return changed;
     }
@@ -162,16 +162,16 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious
     @Override
     public boolean hasCustomEffect(PotionEffectType type) {
         Preconditions.checkArgument(type != null, "Potion effect type cannot be null");
-        return indexOfEffect(type) != -1;
+        return this.indexOfEffect(type) != -1;
     }
 
     private int indexOfEffect(PotionEffectType type) {
-        if (!hasCustomEffects()) {
+        if (!this.hasCustomEffects()) {
             return -1;
         }
 
-        for (int i = 0; i < customEffects.size(); i++) {
-            if (customEffects.get(i).getType().equals(type)) {
+        for (int i = 0; i < this.customEffects.size(); i++) {
+            if (this.customEffects.get(i).getType().equals(type)) {
                 return i;
             }
         }
@@ -180,8 +180,8 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious
 
     @Override
     public boolean clearCustomEffects() {
-        boolean changed = hasCustomEffects();
-        customEffects = null;
+        boolean changed = this.hasCustomEffects();
+        this.customEffects = null;
         return changed;
     }
 
@@ -189,8 +189,8 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious
     int applyHash() {
         final int original;
         int hash = original = super.applyHash();
-        if (hasCustomEffects()) {
-            hash = 73 * hash + customEffects.hashCode();
+        if (this.hasCustomEffects()) {
+            hash = 73 * hash + this.customEffects.hashCode();
         }
         return original != hash ? CraftMetaSuspiciousStew.class.hashCode() ^ hash : hash;
     }
@@ -208,15 +208,15 @@ public class CraftMetaSuspiciousStew extends CraftMetaItem implements Suspicious
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaSuspiciousStew || isStewEmpty());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaSuspiciousStew || this.isStewEmpty());
     }
 
     @Override
     Builder<String, Object> serialize(Builder<String, Object> builder) {
         super.serialize(builder);
 
-        if (hasCustomEffects()) {
-            builder.put(EFFECTS.BUKKIT, ImmutableList.copyOf(this.customEffects));
+        if (this.hasCustomEffects()) {
+            builder.put(CraftMetaSuspiciousStew.EFFECTS.BUKKIT, ImmutableList.copyOf(this.customEffects));
         }
 
         return builder;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java
index 09743e9c21..8169d08c1b 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftMetaTropicalFishBucket.java
@@ -4,8 +4,8 @@ import com.google.common.collect.ImmutableMap;
 import java.util.Map;
 import net.minecraft.core.component.DataComponentPatch;
 import net.minecraft.core.component.DataComponents;
-import net.minecraft.nbt.NBTBase;
-import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.nbt.Tag;
 import net.minecraft.world.item.component.CustomData;
 import org.bukkit.DyeColor;
 import org.bukkit.configuration.serialization.DelegateDeserialization;
@@ -22,8 +22,8 @@ class CraftMetaTropicalFishBucket extends CraftMetaItem implements TropicalFishB
     static final ItemMetaKeyType<CustomData> BUCKET_ENTITY_TAG = new ItemMetaKeyType<>(DataComponents.BUCKET_ENTITY_DATA, "bucket-entity-tag");
 
     private Integer variant;
-    private NBTTagCompound entityTag;
-    private NBTTagCompound bucketEntityTag;
+    private CompoundTag entityTag;
+    private CompoundTag bucketEntityTag;
 
     CraftMetaTropicalFishBucket(CraftMetaItem meta) {
         super(meta);
@@ -41,18 +41,18 @@ class CraftMetaTropicalFishBucket extends CraftMetaItem implements TropicalFishB
     CraftMetaTropicalFishBucket(DataComponentPatch tag) {
         super(tag);
 
-        getOrEmpty(tag, ENTITY_TAG).ifPresent((nbt) -> {
-            entityTag = nbt.copyTag();
+        getOrEmpty(tag, CraftMetaTropicalFishBucket.ENTITY_TAG).ifPresent((nbt) -> {
+            this.entityTag = nbt.copyTag();
 
-            if (entityTag.contains(VARIANT.NBT, CraftMagicNumbers.NBT.TAG_INT)) {
-                this.variant = entityTag.getInt(VARIANT.NBT);
+            if (this.entityTag.contains(CraftMetaTropicalFishBucket.VARIANT.NBT, CraftMagicNumbers.NBT.TAG_INT)) {
+                this.variant = this.entityTag.getInt(CraftMetaTropicalFishBucket.VARIANT.NBT);
             }
         });
-        getOrEmpty(tag, BUCKET_ENTITY_TAG).ifPresent((nbt) -> {
-            bucketEntityTag = nbt.copyTag();
+        getOrEmpty(tag, CraftMetaTropicalFishBucket.BUCKET_ENTITY_TAG).ifPresent((nbt) -> {
+            this.bucketEntityTag = nbt.copyTag();
 
-            if (bucketEntityTag.contains(VARIANT.NBT, CraftMagicNumbers.NBT.TAG_INT)) {
-                this.variant = bucketEntityTag.getInt(VARIANT.NBT);
+            if (this.bucketEntityTag.contains(CraftMetaTropicalFishBucket.VARIANT.NBT, CraftMagicNumbers.NBT.TAG_INT)) {
+                this.variant = this.bucketEntityTag.getInt(CraftMetaTropicalFishBucket.VARIANT.NBT);
             }
         });
     }
@@ -60,31 +60,31 @@ class CraftMetaTropicalFishBucket extends CraftMetaItem implements TropicalFishB
     CraftMetaTropicalFishBucket(Map<String, Object> map) {
         super(map);
 
-        Integer variant = SerializableMeta.getObject(Integer.class, map, VARIANT.BUKKIT, true);
+        Integer variant = SerializableMeta.getObject(Integer.class, map, CraftMetaTropicalFishBucket.VARIANT.BUKKIT, true);
         if (variant != null) {
             this.variant = variant;
         }
     }
 
     @Override
-    void deserializeInternal(NBTTagCompound tag, Object context) {
+    void deserializeInternal(CompoundTag tag, Object context) {
         super.deserializeInternal(tag, context);
 
-        if (tag.contains(ENTITY_TAG.NBT)) {
-            entityTag = tag.getCompound(ENTITY_TAG.NBT);
+        if (tag.contains(CraftMetaTropicalFishBucket.ENTITY_TAG.NBT)) {
+            this.entityTag = tag.getCompound(CraftMetaTropicalFishBucket.ENTITY_TAG.NBT);
         }
-        if (tag.contains(BUCKET_ENTITY_TAG.NBT)) {
-            bucketEntityTag = tag.getCompound(BUCKET_ENTITY_TAG.NBT);
+        if (tag.contains(CraftMetaTropicalFishBucket.BUCKET_ENTITY_TAG.NBT)) {
+            this.bucketEntityTag = tag.getCompound(CraftMetaTropicalFishBucket.BUCKET_ENTITY_TAG.NBT);
         }
     }
 
     @Override
-    void serializeInternal(Map<String, NBTBase> internalTags) {
-        if (entityTag != null && !entityTag.isEmpty()) {
-            internalTags.put(ENTITY_TAG.NBT, entityTag);
+    void serializeInternal(Map<String, Tag> internalTags) {
+        if (this.entityTag != null && !this.entityTag.isEmpty()) {
+            internalTags.put(CraftMetaTropicalFishBucket.ENTITY_TAG.NBT, this.entityTag);
         }
-        if (bucketEntityTag != null && !bucketEntityTag.isEmpty()) {
-            internalTags.put(BUCKET_ENTITY_TAG.NBT, bucketEntityTag);
+        if (this.bucketEntityTag != null && !this.bucketEntityTag.isEmpty()) {
+            internalTags.put(CraftMetaTropicalFishBucket.BUCKET_ENTITY_TAG.NBT, this.bucketEntityTag);
         }
     }
 
@@ -92,74 +92,74 @@ class CraftMetaTropicalFishBucket extends CraftMetaItem implements TropicalFishB
     void applyToItem(CraftMetaItem.Applicator tag) {
         super.applyToItem(tag);
 
-        if (entityTag != null) {
-            tag.put(ENTITY_TAG, CustomData.of(entityTag));
+        if (this.entityTag != null) {
+            tag.put(CraftMetaTropicalFishBucket.ENTITY_TAG, CustomData.of(this.entityTag));
         }
 
-        NBTTagCompound bucketEntityTag = (this.bucketEntityTag != null) ? this.bucketEntityTag.copy() : null;
-        if (hasVariant()) {
+        CompoundTag bucketEntityTag = (this.bucketEntityTag != null) ? this.bucketEntityTag.copy() : null;
+        if (this.hasVariant()) {
             if (bucketEntityTag == null) {
-                bucketEntityTag = new NBTTagCompound();
+                bucketEntityTag = new CompoundTag();
             }
-            bucketEntityTag.putInt(VARIANT.NBT, variant);
+            bucketEntityTag.putInt(CraftMetaTropicalFishBucket.VARIANT.NBT, this.variant);
         }
 
         if (bucketEntityTag != null) {
-            tag.put(BUCKET_ENTITY_TAG, CustomData.of(bucketEntityTag));
+            tag.put(CraftMetaTropicalFishBucket.BUCKET_ENTITY_TAG, CustomData.of(bucketEntityTag));
         }
     }
 
     @Override
     boolean isEmpty() {
-        return super.isEmpty() && isBucketEmpty();
+        return super.isEmpty() && this.isBucketEmpty();
     }
 
     boolean isBucketEmpty() {
-        return !(hasVariant() || entityTag != null || bucketEntityTag != null);
+        return !(this.hasVariant() || this.entityTag != null || this.bucketEntityTag != null);
     }
 
     @Override
     public DyeColor getPatternColor() {
-        return CraftTropicalFish.getPatternColor(variant);
+        return CraftTropicalFish.getPatternColor(this.variant);
     }
 
     @Override
     public void setPatternColor(DyeColor color) {
-        if (variant == null) {
-            variant = 0;
+        if (this.variant == null) {
+            this.variant = 0;
         }
-        variant = CraftTropicalFish.getData(color, getPatternColor(), getPattern());
+        this.variant = CraftTropicalFish.getData(color, this.getPatternColor(), this.getPattern());
     }
 
     @Override
     public DyeColor getBodyColor() {
-        return CraftTropicalFish.getBodyColor(variant);
+        return CraftTropicalFish.getBodyColor(this.variant);
     }
 
     @Override
     public void setBodyColor(DyeColor color) {
-        if (variant == null) {
-            variant = 0;
+        if (this.variant == null) {
+            this.variant = 0;
         }
-        variant = CraftTropicalFish.getData(getPatternColor(), color, getPattern());
+        this.variant = CraftTropicalFish.getData(this.getPatternColor(), color, this.getPattern());
     }
 
     @Override
     public TropicalFish.Pattern getPattern() {
-        return CraftTropicalFish.getPattern(variant);
+        return CraftTropicalFish.getPattern(this.variant);
     }
 
     @Override
     public void setPattern(TropicalFish.Pattern pattern) {
-        if (variant == null) {
-            variant = 0;
+        if (this.variant == null) {
+            this.variant = 0;
         }
-        variant = CraftTropicalFish.getData(getPatternColor(), getBodyColor(), pattern);
+        this.variant = CraftTropicalFish.getData(this.getPatternColor(), this.getBodyColor(), pattern);
     }
 
     @Override
     public boolean hasVariant() {
-        return variant != null;
+        return this.variant != null;
     }
 
     @Override
@@ -170,16 +170,16 @@ class CraftMetaTropicalFishBucket extends CraftMetaItem implements TropicalFishB
         if (meta instanceof CraftMetaTropicalFishBucket) {
             CraftMetaTropicalFishBucket that = (CraftMetaTropicalFishBucket) meta;
 
-            return (hasVariant() ? that.hasVariant() && this.variant.equals(that.variant) : !that.hasVariant())
-                    && (entityTag != null ? that.entityTag != null && this.entityTag.equals(that.entityTag) : that.entityTag == null)
-                    && (bucketEntityTag != null ? that.bucketEntityTag != null && this.bucketEntityTag.equals(that.bucketEntityTag) : that.bucketEntityTag == null);
+            return (this.hasVariant() ? that.hasVariant() && this.variant.equals(that.variant) : !that.hasVariant())
+                    && (this.entityTag != null ? that.entityTag != null && this.entityTag.equals(that.entityTag) : that.entityTag == null)
+                    && (this.bucketEntityTag != null ? that.bucketEntityTag != null && this.bucketEntityTag.equals(that.bucketEntityTag) : that.bucketEntityTag == null);
         }
         return true;
     }
 
     @Override
     boolean notUncommon(CraftMetaItem meta) {
-        return super.notUncommon(meta) && (meta instanceof CraftMetaTropicalFishBucket || isBucketEmpty());
+        return super.notUncommon(meta) && (meta instanceof CraftMetaTropicalFishBucket || this.isBucketEmpty());
     }
 
     @Override
@@ -187,14 +187,14 @@ class CraftMetaTropicalFishBucket extends CraftMetaItem implements TropicalFishB
         final int original;
         int hash = original = super.applyHash();
 
-        if (hasVariant()) {
-            hash = 61 * hash + variant;
+        if (this.hasVariant()) {
+            hash = 61 * hash + this.variant;
         }
-        if (entityTag != null) {
-            hash = 61 * hash + entityTag.hashCode();
+        if (this.entityTag != null) {
+            hash = 61 * hash + this.entityTag.hashCode();
         }
-        if (bucketEntityTag != null) {
-            hash = 61 * hash + bucketEntityTag.hashCode();
+        if (this.bucketEntityTag != null) {
+            hash = 61 * hash + this.bucketEntityTag.hashCode();
         }
 
         return original != hash ? CraftMetaTropicalFishBucket.class.hashCode() ^ hash : hash;
@@ -204,11 +204,11 @@ class CraftMetaTropicalFishBucket extends CraftMetaItem implements TropicalFishB
     public CraftMetaTropicalFishBucket clone() {
         CraftMetaTropicalFishBucket clone = (CraftMetaTropicalFishBucket) super.clone();
 
-        if (entityTag != null) {
-            clone.entityTag = entityTag.copy();
+        if (this.entityTag != null) {
+            clone.entityTag = this.entityTag.copy();
         }
-        if (bucketEntityTag != null) {
-            clone.bucketEntityTag = bucketEntityTag.copy();
+        if (this.bucketEntityTag != null) {
+            clone.bucketEntityTag = this.bucketEntityTag.copy();
         }
 
         return clone;
@@ -218,8 +218,8 @@ class CraftMetaTropicalFishBucket extends CraftMetaItem implements TropicalFishB
     ImmutableMap.Builder<String, Object> serialize(ImmutableMap.Builder<String, Object> builder) {
         super.serialize(builder);
 
-        if (hasVariant()) {
-            builder.put(VARIANT.BUKKIT, variant);
+        if (this.hasVariant()) {
+            builder.put(CraftMetaTropicalFishBucket.VARIANT.BUKKIT, this.variant);
         }
 
         return builder;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftRecipe.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftRecipe.java
index 2473a1ad89..fa47232eeb 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftRecipe.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftRecipe.java
@@ -6,8 +6,7 @@ import java.util.List;
 import java.util.Optional;
 import net.minecraft.core.registries.Registries;
 import net.minecraft.resources.ResourceKey;
-import net.minecraft.world.item.crafting.IRecipe;
-import net.minecraft.world.item.crafting.RecipeItemStack;
+import net.minecraft.world.item.crafting.Ingredient;
 import org.bukkit.NamespacedKey;
 import org.bukkit.craftbukkit.util.CraftNamespacedKey;
 import org.bukkit.inventory.Recipe;
@@ -19,19 +18,19 @@ public interface CraftRecipe extends Recipe {
 
     void addToCraftingManager();
 
-    default Optional<RecipeItemStack> toNMSOptional(RecipeChoice bukkit, boolean requireNotEmpty) {
-        return (bukkit == null) ? Optional.empty() : Optional.of(toNMS(bukkit, requireNotEmpty));
+    default Optional<Ingredient> toNMSOptional(RecipeChoice bukkit, boolean requireNotEmpty) {
+        return (bukkit == null) ? Optional.empty() : Optional.of(this.toNMS(bukkit, requireNotEmpty));
     }
 
-    default RecipeItemStack toNMS(RecipeChoice bukkit, boolean requireNotEmpty) {
-        RecipeItemStack stack;
+    default Ingredient toNMS(RecipeChoice bukkit, boolean requireNotEmpty) {
+        Ingredient stack;
 
         if (bukkit == null) {
-            stack = RecipeItemStack.of();
+            stack = Ingredient.of();
         } else if (bukkit instanceof RecipeChoice.MaterialChoice) {
-            stack = RecipeItemStack.of(((RecipeChoice.MaterialChoice) bukkit).getChoices().stream().map((mat) -> CraftItemType.bukkitToMinecraft(mat)));
+            stack = Ingredient.of(((RecipeChoice.MaterialChoice) bukkit).getChoices().stream().map((mat) -> CraftItemType.bukkitToMinecraft(mat)));
         } else if (bukkit instanceof RecipeChoice.ExactChoice) {
-            stack = RecipeItemStack.ofStacks(((RecipeChoice.ExactChoice) bukkit).getChoices().stream().map((mat) -> CraftItemStack.asNMSCopy(mat)).toList());
+            stack = Ingredient.ofStacks(((RecipeChoice.ExactChoice) bukkit).getChoices().stream().map((mat) -> CraftItemStack.asNMSCopy(mat)).toList());
         } else {
             throw new IllegalArgumentException("Unknown recipe stack instance " + bukkit);
         }
@@ -43,11 +42,11 @@ public interface CraftRecipe extends Recipe {
         return stack;
     }
 
-    public static RecipeChoice toBukkit(Optional<RecipeItemStack> list) {
+    public static RecipeChoice toBukkit(Optional<Ingredient> list) {
         return list.map(CraftRecipe::toBukkit).orElse(null);
     }
 
-    public static RecipeChoice toBukkit(RecipeItemStack list) {
+    public static RecipeChoice toBukkit(Ingredient list) {
         if (list.isEmpty()) {
             return null;
         }
@@ -82,7 +81,7 @@ public interface CraftRecipe extends Recipe {
         return CookingBookCategory.valueOf(nms.name());
     }
 
-    public static ResourceKey<IRecipe<?>> toMinecraft(NamespacedKey key) {
+    public static ResourceKey<net.minecraft.world.item.crafting.Recipe<?>> toMinecraft(NamespacedKey key) {
         return ResourceKey.create(Registries.RECIPE, CraftNamespacedKey.toMinecraft(key));
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftResultInventory.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftResultInventory.java
index bf3714e071..d4ad8c00e5 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftResultInventory.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftResultInventory.java
@@ -1,47 +1,47 @@
 package org.bukkit.craftbukkit.inventory;
 
-import net.minecraft.world.IInventory;
+import net.minecraft.world.Container;
 import org.bukkit.inventory.ItemStack;
 
 public class CraftResultInventory extends CraftInventory {
 
-    private final IInventory resultInventory;
+    private final Container resultInventory;
 
-    public CraftResultInventory(IInventory inventory, IInventory resultInventory) {
+    public CraftResultInventory(Container inventory, Container resultInventory) {
         super(inventory);
         this.resultInventory = resultInventory;
     }
 
-    public IInventory getResultInventory() {
-        return resultInventory;
+    public Container getResultInventory() {
+        return this.resultInventory;
     }
 
-    public IInventory getIngredientsInventory() {
-        return inventory;
+    public Container getIngredientsInventory() {
+        return this.inventory;
     }
 
     @Override
     public ItemStack getItem(int slot) {
-        if (slot < getIngredientsInventory().getContainerSize()) {
-            net.minecraft.world.item.ItemStack item = getIngredientsInventory().getItem(slot);
+        if (slot < this.getIngredientsInventory().getContainerSize()) {
+            net.minecraft.world.item.ItemStack item = this.getIngredientsInventory().getItem(slot);
             return item.isEmpty() ? null : CraftItemStack.asCraftMirror(item);
         } else {
-            net.minecraft.world.item.ItemStack item = getResultInventory().getItem(slot - getIngredientsInventory().getContainerSize());
+            net.minecraft.world.item.ItemStack item = this.getResultInventory().getItem(slot - this.getIngredientsInventory().getContainerSize());
             return item.isEmpty() ? null : CraftItemStack.asCraftMirror(item);
         }
     }
 
     @Override
     public void setItem(int index, ItemStack item) {
-        if (index < getIngredientsInventory().getContainerSize()) {
-            getIngredientsInventory().setItem(index, CraftItemStack.asNMSCopy(item));
+        if (index < this.getIngredientsInventory().getContainerSize()) {
+            this.getIngredientsInventory().setItem(index, CraftItemStack.asNMSCopy(item));
         } else {
-            getResultInventory().setItem((index - getIngredientsInventory().getContainerSize()), CraftItemStack.asNMSCopy(item));
+            this.getResultInventory().setItem((index - this.getIngredientsInventory().getContainerSize()), CraftItemStack.asNMSCopy(item));
         }
     }
 
     @Override
     public int getSize() {
-        return getResultInventory().getContainerSize() + getIngredientsInventory().getContainerSize();
+        return this.getResultInventory().getContainerSize() + this.getIngredientsInventory().getContainerSize();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java
index 243118cdad..31da9c5261 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapedRecipe.java
@@ -4,10 +4,9 @@ import com.google.common.collect.Maps;
 import java.util.Map;
 import java.util.Objects;
 import net.minecraft.server.MinecraftServer;
+import net.minecraft.world.item.crafting.Ingredient;
 import net.minecraft.world.item.crafting.RecipeHolder;
-import net.minecraft.world.item.crafting.RecipeItemStack;
 import net.minecraft.world.item.crafting.ShapedRecipePattern;
-import net.minecraft.world.item.crafting.ShapedRecipes;
 import org.bukkit.NamespacedKey;
 import org.bukkit.inventory.ItemStack;
 import org.bukkit.inventory.RecipeChoice;
@@ -15,13 +14,13 @@ import org.bukkit.inventory.ShapedRecipe;
 
 public class CraftShapedRecipe extends ShapedRecipe implements CraftRecipe {
     // TODO: Could eventually use this to add a matches() method or some such
-    private ShapedRecipes recipe;
+    private net.minecraft.world.item.crafting.ShapedRecipe recipe;
 
     public CraftShapedRecipe(NamespacedKey key, ItemStack result) {
         super(key, result);
     }
 
-    public CraftShapedRecipe(NamespacedKey key, ItemStack result, ShapedRecipes recipe) {
+    public CraftShapedRecipe(NamespacedKey key, ItemStack result, net.minecraft.world.item.crafting.ShapedRecipe recipe) {
         this(key, result);
         this.recipe = recipe;
     }
@@ -48,12 +47,12 @@ public class CraftShapedRecipe extends ShapedRecipe implements CraftRecipe {
     @Override
     public void addToCraftingManager() {
         Map<Character, org.bukkit.inventory.RecipeChoice> ingred = this.getChoiceMap();
-        String[] shape = replaceUndefinedIngredientsWithEmpty(this.getShape(), ingred);
+        String[] shape = CraftShapedRecipe.replaceUndefinedIngredientsWithEmpty(this.getShape(), ingred);
         ingred.values().removeIf(Objects::isNull);
-        Map<Character, RecipeItemStack> data = Maps.transformValues(ingred, (bukkit) -> toNMS(bukkit, false));
+        Map<Character, Ingredient> data = Maps.transformValues(ingred, (bukkit) -> this.toNMS(bukkit, false));
 
         ShapedRecipePattern pattern = ShapedRecipePattern.of(data, shape);
-        MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftRecipe.toMinecraft(this.getKey()), new ShapedRecipes(this.getGroup(), CraftRecipe.getCategory(this.getCategory()), pattern, CraftItemStack.asNMSCopy(this.getResult()))));
+        MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftRecipe.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.ShapedRecipe(this.getGroup(), CraftRecipe.getCategory(this.getCategory()), pattern, CraftItemStack.asNMSCopy(this.getResult()))));
     }
 
     private static String[] replaceUndefinedIngredientsWithEmpty(String[] shape, Map<Character, org.bukkit.inventory.RecipeChoice> ingredients) {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java
index 773e1e939f..7c989318dc 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftShapelessRecipe.java
@@ -3,9 +3,8 @@ package org.bukkit.craftbukkit.inventory;
 import java.util.ArrayList;
 import java.util.List;
 import net.minecraft.server.MinecraftServer;
+import net.minecraft.world.item.crafting.Ingredient;
 import net.minecraft.world.item.crafting.RecipeHolder;
-import net.minecraft.world.item.crafting.RecipeItemStack;
-import net.minecraft.world.item.crafting.ShapelessRecipes;
 import org.bukkit.NamespacedKey;
 import org.bukkit.inventory.ItemStack;
 import org.bukkit.inventory.RecipeChoice;
@@ -13,13 +12,13 @@ import org.bukkit.inventory.ShapelessRecipe;
 
 public class CraftShapelessRecipe extends ShapelessRecipe implements CraftRecipe {
     // TODO: Could eventually use this to add a matches() method or some such
-    private ShapelessRecipes recipe;
+    private net.minecraft.world.item.crafting.ShapelessRecipe recipe;
 
     public CraftShapelessRecipe(NamespacedKey key, ItemStack result) {
         super(key, result);
     }
 
-    public CraftShapelessRecipe(NamespacedKey key, ItemStack result, ShapelessRecipes recipe) {
+    public CraftShapelessRecipe(NamespacedKey key, ItemStack result, net.minecraft.world.item.crafting.ShapelessRecipe recipe) {
         this(key, result);
         this.recipe = recipe;
     }
@@ -40,11 +39,11 @@ public class CraftShapelessRecipe extends ShapelessRecipe implements CraftRecipe
     @Override
     public void addToCraftingManager() {
         List<org.bukkit.inventory.RecipeChoice> ingred = this.getChoiceList();
-        List<RecipeItemStack> data = new ArrayList<>(ingred.size());
+        List<Ingredient> data = new ArrayList<>(ingred.size());
         for (org.bukkit.inventory.RecipeChoice i : ingred) {
-            data.add(toNMS(i, true));
+            data.add(this.toNMS(i, true));
         }
 
-        MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftRecipe.toMinecraft(this.getKey()), new ShapelessRecipes(this.getGroup(), CraftRecipe.getCategory(this.getCategory()), CraftItemStack.asNMSCopy(this.getResult()), data)));
+        MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftRecipe.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.ShapelessRecipe(this.getGroup(), CraftRecipe.getCategory(this.getCategory()), CraftItemStack.asNMSCopy(this.getResult()), data)));
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTransformRecipe.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTransformRecipe.java
index 2a518ac135..0dc2be8f50 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTransformRecipe.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTransformRecipe.java
@@ -24,6 +24,6 @@ public class CraftSmithingTransformRecipe extends SmithingTransformRecipe implem
     public void addToCraftingManager() {
         ItemStack result = this.getResult();
 
-        MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftRecipe.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTransformRecipe(toNMSOptional(this.getTemplate(), false), toNMSOptional(this.getBase(), false), toNMSOptional(this.getAddition(), false), CraftItemStack.asNMSCopy(result))));
+        MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftRecipe.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTransformRecipe(this.toNMSOptional(this.getTemplate(), false), this.toNMSOptional(this.getBase(), false), this.toNMSOptional(this.getAddition(), false), CraftItemStack.asNMSCopy(result))));
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTrimRecipe.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTrimRecipe.java
index 339dcbfc7e..202963e2f5 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTrimRecipe.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmithingTrimRecipe.java
@@ -22,6 +22,6 @@ public class CraftSmithingTrimRecipe extends SmithingTrimRecipe implements Craft
 
     @Override
     public void addToCraftingManager() {
-        MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftRecipe.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTrimRecipe(toNMSOptional(this.getTemplate(), false), toNMSOptional(this.getBase(), false), toNMSOptional(this.getAddition(), false))));
+        MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftRecipe.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmithingTrimRecipe(this.toNMSOptional(this.getTemplate(), false), this.toNMSOptional(this.getBase(), false), this.toNMSOptional(this.getAddition(), false))));
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmokingRecipe.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmokingRecipe.java
index 69e3b32565..2b57383997 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmokingRecipe.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftSmokingRecipe.java
@@ -26,6 +26,6 @@ public class CraftSmokingRecipe extends SmokingRecipe implements CraftRecipe {
     public void addToCraftingManager() {
         ItemStack result = this.getResult();
 
-        MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftRecipe.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.RecipeSmoking(this.getGroup(), CraftRecipe.getCategory(this.getCategory()), toNMS(this.getInputChoice(), true), CraftItemStack.asNMSCopy(result), getExperience(), getCookingTime())));
+        MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftRecipe.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.SmokingRecipe(this.getGroup(), CraftRecipe.getCategory(this.getCategory()), this.toNMS(this.getInputChoice(), true), CraftItemStack.asNMSCopy(result), this.getExperience(), this.getCookingTime())));
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftStonecuttingRecipe.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftStonecuttingRecipe.java
index 1515c7b1f5..723701283f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftStonecuttingRecipe.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftStonecuttingRecipe.java
@@ -25,6 +25,6 @@ public class CraftStonecuttingRecipe extends StonecuttingRecipe implements Craft
     public void addToCraftingManager() {
         ItemStack result = this.getResult();
 
-        MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftRecipe.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.RecipeStonecutting(this.getGroup(), toNMS(this.getInputChoice(), true), CraftItemStack.asNMSCopy(result))));
+        MinecraftServer.getServer().getRecipeManager().addRecipe(new RecipeHolder<>(CraftRecipe.toMinecraft(this.getKey()), new net.minecraft.world.item.crafting.StonecutterRecipe(this.getGroup(), this.toNMS(this.getInputChoice(), true), CraftItemStack.asNMSCopy(result))));
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftTransmuteRecipe.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftTransmuteRecipe.java
index 6af50aaa6b..0b4600d1a3 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftTransmuteRecipe.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/CraftTransmuteRecipe.java
@@ -30,8 +30,8 @@ public class CraftTransmuteRecipe extends TransmuteRecipe implements CraftRecipe
                 new RecipeHolder<>(CraftRecipe.toMinecraft(this.getKey()),
                         new net.minecraft.world.item.crafting.TransmuteRecipe(this.getGroup(),
                                 CraftRecipe.getCategory(this.getCategory()),
-                                toNMS(this.getInput(), true),
-                                toNMS(this.getMaterial(), true),
+                                this.toNMS(this.getInput(), true),
+                                this.toNMS(this.getMaterial(), true),
                                 Holder.direct(CraftItemType.bukkitToMinecraft(this.getResult().getType()))
                         )
                 )
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/InventoryIterator.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/InventoryIterator.java
index 10dec4165c..5b86936189 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/InventoryIterator.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/InventoryIterator.java
@@ -22,41 +22,41 @@ public class InventoryIterator implements ListIterator<ItemStack> {
 
     @Override
     public boolean hasNext() {
-        return nextIndex < inventory.getSize();
+        return this.nextIndex < this.inventory.getSize();
     }
 
     @Override
     public ItemStack next() {
-        lastDirection = true;
-        return inventory.getItem(nextIndex++);
+        this.lastDirection = true;
+        return this.inventory.getItem(this.nextIndex++);
     }
 
     @Override
     public int nextIndex() {
-        return nextIndex;
+        return this.nextIndex;
     }
 
     @Override
     public boolean hasPrevious() {
-        return nextIndex > 0;
+        return this.nextIndex > 0;
     }
 
     @Override
     public ItemStack previous() {
-        lastDirection = false;
-        return inventory.getItem(--nextIndex);
+        this.lastDirection = false;
+        return this.inventory.getItem(--this.nextIndex);
     }
 
     @Override
     public int previousIndex() {
-        return nextIndex - 1;
+        return this.nextIndex - 1;
     }
 
     @Override
     public void set(ItemStack item) {
-        Preconditions.checkState(lastDirection != null, "No current item!");
-        int i = lastDirection ? nextIndex - 1 : nextIndex;
-        inventory.setItem(i, item);
+        Preconditions.checkState(this.lastDirection != null, "No current item!");
+        int i = this.lastDirection ? this.nextIndex - 1 : this.nextIndex;
+        this.inventory.setItem(i, item);
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java
index 460b29e540..4e0f7564f0 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/RecipeIterator.java
@@ -4,11 +4,11 @@ import java.util.Iterator;
 import java.util.Map;
 import net.minecraft.server.MinecraftServer;
 import net.minecraft.world.item.crafting.RecipeHolder;
-import net.minecraft.world.item.crafting.Recipes;
+import net.minecraft.world.item.crafting.RecipeType;
 import org.bukkit.inventory.Recipe;
 
 public class RecipeIterator implements Iterator<Recipe> {
-    private final Iterator<Map.Entry<Recipes<?>, RecipeHolder<?>>> recipes;
+    private final Iterator<Map.Entry<RecipeType<?>, RecipeHolder<?>>> recipes;
 
     public RecipeIterator() {
         this.recipes = MinecraftServer.getServer().getRecipeManager().recipes.byType.entries().iterator();
@@ -16,16 +16,16 @@ public class RecipeIterator implements Iterator<Recipe> {
 
     @Override
     public boolean hasNext() {
-        return recipes.hasNext();
+        return this.recipes.hasNext();
     }
 
     @Override
     public Recipe next() {
-        return recipes.next().getValue().toBukkitRecipe();
+        return this.recipes.next().getValue().toBukkitRecipe();
     }
 
     @Override
     public void remove() {
-        recipes.remove();
+        this.recipes.remove();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/SerializableMeta.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/SerializableMeta.java
index d5419df164..7c07ce8af5 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/SerializableMeta.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/SerializableMeta.java
@@ -68,11 +68,11 @@ public final class SerializableMeta implements ConfigurationSerializable {
     public static ItemMeta deserialize(Map<String, Object> map) throws Throwable {
         Preconditions.checkArgument(map != null, "Cannot deserialize null map");
 
-        String type = getString(map, TYPE_FIELD, false);
-        Constructor<? extends CraftMetaItem> constructor = constructorMap.get(type);
+        String type = SerializableMeta.getString(map, SerializableMeta.TYPE_FIELD, false);
+        Constructor<? extends CraftMetaItem> constructor = SerializableMeta.constructorMap.get(type);
 
         if (constructor == null) {
-            throw new IllegalArgumentException(type + " is not a valid " + TYPE_FIELD);
+            throw new IllegalArgumentException(type + " is not a valid " + SerializableMeta.TYPE_FIELD);
         }
 
         try {
@@ -98,16 +98,16 @@ public final class SerializableMeta implements ConfigurationSerializable {
     }
 
     public static String getString(Map<?, ?> map, Object field, boolean nullable) {
-        return getObject(String.class, map, field, nullable);
+        return SerializableMeta.getObject(String.class, map, field, nullable);
     }
 
     public static boolean getBoolean(Map<?, ?> map, Object field) {
-        Boolean value = getObject(Boolean.class, map, field, true);
+        Boolean value = SerializableMeta.getObject(Boolean.class, map, field, true);
         return value != null && value;
     }
 
     public static int getInteger(Map<?, ?> map, Object field) {
-        Integer value = getObject(Integer.class, map, field, true);
+        Integer value = SerializableMeta.getObject(Integer.class, map, field, true);
         return value != null ? value : 0;
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftCustomModelDataComponent.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftCustomModelDataComponent.java
index 634da06599..53de6a9b0e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftCustomModelDataComponent.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftCustomModelDataComponent.java
@@ -26,7 +26,7 @@ public final class CraftCustomModelDataComponent implements CustomModelDataCompo
     }
 
     public CraftCustomModelDataComponent(Map<String, Object> map) {
-        handle = new CustomModelData(
+        this.handle = new CustomModelData(
                 SerializableMeta.getList(Float.class, map, "floats"),
                 SerializableMeta.getList(Boolean.class, map, "flags"),
                 SerializableMeta.getList(String.class, map, "strings"),
@@ -38,56 +38,56 @@ public final class CraftCustomModelDataComponent implements CustomModelDataCompo
     public Map<String, Object> serialize() {
         Map<String, Object> result = new LinkedHashMap<>();
 
-        result.put("floats", getFloats());
-        result.put("flags", getFlags());
-        result.put("strings", getStrings());
-        result.put("colors", getColors());
+        result.put("floats", this.getFloats());
+        result.put("flags", this.getFlags());
+        result.put("strings", this.getStrings());
+        result.put("colors", this.getColors());
 
         return result;
     }
 
     public CustomModelData getHandle() {
-        return handle;
+        return this.handle;
     }
 
     @Override
     public List<Float> getFloats() {
-        return Collections.unmodifiableList(handle.floats());
+        return Collections.unmodifiableList(this.handle.floats());
     }
 
     @Override
     public void setFloats(List<Float> floats) {
-        handle = new CustomModelData(new ArrayList<>(floats), handle.flags(), handle.strings(), handle.colors());
+        this.handle = new CustomModelData(new ArrayList<>(floats), this.handle.flags(), this.handle.strings(), this.handle.colors());
     }
 
     @Override
     public List<Boolean> getFlags() {
-        return Collections.unmodifiableList(handle.flags());
+        return Collections.unmodifiableList(this.handle.flags());
     }
 
     @Override
     public void setFlags(List<Boolean> flags) {
-        handle = new CustomModelData(handle.floats(), new ArrayList<>(handle.flags()), handle.strings(), handle.colors());
+        this.handle = new CustomModelData(this.handle.floats(), new ArrayList<>(this.handle.flags()), this.handle.strings(), this.handle.colors());
     }
 
     @Override
     public List<String> getStrings() {
-        return Collections.unmodifiableList(handle.strings());
+        return Collections.unmodifiableList(this.handle.strings());
     }
 
     @Override
     public void setStrings(List<String> strings) {
-        handle = new CustomModelData(handle.floats(), handle.flags(), new ArrayList<>(handle.strings()), handle.colors());
+        this.handle = new CustomModelData(this.handle.floats(), this.handle.flags(), new ArrayList<>(this.handle.strings()), this.handle.colors());
     }
 
     @Override
     public List<Color> getColors() {
-        return getHandle().colors().stream().map(Color::fromRGB).toList();
+        return this.getHandle().colors().stream().map(Color::fromRGB).toList();
     }
 
     @Override
     public void setColors(List<Color> colors) {
-        handle = new CustomModelData(handle.floats(), handle.flags(), handle.strings(), new ArrayList<>(handle.colors()));
+        this.handle = new CustomModelData(this.handle.floats(), this.handle.flags(), this.handle.strings(), new ArrayList<>(this.handle.colors()));
     }
 
     @Override
@@ -98,7 +98,7 @@ public final class CraftCustomModelDataComponent implements CustomModelDataCompo
         if (obj == null) {
             return false;
         }
-        if (getClass() != obj.getClass()) {
+        if (this.getClass() != obj.getClass()) {
             return false;
         }
         final CraftCustomModelDataComponent other = (CraftCustomModelDataComponent) obj;
@@ -114,6 +114,6 @@ public final class CraftCustomModelDataComponent implements CustomModelDataCompo
 
     @Override
     public String toString() {
-        return "CraftCustomModelDataComponent{" + "handle=" + handle + '}';
+        return "CraftCustomModelDataComponent{" + "handle=" + this.handle + '}';
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftEquippableComponent.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftEquippableComponent.java
index 56b825fe52..eaa7c3b498 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftEquippableComponent.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftEquippableComponent.java
@@ -11,11 +11,9 @@ import net.minecraft.core.Holder;
 import net.minecraft.core.HolderSet;
 import net.minecraft.core.registries.BuiltInRegistries;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.resources.MinecraftKey;
 import net.minecraft.resources.ResourceKey;
-import net.minecraft.sounds.SoundEffects;
-import net.minecraft.world.entity.EntityTypes;
-import net.minecraft.world.entity.EnumItemSlot;
+import net.minecraft.resources.ResourceLocation;
+import net.minecraft.sounds.SoundEvents;
 import net.minecraft.world.item.equipment.EquipmentAssets;
 import net.minecraft.world.item.equipment.Equippable;
 import org.bukkit.NamespacedKey;
@@ -47,7 +45,7 @@ public final class CraftEquippableComponent implements EquippableComponent {
     }
 
     public CraftEquippableComponent(Map<String, Object> map) {
-        EnumItemSlot slot = CraftEquipmentSlot.getNMS(EquipmentSlot.valueOf(SerializableMeta.getString(map, "slot", false)));
+        net.minecraft.world.entity.EquipmentSlot slot = CraftEquipmentSlot.getNMS(EquipmentSlot.valueOf(SerializableMeta.getString(map, "slot", false)));
 
         Sound equipSound = null;
         String snd = SerializableMeta.getString(map, "equip-sound", true);
@@ -58,7 +56,7 @@ public final class CraftEquippableComponent implements EquippableComponent {
         String model = SerializableMeta.getString(map, "model", true);
         String cameraOverlay = SerializableMeta.getString(map, "camera-overlay", true);
 
-        HolderSet<EntityTypes<?>> allowedEntities = null;
+        HolderSet<net.minecraft.world.entity.EntityType<?>> allowedEntities = null;
         Object allowed = SerializableMeta.getObject(Object.class, map, "allowed-entities", true);
         if (allowed != null) {
             allowedEntities = CraftHolderUtil.parse(allowed, Registries.ENTITY_TYPE, BuiltInRegistries.ENTITY_TYPE);
@@ -69,9 +67,9 @@ public final class CraftEquippableComponent implements EquippableComponent {
         Boolean damageOnHurt = SerializableMeta.getObject(Boolean.class, map, "damage-on-hurt", true);
 
         this.handle = new Equippable(slot,
-                (equipSound != null) ? CraftSound.bukkitToMinecraftHolder(equipSound) : SoundEffects.ARMOR_EQUIP_GENERIC,
-                Optional.ofNullable(model).map(MinecraftKey::parse).map((k) -> ResourceKey.create(EquipmentAssets.ROOT_ID, k)),
-                Optional.ofNullable(cameraOverlay).map(MinecraftKey::parse),
+                (equipSound != null) ? CraftSound.bukkitToMinecraftHolder(equipSound) : SoundEvents.ARMOR_EQUIP_GENERIC,
+                Optional.ofNullable(model).map(ResourceLocation::parse).map((k) -> ResourceKey.create(EquipmentAssets.ROOT_ID, k)),
+                Optional.ofNullable(cameraOverlay).map(ResourceLocation::parse),
                 Optional.ofNullable(allowedEntities),
                 (dispensable != null) ? dispensable : true,
                 (swappable != null) ? swappable : true,
@@ -82,93 +80,93 @@ public final class CraftEquippableComponent implements EquippableComponent {
     @Override
     public Map<String, Object> serialize() {
         Map<String, Object> result = new LinkedHashMap<>();
-        result.put("slot", getSlot().name());
-        result.put("equip-sound", getEquipSound().getKey().toString());
+        result.put("slot", this.getSlot().name());
+        result.put("equip-sound", this.getEquipSound().getKey().toString());
 
-        NamespacedKey model = getModel();
+        NamespacedKey model = this.getModel();
         if (model != null) {
             result.put("model", model.toString());
         }
 
-        NamespacedKey cameraOverlay = getCameraOverlay();
+        NamespacedKey cameraOverlay = this.getCameraOverlay();
         if (cameraOverlay != null) {
             result.put("camera-overlay", cameraOverlay.toString());
         }
 
-        Optional<HolderSet<EntityTypes<?>>> allowed = handle.allowedEntities();
+        Optional<HolderSet<net.minecraft.world.entity.EntityType<?>>> allowed = this.handle.allowedEntities();
         if (allowed.isPresent()) {
             CraftHolderUtil.serialize(result, "allowed-entities", allowed.get());
         }
 
-        result.put("dispensable", isDispensable());
-        result.put("swappable", isSwappable());
-        result.put("damage-on-hurt", isDamageOnHurt());
+        result.put("dispensable", this.isDispensable());
+        result.put("swappable", this.isSwappable());
+        result.put("damage-on-hurt", this.isDamageOnHurt());
 
         return result;
     }
 
     public Equippable getHandle() {
-        return handle;
+        return this.handle;
     }
 
     @Override
     public EquipmentSlot getSlot() {
-        return CraftEquipmentSlot.getSlot(handle.slot());
+        return CraftEquipmentSlot.getSlot(this.handle.slot());
     }
 
     @Override
     public void setSlot(EquipmentSlot slot) {
-        handle = new Equippable(CraftEquipmentSlot.getNMS(slot), handle.equipSound(), handle.assetId(), handle.cameraOverlay(), handle.allowedEntities(), handle.dispensable(), handle.swappable(), handle.damageOnHurt());
+        this.handle = new Equippable(CraftEquipmentSlot.getNMS(slot), this.handle.equipSound(), this.handle.assetId(), this.handle.cameraOverlay(), this.handle.allowedEntities(), this.handle.dispensable(), this.handle.swappable(), this.handle.damageOnHurt());
     }
 
     @Override
     public Sound getEquipSound() {
-        return CraftSound.minecraftToBukkit(handle.equipSound().value());
+        return CraftSound.minecraftToBukkit(this.handle.equipSound().value());
     }
 
     @Override
     public void setEquipSound(Sound sound) {
-        handle = new Equippable(handle.slot(), (sound != null) ? CraftSound.bukkitToMinecraftHolder(sound) : SoundEffects.ARMOR_EQUIP_GENERIC, handle.assetId(), handle.cameraOverlay(), handle.allowedEntities(), handle.dispensable(), handle.swappable(), handle.damageOnHurt());
+        this.handle = new Equippable(this.handle.slot(), (sound != null) ? CraftSound.bukkitToMinecraftHolder(sound) : SoundEvents.ARMOR_EQUIP_GENERIC, this.handle.assetId(), this.handle.cameraOverlay(), this.handle.allowedEntities(), this.handle.dispensable(), this.handle.swappable(), this.handle.damageOnHurt());
     }
 
     @Override
     public NamespacedKey getModel() {
-        return handle.assetId().map((a) -> CraftNamespacedKey.fromMinecraft(a.location())).orElse(null);
+        return this.handle.assetId().map((a) -> CraftNamespacedKey.fromMinecraft(a.location())).orElse(null);
     }
 
     @Override
     public void setModel(NamespacedKey key) {
-        handle = new Equippable(handle.slot(), handle.equipSound(), Optional.ofNullable(key).map(CraftNamespacedKey::toMinecraft).map((k) -> ResourceKey.create(EquipmentAssets.ROOT_ID, k)), handle.cameraOverlay(), handle.allowedEntities(), handle.dispensable(), handle.swappable(), handle.damageOnHurt());
+        this.handle = new Equippable(this.handle.slot(), this.handle.equipSound(), Optional.ofNullable(key).map(CraftNamespacedKey::toMinecraft).map((k) -> ResourceKey.create(EquipmentAssets.ROOT_ID, k)), this.handle.cameraOverlay(), this.handle.allowedEntities(), this.handle.dispensable(), this.handle.swappable(), this.handle.damageOnHurt());
     }
 
     @Override
     public NamespacedKey getCameraOverlay() {
-        return handle.cameraOverlay().map(CraftNamespacedKey::fromMinecraft).orElse(null);
+        return this.handle.cameraOverlay().map(CraftNamespacedKey::fromMinecraft).orElse(null);
     }
 
     @Override
     public void setCameraOverlay(NamespacedKey key) {
-        handle = new Equippable(handle.slot(), handle.equipSound(), handle.assetId(), Optional.ofNullable(key).map(CraftNamespacedKey::toMinecraft), handle.allowedEntities(), handle.dispensable(), handle.swappable(), handle.damageOnHurt());
+        this.handle = new Equippable(this.handle.slot(), this.handle.equipSound(), this.handle.assetId(), Optional.ofNullable(key).map(CraftNamespacedKey::toMinecraft), this.handle.allowedEntities(), this.handle.dispensable(), this.handle.swappable(), this.handle.damageOnHurt());
     }
 
     @Override
     public Collection<EntityType> getAllowedEntities() {
-        return handle.allowedEntities().map(HolderSet::stream).map((stream) -> stream.map(Holder::value).map(CraftEntityType::minecraftToBukkit).collect(Collectors.toList())).orElse(null);
+        return this.handle.allowedEntities().map(HolderSet::stream).map((stream) -> stream.map(Holder::value).map(CraftEntityType::minecraftToBukkit).collect(Collectors.toList())).orElse(null);
     }
 
     @Override
     public void setAllowedEntities(EntityType entities) {
-        handle = new Equippable(handle.slot(), handle.equipSound(), handle.assetId(), handle.cameraOverlay(),
+        this.handle = new Equippable(this.handle.slot(), this.handle.equipSound(), this.handle.assetId(), this.handle.cameraOverlay(),
                 (entities != null) ? Optional.of(HolderSet.direct(CraftEntityType.bukkitToMinecraftHolder(entities))) : Optional.empty(),
-                handle.dispensable(), handle.swappable(), handle.damageOnHurt()
+                this.handle.dispensable(), this.handle.swappable(), this.handle.damageOnHurt()
         );
     }
 
     @Override
     public void setAllowedEntities(Collection<EntityType> entities) {
-        handle = new Equippable(handle.slot(), handle.equipSound(), handle.assetId(), handle.cameraOverlay(),
+        this.handle = new Equippable(this.handle.slot(), this.handle.equipSound(), this.handle.assetId(), this.handle.cameraOverlay(),
                 (entities != null) ? Optional.of(HolderSet.direct(entities.stream().map(CraftEntityType::bukkitToMinecraftHolder).collect(Collectors.toList()))) : Optional.empty(),
-                handle.dispensable(), handle.swappable(), handle.damageOnHurt()
+                this.handle.dispensable(), this.handle.swappable(), this.handle.damageOnHurt()
         );
     }
 
@@ -176,40 +174,40 @@ public final class CraftEquippableComponent implements EquippableComponent {
     public void setAllowedEntities(Tag<EntityType> tag) {
         Preconditions.checkArgument(tag instanceof CraftEntityTag, "tag must be an entity tag");
 
-        handle = new Equippable(handle.slot(), handle.equipSound(), handle.assetId(), handle.cameraOverlay(),
+        this.handle = new Equippable(this.handle.slot(), this.handle.equipSound(), this.handle.assetId(), this.handle.cameraOverlay(),
                 (tag != null) ? Optional.of(((CraftEntityTag) tag).getHandle()) : Optional.empty(),
-                handle.dispensable(), handle.swappable(), handle.damageOnHurt()
+                this.handle.dispensable(), this.handle.swappable(), this.handle.damageOnHurt()
         );
     }
 
     @Override
     public boolean isDispensable() {
-        return handle.dispensable();
+        return this.handle.dispensable();
     }
 
     @Override
     public void setDispensable(boolean dispensable) {
-        handle = new Equippable(handle.slot(), handle.equipSound(), handle.assetId(), handle.cameraOverlay(), handle.allowedEntities(), dispensable, handle.swappable(), handle.damageOnHurt());
+        this.handle = new Equippable(this.handle.slot(), this.handle.equipSound(), this.handle.assetId(), this.handle.cameraOverlay(), this.handle.allowedEntities(), dispensable, this.handle.swappable(), this.handle.damageOnHurt());
     }
 
     @Override
     public boolean isSwappable() {
-        return handle.swappable();
+        return this.handle.swappable();
     }
 
     @Override
     public void setSwappable(boolean swappable) {
-        handle = new Equippable(handle.slot(), handle.equipSound(), handle.assetId(), handle.cameraOverlay(), handle.allowedEntities(), handle.dispensable(), swappable, handle.damageOnHurt());
+        this.handle = new Equippable(this.handle.slot(), this.handle.equipSound(), this.handle.assetId(), this.handle.cameraOverlay(), this.handle.allowedEntities(), this.handle.dispensable(), swappable, this.handle.damageOnHurt());
     }
 
     @Override
     public boolean isDamageOnHurt() {
-        return handle.damageOnHurt();
+        return this.handle.damageOnHurt();
     }
 
     @Override
     public void setDamageOnHurt(boolean damage) {
-        handle = new Equippable(handle.slot(), handle.equipSound(), handle.assetId(), handle.cameraOverlay(), handle.allowedEntities(), handle.dispensable(), handle.swappable(), damage);
+        this.handle = new Equippable(this.handle.slot(), this.handle.equipSound(), this.handle.assetId(), this.handle.cameraOverlay(), this.handle.allowedEntities(), this.handle.dispensable(), this.handle.swappable(), damage);
     }
 
     @Override
@@ -220,7 +218,7 @@ public final class CraftEquippableComponent implements EquippableComponent {
         if (obj == null) {
             return false;
         }
-        if (getClass() != obj.getClass()) {
+        if (this.getClass() != obj.getClass()) {
             return false;
         }
         final CraftEquippableComponent other = (CraftEquippableComponent) obj;
@@ -236,6 +234,6 @@ public final class CraftEquippableComponent implements EquippableComponent {
 
     @Override
     public String toString() {
-        return "CraftEquippableComponent{" + "handle=" + handle + '}';
+        return "CraftEquippableComponent{" + "handle=" + this.handle + '}';
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftFoodComponent.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftFoodComponent.java
index f121f46b47..e3946cfb56 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftFoodComponent.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftFoodComponent.java
@@ -4,7 +4,7 @@ import com.google.common.base.Preconditions;
 import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Objects;
-import net.minecraft.world.food.FoodInfo;
+import net.minecraft.world.food.FoodProperties;
 import org.bukkit.configuration.serialization.SerializableAs;
 import org.bukkit.craftbukkit.inventory.SerializableMeta;
 import org.bukkit.inventory.meta.components.FoodComponent;
@@ -12,9 +12,9 @@ import org.bukkit.inventory.meta.components.FoodComponent;
 @SerializableAs("Food")
 public final class CraftFoodComponent implements FoodComponent {
 
-    private FoodInfo handle;
+    private FoodProperties handle;
 
-    public CraftFoodComponent(FoodInfo food) {
+    public CraftFoodComponent(FoodProperties food) {
         this.handle = food;
     }
 
@@ -27,52 +27,52 @@ public final class CraftFoodComponent implements FoodComponent {
         Float saturationModifier = SerializableMeta.getObject(Float.class, map, "saturation", false);
         Boolean canAlwaysEat = SerializableMeta.getBoolean(map, "can-always-eat");
 
-        this.handle = new FoodInfo(nutrition, saturationModifier, canAlwaysEat);
+        this.handle = new FoodProperties(nutrition, saturationModifier, canAlwaysEat);
     }
 
     @Override
     public Map<String, Object> serialize() {
         Map<String, Object> result = new LinkedHashMap<>();
-        result.put("nutrition", getNutrition());
-        result.put("saturation", getSaturation());
-        result.put("can-always-eat", canAlwaysEat());
+        result.put("nutrition", this.getNutrition());
+        result.put("saturation", this.getSaturation());
+        result.put("can-always-eat", this.canAlwaysEat());
 
         return result;
     }
 
-    public FoodInfo getHandle() {
-        return handle;
+    public FoodProperties getHandle() {
+        return this.handle;
     }
 
     @Override
     public int getNutrition() {
-        return handle.nutrition();
+        return this.handle.nutrition();
     }
 
     @Override
     public void setNutrition(int nutrition) {
         Preconditions.checkArgument(nutrition >= 0, "Nutrition cannot be negative");
-        handle = new FoodInfo(nutrition, handle.saturation(), handle.canAlwaysEat());
+        this.handle = new FoodProperties(nutrition, this.handle.saturation(), this.handle.canAlwaysEat());
     }
 
     @Override
     public float getSaturation() {
-        return handle.saturation();
+        return this.handle.saturation();
     }
 
     @Override
     public void setSaturation(float saturation) {
-        handle = new FoodInfo(handle.nutrition(), saturation, handle.canAlwaysEat());
+        this.handle = new FoodProperties(this.handle.nutrition(), saturation, this.handle.canAlwaysEat());
     }
 
     @Override
     public boolean canAlwaysEat() {
-        return handle.canAlwaysEat();
+        return this.handle.canAlwaysEat();
     }
 
     @Override
     public void setCanAlwaysEat(boolean canAlwaysEat) {
-        handle = new FoodInfo(handle.nutrition(), handle.saturation(), canAlwaysEat);
+        this.handle = new FoodProperties(this.handle.nutrition(), this.handle.saturation(), canAlwaysEat);
     }
 
     @Override
@@ -90,7 +90,7 @@ public final class CraftFoodComponent implements FoodComponent {
         if (obj == null) {
             return false;
         }
-        if (getClass() != obj.getClass()) {
+        if (this.getClass() != obj.getClass()) {
             return false;
         }
         final CraftFoodComponent other = (CraftFoodComponent) obj;
@@ -99,6 +99,6 @@ public final class CraftFoodComponent implements FoodComponent {
 
     @Override
     public String toString() {
-        return "CraftFoodComponent{" + "handle=" + handle + '}';
+        return "CraftFoodComponent{" + "handle=" + this.handle + '}';
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftHolderUtil.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftHolderUtil.java
index 0f1e5e74ef..0efac11c51 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftHolderUtil.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftHolderUtil.java
@@ -5,9 +5,9 @@ import java.util.List;
 import java.util.Map;
 import net.minecraft.core.Holder;
 import net.minecraft.core.HolderSet;
-import net.minecraft.core.IRegistry;
-import net.minecraft.resources.MinecraftKey;
+import net.minecraft.core.Registry;
 import net.minecraft.resources.ResourceKey;
+import net.minecraft.resources.ResourceLocation;
 import net.minecraft.tags.TagKey;
 
 final class CraftHolderUtil {
@@ -21,20 +21,20 @@ final class CraftHolderUtil {
                 .ifRight(list -> result.put(key, list.stream().map((entry) -> entry.unwrapKey().orElseThrow().location().toString()).toList())); // List
     }
 
-    public static <T> HolderSet<T> parse(Object parseObject, ResourceKey<IRegistry<T>> registryKey, IRegistry<T> registry) {
+    public static <T> HolderSet<T> parse(Object parseObject, ResourceKey<Registry<T>> registryKey, Registry<T> registry) {
         HolderSet<T> holderSet = null;
 
         if (parseObject instanceof String parseString && parseString.startsWith("#")) { // Tag
             parseString = parseString.substring(1);
-            MinecraftKey key = MinecraftKey.tryParse(parseString);
+            ResourceLocation key = ResourceLocation.tryParse(parseString);
             if (key != null) {
                 holderSet = registry.get(TagKey.create(registryKey, key)).orElse(null);
             }
         } else if (parseObject instanceof List parseList) { // List
-            List<Holder.c<T>> holderList = new ArrayList<>(parseList.size());
+            List<Holder.Reference<T>> holderList = new ArrayList<>(parseList.size());
 
             for (Object entry : parseList) {
-                MinecraftKey key = MinecraftKey.tryParse(entry.toString());
+                ResourceLocation key = ResourceLocation.tryParse(entry.toString());
                 if (key == null) {
                     continue;
                 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftJukeboxComponent.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftJukeboxComponent.java
index 78ac53c69d..c17fed67dc 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftJukeboxComponent.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftJukeboxComponent.java
@@ -7,8 +7,8 @@ import java.util.Objects;
 import java.util.Optional;
 import net.minecraft.core.Holder;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.resources.MinecraftKey;
 import net.minecraft.resources.ResourceKey;
+import net.minecraft.resources.ResourceLocation;
 import net.minecraft.world.item.EitherHolder;
 import net.minecraft.world.item.JukeboxPlayable;
 import org.bukkit.JukeboxSong;
@@ -37,54 +37,54 @@ public final class CraftJukeboxComponent implements JukeboxPlayableComponent {
         String song = SerializableMeta.getObject(String.class, map, "song", false);
         Boolean showTooltip = SerializableMeta.getObject(Boolean.class, map, "show-in-tooltip", true);
 
-        this.handle = new JukeboxPlayable(new EitherHolder<>(ResourceKey.create(Registries.JUKEBOX_SONG, MinecraftKey.parse(song))), (showTooltip != null) ? showTooltip : true);
+        this.handle = new JukeboxPlayable(new EitherHolder<>(ResourceKey.create(Registries.JUKEBOX_SONG, ResourceLocation.parse(song))), (showTooltip != null) ? showTooltip : true);
     }
 
     @Override
     public Map<String, Object> serialize() {
         Map<String, Object> result = new LinkedHashMap<>();
-        result.put("song", getSongKey().toString());
-        result.put("show-in-tooltip", isShowInTooltip());
+        result.put("song", this.getSongKey().toString());
+        result.put("show-in-tooltip", this.isShowInTooltip());
         return result;
     }
 
     public JukeboxPlayable getHandle() {
-        return handle;
+        return this.handle;
     }
 
     @Override
     public JukeboxSong getSong() {
-        Optional<Holder<net.minecraft.world.item.JukeboxSong>> song = handle.song().unwrap(CraftRegistry.getMinecraftRegistry());
+        Optional<Holder<net.minecraft.world.item.JukeboxSong>> song = this.handle.song().unwrap(CraftRegistry.getMinecraftRegistry());
         return (song.isPresent()) ? CraftJukeboxSong.minecraftHolderToBukkit(song.get()) : null;
     }
 
     @Override
     public NamespacedKey getSongKey() {
-        return CraftNamespacedKey.fromMinecraft(handle.song().key().location());
+        return CraftNamespacedKey.fromMinecraft(this.handle.song().key().location());
     }
 
     @Override
     public void setSong(JukeboxSong song) {
         Preconditions.checkArgument(song != null, "song cannot be null");
 
-        handle = new JukeboxPlayable(new EitherHolder<>(CraftJukeboxSong.bukkitToMinecraftHolder(song)), handle.showInTooltip());
+        this.handle = new JukeboxPlayable(new EitherHolder<>(CraftJukeboxSong.bukkitToMinecraftHolder(song)), this.handle.showInTooltip());
     }
 
     @Override
     public void setSongKey(NamespacedKey song) {
         Preconditions.checkArgument(song != null, "song cannot be null");
 
-        handle = new JukeboxPlayable(new EitherHolder<>(ResourceKey.create(Registries.JUKEBOX_SONG, CraftNamespacedKey.toMinecraft(song))), handle.showInTooltip());
+        this.handle = new JukeboxPlayable(new EitherHolder<>(ResourceKey.create(Registries.JUKEBOX_SONG, CraftNamespacedKey.toMinecraft(song))), this.handle.showInTooltip());
     }
 
     @Override
     public boolean isShowInTooltip() {
-        return handle.showInTooltip();
+        return this.handle.showInTooltip();
     }
 
     @Override
     public void setShowInTooltip(boolean show) {
-        handle = new JukeboxPlayable(handle.song(), show);
+        this.handle = new JukeboxPlayable(this.handle.song(), show);
     }
 
     @Override
@@ -102,7 +102,7 @@ public final class CraftJukeboxComponent implements JukeboxPlayableComponent {
         if (obj == null) {
             return false;
         }
-        if (getClass() != obj.getClass()) {
+        if (this.getClass() != obj.getClass()) {
             return false;
         }
         final CraftJukeboxComponent other = (CraftJukeboxComponent) obj;
@@ -111,6 +111,6 @@ public final class CraftJukeboxComponent implements JukeboxPlayableComponent {
 
     @Override
     public String toString() {
-        return "CraftJukeboxComponent{" + "handle=" + handle + '}';
+        return "CraftJukeboxComponent{" + "handle=" + this.handle + '}';
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftToolComponent.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftToolComponent.java
index 1484ac8ea4..9a4a1d903c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftToolComponent.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftToolComponent.java
@@ -60,46 +60,46 @@ public final class CraftToolComponent implements ToolComponent {
     @Override
     public Map<String, Object> serialize() {
         Map<String, Object> result = new LinkedHashMap<>();
-        result.put("default-mining-speed", getDefaultMiningSpeed());
-        result.put("damage-per-block", getDamagePerBlock());
-        result.put("rules", getRules());
+        result.put("default-mining-speed", this.getDefaultMiningSpeed());
+        result.put("damage-per-block", this.getDamagePerBlock());
+        result.put("rules", this.getRules());
         return result;
     }
 
     public Tool getHandle() {
-        return handle;
+        return this.handle;
     }
 
     @Override
     public float getDefaultMiningSpeed() {
-        return handle.defaultMiningSpeed();
+        return this.handle.defaultMiningSpeed();
     }
 
     @Override
     public void setDefaultMiningSpeed(float speed) {
-        handle = new Tool(handle.rules(), speed, handle.damagePerBlock());
+        this.handle = new Tool(this.handle.rules(), speed, this.handle.damagePerBlock());
     }
 
     @Override
     public int getDamagePerBlock() {
-        return handle.damagePerBlock();
+        return this.handle.damagePerBlock();
     }
 
     @Override
     public void setDamagePerBlock(int damage) {
         Preconditions.checkArgument(damage >= 0, "damage must be >= 0, was %d", damage);
-        handle = new Tool(handle.rules(), handle.defaultMiningSpeed(), damage);
+        this.handle = new Tool(this.handle.rules(), this.handle.defaultMiningSpeed(), damage);
     }
 
     @Override
     public List<ToolRule> getRules() {
-        return handle.rules().stream().map(CraftToolRule::new).collect(Collectors.toList());
+        return this.handle.rules().stream().map(CraftToolRule::new).collect(Collectors.toList());
     }
 
     @Override
     public void setRules(List<ToolRule> rules) {
         Preconditions.checkArgument(rules != null, "rules must not be null");
-        handle = new Tool(rules.stream().map(CraftToolRule::new).map(CraftToolRule::getHandle).toList(), handle.defaultMiningSpeed(), handle.damagePerBlock());
+        this.handle = new Tool(rules.stream().map(CraftToolRule::new).map(CraftToolRule::getHandle).toList(), this.handle.defaultMiningSpeed(), this.handle.damagePerBlock());
     }
 
     @Override
@@ -107,36 +107,36 @@ public final class CraftToolComponent implements ToolComponent {
         Preconditions.checkArgument(block != null, "block must not be null");
         Preconditions.checkArgument(block.isBlock(), "block must be a block type, given %s", block.getKey());
 
-        Holder.c<Block> nmsBlock = CraftBlockType.bukkitToMinecraft(block).builtInRegistryHolder();
-        return addRule(HolderSet.direct(nmsBlock), speed, correctForDrops);
+        Holder.Reference<Block> nmsBlock = CraftBlockType.bukkitToMinecraft(block).builtInRegistryHolder();
+        return this.addRule(HolderSet.direct(nmsBlock), speed, correctForDrops);
     }
 
     @Override
     public ToolRule addRule(Collection<Material> blocks, Float speed, Boolean correctForDrops) {
-        List<Holder.c<Block>> nmsBlocks = new ArrayList<>(blocks.size());
+        List<Holder.Reference<Block>> nmsBlocks = new ArrayList<>(blocks.size());
 
         for (Material material : blocks) {
             Preconditions.checkArgument(material.isBlock(), "blocks contains non-block type: %s", material.getKey());
             nmsBlocks.add(CraftBlockType.bukkitToMinecraft(material).builtInRegistryHolder());
         }
 
-        return addRule(HolderSet.direct(nmsBlocks), speed, correctForDrops);
+        return this.addRule(HolderSet.direct(nmsBlocks), speed, correctForDrops);
     }
 
     @Override
     public ToolRule addRule(Tag<Material> tag, Float speed, Boolean correctForDrops) {
         Preconditions.checkArgument(tag instanceof CraftBlockTag, "tag must be a block tag");
-        return addRule(((CraftBlockTag) tag).getHandle(), speed, correctForDrops);
+        return this.addRule(((CraftBlockTag) tag).getHandle(), speed, correctForDrops);
     }
 
     private ToolRule addRule(HolderSet<Block> blocks, Float speed, Boolean correctForDrops) {
-        Tool.a rule = new Tool.a(blocks, Optional.ofNullable(speed), Optional.ofNullable(correctForDrops));
+        Tool.Rule rule = new Tool.Rule(blocks, Optional.ofNullable(speed), Optional.ofNullable(correctForDrops));
 
-        List<Tool.a> rules = new ArrayList<>(handle.rules().size() + 1);
-        rules.addAll(handle.rules());
+        List<Tool.Rule> rules = new ArrayList<>(this.handle.rules().size() + 1);
+        rules.addAll(this.handle.rules());
         rules.add(rule);
 
-        handle = new Tool(rules, handle.defaultMiningSpeed(), handle.damagePerBlock());
+        this.handle = new Tool(rules, this.handle.defaultMiningSpeed(), this.handle.damagePerBlock());
         return new CraftToolRule(rule);
     }
 
@@ -144,9 +144,9 @@ public final class CraftToolComponent implements ToolComponent {
     public boolean removeRule(ToolRule rule) {
         Preconditions.checkArgument(rule != null, "rule must not be null");
 
-        List<Tool.a> rules = new ArrayList<>(handle.rules());
+        List<Tool.Rule> rules = new ArrayList<>(this.handle.rules());
         boolean removed = rules.remove(((CraftToolRule) rule).handle);
-        handle = new Tool(rules, handle.defaultMiningSpeed(), handle.damagePerBlock());
+        this.handle = new Tool(rules, this.handle.defaultMiningSpeed(), this.handle.damagePerBlock());
 
         return removed;
     }
@@ -166,7 +166,7 @@ public final class CraftToolComponent implements ToolComponent {
         if (obj == null) {
             return false;
         }
-        if (getClass() != obj.getClass()) {
+        if (this.getClass() != obj.getClass()) {
             return false;
         }
         final CraftToolComponent other = (CraftToolComponent) obj;
@@ -175,21 +175,21 @@ public final class CraftToolComponent implements ToolComponent {
 
     @Override
     public String toString() {
-        return "CraftToolComponent{" + "handle=" + handle + '}';
+        return "CraftToolComponent{" + "handle=" + this.handle + '}';
     }
 
     @SerializableAs("ToolRule")
     public static class CraftToolRule implements ToolRule {
 
-        private Tool.a handle;
+        private Tool.Rule handle;
 
-        public CraftToolRule(Tool.a handle) {
+        public CraftToolRule(Tool.Rule handle) {
             this.handle = handle;
         }
 
         public CraftToolRule(ToolRule bukkit) {
-            Tool.a toCopy = ((CraftToolRule) bukkit).handle;
-            this.handle = new Tool.a(toCopy.blocks(), toCopy.speed(), toCopy.correctForDrops());
+            Tool.Rule toCopy = ((CraftToolRule) bukkit).handle;
+            this.handle = new Tool.Rule(toCopy.blocks(), toCopy.speed(), toCopy.correctForDrops());
         }
 
         public CraftToolRule(Map<String, Object> map) {
@@ -197,21 +197,21 @@ public final class CraftToolComponent implements ToolComponent {
             Boolean correct = SerializableMeta.getObject(Boolean.class, map, "correct-for-drops", true);
             HolderSet<Block> blocks = CraftHolderUtil.parse(SerializableMeta.getObject(Object.class, map, "blocks", false), Registries.BLOCK, BuiltInRegistries.BLOCK);
 
-            this.handle = new Tool.a(blocks, Optional.ofNullable(speed), Optional.ofNullable(correct));
+            this.handle = new Tool.Rule(blocks, Optional.ofNullable(speed), Optional.ofNullable(correct));
         }
 
         @Override
         public Map<String, Object> serialize() {
             Map<String, Object> result = new LinkedHashMap<>();
 
-            CraftHolderUtil.serialize(result, "blocks", handle.blocks());
+            CraftHolderUtil.serialize(result, "blocks", this.handle.blocks());
 
-            Float speed = getSpeed();
+            Float speed = this.getSpeed();
             if (speed != null) {
                 result.put("speed", speed);
             }
 
-            Boolean correct = isCorrectForDrops();
+            Boolean correct = this.isCorrectForDrops();
             if (correct != null) {
                 result.put("correct-for-drops", correct);
             }
@@ -219,20 +219,20 @@ public final class CraftToolComponent implements ToolComponent {
             return result;
         }
 
-        public Tool.a getHandle() {
-            return handle;
+        public Tool.Rule getHandle() {
+            return this.handle;
         }
 
         @Override
         public Collection<Material> getBlocks() {
-            return handle.blocks().stream().map(Holder::value).map(CraftBlockType::minecraftToBukkit).collect(Collectors.toList());
+            return this.handle.blocks().stream().map(Holder::value).map(CraftBlockType::minecraftToBukkit).collect(Collectors.toList());
         }
 
         @Override
         public void setBlocks(Material block) {
             Preconditions.checkArgument(block != null, "block must not be null");
             Preconditions.checkArgument(block.isBlock(), "block must be a block type, given %s", block.getKey());
-            handle = new Tool.a(HolderSet.direct(CraftBlockType.bukkitToMinecraft(block).builtInRegistryHolder()), handle.speed(), handle.correctForDrops());
+            this.handle = new Tool.Rule(HolderSet.direct(CraftBlockType.bukkitToMinecraft(block).builtInRegistryHolder()), this.handle.speed(), this.handle.correctForDrops());
         }
 
         @Override
@@ -242,33 +242,33 @@ public final class CraftToolComponent implements ToolComponent {
                 Preconditions.checkArgument(material.isBlock(), "blocks contains non-block type: %s", material.getKey());
             }
 
-            handle = new Tool.a(HolderSet.direct((List) blocks.stream().map(CraftBlockType::bukkitToMinecraft).map(Block::builtInRegistryHolder).collect(Collectors.toList())), handle.speed(), handle.correctForDrops());
+            this.handle = new Tool.Rule(HolderSet.direct((List) blocks.stream().map(CraftBlockType::bukkitToMinecraft).map(Block::builtInRegistryHolder).collect(Collectors.toList())), this.handle.speed(), this.handle.correctForDrops());
         }
 
         @Override
         public void setBlocks(Tag<Material> tag) {
             Preconditions.checkArgument(tag instanceof CraftBlockTag, "tag must be a block tag");
-            handle = new Tool.a(((CraftBlockTag) tag).getHandle(), handle.speed(), handle.correctForDrops());
+            this.handle = new Tool.Rule(((CraftBlockTag) tag).getHandle(), this.handle.speed(), this.handle.correctForDrops());
         }
 
         @Override
         public Float getSpeed() {
-            return handle.speed().orElse(null);
+            return this.handle.speed().orElse(null);
         }
 
         @Override
         public void setSpeed(Float speed) {
-            handle = new Tool.a(handle.blocks(), Optional.ofNullable(speed), handle.correctForDrops());
+            this.handle = new Tool.Rule(this.handle.blocks(), Optional.ofNullable(speed), this.handle.correctForDrops());
         }
 
         @Override
         public Boolean isCorrectForDrops() {
-            return handle.correctForDrops().orElse(null);
+            return this.handle.correctForDrops().orElse(null);
         }
 
         @Override
         public void setCorrectForDrops(Boolean correct) {
-            handle = new Tool.a(handle.blocks(), handle.speed(), Optional.ofNullable(correct));
+            this.handle = new Tool.Rule(this.handle.blocks(), this.handle.speed(), Optional.ofNullable(correct));
         }
 
         @Override
@@ -286,7 +286,7 @@ public final class CraftToolComponent implements ToolComponent {
             if (obj == null) {
                 return false;
             }
-            if (getClass() != obj.getClass()) {
+            if (this.getClass() != obj.getClass()) {
                 return false;
             }
             final CraftToolRule other = (CraftToolRule) obj;
@@ -295,7 +295,7 @@ public final class CraftToolComponent implements ToolComponent {
 
         @Override
         public String toString() {
-            return "CraftToolRule{" + "handle=" + handle + '}';
+            return "CraftToolRule{" + "handle=" + this.handle + '}';
         }
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftUseCooldownComponent.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftUseCooldownComponent.java
index e3d947b7b3..77cfe04be7 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftUseCooldownComponent.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/components/CraftUseCooldownComponent.java
@@ -5,7 +5,7 @@ import java.util.LinkedHashMap;
 import java.util.Map;
 import java.util.Objects;
 import java.util.Optional;
-import net.minecraft.resources.MinecraftKey;
+import net.minecraft.resources.ResourceLocation;
 import net.minecraft.world.item.component.UseCooldown;
 import org.bukkit.NamespacedKey;
 import org.bukkit.configuration.serialization.SerializableAs;
@@ -30,44 +30,44 @@ public final class CraftUseCooldownComponent implements UseCooldownComponent {
         Float seconds = SerializableMeta.getObject(Float.class, map, "seconds", false);
         String cooldownGroup = SerializableMeta.getString(map, "cooldown-group", true);
 
-        this.handle = new UseCooldown(seconds, Optional.ofNullable(cooldownGroup).map(MinecraftKey::parse));
+        this.handle = new UseCooldown(seconds, Optional.ofNullable(cooldownGroup).map(ResourceLocation::parse));
     }
 
     @Override
     public Map<String, Object> serialize() {
         Map<String, Object> result = new LinkedHashMap<>();
-        result.put("seconds", getCooldownSeconds());
-        if (getCooldownGroup() != null) {
-            result.put("cooldown-group", getCooldownGroup().toString());
+        result.put("seconds", this.getCooldownSeconds());
+        if (this.getCooldownGroup() != null) {
+            result.put("cooldown-group", this.getCooldownGroup().toString());
         }
 
         return result;
     }
 
     public UseCooldown getHandle() {
-        return handle;
+        return this.handle;
     }
 
     @Override
     public float getCooldownSeconds() {
-        return handle.seconds();
+        return this.handle.seconds();
     }
 
     @Override
     public void setCooldownSeconds(float cooldown) {
         Preconditions.checkArgument(cooldown > 0, "cooldown must be greater than 0");
 
-        handle = new UseCooldown(cooldown, handle.cooldownGroup());
+        this.handle = new UseCooldown(cooldown, this.handle.cooldownGroup());
     }
 
     @Override
     public NamespacedKey getCooldownGroup() {
-        return handle.cooldownGroup().map(CraftNamespacedKey::fromMinecraft).orElse(null);
+        return this.handle.cooldownGroup().map(CraftNamespacedKey::fromMinecraft).orElse(null);
     }
 
     @Override
     public void setCooldownGroup(NamespacedKey song) {
-        handle = new UseCooldown(handle.seconds(), Optional.ofNullable(song).map(CraftNamespacedKey::toMinecraft));
+        this.handle = new UseCooldown(this.handle.seconds(), Optional.ofNullable(song).map(CraftNamespacedKey::toMinecraft));
     }
 
     @Override
@@ -85,7 +85,7 @@ public final class CraftUseCooldownComponent implements UseCooldownComponent {
         if (obj == null) {
             return false;
         }
-        if (getClass() != obj.getClass()) {
+        if (this.getClass() != obj.getClass()) {
             return false;
         }
         final CraftUseCooldownComponent other = (CraftUseCooldownComponent) obj;
@@ -94,6 +94,6 @@ public final class CraftUseCooldownComponent implements UseCooldownComponent {
 
     @Override
     public String toString() {
-        return "CraftUseCooldownComponent{" + "handle=" + handle + '}';
+        return "CraftUseCooldownComponent{" + "handle=" + this.handle + '}';
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/tags/DeprecatedContainerTagType.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/tags/DeprecatedContainerTagType.java
index 8e1c1e9bd6..4e1ec43a0f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/tags/DeprecatedContainerTagType.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/tags/DeprecatedContainerTagType.java
@@ -26,7 +26,7 @@ public final class DeprecatedContainerTagType<C> implements PersistentDataType<P
     @NotNull
     @Override
     public Class<C> getComplexType() {
-        return deprecated.getComplexType();
+        return this.deprecated.getComplexType();
     }
 
     @NotNull
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/tags/DeprecatedCustomTagContainer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/tags/DeprecatedCustomTagContainer.java
index 3ef217b082..9496478c86 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/tags/DeprecatedCustomTagContainer.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/tags/DeprecatedCustomTagContainer.java
@@ -23,38 +23,38 @@ public final class DeprecatedCustomTagContainer implements CustomItemTagContaine
     @Override
     public <T, Z> void setCustomTag(NamespacedKey key, ItemTagType<T, Z> type, Z value) {
         if (Objects.equals(CustomItemTagContainer.class, type.getPrimitiveType())) {
-            wrapped.set(key, new DeprecatedContainerTagType<>((ItemTagType<CustomItemTagContainer, Z>) type), value);
+            this.wrapped.set(key, new DeprecatedContainerTagType<>((ItemTagType<CustomItemTagContainer, Z>) type), value);
         } else {
-            wrapped.set(key, new DeprecatedItemTagType<>(type), value);
+            this.wrapped.set(key, new DeprecatedItemTagType<>(type), value);
         }
     }
 
     @Override
     public <T, Z> boolean hasCustomTag(NamespacedKey key, ItemTagType<T, Z> type) {
         if (Objects.equals(CustomItemTagContainer.class, type.getPrimitiveType())) {
-            return wrapped.has(key, new DeprecatedContainerTagType<>((ItemTagType<CustomItemTagContainer, Z>) type));
+            return this.wrapped.has(key, new DeprecatedContainerTagType<>((ItemTagType<CustomItemTagContainer, Z>) type));
         } else {
-            return wrapped.has(key, new DeprecatedItemTagType<>(type));
+            return this.wrapped.has(key, new DeprecatedItemTagType<>(type));
         }
     }
 
     @Override
     public <T, Z> Z getCustomTag(NamespacedKey key, ItemTagType<T, Z> type) {
         if (Objects.equals(CustomItemTagContainer.class, type.getPrimitiveType())) {
-            return wrapped.get(key, new DeprecatedContainerTagType<>((ItemTagType<CustomItemTagContainer, Z>) type));
+            return this.wrapped.get(key, new DeprecatedContainerTagType<>((ItemTagType<CustomItemTagContainer, Z>) type));
         } else {
-            return wrapped.get(key, new DeprecatedItemTagType<>(type));
+            return this.wrapped.get(key, new DeprecatedItemTagType<>(type));
         }
     }
 
     @Override
     public void removeCustomTag(NamespacedKey key) {
-        wrapped.remove(key);
+        this.wrapped.remove(key);
     }
 
     @Override
     public boolean isEmpty() {
-        return wrapped.isEmpty();
+        return this.wrapped.isEmpty();
     }
 
     @Override
@@ -63,6 +63,6 @@ public final class DeprecatedCustomTagContainer implements CustomItemTagContaine
     }
 
     public PersistentDataContainer getWrapped() {
-        return wrapped;
+        return this.wrapped;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/tags/DeprecatedItemAdapterContext.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/tags/DeprecatedItemAdapterContext.java
index e8bb75e9f4..fd614f472d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/tags/DeprecatedItemAdapterContext.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/tags/DeprecatedItemAdapterContext.java
@@ -19,6 +19,6 @@ public final class DeprecatedItemAdapterContext implements ItemTagAdapterContext
      */
     @Override
     public CustomItemTagContainer newTagContainer() {
-        return new DeprecatedCustomTagContainer(context.newPersistentDataContainer());
+        return new DeprecatedCustomTagContainer(this.context.newPersistentDataContainer());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/tags/DeprecatedItemTagType.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/tags/DeprecatedItemTagType.java
index 372a0cfdbc..fe718fc47c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/tags/DeprecatedItemTagType.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/tags/DeprecatedItemTagType.java
@@ -16,13 +16,13 @@ public final class DeprecatedItemTagType<P, C> implements PersistentDataType<P,
     @NotNull
     @Override
     public Class<P> getPrimitiveType() {
-        return deprecated.getPrimitiveType();
+        return this.deprecated.getPrimitiveType();
     }
 
     @NotNull
     @Override
     public Class<C> getComplexType() {
-        return deprecated.getComplexType();
+        return this.deprecated.getComplexType();
     }
 
     @NotNull
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimMaterial.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimMaterial.java
index b7944a5c18..38fb47bbfc 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimMaterial.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimMaterial.java
@@ -2,7 +2,6 @@ package org.bukkit.craftbukkit.inventory.trim;
 
 import com.google.common.base.Preconditions;
 import net.minecraft.core.Holder;
-import net.minecraft.core.IRegistry;
 import net.minecraft.core.registries.Registries;
 import net.minecraft.network.chat.contents.TranslatableContents;
 import org.bukkit.NamespacedKey;
@@ -19,7 +18,7 @@ public class CraftTrimMaterial implements TrimMaterial, Handleable<net.minecraft
     }
 
     public static TrimMaterial minecraftHolderToBukkit(Holder<net.minecraft.world.item.equipment.trim.TrimMaterial> minecraft) {
-        return minecraftToBukkit(minecraft.value());
+        return CraftTrimMaterial.minecraftToBukkit(minecraft.value());
     }
 
     public static net.minecraft.world.item.equipment.trim.TrimMaterial bukkitToMinecraft(TrimMaterial bukkit) {
@@ -29,9 +28,9 @@ public class CraftTrimMaterial implements TrimMaterial, Handleable<net.minecraft
     public static Holder<net.minecraft.world.item.equipment.trim.TrimMaterial> bukkitToMinecraftHolder(TrimMaterial bukkit) {
         Preconditions.checkArgument(bukkit != null);
 
-        IRegistry<net.minecraft.world.item.equipment.trim.TrimMaterial> registry = CraftRegistry.getMinecraftRegistry(Registries.TRIM_MATERIAL);
+        net.minecraft.core.Registry<net.minecraft.world.item.equipment.trim.TrimMaterial> registry = CraftRegistry.getMinecraftRegistry(Registries.TRIM_MATERIAL);
 
-        if (registry.wrapAsHolder(bukkitToMinecraft(bukkit)) instanceof Holder.c<net.minecraft.world.item.equipment.trim.TrimMaterial> holder) {
+        if (registry.wrapAsHolder(CraftTrimMaterial.bukkitToMinecraft(bukkit)) instanceof Holder.Reference<net.minecraft.world.item.equipment.trim.TrimMaterial> holder) {
             return holder;
         }
 
@@ -49,18 +48,18 @@ public class CraftTrimMaterial implements TrimMaterial, Handleable<net.minecraft
 
     @Override
     public net.minecraft.world.item.equipment.trim.TrimMaterial getHandle() {
-        return handle;
+        return this.handle;
     }
 
     @Override
     @NotNull
     public NamespacedKey getKey() {
-        return key;
+        return this.key;
     }
 
     @NotNull
     @Override
     public String getTranslationKey() {
-        return ((TranslatableContents) handle.description().getContents()).getKey();
+        return ((TranslatableContents) this.handle.description().getContents()).getKey();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimPattern.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimPattern.java
index 2d9fc5203a..3bc9e6fae1 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimPattern.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/trim/CraftTrimPattern.java
@@ -2,7 +2,6 @@ package org.bukkit.craftbukkit.inventory.trim;
 
 import com.google.common.base.Preconditions;
 import net.minecraft.core.Holder;
-import net.minecraft.core.IRegistry;
 import net.minecraft.core.registries.Registries;
 import net.minecraft.network.chat.contents.TranslatableContents;
 import org.bukkit.NamespacedKey;
@@ -19,7 +18,7 @@ public class CraftTrimPattern implements TrimPattern, Handleable<net.minecraft.w
     }
 
     public static TrimPattern minecraftHolderToBukkit(Holder<net.minecraft.world.item.equipment.trim.TrimPattern> minecraft) {
-        return minecraftToBukkit(minecraft.value());
+        return CraftTrimPattern.minecraftToBukkit(minecraft.value());
     }
 
     public static net.minecraft.world.item.equipment.trim.TrimPattern bukkitToMinecraft(TrimPattern bukkit) {
@@ -29,9 +28,9 @@ public class CraftTrimPattern implements TrimPattern, Handleable<net.minecraft.w
     public static Holder<net.minecraft.world.item.equipment.trim.TrimPattern> bukkitToMinecraftHolder(TrimPattern bukkit) {
         Preconditions.checkArgument(bukkit != null);
 
-        IRegistry<net.minecraft.world.item.equipment.trim.TrimPattern> registry = CraftRegistry.getMinecraftRegistry(Registries.TRIM_PATTERN);
+        net.minecraft.core.Registry<net.minecraft.world.item.equipment.trim.TrimPattern> registry = CraftRegistry.getMinecraftRegistry(Registries.TRIM_PATTERN);
 
-        if (registry.wrapAsHolder(bukkitToMinecraft(bukkit)) instanceof Holder.c<net.minecraft.world.item.equipment.trim.TrimPattern> holder) {
+        if (registry.wrapAsHolder(CraftTrimPattern.bukkitToMinecraft(bukkit)) instanceof Holder.Reference<net.minecraft.world.item.equipment.trim.TrimPattern> holder) {
             return holder;
         }
 
@@ -49,18 +48,18 @@ public class CraftTrimPattern implements TrimPattern, Handleable<net.minecraft.w
 
     @Override
     public net.minecraft.world.item.equipment.trim.TrimPattern getHandle() {
-        return handle;
+        return this.handle;
     }
 
     @Override
     @NotNull
     public NamespacedKey getKey() {
-        return key;
+        return this.key;
     }
 
     @NotNull
     @Override
     public String getTranslationKey() {
-        return ((TranslatableContents) handle.description().getContents()).getKey();
+        return ((TranslatableContents) this.handle.description().getContents()).getKey();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java
index 52cdf39c68..ec8ef47ed7 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftInventoryCreator.java
@@ -14,47 +14,47 @@ public final class CraftInventoryCreator {
     private final Map<InventoryType, InventoryConverter> converterMap = new HashMap<>();
 
     private CraftInventoryCreator() {
-        converterMap.put(InventoryType.CHEST, DEFAULT_CONVERTER);
-        converterMap.put(InventoryType.DISPENSER, new CraftTileInventoryConverter.Dispenser());
-        converterMap.put(InventoryType.DROPPER, new CraftTileInventoryConverter.Dropper());
-        converterMap.put(InventoryType.FURNACE, new CraftTileInventoryConverter.Furnace());
-        converterMap.put(InventoryType.WORKBENCH, DEFAULT_CONVERTER);
-        converterMap.put(InventoryType.ENCHANTING, DEFAULT_CONVERTER);
-        converterMap.put(InventoryType.BREWING, new CraftTileInventoryConverter.BrewingStand());
-        converterMap.put(InventoryType.PLAYER, DEFAULT_CONVERTER);
-        converterMap.put(InventoryType.MERCHANT, DEFAULT_CONVERTER);
-        converterMap.put(InventoryType.ENDER_CHEST, DEFAULT_CONVERTER);
-        converterMap.put(InventoryType.ANVIL, DEFAULT_CONVERTER);
-        converterMap.put(InventoryType.SMITHING, DEFAULT_CONVERTER);
-        converterMap.put(InventoryType.BEACON, DEFAULT_CONVERTER);
-        converterMap.put(InventoryType.HOPPER, new CraftTileInventoryConverter.Hopper());
-        converterMap.put(InventoryType.SHULKER_BOX, DEFAULT_CONVERTER);
-        converterMap.put(InventoryType.BARREL, DEFAULT_CONVERTER);
-        converterMap.put(InventoryType.BLAST_FURNACE, new CraftTileInventoryConverter.BlastFurnace());
-        converterMap.put(InventoryType.LECTERN, new CraftTileInventoryConverter.Lectern());
-        converterMap.put(InventoryType.SMOKER, new CraftTileInventoryConverter.Smoker());
-        converterMap.put(InventoryType.LOOM, DEFAULT_CONVERTER);
-        converterMap.put(InventoryType.CARTOGRAPHY, DEFAULT_CONVERTER);
-        converterMap.put(InventoryType.GRINDSTONE, DEFAULT_CONVERTER);
-        converterMap.put(InventoryType.STONECUTTER, DEFAULT_CONVERTER);
-        converterMap.put(InventoryType.SMITHING_NEW, DEFAULT_CONVERTER);
-        converterMap.put(InventoryType.CRAFTER, new CraftTileInventoryConverter.Crafter());
+        this.converterMap.put(InventoryType.CHEST, this.DEFAULT_CONVERTER);
+        this.converterMap.put(InventoryType.DISPENSER, new CraftTileInventoryConverter.Dispenser());
+        this.converterMap.put(InventoryType.DROPPER, new CraftTileInventoryConverter.Dropper());
+        this.converterMap.put(InventoryType.FURNACE, new CraftTileInventoryConverter.Furnace());
+        this.converterMap.put(InventoryType.WORKBENCH, this.DEFAULT_CONVERTER);
+        this.converterMap.put(InventoryType.ENCHANTING, this.DEFAULT_CONVERTER);
+        this.converterMap.put(InventoryType.BREWING, new CraftTileInventoryConverter.BrewingStand());
+        this.converterMap.put(InventoryType.PLAYER, this.DEFAULT_CONVERTER);
+        this.converterMap.put(InventoryType.MERCHANT, this.DEFAULT_CONVERTER);
+        this.converterMap.put(InventoryType.ENDER_CHEST, this.DEFAULT_CONVERTER);
+        this.converterMap.put(InventoryType.ANVIL, this.DEFAULT_CONVERTER);
+        this.converterMap.put(InventoryType.SMITHING, this.DEFAULT_CONVERTER);
+        this.converterMap.put(InventoryType.BEACON, this.DEFAULT_CONVERTER);
+        this.converterMap.put(InventoryType.HOPPER, new CraftTileInventoryConverter.Hopper());
+        this.converterMap.put(InventoryType.SHULKER_BOX, this.DEFAULT_CONVERTER);
+        this.converterMap.put(InventoryType.BARREL, this.DEFAULT_CONVERTER);
+        this.converterMap.put(InventoryType.BLAST_FURNACE, new CraftTileInventoryConverter.BlastFurnace());
+        this.converterMap.put(InventoryType.LECTERN, new CraftTileInventoryConverter.Lectern());
+        this.converterMap.put(InventoryType.SMOKER, new CraftTileInventoryConverter.Smoker());
+        this.converterMap.put(InventoryType.LOOM, this.DEFAULT_CONVERTER);
+        this.converterMap.put(InventoryType.CARTOGRAPHY, this.DEFAULT_CONVERTER);
+        this.converterMap.put(InventoryType.GRINDSTONE, this.DEFAULT_CONVERTER);
+        this.converterMap.put(InventoryType.STONECUTTER, this.DEFAULT_CONVERTER);
+        this.converterMap.put(InventoryType.SMITHING_NEW, this.DEFAULT_CONVERTER);
+        this.converterMap.put(InventoryType.CRAFTER, new CraftTileInventoryConverter.Crafter());
     }
 
     public Inventory createInventory(InventoryHolder holder, InventoryType type) {
-        return converterMap.get(type).createInventory(holder, type);
+        return this.converterMap.get(type).createInventory(holder, type);
     }
 
     public Inventory createInventory(InventoryHolder holder, InventoryType type, String title) {
-        return converterMap.get(type).createInventory(holder, type, title);
+        return this.converterMap.get(type).createInventory(holder, type, title);
     }
 
     public Inventory createInventory(InventoryHolder holder, int size) {
-        return DEFAULT_CONVERTER.createInventory(holder, size);
+        return this.DEFAULT_CONVERTER.createInventory(holder, size);
     }
 
     public Inventory createInventory(InventoryHolder holder, int size, String title) {
-        return DEFAULT_CONVERTER.createInventory(holder, size, title);
+        return this.DEFAULT_CONVERTER.createInventory(holder, size, title);
     }
 
     public interface InventoryConverter {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftMenuBuilder.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftMenuBuilder.java
index dd4880b16a..7f2798493c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftMenuBuilder.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftMenuBuilder.java
@@ -1,38 +1,38 @@
 package org.bukkit.craftbukkit.inventory.util;
 
-import net.minecraft.core.BlockPosition;
-import net.minecraft.server.level.EntityPlayer;
-import net.minecraft.world.ITileInventory;
-import net.minecraft.world.entity.player.PlayerInventory;
-import net.minecraft.world.inventory.Container;
-import net.minecraft.world.inventory.ContainerAccess;
-import net.minecraft.world.inventory.Containers;
+import net.minecraft.core.BlockPos;
+import net.minecraft.server.level.ServerPlayer;
+import net.minecraft.world.MenuProvider;
+import net.minecraft.world.entity.player.Inventory;
+import net.minecraft.world.inventory.AbstractContainerMenu;
+import net.minecraft.world.inventory.ContainerLevelAccess;
+import net.minecraft.world.inventory.MenuType;
 import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.block.state.IBlockData;
+import net.minecraft.world.level.block.state.BlockState;
 
 public interface CraftMenuBuilder {
 
-    Container build(EntityPlayer player, Containers<?> type);
+    AbstractContainerMenu build(ServerPlayer player, MenuType<?> type);
 
     static CraftMenuBuilder worldAccess(LocationBoundContainerBuilder builder) {
-        return (EntityPlayer player, Containers<?> type) -> {
-            return builder.build(player.nextContainerCounter(), player.getInventory(), ContainerAccess.create(player.level(), player.blockPosition()));
+        return (ServerPlayer player, MenuType<?> type) -> {
+            return builder.build(player.nextContainerCounter(), player.getInventory(), ContainerLevelAccess.create(player.level(), player.blockPosition()));
         };
     }
 
     static CraftMenuBuilder tileEntity(TileEntityObjectBuilder objectBuilder, Block block) {
-        return (EntityPlayer player, Containers<?> type) -> {
+        return (ServerPlayer player, MenuType<?> type) -> {
             return objectBuilder.build(player.blockPosition(), block.defaultBlockState()).createMenu(player.nextContainerCounter(), player.getInventory(), player);
         };
     }
 
     interface TileEntityObjectBuilder {
 
-        ITileInventory build(BlockPosition blockPosition, IBlockData blockData);
+        MenuProvider build(BlockPos blockPosition, BlockState blockData);
     }
 
     interface LocationBoundContainerBuilder {
 
-        Container build(int syncId, PlayerInventory inventory, ContainerAccess access);
+        AbstractContainerMenu build(int syncId, Inventory inventory, ContainerLevelAccess access);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftMenus.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftMenus.java
index e63d3f3e50..66e93f8444 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftMenus.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftMenus.java
@@ -1,25 +1,26 @@
 package org.bukkit.craftbukkit.inventory.util;
 
 import static org.bukkit.craftbukkit.inventory.util.CraftMenuBuilder.*;
-import net.minecraft.network.chat.IChatBaseComponent;
-import net.minecraft.world.TileInventory;
-import net.minecraft.world.inventory.ContainerAnvil;
-import net.minecraft.world.inventory.ContainerCartography;
-import net.minecraft.world.inventory.ContainerEnchantTable;
-import net.minecraft.world.inventory.ContainerGrindstone;
-import net.minecraft.world.inventory.ContainerSmithing;
-import net.minecraft.world.inventory.ContainerStonecutter;
-import net.minecraft.world.inventory.ContainerWorkbench;
+
+import net.minecraft.network.chat.Component;
+import net.minecraft.world.SimpleMenuProvider;
+import net.minecraft.world.inventory.AnvilMenu;
+import net.minecraft.world.inventory.CartographyTableMenu;
+import net.minecraft.world.inventory.CraftingMenu;
+import net.minecraft.world.inventory.EnchantmentMenu;
+import net.minecraft.world.inventory.GrindstoneMenu;
+import net.minecraft.world.inventory.SmithingMenu;
+import net.minecraft.world.inventory.StonecutterMenu;
 import net.minecraft.world.level.block.Blocks;
+import net.minecraft.world.level.block.entity.BeaconBlockEntity;
+import net.minecraft.world.level.block.entity.BlastFurnaceBlockEntity;
+import net.minecraft.world.level.block.entity.BrewingStandBlockEntity;
 import net.minecraft.world.level.block.entity.CrafterBlockEntity;
-import net.minecraft.world.level.block.entity.TileEntityBeacon;
-import net.minecraft.world.level.block.entity.TileEntityBlastFurnace;
-import net.minecraft.world.level.block.entity.TileEntityBrewingStand;
-import net.minecraft.world.level.block.entity.TileEntityDispenser;
-import net.minecraft.world.level.block.entity.TileEntityFurnaceFurnace;
-import net.minecraft.world.level.block.entity.TileEntityHopper;
-import net.minecraft.world.level.block.entity.TileEntityLectern;
-import net.minecraft.world.level.block.entity.TileEntitySmoker;
+import net.minecraft.world.level.block.entity.DispenserBlockEntity;
+import net.minecraft.world.level.block.entity.FurnaceBlockEntity;
+import net.minecraft.world.level.block.entity.HopperBlockEntity;
+import net.minecraft.world.level.block.entity.LecternBlockEntity;
+import net.minecraft.world.level.block.entity.SmokerBlockEntity;
 import org.bukkit.craftbukkit.inventory.CraftMenuType;
 import org.bukkit.inventory.InventoryView;
 import org.bukkit.inventory.MenuType;
@@ -45,68 +46,68 @@ public final class CraftMenus {
         // this isn't ideal as both dispenser and dropper are 3x3, InventoryType can't currently handle generic 3x3s with size 9
         // this needs to be removed when inventory creation is overhauled
         if (menuType == MenuType.GENERIC_3X3) {
-            return asType(new MenuTypeData<>(InventoryView.class, tileEntity(TileEntityDispenser::new, Blocks.DISPENSER)));
+            return CraftMenus.asType(new MenuTypeData<>(InventoryView.class, tileEntity(DispenserBlockEntity::new, Blocks.DISPENSER)));
         }
         if (menuType == MenuType.CRAFTER_3X3) {
-            return asType(new MenuTypeData<>(CrafterView.class, tileEntity(CrafterBlockEntity::new, Blocks.CRAFTER)));
+            return CraftMenus.asType(new MenuTypeData<>(CrafterView.class, tileEntity(CrafterBlockEntity::new, Blocks.CRAFTER)));
         }
         if (menuType == MenuType.ANVIL) {
-            return asType(new MenuTypeData<>(AnvilView.class, worldAccess(ContainerAnvil::new)));
+            return CraftMenus.asType(new MenuTypeData<>(AnvilView.class, worldAccess(AnvilMenu::new)));
         }
         if (menuType == MenuType.BEACON) {
-            return asType(new MenuTypeData<>(BeaconView.class, tileEntity(TileEntityBeacon::new, Blocks.BEACON)));
+            return CraftMenus.asType(new MenuTypeData<>(BeaconView.class, tileEntity(BeaconBlockEntity::new, Blocks.BEACON)));
         }
         if (menuType == MenuType.BLAST_FURNACE) {
-            return asType(new MenuTypeData<>(FurnaceView.class, tileEntity(TileEntityBlastFurnace::new, Blocks.BLAST_FURNACE)));
+            return CraftMenus.asType(new MenuTypeData<>(FurnaceView.class, tileEntity(BlastFurnaceBlockEntity::new, Blocks.BLAST_FURNACE)));
         }
         if (menuType == MenuType.BREWING_STAND) {
-            return asType(new MenuTypeData<>(BrewingStandView.class, tileEntity(TileEntityBrewingStand::new, Blocks.BREWING_STAND)));
+            return CraftMenus.asType(new MenuTypeData<>(BrewingStandView.class, tileEntity(BrewingStandBlockEntity::new, Blocks.BREWING_STAND)));
         }
         if (menuType == MenuType.CRAFTING) {
-            return asType(new MenuTypeData<>(InventoryView.class, worldAccess(ContainerWorkbench::new)));
+            return CraftMenus.asType(new MenuTypeData<>(InventoryView.class, worldAccess(CraftingMenu::new)));
         }
         if (menuType == MenuType.ENCHANTMENT) {
-            return asType(new MenuTypeData<>(EnchantmentView.class, (player, type) -> {
-                return new TileInventory((syncId, inventory, human) -> {
-                    return worldAccess(ContainerEnchantTable::new).build(player, type);
-                }, IChatBaseComponent.empty()).createMenu(player.nextContainerCounter(), player.getInventory(), player);
+            return CraftMenus.asType(new MenuTypeData<>(EnchantmentView.class, (player, type) -> {
+                return new SimpleMenuProvider((syncId, inventory, human) -> {
+                    return worldAccess(EnchantmentMenu::new).build(player, type);
+                }, Component.empty()).createMenu(player.nextContainerCounter(), player.getInventory(), player);
             }));
         }
         if (menuType == MenuType.FURNACE) {
-            return asType(new MenuTypeData<>(FurnaceView.class, tileEntity(TileEntityFurnaceFurnace::new, Blocks.FURNACE)));
+            return CraftMenus.asType(new MenuTypeData<>(FurnaceView.class, tileEntity(FurnaceBlockEntity::new, Blocks.FURNACE)));
         }
         if (menuType == MenuType.GRINDSTONE) {
-            return asType(new MenuTypeData<>(InventoryView.class, worldAccess(ContainerGrindstone::new)));
+            return CraftMenus.asType(new MenuTypeData<>(InventoryView.class, worldAccess(GrindstoneMenu::new)));
         }
         // We really don't need to be creating a tile entity for hopper but currently InventoryType doesn't have capacity
         // to understand otherwise
         if (menuType == MenuType.HOPPER) {
-            return asType(new MenuTypeData<>(InventoryView.class, tileEntity(TileEntityHopper::new, Blocks.HOPPER)));
+            return CraftMenus.asType(new MenuTypeData<>(InventoryView.class, tileEntity(HopperBlockEntity::new, Blocks.HOPPER)));
         }
         // We also don't need to create a tile entity for lectern, but again InventoryType isn't smart enough to know any better
         if (menuType == MenuType.LECTERN) {
-            return asType(new MenuTypeData<>(LecternView.class, tileEntity(TileEntityLectern::new, Blocks.LECTERN)));
+            return CraftMenus.asType(new MenuTypeData<>(LecternView.class, tileEntity(LecternBlockEntity::new, Blocks.LECTERN)));
         }
         if (menuType == MenuType.LOOM) {
-            return asType(new MenuTypeData<>(LoomView.class, STANDARD));
+            return CraftMenus.asType(new MenuTypeData<>(LoomView.class, CraftMenus.STANDARD));
         }
         if (menuType == MenuType.MERCHANT) {
-            return asType(new MenuTypeData<>(MerchantView.class, STANDARD));
+            return CraftMenus.asType(new MenuTypeData<>(MerchantView.class, CraftMenus.STANDARD));
         }
         if (menuType == MenuType.SMITHING) {
-            return asType(new MenuTypeData<>(InventoryView.class, worldAccess(ContainerSmithing::new)));
+            return CraftMenus.asType(new MenuTypeData<>(InventoryView.class, worldAccess(SmithingMenu::new)));
         }
         if (menuType == MenuType.SMOKER) {
-            return asType(new MenuTypeData<>(FurnaceView.class, tileEntity(TileEntitySmoker::new, Blocks.SMOKER)));
+            return CraftMenus.asType(new MenuTypeData<>(FurnaceView.class, tileEntity(SmokerBlockEntity::new, Blocks.SMOKER)));
         }
         if (menuType == MenuType.CARTOGRAPHY_TABLE) {
-            return asType(new MenuTypeData<>(InventoryView.class, worldAccess(ContainerCartography::new)));
+            return CraftMenus.asType(new MenuTypeData<>(InventoryView.class, worldAccess(CartographyTableMenu::new)));
         }
         if (menuType == MenuType.STONECUTTER) {
-            return asType(new MenuTypeData<>(StonecutterView.class, worldAccess(ContainerStonecutter::new)));
+            return CraftMenus.asType(new MenuTypeData<>(StonecutterView.class, worldAccess(StonecutterMenu::new)));
         }
 
-        return asType(new MenuTypeData<>(InventoryView.class, STANDARD));
+        return CraftMenus.asType(new MenuTypeData<>(InventoryView.class, CraftMenus.STANDARD));
     }
 
     private static <V extends InventoryView> MenuTypeData<V> asType(MenuTypeData<?> data) {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java
index 896b43400b..11d23b3a9a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/util/CraftTileInventoryConverter.java
@@ -1,19 +1,19 @@
 package org.bukkit.craftbukkit.inventory.util;
 
-import net.minecraft.core.BlockPosition;
-import net.minecraft.world.IInventory;
+import net.minecraft.core.BlockPos;
+import net.minecraft.world.Container;
 import net.minecraft.world.level.block.Blocks;
+import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity;
+import net.minecraft.world.level.block.entity.BlastFurnaceBlockEntity;
+import net.minecraft.world.level.block.entity.BrewingStandBlockEntity;
 import net.minecraft.world.level.block.entity.CrafterBlockEntity;
-import net.minecraft.world.level.block.entity.TileEntityBlastFurnace;
-import net.minecraft.world.level.block.entity.TileEntityBrewingStand;
-import net.minecraft.world.level.block.entity.TileEntityDispenser;
-import net.minecraft.world.level.block.entity.TileEntityDropper;
-import net.minecraft.world.level.block.entity.TileEntityFurnace;
-import net.minecraft.world.level.block.entity.TileEntityFurnaceFurnace;
-import net.minecraft.world.level.block.entity.TileEntityHopper;
-import net.minecraft.world.level.block.entity.TileEntityLectern;
-import net.minecraft.world.level.block.entity.TileEntityLootable;
-import net.minecraft.world.level.block.entity.TileEntitySmoker;
+import net.minecraft.world.level.block.entity.DispenserBlockEntity;
+import net.minecraft.world.level.block.entity.DropperBlockEntity;
+import net.minecraft.world.level.block.entity.FurnaceBlockEntity;
+import net.minecraft.world.level.block.entity.HopperBlockEntity;
+import net.minecraft.world.level.block.entity.LecternBlockEntity;
+import net.minecraft.world.level.block.entity.RandomizableContainerBlockEntity;
+import net.minecraft.world.level.block.entity.SmokerBlockEntity;
 import org.bukkit.craftbukkit.inventory.CraftInventory;
 import org.bukkit.craftbukkit.inventory.CraftInventoryBrewer;
 import org.bukkit.craftbukkit.inventory.CraftInventoryFurnace;
@@ -24,67 +24,67 @@ import org.bukkit.inventory.InventoryHolder;
 
 public abstract class CraftTileInventoryConverter implements CraftInventoryCreator.InventoryConverter {
 
-    public abstract IInventory getTileEntity();
+    public abstract Container getTileEntity();
 
     @Override
     public Inventory createInventory(InventoryHolder holder, InventoryType type) {
-        return getInventory(getTileEntity());
+        return this.getInventory(this.getTileEntity());
     }
 
     @Override
     public Inventory createInventory(InventoryHolder holder, InventoryType type, String title) {
-        IInventory te = getTileEntity();
-        if (te instanceof TileEntityLootable) {
-            ((TileEntityLootable) te).name = CraftChatMessage.fromStringOrNull(title);
+        Container te = this.getTileEntity();
+        if (te instanceof RandomizableContainerBlockEntity) {
+            ((RandomizableContainerBlockEntity) te).name = CraftChatMessage.fromStringOrNull(title);
         }
 
-        return getInventory(te);
+        return this.getInventory(te);
     }
 
-    public Inventory getInventory(IInventory tileEntity) {
+    public Inventory getInventory(Container tileEntity) {
         return new CraftInventory(tileEntity);
     }
 
     public static class Furnace extends CraftTileInventoryConverter {
 
         @Override
-        public IInventory getTileEntity() {
-            TileEntityFurnace furnace = new TileEntityFurnaceFurnace(BlockPosition.ZERO, Blocks.FURNACE.defaultBlockState()); // TODO: customize this if required
+        public Container getTileEntity() {
+            AbstractFurnaceBlockEntity furnace = new FurnaceBlockEntity(BlockPos.ZERO, Blocks.FURNACE.defaultBlockState()); // TODO: customize this if required
             return furnace;
         }
 
         @Override
         public Inventory createInventory(InventoryHolder owner, InventoryType type, String title) {
-            IInventory tileEntity = getTileEntity();
-            ((TileEntityFurnace) tileEntity).name = CraftChatMessage.fromStringOrNull(title);
-            return getInventory(tileEntity);
+            Container tileEntity = this.getTileEntity();
+            ((AbstractFurnaceBlockEntity) tileEntity).name = CraftChatMessage.fromStringOrNull(title);
+            return this.getInventory(tileEntity);
         }
 
         @Override
-        public Inventory getInventory(IInventory tileEntity) {
-            return new CraftInventoryFurnace((TileEntityFurnace) tileEntity);
+        public Inventory getInventory(Container tileEntity) {
+            return new CraftInventoryFurnace((AbstractFurnaceBlockEntity) tileEntity);
         }
     }
 
     public static class BrewingStand extends CraftTileInventoryConverter {
 
         @Override
-        public IInventory getTileEntity() {
-            return new TileEntityBrewingStand(BlockPosition.ZERO, Blocks.BREWING_STAND.defaultBlockState());
+        public Container getTileEntity() {
+            return new BrewingStandBlockEntity(BlockPos.ZERO, Blocks.BREWING_STAND.defaultBlockState());
         }
 
         @Override
         public Inventory createInventory(InventoryHolder holder, InventoryType type, String title) {
             // BrewingStand does not extend TileEntityLootable
-            IInventory tileEntity = getTileEntity();
-            if (tileEntity instanceof TileEntityBrewingStand) {
-                ((TileEntityBrewingStand) tileEntity).name = CraftChatMessage.fromStringOrNull(title);
+            Container tileEntity = this.getTileEntity();
+            if (tileEntity instanceof BrewingStandBlockEntity) {
+                ((BrewingStandBlockEntity) tileEntity).name = CraftChatMessage.fromStringOrNull(title);
             }
-            return getInventory(tileEntity);
+            return this.getInventory(tileEntity);
         }
 
         @Override
-        public Inventory getInventory(IInventory tileEntity) {
+        public Inventory getInventory(Container tileEntity) {
             return new CraftInventoryBrewer(tileEntity);
         }
     }
@@ -92,56 +92,56 @@ public abstract class CraftTileInventoryConverter implements CraftInventoryCreat
     public static class Dispenser extends CraftTileInventoryConverter {
 
         @Override
-        public IInventory getTileEntity() {
-            return new TileEntityDispenser(BlockPosition.ZERO, Blocks.DISPENSER.defaultBlockState());
+        public Container getTileEntity() {
+            return new DispenserBlockEntity(BlockPos.ZERO, Blocks.DISPENSER.defaultBlockState());
         }
     }
 
     public static class Dropper extends CraftTileInventoryConverter {
 
         @Override
-        public IInventory getTileEntity() {
-            return new TileEntityDropper(BlockPosition.ZERO, Blocks.DROPPER.defaultBlockState());
+        public Container getTileEntity() {
+            return new DropperBlockEntity(BlockPos.ZERO, Blocks.DROPPER.defaultBlockState());
         }
     }
 
     public static class Hopper extends CraftTileInventoryConverter {
 
         @Override
-        public IInventory getTileEntity() {
-            return new TileEntityHopper(BlockPosition.ZERO, Blocks.HOPPER.defaultBlockState());
+        public Container getTileEntity() {
+            return new HopperBlockEntity(BlockPos.ZERO, Blocks.HOPPER.defaultBlockState());
         }
     }
 
     public static class BlastFurnace extends CraftTileInventoryConverter {
 
         @Override
-        public IInventory getTileEntity() {
-            return new TileEntityBlastFurnace(BlockPosition.ZERO, Blocks.BLAST_FURNACE.defaultBlockState());
+        public Container getTileEntity() {
+            return new BlastFurnaceBlockEntity(BlockPos.ZERO, Blocks.BLAST_FURNACE.defaultBlockState());
         }
     }
 
     public static class Lectern extends CraftTileInventoryConverter {
 
         @Override
-        public IInventory getTileEntity() {
-            return new TileEntityLectern(BlockPosition.ZERO, Blocks.LECTERN.defaultBlockState()).bookAccess;
+        public Container getTileEntity() {
+            return new LecternBlockEntity(BlockPos.ZERO, Blocks.LECTERN.defaultBlockState()).bookAccess;
         }
     }
 
     public static class Smoker extends CraftTileInventoryConverter {
 
         @Override
-        public IInventory getTileEntity() {
-            return new TileEntitySmoker(BlockPosition.ZERO, Blocks.SMOKER.defaultBlockState());
+        public Container getTileEntity() {
+            return new SmokerBlockEntity(BlockPos.ZERO, Blocks.SMOKER.defaultBlockState());
         }
     }
 
     public static class Crafter extends CraftTileInventoryConverter {
 
         @Override
-        public IInventory getTileEntity() {
-            return new CrafterBlockEntity(BlockPosition.ZERO, Blocks.CRAFTER.defaultBlockState());
+        public Container getTileEntity() {
+            return new CrafterBlockEntity(BlockPos.ZERO, Blocks.CRAFTER.defaultBlockState());
         }
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftAnvilView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftAnvilView.java
index 447437f240..fdc2bd4c3e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftAnvilView.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftAnvilView.java
@@ -1,6 +1,6 @@
 package org.bukkit.craftbukkit.inventory.view;
 
-import net.minecraft.world.inventory.ContainerAnvil;
+import net.minecraft.world.inventory.AnvilMenu;
 import org.bukkit.craftbukkit.inventory.CraftInventoryAnvil;
 import org.bukkit.craftbukkit.inventory.CraftInventoryView;
 import org.bukkit.entity.HumanEntity;
@@ -8,59 +8,59 @@ import org.bukkit.inventory.AnvilInventory;
 import org.bukkit.inventory.view.AnvilView;
 import org.jetbrains.annotations.Nullable;
 
-public class CraftAnvilView extends CraftInventoryView<ContainerAnvil, AnvilInventory> implements AnvilView {
+public class CraftAnvilView extends CraftInventoryView<AnvilMenu, AnvilInventory> implements AnvilView {
 
-    public CraftAnvilView(final HumanEntity player, final AnvilInventory viewing, final ContainerAnvil container) {
+    public CraftAnvilView(final HumanEntity player, final AnvilInventory viewing, final AnvilMenu container) {
         super(player, viewing, container);
     }
 
     @Nullable
     @Override
     public String getRenameText() {
-        return container.itemName;
+        return this.container.itemName;
     }
 
     @Override
     public int getRepairItemCountCost() {
-        return container.repairItemCountCost;
+        return this.container.repairItemCountCost;
     }
 
     @Override
     public int getRepairCost() {
-        return container.getCost();
+        return this.container.getCost();
     }
 
     @Override
     public int getMaximumRepairCost() {
-        return container.maximumRepairCost;
+        return this.container.maximumRepairCost;
     }
 
     @Override
     public void setRepairItemCountCost(final int cost) {
-        container.repairItemCountCost = cost;
+        this.container.repairItemCountCost = cost;
     }
 
     @Override
     public void setRepairCost(final int cost) {
-        container.cost.set(cost);
+        this.container.cost.set(cost);
     }
 
     @Override
     public void setMaximumRepairCost(final int cost) {
-        container.maximumRepairCost = cost;
+        this.container.maximumRepairCost = cost;
     }
 
     public void updateFromLegacy(CraftInventoryAnvil legacy) {
         if (legacy.isRepairCostSet()) {
-            setRepairCost(legacy.getRepairCost());
+            this.setRepairCost(legacy.getRepairCost());
         }
 
         if (legacy.isRepairCostAmountSet()) {
-            setRepairItemCountCost(legacy.getRepairCostAmount());
+            this.setRepairItemCountCost(legacy.getRepairCostAmount());
         }
 
         if (legacy.isMaximumRepairCostSet()) {
-            setMaximumRepairCost(legacy.getMaximumRepairCost());
+            this.setMaximumRepairCost(legacy.getMaximumRepairCost());
         }
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftBeaconView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftBeaconView.java
index bd6e24a2d8..9ba40b112e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftBeaconView.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftBeaconView.java
@@ -1,7 +1,7 @@
 package org.bukkit.craftbukkit.inventory.view;
 
-import net.minecraft.world.inventory.ContainerBeacon;
-import net.minecraft.world.level.block.entity.TileEntityBeacon;
+import net.minecraft.world.inventory.BeaconMenu;
+import net.minecraft.world.level.block.entity.BeaconBlockEntity;
 import org.bukkit.craftbukkit.inventory.CraftInventoryView;
 import org.bukkit.craftbukkit.potion.CraftPotionEffectType;
 import org.bukkit.entity.HumanEntity;
@@ -10,36 +10,36 @@ import org.bukkit.inventory.view.BeaconView;
 import org.bukkit.potion.PotionEffectType;
 import org.jetbrains.annotations.Nullable;
 
-public class CraftBeaconView extends CraftInventoryView<ContainerBeacon, BeaconInventory> implements BeaconView {
+public class CraftBeaconView extends CraftInventoryView<BeaconMenu, BeaconInventory> implements BeaconView {
 
-    public CraftBeaconView(final HumanEntity player, final BeaconInventory viewing, final ContainerBeacon container) {
+    public CraftBeaconView(final HumanEntity player, final BeaconInventory viewing, final BeaconMenu container) {
         super(player, viewing, container);
     }
 
     @Override
     public int getTier() {
-        return container.getLevels();
+        return this.container.getLevels();
     }
 
     @Nullable
     @Override
     public PotionEffectType getPrimaryEffect() {
-        return container.getPrimaryEffect() != null ? CraftPotionEffectType.minecraftHolderToBukkit(container.getPrimaryEffect()) : null;
+        return this.container.getPrimaryEffect() != null ? CraftPotionEffectType.minecraftHolderToBukkit(this.container.getPrimaryEffect()) : null;
     }
 
     @Nullable
     @Override
     public PotionEffectType getSecondaryEffect() {
-        return container.getSecondaryEffect() != null ? CraftPotionEffectType.minecraftHolderToBukkit(container.getSecondaryEffect()) : null;
+        return this.container.getSecondaryEffect() != null ? CraftPotionEffectType.minecraftHolderToBukkit(this.container.getSecondaryEffect()) : null;
     }
 
     @Override
     public void setPrimaryEffect(@Nullable final PotionEffectType effectType) {
-        container.setData(TileEntityBeacon.DATA_PRIMARY, ContainerBeacon.encodeEffect((effectType == null) ? null : CraftPotionEffectType.bukkitToMinecraftHolder(effectType)));
+        this.container.setData(BeaconBlockEntity.DATA_PRIMARY, BeaconMenu.encodeEffect((effectType == null) ? null : CraftPotionEffectType.bukkitToMinecraftHolder(effectType)));
     }
 
     @Override
     public void setSecondaryEffect(@Nullable final PotionEffectType effectType) {
-        container.setData(TileEntityBeacon.DATA_SECONDARY, ContainerBeacon.encodeEffect((effectType == null) ? null : CraftPotionEffectType.bukkitToMinecraftHolder(effectType)));
+        this.container.setData(BeaconBlockEntity.DATA_SECONDARY, BeaconMenu.encodeEffect((effectType == null) ? null : CraftPotionEffectType.bukkitToMinecraftHolder(effectType)));
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftBrewingStandView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftBrewingStandView.java
index db00f94595..aeb5a9c996 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftBrewingStandView.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftBrewingStandView.java
@@ -1,38 +1,38 @@
 package org.bukkit.craftbukkit.inventory.view;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.inventory.ContainerBrewingStand;
-import net.minecraft.world.level.block.entity.TileEntityBrewingStand;
+import net.minecraft.world.inventory.BrewingStandMenu;
+import net.minecraft.world.level.block.entity.BrewingStandBlockEntity;
 import org.bukkit.craftbukkit.inventory.CraftInventoryView;
 import org.bukkit.entity.HumanEntity;
 import org.bukkit.inventory.BrewerInventory;
 import org.bukkit.inventory.view.BrewingStandView;
 
-public class CraftBrewingStandView extends CraftInventoryView<ContainerBrewingStand, BrewerInventory> implements BrewingStandView {
+public class CraftBrewingStandView extends CraftInventoryView<BrewingStandMenu, BrewerInventory> implements BrewingStandView {
 
-    public CraftBrewingStandView(final HumanEntity player, final BrewerInventory viewing, final ContainerBrewingStand container) {
+    public CraftBrewingStandView(final HumanEntity player, final BrewerInventory viewing, final BrewingStandMenu container) {
         super(player, viewing, container);
     }
 
     @Override
     public int getFuelLevel() {
-        return container.getFuel();
+        return this.container.getFuel();
     }
 
     @Override
     public int getBrewingTicks() {
-        return container.getBrewingTicks();
+        return this.container.getBrewingTicks();
     }
 
     @Override
     public void setFuelLevel(final int fuelLevel) {
         Preconditions.checkArgument(fuelLevel > 0, "The given fuel level must be greater than 0");
-        container.setData(TileEntityBrewingStand.DATA_FUEL_USES, fuelLevel);
+        this.container.setData(BrewingStandBlockEntity.DATA_FUEL_USES, fuelLevel);
     }
 
     @Override
     public void setBrewingTicks(final int brewingTicks) {
         Preconditions.checkArgument(brewingTicks > 0, "The given brewing ticks must be greater than 0");
-        container.setData(TileEntityBrewingStand.DATA_BREW_TIME, brewingTicks);
+        this.container.setData(BrewingStandBlockEntity.DATA_BREW_TIME, brewingTicks);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftCrafterView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftCrafterView.java
index d80860cc6f..f8bc61ba35 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftCrafterView.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftCrafterView.java
@@ -15,18 +15,18 @@ public class CraftCrafterView extends CraftInventoryView<CrafterMenu, CrafterInv
 
     @Override
     public boolean isSlotDisabled(final int slot) {
-        return container.isSlotDisabled(slot);
+        return this.container.isSlotDisabled(slot);
     }
 
     @Override
     public boolean isPowered() {
-        return container.isPowered();
+        return this.container.isPowered();
     }
 
     @Override
     public void setSlotDisabled(final int slot, final boolean disabled) {
         Preconditions.checkArgument(slot >= 0 && slot < 9, "Invalid slot index %s for Crafter", slot);
 
-        container.setSlotState(slot, !disabled);
+        this.container.setSlotState(slot, !disabled);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftEnchantmentView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftEnchantmentView.java
index 2cc217e378..17f0ce8fcb 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftEnchantmentView.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftEnchantmentView.java
@@ -2,9 +2,9 @@ package org.bukkit.craftbukkit.inventory.view;
 
 import com.google.common.base.Preconditions;
 import net.minecraft.core.Holder;
-import net.minecraft.core.Registry;
+import net.minecraft.core.IdMap;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.world.inventory.ContainerEnchantTable;
+import net.minecraft.world.inventory.EnchantmentMenu;
 import net.minecraft.world.item.enchantment.Enchantment;
 import org.bukkit.craftbukkit.CraftRegistry;
 import org.bukkit.craftbukkit.enchantments.CraftEnchantment;
@@ -15,25 +15,25 @@ import org.bukkit.inventory.EnchantingInventory;
 import org.bukkit.inventory.view.EnchantmentView;
 import org.jetbrains.annotations.NotNull;
 
-public class CraftEnchantmentView extends CraftInventoryView<ContainerEnchantTable, EnchantingInventory> implements EnchantmentView {
+public class CraftEnchantmentView extends CraftInventoryView<EnchantmentMenu, EnchantingInventory> implements EnchantmentView {
 
-    public CraftEnchantmentView(final HumanEntity player, final EnchantingInventory viewing, final ContainerEnchantTable container) {
+    public CraftEnchantmentView(final HumanEntity player, final EnchantingInventory viewing, final EnchantmentMenu container) {
         super(player, viewing, container);
     }
 
     @Override
     public int getEnchantmentSeed() {
-        return container.getEnchantmentSeed();
+        return this.container.getEnchantmentSeed();
     }
 
     @NotNull
     @Override
     public EnchantmentOffer[] getOffers() {
-        Registry<Holder<Enchantment>> registry = CraftRegistry.getMinecraftRegistry().lookupOrThrow(Registries.ENCHANTMENT).asHolderIdMap();
+        IdMap<Holder<Enchantment>> registry = CraftRegistry.getMinecraftRegistry().lookupOrThrow(Registries.ENCHANTMENT).asHolderIdMap();
         EnchantmentOffer[] offers = new EnchantmentOffer[3];
         for (int i = 0; i < 3; i++) {
-            org.bukkit.enchantments.Enchantment enchantment = (container.enchantClue[i] >= 0) ? CraftEnchantment.minecraftHolderToBukkit(registry.byId(container.enchantClue[i])) : null;
-            offers[i] = (enchantment != null) ? new EnchantmentOffer(enchantment, container.levelClue[i], container.costs[i]) : null;
+            org.bukkit.enchantments.Enchantment enchantment = (this.container.enchantClue[i] >= 0) ? CraftEnchantment.minecraftHolderToBukkit(registry.byId(this.container.enchantClue[i])) : null;
+            offers[i] = (enchantment != null) ? new EnchantmentOffer(enchantment, this.container.levelClue[i], this.container.costs[i]) : null;
         }
         return offers;
     }
@@ -41,19 +41,19 @@ public class CraftEnchantmentView extends CraftInventoryView<ContainerEnchantTab
     @Override
     public void setOffers(@NotNull final EnchantmentOffer[] offers) {
         Preconditions.checkArgument(offers.length != 3, "There must be 3 offers given");
-        Registry<Holder<Enchantment>> registry = CraftRegistry.getMinecraftRegistry().lookupOrThrow(Registries.ENCHANTMENT).asHolderIdMap();
+        IdMap<Holder<Enchantment>> registry = CraftRegistry.getMinecraftRegistry().lookupOrThrow(Registries.ENCHANTMENT).asHolderIdMap();
         for (int i = 0; i < offers.length; i++) {
             final EnchantmentOffer offer = offers[i];
             if (offer == null) {
-                container.enchantClue[i] = -1;
-                container.levelClue[i] = -1;
-                container.costs[i] = 0;
+                this.container.enchantClue[i] = -1;
+                this.container.levelClue[i] = -1;
+                this.container.costs[i] = 0;
                 continue;
             }
 
-            container.enchantClue[i] = registry.getIdOrThrow(CraftEnchantment.bukkitToMinecraftHolder(offer.getEnchantment()));
-            container.levelClue[i] = offer.getEnchantmentLevel();
-            container.costs[i] = offer.getCost();
+            this.container.enchantClue[i] = registry.getIdOrThrow(CraftEnchantment.bukkitToMinecraftHolder(offer.getEnchantment()));
+            this.container.levelClue[i] = offer.getEnchantmentLevel();
+            this.container.costs[i] = offer.getCost();
         }
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftFurnaceView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftFurnaceView.java
index cd13453394..a305e88d1c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftFurnaceView.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftFurnaceView.java
@@ -1,42 +1,42 @@
 package org.bukkit.craftbukkit.inventory.view;
 
-import net.minecraft.world.inventory.ContainerFurnace;
-import net.minecraft.world.level.block.entity.TileEntityFurnace;
+import net.minecraft.world.inventory.AbstractFurnaceMenu;
+import net.minecraft.world.level.block.entity.AbstractFurnaceBlockEntity;
 import org.bukkit.craftbukkit.inventory.CraftInventoryView;
 import org.bukkit.entity.HumanEntity;
 import org.bukkit.inventory.FurnaceInventory;
 import org.bukkit.inventory.view.FurnaceView;
 
-public class CraftFurnaceView extends CraftInventoryView<ContainerFurnace, FurnaceInventory> implements FurnaceView {
+public class CraftFurnaceView extends CraftInventoryView<AbstractFurnaceMenu, FurnaceInventory> implements FurnaceView {
 
-    public CraftFurnaceView(final HumanEntity player, final FurnaceInventory viewing, final ContainerFurnace container) {
+    public CraftFurnaceView(final HumanEntity player, final FurnaceInventory viewing, final AbstractFurnaceMenu container) {
         super(player, viewing, container);
     }
 
     @Override
     public float getCookTime() {
-        return container.getBurnProgress();
+        return this.container.getBurnProgress();
     }
 
     @Override
     public float getBurnTime() {
-        return container.getLitProgress();
+        return this.container.getLitProgress();
     }
 
     @Override
     public boolean isBurning() {
-        return container.isLit();
+        return this.container.isLit();
     }
 
     @Override
     public void setCookTime(final int cookProgress, final int cookDuration) {
-        container.setData(TileEntityFurnace.DATA_COOKING_PROGRESS, cookProgress);
-        container.setData(TileEntityFurnace.DATA_COOKING_TOTAL_TIME, cookDuration);
+        this.container.setData(AbstractFurnaceBlockEntity.DATA_COOKING_PROGRESS, cookProgress);
+        this.container.setData(AbstractFurnaceBlockEntity.DATA_COOKING_TOTAL_TIME, cookDuration);
     }
 
     @Override
     public void setBurnTime(final int burnProgress, final int burnDuration) {
-        container.setData(TileEntityFurnace.DATA_LIT_TIME, burnProgress);
-        container.setData(TileEntityFurnace.DATA_LIT_DURATION, burnDuration);
+        this.container.setData(AbstractFurnaceBlockEntity.DATA_LIT_TIME, burnProgress);
+        this.container.setData(AbstractFurnaceBlockEntity.DATA_LIT_DURATION, burnDuration);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftLecternView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftLecternView.java
index 14e2a625eb..60bc6878c6 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftLecternView.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftLecternView.java
@@ -1,27 +1,27 @@
 package org.bukkit.craftbukkit.inventory.view;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.inventory.ContainerLectern;
-import net.minecraft.world.level.block.entity.TileEntityLectern;
+import net.minecraft.world.inventory.LecternMenu;
+import net.minecraft.world.level.block.entity.LecternBlockEntity;
 import org.bukkit.craftbukkit.inventory.CraftInventoryView;
 import org.bukkit.entity.HumanEntity;
 import org.bukkit.inventory.LecternInventory;
 import org.bukkit.inventory.view.LecternView;
 
-public class CraftLecternView extends CraftInventoryView<ContainerLectern, LecternInventory> implements LecternView {
+public class CraftLecternView extends CraftInventoryView<LecternMenu, LecternInventory> implements LecternView {
 
-    public CraftLecternView(final HumanEntity player, final LecternInventory viewing, final ContainerLectern container) {
+    public CraftLecternView(final HumanEntity player, final LecternInventory viewing, final LecternMenu container) {
         super(player, viewing, container);
     }
 
     @Override
     public int getPage() {
-        return container.getPage();
+        return this.container.getPage();
     }
 
     @Override
     public void setPage(final int page) {
         Preconditions.checkArgument(page >= 0, "The minimum page is 0");
-        container.setData(TileEntityLectern.DATA_PAGE, page);
+        this.container.setData(LecternBlockEntity.DATA_PAGE, page);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftLoomView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftLoomView.java
index 8f0740cb06..72640954fc 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftLoomView.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftLoomView.java
@@ -3,8 +3,8 @@ package org.bukkit.craftbukkit.inventory.view;
 import java.util.ArrayList;
 import java.util.List;
 import net.minecraft.core.Holder;
-import net.minecraft.world.inventory.ContainerLoom;
-import net.minecraft.world.level.block.entity.EnumBannerPatternType;
+import net.minecraft.world.inventory.LoomMenu;
+import net.minecraft.world.level.block.entity.BannerPattern;
 import org.bukkit.block.banner.PatternType;
 import org.bukkit.craftbukkit.block.banner.CraftPatternType;
 import org.bukkit.craftbukkit.inventory.CraftInventoryView;
@@ -12,17 +12,17 @@ import org.bukkit.entity.HumanEntity;
 import org.bukkit.inventory.LoomInventory;
 import org.bukkit.inventory.view.LoomView;
 
-public class CraftLoomView extends CraftInventoryView<ContainerLoom, LoomInventory> implements LoomView {
+public class CraftLoomView extends CraftInventoryView<LoomMenu, LoomInventory> implements LoomView {
 
-    public CraftLoomView(final HumanEntity player, final LoomInventory viewing, final ContainerLoom container) {
+    public CraftLoomView(final HumanEntity player, final LoomInventory viewing, final LoomMenu container) {
         super(player, viewing, container);
     }
 
     @Override
     public List<PatternType> getSelectablePatterns() {
-        final List<Holder<EnumBannerPatternType>> selectablePatterns = container.getSelectablePatterns();
+        final List<Holder<BannerPattern>> selectablePatterns = this.container.getSelectablePatterns();
         final List<PatternType> patternTypes = new ArrayList<>(selectablePatterns.size());
-        for (final Holder<EnumBannerPatternType> selectablePattern : selectablePatterns) {
+        for (final Holder<BannerPattern> selectablePattern : selectablePatterns) {
             patternTypes.add(CraftPatternType.minecraftHolderToBukkit(selectablePattern));
         }
         return patternTypes;
@@ -30,6 +30,6 @@ public class CraftLoomView extends CraftInventoryView<ContainerLoom, LoomInvento
 
     @Override
     public int getSelectedPatternIndex() {
-        return container.getSelectedBannerPatternIndex();
+        return this.container.getSelectedBannerPatternIndex();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftMerchantView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftMerchantView.java
index 39b7079592..d30d347e76 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftMerchantView.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftMerchantView.java
@@ -1,7 +1,6 @@
 package org.bukkit.craftbukkit.inventory.view;
 
-import net.minecraft.world.inventory.ContainerMerchant;
-import net.minecraft.world.item.trading.IMerchant;
+import net.minecraft.world.inventory.MerchantMenu;
 import org.bukkit.craftbukkit.inventory.CraftInventoryView;
 import org.bukkit.entity.HumanEntity;
 import org.bukkit.inventory.Merchant;
@@ -9,11 +8,11 @@ import org.bukkit.inventory.MerchantInventory;
 import org.bukkit.inventory.view.MerchantView;
 import org.jetbrains.annotations.NotNull;
 
-public class CraftMerchantView extends CraftInventoryView<ContainerMerchant, MerchantInventory> implements MerchantView {
+public class CraftMerchantView extends CraftInventoryView<MerchantMenu, MerchantInventory> implements MerchantView {
 
-    private final IMerchant trader;
+    private final net.minecraft.world.item.trading.Merchant trader;
 
-    public CraftMerchantView(final HumanEntity player, final MerchantInventory viewing, final ContainerMerchant container, final IMerchant trader) {
+    public CraftMerchantView(final HumanEntity player, final MerchantInventory viewing, final MerchantMenu container, final net.minecraft.world.item.trading.Merchant trader) {
         super(player, viewing, container);
         this.trader = trader;
     }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftStonecutterView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftStonecutterView.java
index 19cb5bc162..ff776e2356 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftStonecutterView.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/inventory/view/CraftStonecutterView.java
@@ -2,10 +2,10 @@ package org.bukkit.craftbukkit.inventory.view;
 
 import java.util.ArrayList;
 import java.util.List;
-import net.minecraft.world.inventory.ContainerStonecutter;
+import net.minecraft.world.inventory.StonecutterMenu;
 import net.minecraft.world.item.crafting.RecipeHolder;
-import net.minecraft.world.item.crafting.RecipeStonecutting;
 import net.minecraft.world.item.crafting.SelectableRecipe;
+import net.minecraft.world.item.crafting.StonecutterRecipe;
 import org.bukkit.craftbukkit.inventory.CraftInventoryView;
 import org.bukkit.entity.HumanEntity;
 import org.bukkit.inventory.StonecutterInventory;
@@ -13,22 +13,22 @@ import org.bukkit.inventory.StonecuttingRecipe;
 import org.bukkit.inventory.view.StonecutterView;
 import org.jetbrains.annotations.NotNull;
 
-public class CraftStonecutterView extends CraftInventoryView<ContainerStonecutter, StonecutterInventory> implements StonecutterView {
+public class CraftStonecutterView extends CraftInventoryView<StonecutterMenu, StonecutterInventory> implements StonecutterView {
 
-    public CraftStonecutterView(final HumanEntity player, final StonecutterInventory viewing, final ContainerStonecutter container) {
+    public CraftStonecutterView(final HumanEntity player, final StonecutterInventory viewing, final StonecutterMenu container) {
         super(player, viewing, container);
     }
 
     @Override
     public int getSelectedRecipeIndex() {
-        return container.getSelectedRecipeIndex();
+        return this.container.getSelectedRecipeIndex();
     }
 
     @NotNull
     @Override
     public List<StonecuttingRecipe> getRecipes() {
         final List<StonecuttingRecipe> recipes = new ArrayList<>();
-        for (final SelectableRecipe.a<RecipeStonecutting> recipe : container.getVisibleRecipes().entries()) {
+        for (final SelectableRecipe.SingleInputEntry<StonecutterRecipe> recipe : this.container.getVisibleRecipes().entries()) {
             recipe.recipe().recipe().map(RecipeHolder::toBukkitRecipe).ifPresent((bukkit) -> recipes.add((StonecuttingRecipe) bukkit));
         }
         return recipes;
@@ -36,6 +36,6 @@ public class CraftStonecutterView extends CraftInventoryView<ContainerStonecutte
 
     @Override
     public int getRecipeAmount() {
-        return container.getNumberOfVisibleRecipes();
+        return this.container.getNumberOfVisibleRecipes();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/CraftEvil.java b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/CraftEvil.java
index 00eac82619..db52314e32 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/CraftEvil.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/CraftEvil.java
@@ -47,30 +47,30 @@ public final class CraftEvil {
     }
 
     public static int getBlockTypeIdAt(World world, int x, int y, int z) {
-        return getId(world.getBlockAt(x, y, z).getType());
+        return CraftEvil.getId(world.getBlockAt(x, y, z).getType());
     }
 
     public static int getBlockTypeIdAt(World world, Location location) {
-        return getId(world.getBlockAt(location).getType());
+        return CraftEvil.getId(world.getBlockAt(location).getType());
     }
 
     public static int getTypeId(Block block) {
-        return getId(block.getType());
+        return CraftEvil.getId(block.getType());
     }
 
     public static boolean setTypeId(Block block, int type) {
-        block.setType(getMaterial(type));
+        block.setType(CraftEvil.getMaterial(type));
         return true;
     }
 
     public static boolean setTypeId(Block block, int type, boolean applyPhysics) {
-        block.setType(getMaterial(type), applyPhysics);
+        block.setType(CraftEvil.getMaterial(type), applyPhysics);
         return true;
     }
 
     public static boolean setTypeIdAndData(Block block, int type, byte data, boolean applyPhysics) {
-        block.setType(getMaterial(type), applyPhysics);
-        setData(block, data);
+        block.setType(CraftEvil.getMaterial(type), applyPhysics);
+        CraftEvil.setData(block, data);
         return true;
     }
 
@@ -83,24 +83,24 @@ public final class CraftEvil {
     }
 
     public static int getTypeId(BlockState state) {
-        return getId(state.getType());
+        return CraftEvil.getId(state.getType());
     }
 
     public static boolean setTypeId(BlockState state, int type) {
-        state.setType(getMaterial(type));
+        state.setType(CraftEvil.getMaterial(type));
         return true;
     }
 
     public static int getTypeId(ItemStack stack) {
-        return getId(stack.getType());
+        return CraftEvil.getId(stack.getType());
     }
 
     public static void setTypeId(ItemStack stack, int type) {
-        stack.setType(getMaterial(type));
+        stack.setType(CraftEvil.getMaterial(type));
     }
 
     public static Material getMaterial(int id) {
-        return byId.get(id);
+        return CraftEvil.byId.get(id);
     }
 
     public static int getId(Material material) {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java
index 536db5de31..46787d68ea 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/CraftLegacy.java
@@ -10,23 +10,23 @@ import java.util.Optional;
 import java.util.Set;
 import net.minecraft.SharedConstants;
 import net.minecraft.core.registries.BuiltInRegistries;
-import net.minecraft.nbt.DynamicOpsNBT;
-import net.minecraft.nbt.NBTBase;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.resources.MinecraftKey;
-import net.minecraft.server.DispenserRegistry;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.nbt.NbtOps;
+import net.minecraft.nbt.Tag;
+import net.minecraft.resources.ResourceLocation;
+import net.minecraft.server.Bootstrap;
 import net.minecraft.server.MinecraftServer;
-import net.minecraft.util.datafix.DataConverterRegistry;
-import net.minecraft.util.datafix.fixes.DataConverterFlattenData;
-import net.minecraft.util.datafix.fixes.DataConverterMaterialId;
-import net.minecraft.util.datafix.fixes.DataConverterTypes;
+import net.minecraft.util.datafix.DataFixers;
+import net.minecraft.util.datafix.fixes.BlockStateData;
+import net.minecraft.util.datafix.fixes.ItemIdFix;
+import net.minecraft.util.datafix.fixes.References;
 import net.minecraft.world.item.Item;
 import net.minecraft.world.item.Items;
 import net.minecraft.world.level.block.Block;
 import net.minecraft.world.level.block.Blocks;
-import net.minecraft.world.level.block.state.BlockStateList;
-import net.minecraft.world.level.block.state.IBlockData;
-import net.minecraft.world.level.block.state.properties.IBlockState;
+import net.minecraft.world.level.block.state.BlockState;
+import net.minecraft.world.level.block.state.StateDefinition;
+import net.minecraft.world.level.block.state.properties.Property;
 import org.bukkit.Material;
 import org.bukkit.craftbukkit.util.CraftMagicNumbers;
 import org.bukkit.entity.EntityType;
@@ -49,8 +49,8 @@ public final class CraftLegacy {
     private static final Set<String> whitelistedStates = new HashSet<>(Arrays.asList("explode", "check_decay", "decayable", "facing"));
     private static final Map<MaterialData, Item> materialToItem = new HashMap<>(16384);
     private static final Map<Item, MaterialData> itemToMaterial = new HashMap<>(1024);
-    private static final Map<MaterialData, IBlockData> materialToData = new HashMap<>(4096);
-    private static final Map<IBlockData, MaterialData> dataToMaterial = new HashMap<>(4096);
+    private static final Map<MaterialData, BlockState> materialToData = new HashMap<>(4096);
+    private static final Map<BlockState, MaterialData> dataToMaterial = new HashMap<>(4096);
     private static final Map<MaterialData, Block> materialToBlock = new HashMap<>(4096);
     private static final Map<Block, MaterialData> blockToMaterial = new HashMap<>(1024);
 
@@ -63,11 +63,11 @@ public final class CraftLegacy {
             return material;
         }
 
-        return toLegacyData(material).getItemType();
+        return CraftLegacy.toLegacyData(material).getItemType();
     }
 
     public static MaterialData toLegacyData(Material material) {
-        return toLegacyData(material, false);
+        return CraftLegacy.toLegacyData(material, false);
     }
 
     public static MaterialData toLegacyData(Material material, boolean itemPriority) {
@@ -76,44 +76,44 @@ public final class CraftLegacy {
 
         if (itemPriority) {
             Item item = CraftMagicNumbers.getItem(material);
-            mappedData = itemToMaterial.get(item);
+            mappedData = CraftLegacy.itemToMaterial.get(item);
         }
 
         if (mappedData == null && material.isBlock()) {
             Block block = CraftMagicNumbers.getBlock(material);
-            IBlockData blockData = block.defaultBlockState();
+            BlockState blockData = block.defaultBlockState();
 
             // Try exact match first
-            mappedData = dataToMaterial.get(blockData);
+            mappedData = CraftLegacy.dataToMaterial.get(blockData);
             // Fallback to any block
             if (mappedData == null) {
-                mappedData = blockToMaterial.get(block);
+                mappedData = CraftLegacy.blockToMaterial.get(block);
                 // Fallback to matching item
                 if (mappedData == null) {
-                    mappedData = itemToMaterial.get(block.asItem());
+                    mappedData = CraftLegacy.itemToMaterial.get(block.asItem());
                 }
             }
         } else if (!itemPriority) {
             Item item = CraftMagicNumbers.getItem(material);
-            mappedData = itemToMaterial.get(item);
+            mappedData = CraftLegacy.itemToMaterial.get(item);
         }
 
         return (mappedData == null) ? new MaterialData(Material.LEGACY_AIR) : mappedData;
     }
 
-    public static IBlockData fromLegacyData(Material material, byte data) {
+    public static BlockState fromLegacyData(Material material, byte data) {
         Preconditions.checkArgument(material.isLegacy(), "fromLegacyData on modern Material");
 
         MaterialData materialData = new MaterialData(material, data);
 
         // Try exact match first
-        IBlockData converted = materialToData.get(materialData);
+        BlockState converted = CraftLegacy.materialToData.get(materialData);
         if (converted != null) {
             return converted;
         }
 
         // Fallback to any block
-        Block convertedBlock = materialToBlock.get(materialData);
+        Block convertedBlock = CraftLegacy.materialToBlock.get(materialData);
         if (convertedBlock != null) {
             return convertedBlock.defaultBlockState();
         }
@@ -128,7 +128,7 @@ public final class CraftLegacy {
         MaterialData materialData = new MaterialData(material, (byte) data);
 
         // First try matching item
-        Item convertedItem = materialToItem.get(materialData);
+        Item convertedItem = CraftLegacy.materialToItem.get(materialData);
         if (convertedItem != null) {
             return convertedItem;
         }
@@ -136,13 +136,13 @@ public final class CraftLegacy {
         // Fallback to matching block
         if (material.isBlock()) {
             // Try exact match first
-            IBlockData converted = materialToData.get(materialData);
+            BlockState converted = CraftLegacy.materialToData.get(materialData);
             if (converted != null) {
                 return converted.getBlock().asItem();
             }
 
             // Fallback to any block
-            Block convertedBlock = materialToBlock.get(materialData);
+            Block convertedBlock = CraftLegacy.materialToBlock.get(materialData);
             if (convertedBlock != null) {
                 return convertedBlock.asItem();
             }
@@ -152,22 +152,22 @@ public final class CraftLegacy {
         return Items.AIR;
     }
 
-    public static byte toLegacyData(IBlockData blockData) {
-        return toLegacy(blockData).getData();
+    public static byte toLegacyData(BlockState blockData) {
+        return CraftLegacy.toLegacy(blockData).getData();
     }
 
-    public static Material toLegacyMaterial(IBlockData blockData) {
-        return toLegacy(blockData).getItemType();
+    public static Material toLegacyMaterial(BlockState blockData) {
+        return CraftLegacy.toLegacy(blockData).getItemType();
     }
 
-    public static MaterialData toLegacy(IBlockData blockData) {
+    public static MaterialData toLegacy(BlockState blockData) {
         MaterialData mappedData;
 
         // Try exact match first
-        mappedData = dataToMaterial.get(blockData);
+        mappedData = CraftLegacy.dataToMaterial.get(blockData);
         // Fallback to any block
         if (mappedData == null) {
-            mappedData = blockToMaterial.get(blockData.getBlock());
+            mappedData = CraftLegacy.blockToMaterial.get(blockData.getBlock());
         }
 
         return (mappedData == null) ? new MaterialData(Material.LEGACY_AIR) : mappedData;
@@ -178,11 +178,11 @@ public final class CraftLegacy {
             return material;
         }
 
-        return fromLegacy(new MaterialData(material));
+        return CraftLegacy.fromLegacy(new MaterialData(material));
     }
 
     public static Material fromLegacy(MaterialData materialData) {
-        return fromLegacy(materialData, false);
+        return CraftLegacy.fromLegacy(materialData, false);
     }
 
     public static Material fromLegacy(MaterialData materialData, boolean itemPriority) {
@@ -195,7 +195,7 @@ public final class CraftLegacy {
 
         // Try item first
         if (itemPriority) {
-            Item item = materialToItem.get(materialData);
+            Item item = CraftLegacy.materialToItem.get(materialData);
             if (item != null) {
                 mappedData = CraftMagicNumbers.getMaterial(item);
             }
@@ -203,14 +203,14 @@ public final class CraftLegacy {
 
         if (mappedData == null) {
             // Try exact match first
-            IBlockData iblock = materialToData.get(materialData);
+            BlockState iblock = CraftLegacy.materialToData.get(materialData);
             if (iblock != null) {
                 mappedData = CraftMagicNumbers.getMaterial(iblock.getBlock());
             }
 
             // Fallback to any block
             if (mappedData == null) {
-                Block block = materialToBlock.get(materialData);
+                Block block = CraftLegacy.materialToBlock.get(materialData);
                 if (block != null) {
                     mappedData = CraftMagicNumbers.getMaterial(block);
                 }
@@ -219,7 +219,7 @@ public final class CraftLegacy {
 
         // Fallback to matching item
         if (!itemPriority && mappedData == null) {
-            Item item = materialToItem.get(materialData);
+            Item item = CraftLegacy.materialToItem.get(materialData);
             if (item != null) {
                 mappedData = CraftMagicNumbers.getMaterial(item);
             }
@@ -256,7 +256,7 @@ public final class CraftLegacy {
     }
 
     public static String toString(Material material) {
-        return name(material);
+        return CraftLegacy.name(material);
     }
 
     public static void init() {
@@ -323,7 +323,7 @@ public final class CraftLegacy {
         SPAWN_EGGS.put((byte) EntityType.ZOMBIE_VILLAGER.getTypeId(), Material.ZOMBIE_VILLAGER_SPAWN_EGG);
 
         SharedConstants.tryDetectVersion();
-        DispenserRegistry.bootStrap();
+        Bootstrap.bootStrap();
 
         for (Material material : Material.values()) {
             if (!material.isLegacy()) {
@@ -334,26 +334,26 @@ public final class CraftLegacy {
             if (isBlock(material)) { // Use custom method instead of Material#isBlock since it relies on this being already run
                 for (byte data = 0; data < 16; data++) {
                     MaterialData matData = new MaterialData(material, data);
-                    Dynamic blockTag = DataConverterFlattenData.getTag(material.getId() << 4 | data);
-                    blockTag = DataConverterRegistry.getDataFixer().update(DataConverterTypes.BLOCK_STATE, blockTag, 100, CraftMagicNumbers.INSTANCE.getDataVersion());
+                    Dynamic blockTag = BlockStateData.getTag(material.getId() << 4 | data);
+                    blockTag = DataFixers.getDataFixer().update(References.BLOCK_STATE, blockTag, 100, CraftMagicNumbers.INSTANCE.getDataVersion());
                     // TODO: better skull conversion, chests
                     if (blockTag.get("Name").asString("").contains("%%FILTER_ME%%")) {
                         continue;
                     }
 
                     String name = blockTag.get("Name").asString("");
-                    Block block = BuiltInRegistries.BLOCK.getValue(MinecraftKey.parse(name));
+                    Block block = BuiltInRegistries.BLOCK.getValue(ResourceLocation.parse(name));
                     if (block == null) {
                         continue;
                     }
-                    IBlockData blockData = block.defaultBlockState();
-                    BlockStateList states = block.getStateDefinition();
+                    BlockState blockData = block.defaultBlockState();
+                    StateDefinition states = block.getStateDefinition();
 
-                    Optional<NBTTagCompound> propMap = blockTag.getElement("Properties").result();
+                    Optional<CompoundTag> propMap = blockTag.getElement("Properties").result();
                     if (propMap.isPresent()) {
-                        NBTTagCompound properties = propMap.get();
+                        CompoundTag properties = propMap.get();
                         for (String dataKey : properties.getAllKeys()) {
-                            IBlockState state = states.getProperty(dataKey);
+                            Property state = states.getProperty(dataKey);
 
                             if (state == null) {
                                 Preconditions.checkArgument(whitelistedStates.contains(dataKey), "No state for %s", dataKey);
@@ -397,17 +397,17 @@ public final class CraftLegacy {
                     continue;
                 }
                 // Skip non item stacks for now (18w19b)
-                if (DataConverterMaterialId.getItem(material.getId()) == null) {
+                if (ItemIdFix.getItem(material.getId()) == null) {
                     continue;
                 }
 
                 MaterialData matData = new MaterialData(material, data);
 
-                NBTTagCompound stack = new NBTTagCompound();
+                CompoundTag stack = new CompoundTag();
                 stack.putInt("id", material.getId());
                 stack.putShort("Damage", data);
 
-                Dynamic<NBTBase> converted = DataConverterRegistry.getDataFixer().update(DataConverterTypes.ITEM_STACK, new Dynamic<NBTBase>(DynamicOpsNBT.INSTANCE, stack), -1, CraftMagicNumbers.INSTANCE.getDataVersion());
+                Dynamic<Tag> converted = DataFixers.getDataFixer().update(References.ITEM_STACK, new Dynamic<Tag>(NbtOps.INSTANCE, stack), -1, CraftMagicNumbers.INSTANCE.getDataVersion());
 
                 String newId = converted.get("id").asString("");
                 // Recover spawn eggs with invalid data
@@ -416,7 +416,7 @@ public final class CraftLegacy {
                 }
 
                 // Preconditions.checkState(newId.contains("minecraft:"), "Unknown new material for " + matData);
-                Item newMaterial = BuiltInRegistries.ITEM.getValue(MinecraftKey.parse(newId));
+                Item newMaterial = BuiltInRegistries.ITEM.getValue(ResourceLocation.parse(newId));
 
                 if (newMaterial == Items.AIR) {
                     continue;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java
index 3a0dc5a73a..091e11934b 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/FieldRename.java
@@ -35,18 +35,18 @@ public class FieldRename {
         }
 
         return switch (owner) {
-            case "org/bukkit/block/banner/PatternType" -> convertPatternTypeName(apiVersion, from);
-            case "org/bukkit/enchantments/Enchantment" -> convertEnchantmentName(apiVersion, from);
-            case "org/bukkit/block/Biome" -> convertBiomeName(apiVersion, from);
-            case "org/bukkit/entity/EntityType" -> convertEntityTypeName(apiVersion, from);
-            case "org/bukkit/potion/PotionEffectType" -> convertPotionEffectTypeName(apiVersion, from);
-            case "org/bukkit/potion/PotionType" -> convertPotionTypeName(apiVersion, from);
-            case "org/bukkit/MusicInstrument" -> convertMusicInstrumentName(apiVersion, from);
-            case "org/bukkit/Particle" -> convertParticleName(apiVersion, from);
-            case "org/bukkit/loot/LootTables" -> convertLootTablesName(apiVersion, from);
-            case "org/bukkit/attribute/Attribute" -> convertAttributeName(apiVersion, from).replace('.', '_');
-            case "org/bukkit/map/MapCursor$Type" -> convertMapCursorTypeName(apiVersion, from);
-            case "org/bukkit/inventory/ItemFlag" -> convertItemFlagName(apiVersion, from);
+            case "org/bukkit/block/banner/PatternType" -> FieldRename.convertPatternTypeName(apiVersion, from);
+            case "org/bukkit/enchantments/Enchantment" -> FieldRename.convertEnchantmentName(apiVersion, from);
+            case "org/bukkit/block/Biome" -> FieldRename.convertBiomeName(apiVersion, from);
+            case "org/bukkit/entity/EntityType" -> FieldRename.convertEntityTypeName(apiVersion, from);
+            case "org/bukkit/potion/PotionEffectType" -> FieldRename.convertPotionEffectTypeName(apiVersion, from);
+            case "org/bukkit/potion/PotionType" -> FieldRename.convertPotionTypeName(apiVersion, from);
+            case "org/bukkit/MusicInstrument" -> FieldRename.convertMusicInstrumentName(apiVersion, from);
+            case "org/bukkit/Particle" -> FieldRename.convertParticleName(apiVersion, from);
+            case "org/bukkit/loot/LootTables" -> FieldRename.convertLootTablesName(apiVersion, from);
+            case "org/bukkit/attribute/Attribute" -> FieldRename.convertAttributeName(apiVersion, from).replace('.', '_');
+            case "org/bukkit/map/MapCursor$Type" -> FieldRename.convertMapCursorTypeName(apiVersion, from);
+            case "org/bukkit/inventory/ItemFlag" -> FieldRename.convertItemFlagName(apiVersion, from);
             default -> from;
         };
     }
@@ -73,13 +73,13 @@ public class FieldRename {
 
     @DoNotReroute
     public static String convertPatternTypeName(ApiVersion version, String from) {
-        return PATTERN_TYPE_DATA.getReplacement(version, from);
+        return FieldRename.PATTERN_TYPE_DATA.getReplacement(version, from);
     }
 
     @RerouteMethodName("valueOf")
     @RerouteStatic("org/bukkit/block/banner/PatternType")
     public static PatternType valueOf_PatternType(String value, @InjectPluginVersion ApiVersion version) {
-        return PatternType.valueOf(convertPatternTypeName(version, value));
+        return PatternType.valueOf(FieldRename.convertPatternTypeName(version, value));
     }
 
     // Enchantment
@@ -112,14 +112,14 @@ public class FieldRename {
 
     @DoNotReroute
     public static String convertEnchantmentName(ApiVersion version, String from) {
-        return ENCHANTMENT_DATA.getReplacement(version, from);
+        return FieldRename.ENCHANTMENT_DATA.getReplacement(version, from);
     }
 
     @RerouteMethodName("getByName")
     @RerouteStatic("org/bukkit/enchantments/Enchantment")
     public static Enchantment getByName_Enchantment(String name) {
         // We don't have version-specific changes, so just use current, and don't inject a version
-        return Enchantment.getByName(convertEnchantmentName(ApiVersion.CURRENT, name));
+        return Enchantment.getByName(FieldRename.convertEnchantmentName(ApiVersion.CURRENT, name));
     }
 
     // Biome
@@ -144,14 +144,14 @@ public class FieldRename {
 
     @DoNotReroute
     public static String convertBiomeName(ApiVersion version, String from) {
-        return BIOME_DATA.getReplacement(version, from);
+        return FieldRename.BIOME_DATA.getReplacement(version, from);
     }
 
     @RerouteMethodName("valueOf")
     @RerouteStatic("org/bukkit/block/Biome")
     public static Biome valueOf_Biome(String name) {
         // We don't have version-specific changes, so just use current, and don't inject a version
-        return Biome.valueOf(convertBiomeName(ApiVersion.CURRENT, name));
+        return Biome.valueOf(FieldRename.convertBiomeName(ApiVersion.CURRENT, name));
     }
 
     // EntityType
@@ -197,21 +197,21 @@ public class FieldRename {
 
     @DoNotReroute
     public static String convertEntityTypeName(ApiVersion version, String from) {
-        return ENTITY_TYPE_DATA.getReplacement(version, from);
+        return FieldRename.ENTITY_TYPE_DATA.getReplacement(version, from);
     }
 
     @RerouteMethodName("valueOf")
     @RerouteStatic("org/bukkit/entity/EntityType")
     public static EntityType valueOf_EntityType(String name) {
         // We don't have version-specific changes, so just use current, and don't inject a version
-        return EntityType.valueOf(convertEntityTypeName(ApiVersion.CURRENT, name));
+        return EntityType.valueOf(FieldRename.convertEntityTypeName(ApiVersion.CURRENT, name));
     }
 
     @RerouteMethodName("fromName")
     @RerouteStatic("org/bukkit/entity/EntityType")
     public static EntityType fromName_EntityType(String name) {
         // We don't have version-specific changes, so just use current, and don't inject a version
-        return EntityType.fromName(convertEntityTypeName(ApiVersion.CURRENT, name));
+        return EntityType.fromName(FieldRename.convertEntityTypeName(ApiVersion.CURRENT, name));
     }
 
     // PotionEffectType
@@ -230,14 +230,14 @@ public class FieldRename {
 
     @DoNotReroute
     public static String convertPotionEffectTypeName(ApiVersion version, String from) {
-        return POTION_EFFECT_TYPE_DATA.getReplacement(version, from);
+        return FieldRename.POTION_EFFECT_TYPE_DATA.getReplacement(version, from);
     }
 
     @RerouteMethodName("getByName")
     @RerouteStatic("org/bukkit/potion/PotionEffectType")
     public static PotionEffectType getByName_PotionEffectType(String name) {
         // We don't have version-specific changes, so just use current, and don't inject a version
-        return PotionEffectType.getByName(convertPotionEffectTypeName(ApiVersion.CURRENT, name));
+        return PotionEffectType.getByName(FieldRename.convertPotionEffectTypeName(ApiVersion.CURRENT, name));
     }
 
     // PotionType
@@ -252,14 +252,14 @@ public class FieldRename {
 
     @DoNotReroute
     public static String convertPotionTypeName(ApiVersion version, String from) {
-        return POTION_TYPE_DATA.getReplacement(version, from);
+        return FieldRename.POTION_TYPE_DATA.getReplacement(version, from);
     }
 
     @RerouteMethodName("valueOf")
     @RerouteStatic("org/bukkit/potion/PotionType")
     public static PotionType valueOf_PotionType(String name) {
         // We don't have version-specific changes, so just use current, and don't inject a version
-        return PotionType.valueOf(convertPotionTypeName(ApiVersion.CURRENT, name));
+        return PotionType.valueOf(FieldRename.convertPotionTypeName(ApiVersion.CURRENT, name));
     }
 
     // MusicInstrument
@@ -276,7 +276,7 @@ public class FieldRename {
 
     @DoNotReroute
     public static String convertMusicInstrumentName(ApiVersion version, String from) {
-        return MUSIC_INSTRUMENT_DATA.getReplacement(version, from);
+        return FieldRename.MUSIC_INSTRUMENT_DATA.getReplacement(version, from);
     }
 
     // Particle
@@ -322,14 +322,14 @@ public class FieldRename {
 
     @DoNotReroute
     public static String convertParticleName(ApiVersion version, String from) {
-        return PARTICLE_DATA.getReplacement(version, from);
+        return FieldRename.PARTICLE_DATA.getReplacement(version, from);
     }
 
     @RerouteMethodName("valueOf")
     @RerouteStatic("org/bukkit/Particle")
     public static Particle valueOf_Particle(String name) {
         // We don't have version-specific changes, so just use current, and don't inject a version
-        return Particle.valueOf(convertParticleName(ApiVersion.CURRENT, name));
+        return Particle.valueOf(FieldRename.convertParticleName(ApiVersion.CURRENT, name));
     }
 
     // LootTables
@@ -340,14 +340,14 @@ public class FieldRename {
 
     @DoNotReroute
     public static String convertLootTablesName(ApiVersion version, String from) {
-        return LOOT_TABLES_DATA.getReplacement(version, from);
+        return FieldRename.LOOT_TABLES_DATA.getReplacement(version, from);
     }
 
     @RerouteMethodName("valueOf")
     @RerouteStatic("org/bukkit/loot/LootTables")
     public static LootTables valueOf_LootTables(String name) {
         // We don't have version-specific changes, so just use current, and don't inject a version
-        return LootTables.valueOf(convertLootTablesName(ApiVersion.CURRENT, name));
+        return LootTables.valueOf(FieldRename.convertLootTablesName(ApiVersion.CURRENT, name));
     }
 
     // Attribute
@@ -393,14 +393,14 @@ public class FieldRename {
 
     @DoNotReroute
     public static String convertAttributeName(ApiVersion version, String from) {
-        return ATTRIBUTE_DATA.getReplacement(version, from);
+        return FieldRename.ATTRIBUTE_DATA.getReplacement(version, from);
     }
 
     @RerouteMethodName("valueOf")
     @RerouteStatic("org/bukkit/attribute/Attribute")
     public static Attribute valueOf_Attribute(String name) {
         // We don't have version-specific changes, so just use current, and don't inject a version
-        return Attribute.valueOf(convertAttributeName(ApiVersion.CURRENT, name).replace('.', '_'));
+        return Attribute.valueOf(FieldRename.convertAttributeName(ApiVersion.CURRENT, name).replace('.', '_'));
     }
 
     // MapCursor Type
@@ -425,13 +425,13 @@ public class FieldRename {
 
     @DoNotReroute
     public static String convertMapCursorTypeName(ApiVersion version, String from) {
-        return MAP_CURSOR_TYPE_DATA.getReplacement(version, from);
+        return FieldRename.MAP_CURSOR_TYPE_DATA.getReplacement(version, from);
     }
 
     @RerouteMethodName("valueOf")
     @RerouteStatic("org/bukkit/map/MapCursor$Type")
     public static MapCursor.Type valueOf_MapCursorType(String name, @InjectPluginVersion ApiVersion version) {
-        return MapCursor.Type.valueOf(convertMapCursorTypeName(version, name));
+        return MapCursor.Type.valueOf(FieldRename.convertMapCursorTypeName(version, name));
     }
 
     // ItemFlag
@@ -442,13 +442,13 @@ public class FieldRename {
 
     @DoNotReroute
     public static String convertItemFlagName(ApiVersion version, String from) {
-        return ITEM_FLAG_DATA.getReplacement(version, from);
+        return FieldRename.ITEM_FLAG_DATA.getReplacement(version, from);
     }
 
     @RerouteMethodName("valueOf")
     @RerouteStatic("org/bukkit/inventory/ItemFlag")
     public static ItemFlag valueOf_ItemFlag(String name) {
         // We don't have version-specific changes, so just use current, and don't inject a version
-        return ItemFlag.valueOf(convertItemFlagName(ApiVersion.CURRENT, name));
+        return ItemFlag.valueOf(FieldRename.convertItemFlagName(ApiVersion.CURRENT, name));
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/MaterialRerouting.java b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/MaterialRerouting.java
index 4a7876798d..3ff0f0e343 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/MaterialRerouting.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/MaterialRerouting.java
@@ -117,45 +117,45 @@ public class MaterialRerouting {
     }
 
     public static Material getMaterial(BlockData blockData, @InjectPluginVersion ApiVersion version) {
-        return transformFromBlockType(blockData.getMaterial(), version);
+        return MaterialRerouting.transformFromBlockType(blockData.getMaterial(), version);
     }
 
     public static Material getPlacementMaterial(BlockData blockData, @InjectPluginVersion ApiVersion version) {
-        return transformFromItemType(blockData.getPlacementMaterial(), version);
+        return MaterialRerouting.transformFromItemType(blockData.getPlacementMaterial(), version);
     }
 
     public static Material getType(Block block, @InjectPluginVersion ApiVersion version) {
-        return transformFromBlockType(block.getType(), version);
+        return MaterialRerouting.transformFromBlockType(block.getType(), version);
     }
 
     public static void setType(Block block, Material type) {
-        block.setType(transformToBlockType(type));
+        block.setType(MaterialRerouting.transformToBlockType(type));
     }
 
     public static void setType(Block block, Material type, boolean applyPhysics) {
-        block.setType(transformToBlockType(type), applyPhysics);
+        block.setType(MaterialRerouting.transformToBlockType(type), applyPhysics);
     }
 
     public static Material getType(BlockState blockState, @InjectPluginVersion ApiVersion version) {
-        return transformFromBlockType(blockState.getType(), version);
+        return MaterialRerouting.transformFromBlockType(blockState.getType(), version);
     }
 
     public static void setType(BlockState blockState, Material type) {
-        blockState.setType(transformToBlockType(type));
+        blockState.setType(MaterialRerouting.transformToBlockType(type));
     }
 
     public static void setSherd(DecoratedPot decoratedPot, DecoratedPot.Side side, Material sherd) {
-        decoratedPot.setSherd(side, transformToItemType(sherd));
+        decoratedPot.setSherd(side, MaterialRerouting.transformToItemType(sherd));
     }
 
     public static Material getSherd(DecoratedPot decoratedPot, DecoratedPot.Side side, @InjectPluginVersion ApiVersion version) {
-        return transformFromItemType(decoratedPot.getSherd(side), version);
+        return MaterialRerouting.transformFromItemType(decoratedPot.getSherd(side), version);
     }
 
     public static Map<DecoratedPot.Side, Material> getSherds(DecoratedPot decoratedPot, @InjectPluginVersion ApiVersion version) {
         Map<DecoratedPot.Side, Material> result = new EnumMap<>(DecoratedPot.Side.class);
         for (Map.Entry<DecoratedPot.Side, Material> entry : decoratedPot.getSherds().entrySet()) {
-            result.put(entry.getKey(), transformFromItemType(entry.getValue(), version));
+            result.put(entry.getKey(), MaterialRerouting.transformFromItemType(entry.getValue(), version));
         }
 
         return result;
@@ -163,44 +163,44 @@ public class MaterialRerouting {
 
     @Deprecated
     public static List<Material> getShards(DecoratedPot decoratedPot, @InjectPluginVersion ApiVersion version) {
-        return decoratedPot.getSherds().values().stream().map(shard -> transformFromItemType(shard, version)).toList();
+        return decoratedPot.getSherds().values().stream().map(shard -> MaterialRerouting.transformFromItemType(shard, version)).toList();
     }
 
     public static void setPlaying(Jukebox jukebox, Material record) {
-        jukebox.setPlaying(transformToItemType(record));
+        jukebox.setPlaying(MaterialRerouting.transformToItemType(record));
     }
 
     public static Material getPlaying(Jukebox jukebox, @InjectPluginVersion ApiVersion version) {
-        return transformFromItemType(jukebox.getPlaying(), version);
+        return MaterialRerouting.transformFromItemType(jukebox.getPlaying(), version);
     }
 
     public static boolean includes(EnchantmentTarget enchantmentTarget, Material item) {
-        return enchantmentTarget.includes(transformToItemType(item));
+        return enchantmentTarget.includes(MaterialRerouting.transformToItemType(item));
     }
 
     public static boolean isBreedItem(Animals animals, Material material) {
-        return animals.isBreedItem(transformToItemType(material));
+        return animals.isBreedItem(MaterialRerouting.transformToItemType(material));
     }
 
     public static Material getMaterial(Boat.Type type, @InjectPluginVersion ApiVersion version) {
-        return transformFromItemType(type.getMaterial(), version);
+        return MaterialRerouting.transformFromItemType(type.getMaterial(), version);
     }
 
     @Deprecated
     public static Material getMaterial(FallingBlock fallingBlock, @InjectPluginVersion ApiVersion version) {
-        return transformFromBlockType(fallingBlock.getBlockData().getMaterial(), version);
+        return MaterialRerouting.transformFromBlockType(fallingBlock.getBlockData().getMaterial(), version);
     }
 
     public static boolean hasCooldown(HumanEntity humanEntity, Material material) {
-        return humanEntity.hasCooldown(transformToItemType(material));
+        return humanEntity.hasCooldown(MaterialRerouting.transformToItemType(material));
     }
 
     public static int getCooldown(HumanEntity humanEntity, Material material) {
-        return humanEntity.getCooldown(transformToItemType(material));
+        return humanEntity.getCooldown(MaterialRerouting.transformToItemType(material));
     }
 
     public static void setCooldown(HumanEntity humanEntity, Material material, int ticks) {
-        humanEntity.setCooldown(transformToItemType(material), ticks);
+        humanEntity.setCooldown(MaterialRerouting.transformToItemType(material), ticks);
     }
 
     public static List<Block> getLineOfSight(LivingEntity livingEntity, Set<Material> transparent, int maxDistance) {
@@ -228,27 +228,27 @@ public class MaterialRerouting {
     }
 
     public static boolean addBarterMaterial(Piglin piglin, Material material) {
-        return piglin.addBarterMaterial(transformToItemType(material));
+        return piglin.addBarterMaterial(MaterialRerouting.transformToItemType(material));
     }
 
     public static boolean removeBarterMaterial(Piglin piglin, Material material) {
-        return piglin.removeBarterMaterial(transformToItemType(material));
+        return piglin.removeBarterMaterial(MaterialRerouting.transformToItemType(material));
     }
 
     public static boolean addMaterialOfInterest(Piglin piglin, Material material) {
-        return piglin.addMaterialOfInterest(transformToItemType(material));
+        return piglin.addMaterialOfInterest(MaterialRerouting.transformToItemType(material));
     }
 
     public static boolean removeMaterialOfInterest(Piglin piglin, Material material) {
-        return piglin.removeMaterialOfInterest(transformToItemType(material));
+        return piglin.removeMaterialOfInterest(MaterialRerouting.transformToItemType(material));
     }
 
     public static Set<Material> getInterestList(Piglin piglin, @InjectPluginVersion ApiVersion version) {
-        return piglin.getInterestList().stream().map(item -> transformFromItemType(item, version)).collect(Collectors.toSet());
+        return piglin.getInterestList().stream().map(item -> MaterialRerouting.transformFromItemType(item, version)).collect(Collectors.toSet());
     }
 
     public static Set<Material> getBarterList(Piglin piglin, @InjectPluginVersion ApiVersion version) {
-        return piglin.getBarterList().stream().map(item -> transformFromItemType(item, version)).collect(Collectors.toSet());
+        return piglin.getBarterList().stream().map(item -> MaterialRerouting.transformFromItemType(item, version)).collect(Collectors.toSet());
     }
 
     @Deprecated
@@ -257,67 +257,67 @@ public class MaterialRerouting {
     }
 
     public static Material getSteerMaterial(Steerable steerable, @InjectPluginVersion ApiVersion version) {
-        return transformFromItemType(steerable.getSteerMaterial(), version);
+        return MaterialRerouting.transformFromItemType(steerable.getSteerMaterial(), version);
     }
 
     public static Material getMaterial(BlockCanBuildEvent blockCanBuildEvent, @InjectPluginVersion ApiVersion version) {
-        return transformFromBlockType(blockCanBuildEvent.getMaterial(), version);
+        return MaterialRerouting.transformFromBlockType(blockCanBuildEvent.getMaterial(), version);
     }
 
     public static Material getChangedType(BlockPhysicsEvent blockPhysicsEvent, @InjectPluginVersion ApiVersion version) {
-        return transformFromBlockType(blockPhysicsEvent.getChangedType(), version);
+        return MaterialRerouting.transformFromBlockType(blockPhysicsEvent.getChangedType(), version);
     }
 
     public static Material getTo(EntityChangeBlockEvent entityChangeBlockEvent, @InjectPluginVersion ApiVersion version) {
-        return transformFromBlockType(entityChangeBlockEvent.getTo(), version);
+        return MaterialRerouting.transformFromBlockType(entityChangeBlockEvent.getTo(), version);
     }
 
     public static Material getItemType(FurnaceExtractEvent furnaceExtractEvent, @InjectPluginVersion ApiVersion version) {
-        return transformFromItemType(furnaceExtractEvent.getItemType(), version);
+        return MaterialRerouting.transformFromItemType(furnaceExtractEvent.getItemType(), version);
     }
 
     public static Material getBucket(PlayerBucketEvent playerBucketEvent, @InjectPluginVersion ApiVersion version) {
-        return transformFromItemType(playerBucketEvent.getBucket(), version);
+        return MaterialRerouting.transformFromItemType(playerBucketEvent.getBucket(), version);
     }
 
     public static Material getMaterial(PlayerInteractEvent playerInteractEvent, @InjectPluginVersion ApiVersion version) {
-        return transformFromItemType(playerInteractEvent.getMaterial(), version);
+        return MaterialRerouting.transformFromItemType(playerInteractEvent.getMaterial(), version);
     }
 
     public static Material getMaterial(PlayerStatisticIncrementEvent playerStatisticIncrementEvent, @InjectPluginVersion ApiVersion version) {
         if (playerStatisticIncrementEvent.getStatistic().getType() == Statistic.Type.BLOCK) {
-            return transformFromBlockType(playerStatisticIncrementEvent.getMaterial(), version);
+            return MaterialRerouting.transformFromBlockType(playerStatisticIncrementEvent.getMaterial(), version);
         } else if (playerStatisticIncrementEvent.getStatistic().getType() == Statistic.Type.ITEM) {
-            return transformFromItemType(playerStatisticIncrementEvent.getMaterial(), version);
+            return MaterialRerouting.transformFromItemType(playerStatisticIncrementEvent.getMaterial(), version);
         } else {
             // Theoretically this should be null, but just in case convert from block type
             // Can probably check if it is not null and print a warning, but for now it should be fine without the check.
-            return transformFromBlockType(playerStatisticIncrementEvent.getMaterial(), version);
+            return MaterialRerouting.transformFromBlockType(playerStatisticIncrementEvent.getMaterial(), version);
         }
     }
 
     public static void setBlock(ChunkGenerator.ChunkData chunkData, int x, int y, int z, Material material) {
-        chunkData.setBlock(x, y, z, transformToBlockType(material));
+        chunkData.setBlock(x, y, z, MaterialRerouting.transformToBlockType(material));
     }
 
     public static void setRegion(ChunkGenerator.ChunkData chunkData, int xMin, int yMin, int zMin, int xMax, int yMax, int zMax, Material material) {
-        chunkData.setRegion(xMin, yMin, zMin, xMax, yMax, zMax, transformToBlockType(material));
+        chunkData.setRegion(xMin, yMin, zMin, xMax, yMax, zMax, MaterialRerouting.transformToBlockType(material));
     }
 
     public static Material getType(ChunkGenerator.ChunkData chunkData, int x, int y, int z, @InjectPluginVersion ApiVersion version) {
-        return transformFromBlockType(chunkData.getType(x, y, z), version);
+        return MaterialRerouting.transformFromBlockType(chunkData.getType(x, y, z), version);
     }
 
     public static BlockData getBlockData(BlockDataMeta blockDataMeta, Material material) {
-        return blockDataMeta.getBlockData(transformToBlockType(material));
+        return blockDataMeta.getBlockData(MaterialRerouting.transformToBlockType(material));
     }
 
     public static CookingRecipe<?> setInput(CookingRecipe<?> cookingRecipe, Material material) {
-        return cookingRecipe.setInput(transformToItemType(material));
+        return cookingRecipe.setInput(MaterialRerouting.transformToItemType(material));
     }
 
     public static FurnaceRecipe setInput(FurnaceRecipe furnaceRecipe, Material material) {
-        return furnaceRecipe.setInput(transformToItemType(material));
+        return furnaceRecipe.setInput(MaterialRerouting.transformToItemType(material));
     }
 
     @Deprecated
@@ -326,55 +326,55 @@ public class MaterialRerouting {
     }
 
     public static boolean contains(Inventory inventory, Material material) {
-        return inventory.contains(transformToItemType(material));
+        return inventory.contains(MaterialRerouting.transformToItemType(material));
     }
 
     public static boolean contains(Inventory inventory, Material material, int amount) {
-        return inventory.contains(transformToItemType(material), amount);
+        return inventory.contains(MaterialRerouting.transformToItemType(material), amount);
     }
 
     public static HashMap<Integer, ? extends ItemStack> all(Inventory inventory, Material material) {
-        return inventory.all(transformToItemType(material));
+        return inventory.all(MaterialRerouting.transformToItemType(material));
     }
 
     public static int first(Inventory inventory, Material material) {
-        return inventory.first(transformToItemType(material));
+        return inventory.first(MaterialRerouting.transformToItemType(material));
     }
 
     public static void remove(Inventory inventory, Material material) {
-        inventory.remove(transformToItemType(material));
+        inventory.remove(MaterialRerouting.transformToItemType(material));
     }
 
     public static ItemMeta getItemMeta(ItemFactory itemFactory, Material material) {
-        return itemFactory.getItemMeta(transformToItemType(material));
+        return itemFactory.getItemMeta(MaterialRerouting.transformToItemType(material));
     }
 
     public static boolean isApplicable(ItemFactory itemFactory, ItemMeta itemMeta, Material material) {
-        return itemFactory.isApplicable(itemMeta, transformToItemType(material));
+        return itemFactory.isApplicable(itemMeta, MaterialRerouting.transformToItemType(material));
     }
 
     public static ItemMeta asMetaFor(ItemFactory itemFactory, ItemMeta itemMeta, Material material) {
-        return itemFactory.asMetaFor(itemMeta, transformToItemType(material));
+        return itemFactory.asMetaFor(itemMeta, MaterialRerouting.transformToItemType(material));
     }
 
     public static Material getSpawnEgg(ItemFactory itemFactory, EntityType entityType, @InjectPluginVersion ApiVersion version) {
-        return transformFromItemType(itemFactory.getSpawnEgg(entityType), version);
+        return MaterialRerouting.transformFromItemType(itemFactory.getSpawnEgg(entityType), version);
     }
 
     public static Material getType(ItemStack itemStack, @InjectPluginVersion ApiVersion version) {
-        return transformFromItemType(itemStack.getType(), version);
+        return MaterialRerouting.transformFromItemType(itemStack.getType(), version);
     }
 
     public static void setType(ItemStack itemStack, Material material) {
-        itemStack.setType(transformToItemType(material));
+        itemStack.setType(MaterialRerouting.transformToItemType(material));
     }
 
     public static List<Material> getChoices(RecipeChoice.MaterialChoice materialChoice, @InjectPluginVersion ApiVersion version) {
-        return materialChoice.getChoices().stream().map(m -> transformFromItemType(m, version)).toList();
+        return materialChoice.getChoices().stream().map(m -> MaterialRerouting.transformFromItemType(m, version)).toList();
     }
 
     public static ShapedRecipe setIngredient(ShapedRecipe shapedRecipe, char key, Material material) {
-        return shapedRecipe.setIngredient(key, transformToItemType(material));
+        return shapedRecipe.setIngredient(key, MaterialRerouting.transformToItemType(material));
     }
 
     @Deprecated
@@ -383,7 +383,7 @@ public class MaterialRerouting {
     }
 
     public static ShapelessRecipe addIngredient(ShapelessRecipe shapelessRecipe, Material material) {
-        return shapelessRecipe.addIngredient(transformToItemType(material));
+        return shapelessRecipe.addIngredient(MaterialRerouting.transformToItemType(material));
     }
 
     @Deprecated
@@ -392,7 +392,7 @@ public class MaterialRerouting {
     }
 
     public static ShapelessRecipe addIngredient(ShapelessRecipe shapelessRecipe, int count, Material material) {
-        return shapelessRecipe.addIngredient(count, transformToItemType(material));
+        return shapelessRecipe.addIngredient(count, MaterialRerouting.transformToItemType(material));
     }
 
     @Deprecated
@@ -401,11 +401,11 @@ public class MaterialRerouting {
     }
 
     public static ShapelessRecipe removeIngredient(ShapelessRecipe shapelessRecipe, Material material) {
-        return shapelessRecipe.removeIngredient(transformToItemType(material));
+        return shapelessRecipe.removeIngredient(MaterialRerouting.transformToItemType(material));
     }
 
     public static ShapelessRecipe removeIngredient(ShapelessRecipe shapelessRecipe, int count, Material material) {
-        return shapelessRecipe.removeIngredient(count, transformToItemType(material));
+        return shapelessRecipe.removeIngredient(count, MaterialRerouting.transformToItemType(material));
     }
 
     @Deprecated
@@ -419,143 +419,143 @@ public class MaterialRerouting {
     }
 
     public static StonecuttingRecipe setInput(StonecuttingRecipe stonecuttingRecipe, Material material) {
-        return stonecuttingRecipe.setInput(transformToItemType(material));
+        return stonecuttingRecipe.setInput(MaterialRerouting.transformToItemType(material));
     }
 
     public static boolean isEnabledByFeature(DataPackManager dataPackManager, Material material, World world) {
-        return dataPackManager.isEnabledByFeature(transformToItemType(material), world);
+        return dataPackManager.isEnabledByFeature(MaterialRerouting.transformToItemType(material), world);
     }
 
     @RerouteStatic("org/bukkit/scoreboard/Criteria")
     public static Criteria statistic(Statistic statistic, Material material) {
         if (statistic.getType() == Statistic.Type.BLOCK) {
-            return Criteria.statistic(statistic, transformToBlockType(material));
+            return Criteria.statistic(statistic, MaterialRerouting.transformToBlockType(material));
         } else if (statistic.getType() == Statistic.Type.ITEM) {
-            return Criteria.statistic(statistic, transformToItemType(material));
+            return Criteria.statistic(statistic, MaterialRerouting.transformToItemType(material));
         } else {
             // This is not allowed, the method will throw an error
-            return Criteria.statistic(statistic, transformToBlockType(material));
+            return Criteria.statistic(statistic, MaterialRerouting.transformToBlockType(material));
         }
     }
 
     @RerouteStatic("org/bukkit/Bukkit")
     public static BlockData createBlockData(Material material) {
-        return Bukkit.createBlockData(transformToBlockType(material));
+        return Bukkit.createBlockData(MaterialRerouting.transformToBlockType(material));
     }
 
     @RerouteStatic("org/bukkit/Bukkit")
     public static BlockData createBlockData(Material material, Consumer<? super BlockData> consumer) {
-        return Bukkit.createBlockData(transformToBlockType(material), consumer);
+        return Bukkit.createBlockData(MaterialRerouting.transformToBlockType(material), consumer);
     }
 
     @RerouteStatic("org/bukkit/Bukkit")
     public static BlockData createBlockData(Material material, String data) {
-        return Bukkit.createBlockData(transformToBlockType(material), data);
+        return Bukkit.createBlockData(MaterialRerouting.transformToBlockType(material), data);
     }
 
     public static Material getBlockType(ChunkSnapshot chunkSnapshot, int x, int y, int z, @InjectPluginVersion ApiVersion version) {
-        return transformFromBlockType(chunkSnapshot.getBlockType(x, y, z), version);
+        return MaterialRerouting.transformFromBlockType(chunkSnapshot.getBlockType(x, y, z), version);
     }
 
     public static void incrementStatistic(OfflinePlayer offlinePlayer, Statistic statistic, Material material) {
         if (statistic.getType() == Statistic.Type.BLOCK) {
-            offlinePlayer.incrementStatistic(statistic, transformToBlockType(material));
+            offlinePlayer.incrementStatistic(statistic, MaterialRerouting.transformToBlockType(material));
         } else if (statistic.getType() == Statistic.Type.ITEM) {
-            offlinePlayer.incrementStatistic(statistic, transformToItemType(material));
+            offlinePlayer.incrementStatistic(statistic, MaterialRerouting.transformToItemType(material));
         } else {
             // This is not allowed, the method will throw an error
-            offlinePlayer.incrementStatistic(statistic, transformToBlockType(material));
+            offlinePlayer.incrementStatistic(statistic, MaterialRerouting.transformToBlockType(material));
         }
     }
 
     public static void decrementStatistic(OfflinePlayer offlinePlayer, Statistic statistic, Material material) {
         if (statistic.getType() == Statistic.Type.BLOCK) {
-            offlinePlayer.decrementStatistic(statistic, transformToBlockType(material));
+            offlinePlayer.decrementStatistic(statistic, MaterialRerouting.transformToBlockType(material));
         } else if (statistic.getType() == Statistic.Type.ITEM) {
-            offlinePlayer.decrementStatistic(statistic, transformToItemType(material));
+            offlinePlayer.decrementStatistic(statistic, MaterialRerouting.transformToItemType(material));
         } else {
             // This is not allowed, the method will throw an error
-            offlinePlayer.decrementStatistic(statistic, transformToBlockType(material));
+            offlinePlayer.decrementStatistic(statistic, MaterialRerouting.transformToBlockType(material));
         }
     }
 
     public static int getStatistic(OfflinePlayer offlinePlayer, Statistic statistic, Material material) {
         if (statistic.getType() == Statistic.Type.BLOCK) {
-            return offlinePlayer.getStatistic(statistic, transformToBlockType(material));
+            return offlinePlayer.getStatistic(statistic, MaterialRerouting.transformToBlockType(material));
         } else if (statistic.getType() == Statistic.Type.ITEM) {
-            return offlinePlayer.getStatistic(statistic, transformToItemType(material));
+            return offlinePlayer.getStatistic(statistic, MaterialRerouting.transformToItemType(material));
         } else {
             // This is not allowed, the method will throw an error
-            return offlinePlayer.getStatistic(statistic, transformToBlockType(material));
+            return offlinePlayer.getStatistic(statistic, MaterialRerouting.transformToBlockType(material));
         }
     }
 
     public static void incrementStatistic(OfflinePlayer offlinePlayer, Statistic statistic, Material material, int amount) {
         if (statistic.getType() == Statistic.Type.BLOCK) {
-            offlinePlayer.incrementStatistic(statistic, transformToBlockType(material), amount);
+            offlinePlayer.incrementStatistic(statistic, MaterialRerouting.transformToBlockType(material), amount);
         } else if (statistic.getType() == Statistic.Type.ITEM) {
-            offlinePlayer.incrementStatistic(statistic, transformToItemType(material), amount);
+            offlinePlayer.incrementStatistic(statistic, MaterialRerouting.transformToItemType(material), amount);
         } else {
             // This is not allowed, the method will throw an error
-            offlinePlayer.incrementStatistic(statistic, transformToBlockType(material), amount);
+            offlinePlayer.incrementStatistic(statistic, MaterialRerouting.transformToBlockType(material), amount);
         }
     }
 
     public static void decrementStatistic(OfflinePlayer offlinePlayer, Statistic statistic, Material material, int amount) {
         if (statistic.getType() == Statistic.Type.BLOCK) {
-            offlinePlayer.decrementStatistic(statistic, transformToBlockType(material), amount);
+            offlinePlayer.decrementStatistic(statistic, MaterialRerouting.transformToBlockType(material), amount);
         } else if (statistic.getType() == Statistic.Type.ITEM) {
-            offlinePlayer.decrementStatistic(statistic, transformToItemType(material), amount);
+            offlinePlayer.decrementStatistic(statistic, MaterialRerouting.transformToItemType(material), amount);
         } else {
             // This is not allowed, the method will throw an error
-            offlinePlayer.decrementStatistic(statistic, transformToBlockType(material), amount);
+            offlinePlayer.decrementStatistic(statistic, MaterialRerouting.transformToBlockType(material), amount);
         }
     }
 
     public static void setStatistic(OfflinePlayer offlinePlayer, Statistic statistic, Material material, int newValue) {
         if (statistic.getType() == Statistic.Type.BLOCK) {
-            offlinePlayer.setStatistic(statistic, transformToBlockType(material), newValue);
+            offlinePlayer.setStatistic(statistic, MaterialRerouting.transformToBlockType(material), newValue);
         } else if (statistic.getType() == Statistic.Type.ITEM) {
-            offlinePlayer.setStatistic(statistic, transformToItemType(material), newValue);
+            offlinePlayer.setStatistic(statistic, MaterialRerouting.transformToItemType(material), newValue);
         } else {
             // This is not allowed, the method will throw an error
-            offlinePlayer.setStatistic(statistic, transformToBlockType(material), newValue);
+            offlinePlayer.setStatistic(statistic, MaterialRerouting.transformToBlockType(material), newValue);
         }
     }
 
     public static Material getType(RegionAccessor regionAccessor, Location location, @InjectPluginVersion ApiVersion version) {
-        return transformFromBlockType(regionAccessor.getType(location), version);
+        return MaterialRerouting.transformFromBlockType(regionAccessor.getType(location), version);
     }
 
     public static Material getType(RegionAccessor regionAccessor, int x, int y, int z, @InjectPluginVersion ApiVersion version) {
-        return transformFromBlockType(regionAccessor.getType(x, y, z), version);
+        return MaterialRerouting.transformFromBlockType(regionAccessor.getType(x, y, z), version);
     }
 
     public static void setType(RegionAccessor regionAccessor, Location location, Material material) {
-        regionAccessor.setType(location, transformToBlockType(material));
+        regionAccessor.setType(location, MaterialRerouting.transformToBlockType(material));
     }
 
     public static void setType(RegionAccessor regionAccessor, int x, int y, int z, Material material) {
-        regionAccessor.setType(x, y, z, transformToBlockType(material));
+        regionAccessor.setType(x, y, z, MaterialRerouting.transformToBlockType(material));
     }
 
     public static BlockData createBlockData(Server server, Material material) {
-        return server.createBlockData(transformToBlockType(material));
+        return server.createBlockData(MaterialRerouting.transformToBlockType(material));
     }
 
     public static BlockData createBlockData(Server server, Material material, Consumer<? super BlockData> consumer) {
-        return server.createBlockData(transformToBlockType(material), consumer);
+        return server.createBlockData(MaterialRerouting.transformToBlockType(material), consumer);
     }
 
     public static BlockData createBlockData(Server server, Material material, String data) {
-        return server.createBlockData(transformToBlockType(material), data);
+        return server.createBlockData(MaterialRerouting.transformToBlockType(material), data);
     }
 
     public static <T extends Keyed> boolean isTagged(Tag<T> tag, T item) {
         if (tag instanceof CraftBlockTag) {
-            return tag.isTagged((T) transformToBlockType((Material) item));
+            return tag.isTagged((T) MaterialRerouting.transformToBlockType((Material) item));
         } else if (tag instanceof CraftItemTag) {
-            return tag.isTagged((T) transformToItemType((Material) item));
+            return tag.isTagged((T) MaterialRerouting.transformToItemType((Material) item));
         }
 
         return tag.isTagged(item);
@@ -568,9 +568,9 @@ public class MaterialRerouting {
         }
 
         if (tag instanceof CraftBlockTag) {
-            return values.stream().map(val -> (Material) val).map(val -> transformFromBlockType(val, version)).map(val -> (T) val).collect(Collectors.toSet());
+            return values.stream().map(val -> (Material) val).map(val -> MaterialRerouting.transformFromBlockType(val, version)).map(val -> (T) val).collect(Collectors.toSet());
         } else if (tag instanceof CraftItemTag) {
-            return values.stream().map(val -> (Material) val).map(val -> transformFromItemType(val, version)).map(val -> (T) val).collect(Collectors.toSet());
+            return values.stream().map(val -> (Material) val).map(val -> MaterialRerouting.transformFromItemType(val, version)).map(val -> (T) val).collect(Collectors.toSet());
         }
 
         return values;
@@ -582,7 +582,7 @@ public class MaterialRerouting {
     }
 
     public static ToolComponent.ToolRule addRule(ToolComponent toolComponent, Material block, Float speed, Boolean correctForDrops) {
-        return toolComponent.addRule(transformToBlockType(block), speed, correctForDrops);
+        return toolComponent.addRule(MaterialRerouting.transformToBlockType(block), speed, correctForDrops);
     }
 
     public static ToolComponent.ToolRule addRule(ToolComponent toolComponent, Collection<Material> blocks, Float speed, Boolean correctForDrops) {
@@ -590,11 +590,11 @@ public class MaterialRerouting {
     }
 
     public static Collection<Material> getBlocks(ToolComponent.ToolRule toolRule, @InjectPluginVersion ApiVersion version) {
-        return toolRule.getBlocks().stream().map(val -> transformFromBlockType(val, version)).toList();
+        return toolRule.getBlocks().stream().map(val -> MaterialRerouting.transformFromBlockType(val, version)).toList();
     }
 
     public static void setBlocks(ToolComponent.ToolRule toolRule, Material block) {
-        toolRule.setBlocks(transformToBlockType(block));
+        toolRule.setBlocks(MaterialRerouting.transformToBlockType(block));
     }
 
     public static void setBlocks(ToolComponent.ToolRule toolRule, Collection<Material> blocks) {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/enums/EnumEvil.java b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/enums/EnumEvil.java
index 4c7b199d4b..faba7efbda 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/enums/EnumEvil.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/enums/EnumEvil.java
@@ -66,7 +66,7 @@ public class EnumEvil {
         ClassTraverser it = new ClassTraverser(clazz);
         LegacyRegistryData registryData;
         while (it.hasNext()) {
-            registryData = REGISTRIES.get(it.next());
+            registryData = EnumEvil.REGISTRIES.get(it.next());
             if (registryData != null) {
                 return registryData;
             }
@@ -77,7 +77,7 @@ public class EnumEvil {
 
     @DoNotReroute
     public static Registry<?> getRegistry(Class<?> clazz) {
-        LegacyRegistryData registryData = getRegistryData(clazz);
+        LegacyRegistryData registryData = EnumEvil.getRegistryData(clazz);
 
         if (registryData != null) {
             return registryData.registry();
@@ -144,7 +144,7 @@ public class EnumEvil {
             return Enums.getIfPresent(clazz, name);
         }
 
-        Registry registry = getRegistry(clazz);
+        Registry registry = EnumEvil.getRegistry(clazz);
         if (registry == null) {
             return com.google.common.base.Optional.absent();
         }
@@ -167,7 +167,7 @@ public class EnumEvil {
             return clazz.getEnumConstants();
         }
 
-        Registry<?> registry = getRegistry(clazz);
+        Registry<?> registry = EnumEvil.getRegistry(clazz);
 
         if (registry == null) {
             return clazz.getEnumConstants();
@@ -207,16 +207,16 @@ public class EnumEvil {
     }
 
     public static Optional<Enum.EnumDesc> describeConstable(@RerouteArgumentType("java/lang/Enum") Object object) {
-        return getDeclaringClass(object)
+        return EnumEvil.getDeclaringClass(object)
                 .describeConstable()
-                .map(c -> Enum.EnumDesc.of(c, name(object)));
+                .map(c -> Enum.EnumDesc.of(c, EnumEvil.name(object)));
     }
 
     @RerouteStatic("java/lang/Enum")
     @RerouteReturnType("java/lang/Enum")
     public static Object valueOf(Class enumClass, String name, @InjectPluginVersion ApiVersion apiVersion) {
         name = FieldRename.rename(apiVersion, enumClass.getName().replace('.', '/'), name);
-        LegacyRegistryData registryData = getRegistryData(enumClass);
+        LegacyRegistryData registryData = EnumEvil.getRegistryData(enumClass);
         if (registryData != null) {
             return registryData.function().apply(name);
         }
@@ -252,11 +252,11 @@ public class EnumEvil {
 
         @Override
         protected T doForward(String value) {
-            if (registryData == null) {
-                registryData = getRegistryData(clazz);
+            if (this.registryData == null) {
+                this.registryData = EnumEvil.getRegistryData(this.clazz);
             }
-            value = FieldRename.rename(apiVersion, clazz.getName().replace('.', '/'), value);
-            return (T) registryData.function().apply(value);
+            value = FieldRename.rename(this.apiVersion, this.clazz.getName().replace('.', '/'), value);
+            return (T) this.registryData.function().apply(value);
         }
 
         @Override
@@ -274,12 +274,12 @@ public class EnumEvil {
 
         @Override
         public int hashCode() {
-            return clazz.hashCode();
+            return this.clazz.hashCode();
         }
 
         @Override
         public String toString() {
-            return "Enums.stringConverter(" + clazz.getName() + ".class)";
+            return "Enums.stringConverter(" + this.clazz.getName() + ".class)";
         }
 
         private static final long serialVersionUID = 0L;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/enums/ImposterEnumMap.java b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/enums/ImposterEnumMap.java
index 799e979097..b3e2367a0c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/enums/ImposterEnumMap.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/enums/ImposterEnumMap.java
@@ -20,7 +20,7 @@ public class ImposterEnumMap extends AbstractMap<Object, Object> {
 
     public ImposterEnumMap(Class<?> objectClass) {
         this.objectClass = objectClass;
-        this.map = getMap(objectClass);
+        this.map = ImposterEnumMap.getMap(objectClass);
     }
 
     public ImposterEnumMap(EnumMap enumMap) {
@@ -31,7 +31,7 @@ public class ImposterEnumMap extends AbstractMap<Object, Object> {
     public ImposterEnumMap(Map map) {
         if (map instanceof ImposterEnumMap) {
             this.objectClass = ((ImposterEnumMap) map).objectClass;
-            this.map = getMap(objectClass);
+            this.map = ImposterEnumMap.getMap(this.objectClass);
         } else {
             this.objectClass = DummyEnum.class;
             this.map = new TreeMap();
@@ -52,39 +52,39 @@ public class ImposterEnumMap extends AbstractMap<Object, Object> {
 
     @Override
     public int size() {
-        return map.size();
+        return this.map.size();
     }
 
     @Override
     public boolean containsValue(Object value) {
-        return map.containsValue(value);
+        return this.map.containsValue(value);
     }
 
     @Override
     public boolean containsKey(Object key) {
-        return map.containsKey(key);
+        return this.map.containsKey(key);
     }
 
     @Override
     public Object get(Object key) {
-        return map.get(key);
+        return this.map.get(key);
     }
 
     @Override
     public Object put(Object key, Object value) {
-        typeCheck(key);
-        return map.put(key, value);
+        this.typeCheck(key);
+        return this.map.put(key, value);
     }
 
     @Override
     public Object remove(Object key) {
-        return map.remove(key);
+        return this.map.remove(key);
     }
 
     @Override
     public void putAll(Map<? extends Object, ?> m) {
-        if (map instanceof EnumMap<?, ?>) {
-            map.putAll(m);
+        if (this.map instanceof EnumMap<?, ?>) {
+            this.map.putAll(m);
         }
 
         super.putAll(m);
@@ -92,45 +92,45 @@ public class ImposterEnumMap extends AbstractMap<Object, Object> {
 
     @Override
     public void clear() {
-        map.clear();
+        this.map.clear();
     }
 
     @Override
     public Set<Object> keySet() {
-        return map.keySet();
+        return this.map.keySet();
     }
 
     @Override
     public Collection<Object> values() {
-        return map.values();
+        return this.map.values();
     }
 
     @Override
     public Set<Entry<Object, Object>> entrySet() {
-        return map.entrySet();
+        return this.map.entrySet();
     }
 
     @Override
     public boolean equals(Object o) {
-        return map.equals(o);
+        return this.map.equals(o);
     }
 
     @Override
     public int hashCode() {
-        return map.hashCode();
+        return this.map.hashCode();
     }
 
     @Override
     public ImposterEnumMap clone() {
-        ImposterEnumMap enumMap = new ImposterEnumMap(objectClass);
-        enumMap.putAll(map);
+        ImposterEnumMap enumMap = new ImposterEnumMap(this.objectClass);
+        enumMap.putAll(this.map);
         return enumMap;
     }
 
     private void typeCheck(Object object) {
-        if (objectClass != DummyEnum.class) {
-            if (!objectClass.isAssignableFrom(object.getClass())) {
-                throw new ClassCastException(object.getClass() + " != " + objectClass);
+        if (this.objectClass != DummyEnum.class) {
+            if (!this.objectClass.isAssignableFrom(object.getClass())) {
+                throw new ClassCastException(object.getClass() + " != " + this.objectClass);
             }
         }
     }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/enums/ImposterEnumSet.java b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/enums/ImposterEnumSet.java
index 13ec790721..e5afc060cc 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/enums/ImposterEnumSet.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/enums/ImposterEnumSet.java
@@ -26,7 +26,7 @@ public class ImposterEnumSet extends AbstractSet<Object> {
     }
 
     public static ImposterEnumSet noneOf(Class<?> clazz) {
-        Set set = createSet(clazz);
+        Set set = ImposterEnumSet.createSet(clazz);
         return new ImposterEnumSet(set, clazz);
     }
 
@@ -65,7 +65,7 @@ public class ImposterEnumSet extends AbstractSet<Object> {
             }
         }
 
-        Set newSet = createSet(clazz);
+        Set newSet = ImposterEnumSet.createSet(clazz);
         newSet.addAll(set);
 
         return new ImposterEnumSet(newSet, clazz);
@@ -88,7 +88,7 @@ public class ImposterEnumSet extends AbstractSet<Object> {
             }
         }
 
-        Set newSet = createSet(clazz);
+        Set newSet = ImposterEnumSet.createSet(clazz);
         newSet.addAll(collection);
 
         return new ImposterEnumSet(newSet, clazz);
@@ -153,14 +153,14 @@ public class ImposterEnumSet extends AbstractSet<Object> {
     }
 
     public static ImposterEnumSet of(Object e) {
-        Set set = createSet(e.getClass());
+        Set set = ImposterEnumSet.createSet(e.getClass());
         set.add(e);
 
         return new ImposterEnumSet(set, e.getClass());
     }
 
     public static ImposterEnumSet of(Object e1, Object e2) {
-        Set set = createSet(e1.getClass());
+        Set set = ImposterEnumSet.createSet(e1.getClass());
         set.add(e1);
         set.add(e2);
 
@@ -168,7 +168,7 @@ public class ImposterEnumSet extends AbstractSet<Object> {
     }
 
     public static ImposterEnumSet of(Object e1, Object e2, Object e3) {
-        Set set = createSet(e1.getClass());
+        Set set = ImposterEnumSet.createSet(e1.getClass());
         set.add(e1);
         set.add(e2);
         set.add(e3);
@@ -178,7 +178,7 @@ public class ImposterEnumSet extends AbstractSet<Object> {
 
 
     public static ImposterEnumSet of(Object e1, Object e2, Object e3, Object e4) {
-        Set set = createSet(e1.getClass());
+        Set set = ImposterEnumSet.createSet(e1.getClass());
         set.add(e1);
         set.add(e2);
         set.add(e3);
@@ -189,7 +189,7 @@ public class ImposterEnumSet extends AbstractSet<Object> {
 
 
     public static ImposterEnumSet of(Object e1, Object e2, Object e3, Object e4, Object e5) {
-        Set set = createSet(e1.getClass());
+        Set set = ImposterEnumSet.createSet(e1.getClass());
         set.add(e1);
         set.add(e2);
         set.add(e3);
@@ -201,7 +201,7 @@ public class ImposterEnumSet extends AbstractSet<Object> {
 
 
     public static ImposterEnumSet of(Object e, Object... rest) {
-        Set set = createSet(e.getClass());
+        Set set = ImposterEnumSet.createSet(e.getClass());
         set.add(e);
 
         Collections.addAll(set, rest);
@@ -239,71 +239,71 @@ public class ImposterEnumSet extends AbstractSet<Object> {
 
     @Override
     public Iterator<Object> iterator() {
-        return set.iterator();
+        return this.set.iterator();
     }
 
     @Override
     public int size() {
-        return set.size();
+        return this.set.size();
     }
 
     @Override
     public boolean equals(Object o) {
-        return set.equals(o);
+        return this.set.equals(o);
     }
 
     @Override
     public int hashCode() {
-        return set.hashCode();
+        return this.set.hashCode();
     }
 
     @Override
     public boolean removeAll(Collection<?> c) {
-        return set.removeAll(c);
+        return this.set.removeAll(c);
     }
 
     @Override
     public boolean isEmpty() {
-        return set.isEmpty();
+        return this.set.isEmpty();
     }
 
     @Override
     public boolean contains(Object o) {
-        return set.contains(o);
+        return this.set.contains(o);
     }
 
     @NotNull
     @Override
     public Object[] toArray() {
-        return set.toArray();
+        return this.set.toArray();
     }
 
     @NotNull
     @Override
     public <T> T[] toArray(@NotNull T[] a) {
-        return (T[]) set.toArray(a);
+        return (T[]) this.set.toArray(a);
     }
 
     @Override
     public boolean add(Object o) {
-        typeCheck(o);
-        return set.add(o);
+        this.typeCheck(o);
+        return this.set.add(o);
     }
 
     @Override
     public boolean remove(Object o) {
-        return set.remove(o);
+        return this.set.remove(o);
     }
 
     @Override
     public boolean containsAll(@NotNull Collection<?> c) {
-        return set.containsAll(c);
+        return this.set.containsAll(c);
     }
 
     @Override
     public boolean addAll(@NotNull Collection<?> c) {
-        if (set instanceof EnumSet<?>) {
-            set.addAll(c);
+        if (this.set instanceof EnumSet<?>) {
+            this.set.addAll(c);
         }
 
         return super.addAll(c);
@@ -311,35 +311,35 @@ public class ImposterEnumSet extends AbstractSet<Object> {
 
     @Override
     public boolean retainAll(@NotNull Collection<?> c) {
-        return set.retainAll(c);
+        return this.set.retainAll(c);
     }
 
     @Override
     public void clear() {
-        set.clear();
+        this.set.clear();
     }
 
     @Override
     public String toString() {
-        return set.toString();
+        return this.set.toString();
     }
 
     public ImposterEnumSet clone() {
         Set newSet;
-        if (set instanceof EnumSet<?> enumSet) {
+        if (this.set instanceof EnumSet<?> enumSet) {
             newSet = enumSet.clone();
         } else {
             newSet = new HashSet();
-            newSet.addAll(set);
+            newSet.addAll(this.set);
         }
 
-        return new ImposterEnumSet(newSet, objectClass);
+        return new ImposterEnumSet(newSet, this.objectClass);
     }
 
     private void typeCheck(Object object) {
-        if (objectClass != DummyEnum.class) {
-            if (!objectClass.isAssignableFrom(object.getClass())) {
-                throw new ClassCastException(object.getClass() + " != " + objectClass);
+        if (this.objectClass != DummyEnum.class) {
+            if (!this.objectClass.isAssignableFrom(object.getClass())) {
+                throw new ClassCastException(object.getClass() + " != " + this.objectClass);
             }
         }
     }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/fieldrename/FieldRenameData.java b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/fieldrename/FieldRenameData.java
index 121c7efdd4..3e9b03b5ca 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/fieldrename/FieldRenameData.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/fieldrename/FieldRenameData.java
@@ -16,7 +16,7 @@ public record FieldRenameData(RenameData<String> renameData, RenameData<Namespac
         }
 
         from = from.toUpperCase(Locale.ROOT);
-        return renameData.getReplacement(apiVersion, from);
+        return this.renameData.getReplacement(apiVersion, from);
     }
 
     public NamespacedKey getReplacement(NamespacedKey from, ApiVersion apiVersion) {
@@ -24,7 +24,7 @@ public record FieldRenameData(RenameData<String> renameData, RenameData<Namespac
             return null;
         }
 
-        return keyRenameData.getReplacement(apiVersion, from);
+        return this.keyRenameData.getReplacement(apiVersion, from);
     }
 
     public static class Builder {
@@ -58,34 +58,34 @@ public record FieldRenameData(RenameData<String> renameData, RenameData<Namespac
         }
 
         public Builder change(String from, String to) {
-            if (currentVersion != null) {
-                versionData.computeIfAbsent(currentVersion, d -> new HashMap<>()).put(from.replace('.', '_'), to);
+            if (this.currentVersion != null) {
+                this.versionData.computeIfAbsent(this.currentVersion, d -> new HashMap<>()).put(from.replace('.', '_'), to);
             } else {
-                data.put(from.replace('.', '_'), to);
+                this.data.put(from.replace('.', '_'), to);
             }
 
-            if (keyRename) {
+            if (this.keyRename) {
                 NamespacedKey fromKey = NamespacedKey.minecraft(from.toLowerCase(Locale.ROOT));
                 NamespacedKey toKey = NamespacedKey.minecraft(to.toLowerCase(Locale.ROOT));
-                if (currentVersion != null) {
-                    versionKeyData.computeIfAbsent(currentVersion, d -> new HashMap<>()).put(fromKey, toKey);
+                if (this.currentVersion != null) {
+                    this.versionKeyData.computeIfAbsent(this.currentVersion, d -> new HashMap<>()).put(fromKey, toKey);
                 } else {
-                    keyData.put(fromKey, toKey);
+                    this.keyData.put(fromKey, toKey);
                 }
             }
             return this;
         }
 
         public FieldRenameData build() {
-            return new FieldRenameData(new RenameData<>(versionData, data), new RenameData<>(versionKeyData, keyData));
+            return new FieldRenameData(new RenameData<>(this.versionData, this.data), new RenameData<>(this.versionKeyData, this.keyData));
         }
     }
 
     private record RenameData<T>(NavigableMap<ApiVersion, Map<T, T>> versionData, Map<T, T> data) {
         public T getReplacement(ApiVersion apiVersion, T from) {
-            from = data.getOrDefault(from, from);
+            from = this.data.getOrDefault(from, from);
 
-            for (Map.Entry<ApiVersion, Map<T, T>> entry : versionData.entrySet()) {
+            for (Map.Entry<ApiVersion, Map<T, T>> entry : this.versionData.entrySet()) {
                 if (apiVersion.isNewerThanOrSameAs(entry.getKey())) {
                     continue;
                 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/reroute/RequirePluginVersionData.java b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/reroute/RequirePluginVersionData.java
index 5cc95b2a7e..bb85c06880 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/reroute/RequirePluginVersionData.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/reroute/RequirePluginVersionData.java
@@ -33,11 +33,11 @@ public record RequirePluginVersionData(ApiVersion minInclusive, ApiVersion maxIn
     }
 
     public boolean test(ApiVersion pluginVersion) {
-        if (minInclusive != null && pluginVersion.isOlderThan(minInclusive)) {
+        if (this.minInclusive != null && pluginVersion.isOlderThan(this.minInclusive)) {
             return false;
         }
 
-        if (maxInclusive != null && pluginVersion.isNewerThan(maxInclusive)) {
+        if (this.maxInclusive != null && pluginVersion.isNewerThan(this.maxInclusive)) {
             return false;
         }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/reroute/Reroute.java b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/reroute/Reroute.java
index 1f828c37d7..1b8749998e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/reroute/Reroute.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/reroute/Reroute.java
@@ -45,7 +45,7 @@ public class Reroute {
     (Although some load time testing could be done)
      */
     public boolean apply(ApiVersion pluginVersion, String owner, String name, String desc, boolean staticCall, Consumer<RerouteMethodData> consumer) {
-        RerouteDataHolder rerouteData = rerouteDataMap.get(desc + name);
+        RerouteDataHolder rerouteData = this.rerouteDataMap.get(desc + name);
         if (rerouteData == null) {
             return false;
         }
@@ -100,21 +100,21 @@ public class Reroute {
         final Map<String, RerouteMethodData> rerouteMethodDataMap = new HashMap<>();
 
         public RerouteMethodData get(Class<?> clazz) {
-            return rerouteMethodDataMap.get(Type.getInternalName(clazz));
+            return this.rerouteMethodDataMap.get(Type.getInternalName(clazz));
         }
 
         private RerouteMethodData get(Type owner) {
-            return rerouteMethodDataMap.get(owner.getInternalName());
+            return this.rerouteMethodDataMap.get(owner.getInternalName());
         }
 
         void add(RerouteMethodData value) {
-            RerouteMethodData rerouteMethodData = get(value.sourceOwner());
+            RerouteMethodData rerouteMethodData = this.get(value.sourceOwner());
 
             if (rerouteMethodData != null) {
                 throw new IllegalStateException("Reroute method data already exists: " + rerouteMethodData);
             }
 
-            rerouteMethodDataMap.put(value.sourceOwner().getInternalName(), value);
+            this.rerouteMethodDataMap.put(value.sourceOwner().getInternalName(), value);
         }
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/reroute/RerouteArgument.java b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/reroute/RerouteArgument.java
index ea56698dd8..da3b8cac66 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/reroute/RerouteArgument.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/reroute/RerouteArgument.java
@@ -31,10 +31,10 @@ public record RerouteArgument(Type type, Type sourceType, boolean injectPluginNa
      * @return the opcode of the type
      */
     public int instruction() {
-        if (injectPluginName() || injectPluginVersion() || injectCompatibility() != null) {
+        if (this.injectPluginName() || this.injectPluginVersion() || this.injectCompatibility() != null) {
             throw new IllegalStateException(String.format("Cannot get instruction for plugin name / version argument / compatibility: %s", this));
         }
 
-        return type.getOpcode(Opcodes.ILOAD);
+        return this.type.getOpcode(Opcodes.ILOAD);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/reroute/RerouteBuilder.java b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/reroute/RerouteBuilder.java
index 435672a3a0..ca02b6b937 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/reroute/RerouteBuilder.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/reroute/RerouteBuilder.java
@@ -27,15 +27,15 @@ public class RerouteBuilder {
     }
 
     public RerouteBuilder forClass(Class<?> clazz) {
-        classes.add(clazz);
+        this.classes.add(clazz);
         return this;
     }
 
     public Reroute build() {
         Map<String, Reroute.RerouteDataHolder> rerouteDataHolderMap = new HashMap<>();
 
-        for (Class<?> clazz : classes) {
-            List<RerouteMethodData> data = buildFromClass(clazz, compatibilityPresent);
+        for (Class<?> clazz : this.classes) {
+            List<RerouteMethodData> data = RerouteBuilder.buildFromClass(clazz, this.compatibilityPresent);
             data.forEach(value -> rerouteDataHolderMap.computeIfAbsent(value.methodKey(), v -> new Reroute.RerouteDataHolder()).add(value));
         }
 
@@ -46,18 +46,18 @@ public class RerouteBuilder {
         Preconditions.checkArgument(!clazz.isInterface(), "Interface Classes are currently not supported");
 
         List<RerouteMethodData> result = new ArrayList<>();
-        boolean shouldInclude = shouldInclude(getRequireCompatibility(clazz), true, compatibilityPresent);
+        boolean shouldInclude = RerouteBuilder.shouldInclude(RerouteBuilder.getRequireCompatibility(clazz), true, compatibilityPresent);
 
         for (Method method : clazz.getDeclaredMethods()) {
-            if (!isMethodValid(method)) {
+            if (!RerouteBuilder.isMethodValid(method)) {
                 continue;
             }
 
-            if (!shouldInclude(getRequireCompatibility(method), shouldInclude, compatibilityPresent)) {
+            if (!RerouteBuilder.shouldInclude(RerouteBuilder.getRequireCompatibility(method), shouldInclude, compatibilityPresent)) {
                 continue;
             }
 
-            result.add(buildFromMethod(method));
+            result.add(RerouteBuilder.buildFromMethod(method));
         }
 
         return result;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/reroute/RerouteReturn.java b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/reroute/RerouteReturn.java
index 7e8cdcd2eb..3b1fac8ac0 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/reroute/RerouteReturn.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/legacy/reroute/RerouteReturn.java
@@ -27,6 +27,6 @@ public record RerouteReturn(Type type) {
      * @return the opcode of the type
      */
     public int instruction() {
-        return type.getOpcode(Opcodes.IRETURN);
+        return this.type.getOpcode(Opcodes.IRETURN);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/map/CraftMapCanvas.java b/paper-server/src/main/java/org/bukkit/craftbukkit/map/CraftMapCanvas.java
index 5cb1d4c298..ff59f75966 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/map/CraftMapCanvas.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/map/CraftMapCanvas.java
@@ -19,17 +19,17 @@ public class CraftMapCanvas implements MapCanvas {
 
     protected CraftMapCanvas(CraftMapView mapView) {
         this.mapView = mapView;
-        Arrays.fill(buffer, (byte) -1);
+        Arrays.fill(this.buffer, (byte) -1);
     }
 
     @Override
     public CraftMapView getMapView() {
-        return mapView;
+        return this.mapView;
     }
 
     @Override
     public MapCursorCollection getCursors() {
-        return cursors;
+        return this.cursors;
     }
 
     @Override
@@ -39,12 +39,12 @@ public class CraftMapCanvas implements MapCanvas {
 
     @Override
     public void setPixelColor(int x, int y, Color color) {
-        setPixel(x, y, (color == null) ? -1 : MapPalette.matchColor(color));
+        this.setPixel(x, y, (color == null) ? -1 : MapPalette.matchColor(color));
     }
 
     @Override
     public Color getPixelColor(int x, int y) {
-        byte pixel = getPixel(x, y);
+        byte pixel = this.getPixel(x, y);
         if (pixel == -1) {
             return null;
         }
@@ -54,16 +54,16 @@ public class CraftMapCanvas implements MapCanvas {
 
     @Override
     public Color getBasePixelColor(int x, int y) {
-        return MapPalette.getColor(getBasePixel(x, y));
+        return MapPalette.getColor(this.getBasePixel(x, y));
     }
 
     @Override
     public void setPixel(int x, int y, byte color) {
         if (x < 0 || y < 0 || x >= 128 || y >= 128)
             return;
-        if (buffer[y * 128 + x] != color) {
-            buffer[y * 128 + x] = color;
-            mapView.worldMap.setColorsDirty(x, y);
+        if (this.buffer[y * 128 + x] != color) {
+            this.buffer[y * 128 + x] = color;
+            this.mapView.worldMap.setColorsDirty(x, y);
         }
     }
 
@@ -71,14 +71,14 @@ public class CraftMapCanvas implements MapCanvas {
     public byte getPixel(int x, int y) {
         if (x < 0 || y < 0 || x >= 128 || y >= 128)
             return 0;
-        return buffer[y * 128 + x];
+        return this.buffer[y * 128 + x];
     }
 
     @Override
     public byte getBasePixel(int x, int y) {
         if (x < 0 || y < 0 || x >= 128 || y >= 128)
             return 0;
-        return base[y * 128 + x];
+        return this.base[y * 128 + x];
     }
 
     protected void setBase(byte[] base) {
@@ -86,7 +86,7 @@ public class CraftMapCanvas implements MapCanvas {
     }
 
     protected byte[] getBuffer() {
-        return buffer;
+        return this.buffer;
     }
 
     @Override
@@ -94,7 +94,7 @@ public class CraftMapCanvas implements MapCanvas {
         byte[] bytes = MapPalette.imageToBytes(image);
         for (int x2 = 0; x2 < image.getWidth(null); ++x2) {
             for (int y2 = 0; y2 < image.getHeight(null); ++y2) {
-                setPixel(x + x2, y + y2, bytes[y2 * image.getWidth(null) + x2]);
+                this.setPixel(x + x2, y + y2, bytes[y2 * image.getWidth(null) + x2]);
             }
         }
     }
@@ -126,7 +126,7 @@ public class CraftMapCanvas implements MapCanvas {
             for (int r = 0; r < font.getHeight(); ++r) {
                 for (int c = 0; c < sprite.getWidth(); ++c) {
                     if (sprite.get(r, c)) {
-                        setPixel(x + c, y + r, color);
+                        this.setPixel(x + c, y + r, color);
                     }
                 }
             }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/map/CraftMapColorCache.java b/paper-server/src/main/java/org/bukkit/craftbukkit/map/CraftMapColorCache.java
index 9482c0ea6a..8149b9c51b 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/map/CraftMapColorCache.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/map/CraftMapColorCache.java
@@ -15,7 +15,7 @@ import java.util.concurrent.atomic.AtomicBoolean;
 import java.util.logging.Logger;
 import java.util.zip.DeflaterOutputStream;
 import java.util.zip.InflaterInputStream;
-import net.minecraft.SystemUtils;
+import net.minecraft.Util;
 import org.bukkit.map.MapPalette;
 
 public class CraftMapColorCache implements MapPalette.MapColorCache {
@@ -37,7 +37,7 @@ public class CraftMapColorCache implements MapPalette.MapColorCache {
         craftMapColorCache.buildCache();
         try {
             byte[] hash = MessageDigest.getInstance("MD5").digest(craftMapColorCache.cache);
-            System.out.println("MD5_CACHE_HASH: " + bytesToString(hash));
+            System.out.println("MD5_CACHE_HASH: " + CraftMapColorCache.bytesToString(hash));
         } catch (NoSuchAlgorithmException e) {
             e.printStackTrace();
         }
@@ -58,16 +58,16 @@ public class CraftMapColorCache implements MapPalette.MapColorCache {
     }
 
     public CompletableFuture<Void> initCache() {
-        Preconditions.checkState(!cached && !running.getAndSet(true), "Cache is already build or is currently being build");
+        Preconditions.checkState(!this.cached && !this.running.getAndSet(true), "Cache is already build or is currently being build");
 
-        cache = new byte[256 * 256 * 256]; // Red, Green and Blue have each a range from 0 to 255 each mean we need space for 256 * 256 * 256 values
-        if (CACHE_FILE.exists()) {
+        this.cache = new byte[256 * 256 * 256]; // Red, Green and Blue have each a range from 0 to 255 each mean we need space for 256 * 256 * 256 values
+        if (CraftMapColorCache.CACHE_FILE.exists()) {
             byte[] fileContent;
 
-            try (InputStream inputStream = new InflaterInputStream(new FileInputStream(CACHE_FILE))) {
+            try (InputStream inputStream = new InflaterInputStream(new FileInputStream(CraftMapColorCache.CACHE_FILE))) {
                 fileContent = inputStream.readAllBytes();
             } catch (IOException e) {
-                logger.warning("Error while reading map color cache");
+                this.logger.warning("Error while reading map color cache");
                 e.printStackTrace();
                 return CompletableFuture.completedFuture(null);
             }
@@ -76,22 +76,22 @@ public class CraftMapColorCache implements MapPalette.MapColorCache {
             try {
                 hash = MessageDigest.getInstance("MD5").digest(fileContent);
             } catch (NoSuchAlgorithmException e) {
-                logger.warning("Error while hashing map color cache");
+                this.logger.warning("Error while hashing map color cache");
                 e.printStackTrace();
                 return CompletableFuture.completedFuture(null);
             }
 
-            if (!MD5_CACHE_HASH.equals(bytesToString(hash))) {
-                logger.info("Map color cache hash invalid, rebuilding cache in the background");
-                return buildAndSaveCache();
+            if (!CraftMapColorCache.MD5_CACHE_HASH.equals(CraftMapColorCache.bytesToString(hash))) {
+                this.logger.info("Map color cache hash invalid, rebuilding cache in the background");
+                return this.buildAndSaveCache();
             } else {
-                System.arraycopy(fileContent, 0, cache, 0, fileContent.length);
+                System.arraycopy(fileContent, 0, this.cache, 0, fileContent.length);
             }
 
-            cached = true;
+            this.cached = true;
         } else {
-            logger.info("Map color cache not found, building it in the background");
-            return buildAndSaveCache();
+            this.logger.info("Map color cache not found, building it in the background");
+            return this.buildAndSaveCache();
         }
 
         return CompletableFuture.completedFuture(null);
@@ -102,7 +102,7 @@ public class CraftMapColorCache implements MapPalette.MapColorCache {
             for (int g = 0; g < 256; g++) {
                 for (int b = 0; b < 256; b++) {
                     Color color = new Color(r, g, b);
-                    cache[toInt(color)] = MapPalette.matchColor(color);
+                    this.cache[this.toInt(color)] = MapPalette.matchColor(color);
                 }
             }
         }
@@ -110,34 +110,34 @@ public class CraftMapColorCache implements MapPalette.MapColorCache {
 
     private CompletableFuture<Void> buildAndSaveCache() {
         return CompletableFuture.runAsync(() -> {
-            buildCache();
+            this.buildCache();
 
-            if (!CACHE_FILE.exists()) {
+            if (!CraftMapColorCache.CACHE_FILE.exists()) {
                 try {
-                    if (!CACHE_FILE.createNewFile()) {
-                        cached = true;
+                    if (!CraftMapColorCache.CACHE_FILE.createNewFile()) {
+                        this.cached = true;
                         return;
                     }
                 } catch (IOException e) {
-                    logger.warning("Error while building map color cache");
+                    this.logger.warning("Error while building map color cache");
                     e.printStackTrace();
-                    cached = true;
+                    this.cached = true;
                     return;
                 }
             }
 
-            try (OutputStream outputStream = new DeflaterOutputStream(new FileOutputStream(CACHE_FILE))) {
-                outputStream.write(cache);
+            try (OutputStream outputStream = new DeflaterOutputStream(new FileOutputStream(CraftMapColorCache.CACHE_FILE))) {
+                outputStream.write(this.cache);
             } catch (IOException e) {
-                logger.warning("Error while building map color cache");
+                this.logger.warning("Error while building map color cache");
                 e.printStackTrace();
-                cached = true;
+                this.cached = true;
                 return;
             }
 
-            cached = true;
-            logger.info("Map color cache build successfully");
-        }, SystemUtils.backgroundExecutor());
+            this.cached = true;
+            this.logger.info("Map color cache build successfully");
+        }, Util.backgroundExecutor());
     }
 
     private int toInt(Color color) {
@@ -146,13 +146,13 @@ public class CraftMapColorCache implements MapPalette.MapColorCache {
 
     @Override
     public boolean isCached() {
-        return cached || (!running.get() && initCache().isDone());
+        return this.cached || (!this.running.get() && this.initCache().isDone());
     }
 
     @Override
     public byte matchColor(Color color) {
-        Preconditions.checkState(isCached(), "Cache not build jet");
+        Preconditions.checkState(this.isCached(), "Cache not build jet");
 
-        return cache[toInt(color)];
+        return this.cache[this.toInt(color)];
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/map/CraftMapCursor.java b/paper-server/src/main/java/org/bukkit/craftbukkit/map/CraftMapCursor.java
index d55fb01611..9c02115aa1 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/map/CraftMapCursor.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/map/CraftMapCursor.java
@@ -21,7 +21,7 @@ public final class CraftMapCursor {
         }
 
         public static MapCursor.Type minecraftHolderToBukkit(Holder<MapDecorationType> minecraft) {
-            return minecraftToBukkit(minecraft.value());
+            return CraftType.minecraftToBukkit(minecraft.value());
         }
 
         public static MapDecorationType bukkitToMinecraft(MapCursor.Type bukkit) {
@@ -49,38 +49,38 @@ public final class CraftMapCursor {
             } else {
                 this.name = key.toString();
             }
-            this.ordinal = count++;
+            this.ordinal = CraftType.count++;
         }
 
         @Override
         public MapDecorationType getHandle() {
-            return mapDecorationType;
+            return this.mapDecorationType;
         }
 
         @Override
         public NamespacedKey getKey() {
-            return key;
+            return this.key;
         }
 
         @Override
         public int compareTo(MapCursor.Type type) {
-            return ordinal - type.ordinal();
+            return this.ordinal - type.ordinal();
         }
 
         @Override
         public String name() {
-            return name;
+            return this.name;
         }
 
         @Override
         public int ordinal() {
-            return ordinal;
+            return this.ordinal;
         }
 
         @Override
         public String toString() {
             // For backwards compatibility
-            return name();
+            return this.name();
         }
 
         @Override
@@ -93,17 +93,17 @@ public final class CraftMapCursor {
                 return false;
             }
 
-            return getKey().equals(((MapCursor.Type) other).getKey());
+            return this.getKey().equals(((MapCursor.Type) other).getKey());
         }
 
         @Override
         public int hashCode() {
-            return getKey().hashCode();
+            return this.getKey().hashCode();
         }
 
         @Override
         public byte getValue() {
-            return (byte) CraftRegistry.getMinecraftRegistry(Registries.MAP_DECORATION_TYPE).getId(getHandle());
+            return (byte) CraftRegistry.getMinecraftRegistry(Registries.MAP_DECORATION_TYPE).getId(this.getHandle());
         }
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java
index 34d4926c39..9efd33cc20 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/map/CraftMapRenderer.java
@@ -1,7 +1,7 @@
 package org.bukkit.craftbukkit.map;
 
-import net.minecraft.world.level.saveddata.maps.MapIcon;
-import net.minecraft.world.level.saveddata.maps.WorldMap;
+import net.minecraft.world.level.saveddata.maps.MapDecoration;
+import net.minecraft.world.level.saveddata.maps.MapItemSavedData;
 import org.bukkit.Bukkit;
 import org.bukkit.craftbukkit.util.CraftChatMessage;
 import org.bukkit.entity.Player;
@@ -13,9 +13,9 @@ import org.bukkit.map.MapView;
 
 public class CraftMapRenderer extends MapRenderer {
 
-    private final WorldMap worldMap;
+    private final MapItemSavedData worldMap;
 
-    public CraftMapRenderer(CraftMapView mapView, WorldMap worldMap) {
+    public CraftMapRenderer(CraftMapView mapView, MapItemSavedData worldMap) {
         super(false);
         this.worldMap = worldMap;
     }
@@ -25,7 +25,7 @@ public class CraftMapRenderer extends MapRenderer {
         // Map
         for (int x = 0; x < 128; ++x) {
             for (int y = 0; y < 128; ++y) {
-                canvas.setPixel(x, y, worldMap.colors[y * 128 + x]);
+                canvas.setPixel(x, y, this.worldMap.colors[y * 128 + x]);
             }
         }
 
@@ -35,14 +35,14 @@ public class CraftMapRenderer extends MapRenderer {
             cursors.removeCursor(cursors.getCursor(0));
         }
 
-        for (String key : worldMap.decorations.keySet()) {
+        for (String key : this.worldMap.decorations.keySet()) {
             // If this cursor is for a player check visibility with vanish system
             Player other = Bukkit.getPlayerExact((String) key);
             if (other != null && !player.canSee(other)) {
                 continue;
             }
 
-            MapIcon decoration = worldMap.decorations.get(key);
+            MapDecoration decoration = this.worldMap.decorations.get(key);
             cursors.addCursor(new MapCursor(decoration.x(), decoration.y(), (byte) (decoration.rot() & 15), CraftMapCursor.CraftType.minecraftHolderToBukkit(decoration.type()), true, CraftChatMessage.fromComponent(decoration.name().orElse(null))));
         }
     }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java b/paper-server/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java
index ab8e203c77..a15cdf6457 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/map/CraftMapView.java
@@ -8,8 +8,8 @@ import java.util.Map;
 import java.util.logging.Level;
 import net.minecraft.resources.ResourceKey;
 import net.minecraft.server.MinecraftServer;
-import net.minecraft.server.level.WorldServer;
-import net.minecraft.world.level.saveddata.maps.WorldMap;
+import net.minecraft.server.level.ServerLevel;
+import net.minecraft.world.level.saveddata.maps.MapItemSavedData;
 import org.bukkit.Bukkit;
 import org.bukkit.World;
 import org.bukkit.craftbukkit.CraftWorld;
@@ -22,100 +22,100 @@ public final class CraftMapView implements MapView {
     private final Map<CraftPlayer, RenderData> renderCache = new HashMap<CraftPlayer, RenderData>();
     private final List<MapRenderer> renderers = new ArrayList<MapRenderer>();
     private final Map<MapRenderer, Map<CraftPlayer, CraftMapCanvas>> canvases = new HashMap<MapRenderer, Map<CraftPlayer, CraftMapCanvas>>();
-    protected final WorldMap worldMap;
+    protected final MapItemSavedData worldMap;
 
-    public CraftMapView(WorldMap worldMap) {
+    public CraftMapView(MapItemSavedData worldMap) {
         this.worldMap = worldMap;
-        addRenderer(new CraftMapRenderer(this, worldMap));
+        this.addRenderer(new CraftMapRenderer(this, worldMap));
     }
 
     @Override
     public int getId() {
-        return worldMap.id.id();
+        return this.worldMap.id.id();
     }
 
     @Override
     public boolean isVirtual() {
-        return renderers.size() > 0 && !(renderers.get(0) instanceof CraftMapRenderer);
+        return this.renderers.size() > 0 && !(this.renderers.get(0) instanceof CraftMapRenderer);
     }
 
     @Override
     public Scale getScale() {
-        return Scale.valueOf(worldMap.scale);
+        return Scale.valueOf(this.worldMap.scale);
     }
 
     @Override
     public void setScale(Scale scale) {
-        worldMap.scale = scale.getValue();
+        this.worldMap.scale = scale.getValue();
     }
 
     @Override
     public World getWorld() {
-        ResourceKey<net.minecraft.world.level.World> dimension = worldMap.dimension;
-        WorldServer world = MinecraftServer.getServer().getLevel(dimension);
+        ResourceKey<net.minecraft.world.level.Level> dimension = this.worldMap.dimension;
+        ServerLevel world = MinecraftServer.getServer().getLevel(dimension);
 
         if (world != null) {
             return world.getWorld();
         }
 
-        if (worldMap.uniqueId != null) {
-            return Bukkit.getServer().getWorld(worldMap.uniqueId);
+        if (this.worldMap.uniqueId != null) {
+            return Bukkit.getServer().getWorld(this.worldMap.uniqueId);
         }
         return null;
     }
 
     @Override
     public void setWorld(World world) {
-        worldMap.dimension = ((CraftWorld) world).getHandle().dimension();
-        worldMap.uniqueId = world.getUID();
+        this.worldMap.dimension = ((CraftWorld) world).getHandle().dimension();
+        this.worldMap.uniqueId = world.getUID();
     }
 
     @Override
     public int getCenterX() {
-        return worldMap.centerX;
+        return this.worldMap.centerX;
     }
 
     @Override
     public int getCenterZ() {
-        return worldMap.centerZ;
+        return this.worldMap.centerZ;
     }
 
     @Override
     public void setCenterX(int x) {
-        worldMap.centerX = x;
+        this.worldMap.centerX = x;
     }
 
     @Override
     public void setCenterZ(int z) {
-        worldMap.centerZ = z;
+        this.worldMap.centerZ = z;
     }
 
     @Override
     public List<MapRenderer> getRenderers() {
-        return new ArrayList<MapRenderer>(renderers);
+        return new ArrayList<MapRenderer>(this.renderers);
     }
 
     @Override
     public void addRenderer(MapRenderer renderer) {
-        if (!renderers.contains(renderer)) {
-            renderers.add(renderer);
-            canvases.put(renderer, new HashMap<CraftPlayer, CraftMapCanvas>());
+        if (!this.renderers.contains(renderer)) {
+            this.renderers.add(renderer);
+            this.canvases.put(renderer, new HashMap<CraftPlayer, CraftMapCanvas>());
             renderer.initialize(this);
         }
     }
 
     @Override
     public boolean removeRenderer(MapRenderer renderer) {
-        if (renderers.contains(renderer)) {
-            renderers.remove(renderer);
-            for (Map.Entry<CraftPlayer, CraftMapCanvas> entry : canvases.get(renderer).entrySet()) {
+        if (this.renderers.contains(renderer)) {
+            this.renderers.remove(renderer);
+            for (Map.Entry<CraftPlayer, CraftMapCanvas> entry : this.canvases.get(renderer).entrySet()) {
                 for (int x = 0; x < 128; ++x) {
                     for (int y = 0; y < 128; ++y) {
                         entry.getValue().setPixel(x, y, (byte) -1);
                     }
                 }
             }
-            canvases.remove(renderer);
+            this.canvases.remove(renderer);
             return true;
         } else {
             return false;
@@ -123,33 +123,33 @@ public final class CraftMapView implements MapView {
     }
 
     private boolean isContextual() {
-        for (MapRenderer renderer : renderers) {
+        for (MapRenderer renderer : this.renderers) {
             if (renderer.isContextual()) return true;
         }
         return false;
     }
 
     public RenderData render(CraftPlayer player) {
-        boolean context = isContextual();
-        RenderData render = renderCache.get(context ? player : null);
+        boolean context = this.isContextual();
+        RenderData render = this.renderCache.get(context ? player : null);
 
         if (render == null) {
             render = new RenderData();
-            renderCache.put(context ? player : null, render);
+            this.renderCache.put(context ? player : null, render);
         }
 
-        if (context && renderCache.containsKey(null)) {
-            renderCache.remove(null);
+        if (context && this.renderCache.containsKey(null)) {
+            this.renderCache.remove(null);
         }
 
         Arrays.fill(render.buffer, (byte) 0);
         render.cursors.clear();
 
-        for (MapRenderer renderer : renderers) {
-            CraftMapCanvas canvas = canvases.get(renderer).get(renderer.isContextual() ? player : null);
+        for (MapRenderer renderer : this.renderers) {
+            CraftMapCanvas canvas = this.canvases.get(renderer).get(renderer.isContextual() ? player : null);
             if (canvas == null) {
                 canvas = new CraftMapCanvas(this);
-                canvases.get(renderer).put(renderer.isContextual() ? player : null, canvas);
+                this.canvases.get(renderer).put(renderer.isContextual() ? player : null, canvas);
             }
 
             canvas.setBase(render.buffer);
@@ -176,31 +176,31 @@ public final class CraftMapView implements MapView {
 
     @Override
     public boolean isTrackingPosition() {
-        return worldMap.trackingPosition;
+        return this.worldMap.trackingPosition;
     }
 
     @Override
     public void setTrackingPosition(boolean trackingPosition) {
-        worldMap.trackingPosition = trackingPosition;
+        this.worldMap.trackingPosition = trackingPosition;
     }
 
     @Override
     public boolean isUnlimitedTracking() {
-        return worldMap.unlimitedTracking;
+        return this.worldMap.unlimitedTracking;
     }
 
     @Override
     public void setUnlimitedTracking(boolean unlimited) {
-        worldMap.unlimitedTracking = unlimited;
+        this.worldMap.unlimitedTracking = unlimited;
     }
 
     @Override
     public boolean isLocked() {
-        return worldMap.locked;
+        return this.worldMap.locked;
     }
 
     @Override
     public void setLocked(boolean locked) {
-        worldMap.locked = locked;
+        this.worldMap.locked = locked;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/metadata/BlockMetadataStore.java b/paper-server/src/main/java/org/bukkit/craftbukkit/metadata/BlockMetadataStore.java
index ae2c85dbba..140058d139 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/metadata/BlockMetadataStore.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/metadata/BlockMetadataStore.java
@@ -43,7 +43,7 @@ public class BlockMetadataStore extends MetadataStoreBase<Block> implements Meta
      */
     @Override
     public List<MetadataValue> getMetadata(Block block, String metadataKey) {
-        Preconditions.checkArgument(block.getWorld() == this.owningWorld, "Block does not belong to world %s", owningWorld.getName());
+        Preconditions.checkArgument(block.getWorld() == this.owningWorld, "Block does not belong to world %s", this.owningWorld.getName());
         return super.getMetadata(block, metadataKey);
     }
 
@@ -54,7 +54,7 @@ public class BlockMetadataStore extends MetadataStoreBase<Block> implements Meta
      */
     @Override
     public boolean hasMetadata(Block block, String metadataKey) {
-        Preconditions.checkArgument(block.getWorld() == this.owningWorld, "Block does not belong to world %s", owningWorld.getName());
+        Preconditions.checkArgument(block.getWorld() == this.owningWorld, "Block does not belong to world %s", this.owningWorld.getName());
         return super.hasMetadata(block, metadataKey);
     }
 
@@ -65,7 +65,7 @@ public class BlockMetadataStore extends MetadataStoreBase<Block> implements Meta
      */
     @Override
     public void removeMetadata(Block block, String metadataKey, Plugin owningPlugin) {
-        Preconditions.checkArgument(block.getWorld() == this.owningWorld, "Block does not belong to world %s", owningWorld.getName());
+        Preconditions.checkArgument(block.getWorld() == this.owningWorld, "Block does not belong to world %s", this.owningWorld.getName());
         super.removeMetadata(block, metadataKey, owningPlugin);
     }
 
@@ -76,7 +76,7 @@ public class BlockMetadataStore extends MetadataStoreBase<Block> implements Meta
      */
     @Override
     public void setMetadata(Block block, String metadataKey, MetadataValue newMetadataValue) {
-        Preconditions.checkArgument(block.getWorld() == this.owningWorld, "Block does not belong to world %s", owningWorld.getName());
+        Preconditions.checkArgument(block.getWorld() == this.owningWorld, "Block does not belong to world %s", this.owningWorld.getName());
         super.setMetadata(block, metadataKey, newMetadataValue);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/packs/CraftDataPack.java b/paper-server/src/main/java/org/bukkit/craftbukkit/packs/CraftDataPack.java
index daaf004f3d..9525a7d460 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/packs/CraftDataPack.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/packs/CraftDataPack.java
@@ -3,10 +3,10 @@ package org.bukkit.craftbukkit.packs;
 import java.io.IOException;
 import java.util.Set;
 import java.util.stream.Collectors;
-import net.minecraft.server.packs.IResourcePack;
-import net.minecraft.server.packs.metadata.pack.ResourcePackInfo;
+import net.minecraft.server.packs.PackResources;
+import net.minecraft.server.packs.metadata.pack.PackMetadataSection;
+import net.minecraft.server.packs.repository.Pack;
 import net.minecraft.server.packs.repository.PackSource;
-import net.minecraft.server.packs.repository.ResourcePackLoader;
 import net.minecraft.util.InclusiveRange;
 import org.bukkit.Bukkit;
 import org.bukkit.FeatureFlag;
@@ -18,24 +18,24 @@ import org.bukkit.packs.DataPack;
 
 public class CraftDataPack implements DataPack {
 
-    private final ResourcePackLoader handle;
-    private final ResourcePackInfo resourcePackInfo;
+    private final Pack handle;
+    private final PackMetadataSection resourcePackInfo;
 
-    public CraftDataPack(ResourcePackLoader handler) {
+    public CraftDataPack(Pack handler) {
         this.handle = handler;
-        try (IResourcePack iresourcepack = this.handle.resources.openPrimary(this.handle.location())) {
-            this.resourcePackInfo = iresourcepack.getMetadataSection(ResourcePackInfo.TYPE);
+        try (PackResources iresourcepack = this.handle.resources.openPrimary(this.handle.location())) {
+            this.resourcePackInfo = iresourcepack.getMetadataSection(PackMetadataSection.TYPE);
         } catch (IOException e) { // This is already called in NMS then if in NMS not happen is secure this not throw here
             throw new RuntimeException(e);
         }
     }
 
-    public ResourcePackLoader getHandle() {
+    public Pack getHandle() {
         return this.handle;
     }
 
     public String getRawId() {
-        return getHandle().getId();
+        return this.getHandle().getId();
     }
 
     @Override
@@ -65,7 +65,7 @@ public class CraftDataPack implements DataPack {
 
     @Override
     public boolean isRequired() {
-        return getHandle().isRequired();
+        return this.getHandle().isRequired();
     }
 
     @Override
@@ -79,7 +79,7 @@ public class CraftDataPack implements DataPack {
 
     @Override
     public boolean isEnabled() {
-        return ((CraftServer) Bukkit.getServer()).getServer().getPackRepository().getSelectedIds().contains(getRawId());
+        return ((CraftServer) Bukkit.getServer()).getServer().getPackRepository().getSelectedIds().contains(this.getRawId());
     }
 
     @Override
@@ -103,12 +103,12 @@ public class CraftDataPack implements DataPack {
 
     @Override
     public NamespacedKey getKey() {
-        return NamespacedKey.fromString(getRawId());
+        return NamespacedKey.fromString(this.getRawId());
     }
 
     @Override
     public String toString() {
-        String requestedFeatures = getRequestedFeatures().stream().map(featureFlag -> featureFlag.getKey().toString()).collect(Collectors.joining(","));
+        String requestedFeatures = this.getRequestedFeatures().stream().map(featureFlag -> featureFlag.getKey().toString()).collect(Collectors.joining(","));
         return "CraftDataPack{rawId=" + this.getRawId() + ",id=" + this.getKey() + ",title=" + this.getTitle() + ",description=" + this.getDescription() + ",packformat=" + this.getPackFormat() + ",minSupportedPackFormat=" + this.getMinSupportedPackFormat() + ",maxSupportedPackFormat=" + this.getMaxSupportedPackFormat() + ",compatibility=" + this.getCompatibility() + ",source=" + this.getSource() + ",enabled=" + this.isEnabled() + ",requestedFeatures=[" + requestedFeatures + "]}";
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/packs/CraftDataPackManager.java b/paper-server/src/main/java/org/bukkit/craftbukkit/packs/CraftDataPackManager.java
index 77e3f54c17..c1800ad648 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/packs/CraftDataPackManager.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/packs/CraftDataPackManager.java
@@ -4,9 +4,8 @@ import com.google.common.base.Preconditions;
 import java.util.Collection;
 import java.util.Objects;
 import java.util.stream.Collectors;
-import net.minecraft.server.packs.repository.ResourcePackLoader;
-import net.minecraft.server.packs.repository.ResourcePackRepository;
-import net.minecraft.world.entity.EntityTypes;
+import net.minecraft.server.packs.repository.Pack;
+import net.minecraft.server.packs.repository.PackRepository;
 import org.bukkit.Material;
 import org.bukkit.NamespacedKey;
 import org.bukkit.World;
@@ -22,13 +21,13 @@ import org.bukkit.packs.DataPackManager;
 
 public class CraftDataPackManager implements DataPackManager {
 
-    private final ResourcePackRepository handle;
+    private final PackRepository handle;
 
-    public CraftDataPackManager(ResourcePackRepository resourcePackRepository) {
+    public CraftDataPackManager(PackRepository resourcePackRepository) {
         this.handle = resourcePackRepository;
     }
 
-    public ResourcePackRepository getHandle() {
+    public PackRepository getHandle() {
         return this.handle;
     }
 
@@ -37,7 +36,7 @@ public class CraftDataPackManager implements DataPackManager {
         // Based in the command for datapacks need reload for get the updated list of datapacks
         this.getHandle().reload();
 
-        Collection<ResourcePackLoader> availablePacks = this.getHandle().getAvailablePacks();
+        Collection<Pack> availablePacks = this.getHandle().getAvailablePacks();
         return availablePacks.stream().map(CraftDataPack::new).collect(Collectors.toUnmodifiableList());
     }
 
@@ -54,7 +53,7 @@ public class CraftDataPackManager implements DataPackManager {
 
         CraftWorld craftWorld = ((CraftWorld) world);
         return craftWorld.getHandle().serverLevelData.getDataConfiguration().dataPacks().getEnabled().stream().map(packName -> {
-            ResourcePackLoader resourcePackLoader = this.getHandle().getPack(packName);
+            Pack resourcePackLoader = this.getHandle().getPack(packName);
             if (resourcePackLoader != null) {
                 return new CraftDataPack(resourcePackLoader);
             }
@@ -68,7 +67,7 @@ public class CraftDataPackManager implements DataPackManager {
 
         CraftWorld craftWorld = ((CraftWorld) world);
         return craftWorld.getHandle().serverLevelData.getDataConfiguration().dataPacks().getDisabled().stream().map(packName -> {
-            ResourcePackLoader resourcePackLoader = this.getHandle().getPack(packName);
+            Pack resourcePackLoader = this.getHandle().getPack(packName);
             if (resourcePackLoader != null) {
                 return new CraftDataPack(resourcePackLoader);
             }
@@ -116,7 +115,7 @@ public class CraftDataPackManager implements DataPackManager {
         Preconditions.checkArgument(entityType != EntityType.UNKNOWN, "EntityType.UNKNOWN its not allowed here");
 
         CraftWorld craftWorld = ((CraftWorld) world);
-        EntityTypes<?> nmsEntity = CraftEntityType.bukkitToMinecraft(entityType);
+        net.minecraft.world.entity.EntityType<?> nmsEntity = CraftEntityType.bukkitToMinecraft(entityType);
         return nmsEntity.isEnabled(craftWorld.getHandle().enabledFeatures());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java
index af31f75463..dbb9a5b2f8 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataContainer.java
@@ -7,8 +7,8 @@ import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Objects;
 import java.util.Set;
-import net.minecraft.nbt.NBTBase;
-import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.nbt.Tag;
 import org.bukkit.NamespacedKey;
 import org.bukkit.craftbukkit.util.CraftNBTTagConfigSerializer;
 import org.bukkit.persistence.PersistentDataAdapterContext;
@@ -18,11 +18,11 @@ import org.jetbrains.annotations.NotNull;
 
 public class CraftPersistentDataContainer implements PersistentDataContainer {
 
-    private final Map<String, NBTBase> customDataTags = new HashMap<>();
+    private final Map<String, Tag> customDataTags = new HashMap<>();
     private final CraftPersistentDataTypeRegistry registry;
     private final CraftPersistentDataAdapterContext adapterContext;
 
-    public CraftPersistentDataContainer(Map<String, NBTBase> customTags, CraftPersistentDataTypeRegistry registry) {
+    public CraftPersistentDataContainer(Map<String, Tag> customTags, CraftPersistentDataTypeRegistry registry) {
         this(registry);
         this.customDataTags.putAll(customTags);
     }
@@ -39,7 +39,7 @@ public class CraftPersistentDataContainer implements PersistentDataContainer {
         Preconditions.checkArgument(type != null, "The provided type cannot be null");
         Preconditions.checkArgument(value != null, "The provided value cannot be null");
 
-        this.customDataTags.put(key.toString(), this.registry.wrap(type, type.toPrimitive(value, adapterContext)));
+        this.customDataTags.put(key.toString(), this.registry.wrap(type, type.toPrimitive(value, this.adapterContext)));
     }
 
     @Override
@@ -47,7 +47,7 @@ public class CraftPersistentDataContainer implements PersistentDataContainer {
         Preconditions.checkArgument(key != null, "The NamespacedKey key cannot be null");
         Preconditions.checkArgument(type != null, "The provided type cannot be null");
 
-        NBTBase value = this.customDataTags.get(key.toString());
+        Tag value = this.customDataTags.get(key.toString());
         if (value == null) {
             return false;
         }
@@ -65,12 +65,12 @@ public class CraftPersistentDataContainer implements PersistentDataContainer {
         Preconditions.checkArgument(key != null, "The NamespacedKey key cannot be null");
         Preconditions.checkArgument(type != null, "The provided type cannot be null");
 
-        NBTBase value = this.customDataTags.get(key.toString());
+        Tag value = this.customDataTags.get(key.toString());
         if (value == null) {
             return null;
         }
 
-        return type.fromPrimitive(this.registry.extract(type, value), adapterContext);
+        return type.fromPrimitive(this.registry.extract(type, value), this.adapterContext);
     }
 
     @NotNull
@@ -114,9 +114,9 @@ public class CraftPersistentDataContainer implements PersistentDataContainer {
 
         CraftPersistentDataContainer target = (CraftPersistentDataContainer) other;
         if (replace) {
-            target.customDataTags.putAll(customDataTags);
+            target.customDataTags.putAll(this.customDataTags);
         } else {
-            customDataTags.forEach(target.customDataTags::putIfAbsent);
+            this.customDataTags.forEach(target.customDataTags::putIfAbsent);
         }
     }
 
@@ -131,35 +131,35 @@ public class CraftPersistentDataContainer implements PersistentDataContainer {
             return false;
         }
 
-        Map<String, NBTBase> myRawMap = this.getRaw();
-        Map<String, NBTBase> theirRawMap = ((CraftPersistentDataContainer) obj).getRaw();
+        Map<String, Tag> myRawMap = this.getRaw();
+        Map<String, Tag> theirRawMap = ((CraftPersistentDataContainer) obj).getRaw();
 
         return Objects.equals(myRawMap, theirRawMap);
     }
 
-    public NBTTagCompound toTagCompound() {
-        NBTTagCompound tag = new NBTTagCompound();
-        for (Entry<String, NBTBase> entry : this.customDataTags.entrySet()) {
+    public CompoundTag toTagCompound() {
+        CompoundTag tag = new CompoundTag();
+        for (Entry<String, Tag> entry : this.customDataTags.entrySet()) {
             tag.put(entry.getKey(), entry.getValue());
         }
         return tag;
     }
 
-    public void put(String key, NBTBase base) {
+    public void put(String key, Tag base) {
         this.customDataTags.put(key, base);
     }
 
-    public void putAll(Map<String, NBTBase> map) {
+    public void putAll(Map<String, Tag> map) {
         this.customDataTags.putAll(map);
     }
 
-    public void putAll(NBTTagCompound compound) {
+    public void putAll(CompoundTag compound) {
         for (String key : compound.getAllKeys()) {
             this.customDataTags.put(key, compound.get(key));
         }
     }
 
-    public Map<String, NBTBase> getRaw() {
+    public Map<String, Tag> getRaw() {
         return this.customDataTags;
     }
 
@@ -175,6 +175,6 @@ public class CraftPersistentDataContainer implements PersistentDataContainer {
     }
 
     public String serialize() {
-        return CraftNBTTagConfigSerializer.serialize(toTagCompound());
+        return CraftNBTTagConfigSerializer.serialize(this.toTagCompound());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataTypeRegistry.java b/paper-server/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataTypeRegistry.java
index a1b7442f36..71dc4a2285 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataTypeRegistry.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/persistence/CraftPersistentDataTypeRegistry.java
@@ -12,19 +12,19 @@ import java.util.Objects;
 import java.util.function.BiFunction;
 import java.util.function.BiPredicate;
 import java.util.function.Function;
-import net.minecraft.nbt.NBTBase;
-import net.minecraft.nbt.NBTTagByte;
-import net.minecraft.nbt.NBTTagByteArray;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagDouble;
-import net.minecraft.nbt.NBTTagFloat;
-import net.minecraft.nbt.NBTTagInt;
-import net.minecraft.nbt.NBTTagIntArray;
-import net.minecraft.nbt.NBTTagList;
-import net.minecraft.nbt.NBTTagLong;
-import net.minecraft.nbt.NBTTagLongArray;
-import net.minecraft.nbt.NBTTagShort;
-import net.minecraft.nbt.NBTTagString;
+import net.minecraft.nbt.ByteArrayTag;
+import net.minecraft.nbt.ByteTag;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.nbt.DoubleTag;
+import net.minecraft.nbt.FloatTag;
+import net.minecraft.nbt.IntArrayTag;
+import net.minecraft.nbt.IntTag;
+import net.minecraft.nbt.ListTag;
+import net.minecraft.nbt.LongArrayTag;
+import net.minecraft.nbt.LongTag;
+import net.minecraft.nbt.ShortTag;
+import net.minecraft.nbt.StringTag;
+import net.minecraft.nbt.Tag;
 import org.bukkit.persistence.ListPersistentDataType;
 import org.bukkit.persistence.PersistentDataContainer;
 import org.bukkit.persistence.PersistentDataType;
@@ -33,11 +33,11 @@ import org.jetbrains.annotations.NotNull;
 /**
  * The craft persistent data type registry, at its core, is responsible for the
  * conversion process between a {@link PersistentDataType} and a respective
- * {@link NBTBase} instance.
+ * {@link Tag} instance.
  * <p>
  * It does so by creating {@link TagAdapter} instances that are capable of
  * mappings the supported "primitive types" of {@link PersistentDataType}s to
- * their respective {@link NBTBase} instances.
+ * their respective {@link Tag} instances.
  * <p>
  * To accomplish this, the class makes <b>heavy</b> use of raw arguments. Their
  * validity is enforced by the mapping of class to {@link TagAdapter}
@@ -50,39 +50,39 @@ public final class CraftPersistentDataTypeRegistry {
 
     /**
      * A tag adapter is a closely related type to a specific implementation of
-     * the {@link NBTBase} interface. It exists to convert from and to the
-     * respective value of a {@link NBTBase} to a "primitive type" for later
+     * the {@link Tag} interface. It exists to convert from and to the
+     * respective value of a {@link Tag} to a "primitive type" for later
      * usage in {@link PersistentDataType}.
      *
      * @param primitiveType the class of the primitive type, e.g.
      * {@link String}.
      * @param nbtBaseType the class of the tag implementation that is used to
-     * store this primitive type, e.g {@link NBTTagString}.
+     * store this primitive type, e.g {@link StringTag}.
      * @param nmsTypeByte the byte identifier of the tag as defined by
-     * {@link NBTBase#getId()}.
+     * {@link Tag#getId()}.
      * @param builder a bi function that is responsible for mapping a "primitive
-     * type" and its respective {@link PersistentDataType} to a {@link NBTBase}.
+     * type" and its respective {@link PersistentDataType} to a {@link Tag}.
      * @param extractor a bi function that is responsible for extracting a
-     * "primitive type" from a {@link NBTBase} given a
+     * "primitive type" from a {@link Tag} given a
      * {@link PersistentDataType}.
      * @param matcher a bi predicate that is responsible for computing if the
-     * passed {@link NBTBase} holds a value that the {@link PersistentDataType}
+     * passed {@link Tag} holds a value that the {@link PersistentDataType}
      * can extract.
      * @param <P> the generic type of the primitive the persistent data type
      * expects.
-     * @param <T> the generic type of the concrete {@link NBTBase}
+     * @param <T> the generic type of the concrete {@link Tag}
      * implementation that the primitive type is mapped into.
      */
-    private record TagAdapter<P, T extends NBTBase>(
+    private record TagAdapter<P, T extends Tag>(
             Class<P> primitiveType,
             Class<T> nbtBaseType,
             byte nmsTypeByte,
             BiFunction<PersistentDataType<P, ?>, P, T> builder,
             BiFunction<PersistentDataType<P, ?>, T, P> extractor,
-            BiPredicate<PersistentDataType<P, ?>, NBTBase> matcher) {
+            BiPredicate<PersistentDataType<P, ?>, Tag> matcher) {
 
         /**
-         * Extract the primitive value from the {@link NBTBase}.
+         * Extract the primitive value from the {@link Tag}.
          *
          * @param base the base to extract from
          * @return the value stored inside the tag
@@ -90,7 +90,7 @@ public final class CraftPersistentDataTypeRegistry {
          * the defined base type and therefore is not applicable to the
          * extractor function.
          */
-        private P extract(final PersistentDataType<P, ?> dataType, final NBTBase base) {
+        private P extract(final PersistentDataType<P, ?> dataType, final Tag base) {
             Preconditions.checkArgument(this.nbtBaseType.isInstance(base), "The provided NBTBase was of the type %s. Expected type %s", base.getClass().getSimpleName(), this.nbtBaseType.getSimpleName());
             return this.extractor.apply(dataType, this.nbtBaseType.cast(base));
         }
@@ -111,12 +111,12 @@ public final class CraftPersistentDataTypeRegistry {
 
         /**
          * Computes if the provided persistent data type's primitive type is a
-         * representation of the {@link NBTBase}.
+         * representation of the {@link Tag}.
          *
          * @param base the base tag instance to check against
          * @return if the tag was an instance of the set type
          */
-        private boolean isInstance(final PersistentDataType<P, ?> persistentDataType, final NBTBase base) {
+        private boolean isInstance(final PersistentDataType<P, ?> persistentDataType, final Tag base) {
             return this.matcher.test(persistentDataType, base);
         }
     }
@@ -140,63 +140,63 @@ public final class CraftPersistentDataTypeRegistry {
         // Primitives
         if (Objects.equals(Byte.class, type)) {
             return this.createAdapter(
-                    Byte.class, NBTTagByte.class, NBTBase.TAG_BYTE,
-                    NBTTagByte::valueOf, NBTTagByte::getAsByte
+                    Byte.class, ByteTag.class, Tag.TAG_BYTE,
+                    ByteTag::valueOf, ByteTag::getAsByte
             );
         }
         if (Objects.equals(Short.class, type)) {
             return this.createAdapter(
-                    Short.class, NBTTagShort.class, NBTBase.TAG_SHORT, NBTTagShort::valueOf, NBTTagShort::getAsShort
+                    Short.class, ShortTag.class, Tag.TAG_SHORT, ShortTag::valueOf, ShortTag::getAsShort
             );
         }
         if (Objects.equals(Integer.class, type)) {
             return this.createAdapter(
-                    Integer.class, NBTTagInt.class, NBTBase.TAG_INT, NBTTagInt::valueOf, NBTTagInt::getAsInt
+                    Integer.class, IntTag.class, Tag.TAG_INT, IntTag::valueOf, IntTag::getAsInt
             );
         }
         if (Objects.equals(Long.class, type)) {
             return this.createAdapter(
-                    Long.class, NBTTagLong.class, NBTBase.TAG_LONG, NBTTagLong::valueOf, NBTTagLong::getAsLong
+                    Long.class, LongTag.class, Tag.TAG_LONG, LongTag::valueOf, LongTag::getAsLong
             );
         }
         if (Objects.equals(Float.class, type)) {
             return this.createAdapter(
-                    Float.class, NBTTagFloat.class, NBTBase.TAG_FLOAT,
-                    NBTTagFloat::valueOf, NBTTagFloat::getAsFloat
+                    Float.class, FloatTag.class, Tag.TAG_FLOAT,
+                    FloatTag::valueOf, FloatTag::getAsFloat
             );
         }
         if (Objects.equals(Double.class, type)) {
             return this.createAdapter(
-                    Double.class, NBTTagDouble.class, NBTBase.TAG_DOUBLE,
-                    NBTTagDouble::valueOf, NBTTagDouble::getAsDouble
+                    Double.class, DoubleTag.class, Tag.TAG_DOUBLE,
+                    DoubleTag::valueOf, DoubleTag::getAsDouble
             );
         }
         if (Objects.equals(String.class, type)) {
             return this.createAdapter(
-                    String.class, NBTTagString.class, NBTBase.TAG_STRING,
-                    NBTTagString::valueOf, NBTTagString::getAsString
+                    String.class, StringTag.class, Tag.TAG_STRING,
+                    StringTag::valueOf, StringTag::getAsString
             );
         }
 
         // Primitive non-list arrays
         if (Objects.equals(byte[].class, type)) {
             return this.createAdapter(
-                    byte[].class, NBTTagByteArray.class, NBTBase.TAG_BYTE_ARRAY,
-                    array -> new NBTTagByteArray(Arrays.copyOf(array, array.length)),
+                    byte[].class, ByteArrayTag.class, Tag.TAG_BYTE_ARRAY,
+                    array -> new ByteArrayTag(Arrays.copyOf(array, array.length)),
                     n -> Arrays.copyOf(n.getAsByteArray(), n.size())
             );
         }
         if (Objects.equals(int[].class, type)) {
             return this.createAdapter(
-                    int[].class, NBTTagIntArray.class, NBTBase.TAG_INT_ARRAY,
-                    array -> new NBTTagIntArray(Arrays.copyOf(array, array.length)),
+                    int[].class, IntArrayTag.class, Tag.TAG_INT_ARRAY,
+                    array -> new IntArrayTag(Arrays.copyOf(array, array.length)),
                     n -> Arrays.copyOf(n.getAsIntArray(), n.size())
             );
         }
         if (Objects.equals(long[].class, type)) {
             return this.createAdapter(
-                    long[].class, NBTTagLongArray.class, NBTBase.TAG_LONG_ARRAY,
-                    array -> new NBTTagLongArray(Arrays.copyOf(array, array.length)),
+                    long[].class, LongArrayTag.class, Tag.TAG_LONG_ARRAY,
+                    array -> new LongArrayTag(Arrays.copyOf(array, array.length)),
                     n -> Arrays.copyOf(n.getAsLongArray(), n.size())
             );
         }
@@ -204,9 +204,9 @@ public final class CraftPersistentDataTypeRegistry {
         // Previously "emulated" compound lists, now useless as a proper list type exists.
         if (Objects.equals(PersistentDataContainer[].class, type)) {
             return this.createAdapter(
-                    PersistentDataContainer[].class, NBTTagList.class, NBTBase.TAG_LIST,
+                    PersistentDataContainer[].class, ListTag.class, Tag.TAG_LIST,
                     (containerArray) -> {
-                        final NBTTagList list = new NBTTagList();
+                        final ListTag list = new ListTag();
                         for (final PersistentDataContainer persistentDataContainer : containerArray) {
                             list.add(((CraftPersistentDataContainer) persistentDataContainer).toTagCompound());
                         }
@@ -216,7 +216,7 @@ public final class CraftPersistentDataTypeRegistry {
                         final PersistentDataContainer[] containerArray = new CraftPersistentDataContainer[tag.size()];
                         for (int i = 0; i < tag.size(); i++) {
                             final CraftPersistentDataContainer container = new CraftPersistentDataContainer(this);
-                            final NBTTagCompound compound = tag.getCompound(i);
+                            final CompoundTag compound = tag.getCompound(i);
                             for (final String key : compound.getAllKeys()) {
                                 container.put(key, compound.get(key));
                             }
@@ -232,7 +232,7 @@ public final class CraftPersistentDataTypeRegistry {
         // as defined in TagAdapter#build.
         if (Objects.equals(PersistentDataContainer.class, type)) {
             return this.createAdapter(
-                    CraftPersistentDataContainer.class, NBTTagCompound.class, NBTBase.TAG_COMPOUND,
+                    CraftPersistentDataContainer.class, CompoundTag.class, Tag.TAG_COMPOUND,
                     CraftPersistentDataContainer::toTagCompound,
                     tag -> {
                         final CraftPersistentDataContainer container = new CraftPersistentDataContainer(this);
@@ -244,10 +244,10 @@ public final class CraftPersistentDataTypeRegistry {
         }
 
         if (Objects.equals(List.class, type)) {
-            return createAdapter(
+            return this.createAdapter(
                     List.class,
-                    net.minecraft.nbt.NBTTagList.class,
-                    NBTBase.TAG_LIST,
+                    net.minecraft.nbt.ListTag.class,
+                    Tag.TAG_LIST,
                     this::constructList,
                     this::extractList,
                     this::matchesListTag
@@ -258,11 +258,11 @@ public final class CraftPersistentDataTypeRegistry {
     }
 
     // Plain constructor helper method.
-    private <T, Z extends NBTBase> TagAdapter<T, Z> createAdapter(
+    private <T, Z extends Tag> TagAdapter<T, Z> createAdapter(
             final Class<T> primitiveType, final Class<Z> nbtBaseType, final byte nmsTypeByte,
             final Function<T, Z> builder, final Function<Z, T> extractor
     ) {
-        return createAdapter(
+        return this.createAdapter(
                 primitiveType,
                 nbtBaseType,
                 nmsTypeByte,
@@ -273,11 +273,11 @@ public final class CraftPersistentDataTypeRegistry {
     }
 
     // Plain constructor helper method.
-    private <T, Z extends NBTBase> TagAdapter<T, Z> createAdapter(
+    private <T, Z extends Tag> TagAdapter<T, Z> createAdapter(
             final Class<T> primitiveType, final Class<Z> nbtBaseType, final byte nmsTypeByte,
             final BiFunction<PersistentDataType<T, ?>, T, Z> builder,
             final BiFunction<PersistentDataType<T, ?>, Z, T> extractor,
-            final BiPredicate<PersistentDataType<T, ?>, NBTBase> matcher
+            final BiPredicate<PersistentDataType<T, ?>, Tag> matcher
     ) {
         return new TagAdapter<>(primitiveType, nbtBaseType, nmsTypeByte, builder, extractor, matcher);
     }
@@ -292,7 +292,7 @@ public final class CraftPersistentDataTypeRegistry {
      * @throws IllegalArgumentException if no suitable tag type adapter for this
      * type was found.
      */
-    public <T> NBTBase wrap(final PersistentDataType<T, ?> type, final T value) {
+    public <T> Tag wrap(final PersistentDataType<T, ?> type, final T value) {
         return this.getOrCreateAdapter(type).build(type, value);
     }
 
@@ -306,7 +306,7 @@ public final class CraftPersistentDataTypeRegistry {
      * @throws IllegalArgumentException if no suitable tag type adapter for this
      * type was found.
      */
-    public <T> boolean isInstanceOf(final PersistentDataType<T, ?> type, final NBTBase base) {
+    public <T> boolean isInstanceOf(final PersistentDataType<T, ?> type, final Tag base) {
         return this.getOrCreateAdapter(type).isInstance(type, base);
     }
 
@@ -323,8 +323,8 @@ public final class CraftPersistentDataTypeRegistry {
      * persistent data type.
      */
     @NotNull
-    private <T, Z extends NBTBase> TagAdapter<T, Z> getOrCreateAdapter(@NotNull final PersistentDataType<T, ?> type) {
-        return this.adapters.computeIfAbsent(type.getPrimitiveType(), CREATE_ADAPTER);
+    private <T, Z extends Tag> TagAdapter<T, Z> getOrCreateAdapter(@NotNull final PersistentDataType<T, ?> type) {
+        return this.adapters.computeIfAbsent(type.getPrimitiveType(), this.CREATE_ADAPTER);
     }
 
     /**
@@ -342,7 +342,7 @@ public final class CraftPersistentDataTypeRegistry {
      * @throws IllegalArgumentException if no suitable tag type adapter for this
      * type was found.
      */
-    public <T, Z extends NBTBase> T extract(final PersistentDataType<T, ?> type, final NBTBase tag) throws ClassCastException, IllegalArgumentException {
+    public <T, Z extends Tag> T extract(final PersistentDataType<T, ?> type, final Tag tag) throws ClassCastException, IllegalArgumentException {
         final Class<T> primitiveType = type.getPrimitiveType();
         final TagAdapter<T, Z> adapter = this.getOrCreateAdapter(type);
         Preconditions.checkArgument(adapter.isInstance(type, tag), "The found tag instance (%s) cannot store %s", tag.getClass().getSimpleName(), primitiveType.getSimpleName());
@@ -353,30 +353,30 @@ public final class CraftPersistentDataTypeRegistry {
     }
 
     /**
-     * Constructs a {@link NBTTagList} from a {@link List} instance by using the
+     * Constructs a {@link ListTag} from a {@link List} instance by using the
      * passed persistent data type.
      *
      * @param type the persistent data type of the list.
      * @param list the list or primitive values.
      * @param <P> the generic type of the primitive values in the list.
-     * @return the constructed {@link NBTTagList}.
+     * @return the constructed {@link ListTag}.
      */
-    private <P, T extends List<P>> NBTTagList constructList(@NotNull final PersistentDataType<T, ?> type, @NotNull final List<P> list) {
+    private <P, T extends List<P>> ListTag constructList(@NotNull final PersistentDataType<T, ?> type, @NotNull final List<P> list) {
         Preconditions.checkArgument(type instanceof ListPersistentDataType<?, ?>, "The passed list cannot be written to the PDC with a %s (expected a list data type)", type.getClass().getSimpleName());
         final ListPersistentDataType<P, ?> listPersistentDataType = (ListPersistentDataType<P, ?>) type;
 
-        final TagAdapter<P, NBTBase> elementAdapter = this.getOrCreateAdapter(listPersistentDataType.elementType());
+        final TagAdapter<P, Tag> elementAdapter = this.getOrCreateAdapter(listPersistentDataType.elementType());
 
-        final List<NBTBase> values = Lists.newArrayListWithCapacity(list.size());
+        final List<Tag> values = Lists.newArrayListWithCapacity(list.size());
         for (final P primitiveValue : list) {
             values.add(this.wrap(listPersistentDataType.elementType(), primitiveValue));
         }
 
-        return new NBTTagList(values, values.isEmpty() ? NBTTagList.TAG_END : elementAdapter.nmsTypeByte());
+        return new ListTag(values, values.isEmpty() ? ListTag.TAG_END : elementAdapter.nmsTypeByte());
     }
 
     /**
-     * Extracts a {@link List} from a {@link NBTTagList} and a respective
+     * Extracts a {@link List} from a {@link ListTag} and a respective
      * {@link PersistentDataType}.
      *
      * @param type the persistent data type of the list.
@@ -389,12 +389,12 @@ public final class CraftPersistentDataTypeRegistry {
      * extract a {@link List}.
      */
     private <P> List<P> extractList(@NotNull final PersistentDataType<P, ?> type,
-            @NotNull final NBTTagList listTag) {
+            @NotNull final ListTag listTag) {
         Preconditions.checkArgument(type instanceof ListPersistentDataType<?, ?>, "The found list tag cannot be read with a %s (expected a list data type)", type.getClass().getSimpleName());
         final ListPersistentDataType<P, ?> listPersistentDataType = (ListPersistentDataType<P, ?>) type;
 
         final List<P> output = new ObjectArrayList<>(listTag.size());
-        for (final NBTBase tag : listTag) {
+        for (final Tag tag : listTag) {
             output.add(this.extract(listPersistentDataType.elementType(), tag));
         }
 
@@ -402,7 +402,7 @@ public final class CraftPersistentDataTypeRegistry {
     }
 
     /**
-     * Computes if the passed {@link NBTBase} is a {@link NBTTagList} and it,
+     * Computes if the passed {@link Tag} is a {@link ListTag} and it,
      * including its elements, can be read/written via the passed
      * {@link PersistentDataType}.
      * <p>
@@ -416,17 +416,17 @@ public final class CraftPersistentDataTypeRegistry {
      * @param tag the tag that is to be checked if it matches the data type.
      * @return whether the passed tag can be read/written via the passed type.
      */
-    private boolean matchesListTag(final PersistentDataType<List, ?> type, final NBTBase tag) {
+    private boolean matchesListTag(final PersistentDataType<List, ?> type, final Tag tag) {
         if ((!(type instanceof final ListPersistentDataType listPersistentDataType))) {
             return false;
         }
-        if (!(tag instanceof final NBTTagList listTag)) {
+        if (!(tag instanceof final ListTag listTag)) {
             return false;
         }
 
         final byte elementType = listTag.getElementType();
         final TagAdapter elementAdapter = this.getOrCreateAdapter(listPersistentDataType.elementType());
 
-        return elementAdapter.nmsTypeByte() == elementType || elementType == NBTTagList.TAG_END;
+        return elementAdapter.nmsTypeByte() == elementType || elementType == ListTag.TAG_END;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/persistence/DirtyCraftPersistentDataContainer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/persistence/DirtyCraftPersistentDataContainer.java
index fe837dcab7..fc3a34b59b 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/persistence/DirtyCraftPersistentDataContainer.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/persistence/DirtyCraftPersistentDataContainer.java
@@ -1,8 +1,8 @@
 package org.bukkit.craftbukkit.persistence;
 
 import java.util.Map;
-import net.minecraft.nbt.NBTBase;
-import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.nbt.Tag;
 import org.bukkit.NamespacedKey;
 import org.bukkit.persistence.PersistentDataType;
 import org.jetbrains.annotations.NotNull;
@@ -15,7 +15,7 @@ public final class DirtyCraftPersistentDataContainer extends CraftPersistentData
 
     private boolean dirty;
 
-    public DirtyCraftPersistentDataContainer(Map<String, NBTBase> customTags, CraftPersistentDataTypeRegistry registry) {
+    public DirtyCraftPersistentDataContainer(Map<String, Tag> customTags, CraftPersistentDataTypeRegistry registry) {
         super(customTags, registry);
     }
 
@@ -44,19 +44,19 @@ public final class DirtyCraftPersistentDataContainer extends CraftPersistentData
     }
 
     @Override
-    public void put(String key, NBTBase base) {
+    public void put(String key, Tag base) {
         super.put(key, base);
         this.dirty(true);
     }
 
     @Override
-    public void putAll(NBTTagCompound compound) {
+    public void putAll(CompoundTag compound) {
         super.putAll(compound);
         this.dirty(true);
     }
 
     @Override
-    public void putAll(Map<String, NBTBase> map) {
+    public void putAll(Map<String, Tag> map) {
         super.putAll(map);
         this.dirty(true);
     }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java b/paper-server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java
index eb57e49a40..21d4224c89 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectType.java
@@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.potion;
 
 import net.minecraft.core.Holder;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.world.effect.MobEffectList;
+import net.minecraft.world.effect.MobEffect;
 import org.bukkit.Color;
 import org.bukkit.NamespacedKey;
 import org.bukkit.Registry;
@@ -13,43 +13,43 @@ import org.bukkit.potion.PotionEffectType;
 import org.bukkit.potion.PotionEffectTypeCategory;
 import org.jetbrains.annotations.NotNull;
 
-public class CraftPotionEffectType extends PotionEffectType implements Handleable<MobEffectList> {
+public class CraftPotionEffectType extends PotionEffectType implements Handleable<MobEffect> {
 
-    public static PotionEffectType minecraftHolderToBukkit(Holder<MobEffectList> minecraft) {
-        return minecraftToBukkit(minecraft.value());
+    public static PotionEffectType minecraftHolderToBukkit(Holder<MobEffect> minecraft) {
+        return CraftPotionEffectType.minecraftToBukkit(minecraft.value());
     }
 
-    public static PotionEffectType minecraftToBukkit(MobEffectList minecraft) {
+    public static PotionEffectType minecraftToBukkit(MobEffect minecraft) {
         return CraftRegistry.minecraftToBukkit(minecraft, Registries.MOB_EFFECT, Registry.EFFECT);
     }
 
-    public static MobEffectList bukkitToMinecraft(PotionEffectType bukkit) {
+    public static MobEffect bukkitToMinecraft(PotionEffectType bukkit) {
         return CraftRegistry.bukkitToMinecraft(bukkit);
     }
 
-    public static Holder<MobEffectList> bukkitToMinecraftHolder(PotionEffectType bukkit) {
+    public static Holder<MobEffect> bukkitToMinecraftHolder(PotionEffectType bukkit) {
         return CraftRegistry.bukkitToMinecraftHolder(bukkit, Registries.MOB_EFFECT);
     }
 
     private final NamespacedKey key;
-    private final MobEffectList handle;
+    private final MobEffect handle;
     private final int id;
 
-    public CraftPotionEffectType(NamespacedKey key, MobEffectList handle) {
+    public CraftPotionEffectType(NamespacedKey key, MobEffect handle) {
         this.key = key;
         this.handle = handle;
         this.id = CraftRegistry.getMinecraftRegistry(Registries.MOB_EFFECT).getId(handle) + 1;
     }
 
     @Override
-    public MobEffectList getHandle() {
-        return handle;
+    public MobEffect getHandle() {
+        return this.handle;
     }
 
     @NotNull
     @Override
     public NamespacedKey getKey() {
-        return key;
+        return this.key;
     }
 
     @Override
@@ -59,12 +59,12 @@ public class CraftPotionEffectType extends PotionEffectType implements Handleabl
 
     @Override
     public int getId() {
-        return id;
+        return this.id;
     }
 
     @Override
     public String getName() {
-        return switch (getId()) {
+        return switch (this.getId()) {
             case 1 -> "SPEED";
             case 2 -> "SLOW";
             case 3 -> "FAST_DIGGING";
@@ -98,35 +98,35 @@ public class CraftPotionEffectType extends PotionEffectType implements Handleabl
             case 31 -> "BAD_OMEN";
             case 32 -> "HERO_OF_THE_VILLAGE";
             case 33 -> "DARKNESS";
-            default -> getKey().toString();
+            default -> this.getKey().toString();
         };
     }
 
     @NotNull
     @Override
     public PotionEffect createEffect(int duration, int amplifier) {
-        return new PotionEffect(this, isInstant() ? 1 : (int) (duration * getDurationModifier()), amplifier);
+        return new PotionEffect(this, this.isInstant() ? 1 : (int) (duration * this.getDurationModifier()), amplifier);
     }
 
     @Override
     public boolean isInstant() {
-        return handle.isInstantenous();
+        return this.handle.isInstantenous();
     }
 
     @Override
     public PotionEffectTypeCategory getCategory() {
-        return CraftPotionEffectTypeCategory.minecraftToBukkit(handle.getCategory());
+        return CraftPotionEffectTypeCategory.minecraftToBukkit(this.handle.getCategory());
     }
 
     @Override
     public Color getColor() {
-        return Color.fromRGB(handle.getColor());
+        return Color.fromRGB(this.handle.getColor());
     }
 
     @NotNull
     @Override
     public String getTranslationKey() {
-        return handle.getDescriptionId();
+        return this.handle.getDescriptionId();
     }
 
     @Override
@@ -139,16 +139,16 @@ public class CraftPotionEffectType extends PotionEffectType implements Handleabl
             return false;
         }
 
-        return getKey().equals(((PotionEffectType) other).getKey());
+        return this.getKey().equals(((PotionEffectType) other).getKey());
     }
 
     @Override
     public int hashCode() {
-        return getKey().hashCode();
+        return this.getKey().hashCode();
     }
 
     @Override
     public String toString() {
-        return "CraftPotionEffectType[" + getKey() + "]";
+        return "CraftPotionEffectType[" + this.getKey() + "]";
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectTypeCategory.java b/paper-server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectTypeCategory.java
index b5377db7e8..f9df871b99 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectTypeCategory.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionEffectTypeCategory.java
@@ -1,18 +1,18 @@
 package org.bukkit.craftbukkit.potion;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.world.effect.MobEffectInfo;
+import net.minecraft.world.effect.MobEffectCategory;
 import org.bukkit.potion.PotionEffectTypeCategory;
 
 public final class CraftPotionEffectTypeCategory {
 
-    public static PotionEffectTypeCategory minecraftToBukkit(MobEffectInfo minecraft) {
+    public static PotionEffectTypeCategory minecraftToBukkit(MobEffectCategory minecraft) {
         Preconditions.checkArgument(minecraft != null);
         return PotionEffectTypeCategory.valueOf(minecraft.name());
     }
 
-    public static MobEffectInfo bukkitToMinecraft(PotionEffectTypeCategory bukkit) {
+    public static MobEffectCategory bukkitToMinecraft(PotionEffectTypeCategory bukkit) {
         Preconditions.checkArgument(bukkit != null);
-        return MobEffectInfo.valueOf(bukkit.name());
+        return MobEffectCategory.valueOf(bukkit.name());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionType.java b/paper-server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionType.java
index 29621d8eea..82a50b06c0 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionType.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionType.java
@@ -6,9 +6,8 @@ import java.util.List;
 import java.util.Locale;
 import java.util.function.Supplier;
 import net.minecraft.core.Holder;
-import net.minecraft.core.IRegistry;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.world.item.alchemy.PotionRegistry;
+import net.minecraft.world.item.alchemy.Potion;
 import org.bukkit.NamespacedKey;
 import org.bukkit.Registry;
 import org.bukkit.craftbukkit.CraftRegistry;
@@ -21,14 +20,14 @@ import org.bukkit.potion.PotionType;
 
 public class CraftPotionType implements PotionType.InternalPotionData {
 
-    public static PotionType minecraftHolderToBukkit(Holder<PotionRegistry> minecraft) {
-        return minecraftToBukkit(minecraft.value());
+    public static PotionType minecraftHolderToBukkit(Holder<Potion> minecraft) {
+        return CraftPotionType.minecraftToBukkit(minecraft.value());
     }
 
-    public static PotionType minecraftToBukkit(PotionRegistry minecraft) {
+    public static PotionType minecraftToBukkit(Potion minecraft) {
         Preconditions.checkArgument(minecraft != null);
 
-        IRegistry<PotionRegistry> registry = CraftRegistry.getMinecraftRegistry(Registries.POTION);
+        net.minecraft.core.Registry<Potion> registry = CraftRegistry.getMinecraftRegistry(Registries.POTION);
         PotionType bukkit = Registry.POTION.get(CraftNamespacedKey.fromMinecraft(registry.getResourceKey(minecraft).orElseThrow().location()));
 
         Preconditions.checkArgument(bukkit != null);
@@ -36,19 +35,19 @@ public class CraftPotionType implements PotionType.InternalPotionData {
         return bukkit;
     }
 
-    public static PotionRegistry bukkitToMinecraft(PotionType bukkit) {
+    public static Potion bukkitToMinecraft(PotionType bukkit) {
         Preconditions.checkArgument(bukkit != null);
 
         return CraftRegistry.getMinecraftRegistry(Registries.POTION)
                 .getOptional(CraftNamespacedKey.toMinecraft(bukkit.getKey())).orElseThrow();
     }
 
-    public static Holder<PotionRegistry> bukkitToMinecraftHolder(PotionType bukkit) {
+    public static Holder<Potion> bukkitToMinecraftHolder(PotionType bukkit) {
         Preconditions.checkArgument(bukkit != null);
 
-        IRegistry<PotionRegistry> registry = CraftRegistry.getMinecraftRegistry(Registries.POTION);
+        net.minecraft.core.Registry<Potion> registry = CraftRegistry.getMinecraftRegistry(Registries.POTION);
 
-        if (registry.wrapAsHolder(bukkitToMinecraft(bukkit)) instanceof Holder.c<PotionRegistry> holder) {
+        if (registry.wrapAsHolder(CraftPotionType.bukkitToMinecraft(bukkit)) instanceof Holder.Reference<Potion> holder) {
             return holder;
         }
 
@@ -76,48 +75,48 @@ public class CraftPotionType implements PotionType.InternalPotionData {
     }
 
     private final NamespacedKey key;
-    private final PotionRegistry potion;
+    private final Potion potion;
     private final Supplier<List<PotionEffect>> potionEffects;
     private final Supplier<Boolean> upgradeable;
     private final Supplier<Boolean> extendable;
     private final Supplier<Integer> maxLevel;
 
-    public CraftPotionType(NamespacedKey key, PotionRegistry potion) {
+    public CraftPotionType(NamespacedKey key, Potion potion) {
         this.key = key;
         this.potion = potion;
         this.potionEffects = Suppliers.memoize(() -> potion.getEffects().stream().map(CraftPotionUtil::toBukkit).toList());
         this.upgradeable = Suppliers.memoize(() -> Registry.POTION.get(new NamespacedKey(key.getNamespace(), "strong_" + key.getKey())) != null);
         this.extendable = Suppliers.memoize(() -> Registry.POTION.get(new NamespacedKey(key.getNamespace(), "long_" + key.getKey())) != null);
-        this.maxLevel = Suppliers.memoize(() -> isUpgradeable() ? 2 : 1);
+        this.maxLevel = Suppliers.memoize(() -> this.isUpgradeable() ? 2 : 1);
     }
 
     @Override
     public PotionEffectType getEffectType() {
-        return getPotionEffects().isEmpty() ? null : getPotionEffects().get(0).getType();
+        return this.getPotionEffects().isEmpty() ? null : this.getPotionEffects().get(0).getType();
     }
 
     @Override
     public List<PotionEffect> getPotionEffects() {
-        return potionEffects.get();
+        return this.potionEffects.get();
     }
 
     @Override
     public boolean isInstant() {
-        return potion.hasInstantEffects();
+        return this.potion.hasInstantEffects();
     }
 
     @Override
     public boolean isUpgradeable() {
-        return upgradeable.get();
+        return this.upgradeable.get();
     }
 
     @Override
     public boolean isExtendable() {
-        return extendable.get();
+        return this.extendable.get();
     }
 
     @Override
     public int getMaxLevel() {
-        return maxLevel.get();
+        return this.maxLevel.get();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java b/paper-server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java
index 986e7fd65a..b7525f6ddc 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/potion/CraftPotionUtil.java
@@ -5,7 +5,7 @@ import com.google.common.collect.BiMap;
 import com.google.common.collect.ImmutableBiMap;
 import net.minecraft.core.Holder;
 import net.minecraft.world.effect.MobEffect;
-import net.minecraft.world.effect.MobEffectList;
+import net.minecraft.world.effect.MobEffectInstance;
 import org.bukkit.potion.PotionData;
 import org.bukkit.potion.PotionEffect;
 import org.bukkit.potion.PotionEffectType;
@@ -47,9 +47,9 @@ public class CraftPotionUtil {
 
         PotionType type;
         if (data.isUpgraded()) {
-            type = upgradeable.get(data.getType());
+            type = CraftPotionUtil.upgradeable.get(data.getType());
         } else if (data.isExtended()) {
-            type = extendable.get(data.getType());
+            type = CraftPotionUtil.extendable.get(data.getType());
         } else {
             type = data.getType();
         }
@@ -64,11 +64,11 @@ public class CraftPotionUtil {
         }
 
         PotionType potionType;
-        potionType = extendable.inverse().get(type);
+        potionType = CraftPotionUtil.extendable.inverse().get(type);
         if (potionType != null) {
             return new PotionData(potionType, true, false);
         }
-        potionType = upgradeable.inverse().get(type);
+        potionType = CraftPotionUtil.upgradeable.inverse().get(type);
         if (potionType != null) {
             return new PotionData(potionType, false, true);
         }
@@ -76,12 +76,12 @@ public class CraftPotionUtil {
         return new PotionData(type, false, false);
     }
 
-    public static MobEffect fromBukkit(PotionEffect effect) {
-        Holder<MobEffectList> type = CraftPotionEffectType.bukkitToMinecraftHolder(effect.getType());
-        return new MobEffect(type, effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles());
+    public static MobEffectInstance fromBukkit(PotionEffect effect) {
+        Holder<MobEffect> type = CraftPotionEffectType.bukkitToMinecraftHolder(effect.getType());
+        return new MobEffectInstance(type, effect.getDuration(), effect.getAmplifier(), effect.isAmbient(), effect.hasParticles());
     }
 
-    public static PotionEffect toBukkit(MobEffect effect) {
+    public static PotionEffect toBukkit(MobEffectInstance effect) {
         PotionEffectType type = CraftPotionEffectType.minecraftHolderToBukkit(effect.getEffect());
         int amp = effect.getAmplifier();
         int duration = effect.getDuration();
@@ -90,7 +90,7 @@ public class CraftPotionUtil {
         return new PotionEffect(type, duration, amp, ambient, particles);
     }
 
-    public static boolean equals(Holder<MobEffectList> mobEffect, PotionEffectType type) {
+    public static boolean equals(Holder<MobEffect> mobEffect, PotionEffectType type) {
         PotionEffectType typeV = CraftPotionEffectType.minecraftHolderToBukkit(mobEffect);
         return typeV.equals(type);
     }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java b/paper-server/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
index 9c518881e0..e7deba518b 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerProfile.java
@@ -18,7 +18,7 @@ import java.util.concurrent.CompletableFuture;
 import java.util.stream.Collectors;
 import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
-import net.minecraft.SystemUtils;
+import net.minecraft.Util;
 import net.minecraft.server.dedicated.DedicatedServer;
 import net.minecraft.world.item.component.ResolvableProfile;
 import org.apache.commons.lang.StringUtils;
@@ -97,38 +97,38 @@ public final class CraftPlayerProfile implements PlayerProfile {
 
     @Override
     public UUID getUniqueId() {
-        return (Objects.equals(uniqueId, SystemUtils.NIL_UUID)) ? null : uniqueId;
+        return (Objects.equals(this.uniqueId, Util.NIL_UUID)) ? null : this.uniqueId;
     }
 
     @Override
     public String getName() {
-        return (StringUtils.isBlank(name)) ? null : name;
+        return (StringUtils.isBlank(this.name)) ? null : this.name;
     }
 
-    @Nullable
+    public @Nullable
     Property getProperty(String propertyName) {
-        return Iterables.getFirst(properties.get(propertyName), null);
+        return Iterables.getFirst(this.properties.get(propertyName), null);
     }
 
-    void setProperty(String propertyName, @Nullable Property property) {
+    public void setProperty(String propertyName, @Nullable Property property) {
         // Assert: (property == null) || property.getName().equals(propertyName)
-        removeProperty(propertyName);
+        this.removeProperty(propertyName);
         if (property != null) {
-            properties.put(property.name(), property);
+            this.properties.put(property.name(), property);
         }
     }
 
     void removeProperty(String propertyName) {
-        properties.removeAll(propertyName);
+        this.properties.removeAll(propertyName);
     }
 
     void rebuildDirtyProperties() {
-        textures.rebuildPropertyIfDirty();
+        this.textures.rebuildPropertyIfDirty();
     }
 
     @Override
     public CraftPlayerTextures getTextures() {
-        return textures;
+        return this.textures;
     }
 
     @Override
@@ -142,12 +142,12 @@ public final class CraftPlayerProfile implements PlayerProfile {
 
     @Override
     public boolean isComplete() {
-        return (getUniqueId() != null) && (getName() != null) && !textures.isEmpty();
+        return (this.getUniqueId() != null) && (this.getName() != null) && !this.textures.isEmpty();
     }
 
     @Override
     public CompletableFuture<PlayerProfile> update() {
-        return CompletableFuture.supplyAsync(this::getUpdatedProfile, SystemUtils.backgroundExecutor());
+        return CompletableFuture.supplyAsync(this::getUpdatedProfile, Util.backgroundExecutor());
     }
 
     private CraftPlayerProfile getUpdatedProfile() {
@@ -155,12 +155,12 @@ public final class CraftPlayerProfile implements PlayerProfile {
         GameProfile profile = this.buildGameProfile();
 
         // If missing, look up the uuid by name:
-        if (profile.getId().equals(SystemUtils.NIL_UUID)) {
+        if (profile.getId().equals(Util.NIL_UUID)) {
             profile = server.getProfileCache().get(profile.getName()).orElse(profile);
         }
 
         // Look up properties such as the textures:
-        if (!profile.getId().equals(SystemUtils.NIL_UUID)) {
+        if (!profile.getId().equals(Util.NIL_UUID)) {
             ProfileResult newProfile = server.getSessionService().fetchProfile(profile.getId(), true);
             if (newProfile != null) {
                 profile = newProfile.profile();
@@ -174,7 +174,7 @@ public final class CraftPlayerProfile implements PlayerProfile {
     // built ResolvableProfile don't affect the use of this profile in other contexts.
     @Nonnull
     public ResolvableProfile buildResolvableProfile() {
-        rebuildDirtyProperties();
+        this.rebuildDirtyProperties();
         return new ResolvableProfile(Optional.ofNullable(this.name), Optional.ofNullable(this.uniqueId), this.properties);
     }
 
@@ -182,27 +182,27 @@ public final class CraftPlayerProfile implements PlayerProfile {
     // built GameProfiles don't affect the use of this profile in other contexts.
     @Nonnull
     public GameProfile buildGameProfile() {
-        rebuildDirtyProperties();
-        GameProfile profile = new GameProfile(uniqueId, name);
-        profile.getProperties().putAll(properties);
+        this.rebuildDirtyProperties();
+        GameProfile profile = new GameProfile(this.uniqueId, this.name);
+        profile.getProperties().putAll(this.properties);
         return profile;
     }
 
     @Override
     public String toString() {
-        rebuildDirtyProperties();
+        this.rebuildDirtyProperties();
         StringBuilder builder = new StringBuilder();
         builder.append("CraftPlayerProfile [uniqueId=");
-        builder.append(uniqueId);
+        builder.append(this.uniqueId);
         builder.append(", name=");
-        builder.append(name);
+        builder.append(this.name);
         builder.append(", properties=");
-        builder.append(toString(properties));
+        builder.append(CraftPlayerProfile.toString(this.properties));
         builder.append("]");
         return builder.toString();
     }
 
-    private static String toString(@Nonnull PropertyMap propertyMap) {
+    public static String toString(@Nonnull PropertyMap propertyMap) {
         StringBuilder builder = new StringBuilder();
         builder.append("{");
         propertyMap.asMap().forEach((propertyName, properties) -> {
@@ -218,12 +218,12 @@ public final class CraftPlayerProfile implements PlayerProfile {
     public boolean equals(Object obj) {
         if (this == obj) return true;
         if (!(obj instanceof CraftPlayerProfile other)) return false;
-        if (!Objects.equals(uniqueId, other.uniqueId)) return false;
-        if (!Objects.equals(name, other.name)) return false;
+        if (!Objects.equals(this.uniqueId, other.uniqueId)) return false;
+        if (!Objects.equals(this.name, other.name)) return false;
 
-        rebuildDirtyProperties();
+        this.rebuildDirtyProperties();
         other.rebuildDirtyProperties();
-        if (!equals(properties, other.properties)) return false;
+        if (!CraftPlayerProfile.equals(this.properties, other.properties)) return false;
         return true;
     }
 
@@ -246,11 +246,11 @@ public final class CraftPlayerProfile implements PlayerProfile {
 
     @Override
     public int hashCode() {
-        rebuildDirtyProperties();
+        this.rebuildDirtyProperties();
         int result = 1;
-        result = 31 * result + Objects.hashCode(uniqueId);
-        result = 31 * result + Objects.hashCode(name);
-        result = 31 * result + hashCode(properties);
+        result = 31 * result + Objects.hashCode(this.uniqueId);
+        result = 31 * result + Objects.hashCode(this.name);
+        result = 31 * result + CraftPlayerProfile.hashCode(this.properties);
         return result;
     }
 
@@ -274,9 +274,9 @@ public final class CraftPlayerProfile implements PlayerProfile {
             map.put("uniqueId", this.uniqueId.toString());
         }
         if (this.name != null) {
-            map.put("name", getName());
+            map.put("name", this.getName());
         }
-        rebuildDirtyProperties();
+        this.rebuildDirtyProperties();
         if (!this.properties.isEmpty()) {
             List<Object> propertiesData = new ArrayList<>();
             this.properties.forEach((propertyName, property) -> propertiesData.add(CraftProfileProperty.serialize(property)));
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerTextures.java b/paper-server/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerTextures.java
index 76262ad5a9..78e47fec27 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerTextures.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/profile/CraftPlayerTextures.java
@@ -14,7 +14,7 @@ import javax.annotation.Nullable;
 import org.bukkit.craftbukkit.util.JsonHelper;
 import org.bukkit.profile.PlayerTextures;
 
-final class CraftPlayerTextures implements PlayerTextures {
+public final class CraftPlayerTextures implements PlayerTextures {
 
     static final String PROPERTY_NAME = "textures";
     private static final String MINECRAFT_HOST = "textures.minecraft.net";
@@ -24,8 +24,8 @@ final class CraftPlayerTextures implements PlayerTextures {
         // Null represents an unset texture and is therefore valid.
         if (url == null) return;
 
-        Preconditions.checkArgument(url.getHost().equals(MINECRAFT_HOST), "Expected host '%s' but got '%s'", MINECRAFT_HOST, url.getHost());
-        Preconditions.checkArgument(url.getPath().startsWith(MINECRAFT_PATH), "Expected path starting with '%s' but got '%s", MINECRAFT_PATH, url.getPath());
+        Preconditions.checkArgument(url.getHost().equals(CraftPlayerTextures.MINECRAFT_HOST), "Expected host '%s' but got '%s'", CraftPlayerTextures.MINECRAFT_HOST, url.getHost());
+        Preconditions.checkArgument(url.getPath().startsWith(CraftPlayerTextures.MINECRAFT_PATH), "Expected path starting with '%s' but got '%s", CraftPlayerTextures.MINECRAFT_PATH, url.getPath());
     }
 
     @Nullable
@@ -71,37 +71,37 @@ final class CraftPlayerTextures implements PlayerTextures {
         this.profile = profile;
     }
 
-    void copyFrom(@Nonnull PlayerTextures other) {
+    public void copyFrom(@Nonnull PlayerTextures other) {
         if (other == this) return;
         Preconditions.checkArgument(other instanceof CraftPlayerTextures, "Expecting CraftPlayerTextures, got %s", other.getClass().getName());
         CraftPlayerTextures otherTextures = (CraftPlayerTextures) other;
-        clear();
+        this.clear();
         Property texturesProperty = otherTextures.getProperty();
-        profile.setProperty(PROPERTY_NAME, texturesProperty);
+        this.profile.setProperty(CraftPlayerTextures.PROPERTY_NAME, texturesProperty);
         if (texturesProperty != null
-            && (!Objects.equals(profile.getUniqueId(), otherTextures.profile.getUniqueId())
-                || !Objects.equals(profile.getName(), otherTextures.profile.getName()))) {
+            && (!Objects.equals(this.profile.getUniqueId(), otherTextures.profile.getUniqueId())
+                || !Objects.equals(this.profile.getName(), otherTextures.profile.getName()))) {
             // We might need to rebuild the textures property for this profile:
             // TODO Only rebuild if the textures property actually stores an incompatible profileId/playerName?
-            ensureLoaded();
-            markDirty();
-            rebuildPropertyIfDirty();
+            this.ensureLoaded();
+            this.markDirty();
+            this.rebuildPropertyIfDirty();
         }
     }
 
     private void ensureLoaded() {
-        if (loaded) return;
-        loaded = true;
+        if (this.loaded) return;
+        this.loaded = true;
 
-        Property property = getProperty();
+        Property property = this.getProperty();
         if (property == null) return;
 
-        data = CraftProfileProperty.decodePropertyValue(property.value());
-        if (data != null) {
-            JsonObject texturesMap = JsonHelper.getObjectOrNull(data, "textures");
-            loadSkin(texturesMap);
-            loadCape(texturesMap);
-            loadTimestamp();
+        this.data = CraftProfileProperty.decodePropertyValue(property.value());
+        if (this.data != null) {
+            JsonObject texturesMap = JsonHelper.getObjectOrNull(this.data, "textures");
+            this.loadSkin(texturesMap);
+            this.loadCape(texturesMap);
+            this.loadTimestamp();
         }
     }
 
@@ -111,12 +111,12 @@ final class CraftPlayerTextures implements PlayerTextures {
         if (texture == null) return;
 
         String skinUrlString = JsonHelper.getStringOrNull(texture, "url");
-        this.skin = parseUrl(skinUrlString);
-        this.skinModel = loadSkinModel(texture);
+        this.skin = CraftPlayerTextures.parseUrl(skinUrlString);
+        this.skinModel = CraftPlayerTextures.loadSkinModel(texture);
 
         // Special case: If a skin is present, but no skin model, we use the default classic skin model.
-        if (skinModel == null && skin != null) {
-            skinModel = SkinModel.CLASSIC;
+        if (this.skinModel == null && this.skin != null) {
+            this.skinModel = SkinModel.CLASSIC;
         }
     }
 
@@ -127,7 +127,7 @@ final class CraftPlayerTextures implements PlayerTextures {
         if (metadata == null) return null;
 
         String skinModelName = JsonHelper.getStringOrNull(metadata, "model");
-        return parseSkinModel(skinModelName);
+        return CraftPlayerTextures.parseSkinModel(skinModelName);
     }
 
     private void loadCape(@Nullable JsonObject texturesMap) {
@@ -136,12 +136,12 @@ final class CraftPlayerTextures implements PlayerTextures {
         if (texture == null) return;
 
         String skinUrlString = JsonHelper.getStringOrNull(texture, "url");
-        this.cape = parseUrl(skinUrlString);
+        this.cape = CraftPlayerTextures.parseUrl(skinUrlString);
     }
 
     private void loadTimestamp() {
-        if (data == null) return;
-        JsonPrimitive timestamp = JsonHelper.getPrimitiveOrNull(data, "timestamp");
+        if (this.data == null) return;
+        JsonPrimitive timestamp = JsonHelper.getPrimitiveOrNull(this.data, "timestamp");
         if (timestamp == null) return;
 
         try {
@@ -151,100 +151,100 @@ final class CraftPlayerTextures implements PlayerTextures {
     }
 
     private void markDirty() {
-        dirty = true;
+        this.dirty = true;
 
         // Clear any cached but no longer valid data:
-        data = null;
-        timestamp = 0L;
+        this.data = null;
+        this.timestamp = 0L;
     }
 
     @Override
     public boolean isEmpty() {
-        ensureLoaded();
-        return (skin == null) && (cape == null);
+        this.ensureLoaded();
+        return (this.skin == null) && (this.cape == null);
     }
 
     @Override
     public void clear() {
-        profile.removeProperty(PROPERTY_NAME);
-        loaded = false;
-        data = null;
-        timestamp = 0L;
-        skin = null;
-        skinModel = SkinModel.CLASSIC;
-        cape = null;
-        dirty = false;
+        this.profile.removeProperty(CraftPlayerTextures.PROPERTY_NAME);
+        this.loaded = false;
+        this.data = null;
+        this.timestamp = 0L;
+        this.skin = null;
+        this.skinModel = SkinModel.CLASSIC;
+        this.cape = null;
+        this.dirty = false;
     }
 
     @Override
     public URL getSkin() {
-        ensureLoaded();
-        return skin;
+        this.ensureLoaded();
+        return this.skin;
     }
 
     @Override
     public void setSkin(URL skinUrl) {
-        setSkin(skinUrl, SkinModel.CLASSIC);
+        this.setSkin(skinUrl, SkinModel.CLASSIC);
     }
 
     @Override
     public void setSkin(URL skinUrl, SkinModel skinModel) {
-        validateTextureUrl(skinUrl);
+        CraftPlayerTextures.validateTextureUrl(skinUrl);
         if (skinModel == null) skinModel = SkinModel.CLASSIC;
         // This also loads the textures if necessary:
-        if (Objects.equals(getSkin(), skinUrl) && Objects.equals(getSkinModel(), skinModel)) return;
+        if (Objects.equals(this.getSkin(), skinUrl) && Objects.equals(this.getSkinModel(), skinModel)) return;
         this.skin = skinUrl;
         this.skinModel = (skinUrl != null) ? skinModel : SkinModel.CLASSIC;
-        markDirty();
+        this.markDirty();
     }
 
     @Override
     public SkinModel getSkinModel() {
-        ensureLoaded();
-        return skinModel;
+        this.ensureLoaded();
+        return this.skinModel;
     }
 
     @Override
     public URL getCape() {
-        ensureLoaded();
-        return cape;
+        this.ensureLoaded();
+        return this.cape;
     }
 
     @Override
     public void setCape(URL capeUrl) {
-        validateTextureUrl(capeUrl);
+        CraftPlayerTextures.validateTextureUrl(capeUrl);
         // This also loads the textures if necessary:
-        if (Objects.equals(getCape(), capeUrl)) return;
+        if (Objects.equals(this.getCape(), capeUrl)) return;
         this.cape = capeUrl;
-        markDirty();
+        this.markDirty();
     }
 
     @Override
     public long getTimestamp() {
-        ensureLoaded();
-        return timestamp;
+        this.ensureLoaded();
+        return this.timestamp;
     }
 
     @Override
     public boolean isSigned() {
-        if (dirty) return false;
-        Property property = getProperty();
+        if (this.dirty) return false;
+        Property property = this.getProperty();
         return property != null && CraftProfileProperty.hasValidSignature(property);
     }
 
     @Nullable
     Property getProperty() {
-        rebuildPropertyIfDirty();
-        return profile.getProperty(PROPERTY_NAME);
+        this.rebuildPropertyIfDirty();
+        return this.profile.getProperty(CraftPlayerTextures.PROPERTY_NAME);
     }
 
-    void rebuildPropertyIfDirty() {
-        if (!dirty) return;
+    public void rebuildPropertyIfDirty() {
+        if (!this.dirty) return;
         // Assert: loaded
-        dirty = false;
+        this.dirty = false;
 
-        if (isEmpty()) {
-            profile.removeProperty(PROPERTY_NAME);
+        if (this.isEmpty()) {
+            this.profile.removeProperty(CraftPlayerTextures.PROPERTY_NAME);
             return;
         }
 
@@ -256,23 +256,23 @@ final class CraftPlayerTextures implements PlayerTextures {
         // The order of Json object elements is important.
         JsonObject propertyData = new JsonObject();
 
-        if (skin != null) {
+        if (this.skin != null) {
             JsonObject texturesMap = JsonHelper.getOrCreateObject(propertyData, "textures");
             JsonObject skinTexture = JsonHelper.getOrCreateObject(texturesMap, MinecraftProfileTexture.Type.SKIN.name());
-            skinTexture.addProperty("url", skin.toExternalForm());
+            skinTexture.addProperty("url", this.skin.toExternalForm());
 
             // Special case: If the skin model is classic (i.e. default), omit it.
             // Assert: skinModel != null
-            if (skinModel != SkinModel.CLASSIC) {
+            if (this.skinModel != SkinModel.CLASSIC) {
                 JsonObject metadata = JsonHelper.getOrCreateObject(skinTexture, "metadata");
-                metadata.addProperty("model", skinModel.name().toLowerCase(Locale.ROOT));
+                metadata.addProperty("model", this.skinModel.name().toLowerCase(Locale.ROOT));
             }
         }
 
-        if (cape != null) {
+        if (this.cape != null) {
             JsonObject texturesMap = JsonHelper.getOrCreateObject(propertyData, "textures");
             JsonObject skinTexture = JsonHelper.getOrCreateObject(texturesMap, MinecraftProfileTexture.Type.CAPE.name());
-            skinTexture.addProperty("url", cape.toExternalForm());
+            skinTexture.addProperty("url", this.cape.toExternalForm());
         }
 
         this.data = propertyData;
@@ -280,28 +280,28 @@ final class CraftPlayerTextures implements PlayerTextures {
         // We use the compact formatter here since this is more likely to match the output of existing popular tools
         // that also create profiles with custom textures:
         String encodedTexturesData = CraftProfileProperty.encodePropertyValue(propertyData, CraftProfileProperty.JsonFormatter.COMPACT);
-        Property property = new Property(PROPERTY_NAME, encodedTexturesData);
-        profile.setProperty(PROPERTY_NAME, property);
+        Property property = new Property(CraftPlayerTextures.PROPERTY_NAME, encodedTexturesData);
+        this.profile.setProperty(CraftPlayerTextures.PROPERTY_NAME, property);
     }
 
     private JsonObject getData() {
-        ensureLoaded();
-        rebuildPropertyIfDirty();
-        return data;
+        this.ensureLoaded();
+        this.rebuildPropertyIfDirty();
+        return this.data;
     }
 
     @Override
     public String toString() {
         StringBuilder builder = new StringBuilder();
         builder.append("CraftPlayerTextures [data=");
-        builder.append(getData());
+        builder.append(this.getData());
         builder.append("]");
         return builder.toString();
     }
 
     @Override
     public int hashCode() {
-        Property property = getProperty();
+        Property property = this.getProperty();
         return (property == null) ? 0 : CraftProfileProperty.hashCode(property);
     }
 
@@ -310,7 +310,7 @@ final class CraftPlayerTextures implements PlayerTextures {
         if (this == obj) return true;
         if (!(obj instanceof CraftPlayerTextures)) return false;
         CraftPlayerTextures other = (CraftPlayerTextures) obj;
-        Property property = getProperty();
+        Property property = this.getProperty();
         Property otherProperty = other.getProperty();
         return CraftProfileProperty.equals(property, otherProperty);
     }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/profile/CraftProfileProperty.java b/paper-server/src/main/java/org/bukkit/craftbukkit/profile/CraftProfileProperty.java
index 2268abcc85..58661fb7cb 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/profile/CraftProfileProperty.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/profile/CraftProfileProperty.java
@@ -20,7 +20,7 @@ import javax.annotation.Nonnull;
 import javax.annotation.Nullable;
 import org.bukkit.craftbukkit.configuration.ConfigSerializationUtil;
 
-final class CraftProfileProperty {
+public final class CraftProfileProperty {
 
     /**
      * Different JSON formatting styles to use for encoded property values.
@@ -36,7 +36,7 @@ final class CraftProfileProperty {
 
             @Override
             public String format(JsonElement jsonElement) {
-                return gson.toJson(jsonElement);
+                return this.gson.toJson(jsonElement);
             }
         };
 
@@ -54,7 +54,7 @@ final class CraftProfileProperty {
     }
 
     public static boolean hasValidSignature(@Nonnull Property property) {
-        return property.hasSignature() && PUBLIC_KEYS.keys(ServicesKeyType.PROFILE_PROPERTY).stream().anyMatch((key) -> key.validateProperty(property));
+        return property.hasSignature() && CraftProfileProperty.PUBLIC_KEYS.keys(ServicesKeyType.PROFILE_PROPERTY).stream().anyMatch((key) -> key.validateProperty(property));
     }
 
     @Nullable
@@ -68,7 +68,7 @@ final class CraftProfileProperty {
 
     @Nullable
     public static JsonObject decodePropertyValue(@Nonnull String encodedPropertyValue) {
-        String json = decodeBase64(encodedPropertyValue);
+        String json = CraftProfileProperty.decodeBase64(encodedPropertyValue);
         if (json == null) return null;
         try {
             JsonElement jsonElement = JsonParser.parseString(json);
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java b/paper-server/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java
index aedca773c1..642f5bf756 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/projectiles/CraftBlockProjectileSource.java
@@ -1,22 +1,20 @@
 package org.bukkit.craftbukkit.projectiles;
 
 import com.google.common.base.Preconditions;
-import net.minecraft.core.EnumDirection;
-import net.minecraft.core.IPosition;
-import net.minecraft.core.dispenser.SourceBlock;
-import net.minecraft.server.level.WorldServer;
+import net.minecraft.core.Direction;
+import net.minecraft.core.Position;
+import net.minecraft.core.dispenser.BlockSource;
+import net.minecraft.server.level.ServerLevel;
 import net.minecraft.util.RandomSource;
 import net.minecraft.world.entity.EntitySpawnReason;
-import net.minecraft.world.entity.EntityTypes;
-import net.minecraft.world.entity.projectile.EntityArrow;
-import net.minecraft.world.entity.projectile.EntityFireball;
-import net.minecraft.world.entity.projectile.IProjectile;
+import net.minecraft.world.entity.EntityType;
+import net.minecraft.world.entity.projectile.AbstractHurtingProjectile;
 import net.minecraft.world.item.ItemStack;
 import net.minecraft.world.item.Items;
 import net.minecraft.world.item.ProjectileItem;
-import net.minecraft.world.level.block.BlockDispenser;
-import net.minecraft.world.level.block.entity.TileEntityDispenser;
-import net.minecraft.world.phys.Vec3D;
+import net.minecraft.world.level.block.DispenserBlock;
+import net.minecraft.world.level.block.entity.DispenserBlockEntity;
+import net.minecraft.world.phys.Vec3;
 import org.bukkit.Material;
 import org.bukkit.block.Block;
 import org.bukkit.entity.AbstractArrow;
@@ -40,30 +38,30 @@ import org.bukkit.projectiles.BlockProjectileSource;
 import org.bukkit.util.Vector;
 
 public class CraftBlockProjectileSource implements BlockProjectileSource {
-    private final TileEntityDispenser dispenserBlock;
+    private final DispenserBlockEntity dispenserBlock;
 
-    public CraftBlockProjectileSource(TileEntityDispenser dispenserBlock) {
+    public CraftBlockProjectileSource(DispenserBlockEntity dispenserBlock) {
         this.dispenserBlock = dispenserBlock;
     }
 
     @Override
     public Block getBlock() {
-        return dispenserBlock.getLevel().getWorld().getBlockAt(dispenserBlock.getBlockPos().getX(), dispenserBlock.getBlockPos().getY(), dispenserBlock.getBlockPos().getZ());
+        return this.dispenserBlock.getLevel().getWorld().getBlockAt(this.dispenserBlock.getBlockPos().getX(), this.dispenserBlock.getBlockPos().getY(), this.dispenserBlock.getBlockPos().getZ());
     }
 
     @Override
     public <T extends Projectile> T launchProjectile(Class<? extends T> projectile) {
-        return launchProjectile(projectile, null);
+        return this.launchProjectile(projectile, null);
     }
 
     @Override
     public <T extends Projectile> T launchProjectile(Class<? extends T> projectile, Vector velocity) {
-        Preconditions.checkArgument(getBlock().getType() == Material.DISPENSER, "Block is no longer dispenser");
+        Preconditions.checkArgument(this.getBlock().getType() == Material.DISPENSER, "Block is no longer dispenser");
         // Copied from BlockDispenser.dispense()
-        SourceBlock sourceblock = new SourceBlock((WorldServer) dispenserBlock.getLevel(), dispenserBlock.getBlockPos(), dispenserBlock.getBlockState(), dispenserBlock);
+        BlockSource sourceblock = new BlockSource((ServerLevel) this.dispenserBlock.getLevel(), this.dispenserBlock.getBlockPos(), this.dispenserBlock.getBlockState(), this.dispenserBlock);
         // Copied from DispenseBehaviorProjectile
-        EnumDirection enumdirection = (EnumDirection) sourceblock.state().getValue(BlockDispenser.FACING);
-        net.minecraft.world.level.World world = dispenserBlock.getLevel();
+        Direction enumdirection = (Direction) sourceblock.state().getValue(DispenserBlock.FACING);
+        net.minecraft.world.level.Level world = this.dispenserBlock.getLevel();
         net.minecraft.world.item.Item item = null;
 
         if (Snowball.class.isAssignableFrom(projectile)) {
@@ -102,21 +100,21 @@ public class CraftBlockProjectileSource implements BlockProjectileSource {
 
         ItemStack itemstack = new ItemStack(item);
         ProjectileItem projectileItem = (ProjectileItem) item;
-        ProjectileItem.a dispenseConfig = projectileItem.createDispenseConfig();
+        ProjectileItem.DispenseConfig dispenseConfig = projectileItem.createDispenseConfig();
 
-        IPosition iposition = dispenseConfig.positionFunction().getDispensePosition(sourceblock, enumdirection);
-        IProjectile launch = projectileItem.asProjectile(world, iposition, itemstack, enumdirection);
+        Position iposition = dispenseConfig.positionFunction().getDispensePosition(sourceblock, enumdirection);
+        net.minecraft.world.entity.projectile.Projectile launch = projectileItem.asProjectile(world, iposition, itemstack, enumdirection);
 
         if (Fireball.class.isAssignableFrom(projectile)) {
-            EntityFireball customFireball = null;
+            AbstractHurtingProjectile customFireball = null;
             if (WitherSkull.class.isAssignableFrom(projectile)) {
-                launch = customFireball = EntityTypes.WITHER_SKULL.create(world, EntitySpawnReason.TRIGGERED);
+                launch = customFireball = EntityType.WITHER_SKULL.create(world, EntitySpawnReason.TRIGGERED);
             } else if (DragonFireball.class.isAssignableFrom(projectile)) {
-                launch = EntityTypes.DRAGON_FIREBALL.create(world, EntitySpawnReason.TRIGGERED);
+                launch = EntityType.DRAGON_FIREBALL.create(world, EntitySpawnReason.TRIGGERED);
             } else if (BreezeWindCharge.class.isAssignableFrom(projectile)) {
-                launch = customFireball = EntityTypes.BREEZE_WIND_CHARGE.create(world, EntitySpawnReason.TRIGGERED);
+                launch = customFireball = EntityType.BREEZE_WIND_CHARGE.create(world, EntitySpawnReason.TRIGGERED);
             } else if (LargeFireball.class.isAssignableFrom(projectile)) {
-                launch = customFireball = EntityTypes.FIREBALL.create(world, EntitySpawnReason.TRIGGERED);
+                launch = customFireball = EntityType.FIREBALL.create(world, EntitySpawnReason.TRIGGERED);
             }
 
             if (customFireball != null) {
@@ -127,13 +125,13 @@ public class CraftBlockProjectileSource implements BlockProjectileSource {
                 double d0 = randomsource.triangle((double) enumdirection.getStepX(), 0.11485000000000001D);
                 double d1 = randomsource.triangle((double) enumdirection.getStepY(), 0.11485000000000001D);
                 double d2 = randomsource.triangle((double) enumdirection.getStepZ(), 0.11485000000000001D);
-                Vec3D vec3d = new Vec3D(d0, d1, d2);
+                Vec3 vec3d = new Vec3(d0, d1, d2);
                 customFireball.assignDirectionalMovement(vec3d, 0.1D);
             }
         }
 
-        if (launch instanceof EntityArrow arrow) {
-            arrow.pickup = EntityArrow.PickupStatus.ALLOWED;
+        if (launch instanceof net.minecraft.world.entity.projectile.AbstractArrow arrow) {
+            arrow.pickup = net.minecraft.world.entity.projectile.AbstractArrow.Pickup.ALLOWED;
         }
         launch.projectileSource = this;
         projectileItem.shoot(launch, (double) enumdirection.getStepX(), (double) enumdirection.getStepY(), (double) enumdirection.getStepZ(), dispenseConfig.power(), dispenseConfig.uncertainty());
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncTask.java b/paper-server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncTask.java
index fd32d1450a..365b7e7c66 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncTask.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftAsyncTask.java
@@ -25,13 +25,13 @@ class CraftAsyncTask extends CraftTask {
     @Override
     public void run() {
         final Thread thread = Thread.currentThread();
-        synchronized (workers) {
-            if (getPeriod() == CraftTask.CANCEL) {
+        synchronized (this.workers) {
+            if (this.getPeriod() == CraftTask.CANCEL) {
                 // Never continue running after cancelled.
                 // Checking this with the lock is important!
                 return;
             }
-            workers.add(
+            this.workers.add(
                 new BukkitWorker() {
                     @Override
                     public Thread getThread() {
@@ -54,16 +54,16 @@ class CraftAsyncTask extends CraftTask {
             super.run();
         } catch (final Throwable t) {
             thrown = t;
-            getOwner().getLogger().log(
+            this.getOwner().getLogger().log(
                     Level.WARNING,
                     String.format(
                         "Plugin %s generated an exception while executing task %s",
-                        getOwner().getDescription().getFullName(),
-                        getTaskId()),
+                        this.getOwner().getDescription().getFullName(),
+                        this.getTaskId()),
                     thrown);
         } finally {
             // Cleanup is important for any async task, otherwise ghost tasks are everywhere
-            synchronized (workers) {
+            synchronized (this.workers) {
                 try {
                     final Iterator<BukkitWorker> workers = this.workers.iterator();
                     boolean removed = false;
@@ -79,15 +79,15 @@ class CraftAsyncTask extends CraftTask {
                                 String.format(
                                     "Unable to remove worker %s on task %s for %s",
                                     thread.getName(),
-                                    getTaskId(),
-                                    getOwner().getDescription().getFullName()),
+                                    this.getTaskId(),
+                                    this.getOwner().getDescription().getFullName()),
                                 thrown); // We don't want to lose the original exception, if any
                     }
                 } finally {
-                    if (getPeriod() < 0 && workers.isEmpty()) {
+                    if (this.getPeriod() < 0 && this.workers.isEmpty()) {
                         // At this spot, we know we are the final async task being executed!
                         // Because we have the lock, nothing else is running or will run because delay < 0
-                        runners.remove(getTaskId());
+                        this.runners.remove(this.getTaskId());
                     }
                 }
             }
@@ -95,16 +95,16 @@ class CraftAsyncTask extends CraftTask {
     }
 
     LinkedList<BukkitWorker> getWorkers() {
-        return workers;
+        return this.workers;
     }
 
     @Override
     boolean cancel0() {
-        synchronized (workers) {
+        synchronized (this.workers) {
             // Synchronizing here prevents race condition for a completing task
-            setPeriod(CraftTask.CANCEL);
-            if (workers.isEmpty()) {
-                runners.remove(getTaskId());
+            this.setPeriod(CraftTask.CANCEL);
+            if (this.workers.isEmpty()) {
+                this.runners.remove(this.getTaskId());
             }
         }
         return true;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftFuture.java b/paper-server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftFuture.java
index 1e20385fd6..c587adad59 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftFuture.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftFuture.java
@@ -21,10 +21,10 @@ class CraftFuture<T> extends CraftTask implements Future<T> {
 
     @Override
     public synchronized boolean cancel(final boolean mayInterruptIfRunning) {
-        if (getPeriod() != CraftTask.NO_REPEATING) {
+        if (this.getPeriod() != CraftTask.NO_REPEATING) {
             return false;
         }
-        setPeriod(CraftTask.CANCEL);
+        this.setPeriod(CraftTask.CANCEL);
         return true;
     }
 
@@ -37,7 +37,7 @@ class CraftFuture<T> extends CraftTask implements Future<T> {
     @Override
     public T get() throws CancellationException, InterruptedException, ExecutionException {
         try {
-            return get(0, TimeUnit.MILLISECONDS);
+            return this.get(0, TimeUnit.MILLISECONDS);
         } catch (final TimeoutException e) {
             throw new Error(e);
         }
@@ -67,10 +67,10 @@ class CraftFuture<T> extends CraftTask implements Future<T> {
                 throw new CancellationException();
             }
             if (period == CraftTask.DONE_FOR_FUTURE) {
-                if (exception == null) {
-                    return value;
+                if (this.exception == null) {
+                    return this.value;
                 }
-                throw new ExecutionException(exception);
+                throw new ExecutionException(this.exception);
             }
             throw new IllegalStateException("Expected " + CraftTask.NO_REPEATING + " to " + CraftTask.DONE_FOR_FUTURE + ", got " + period);
         }
@@ -79,18 +79,18 @@ class CraftFuture<T> extends CraftTask implements Future<T> {
     @Override
     public void run() {
         synchronized (this) {
-            if (getPeriod() == CraftTask.CANCEL) {
+            if (this.getPeriod() == CraftTask.CANCEL) {
                 return;
             }
-            setPeriod(CraftTask.PROCESS_FOR_FUTURE);
+            this.setPeriod(CraftTask.PROCESS_FOR_FUTURE);
         }
         try {
-            value = callable.call();
+            this.value = this.callable.call();
         } catch (final Exception e) {
-            exception = e;
+            this.exception = e;
         } finally {
             synchronized (this) {
-                setPeriod(CraftTask.DONE_FOR_FUTURE);
+                this.setPeriod(CraftTask.DONE_FOR_FUTURE);
                 this.notifyAll();
             }
         }
@@ -98,11 +98,11 @@ class CraftFuture<T> extends CraftTask implements Future<T> {
 
     @Override
     synchronized boolean cancel0() {
-        if (getPeriod() != CraftTask.NO_REPEATING) {
+        if (this.getPeriod() != CraftTask.NO_REPEATING) {
             return false;
         }
-        setPeriod(CraftTask.CANCEL);
-        notifyAll();
+        this.setPeriod(CraftTask.CANCEL);
+        this.notifyAll();
         return true;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java b/paper-server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
index 83c8e0715f..9848d420e8 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftScheduler.java
@@ -54,14 +54,14 @@ public class CraftScheduler implements BukkitScheduler {
     private static final IntUnaryOperator INCREMENT_IDS = previous -> {
         // We reached the end, go back to the start!
         if (previous == Integer.MAX_VALUE) {
-            return START_ID;
+            return CraftScheduler.START_ID;
         }
         return previous + 1;
     };
     /**
      * Counter for IDs. Order doesn't matter, only uniqueness.
      */
-    private final AtomicInteger ids = new AtomicInteger(START_ID);
+    private final AtomicInteger ids = new AtomicInteger(CraftScheduler.START_ID);
     /**
      * Current head of linked-list. This reference is always stale, {@link CraftTask#next} is the live reference.
      */
@@ -69,7 +69,7 @@ public class CraftScheduler implements BukkitScheduler {
     /**
      * Tail of a linked-list. AtomicReference only matters when adding to queue
      */
-    private final AtomicReference<CraftTask> tail = new AtomicReference<CraftTask>(head);
+    private final AtomicReference<CraftTask> tail = new AtomicReference<CraftTask>(this.head);
     /**
      * Main thread logic only
      */
@@ -103,7 +103,7 @@ public class CraftScheduler implements BukkitScheduler {
             return string;
         }
     };
-    private CraftAsyncDebugger debugTail = debugHead;
+    private CraftAsyncDebugger debugTail = this.debugHead;
     private static final int RECENT_TICKS;
 
     static {
@@ -117,12 +117,12 @@ public class CraftScheduler implements BukkitScheduler {
 
     @Override
     public BukkitTask runTask(Plugin plugin, Runnable runnable) {
-        return runTaskLater(plugin, runnable, 0L);
+        return this.runTaskLater(plugin, runnable, 0L);
     }
 
     @Override
     public void runTask(Plugin plugin, Consumer<? super BukkitTask> task) throws IllegalArgumentException {
-        runTaskLater(plugin, task, 0L);
+        this.runTaskLater(plugin, task, 0L);
     }
 
     @Deprecated
@@ -133,12 +133,12 @@ public class CraftScheduler implements BukkitScheduler {
 
     @Override
     public BukkitTask runTaskAsynchronously(Plugin plugin, Runnable runnable) {
-        return runTaskLaterAsynchronously(plugin, runnable, 0L);
+        return this.runTaskLaterAsynchronously(plugin, runnable, 0L);
     }
 
     @Override
     public void runTaskAsynchronously(Plugin plugin, Consumer<? super BukkitTask> task) throws IllegalArgumentException {
-        runTaskLaterAsynchronously(plugin, task, 0L);
+        this.runTaskLaterAsynchronously(plugin, task, 0L);
     }
 
     @Override
@@ -148,12 +148,12 @@ public class CraftScheduler implements BukkitScheduler {
 
     @Override
     public BukkitTask runTaskLater(Plugin plugin, Runnable runnable, long delay) {
-        return runTaskTimer(plugin, runnable, delay, CraftTask.NO_REPEATING);
+        return this.runTaskTimer(plugin, runnable, delay, CraftTask.NO_REPEATING);
     }
 
     @Override
     public void runTaskLater(Plugin plugin, Consumer<? super BukkitTask> task, long delay) throws IllegalArgumentException {
-        runTaskTimer(plugin, task, delay, CraftTask.NO_REPEATING);
+        this.runTaskTimer(plugin, task, delay, CraftTask.NO_REPEATING);
     }
 
     @Deprecated
@@ -164,36 +164,36 @@ public class CraftScheduler implements BukkitScheduler {
 
     @Override
     public BukkitTask runTaskLaterAsynchronously(Plugin plugin, Runnable runnable, long delay) {
-        return runTaskTimerAsynchronously(plugin, runnable, delay, CraftTask.NO_REPEATING);
+        return this.runTaskTimerAsynchronously(plugin, runnable, delay, CraftTask.NO_REPEATING);
     }
 
     @Override
     public void runTaskLaterAsynchronously(Plugin plugin, Consumer<? super BukkitTask> task, long delay) throws IllegalArgumentException {
-        runTaskTimerAsynchronously(plugin, task, delay, CraftTask.NO_REPEATING);
+        this.runTaskTimerAsynchronously(plugin, task, delay, CraftTask.NO_REPEATING);
     }
 
     @Override
     public void runTaskTimerAsynchronously(Plugin plugin, Consumer<? super BukkitTask> task, long delay, long period) throws IllegalArgumentException {
-        runTaskTimerAsynchronously(plugin, (Object) task, delay, CraftTask.NO_REPEATING);
+        this.runTaskTimerAsynchronously(plugin, (Object) task, delay, CraftTask.NO_REPEATING);
     }
 
     @Override
     public int scheduleSyncRepeatingTask(final Plugin plugin, final Runnable runnable, long delay, long period) {
-        return runTaskTimer(plugin, runnable, delay, period).getTaskId();
+        return this.runTaskTimer(plugin, runnable, delay, period).getTaskId();
     }
 
     @Override
     public BukkitTask runTaskTimer(Plugin plugin, Runnable runnable, long delay, long period) {
-        return runTaskTimer(plugin, (Object) runnable, delay, period);
+        return this.runTaskTimer(plugin, (Object) runnable, delay, period);
     }
 
     @Override
     public void runTaskTimer(Plugin plugin, Consumer<? super BukkitTask> task, long delay, long period) throws IllegalArgumentException {
-        runTaskTimer(plugin, (Object) task, delay, period);
+        this.runTaskTimer(plugin, (Object) task, delay, period);
     }
 
     public BukkitTask runTaskTimer(Plugin plugin, Object runnable, long delay, long period) {
-        validate(plugin, runnable);
+        CraftScheduler.validate(plugin, runnable);
         if (delay < 0L) {
             delay = 0;
         }
@@ -202,22 +202,22 @@ public class CraftScheduler implements BukkitScheduler {
         } else if (period < CraftTask.NO_REPEATING) {
             period = CraftTask.NO_REPEATING;
         }
-        return handle(new CraftTask(plugin, runnable, nextId(), period), delay);
+        return this.handle(new CraftTask(plugin, runnable, this.nextId(), period), delay);
     }
 
     @Deprecated
     @Override
     public int scheduleAsyncRepeatingTask(final Plugin plugin, final Runnable runnable, long delay, long period) {
-        return runTaskTimerAsynchronously(plugin, runnable, delay, period).getTaskId();
+        return this.runTaskTimerAsynchronously(plugin, runnable, delay, period).getTaskId();
     }
 
     @Override
     public BukkitTask runTaskTimerAsynchronously(Plugin plugin, Runnable runnable, long delay, long period) {
-        return runTaskTimerAsynchronously(plugin, (Object) runnable, delay, period);
+        return this.runTaskTimerAsynchronously(plugin, (Object) runnable, delay, period);
     }
 
     public BukkitTask runTaskTimerAsynchronously(Plugin plugin, Object runnable, long delay, long period) {
-        validate(plugin, runnable);
+        CraftScheduler.validate(plugin, runnable);
         if (delay < 0L) {
             delay = 0;
         }
@@ -226,14 +226,14 @@ public class CraftScheduler implements BukkitScheduler {
         } else if (period < CraftTask.NO_REPEATING) {
             period = CraftTask.NO_REPEATING;
         }
-        return handle(new CraftAsyncTask(runners, plugin, runnable, nextId(), period), delay);
+        return this.handle(new CraftAsyncTask(this.runners, plugin, runnable, this.nextId(), period), delay);
     }
 
     @Override
     public <T> Future<T> callSyncMethod(final Plugin plugin, final Callable<T> task) {
-        validate(plugin, task);
-        final CraftFuture<T> future = new CraftFuture<T>(task, plugin, nextId());
-        handle(future, 0L);
+        CraftScheduler.validate(plugin, task);
+        final CraftFuture<T> future = new CraftFuture<T>(task, plugin, this.nextId());
+        this.handle(future, 0L);
         return future;
     }
 
@@ -242,7 +242,7 @@ public class CraftScheduler implements BukkitScheduler {
         if (taskId <= 0) {
             return;
         }
-        CraftTask task = runners.get(taskId);
+        CraftTask task = this.runners.get(taskId);
         if (task != null) {
             task.cancel0();
         }
@@ -250,8 +250,8 @@ public class CraftScheduler implements BukkitScheduler {
                 new Runnable() {
                     @Override
                     public void run() {
-                        if (!check(CraftScheduler.this.temp)) {
-                            check(CraftScheduler.this.pending);
+                        if (!this.check(CraftScheduler.this.temp)) {
+                            this.check(CraftScheduler.this.pending);
                         }
                     }
                     private boolean check(final Iterable<CraftTask> collection) {
@@ -262,7 +262,7 @@ public class CraftScheduler implements BukkitScheduler {
                                 task.cancel0();
                                 tasks.remove();
                                 if (task.isSync()) {
-                                    runners.remove(taskId);
+                                    CraftScheduler.this.runners.remove(taskId);
                                 }
                                 return true;
                             }
@@ -270,8 +270,8 @@ public class CraftScheduler implements BukkitScheduler {
                         return false;
                     }
                 });
-        handle(task, 0L);
-        for (CraftTask taskPending = head.getNext(); taskPending != null; taskPending = taskPending.getNext()) {
+        this.handle(task, 0L);
+        for (CraftTask taskPending = this.head.getNext(); taskPending != null; taskPending = taskPending.getNext()) {
             if (taskPending == task) {
                 return;
             }
@@ -288,8 +288,8 @@ public class CraftScheduler implements BukkitScheduler {
                 new Runnable() {
                     @Override
                     public void run() {
-                        check(CraftScheduler.this.pending);
-                        check(CraftScheduler.this.temp);
+                        this.check(CraftScheduler.this.pending);
+                        this.check(CraftScheduler.this.temp);
                     }
                     void check(final Iterable<CraftTask> collection) {
                         final Iterator<CraftTask> tasks = collection.iterator();
@@ -299,14 +299,14 @@ public class CraftScheduler implements BukkitScheduler {
                                 task.cancel0();
                                 tasks.remove();
                                 if (task.isSync()) {
-                                    runners.remove(task.getTaskId());
+                                    CraftScheduler.this.runners.remove(task.getTaskId());
                                 }
                             }
                         }
                     }
                 });
-        handle(task, 0L);
-        for (CraftTask taskPending = head.getNext(); taskPending != null; taskPending = taskPending.getNext()) {
+        this.handle(task, 0L);
+        for (CraftTask taskPending = this.head.getNext(); taskPending != null; taskPending = taskPending.getNext()) {
             if (taskPending == task) {
                 break;
             }
@@ -314,7 +314,7 @@ public class CraftScheduler implements BukkitScheduler {
                 taskPending.cancel0();
             }
         }
-        for (CraftTask runner : runners.values()) {
+        for (CraftTask runner : this.runners.values()) {
             if (runner.getOwner().equals(plugin)) {
                 runner.cancel0();
             }
@@ -323,12 +323,12 @@ public class CraftScheduler implements BukkitScheduler {
 
     @Override
     public boolean isCurrentlyRunning(final int taskId) {
-        final CraftTask task = runners.get(taskId);
+        final CraftTask task = this.runners.get(taskId);
         if (task == null) {
             return false;
         }
         if (task.isSync()) {
-            return (task == currentTask);
+            return (task == this.currentTask);
         }
         final CraftAsyncTask asyncTask = (CraftAsyncTask) task;
         synchronized (asyncTask.getWorkers()) {
@@ -341,19 +341,19 @@ public class CraftScheduler implements BukkitScheduler {
         if (taskId <= 0) {
             return false;
         }
-        for (CraftTask task = head.getNext(); task != null; task = task.getNext()) {
+        for (CraftTask task = this.head.getNext(); task != null; task = task.getNext()) {
             if (task.getTaskId() == taskId) {
                 return task.getPeriod() >= CraftTask.NO_REPEATING; // The task will run
             }
         }
-        CraftTask task = runners.get(taskId);
+        CraftTask task = this.runners.get(taskId);
         return task != null && task.getPeriod() >= CraftTask.NO_REPEATING;
     }
 
     @Override
     public List<BukkitWorker> getActiveWorkers() {
         final ArrayList<BukkitWorker> workers = new ArrayList<BukkitWorker>();
-        for (final CraftTask taskObj : runners.values()) {
+        for (final CraftTask taskObj : this.runners.values()) {
             // Iterator will be a best-effort (may fail to grab very new values) if called from an async thread
             if (taskObj.isSync()) {
                 continue;
@@ -370,7 +370,7 @@ public class CraftScheduler implements BukkitScheduler {
     @Override
     public List<BukkitTask> getPendingTasks() {
         final ArrayList<CraftTask> truePending = new ArrayList<CraftTask>();
-        for (CraftTask task = head.getNext(); task != null; task = task.getNext()) {
+        for (CraftTask task = this.head.getNext(); task != null; task = task.getNext()) {
             if (task.getTaskId() != -1) {
                 // -1 is special code
                 truePending.add(task);
@@ -378,7 +378,7 @@ public class CraftScheduler implements BukkitScheduler {
         }
 
         final ArrayList<BukkitTask> pending = new ArrayList<BukkitTask>();
-        for (CraftTask task : runners.values()) {
+        for (CraftTask task : this.runners.values()) {
             if (task.getPeriod() >= CraftTask.NO_REPEATING) {
                 pending.add(task);
             }
@@ -398,18 +398,18 @@ public class CraftScheduler implements BukkitScheduler {
     public void mainThreadHeartbeat() {
         this.currentTick++;
         final List<CraftTask> temp = this.temp;
-        parsePending();
-        while (isReady(currentTick)) {
-            final CraftTask task = pending.remove();
+        this.parsePending();
+        while (this.isReady(this.currentTick)) {
+            final CraftTask task = this.pending.remove();
             if (task.getPeriod() < CraftTask.NO_REPEATING) {
                 if (task.isSync()) {
-                    runners.remove(task.getTaskId(), task);
+                    this.runners.remove(task.getTaskId(), task);
                 }
-                parsePending();
+                this.parsePending();
                 continue;
             }
             if (task.isSync()) {
-                currentTask = task;
+                this.currentTask = task;
                 try {
                     task.run();
                 } catch (final Throwable throwable) {
@@ -421,26 +421,26 @@ public class CraftScheduler implements BukkitScheduler {
                                 task.getOwner().getDescription().getFullName()),
                             throwable);
                 } finally {
-                    currentTask = null;
+                    this.currentTask = null;
                 }
-                parsePending();
+                this.parsePending();
             } else {
-                debugTail = debugTail.setNext(new CraftAsyncDebugger(currentTick + RECENT_TICKS, task.getOwner(), task.getTaskClass()));
-                executor.execute(task);
+                this.debugTail = this.debugTail.setNext(new CraftAsyncDebugger(this.currentTick + CraftScheduler.RECENT_TICKS, task.getOwner(), task.getTaskClass()));
+                this.executor.execute(task);
                 // We don't need to parse pending
                 // (async tasks must live with race-conditions if they attempt to cancel between these few lines of code)
             }
             final long period = task.getPeriod(); // State consistency
             if (period > 0) {
-                task.setNextRun(currentTick + period);
+                task.setNextRun(this.currentTick + period);
                 temp.add(task);
             } else if (task.isSync()) {
-                runners.remove(task.getTaskId());
+                this.runners.remove(task.getTaskId());
             }
         }
-        pending.addAll(temp);
+        this.pending.addAll(temp);
         temp.clear();
-        debugHead = debugHead.getNextHead(currentTick);
+        this.debugHead = this.debugHead.getNextHead(this.currentTick);
     }
 
     private void addTask(final CraftTask task) {
@@ -449,8 +449,8 @@ public class CraftScheduler implements BukkitScheduler {
     }
 
     private CraftTask handle(final CraftTask task, final long delay) {
-        task.setNextRun(currentTick + delay);
-        addTask(task);
+        task.setNextRun(this.currentTick + delay);
+        this.addTask(task);
         return task;
     }
 
@@ -463,11 +463,11 @@ public class CraftScheduler implements BukkitScheduler {
     }
 
     private int nextId() {
-        Preconditions.checkArgument(runners.size() < Integer.MAX_VALUE, "There are already %s tasks scheduled! Cannot schedule more", Integer.MAX_VALUE);
+        Preconditions.checkArgument(this.runners.size() < Integer.MAX_VALUE, "There are already %s tasks scheduled! Cannot schedule more", Integer.MAX_VALUE);
         int id;
         do {
-            id = ids.updateAndGet(INCREMENT_IDS);
-        } while (runners.containsKey(id)); // Avoid generating duplicate IDs
+            id = this.ids.updateAndGet(CraftScheduler.INCREMENT_IDS);
+        } while (this.runners.containsKey(id)); // Avoid generating duplicate IDs
         return id;
     }
 
@@ -479,8 +479,8 @@ public class CraftScheduler implements BukkitScheduler {
             if (task.getTaskId() == -1) {
                 task.run();
             } else if (task.getPeriod() >= CraftTask.NO_REPEATING) {
-                pending.add(task);
-                runners.put(task.getTaskId(), task);
+                this.pending.add(task);
+                this.runners.put(task.getTaskId(), task);
             }
         }
         // We split this because of the way things are ordered for all of the async calls in CraftScheduler
@@ -493,14 +493,14 @@ public class CraftScheduler implements BukkitScheduler {
     }
 
     private boolean isReady(final int currentTick) {
-        return !pending.isEmpty() && pending.peek().getNextRun() <= currentTick;
+        return !this.pending.isEmpty() && this.pending.peek().getNextRun() <= currentTick;
     }
 
     @Override
     public String toString() {
-        int debugTick = currentTick;
-        StringBuilder string = new StringBuilder("Recent tasks from ").append(debugTick - RECENT_TICKS).append('-').append(debugTick).append('{');
-        debugHead.debugTo(string);
+        int debugTick = this.currentTick;
+        StringBuilder string = new StringBuilder("Recent tasks from ").append(debugTick - CraftScheduler.RECENT_TICKS).append('-').append(debugTick).append('{');
+        this.debugHead.debugTo(string);
         return string.append('}').toString();
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java b/paper-server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
index c885bc7443..f4265b178c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/scheduler/CraftTask.java
@@ -58,12 +58,12 @@ class CraftTask implements BukkitTask, Runnable {
 
     @Override
     public final int getTaskId() {
-        return id;
+        return this.id;
     }
 
     @Override
     public final Plugin getOwner() {
-        return plugin;
+        return this.plugin;
     }
 
     @Override
@@ -73,19 +73,19 @@ class CraftTask implements BukkitTask, Runnable {
 
     @Override
     public void run() {
-        if (rTask != null) {
-            rTask.run();
+        if (this.rTask != null) {
+            this.rTask.run();
         } else {
-            cTask.accept(this);
+            this.cTask.accept(this);
         }
     }
 
     long getCreatedAt() {
-        return createdAt;
+        return this.createdAt;
     }
 
     long getPeriod() {
-        return period;
+        return this.period;
     }
 
     void setPeriod(long period) {
@@ -93,7 +93,7 @@ class CraftTask implements BukkitTask, Runnable {
     }
 
     long getNextRun() {
-        return nextRun;
+        return this.nextRun;
     }
 
     void setNextRun(long nextRun) {
@@ -101,7 +101,7 @@ class CraftTask implements BukkitTask, Runnable {
     }
 
     CraftTask getNext() {
-        return next;
+        return this.next;
     }
 
     void setNext(CraftTask next) {
@@ -109,17 +109,17 @@ class CraftTask implements BukkitTask, Runnable {
     }
 
     Class<?> getTaskClass() {
-        return (rTask != null) ? rTask.getClass() : ((cTask != null) ? cTask.getClass() : null);
+        return (this.rTask != null) ? this.rTask.getClass() : ((this.cTask != null) ? this.cTask.getClass() : null);
     }
 
     @Override
     public boolean isCancelled() {
-        return (period == CraftTask.CANCEL);
+        return (this.period == CraftTask.CANCEL);
     }
 
     @Override
     public void cancel() {
-        Bukkit.getScheduler().cancelTask(id);
+        Bukkit.getScheduler().cancelTask(this.id);
     }
 
     /**
@@ -128,7 +128,7 @@ class CraftTask implements BukkitTask, Runnable {
      * @return false if it is a craft future task that has already begun execution, true otherwise
      */
     boolean cancel0() {
-        setPeriod(CraftTask.CANCEL);
+        this.setPeriod(CraftTask.CANCEL);
         return true;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftCriteria.java b/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftCriteria.java
index 4bb9e8ae5b..441e2122f8 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftCriteria.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftCriteria.java
@@ -2,8 +2,8 @@ package org.bukkit.craftbukkit.scoreboard;
 
 import com.google.common.collect.ImmutableMap;
 import java.util.Map;
-import net.minecraft.world.scores.ScoreboardObjective;
-import net.minecraft.world.scores.criteria.IScoreboardCriteria;
+import net.minecraft.world.scores.Objective;
+import net.minecraft.world.scores.criteria.ObjectiveCriteria;
 import org.bukkit.scoreboard.Criteria;
 import org.bukkit.scoreboard.RenderType;
 
@@ -14,9 +14,9 @@ public final class CraftCriteria implements Criteria {
     static {
         ImmutableMap.Builder<String, CraftCriteria> defaults = ImmutableMap.builder();
 
-        for (Map.Entry<String, IScoreboardCriteria> entry : IScoreboardCriteria.CRITERIA_CACHE.entrySet()) {
+        for (Map.Entry<String, ObjectiveCriteria> entry : ObjectiveCriteria.CRITERIA_CACHE.entrySet()) {
             String name = entry.getKey();
-            IScoreboardCriteria criteria = entry.getValue();
+            ObjectiveCriteria criteria = entry.getValue();
 
             defaults.put(name, new CraftCriteria(criteria));
         }
@@ -25,45 +25,45 @@ public final class CraftCriteria implements Criteria {
         DUMMY = DEFAULTS.get("dummy");
     }
 
-    final IScoreboardCriteria criteria;
+    final ObjectiveCriteria criteria;
     final String bukkitName;
 
     private CraftCriteria(String bukkitName) {
         this.bukkitName = bukkitName;
-        this.criteria = DUMMY.criteria;
+        this.criteria = CraftCriteria.DUMMY.criteria;
     }
 
-    private CraftCriteria(IScoreboardCriteria criteria) {
+    private CraftCriteria(ObjectiveCriteria criteria) {
         this.criteria = criteria;
         this.bukkitName = criteria.getName();
     }
 
     @Override
     public String getName() {
-        return bukkitName;
+        return this.bukkitName;
     }
 
     @Override
     public boolean isReadOnly() {
-        return criteria.isReadOnly();
+        return this.criteria.isReadOnly();
     }
 
     @Override
     public RenderType getDefaultRenderType() {
-        return RenderType.values()[criteria.getDefaultRenderType().ordinal()];
+        return RenderType.values()[this.criteria.getDefaultRenderType().ordinal()];
     }
 
-    static CraftCriteria getFromNMS(ScoreboardObjective objective) {
-        return DEFAULTS.get(objective.getCriteria().getName());
+    static CraftCriteria getFromNMS(Objective objective) {
+        return CraftCriteria.DEFAULTS.get(objective.getCriteria().getName());
     }
 
     public static CraftCriteria getFromBukkit(String name) {
-        CraftCriteria criteria = DEFAULTS.get(name);
+        CraftCriteria criteria = CraftCriteria.DEFAULTS.get(name);
         if (criteria != null) {
             return criteria;
         }
 
-        return IScoreboardCriteria.byName(name).map(CraftCriteria::new).orElseGet(() -> new CraftCriteria(name));
+        return ObjectiveCriteria.byName(name).map(CraftCriteria::new).orElseGet(() -> new CraftCriteria(name));
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java b/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java
index 214c210a84..5c987c7d9e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftObjective.java
@@ -2,7 +2,6 @@ package org.bukkit.craftbukkit.scoreboard;
 
 import com.google.common.base.Preconditions;
 import net.minecraft.world.scores.Scoreboard;
-import net.minecraft.world.scores.ScoreboardObjective;
 import org.bukkit.OfflinePlayer;
 import org.bukkit.craftbukkit.util.CraftChatMessage;
 import org.bukkit.scoreboard.Criteria;
@@ -12,67 +11,67 @@ import org.bukkit.scoreboard.RenderType;
 import org.bukkit.scoreboard.Score;
 
 final class CraftObjective extends CraftScoreboardComponent implements Objective {
-    private final ScoreboardObjective objective;
+    private final net.minecraft.world.scores.Objective objective;
     private final CraftCriteria criteria;
 
-    CraftObjective(CraftScoreboard scoreboard, ScoreboardObjective objective) {
+    CraftObjective(CraftScoreboard scoreboard, net.minecraft.world.scores.Objective objective) {
         super(scoreboard);
         this.objective = objective;
         this.criteria = CraftCriteria.getFromNMS(objective);
     }
 
-    ScoreboardObjective getHandle() {
-        return objective;
+    net.minecraft.world.scores.Objective getHandle() {
+        return this.objective;
     }
 
     @Override
     public String getName() {
-        checkState();
+        this.checkState();
 
-        return objective.getName();
+        return this.objective.getName();
     }
 
     @Override
     public String getDisplayName() {
-        checkState();
+        this.checkState();
 
-        return CraftChatMessage.fromComponent(objective.getDisplayName());
+        return CraftChatMessage.fromComponent(this.objective.getDisplayName());
     }
 
     @Override
     public void setDisplayName(String displayName) {
         Preconditions.checkArgument(displayName != null, "Display name cannot be null");
-        checkState();
+        this.checkState();
 
-        objective.setDisplayName(CraftChatMessage.fromString(displayName)[0]); // SPIGOT-4112: not nullable
+        this.objective.setDisplayName(CraftChatMessage.fromString(displayName)[0]); // SPIGOT-4112: not nullable
     }
 
     @Override
     public String getCriteria() {
-        checkState();
+        this.checkState();
 
-        return criteria.bukkitName;
+        return this.criteria.bukkitName;
     }
 
     @Override
     public Criteria getTrackedCriteria() {
-        checkState();
+        this.checkState();
 
-        return criteria;
+        return this.criteria;
     }
 
     @Override
     public boolean isModifiable() {
-        checkState();
+        this.checkState();
 
-        return !criteria.criteria.isReadOnly();
+        return !this.criteria.criteria.isReadOnly();
     }
 
     @Override
     public void setDisplaySlot(DisplaySlot slot) {
-        CraftScoreboard scoreboard = checkState();
+        CraftScoreboard scoreboard = this.checkState();
         Scoreboard board = scoreboard.board;
-        ScoreboardObjective objective = this.objective;
+        net.minecraft.world.scores.Objective objective = this.objective;
 
         for (net.minecraft.world.scores.DisplaySlot i : net.minecraft.world.scores.DisplaySlot.values()) {
             if (board.getDisplayObjective(i) == objective) {
@@ -81,15 +80,15 @@ final class CraftObjective extends CraftScoreboardComponent implements Objective
         }
         if (slot != null) {
             net.minecraft.world.scores.DisplaySlot slotNumber = CraftScoreboardTranslations.fromBukkitSlot(slot);
-            board.setDisplayObjective(slotNumber, getHandle());
+            board.setDisplayObjective(slotNumber, this.getHandle());
         }
     }
 
     @Override
     public DisplaySlot getDisplaySlot() {
-        CraftScoreboard scoreboard = checkState();
+        CraftScoreboard scoreboard = this.checkState();
         Scoreboard board = scoreboard.board;
-        ScoreboardObjective objective = this.objective;
+        net.minecraft.world.scores.Objective objective = this.objective;
 
         for (net.minecraft.world.scores.DisplaySlot i : net.minecraft.world.scores.DisplaySlot.values()) {
             if (board.getDisplayObjective(i) == objective) {
@@ -102,21 +101,21 @@ final class CraftObjective extends CraftScoreboardComponent implements Objective
     @Override
     public void setRenderType(RenderType renderType) {
         Preconditions.checkArgument(renderType != null, "RenderType cannot be null");
-        checkState();
+        this.checkState();
 
         this.objective.setRenderType(CraftScoreboardTranslations.fromBukkitRender(renderType));
     }
 
     @Override
     public RenderType getRenderType() {
-        checkState();
+        this.checkState();
 
         return CraftScoreboardTranslations.toBukkitRender(this.objective.getRenderType());
     }
 
     @Override
     public Score getScore(OfflinePlayer player) {
-        checkState();
+        this.checkState();
 
         return new CraftScore(this, CraftScoreboard.getScoreHolder(player));
     }
@@ -125,23 +124,23 @@ final class CraftObjective extends CraftScoreboardComponent implements Objective
     public Score getScore(String entry) {
         Preconditions.checkArgument(entry != null, "Entry cannot be null");
         Preconditions.checkArgument(entry.length() <= Short.MAX_VALUE, "Score '" + entry + "' is longer than the limit of 32767 characters");
-        checkState();
+        this.checkState();
 
         return new CraftScore(this, CraftScoreboard.getScoreHolder(entry));
     }
 
     @Override
     public void unregister() {
-        CraftScoreboard scoreboard = checkState();
+        CraftScoreboard scoreboard = this.checkState();
 
-        scoreboard.board.removeObjective(objective);
+        scoreboard.board.removeObjective(this.objective);
     }
 
     @Override
     CraftScoreboard checkState() {
-        Preconditions.checkState(getScoreboard().board.getObjective(objective.getName()) != null, "Unregistered scoreboard component");
+        Preconditions.checkState(this.getScoreboard().board.getObjective(this.objective.getName()) != null, "Unregistered scoreboard component");
 
-        return getScoreboard();
+        return this.getScoreboard();
     }
 
     @Override
@@ -156,7 +155,7 @@ final class CraftObjective extends CraftScoreboardComponent implements Objective
         if (obj == null) {
             return false;
         }
-        if (getClass() != obj.getClass()) {
+        if (this.getClass() != obj.getClass()) {
             return false;
         }
         final CraftObjective other = (CraftObjective) obj;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java b/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java
index 2c11f70d06..29e24461e2 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScore.java
@@ -25,24 +25,24 @@ final class CraftScore implements Score {
 
     @Override
     public OfflinePlayer getPlayer() {
-        return Bukkit.getOfflinePlayer(entry.getScoreboardName());
+        return Bukkit.getOfflinePlayer(this.entry.getScoreboardName());
     }
 
     @Override
     public String getEntry() {
-        return entry.getScoreboardName();
+        return this.entry.getScoreboardName();
     }
 
     @Override
     public Objective getObjective() {
-        return objective;
+        return this.objective;
     }
 
     @Override
     public int getScore() {
-        Scoreboard board = objective.checkState().board;
+        Scoreboard board = this.objective.checkState().board;
 
-        ReadOnlyScoreInfo score = board.getPlayerScoreInfo(entry, objective.getHandle());
+        ReadOnlyScoreInfo score = board.getPlayerScoreInfo(this.entry, this.objective.getHandle());
         if (score != null) { // Lazy
             return score.value();
         }
@@ -52,18 +52,18 @@ final class CraftScore implements Score {
 
     @Override
     public void setScore(int score) {
-        objective.checkState().board.getOrCreatePlayerScore(entry, objective.getHandle()).set(score);
+        this.objective.checkState().board.getOrCreatePlayerScore(this.entry, this.objective.getHandle()).set(score);
     }
 
     @Override
     public boolean isScoreSet() {
-        Scoreboard board = objective.checkState().board;
+        Scoreboard board = this.objective.checkState().board;
 
-        return board.getPlayerScoreInfo(entry, objective.getHandle()) != null;
+        return board.getPlayerScoreInfo(this.entry, this.objective.getHandle()) != null;
     }
 
     @Override
     public CraftScoreboard getScoreboard() {
-        return objective.getScoreboard();
+        return this.objective.getScoreboard();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java b/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java
index a0ed2c98b2..e8be35f8a7 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboard.java
@@ -4,10 +4,9 @@ import com.google.common.base.Function;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableSet;
 import com.google.common.collect.Iterables;
+import net.minecraft.world.scores.PlayerTeam;
 import net.minecraft.world.scores.ScoreHolder;
 import net.minecraft.world.scores.Scoreboard;
-import net.minecraft.world.scores.ScoreboardObjective;
-import net.minecraft.world.scores.ScoreboardTeam;
 import org.bukkit.Bukkit;
 import org.bukkit.OfflinePlayer;
 import org.bukkit.craftbukkit.entity.CraftPlayer;
@@ -28,22 +27,22 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
 
     @Override
     public CraftObjective registerNewObjective(String name, String criteria) {
-        return registerNewObjective(name, criteria, name);
+        return this.registerNewObjective(name, criteria, name);
     }
 
     @Override
     public CraftObjective registerNewObjective(String name, String criteria, String displayName) {
-        return registerNewObjective(name, CraftCriteria.getFromBukkit(criteria), displayName, RenderType.INTEGER);
+        return this.registerNewObjective(name, CraftCriteria.getFromBukkit(criteria), displayName, RenderType.INTEGER);
     }
 
     @Override
     public CraftObjective registerNewObjective(String name, String criteria, String displayName, RenderType renderType) {
-        return registerNewObjective(name, CraftCriteria.getFromBukkit(criteria), displayName, renderType);
+        return this.registerNewObjective(name, CraftCriteria.getFromBukkit(criteria), displayName, renderType);
     }
 
     @Override
     public CraftObjective registerNewObjective(String name, Criteria criteria, String displayName) {
-        return registerNewObjective(name, criteria, displayName, RenderType.INTEGER);
+        return this.registerNewObjective(name, criteria, displayName, RenderType.INTEGER);
     }
 
     @Override
@@ -53,16 +52,16 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
         Preconditions.checkArgument(displayName != null, "Display name cannot be null");
         Preconditions.checkArgument(renderType != null, "RenderType cannot be null");
         Preconditions.checkArgument(name.length() <= Short.MAX_VALUE, "The name '%s' is longer than the limit of 32767 characters (%s)", name, name.length());
-        Preconditions.checkArgument(board.getObjective(name) == null, "An objective of name '%s' already exists", name);
+        Preconditions.checkArgument(this.board.getObjective(name) == null, "An objective of name '%s' already exists", name);
 
-        ScoreboardObjective objective = board.addObjective(name, ((CraftCriteria) criteria).criteria, CraftChatMessage.fromStringOrEmpty(displayName), CraftScoreboardTranslations.fromBukkitRender(renderType), true, null);
+        net.minecraft.world.scores.Objective objective = this.board.addObjective(name, ((CraftCriteria) criteria).criteria, CraftChatMessage.fromStringOrEmpty(displayName), CraftScoreboardTranslations.fromBukkitRender(renderType), true, null);
         return new CraftObjective(this, objective);
     }
 
     @Override
     public Objective getObjective(String name) {
         Preconditions.checkArgument(name != null, "Objective name cannot be null");
-        ScoreboardObjective nms = board.getObjective(name);
+        net.minecraft.world.scores.Objective nms = this.board.getObjective(name);
         return nms == null ? null : new CraftObjective(this, nms);
     }
 
@@ -71,7 +70,7 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
         Preconditions.checkArgument(criteria != null, "Criteria name cannot be null");
 
         ImmutableSet.Builder<Objective> objectives = ImmutableSet.builder();
-        for (ScoreboardObjective netObjective : this.board.getObjectives()) {
+        for (net.minecraft.world.scores.Objective netObjective : this.board.getObjectives()) {
             CraftObjective objective = new CraftObjective(this, netObjective);
             if (objective.getCriteria().equals(criteria)) {
                 objectives.add(objective);
@@ -85,7 +84,7 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
         Preconditions.checkArgument(criteria != null, "Criteria cannot be null");
 
         ImmutableSet.Builder<Objective> objectives = ImmutableSet.builder();
-        for (ScoreboardObjective netObjective : board.getObjectives()) {
+        for (net.minecraft.world.scores.Objective netObjective : this.board.getObjectives()) {
             CraftObjective objective = new CraftObjective(this, netObjective);
             if (objective.getTrackedCriteria().equals(criteria)) {
                 objectives.add(objective);
@@ -97,13 +96,13 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
 
     @Override
     public ImmutableSet<Objective> getObjectives() {
-        return ImmutableSet.copyOf(Iterables.transform(this.board.getObjectives(), (Function<ScoreboardObjective, Objective>) input -> new CraftObjective(CraftScoreboard.this, input)));
+        return ImmutableSet.copyOf(Iterables.transform(this.board.getObjectives(), (Function<net.minecraft.world.scores.Objective, Objective>) input -> new CraftObjective(CraftScoreboard.this, input)));
     }
 
     @Override
     public Objective getObjective(DisplaySlot slot) {
         Preconditions.checkArgument(slot != null, "Display slot cannot be null");
-        ScoreboardObjective objective = board.getDisplayObjective(CraftScoreboardTranslations.fromBukkitSlot(slot));
+        net.minecraft.world.scores.Objective objective = this.board.getDisplayObjective(CraftScoreboardTranslations.fromBukkitSlot(slot));
         if (objective == null) {
             return null;
         }
@@ -112,19 +111,19 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
 
     @Override
     public ImmutableSet<Score> getScores(OfflinePlayer player) {
-        return getScores(getScoreHolder(player));
+        return this.getScores(CraftScoreboard.getScoreHolder(player));
     }
 
     @Override
     public ImmutableSet<Score> getScores(String entry) {
-        return getScores(getScoreHolder(entry));
+        return this.getScores(CraftScoreboard.getScoreHolder(entry));
     }
 
     private ImmutableSet<Score> getScores(ScoreHolder entry) {
         Preconditions.checkArgument(entry != null, "Entry cannot be null");
 
         ImmutableSet.Builder<Score> scores = ImmutableSet.builder();
-        for (ScoreboardObjective objective : this.board.getObjectives()) {
+        for (net.minecraft.world.scores.Objective objective : this.board.getObjectives()) {
             scores.add(new CraftScore(new CraftObjective(this, objective), entry));
         }
         return scores.build();
@@ -132,19 +131,19 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
 
     @Override
     public void resetScores(OfflinePlayer player) {
-        resetScores(getScoreHolder(player));
+        this.resetScores(CraftScoreboard.getScoreHolder(player));
     }
 
     @Override
     public void resetScores(String entry) {
-        resetScores(getScoreHolder(entry));
+        this.resetScores(CraftScoreboard.getScoreHolder(entry));
     }
 
     private void resetScores(ScoreHolder entry) {
         Preconditions.checkArgument(entry != null, "Entry cannot be null");
 
-        for (ScoreboardObjective objective : this.board.getObjectives()) {
-            board.resetSinglePlayerScore(entry, objective);
+        for (net.minecraft.world.scores.Objective objective : this.board.getObjectives()) {
+            this.board.resetSinglePlayerScore(entry, objective);
         }
     }
 
@@ -152,7 +151,7 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
     public Team getPlayerTeam(OfflinePlayer player) {
         Preconditions.checkArgument(player != null, "OfflinePlayer cannot be null");
 
-        ScoreboardTeam team = board.getPlayersTeam(player.getName());
+        PlayerTeam team = this.board.getPlayersTeam(player.getName());
         return team == null ? null : new CraftTeam(this, team);
     }
 
@@ -160,7 +159,7 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
     public Team getEntryTeam(String entry) {
         Preconditions.checkArgument(entry != null, "Entry cannot be null");
 
-        ScoreboardTeam team = board.getPlayersTeam(entry);
+        PlayerTeam team = this.board.getPlayersTeam(entry);
         return team == null ? null : new CraftTeam(this, team);
     }
 
@@ -168,28 +167,28 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
     public Team getTeam(String teamName) {
         Preconditions.checkArgument(teamName != null, "Team name cannot be null");
 
-        ScoreboardTeam team = board.getPlayerTeam(teamName);
+        PlayerTeam team = this.board.getPlayerTeam(teamName);
         return team == null ? null : new CraftTeam(this, team);
     }
 
     @Override
     public ImmutableSet<Team> getTeams() {
-        return ImmutableSet.copyOf(Iterables.transform(this.board.getPlayerTeams(), (Function<ScoreboardTeam, Team>) input -> new CraftTeam(CraftScoreboard.this, input)));
+        return ImmutableSet.copyOf(Iterables.transform(this.board.getPlayerTeams(), (Function<PlayerTeam, Team>) input -> new CraftTeam(CraftScoreboard.this, input)));
     }
 
     @Override
     public Team registerNewTeam(String name) {
         Preconditions.checkArgument(name != null, "Team name cannot be null");
         Preconditions.checkArgument(name.length() <= Short.MAX_VALUE, "Team name '%s' is longer than the limit of 32767 characters (%s)", name, name.length());
-        Preconditions.checkArgument(board.getPlayerTeam(name) == null, "Team name '%s' is already in use", name);
+        Preconditions.checkArgument(this.board.getPlayerTeam(name) == null, "Team name '%s' is already in use", name);
 
-        return new CraftTeam(this, board.addPlayerTeam(name));
+        return new CraftTeam(this, this.board.addPlayerTeam(name));
     }
 
     @Override
     public ImmutableSet<OfflinePlayer> getPlayers() {
         ImmutableSet.Builder<OfflinePlayer> players = ImmutableSet.builder();
-        for (ScoreHolder playerName : board.getTrackedPlayers()) {
+        for (ScoreHolder playerName : this.board.getTrackedPlayers()) {
             players.add(Bukkit.getOfflinePlayer(playerName.getScoreboardName()));
         }
         return players.build();
@@ -198,7 +197,7 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
     @Override
     public ImmutableSet<String> getEntries() {
         ImmutableSet.Builder<String> entries = ImmutableSet.builder();
-        for (ScoreHolder entry : board.getTrackedPlayers()) {
+        for (ScoreHolder entry : this.board.getTrackedPlayers()) {
             entries.add(entry.getScoreboardName());
         }
         return entries.build();
@@ -207,12 +206,12 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
     @Override
     public void clearSlot(DisplaySlot slot) {
         Preconditions.checkArgument(slot != null, "Slot cannot be null");
-        board.setDisplayObjective(CraftScoreboardTranslations.fromBukkitSlot(slot), null);
+        this.board.setDisplayObjective(CraftScoreboardTranslations.fromBukkitSlot(slot), null);
     }
 
     // CraftBukkit method
     public Scoreboard getHandle() {
-        return board;
+        return this.board;
     }
 
     static ScoreHolder getScoreHolder(String entry) {
@@ -225,7 +224,7 @@ public final class CraftScoreboard implements org.bukkit.scoreboard.Scoreboard {
         if (player instanceof CraftPlayer craft) {
             return craft.getHandle();
         } else {
-            return getScoreHolder(player.getName());
+            return CraftScoreboard.getScoreHolder(player.getName());
         }
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardComponent.java b/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardComponent.java
index 5a5f03e0d8..fd88bfe0a1 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardComponent.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardComponent.java
@@ -10,7 +10,7 @@ abstract class CraftScoreboardComponent {
     abstract CraftScoreboard checkState();
 
     public CraftScoreboard getScoreboard() {
-        return scoreboard;
+        return this.scoreboard;
     }
 
     abstract void unregister();
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java b/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
index 726887ece2..ffd5ed8c42 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardManager.java
@@ -7,17 +7,17 @@ import java.util.HashSet;
 import java.util.Iterator;
 import java.util.Map;
 import java.util.function.Consumer;
-import net.minecraft.network.protocol.game.PacketPlayOutScoreboardObjective;
-import net.minecraft.network.protocol.game.PacketPlayOutScoreboardTeam;
+import net.minecraft.network.protocol.game.ClientboundSetObjectivePacket;
+import net.minecraft.network.protocol.game.ClientboundSetPlayerTeamPacket;
 import net.minecraft.server.MinecraftServer;
-import net.minecraft.server.ScoreboardServer;
-import net.minecraft.server.level.EntityPlayer;
+import net.minecraft.server.ServerScoreboard;
+import net.minecraft.server.level.ServerPlayer;
+import net.minecraft.world.scores.Objective;
+import net.minecraft.world.scores.PlayerTeam;
 import net.minecraft.world.scores.ScoreAccess;
 import net.minecraft.world.scores.ScoreHolder;
 import net.minecraft.world.scores.Scoreboard;
-import net.minecraft.world.scores.ScoreboardObjective;
-import net.minecraft.world.scores.ScoreboardTeam;
-import net.minecraft.world.scores.criteria.IScoreboardCriteria;
+import net.minecraft.world.scores.criteria.ObjectiveCriteria;
 import org.bukkit.craftbukkit.entity.CraftPlayer;
 import org.bukkit.craftbukkit.util.WeakCollection;
 import org.bukkit.scoreboard.ScoreboardManager;
@@ -29,27 +29,27 @@ public final class CraftScoreboardManager implements ScoreboardManager {
     private final Map<CraftPlayer, CraftScoreboard> playerBoards = new HashMap<>();
 
     public CraftScoreboardManager(MinecraftServer minecraftserver, net.minecraft.world.scores.Scoreboard scoreboardServer) {
-        mainScoreboard = new CraftScoreboard(scoreboardServer);
-        server = minecraftserver;
-        scoreboards.add(mainScoreboard);
+        this.mainScoreboard = new CraftScoreboard(scoreboardServer);
+        this.server = minecraftserver;
+        this.scoreboards.add(this.mainScoreboard);
     }
 
     @Override
     public CraftScoreboard getMainScoreboard() {
-        return mainScoreboard;
+        return this.mainScoreboard;
     }
 
     @Override
     public CraftScoreboard getNewScoreboard() {
-        CraftScoreboard scoreboard = new CraftScoreboard(new ScoreboardServer(server));
-        scoreboards.add(scoreboard);
+        CraftScoreboard scoreboard = new CraftScoreboard(new ServerScoreboard(this.server));
+        this.scoreboards.add(scoreboard);
         return scoreboard;
     }
 
     // CraftBukkit method
     public CraftScoreboard getPlayerBoard(CraftPlayer player) {
-        CraftScoreboard board = playerBoards.get(player);
-        return board == null ? getMainScoreboard() : board;
+        CraftScoreboard board = this.playerBoards.get(player);
+        return board == null ? this.getMainScoreboard() : board;
     }
 
     // CraftBukkit method
@@ -57,26 +57,26 @@ public final class CraftScoreboardManager implements ScoreboardManager {
         Preconditions.checkArgument(bukkitScoreboard instanceof CraftScoreboard, "Cannot set player scoreboard to an unregistered Scoreboard");
 
         CraftScoreboard scoreboard = (CraftScoreboard) bukkitScoreboard;
-        net.minecraft.world.scores.Scoreboard oldboard = getPlayerBoard(player).getHandle();
+        net.minecraft.world.scores.Scoreboard oldboard = this.getPlayerBoard(player).getHandle();
         net.minecraft.world.scores.Scoreboard newboard = scoreboard.getHandle();
-        EntityPlayer entityplayer = player.getHandle();
+        ServerPlayer entityplayer = player.getHandle();
 
         if (oldboard == newboard) {
             return;
         }
 
-        if (scoreboard == mainScoreboard) {
-            playerBoards.remove(player);
+        if (scoreboard == this.mainScoreboard) {
+            this.playerBoards.remove(player);
         } else {
-            playerBoards.put(player, scoreboard);
+            this.playerBoards.put(player, scoreboard);
         }
 
         // Old objective tracking
-        HashSet<ScoreboardObjective> removed = new HashSet<>();
+        HashSet<Objective> removed = new HashSet<>();
         for (int i = 0; i < 3; ++i) {
-            ScoreboardObjective scoreboardobjective = oldboard.getDisplayObjective(net.minecraft.world.scores.DisplaySlot.BY_ID.apply(i));
+            Objective scoreboardobjective = oldboard.getDisplayObjective(net.minecraft.world.scores.DisplaySlot.BY_ID.apply(i));
             if (scoreboardobjective != null && !removed.contains(scoreboardobjective)) {
-                entityplayer.connection.send(new PacketPlayOutScoreboardObjective(scoreboardobjective, 1));
+                entityplayer.connection.send(new ClientboundSetObjectivePacket(scoreboardobjective, 1));
                 removed.add(scoreboardobjective);
             }
         }
@@ -84,22 +84,22 @@ public final class CraftScoreboardManager implements ScoreboardManager {
         // Old team tracking
         Iterator<?> iterator = oldboard.getPlayerTeams().iterator();
         while (iterator.hasNext()) {
-            ScoreboardTeam scoreboardteam = (ScoreboardTeam) iterator.next();
-            entityplayer.connection.send(PacketPlayOutScoreboardTeam.createRemovePacket(scoreboardteam));
+            PlayerTeam scoreboardteam = (PlayerTeam) iterator.next();
+            entityplayer.connection.send(ClientboundSetPlayerTeamPacket.createRemovePacket(scoreboardteam));
         }
 
         // The above is the reverse of the below method.
-        server.getPlayerList().updateEntireScoreboard((ScoreboardServer) newboard, player.getHandle());
+        this.server.getPlayerList().updateEntireScoreboard((ServerScoreboard) newboard, player.getHandle());
     }
 
     // CraftBukkit method
     public void removePlayer(CraftPlayer player) {
-        playerBoards.remove(player);
+        this.playerBoards.remove(player);
     }
 
     // CraftBukkit method
-    public void forAllObjectives(IScoreboardCriteria criteria, ScoreHolder holder, Consumer<ScoreAccess> consumer) {
-        for (CraftScoreboard scoreboard : scoreboards) {
+    public void forAllObjectives(ObjectiveCriteria criteria, ScoreHolder holder, Consumer<ScoreAccess> consumer) {
+        for (CraftScoreboard scoreboard : this.scoreboards) {
             Scoreboard board = scoreboard.board;
             board.forAllObjectives(criteria, holder, (score) -> consumer.accept(score));
         }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardTranslations.java b/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardTranslations.java
index 9cfc3e8882..73c5ffff70 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardTranslations.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftScoreboardTranslations.java
@@ -1,11 +1,11 @@
 package org.bukkit.craftbukkit.scoreboard;
 
 import com.google.common.collect.ImmutableBiMap;
-import net.minecraft.world.scores.criteria.IScoreboardCriteria;
+import net.minecraft.world.scores.criteria.ObjectiveCriteria;
 import org.bukkit.scoreboard.DisplaySlot;
 import org.bukkit.scoreboard.RenderType;
 
-final class CraftScoreboardTranslations {
+public final class CraftScoreboardTranslations {
     static final int MAX_DISPLAY_SLOT = 19;
     static final ImmutableBiMap<DisplaySlot, String> SLOTS = ImmutableBiMap.<DisplaySlot, String>builder()
             .put(DisplaySlot.BELOW_NAME, "below_name")
@@ -31,19 +31,19 @@ final class CraftScoreboardTranslations {
 
     private CraftScoreboardTranslations() {}
 
-    static DisplaySlot toBukkitSlot(net.minecraft.world.scores.DisplaySlot minecraft) {
-        return SLOTS.inverse().get(minecraft.getSerializedName());
+    public static DisplaySlot toBukkitSlot(net.minecraft.world.scores.DisplaySlot minecraft) {
+        return CraftScoreboardTranslations.SLOTS.inverse().get(minecraft.getSerializedName());
     }
 
-    static net.minecraft.world.scores.DisplaySlot fromBukkitSlot(DisplaySlot slot) {
-        return net.minecraft.world.scores.DisplaySlot.CODEC.byName(SLOTS.get(slot));
+    public static net.minecraft.world.scores.DisplaySlot fromBukkitSlot(DisplaySlot slot) {
+        return net.minecraft.world.scores.DisplaySlot.CODEC.byName(CraftScoreboardTranslations.SLOTS.get(slot));
     }
 
-    static RenderType toBukkitRender(IScoreboardCriteria.EnumScoreboardHealthDisplay display) {
+    static RenderType toBukkitRender(ObjectiveCriteria.RenderType display) {
         return RenderType.valueOf(display.name());
     }
 
-    static IScoreboardCriteria.EnumScoreboardHealthDisplay fromBukkitRender(RenderType render) {
-        return IScoreboardCriteria.EnumScoreboardHealthDisplay.valueOf(render.name());
+    static ObjectiveCriteria.RenderType fromBukkitRender(RenderType render) {
+        return ObjectiveCriteria.RenderType.valueOf(render.name());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java b/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
index dbfbb9570d..4d586e1375 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/scoreboard/CraftTeam.java
@@ -3,9 +3,8 @@ package org.bukkit.craftbukkit.scoreboard;
 import com.google.common.base.Preconditions;
 import com.google.common.collect.ImmutableSet;
 import java.util.Set;
-import net.minecraft.world.scores.ScoreboardTeam;
-import net.minecraft.world.scores.ScoreboardTeamBase;
-import net.minecraft.world.scores.ScoreboardTeamBase.EnumNameTagVisibility;
+import net.minecraft.world.scores.PlayerTeam;
+import net.minecraft.world.scores.Team.Visibility;
 import org.bukkit.Bukkit;
 import org.bukkit.ChatColor;
 import org.bukkit.OfflinePlayer;
@@ -14,128 +13,128 @@ import org.bukkit.scoreboard.NameTagVisibility;
 import org.bukkit.scoreboard.Team;
 
 final class CraftTeam extends CraftScoreboardComponent implements Team {
-    private final ScoreboardTeam team;
+    private final PlayerTeam team;
 
-    CraftTeam(CraftScoreboard scoreboard, ScoreboardTeam team) {
+    CraftTeam(CraftScoreboard scoreboard, PlayerTeam team) {
         super(scoreboard);
         this.team = team;
     }
 
     @Override
     public String getName() {
-        checkState();
+        this.checkState();
 
-        return team.getName();
+        return this.team.getName();
     }
 
     @Override
     public String getDisplayName() {
-        checkState();
+        this.checkState();
 
-        return CraftChatMessage.fromComponent(team.getDisplayName());
+        return CraftChatMessage.fromComponent(this.team.getDisplayName());
     }
 
     @Override
     public void setDisplayName(String displayName) {
         Preconditions.checkArgument(displayName != null, "Display name cannot be null");
-        checkState();
+        this.checkState();
 
-        team.setDisplayName(CraftChatMessage.fromString(displayName)[0]); // SPIGOT-4112: not nullable
+        this.team.setDisplayName(CraftChatMessage.fromString(displayName)[0]); // SPIGOT-4112: not nullable
     }
 
     @Override
     public String getPrefix() {
-        checkState();
+        this.checkState();
 
-        return CraftChatMessage.fromComponent(team.getPlayerPrefix());
+        return CraftChatMessage.fromComponent(this.team.getPlayerPrefix());
     }
 
     @Override
     public void setPrefix(String prefix) {
         Preconditions.checkArgument(prefix != null, "Prefix cannot be null");
-        checkState();
+        this.checkState();
 
-        team.setPlayerPrefix(CraftChatMessage.fromStringOrNull(prefix));
+        this.team.setPlayerPrefix(CraftChatMessage.fromStringOrNull(prefix));
     }
 
     @Override
     public String getSuffix() {
-        checkState();
+        this.checkState();
 
-        return CraftChatMessage.fromComponent(team.getPlayerSuffix());
+        return CraftChatMessage.fromComponent(this.team.getPlayerSuffix());
     }
 
     @Override
     public void setSuffix(String suffix) {
         Preconditions.checkArgument(suffix != null, "Suffix cannot be null");
-        checkState();
+        this.checkState();
 
-        team.setPlayerSuffix(CraftChatMessage.fromStringOrNull(suffix));
+        this.team.setPlayerSuffix(CraftChatMessage.fromStringOrNull(suffix));
     }
 
     @Override
     public ChatColor getColor() {
-        checkState();
+        this.checkState();
 
-        return CraftChatMessage.getColor(team.getColor());
+        return CraftChatMessage.getColor(this.team.getColor());
     }
 
     @Override
     public void setColor(ChatColor color) {
         Preconditions.checkArgument(color != null, "Color cannot be null");
-        checkState();
+        this.checkState();
 
-        team.setColor(CraftChatMessage.getColor(color));
+        this.team.setColor(CraftChatMessage.getColor(color));
     }
 
     @Override
     public boolean allowFriendlyFire() {
-        checkState();
+        this.checkState();
 
-        return team.isAllowFriendlyFire();
+        return this.team.isAllowFriendlyFire();
     }
 
     @Override
     public void setAllowFriendlyFire(boolean enabled) {
-        checkState();
+        this.checkState();
 
-        team.setAllowFriendlyFire(enabled);
+        this.team.setAllowFriendlyFire(enabled);
     }
 
     @Override
     public boolean canSeeFriendlyInvisibles() {
-        checkState();
+        this.checkState();
 
-        return team.canSeeFriendlyInvisibles();
+        return this.team.canSeeFriendlyInvisibles();
     }
 
     @Override
     public void setCanSeeFriendlyInvisibles(boolean enabled) {
-        checkState();
+        this.checkState();
 
-        team.setSeeFriendlyInvisibles(enabled);
+        this.team.setSeeFriendlyInvisibles(enabled);
     }
 
     @Override
     public NameTagVisibility getNameTagVisibility() throws IllegalArgumentException {
-        checkState();
+        this.checkState();
 
-        return notchToBukkit(team.getNameTagVisibility());
+        return CraftTeam.notchToBukkit(this.team.getNameTagVisibility());
     }
 
     @Override
     public void setNameTagVisibility(NameTagVisibility visibility) throws IllegalArgumentException {
-        checkState();
+        this.checkState();
 
-        team.setNameTagVisibility(bukkitToNotch(visibility));
+        this.team.setNameTagVisibility(CraftTeam.bukkitToNotch(visibility));
     }
 
     @Override
     public Set<OfflinePlayer> getPlayers() {
-        checkState();
+        this.checkState();
 
         ImmutableSet.Builder<OfflinePlayer> players = ImmutableSet.builder();
-        for (String playerName : team.getPlayers()) {
+        for (String playerName : this.team.getPlayers()) {
             players.add(Bukkit.getOfflinePlayer(playerName));
         }
         return players.build();
@@ -143,10 +142,10 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
 
     @Override
     public Set<String> getEntries() {
-        checkState();
+        this.checkState();
 
         ImmutableSet.Builder<String> entries = ImmutableSet.builder();
-        for (String playerName : team.getPlayers()) {
+        for (String playerName : this.team.getPlayers()) {
             entries.add(playerName);
         }
         return entries.build();
@@ -154,76 +153,76 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
 
     @Override
     public int getSize() {
-        checkState();
+        this.checkState();
 
-        return team.getPlayers().size();
+        return this.team.getPlayers().size();
     }
 
     @Override
     public void addPlayer(OfflinePlayer player) {
         Preconditions.checkArgument(player != null, "OfflinePlayer cannot be null");
-        addEntry(player.getName());
+        this.addEntry(player.getName());
     }
 
     @Override
     public void addEntry(String entry) {
         Preconditions.checkArgument(entry != null, "Entry cannot be null");
-        CraftScoreboard scoreboard = checkState();
+        CraftScoreboard scoreboard = this.checkState();
 
-        scoreboard.board.addPlayerToTeam(entry, team);
+        scoreboard.board.addPlayerToTeam(entry, this.team);
     }
 
     @Override
     public boolean removePlayer(OfflinePlayer player) {
         Preconditions.checkArgument(player != null, "OfflinePlayer cannot be null");
-        return removeEntry(player.getName());
+        return this.removeEntry(player.getName());
     }
 
     @Override
     public boolean removeEntry(String entry) {
         Preconditions.checkArgument(entry != null, "Entry cannot be null");
-        CraftScoreboard scoreboard = checkState();
+        CraftScoreboard scoreboard = this.checkState();
 
-        if (!team.getPlayers().contains(entry)) {
+        if (!this.team.getPlayers().contains(entry)) {
             return false;
         }
 
-        scoreboard.board.removePlayerFromTeam(entry, team);
+        scoreboard.board.removePlayerFromTeam(entry, this.team);
         return true;
     }
 
     @Override
     public boolean hasPlayer(OfflinePlayer player) throws IllegalArgumentException, IllegalStateException {
         Preconditions.checkArgument(player != null, "OfflinePlayer cannot be null");
-        return hasEntry(player.getName());
+        return this.hasEntry(player.getName());
     }
 
     @Override
     public boolean hasEntry(String entry) throws IllegalArgumentException, IllegalStateException {
         Preconditions.checkArgument(entry != null, "Entry cannot be null");
-        checkState();
+        this.checkState();
 
-        return team.getPlayers().contains(entry);
+        return this.team.getPlayers().contains(entry);
     }
 
     @Override
     public void unregister() {
-        CraftScoreboard scoreboard = checkState();
+        CraftScoreboard scoreboard = this.checkState();
 
-        scoreboard.board.removePlayerTeam(team);
+        scoreboard.board.removePlayerTeam(this.team);
     }
 
     @Override
     public OptionStatus getOption(Option option) {
-        checkState();
+        this.checkState();
 
         switch (option) {
             case NAME_TAG_VISIBILITY:
-                return OptionStatus.values()[team.getNameTagVisibility().ordinal()];
+                return OptionStatus.values()[this.team.getNameTagVisibility().ordinal()];
             case DEATH_MESSAGE_VISIBILITY:
-                return OptionStatus.values()[team.getDeathMessageVisibility().ordinal()];
+                return OptionStatus.values()[this.team.getDeathMessageVisibility().ordinal()];
             case COLLISION_RULE:
-                return OptionStatus.values()[team.getCollisionRule().ordinal()];
+                return OptionStatus.values()[this.team.getCollisionRule().ordinal()];
             default:
                 throw new IllegalArgumentException("Unrecognised option " + option);
         }
@@ -231,39 +230,39 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
 
     @Override
     public void setOption(Option option, OptionStatus status) {
-        checkState();
+        this.checkState();
 
         switch (option) {
             case NAME_TAG_VISIBILITY:
-                team.setNameTagVisibility(EnumNameTagVisibility.values()[status.ordinal()]);
+                this.team.setNameTagVisibility(Visibility.values()[status.ordinal()]);
                 break;
             case DEATH_MESSAGE_VISIBILITY:
-                team.setDeathMessageVisibility(EnumNameTagVisibility.values()[status.ordinal()]);
+                this.team.setDeathMessageVisibility(Visibility.values()[status.ordinal()]);
                 break;
             case COLLISION_RULE:
-                team.setCollisionRule(ScoreboardTeamBase.EnumTeamPush.values()[status.ordinal()]);
+                this.team.setCollisionRule(net.minecraft.world.scores.Team.CollisionRule.values()[status.ordinal()]);
                 break;
             default:
                 throw new IllegalArgumentException("Unrecognised option " + option);
         }
     }
 
-    public static EnumNameTagVisibility bukkitToNotch(NameTagVisibility visibility) {
+    public static Visibility bukkitToNotch(NameTagVisibility visibility) {
         switch (visibility) {
             case ALWAYS:
-                return EnumNameTagVisibility.ALWAYS;
+                return Visibility.ALWAYS;
             case NEVER:
-                return EnumNameTagVisibility.NEVER;
+                return Visibility.NEVER;
             case HIDE_FOR_OTHER_TEAMS:
-                return EnumNameTagVisibility.HIDE_FOR_OTHER_TEAMS;
+                return Visibility.HIDE_FOR_OTHER_TEAMS;
             case HIDE_FOR_OWN_TEAM:
-                return EnumNameTagVisibility.HIDE_FOR_OWN_TEAM;
+                return Visibility.HIDE_FOR_OWN_TEAM;
             default:
                 throw new IllegalArgumentException("Unknown visibility level " + visibility);
         }
     }
 
-    public static NameTagVisibility notchToBukkit(EnumNameTagVisibility visibility) {
+    public static NameTagVisibility notchToBukkit(Visibility visibility) {
         switch (visibility) {
             case ALWAYS:
                 return NameTagVisibility.ALWAYS;
@@ -280,9 +279,9 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
 
     @Override
     CraftScoreboard checkState() {
-        Preconditions.checkState(getScoreboard().board.getPlayerTeam(team.getName()) != null, "Unregistered scoreboard component");
+        Preconditions.checkState(this.getScoreboard().board.getPlayerTeam(this.team.getName()) != null, "Unregistered scoreboard component");
 
-        return getScoreboard();
+        return this.getScoreboard();
     }
 
     @Override
@@ -297,7 +296,7 @@ final class CraftTeam extends CraftScoreboardComponent implements Team {
         if (obj == null) {
             return false;
         }
-        if (getClass() != obj.getClass()) {
+        if (this.getClass() != obj.getClass()) {
             return false;
         }
         final CraftTeam other = (CraftTeam) obj;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/structure/CraftPalette.java b/paper-server/src/main/java/org/bukkit/craftbukkit/structure/CraftPalette.java
index 0bb840fda0..26c7d0d39e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/structure/CraftPalette.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/structure/CraftPalette.java
@@ -2,18 +2,18 @@ package org.bukkit.craftbukkit.structure;
 
 import java.util.ArrayList;
 import java.util.List;
-import net.minecraft.core.IRegistryCustom;
-import net.minecraft.world.level.levelgen.structure.templatesystem.DefinedStructure;
+import net.minecraft.core.RegistryAccess;
+import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate;
 import org.bukkit.block.BlockState;
 import org.bukkit.craftbukkit.block.CraftBlockStates;
 import org.bukkit.structure.Palette;
 
 public class CraftPalette implements Palette {
 
-    private final DefinedStructure.b palette;
-    private final IRegistryCustom registry;
+    private final StructureTemplate.Palette palette;
+    private final RegistryAccess registry;
 
-    public CraftPalette(DefinedStructure.b palette, IRegistryCustom registry) {
+    public CraftPalette(StructureTemplate.Palette palette, RegistryAccess registry) {
         this.palette = palette;
         this.registry = registry;
     }
@@ -21,14 +21,14 @@ public class CraftPalette implements Palette {
     @Override
     public List<BlockState> getBlocks() {
         List<BlockState> blocks = new ArrayList<>();
-        for (DefinedStructure.BlockInfo blockInfo : palette.blocks()) {
-            blocks.add(CraftBlockStates.getBlockState(registry, blockInfo.pos(), blockInfo.state(), blockInfo.nbt()));
+        for (StructureTemplate.StructureBlockInfo blockInfo : this.palette.blocks()) {
+            blocks.add(CraftBlockStates.getBlockState(this.registry, blockInfo.pos(), blockInfo.state(), blockInfo.nbt()));
         }
         return blocks;
     }
 
     @Override
     public int getBlockCount() {
-        return palette.blocks().size();
+        return this.palette.blocks().size();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/structure/CraftStructure.java b/paper-server/src/main/java/org/bukkit/craftbukkit/structure/CraftStructure.java
index 1ff90536fd..27d351f955 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/structure/CraftStructure.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/structure/CraftStructure.java
@@ -7,19 +7,18 @@ import java.util.Collections;
 import java.util.List;
 import java.util.Random;
 import java.util.stream.Collectors;
-import net.minecraft.core.BlockPosition;
-import net.minecraft.core.IRegistryCustom;
+import net.minecraft.core.BlockPos;
+import net.minecraft.core.RegistryAccess;
 import net.minecraft.util.RandomSource;
 import net.minecraft.world.entity.EntitySpawnReason;
-import net.minecraft.world.entity.EntityTypes;
-import net.minecraft.world.level.ChunkCoordIntPair;
-import net.minecraft.world.level.GeneratorAccessSeed;
+import net.minecraft.world.entity.EntityType;
+import net.minecraft.world.level.ChunkPos;
+import net.minecraft.world.level.WorldGenLevel;
 import net.minecraft.world.level.block.Blocks;
-import net.minecraft.world.level.block.EnumBlockMirror;
-import net.minecraft.world.level.block.EnumBlockRotation;
-import net.minecraft.world.level.levelgen.structure.templatesystem.DefinedStructure;
-import net.minecraft.world.level.levelgen.structure.templatesystem.DefinedStructureInfo;
-import net.minecraft.world.level.levelgen.structure.templatesystem.DefinedStructureProcessorRotation;
+import net.minecraft.world.level.block.Rotation;
+import net.minecraft.world.level.levelgen.structure.templatesystem.BlockRotProcessor;
+import net.minecraft.world.level.levelgen.structure.templatesystem.StructurePlaceSettings;
+import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate;
 import org.bukkit.Bukkit;
 import org.bukkit.Location;
 import org.bukkit.RegionAccessor;
@@ -43,17 +42,17 @@ import org.bukkit.util.EntityTransformer;
 
 public class CraftStructure implements Structure {
 
-    private final DefinedStructure structure;
-    private final IRegistryCustom registry;
+    private final StructureTemplate structure;
+    private final RegistryAccess registry;
 
-    public CraftStructure(DefinedStructure structure, IRegistryCustom registry) {
+    public CraftStructure(StructureTemplate structure, RegistryAccess registry) {
         this.structure = structure;
         this.registry = registry;
     }
 
     @Override
     public void place(Location location, boolean includeEntities, StructureRotation structureRotation, Mirror mirror, int palette, float integrity, Random random) {
-        place(location, includeEntities, structureRotation, mirror, palette, integrity, random, Collections.emptyList(), Collections.emptyList());
+        this.place(location, includeEntities, structureRotation, mirror, palette, integrity, random, Collections.emptyList(), Collections.emptyList());
     }
 
     @Override
@@ -64,12 +63,12 @@ public class CraftStructure implements Structure {
         Preconditions.checkArgument(world != null, "The World of Location cannot be null");
 
         BlockVector blockVector = new BlockVector(location.getBlockX(), location.getBlockY(), location.getBlockZ());
-        place(world, blockVector, includeEntities, structureRotation, mirror, palette, integrity, random, blockTransformers, entityTransformers);
+        this.place(world, blockVector, includeEntities, structureRotation, mirror, palette, integrity, random, blockTransformers, entityTransformers);
     }
 
     @Override
     public void place(RegionAccessor regionAccessor, BlockVector location, boolean includeEntities, StructureRotation structureRotation, Mirror mirror, int palette, float integrity, Random random) {
-       place(regionAccessor, location, includeEntities, structureRotation, mirror, palette, integrity, random, Collections.emptyList(), Collections.emptyList());
+       this.place(regionAccessor, location, includeEntities, structureRotation, mirror, palette, integrity, random, Collections.emptyList(), Collections.emptyList());
     }
 
     @Override
@@ -83,22 +82,22 @@ public class CraftStructure implements Structure {
         Preconditions.checkArgument(integrity >= 0F && integrity <= 1F, "Integrity value (%S) must be between 0 and 1 inclusive", integrity);
 
         RandomSource randomSource = new RandomSourceWrapper(random);
-        DefinedStructureInfo definedstructureinfo = new DefinedStructureInfo()
-                .setMirror(EnumBlockMirror.valueOf(mirror.name()))
-                .setRotation(EnumBlockRotation.valueOf(structureRotation.name()))
+        StructurePlaceSettings definedstructureinfo = new StructurePlaceSettings()
+                .setMirror(net.minecraft.world.level.block.Mirror.valueOf(mirror.name()))
+                .setRotation(Rotation.valueOf(structureRotation.name()))
                 .setIgnoreEntities(!includeEntities)
-                .addProcessor(new DefinedStructureProcessorRotation(integrity))
+                .addProcessor(new BlockRotProcessor(integrity))
                 .setRandom(randomSource);
         definedstructureinfo.palette = palette;
 
-        BlockPosition blockPosition = CraftBlockVector.toBlockPosition(location);
-        GeneratorAccessSeed handle = ((CraftRegionAccessor) regionAccessor).getHandle();
+        BlockPos blockPosition = CraftBlockVector.toBlockPosition(location);
+        WorldGenLevel handle = ((CraftRegionAccessor) regionAccessor).getHandle();
 
         TransformerGeneratorAccess access = new TransformerGeneratorAccess();
         access.setHandle(handle);
-        access.setStructureTransformer(new CraftStructureTransformer(handle, new ChunkCoordIntPair(blockPosition), blockTransformers, entityTransformers));
+        access.setStructureTransformer(new CraftStructureTransformer(handle, new ChunkPos(blockPosition), blockTransformers, entityTransformers));
 
-        structure.placeInWorld(access, blockPosition, blockPosition, definedstructureinfo, randomSource, 2);
+        this.structure.placeInWorld(access, blockPosition, blockPosition, definedstructureinfo, randomSource, 2);
         access.getStructureTransformer().discard();
     }
 
@@ -111,7 +110,7 @@ public class CraftStructure implements Structure {
 
         Location origin = new Location(world, Math.min(corner1.getBlockX(), corner2.getBlockX()), Math.min(corner1.getBlockY(), corner2.getBlockY()), Math.min(corner1.getBlockZ(), corner2.getBlockZ()));
         BlockVector size = new BlockVector(Math.abs(corner1.getBlockX() - corner2.getBlockX()), Math.abs(corner1.getBlockY() - corner2.getBlockY()), Math.abs(corner1.getBlockZ() - corner2.getBlockZ()));
-        fill(origin, size, includeEntities);
+        this.fill(origin, size, includeEntities);
     }
 
     @Override
@@ -122,19 +121,19 @@ public class CraftStructure implements Structure {
         Preconditions.checkArgument(size != null, "BlockVector size cannot be null");
         Preconditions.checkArgument(size.getBlockX() >= 1 && size.getBlockY() >= 1 && size.getBlockZ() >= 1, "Size must be at least 1x1x1 but was %sx%sx%s", size.getBlockX(), size.getBlockY(), size.getBlockZ());
 
-        structure.fillFromWorld(((CraftWorld) world).getHandle(), CraftLocation.toBlockPosition(origin), CraftBlockVector.toBlockPosition(size), includeEntities, Blocks.STRUCTURE_VOID);
+        this.structure.fillFromWorld(((CraftWorld) world).getHandle(), CraftLocation.toBlockPosition(origin), CraftBlockVector.toBlockPosition(size), includeEntities, Blocks.STRUCTURE_VOID);
     }
 
     @Override
     public BlockVector getSize() {
-        return CraftBlockVector.toBukkit(structure.getSize());
+        return CraftBlockVector.toBukkit(this.structure.getSize());
     }
 
     @Override
     public List<Entity> getEntities() {
         List<Entity> entities = new ArrayList<>();
-        for (DefinedStructure.EntityInfo entity : structure.entityInfoList) {
-            EntityTypes.create(entity.nbt, ((CraftWorld) Bukkit.getServer().getWorlds().get(0)).getHandle(), EntitySpawnReason.STRUCTURE).ifPresent(dummyEntity -> {
+        for (StructureTemplate.StructureEntityInfo entity : this.structure.entityInfoList) {
+            EntityType.create(entity.nbt, ((CraftWorld) Bukkit.getServer().getWorlds().get(0)).getHandle(), EntitySpawnReason.STRUCTURE).ifPresent(dummyEntity -> {
                 dummyEntity.setPos(entity.pos.x, entity.pos.y, entity.pos.z);
                 entities.add(dummyEntity.getBukkitEntity());
             });
@@ -144,25 +143,25 @@ public class CraftStructure implements Structure {
 
     @Override
     public int getEntityCount() {
-        return structure.entityInfoList.size();
+        return this.structure.entityInfoList.size();
     }
 
     @Override
     public List<Palette> getPalettes() {
-        return structure.palettes.stream().map((palette) -> new CraftPalette(palette, registry)).collect(Collectors.toList());
+        return this.structure.palettes.stream().map((palette) -> new CraftPalette(palette, this.registry)).collect(Collectors.toList());
     }
 
     @Override
     public int getPaletteCount() {
-        return structure.palettes.size();
+        return this.structure.palettes.size();
     }
 
     @Override
     public PersistentDataContainer getPersistentDataContainer() {
-        return getHandle().persistentDataContainer;
+        return this.getHandle().persistentDataContainer;
     }
 
-    public DefinedStructure getHandle() {
-        return structure;
+    public StructureTemplate getHandle() {
+        return this.structure;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/structure/CraftStructureManager.java b/paper-server/src/main/java/org/bukkit/craftbukkit/structure/CraftStructureManager.java
index 10fbddfeaa..35b31ff1f3 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/structure/CraftStructureManager.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/structure/CraftStructureManager.java
@@ -13,11 +13,11 @@ import java.util.Collections;
 import java.util.HashMap;
 import java.util.Map;
 import java.util.Optional;
-import net.minecraft.core.IRegistryCustom;
-import net.minecraft.nbt.NBTCompressedStreamTools;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.resources.MinecraftKey;
-import net.minecraft.world.level.levelgen.structure.templatesystem.DefinedStructure;
+import net.minecraft.core.RegistryAccess;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.nbt.NbtIo;
+import net.minecraft.resources.ResourceLocation;
+import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplate;
 import net.minecraft.world.level.levelgen.structure.templatesystem.StructureTemplateManager;
 import org.bukkit.NamespacedKey;
 import org.bukkit.craftbukkit.util.CraftNamespacedKey;
@@ -27,9 +27,9 @@ import org.bukkit.structure.StructureManager;
 public class CraftStructureManager implements StructureManager {
 
     private final StructureTemplateManager structureManager;
-    private final IRegistryCustom registry;
+    private final RegistryAccess registry;
 
-    public CraftStructureManager(StructureTemplateManager structureManager, IRegistryCustom registry) {
+    public CraftStructureManager(StructureTemplateManager structureManager, RegistryAccess registry) {
         this.structureManager = structureManager;
         this.registry = registry;
     }
@@ -37,8 +37,8 @@ public class CraftStructureManager implements StructureManager {
     @Override
     public Map<NamespacedKey, Structure> getStructures() {
         Map<NamespacedKey, Structure> cachedStructures = new HashMap<>();
-        for (Map.Entry<MinecraftKey, Optional<DefinedStructure>> entry : structureManager.structureRepository.entrySet()) {
-            entry.getValue().ifPresent(definedStructure -> cachedStructures.put(CraftNamespacedKey.fromMinecraft(entry.getKey()), new CraftStructure(definedStructure, registry)));
+        for (Map.Entry<ResourceLocation, Optional<StructureTemplate>> entry : this.structureManager.structureRepository.entrySet()) {
+            entry.getValue().ifPresent(definedStructure -> cachedStructures.put(CraftNamespacedKey.fromMinecraft(entry.getKey()), new CraftStructure(definedStructure, this.registry)));
         }
         return Collections.unmodifiableMap(cachedStructures);
     }
@@ -47,39 +47,39 @@ public class CraftStructureManager implements StructureManager {
     public Structure getStructure(NamespacedKey structureKey) {
         Preconditions.checkArgument(structureKey != null, "NamespacedKey structureKey cannot be null");
 
-        final Optional<DefinedStructure> definedStructure = structureManager.structureRepository.get(CraftNamespacedKey.toMinecraft(structureKey));
+        final Optional<StructureTemplate> definedStructure = this.structureManager.structureRepository.get(CraftNamespacedKey.toMinecraft(structureKey));
         if (definedStructure == null) {
             return null;
         }
-        return definedStructure.map((s) -> new CraftStructure(s, registry)).orElse(null);
+        return definedStructure.map((s) -> new CraftStructure(s, this.registry)).orElse(null);
     }
 
     @Override
     public Structure loadStructure(NamespacedKey structureKey, boolean register) {
-        MinecraftKey minecraftKey = createAndValidateMinecraftStructureKey(structureKey);
+        ResourceLocation minecraftKey = this.createAndValidateMinecraftStructureKey(structureKey);
 
-        Optional<DefinedStructure> structure = structureManager.structureRepository.get(minecraftKey);
+        Optional<StructureTemplate> structure = this.structureManager.structureRepository.get(minecraftKey);
         structure = structure == null ? Optional.empty() : structure;
-        structure = structure.isPresent() ? structure : structureManager.loadFromGenerated(minecraftKey);
-        structure = structure.isPresent() ? structure : structureManager.loadFromResource(minecraftKey);
+        structure = structure.isPresent() ? structure : this.structureManager.loadFromGenerated(minecraftKey);
+        structure = structure.isPresent() ? structure : this.structureManager.loadFromResource(minecraftKey);
 
         if (register) {
-            structureManager.structureRepository.put(minecraftKey, structure);
+            this.structureManager.structureRepository.put(minecraftKey, structure);
         }
 
-        return structure.map((s) -> new CraftStructure(s, registry)).orElse(null);
+        return structure.map((s) -> new CraftStructure(s, this.registry)).orElse(null);
     }
 
     @Override
     public Structure loadStructure(NamespacedKey structureKey) {
-        return loadStructure(structureKey, true);
+        return this.loadStructure(structureKey, true);
     }
 
     @Override
     public void saveStructure(NamespacedKey structureKey) {
-        MinecraftKey minecraftKey = createAndValidateMinecraftStructureKey(structureKey);
+        ResourceLocation minecraftKey = this.createAndValidateMinecraftStructureKey(structureKey);
 
-        structureManager.save(minecraftKey);
+        this.structureManager.save(minecraftKey);
     }
 
     @Override
@@ -87,51 +87,51 @@ public class CraftStructureManager implements StructureManager {
         Preconditions.checkArgument(structureKey != null, "NamespacedKey structure cannot be null");
         Preconditions.checkArgument(structure != null, "Structure cannot be null");
 
-        File structureFile = getStructureFile(structureKey);
+        File structureFile = this.getStructureFile(structureKey);
         Files.createDirectories(structureFile.toPath().getParent());
-        saveStructure(structureFile, structure);
+        this.saveStructure(structureFile, structure);
     }
 
     @Override
     public Structure registerStructure(NamespacedKey structureKey, Structure structure) {
         Preconditions.checkArgument(structureKey != null, "NamespacedKey structureKey cannot be null");
         Preconditions.checkArgument(structure != null, "Structure cannot be null");
-        MinecraftKey minecraftKey = createAndValidateMinecraftStructureKey(structureKey);
+        ResourceLocation minecraftKey = this.createAndValidateMinecraftStructureKey(structureKey);
 
-        final Optional<DefinedStructure> optionalDefinedStructure = Optional.of(((CraftStructure) structure).getHandle());
-        final Optional<DefinedStructure> previousStructure = structureManager.structureRepository.put(minecraftKey, optionalDefinedStructure);
-        return previousStructure == null ? null : previousStructure.map((s) -> new CraftStructure(s, registry)).orElse(null);
+        final Optional<StructureTemplate> optionalDefinedStructure = Optional.of(((CraftStructure) structure).getHandle());
+        final Optional<StructureTemplate> previousStructure = this.structureManager.structureRepository.put(minecraftKey, optionalDefinedStructure);
+        return previousStructure == null ? null : previousStructure.map((s) -> new CraftStructure(s, this.registry)).orElse(null);
     }
 
     @Override
     public Structure unregisterStructure(NamespacedKey structureKey) {
         Preconditions.checkArgument(structureKey != null, "NamespacedKey structureKey cannot be null");
-        MinecraftKey minecraftKey = createAndValidateMinecraftStructureKey(structureKey);
+        ResourceLocation minecraftKey = this.createAndValidateMinecraftStructureKey(structureKey);
 
-        final Optional<DefinedStructure> previousStructure = structureManager.structureRepository.remove(minecraftKey);
-        return previousStructure == null ? null : previousStructure.map((s) -> new CraftStructure(s, registry)).orElse(null);
+        final Optional<StructureTemplate> previousStructure = this.structureManager.structureRepository.remove(minecraftKey);
+        return previousStructure == null ? null : previousStructure.map((s) -> new CraftStructure(s, this.registry)).orElse(null);
     }
 
     @Override
     public void deleteStructure(NamespacedKey structureKey) throws IOException {
-        deleteStructure(structureKey, true);
+        this.deleteStructure(structureKey, true);
     }
 
     @Override
     public void deleteStructure(NamespacedKey structureKey, boolean unregister) throws IOException {
-        MinecraftKey key = CraftNamespacedKey.toMinecraft(structureKey);
+        ResourceLocation key = CraftNamespacedKey.toMinecraft(structureKey);
 
         if (unregister) {
-            structureManager.structureRepository.remove(key);
+            this.structureManager.structureRepository.remove(key);
         }
-        Path path = structureManager.createAndValidatePathToGeneratedStructure(key, ".nbt");
+        Path path = this.structureManager.createAndValidatePathToGeneratedStructure(key, ".nbt");
         Files.deleteIfExists(path);
     }
 
     @Override
     public File getStructureFile(NamespacedKey structureKey) {
-        MinecraftKey minecraftKey = createAndValidateMinecraftStructureKey(structureKey);
-        return structureManager.createAndValidatePathToGeneratedStructure(minecraftKey, ".nbt").toFile();
+        ResourceLocation minecraftKey = this.createAndValidateMinecraftStructureKey(structureKey);
+        return this.structureManager.createAndValidatePathToGeneratedStructure(minecraftKey, ".nbt").toFile();
     }
 
     @Override
@@ -139,14 +139,14 @@ public class CraftStructureManager implements StructureManager {
         Preconditions.checkArgument(file != null, "File cannot be null");
 
         FileInputStream fileinputstream = new FileInputStream(file);
-        return loadStructure(fileinputstream);
+        return this.loadStructure(fileinputstream);
     }
 
     @Override
     public Structure loadStructure(InputStream inputStream) throws IOException {
         Preconditions.checkArgument(inputStream != null, "inputStream cannot be null");
 
-        return new CraftStructure(structureManager.readStructure(inputStream), registry);
+        return new CraftStructure(this.structureManager.readStructure(inputStream), this.registry);
     }
 
     @Override
@@ -155,7 +155,7 @@ public class CraftStructureManager implements StructureManager {
         Preconditions.checkArgument(structure != null, "structure cannot be null");
 
         FileOutputStream fileoutputstream = new FileOutputStream(file);
-        saveStructure(fileoutputstream, structure);
+        this.saveStructure(fileoutputstream, structure);
     }
 
     @Override
@@ -163,19 +163,19 @@ public class CraftStructureManager implements StructureManager {
         Preconditions.checkArgument(outputStream != null, "outputStream cannot be null");
         Preconditions.checkArgument(structure != null, "structure cannot be null");
 
-        NBTTagCompound nbttagcompound = ((CraftStructure) structure).getHandle().save(new NBTTagCompound());
-        NBTCompressedStreamTools.writeCompressed(nbttagcompound, outputStream);
+        CompoundTag nbttagcompound = ((CraftStructure) structure).getHandle().save(new CompoundTag());
+        NbtIo.writeCompressed(nbttagcompound, outputStream);
     }
 
     @Override
     public Structure createStructure() {
-        return new CraftStructure(new DefinedStructure(), registry);
+        return new CraftStructure(new StructureTemplate(), this.registry);
     }
 
-    private MinecraftKey createAndValidateMinecraftStructureKey(NamespacedKey structureKey) {
+    private ResourceLocation createAndValidateMinecraftStructureKey(NamespacedKey structureKey) {
         Preconditions.checkArgument(structureKey != null, "NamespacedKey structureKey cannot be null");
 
-        MinecraftKey minecraftkey = CraftNamespacedKey.toMinecraft(structureKey);
+        ResourceLocation minecraftkey = CraftNamespacedKey.toMinecraft(structureKey);
         Preconditions.checkArgument(!minecraftkey.getPath().contains("//"), "Resource key for Structures can not contain \"//\"");
         return minecraftkey;
     }
@@ -183,6 +183,6 @@ public class CraftStructureManager implements StructureManager {
     @Override
     public Structure copy(Structure structure) {
         Preconditions.checkArgument(structure != null, "Structure cannot be null");
-        return new CraftStructure(structureManager.readStructure(((CraftStructure) structure).getHandle().save(new NBTTagCompound())), registry);
+        return new CraftStructure(this.structureManager.readStructure(((CraftStructure) structure).getHandle().save(new CompoundTag())), this.registry);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftBlockTag.java b/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftBlockTag.java
index 4a92417e1d..d66bc8ceb1 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftBlockTag.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftBlockTag.java
@@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.tag;
 
 import java.util.Set;
 import java.util.stream.Collectors;
-import net.minecraft.core.IRegistry;
+import net.minecraft.core.Registry;
 import net.minecraft.tags.TagKey;
 import net.minecraft.world.level.block.Block;
 import org.bukkit.Material;
@@ -10,7 +10,7 @@ import org.bukkit.craftbukkit.block.CraftBlockType;
 
 public class CraftBlockTag extends CraftTag<Block, Material> {
 
-    public CraftBlockTag(IRegistry<Block> registry, TagKey<Block> tag) {
+    public CraftBlockTag(Registry<Block> registry, TagKey<Block> tag) {
         super(registry, tag);
     }
 
@@ -23,11 +23,11 @@ public class CraftBlockTag extends CraftTag<Block, Material> {
             return false;
         }
 
-        return block.builtInRegistryHolder().is(tag);
+        return block.builtInRegistryHolder().is(this.tag);
     }
 
     @Override
     public Set<Material> getValues() {
-        return getHandle().stream().map((block) -> CraftBlockType.minecraftToBukkit(block.value())).collect(Collectors.toUnmodifiableSet());
+        return this.getHandle().stream().map((block) -> CraftBlockType.minecraftToBukkit(block.value())).collect(Collectors.toUnmodifiableSet());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftDamageTag.java b/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftDamageTag.java
index 12a2660895..ee97ff023f 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftDamageTag.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftDamageTag.java
@@ -3,24 +3,24 @@ package org.bukkit.craftbukkit.tag;
 import java.util.Set;
 import java.util.stream.Collectors;
 import net.minecraft.core.Holder;
-import net.minecraft.core.IRegistry;
+import net.minecraft.core.Registry;
 import net.minecraft.tags.TagKey;
 import org.bukkit.craftbukkit.damage.CraftDamageType;
 import org.bukkit.damage.DamageType;
 
 public class CraftDamageTag extends CraftTag<net.minecraft.world.damagesource.DamageType, DamageType> {
 
-    public CraftDamageTag(IRegistry<net.minecraft.world.damagesource.DamageType> registry, TagKey<net.minecraft.world.damagesource.DamageType> tag) {
+    public CraftDamageTag(Registry<net.minecraft.world.damagesource.DamageType> registry, TagKey<net.minecraft.world.damagesource.DamageType> tag) {
         super(registry, tag);
     }
 
     @Override
     public boolean isTagged(DamageType type) {
-        return CraftDamageType.bukkitToMinecraftHolder(type).is(tag);
+        return CraftDamageType.bukkitToMinecraftHolder(type).is(this.tag);
     }
 
     @Override
     public Set<DamageType> getValues() {
-        return getHandle().stream().map(Holder::value).map(CraftDamageType::minecraftToBukkit).collect(Collectors.toUnmodifiableSet());
+        return this.getHandle().stream().map(Holder::value).map(CraftDamageType::minecraftToBukkit).collect(Collectors.toUnmodifiableSet());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftEntityTag.java b/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftEntityTag.java
index 85ec0c5c60..4270b771ff 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftEntityTag.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftEntityTag.java
@@ -3,25 +3,24 @@ package org.bukkit.craftbukkit.tag;
 import java.util.Set;
 import java.util.stream.Collectors;
 import net.minecraft.core.Holder;
-import net.minecraft.core.IRegistry;
+import net.minecraft.core.Registry;
 import net.minecraft.tags.TagKey;
-import net.minecraft.world.entity.EntityTypes;
 import org.bukkit.craftbukkit.entity.CraftEntityType;
 import org.bukkit.entity.EntityType;
 
-public class CraftEntityTag extends CraftTag<EntityTypes<?>, EntityType> {
+public class CraftEntityTag extends CraftTag<net.minecraft.world.entity.EntityType<?>, EntityType> {
 
-    public CraftEntityTag(IRegistry<EntityTypes<?>> registry, TagKey<EntityTypes<?>> tag) {
+    public CraftEntityTag(Registry<net.minecraft.world.entity.EntityType<?>> registry, TagKey<net.minecraft.world.entity.EntityType<?>> tag) {
         super(registry, tag);
     }
 
     @Override
     public boolean isTagged(EntityType entity) {
-        return CraftEntityType.bukkitToMinecraft(entity).is(tag);
+        return CraftEntityType.bukkitToMinecraft(entity).is(this.tag);
     }
 
     @Override
     public Set<EntityType> getValues() {
-        return getHandle().stream().map(Holder::value).map(CraftEntityType::minecraftToBukkit).collect(Collectors.toUnmodifiableSet());
+        return this.getHandle().stream().map(Holder::value).map(CraftEntityType::minecraftToBukkit).collect(Collectors.toUnmodifiableSet());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftFluidTag.java b/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftFluidTag.java
index efb03e841d..7f9a38f6a7 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftFluidTag.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftFluidTag.java
@@ -3,25 +3,24 @@ package org.bukkit.craftbukkit.tag;
 import java.util.Set;
 import java.util.stream.Collectors;
 import net.minecraft.core.Holder;
-import net.minecraft.core.IRegistry;
+import net.minecraft.core.Registry;
 import net.minecraft.tags.TagKey;
-import net.minecraft.world.level.material.FluidType;
 import org.bukkit.Fluid;
 import org.bukkit.craftbukkit.CraftFluid;
 
-public class CraftFluidTag extends CraftTag<FluidType, Fluid> {
+public class CraftFluidTag extends CraftTag<net.minecraft.world.level.material.Fluid, Fluid> {
 
-    public CraftFluidTag(IRegistry<FluidType> registry, TagKey<FluidType> tag) {
+    public CraftFluidTag(Registry<net.minecraft.world.level.material.Fluid> registry, TagKey<net.minecraft.world.level.material.Fluid> tag) {
         super(registry, tag);
     }
 
     @Override
     public boolean isTagged(Fluid fluid) {
-        return CraftFluid.bukkitToMinecraft(fluid).is(tag);
+        return CraftFluid.bukkitToMinecraft(fluid).is(this.tag);
     }
 
     @Override
     public Set<Fluid> getValues() {
-        return getHandle().stream().map(Holder::value).map(CraftFluid::minecraftToBukkit).collect(Collectors.toUnmodifiableSet());
+        return this.getHandle().stream().map(Holder::value).map(CraftFluid::minecraftToBukkit).collect(Collectors.toUnmodifiableSet());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftItemTag.java b/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftItemTag.java
index cbf2f019a5..d9f608a02c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftItemTag.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftItemTag.java
@@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.tag;
 
 import java.util.Set;
 import java.util.stream.Collectors;
-import net.minecraft.core.IRegistry;
+import net.minecraft.core.Registry;
 import net.minecraft.tags.TagKey;
 import net.minecraft.world.item.Item;
 import org.bukkit.Material;
@@ -10,7 +10,7 @@ import org.bukkit.craftbukkit.inventory.CraftItemType;
 
 public class CraftItemTag extends CraftTag<Item, Material> {
 
-    public CraftItemTag(IRegistry<Item> registry, TagKey<Item> tag) {
+    public CraftItemTag(Registry<Item> registry, TagKey<Item> tag) {
         super(registry, tag);
     }
 
@@ -23,11 +23,11 @@ public class CraftItemTag extends CraftTag<Item, Material> {
             return false;
         }
 
-        return minecraft.builtInRegistryHolder().is(tag);
+        return minecraft.builtInRegistryHolder().is(this.tag);
     }
 
     @Override
     public Set<Material> getValues() {
-        return getHandle().stream().map((item) -> CraftItemType.minecraftToBukkit(item.value())).collect(Collectors.toUnmodifiableSet());
+        return this.getHandle().stream().map((item) -> CraftItemType.minecraftToBukkit(item.value())).collect(Collectors.toUnmodifiableSet());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftTag.java b/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftTag.java
index 0f26ded9c1..31fe49bfb4 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftTag.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/tag/CraftTag.java
@@ -2,7 +2,7 @@ package org.bukkit.craftbukkit.tag;
 
 import java.util.Objects;
 import net.minecraft.core.HolderSet;
-import net.minecraft.core.IRegistry;
+import net.minecraft.core.Registry;
 import net.minecraft.tags.TagKey;
 import org.bukkit.Keyed;
 import org.bukkit.NamespacedKey;
@@ -11,24 +11,24 @@ import org.bukkit.craftbukkit.util.CraftNamespacedKey;
 
 public abstract class CraftTag<N, B extends Keyed> implements Tag<B> {
 
-    protected final IRegistry<N> registry;
+    protected final Registry<N> registry;
     protected final TagKey<N> tag;
     //
     private HolderSet.Named<N> handle;
 
-    public CraftTag(IRegistry<N> registry, TagKey<N> tag) {
+    public CraftTag(Registry<N> registry, TagKey<N> tag) {
         this.registry = registry;
         this.tag = tag;
         this.handle = registry.get(this.tag).orElseThrow();
     }
 
     public HolderSet.Named<N> getHandle() {
-        return handle;
+        return this.handle;
     }
 
     @Override
     public NamespacedKey getKey() {
-        return CraftNamespacedKey.fromMinecraft(tag.location());
+        return CraftNamespacedKey.fromMinecraft(this.tag.location());
     }
 
     @Override
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/ApiVersion.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/ApiVersion.java
index b59c2cb819..3c50d80b6a 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/ApiVersion.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/ApiVersion.java
@@ -43,10 +43,10 @@ public final class ApiVersion implements Comparable<ApiVersion>, Serializable {
 
     public static ApiVersion getOrCreateVersion(String versionString) {
         if (versionString == null || versionString.trim().isEmpty() || versionString.equalsIgnoreCase("none")) {
-            return versions.computeIfAbsent("none", s -> new ApiVersion());
+            return ApiVersion.versions.computeIfAbsent("none", s -> new ApiVersion());
         }
 
-        ApiVersion version = versions.get(versionString);
+        ApiVersion version = ApiVersion.versions.get(versionString);
 
         if (version != null) {
             return version;
@@ -58,18 +58,18 @@ public final class ApiVersion implements Comparable<ApiVersion>, Serializable {
             throw new IllegalArgumentException(String.format("API version string should be of format \"major.minor.patch\" or \"major.minor\", where \"major\", \"minor\" and \"patch\" are numbers. For example \"1.18.2\" or \"1.13\", but got '%s' instead.", versionString));
         }
 
-        int major = parseNumber(versionParts[0]);
-        int minor = parseNumber(versionParts[1]);
+        int major = ApiVersion.parseNumber(versionParts[0]);
+        int minor = ApiVersion.parseNumber(versionParts[1]);
 
         int patch;
         if (versionParts.length == 3) {
-            patch = parseNumber(versionParts[2]);
+            patch = ApiVersion.parseNumber(versionParts[2]);
         } else {
             patch = 0;
         }
 
-        versionString = toVersionString(major, minor, patch);
-        return versions.computeIfAbsent(versionString, s -> new ApiVersion(major, minor, patch));
+        versionString = ApiVersion.toVersionString(major, minor, patch);
+        return ApiVersion.versions.computeIfAbsent(versionString, s -> new ApiVersion(major, minor, patch));
     }
 
     private static int parseNumber(String number) {
@@ -82,46 +82,46 @@ public final class ApiVersion implements Comparable<ApiVersion>, Serializable {
 
     @Override
     public int compareTo(@NotNull ApiVersion other) {
-        int result = Integer.compare(major, other.major);
+        int result = Integer.compare(this.major, other.major);
 
         if (result == 0) {
-            result = Integer.compare(minor, other.minor);
+            result = Integer.compare(this.minor, other.minor);
         }
 
         if (result == 0) {
-            result = Integer.compare(patch, other.patch);
+            result = Integer.compare(this.patch, other.patch);
         }
 
         return result;
     }
 
     public String getVersionString() {
-        if (none) {
+        if (this.none) {
             return "none";
         }
 
-        return toVersionString(major, minor, patch);
+        return ApiVersion.toVersionString(this.major, this.minor, this.patch);
     }
 
     public boolean isNewerThan(ApiVersion apiVersion) {
-        return compareTo(apiVersion) > 0;
+        return this.compareTo(apiVersion) > 0;
     }
 
     public boolean isOlderThan(ApiVersion apiVersion) {
-        return compareTo(apiVersion) < 0;
+        return this.compareTo(apiVersion) < 0;
     }
 
     public boolean isNewerThanOrSameAs(ApiVersion apiVersion) {
-        return compareTo(apiVersion) >= 0;
+        return this.compareTo(apiVersion) >= 0;
     }
 
     public boolean isOlderThanOrSameAs(ApiVersion apiVersion) {
-        return compareTo(apiVersion) <= 0;
+        return this.compareTo(apiVersion) <= 0;
     }
 
     @Override
     public String toString() {
-        return getVersionString();
+        return this.getVersionString();
     }
 
     private static final long serialVersionUID = 0L;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java
index c258a6d1a6..e32321f466 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/BlockStateListPopulator.java
@@ -7,88 +7,87 @@ import java.util.List;
 import java.util.Map;
 import java.util.Set;
 import java.util.function.Predicate;
-import net.minecraft.core.BlockPosition;
-import net.minecraft.core.IRegistryCustom;
-import net.minecraft.server.level.WorldServer;
+import net.minecraft.core.BlockPos;
+import net.minecraft.core.RegistryAccess;
+import net.minecraft.server.level.ServerLevel;
 import net.minecraft.util.RandomSource;
-import net.minecraft.world.level.GeneratorAccess;
-import net.minecraft.world.level.block.ITileEntity;
-import net.minecraft.world.level.block.entity.TileEntity;
-import net.minecraft.world.level.block.state.IBlockData;
-import net.minecraft.world.level.dimension.DimensionManager;
-import net.minecraft.world.level.material.Fluid;
-import net.minecraft.world.level.storage.WorldData;
+import net.minecraft.world.level.LevelAccessor;
+import net.minecraft.world.level.block.EntityBlock;
+import net.minecraft.world.level.block.entity.BlockEntity;
+import net.minecraft.world.level.dimension.DimensionType;
+import net.minecraft.world.level.material.FluidState;
+import net.minecraft.world.level.storage.LevelData;
 import org.bukkit.block.BlockState;
 import org.bukkit.craftbukkit.block.CraftBlock;
 import org.bukkit.craftbukkit.block.CraftBlockEntityState;
 import org.bukkit.craftbukkit.block.CraftBlockState;
 
 public class BlockStateListPopulator extends DummyGeneratorAccess {
-    private final GeneratorAccess world;
-    private final Map<BlockPosition, IBlockData> dataMap = new HashMap<>();
-    private final Map<BlockPosition, TileEntity> entityMap = new HashMap<>();
-    private final LinkedHashMap<BlockPosition, CraftBlockState> list;
+    private final LevelAccessor world;
+    private final Map<BlockPos, net.minecraft.world.level.block.state.BlockState> dataMap = new HashMap<>();
+    private final Map<BlockPos, BlockEntity> entityMap = new HashMap<>();
+    private final LinkedHashMap<BlockPos, CraftBlockState> list;
 
-    public BlockStateListPopulator(GeneratorAccess world) {
+    public BlockStateListPopulator(LevelAccessor world) {
         this(world, new LinkedHashMap<>());
     }
 
-    private BlockStateListPopulator(GeneratorAccess world, LinkedHashMap<BlockPosition, CraftBlockState> list) {
+    private BlockStateListPopulator(LevelAccessor world, LinkedHashMap<BlockPos, CraftBlockState> list) {
         this.world = world;
         this.list = list;
     }
 
     @Override
-    public IBlockData getBlockState(BlockPosition bp) {
-        IBlockData blockData = dataMap.get(bp);
-        return (blockData != null) ? blockData : world.getBlockState(bp);
+    public net.minecraft.world.level.block.state.BlockState getBlockState(BlockPos pos) {
+        net.minecraft.world.level.block.state.BlockState blockData = this.dataMap.get(pos);
+        return (blockData != null) ? blockData : this.world.getBlockState(pos);
     }
 
     @Override
-    public Fluid getFluidState(BlockPosition bp) {
-        IBlockData blockData = dataMap.get(bp);
-        return (blockData != null) ? blockData.getFluidState() : world.getFluidState(bp);
+    public FluidState getFluidState(BlockPos pos) {
+        net.minecraft.world.level.block.state.BlockState blockData = this.dataMap.get(pos);
+        return (blockData != null) ? blockData.getFluidState() : this.world.getFluidState(pos);
     }
 
     @Override
-    public TileEntity getBlockEntity(BlockPosition blockposition) {
+    public BlockEntity getBlockEntity(BlockPos pos) {
         // The contains is important to check for null values
-        if (entityMap.containsKey(blockposition)) {
-            return entityMap.get(blockposition);
+        if (this.entityMap.containsKey(pos)) {
+            return this.entityMap.get(pos);
         }
 
-        return world.getBlockEntity(blockposition);
+        return this.world.getBlockEntity(pos);
     }
 
     @Override
-    public boolean setBlock(BlockPosition position, IBlockData data, int flag) {
-        position = position.immutable();
+    public boolean setBlock(BlockPos pos, net.minecraft.world.level.block.state.BlockState state, int flags) {
+        pos = pos.immutable();
         // remove first to keep insertion order
-        list.remove(position);
+        this.list.remove(pos);
 
-        dataMap.put(position, data);
-        if (data.hasBlockEntity()) {
-            entityMap.put(position, ((ITileEntity) data.getBlock()).newBlockEntity(position, data));
+        this.dataMap.put(pos, state);
+        if (state.hasBlockEntity()) {
+            this.entityMap.put(pos, ((EntityBlock) state.getBlock()).newBlockEntity(pos, state));
         } else {
-            entityMap.put(position, null);
+            this.entityMap.put(pos, null);
         }
 
         // use 'this' to ensure that the block state is the correct TileState
-        CraftBlockState state = (CraftBlockState) CraftBlock.at(this, position).getState();
-        state.setFlag(flag);
+        CraftBlockState state1 = (CraftBlockState) CraftBlock.at(this, pos).getState();
+        state1.setFlag(flags);
         // set world handle to ensure that updated calls are done to the world and not to this populator
-        state.setWorldHandle(world);
-        list.put(position, state);
+        state1.setWorldHandle(this.world);
+        this.list.put(pos, state1);
         return true;
     }
 
     @Override
-    public WorldServer getMinecraftWorld() {
-        return world.getMinecraftWorld();
+    public ServerLevel getMinecraftWorld() {
+        return this.world.getMinecraftWorld();
     }
 
     public void refreshTiles() {
-        for (CraftBlockState state : list.values()) {
+        for (CraftBlockState state : this.list.values()) {
             if (state instanceof CraftBlockEntityState) {
                 ((CraftBlockEntityState<?>) state).refreshSnapshot();
             }
@@ -96,68 +95,68 @@ public class BlockStateListPopulator extends DummyGeneratorAccess {
     }
 
     public void updateList() {
-        for (BlockState state : list.values()) {
+        for (BlockState state : this.list.values()) {
             state.update(true);
         }
     }
 
-    public Set<BlockPosition> getBlocks() {
-        return list.keySet();
+    public Set<BlockPos> getBlocks() {
+        return this.list.keySet();
     }
 
     public List<CraftBlockState> getList() {
-        return new ArrayList<>(list.values());
+        return new ArrayList<>(this.list.values());
     }
 
-    public GeneratorAccess getWorld() {
-        return world;
+    public LevelAccessor getWorld() {
+        return this.world;
     }
 
     // For tree generation
     @Override
     public int getMinY() {
-        return getWorld().getMinY();
+        return this.getWorld().getMinY();
     }
 
     @Override
     public int getHeight() {
-        return getWorld().getHeight();
+        return this.getWorld().getHeight();
     }
 
     @Override
-    public boolean isStateAtPosition(BlockPosition blockposition, Predicate<IBlockData> predicate) {
-        return predicate.test(getBlockState(blockposition));
+    public boolean isStateAtPosition(BlockPos pos, Predicate<net.minecraft.world.level.block.state.BlockState> state) {
+        return state.test(this.getBlockState(pos));
     }
 
     @Override
-    public boolean isFluidAtPosition(BlockPosition bp, Predicate<Fluid> prdct) {
-        return world.isFluidAtPosition(bp, prdct);
+    public boolean isFluidAtPosition(BlockPos pos, Predicate<FluidState> state) {
+        return this.world.isFluidAtPosition(pos, state);
     }
 
     @Override
-    public DimensionManager dimensionType() {
-        return world.dimensionType();
+    public DimensionType dimensionType() {
+        return this.world.dimensionType();
     }
 
     @Override
-    public IRegistryCustom registryAccess() {
-        return world.registryAccess();
+    public RegistryAccess registryAccess() {
+        return this.world.registryAccess();
     }
 
     // Needed when a tree generates in water
     @Override
-    public WorldData getLevelData() {
-        return world.getLevelData();
+    public LevelData getLevelData() {
+        return this.world.getLevelData();
     }
 
     @Override
     public long nextSubTickCount() {
-        return world.nextSubTickCount();
+        return this.world.nextSubTickCount();
     }
 
     // SPIGOT-7966: Needed for some tree generations
     @Override
     public RandomSource getRandom() {
-        return world.getRandom();
+        return this.world.getRandom();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/ClassTraverser.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/ClassTraverser.java
index 2e118c417c..600d7415c2 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/ClassTraverser.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/ClassTraverser.java
@@ -18,28 +18,28 @@ public class ClassTraverser implements Iterator<Class<?>> {
 
     @Override
     public boolean hasNext() {
-        return next != null;
+        return this.next != null;
     }
 
     @Override
     public Class<?> next() {
-        Class<?> clazz = next;
+        Class<?> clazz = this.next;
 
-        visit.add(next);
+        this.visit.add(this.next);
 
         Set<Class<?>> classes = Sets.newHashSet(clazz.getInterfaces());
         classes.add(clazz.getSuperclass());
         classes.remove(null); // Super class can be null, remove it if this is the case
-        classes.removeAll(visit);
-        toVisit.addAll(classes);
+        classes.removeAll(this.visit);
+        this.toVisit.addAll(classes);
 
-        if (toVisit.isEmpty()) {
-            next = null;
+        if (this.toVisit.isEmpty()) {
+            this.next = null;
             return clazz;
         }
 
-        next = toVisit.iterator().next();
-        toVisit.remove(next);
+        this.next = this.toVisit.iterator().next();
+        this.toVisit.remove(this.next);
 
         return clazz;
     }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/Commodore.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
index 79e734f569..40fbbff1df 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/Commodore.java
@@ -103,29 +103,29 @@ public class Commodore {
     }
 
     public Commodore(Predicate<String> compatibilityPresent) {
-        updateReroute(compatibilityPresent);
+        this.updateReroute(compatibilityPresent);
     }
 
     public void updateReroute(Predicate<String> compatibilityPresent) {
-        materialReroute = RerouteBuilder
+        this.materialReroute = RerouteBuilder
                 .create(compatibilityPresent)
                 .forClass(MaterialRerouting.class)
                 .build();
-        reroute = RerouteBuilder
+        this.reroute = RerouteBuilder
                 .create(compatibilityPresent)
                 .forClass(FieldRename.class)
                 .forClass(MethodRerouting.class)
                 .forClass(EnumEvil.class)
                 .build();
 
-        reroutes.clear();
-        reroutes.add(materialReroute);
-        reroutes.add(reroute);
+        this.reroutes.clear();
+        this.reroutes.add(this.materialReroute);
+        this.reroutes.add(this.reroute);
     }
 
     @VisibleForTesting
     public List<Reroute> getReroutes() {
-        return reroutes;
+        return this.reroutes;
     }
 
     public static void main(String[] args) {
@@ -148,11 +148,11 @@ public class Commodore {
 
             for (File in : input.listFiles()) {
                 if (in.getName().endsWith(".jar")) {
-                    convert(in, new File(output, in.getName()), commodore);
+                    Commodore.convert(in, new File(output, in.getName()), commodore);
                 }
             }
         } else {
-            convert(input, output, commodore);
+            Commodore.convert(input, output, commodore);
         }
     }
 
@@ -198,7 +198,7 @@ public class Commodore {
         ClassReader cr = new ClassReader(b);
         ClassWriter cw = new ClassWriter(cr, 0);
 
-        List<String> methodEnumSignatures = getMethodSignatures(b);
+        List<String> methodEnumSignatures = Commodore.getMethodSignatures(b);
         Multimap<String, String> enumLessToEnum = HashMultimap.create();
         for (String method : methodEnumSignatures) {
             enumLessToEnum.put(method.replace("Ljava/lang/Enum;", "Ljava/lang/Object;"), method);
@@ -206,7 +206,7 @@ public class Commodore {
 
         ClassVisitor visitor = cw;
         if (enumCompatibility) {
-            visitor = new LimitedClassRemapper(cw, new SimpleRemapper(ENUM_RENAMES));
+            visitor = new LimitedClassRemapper(cw, new SimpleRemapper(Commodore.ENUM_RENAMES));
         }
 
         cr.accept(new ClassRemapper(new ClassVisitor(Opcodes.ASM9, visitor) {
@@ -216,9 +216,9 @@ public class Commodore {
 
             @Override
             public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
-                className = name;
-                isInterface = (access & Opcodes.ACC_INTERFACE) != 0;
-                String craftbukkitClass = CLASS_TO_INTERFACE.get(superName);
+                this.className = name;
+                this.isInterface = (access & Opcodes.ACC_INTERFACE) != 0;
+                String craftbukkitClass = Commodore.CLASS_TO_INTERFACE.get(superName);
                 if (craftbukkitClass != null) {
                     superName = craftbukkitClass;
                 }
@@ -227,8 +227,8 @@ public class Commodore {
 
             @Override
             public void visitEnd() {
-                for (RerouteMethodData rerouteMethodData : rerouteMethodData) {
-                    MethodVisitor methodVisitor = super.visitMethod(Opcodes.ACC_STATIC | Opcodes.ACC_SYNTHETIC | Opcodes.ACC_PUBLIC, buildMethodName(rerouteMethodData), buildMethodDesc(rerouteMethodData), null, null);
+                for (RerouteMethodData rerouteMethodData : this.rerouteMethodData) {
+                    MethodVisitor methodVisitor = super.visitMethod(Opcodes.ACC_STATIC | Opcodes.ACC_SYNTHETIC | Opcodes.ACC_PUBLIC, Commodore.buildMethodName(rerouteMethodData), Commodore.buildMethodDesc(rerouteMethodData), null, null);
                     methodVisitor.visitCode();
                     int index = 0;
                     int extraSize = 0;
@@ -263,12 +263,12 @@ public class Commodore {
 
             @Override
             public AnnotationVisitor visitAnnotation(String descriptor, boolean visible) {
-                return createAnnotationVisitor(pluginVersion, api, super.visitAnnotation(descriptor, visible));
+                return Commodore.createAnnotationVisitor(pluginVersion, this.api, super.visitAnnotation(descriptor, visible));
             }
 
             @Override
             public AnnotationVisitor visitTypeAnnotation(int typeRef, TypePath typePath, String descriptor, boolean visible) {
-                return createAnnotationVisitor(pluginVersion, api, super.visitTypeAnnotation(typeRef, typePath, descriptor, visible));
+                return Commodore.createAnnotationVisitor(pluginVersion, this.api, super.visitTypeAnnotation(typeRef, typePath, descriptor, visible));
             }
 
             @Override
@@ -282,7 +282,7 @@ public class Commodore {
                     }
                 }
 
-                return new MethodVisitor(api, super.visitMethod(access, name, desc, signature, exceptions)) {
+                return new MethodVisitor(this.api, super.visitMethod(access, name, desc, signature, exceptions)) {
 
                     @Override
                     public void visitFieldInsn(int opcode, String owner, String name, String desc) {
@@ -359,11 +359,11 @@ public class Commodore {
                     }
 
                     private void handleMethod(MethodPrinter visitor, int opcode, String owner, String name, String desc, boolean itf, Type samMethodType, Type instantiatedMethodType) {
-                        if (checkReroute(visitor, reroute, opcode, owner, name, desc, samMethodType, instantiatedMethodType)) {
+                        if (this.checkReroute(visitor, Commodore.this.reroute, opcode, owner, name, desc, samMethodType, instantiatedMethodType)) {
                             return;
                         }
 
-                        String craftbukkitClass = CLASS_TO_INTERFACE.get(owner);
+                        String craftbukkitClass = Commodore.CLASS_TO_INTERFACE.get(owner);
                         if (craftbukkitClass != null) {
                             if (opcode == Opcodes.INVOKESPECIAL || opcode == Opcodes.H_INVOKESPECIAL) {
                                 owner = craftbukkitClass;
@@ -428,7 +428,7 @@ public class Commodore {
                         Type retType = Type.getReturnType(desc);
 
                         // TODO 2024-05-22: This can be moved over to use the reroute api
-                        if (EVIL.contains(owner + " " + desc + " " + name)
+                        if (Commodore.EVIL.contains(owner + " " + desc + " " + name)
                                 || (owner.startsWith("org/bukkit/block/") && (desc + " " + name).equals("()I getTypeId"))
                                 || (owner.startsWith("org/bukkit/block/") && (desc + " " + name).equals("(I)Z setTypeId"))) {
                             Type[] args = Type.getArgumentTypes(desc);
@@ -471,7 +471,7 @@ public class Commodore {
                         }
 
                         // TODO 2024-05-21: Move this up, when material gets fully replaced with ItemType and BlockType
-                        if (owner.startsWith("org/bukkit") && checkReroute(visitor, materialReroute, opcode, owner, name, desc, samMethodType, instantiatedMethodType)) {
+                        if (owner.startsWith("org/bukkit") && this.checkReroute(visitor, Commodore.this.materialReroute, opcode, owner, name, desc, samMethodType, instantiatedMethodType)) {
                             return;
                         }
 
@@ -479,15 +479,15 @@ public class Commodore {
                     }
 
                     private boolean checkReroute(MethodPrinter visitor, Reroute reroute, int opcode, String owner, String name, String desc, Type samMethodType, Type instantiatedMethodType) {
-                        return rerouteMethods(pluginVersion, reroute, opcode == Opcodes.INVOKESTATIC || opcode == Opcodes.H_INVOKESTATIC, owner, name, desc, data -> {
-                            visitor.visit(Opcodes.INVOKESTATIC, className, buildMethodName(data), buildMethodDesc(data), isInterface, samMethodType, instantiatedMethodType);
+                        return Commodore.rerouteMethods(pluginVersion, reroute, opcode == Opcodes.INVOKESTATIC || opcode == Opcodes.H_INVOKESTATIC, owner, name, desc, data -> {
+                            visitor.visit(Opcodes.INVOKESTATIC, className, Commodore.buildMethodName(data), Commodore.buildMethodDesc(data), isInterface, samMethodType, instantiatedMethodType);
                             rerouteMethodData.add(data);
                         });
                     }
 
                     @Override
                     public void visitMethodInsn(int opcode, String owner, String name, String desc, boolean itf) {
-                        handleMethod((newOpcode, newOwner, newName, newDescription, newItf, newSam, newInstantiated) -> {
+                        this.handleMethod((newOpcode, newOwner, newName, newDescription, newItf, newSam, newInstantiated) -> {
                             super.visitMethodInsn(newOpcode, newOwner, newName, newDescription, newItf);
                         }, opcode, owner, name, desc, itf, null, null);
                     }
@@ -510,7 +510,7 @@ public class Commodore {
                             Handle implMethod = (Handle) bootstrapMethodArguments[1];
                             Type instantiatedMethodType = (Type) bootstrapMethodArguments[2];
 
-                            handleMethod((newOpcode, newOwner, newName, newDescription, newItf, newSam, newInstantiated) -> {
+                            this.handleMethod((newOpcode, newOwner, newName, newDescription, newItf, newSam, newInstantiated) -> {
                                 if (newOpcode == Opcodes.INVOKESTATIC) {
                                     newOpcode = Opcodes.H_INVOKESTATIC;
                                 }
@@ -534,71 +534,71 @@ public class Commodore {
 
                     @Override
                     public AnnotationVisitor visitAnnotation(String descriptor, boolean visible) {
-                        return createAnnotationVisitor(pluginVersion, api, super.visitAnnotation(descriptor, visible));
+                        return Commodore.createAnnotationVisitor(pluginVersion, this.api, super.visitAnnotation(descriptor, visible));
                     }
 
                     @Override
                     public AnnotationVisitor visitAnnotationDefault() {
-                        return createAnnotationVisitor(pluginVersion, api, super.visitAnnotationDefault());
+                        return Commodore.createAnnotationVisitor(pluginVersion, this.api, super.visitAnnotationDefault());
                     }
 
                     @Override
                     public AnnotationVisitor visitInsnAnnotation(int typeRef, TypePath typePath, String descriptor, boolean visible) {
-                        return createAnnotationVisitor(pluginVersion, api, super.visitInsnAnnotation(typeRef, typePath, descriptor, visible));
+                        return Commodore.createAnnotationVisitor(pluginVersion, this.api, super.visitInsnAnnotation(typeRef, typePath, descriptor, visible));
                     }
 
                     @Override
                     public AnnotationVisitor visitLocalVariableAnnotation(int typeRef, TypePath typePath, Label[] start, Label[] end, int[] index, String descriptor, boolean visible) {
-                        return createAnnotationVisitor(pluginVersion, api, super.visitLocalVariableAnnotation(typeRef, typePath, start, end, index, descriptor, visible));
+                        return Commodore.createAnnotationVisitor(pluginVersion, this.api, super.visitLocalVariableAnnotation(typeRef, typePath, start, end, index, descriptor, visible));
                     }
 
                     @Override
                     public AnnotationVisitor visitParameterAnnotation(int parameter, String descriptor, boolean visible) {
-                        return createAnnotationVisitor(pluginVersion, api, super.visitParameterAnnotation(parameter, descriptor, visible));
+                        return Commodore.createAnnotationVisitor(pluginVersion, this.api, super.visitParameterAnnotation(parameter, descriptor, visible));
                     }
 
                     @Override
                     public AnnotationVisitor visitTryCatchAnnotation(int typeRef, TypePath typePath, String descriptor, boolean visible) {
-                        return createAnnotationVisitor(pluginVersion, api, super.visitTryCatchAnnotation(typeRef, typePath, descriptor, visible));
+                        return Commodore.createAnnotationVisitor(pluginVersion, this.api, super.visitTryCatchAnnotation(typeRef, typePath, descriptor, visible));
                     }
 
                     @Override
                     public AnnotationVisitor visitTypeAnnotation(int typeRef, TypePath typePath, String descriptor, boolean visible) {
-                        return createAnnotationVisitor(pluginVersion, api, super.visitTypeAnnotation(typeRef, typePath, descriptor, visible));
+                        return Commodore.createAnnotationVisitor(pluginVersion, this.api, super.visitTypeAnnotation(typeRef, typePath, descriptor, visible));
                     }
                 };
             }
 
             @Override
             public FieldVisitor visitField(int access, String name, String descriptor, String signature, Object value) {
-                return new FieldVisitor(api, super.visitField(access, name, descriptor, signature, value)) {
+                return new FieldVisitor(this.api, super.visitField(access, name, descriptor, signature, value)) {
                     @Override
                     public AnnotationVisitor visitAnnotation(String descriptor, boolean visible) {
-                        return createAnnotationVisitor(pluginVersion, api, super.visitAnnotation(descriptor, visible));
+                        return Commodore.createAnnotationVisitor(pluginVersion, this.api, super.visitAnnotation(descriptor, visible));
                     }
 
                     @Override
                     public AnnotationVisitor visitTypeAnnotation(int typeRef, TypePath typePath, String descriptor, boolean visible) {
-                        return createAnnotationVisitor(pluginVersion, api, super.visitTypeAnnotation(typeRef, typePath, descriptor, visible));
+                        return Commodore.createAnnotationVisitor(pluginVersion, this.api, super.visitTypeAnnotation(typeRef, typePath, descriptor, visible));
                     }
                 };
             }
 
             @Override
             public RecordComponentVisitor visitRecordComponent(String name, String descriptor, String signature) {
-                return new RecordComponentVisitor(api, super.visitRecordComponent(name, descriptor, signature)) {
+                return new RecordComponentVisitor(this.api, super.visitRecordComponent(name, descriptor, signature)) {
                     @Override
                     public AnnotationVisitor visitAnnotation(String descriptor, boolean visible) {
-                        return createAnnotationVisitor(pluginVersion, api, super.visitAnnotation(descriptor, visible));
+                        return Commodore.createAnnotationVisitor(pluginVersion, this.api, super.visitAnnotation(descriptor, visible));
                     }
 
                     @Override
                     public AnnotationVisitor visitTypeAnnotation(int typeRef, TypePath typePath, String descriptor, boolean visible) {
-                        return createAnnotationVisitor(pluginVersion, api, super.visitTypeAnnotation(typeRef, typePath, descriptor, visible));
+                        return Commodore.createAnnotationVisitor(pluginVersion, this.api, super.visitTypeAnnotation(typeRef, typePath, descriptor, visible));
                     }
                 };
             }
-        }, new SimpleRemapper(RENAMES)), 0);
+        }, new SimpleRemapper(Commodore.RENAMES)), 0);
 
         return cw.toByteArray();
     }
@@ -612,12 +612,12 @@ public class Commodore {
 
             @Override
             public AnnotationVisitor visitArray(String name) {
-                return createAnnotationVisitor(apiVersion, api, super.visitArray(name));
+                return Commodore.createAnnotationVisitor(apiVersion, this.api, super.visitArray(name));
             }
 
             @Override
             public AnnotationVisitor visitAnnotation(String name, String descriptor) {
-                return createAnnotationVisitor(apiVersion, api, super.visitAnnotation(name, descriptor));
+                return Commodore.createAnnotationVisitor(apiVersion, this.api, super.visitAnnotation(name, descriptor));
             }
         };
     }
@@ -641,7 +641,7 @@ public class Commodore {
     }
 
     private static String buildMethodName(RerouteMethodData rerouteMethodData) {
-        return BUKKIT_GENERATED_METHOD_PREFIX + rerouteMethodData.targetOwner().replace('/', '_') + "_" + rerouteMethodData.targetName();
+        return Commodore.BUKKIT_GENERATED_METHOD_PREFIX + rerouteMethodData.targetOwner().replace('/', '_') + "_" + rerouteMethodData.targetName();
     }
 
     private static String buildMethodDesc(RerouteMethodData rerouteMethodData) {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftBiomeSearchResult.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftBiomeSearchResult.java
index fede3daf6a..2c82b228ff 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftBiomeSearchResult.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftBiomeSearchResult.java
@@ -15,10 +15,10 @@ public class CraftBiomeSearchResult implements BiomeSearchResult {
     }
 
     public Biome getBiome() {
-        return biome;
+        return this.biome;
     }
 
     public Location getLocation() {
-        return location;
+        return this.location;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftBlockVector.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftBlockVector.java
index 29c59e3568..001d2edb0d 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftBlockVector.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftBlockVector.java
@@ -1,7 +1,7 @@
 package org.bukkit.craftbukkit.util;
 
-import net.minecraft.core.BaseBlockPosition;
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
+import net.minecraft.core.Vec3i;
 import org.bukkit.util.BlockVector;
 
 public final class CraftBlockVector {
@@ -9,11 +9,11 @@ public final class CraftBlockVector {
     private CraftBlockVector() {
     }
 
-    public static BlockPosition toBlockPosition(BlockVector blockVector) {
-        return new BlockPosition(blockVector.getBlockX(), blockVector.getBlockY(), blockVector.getBlockZ());
+    public static BlockPos toBlockPosition(BlockVector blockVector) {
+        return new BlockPos(blockVector.getBlockX(), blockVector.getBlockY(), blockVector.getBlockZ());
     }
 
-    public static BlockVector toBukkit(BaseBlockPosition baseBlockPosition) {
+    public static BlockVector toBukkit(Vec3i baseBlockPosition) {
         return new BlockVector(baseBlockPosition.getX(), baseBlockPosition.getY(), baseBlockPosition.getZ());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
index 7b18149ecc..ff04061308 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftChatMessage.java
@@ -10,14 +10,14 @@ import java.util.Map;
 import java.util.Optional;
 import java.util.regex.Matcher;
 import java.util.regex.Pattern;
-import net.minecraft.EnumChatFormat;
-import net.minecraft.network.chat.ChatClickable;
-import net.minecraft.network.chat.ChatClickable.EnumClickAction;
-import net.minecraft.network.chat.ChatHexColor;
-import net.minecraft.network.chat.ChatModifier;
-import net.minecraft.network.chat.IChatBaseComponent;
-import net.minecraft.network.chat.IChatMutableComponent;
-import net.minecraft.network.chat.contents.LiteralContents;
+import net.minecraft.ChatFormatting;
+import net.minecraft.network.chat.ClickEvent;
+import net.minecraft.network.chat.ClickEvent.Action;
+import net.minecraft.network.chat.Component;
+import net.minecraft.network.chat.MutableComponent;
+import net.minecraft.network.chat.Style;
+import net.minecraft.network.chat.TextColor;
+import net.minecraft.network.chat.contents.PlainTextContents;
 import net.minecraft.network.chat.contents.TranslatableContents;
 import net.minecraft.server.MinecraftServer;
 import org.bukkit.ChatColor;
@@ -25,21 +25,21 @@ import org.bukkit.ChatColor;
 public final class CraftChatMessage {
 
     private static final Pattern LINK_PATTERN = Pattern.compile("((?:(?:https?):\\/\\/)?(?:[-\\w_\\.]{2,}\\.[a-z]{2,4}.*?(?=[\\.\\?!,;:]?(?:[" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + " \\n]|$))))");
-    private static final Map<Character, EnumChatFormat> formatMap;
+    private static final Map<Character, ChatFormatting> formatMap;
 
     static {
-        Builder<Character, EnumChatFormat> builder = ImmutableMap.builder();
-        for (EnumChatFormat format : EnumChatFormat.values()) {
+        Builder<Character, ChatFormatting> builder = ImmutableMap.builder();
+        for (ChatFormatting format : ChatFormatting.values()) {
             builder.put(Character.toLowerCase(format.toString().charAt(1)), format);
         }
         formatMap = builder.build();
     }
 
-    public static EnumChatFormat getColor(ChatColor color) {
-        return formatMap.get(color.getChar());
+    public static ChatFormatting getColor(ChatColor color) {
+        return CraftChatMessage.formatMap.get(color.getChar());
     }
 
-    public static ChatColor getColor(EnumChatFormat format) {
+    public static ChatColor getColor(ChatFormatting format) {
         return ChatColor.getByChar(format.code);
     }
 
@@ -48,12 +48,12 @@ public final class CraftChatMessage {
         // Separate pattern with no group 3, new lines are part of previous string
         private static final Pattern INCREMENTAL_PATTERN_KEEP_NEWLINES = Pattern.compile("(" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + "[0-9a-fk-orx])|((?:(?:https?):\\/\\/)?(?:[-\\w_\\.]{2,}\\.[a-z]{2,4}.*?(?=[\\.\\?!,;:]?(?:[" + String.valueOf(org.bukkit.ChatColor.COLOR_CHAR) + " ]|$))))", Pattern.CASE_INSENSITIVE);
         // ChatColor.b does not explicitly reset, its more of empty
-        private static final ChatModifier RESET = ChatModifier.EMPTY.withBold(false).withItalic(false).withUnderlined(false).withStrikethrough(false).withObfuscated(false);
+        private static final Style RESET = Style.EMPTY.withBold(false).withItalic(false).withUnderlined(false).withStrikethrough(false).withObfuscated(false);
 
-        private final List<IChatBaseComponent> list = new ArrayList<IChatBaseComponent>();
-        private IChatMutableComponent currentChatComponent = IChatBaseComponent.empty();
-        private ChatModifier modifier = ChatModifier.EMPTY;
-        private final IChatBaseComponent[] output;
+        private final List<Component> list = new ArrayList<Component>();
+        private MutableComponent currentChatComponent = Component.empty();
+        private Style modifier = Style.EMPTY;
+        private final Component[] output;
         private int currentIndex;
         private StringBuilder hex;
         private final String message;
@@ -61,12 +61,12 @@ public final class CraftChatMessage {
         private StringMessage(String message, boolean keepNewlines, boolean plain) {
             this.message = message;
             if (message == null) {
-                output = new IChatBaseComponent[]{currentChatComponent};
+                this.output = new Component[]{this.currentChatComponent};
                 return;
             }
-            list.add(currentChatComponent);
+            this.list.add(this.currentChatComponent);
 
-            Matcher matcher = (keepNewlines ? INCREMENTAL_PATTERN_KEEP_NEWLINES : INCREMENTAL_PATTERN).matcher(message);
+            Matcher matcher = (keepNewlines ? StringMessage.INCREMENTAL_PATTERN_KEEP_NEWLINES : StringMessage.INCREMENTAL_PATTERN).matcher(message);
             String match = null;
             boolean needsAdd = false;
             while (matcher.find()) {
@@ -75,182 +75,182 @@ public final class CraftChatMessage {
                     // NOOP
                 }
                 int index = matcher.start(groupId);
-                if (index > currentIndex) {
+                if (index > this.currentIndex) {
                     needsAdd = false;
-                    appendNewComponent(index);
+                    this.appendNewComponent(index);
                 }
                 switch (groupId) {
                 case 1:
                     char c = match.toLowerCase(Locale.ROOT).charAt(1);
-                    EnumChatFormat format = formatMap.get(c);
+                    ChatFormatting format = CraftChatMessage.formatMap.get(c);
 
                     if (c == 'x') {
-                        hex = new StringBuilder("#");
-                    } else if (hex != null) {
-                        hex.append(c);
+                        this.hex = new StringBuilder("#");
+                    } else if (this.hex != null) {
+                        this.hex.append(c);
 
-                        if (hex.length() == 7) {
-                            modifier = RESET.withColor(ChatHexColor.parseColor(hex.toString()).result().get());
-                            hex = null;
+                        if (this.hex.length() == 7) {
+                            this.modifier = StringMessage.RESET.withColor(TextColor.parseColor(this.hex.toString()).result().get());
+                            this.hex = null;
                         }
-                    } else if (format.isFormat() && format != EnumChatFormat.RESET) {
+                    } else if (format.isFormat() && format != ChatFormatting.RESET) {
                         switch (format) {
                         case BOLD:
-                            modifier = modifier.withBold(Boolean.TRUE);
+                            this.modifier = this.modifier.withBold(Boolean.TRUE);
                             break;
                         case ITALIC:
-                            modifier = modifier.withItalic(Boolean.TRUE);
+                            this.modifier = this.modifier.withItalic(Boolean.TRUE);
                             break;
                         case STRIKETHROUGH:
-                            modifier = modifier.withStrikethrough(Boolean.TRUE);
+                            this.modifier = this.modifier.withStrikethrough(Boolean.TRUE);
                             break;
                         case UNDERLINE:
-                            modifier = modifier.withUnderlined(Boolean.TRUE);
+                            this.modifier = this.modifier.withUnderlined(Boolean.TRUE);
                             break;
                         case OBFUSCATED:
-                            modifier = modifier.withObfuscated(Boolean.TRUE);
+                            this.modifier = this.modifier.withObfuscated(Boolean.TRUE);
                             break;
                         default:
                             throw new AssertionError("Unexpected message format");
                         }
                     } else { // Color resets formatting
-                        modifier = RESET.withColor(format);
+                        this.modifier = StringMessage.RESET.withColor(format);
                     }
                     needsAdd = true;
                     break;
                 case 2:
                     if (plain) {
-                        appendNewComponent(matcher.end(groupId));
+                        this.appendNewComponent(matcher.end(groupId));
                     } else {
                         if (!(match.startsWith("http://") || match.startsWith("https://"))) {
                             match = "http://" + match;
                         }
-                        modifier = modifier.withClickEvent(new ChatClickable(EnumClickAction.OPEN_URL, match));
-                        appendNewComponent(matcher.end(groupId));
-                        modifier = modifier.withClickEvent((ChatClickable) null);
+                        this.modifier = this.modifier.withClickEvent(new ClickEvent(Action.OPEN_URL, match));
+                        this.appendNewComponent(matcher.end(groupId));
+                        this.modifier = this.modifier.withClickEvent((ClickEvent) null);
                     }
                     break;
                 case 3:
                     if (needsAdd) {
-                        appendNewComponent(index);
+                        this.appendNewComponent(index);
                     }
-                    currentChatComponent = null;
+                    this.currentChatComponent = null;
                     break;
                 }
-                currentIndex = matcher.end(groupId);
+                this.currentIndex = matcher.end(groupId);
             }
 
-            if (currentIndex < message.length() || needsAdd) {
-                appendNewComponent(message.length());
+            if (this.currentIndex < message.length() || needsAdd) {
+                this.appendNewComponent(message.length());
             }
 
-            output = list.toArray(new IChatBaseComponent[list.size()]);
+            this.output = this.list.toArray(new Component[this.list.size()]);
         }
 
         private void appendNewComponent(int index) {
-            IChatBaseComponent addition = IChatBaseComponent.literal(message.substring(currentIndex, index)).setStyle(modifier);
-            currentIndex = index;
-            if (currentChatComponent == null) {
-                currentChatComponent = IChatBaseComponent.empty();
-                list.add(currentChatComponent);
+            Component addition = Component.literal(this.message.substring(this.currentIndex, index)).setStyle(this.modifier);
+            this.currentIndex = index;
+            if (this.currentChatComponent == null) {
+                this.currentChatComponent = Component.empty();
+                this.list.add(this.currentChatComponent);
             }
-            currentChatComponent.append(addition);
+            this.currentChatComponent.append(addition);
         }
 
-        private IChatBaseComponent[] getOutput() {
-            return output;
+        private Component[] getOutput() {
+            return this.output;
         }
     }
 
-    public static Optional<IChatBaseComponent> fromStringOrOptional(String message) {
-        return Optional.ofNullable(fromStringOrNull(message));
+    public static Optional<Component> fromStringOrOptional(String message) {
+        return Optional.ofNullable(CraftChatMessage.fromStringOrNull(message));
     }
 
-    public static Optional<IChatBaseComponent> fromStringOrOptional(String message, boolean keepNewlines) {
-        return Optional.ofNullable(fromStringOrNull(message, keepNewlines));
+    public static Optional<Component> fromStringOrOptional(String message, boolean keepNewlines) {
+        return Optional.ofNullable(CraftChatMessage.fromStringOrNull(message, keepNewlines));
     }
 
-    public static IChatBaseComponent fromStringOrNull(String message) {
-        return fromStringOrNull(message, false);
+    public static Component fromStringOrNull(String message) {
+        return CraftChatMessage.fromStringOrNull(message, false);
     }
 
-    public static IChatBaseComponent fromStringOrNull(String message, boolean keepNewlines) {
-        return (message == null || message.isEmpty()) ? null : fromString(message, keepNewlines)[0];
+    public static Component fromStringOrNull(String message, boolean keepNewlines) {
+        return (message == null || message.isEmpty()) ? null : CraftChatMessage.fromString(message, keepNewlines)[0];
     }
 
-    public static IChatBaseComponent fromStringOrEmpty(String message) {
-        return fromStringOrEmpty(message, false);
+    public static Component fromStringOrEmpty(String message) {
+        return CraftChatMessage.fromStringOrEmpty(message, false);
     }
 
-    public static IChatBaseComponent fromStringOrEmpty(String message, boolean keepNewlines) {
-        return fromString(message, keepNewlines)[0];
+    public static Component fromStringOrEmpty(String message, boolean keepNewlines) {
+        return CraftChatMessage.fromString(message, keepNewlines)[0];
     }
 
-    public static IChatBaseComponent[] fromString(String message) {
-        return fromString(message, false);
+    public static Component[] fromString(String message) {
+        return CraftChatMessage.fromString(message, false);
     }
 
-    public static IChatBaseComponent[] fromString(String message, boolean keepNewlines) {
-        return fromString(message, keepNewlines, false);
+    public static Component[] fromString(String message, boolean keepNewlines) {
+        return CraftChatMessage.fromString(message, keepNewlines, false);
     }
 
-    public static IChatBaseComponent[] fromString(String message, boolean keepNewlines, boolean plain) {
+    public static Component[] fromString(String message, boolean keepNewlines, boolean plain) {
         return new StringMessage(message, keepNewlines, plain).getOutput();
     }
 
-    public static String toJSON(IChatBaseComponent component) {
-        return IChatBaseComponent.ChatSerializer.toJson(component, MinecraftServer.getDefaultRegistryAccess());
+    public static String toJSON(Component component) {
+        return Component.Serializer.toJson(component, MinecraftServer.getDefaultRegistryAccess());
     }
 
-    public static String toJSONOrNull(IChatBaseComponent component) {
+    public static String toJSONOrNull(Component component) {
         if (component == null) return null;
-        return toJSON(component);
+        return CraftChatMessage.toJSON(component);
     }
 
-    public static IChatBaseComponent fromJSON(String jsonMessage) throws JsonParseException {
+    public static Component fromJSON(String jsonMessage) throws JsonParseException {
         // Note: This also parses plain Strings to text components.
         // Note: An empty message (empty, or only consisting of whitespace) results in null rather than a parse exception.
-        return IChatBaseComponent.ChatSerializer.fromJson(jsonMessage, MinecraftServer.getDefaultRegistryAccess());
+        return Component.Serializer.fromJson(jsonMessage, MinecraftServer.getDefaultRegistryAccess());
     }
 
-    public static IChatBaseComponent fromJSONOrNull(String jsonMessage) {
+    public static Component fromJSONOrNull(String jsonMessage) {
         if (jsonMessage == null) return null;
         try {
-            return fromJSON(jsonMessage); // Can return null
+            return CraftChatMessage.fromJSON(jsonMessage); // Can return null
         } catch (JsonParseException ex) {
             return null;
         }
     }
 
-    public static IChatBaseComponent fromJSONOrString(String message) {
-        return fromJSONOrString(message, false);
+    public static Component fromJSONOrString(String message) {
+        return CraftChatMessage.fromJSONOrString(message, false);
     }
 
-    public static IChatBaseComponent fromJSONOrString(String message, boolean keepNewlines) {
-        return fromJSONOrString(message, false, keepNewlines);
+    public static Component fromJSONOrString(String message, boolean keepNewlines) {
+        return CraftChatMessage.fromJSONOrString(message, false, keepNewlines);
     }
 
-    public static IChatBaseComponent fromJSONOrString(String message, boolean nullable, boolean keepNewlines) {
-        return fromJSONOrString(message, nullable, keepNewlines, Integer.MAX_VALUE, false);
+    public static Component fromJSONOrString(String message, boolean nullable, boolean keepNewlines) {
+        return CraftChatMessage.fromJSONOrString(message, nullable, keepNewlines, Integer.MAX_VALUE, false);
     }
 
-    public static IChatBaseComponent fromJSONOrString(String message, boolean nullable, boolean keepNewlines, int maxLength, boolean checkJsonContentLength) {
+    public static Component fromJSONOrString(String message, boolean nullable, boolean keepNewlines, int maxLength, boolean checkJsonContentLength) {
         if (message == null) message = "";
         if (nullable && message.isEmpty()) return null;
-        IChatBaseComponent component = fromJSONOrNull(message);
+        Component component = CraftChatMessage.fromJSONOrNull(message);
         if (component != null) {
             if (checkJsonContentLength) {
-                String content = fromComponent(component);
-                String trimmedContent = trimMessage(content, maxLength);
+                String content = CraftChatMessage.fromComponent(component);
+                String trimmedContent = CraftChatMessage.trimMessage(content, maxLength);
                 if (content != trimmedContent) { // Identity comparison is fine here
                     // Note: The resulting text has all non-plain text features stripped.
-                    return fromString(trimmedContent, keepNewlines)[0];
+                    return CraftChatMessage.fromString(trimmedContent, keepNewlines)[0];
                 }
             }
             return component;
         } else {
-            message = trimMessage(message, maxLength);
-            return fromString(message, keepNewlines)[0];
+            message = CraftChatMessage.trimMessage(message, maxLength);
+            return CraftChatMessage.fromString(message, keepNewlines)[0];
         }
     }
 
@@ -262,15 +262,15 @@ public final class CraftChatMessage {
         }
     }
 
-    public static String fromComponent(IChatBaseComponent component) {
+    public static String fromComponent(Component component) {
         if (component == null) return "";
         StringBuilder out = new StringBuilder();
 
         boolean hadFormat = false;
-        for (IChatBaseComponent c : component) {
-            ChatModifier modi = c.getStyle();
-            ChatHexColor color = modi.getColor();
-            if (c.getContents() != LiteralContents.EMPTY || color != null) {
+        for (Component c : component) {
+            Style modi = c.getStyle();
+            TextColor color = modi.getColor();
+            if (c.getContents() != PlainTextContents.EMPTY || color != null) {
                 if (color != null) {
                     if (color.format != null) {
                         out.append(color.format);
@@ -287,23 +287,23 @@ public final class CraftChatMessage {
                 }
             }
             if (modi.isBold()) {
-                out.append(EnumChatFormat.BOLD);
+                out.append(ChatFormatting.BOLD);
                 hadFormat = true;
             }
             if (modi.isItalic()) {
-                out.append(EnumChatFormat.ITALIC);
+                out.append(ChatFormatting.ITALIC);
                 hadFormat = true;
             }
             if (modi.isUnderlined()) {
-                out.append(EnumChatFormat.UNDERLINE);
+                out.append(ChatFormatting.UNDERLINE);
                 hadFormat = true;
             }
             if (modi.isStrikethrough()) {
-                out.append(EnumChatFormat.STRIKETHROUGH);
+                out.append(ChatFormatting.STRIKETHROUGH);
                 hadFormat = true;
             }
             if (modi.isObfuscated()) {
-                out.append(EnumChatFormat.OBFUSCATED);
+                out.append(ChatFormatting.OBFUSCATED);
                 hadFormat = true;
             }
             c.getContents().visit((x) -> {
@@ -314,22 +314,22 @@ public final class CraftChatMessage {
         return out.toString();
     }
 
-    public static IChatBaseComponent fixComponent(IChatMutableComponent component) {
-        Matcher matcher = LINK_PATTERN.matcher("");
-        return fixComponent(component, matcher);
+    public static Component fixComponent(MutableComponent component) {
+        Matcher matcher = CraftChatMessage.LINK_PATTERN.matcher("");
+        return CraftChatMessage.fixComponent(component, matcher);
     }
 
-    private static IChatBaseComponent fixComponent(IChatMutableComponent component, Matcher matcher) {
-        if (component.getContents() instanceof LiteralContents) {
-            LiteralContents text = ((LiteralContents) component.getContents());
+    private static Component fixComponent(MutableComponent component, Matcher matcher) {
+        if (component.getContents() instanceof PlainTextContents) {
+            PlainTextContents text = ((PlainTextContents) component.getContents());
             String msg = text.text();
             if (matcher.reset(msg).find()) {
                 matcher.reset();
 
-                ChatModifier modifier = component.getStyle();
-                List<IChatBaseComponent> extras = new ArrayList<IChatBaseComponent>();
-                List<IChatBaseComponent> extrasOld = new ArrayList<IChatBaseComponent>(component.getSiblings());
-                component = IChatBaseComponent.empty();
+                Style modifier = component.getStyle();
+                List<Component> extras = new ArrayList<Component>();
+                List<Component> extrasOld = new ArrayList<Component>(component.getSiblings());
+                component = Component.empty();
 
                 int pos = 0;
                 while (matcher.find()) {
@@ -339,34 +339,34 @@ public final class CraftChatMessage {
                         match = "http://" + match;
                     }
 
-                    IChatMutableComponent prev = IChatBaseComponent.literal(msg.substring(pos, matcher.start()));
+                    MutableComponent prev = Component.literal(msg.substring(pos, matcher.start()));
                     prev.setStyle(modifier);
                     extras.add(prev);
 
-                    IChatMutableComponent link = IChatBaseComponent.literal(matcher.group());
-                    ChatModifier linkModi = modifier.withClickEvent(new ChatClickable(EnumClickAction.OPEN_URL, match));
+                    MutableComponent link = Component.literal(matcher.group());
+                    Style linkModi = modifier.withClickEvent(new ClickEvent(Action.OPEN_URL, match));
                     link.setStyle(linkModi);
                     extras.add(link);
 
                     pos = matcher.end();
                 }
 
-                IChatMutableComponent prev = IChatBaseComponent.literal(msg.substring(pos));
+                MutableComponent prev = Component.literal(msg.substring(pos));
                 prev.setStyle(modifier);
                 extras.add(prev);
                 extras.addAll(extrasOld);
 
-                for (IChatBaseComponent c : extras) {
+                for (Component c : extras) {
                     component.append(c);
                 }
             }
         }
 
-        List<IChatBaseComponent> extras = component.getSiblings();
+        List<Component> extras = component.getSiblings();
         for (int i = 0; i < extras.size(); i++) {
-            IChatBaseComponent comp = extras.get(i);
+            Component comp = extras.get(i);
             if (comp.getStyle() != null && comp.getStyle().getClickEvent() == null) {
-                extras.set(i, fixComponent(comp.copy(), matcher));
+                extras.set(i, CraftChatMessage.fixComponent(comp.copy(), matcher));
             }
         }
 
@@ -374,13 +374,13 @@ public final class CraftChatMessage {
             Object[] subs = ((TranslatableContents) component.getContents()).getArgs();
             for (int i = 0; i < subs.length; i++) {
                 Object comp = subs[i];
-                if (comp instanceof IChatBaseComponent) {
-                    IChatBaseComponent c = (IChatBaseComponent) comp;
+                if (comp instanceof Component) {
+                    Component c = (Component) comp;
                     if (c.getStyle() != null && c.getStyle().getClickEvent() == null) {
-                        subs[i] = fixComponent(c.copy(), matcher);
+                        subs[i] = CraftChatMessage.fixComponent(c.copy(), matcher);
                     }
                 } else if (comp instanceof String && matcher.reset((String) comp).find()) {
-                    subs[i] = fixComponent(IChatBaseComponent.literal((String) comp), matcher);
+                    subs[i] = CraftChatMessage.fixComponent(Component.literal((String) comp), matcher);
                 }
             }
         }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftDimensionUtil.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftDimensionUtil.java
index 61538c8bdf..b52a8543aa 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftDimensionUtil.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftDimensionUtil.java
@@ -1,22 +1,22 @@
 package org.bukkit.craftbukkit.util;
 
 import net.minecraft.resources.ResourceKey;
-import net.minecraft.world.level.World;
-import net.minecraft.world.level.dimension.WorldDimension;
+import net.minecraft.world.level.Level;
+import net.minecraft.world.level.dimension.LevelStem;
 
 public class CraftDimensionUtil {
 
     private CraftDimensionUtil() {
     }
 
-    public static ResourceKey<World> getMainDimensionKey(World world) {
-        ResourceKey<WorldDimension> typeKey = world.getTypeKey();
-        if (typeKey == WorldDimension.OVERWORLD) {
-            return World.OVERWORLD;
-        } else if (typeKey == WorldDimension.NETHER) {
-            return World.NETHER;
-        } else if (typeKey == WorldDimension.END) {
-            return World.END;
+    public static ResourceKey<Level> getMainDimensionKey(Level world) {
+        ResourceKey<LevelStem> typeKey = world.getTypeKey();
+        if (typeKey == LevelStem.OVERWORLD) {
+            return Level.OVERWORLD;
+        } else if (typeKey == LevelStem.NETHER) {
+            return Level.NETHER;
+        } else if (typeKey == LevelStem.END) {
+            return Level.END;
         }
 
         return world.dimension();
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftLocation.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftLocation.java
index d62fb1f6f5..097996d395 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftLocation.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftLocation.java
@@ -1,7 +1,7 @@
 package org.bukkit.craftbukkit.util;
 
-import net.minecraft.core.BlockPosition;
-import net.minecraft.world.phys.Vec3D;
+import net.minecraft.core.BlockPos;
+import net.minecraft.world.phys.Vec3;
 import org.bukkit.Location;
 import org.bukkit.World;
 
@@ -10,37 +10,37 @@ public final class CraftLocation {
     private CraftLocation() {
     }
 
-    public static Location toBukkit(Vec3D vec3D) {
-        return toBukkit(vec3D, null);
+    public static Location toBukkit(Vec3 vec3D) {
+        return CraftLocation.toBukkit(vec3D, null);
     }
 
-    public static Location toBukkit(Vec3D vec3D, World world) {
-        return toBukkit(vec3D, world, 0.0F, 0.0F);
+    public static Location toBukkit(Vec3 vec3D, World world) {
+        return CraftLocation.toBukkit(vec3D, world, 0.0F, 0.0F);
     }
 
-    public static Location toBukkit(Vec3D vec3D, World world, float yaw, float pitch) {
+    public static Location toBukkit(Vec3 vec3D, World world, float yaw, float pitch) {
         return new Location(world, vec3D.x(), vec3D.y(), vec3D.z(), yaw, pitch);
     }
 
-    public static Location toBukkit(BlockPosition blockPosition) {
-        return toBukkit(blockPosition, (World) null);
+    public static Location toBukkit(BlockPos blockPosition) {
+        return CraftLocation.toBukkit(blockPosition, (World) null);
     }
-    public static Location toBukkit(BlockPosition blockPosition, net.minecraft.world.level.World world) {
-        return toBukkit(blockPosition, world.getWorld(), 0.0F, 0.0F);
+    public static Location toBukkit(BlockPos blockPosition, net.minecraft.world.level.Level world) {
+        return CraftLocation.toBukkit(blockPosition, world.getWorld(), 0.0F, 0.0F);
     }
-    public static Location toBukkit(BlockPosition blockPosition, World world) {
-        return toBukkit(blockPosition, world, 0.0F, 0.0F);
+    public static Location toBukkit(BlockPos blockPosition, World world) {
+        return CraftLocation.toBukkit(blockPosition, world, 0.0F, 0.0F);
     }
 
-    public static Location toBukkit(BlockPosition blockPosition, World world, float yaw, float pitch) {
+    public static Location toBukkit(BlockPos blockPosition, World world, float yaw, float pitch) {
         return new Location(world, blockPosition.getX(), blockPosition.getY(), blockPosition.getZ(), yaw, pitch);
     }
 
-    public static BlockPosition toBlockPosition(Location location) {
-        return new BlockPosition(location.getBlockX(), location.getBlockY(), location.getBlockZ());
+    public static BlockPos toBlockPosition(Location location) {
+        return new BlockPos(location.getBlockX(), location.getBlockY(), location.getBlockZ());
     }
 
-    public static Vec3D toVec3D(Location location) {
-        return new Vec3D(location.getX(), location.getY(), location.getZ());
+    public static Vec3 toVec3D(Location location) {
+        return new Vec3(location.getX(), location.getY(), location.getZ());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
index 71cd9b42d8..592906e5b4 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftMagicNumbers.java
@@ -20,23 +20,22 @@ import java.util.logging.Level;
 import java.util.logging.Logger;
 import net.minecraft.SharedConstants;
 import net.minecraft.advancements.AdvancementHolder;
-import net.minecraft.commands.CommandDispatcher;
-import net.minecraft.commands.arguments.item.ArgumentParserItemStack;
+import net.minecraft.commands.Commands;
+import net.minecraft.commands.arguments.item.ItemParser;
 import net.minecraft.core.registries.BuiltInRegistries;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.nbt.DynamicOpsNBT;
-import net.minecraft.nbt.NBTBase;
-import net.minecraft.nbt.NBTTagString;
-import net.minecraft.resources.MinecraftKey;
+import net.minecraft.nbt.NbtOps;
+import net.minecraft.nbt.StringTag;
+import net.minecraft.nbt.Tag;
+import net.minecraft.resources.ResourceLocation;
 import net.minecraft.server.MinecraftServer;
-import net.minecraft.util.datafix.DataConverterRegistry;
-import net.minecraft.util.datafix.fixes.DataConverterTypes;
-import net.minecraft.world.entity.EntityTypes;
+import net.minecraft.util.datafix.DataFixers;
+import net.minecraft.util.datafix.fixes.References;
 import net.minecraft.world.item.Item;
-import net.minecraft.world.item.alchemy.PotionRegistry;
+import net.minecraft.world.item.alchemy.Potion;
 import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.block.state.IBlockData;
-import net.minecraft.world.level.storage.SavedFile;
+import net.minecraft.world.level.block.state.BlockState;
+import net.minecraft.world.level.storage.LevelResource;
 import org.bukkit.Bukkit;
 import org.bukkit.FeatureFlag;
 import org.bukkit.Keyed;
@@ -81,16 +80,16 @@ public final class CraftMagicNumbers implements UnsafeValues {
 
     private CraftMagicNumbers() {}
 
-    public static IBlockData getBlock(MaterialData material) {
-        return getBlock(material.getItemType(), material.getData());
+    public static BlockState getBlock(MaterialData material) {
+        return CraftMagicNumbers.getBlock(material.getItemType(), material.getData());
     }
 
-    public static IBlockData getBlock(Material material, byte data) {
+    public static BlockState getBlock(Material material, byte data) {
         return CraftLegacy.fromLegacyData(CraftLegacy.toLegacy(material), data);
     }
 
-    public static MaterialData getMaterial(IBlockData data) {
-        return CraftLegacy.toLegacy(getMaterial(data.getBlock())).getNewData(toLegacyData(data));
+    public static MaterialData getMaterial(BlockState data) {
+        return CraftLegacy.toLegacy(CraftMagicNumbers.getMaterial(data.getBlock())).getNewData(CraftMagicNumbers.toLegacyData(data));
     }
 
     public static Item getItem(Material material, short data) {
@@ -98,11 +97,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
             return CraftLegacy.fromLegacyData(CraftLegacy.toLegacy(material), data);
         }
 
-        return getItem(material);
+        return CraftMagicNumbers.getItem(material);
     }
 
     public static MaterialData getMaterialData(Item item) {
-        return CraftLegacy.toLegacyData(getMaterial(item));
+        return CraftLegacy.toLegacyData(CraftMagicNumbers.getMaterial(item));
     }
 
     // ========================================================================
@@ -125,22 +124,22 @@ public final class CraftMagicNumbers implements UnsafeValues {
                 continue;
             }
 
-            MinecraftKey key = key(material);
+            ResourceLocation key = key(material);
             BuiltInRegistries.ITEM.getOptional(key).ifPresent((item) -> {
-                MATERIAL_ITEM.put(material, item);
+                CraftMagicNumbers.MATERIAL_ITEM.put(material, item);
             });
             BuiltInRegistries.BLOCK.getOptional(key).ifPresent((block) -> {
-                MATERIAL_BLOCK.put(material, block);
+                CraftMagicNumbers.MATERIAL_BLOCK.put(material, block);
             });
         }
     }
 
     public static Material getMaterial(Block block) {
-        return BLOCK_MATERIAL.get(block);
+        return CraftMagicNumbers.BLOCK_MATERIAL.get(block);
     }
 
     public static Material getMaterial(Item item) {
-        return ITEM_MATERIAL.getOrDefault(item, Material.AIR);
+        return CraftMagicNumbers.ITEM_MATERIAL.getOrDefault(item, Material.AIR);
     }
 
     public static Item getItem(Material material) {
@@ -148,7 +147,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
             material = CraftLegacy.fromLegacy(material);
         }
 
-        return MATERIAL_ITEM.get(material);
+        return CraftMagicNumbers.MATERIAL_ITEM.get(material);
     }
 
     public static Block getBlock(Material material) {
@@ -156,15 +155,15 @@ public final class CraftMagicNumbers implements UnsafeValues {
             material = CraftLegacy.fromLegacy(material);
         }
 
-        return MATERIAL_BLOCK.get(material);
+        return CraftMagicNumbers.MATERIAL_BLOCK.get(material);
     }
 
-    public static MinecraftKey key(Material mat) {
+    public static ResourceLocation key(Material mat) {
         return CraftNamespacedKey.toMinecraft(mat.getKey());
     }
     // ========================================================================
 
-    public static byte toLegacyData(IBlockData data) {
+    public static byte toLegacyData(BlockState data) {
         return CraftLegacy.toLegacyData(data);
     }
 
@@ -194,7 +193,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
 
     @Override
     public BlockData fromLegacy(Material material, byte data) {
-        return CraftBlockData.fromData(getBlock(material, data));
+        return CraftBlockData.fromData(CraftMagicNumbers.getBlock(material, data));
     }
 
     @Override
@@ -207,11 +206,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
             return Material.getMaterial(material);
         }
 
-        Dynamic<NBTBase> name = new Dynamic<>(DynamicOpsNBT.INSTANCE, NBTTagString.valueOf("minecraft:" + material.toLowerCase(Locale.ROOT)));
-        Dynamic<NBTBase> converted = DataConverterRegistry.getDataFixer().update(DataConverterTypes.ITEM_NAME, name, version, this.getDataVersion());
+        Dynamic<Tag> name = new Dynamic<>(NbtOps.INSTANCE, StringTag.valueOf("minecraft:" + material.toLowerCase(Locale.ROOT)));
+        Dynamic<Tag> converted = DataFixers.getDataFixer().update(References.ITEM_NAME, name, version, this.getDataVersion());
 
         if (name.equals(converted)) {
-            converted = DataConverterRegistry.getDataFixer().update(DataConverterTypes.BLOCK_NAME, name, version, this.getDataVersion());
+            converted = DataFixers.getDataFixer().update(References.BLOCK_NAME, name, version, this.getDataVersion());
         }
 
         return Material.matchMaterial(converted.asString(""));
@@ -246,7 +245,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
         net.minecraft.world.item.ItemStack nmsStack = CraftItemStack.asNMSCopy(stack);
 
         try {
-            nmsStack.applyComponents(new ArgumentParserItemStack(CommandDispatcher.createValidationContext(MinecraftServer.getDefaultRegistryAccess())).parse(new StringReader(arguments)).components());
+            nmsStack.applyComponents(new ItemParser(Commands.createValidationContext(MinecraftServer.getDefaultRegistryAccess())).parse(new StringReader(arguments)).components());
         } catch (CommandSyntaxException ex) {
             Logger.getLogger(CraftMagicNumbers.class.getName()).log(Level.SEVERE, null, ex);
         }
@@ -257,13 +256,13 @@ public final class CraftMagicNumbers implements UnsafeValues {
     }
 
     private static File getBukkitDataPackFolder() {
-        return new File(MinecraftServer.getServer().getWorldPath(SavedFile.DATAPACK_DIR).toFile(), "bukkit");
+        return new File(MinecraftServer.getServer().getWorldPath(LevelResource.DATAPACK_DIR).toFile(), "bukkit");
     }
 
     @Override
     public Advancement loadAdvancement(NamespacedKey key, String advancement) {
         Preconditions.checkArgument(Bukkit.getAdvancement(key) == null, "Advancement %s already exists", key);
-        MinecraftKey minecraftkey = CraftNamespacedKey.toMinecraft(key);
+        ResourceLocation minecraftkey = CraftNamespacedKey.toMinecraft(key);
 
         JsonElement jsonelement = JsonParser.parseString(advancement);
         net.minecraft.advancements.Advancement nms = net.minecraft.advancements.Advancement.CODEC.parse(JsonOps.INSTANCE, jsonelement).getOrThrow(JsonParseException::new);
@@ -272,7 +271,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
             Advancement bukkit = Bukkit.getAdvancement(key);
 
             if (bukkit != null) {
-                File file = new File(getBukkitDataPackFolder(), "data" + File.separator + key.getNamespace() + File.separator + "advancements" + File.separator + key.getKey() + ".json");
+                File file = new File(CraftMagicNumbers.getBukkitDataPackFolder(), "data" + File.separator + key.getNamespace() + File.separator + "advancements" + File.separator + key.getKey() + ".json");
                 file.getParentFile().mkdirs();
 
                 try {
@@ -292,7 +291,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
 
     @Override
     public boolean removeAdvancement(NamespacedKey key) {
-        File file = new File(getBukkitDataPackFolder(), "data" + File.separator + key.getNamespace() + File.separator + "advancements" + File.separator + key.getKey() + ".json");
+        File file = new File(CraftMagicNumbers.getBukkitDataPackFolder(), "data" + File.separator + key.getNamespace() + File.separator + "advancements" + File.separator + key.getKey() + ".json");
         return file.delete();
     }
 
@@ -327,7 +326,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
     @Override
     public byte[] processClass(PluginDescriptionFile pdf, String path, byte[] clazz) {
         try {
-            clazz = commodore.convert(clazz, pdf.getName(), ApiVersion.getOrCreateVersion(pdf.getAPIVersion()), ((CraftServer) Bukkit.getServer()).activeCompatibilities);
+            clazz = this.commodore.convert(clazz, pdf.getName(), ApiVersion.getOrCreateVersion(pdf.getAPIVersion()), ((CraftServer) Bukkit.getServer()).activeCompatibilities);
         } catch (Exception ex) {
             Bukkit.getLogger().log(Level.SEVERE, "Fatal error trying to convert " + pdf.getFullName() + ":" + path, ex);
         }
@@ -358,7 +357,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
     @Override
     public String getTranslationKey(EntityType entityType) {
         Preconditions.checkArgument(entityType.getName() != null, "Invalid name of EntityType %s for translation key", entityType);
-        return EntityTypes.byString(entityType.getName()).map(EntityTypes::getDescriptionId).orElseThrow();
+        return net.minecraft.world.entity.EntityType.byString(entityType.getName()).map(net.minecraft.world.entity.EntityType::getDescriptionId).orElseThrow();
     }
 
     @Override
@@ -380,7 +379,7 @@ public final class CraftMagicNumbers implements UnsafeValues {
 
     @Override
     public PotionType.InternalPotionData getInternalPotionData(NamespacedKey namespacedKey) {
-        PotionRegistry potionRegistry = CraftRegistry.getMinecraftRegistry(Registries.POTION)
+        Potion potionRegistry = CraftRegistry.getMinecraftRegistry(Registries.POTION)
                 .getOptional(CraftNamespacedKey.toMinecraft(namespacedKey)).orElseThrow();
 
         return new CraftPotionType(namespacedKey, potionRegistry);
@@ -415,11 +414,11 @@ public final class CraftMagicNumbers implements UnsafeValues {
     private Biome customBiome;
     @Override
     public Biome getCustomBiome() {
-        if (customBiome == null) {
-            customBiome = new CraftBiome(NamespacedKey.minecraft("custom"), null);
+        if (this.customBiome == null) {
+            this.customBiome = new CraftBiome(NamespacedKey.minecraft("custom"), null);
         }
 
-        return customBiome;
+        return this.customBiome;
     }
 
     /**
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftNBTTagConfigSerializer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftNBTTagConfigSerializer.java
index 44f133cf5f..be9686a424 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftNBTTagConfigSerializer.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftNBTTagConfigSerializer.java
@@ -5,14 +5,14 @@ import com.mojang.brigadier.exceptions.CommandSyntaxException;
 import java.util.List;
 import java.util.Map;
 import java.util.regex.Pattern;
-import net.minecraft.nbt.MojangsonParser;
-import net.minecraft.nbt.NBTBase;
-import net.minecraft.nbt.NBTTagCompound;
-import net.minecraft.nbt.NBTTagDouble;
-import net.minecraft.nbt.NBTTagInt;
-import net.minecraft.nbt.NBTTagList;
-import net.minecraft.nbt.NBTTagString;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.nbt.DoubleTag;
+import net.minecraft.nbt.IntTag;
+import net.minecraft.nbt.ListTag;
 import net.minecraft.nbt.SnbtPrinterTagVisitor;
+import net.minecraft.nbt.StringTag;
+import net.minecraft.nbt.Tag;
+import net.minecraft.nbt.TagParser;
 import org.jetbrains.annotations.NotNull;
 
 public class CraftNBTTagConfigSerializer {
@@ -20,66 +20,66 @@ public class CraftNBTTagConfigSerializer {
     private static final Pattern ARRAY = Pattern.compile("^\\[.*]");
     private static final Pattern INTEGER = Pattern.compile("[-+]?(?:0|[1-9][0-9]*)?i", Pattern.CASE_INSENSITIVE);
     private static final Pattern DOUBLE = Pattern.compile("[-+]?(?:[0-9]+[.]?|[0-9]*[.][0-9]+)(?:e[-+]?[0-9]+)?d", Pattern.CASE_INSENSITIVE);
-    private static final MojangsonParser MOJANGSON_PARSER = new MojangsonParser(new StringReader(""));
+    private static final TagParser MOJANGSON_PARSER = new TagParser(new StringReader(""));
 
-    public static String serialize(@NotNull final NBTBase base) {
+    public static String serialize(@NotNull final Tag base) {
         final SnbtPrinterTagVisitor snbtVisitor = new SnbtPrinterTagVisitor();
         return snbtVisitor.visit(base);
     }
 
-    public static NBTBase deserialize(final Object object) {
+    public static Tag deserialize(final Object object) {
         // The new logic expects the top level object to be a single string, holding the entire nbt tag as SNBT.
         if (object instanceof final String snbtString) {
             try {
-                return MojangsonParser.parseTag(snbtString);
+                return TagParser.parseTag(snbtString);
             } catch (final CommandSyntaxException e) {
                 throw new RuntimeException("Failed to deserialise nbt", e);
             }
         } else { // Legacy logic is passed to the internal legacy deserialization that attempts to read the old format that *unsuccessfully* attempted to read/write nbt to a full yml tree.
-            return internalLegacyDeserialization(object);
+            return CraftNBTTagConfigSerializer.internalLegacyDeserialization(object);
         }
     }
 
-    private static NBTBase internalLegacyDeserialization(@NotNull final Object object) {
+    private static Tag internalLegacyDeserialization(@NotNull final Object object) {
         if (object instanceof Map) {
-            NBTTagCompound compound = new NBTTagCompound();
+            CompoundTag compound = new CompoundTag();
             for (Map.Entry<String, Object> entry : ((Map<String, Object>) object).entrySet()) {
-                compound.put(entry.getKey(), internalLegacyDeserialization(entry.getValue()));
+                compound.put(entry.getKey(), CraftNBTTagConfigSerializer.internalLegacyDeserialization(entry.getValue()));
             }
 
             return compound;
         } else if (object instanceof List) {
             List<Object> list = (List<Object>) object;
             if (list.isEmpty()) {
-                return new NBTTagList(); // Default
+                return new ListTag(); // Default
             }
 
-            NBTTagList tagList = new NBTTagList();
+            ListTag tagList = new ListTag();
             for (Object tag : list) {
-                tagList.add(internalLegacyDeserialization(tag));
+                tagList.add(CraftNBTTagConfigSerializer.internalLegacyDeserialization(tag));
             }
 
             return tagList;
         } else if (object instanceof String) {
             String string = (String) object;
 
-            if (ARRAY.matcher(string).matches()) {
+            if (CraftNBTTagConfigSerializer.ARRAY.matcher(string).matches()) {
                 try {
-                    return new MojangsonParser(new StringReader(string)).readArrayTag();
+                    return new TagParser(new StringReader(string)).readArrayTag();
                 } catch (CommandSyntaxException e) {
                     throw new RuntimeException("Could not deserialize found list ", e);
                 }
-            } else if (INTEGER.matcher(string).matches()) { //Read integers on our own
-                return NBTTagInt.valueOf(Integer.parseInt(string.substring(0, string.length() - 1)));
-            } else if (DOUBLE.matcher(string).matches()) {
-                return NBTTagDouble.valueOf(Double.parseDouble(string.substring(0, string.length() - 1)));
+            } else if (CraftNBTTagConfigSerializer.INTEGER.matcher(string).matches()) { //Read integers on our own
+                return IntTag.valueOf(Integer.parseInt(string.substring(0, string.length() - 1)));
+            } else if (CraftNBTTagConfigSerializer.DOUBLE.matcher(string).matches()) {
+                return DoubleTag.valueOf(Double.parseDouble(string.substring(0, string.length() - 1)));
             } else {
-                NBTBase nbtBase = MOJANGSON_PARSER.type(string);
+                Tag nbtBase = CraftNBTTagConfigSerializer.MOJANGSON_PARSER.type(string);
 
-                if (nbtBase instanceof NBTTagInt) { // If this returns an integer, it did not use our method from above
-                    return NBTTagString.valueOf(nbtBase.getAsString()); // It then is a string that was falsely read as an int
-                } else if (nbtBase instanceof NBTTagDouble) {
-                    return NBTTagString.valueOf(String.valueOf(((NBTTagDouble) nbtBase).getAsDouble())); // Doubles add "d" at the end
+                if (nbtBase instanceof IntTag) { // If this returns an integer, it did not use our method from above
+                    return StringTag.valueOf(nbtBase.getAsString()); // It then is a string that was falsely read as an int
+                } else if (nbtBase instanceof DoubleTag) {
+                    return StringTag.valueOf(String.valueOf(((DoubleTag) nbtBase).getAsDouble())); // Doubles add "d" at the end
                 } else {
                     return nbtBase;
                 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftNamespacedKey.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftNamespacedKey.java
index 7ad6f66eed..dc88ba24ed 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftNamespacedKey.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftNamespacedKey.java
@@ -1,6 +1,6 @@
 package org.bukkit.craftbukkit.util;
 
-import net.minecraft.resources.MinecraftKey;
+import net.minecraft.resources.ResourceLocation;
 import org.bukkit.NamespacedKey;
 
 public final class CraftNamespacedKey {
@@ -12,19 +12,19 @@ public final class CraftNamespacedKey {
         if (string == null || string.isEmpty()) {
             return null;
         }
-        MinecraftKey minecraft = MinecraftKey.tryParse(string);
-        return (minecraft == null) ? null : fromMinecraft(minecraft);
+        ResourceLocation minecraft = ResourceLocation.tryParse(string);
+        return (minecraft == null) ? null : CraftNamespacedKey.fromMinecraft(minecraft);
     }
 
     public static NamespacedKey fromString(String string) {
-        return fromMinecraft(MinecraftKey.parse(string));
+        return CraftNamespacedKey.fromMinecraft(ResourceLocation.parse(string));
     }
 
-    public static NamespacedKey fromMinecraft(MinecraftKey minecraft) {
+    public static NamespacedKey fromMinecraft(ResourceLocation minecraft) {
         return new NamespacedKey(minecraft.getNamespace(), minecraft.getPath());
     }
 
-    public static MinecraftKey toMinecraft(NamespacedKey key) {
-        return MinecraftKey.fromNamespaceAndPath(key.getNamespace(), key.getKey());
+    public static ResourceLocation toMinecraft(NamespacedKey key) {
+        return ResourceLocation.fromNamespaceAndPath(key.getNamespace(), key.getKey());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftRayTraceResult.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftRayTraceResult.java
index 409d78390e..5ee538ca7b 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftRayTraceResult.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftRayTraceResult.java
@@ -1,11 +1,11 @@
 package org.bukkit.craftbukkit.util;
 
-import net.minecraft.core.BlockPosition;
-import net.minecraft.world.phys.MovingObjectPosition;
-import net.minecraft.world.phys.MovingObjectPosition.EnumMovingObjectType;
-import net.minecraft.world.phys.MovingObjectPositionBlock;
-import net.minecraft.world.phys.MovingObjectPositionEntity;
-import net.minecraft.world.phys.Vec3D;
+import net.minecraft.core.BlockPos;
+import net.minecraft.world.phys.BlockHitResult;
+import net.minecraft.world.phys.EntityHitResult;
+import net.minecraft.world.phys.HitResult;
+import net.minecraft.world.phys.HitResult.Type;
+import net.minecraft.world.phys.Vec3;
 import org.bukkit.World;
 import org.bukkit.block.Block;
 import org.bukkit.block.BlockFace;
@@ -18,22 +18,22 @@ public final class CraftRayTraceResult {
 
     private CraftRayTraceResult() {}
 
-    public static RayTraceResult fromNMS(World world, MovingObjectPosition nmsHitResult) {
-        if (nmsHitResult == null || nmsHitResult.getType() == EnumMovingObjectType.MISS) return null;
+    public static RayTraceResult fromNMS(World world, HitResult nmsHitResult) {
+        if (nmsHitResult == null || nmsHitResult.getType() == Type.MISS) return null;
 
-        Vec3D nmsHitPos = nmsHitResult.getLocation();
+        Vec3 nmsHitPos = nmsHitResult.getLocation();
         Vector hitPosition = new Vector(nmsHitPos.x, nmsHitPos.y, nmsHitPos.z);
         BlockFace hitBlockFace = null;
 
-        if (nmsHitResult.getType() == EnumMovingObjectType.ENTITY) {
-            Entity hitEntity = ((MovingObjectPositionEntity) nmsHitResult).getEntity().getBukkitEntity();
+        if (nmsHitResult.getType() == Type.ENTITY) {
+            Entity hitEntity = ((EntityHitResult) nmsHitResult).getEntity().getBukkitEntity();
             return new RayTraceResult(hitPosition, hitEntity, null);
         }
 
         Block hitBlock = null;
-        BlockPosition nmsBlockPos = null;
-        if (nmsHitResult.getType() == EnumMovingObjectType.BLOCK) {
-            MovingObjectPositionBlock blockHitResult = (MovingObjectPositionBlock) nmsHitResult;
+        BlockPos nmsBlockPos = null;
+        if (nmsHitResult.getType() == Type.BLOCK) {
+            BlockHitResult blockHitResult = (BlockHitResult) nmsHitResult;
             hitBlockFace = CraftBlock.notchToBlockFace(blockHitResult.getDirection());
             nmsBlockPos = blockHitResult.getBlockPos();
         }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftSpawnCategory.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftSpawnCategory.java
index 857c7811ff..cba660a050 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftSpawnCategory.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftSpawnCategory.java
@@ -1,6 +1,6 @@
 package org.bukkit.craftbukkit.util;
 
-import net.minecraft.world.entity.EnumCreatureType;
+import net.minecraft.world.entity.MobCategory;
 import org.bukkit.entity.SpawnCategory;
 
 public class CraftSpawnCategory {
@@ -43,7 +43,7 @@ public class CraftSpawnCategory {
         };
     }
 
-    public static SpawnCategory toBukkit(EnumCreatureType enumCreatureType) {
+    public static SpawnCategory toBukkit(MobCategory enumCreatureType) {
         return switch (enumCreatureType) {
             case MONSTER -> SpawnCategory.MONSTER;
             case CREATURE -> SpawnCategory.ANIMAL;
@@ -57,16 +57,16 @@ public class CraftSpawnCategory {
         };
     }
 
-    public static EnumCreatureType toNMS(SpawnCategory spawnCategory) {
+    public static MobCategory toNMS(SpawnCategory spawnCategory) {
         return switch (spawnCategory) {
-            case MONSTER -> EnumCreatureType.MONSTER;
-            case ANIMAL -> EnumCreatureType.CREATURE;
-            case AMBIENT -> EnumCreatureType.AMBIENT;
-            case AXOLOTL -> EnumCreatureType.AXOLOTLS;
-            case WATER_ANIMAL -> EnumCreatureType.WATER_CREATURE;
-            case WATER_AMBIENT -> EnumCreatureType.WATER_AMBIENT;
-            case WATER_UNDERGROUND_CREATURE -> EnumCreatureType.UNDERGROUND_WATER_CREATURE;
-            case MISC -> EnumCreatureType.MISC;
+            case MONSTER -> MobCategory.MONSTER;
+            case ANIMAL -> MobCategory.CREATURE;
+            case AMBIENT -> MobCategory.AMBIENT;
+            case AXOLOTL -> MobCategory.AXOLOTLS;
+            case WATER_ANIMAL -> MobCategory.WATER_CREATURE;
+            case WATER_AMBIENT -> MobCategory.WATER_AMBIENT;
+            case WATER_UNDERGROUND_CREATURE -> MobCategory.UNDERGROUND_WATER_CREATURE;
+            case MISC -> MobCategory.MISC;
             default -> throw new UnsupportedOperationException("Unknown SpawnCategory " + spawnCategory + " for EnumCreatureType");
         };
     }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftStructureSearchResult.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftStructureSearchResult.java
index 8fb83728e0..7f5ba5fe86 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftStructureSearchResult.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftStructureSearchResult.java
@@ -15,10 +15,10 @@ public class CraftStructureSearchResult implements StructureSearchResult {
     }
 
     public Structure getStructure() {
-        return structure;
+        return this.structure;
     }
 
     public Location getLocation() {
-        return location;
+        return this.location;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftStructureTransformer.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftStructureTransformer.java
index 05e855bd91..b4d569b3f4 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftStructureTransformer.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftStructureTransformer.java
@@ -2,13 +2,13 @@ package org.bukkit.craftbukkit.util;
 
 import java.util.Collection;
 import java.util.Objects;
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
 import net.minecraft.world.entity.Entity;
-import net.minecraft.world.level.ChunkCoordIntPair;
-import net.minecraft.world.level.GeneratorAccessSeed;
+import net.minecraft.world.level.ChunkPos;
 import net.minecraft.world.level.StructureManager;
+import net.minecraft.world.level.WorldGenLevel;
+import net.minecraft.world.level.levelgen.structure.BoundingBox;
 import net.minecraft.world.level.levelgen.structure.Structure;
-import net.minecraft.world.level.levelgen.structure.StructureBoundingBox;
 import org.bukkit.Bukkit;
 import org.bukkit.block.BlockState;
 import org.bukkit.craftbukkit.block.CraftBlockState;
@@ -38,23 +38,23 @@ public class CraftStructureTransformer {
 
         @Override
         public BlockState getOriginal() {
-            if (originalCopy != null) {
-                return originalCopy;
+            if (this.originalCopy != null) {
+                return this.originalCopy;
             }
-            return originalCopy = original.copy();
+            return this.originalCopy = this.original.copy();
         }
 
         @Override
         public BlockState getWorld() {
-            if (worldCopy != null) {
-                return worldCopy;
+            if (this.worldCopy != null) {
+                return this.worldCopy;
             }
-            return worldCopy = world.copy();
+            return this.worldCopy = this.world.copy();
         }
 
         private void destroyCopies() {
-            originalCopy = null;
-            worldCopy = null;
+            this.originalCopy = null;
+            this.worldCopy = null;
         }
 
     }
@@ -63,7 +63,7 @@ public class CraftStructureTransformer {
     private BlockTransformer[] blockTransformers;
     private EntityTransformer[] entityTransformers;
 
-    public CraftStructureTransformer(Cause cause, GeneratorAccessSeed generatoraccessseed, StructureManager structuremanager, Structure structure, StructureBoundingBox structureboundingbox, ChunkCoordIntPair chunkcoordintpair) {
+    public CraftStructureTransformer(Cause cause, WorldGenLevel generatoraccessseed, StructureManager structuremanager, Structure structure, BoundingBox structureboundingbox, ChunkPos chunkcoordintpair) {
         AsyncStructureGenerateEvent event = new AsyncStructureGenerateEvent(structuremanager.level.getMinecraftWorld().getWorld(), !Bukkit.isPrimaryThread(), cause, CraftStructure.minecraftToBukkit(structure), new org.bukkit.util.BoundingBox(structureboundingbox.minX(), structureboundingbox.minY(), structureboundingbox.minZ(), structureboundingbox.maxX(), structureboundingbox.maxY(), structureboundingbox.maxZ()), chunkcoordintpair.x, chunkcoordintpair.z);
         Bukkit.getPluginManager().callEvent(event);
         this.blockTransformers = event.getBlockTransformers().values().toArray(BlockTransformer[]::new);
@@ -71,18 +71,18 @@ public class CraftStructureTransformer {
         this.limitedRegion = new CraftLimitedRegion(generatoraccessseed, chunkcoordintpair);
     }
 
-    public CraftStructureTransformer(GeneratorAccessSeed generatoraccessseed, ChunkCoordIntPair chunkcoordintpair, Collection<BlockTransformer> blockTransformers, Collection<EntityTransformer> entityTransformers) {
+    public CraftStructureTransformer(WorldGenLevel generatoraccessseed, ChunkPos chunkcoordintpair, Collection<BlockTransformer> blockTransformers, Collection<EntityTransformer> entityTransformers) {
         this.blockTransformers = blockTransformers.toArray(BlockTransformer[]::new);
         this.entityTransformers = entityTransformers.toArray(EntityTransformer[]::new);
         this.limitedRegion = new CraftLimitedRegion(generatoraccessseed, chunkcoordintpair);
     }
 
     public boolean transformEntity(Entity entity) {
-        EntityTransformer[] transformers = entityTransformers;
+        EntityTransformer[] transformers = this.entityTransformers;
         if (transformers == null || transformers.length == 0) {
             return true;
         }
-        CraftLimitedRegion region = limitedRegion;
+        CraftLimitedRegion region = this.limitedRegion;
         if (region == null) {
             return true;
         }
@@ -99,20 +99,20 @@ public class CraftStructureTransformer {
     }
 
     public boolean canTransformBlocks() {
-        return blockTransformers != null && blockTransformers.length != 0 && limitedRegion != null;
+        return this.blockTransformers != null && this.blockTransformers.length != 0 && this.limitedRegion != null;
     }
 
     public CraftBlockState transformCraftState(CraftBlockState originalState) {
-        BlockTransformer[] transformers = blockTransformers;
+        BlockTransformer[] transformers = this.blockTransformers;
         if (transformers == null || transformers.length == 0) {
             return originalState;
         }
-        CraftLimitedRegion region = limitedRegion;
+        CraftLimitedRegion region = this.limitedRegion;
         if (region == null) {
             return originalState;
         }
         originalState.setWorldHandle(region.getHandle());
-        BlockPosition position = originalState.getPosition();
+        BlockPos position = originalState.getPosition();
         BlockState blockState = originalState.copy();
         CraftTransformationState transformationState = new CraftTransformationState(originalState, region.getBlockState(position.getX(), position.getY(), position.getZ()));
         for (BlockTransformer transformer : transformers) {
@@ -123,8 +123,8 @@ public class CraftStructureTransformer {
     }
 
     public void discard() {
-        limitedRegion.saveEntities();
-        limitedRegion.breakLink();
+        this.limitedRegion.saveEntities();
+        this.limitedRegion.breakLink();
         this.limitedRegion = null;
         this.blockTransformers = null;
         this.entityTransformers = null;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftVector.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftVector.java
index fc63c87f1a..3071ac1ac0 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftVector.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftVector.java
@@ -5,11 +5,11 @@ public final class CraftVector {
     private CraftVector() {
     }
 
-    public static org.bukkit.util.Vector toBukkit(net.minecraft.world.phys.Vec3D nms) {
+    public static org.bukkit.util.Vector toBukkit(net.minecraft.world.phys.Vec3 nms) {
         return new org.bukkit.util.Vector(nms.x, nms.y, nms.z);
     }
 
-    public static net.minecraft.world.phys.Vec3D toNMS(org.bukkit.util.Vector bukkit) {
-        return new net.minecraft.world.phys.Vec3D(bukkit.getX(), bukkit.getY(), bukkit.getZ());
+    public static net.minecraft.world.phys.Vec3 toNMS(org.bukkit.util.Vector bukkit) {
+        return new net.minecraft.world.phys.Vec3(bukkit.getX(), bukkit.getY(), bukkit.getZ());
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftVoxelShape.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftVoxelShape.java
index 641e1a44c3..0e5625cad2 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftVoxelShape.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/CraftVoxelShape.java
@@ -4,7 +4,7 @@ import com.google.common.base.Preconditions;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.List;
-import net.minecraft.world.phys.AxisAlignedBB;
+import net.minecraft.world.phys.AABB;
 import net.minecraft.world.phys.shapes.VoxelShape;
 import org.bukkit.util.BoundingBox;
 
@@ -18,9 +18,9 @@ public final class CraftVoxelShape implements org.bukkit.util.VoxelShape {
 
     @Override
     public Collection<BoundingBox> getBoundingBoxes() {
-        List<AxisAlignedBB> boxes = shape.toAabbs();
+        List<AABB> boxes = this.shape.toAabbs();
         List<BoundingBox> craftBoxes = new ArrayList<>(boxes.size());
-        for (AxisAlignedBB aabb : boxes) {
+        for (AABB aabb : boxes) {
             craftBoxes.add(new BoundingBox(aabb.minX, aabb.minY, aabb.minZ, aabb.maxX, aabb.maxY, aabb.maxZ));
         }
         return craftBoxes;
@@ -30,7 +30,7 @@ public final class CraftVoxelShape implements org.bukkit.util.VoxelShape {
     public boolean overlaps(BoundingBox other) {
         Preconditions.checkArgument(other != null, "Other cannot be null");
 
-        for (BoundingBox box : getBoundingBoxes()) {
+        for (BoundingBox box : this.getBoundingBoxes()) {
             if (box.overlaps(other)) {
                 return true;
             }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java
index cb42d26f01..b8a865305c 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/DelegatedGeneratorAccess.java
@@ -6,786 +6,786 @@ import java.util.UUID;
 import java.util.function.Predicate;
 import java.util.function.Supplier;
 import java.util.stream.Stream;
-import net.minecraft.core.BlockPosition;
-import net.minecraft.core.EnumDirection;
+import net.minecraft.core.BlockPos;
+import net.minecraft.core.Direction;
 import net.minecraft.core.Holder;
 import net.minecraft.core.HolderLookup;
-import net.minecraft.core.IRegistry;
-import net.minecraft.core.IRegistryCustom;
-import net.minecraft.core.particles.ParticleParam;
+import net.minecraft.core.Registry;
+import net.minecraft.core.RegistryAccess;
+import net.minecraft.core.particles.ParticleOptions;
 import net.minecraft.resources.ResourceKey;
 import net.minecraft.server.MinecraftServer;
-import net.minecraft.server.level.WorldServer;
-import net.minecraft.sounds.SoundCategory;
-import net.minecraft.sounds.SoundEffect;
+import net.minecraft.server.level.ServerLevel;
+import net.minecraft.sounds.SoundEvent;
+import net.minecraft.sounds.SoundSource;
 import net.minecraft.util.RandomSource;
-import net.minecraft.world.DifficultyDamageScaler;
-import net.minecraft.world.EnumDifficulty;
+import net.minecraft.world.Difficulty;
+import net.minecraft.world.DifficultyInstance;
 import net.minecraft.world.entity.Entity;
-import net.minecraft.world.entity.player.EntityHuman;
+import net.minecraft.world.entity.player.Player;
 import net.minecraft.world.flag.FeatureFlagSet;
+import net.minecraft.world.level.BlockGetter;
 import net.minecraft.world.level.ClipBlockStateContext;
+import net.minecraft.world.level.ClipContext;
 import net.minecraft.world.level.ColorResolver;
-import net.minecraft.world.level.EnumSkyBlock;
-import net.minecraft.world.level.GeneratorAccessSeed;
-import net.minecraft.world.level.IBlockAccess;
-import net.minecraft.world.level.RayTrace;
-import net.minecraft.world.level.biome.BiomeBase;
+import net.minecraft.world.level.LightLayer;
+import net.minecraft.world.level.WorldGenLevel;
+import net.minecraft.world.level.biome.Biome;
 import net.minecraft.world.level.biome.BiomeManager;
 import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.block.entity.TileEntity;
-import net.minecraft.world.level.block.entity.TileEntityTypes;
-import net.minecraft.world.level.block.state.IBlockData;
+import net.minecraft.world.level.block.entity.BlockEntity;
+import net.minecraft.world.level.block.entity.BlockEntityType;
+import net.minecraft.world.level.block.state.BlockState;
 import net.minecraft.world.level.border.WorldBorder;
-import net.minecraft.world.level.chunk.IChunkAccess;
-import net.minecraft.world.level.chunk.IChunkProvider;
+import net.minecraft.world.level.chunk.ChunkAccess;
+import net.minecraft.world.level.chunk.ChunkSource;
 import net.minecraft.world.level.chunk.status.ChunkStatus;
-import net.minecraft.world.level.dimension.DimensionManager;
+import net.minecraft.world.level.dimension.DimensionType;
 import net.minecraft.world.level.entity.EntityTypeTest;
 import net.minecraft.world.level.gameevent.GameEvent;
-import net.minecraft.world.level.levelgen.HeightMap;
+import net.minecraft.world.level.levelgen.Heightmap;
 import net.minecraft.world.level.lighting.LevelLightEngine;
 import net.minecraft.world.level.material.Fluid;
-import net.minecraft.world.level.material.FluidType;
-import net.minecraft.world.level.storage.WorldData;
-import net.minecraft.world.phys.AxisAlignedBB;
-import net.minecraft.world.phys.MovingObjectPositionBlock;
-import net.minecraft.world.phys.Vec3D;
+import net.minecraft.world.level.material.FluidState;
+import net.minecraft.world.level.storage.LevelData;
+import net.minecraft.world.phys.AABB;
+import net.minecraft.world.phys.BlockHitResult;
+import net.minecraft.world.phys.Vec3;
+import net.minecraft.world.phys.shapes.CollisionContext;
 import net.minecraft.world.phys.shapes.VoxelShape;
-import net.minecraft.world.phys.shapes.VoxelShapeCollision;
 import net.minecraft.world.ticks.LevelTickAccess;
-import net.minecraft.world.ticks.TickListPriority;
+import net.minecraft.world.ticks.TickPriority;
 import org.bukkit.event.entity.CreatureSpawnEvent;
 
-public abstract class DelegatedGeneratorAccess implements GeneratorAccessSeed {
+public abstract class DelegatedGeneratorAccess implements WorldGenLevel {
 
-    private GeneratorAccessSeed handle;
+    private WorldGenLevel handle;
 
-    public void setHandle(GeneratorAccessSeed worldAccess) {
+    public void setHandle(WorldGenLevel worldAccess) {
         this.handle = worldAccess;
     }
 
-    public GeneratorAccessSeed getHandle() {
-        return handle;
+    public WorldGenLevel getHandle() {
+        return this.handle;
     }
 
     @Override
     public long getSeed() {
-        return handle.getSeed();
+        return this.handle.getSeed();
     }
 
     @Override
-    public boolean ensureCanWrite(BlockPosition var0) {
-        return handle.ensureCanWrite(var0);
+    public boolean ensureCanWrite(BlockPos pos) {
+        return this.handle.ensureCanWrite(pos);
     }
 
     @Override
-    public void setCurrentlyGenerating(Supplier<String> var0) {
-        handle.setCurrentlyGenerating(var0);
+    public void setCurrentlyGenerating(Supplier<String> structureName) {
+        this.handle.setCurrentlyGenerating(structureName);
     }
 
     @Override
-    public WorldServer getLevel() {
-        return handle.getLevel();
+    public ServerLevel getLevel() {
+        return this.handle.getLevel();
     }
 
     @Override
     public void addFreshEntityWithPassengers(Entity entity) {
-        handle.addFreshEntityWithPassengers(entity);
+        this.handle.addFreshEntityWithPassengers(entity);
     }
 
     @Override
     public void addFreshEntityWithPassengers(Entity entity, CreatureSpawnEvent.SpawnReason reason) {
-        handle.addFreshEntityWithPassengers(entity, reason);
+        this.handle.addFreshEntityWithPassengers(entity, reason);
     }
 
     @Override
-    public WorldServer getMinecraftWorld() {
-        return handle.getMinecraftWorld();
+    public ServerLevel getMinecraftWorld() {
+        return this.handle.getMinecraftWorld();
     }
 
     @Override
     public long dayTime() {
-        return handle.dayTime();
+        return this.handle.dayTime();
     }
 
     @Override
     public long nextSubTickCount() {
-        return handle.nextSubTickCount();
+        return this.handle.nextSubTickCount();
     }
 
     @Override
     public LevelTickAccess<Block> getBlockTicks() {
-        return handle.getBlockTicks();
+        return this.handle.getBlockTicks();
     }
 
     @Override
-    public void scheduleTick(BlockPosition blockposition, Block block, int i, TickListPriority ticklistpriority) {
-        handle.scheduleTick(blockposition, block, i, ticklistpriority);
+    public void scheduleTick(BlockPos pos, Block block, int delay, TickPriority priority) {
+        this.handle.scheduleTick(pos, block, delay, priority);
     }
 
     @Override
-    public void scheduleTick(BlockPosition blockposition, Block block, int i) {
-        handle.scheduleTick(blockposition, block, i);
+    public void scheduleTick(BlockPos pos, Block block, int delay) {
+        this.handle.scheduleTick(pos, block, delay);
     }
 
     @Override
-    public LevelTickAccess<FluidType> getFluidTicks() {
-        return handle.getFluidTicks();
+    public LevelTickAccess<Fluid> getFluidTicks() {
+        return this.handle.getFluidTicks();
     }
 
     @Override
-    public void scheduleTick(BlockPosition blockposition, FluidType fluidtype, int i, TickListPriority ticklistpriority) {
-        handle.scheduleTick(blockposition, fluidtype, i, ticklistpriority);
+    public void scheduleTick(BlockPos pos, Fluid fluid, int delay, TickPriority priority) {
+        this.handle.scheduleTick(pos, fluid, delay, priority);
     }
 
     @Override
-    public void scheduleTick(BlockPosition blockposition, FluidType fluidtype, int i) {
-        handle.scheduleTick(blockposition, fluidtype, i);
+    public void scheduleTick(BlockPos pos, Fluid fluid, int delay) {
+        this.handle.scheduleTick(pos, fluid, delay);
     }
 
     @Override
-    public WorldData getLevelData() {
-        return handle.getLevelData();
+    public LevelData getLevelData() {
+        return this.handle.getLevelData();
     }
 
     @Override
-    public DifficultyDamageScaler getCurrentDifficultyAt(BlockPosition blockposition) {
-        return handle.getCurrentDifficultyAt(blockposition);
+    public DifficultyInstance getCurrentDifficultyAt(BlockPos pos) {
+        return this.handle.getCurrentDifficultyAt(pos);
     }
 
     @Override
     public MinecraftServer getServer() {
-        return handle.getServer();
+        return this.handle.getServer();
     }
 
     @Override
-    public EnumDifficulty getDifficulty() {
-        return handle.getDifficulty();
+    public Difficulty getDifficulty() {
+        return this.handle.getDifficulty();
     }
 
     @Override
-    public IChunkProvider getChunkSource() {
-        return handle.getChunkSource();
+    public ChunkSource getChunkSource() {
+        return this.handle.getChunkSource();
     }
 
     @Override
-    public boolean hasChunk(int i, int j) {
-        return handle.hasChunk(i, j);
+    public boolean hasChunk(int chunkX, int chunkZ) {
+        return this.handle.hasChunk(chunkX, chunkZ);
     }
 
     @Override
     public RandomSource getRandom() {
-        return handle.getRandom();
+        return this.handle.getRandom();
     }
 
     @Override
-    public void blockUpdated(BlockPosition blockposition, Block block) {
-        handle.blockUpdated(blockposition, block);
+    public void blockUpdated(BlockPos pos, Block block) {
+        this.handle.blockUpdated(pos, block);
     }
 
     @Override
-    public void neighborShapeChanged(EnumDirection enumdirection, BlockPosition blockposition, BlockPosition blockposition1, IBlockData iblockdata, int i, int j) {
-        handle.neighborShapeChanged(enumdirection, blockposition, blockposition1, iblockdata, i, j);
+    public void neighborShapeChanged(Direction direction, BlockPos pos, BlockPos neighborPos, BlockState neighborState, int flags, int maxUpdateDepth) {
+        this.handle.neighborShapeChanged(direction, pos, neighborPos, neighborState, flags, maxUpdateDepth);
     }
 
     @Override
-    public void playSound(EntityHuman entityhuman, BlockPosition blockposition, SoundEffect soundeffect, SoundCategory soundcategory) {
-        handle.playSound(entityhuman, blockposition, soundeffect, soundcategory);
+    public void playSound(Player except, BlockPos pos, SoundEvent sound, SoundSource category) {
+        this.handle.playSound(except, pos, sound, category);
     }
 
     @Override
-    public void playSound(EntityHuman entityhuman, BlockPosition blockposition, SoundEffect soundeffect, SoundCategory soundcategory, float f, float f1) {
-        handle.playSound(entityhuman, blockposition, soundeffect, soundcategory, f, f1);
+    public void playSound(Player source, BlockPos pos, SoundEvent sound, SoundSource category, float volume, float pitch) {
+        this.handle.playSound(source, pos, sound, category, volume, pitch);
     }
 
     @Override
-    public void addParticle(ParticleParam particleparam, double d0, double d1, double d2, double d3, double d4, double d5) {
-        handle.addParticle(particleparam, d0, d1, d2, d3, d4, d5);
+    public void addParticle(ParticleOptions parameters, double x, double y, double z, double velocityX, double velocityY, double velocityZ) {
+        this.handle.addParticle(parameters, x, y, z, velocityX, velocityY, velocityZ);
     }
 
     @Override
-    public void levelEvent(EntityHuman entityhuman, int i, BlockPosition blockposition, int j) {
-        handle.levelEvent(entityhuman, i, blockposition, j);
+    public void levelEvent(Player player, int eventId, BlockPos pos, int data) {
+        this.handle.levelEvent(player, eventId, pos, data);
     }
 
     @Override
-    public void levelEvent(int i, BlockPosition blockposition, int j) {
-        handle.levelEvent(i, blockposition, j);
+    public void levelEvent(int eventId, BlockPos pos, int data) {
+        this.handle.levelEvent(eventId, pos, data);
     }
 
     @Override
-    public void gameEvent(Holder<GameEvent> holder, Vec3D vec3d, GameEvent.a gameevent_a) {
-        handle.gameEvent(holder, vec3d, gameevent_a);
+    public void gameEvent(Holder<GameEvent> event, Vec3 emitterPos, GameEvent.Context emitter) {
+        this.handle.gameEvent(event, emitterPos, emitter);
     }
 
     @Override
-    public void gameEvent(Entity entity, Holder<GameEvent> holder, Vec3D vec3d) {
-        handle.gameEvent(entity, holder, vec3d);
+    public void gameEvent(Entity entity, Holder<GameEvent> event, Vec3 pos) {
+        this.handle.gameEvent(entity, event, pos);
     }
 
     @Override
-    public void gameEvent(Entity entity, Holder<GameEvent> holder, BlockPosition blockposition) {
-        handle.gameEvent(entity, holder, blockposition);
+    public void gameEvent(Entity entity, Holder<GameEvent> event, BlockPos pos) {
+        this.handle.gameEvent(entity, event, pos);
     }
 
     @Override
-    public void gameEvent(Holder<GameEvent> holder, BlockPosition blockposition, GameEvent.a gameevent_a) {
-        handle.gameEvent(holder, blockposition, gameevent_a);
+    public void gameEvent(Holder<GameEvent> event, BlockPos pos, GameEvent.Context emitter) {
+        this.handle.gameEvent(event, pos, emitter);
     }
 
     @Override
-    public void gameEvent(ResourceKey<GameEvent> resourcekey, BlockPosition blockposition, GameEvent.a gameevent_a) {
-        handle.gameEvent(resourcekey, blockposition, gameevent_a);
+    public void gameEvent(ResourceKey<GameEvent> event, BlockPos pos, GameEvent.Context emitter) {
+        this.handle.gameEvent(event, pos, emitter);
     }
 
     @Override
-    public <T extends TileEntity> Optional<T> getBlockEntity(BlockPosition var0, TileEntityTypes<T> var1) {
-        return handle.getBlockEntity(var0, var1);
+    public <T extends BlockEntity> Optional<T> getBlockEntity(BlockPos pos, BlockEntityType<T> type) {
+        return this.handle.getBlockEntity(pos, type);
     }
 
     @Override
-    public List<VoxelShape> getEntityCollisions(Entity var0, AxisAlignedBB var1) {
-        return handle.getEntityCollisions(var0, var1);
+    public List<VoxelShape> getEntityCollisions(Entity entity, AABB box) {
+        return this.handle.getEntityCollisions(entity, box);
     }
 
     @Override
-    public boolean isUnobstructed(Entity var0, VoxelShape var1) {
-        return handle.isUnobstructed(var0, var1);
+    public boolean isUnobstructed(Entity except, VoxelShape shape) {
+        return this.handle.isUnobstructed(except, shape);
     }
 
     @Override
-    public BlockPosition getHeightmapPos(HeightMap.Type var0, BlockPosition var1) {
-        return handle.getHeightmapPos(var0, var1);
+    public BlockPos getHeightmapPos(Heightmap.Types heightmap, BlockPos pos) {
+        return this.handle.getHeightmapPos(heightmap, pos);
     }
 
     @Override
     public float getMoonBrightness() {
-        return handle.getMoonBrightness();
+        return this.handle.getMoonBrightness();
     }
 
     @Override
-    public float getTimeOfDay(float var0) {
-        return handle.getTimeOfDay(var0);
+    public float getTimeOfDay(float tickDelta) {
+        return this.handle.getTimeOfDay(tickDelta);
     }
 
     @Override
     public int getMoonPhase() {
-        return handle.getMoonPhase();
+        return this.handle.getMoonPhase();
     }
 
     @Override
-    public IChunkAccess getChunk(int i, int i1, ChunkStatus cs, boolean bln) {
-        return handle.getChunk(i, i1, cs, bln);
+    public ChunkAccess getChunk(int chunkX, int chunkZ, ChunkStatus leastStatus, boolean create) {
+        return this.handle.getChunk(chunkX, chunkZ, leastStatus, create);
     }
 
     @Override
-    public int getHeight(HeightMap.Type type, int i, int i1) {
-        return handle.getHeight(type, i, i1);
+    public int getHeight(Heightmap.Types heightmap, int x, int z) {
+        return this.handle.getHeight(heightmap, x, z);
     }
 
     @Override
     public int getSkyDarken() {
-        return handle.getSkyDarken();
+        return this.handle.getSkyDarken();
     }
 
     @Override
     public BiomeManager getBiomeManager() {
-        return handle.getBiomeManager();
+        return this.handle.getBiomeManager();
     }
 
     @Override
-    public Holder<BiomeBase> getBiome(BlockPosition var0) {
-        return handle.getBiome(var0);
+    public Holder<Biome> getBiome(BlockPos pos) {
+        return this.handle.getBiome(pos);
     }
 
     @Override
-    public Stream<IBlockData> getBlockStatesIfLoaded(AxisAlignedBB var0) {
-        return handle.getBlockStatesIfLoaded(var0);
+    public Stream<BlockState> getBlockStatesIfLoaded(AABB box) {
+        return this.handle.getBlockStatesIfLoaded(box);
     }
 
     @Override
-    public int getBlockTint(BlockPosition var0, ColorResolver var1) {
-        return handle.getBlockTint(var0, var1);
+    public int getBlockTint(BlockPos pos, ColorResolver colorResolver) {
+        return this.handle.getBlockTint(pos, colorResolver);
     }
 
     @Override
-    public Holder<BiomeBase> getNoiseBiome(int var0, int var1, int var2) {
-        return handle.getNoiseBiome(var0, var1, var2);
+    public Holder<Biome> getNoiseBiome(int biomeX, int biomeY, int biomeZ) {
+        return this.handle.getNoiseBiome(biomeX, biomeY, biomeZ);
     }
 
     @Override
-    public Holder<BiomeBase> getUncachedNoiseBiome(int i, int i1, int i2) {
-        return handle.getUncachedNoiseBiome(i, i1, i2);
+    public Holder<Biome> getUncachedNoiseBiome(int biomeX, int biomeY, int biomeZ) {
+        return this.handle.getUncachedNoiseBiome(biomeX, biomeY, biomeZ);
     }
 
     @Override
     public boolean isClientSide() {
-        return handle.isClientSide();
+        return this.handle.isClientSide();
     }
 
     @Override
     public int getSeaLevel() {
-        return handle.getSeaLevel();
+        return this.handle.getSeaLevel();
     }
 
     @Override
-    public DimensionManager dimensionType() {
-        return handle.dimensionType();
+    public DimensionType dimensionType() {
+        return this.handle.dimensionType();
     }
 
     @Override
     public int getMinY() {
-        return handle.getMinY();
+        return this.handle.getMinY();
     }
 
     @Override
     public int getHeight() {
-        return handle.getHeight();
+        return this.handle.getHeight();
     }
 
     @Override
-    public boolean isEmptyBlock(BlockPosition var0) {
-        return handle.isEmptyBlock(var0);
+    public boolean isEmptyBlock(BlockPos pos) {
+        return this.handle.isEmptyBlock(pos);
     }
 
     @Override
-    public boolean canSeeSkyFromBelowWater(BlockPosition var0) {
-        return handle.canSeeSkyFromBelowWater(var0);
+    public boolean canSeeSkyFromBelowWater(BlockPos pos) {
+        return this.handle.canSeeSkyFromBelowWater(pos);
     }
 
     @Override
-    public float getPathfindingCostFromLightLevels(BlockPosition var0) {
-        return handle.getPathfindingCostFromLightLevels(var0);
+    public float getPathfindingCostFromLightLevels(BlockPos pos) {
+        return this.handle.getPathfindingCostFromLightLevels(pos);
     }
 
     @Override
-    public float getLightLevelDependentMagicValue(BlockPosition var0) {
-        return handle.getLightLevelDependentMagicValue(var0);
+    public float getLightLevelDependentMagicValue(BlockPos pos) {
+        return this.handle.getLightLevelDependentMagicValue(pos);
     }
 
     @Override
-    public IChunkAccess getChunk(BlockPosition var0) {
-        return handle.getChunk(var0);
+    public ChunkAccess getChunk(BlockPos pos) {
+        return this.handle.getChunk(pos);
     }
 
     @Override
-    public IChunkAccess getChunk(int var0, int var1) {
-        return handle.getChunk(var0, var1);
+    public ChunkAccess getChunk(int chunkX, int chunkZ) {
+        return this.handle.getChunk(chunkX, chunkZ);
     }
 
     @Override
-    public IChunkAccess getChunk(int var0, int var1, ChunkStatus var2) {
-        return handle.getChunk(var0, var1, var2);
+    public ChunkAccess getChunk(int chunkX, int chunkZ, ChunkStatus status) {
+        return this.handle.getChunk(chunkX, chunkZ, status);
     }
 
     @Override
-    public IBlockAccess getChunkForCollisions(int var0, int var1) {
-        return handle.getChunkForCollisions(var0, var1);
+    public BlockGetter getChunkForCollisions(int chunkX, int chunkZ) {
+        return this.handle.getChunkForCollisions(chunkX, chunkZ);
     }
 
     @Override
-    public boolean isWaterAt(BlockPosition var0) {
-        return handle.isWaterAt(var0);
+    public boolean isWaterAt(BlockPos pos) {
+        return this.handle.isWaterAt(pos);
     }
 
     @Override
-    public boolean containsAnyLiquid(AxisAlignedBB var0) {
-        return handle.containsAnyLiquid(var0);
+    public boolean containsAnyLiquid(AABB box) {
+        return this.handle.containsAnyLiquid(box);
     }
 
     @Override
-    public int getMaxLocalRawBrightness(BlockPosition var0) {
-        return handle.getMaxLocalRawBrightness(var0);
+    public int getMaxLocalRawBrightness(BlockPos pos) {
+        return this.handle.getMaxLocalRawBrightness(pos);
     }
 
     @Override
-    public int getMaxLocalRawBrightness(BlockPosition var0, int var1) {
-        return handle.getMaxLocalRawBrightness(var0, var1);
+    public int getMaxLocalRawBrightness(BlockPos pos, int ambientDarkness) {
+        return this.handle.getMaxLocalRawBrightness(pos, ambientDarkness);
     }
 
     @Override
-    public boolean hasChunkAt(int var0, int var1) {
-        return handle.hasChunkAt(var0, var1);
+    public boolean hasChunkAt(int x, int z) {
+        return this.handle.hasChunkAt(x, z);
     }
 
     @Override
-    public boolean hasChunkAt(BlockPosition var0) {
-        return handle.hasChunkAt(var0);
+    public boolean hasChunkAt(BlockPos pos) {
+        return this.handle.hasChunkAt(pos);
     }
 
     @Override
-    public boolean hasChunksAt(BlockPosition var0, BlockPosition var1) {
-        return handle.hasChunksAt(var0, var1);
+    public boolean hasChunksAt(BlockPos min, BlockPos max) {
+        return this.handle.hasChunksAt(min, max);
     }
 
     @Override
-    public boolean hasChunksAt(int var0, int var1, int var2, int var3, int var4, int var5) {
-        return handle.hasChunksAt(var0, var1, var2, var3, var4, var5);
+    public boolean hasChunksAt(int minX, int minY, int minZ, int maxX, int maxY, int maxZ) {
+        return this.handle.hasChunksAt(minX, minY, minZ, maxX, maxY, maxZ);
     }
 
     @Override
-    public boolean hasChunksAt(int var0, int var1, int var2, int var3) {
-        return handle.hasChunksAt(var0, var1, var2, var3);
+    public boolean hasChunksAt(int minX, int minZ, int maxX, int maxZ) {
+        return this.handle.hasChunksAt(minX, minZ, maxX, maxZ);
     }
 
     @Override
-    public IRegistryCustom registryAccess() {
-        return handle.registryAccess();
+    public RegistryAccess registryAccess() {
+        return this.handle.registryAccess();
     }
 
     @Override
     public FeatureFlagSet enabledFeatures() {
-        return handle.enabledFeatures();
+        return this.handle.enabledFeatures();
     }
 
     @Override
-    public <T> HolderLookup<T> holderLookup(ResourceKey<? extends IRegistry<? extends T>> var0) {
-        return handle.holderLookup(var0);
+    public <T> HolderLookup<T> holderLookup(ResourceKey<? extends Registry<? extends T>> registryRef) {
+        return this.handle.holderLookup(registryRef);
     }
 
     @Override
-    public float getShade(EnumDirection ed, boolean bln) {
-        return handle.getShade(ed, bln);
+    public float getShade(Direction direction, boolean shaded) {
+        return this.handle.getShade(direction, shaded);
     }
 
     @Override
     public LevelLightEngine getLightEngine() {
-        return handle.getLightEngine();
+        return this.handle.getLightEngine();
     }
 
     @Override
-    public int getBrightness(EnumSkyBlock var0, BlockPosition var1) {
-        return handle.getBrightness(var0, var1);
+    public int getBrightness(LightLayer type, BlockPos pos) {
+        return this.handle.getBrightness(type, pos);
     }
 
     @Override
-    public int getRawBrightness(BlockPosition var0, int var1) {
-        return handle.getRawBrightness(var0, var1);
+    public int getRawBrightness(BlockPos pos, int ambientDarkness) {
+        return this.handle.getRawBrightness(pos, ambientDarkness);
     }
 
     @Override
-    public boolean canSeeSky(BlockPosition var0) {
-        return handle.canSeeSky(var0);
+    public boolean canSeeSky(BlockPos pos) {
+        return this.handle.canSeeSky(pos);
     }
 
     @Override
     public WorldBorder getWorldBorder() {
-        return handle.getWorldBorder();
+        return this.handle.getWorldBorder();
     }
 
     @Override
-    public boolean isUnobstructed(IBlockData var0, BlockPosition var1, VoxelShapeCollision var2) {
-        return handle.isUnobstructed(var0, var1, var2);
+    public boolean isUnobstructed(BlockState state, BlockPos pos, CollisionContext context) {
+        return this.handle.isUnobstructed(state, pos, context);
     }
 
     @Override
-    public boolean isUnobstructed(Entity var0) {
-        return handle.isUnobstructed(var0);
+    public boolean isUnobstructed(Entity entity) {
+        return this.handle.isUnobstructed(entity);
     }
 
     @Override
-    public boolean noCollision(AxisAlignedBB var0) {
-        return handle.noCollision(var0);
+    public boolean noCollision(AABB box) {
+        return this.handle.noCollision(box);
     }
 
     @Override
-    public boolean noCollision(Entity var0) {
-        return handle.noCollision(var0);
+    public boolean noCollision(Entity entity) {
+        return this.handle.noCollision(entity);
     }
 
     @Override
-    public boolean noCollision(Entity var0, AxisAlignedBB var1) {
-        return handle.noCollision(var0, var1);
+    public boolean noCollision(Entity entity, AABB box) {
+        return this.handle.noCollision(entity, box);
     }
 
     @Override
-    public boolean noCollision(Entity var0, AxisAlignedBB var1, boolean var2) {
-        return handle.noCollision(var0, var1, var2);
+    public boolean noCollision(Entity entity, AABB box, boolean checkFluid) {
+        return this.handle.noCollision(entity, box, checkFluid);
     }
 
     @Override
-    public boolean noBlockCollision(Entity var0, AxisAlignedBB var1) {
-        return handle.noBlockCollision(var0, var1);
+    public boolean noBlockCollision(Entity entity, AABB box) {
+        return this.handle.noBlockCollision(entity, box);
     }
 
     @Override
-    public Iterable<VoxelShape> getCollisions(Entity var0, AxisAlignedBB var1) {
-        return handle.getCollisions(var0, var1);
+    public Iterable<VoxelShape> getCollisions(Entity entity, AABB box) {
+        return this.handle.getCollisions(entity, box);
     }
 
     @Override
-    public Iterable<VoxelShape> getBlockCollisions(Entity var0, AxisAlignedBB var1) {
-        return handle.getBlockCollisions(var0, var1);
+    public Iterable<VoxelShape> getBlockCollisions(Entity entity, AABB box) {
+        return this.handle.getBlockCollisions(entity, box);
     }
 
     @Override
-    public Iterable<VoxelShape> getBlockAndLiquidCollisions(Entity var0, AxisAlignedBB var1) {
-        return handle.getBlockAndLiquidCollisions(var0, var1);
+    public Iterable<VoxelShape> getBlockAndLiquidCollisions(Entity entity, AABB box) {
+        return this.handle.getBlockAndLiquidCollisions(entity, box);
     }
 
     @Override
-    public MovingObjectPositionBlock clipIncludingBorder(RayTrace var0) {
-        return handle.clipIncludingBorder(var0);
+    public BlockHitResult clipIncludingBorder(ClipContext context) {
+        return this.handle.clipIncludingBorder(context);
     }
 
     @Override
-    public boolean collidesWithSuffocatingBlock(Entity var0, AxisAlignedBB var1) {
-        return handle.collidesWithSuffocatingBlock(var0, var1);
+    public boolean collidesWithSuffocatingBlock(Entity entity, AABB box) {
+        return this.handle.collidesWithSuffocatingBlock(entity, box);
     }
 
     @Override
-    public Optional<BlockPosition> findSupportingBlock(Entity var0, AxisAlignedBB var1) {
-        return handle.findSupportingBlock(var0, var1);
+    public Optional<BlockPos> findSupportingBlock(Entity entity, AABB box) {
+        return this.handle.findSupportingBlock(entity, box);
     }
 
     @Override
-    public Optional<Vec3D> findFreePosition(Entity var0, VoxelShape var1, Vec3D var2, double var3, double var5, double var7) {
-        return handle.findFreePosition(var0, var1, var2, var3, var5, var7);
+    public Optional<Vec3> findFreePosition(Entity entity, VoxelShape shape, Vec3 target, double x, double y, double z) {
+        return this.handle.findFreePosition(entity, shape, target, x, y, z);
     }
 
     @Override
-    public int getDirectSignal(BlockPosition var0, EnumDirection var1) {
-        return handle.getDirectSignal(var0, var1);
+    public int getDirectSignal(BlockPos pos, Direction direction) {
+        return this.handle.getDirectSignal(pos, direction);
     }
 
     @Override
-    public int getDirectSignalTo(BlockPosition var0) {
-        return handle.getDirectSignalTo(var0);
+    public int getDirectSignalTo(BlockPos pos) {
+        return this.handle.getDirectSignalTo(pos);
     }
 
     @Override
-    public int getControlInputSignal(BlockPosition var0, EnumDirection var1, boolean var2) {
-        return handle.getControlInputSignal(var0, var1, var2);
+    public int getControlInputSignal(BlockPos pos, Direction direction, boolean onlyFromGate) {
+        return this.handle.getControlInputSignal(pos, direction, onlyFromGate);
     }
 
     @Override
-    public boolean hasSignal(BlockPosition var0, EnumDirection var1) {
-        return handle.hasSignal(var0, var1);
+    public boolean hasSignal(BlockPos pos, Direction direction) {
+        return this.handle.hasSignal(pos, direction);
     }
 
     @Override
-    public int getSignal(BlockPosition var0, EnumDirection var1) {
-        return handle.getSignal(var0, var1);
+    public int getSignal(BlockPos pos, Direction direction) {
+        return this.handle.getSignal(pos, direction);
     }
 
     @Override
-    public boolean hasNeighborSignal(BlockPosition var0) {
-        return handle.hasNeighborSignal(var0);
+    public boolean hasNeighborSignal(BlockPos pos) {
+        return this.handle.hasNeighborSignal(pos);
     }
 
     @Override
-    public int getBestNeighborSignal(BlockPosition var0) {
-        return handle.getBestNeighborSignal(var0);
+    public int getBestNeighborSignal(BlockPos pos) {
+        return this.handle.getBestNeighborSignal(pos);
     }
 
     @Override
-    public TileEntity getBlockEntity(BlockPosition blockposition) {
-        return handle.getBlockEntity(blockposition);
+    public BlockEntity getBlockEntity(BlockPos pos) {
+        return this.handle.getBlockEntity(pos);
     }
 
     @Override
-    public IBlockData getBlockState(BlockPosition blockposition) {
-        return handle.getBlockState(blockposition);
+    public BlockState getBlockState(BlockPos pos) {
+        return this.handle.getBlockState(pos);
     }
 
     @Override
-    public Fluid getFluidState(BlockPosition blockposition) {
-        return handle.getFluidState(blockposition);
+    public FluidState getFluidState(BlockPos pos) {
+        return this.handle.getFluidState(pos);
     }
 
     @Override
-    public int getLightEmission(BlockPosition blockposition) {
-        return handle.getLightEmission(blockposition);
+    public int getLightEmission(BlockPos pos) {
+        return this.handle.getLightEmission(pos);
     }
 
     @Override
-    public Stream<IBlockData> getBlockStates(AxisAlignedBB axisalignedbb) {
-        return handle.getBlockStates(axisalignedbb);
+    public Stream<BlockState> getBlockStates(AABB box) {
+        return this.handle.getBlockStates(box);
     }
 
     @Override
-    public MovingObjectPositionBlock isBlockInLine(ClipBlockStateContext clipblockstatecontext) {
-        return handle.isBlockInLine(clipblockstatecontext);
+    public BlockHitResult isBlockInLine(ClipBlockStateContext context) {
+        return this.handle.isBlockInLine(context);
     }
 
     @Override
-    public MovingObjectPositionBlock clip(RayTrace raytrace1, BlockPosition blockposition) {
-        return handle.clip(raytrace1, blockposition);
+    public BlockHitResult clip(ClipContext raytrace1, BlockPos blockposition) {
+        return this.handle.clip(raytrace1, blockposition);
     }
 
     @Override
-    public MovingObjectPositionBlock clip(RayTrace raytrace) {
-        return handle.clip(raytrace);
+    public BlockHitResult clip(ClipContext context) {
+        return this.handle.clip(context);
     }
 
     @Override
-    public MovingObjectPositionBlock clipWithInteractionOverride(Vec3D vec3d, Vec3D vec3d1, BlockPosition blockposition, VoxelShape voxelshape, IBlockData iblockdata) {
-        return handle.clipWithInteractionOverride(vec3d, vec3d1, blockposition, voxelshape, iblockdata);
+    public BlockHitResult clipWithInteractionOverride(Vec3 start, Vec3 end, BlockPos pos, VoxelShape shape, BlockState state) {
+        return this.handle.clipWithInteractionOverride(start, end, pos, shape, state);
     }
 
     @Override
-    public double getBlockFloorHeight(VoxelShape voxelshape, Supplier<VoxelShape> supplier) {
-        return handle.getBlockFloorHeight(voxelshape, supplier);
+    public double getBlockFloorHeight(VoxelShape blockCollisionShape, Supplier<VoxelShape> belowBlockCollisionShapeGetter) {
+        return this.handle.getBlockFloorHeight(blockCollisionShape, belowBlockCollisionShapeGetter);
     }
 
     @Override
-    public double getBlockFloorHeight(BlockPosition blockposition) {
-        return handle.getBlockFloorHeight(blockposition);
+    public double getBlockFloorHeight(BlockPos pos) {
+        return this.handle.getBlockFloorHeight(pos);
     }
 
     @Override
-    public List<Entity> getEntities(Entity entity, AxisAlignedBB aabb, Predicate<? super Entity> prdct) {
-        return handle.getEntities(entity, aabb, prdct);
+    public List<Entity> getEntities(Entity except, AABB box, Predicate<? super Entity> predicate) {
+        return this.handle.getEntities(except, box, predicate);
     }
 
     @Override
-    public <T extends Entity> List<T> getEntities(EntityTypeTest<Entity, T> ett, AxisAlignedBB aabb, Predicate<? super T> prdct) {
-        return handle.getEntities(ett, aabb, prdct);
+    public <T extends Entity> List<T> getEntities(EntityTypeTest<Entity, T> filter, AABB box, Predicate<? super T> predicate) {
+        return this.handle.getEntities(filter, box, predicate);
     }
 
     @Override
-    public <T extends Entity> List<T> getEntitiesOfClass(Class<T> var0, AxisAlignedBB var1, Predicate<? super T> var2) {
-        return handle.getEntitiesOfClass(var0, var1, var2);
+    public <T extends Entity> List<T> getEntitiesOfClass(Class<T> entityClass, AABB box, Predicate<? super T> predicate) {
+        return this.handle.getEntitiesOfClass(entityClass, box, predicate);
     }
 
     @Override
-    public List<? extends EntityHuman> players() {
-        return handle.players();
+    public List<? extends Player> players() {
+        return this.handle.players();
     }
 
     @Override
-    public List<Entity> getEntities(Entity var0, AxisAlignedBB var1) {
-        return handle.getEntities(var0, var1);
+    public List<Entity> getEntities(Entity except, AABB box) {
+        return this.handle.getEntities(except, box);
     }
 
     @Override
-    public <T extends Entity> List<T> getEntitiesOfClass(Class<T> var0, AxisAlignedBB var1) {
-        return handle.getEntitiesOfClass(var0, var1);
+    public <T extends Entity> List<T> getEntitiesOfClass(Class<T> entityClass, AABB box) {
+        return this.handle.getEntitiesOfClass(entityClass, box);
     }
 
     @Override
-    public EntityHuman getNearestPlayer(double var0, double var2, double var4, double var6, Predicate<Entity> var8) {
-        return handle.getNearestPlayer(var0, var2, var4, var6, var8);
+    public Player getNearestPlayer(double x, double y, double z, double maxDistance, Predicate<Entity> targetPredicate) {
+        return this.handle.getNearestPlayer(x, y, z, maxDistance, targetPredicate);
     }
 
     @Override
-    public EntityHuman getNearestPlayer(Entity var0, double var1) {
-        return handle.getNearestPlayer(var0, var1);
+    public Player getNearestPlayer(Entity entity, double maxDistance) {
+        return this.handle.getNearestPlayer(entity, maxDistance);
     }
 
     @Override
-    public EntityHuman getNearestPlayer(double var0, double var2, double var4, double var6, boolean var8) {
-        return handle.getNearestPlayer(var0, var2, var4, var6, var8);
+    public Player getNearestPlayer(double x, double y, double z, double maxDistance, boolean ignoreCreative) {
+        return this.handle.getNearestPlayer(x, y, z, maxDistance, ignoreCreative);
     }
 
     @Override
-    public boolean hasNearbyAlivePlayer(double var0, double var2, double var4, double var6) {
-        return handle.hasNearbyAlivePlayer(var0, var2, var4, var6);
+    public boolean hasNearbyAlivePlayer(double x, double y, double z, double range) {
+        return this.handle.hasNearbyAlivePlayer(x, y, z, range);
     }
 
     @Override
-    public EntityHuman getPlayerByUUID(UUID var0) {
-        return handle.getPlayerByUUID(var0);
+    public Player getPlayerByUUID(UUID uuid) {
+        return this.handle.getPlayerByUUID(uuid);
     }
 
     @Override
-    public boolean setBlock(BlockPosition blockposition, IBlockData iblockdata, int i, int j) {
-        return handle.setBlock(blockposition, iblockdata, i, j);
+    public boolean setBlock(BlockPos pos, BlockState state, int flags, int maxUpdateDepth) {
+        return this.handle.setBlock(pos, state, flags, maxUpdateDepth);
     }
 
     @Override
-    public boolean setBlock(BlockPosition blockposition, IBlockData iblockdata, int i) {
-        return handle.setBlock(blockposition, iblockdata, i);
+    public boolean setBlock(BlockPos pos, BlockState state, int flags) {
+        return this.handle.setBlock(pos, state, flags);
     }
 
     @Override
-    public boolean removeBlock(BlockPosition blockposition, boolean flag) {
-        return handle.removeBlock(blockposition, flag);
+    public boolean removeBlock(BlockPos pos, boolean move) {
+        return this.handle.removeBlock(pos, move);
     }
 
     @Override
-    public boolean destroyBlock(BlockPosition blockposition, boolean flag) {
-        return handle.destroyBlock(blockposition, flag);
+    public boolean destroyBlock(BlockPos pos, boolean drop) {
+        return this.handle.destroyBlock(pos, drop);
     }
 
     @Override
-    public boolean destroyBlock(BlockPosition blockposition, boolean flag, Entity entity) {
-        return handle.destroyBlock(blockposition, flag, entity);
+    public boolean destroyBlock(BlockPos pos, boolean drop, Entity breakingEntity) {
+        return this.handle.destroyBlock(pos, drop, breakingEntity);
     }
 
     @Override
-    public boolean destroyBlock(BlockPosition blockposition, boolean flag, Entity entity, int i) {
-        return handle.destroyBlock(blockposition, flag, entity, i);
+    public boolean destroyBlock(BlockPos pos, boolean drop, Entity breakingEntity, int maxUpdateDepth) {
+        return this.handle.destroyBlock(pos, drop, breakingEntity, maxUpdateDepth);
     }
 
     @Override
     public boolean addFreshEntity(Entity entity) {
-        return handle.addFreshEntity(entity);
+        return this.handle.addFreshEntity(entity);
     }
 
     @Override
     public boolean addFreshEntity(Entity entity, CreatureSpawnEvent.SpawnReason reason) {
-        return handle.addFreshEntity(entity, reason);
+        return this.handle.addFreshEntity(entity, reason);
     }
 
     @Override
     public int getMaxY() {
-        return handle.getMaxY();
+        return this.handle.getMaxY();
     }
 
     @Override
     public int getSectionsCount() {
-        return handle.getSectionsCount();
+        return this.handle.getSectionsCount();
     }
 
     @Override
     public int getMinSectionY() {
-        return handle.getMinSectionY();
+        return this.handle.getMinSectionY();
     }
 
     @Override
     public int getMaxSectionY() {
-        return handle.getMaxSectionY();
+        return this.handle.getMaxSectionY();
     }
 
     @Override
-    public boolean isInsideBuildHeight(int var0) {
-        return handle.isInsideBuildHeight(var0);
+    public boolean isInsideBuildHeight(int y) {
+        return this.handle.isInsideBuildHeight(y);
     }
 
     @Override
-    public boolean isOutsideBuildHeight(BlockPosition var0) {
-        return handle.isOutsideBuildHeight(var0);
+    public boolean isOutsideBuildHeight(BlockPos pos) {
+        return this.handle.isOutsideBuildHeight(pos);
     }
 
     @Override
-    public boolean isOutsideBuildHeight(int var0) {
-        return handle.isOutsideBuildHeight(var0);
+    public boolean isOutsideBuildHeight(int y) {
+        return this.handle.isOutsideBuildHeight(y);
     }
 
     @Override
-    public int getSectionIndex(int var0) {
-        return handle.getSectionIndex(var0);
+    public int getSectionIndex(int y) {
+        return this.handle.getSectionIndex(y);
     }
 
     @Override
-    public int getSectionIndexFromSectionY(int var0) {
-        return handle.getSectionIndexFromSectionY(var0);
+    public int getSectionIndexFromSectionY(int coord) {
+        return this.handle.getSectionIndexFromSectionY(coord);
     }
 
     @Override
-    public int getSectionYFromSectionIndex(int var0) {
-        return handle.getSectionYFromSectionIndex(var0);
+    public int getSectionYFromSectionIndex(int index) {
+        return this.handle.getSectionYFromSectionIndex(index);
     }
 
     @Override
-    public boolean isStateAtPosition(BlockPosition bp, Predicate<IBlockData> prdct) {
-        return handle.isStateAtPosition(bp, prdct);
+    public boolean isStateAtPosition(BlockPos pos, Predicate<BlockState> state) {
+        return this.handle.isStateAtPosition(pos, state);
     }
 
     @Override
-    public boolean isFluidAtPosition(BlockPosition bp, Predicate<Fluid> prdct) {
-        return handle.isFluidAtPosition(bp, prdct);
+    public boolean isFluidAtPosition(BlockPos pos, Predicate<FluidState> state) {
+        return this.handle.isFluidAtPosition(pos, state);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
index be37cbc03b..e837d76e83 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/DummyGeneratorAccess.java
@@ -2,48 +2,48 @@ package org.bukkit.craftbukkit.util;
 
 import java.util.List;
 import java.util.function.Predicate;
-import net.minecraft.core.BlockPosition;
-import net.minecraft.core.EnumDirection;
+import net.minecraft.core.BlockPos;
+import net.minecraft.core.Direction;
 import net.minecraft.core.Holder;
-import net.minecraft.core.IRegistryCustom;
-import net.minecraft.core.particles.ParticleParam;
+import net.minecraft.core.RegistryAccess;
+import net.minecraft.core.particles.ParticleOptions;
 import net.minecraft.server.MinecraftServer;
-import net.minecraft.server.level.WorldServer;
-import net.minecraft.sounds.SoundCategory;
-import net.minecraft.sounds.SoundEffect;
+import net.minecraft.server.level.ServerLevel;
+import net.minecraft.sounds.SoundEvent;
+import net.minecraft.sounds.SoundSource;
 import net.minecraft.util.RandomSource;
-import net.minecraft.world.DifficultyDamageScaler;
+import net.minecraft.world.DifficultyInstance;
 import net.minecraft.world.entity.Entity;
-import net.minecraft.world.entity.player.EntityHuman;
+import net.minecraft.world.entity.player.Player;
 import net.minecraft.world.flag.FeatureFlagSet;
-import net.minecraft.world.level.GeneratorAccessSeed;
-import net.minecraft.world.level.biome.BiomeBase;
+import net.minecraft.world.level.WorldGenLevel;
+import net.minecraft.world.level.biome.Biome;
 import net.minecraft.world.level.biome.BiomeManager;
 import net.minecraft.world.level.block.Block;
 import net.minecraft.world.level.block.Blocks;
-import net.minecraft.world.level.block.entity.TileEntity;
-import net.minecraft.world.level.block.state.IBlockData;
+import net.minecraft.world.level.block.entity.BlockEntity;
+import net.minecraft.world.level.block.state.BlockState;
 import net.minecraft.world.level.border.WorldBorder;
-import net.minecraft.world.level.chunk.IChunkAccess;
-import net.minecraft.world.level.chunk.IChunkProvider;
+import net.minecraft.world.level.chunk.ChunkAccess;
+import net.minecraft.world.level.chunk.ChunkSource;
 import net.minecraft.world.level.chunk.status.ChunkStatus;
-import net.minecraft.world.level.dimension.DimensionManager;
+import net.minecraft.world.level.dimension.DimensionType;
 import net.minecraft.world.level.entity.EntityTypeTest;
 import net.minecraft.world.level.gameevent.GameEvent;
-import net.minecraft.world.level.levelgen.HeightMap;
+import net.minecraft.world.level.levelgen.Heightmap;
 import net.minecraft.world.level.lighting.LevelLightEngine;
 import net.minecraft.world.level.material.Fluid;
-import net.minecraft.world.level.material.FluidType;
-import net.minecraft.world.level.material.FluidTypes;
-import net.minecraft.world.level.storage.WorldData;
-import net.minecraft.world.phys.AxisAlignedBB;
-import net.minecraft.world.phys.Vec3D;
+import net.minecraft.world.level.material.FluidState;
+import net.minecraft.world.level.material.Fluids;
+import net.minecraft.world.level.storage.LevelData;
+import net.minecraft.world.phys.AABB;
+import net.minecraft.world.phys.Vec3;
+import net.minecraft.world.ticks.BlackholeTickAccess;
 import net.minecraft.world.ticks.LevelTickAccess;
-import net.minecraft.world.ticks.TickListEmpty;
 
-public class DummyGeneratorAccess implements GeneratorAccessSeed {
+public class DummyGeneratorAccess implements WorldGenLevel {
 
-    public static final GeneratorAccessSeed INSTANCE = new DummyGeneratorAccess();
+    public static final WorldGenLevel INSTANCE = new DummyGeneratorAccess();
 
     protected DummyGeneratorAccess() {
     }
@@ -54,7 +54,7 @@ public class DummyGeneratorAccess implements GeneratorAccessSeed {
     }
 
     @Override
-    public WorldServer getLevel() {
+    public ServerLevel getLevel() {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
@@ -65,26 +65,26 @@ public class DummyGeneratorAccess implements GeneratorAccessSeed {
 
     @Override
     public LevelTickAccess<Block> getBlockTicks() {
-        return TickListEmpty.emptyLevelList();
+        return BlackholeTickAccess.emptyLevelList();
     }
 
     @Override
-    public void scheduleTick(BlockPosition blockposition, Block block, int i) {
+    public void scheduleTick(BlockPos pos, Block block, int delay) {
         // Used by BlockComposter
     }
 
     @Override
-    public LevelTickAccess<FluidType> getFluidTicks() {
-        return TickListEmpty.emptyLevelList();
+    public LevelTickAccess<Fluid> getFluidTicks() {
+        return BlackholeTickAccess.emptyLevelList();
     }
 
     @Override
-    public WorldData getLevelData() {
+    public LevelData getLevelData() {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public DifficultyDamageScaler getCurrentDifficultyAt(BlockPosition blockposition) {
+    public DifficultyInstance getCurrentDifficultyAt(BlockPos pos) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
@@ -94,7 +94,7 @@ public class DummyGeneratorAccess implements GeneratorAccessSeed {
     }
 
     @Override
-    public IChunkProvider getChunkSource() {
+    public ChunkSource getChunkSource() {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
@@ -104,47 +104,47 @@ public class DummyGeneratorAccess implements GeneratorAccessSeed {
     }
 
     @Override
-    public void playSound(EntityHuman entityhuman, BlockPosition blockposition, SoundEffect soundeffect, SoundCategory soundcategory, float f, float f1) {
+    public void playSound(Player source, BlockPos pos, SoundEvent sound, SoundSource category, float volume, float pitch) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public void addParticle(ParticleParam particleparam, double d0, double d1, double d2, double d3, double d4, double d5) {
+    public void addParticle(ParticleOptions parameters, double x, double y, double z, double velocityX, double velocityY, double velocityZ) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public void levelEvent(EntityHuman entityhuman, int i, BlockPosition blockposition, int j) {
+    public void levelEvent(Player player, int eventId, BlockPos pos, int data) {
         // Used by PowderSnowBlock.removeFluid
     }
 
     @Override
-    public void gameEvent(Holder<GameEvent> gameevent, Vec3D vec3d, GameEvent.a gameevent_a) {
+    public void gameEvent(Holder<GameEvent> event, Vec3 emitterPos, GameEvent.Context emitter) {
         // Used by BlockComposter
     }
 
     @Override
-    public List<Entity> getEntities(Entity entity, AxisAlignedBB aabb, Predicate<? super Entity> prdct) {
+    public List<Entity> getEntities(Entity except, AABB box, Predicate<? super Entity> predicate) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public <T extends Entity> List<T> getEntities(EntityTypeTest<Entity, T> ett, AxisAlignedBB aabb, Predicate<? super T> prdct) {
+    public <T extends Entity> List<T> getEntities(EntityTypeTest<Entity, T> filter, AABB box, Predicate<? super T> predicate) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public List<? extends EntityHuman> players() {
+    public List<? extends Player> players() {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public IChunkAccess getChunk(int i, int i1, ChunkStatus cs, boolean bln) {
+    public ChunkAccess getChunk(int chunkX, int chunkZ, ChunkStatus leastStatus, boolean create) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public int getHeight(HeightMap.Type type, int i, int i1) {
+    public int getHeight(Heightmap.Types heightmap, int x, int z) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
@@ -159,7 +159,7 @@ public class DummyGeneratorAccess implements GeneratorAccessSeed {
     }
 
     @Override
-    public Holder<BiomeBase> getUncachedNoiseBiome(int i, int i1, int i2) {
+    public Holder<Biome> getUncachedNoiseBiome(int biomeX, int biomeY, int biomeZ) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
@@ -174,12 +174,12 @@ public class DummyGeneratorAccess implements GeneratorAccessSeed {
     }
 
     @Override
-    public DimensionManager dimensionType() {
+    public DimensionType dimensionType() {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public IRegistryCustom registryAccess() {
+    public RegistryAccess registryAccess() {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
@@ -189,7 +189,7 @@ public class DummyGeneratorAccess implements GeneratorAccessSeed {
     }
 
     @Override
-    public float getShade(EnumDirection ed, boolean bln) {
+    public float getShade(Direction direction, boolean shaded) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
@@ -199,18 +199,18 @@ public class DummyGeneratorAccess implements GeneratorAccessSeed {
     }
 
     @Override
-    public TileEntity getBlockEntity(BlockPosition blockposition) {
+    public BlockEntity getBlockEntity(BlockPos pos) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public IBlockData getBlockState(BlockPosition blockposition) {
+    public BlockState getBlockState(BlockPos pos) {
         return Blocks.AIR.defaultBlockState(); // SPIGOT-6515
     }
 
     @Override
-    public Fluid getFluidState(BlockPosition blockposition) {
-        return FluidTypes.EMPTY.defaultFluidState(); // SPIGOT-6634
+    public FluidState getFluidState(BlockPos pos) {
+        return Fluids.EMPTY.defaultFluidState(); // SPIGOT-6634
     }
 
     @Override
@@ -219,27 +219,27 @@ public class DummyGeneratorAccess implements GeneratorAccessSeed {
     }
 
     @Override
-    public boolean isStateAtPosition(BlockPosition bp, Predicate<IBlockData> prdct) {
+    public boolean isStateAtPosition(BlockPos pos, Predicate<BlockState> state) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public boolean isFluidAtPosition(BlockPosition bp, Predicate<Fluid> prdct) {
+    public boolean isFluidAtPosition(BlockPos pos, Predicate<FluidState> state) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public boolean setBlock(BlockPosition blockposition, IBlockData iblockdata, int i, int j) {
+    public boolean setBlock(BlockPos pos, BlockState state, int flags, int maxUpdateDepth) {
         return false;
     }
 
     @Override
-    public boolean removeBlock(BlockPosition blockposition, boolean flag) {
+    public boolean removeBlock(BlockPos pos, boolean move) {
         throw new UnsupportedOperationException("Not supported yet.");
     }
 
     @Override
-    public boolean destroyBlock(BlockPosition blockposition, boolean flag, Entity entity, int i) {
+    public boolean destroyBlock(BlockPos pos, boolean drop, Entity breakingEntity, int maxUpdateDepth) {
         return false; // SPIGOT-6515
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/ForwardLogHandler.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/ForwardLogHandler.java
index 100b8566d9..6bb01e2a11 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/ForwardLogHandler.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/ForwardLogHandler.java
@@ -12,10 +12,10 @@ public class ForwardLogHandler extends ConsoleHandler {
     private Map<String, Logger> cachedLoggers = new ConcurrentHashMap<String, Logger>();
 
     private Logger getLogger(String name) {
-        Logger logger = cachedLoggers.get(name);
+        Logger logger = this.cachedLoggers.get(name);
         if (logger == null) {
             logger = LogManager.getLogger(name);
-            cachedLoggers.put(name, logger);
+            this.cachedLoggers.put(name, logger);
         }
 
         return logger;
@@ -23,10 +23,10 @@ public class ForwardLogHandler extends ConsoleHandler {
 
     @Override
     public void publish(LogRecord record) {
-        Logger logger = getLogger(String.valueOf(record.getLoggerName())); // See SPIGOT-1230
+        Logger logger = this.getLogger(String.valueOf(record.getLoggerName())); // See SPIGOT-1230
         Throwable exception = record.getThrown();
         Level level = record.getLevel();
-        String message = getFormatter().formatMessage(record);
+        String message = this.getFormatter().formatMessage(record);
 
         if (level == Level.SEVERE) {
             logger.error(message, exception);
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/JsonHelper.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/JsonHelper.java
index fea5ea47f2..95cfcc10fa 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/JsonHelper.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/JsonHelper.java
@@ -16,7 +16,7 @@ public final class JsonHelper {
 
     @Nonnull
     public static JsonObject getOrCreateObject(@Nonnull JsonObject parent, @Nonnull String key) {
-        JsonObject jsonObject = getObjectOrNull(parent, key);
+        JsonObject jsonObject = JsonHelper.getObjectOrNull(parent, key);
         if (jsonObject == null) {
             jsonObject = new JsonObject();
             parent.add(key, jsonObject);
@@ -32,7 +32,7 @@ public final class JsonHelper {
 
     @Nullable
     public static String getStringOrNull(JsonObject parent, String key) {
-        JsonPrimitive primitive = getPrimitiveOrNull(parent, key);
+        JsonPrimitive primitive = JsonHelper.getPrimitiveOrNull(parent, key);
         return (primitive != null) ? primitive.getAsString() : null;
     }
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/LazyHashSet.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/LazyHashSet.java
index f194cf2663..62c66e3179 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/LazyHashSet.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/LazyHashSet.java
@@ -9,67 +9,67 @@ public abstract class LazyHashSet<E> implements Set<E> {
 
     @Override
     public int size() {
-        return getReference().size();
+        return this.getReference().size();
     }
 
     @Override
     public boolean isEmpty() {
-        return getReference().isEmpty();
+        return this.getReference().isEmpty();
     }
 
     @Override
     public boolean contains(Object o) {
-        return getReference().contains(o);
+        return this.getReference().contains(o);
     }
 
     @Override
     public Iterator<E> iterator() {
-        return getReference().iterator();
+        return this.getReference().iterator();
     }
 
     @Override
     public Object[] toArray() {
-        return getReference().toArray();
+        return this.getReference().toArray();
     }
 
     @Override
     public <T> T[] toArray(T[] a) {
-        return getReference().toArray(a);
+        return this.getReference().toArray(a);
     }
 
     @Override
     public boolean add(E o) {
-        return getReference().add(o);
+        return this.getReference().add(o);
     }
 
     @Override
     public boolean remove(Object o) {
-        return getReference().remove(o);
+        return this.getReference().remove(o);
     }
 
     @Override
     public boolean containsAll(Collection<?> c) {
-        return getReference().containsAll(c);
+        return this.getReference().containsAll(c);
     }
 
     @Override
     public boolean addAll(Collection<? extends E> c) {
-        return getReference().addAll(c);
+        return this.getReference().addAll(c);
     }
 
     @Override
     public boolean retainAll(Collection<?> c) {
-        return getReference().retainAll(c);
+        return this.getReference().retainAll(c);
     }
 
     @Override
     public boolean removeAll(Collection<?> c) {
-        return getReference().removeAll(c);
+        return this.getReference().removeAll(c);
     }
 
     @Override
     public void clear() {
-        getReference().clear();
+        this.getReference().clear();
     }
 
     public Set<E> getReference() {
@@ -77,18 +77,18 @@ public abstract class LazyHashSet<E> implements Set<E> {
         if (reference != null) {
             return reference;
         }
-        return this.reference = makeReference();
+        return this.reference = this.makeReference();
     }
 
     abstract Set<E> makeReference();
 
     public boolean isLazy() {
-        return reference == null;
+        return this.reference == null;
     }
 
     @Override
     public int hashCode() {
-        return 157 * getReference().hashCode();
+        return 157 * this.getReference().hashCode();
     }
 
     @Override
@@ -105,6 +105,6 @@ public abstract class LazyHashSet<E> implements Set<E> {
 
     @Override
     public String toString() {
-        return getReference().toString();
+        return this.getReference().toString();
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/LazyPlayerSet.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/LazyPlayerSet.java
index fa47193677..0ab4c7eaff 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/LazyPlayerSet.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/LazyPlayerSet.java
@@ -4,7 +4,7 @@ import com.google.common.base.Preconditions;
 import java.util.HashSet;
 import java.util.List;
 import net.minecraft.server.MinecraftServer;
-import net.minecraft.server.level.EntityPlayer;
+import net.minecraft.server.level.ServerPlayer;
 import org.bukkit.entity.Player;
 
 public class LazyPlayerSet extends LazyHashSet<Player> {
@@ -17,10 +17,10 @@ public class LazyPlayerSet extends LazyHashSet<Player> {
 
     @Override
     HashSet<Player> makeReference() {
-        Preconditions.checkState(reference == null, "Reference already created!");
-        List<EntityPlayer> players = server.getPlayerList().players;
+        Preconditions.checkState(this.reference == null, "Reference already created!");
+        List<ServerPlayer> players = this.server.getPlayerList().players;
         HashSet<Player> reference = new HashSet<Player>(players.size());
-        for (EntityPlayer player : players) {
+        for (ServerPlayer player : players) {
             reference.add(player.getBukkitEntity());
         }
         return reference;
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/LimitedClassRemapper.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/LimitedClassRemapper.java
index 6d84b4166c..73644da819 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/LimitedClassRemapper.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/LimitedClassRemapper.java
@@ -16,12 +16,12 @@ public class LimitedClassRemapper extends ClassRemapper {
     public void visit(int version, int access, String name, String signature, String superName, String[] interfaces) {
         this.className = name;
         // We do not want to remap superName and interfaces for the enums
-        cv.visit(version, access, this.remapper.mapType(name), this.remapper.mapSignature(signature, false), superName, interfaces);
+        this.cv.visit(version, access, this.remapper.mapType(name), this.remapper.mapSignature(signature, false), superName, interfaces);
     }
 
     @Override
     protected MethodVisitor createMethodRemapper(MethodVisitor methodVisitor) {
-        return new LimitedMethodRemapper(api, methodVisitor, remapper);
+        return new LimitedMethodRemapper(this.api, methodVisitor, this.remapper);
     }
 
     private class LimitedMethodRemapper extends MethodRemapper {
@@ -34,7 +34,7 @@ public class LimitedClassRemapper extends ClassRemapper {
         public void visitMethodInsn(int opcodeAndSource, String owner, String name, String descriptor, boolean isInterface) {
             if (owner != null && owner.equals("java/lang/Enum") && name != null && name.equals("<init>")) {
                 // We also do not want to remap the init method for enums
-                mv.visitMethodInsn(opcodeAndSource, owner, name, descriptor, isInterface);
+                this.mv.visitMethodInsn(opcodeAndSource, owner, name, descriptor, isInterface);
                 return;
             }
             super.visitMethodInsn(opcodeAndSource, owner, name, descriptor, isInterface);
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/RandomSourceWrapper.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/RandomSourceWrapper.java
index a54aa72e0a..fc02ab2dce 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/RandomSourceWrapper.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/RandomSourceWrapper.java
@@ -24,42 +24,42 @@ public final class RandomSourceWrapper implements RandomSource {
 
     @Override
     public synchronized void setSeed(long seed) {
-        random.setSeed(seed);
+        this.random.setSeed(seed);
     }
 
     @Override
     public int nextInt() {
-        return random.nextInt();
+        return this.random.nextInt();
     }
 
     @Override
     public int nextInt(int bound) {
-        return random.nextInt(bound);
+        return this.random.nextInt(bound);
     }
 
     @Override
     public long nextLong() {
-        return random.nextLong();
+        return this.random.nextLong();
     }
 
     @Override
     public boolean nextBoolean() {
-        return random.nextBoolean();
+        return this.random.nextBoolean();
     }
 
     @Override
     public float nextFloat() {
-        return random.nextFloat();
+        return this.random.nextFloat();
     }
 
     @Override
     public double nextDouble() {
-        return random.nextDouble();
+        return this.random.nextDouble();
     }
 
     @Override
     public synchronized double nextGaussian() {
-        return random.nextGaussian();
+        return this.random.nextGaussian();
     }
 
     public static final class RandomWrapper extends Random {
@@ -72,49 +72,49 @@ public final class RandomSourceWrapper implements RandomSource {
 
         @Override
         public void setSeed(long l) {
-            if (random != null) {
-                random.setSeed(l);
+            if (this.random != null) {
+                this.random.setSeed(l);
             }
         }
 
         @Override
         public int nextInt() {
-            return random.nextInt();
+            return this.random.nextInt();
         }
 
         @Override
         public int nextInt(int i) {
-            return random.nextInt(i);
+            return this.random.nextInt(i);
         }
 
         @Override
         public long nextLong() {
-            return random.nextLong();
+            return this.random.nextLong();
         }
 
         @Override
         public boolean nextBoolean() {
-            return random.nextBoolean();
+            return this.random.nextBoolean();
         }
 
         @Override
         public float nextFloat() {
-            return random.nextFloat();
+            return this.random.nextFloat();
         }
 
         @Override
         public double nextDouble() {
-            return random.nextDouble();
+            return this.random.nextDouble();
         }
 
         @Override
         public double nextGaussian() {
-            return random.nextGaussian();
+            return this.random.nextGaussian();
         }
 
         @Override
         public int nextInt(int var0, int var1) {
-            return random.nextInt(var0, var1);
+            return this.random.nextInt(var0, var1);
         }
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
index 2e057fd4c0..2c65f3da1e 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/ServerShutdownThread.java
@@ -12,10 +12,10 @@ public class ServerShutdownThread extends Thread {
     @Override
     public void run() {
         try {
-            server.close();
+            this.server.close();
         } finally {
             try {
-                server.reader.getTerminal().restore();
+                this.server.reader.getTerminal().restore();
             } catch (Exception e) {
             }
         }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/TerminalCompletionHandler.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/TerminalCompletionHandler.java
index beaa54b562..7d1c081018 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/TerminalCompletionHandler.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/TerminalCompletionHandler.java
@@ -25,23 +25,23 @@ public class TerminalCompletionHandler implements CompletionHandler {
     public boolean complete(ConsoleReader reader, List<CharSequence> candidates, int position) throws IOException {
         // First check normal list, so that we do not unnecessarily create a new HashSet if the not distinct list is already lower
         if (candidates.size() <= reader.getAutoprintThreshold()) {
-            return delegate.complete(reader, candidates, position);
+            return this.delegate.complete(reader, candidates, position);
         }
 
         Set<CharSequence> distinct = new HashSet<>(candidates);
         if (distinct.size() <= reader.getAutoprintThreshold()) {
-            return delegate.complete(reader, candidates, position);
+            return this.delegate.complete(reader, candidates, position);
         }
 
-        writerThread.setCompletion(distinct.size());
+        this.writerThread.setCompletion(distinct.size());
 
         // FIXME: Potential concurrency issue, when terminal writer prints the display message before the delegate does it
         // resulting in two display message being present, until a new message gets logged or the user presses y / n
         // But the probability of this happening are probably lower than the effort needed to fix this
         // And seeing the display message at all should be a higher priority than seeing it two times in rare cases.
-        boolean result = delegate.complete(reader, candidates, position);
+        boolean result = this.delegate.complete(reader, candidates, position);
 
-        writerThread.setCompletion(-1);
+        this.writerThread.setCompletion(-1);
         // draw line to prevent concurrency issue,
         // where terminal write would print the display message between delegate#complete finished and the completion set back to -1
         // Resulting in the display message being present even after pressing y / n
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java
index 3a4eb59486..2e5101fca0 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/TerminalConsoleWriterThread.java
@@ -40,26 +40,26 @@ public class TerminalConsoleWriterThread extends Thread {
 
             try {
                 if (Main.useJline) {
-                    reader.print(Ansi.ansi().eraseLine(Erase.ALL).toString() + ConsoleReader.RESET_LINE);
-                    reader.flush();
-                    output.write(message.getBytes());
-                    output.flush();
+                    this.reader.print(Ansi.ansi().eraseLine(Erase.ALL).toString() + ConsoleReader.RESET_LINE);
+                    this.reader.flush();
+                    this.output.write(message.getBytes());
+                    this.output.flush();
 
                     try {
-                        reader.drawLine();
+                        this.reader.drawLine();
                     } catch (Throwable ex) {
-                        reader.getCursorBuffer().clear();
+                        this.reader.getCursorBuffer().clear();
                     }
 
-                    if (completion > -1) {
+                    if (this.completion > -1) {
                         // SPIGOT-6705: Make sure we print the display line again on tab completion, so that the user does not get stuck on it
-                        reader.print(String.format(bundle.getString("DISPLAY_CANDIDATES"), completion));
+                        this.reader.print(String.format(this.bundle.getString("DISPLAY_CANDIDATES"), this.completion));
                     }
 
-                    reader.flush();
+                    this.reader.flush();
                 } else {
-                    output.write(message.getBytes());
-                    output.flush();
+                    this.output.write(message.getBytes());
+                    this.output.flush();
                 }
             } catch (IOException ex) {
                 Logger.getLogger(TerminalConsoleWriterThread.class.getName()).log(Level.SEVERE, null, ex);
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/TransformerGeneratorAccess.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/TransformerGeneratorAccess.java
index 3d2a7a09e9..35ecf6f824 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/TransformerGeneratorAccess.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/TransformerGeneratorAccess.java
@@ -1,11 +1,11 @@
 package org.bukkit.craftbukkit.util;
 
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
 import net.minecraft.world.entity.Entity;
-import net.minecraft.world.level.block.entity.TileEntity;
-import net.minecraft.world.level.block.state.IBlockData;
+import net.minecraft.world.level.block.entity.BlockEntity;
+import net.minecraft.world.level.block.state.BlockState;
 import net.minecraft.world.level.levelgen.structure.StructurePiece;
-import net.minecraft.world.level.material.Fluid;
+import net.minecraft.world.level.material.FluidState;
 import org.bukkit.craftbukkit.block.CraftBlockEntityState;
 import org.bukkit.craftbukkit.block.CraftBlockState;
 import org.bukkit.craftbukkit.block.CraftBlockStates;
@@ -20,77 +20,77 @@ public class TransformerGeneratorAccess extends DelegatedGeneratorAccess {
     }
 
     public CraftStructureTransformer getStructureTransformer() {
-        return structureTransformer;
+        return this.structureTransformer;
     }
 
     @Override
-    public boolean addFreshEntity(Entity arg0) {
-        if (structureTransformer != null && !structureTransformer.transformEntity(arg0)) {
+    public boolean addFreshEntity(Entity entity) {
+        if (this.structureTransformer != null && !this.structureTransformer.transformEntity(entity)) {
             return false;
         }
-        return super.addFreshEntity(arg0);
+        return super.addFreshEntity(entity);
     }
 
     @Override
     public boolean addFreshEntity(Entity arg0, SpawnReason arg1) {
-        if (structureTransformer != null && !structureTransformer.transformEntity(arg0)) {
+        if (this.structureTransformer != null && !this.structureTransformer.transformEntity(arg0)) {
             return false;
         }
         return super.addFreshEntity(arg0, arg1);
     }
 
     @Override
-    public void addFreshEntityWithPassengers(Entity arg0) {
-        if (structureTransformer != null && !structureTransformer.transformEntity(arg0)) {
+    public void addFreshEntityWithPassengers(Entity entity) {
+        if (this.structureTransformer != null && !this.structureTransformer.transformEntity(entity)) {
             return;
         }
-        super.addFreshEntityWithPassengers(arg0);
+        super.addFreshEntityWithPassengers(entity);
     }
 
     @Override
     public void addFreshEntityWithPassengers(Entity arg0, SpawnReason arg1) {
-        if (structureTransformer != null && !structureTransformer.transformEntity(arg0)) {
+        if (this.structureTransformer != null && !this.structureTransformer.transformEntity(arg0)) {
             return;
         }
         super.addFreshEntityWithPassengers(arg0, arg1);
     }
 
-    public boolean setCraftBlock(BlockPosition position, CraftBlockState craftBlockState, int i, int j) {
-        if (structureTransformer != null) {
-            craftBlockState = structureTransformer.transformCraftState(craftBlockState);
+    public boolean setCraftBlock(BlockPos position, CraftBlockState craftBlockState, int i, int j) {
+        if (this.structureTransformer != null) {
+            craftBlockState = this.structureTransformer.transformCraftState(craftBlockState);
         }
         // This code is based on the method 'net.minecraft.world.level.levelgen.structure.StructurePiece#placeBlock'
         // It ensures that any kind of block is updated correctly upon placing it
-        IBlockData iblockdata = craftBlockState.getHandle();
+        BlockState iblockdata = craftBlockState.getHandle();
         boolean result = super.setBlock(position, iblockdata, i, j);
-        Fluid fluid = getFluidState(position);
+        FluidState fluid = this.getFluidState(position);
         if (!fluid.isEmpty()) {
-            scheduleTick(position, fluid.getType(), 0);
+            this.scheduleTick(position, fluid.getType(), 0);
         }
         if (StructurePiece.SHAPE_CHECK_BLOCKS.contains(iblockdata.getBlock())) {
-            getChunk(position).markPosForPostprocessing(position);
+            this.getChunk(position).markPosForPostprocessing(position);
         }
-        TileEntity tileEntity = getBlockEntity(position);
+        BlockEntity tileEntity = this.getBlockEntity(position);
         if (tileEntity != null && craftBlockState instanceof CraftBlockEntityState<?> craftEntityState) {
             tileEntity.loadWithComponents(craftEntityState.getSnapshotNBT(), this.registryAccess());
         }
         return result;
     }
 
-    public boolean setCraftBlock(BlockPosition position, CraftBlockState craftBlockState, int i) {
-        return setCraftBlock(position, craftBlockState, i, 512);
+    public boolean setCraftBlock(BlockPos position, CraftBlockState craftBlockState, int i) {
+        return this.setCraftBlock(position, craftBlockState, i, 512);
     }
 
     @Override
-    public boolean setBlock(BlockPosition position, IBlockData iblockdata, int i, int j) {
-        if (structureTransformer == null || !structureTransformer.canTransformBlocks()) {
-            return super.setBlock(position, iblockdata, i, j);
+    public boolean setBlock(BlockPos pos, BlockState state, int flags, int maxUpdateDepth) {
+        if (this.structureTransformer == null || !this.structureTransformer.canTransformBlocks()) {
+            return super.setBlock(pos, state, flags, maxUpdateDepth);
         }
-        return setCraftBlock(position, (CraftBlockState) CraftBlockStates.getBlockState(this, position, iblockdata, null), i, j);
+        return this.setCraftBlock(pos, (CraftBlockState) CraftBlockStates.getBlockState(this, pos, state, null), flags, maxUpdateDepth);
     }
 
     @Override
-    public boolean setBlock(BlockPosition position, IBlockData iblockdata, int i) {
-        return setBlock(position, iblockdata, i, 512);
+    public boolean setBlock(BlockPos pos, BlockState state, int flags) {
+        return this.setBlock(pos, state, flags, 512);
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java
index 3d5cc8189d..96c4f7aed5 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/UnsafeList.java
@@ -30,10 +30,10 @@ public class UnsafeList<E> extends AbstractList<E> implements List<E>, RandomAcc
         super();
         if (capacity < 0) capacity = 32;
         int rounded = Integer.highestOneBit(capacity - 1) << 1;
-        data = new Object[rounded];
-        initialCapacity = rounded;
-        maxPool = maxIterPool;
-        iterPool[0] = new Itr();
+        this.data = new Object[rounded];
+        this.initialCapacity = rounded;
+        this.maxPool = maxIterPool;
+        this.iterPool[0] = new Itr();
     }
 
     public UnsafeList(int capacity) {
@@ -46,58 +46,58 @@ public class UnsafeList<E> extends AbstractList<E> implements List<E>, RandomAcc
 
     @Override
     public E get(int index) {
-        rangeCheck(index);
+        this.rangeCheck(index);
 
-        return (E) data[index];
+        return (E) this.data[index];
     }
 
     public E unsafeGet(int index) {
-        return (E) data[index];
+        return (E) this.data[index];
     }
 
     @Override
     public E set(int index, E element) {
-        rangeCheck(index);
+        this.rangeCheck(index);
 
-        E old = (E) data[index];
-        data[index] = element;
+        E old = (E) this.data[index];
+        this.data[index] = element;
         return old;
     }
 
     @Override
     public boolean add(E element) {
-        growIfNeeded();
-        data[size++] = element;
+        this.growIfNeeded();
+        this.data[this.size++] = element;
         return true;
     }
 
     @Override
     public void add(int index, E element) {
-        growIfNeeded();
-        System.arraycopy(data, index, data, index + 1, size - index);
-        data[index] = element;
-        size++;
+        this.growIfNeeded();
+        System.arraycopy(this.data, index, this.data, index + 1, this.size - index);
+        this.data[index] = element;
+        this.size++;
     }
 
     @Override
     public E remove(int index) {
-        rangeCheck(index);
+        this.rangeCheck(index);
 
-        E old = (E) data[index];
-        int movedCount = size - index - 1;
+        E old = (E) this.data[index];
+        int movedCount = this.size - index - 1;
         if (movedCount > 0) {
-            System.arraycopy(data, index + 1, data, index, movedCount);
+            System.arraycopy(this.data, index + 1, this.data, index, movedCount);
         }
-        data[--size] = null;
+        this.data[--this.size] = null;
 
         return old;
     }
 
     @Override
     public boolean remove(Object o) {
-        int index = indexOf(o);
+        int index = this.indexOf(o);
         if (index >= 0) {
-            remove(index);
+            this.remove(index);
             return true;
         }
 
@@ -106,8 +106,8 @@ public class UnsafeList<E> extends AbstractList<E> implements List<E>, RandomAcc
 
     @Override
     public int indexOf(Object o) {
-        for (int i = 0; i < size; i++) {
-            if (o == data[i] || o.equals(data[i])) {
+        for (int i = 0; i < this.size; i++) {
+            if (o == this.data[i] || o.equals(this.data[i])) {
                 return i;
             }
         }
@@ -117,52 +117,52 @@ public class UnsafeList<E> extends AbstractList<E> implements List<E>, RandomAcc
 
     @Override
     public boolean contains(Object o) {
-        return indexOf(o) >= 0;
+        return this.indexOf(o) >= 0;
     }
 
     @Override
     public void clear() {
         // Create new array to reset memory usage to initial capacity
-        size = 0;
+        this.size = 0;
 
         // If array has grown too large create new one, otherwise just clear it
-        if (data.length > initialCapacity << 3) {
-            data = new Object[initialCapacity];
+        if (this.data.length > this.initialCapacity << 3) {
+            this.data = new Object[this.initialCapacity];
         } else {
-            for (int i = 0; i < data.length; i++) {
-                data[i] = null;
+            for (int i = 0; i < this.data.length; i++) {
+                this.data[i] = null;
             }
         }
     }
 
     // actually rounds up to nearest power of two
     public void trimToSize() {
-        int old = data.length;
-        int rounded = Integer.highestOneBit(size - 1) << 1;
+        int old = this.data.length;
+        int rounded = Integer.highestOneBit(this.size - 1) << 1;
         if (rounded < old) {
-            data = Arrays.copyOf(data, rounded);
+            this.data = Arrays.copyOf(this.data, rounded);
         }
     }
 
     @Override
     public int size() {
-        return size;
+        return this.size;
     }
 
     @Override
     public boolean isEmpty() {
-        return size == 0;
+        return this.size == 0;
     }
 
     @Override
     public Object clone() throws CloneNotSupportedException {
         UnsafeList<E> copy = (UnsafeList<E>) super.clone();
-        copy.data = Arrays.copyOf(data, size);
-        copy.size = size;
-        copy.initialCapacity = initialCapacity;
+        copy.data = Arrays.copyOf(this.data, this.size);
+        copy.size = this.size;
+        copy.initialCapacity = this.initialCapacity;
         copy.iterPool = new Iterator[1];
         copy.iterPool[0] = new Itr();
-        copy.maxPool = maxPool;
+        copy.maxPool = this.maxPool;
         copy.poolCounter = 0;
         return copy;
     }
@@ -170,7 +170,7 @@ public class UnsafeList<E> extends AbstractList<E> implements List<E>, RandomAcc
     @Override
     public Iterator<E> iterator() {
         // Try to find an iterator that isn't in use
-        for (Iterator iter : iterPool) {
+        for (Iterator iter : this.iterPool) {
             if (!((Itr) iter).valid) {
                 Itr iterator = (Itr) iter;
                 iterator.reset();
@@ -179,112 +179,112 @@ public class UnsafeList<E> extends AbstractList<E> implements List<E>, RandomAcc
         }
 
         // Couldn't find one, see if we can grow our pool size
-        if (iterPool.length < maxPool) {
-            Iterator[] newPool = new Iterator[iterPool.length + 1];
-            System.arraycopy(iterPool, 0, newPool, 0, iterPool.length);
-            iterPool = newPool;
+        if (this.iterPool.length < this.maxPool) {
+            Iterator[] newPool = new Iterator[this.iterPool.length + 1];
+            System.arraycopy(this.iterPool, 0, newPool, 0, this.iterPool.length);
+            this.iterPool = newPool;
 
-            iterPool[iterPool.length - 1] = new Itr();
-            return iterPool[iterPool.length - 1];
+            this.iterPool[this.iterPool.length - 1] = new Itr();
+            return this.iterPool[this.iterPool.length - 1];
         }
 
         // Still couldn't find a free one, round robin replace one with a new iterator
         // This is done in the hope that the new one finishes so can be reused
-        poolCounter = ++poolCounter % iterPool.length;
-        iterPool[poolCounter] = new Itr();
-        return iterPool[poolCounter];
+        this.poolCounter = ++this.poolCounter % this.iterPool.length;
+        this.iterPool[this.poolCounter] = new Itr();
+        return this.iterPool[this.poolCounter];
     }
 
     private void rangeCheck(int index) {
-        if (index >= size || index < 0) {
-            throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + size);
+        if (index >= this.size || index < 0) {
+            throw new IndexOutOfBoundsException("Index: " + index + ", Size: " + this.size);
         }
     }
 
     private void growIfNeeded() {
-        if (size == data.length) {
-            Object[] newData = new Object[data.length << 1];
-            System.arraycopy(data, 0, newData, 0, size);
-            data = newData;
+        if (this.size == this.data.length) {
+            Object[] newData = new Object[this.data.length << 1];
+            System.arraycopy(this.data, 0, newData, 0, this.size);
+            this.data = newData;
         }
     }
 
     private void writeObject(ObjectOutputStream os) throws IOException {
         os.defaultWriteObject();
 
-        os.writeInt(size);
-        os.writeInt(initialCapacity);
-        for (int i = 0; i < size; i++) {
-            os.writeObject(data[i]);
+        os.writeInt(this.size);
+        os.writeInt(this.initialCapacity);
+        for (int i = 0; i < this.size; i++) {
+            os.writeObject(this.data[i]);
         }
-        os.writeInt(maxPool);
+        os.writeInt(this.maxPool);
     }
 
     private void readObject(ObjectInputStream is) throws IOException, ClassNotFoundException {
         is.defaultReadObject();
 
-        size = is.readInt();
-        initialCapacity = is.readInt();
-        data = new Object[Integer.highestOneBit(size - 1) << 1];
-        for (int i = 0; i < size; i++) {
-            data[i] = is.readObject();
+        this.size = is.readInt();
+        this.initialCapacity = is.readInt();
+        this.data = new Object[Integer.highestOneBit(this.size - 1) << 1];
+        for (int i = 0; i < this.size; i++) {
+            this.data[i] = is.readObject();
         }
-        maxPool = is.readInt();
-        iterPool = new Iterator[1];
-        iterPool[0] = new Itr();
+        this.maxPool = is.readInt();
+        this.iterPool = new Iterator[1];
+        this.iterPool[0] = new Itr();
     }
 
     public class Itr implements Iterator<E> {
         int index;
         int lastRet = -1;
-        int expectedModCount = modCount;
+        int expectedModCount = UnsafeList.this.modCount;
         public boolean valid = true;
 
         public void reset() {
-            index = 0;
-            lastRet = -1;
-            expectedModCount = modCount;
-            valid = true;
+            this.index = 0;
+            this.lastRet = -1;
+            this.expectedModCount = UnsafeList.this.modCount;
+            this.valid = true;
         }
 
         @Override
         public boolean hasNext() {
-            valid = index != size;
-            return valid;
+            this.valid = this.index != UnsafeList.this.size;
+            return this.valid;
         }
 
         @Override
         public E next() {
-            if (modCount != expectedModCount) {
+            if (UnsafeList.this.modCount != this.expectedModCount) {
                 throw new ConcurrentModificationException();
             }
 
-            int i = index;
-            if (i >= size) {
+            int i = this.index;
+            if (i >= UnsafeList.this.size) {
                 throw new NoSuchElementException();
             }
 
-            if (i >= data.length) {
+            if (i >= UnsafeList.this.data.length) {
                 throw new ConcurrentModificationException();
             }
 
-            index = i + 1;
-            return (E) data[lastRet = i];
+            this.index = i + 1;
+            return (E) UnsafeList.this.data[this.lastRet = i];
         }
 
         @Override
         public void remove() {
-            Preconditions.checkState(lastRet >= 0, "");
+            Preconditions.checkState(this.lastRet >= 0, "");
 
-            if (modCount != expectedModCount) {
+            if (UnsafeList.this.modCount != this.expectedModCount) {
                 throw new ConcurrentModificationException();
             }
 
             try {
-                UnsafeList.this.remove(lastRet);
-                index = lastRet;
-                lastRet = -1;
-                expectedModCount = modCount;
+                UnsafeList.this.remove(this.lastRet);
+                this.index = this.lastRet;
+                this.lastRet = -1;
+                this.expectedModCount = UnsafeList.this.modCount;
             } catch (IndexOutOfBoundsException ex) {
                 throw new ConcurrentModificationException();
             }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/Waitable.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/Waitable.java
index 73be17fcc0..864a213ada 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/Waitable.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/Waitable.java
@@ -16,16 +16,16 @@ public abstract class Waitable<T> implements Runnable {
     @Override
     public final void run() {
         synchronized (this) {
-            Preconditions.checkState(status == Status.WAITING, "Invalid state %s", status);
-            status = Status.RUNNING;
+            Preconditions.checkState(this.status == Status.WAITING, "Invalid state %s", this.status);
+            this.status = Status.RUNNING;
         }
         try {
-            value = evaluate();
+            this.value = this.evaluate();
         } catch (Throwable t) {
             this.t = t;
         } finally {
             synchronized (this) {
-                status = Status.FINISHED;
+                this.status = Status.FINISHED;
                 this.notifyAll();
             }
         }
@@ -34,12 +34,12 @@ public abstract class Waitable<T> implements Runnable {
     protected abstract T evaluate();
 
     public synchronized T get() throws InterruptedException, ExecutionException {
-        while (status != Status.FINISHED) {
+        while (this.status != Status.FINISHED) {
             this.wait();
         }
-        if (t != null) {
-            throw new ExecutionException(t);
+        if (this.t != null) {
+            throw new ExecutionException(this.t);
         }
-        return value;
+        return this.value;
     }
 }
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/WeakCollection.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/WeakCollection.java
index 489f548b5d..b25dc23b81 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/WeakCollection.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/WeakCollection.java
@@ -12,13 +12,13 @@ public final class WeakCollection<T> implements Collection<T> {
     private final Collection<WeakReference<T>> collection;
 
     public WeakCollection() {
-        collection = new ArrayList<>();
+        this.collection = new ArrayList<>();
     }
 
     @Override
     public boolean add(T value) {
         Preconditions.checkArgument(value != null, "Cannot add null value");
-        return collection.add(new WeakReference<T>(value));
+        return this.collection.add(new WeakReference<T>(value));
     }
 
     @Override
@@ -34,7 +34,7 @@ public final class WeakCollection<T> implements Collection<T> {
 
     @Override
     public void clear() {
-        collection.clear();
+        this.collection.clear();
     }
 
     @Override
@@ -52,24 +52,24 @@ public final class WeakCollection<T> implements Collection<T> {
 
     @Override
     public boolean containsAll(Collection<?> collection) {
-        return toCollection().containsAll(collection);
+        return this.toCollection().containsAll(collection);
     }
 
     @Override
     public boolean isEmpty() {
-        return !iterator().hasNext();
+        return !this.iterator().hasNext();
     }
 
     @Override
     public Iterator<T> iterator() {
         return new Iterator<T>() {
-            Iterator<WeakReference<T>> it = collection.iterator();
-            Object value = NO_VALUE;
+            Iterator<WeakReference<T>> it = WeakCollection.this.collection.iterator();
+            Object value = WeakCollection.NO_VALUE;
 
             @Override
             public boolean hasNext() {
                 Object value = this.value;
-                if (value != null && value != NO_VALUE) {
+                if (value != null && value != WeakCollection.NO_VALUE) {
                     return true;
                 }
 
@@ -91,22 +91,22 @@ public final class WeakCollection<T> implements Collection<T> {
 
             @Override
             public T next() throws NoSuchElementException {
-                if (!hasNext()) {
+                if (!this.hasNext()) {
                     throw new NoSuchElementException("No more elements");
                 }
 
                 @SuppressWarnings("unchecked")
                 T value = (T) this.value;
-                this.value = NO_VALUE;
+                this.value = WeakCollection.NO_VALUE;
                 return value;
             }
 
             @Override
             public void remove() throws IllegalStateException {
-                Preconditions.checkState(value == NO_VALUE, "No last element");
+                Preconditions.checkState(this.value == WeakCollection.NO_VALUE, "No last element");
 
-                value = null;
-                it.remove();
+                this.value = null;
+                this.it.remove();
             }
         };
     }
@@ -169,7 +169,7 @@ public final class WeakCollection<T> implements Collection<T> {
 
     @Override
     public <T> T[] toArray(T[] array) {
-        return toCollection().toArray(array);
+        return this.toCollection().toArray(array);
     }
 
     private Collection<T> toCollection() {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/WorldUUID.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/WorldUUID.java
index f101ed6c5a..738100ffa6 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/WorldUUID.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/WorldUUID.java
@@ -25,7 +25,7 @@ public final class WorldUUID {
                 dis = new DataInputStream(new FileInputStream(file1));
                 return new UUID(dis.readLong(), dis.readLong());
             } catch (IOException ex) {
-                LOGGER.warn("Failed to read " + file1 + ", generating new random UUID", ex);
+                WorldUUID.LOGGER.warn("Failed to read " + file1 + ", generating new random UUID", ex);
             } finally {
                 if (dis != null) {
                     try {
@@ -43,7 +43,7 @@ public final class WorldUUID {
             dos.writeLong(uuid.getMostSignificantBits());
             dos.writeLong(uuid.getLeastSignificantBits());
         } catch (IOException ex) {
-            LOGGER.warn("Failed to write " + file1, ex);
+            WorldUUID.LOGGER.warn("Failed to write " + file1, ex);
         } finally {
             if (dos != null) {
                 try {
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java
index d5f4ece060..a9ea2e38e4 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/permissions/CommandPermissions.java
@@ -6,31 +6,31 @@ import org.bukkit.util.permissions.DefaultPermissions;
 
 public final class CommandPermissions {
     private static final String ROOT = "minecraft.command";
-    private static final String PREFIX = ROOT + ".";
+    private static final String PREFIX = CommandPermissions.ROOT + ".";
 
     private CommandPermissions() {}
 
     public static Permission registerPermissions(Permission parent) {
-        Permission commands = DefaultPermissions.registerPermission(ROOT, "Gives the user the ability to use all vanilla minecraft commands", parent);
+        Permission commands = DefaultPermissions.registerPermission(CommandPermissions.ROOT, "Gives the user the ability to use all vanilla minecraft commands", parent);
 
-        DefaultPermissions.registerPermission(PREFIX + "kill", "Allows the user to commit suicide", PermissionDefault.OP, commands);
-        DefaultPermissions.registerPermission(PREFIX + "me", "Allows the user to perform a chat action", PermissionDefault.TRUE, commands);
-        DefaultPermissions.registerPermission(PREFIX + "msg", "Allows the user to privately message another player", PermissionDefault.TRUE, commands);
-        DefaultPermissions.registerPermission(PREFIX + "help", "Allows the user to access Vanilla command help", PermissionDefault.TRUE, commands);
-        DefaultPermissions.registerPermission(PREFIX + "say", "Allows the user to talk as the console", PermissionDefault.OP, commands);
-        DefaultPermissions.registerPermission(PREFIX + "give", "Allows the user to give items to players", PermissionDefault.OP, commands);
-        DefaultPermissions.registerPermission(PREFIX + "teleport", "Allows the user to teleport players", PermissionDefault.OP, commands);
-        DefaultPermissions.registerPermission(PREFIX + "kick", "Allows the user to kick players", PermissionDefault.OP, commands);
-        DefaultPermissions.registerPermission(PREFIX + "stop", "Allows the user to stop the server", PermissionDefault.OP, commands);
-        DefaultPermissions.registerPermission(PREFIX + "list", "Allows the user to list all online players", PermissionDefault.OP, commands);
-        DefaultPermissions.registerPermission(PREFIX + "gamemode", "Allows the user to change the gamemode of another player", PermissionDefault.OP, commands);
-        DefaultPermissions.registerPermission(PREFIX + "xp", "Allows the user to give themselves or others arbitrary values of experience", PermissionDefault.OP, commands);
-        DefaultPermissions.registerPermission(PREFIX + "toggledownfall", "Allows the user to toggle rain on/off for a given world", PermissionDefault.OP, commands);
-        DefaultPermissions.registerPermission(PREFIX + "defaultgamemode", "Allows the user to change the default gamemode of the server", PermissionDefault.OP, commands);
-        DefaultPermissions.registerPermission(PREFIX + "seed", "Allows the user to view the seed of the world", PermissionDefault.OP, commands);
-        DefaultPermissions.registerPermission(PREFIX + "effect", "Allows the user to add/remove effects on players", PermissionDefault.OP, commands);
-        DefaultPermissions.registerPermission(PREFIX + "selector", "Allows the use of selectors", PermissionDefault.OP, commands);
-        DefaultPermissions.registerPermission(PREFIX + "trigger", "Allows the use of the trigger command", PermissionDefault.TRUE, commands);
+        DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "kill", "Allows the user to commit suicide", PermissionDefault.OP, commands);
+        DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "me", "Allows the user to perform a chat action", PermissionDefault.TRUE, commands);
+        DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "msg", "Allows the user to privately message another player", PermissionDefault.TRUE, commands);
+        DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "help", "Allows the user to access Vanilla command help", PermissionDefault.TRUE, commands);
+        DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "say", "Allows the user to talk as the console", PermissionDefault.OP, commands);
+        DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "give", "Allows the user to give items to players", PermissionDefault.OP, commands);
+        DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "teleport", "Allows the user to teleport players", PermissionDefault.OP, commands);
+        DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "kick", "Allows the user to kick players", PermissionDefault.OP, commands);
+        DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "stop", "Allows the user to stop the server", PermissionDefault.OP, commands);
+        DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "list", "Allows the user to list all online players", PermissionDefault.OP, commands);
+        DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "gamemode", "Allows the user to change the gamemode of another player", PermissionDefault.OP, commands);
+        DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "xp", "Allows the user to give themselves or others arbitrary values of experience", PermissionDefault.OP, commands);
+        DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "toggledownfall", "Allows the user to toggle rain on/off for a given world", PermissionDefault.OP, commands);
+        DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "defaultgamemode", "Allows the user to change the default gamemode of the server", PermissionDefault.OP, commands);
+        DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "seed", "Allows the user to view the seed of the world", PermissionDefault.OP, commands);
+        DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "effect", "Allows the user to add/remove effects on players", PermissionDefault.OP, commands);
+        DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "selector", "Allows the use of selectors", PermissionDefault.OP, commands);
+        DefaultPermissions.registerPermission(CommandPermissions.PREFIX + "trigger", "Allows the use of the trigger command", PermissionDefault.TRUE, commands);
 
         DefaultPermissions.registerPermission("minecraft.admin.command_feedback", "Receive command broadcasts when sendCommandFeedback is true", PermissionDefault.OP, commands);
 
diff --git a/paper-server/src/main/java/org/bukkit/craftbukkit/util/permissions/CraftDefaultPermissions.java b/paper-server/src/main/java/org/bukkit/craftbukkit/util/permissions/CraftDefaultPermissions.java
index 75f8d47a20..448edd0d72 100644
--- a/paper-server/src/main/java/org/bukkit/craftbukkit/util/permissions/CraftDefaultPermissions.java
+++ b/paper-server/src/main/java/org/bukkit/craftbukkit/util/permissions/CraftDefaultPermissions.java
@@ -9,7 +9,7 @@ public final class CraftDefaultPermissions {
     private CraftDefaultPermissions() {}
 
     public static void registerCorePermissions() {
-        Permission parent = DefaultPermissions.registerPermission(ROOT, "Gives the user the ability to use all vanilla utilities and commands");
+        Permission parent = DefaultPermissions.registerPermission(CraftDefaultPermissions.ROOT, "Gives the user the ability to use all vanilla utilities and commands");
         CommandPermissions.registerPermissions(parent);
         parent.recalculatePermissibles();
     }
diff --git a/paper-server/src/test/java/org/bukkit/BiomeTest.java b/paper-server/src/test/java/org/bukkit/BiomeTest.java
index 59cc459e04..f17d553f51 100644
--- a/paper-server/src/test/java/org/bukkit/BiomeTest.java
+++ b/paper-server/src/test/java/org/bukkit/BiomeTest.java
@@ -2,7 +2,6 @@ package org.bukkit;
 
 import static org.junit.jupiter.api.Assertions.*;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.world.level.biome.BiomeBase;
 import org.bukkit.block.Biome;
 import org.bukkit.craftbukkit.CraftRegistry;
 import org.bukkit.craftbukkit.block.CraftBiome;
@@ -25,7 +24,7 @@ public class BiomeTest {
 
     @Test
     public void testMinecraftToBukkit() {
-        for (BiomeBase biomeBase : CraftRegistry.getMinecraftRegistry(Registries.BIOME)) {
+        for (net.minecraft.world.level.biome.Biome biomeBase : CraftRegistry.getMinecraftRegistry(Registries.BIOME)) {
             Biome biome = CraftBiome.minecraftToBukkit(biomeBase);
             assertTrue(biome != null && biome != Biome.CUSTOM, "No Bukkit mapping for " + biomeBase);
         }
diff --git a/paper-server/src/test/java/org/bukkit/BlockDataConversionTest.java b/paper-server/src/test/java/org/bukkit/BlockDataConversionTest.java
index 035b703d2e..f6ff135de8 100644
--- a/paper-server/src/test/java/org/bukkit/BlockDataConversionTest.java
+++ b/paper-server/src/test/java/org/bukkit/BlockDataConversionTest.java
@@ -4,7 +4,7 @@ import static org.junit.jupiter.api.Assertions.*;
 import java.util.stream.Stream;
 import net.minecraft.core.registries.BuiltInRegistries;
 import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.block.state.IBlockData;
+import net.minecraft.world.level.block.state.BlockState;
 import org.bukkit.craftbukkit.block.data.CraftBlockData;
 import org.bukkit.support.environment.AllFeatures;
 import org.junit.jupiter.params.ParameterizedTest;
@@ -24,7 +24,7 @@ public class BlockDataConversionTest {
 
     @ParameterizedTest
     @MethodSource("data")
-    public void testNotNull(IBlockData data) {
+    public void testNotNull(BlockState data) {
         assertNotNull(data);
         assertNotNull(CraftBlockData.fromData(data));
     }
diff --git a/paper-server/src/test/java/org/bukkit/BlockDataTest.java b/paper-server/src/test/java/org/bukkit/BlockDataTest.java
index a6c58353b5..9168a17357 100644
--- a/paper-server/src/test/java/org/bukkit/BlockDataTest.java
+++ b/paper-server/src/test/java/org/bukkit/BlockDataTest.java
@@ -3,10 +3,11 @@ package org.bukkit;
 import static org.bukkit.support.MatcherAssert.*;
 import static org.hamcrest.Matchers.*;
 import static org.junit.jupiter.api.Assertions.*;
-import net.minecraft.core.EnumDirection;
-import net.minecraft.world.level.block.BlockCake;
-import net.minecraft.world.level.block.BlockChest;
+
+import net.minecraft.core.Direction;
 import net.minecraft.world.level.block.Blocks;
+import net.minecraft.world.level.block.CakeBlock;
+import net.minecraft.world.level.block.ChestBlock;
 import org.bukkit.block.BlockFace;
 import org.bukkit.block.BlockType;
 import org.bukkit.block.data.BlockData;
@@ -21,7 +22,7 @@ public class BlockDataTest {
 
     @Test
     public void testParsing() {
-        BlockData cakeTest = CraftBlockData.fromData(Blocks.CAKE.defaultBlockState().setValue(BlockCake.BITES, 3));
+        BlockData cakeTest = CraftBlockData.fromData(Blocks.CAKE.defaultBlockState().setValue(CakeBlock.BITES, 3));
 
         BlockData materialString = CraftBlockData.newData(BlockType.CAKE, "[bites=3]");
         assertThat(materialString, is(cakeTest));
@@ -53,7 +54,7 @@ public class BlockDataTest {
 
     @Test
     public void testMistake() {
-        BlockData cakeTest = CraftBlockData.fromData(Blocks.CAKE.defaultBlockState().setValue(BlockCake.BITES, 3));
+        BlockData cakeTest = CraftBlockData.fromData(Blocks.CAKE.defaultBlockState().setValue(CakeBlock.BITES, 3));
 
         assertThrows(IllegalArgumentException.class, () -> CraftBlockData.newData(BlockType.CAKE, cakeTest.toString()));
     }
@@ -65,7 +66,7 @@ public class BlockDataTest {
 
     @Test
     public void testClone() {
-        Cake cakeTest = (Cake) CraftBlockData.fromData(Blocks.CAKE.defaultBlockState().setValue(BlockCake.BITES, 3));
+        Cake cakeTest = (Cake) CraftBlockData.fromData(Blocks.CAKE.defaultBlockState().setValue(CakeBlock.BITES, 3));
         Cake clone = (Cake) cakeTest.clone();
 
         assertNotSame(cakeTest, clone, "Clone did not return new object");
@@ -144,7 +145,7 @@ public class BlockDataTest {
         assertFalse(CraftBlockData.newData(null, "minecraft:trapped_chest[facing=east,waterlogged=false]").matches(CraftBlockData.newData(null, "minecraft:chest[waterlogged=true]")));
         assertTrue(CraftBlockData.newData(null, "minecraft:chest[facing=east,waterlogged=true]").matches(CraftBlockData.newData(null, "minecraft:chest[waterlogged=true,facing=east]")));
 
-        Chest one = (Chest) CraftBlockData.fromData(Blocks.CHEST.defaultBlockState().setValue(BlockChest.FACING, EnumDirection.EAST));
+        Chest one = (Chest) CraftBlockData.fromData(Blocks.CHEST.defaultBlockState().setValue(ChestBlock.FACING, Direction.EAST));
         Chest two = (Chest) CraftBlockData.newData(null, "minecraft:chest[waterlogged=false]");
 
         assertTrue(one.matches(two));
@@ -162,7 +163,7 @@ public class BlockDataTest {
 
     @Test
     public void testGetAsString2() {
-        Chest data = (Chest) CraftBlockData.fromData(Blocks.CHEST.defaultBlockState().setValue(BlockChest.FACING, EnumDirection.EAST));
+        Chest data = (Chest) CraftBlockData.fromData(Blocks.CHEST.defaultBlockState().setValue(ChestBlock.FACING, Direction.EAST));
 
         assertThat(data.getAsString(true), is("minecraft:chest[facing=east,type=single,waterlogged=false]"));
         assertThat(data.getAsString(false), is("minecraft:chest[facing=east,type=single,waterlogged=false]"));
diff --git a/paper-server/src/test/java/org/bukkit/ChatTest.java b/paper-server/src/test/java/org/bukkit/ChatTest.java
index c84d5f308b..475febfb10 100644
--- a/paper-server/src/test/java/org/bukkit/ChatTest.java
+++ b/paper-server/src/test/java/org/bukkit/ChatTest.java
@@ -1,8 +1,9 @@
 package org.bukkit;
 
 import static org.junit.jupiter.api.Assertions.*;
-import net.minecraft.EnumChatFormat;
-import net.minecraft.network.chat.IChatBaseComponent;
+
+import net.minecraft.ChatFormatting;
+import net.minecraft.network.chat.Component;
 import org.bukkit.craftbukkit.util.CraftChatMessage;
 import org.bukkit.support.environment.VanillaFeature;
 import org.junit.jupiter.api.Test;
@@ -17,7 +18,7 @@ public class ChatTest {
             assertEquals(color, CraftChatMessage.getColor(CraftChatMessage.getColor(color)));
         }
 
-        for (EnumChatFormat format : EnumChatFormat.values()) {
+        for (ChatFormatting format : ChatFormatting.values()) {
             assertNotNull(CraftChatMessage.getColor(format));
             assertEquals(format, CraftChatMessage.getColor(CraftChatMessage.getColor(format)));
         }
@@ -25,7 +26,7 @@ public class ChatTest {
 
     @Test
     public void testURLJsonConversion() {
-        IChatBaseComponent[] components;
+        Component[] components;
         components = CraftChatMessage.fromString("https://spigotmc.org/test Test Message");
         assertEquals("{\"text\":\"\",\"extra\":[{\"text\":\"https://spigotmc.org/test\",\"clickEvent\":{\"action\":\"open_url\",\"value\":\"https://spigotmc.org/test\"}},\" Test Message\"]}",
                 CraftChatMessage.toJSON(components[0]));
diff --git a/paper-server/src/test/java/org/bukkit/DyeColorsTest.java b/paper-server/src/test/java/org/bukkit/DyeColorsTest.java
index 6e3f234332..e96d821da0 100644
--- a/paper-server/src/test/java/org/bukkit/DyeColorsTest.java
+++ b/paper-server/src/test/java/org/bukkit/DyeColorsTest.java
@@ -2,7 +2,8 @@ package org.bukkit;
 
 import static org.bukkit.support.MatcherAssert.*;
 import static org.hamcrest.Matchers.*;
-import net.minecraft.world.item.EnumColor;
+
+import net.minecraft.world.item.DyeColor;
 import org.bukkit.support.environment.Normal;
 import org.junit.jupiter.params.ParameterizedTest;
 import org.junit.jupiter.params.provider.EnumSource;
@@ -14,16 +15,16 @@ public class DyeColorsTest {
     @EnumSource(DyeColor.class)
     public void checkColor(DyeColor dye) {
         Color color = dye.getColor();
-        int nmsColorArray = EnumColor.byId(dye.getWoolData()).getTextureDiffuseColor();
+        int nmsColorArray = DyeColor.byId(dye.getWoolData()).getTextureDiffuseColor();
         Color nmsColor = Color.fromARGB(nmsColorArray);
         assertThat(color, is(nmsColor));
     }
 
     @ParameterizedTest
-    @EnumSource(DyeColor.class)
-    public void checkFireworkColor(DyeColor dye) {
+    @EnumSource(org.bukkit.DyeColor.class)
+    public void checkFireworkColor(org.bukkit.DyeColor dye) {
         Color color = dye.getFireworkColor();
-        int nmsColor = EnumColor.byId(dye.getWoolData()).getFireworkColor();
+        int nmsColor = DyeColor.byId(dye.getWoolData()).getFireworkColor();
         assertThat(color, is(Color.fromRGB(nmsColor)));
     }
 }
diff --git a/paper-server/src/test/java/org/bukkit/EnchantmentTest.java b/paper-server/src/test/java/org/bukkit/EnchantmentTest.java
index 255ebdcb56..1b22f02b04 100644
--- a/paper-server/src/test/java/org/bukkit/EnchantmentTest.java
+++ b/paper-server/src/test/java/org/bukkit/EnchantmentTest.java
@@ -2,7 +2,7 @@ package org.bukkit;
 
 import static org.junit.jupiter.api.Assertions.*;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.resources.MinecraftKey;
+import net.minecraft.resources.ResourceLocation;
 import org.bukkit.craftbukkit.CraftRegistry;
 import org.bukkit.craftbukkit.util.CraftNamespacedKey;
 import org.bukkit.enchantments.Enchantment;
@@ -14,7 +14,7 @@ public class EnchantmentTest {
 
     @Test
     public void verifyMapping() {
-        for (MinecraftKey key : CraftRegistry.getMinecraftRegistry(Registries.ENCHANTMENT).keySet()) {
+        for (ResourceLocation key : CraftRegistry.getMinecraftRegistry(Registries.ENCHANTMENT).keySet()) {
             net.minecraft.world.item.enchantment.Enchantment nms = CraftRegistry.getMinecraftRegistry(Registries.ENCHANTMENT).getValue(key);
 
             Enchantment bukkitById = Enchantment.getByKey(CraftNamespacedKey.fromMinecraft(key));
diff --git a/paper-server/src/test/java/org/bukkit/ExplosionResultTest.java b/paper-server/src/test/java/org/bukkit/ExplosionResultTest.java
index 3e8c7ffb0a..ee5ab15bb0 100644
--- a/paper-server/src/test/java/org/bukkit/ExplosionResultTest.java
+++ b/paper-server/src/test/java/org/bukkit/ExplosionResultTest.java
@@ -10,13 +10,13 @@ public class ExplosionResultTest {
     @Test
     public void testMatchingEnum() {
         for (ExplosionResult result : ExplosionResult.values()) {
-            assertNotNull(Explosion.Effect.valueOf(result.name()), "No NMS enum for Bukkit result " + result);
+            assertNotNull(Explosion.BlockInteraction.valueOf(result.name()), "No NMS enum for Bukkit result " + result);
         }
     }
 
     @Test
     public void testToBukkit() {
-        for (Explosion.Effect effect : Explosion.Effect.values()) {
+        for (Explosion.BlockInteraction effect : Explosion.BlockInteraction.values()) {
             assertNotNull(CraftExplosionResult.toBukkit(effect), "No Bukkit enum for NMS explosion effect " + effect);
         }
     }
diff --git a/paper-server/src/test/java/org/bukkit/GameRuleTest.java b/paper-server/src/test/java/org/bukkit/GameRuleTest.java
index d0aac851c4..7fd36402fb 100644
--- a/paper-server/src/test/java/org/bukkit/GameRuleTest.java
+++ b/paper-server/src/test/java/org/bukkit/GameRuleTest.java
@@ -24,9 +24,9 @@ public class GameRuleTest {
 
     @Test
     public void testMinecraftRules() {
-        Map<String, GameRules.GameRuleKey<?>> minecraftRules = CraftWorld.getGameRulesNMS(new GameRules(FeatureFlags.REGISTRY.allFlags()));
+        Map<String, GameRules.Key<?>> minecraftRules = CraftWorld.getGameRulesNMS(new GameRules(FeatureFlags.REGISTRY.allFlags()));
 
-        for (Map.Entry<String, GameRules.GameRuleKey<?>> entry : minecraftRules.entrySet()) {
+        for (Map.Entry<String, GameRules.Key<?>> entry : minecraftRules.entrySet()) {
             GameRule<?> bukkitRule = GameRule.getByName(entry.getKey());
 
             assertNotNull(bukkitRule, "Missing " + entry.getKey());
diff --git a/paper-server/src/test/java/org/bukkit/LootTablesTest.java b/paper-server/src/test/java/org/bukkit/LootTablesTest.java
index b50f224c1d..5e3cce6e72 100644
--- a/paper-server/src/test/java/org/bukkit/LootTablesTest.java
+++ b/paper-server/src/test/java/org/bukkit/LootTablesTest.java
@@ -25,7 +25,7 @@ public class LootTablesTest {
 
     @Test
     public void testNMS() {
-        for (ResourceKey<net.minecraft.world.level.storage.loot.LootTable> key : net.minecraft.world.level.storage.loot.LootTables.all()) {
+        for (ResourceKey<net.minecraft.world.level.storage.loot.LootTable> key : net.minecraft.world.level.storage.loot.BuiltInLootTables.all()) {
             NamespacedKey bukkitKey = CraftLootTable.minecraftToBukkitKey(key);
             LootTables lootTable = Registry.LOOT_TABLES.get(bukkitKey);
 
diff --git a/paper-server/src/test/java/org/bukkit/MaterialTest.java b/paper-server/src/test/java/org/bukkit/MaterialTest.java
index be741cdda4..d4bfec42fa 100644
--- a/paper-server/src/test/java/org/bukkit/MaterialTest.java
+++ b/paper-server/src/test/java/org/bukkit/MaterialTest.java
@@ -13,7 +13,7 @@ import java.util.List;
 import java.util.Map;
 import java.util.stream.StreamSupport;
 import net.minecraft.core.registries.BuiltInRegistries;
-import net.minecraft.resources.MinecraftKey;
+import net.minecraft.resources.ResourceLocation;
 import net.minecraft.world.item.Item;
 import org.bukkit.craftbukkit.util.CraftMagicNumbers;
 import org.bukkit.support.LegacyHelper;
@@ -25,7 +25,7 @@ public class MaterialTest {
 
     @Test
     public void verifyMapping() {
-        Map<MinecraftKey, Material> materials = Maps.newHashMap();
+        Map<ResourceLocation, Material> materials = Maps.newHashMap();
         for (Material material : Material.values()) {
             if (LegacyHelper.getInvalidatedMaterials().contains(material)) {
                 continue;
@@ -40,7 +40,7 @@ public class MaterialTest {
             Item item = items.next();
             if (item == null) continue;
 
-            MinecraftKey id = BuiltInRegistries.ITEM.getKey(item);
+            ResourceLocation id = BuiltInRegistries.ITEM.getKey(item);
             String name = item.getDescriptionId();
 
             Material material = materials.remove(id);
diff --git a/paper-server/src/test/java/org/bukkit/ParticleTest.java b/paper-server/src/test/java/org/bukkit/ParticleTest.java
index ac2808d3b4..dc3f6dc2a4 100644
--- a/paper-server/src/test/java/org/bukkit/ParticleTest.java
+++ b/paper-server/src/test/java/org/bukkit/ParticleTest.java
@@ -4,22 +4,22 @@ import static org.junit.jupiter.api.Assertions.*;
 import com.mojang.serialization.DataResult;
 import java.util.Optional;
 import java.util.stream.Stream;
+import net.minecraft.core.particles.BlockParticleOption;
 import net.minecraft.core.particles.ColorParticleOption;
 import net.minecraft.core.particles.DustColorTransitionOptions;
-import net.minecraft.core.particles.ParticleParam;
-import net.minecraft.core.particles.ParticleParamBlock;
-import net.minecraft.core.particles.ParticleParamItem;
-import net.minecraft.core.particles.ParticleParamRedstone;
-import net.minecraft.core.particles.ParticleType;
+import net.minecraft.core.particles.DustParticleOptions;
+import net.minecraft.core.particles.ItemParticleOption;
+import net.minecraft.core.particles.ParticleOptions;
 import net.minecraft.core.particles.SculkChargeParticleOptions;
 import net.minecraft.core.particles.ShriekParticleOption;
+import net.minecraft.core.particles.SimpleParticleType;
 import net.minecraft.core.particles.TrailParticleOption;
 import net.minecraft.core.particles.VibrationParticleOption;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.nbt.DynamicOpsNBT;
-import net.minecraft.nbt.NBTBase;
-import net.minecraft.resources.MinecraftKey;
-import net.minecraft.world.phys.Vec3D;
+import net.minecraft.nbt.NbtOps;
+import net.minecraft.nbt.Tag;
+import net.minecraft.resources.ResourceLocation;
+import net.minecraft.world.phys.Vec3;
 import org.bukkit.block.data.BlockData;
 import org.bukkit.craftbukkit.CraftParticle;
 import org.bukkit.craftbukkit.CraftRegistry;
@@ -44,7 +44,7 @@ public class ParticleTest {
 
     @ParameterizedTest
     @MethodSource("data")
-    public void testBukkitValuesPresent(MinecraftKey minecraft) {
+    public void testBukkitValuesPresent(ResourceLocation minecraft) {
         // TODO: 10/19/23 Remove with enum PR, it is then no longer needed, since the enum PR has a extra test for this
         assertNotNull(Registry.PARTICLE_TYPE.get(CraftNamespacedKey.fromMinecraft(minecraft)), String.format("""
                 No bukkit particle found for minecraft particle %s.
@@ -66,55 +66,55 @@ public class ParticleTest {
     @ParameterizedTest
     @EnumSource(Particle.class)
     public void testRightParticleParamCreation(Particle bukkit) {
-        net.minecraft.core.particles.Particle<?> minecraft = CraftParticle.bukkitToMinecraft(bukkit);
+        net.minecraft.core.particles.ParticleType<?> minecraft = CraftParticle.bukkitToMinecraft(bukkit);
 
         if (bukkit.getDataType().equals(Void.class)) {
-            testEmptyData(bukkit, minecraft);
+            this.testEmptyData(bukkit, minecraft);
             return;
         }
 
         if (bukkit.getDataType().equals(Particle.DustOptions.class)) {
-            testDustOption(bukkit, minecraft);
+            this.testDustOption(bukkit, minecraft);
             return;
         }
 
         if (bukkit.getDataType().equals(ItemStack.class)) {
-            testItemStack(bukkit, minecraft);
+            this.testItemStack(bukkit, minecraft);
             return;
         }
 
         if (bukkit.getDataType().equals(BlockData.class)) {
-            testBlockData(bukkit, minecraft);
+            this.testBlockData(bukkit, minecraft);
             return;
         }
 
         if (bukkit.getDataType().equals(Particle.DustTransition.class)) {
-            testDustTransition(bukkit, minecraft);
+            this.testDustTransition(bukkit, minecraft);
             return;
         }
 
         if (bukkit.getDataType().equals(Vibration.class)) {
-            testVibration(bukkit, minecraft);
+            this.testVibration(bukkit, minecraft);
             return;
         }
 
         if (bukkit.getDataType().equals(Float.class)) {
-            testFloat(bukkit, minecraft);
+            this.testFloat(bukkit, minecraft);
             return;
         }
 
         if (bukkit.getDataType().equals(Integer.class)) {
-            testInteger(bukkit, minecraft);
+            this.testInteger(bukkit, minecraft);
             return;
         }
 
         if (bukkit.getDataType().equals(Color.class)) {
-            testColor(bukkit, minecraft);
+            this.testColor(bukkit, minecraft);
             return;
         }
 
         if (bukkit.getDataType().equals(Particle.Trail.class)) {
-            testTrail(bukkit, minecraft);
+            this.testTrail(bukkit, minecraft);
             return;
         }
 
@@ -124,13 +124,13 @@ public class ParticleTest {
                 """, bukkit.getKey()));
     }
 
-    private <T extends ParticleParam> void testEmptyData(Particle bukkit, net.minecraft.core.particles.Particle<T> minecraft) {
-        createAndTest(bukkit, minecraft, null, ParticleType.class);
+    private <T extends ParticleOptions> void testEmptyData(Particle bukkit, net.minecraft.core.particles.ParticleType<T> minecraft) {
+        this.createAndTest(bukkit, minecraft, null, SimpleParticleType.class);
     }
 
-    private <T extends ParticleParam> void testDustOption(Particle bukkit, net.minecraft.core.particles.Particle<T> minecraft) {
+    private <T extends ParticleOptions> void testDustOption(Particle bukkit, net.minecraft.core.particles.ParticleType<T> minecraft) {
         Particle.DustOptions dustOptions = new Particle.DustOptions(Color.fromRGB(236, 28, 36), 0.1205f);
-        ParticleParamRedstone param = createAndTest(bukkit, minecraft, dustOptions, ParticleParamRedstone.class);
+        DustParticleOptions param = this.createAndTest(bukkit, minecraft, dustOptions, DustParticleOptions.class);
 
         assertEquals(0.1205f, param.getScale(), 0.001, String.format("""
                 Dust option scale for particle %s do not match.
@@ -146,9 +146,9 @@ public class ParticleTest {
                 """, bukkit.getKey(), expectedColor, param.getColor())); // Print expected and got since we use assert true
     }
 
-    private <T extends ParticleParam> void testItemStack(Particle bukkit, net.minecraft.core.particles.Particle<T> minecraft) {
+    private <T extends ParticleOptions> void testItemStack(Particle bukkit, net.minecraft.core.particles.ParticleType<T> minecraft) {
         ItemStack itemStack = new ItemStack(Material.STONE);
-        ParticleParamItem param = createAndTest(bukkit, minecraft, itemStack, ParticleParamItem.class);
+        ItemParticleOption param = this.createAndTest(bukkit, minecraft, itemStack, ItemParticleOption.class);
 
         assertEquals(itemStack, CraftItemStack.asBukkitCopy(param.getItem()), String.format("""
                 ItemStack for particle %s do not match.
@@ -156,9 +156,9 @@ public class ParticleTest {
                 """, bukkit.getKey()));
     }
 
-    private <T extends ParticleParam> void testBlockData(Particle bukkit, net.minecraft.core.particles.Particle<T> minecraft) {
+    private <T extends ParticleOptions> void testBlockData(Particle bukkit, net.minecraft.core.particles.ParticleType<T> minecraft) {
         BlockData blockData = Bukkit.createBlockData(Material.STONE);
-        ParticleParamBlock param = createAndTest(bukkit, minecraft, blockData, ParticleParamBlock.class);
+        BlockParticleOption param = this.createAndTest(bukkit, minecraft, blockData, BlockParticleOption.class);
 
         assertEquals(blockData, CraftBlockData.fromData(param.getState()), String.format("""
                 Block data for particle %s do not match.
@@ -166,9 +166,9 @@ public class ParticleTest {
                 """, bukkit.getKey()));
     }
 
-    private <T extends ParticleParam> void testDustTransition(Particle bukkit, net.minecraft.core.particles.Particle<T> minecraft) {
+    private <T extends ParticleOptions> void testDustTransition(Particle bukkit, net.minecraft.core.particles.ParticleType<T> minecraft) {
         Particle.DustTransition dustTransition = new Particle.DustTransition(Color.fromRGB(236, 28, 36), Color.fromRGB(107, 159, 181), 0.1205f);
-        DustColorTransitionOptions param = createAndTest(bukkit, minecraft, dustTransition, DustColorTransitionOptions.class);
+        DustColorTransitionOptions param = this.createAndTest(bukkit, minecraft, dustTransition, DustColorTransitionOptions.class);
 
         assertEquals(0.1205f, param.getScale(), 0.001, String.format("""
                 Dust transition scale for particle %s do not match.
@@ -192,31 +192,31 @@ public class ParticleTest {
                 """, bukkit.getKey(), expectedTo, param.getToColor())); // Print expected and got since we use assert true
     }
 
-    private <T extends ParticleParam> void testVibration(Particle bukkit, net.minecraft.core.particles.Particle<T> minecraft) {
+    private <T extends ParticleOptions> void testVibration(Particle bukkit, net.minecraft.core.particles.ParticleType<T> minecraft) {
         Vibration vibration = new Vibration(new Location(null, 3, 1, 4), new Vibration.Destination.BlockDestination(new Location(null, 1, 5, 9)), 265);
-        VibrationParticleOption param = createAndTest(bukkit, minecraft, vibration, VibrationParticleOption.class);
+        VibrationParticleOption param = this.createAndTest(bukkit, minecraft, vibration, VibrationParticleOption.class);
 
         assertEquals(265, param.getArrivalInTicks(), String.format("""
                 Vibration ticks for particle %s do not match.
                 Did something change in the implementation or minecraft?
                 """, bukkit.getKey()));
 
-        Optional<Vec3D> pos = param.getDestination().getPosition(null);
+        Optional<Vec3> pos = param.getDestination().getPosition(null);
         assertTrue(pos.isPresent(), String.format("""
                 Vibration position for particle %s is not present.
                 Did something change in the implementation or minecraft?
                 """, bukkit.getKey()));
 
         // Add 0.5 since it gets centered to the block
-        assertEquals(new Vec3D(1.5, 5.5, 9.5), pos.get(), String.format("""
+        assertEquals(new Vec3(1.5, 5.5, 9.5), pos.get(), String.format("""
                 Vibration position for particle %s do not match.
                 Did something change in the implementation or minecraft?
                 """, bukkit.getKey()));
     }
 
-    private <T extends ParticleParam> void testFloat(Particle bukkit, net.minecraft.core.particles.Particle<T> minecraft) {
+    private <T extends ParticleOptions> void testFloat(Particle bukkit, net.minecraft.core.particles.ParticleType<T> minecraft) {
         float role = 0.1205f;
-        SculkChargeParticleOptions param = createAndTest(bukkit, minecraft, role, SculkChargeParticleOptions.class);
+        SculkChargeParticleOptions param = this.createAndTest(bukkit, minecraft, role, SculkChargeParticleOptions.class);
 
         assertEquals(role, param.roll(), 0.001, String.format("""
                 Float role for particle %s do not match.
@@ -224,9 +224,9 @@ public class ParticleTest {
                 """, bukkit.getKey()));
     }
 
-    private <T extends ParticleParam> void testInteger(Particle bukkit, net.minecraft.core.particles.Particle<T> minecraft) {
+    private <T extends ParticleOptions> void testInteger(Particle bukkit, net.minecraft.core.particles.ParticleType<T> minecraft) {
         int delay = 1205;
-        ShriekParticleOption param = createAndTest(bukkit, minecraft, delay, ShriekParticleOption.class);
+        ShriekParticleOption param = this.createAndTest(bukkit, minecraft, delay, ShriekParticleOption.class);
 
         assertEquals(delay, param.getDelay(), String.format("""
                 Integer delay for particle %s do not match.
@@ -234,9 +234,9 @@ public class ParticleTest {
                 """, bukkit.getKey()));
     }
 
-    private <T extends ParticleParam> void testColor(Particle bukkit, net.minecraft.core.particles.Particle<T> minecraft) {
+    private <T extends ParticleOptions> void testColor(Particle bukkit, net.minecraft.core.particles.ParticleType<T> minecraft) {
         Color color = Color.fromARGB(107, 236, 28, 36);
-        ColorParticleOption param = createAndTest(bukkit, minecraft, color, ColorParticleOption.class);
+        ColorParticleOption param = this.createAndTest(bukkit, minecraft, color, ColorParticleOption.class);
 
         Vector4f actual = new Vector4f(param.getAlpha(), param.getRed(), param.getGreen(), param.getBlue());
         Vector4f expected = new Vector4f(0.4196f, 0.92549f, 0.1098f, 0.14117647f);
@@ -248,14 +248,14 @@ public class ParticleTest {
                 """, bukkit.getKey(), expected, actual)); // Print expected and got since we use assert true
     }
 
-    private <T extends ParticleParam> void testTrail(Particle bukkit, net.minecraft.core.particles.Particle<T> minecraft) {
+    private <T extends ParticleOptions> void testTrail(Particle bukkit, net.minecraft.core.particles.ParticleType<T> minecraft) {
         Color color = Color.fromRGB(236, 28, 36);
         Particle.Trail trail = new Particle.Trail(new Location(null, 1, 5, 9), color, 20);
 
-        TrailParticleOption param = createAndTest(bukkit, minecraft, trail, TrailParticleOption.class);
+        TrailParticleOption param = this.createAndTest(bukkit, minecraft, trail, TrailParticleOption.class);
 
-        Vec3D pos = param.target();
-        assertEquals(new Vec3D(1.0, 5.0, 9.0), pos, String.format("""
+        Vec3 pos = param.target();
+        assertEquals(new Vec3(1.0, 5.0, 9.0), pos, String.format("""
                 Vibration position for particle %s do not match.
                 Did something change in the implementation or minecraft?
                 """, bukkit.getKey()));
@@ -270,7 +270,7 @@ public class ParticleTest {
                 """, bukkit.getKey(), expected, actual)); // Print expected and got since we use assert true
     }
 
-    private <D extends ParticleParam, T extends ParticleParam> D createAndTest(Particle bukkit, net.minecraft.core.particles.Particle<T> minecraft, Object data, Class<D> paramClass) {
+    private <D extends ParticleOptions, T extends ParticleOptions> D createAndTest(Particle bukkit, net.minecraft.core.particles.ParticleType<T> minecraft, Object data, Class<D> paramClass) {
         @SuppressWarnings("unchecked")
         T particleParam = (T) assertDoesNotThrow(() -> CraftParticle.createParticleParam(bukkit, data), String.format("""
                 Could not create particle param for particle %s.
@@ -279,14 +279,14 @@ public class ParticleTest {
                 Check in CraftParticle if the conversion is still correct.
                 """, bukkit.getKey()));
 
-        DataResult<NBTBase> encoded = assertDoesNotThrow(() -> minecraft.codec().codec().encodeStart(DynamicOpsNBT.INSTANCE, particleParam),
+        DataResult<Tag> encoded = assertDoesNotThrow(() -> minecraft.codec().codec().encodeStart(DynamicOpsNBT.INSTANCE, particleParam),
                 String.format("""
                         Could not encoded particle param for particle %s.
                         This can indicated, that the wrong particle param is created in CraftParticle.
                         Particle param is of type %s.
                         """, bukkit.getKey(), particleParam.getClass()));
 
-        Optional<DataResult.Error<NBTBase>> encodeError = encoded.error();
+        Optional<DataResult.Error<Tag>> encodeError = encoded.error();
         assertTrue(encodeError.isEmpty(), () -> String.format("""
                 Could not encoded particle param for particle %s.
                 This is possible because the wrong particle param is created in CraftParticle.
@@ -294,14 +294,14 @@ public class ParticleTest {
                 Error message: %s.
                 """, bukkit.getKey(), particleParam.getClass(), encoded.error().get().message()));
 
-        Optional<NBTBase> encodeResult = encoded.result();
+        Optional<Tag> encodeResult = encoded.result();
         assertTrue(encodeResult.isPresent(), String.format("""
                 Result is not present for particle %s.
                 Even though there is also no error, this should not happen.
                 Particle param is of type %s.
                 """, bukkit.getKey(), particleParam.getClass()));
 
-        DataResult<T> decoded = minecraft.codec().codec().parse(DynamicOpsNBT.INSTANCE, encodeResult.get());
+        DataResult<T> decoded = minecraft.codec().codec().parse(NbtOps.INSTANCE, encodeResult.get());
 
         Optional<DataResult.Error<T>> decodeError = decoded.error();
         assertTrue(decodeError.isEmpty(), () -> String.format("""
diff --git a/paper-server/src/test/java/org/bukkit/PerMaterialTest.java b/paper-server/src/test/java/org/bukkit/PerMaterialTest.java
index aedd828bab..629fccec14 100644
--- a/paper-server/src/test/java/org/bukkit/PerMaterialTest.java
+++ b/paper-server/src/test/java/org/bukkit/PerMaterialTest.java
@@ -4,21 +4,20 @@ import static org.bukkit.support.MatcherAssert.*;
 import static org.hamcrest.Matchers.*;
 import static org.junit.jupiter.api.Assertions.*;
 import java.util.Map;
-import net.minecraft.core.BlockPosition;
+import net.minecraft.core.BlockPos;
 import net.minecraft.core.component.DataComponents;
-import net.minecraft.world.EnumHand;
-import net.minecraft.world.entity.EnumItemSlot;
-import net.minecraft.world.entity.player.EntityHuman;
+import net.minecraft.world.InteractionHand;
+import net.minecraft.world.entity.player.Player;
 import net.minecraft.world.item.Item;
 import net.minecraft.world.item.equipment.Equippable;
-import net.minecraft.world.level.BlockAccessAir;
+import net.minecraft.world.level.EmptyBlockGetter;
 import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.block.BlockFire;
 import net.minecraft.world.level.block.Blocks;
 import net.minecraft.world.level.block.Fallable;
-import net.minecraft.world.level.block.state.BlockBase;
-import net.minecraft.world.level.block.state.IBlockData;
-import net.minecraft.world.phys.MovingObjectPositionBlock;
+import net.minecraft.world.level.block.FireBlock;
+import net.minecraft.world.level.block.state.BlockBehaviour;
+import net.minecraft.world.level.block.state.BlockState;
+import net.minecraft.world.phys.BlockHitResult;
 import org.bukkit.block.data.BlockData;
 import org.bukkit.craftbukkit.CraftEquipmentSlot;
 import org.bukkit.craftbukkit.inventory.CraftItemStack;
@@ -39,7 +38,7 @@ public class PerMaterialTest {
 
     @BeforeAll
     public static void getFireValues() {
-        fireValues = ((BlockFire) Blocks.FIRE).igniteOdds;
+        PerMaterialTest.fireValues = ((FireBlock) Blocks.FIRE).igniteOdds;
     }
 
     @ParameterizedTest
@@ -142,7 +141,7 @@ public class PerMaterialTest {
     public void isBurnable(Material material) {
         if (material.isBlock()) {
             Block block = CraftMagicNumbers.getBlock(material);
-            assertThat(material.isBurnable(), is(fireValues.containsKey(block) && fireValues.get(block) > 0));
+            assertThat(material.isBurnable(), is(PerMaterialTest.fireValues.containsKey(block) && PerMaterialTest.fireValues.get(block) > 0));
         } else {
             assertFalse(material.isBurnable());
         }
@@ -152,7 +151,7 @@ public class PerMaterialTest {
     @EnumSource(value = Material.class, names = "LEGACY_.*", mode = EnumSource.Mode.MATCH_NONE)
     public void isOccluding(Material material) {
         if (material.isBlock()) {
-            assertThat(material.isOccluding(), is(CraftMagicNumbers.getBlock(material).defaultBlockState().isRedstoneConductor(BlockAccessAir.INSTANCE, BlockPosition.ZERO)));
+            assertThat(material.isOccluding(), is(CraftMagicNumbers.getBlock(material).defaultBlockState().isRedstoneConductor(EmptyBlockGetter.INSTANCE, BlockPos.ZERO)));
         } else {
             assertFalse(material.isOccluding());
         }
@@ -224,14 +223,14 @@ public class PerMaterialTest {
         if (material.isBlock()) {
             Class<?> clazz = CraftMagicNumbers.getBlock(material).getClass();
 
-            boolean hasMethod = hasMethod(clazz, "useWithoutItem", IBlockData.class, net.minecraft.world.level.World.class, BlockPosition.class, EntityHuman.class, MovingObjectPositionBlock.class)
-                    || hasMethod(clazz, "useItemOn", net.minecraft.world.item.ItemStack.class, IBlockData.class, net.minecraft.world.level.World.class, BlockPosition.class, EntityHuman.class, EnumHand.class, MovingObjectPositionBlock.class);
+            boolean hasMethod = this.hasMethod(clazz, "useWithoutItem", BlockState.class, net.minecraft.world.level.Level.class, BlockPos.class, Player.class, BlockHitResult.class)
+                    || this.hasMethod(clazz, "useItemOn", net.minecraft.world.item.ItemStack.class, BlockState.class, net.minecraft.world.level.Level.class, BlockPos.class, Player.class, InteractionHand.class, BlockHitResult.class);
 
-            if (!hasMethod && clazz.getSuperclass() != BlockBase.class) {
+            if (!hasMethod && clazz.getSuperclass() != BlockBehaviour.class) {
                 clazz = clazz.getSuperclass();
 
-                hasMethod = hasMethod(clazz, "useWithoutItem", IBlockData.class, net.minecraft.world.level.World.class, BlockPosition.class, EntityHuman.class, MovingObjectPositionBlock.class)
-                        || hasMethod(clazz, "useItemOn", net.minecraft.world.item.ItemStack.class, IBlockData.class, net.minecraft.world.level.World.class, BlockPosition.class, EntityHuman.class, EnumHand.class, MovingObjectPositionBlock.class);
+                hasMethod = this.hasMethod(clazz, "useWithoutItem", BlockState.class, net.minecraft.world.level.Level.class, BlockPos.class, Player.class, BlockHitResult.class)
+                        || this.hasMethod(clazz, "useItemOn", net.minecraft.world.item.ItemStack.class, BlockState.class, net.minecraft.world.level.Level.class, BlockPos.class, Player.class, InteractionHand.class, BlockHitResult.class);
             }
 
             assertThat(material.isInteractable(),
@@ -300,7 +299,7 @@ public class PerMaterialTest {
     public void testEquipmentSlot(Material material) {
         if (material.isItem()) {
             Equippable equipable = CraftItemStack.asNMSCopy(new ItemStack(material)).get(DataComponents.EQUIPPABLE);
-            EquipmentSlot expected = CraftEquipmentSlot.getSlot(equipable != null ? equipable.slot() : EnumItemSlot.MAINHAND);
+            EquipmentSlot expected = CraftEquipmentSlot.getSlot(equipable != null ? equipable.slot() : net.minecraft.world.entity.EquipmentSlot.MAINHAND);
             assertThat(material.getEquipmentSlot(), is(expected));
         }
     }
diff --git a/paper-server/src/test/java/org/bukkit/PotionEffectTypeTest.java b/paper-server/src/test/java/org/bukkit/PotionEffectTypeTest.java
index 189901cbfa..ad60705e4a 100644
--- a/paper-server/src/test/java/org/bukkit/PotionEffectTypeTest.java
+++ b/paper-server/src/test/java/org/bukkit/PotionEffectTypeTest.java
@@ -7,8 +7,8 @@ import com.google.common.collect.Lists;
 import java.util.Collections;
 import java.util.List;
 import net.minecraft.core.registries.BuiltInRegistries;
-import net.minecraft.resources.MinecraftKey;
-import net.minecraft.world.effect.MobEffectInfo;
+import net.minecraft.resources.ResourceLocation;
+import net.minecraft.world.effect.MobEffectCategory;
 import org.bukkit.craftbukkit.potion.CraftPotionEffectTypeCategory;
 import org.bukkit.craftbukkit.util.CraftNamespacedKey;
 import org.bukkit.potion.PotionEffectType;
@@ -23,7 +23,7 @@ public class PotionEffectTypeTest {
     public void verifyMapping() {
         List<PotionEffectType> effects = Lists.newArrayList(PotionEffectType.values());
 
-        for (MinecraftKey key : BuiltInRegistries.MOB_EFFECT.keySet()) {
+        for (ResourceLocation key : BuiltInRegistries.MOB_EFFECT.keySet()) {
             String name = key.getPath();
             PotionEffectType effect = PotionEffectType.getByKey(CraftNamespacedKey.fromMinecraft(key));
 
@@ -43,7 +43,7 @@ public class PotionEffectTypeTest {
             assertDoesNotThrow(() -> CraftPotionEffectTypeCategory.bukkitToMinecraft(category), "PotionEffectTypeCategory." + categoryName + " exists but MobEffectInfo." + categoryName + " does not!");
         }
 
-        for (MobEffectInfo info : MobEffectInfo.values()) {
+        for (MobEffectCategory info : MobEffectCategory.values()) {
             assertDoesNotThrow(() -> CraftPotionEffectTypeCategory.minecraftToBukkit(info), "Missing PotionEffectTypeCategory for MobEffectInfo." + info.name());
         }
     }
diff --git a/paper-server/src/test/java/org/bukkit/SoundTest.java b/paper-server/src/test/java/org/bukkit/SoundTest.java
index a3651a3e31..607e7da136 100644
--- a/paper-server/src/test/java/org/bukkit/SoundTest.java
+++ b/paper-server/src/test/java/org/bukkit/SoundTest.java
@@ -5,7 +5,7 @@ import static org.hamcrest.Matchers.*;
 import static org.junit.jupiter.api.Assertions.*;
 import java.util.Locale;
 import net.minecraft.core.registries.BuiltInRegistries;
-import net.minecraft.resources.MinecraftKey;
+import net.minecraft.resources.ResourceLocation;
 import org.bukkit.craftbukkit.CraftSound;
 import org.bukkit.support.environment.AllFeatures;
 import org.junit.jupiter.api.Test;
@@ -22,7 +22,7 @@ public class SoundTest {
 
     @Test
     public void testReverse() {
-        for (MinecraftKey effect : BuiltInRegistries.SOUND_EVENT.keySet()) {
+        for (ResourceLocation effect : BuiltInRegistries.SOUND_EVENT.keySet()) {
             assertNotNull(Sound.valueOf(effect.getPath().replace('.', '_').toUpperCase(Locale.ROOT)), effect + "");
         }
     }
@@ -30,13 +30,13 @@ public class SoundTest {
     @Test
     public void testCategory() {
         for (SoundCategory category : SoundCategory.values()) {
-            assertNotNull(net.minecraft.sounds.SoundCategory.valueOf(category.name()), category + "");
+            assertNotNull(net.minecraft.sounds.SoundSource.valueOf(category.name()), category + "");
         }
     }
 
     @Test
     public void testCategoryReverse() {
-        for (net.minecraft.sounds.SoundCategory category : net.minecraft.sounds.SoundCategory.values()) {
+        for (net.minecraft.sounds.SoundSource category : net.minecraft.sounds.SoundSource.values()) {
             assertNotNull(SoundCategory.valueOf(category.name()), category + "");
         }
     }
diff --git a/paper-server/src/test/java/org/bukkit/StatisticsAndAchievementsTest.java b/paper-server/src/test/java/org/bukkit/StatisticsAndAchievementsTest.java
index 32258167af..270befba49 100644
--- a/paper-server/src/test/java/org/bukkit/StatisticsAndAchievementsTest.java
+++ b/paper-server/src/test/java/org/bukkit/StatisticsAndAchievementsTest.java
@@ -5,8 +5,7 @@ import static org.hamcrest.Matchers.*;
 import static org.junit.jupiter.api.Assertions.*;
 import com.google.common.collect.HashMultiset;
 import net.minecraft.core.registries.BuiltInRegistries;
-import net.minecraft.stats.StatisticWrapper;
-import net.minecraft.world.entity.EntityTypes;
+import net.minecraft.stats.StatType;
 import org.bukkit.craftbukkit.CraftStatistic;
 import org.bukkit.entity.EntityType;
 import org.bukkit.support.environment.AllFeatures;
@@ -33,9 +32,9 @@ public class StatisticsAndAchievementsTest {
     @SuppressWarnings("unchecked")
     public void verifyStatisticMapping() throws Throwable {
         HashMultiset<Statistic> statistics = HashMultiset.create();
-        for (StatisticWrapper wrapper : BuiltInRegistries.STAT_TYPE) {
+        for (StatType wrapper : BuiltInRegistries.STAT_TYPE) {
             for (Object child : wrapper.getRegistry()) {
-                net.minecraft.stats.Statistic<?> statistic = wrapper.get(child);
+                net.minecraft.stats.Stat<?> statistic = wrapper.get(child);
                 String message = String.format("org.bukkit.Statistic is missing: '%s'", statistic);
 
                 Statistic subject = CraftStatistic.getBukkitStatistic(statistic);
@@ -44,7 +43,7 @@ public class StatisticsAndAchievementsTest {
                 if (wrapper.getRegistry() == BuiltInRegistries.BLOCK || wrapper.getRegistry() == BuiltInRegistries.ITEM) {
                     assertNotNull(CraftStatistic.getMaterialFromStatistic(statistic), "Material type map missing for " + wrapper.getRegistry().getKey(child));
                 } else if (wrapper.getRegistry() == BuiltInRegistries.ENTITY_TYPE) {
-                    assertNotNull(CraftStatistic.getEntityTypeFromStatistic((net.minecraft.stats.Statistic<EntityTypes<?>>) statistic), "Entity type map missing for " + EntityTypes.getKey((EntityTypes<?>) child));
+                    assertNotNull(CraftStatistic.getEntityTypeFromStatistic((net.minecraft.stats.Stat<net.minecraft.world.entity.EntityType<?>>) statistic), "Entity type map missing for " + net.minecraft.world.entity.EntityType.getKey((net.minecraft.world.entity.EntityType<?>) child));
                 }
 
                 statistics.add(subject);
diff --git a/paper-server/src/test/java/org/bukkit/block/banner/PatternTypeTest.java b/paper-server/src/test/java/org/bukkit/block/banner/PatternTypeTest.java
index a11708a899..66db0cf71b 100644
--- a/paper-server/src/test/java/org/bukkit/block/banner/PatternTypeTest.java
+++ b/paper-server/src/test/java/org/bukkit/block/banner/PatternTypeTest.java
@@ -1,10 +1,10 @@
 package org.bukkit.block.banner;
 
 import static org.junit.jupiter.api.Assertions.*;
-import net.minecraft.core.IRegistry;
+
 import net.minecraft.core.registries.Registries;
 import net.minecraft.server.MinecraftServer;
-import net.minecraft.world.level.block.entity.EnumBannerPatternType;
+import net.minecraft.world.level.block.entity.BannerPattern;
 import org.bukkit.NamespacedKey;
 import org.bukkit.Registry;
 import org.bukkit.craftbukkit.util.CraftNamespacedKey;
@@ -16,7 +16,7 @@ public class PatternTypeTest {
 
     @Test
     public void testToBukkit() {
-        for (EnumBannerPatternType nms : MinecraftServer.getDefaultRegistryAccess().lookupOrThrow(Registries.BANNER_PATTERN)) {
+        for (BannerPattern nms : MinecraftServer.getDefaultRegistryAccess().lookupOrThrow(Registries.BANNER_PATTERN)) {
             PatternType bukkit = Registry.BANNER_PATTERN.get(CraftNamespacedKey.fromMinecraft(nms.assetId()));
 
             assertNotNull(bukkit, "No Bukkit banner pattern for " + nms + " " + nms);
@@ -25,10 +25,10 @@ public class PatternTypeTest {
 
     @Test
     public void testToNMS() {
-        IRegistry<EnumBannerPatternType> registry = MinecraftServer.getDefaultRegistryAccess().lookupOrThrow(Registries.BANNER_PATTERN);
+        net.minecraft.core.Registry<BannerPattern> registry = MinecraftServer.getDefaultRegistryAccess().lookupOrThrow(Registries.BANNER_PATTERN);
         for (PatternType bukkit : PatternType.values()) {
-            EnumBannerPatternType found = null;
-            for (EnumBannerPatternType nms : registry) {
+            BannerPattern found = null;
+            for (BannerPattern nms : registry) {
                 NamespacedKey nmsKey = CraftNamespacedKey.fromMinecraft(registry.getKey(nms));
                 if (bukkit.getKey().equals(nmsKey)) {
                     found = nms;
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/HeightMapTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/HeightMapTest.java
index 2c5ad9516e..2ab33769a7 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/HeightMapTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/HeightMapTest.java
@@ -10,7 +10,7 @@ public class HeightMapTest {
 
     @Test
     public void heightMapConversionFromNMSToBukkitShouldNotThrowExceptio() {
-        for (net.minecraft.world.level.levelgen.HeightMap.Type nmsHeightMapType : net.minecraft.world.level.levelgen.HeightMap.Type.values()) {
+        for (net.minecraft.world.level.levelgen.Heightmap.Types nmsHeightMapType : net.minecraft.world.level.levelgen.Heightmap.Types.values()) {
             assertNotNull(CraftHeightMap.fromNMS(nmsHeightMapType), "fromNMS");
         }
     }
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/block/BlockStateTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/block/BlockStateTest.java
index 9c41e262f1..c032daa695 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/block/BlockStateTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/block/BlockStateTest.java
@@ -1,11 +1,12 @@
 package org.bukkit.craftbukkit.block;
 
 import static org.junit.jupiter.api.Assertions.*;
-import net.minecraft.core.BlockPosition;
+
+import net.minecraft.core.BlockPos;
 import net.minecraft.core.registries.BuiltInRegistries;
 import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.block.ITileEntity;
-import net.minecraft.world.level.block.entity.TileEntity;
+import net.minecraft.world.level.block.EntityBlock;
+import net.minecraft.world.level.block.entity.BlockEntity;
 import org.bukkit.Material;
 import org.bukkit.support.environment.AllFeatures;
 import org.junit.jupiter.api.Test;
@@ -20,12 +21,12 @@ public class BlockStateTest {
             Class<?> blockStateType = CraftBlockStates.getBlockStateType(material);
             boolean isCraftBlockEntityState = CraftBlockEntityState.class.isAssignableFrom(blockStateType);
 
-            if (block instanceof ITileEntity) {
+            if (block instanceof EntityBlock) {
                 assertTrue(isCraftBlockEntityState, material + " has BlockState of type " + blockStateType.getName() + ", but expected subtype of CraftBlockEntityState");
 
                 // check tile entity type
-                TileEntity tileEntity = ((ITileEntity) block).newBlockEntity(BlockPosition.ZERO, block.defaultBlockState());
-                TileEntity materialTileEntity = CraftBlockStates.createNewTileEntity(material);
+                BlockEntity tileEntity = ((EntityBlock) block).newBlockEntity(BlockPos.ZERO, block.defaultBlockState());
+                BlockEntity materialTileEntity = CraftBlockStates.createNewTileEntity(material);
 
                 if (tileEntity == null) {
                     if (CraftBlockStates.isTileEntityOptional(material)) {
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/entity/EntityTypesTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/entity/EntityTypesTest.java
index adc50ef382..b638519bba 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/entity/EntityTypesTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/entity/EntityTypesTest.java
@@ -132,11 +132,11 @@ public class EntityTypesTest {
     private static JarFile jarFile = null;
 
     public static Stream<Arguments> excludedData() {
-        return EXCLUDE.stream().map(Arguments::arguments);
+        return EntityTypesTest.EXCLUDE.stream().map(Arguments::arguments);
     }
 
     public static Stream<Arguments> data() {
-        return jarFile
+        return EntityTypesTest.jarFile
                 .stream()
                 .map(ZipEntry::getName)
                 .filter(name -> name.endsWith(".class"))
@@ -151,13 +151,13 @@ public class EntityTypesTest {
                     }
                 })
                 .filter(Entity.class::isAssignableFrom)
-                .filter(clazz -> !EXCLUDE.contains(clazz))
+                .filter(clazz -> !EntityTypesTest.EXCLUDE.contains(clazz))
                 .map(Arguments::arguments);
     }
 
     @BeforeAll
     public static void beforeAll() throws IOException {
-        jarFile = new JarFile(new File(BUKKIT_CLASSES));
+        EntityTypesTest.jarFile = new JarFile(new File(EntityTypesTest.BUKKIT_CLASSES));
     }
 
     @ParameterizedTest
@@ -183,8 +183,8 @@ public class EntityTypesTest {
 
     @AfterAll
     public static void clear() throws IOException {
-        if (jarFile != null) {
-            jarFile.close();
+        if (EntityTypesTest.jarFile != null) {
+            EntityTypesTest.jarFile.close();
         }
     }
 }
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/generator/ChunkDataTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/generator/ChunkDataTest.java
index 72b21e0262..7e3f6fdec3 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/generator/ChunkDataTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/generator/ChunkDataTest.java
@@ -37,54 +37,54 @@ public class ChunkDataTest {
     @Test
     public void testMinHeight() {
         OldCraftChunkData data = new OldCraftChunkData(-128, 128, RegistryHelper.getBiomes());
-        assertTrue(testSetBlock(data, 0, -256, 0, RED_WOOL, AIR), "Could not set block below min height");
-        assertTrue(testSetBlock(data, 0, -64, 0, RED_WOOL, RED_WOOL), "Could set block above min height");
+        assertTrue(this.testSetBlock(data, 0, -256, 0, ChunkDataTest.RED_WOOL, ChunkDataTest.AIR), "Could not set block below min height");
+        assertTrue(this.testSetBlock(data, 0, -64, 0, ChunkDataTest.RED_WOOL, ChunkDataTest.RED_WOOL), "Could set block above min height");
     }
 
     @Test
     public void testMaxHeight() {
         OldCraftChunkData data = new OldCraftChunkData(0, 128, RegistryHelper.getBiomes());
-        assertTrue(testSetBlock(data, 0, 128, 0, RED_WOOL, AIR), "Could not set block above max height");
-        assertTrue(testSetBlock(data, 0, 127, 0, RED_WOOL, RED_WOOL), "Could set block below max height");
+        assertTrue(this.testSetBlock(data, 0, 128, 0, ChunkDataTest.RED_WOOL, ChunkDataTest.AIR), "Could not set block above max height");
+        assertTrue(this.testSetBlock(data, 0, 127, 0, ChunkDataTest.RED_WOOL, ChunkDataTest.RED_WOOL), "Could set block below max height");
     }
 
     @Test
     public void testBoundsCheckingSingle() {
         OldCraftChunkData data = new OldCraftChunkData(0, 256, RegistryHelper.getBiomes());
-        assertTrue(testSetBlock(data, 0, 0, 0, RED_WOOL, RED_WOOL), "Can set block inside chunk bounds");
-        assertTrue(testSetBlock(data, 15, 255, 15, RED_WOOL, RED_WOOL), "Can set block inside chunk bounds");
-        assertTrue(testSetBlock(data, -1, 0, 0, RED_WOOL, AIR), "Can no set block outside chunk bounds");
-        assertTrue(testSetBlock(data, 0, -1, 0, RED_WOOL, AIR), "Can no set block outside chunk bounds");
-        assertTrue(testSetBlock(data, 0, 0, -1, RED_WOOL, AIR), "Can no set block outside chunk bounds");
-        assertTrue(testSetBlock(data, 16, 0, 0, RED_WOOL, AIR), "Can no set block outside chunk bounds");
-        assertTrue(testSetBlock(data, 0, 256, 0, RED_WOOL, AIR), "Can no set block outside chunk bounds");
-        assertTrue(testSetBlock(data, 0, 0, 16, RED_WOOL, AIR), "Can no set block outside chunk bounds");
+        assertTrue(this.testSetBlock(data, 0, 0, 0, ChunkDataTest.RED_WOOL, ChunkDataTest.RED_WOOL), "Can set block inside chunk bounds");
+        assertTrue(this.testSetBlock(data, 15, 255, 15, ChunkDataTest.RED_WOOL, ChunkDataTest.RED_WOOL), "Can set block inside chunk bounds");
+        assertTrue(this.testSetBlock(data, -1, 0, 0, ChunkDataTest.RED_WOOL, ChunkDataTest.AIR), "Can no set block outside chunk bounds");
+        assertTrue(this.testSetBlock(data, 0, -1, 0, ChunkDataTest.RED_WOOL, ChunkDataTest.AIR), "Can no set block outside chunk bounds");
+        assertTrue(this.testSetBlock(data, 0, 0, -1, ChunkDataTest.RED_WOOL, ChunkDataTest.AIR), "Can no set block outside chunk bounds");
+        assertTrue(this.testSetBlock(data, 16, 0, 0, ChunkDataTest.RED_WOOL, ChunkDataTest.AIR), "Can no set block outside chunk bounds");
+        assertTrue(this.testSetBlock(data, 0, 256, 0, ChunkDataTest.RED_WOOL, ChunkDataTest.AIR), "Can no set block outside chunk bounds");
+        assertTrue(this.testSetBlock(data, 0, 0, 16, ChunkDataTest.RED_WOOL, ChunkDataTest.AIR), "Can no set block outside chunk bounds");
     }
 
     @Test
     public void testSetRegion() {
         OldCraftChunkData data = new OldCraftChunkData(0, 256, RegistryHelper.getBiomes());
-        testSetRegion(data, -100, 0, -100, 0, 256, 0, RED_WOOL); // exclusively outside
-        testSetRegion(data, 16, 256, 16, 0, 0, 0, RED_WOOL); // minimum >= maximum
-        testSetRegion(data, 0, 0, 0, 0, 0, 0, RED_WOOL); // minimum == maximum
-        testSetRegion(data, 0, 0, 0, 16, 16, 16, RED_WOOL); // Whole Chunk Section
-        data.setRegion(0, 0, 0, 16, 256, 16, AIR);
-        testSetRegion(data, 0, 8, 0, 16, 24, 16, RED_WOOL); // Start middle of this section, end middle of next
-        data.setRegion(0, 0, 0, 16, 256, 16, AIR);
-        testSetRegion(data, 0, 4, 0, 16, 12, 16, RED_WOOL); // Start in this section, end in this section
-        data.setRegion(0, 0, 0, 16, 256, 16, AIR);
-        testSetRegion(data, 0, 0, 0, 16, 16, 1, RED_WOOL); // Whole Chunk Section
-        data.setRegion(0, 0, 0, 16, 256, 16, AIR);
-        testSetRegion(data, 0, 8, 0, 16, 24, 1, RED_WOOL); // Start middle of this section, end middle of next
-        data.setRegion(0, 0, 0, 16, 256, 16, AIR);
-        testSetRegion(data, 0, 4, 0, 16, 12, 1, RED_WOOL); // Start in this section, end in this section
-        data.setRegion(0, 0, 0, 16, 256, 16, AIR);
-        testSetRegion(data, 0, 0, 0, 1, 16, 1, RED_WOOL); // Whole Chunk Section
-        data.setRegion(0, 0, 0, 16, 256, 16, AIR);
-        testSetRegion(data, 0, 8, 0, 1, 24, 1, RED_WOOL); // Start middle of this section, end middle of next
-        data.setRegion(0, 0, 0, 16, 256, 16, AIR);
-        testSetRegion(data, 0, 4, 0, 1, 12, 1, RED_WOOL); // Start in this section, end in this section
-        data.setRegion(0, 0, 0, 16, 256, 16, AIR);
-        testSetRegion(data, 0, 0, 0, 1, 1, 1, RED_WOOL); // Set single block.
+        this.testSetRegion(data, -100, 0, -100, 0, 256, 0, ChunkDataTest.RED_WOOL); // exclusively outside
+        this.testSetRegion(data, 16, 256, 16, 0, 0, 0, ChunkDataTest.RED_WOOL); // minimum >= maximum
+        this.testSetRegion(data, 0, 0, 0, 0, 0, 0, ChunkDataTest.RED_WOOL); // minimum == maximum
+        this.testSetRegion(data, 0, 0, 0, 16, 16, 16, ChunkDataTest.RED_WOOL); // Whole Chunk Section
+        data.setRegion(0, 0, 0, 16, 256, 16, ChunkDataTest.AIR);
+        this.testSetRegion(data, 0, 8, 0, 16, 24, 16, ChunkDataTest.RED_WOOL); // Start middle of this section, end middle of next
+        data.setRegion(0, 0, 0, 16, 256, 16, ChunkDataTest.AIR);
+        this.testSetRegion(data, 0, 4, 0, 16, 12, 16, ChunkDataTest.RED_WOOL); // Start in this section, end in this section
+        data.setRegion(0, 0, 0, 16, 256, 16, ChunkDataTest.AIR);
+        this.testSetRegion(data, 0, 0, 0, 16, 16, 1, ChunkDataTest.RED_WOOL); // Whole Chunk Section
+        data.setRegion(0, 0, 0, 16, 256, 16, ChunkDataTest.AIR);
+        this.testSetRegion(data, 0, 8, 0, 16, 24, 1, ChunkDataTest.RED_WOOL); // Start middle of this section, end middle of next
+        data.setRegion(0, 0, 0, 16, 256, 16, ChunkDataTest.AIR);
+        this.testSetRegion(data, 0, 4, 0, 16, 12, 1, ChunkDataTest.RED_WOOL); // Start in this section, end in this section
+        data.setRegion(0, 0, 0, 16, 256, 16, ChunkDataTest.AIR);
+        this.testSetRegion(data, 0, 0, 0, 1, 16, 1, ChunkDataTest.RED_WOOL); // Whole Chunk Section
+        data.setRegion(0, 0, 0, 16, 256, 16, ChunkDataTest.AIR);
+        this.testSetRegion(data, 0, 8, 0, 1, 24, 1, ChunkDataTest.RED_WOOL); // Start middle of this section, end middle of next
+        data.setRegion(0, 0, 0, 16, 256, 16, ChunkDataTest.AIR);
+        this.testSetRegion(data, 0, 4, 0, 1, 12, 1, ChunkDataTest.RED_WOOL); // Start in this section, end in this section
+        data.setRegion(0, 0, 0, 16, 256, 16, ChunkDataTest.AIR);
+        this.testSetRegion(data, 0, 0, 0, 1, 1, 1, ChunkDataTest.RED_WOOL); // Set single block.
     }
 }
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/CompositeSerialization.java b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/CompositeSerialization.java
index 106d5745a9..b5c2d8f699 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/CompositeSerialization.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/CompositeSerialization.java
@@ -24,7 +24,7 @@ public class CompositeSerialization {
 
     @Test
     public void testSaveRestoreCompositeList() throws InvalidConfigurationException {
-        YamlConfiguration out = getConfig();
+        YamlConfiguration out = this.getConfig();
 
         List<ItemStack> stacks = new ArrayList<ItemStack>();
         stacks.add(new ItemStack(Material.STONE));
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java
index 097b5ff47b..91cfa32272 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/DeprecatedItemMetaCustomValueTest.java
@@ -27,7 +27,7 @@ public class DeprecatedItemMetaCustomValueTest {
 
     @BeforeAll
     public static void setup() {
-        VALID_KEY = new NamespacedKey("test", "validkey");
+        DeprecatedItemMetaCustomValueTest.VALID_KEY = new NamespacedKey("test", "validkey");
     }
 
     /*
@@ -35,7 +35,7 @@ public class DeprecatedItemMetaCustomValueTest {
      */
     @Test
     public void testSetNoAdapter() {
-        ItemMeta itemMeta = createNewItemMeta();
+        ItemMeta itemMeta = this.createNewItemMeta();
         assertThrows(IllegalArgumentException.class, () -> itemMeta.getCustomTagContainer().setCustomTag(VALID_KEY, new PrimitiveTagType<>(boolean.class), true));
     }
 
@@ -44,8 +44,8 @@ public class DeprecatedItemMetaCustomValueTest {
      */
     @Test
     public void testHasNoAdapter() {
-        ItemMeta itemMeta = createNewItemMeta();
-        itemMeta.getCustomTagContainer().setCustomTag(VALID_KEY, ItemTagType.INTEGER, 1); // We gotta set this so we at least try to compare it
+        ItemMeta itemMeta = this.createNewItemMeta();
+        itemMeta.getCustomTagContainer().setCustomTag(DeprecatedItemMetaCustomValueTest.VALID_KEY, ItemTagType.INTEGER, 1); // We gotta set this so we at least try to compare it
         assertThrows(IllegalArgumentException.class, () -> itemMeta.getCustomTagContainer().hasCustomTag(VALID_KEY, new PrimitiveTagType<>(boolean.class)));
     }
 
@@ -54,15 +54,15 @@ public class DeprecatedItemMetaCustomValueTest {
      */
     @Test
     public void testGetNoAdapter() {
-        ItemMeta itemMeta = createNewItemMeta();
-        itemMeta.getCustomTagContainer().setCustomTag(VALID_KEY, ItemTagType.INTEGER, 1); //We gotta set this so we at least try to compare it
+        ItemMeta itemMeta = this.createNewItemMeta();
+        itemMeta.getCustomTagContainer().setCustomTag(DeprecatedItemMetaCustomValueTest.VALID_KEY, ItemTagType.INTEGER, 1); //We gotta set this so we at least try to compare it
         assertThrows(IllegalArgumentException.class, () -> itemMeta.getCustomTagContainer().getCustomTag(VALID_KEY, new PrimitiveTagType<>(boolean.class)));
     }
 
     @Test
     public void testGetWrongType() {
-        ItemMeta itemMeta = createNewItemMeta();
-        itemMeta.getCustomTagContainer().setCustomTag(VALID_KEY, ItemTagType.INTEGER, 1);
+        ItemMeta itemMeta = this.createNewItemMeta();
+        itemMeta.getCustomTagContainer().setCustomTag(DeprecatedItemMetaCustomValueTest.VALID_KEY, ItemTagType.INTEGER, 1);
         assertThrows(IllegalArgumentException.class, () -> itemMeta.getCustomTagContainer().getCustomTag(VALID_KEY, ItemTagType.STRING));
     }
 
@@ -71,7 +71,7 @@ public class DeprecatedItemMetaCustomValueTest {
         NamespacedKey namespacedKeyA = new NamespacedKey("plugin-a", "damage");
         NamespacedKey namespacedKeyB = new NamespacedKey("plugin-b", "damage");
 
-        ItemMeta meta = createNewItemMeta();
+        ItemMeta meta = this.createNewItemMeta();
         meta.getCustomTagContainer().setCustomTag(namespacedKeyA, ItemTagType.LONG, 15L);
         meta.getCustomTagContainer().setCustomTag(namespacedKeyB, ItemTagType.LONG, 160L);
 
@@ -92,7 +92,7 @@ public class DeprecatedItemMetaCustomValueTest {
      */
     @Test
     public void testNBTTagStoring() {
-        CraftMetaItem itemMeta = createComplexItemMeta();
+        CraftMetaItem itemMeta = this.createComplexItemMeta();
 
         CraftMetaItem.Applicator compound = new CraftMetaItem.Applicator();
         itemMeta.applyToItem(compound);
@@ -102,7 +102,7 @@ public class DeprecatedItemMetaCustomValueTest {
 
     @Test
     public void testMapStoring() {
-        CraftMetaItem itemMeta = createComplexItemMeta();
+        CraftMetaItem itemMeta = this.createComplexItemMeta();
 
         Map<String, Object> serialize = itemMeta.serialize();
         assertEquals(itemMeta, new CraftMetaItem(serialize));
@@ -111,7 +111,7 @@ public class DeprecatedItemMetaCustomValueTest {
     @Test
     public void testYAMLStoring() {
         ItemStack stack = new ItemStack(Material.DIAMOND);
-        CraftMetaItem meta = createComplexItemMeta();
+        CraftMetaItem meta = this.createComplexItemMeta();
         stack.setItemMeta(meta);
 
         YamlConfiguration configuration = new YamlConfiguration();
@@ -127,10 +127,10 @@ public class DeprecatedItemMetaCustomValueTest {
     @Test
     public void testCorrectType() {
         ItemStack stack = new ItemStack(Material.DIAMOND);
-        CraftMetaItem meta = createComplexItemMeta();
+        CraftMetaItem meta = this.createComplexItemMeta();
 
-        meta.getCustomTagContainer().setCustomTag(requestKey("int"), ItemTagType.STRING, "1");
-        meta.getCustomTagContainer().setCustomTag(requestKey("double"), ItemTagType.STRING, "1.33");
+        meta.getCustomTagContainer().setCustomTag(this.requestKey("int"), ItemTagType.STRING, "1");
+        meta.getCustomTagContainer().setCustomTag(this.requestKey("double"), ItemTagType.STRING, "1.33");
         stack.setItemMeta(meta);
 
         YamlConfiguration configuration = new YamlConfiguration();
@@ -140,28 +140,28 @@ public class DeprecatedItemMetaCustomValueTest {
         YamlConfiguration loadedConfig = YamlConfiguration.loadConfiguration(new StringReader(configValue));
         ItemStack newStack = loadedConfig.getSerializable("testpath", ItemStack.class);
 
-        assertTrue(newStack.getItemMeta().getCustomTagContainer().hasCustomTag(requestKey("int"), ItemTagType.STRING));
-        assertEquals(newStack.getItemMeta().getCustomTagContainer().getCustomTag(requestKey("int"), ItemTagType.STRING), "1");
+        assertTrue(newStack.getItemMeta().getCustomTagContainer().hasCustomTag(this.requestKey("int"), ItemTagType.STRING));
+        assertEquals(newStack.getItemMeta().getCustomTagContainer().getCustomTag(this.requestKey("int"), ItemTagType.STRING), "1");
 
-        assertTrue(newStack.getItemMeta().getCustomTagContainer().hasCustomTag(requestKey("double"), ItemTagType.STRING));
-        assertEquals(newStack.getItemMeta().getCustomTagContainer().getCustomTag(requestKey("double"), ItemTagType.STRING), "1.33");
+        assertTrue(newStack.getItemMeta().getCustomTagContainer().hasCustomTag(this.requestKey("double"), ItemTagType.STRING));
+        assertEquals(newStack.getItemMeta().getCustomTagContainer().getCustomTag(this.requestKey("double"), ItemTagType.STRING), "1.33");
     }
 
     private CraftMetaItem createComplexItemMeta() {
-        CraftMetaItem itemMeta = (CraftMetaItem) createNewItemMeta();
+        CraftMetaItem itemMeta = (CraftMetaItem) this.createNewItemMeta();
         itemMeta.setDisplayName("Item Display Name");
 
-        itemMeta.getCustomTagContainer().setCustomTag(requestKey("custom-long"), ItemTagType.LONG, 4L); //Add random primitive values
-        itemMeta.getCustomTagContainer().setCustomTag(requestKey("custom-byte-array"), ItemTagType.BYTE_ARRAY, new byte[]{
+        itemMeta.getCustomTagContainer().setCustomTag(this.requestKey("custom-long"), ItemTagType.LONG, 4L); //Add random primitive values
+        itemMeta.getCustomTagContainer().setCustomTag(this.requestKey("custom-byte-array"), ItemTagType.BYTE_ARRAY, new byte[]{
             0, 1, 2, 10
         });
-        itemMeta.getCustomTagContainer().setCustomTag(requestKey("custom-string"), ItemTagType.STRING, "Hello there world");
-        itemMeta.getCustomTagContainer().setCustomTag(requestKey("custom-int"), ItemTagType.INTEGER, 3);
-        itemMeta.getCustomTagContainer().setCustomTag(requestKey("custom-double"), ItemTagType.DOUBLE, 3.123);
+        itemMeta.getCustomTagContainer().setCustomTag(this.requestKey("custom-string"), ItemTagType.STRING, "Hello there world");
+        itemMeta.getCustomTagContainer().setCustomTag(this.requestKey("custom-int"), ItemTagType.INTEGER, 3);
+        itemMeta.getCustomTagContainer().setCustomTag(this.requestKey("custom-double"), ItemTagType.DOUBLE, 3.123);
 
         CustomItemTagContainer innerContainer = itemMeta.getCustomTagContainer().getAdapterContext().newTagContainer(); //Add a inner container
-        innerContainer.setCustomTag(VALID_KEY, ItemTagType.LONG, 5L);
-        itemMeta.getCustomTagContainer().setCustomTag(requestKey("custom-inner-compound"), ItemTagType.TAG_CONTAINER, innerContainer);
+        innerContainer.setCustomTag(DeprecatedItemMetaCustomValueTest.VALID_KEY, ItemTagType.LONG, 5L);
+        itemMeta.getCustomTagContainer().setCustomTag(this.requestKey("custom-inner-compound"), ItemTagType.TAG_CONTAINER, innerContainer);
         return itemMeta;
     }
 
@@ -170,43 +170,43 @@ public class DeprecatedItemMetaCustomValueTest {
      */
     @Test
     public void storeUUIDOnItemTest() {
-        ItemMeta itemMeta = createNewItemMeta();
+        ItemMeta itemMeta = this.createNewItemMeta();
         UUIDItemTagType uuidItemTagType = new UUIDItemTagType();
         UUID uuid = UUID.fromString("434eea72-22a6-4c61-b5ef-945874a5c478");
 
-        itemMeta.getCustomTagContainer().setCustomTag(VALID_KEY, uuidItemTagType, uuid);
-        assertTrue(itemMeta.getCustomTagContainer().hasCustomTag(VALID_KEY, uuidItemTagType));
-        assertEquals(uuid, itemMeta.getCustomTagContainer().getCustomTag(VALID_KEY, uuidItemTagType));
+        itemMeta.getCustomTagContainer().setCustomTag(DeprecatedItemMetaCustomValueTest.VALID_KEY, uuidItemTagType, uuid);
+        assertTrue(itemMeta.getCustomTagContainer().hasCustomTag(DeprecatedItemMetaCustomValueTest.VALID_KEY, uuidItemTagType));
+        assertEquals(uuid, itemMeta.getCustomTagContainer().getCustomTag(DeprecatedItemMetaCustomValueTest.VALID_KEY, uuidItemTagType));
     }
 
     @Test
     public void encapsulatedContainers() {
         NamespacedKey innerKey = new NamespacedKey("plugin-a", "inner");
 
-        ItemMeta meta = createNewItemMeta();
+        ItemMeta meta = this.createNewItemMeta();
         ItemTagAdapterContext context = meta.getCustomTagContainer().getAdapterContext();
 
         CustomItemTagContainer thirdContainer = context.newTagContainer();
-        thirdContainer.setCustomTag(VALID_KEY, ItemTagType.LONG, 3L);
+        thirdContainer.setCustomTag(DeprecatedItemMetaCustomValueTest.VALID_KEY, ItemTagType.LONG, 3L);
 
         CustomItemTagContainer secondContainer = context.newTagContainer();
-        secondContainer.setCustomTag(VALID_KEY, ItemTagType.LONG, 2L);
+        secondContainer.setCustomTag(DeprecatedItemMetaCustomValueTest.VALID_KEY, ItemTagType.LONG, 2L);
         secondContainer.setCustomTag(innerKey, ItemTagType.TAG_CONTAINER, thirdContainer);
 
-        meta.getCustomTagContainer().setCustomTag(VALID_KEY, ItemTagType.LONG, 1L);
+        meta.getCustomTagContainer().setCustomTag(DeprecatedItemMetaCustomValueTest.VALID_KEY, ItemTagType.LONG, 1L);
         meta.getCustomTagContainer().setCustomTag(innerKey, ItemTagType.TAG_CONTAINER, secondContainer);
 
         assertEquals(3L, meta.getCustomTagContainer()
                 .getCustomTag(innerKey, ItemTagType.TAG_CONTAINER)
                 .getCustomTag(innerKey, ItemTagType.TAG_CONTAINER)
-                .getCustomTag(VALID_KEY, ItemTagType.LONG).longValue());
+                .getCustomTag(DeprecatedItemMetaCustomValueTest.VALID_KEY, ItemTagType.LONG).longValue());
 
         assertEquals(2L, meta.getCustomTagContainer()
                 .getCustomTag(innerKey, ItemTagType.TAG_CONTAINER)
-                .getCustomTag(VALID_KEY, ItemTagType.LONG).longValue());
+                .getCustomTag(DeprecatedItemMetaCustomValueTest.VALID_KEY, ItemTagType.LONG).longValue());
 
         assertEquals(1L, meta.getCustomTagContainer()
-                .getCustomTag(VALID_KEY, ItemTagType.LONG).longValue());
+                .getCustomTag(DeprecatedItemMetaCustomValueTest.VALID_KEY, ItemTagType.LONG).longValue());
     }
 
     class UUIDItemTagType implements ItemTagType<byte[], UUID> {
@@ -240,24 +240,24 @@ public class DeprecatedItemMetaCustomValueTest {
 
     @Test
     public void testPrimitiveCustomTags() {
-        ItemMeta itemMeta = createNewItemMeta();
+        ItemMeta itemMeta = this.createNewItemMeta();
 
-        testPrimitiveCustomTag(itemMeta, ItemTagType.BYTE, (byte) 1);
-        testPrimitiveCustomTag(itemMeta, ItemTagType.SHORT, (short) 1);
-        testPrimitiveCustomTag(itemMeta, ItemTagType.INTEGER, 1);
-        testPrimitiveCustomTag(itemMeta, ItemTagType.LONG, 1L);
-        testPrimitiveCustomTag(itemMeta, ItemTagType.FLOAT, 1.34F);
-        testPrimitiveCustomTag(itemMeta, ItemTagType.DOUBLE, 151.123);
+        this.testPrimitiveCustomTag(itemMeta, ItemTagType.BYTE, (byte) 1);
+        this.testPrimitiveCustomTag(itemMeta, ItemTagType.SHORT, (short) 1);
+        this.testPrimitiveCustomTag(itemMeta, ItemTagType.INTEGER, 1);
+        this.testPrimitiveCustomTag(itemMeta, ItemTagType.LONG, 1L);
+        this.testPrimitiveCustomTag(itemMeta, ItemTagType.FLOAT, 1.34F);
+        this.testPrimitiveCustomTag(itemMeta, ItemTagType.DOUBLE, 151.123);
 
-        testPrimitiveCustomTag(itemMeta, ItemTagType.STRING, "test");
+        this.testPrimitiveCustomTag(itemMeta, ItemTagType.STRING, "test");
 
-        testPrimitiveCustomTag(itemMeta, ItemTagType.BYTE_ARRAY, new byte[]{
+        this.testPrimitiveCustomTag(itemMeta, ItemTagType.BYTE_ARRAY, new byte[]{
             1, 4, 2, Byte.MAX_VALUE
         });
-        testPrimitiveCustomTag(itemMeta, ItemTagType.INTEGER_ARRAY, new int[]{
+        this.testPrimitiveCustomTag(itemMeta, ItemTagType.INTEGER_ARRAY, new int[]{
             1, 4, 2, Integer.MAX_VALUE
         });
-        testPrimitiveCustomTag(itemMeta, ItemTagType.LONG_ARRAY, new long[]{
+        this.testPrimitiveCustomTag(itemMeta, ItemTagType.LONG_ARRAY, new long[]{
             1L, 4L, 2L, Long.MAX_VALUE
         });
     }
@@ -293,12 +293,12 @@ public class DeprecatedItemMetaCustomValueTest {
 
         @Override
         public Class<T> getPrimitiveType() {
-            return primitiveType;
+            return this.primitiveType;
         }
 
         @Override
         public Class<T> getComplexType() {
-            return primitiveType;
+            return this.primitiveType;
         }
 
         @Override
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/FactoryItemMaterialTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/FactoryItemMaterialTest.java
index e1acc65b7c..de26adfde6 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/FactoryItemMaterialTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/FactoryItemMaterialTest.java
@@ -39,14 +39,14 @@ public class FactoryItemMaterialTest {
 
     static String name(Enum<?> from, Enum<?> to) {
         if (from.getClass() == to.getClass()) {
-            return buffer.delete(0, Integer.MAX_VALUE).append(from.getClass().getName()).append(' ').append(from.name()).append(" to ").append(to.name()).toString();
+            return FactoryItemMaterialTest.buffer.delete(0, Integer.MAX_VALUE).append(from.getClass().getName()).append(' ').append(from.name()).append(" to ").append(to.name()).toString();
         }
-        return buffer.delete(0, Integer.MAX_VALUE).append(from.getClass().getName()).append('(').append(from.name()).append(") to ").append(to.getClass().getName()).append('(').append(to.name()).append(')').toString();
+        return FactoryItemMaterialTest.buffer.delete(0, Integer.MAX_VALUE).append(from.getClass().getName()).append('(').append(from.name()).append(") to ").append(to.getClass().getName()).append('(').append(to.name()).append(')').toString();
     }
 
     public static Stream<Arguments> data() {
         List<Arguments> list = new ArrayList<>();
-        for (Material material : materials) {
+        for (Material material : FactoryItemMaterialTest.materials) {
             list.add(Arguments.of(material));
         }
         return list.stream();
@@ -57,27 +57,27 @@ public class FactoryItemMaterialTest {
     public void itemStack(Material material) {
         ItemStack bukkitStack = new ItemStack(material);
         CraftItemStack craftStack = CraftItemStack.asCraftCopy(bukkitStack);
-        ItemMeta meta = factory.getItemMeta(material);
+        ItemMeta meta = FactoryItemMaterialTest.factory.getItemMeta(material);
         if (meta == null) {
             assertThat(material, is(Material.AIR));
         } else {
-            assertTrue(factory.isApplicable(meta, bukkitStack));
-            assertTrue(factory.isApplicable(meta, craftStack));
+            assertTrue(FactoryItemMaterialTest.factory.isApplicable(meta, bukkitStack));
+            assertTrue(FactoryItemMaterialTest.factory.isApplicable(meta, craftStack));
         }
     }
 
     @ParameterizedTest
     @MethodSource("data")
     public void generalCase(Material material) {
-        CraftMetaItem meta = (CraftMetaItem) factory.getItemMeta(material);
+        CraftMetaItem meta = (CraftMetaItem) FactoryItemMaterialTest.factory.getItemMeta(material);
         if (meta == null) {
             assertThat(material, is(Material.AIR));
         } else {
-            assertTrue(factory.isApplicable(meta, material));
+            assertTrue(FactoryItemMaterialTest.factory.isApplicable(meta, material));
             assertTrue(meta.applicableTo(material));
 
             meta = meta.clone();
-            assertTrue(factory.isApplicable(meta, material));
+            assertTrue(FactoryItemMaterialTest.factory.isApplicable(meta, material));
             assertTrue(meta.applicableTo(material));
         }
     }
@@ -85,27 +85,27 @@ public class FactoryItemMaterialTest {
     @ParameterizedTest
     @MethodSource("data")
     public void asMetaFor(Material material) {
-        final CraftMetaItem baseMeta = (CraftMetaItem) factory.getItemMeta(material);
+        final CraftMetaItem baseMeta = (CraftMetaItem) FactoryItemMaterialTest.factory.getItemMeta(material);
         if (baseMeta == null) {
             assertThat(material, is(Material.AIR));
             return;
         }
 
-        for (Material other : materials) {
+        for (Material other : FactoryItemMaterialTest.materials) {
             final ItemStack bukkitStack = new ItemStack(other);
             final CraftItemStack craftStack = CraftItemStack.asCraftCopy(bukkitStack);
-            final CraftMetaItem otherMeta = (CraftMetaItem) factory.asMetaFor(baseMeta, other);
+            final CraftMetaItem otherMeta = (CraftMetaItem) FactoryItemMaterialTest.factory.asMetaFor(baseMeta, other);
 
-            final String testName = name(material, other);
+            final String testName = FactoryItemMaterialTest.name(material, other);
 
             if (otherMeta == null) {
                 assertThat(other, is(Material.AIR), testName);
                 continue;
             }
 
-            assertTrue(factory.isApplicable(otherMeta, craftStack), testName);
-            assertTrue(factory.isApplicable(otherMeta, bukkitStack), testName);
-            assertTrue(factory.isApplicable(otherMeta, other), testName);
+            assertTrue(FactoryItemMaterialTest.factory.isApplicable(otherMeta, craftStack), testName);
+            assertTrue(FactoryItemMaterialTest.factory.isApplicable(otherMeta, bukkitStack), testName);
+            assertTrue(FactoryItemMaterialTest.factory.isApplicable(otherMeta, other), testName);
             assertTrue(otherMeta.applicableTo(other), testName);
         }
     }
@@ -116,7 +116,7 @@ public class FactoryItemMaterialTest {
         if (material == Material.AIR) {
             return;
         }
-        final CraftMetaItem baseMeta = (CraftMetaItem) factory.getItemMeta(material);
+        final CraftMetaItem baseMeta = (CraftMetaItem) FactoryItemMaterialTest.factory.getItemMeta(material);
         final CraftMetaItem baseMetaClone = baseMeta.clone();
 
         final ItemStack baseMetaStack = new ItemStack(material);
@@ -124,29 +124,29 @@ public class FactoryItemMaterialTest {
 
         assertThat(baseMeta, is(not(sameInstance(baseMetaStack.getItemMeta()))));
 
-        assertTrue(factory.equals(baseMeta, null));
-        assertTrue(factory.equals(null, baseMeta));
+        assertTrue(FactoryItemMaterialTest.factory.equals(baseMeta, null));
+        assertTrue(FactoryItemMaterialTest.factory.equals(null, baseMeta));
 
-        assertTrue(factory.equals(baseMeta, baseMetaClone));
-        assertTrue(factory.equals(baseMetaClone, baseMeta));
+        assertTrue(FactoryItemMaterialTest.factory.equals(baseMeta, baseMetaClone));
+        assertTrue(FactoryItemMaterialTest.factory.equals(baseMetaClone, baseMeta));
 
         assertThat(baseMeta, is(not(sameInstance(baseMetaClone))));
 
         assertThat(baseMeta, is(baseMetaClone));
         assertThat(baseMetaClone, is(baseMeta));
 
-        for (Material other : materials) {
-            final String testName = name(material, other);
+        for (Material other : FactoryItemMaterialTest.materials) {
+            final String testName = FactoryItemMaterialTest.name(material, other);
 
-            final CraftMetaItem otherMeta = (CraftMetaItem) factory.asMetaFor(baseMetaClone, other);
+            final CraftMetaItem otherMeta = (CraftMetaItem) FactoryItemMaterialTest.factory.asMetaFor(baseMetaClone, other);
 
             if (otherMeta == null) {
                 assertThat(other, is(Material.AIR), testName);
                 continue;
             }
 
-            assertTrue(factory.equals(baseMeta, otherMeta), testName);
-            assertTrue(factory.equals(otherMeta, baseMeta), testName);
+            assertTrue(FactoryItemMaterialTest.factory.equals(baseMeta, otherMeta), testName);
+            assertTrue(FactoryItemMaterialTest.factory.equals(otherMeta, baseMeta), testName);
 
             assertThat(baseMeta, is(otherMeta), testName);
             assertThat(otherMeta, is(baseMeta), testName);
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaImplementationOverrideTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaImplementationOverrideTest.java
index 8fe33fccea..9fe9caf40c 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaImplementationOverrideTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaImplementationOverrideTest.java
@@ -24,15 +24,15 @@ public class ItemMetaImplementationOverrideTest {
         List<Class<? extends CraftMetaItem>> classes = new ArrayList<Class<? extends CraftMetaItem>>();
 
         for (Material material : ItemStackTest.COMPOUND_MATERIALS) {
-            Class<? extends CraftMetaItem> clazz = CraftItemFactory.instance().getItemMeta(material).getClass().asSubclass(parent);
-            if (clazz != parent) {
+            Class<? extends CraftMetaItem> clazz = CraftItemFactory.instance().getItemMeta(material).getClass().asSubclass(ItemMetaImplementationOverrideTest.parent);
+            if (clazz != ItemMetaImplementationOverrideTest.parent) {
                 classes.add(clazz);
             }
         }
 
         List<Method> list = new ArrayList<Method>();
 
-        for (Method method: parent.getDeclaredMethods()) {
+        for (Method method: ItemMetaImplementationOverrideTest.parent.getDeclaredMethods()) {
             if (method.isAnnotationPresent(Overridden.class)) {
                 list.add(method);
             }
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
index 840be1d4a5..debab9859e 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemMetaTest.java
@@ -8,12 +8,12 @@ import java.util.Arrays;
 import java.util.List;
 import java.util.UUID;
 import net.minecraft.core.registries.BuiltInRegistries;
-import net.minecraft.nbt.NBTTagCompound;
+import net.minecraft.nbt.CompoundTag;
+import net.minecraft.world.item.BlockItem;
 import net.minecraft.world.item.Item;
-import net.minecraft.world.item.ItemBlock;
-import net.minecraft.world.item.ItemBlockWallable;
+import net.minecraft.world.item.StandingAndWallBlockItem;
 import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.block.ITileEntity;
+import net.minecraft.world.level.block.EntityBlock;
 import org.bukkit.Bukkit;
 import org.bukkit.Color;
 import org.bukkit.DyeColor;
@@ -91,8 +91,8 @@ public class ItemMetaTest {
 
     @Test
     public void testPowers() {
-        for (int i = 0; i <= MAX_FIREWORK_POWER; i++) {
-            FireworkMeta firework = newFireworkMeta();
+        for (int i = 0; i <= ItemMetaTest.MAX_FIREWORK_POWER; i++) {
+            FireworkMeta firework = ItemMetaTest.newFireworkMeta();
             firework.setPower(i);
             assertThat(firework.getPower(), is(i), String.valueOf(i));
         }
@@ -162,11 +162,11 @@ public class ItemMetaTest {
         List<Block> queue = new ArrayList<>();
 
         for (Item item : BuiltInRegistries.ITEM) {
-            if (item instanceof ItemBlock) {
-                queue.add(((ItemBlock) item).getBlock());
+            if (item instanceof BlockItem) {
+                queue.add(((BlockItem) item).getBlock());
             }
-            if (item instanceof ItemBlockWallable) {
-                queue.add(((ItemBlockWallable) item).wallBlock);
+            if (item instanceof StandingAndWallBlockItem) {
+                queue.add(((StandingAndWallBlockItem) item).wallBlock);
             }
         }
 
@@ -180,7 +180,7 @@ public class ItemMetaTest {
                 }
 
                 ItemMeta meta = stack.getItemMeta();
-                if (block instanceof ITileEntity) {
+                if (block instanceof EntityBlock) {
                     assertTrue(meta instanceof BlockStateMeta, stack + " has meta of type " + meta + " expected BlockStateMeta");
 
                     BlockStateMeta blockState = (BlockStateMeta) meta;
@@ -197,7 +197,7 @@ public class ItemMetaTest {
     @Test
     public void testSpawnEggsHasMeta() {
         for (Item item : BuiltInRegistries.ITEM) {
-            if (item instanceof net.minecraft.world.item.ItemMonsterEgg) {
+            if (item instanceof net.minecraft.world.item.SpawnEggItem) {
                 Material material = CraftItemType.minecraftToBukkit(item);
                 CraftMetaItem baseMeta = (CraftMetaItem) Bukkit.getItemFactory().getItemMeta(material);
                 ItemMeta baseMetaItem = CraftItemStack.getItemMeta(item.getDefaultInstance());
@@ -363,7 +363,7 @@ public class ItemMetaTest {
             new StackProvider(Material.ARMOR_STAND) {
                 @Override ItemStack operate(ItemStack cleanStack) {
                     final CraftMetaArmorStand meta = (CraftMetaArmorStand) cleanStack.getItemMeta();
-                    meta.entityTag = new NBTTagCompound();
+                    meta.entityTag = new CompoundTag();
                     meta.entityTag.putBoolean("Small", true);
                     cleanStack.setItemMeta(meta);
                     return cleanStack;
@@ -380,7 +380,7 @@ public class ItemMetaTest {
             new StackProvider(Material.ITEM_FRAME) {
                 @Override ItemStack operate(ItemStack cleanStack) {
                     final CraftMetaEntityTag meta = ((CraftMetaEntityTag) cleanStack.getItemMeta());
-                    meta.entityTag = new NBTTagCompound();
+                    meta.entityTag = new CompoundTag();
                     meta.entityTag.putBoolean("Invisible", true);
                     cleanStack.setItemMeta(meta);
                     return cleanStack;
@@ -431,8 +431,8 @@ public class ItemMetaTest {
         assertThat(providers, hasSize(ItemStackTest.COMPOUND_MATERIALS.length - 4/* Normal item meta, skulls, eggs and tile entities */), "Forgotten test?");
 
         for (final StackProvider provider : providers) {
-            downCastTest(new BukkitWrapper(provider));
-            downCastTest(new CraftWrapper(provider));
+            this.downCastTest(new BukkitWrapper(provider));
+            this.downCastTest(new CraftWrapper(provider));
         }
     }
 
@@ -495,13 +495,13 @@ public class ItemMetaTest {
         assertThat(provider.stack(), is(provider.stack()), name);
         assertThat(provider.stack().isSimilar(provider.stack()), is(true), name);
 
-        downCastTest(name, provider.stack(), blank);
+        this.downCastTest(name, provider.stack(), blank);
         blank.setItemMeta(blank.getItemMeta());
-        downCastTest(name, provider.stack(), blank);
+        this.downCastTest(name, provider.stack(), blank);
 
-        downCastTest(name, provider.stack(), craftBlank);
+        this.downCastTest(name, provider.stack(), craftBlank);
         craftBlank.setItemMeta(craftBlank.getItemMeta());
-        downCastTest(name, provider.stack(), craftBlank);
+        this.downCastTest(name, provider.stack(), craftBlank);
     }
 
     private void downCastTest(final String name, final ItemStack stack, final ItemStack blank) {
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackBookTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackBookTest.java
index 7790a2e018..75ed5a5edf 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackBookTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackBookTest.java
@@ -12,7 +12,7 @@ import org.junit.jupiter.params.provider.Arguments;
 public class ItemStackBookTest extends ItemStackTest {
 
     public static Stream<Arguments> data() {
-        return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, Material.WRITTEN_BOOK, Material.WRITABLE_BOOK);
+        return StackProvider.compound(ItemStackBookTest.operators(), "%s %s", NAME_PARAMETER, Material.WRITTEN_BOOK, Material.WRITABLE_BOOK);
     }
 
     @SuppressWarnings("unchecked")
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackEnchantStorageTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackEnchantStorageTest.java
index a8fc0a40b0..b070fb569d 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackEnchantStorageTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackEnchantStorageTest.java
@@ -13,7 +13,7 @@ import org.junit.jupiter.params.provider.Arguments;
 public class ItemStackEnchantStorageTest extends ItemStackTest {
 
     public static Stream<Arguments> data() {
-        return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, Material.ENCHANTED_BOOK);
+        return StackProvider.compound(ItemStackEnchantStorageTest.operators(), "%s %s", NAME_PARAMETER, Material.ENCHANTED_BOOK);
     }
 
     @SuppressWarnings("unchecked")
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkChargeTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkChargeTest.java
index bba4089da2..66814f8d05 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkChargeTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkChargeTest.java
@@ -15,7 +15,7 @@ import org.junit.jupiter.params.provider.Arguments;
 public class ItemStackFireworkChargeTest extends ItemStackTest {
 
     public static Stream<Arguments> data() {
-        return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, Material.FIREWORK_STAR);
+        return StackProvider.compound(ItemStackFireworkChargeTest.operators(), "%s %s", NAME_PARAMETER, Material.FIREWORK_STAR);
     }
 
     @SuppressWarnings("unchecked")
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkTest.java
index 1b18e38ceb..53082e3092 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackFireworkTest.java
@@ -15,7 +15,7 @@ import org.junit.jupiter.params.provider.Arguments;
 public class ItemStackFireworkTest extends ItemStackTest {
 
     public static Stream<Arguments> data() {
-        return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, Material.FIREWORK_ROCKET);
+        return StackProvider.compound(ItemStackFireworkTest.operators(), "%s %s", NAME_PARAMETER, Material.FIREWORK_ROCKET);
     }
 
     @SuppressWarnings("unchecked")
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLeatherTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLeatherTest.java
index 6f9efb3d8f..5ad5b63cc9 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLeatherTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLeatherTest.java
@@ -13,7 +13,7 @@ import org.junit.jupiter.params.provider.Arguments;
 public class ItemStackLeatherTest extends ItemStackTest {
 
     public static Stream<Arguments> data() {
-        return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, Material.LEATHER_BOOTS, Material.LEATHER_CHESTPLATE, Material.LEATHER_HELMET, Material.LEATHER_LEGGINGS);
+        return StackProvider.compound(ItemStackLeatherTest.operators(), "%s %s", NAME_PARAMETER, Material.LEATHER_BOOTS, Material.LEATHER_CHESTPLATE, Material.LEATHER_HELMET, Material.LEATHER_LEGGINGS);
     }
 
     @SuppressWarnings("unchecked")
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLoreEnchantmentTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLoreEnchantmentTest.java
index c9c42a7643..f199bf6b99 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLoreEnchantmentTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackLoreEnchantmentTest.java
@@ -13,7 +13,7 @@ import org.junit.jupiter.params.provider.Arguments;
 public class ItemStackLoreEnchantmentTest extends ItemStackTest {
 
     public static Stream<Arguments> data() {
-        return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, ItemStackTest.COMPOUND_MATERIALS);
+        return StackProvider.compound(ItemStackLoreEnchantmentTest.operators(), "%s %s", NAME_PARAMETER, ItemStackTest.COMPOUND_MATERIALS);
     }
 
     @SuppressWarnings("unchecked")
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackMapTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackMapTest.java
index 184171656f..10001c7f51 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackMapTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackMapTest.java
@@ -12,7 +12,7 @@ import org.junit.jupiter.params.provider.Arguments;
 public class ItemStackMapTest extends ItemStackTest {
 
     public static Stream<Arguments> data() {
-        return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, Material.FILLED_MAP);
+        return StackProvider.compound(ItemStackMapTest.operators(), "%s %s", NAME_PARAMETER, Material.FILLED_MAP);
     }
 
     @SuppressWarnings("unchecked")
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackPotionsTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackPotionsTest.java
index 549ac35587..aaea7bc006 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackPotionsTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackPotionsTest.java
@@ -13,7 +13,7 @@ import org.junit.jupiter.params.provider.Arguments;
 public class ItemStackPotionsTest extends ItemStackTest {
 
     public static Stream<Arguments> data() {
-        return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, Material.POTION);
+        return StackProvider.compound(ItemStackPotionsTest.operators(), "%s %s", NAME_PARAMETER, Material.POTION);
     }
 
     @SuppressWarnings("unchecked")
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackSkullTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackSkullTest.java
index fff48e4403..7ab71e0e38 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackSkullTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackSkullTest.java
@@ -12,7 +12,7 @@ import org.junit.jupiter.params.provider.Arguments;
 public class ItemStackSkullTest extends ItemStackTest {
 
     public static Stream<Arguments> data() {
-        return StackProvider.compound(operators(), "%s %s", NAME_PARAMETER, Material.PLAYER_HEAD);
+        return StackProvider.compound(ItemStackSkullTest.operators(), "%s %s", NAME_PARAMETER, Material.PLAYER_HEAD);
     }
 
     @SuppressWarnings("unchecked")
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackTest.java
index 5d5479ec0d..1d4d573a78 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/ItemStackTest.java
@@ -39,11 +39,11 @@ public class ItemStackTest {
         }
 
         ItemStack bukkit() {
-            return operate(cleanStack(material, false));
+            return this.operate(StackProvider.cleanStack(this.material, false));
         }
 
         ItemStack craft() {
-            return operate(cleanStack(material, true));
+            return this.operate(StackProvider.cleanStack(this.material, true));
         }
 
         abstract ItemStack operate(ItemStack cleanStack);
@@ -55,7 +55,7 @@ public class ItemStackTest {
 
         @Override
         public String toString() {
-            return material.toString();
+            return this.material.toString();
         }
 
         /**
@@ -124,7 +124,7 @@ public class ItemStackTest {
 
         @Override
         public ItemStack operate(ItemStack cleanStack) {
-            for (Operator operator : operators) {
+            for (Operator operator : this.operators) {
                 operator.operate(cleanStack);
             }
             return cleanStack;
@@ -132,7 +132,7 @@ public class ItemStackTest {
 
         @Override
         public String toString() {
-            return Arrays.toString(operators);
+            return Arrays.toString(this.operators);
         }
 
 
@@ -162,7 +162,7 @@ public class ItemStackTest {
 
             for (final List<Object[]> primarySingleton : singletons) {
                 // Iterate over our singletons, to multiply the 'out' each time
-                for (final Object[] entry : out.toArray(EMPTY_ARRAY)) {
+                for (final Object[] entry : out.toArray(ItemStackTest.EMPTY_ARRAY)) {
                     // Iterate over a snapshot of 'out' to prevent CMEs / infinite iteration
                     final int len = entry.length;
                     for (final Object[] singleton : primarySingleton) {
@@ -196,7 +196,7 @@ public class ItemStackTest {
 
             final RecursiveContainer methodParams = new RecursiveContainer(joiner, new Object[lists.length], nameParameter, new ArrayList<Object[]>(lists.length), new ArrayList<Object[]>(), lists);
 
-            recursivelyCompound(methodParams, 0);
+            CompoundOperator.recursivelyCompound(methodParams, 0);
             methodParams.out.addAll(out);
 
             return methodParams.out;
@@ -239,7 +239,7 @@ public class ItemStackTest {
 
                 for (final Object[] params : methodParams.lists[level]) {
                     stack.add(params);
-                    recursivelyCompound(methodParams, level + 1);
+                    CompoundOperator.recursivelyCompound(methodParams, level + 1);
                     stack.remove(marker);
                 }
             }
@@ -259,12 +259,12 @@ public class ItemStackTest {
 
         @Override
         public ItemStack stack() {
-            return provider.craft();
+            return this.provider.craft();
         }
 
         @Override
         public String toString() {
-            return "Craft " + provider;
+            return "Craft " + this.provider;
         }
     }
 
@@ -277,12 +277,12 @@ public class ItemStackTest {
 
         @Override
         public ItemStack stack() {
-            return provider.bukkit();
+            return this.provider.bukkit();
         }
 
         @Override
         public String toString() {
-            return "Bukkit " + provider;
+            return "Bukkit " + this.provider;
         }
     }
 
@@ -327,7 +327,7 @@ public class ItemStackTest {
         COMPOUND_MATERIALS = possibleMaterials.values().toArray(new Material[possibleMaterials.size()]);
     }
 
-    @ParameterizedTest(name = "[{index}]:{" + NAME_PARAMETER + "}")
+    @ParameterizedTest(name = "[{index}]:{" + ItemStackTest.NAME_PARAMETER + "}")
     @MethodSource({"data",
             "org.bukkit.craftbukkit.inventory.ItemStackSkullTest#data",
             "org.bukkit.craftbukkit.inventory.ItemStackPotionsTest#data",
@@ -341,11 +341,11 @@ public class ItemStackTest {
     })
     public void testBukkitInequality(StackProvider provider, StackProvider unequalProvider, String name) {
         final StackWrapper bukkitWrapper = new CraftWrapper(provider);
-        testInequality(bukkitWrapper, new BukkitWrapper(unequalProvider));
-        testInequality(bukkitWrapper, new BukkitWrapper(new NoOpProvider(provider.material)));
+        ItemStackTest.testInequality(bukkitWrapper, new BukkitWrapper(unequalProvider));
+        ItemStackTest.testInequality(bukkitWrapper, new BukkitWrapper(new NoOpProvider(provider.material)));
     }
 
-    @ParameterizedTest(name = "[{index}]:{" + NAME_PARAMETER + "}")
+    @ParameterizedTest(name = "[{index}]:{" + ItemStackTest.NAME_PARAMETER + "}")
     @MethodSource({"data",
             "org.bukkit.craftbukkit.inventory.ItemStackSkullTest#data",
             "org.bukkit.craftbukkit.inventory.ItemStackPotionsTest#data",
@@ -359,11 +359,11 @@ public class ItemStackTest {
     })
     public void testCraftInequality(StackProvider provider, StackProvider unequalProvider, String name) {
         final StackWrapper craftWrapper = new CraftWrapper(provider);
-        testInequality(craftWrapper, new CraftWrapper(unequalProvider));
-        testInequality(craftWrapper, new CraftWrapper(new NoOpProvider(provider.material)));
+        ItemStackTest.testInequality(craftWrapper, new CraftWrapper(unequalProvider));
+        ItemStackTest.testInequality(craftWrapper, new CraftWrapper(new NoOpProvider(provider.material)));
     }
 
-    @ParameterizedTest(name = "[{index}]:{" + NAME_PARAMETER + "}")
+    @ParameterizedTest(name = "[{index}]:{" + ItemStackTest.NAME_PARAMETER + "}")
     @MethodSource({"data",
             "org.bukkit.craftbukkit.inventory.ItemStackSkullTest#data",
             "org.bukkit.craftbukkit.inventory.ItemStackPotionsTest#data",
@@ -377,12 +377,12 @@ public class ItemStackTest {
     })
     public void testMixedInequality(StackProvider provider, StackProvider unequalProvider, String name) {
         final StackWrapper craftWrapper = new CraftWrapper(provider);
-        testInequality(craftWrapper, new BukkitWrapper(unequalProvider));
-        testInequality(craftWrapper, new BukkitWrapper(new NoOpProvider(provider.material)));
+        ItemStackTest.testInequality(craftWrapper, new BukkitWrapper(unequalProvider));
+        ItemStackTest.testInequality(craftWrapper, new BukkitWrapper(new NoOpProvider(provider.material)));
 
         final StackWrapper bukkitWrapper = new CraftWrapper(provider);
-        testInequality(bukkitWrapper, new CraftWrapper(unequalProvider));
-        testInequality(bukkitWrapper, new CraftWrapper(new NoOpProvider(provider.material)));
+        ItemStackTest.testInequality(bukkitWrapper, new CraftWrapper(unequalProvider));
+        ItemStackTest.testInequality(bukkitWrapper, new CraftWrapper(new NoOpProvider(provider.material)));
     }
 
     static void testInequality(StackWrapper provider, StackWrapper unequalProvider) {
@@ -426,7 +426,7 @@ public class ItemStackTest {
         assertThat(newUnequalCraftStack.getItemMeta(), is(not(stack.getItemMeta())));
     }
 
-    @ParameterizedTest(name = "[{index}]:{" + NAME_PARAMETER + "}")
+    @ParameterizedTest(name = "[{index}]:{" + ItemStackTest.NAME_PARAMETER + "}")
     @MethodSource({"data",
             "org.bukkit.craftbukkit.inventory.ItemStackSkullTest#data",
             "org.bukkit.craftbukkit.inventory.ItemStackPotionsTest#data",
@@ -439,10 +439,10 @@ public class ItemStackTest {
             "org.bukkit.craftbukkit.inventory.ItemStackBookTest#data"
     })
     public void testBukkitYamlDeserialize(StackProvider provider, StackProvider unequalProvider, String name) throws Throwable {
-        testYamlDeserialize(new BukkitWrapper(provider), new BukkitWrapper(unequalProvider));
+        ItemStackTest.testYamlDeserialize(new BukkitWrapper(provider), new BukkitWrapper(unequalProvider));
     }
 
-    @ParameterizedTest(name = "[{index}]:{" + NAME_PARAMETER + "}")
+    @ParameterizedTest(name = "[{index}]:{" + ItemStackTest.NAME_PARAMETER + "}")
     @MethodSource({"data",
             "org.bukkit.craftbukkit.inventory.ItemStackSkullTest#data",
             "org.bukkit.craftbukkit.inventory.ItemStackPotionsTest#data",
@@ -455,10 +455,10 @@ public class ItemStackTest {
             "org.bukkit.craftbukkit.inventory.ItemStackBookTest#data"
     })
     public void testCraftYamlDeserialize(StackProvider provider, StackProvider unequalProvider, String name) throws Throwable {
-        testYamlDeserialize(new CraftWrapper(provider), new CraftWrapper(unequalProvider));
+        ItemStackTest.testYamlDeserialize(new CraftWrapper(provider), new CraftWrapper(unequalProvider));
     }
 
-    @ParameterizedTest(name = "[{index}]:{" + NAME_PARAMETER + "}")
+    @ParameterizedTest(name = "[{index}]:{" + ItemStackTest.NAME_PARAMETER + "}")
     @MethodSource({"data",
             "org.bukkit.craftbukkit.inventory.ItemStackSkullTest#data",
             "org.bukkit.craftbukkit.inventory.ItemStackPotionsTest#data",
@@ -471,10 +471,10 @@ public class ItemStackTest {
             "org.bukkit.craftbukkit.inventory.ItemStackBookTest#data"
     })
     public void testBukkitStreamDeserialize(StackProvider provider, StackProvider unequalProvider, String name) throws Throwable {
-        testStreamDeserialize(new BukkitWrapper(provider), new BukkitWrapper(unequalProvider));
+        ItemStackTest.testStreamDeserialize(new BukkitWrapper(provider), new BukkitWrapper(unequalProvider));
     }
 
-    @ParameterizedTest(name = "[{index}]:{" + NAME_PARAMETER + "}")
+    @ParameterizedTest(name = "[{index}]:{" + ItemStackTest.NAME_PARAMETER + "}")
     @MethodSource({"data",
             "org.bukkit.craftbukkit.inventory.ItemStackSkullTest#data",
             "org.bukkit.craftbukkit.inventory.ItemStackPotionsTest#data",
@@ -487,7 +487,7 @@ public class ItemStackTest {
             "org.bukkit.craftbukkit.inventory.ItemStackBookTest#data"
     })
     public void testCraftStreamDeserialize(StackProvider provider, StackProvider unequalProvider, String name) throws Throwable {
-        testStreamDeserialize(new CraftWrapper(provider), new CraftWrapper(unequalProvider));
+        ItemStackTest.testStreamDeserialize(new CraftWrapper(provider), new CraftWrapper(unequalProvider));
     }
 
     static void testStreamDeserialize(StackWrapper provider, StackWrapper unequalProvider) throws Throwable {
@@ -532,7 +532,7 @@ public class ItemStackTest {
             }
         }
 
-        testEqualities(data, readFirst, readSecond, stack, unequalStack);
+        ItemStackTest.testEqualities(data, readFirst, readSecond, stack, unequalStack);
     }
 
     static void testYamlDeserialize(StackWrapper provider, StackWrapper unequalProvider) {
@@ -552,7 +552,7 @@ public class ItemStackTest {
             throw new RuntimeException(out, ex);
         }
 
-        testEqualities(out, configIn.getItemStack("provider"), configIn.getItemStack("unequal"), stack, unequalStack);
+        ItemStackTest.testEqualities(out, configIn.getItemStack("provider"), configIn.getItemStack("unequal"), stack, unequalStack);
     }
 
     static void testEqualities(String information, ItemStack primaryRead, ItemStack unequalRead, ItemStack primaryOriginal, ItemStack unequalOriginal) {
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/PersistentDataContainerTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/PersistentDataContainerTest.java
index fa643518d5..5b16e6f5e5 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/PersistentDataContainerTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/PersistentDataContainerTest.java
@@ -40,43 +40,43 @@ public class PersistentDataContainerTest {
 
     @BeforeAll
     public static void setup() {
-        VALID_KEY = new NamespacedKey("test", "validkey");
+        PersistentDataContainerTest.VALID_KEY = new NamespacedKey("test", "validkey");
     }
 
     // Sets a test
     @Test
     public void testSetNoAdapter() {
-        ItemMeta itemMeta = createNewItemMeta();
+        ItemMeta itemMeta = PersistentDataContainerTest.createNewItemMeta();
         assertThrows(IllegalArgumentException.class, () -> itemMeta.getPersistentDataContainer().set(VALID_KEY, new PrimitiveTagType<>(boolean.class), true));
     }
 
     // Contains a tag
     @Test
     public void testHasNoAdapter() {
-        ItemMeta itemMeta = createNewItemMeta();
-        itemMeta.getPersistentDataContainer().set(VALID_KEY, PersistentDataType.INTEGER, 1); // We gotta set this so we at least try to compare it
+        ItemMeta itemMeta = PersistentDataContainerTest.createNewItemMeta();
+        itemMeta.getPersistentDataContainer().set(PersistentDataContainerTest.VALID_KEY, PersistentDataType.INTEGER, 1); // We gotta set this so we at least try to compare it
         assertThrows(IllegalArgumentException.class, () -> itemMeta.getPersistentDataContainer().has(VALID_KEY, new PrimitiveTagType<>(boolean.class)));
     }
 
     @Test
     public void testHasNoType() {
-        ItemMeta itemMeta = createNewItemMeta();
-        itemMeta.getPersistentDataContainer().set(VALID_KEY, PersistentDataType.INTEGER, 1); // We gotta set this so we at least try to compare it
-        assertTrue(itemMeta.getPersistentDataContainer().has(VALID_KEY));
+        ItemMeta itemMeta = PersistentDataContainerTest.createNewItemMeta();
+        itemMeta.getPersistentDataContainer().set(PersistentDataContainerTest.VALID_KEY, PersistentDataType.INTEGER, 1); // We gotta set this so we at least try to compare it
+        assertTrue(itemMeta.getPersistentDataContainer().has(PersistentDataContainerTest.VALID_KEY));
     }
 
     // Getting a tag
     @Test
     public void testGetNoAdapter() {
-        ItemMeta itemMeta = createNewItemMeta();
-        itemMeta.getPersistentDataContainer().set(VALID_KEY, PersistentDataType.INTEGER, 1); //We gotta set this so we at least try to compare it
+        ItemMeta itemMeta = PersistentDataContainerTest.createNewItemMeta();
+        itemMeta.getPersistentDataContainer().set(PersistentDataContainerTest.VALID_KEY, PersistentDataType.INTEGER, 1); //We gotta set this so we at least try to compare it
         assertThrows(IllegalArgumentException.class, () -> itemMeta.getPersistentDataContainer().get(VALID_KEY, new PrimitiveTagType<>(boolean.class)));
     }
 
     @Test
     public void testGetWrongType() {
-        ItemMeta itemMeta = createNewItemMeta();
-        itemMeta.getPersistentDataContainer().set(VALID_KEY, PersistentDataType.INTEGER, 1);
+        ItemMeta itemMeta = PersistentDataContainerTest.createNewItemMeta();
+        itemMeta.getPersistentDataContainer().set(PersistentDataContainerTest.VALID_KEY, PersistentDataType.INTEGER, 1);
         assertThrows(IllegalArgumentException.class, () -> itemMeta.getPersistentDataContainer().get(VALID_KEY, PersistentDataType.STRING));
     }
 
@@ -85,7 +85,7 @@ public class PersistentDataContainerTest {
         NamespacedKey namespacedKeyA = new NamespacedKey("plugin-a", "damage");
         NamespacedKey namespacedKeyB = new NamespacedKey("plugin-b", "damage");
 
-        ItemMeta meta = createNewItemMeta();
+        ItemMeta meta = PersistentDataContainerTest.createNewItemMeta();
         meta.getPersistentDataContainer().set(namespacedKeyA, PersistentDataType.LONG, 15L);
         meta.getPersistentDataContainer().set(namespacedKeyB, PersistentDataType.LONG, 160L);
 
@@ -103,21 +103,21 @@ public class PersistentDataContainerTest {
 
     @Test
     public void testCopyTo() {
-        PersistentDataContainer container = createComplexItemMeta().getPersistentDataContainer();
+        PersistentDataContainer container = this.createComplexItemMeta().getPersistentDataContainer();
         PersistentDataContainer target = container.getAdapterContext().newPersistentDataContainer();
-        target.set(VALID_KEY, PersistentDataType.INTEGER, 1);
-        container.set(VALID_KEY, PersistentDataType.INTEGER, 2);
+        target.set(PersistentDataContainerTest.VALID_KEY, PersistentDataType.INTEGER, 1);
+        container.set(PersistentDataContainerTest.VALID_KEY, PersistentDataType.INTEGER, 2);
         container.copyTo(target, false);
 
-        assertEquals(1, target.get(VALID_KEY, PersistentDataType.INTEGER)); // Should not be replaced
+        assertEquals(1, target.get(PersistentDataContainerTest.VALID_KEY, PersistentDataType.INTEGER)); // Should not be replaced
     }
 
     @Test
     public void testCopyToReplace() {
-        PersistentDataContainer container = createComplexItemMeta().getPersistentDataContainer();
+        PersistentDataContainer container = this.createComplexItemMeta().getPersistentDataContainer();
         PersistentDataContainer target = container.getAdapterContext().newPersistentDataContainer();
-        target.set(VALID_KEY, PersistentDataType.INTEGER, 1);
-        container.set(VALID_KEY, PersistentDataType.INTEGER, 2);
+        target.set(PersistentDataContainerTest.VALID_KEY, PersistentDataType.INTEGER, 1);
+        container.set(PersistentDataContainerTest.VALID_KEY, PersistentDataType.INTEGER, 2);
         container.copyTo(target, true);
 
         assertEquals(container, target);
@@ -126,7 +126,7 @@ public class PersistentDataContainerTest {
     // Removing a tag
     @Test
     public void testNBTTagStoring() {
-        CraftMetaItem itemMeta = createComplexItemMeta();
+        CraftMetaItem itemMeta = this.createComplexItemMeta();
 
         CraftMetaItem.Applicator compound = new CraftMetaItem.Applicator();
         itemMeta.applyToItem(compound);
@@ -136,7 +136,7 @@ public class PersistentDataContainerTest {
 
     @Test
     public void testMapStoring() {
-        CraftMetaItem itemMeta = createComplexItemMeta();
+        CraftMetaItem itemMeta = this.createComplexItemMeta();
 
         Map<String, Object> serialize = itemMeta.serialize();
         assertEquals(itemMeta, new CraftMetaItem(serialize));
@@ -145,7 +145,7 @@ public class PersistentDataContainerTest {
     @Test
     public void testYAMLStoring() {
         ItemStack stack = new ItemStack(Material.DIAMOND);
-        CraftMetaItem meta = createComplexItemMeta();
+        CraftMetaItem meta = this.createComplexItemMeta();
         stack.setItemMeta(meta);
 
         YamlConfiguration configuration = new YamlConfiguration();
@@ -161,10 +161,10 @@ public class PersistentDataContainerTest {
     @Test
     public void testCorrectType() {
         ItemStack stack = new ItemStack(Material.DIAMOND);
-        CraftMetaItem meta = createComplexItemMeta();
+        CraftMetaItem meta = this.createComplexItemMeta();
 
-        meta.getPersistentDataContainer().set(requestKey("int"), PersistentDataType.STRING, "1");
-        meta.getPersistentDataContainer().set(requestKey("double"), PersistentDataType.STRING, "1.33");
+        meta.getPersistentDataContainer().set(PersistentDataContainerTest.requestKey("int"), PersistentDataType.STRING, "1");
+        meta.getPersistentDataContainer().set(PersistentDataContainerTest.requestKey("double"), PersistentDataType.STRING, "1.33");
         stack.setItemMeta(meta);
 
         YamlConfiguration configuration = new YamlConfiguration();
@@ -174,34 +174,34 @@ public class PersistentDataContainerTest {
         YamlConfiguration loadedConfig = YamlConfiguration.loadConfiguration(new StringReader(configValue));
         ItemStack newStack = loadedConfig.getSerializable("testpath", ItemStack.class);
 
-        assertTrue(newStack.getItemMeta().getPersistentDataContainer().has(requestKey("int"), PersistentDataType.STRING));
-        assertEquals(newStack.getItemMeta().getPersistentDataContainer().get(requestKey("int"), PersistentDataType.STRING), "1");
+        assertTrue(newStack.getItemMeta().getPersistentDataContainer().has(PersistentDataContainerTest.requestKey("int"), PersistentDataType.STRING));
+        assertEquals(newStack.getItemMeta().getPersistentDataContainer().get(PersistentDataContainerTest.requestKey("int"), PersistentDataType.STRING), "1");
 
-        assertTrue(newStack.getItemMeta().getPersistentDataContainer().has(requestKey("double"), PersistentDataType.STRING));
-        assertEquals(newStack.getItemMeta().getPersistentDataContainer().get(requestKey("double"), PersistentDataType.STRING), "1.33");
+        assertTrue(newStack.getItemMeta().getPersistentDataContainer().has(PersistentDataContainerTest.requestKey("double"), PersistentDataType.STRING));
+        assertEquals(newStack.getItemMeta().getPersistentDataContainer().get(PersistentDataContainerTest.requestKey("double"), PersistentDataType.STRING), "1.33");
     }
 
     private CraftMetaItem createComplexItemMeta() {
-        CraftMetaItem itemMeta = (CraftMetaItem) createNewItemMeta();
+        CraftMetaItem itemMeta = (CraftMetaItem) PersistentDataContainerTest.createNewItemMeta();
         itemMeta.setDisplayName("Item Display Name");
 
-        itemMeta.getPersistentDataContainer().set(requestKey("custom-long"), PersistentDataType.LONG, 4L); //Add random primitive values
-        itemMeta.getPersistentDataContainer().set(requestKey("custom-byte-array"), PersistentDataType.BYTE_ARRAY, new byte[]{
+        itemMeta.getPersistentDataContainer().set(PersistentDataContainerTest.requestKey("custom-long"), PersistentDataType.LONG, 4L); //Add random primitive values
+        itemMeta.getPersistentDataContainer().set(PersistentDataContainerTest.requestKey("custom-byte-array"), PersistentDataType.BYTE_ARRAY, new byte[]{
             0, 1, 2, 10
         });
-        itemMeta.getPersistentDataContainer().set(requestKey("custom-string"), PersistentDataType.STRING, "Hello there world");
-        itemMeta.getPersistentDataContainer().set(requestKey("custom-int"), PersistentDataType.INTEGER, 3);
-        itemMeta.getPersistentDataContainer().set(requestKey("custom-double"), PersistentDataType.DOUBLE, 3.123);
+        itemMeta.getPersistentDataContainer().set(PersistentDataContainerTest.requestKey("custom-string"), PersistentDataType.STRING, "Hello there world");
+        itemMeta.getPersistentDataContainer().set(PersistentDataContainerTest.requestKey("custom-int"), PersistentDataType.INTEGER, 3);
+        itemMeta.getPersistentDataContainer().set(PersistentDataContainerTest.requestKey("custom-double"), PersistentDataType.DOUBLE, 3.123);
         itemMeta.getPersistentDataContainer().set(
-                requestKey("custom-list-string"), PersistentDataType.LIST.strings(), List.of("first[]", "second{}", "third()")
+                PersistentDataContainerTest.requestKey("custom-list-string"), PersistentDataType.LIST.strings(), List.of("first[]", "second{}", "third()")
         );
         itemMeta.getPersistentDataContainer().set(
-                requestKey("custom-list-bytes"), PersistentDataType.LIST.bytes(), List.of((byte) 1, (byte) 2, (byte) 3)
+                PersistentDataContainerTest.requestKey("custom-list-bytes"), PersistentDataType.LIST.bytes(), List.of((byte) 1, (byte) 2, (byte) 3)
         );
 
         PersistentDataContainer innerContainer = itemMeta.getPersistentDataContainer().getAdapterContext().newPersistentDataContainer(); //Add a inner container
-        innerContainer.set(VALID_KEY, PersistentDataType.LONG, 5L);
-        itemMeta.getPersistentDataContainer().set(requestKey("custom-inner-compound"), PersistentDataType.TAG_CONTAINER, innerContainer);
+        innerContainer.set(PersistentDataContainerTest.VALID_KEY, PersistentDataType.LONG, 5L);
+        itemMeta.getPersistentDataContainer().set(PersistentDataContainerTest.requestKey("custom-inner-compound"), PersistentDataType.TAG_CONTAINER, innerContainer);
         return itemMeta;
     }
 
@@ -222,11 +222,11 @@ public class PersistentDataContainerTest {
                 """;
 
         final PersistentDataContainer pdc = meta.getPersistentDataContainer();
-        pdc.set(requestKey("string_int"), PersistentDataType.STRING, "5i");
-        pdc.set(requestKey("string_true"), PersistentDataType.STRING, "true");
-        pdc.set(requestKey("string_byte_array"), PersistentDataType.STRING, "[B;-128B]");
-        pdc.set(requestKey("string_array_lookalike"), PersistentDataType.STRING, arrayLookalike);
-        pdc.set(requestKey("string_json_lookalike"), PersistentDataType.STRING, jsonLookalike);
+        pdc.set(PersistentDataContainerTest.requestKey("string_int"), PersistentDataType.STRING, "5i");
+        pdc.set(PersistentDataContainerTest.requestKey("string_true"), PersistentDataType.STRING, "true");
+        pdc.set(PersistentDataContainerTest.requestKey("string_byte_array"), PersistentDataType.STRING, "[B;-128B]");
+        pdc.set(PersistentDataContainerTest.requestKey("string_array_lookalike"), PersistentDataType.STRING, arrayLookalike);
+        pdc.set(PersistentDataContainerTest.requestKey("string_json_lookalike"), PersistentDataType.STRING, jsonLookalike);
 
         stack.setItemMeta(meta);
 
@@ -240,52 +240,52 @@ public class PersistentDataContainerTest {
         assertNotNull(loadedMeta);
 
         final PersistentDataContainer loadedPdc = loadedMeta.getPersistentDataContainer();
-        assertEquals("5i", loadedPdc.get(requestKey("string_int"), PersistentDataType.STRING));
-        assertEquals("true", loadedPdc.get(requestKey("string_true"), PersistentDataType.STRING));
-        assertEquals(arrayLookalike, loadedPdc.get(requestKey("string_array_lookalike"), PersistentDataType.STRING));
-        assertEquals(jsonLookalike, loadedPdc.get(requestKey("string_json_lookalike"), PersistentDataType.STRING));
+        assertEquals("5i", loadedPdc.get(PersistentDataContainerTest.requestKey("string_int"), PersistentDataType.STRING));
+        assertEquals("true", loadedPdc.get(PersistentDataContainerTest.requestKey("string_true"), PersistentDataType.STRING));
+        assertEquals(arrayLookalike, loadedPdc.get(PersistentDataContainerTest.requestKey("string_array_lookalike"), PersistentDataType.STRING));
+        assertEquals(jsonLookalike, loadedPdc.get(PersistentDataContainerTest.requestKey("string_json_lookalike"), PersistentDataType.STRING));
     }
 
     // Test complex object storage
     @Test
     public void storeUUIDOnItemTest() {
-        ItemMeta itemMeta = createNewItemMeta();
+        ItemMeta itemMeta = PersistentDataContainerTest.createNewItemMeta();
         UUIDPersistentDataType uuidPersistentDataType = new UUIDPersistentDataType();
         UUID uuid = UUID.fromString("434eea72-22a6-4c61-b5ef-945874a5c478");
 
-        itemMeta.getPersistentDataContainer().set(VALID_KEY, uuidPersistentDataType, uuid);
-        assertTrue(itemMeta.getPersistentDataContainer().has(VALID_KEY, uuidPersistentDataType));
-        assertEquals(uuid, itemMeta.getPersistentDataContainer().get(VALID_KEY, uuidPersistentDataType));
+        itemMeta.getPersistentDataContainer().set(PersistentDataContainerTest.VALID_KEY, uuidPersistentDataType, uuid);
+        assertTrue(itemMeta.getPersistentDataContainer().has(PersistentDataContainerTest.VALID_KEY, uuidPersistentDataType));
+        assertEquals(uuid, itemMeta.getPersistentDataContainer().get(PersistentDataContainerTest.VALID_KEY, uuidPersistentDataType));
     }
 
     @Test
     public void encapsulatedContainers() {
         NamespacedKey innerKey = new NamespacedKey("plugin-a", "inner");
 
-        ItemMeta meta = createNewItemMeta();
+        ItemMeta meta = PersistentDataContainerTest.createNewItemMeta();
         PersistentDataAdapterContext context = meta.getPersistentDataContainer().getAdapterContext();
 
         PersistentDataContainer thirdContainer = context.newPersistentDataContainer();
-        thirdContainer.set(VALID_KEY, PersistentDataType.LONG, 3L);
+        thirdContainer.set(PersistentDataContainerTest.VALID_KEY, PersistentDataType.LONG, 3L);
 
         PersistentDataContainer secondContainer = context.newPersistentDataContainer();
-        secondContainer.set(VALID_KEY, PersistentDataType.LONG, 2L);
+        secondContainer.set(PersistentDataContainerTest.VALID_KEY, PersistentDataType.LONG, 2L);
         secondContainer.set(innerKey, PersistentDataType.TAG_CONTAINER, thirdContainer);
 
-        meta.getPersistentDataContainer().set(VALID_KEY, PersistentDataType.LONG, 1L);
+        meta.getPersistentDataContainer().set(PersistentDataContainerTest.VALID_KEY, PersistentDataType.LONG, 1L);
         meta.getPersistentDataContainer().set(innerKey, PersistentDataType.TAG_CONTAINER, secondContainer);
 
         assertEquals(3L, meta.getPersistentDataContainer()
                 .get(innerKey, PersistentDataType.TAG_CONTAINER)
                 .get(innerKey, PersistentDataType.TAG_CONTAINER)
-                .get(VALID_KEY, PersistentDataType.LONG).longValue());
+                .get(PersistentDataContainerTest.VALID_KEY, PersistentDataType.LONG).longValue());
 
         assertEquals(2L, meta.getPersistentDataContainer()
                 .get(innerKey, PersistentDataType.TAG_CONTAINER)
-                .get(VALID_KEY, PersistentDataType.LONG).longValue());
+                .get(PersistentDataContainerTest.VALID_KEY, PersistentDataType.LONG).longValue());
 
         assertEquals(1L, meta.getPersistentDataContainer()
-                .get(VALID_KEY, PersistentDataType.LONG).longValue());
+                .get(PersistentDataContainerTest.VALID_KEY, PersistentDataType.LONG).longValue());
     }
 
     class UUIDPersistentDataType implements PersistentDataType<byte[], UUID> {
@@ -323,7 +323,7 @@ public class PersistentDataContainerTest {
 
     @Test
     public void testPrimitiveCustomTags() {
-        ItemMeta itemMeta = createNewItemMeta();
+        ItemMeta itemMeta = PersistentDataContainerTest.createNewItemMeta();
 
         this.testPrimitiveCustomTag(itemMeta, PersistentDataType.BYTE, (byte) 1);
         this.testPrimitiveCustomTag(itemMeta, PersistentDataType.SHORT, (short) 1);
@@ -401,9 +401,9 @@ public class PersistentDataContainerTest {
 
     @Test
     public void testItemMetaClone() {
-        ItemMeta itemMeta = createNewItemMeta();
+        ItemMeta itemMeta = PersistentDataContainerTest.createNewItemMeta();
         PersistentDataContainer container = itemMeta.getPersistentDataContainer();
-        itemMeta.getPersistentDataContainer().set(VALID_KEY, PersistentDataType.STRING, "notch");
+        itemMeta.getPersistentDataContainer().set(PersistentDataContainerTest.VALID_KEY, PersistentDataType.STRING, "notch");
 
         ItemMeta clonedMeta = itemMeta.clone();
         PersistentDataContainer clonedContainer = clonedMeta.getPersistentDataContainer();
@@ -418,12 +418,12 @@ public class PersistentDataContainerTest {
     @ParameterizedTest
     @MethodSource("testListTypeArgumentSource")
     public <T> void testListType(@NotNull final ListPersistentDataType<T, T> type, @NotNull final List<T> list, @NotNull final BiConsumer<T, T> equalsCheck) {
-        final ItemMeta meta = createNewItemMeta();
+        final ItemMeta meta = PersistentDataContainerTest.createNewItemMeta();
         final PersistentDataContainer container = meta.getPersistentDataContainer();
 
-        container.set(requestKey("list"), type, list);
+        container.set(PersistentDataContainerTest.requestKey("list"), type, list);
 
-        final List<T> returnedList = container.get(requestKey("list"), type);
+        final List<T> returnedList = container.get(PersistentDataContainerTest.requestKey("list"), type);
 
         assertNotNull(returnedList);
         assertEquals(list.size(), returnedList.size());
@@ -437,10 +437,10 @@ public class PersistentDataContainerTest {
 
     @NotNull
     private static Stream<Arguments> testListTypeArgumentSource() {
-        final PersistentDataContainer first = createNewItemMeta().getPersistentDataContainer();
+        final PersistentDataContainer first = PersistentDataContainerTest.createNewItemMeta().getPersistentDataContainer();
         final PersistentDataContainer second = first.getAdapterContext().newPersistentDataContainer();
-        first.set(requestKey("a"), PersistentDataType.STRING, "hello world");
-        second.set(requestKey("b"), PersistentDataType.BOOLEAN, true);
+        first.set(PersistentDataContainerTest.requestKey("a"), PersistentDataType.STRING, "hello world");
+        second.set(PersistentDataContainerTest.requestKey("b"), PersistentDataType.BOOLEAN, true);
 
         final BiConsumer<Object, Object> objectAssertion = Assertions::assertEquals;
         final BiConsumer<byte[], byte[]> byteArrayAssertion = Assertions::assertArrayEquals;
@@ -467,11 +467,11 @@ public class PersistentDataContainerTest {
         final CraftMetaItem craftItem = new CraftMetaItem(DataComponentPatch.EMPTY);
         final PersistentDataContainer container = craftItem.getPersistentDataContainer();
 
-        container.set(requestKey("list"), PersistentDataType.LIST.strings(), List.of());
-        assertTrue(container.has(requestKey("list"), PersistentDataType.LIST.strings()));
-        assertTrue(container.has(requestKey("list"), PersistentDataType.LIST.bytes()));
-        assertFalse(container.has(requestKey("list"), PersistentDataType.STRING));
-        assertEquals(List.of(), container.get(requestKey("list"), PersistentDataType.LIST.strings()));
+        container.set(PersistentDataContainerTest.requestKey("list"), PersistentDataType.LIST.strings(), List.of());
+        assertTrue(container.has(PersistentDataContainerTest.requestKey("list"), PersistentDataType.LIST.strings()));
+        assertTrue(container.has(PersistentDataContainerTest.requestKey("list"), PersistentDataType.LIST.bytes()));
+        assertFalse(container.has(PersistentDataContainerTest.requestKey("list"), PersistentDataType.STRING));
+        assertEquals(List.of(), container.get(PersistentDataContainerTest.requestKey("list"), PersistentDataType.LIST.strings()));
 
         // Write and read the entire container to NBT
         final CraftMetaItem.Applicator storage = new CraftMetaItem.Applicator();
@@ -480,10 +480,10 @@ public class PersistentDataContainerTest {
         final CraftMetaItem readItem = new CraftMetaItem(storage.build());
         final PersistentDataContainer readContainer = readItem.getPersistentDataContainer();
 
-        assertTrue(readContainer.has(requestKey("list"), PersistentDataType.LIST.strings()));
-        assertTrue(readContainer.has(requestKey("list"), PersistentDataType.LIST.bytes()));
-        assertFalse(readContainer.has(requestKey("list"), PersistentDataType.STRING));
-        assertEquals(List.of(), readContainer.get(requestKey("list"), PersistentDataType.LIST.strings()));
+        assertTrue(readContainer.has(PersistentDataContainerTest.requestKey("list"), PersistentDataType.LIST.strings()));
+        assertTrue(readContainer.has(PersistentDataContainerTest.requestKey("list"), PersistentDataType.LIST.bytes()));
+        assertFalse(readContainer.has(PersistentDataContainerTest.requestKey("list"), PersistentDataType.STRING));
+        assertEquals(List.of(), readContainer.get(PersistentDataContainerTest.requestKey("list"), PersistentDataType.LIST.strings()));
     }
 
     // This is a horrific marriage of tag container array "primitive" types the API offered and the new list types.
@@ -497,24 +497,24 @@ public class PersistentDataContainerTest {
     public void testListOfListViaContainerArray() {
         final ListPersistentDataType<PersistentDataContainer[], PersistentDataContainer[]> listPersistentDataType = PersistentDataType.LIST.listTypeFrom(PersistentDataType.TAG_CONTAINER_ARRAY);
 
-        final ItemMeta meta = createNewItemMeta();
+        final ItemMeta meta = PersistentDataContainerTest.createNewItemMeta();
         final PersistentDataContainer container = meta.getPersistentDataContainer();
         final PersistentDataAdapterContext adapterContext = container.getAdapterContext();
 
         final PersistentDataContainer first = adapterContext.newPersistentDataContainer();
-        first.set(requestKey("a"), PersistentDataType.STRING, "hi");
+        first.set(PersistentDataContainerTest.requestKey("a"), PersistentDataType.STRING, "hi");
 
         final PersistentDataContainer second = adapterContext.newPersistentDataContainer();
-        second.set(requestKey("a"), PersistentDataType.INTEGER, 2);
+        second.set(PersistentDataContainerTest.requestKey("a"), PersistentDataType.INTEGER, 2);
 
         final List<PersistentDataContainer[]> listOfArrays = new ArrayList<>();
         listOfArrays.add(new PersistentDataContainer[]{first, second});
 
-        container.set(requestKey("containerListList"), listPersistentDataType, listOfArrays);
+        container.set(PersistentDataContainerTest.requestKey("containerListList"), listPersistentDataType, listOfArrays);
 
-        assertTrue(container.has(requestKey("containerListList"), listPersistentDataType));
+        assertTrue(container.has(PersistentDataContainerTest.requestKey("containerListList"), listPersistentDataType));
 
-        final List<PersistentDataContainer[]> containerListList = container.get(requestKey("containerListList"), listPersistentDataType);
+        final List<PersistentDataContainer[]> containerListList = container.get(PersistentDataContainerTest.requestKey("containerListList"), listPersistentDataType);
 
         assertNotNull(containerListList);
         assertEquals(1, containerListList.size());
@@ -522,7 +522,7 @@ public class PersistentDataContainerTest {
         final PersistentDataContainer[] arrayOfPDC = containerListList.get(0);
         assertEquals(2, arrayOfPDC.length);
 
-        assertEquals("hi", arrayOfPDC[0].get(requestKey("a"), PersistentDataType.STRING));
-        assertEquals(2, arrayOfPDC[1].get(requestKey("a"), PersistentDataType.INTEGER));
+        assertEquals("hi", arrayOfPDC[0].get(PersistentDataContainerTest.requestKey("a"), PersistentDataType.STRING));
+        assertEquals(2, arrayOfPDC[1].get(PersistentDataContainerTest.requestKey("a"), PersistentDataType.INTEGER));
     }
 }
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/PlayerInventoryTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/PlayerInventoryTest.java
index c1858713ab..0ecc692bdb 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/PlayerInventoryTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/inventory/PlayerInventoryTest.java
@@ -1,7 +1,8 @@
 package org.bukkit.craftbukkit.inventory;
 
 import static org.junit.jupiter.api.Assertions.*;
-import net.minecraft.world.entity.player.PlayerInventory;
+
+import net.minecraft.world.entity.player.Inventory;
 import net.minecraft.world.item.ItemStack;
 import net.minecraft.world.item.Items;
 import org.bukkit.support.environment.Normal;
@@ -19,7 +20,7 @@ public class PlayerInventoryTest {
         ItemStack itemStack64Coal = new ItemStack(Items.COAL, 64);
 
         // keep one slot empty
-        PlayerInventory inventory = new PlayerInventory(null);
+        Inventory inventory = new Inventory(null);
         for (int i = 0; i < inventory.items.size() - 1; i++) {
             inventory.setItem(i, itemStackApple);
         }
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/LegacyTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/LegacyTest.java
index 848730054f..002e635137 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/LegacyTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/LegacyTest.java
@@ -146,15 +146,15 @@ public class LegacyTest {
     @Test
     public void toLegacyMaterial() {
         for (Material material : Material.values()) {
-            if (!INVALIDATED_MATERIALS.contains(material) && !material.isLegacy()) {
+            if (!this.INVALIDATED_MATERIALS.contains(material) && !material.isLegacy()) {
                 MaterialData converted = CraftLegacy.toLegacyData(material);
 
                 assertNotEquals(Material.LEGACY_AIR, converted.getItemType(), "Could not toLegacy " + material);
 
-                if (!INVALIDATED_MATERIALS.contains(converted.getItemType())) {
+                if (!this.INVALIDATED_MATERIALS.contains(converted.getItemType())) {
                     assertNotEquals(Material.AIR, CraftLegacy.fromLegacy(converted), "Could not fromLegacy(toLegacy) " + converted + "(" + material + ")");
                 }
-                if (!INVERSION_FAILS.contains(material)) {
+                if (!this.INVERSION_FAILS.contains(material)) {
                     assertEquals(material, CraftLegacy.fromLegacy(converted), "Could not fromLegacy(toLegacy) " + converted + "(" + material + ")");
                 }
             }
@@ -166,12 +166,12 @@ public class LegacyTest {
     @Test
     public void fromLegacyMaterial() {
         for (Material material : Material.values()) {
-            if (!INVALIDATED_MATERIALS.contains(material) && material.isLegacy()) {
+            if (!this.INVALIDATED_MATERIALS.contains(material) && material.isLegacy()) {
                 Material converted = CraftLegacy.fromLegacy(material);
                 assertNotEquals(Material.AIR, converted, "Could not fromLegacy " + material);
 
                 assertNotEquals(Material.AIR, CraftLegacy.toLegacy(converted), "Could not toLegacy(fromLegacy) " + converted + "(" + material + ")");
-                if (!INVERSION_FAILS.contains(material)) {
+                if (!this.INVERSION_FAILS.contains(material)) {
                     assertEquals(material, CraftLegacy.toLegacy(converted), "Could not toLegacy(fromLegacy) " + converted + "(" + material + ")");
                 }
             }
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/MaterialReroutingTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/MaterialReroutingTest.java
index 3eac642d69..cd03ea1f72 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/MaterialReroutingTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/MaterialReroutingTest.java
@@ -46,7 +46,7 @@ public class MaterialReroutingTest {
     private static JarFile jarFile = null;
 
     public static Stream<Arguments> bukkitData() {
-        return jarFile
+        return MaterialReroutingTest.jarFile
                 .stream()
                 .filter(entry -> entry.getName().endsWith(".class"))
                  // Add class exceptions here
@@ -58,7 +58,7 @@ public class MaterialReroutingTest {
                 .filter(entry -> !entry.getName().startsWith("org/bukkit/material"))
                 .map(entry -> {
                     try {
-                        return jarFile.getInputStream(entry);
+                        return MaterialReroutingTest.jarFile.getInputStream(entry);
                     } catch (IOException e) {
                         throw new RuntimeException(e);
                     }
@@ -67,7 +67,7 @@ public class MaterialReroutingTest {
 
     @BeforeAll
     public static void beforeAll() throws IOException {
-        jarFile = new JarFile(new File(BUKKIT_CLASSES));
+        MaterialReroutingTest.jarFile = new JarFile(new File(MaterialReroutingTest.BUKKIT_CLASSES));
     }
 
     @ParameterizedTest
@@ -94,7 +94,7 @@ public class MaterialReroutingTest {
                         }
                     }
 
-                    if (!Commodore.rerouteMethods(ApiVersion.CURRENT, MATERIAL_METHOD_REROUTE, (methodNode.access & Opcodes.ACC_STATIC) != 0, classNode.name, methodNode.name, methodNode.desc, a -> { })) {
+                    if (!Commodore.rerouteMethods(ApiVersion.CURRENT, MaterialReroutingTest.MATERIAL_METHOD_REROUTE, (methodNode.access & Opcodes.ACC_STATIC) != 0, classNode.name, methodNode.name, methodNode.desc, a -> { })) {
                         missingReroute.add(methodNode.name + " " + methodNode.desc + " " + methodNode.signature);
                     }
                 }
@@ -111,8 +111,8 @@ public class MaterialReroutingTest {
 
     @AfterAll
     public static void clear() throws IOException {
-        if (jarFile != null) {
-            jarFile.close();
+        if (MaterialReroutingTest.jarFile != null) {
+            MaterialReroutingTest.jarFile.close();
         }
     }
 }
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/PersistentDataContainerLegacyTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/PersistentDataContainerLegacyTest.java
index 480dbb9303..b3dab6246a 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/PersistentDataContainerLegacyTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/PersistentDataContainerLegacyTest.java
@@ -24,7 +24,7 @@ public class PersistentDataContainerLegacyTest {
         CraftItemFactory.instance(); // Initialize craft item factory to register craft item meta serializers
 
         YamlConfiguration legacyConfig = null;
-        try (final InputStream input = getClass().getClassLoader().getResourceAsStream("pdc/legacy_pdc.yml")) {
+        try (final InputStream input = this.getClass().getClassLoader().getResourceAsStream("pdc/legacy_pdc.yml")) {
             assertNotNull(input, "Legacy pdc yaml was null");
 
             try (BufferedReader reader = new BufferedReader(new InputStreamReader(input, Charsets.UTF_8))) {
@@ -43,23 +43,23 @@ public class PersistentDataContainerLegacyTest {
         assertNotNull(meta);
 
         final PersistentDataContainer pdc = meta.getPersistentDataContainer();
-        assertEquals(Byte.valueOf(Byte.MAX_VALUE), pdc.get(key("byte"), PersistentDataType.BYTE), "legacy byte was wrong");
-        assertEquals(Short.valueOf(Short.MAX_VALUE), pdc.get(key("short"), PersistentDataType.SHORT), "legacy short was wrong");
-        assertEquals(Integer.valueOf(Integer.MAX_VALUE), pdc.get(key("integer"), PersistentDataType.INTEGER), "legacy integer was wrong");
-        assertEquals(Long.valueOf(Long.MAX_VALUE), pdc.get(key("long"), PersistentDataType.LONG), "legacy long was wrong");
-        assertEquals(Float.valueOf(Float.MAX_VALUE), pdc.get(key("float"), PersistentDataType.FLOAT), "legacy float was wrong");
-        assertEquals(Double.valueOf(Double.MAX_VALUE), pdc.get(key("double"), PersistentDataType.DOUBLE), "legacy double was wrong");
-        assertEquals("stringy", pdc.get(key("string_simple"), PersistentDataType.STRING), "legacy string-simple was wrong");
-        assertEquals("What a fun complex string 🔥", pdc.get(key("string_complex"), PersistentDataType.STRING), "legacy string-complex was wrong");
+        assertEquals(Byte.valueOf(Byte.MAX_VALUE), pdc.get(this.key("byte"), PersistentDataType.BYTE), "legacy byte was wrong");
+        assertEquals(Short.valueOf(Short.MAX_VALUE), pdc.get(this.key("short"), PersistentDataType.SHORT), "legacy short was wrong");
+        assertEquals(Integer.valueOf(Integer.MAX_VALUE), pdc.get(this.key("integer"), PersistentDataType.INTEGER), "legacy integer was wrong");
+        assertEquals(Long.valueOf(Long.MAX_VALUE), pdc.get(this.key("long"), PersistentDataType.LONG), "legacy long was wrong");
+        assertEquals(Float.valueOf(Float.MAX_VALUE), pdc.get(this.key("float"), PersistentDataType.FLOAT), "legacy float was wrong");
+        assertEquals(Double.valueOf(Double.MAX_VALUE), pdc.get(this.key("double"), PersistentDataType.DOUBLE), "legacy double was wrong");
+        assertEquals("stringy", pdc.get(this.key("string_simple"), PersistentDataType.STRING), "legacy string-simple was wrong");
+        assertEquals("What a fun complex string 🔥", pdc.get(this.key("string_complex"), PersistentDataType.STRING), "legacy string-complex was wrong");
 
-        assertArrayEquals(new byte[]{Byte.MIN_VALUE}, pdc.get(key("byte_array"), PersistentDataType.BYTE_ARRAY), "legacy byte array was wrong");
+        assertArrayEquals(new byte[]{Byte.MIN_VALUE}, pdc.get(this.key("byte_array"), PersistentDataType.BYTE_ARRAY), "legacy byte array was wrong");
 
-        assertArrayEquals(new int[]{Integer.MIN_VALUE}, pdc.get(key("integer_array"), PersistentDataType.INTEGER_ARRAY), "legacy integer array was wrong");
+        assertArrayEquals(new int[]{Integer.MIN_VALUE}, pdc.get(this.key("integer_array"), PersistentDataType.INTEGER_ARRAY), "legacy integer array was wrong");
 
-        assertArrayEquals(new long[]{Long.MIN_VALUE}, pdc.get(key("long_array"), PersistentDataType.LONG_ARRAY), "legacy long array was wrong");
+        assertArrayEquals(new long[]{Long.MIN_VALUE}, pdc.get(this.key("long_array"), PersistentDataType.LONG_ARRAY), "legacy long array was wrong");
 
-        assertEquals("5", pdc.get(key("string_edge_case_number"), PersistentDataType.STRING), "legacy string edge case number");
-        assertEquals("\"Hello world\"", pdc.get(key("string_edge_case_quoted"), PersistentDataType.STRING), "legacy string edge case quotes");
+        assertEquals("5", pdc.get(this.key("string_edge_case_number"), PersistentDataType.STRING), "legacy string edge case number");
+        assertEquals("\"Hello world\"", pdc.get(this.key("string_edge_case_quoted"), PersistentDataType.STRING), "legacy string edge case quotes");
     }
 
     private NamespacedKey key(String key) {
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/AbstractRerouteTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/AbstractRerouteTest.java
index 46ec5a54d0..5c72bf6412 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/AbstractRerouteTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/AbstractRerouteTest.java
@@ -11,11 +11,11 @@ import org.objectweb.asm.Type;
 public abstract class AbstractRerouteTest {
 
     void test(Class<?> testClass, Map<String, RerouteMethodData> dataMap) {
-        test(testClass, Predicates.alwaysTrue(), dataMap);
+        this.test(testClass, Predicates.alwaysTrue(), dataMap);
     }
 
     void test(Class<?> testClass, Predicate<String> predicate, Map<String, RerouteMethodData> dataMap) {
-        test(testClass, Predicates.and(predicate), dataMap.entrySet().stream().map(entry -> new TestDataHolder(entry.getKey(), List.of(entry.getValue()))).toList());
+        this.test(testClass, Predicates.and(predicate), dataMap.entrySet().stream().map(entry -> new TestDataHolder(entry.getKey(), List.of(entry.getValue()))).toList());
     }
 
     void test(Class<?> testClass, Predicate<String> predicate, List<TestDataHolder> dataList) {
@@ -34,7 +34,7 @@ public abstract class AbstractRerouteTest {
                 RerouteMethodData actual = holder.rerouteMethodDataMap.get(testData.sourceOwner().getInternalName());
                 assertNotNull(actual, String.format("No reroute method data found for %s", testData));
 
-                check(actual, testData);
+                this.check(actual, testData);
             }
         }
     }
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/DoNotRerouteTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/DoNotRerouteTest.java
index 701bdcc7c6..4bba305427 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/DoNotRerouteTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/DoNotRerouteTest.java
@@ -10,7 +10,7 @@ public class DoNotRerouteTest extends AbstractRerouteTest {
 
     @Test
     public void testDoNotReroute() {
-        test(DoNotRerouteTestData.class, Map.of());
+        this.test(DoNotRerouteTestData.class, Map.of());
     }
 
     public static class DoNotRerouteTestData {
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/InjectCompatibilityTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/InjectCompatibilityTest.java
index 5471af287f..51e4a2e4f1 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/InjectCompatibilityTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/InjectCompatibilityTest.java
@@ -12,8 +12,8 @@ public class InjectCompatibilityTest extends AbstractRerouteTest {
 
     @Test
     public void testInjectCompatibility() {
-        test(InjectCompatibilityTestData.class, Map.of(
-                        "()Ljava/util/List;getList", create(
+        this.test(InjectCompatibilityTestData.class, Map.of(
+                        "()Ljava/util/List;getList", this.create(
                                 "()Ljava/util/List;getList",
                                 "()Ljava/util/List;",
                                 "java/lang/Object",
@@ -22,9 +22,9 @@ public class InjectCompatibilityTest extends AbstractRerouteTest {
                                 "(Ljava/lang/Object;Z)Ljava/util/List;",
                                 "org/bukkit/craftbukkit/legacy/reroute/InjectCompatibilityTest$InjectCompatibilityTestData",
                                 "getList",
-                                create(
-                                        create("Ljava/lang/Object;", "Ljava/lang/Object;", false, false, null),
-                                        create("Z", "Z", false, false, "test-value")
+                                this.create(
+                                        this.create("Ljava/lang/Object;", "Ljava/lang/Object;", false, false, null),
+                                        this.create("Z", "Z", false, false, "test-value")
                                 ),
                                 "Ljava/util/List;",
                                 true,
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/InjectPluginNameTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/InjectPluginNameTest.java
index 41f803c85e..bb168d3020 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/InjectPluginNameTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/InjectPluginNameTest.java
@@ -12,8 +12,8 @@ public class InjectPluginNameTest extends AbstractRerouteTest {
 
     @Test
     public void testInjectPluginName() {
-        test(InjectPluginNameTestData.class, Map.of(
-                        "()Ljava/util/List;getList", create(
+        this.test(InjectPluginNameTestData.class, Map.of(
+                        "()Ljava/util/List;getList", this.create(
                                 "()Ljava/util/List;getList",
                                 "()Ljava/util/List;",
                                 "java/lang/Object",
@@ -22,9 +22,9 @@ public class InjectPluginNameTest extends AbstractRerouteTest {
                                 "(Ljava/lang/Object;Ljava/lang/String;)Ljava/util/List;",
                                 "org/bukkit/craftbukkit/legacy/reroute/InjectPluginNameTest$InjectPluginNameTestData",
                                 "getList",
-                                create(
-                                        create("Ljava/lang/Object;", "Ljava/lang/Object;", false, false, null),
-                                        create("Ljava/lang/String;", "Ljava/lang/String;", true, false, null)
+                                this.create(
+                                        this.create("Ljava/lang/Object;", "Ljava/lang/Object;", false, false, null),
+                                        this.create("Ljava/lang/String;", "Ljava/lang/String;", true, false, null)
                                 ),
                                 "Ljava/util/List;",
                                 true,
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/InjectPluginVersionTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/InjectPluginVersionTest.java
index 25e7a9e915..1612d66ac3 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/InjectPluginVersionTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/InjectPluginVersionTest.java
@@ -13,8 +13,8 @@ public class InjectPluginVersionTest extends AbstractRerouteTest {
 
     @Test
     public void testInjectPluginVersion() {
-        test(InjectPluginVersionTestData.class, Map.of(
-                        "()Ljava/util/List;getList", create(
+        this.test(InjectPluginVersionTestData.class, Map.of(
+                        "()Ljava/util/List;getList", this.create(
                                 "()Ljava/util/List;getList",
                                 "()Ljava/util/List;",
                                 "java/lang/Object",
@@ -23,9 +23,9 @@ public class InjectPluginVersionTest extends AbstractRerouteTest {
                                 "(Ljava/lang/Object;Lorg/bukkit/craftbukkit/util/ApiVersion;)Ljava/util/List;",
                                 "org/bukkit/craftbukkit/legacy/reroute/InjectPluginVersionTest$InjectPluginVersionTestData",
                                 "getList",
-                                create(
-                                        create("Ljava/lang/Object;", "Ljava/lang/Object;", false, false, null),
-                                        create("Lorg/bukkit/craftbukkit/util/ApiVersion;", "Lorg/bukkit/craftbukkit/util/ApiVersion;", false, true, null)
+                                this.create(
+                                        this.create("Ljava/lang/Object;", "Ljava/lang/Object;", false, false, null),
+                                        this.create("Lorg/bukkit/craftbukkit/util/ApiVersion;", "Lorg/bukkit/craftbukkit/util/ApiVersion;", false, true, null)
                                 ),
                                 "Ljava/util/List;",
                                 true,
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/NotInBukkitTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/NotInBukkitTest.java
index 1188802c2c..407a46713e 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/NotInBukkitTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/NotInBukkitTest.java
@@ -10,8 +10,8 @@ public class NotInBukkitTest extends AbstractRerouteTest {
 
     @Test
     public void testNotInBukkit() {
-        test(NotInBukkitTestData.class, Map.of(
-                        "()Ljava/util/List;getList", create(
+        this.test(NotInBukkitTestData.class, Map.of(
+                        "()Ljava/util/List;getList", this.create(
                                 "()Ljava/util/List;getList",
                                 "()Ljava/util/List;",
                                 "java/lang/Object",
@@ -20,8 +20,8 @@ public class NotInBukkitTest extends AbstractRerouteTest {
                                 "(Ljava/lang/Object;)Ljava/util/List;",
                                 "org/bukkit/craftbukkit/legacy/reroute/NotInBukkitTest$NotInBukkitTestData",
                                 "getList",
-                                create(
-                                        create("Ljava/lang/Object;", "Ljava/lang/Object;", false, false, null)
+                                this.create(
+                                        this.create("Ljava/lang/Object;", "Ljava/lang/Object;", false, false, null)
                                 ),
                                 "Ljava/util/List;",
                                 false,
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RequireCompatibilityTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RequireCompatibilityTest.java
index 118609fef4..0befb44245 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RequireCompatibilityTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RequireCompatibilityTest.java
@@ -11,8 +11,8 @@ public class RequireCompatibilityTest extends AbstractRerouteTest {
 
     @Test
     public void testRequireCompatibility() {
-        test(RequireCompatibilityTestData.class, Map.of(
-                        "()Ljava/util/List;getList", create(
+        this.test(RequireCompatibilityTestData.class, Map.of(
+                        "()Ljava/util/List;getList", this.create(
                                 "()Ljava/util/List;getList",
                                 "()Ljava/util/List;",
                                 "java/lang/Object",
@@ -21,8 +21,8 @@ public class RequireCompatibilityTest extends AbstractRerouteTest {
                                 "(Ljava/lang/Object;)Ljava/util/List;",
                                 "org/bukkit/craftbukkit/legacy/reroute/RequireCompatibilityTest$RequireCompatibilityTestData",
                                 "getList",
-                                create(
-                                        create("Ljava/lang/Object;", "Ljava/lang/Object;", false, false, null)
+                                this.create(
+                                        this.create("Ljava/lang/Object;", "Ljava/lang/Object;", false, false, null)
                                 ),
                                 "Ljava/util/List;",
                                 true,
@@ -34,7 +34,7 @@ public class RequireCompatibilityTest extends AbstractRerouteTest {
 
     @Test
     public void testRequireCompatibilityNotPresent() {
-        test(RequireCompatibilityTestData.class, Predicates.alwaysFalse(), Map.of());
+        this.test(RequireCompatibilityTestData.class, Predicates.alwaysFalse(), Map.of());
     }
 
     public static class RequireCompatibilityTestData {
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RequirePluginVersionTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RequirePluginVersionTest.java
index 09c64116e8..840073648a 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RequirePluginVersionTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RequirePluginVersionTest.java
@@ -11,8 +11,8 @@ public class RequirePluginVersionTest extends AbstractRerouteTest {
 
     @Test
     public void testRequirePluginVersion() {
-        test(RequirePluginVersionTestData.class, Map.of(
-                        "()Ljava/util/List;getList", create(
+        this.test(RequirePluginVersionTestData.class, Map.of(
+                        "()Ljava/util/List;getList", this.create(
                                 "()Ljava/util/List;getList",
                                 "()Ljava/util/List;",
                                 "java/lang/Object",
@@ -21,8 +21,8 @@ public class RequirePluginVersionTest extends AbstractRerouteTest {
                                 "(Ljava/lang/Object;)Ljava/util/List;",
                                 "org/bukkit/craftbukkit/legacy/reroute/RequirePluginVersionTest$RequirePluginVersionTestData",
                                 "getList",
-                                create(
-                                        create("Ljava/lang/Object;", "Ljava/lang/Object;", false, false, null)
+                                this.create(
+                                        this.create("Ljava/lang/Object;", "Ljava/lang/Object;", false, false, null)
                                 ),
                                 "Ljava/util/List;",
                                 true,
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RerouteArgumentTypeTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RerouteArgumentTypeTest.java
index 097221bce8..6d22c6d2d5 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RerouteArgumentTypeTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RerouteArgumentTypeTest.java
@@ -10,8 +10,8 @@ public class RerouteArgumentTypeTest extends AbstractRerouteTest {
 
     @Test
     public void testRerouteArgumentType() {
-        test(RerouteArgumentTypeTestData.class, Map.of(
-                        "()Ljava/util/List;getList", create(
+        this.test(RerouteArgumentTypeTestData.class, Map.of(
+                        "()Ljava/util/List;getList", this.create(
                                 "()Ljava/util/List;getList",
                                 "()Ljava/util/List;",
                                 "java/util/Map",
@@ -20,8 +20,8 @@ public class RerouteArgumentTypeTest extends AbstractRerouteTest {
                                 "(Ljava/lang/Object;)Ljava/util/List;",
                                 "org/bukkit/craftbukkit/legacy/reroute/RerouteArgumentTypeTest$RerouteArgumentTypeTestData",
                                 "getList",
-                                create(
-                                        create("Ljava/lang/Object;", "Ljava/util/Map;", false, false, null)
+                                this.create(
+                                        this.create("Ljava/lang/Object;", "Ljava/util/Map;", false, false, null)
                                 ),
                                 "Ljava/util/List;",
                                 true,
@@ -33,8 +33,8 @@ public class RerouteArgumentTypeTest extends AbstractRerouteTest {
 
     @Test
     public void testRerouteArgumentTypeSecond() {
-        test(RerouteArgumentTypeSecondTestData.class, Map.of(
-                        "(Ljava/lang/String;)Ljava/util/List;getList", create(
+        this.test(RerouteArgumentTypeSecondTestData.class, Map.of(
+                        "(Ljava/lang/String;)Ljava/util/List;getList", this.create(
                                 "(Ljava/lang/String;)Ljava/util/List;getList",
                                 "(Ljava/lang/String;)Ljava/util/List;",
                                 "java/lang/Object",
@@ -43,9 +43,9 @@ public class RerouteArgumentTypeTest extends AbstractRerouteTest {
                                 "(Ljava/lang/Object;Ljava/util/Map;)Ljava/util/List;",
                                 "org/bukkit/craftbukkit/legacy/reroute/RerouteArgumentTypeTest$RerouteArgumentTypeSecondTestData",
                                 "getList",
-                                create(
-                                        create("Ljava/lang/Object;", "Ljava/lang/Object;", false, false, null),
-                                        create("Ljava/util/Map;", "Ljava/lang/String;", false, false, null)
+                                this.create(
+                                        this.create("Ljava/lang/Object;", "Ljava/lang/Object;", false, false, null),
+                                        this.create("Ljava/util/Map;", "Ljava/lang/String;", false, false, null)
                                 ),
                                 "Ljava/util/List;",
                                 true,
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RerouteBuilderTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RerouteBuilderTest.java
index d249c0e26f..3664d4a7d4 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RerouteBuilderTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RerouteBuilderTest.java
@@ -13,8 +13,8 @@ public class RerouteBuilderTest extends AbstractRerouteTest {
 
     @Test
     public void testReroute() {
-        test(FirstTest.class, Map.of(
-                "()VtestReroute", create(
+        this.test(FirstTest.class, Map.of(
+                "()VtestReroute", this.create(
                         "()VtestReroute",
                         "()V",
                         "org/bukkit/craftbukkit/legacy/reroute/RerouteBuilderTest",
@@ -23,8 +23,8 @@ public class RerouteBuilderTest extends AbstractRerouteTest {
                         "(Lorg/bukkit/craftbukkit/legacy/reroute/RerouteBuilderTest;)V",
                         "org/bukkit/craftbukkit/legacy/reroute/RerouteBuilderTest$FirstTest",
                         "testReroute",
-                        create(
-                                create("Lorg/bukkit/craftbukkit/legacy/reroute/RerouteBuilderTest;", "Lorg/bukkit/craftbukkit/legacy/reroute/RerouteBuilderTest;", false, false, null)
+                        this.create(
+                                this.create("Lorg/bukkit/craftbukkit/legacy/reroute/RerouteBuilderTest;", "Lorg/bukkit/craftbukkit/legacy/reroute/RerouteBuilderTest;", false, false, null)
                         ),
                         "V",
                         true,
@@ -35,13 +35,13 @@ public class RerouteBuilderTest extends AbstractRerouteTest {
 
     @Test
     public void testInvalidMethods() {
-        test(InvalidMethodTest.class, Map.of());
+        this.test(InvalidMethodTest.class, Map.of());
     }
 
     @Test
     public void testMultipleMethods() {
-        test(MultipleMethodTest.class, Map.of(
-                        "()Ljava/util/List;getList", create(
+        this.test(MultipleMethodTest.class, Map.of(
+                        "()Ljava/util/List;getList", this.create(
                                 "()Ljava/util/List;getList",
                                 "()Ljava/util/List;",
                                 "java/lang/Object",
@@ -50,14 +50,14 @@ public class RerouteBuilderTest extends AbstractRerouteTest {
                                 "(Ljava/lang/Object;)Ljava/util/List;",
                                 "org/bukkit/craftbukkit/legacy/reroute/RerouteBuilderTest$MultipleMethodTest",
                                 "getList",
-                                create(
-                                        create("Ljava/lang/Object;", "Ljava/lang/Object;", false, false, null)
+                                this.create(
+                                        this.create("Ljava/lang/Object;", "Ljava/lang/Object;", false, false, null)
                                 ),
                                 "Ljava/util/List;",
                                 true,
                                 null
                         ),
-                        "(Ljava/util/Map;)Ljava/util/Map;getMap", create(
+                        "(Ljava/util/Map;)Ljava/util/Map;getMap", this.create(
                                 "(Ljava/util/Map;)Ljava/util/Map;getMap",
                                 "(Ljava/util/Map;)Ljava/util/Map;",
                                 "java/lang/String",
@@ -66,15 +66,15 @@ public class RerouteBuilderTest extends AbstractRerouteTest {
                                 "(Ljava/lang/String;Ljava/util/Map;)Ljava/util/Map;",
                                 "org/bukkit/craftbukkit/legacy/reroute/RerouteBuilderTest$MultipleMethodTest",
                                 "getMap",
-                                create(
-                                        create("Ljava/lang/String;", "Ljava/lang/String;", false, false, null),
-                                        create("Ljava/util/Map;", "Ljava/util/Map;", false, false, null)
+                                this.create(
+                                        this.create("Ljava/lang/String;", "Ljava/lang/String;", false, false, null),
+                                        this.create("Ljava/util/Map;", "Ljava/util/Map;", false, false, null)
                                 ),
                                 "Ljava/util/Map;",
                                 true,
                                 null
                         ),
-                        "(ZS)IgetInt", create(
+                        "(ZS)IgetInt", this.create(
                                 "(ZS)IgetInt",
                                 "(ZS)I",
                                 "java/util/logging/Logger",
@@ -83,10 +83,10 @@ public class RerouteBuilderTest extends AbstractRerouteTest {
                                 "(Ljava/util/logging/Logger;ZS)I",
                                 "org/bukkit/craftbukkit/legacy/reroute/RerouteBuilderTest$MultipleMethodTest",
                                 "getInt",
-                                create(
-                                        create("Ljava/util/logging/Logger;", "Ljava/util/logging/Logger;", false, false, null),
-                                        create("Z", "Z", false, false, null),
-                                        create("S", "S", false, false, null)
+                                this.create(
+                                        this.create("Ljava/util/logging/Logger;", "Ljava/util/logging/Logger;", false, false, null),
+                                        this.create("Z", "Z", false, false, null),
+                                        this.create("S", "S", false, false, null)
                                 ),
                                 "I",
                                 true,
@@ -113,8 +113,8 @@ public class RerouteBuilderTest extends AbstractRerouteTest {
 
     @Test
     public void testSameKey() {
-        test(SameKeyTest.class, Predicates.alwaysTrue(), List.of(
-                new TestDataHolder("()Ljava/util/List;getList", List.of(create(
+        this.test(SameKeyTest.class, Predicates.alwaysTrue(), List.of(
+                new TestDataHolder("()Ljava/util/List;getList", List.of(this.create(
                                 "()Ljava/util/List;getList",
                                 "()Ljava/util/List;",
                                 "java/lang/Object",
@@ -123,14 +123,14 @@ public class RerouteBuilderTest extends AbstractRerouteTest {
                                 "(Ljava/lang/Object;)Ljava/util/List;",
                                 "org/bukkit/craftbukkit/legacy/reroute/RerouteBuilderTest$SameKeyTest",
                                 "getList",
-                                create(
-                                        create("Ljava/lang/Object;", "Ljava/lang/Object;", false, false, null)
+                                this.create(
+                                        this.create("Ljava/lang/Object;", "Ljava/lang/Object;", false, false, null)
                                 ),
                                 "Ljava/util/List;",
                                 true,
                                 null
                         ),
-                        create(
+                        this.create(
                                 "()Ljava/util/List;getList",
                                 "()Ljava/util/List;",
                                 "java/lang/String",
@@ -139,9 +139,9 @@ public class RerouteBuilderTest extends AbstractRerouteTest {
                                 "(Ljava/lang/String;Ljava/lang/String;)Ljava/util/List;",
                                 "org/bukkit/craftbukkit/legacy/reroute/RerouteBuilderTest$SameKeyTest",
                                 "getList",
-                                create(
-                                        create("Ljava/lang/String;", "Ljava/lang/String;", false, false, null),
-                                        create("Ljava/lang/String;", "Ljava/lang/String;", true, false, null)
+                                this.create(
+                                        this.create("Ljava/lang/String;", "Ljava/lang/String;", false, false, null),
+                                        this.create("Ljava/lang/String;", "Ljava/lang/String;", true, false, null)
                                 ),
                                 "Ljava/util/List;",
                                 true,
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RerouteMethodNameTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RerouteMethodNameTest.java
index 24638da3f8..a752f48510 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RerouteMethodNameTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RerouteMethodNameTest.java
@@ -10,8 +10,8 @@ public class RerouteMethodNameTest extends AbstractRerouteTest {
 
     @Test
     public void testRerouteMethodName() {
-        test(RerouteMethodNameTestData.class, Map.of(
-                        "()Ljava/util/List;getMap", create(
+        this.test(RerouteMethodNameTestData.class, Map.of(
+                        "()Ljava/util/List;getMap", this.create(
                                 "()Ljava/util/List;getMap",
                                 "()Ljava/util/List;",
                                 "java/lang/Object",
@@ -20,8 +20,8 @@ public class RerouteMethodNameTest extends AbstractRerouteTest {
                                 "(Ljava/lang/Object;)Ljava/util/List;",
                                 "org/bukkit/craftbukkit/legacy/reroute/RerouteMethodNameTest$RerouteMethodNameTestData",
                                 "getList",
-                                create(
-                                        create("Ljava/lang/Object;", "Ljava/lang/Object;", false, false, null)
+                                this.create(
+                                        this.create("Ljava/lang/Object;", "Ljava/lang/Object;", false, false, null)
                                 ),
                                 "Ljava/util/List;",
                                 true,
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RerouteReturnTypeTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RerouteReturnTypeTest.java
index 3f1e337e9f..272257153e 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RerouteReturnTypeTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RerouteReturnTypeTest.java
@@ -10,8 +10,8 @@ public class RerouteReturnTypeTest extends AbstractRerouteTest {
 
     @Test
     public void testRerouteReturnType() {
-        test(RerouteReturnTypeTestData.class, Map.of(
-                        "()Ljava/util/Map;getList", create(
+        this.test(RerouteReturnTypeTestData.class, Map.of(
+                        "()Ljava/util/Map;getList", this.create(
                                 "()Ljava/util/Map;getList",
                                 "()Ljava/util/Map;",
                                 "java/lang/Object",
@@ -20,8 +20,8 @@ public class RerouteReturnTypeTest extends AbstractRerouteTest {
                                 "(Ljava/lang/Object;)Ljava/util/List;",
                                 "org/bukkit/craftbukkit/legacy/reroute/RerouteReturnTypeTest$RerouteReturnTypeTestData",
                                 "getList",
-                                create(
-                                        create("Ljava/lang/Object;", "Ljava/lang/Object;", false, false, null)
+                                this.create(
+                                        this.create("Ljava/lang/Object;", "Ljava/lang/Object;", false, false, null)
                                 ),
                                 "Ljava/util/List;",
                                 true,
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RerouteStaticTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RerouteStaticTest.java
index 7f1c045a0a..6aa84f10bb 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RerouteStaticTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RerouteStaticTest.java
@@ -10,8 +10,8 @@ public class RerouteStaticTest extends AbstractRerouteTest {
 
     @Test
     public void testStaticReroute() {
-        test(RerouteStaticTestData.class, Map.of(
-                        "(Ljava/lang/Object;)Ljava/util/List;getList", create(
+        this.test(RerouteStaticTestData.class, Map.of(
+                        "(Ljava/lang/Object;)Ljava/util/List;getList", this.create(
                                 "(Ljava/lang/Object;)Ljava/util/List;getList",
                                 "(Ljava/lang/Object;)Ljava/util/List;",
                                 "java/util/Map",
@@ -20,8 +20,8 @@ public class RerouteStaticTest extends AbstractRerouteTest {
                                 "(Ljava/lang/Object;)Ljava/util/List;",
                                 "org/bukkit/craftbukkit/legacy/reroute/RerouteStaticTest$RerouteStaticTestData",
                                 "getList",
-                                create(
-                                        create("Ljava/lang/Object;", "Ljava/lang/Object;", false, false, null)
+                                this.create(
+                                        this.create("Ljava/lang/Object;", "Ljava/lang/Object;", false, false, null)
                                 ),
                                 "Ljava/util/List;",
                                 true,
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RerouteValidationTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RerouteValidationTest.java
index 55283fea56..c192303ef8 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RerouteValidationTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/legacy/reroute/RerouteValidationTest.java
@@ -36,7 +36,7 @@ public class RerouteValidationTest {
                     continue;
                 }
 
-                String error = isValid(entry.getKey(), entry.getValue());
+                String error = this.isValid(entry.getKey(), entry.getValue());
 
                 if (error != null) {
                     wrongReroutes.put(entry.getKey(), error);
@@ -56,13 +56,13 @@ public class RerouteValidationTest {
 
     private String isValid(String key, RerouteMethodData rerouteMethodData) {
         try {
-            Class<?> clazz = toClass(rerouteMethodData.sourceOwner());
-            Class<?> returnClazz = toClass(rerouteMethodData.sourceDesc().getReturnType());
+            Class<?> clazz = this.toClass(rerouteMethodData.sourceOwner());
+            Class<?> returnClazz = this.toClass(rerouteMethodData.sourceDesc().getReturnType());
             Class<?>[] paras = new Class[rerouteMethodData.sourceDesc().getArgumentCount()];
             Type[] paraTypes = rerouteMethodData.sourceDesc().getArgumentTypes();
 
             for (int i = 0; i < paraTypes.length; i++) {
-                paras[i] = toClass(paraTypes[i]);
+                paras[i] = this.toClass(paraTypes[i]);
             }
 
             Method method = clazz.getDeclaredMethod(rerouteMethodData.sourceName(), paras);
@@ -93,9 +93,9 @@ public class RerouteValidationTest {
 
     private Class<?> toClass(Type type) throws ClassNotFoundException {
         if (type.getSort() == Type.OBJECT) {
-            return Class.forName(type.getClassName(), false, getClass().getClassLoader());
+            return Class.forName(type.getClassName(), false, this.getClass().getClassLoader());
         } else if (type.getSort() == Type.ARRAY) {
-            return Class.forName(type.getDescriptor().replace('/', '.'), false, getClass().getClassLoader());
+            return Class.forName(type.getDescriptor().replace('/', '.'), false, this.getClass().getClassLoader());
         } else {
             return switch (type.getSort()) {
                 case Type.VOID -> void.class;
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/profile/PlayerProfileTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/profile/PlayerProfileTest.java
index d4ba251ff8..688957dd05 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/profile/PlayerProfileTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/profile/PlayerProfileTest.java
@@ -6,7 +6,7 @@ import com.mojang.authlib.properties.Property;
 import java.net.MalformedURLException;
 import java.net.URL;
 import java.util.UUID;
-import net.minecraft.SystemUtils;
+import net.minecraft.Util;
 import net.minecraft.world.item.component.ResolvableProfile;
 import org.bukkit.configuration.InvalidConfigurationException;
 import org.bukkit.configuration.file.YamlConfiguration;
@@ -58,15 +58,15 @@ public class PlayerProfileTest {
     private static final String COMPACT_VALUE = "eyJ0ZXh0dXJlcyI6eyJTS0lOIjp7InVybCI6Imh0dHA6Ly90ZXh0dXJlcy5taW5lY3JhZnQubmV0L3RleHR1cmUvMjg0ZGJmNjA3MDBiOTg4MmMwYzJhZDE5NDNiNTE1Y2MxMTFmMGI0ZTU2MmE5YTM2NjgyNDk1NjM2ZDg0Njc1NCJ9fX0=";
 
     private static CraftPlayerProfile buildPlayerProfile() {
-        GameProfile gameProfile = new GameProfile(UNIQUE_ID, NAME);
-        gameProfile.getProperties().put(CraftPlayerTextures.PROPERTY_NAME, new Property(CraftPlayerTextures.PROPERTY_NAME, VALUE, SIGNATURE));
+        GameProfile gameProfile = new GameProfile(PlayerProfileTest.UNIQUE_ID, PlayerProfileTest.NAME);
+        gameProfile.getProperties().put(CraftPlayerTextures.PROPERTY_NAME, new Property(CraftPlayerTextures.PROPERTY_NAME, PlayerProfileTest.VALUE, PlayerProfileTest.SIGNATURE));
         return new CraftPlayerProfile(gameProfile);
     }
 
     @Test
     @EnableIfMojangServerAvailable
     public void testProvidedValues() {
-        Property property = new Property(CraftPlayerTextures.PROPERTY_NAME, VALUE, SIGNATURE);
+        Property property = new Property(CraftPlayerTextures.PROPERTY_NAME, PlayerProfileTest.VALUE, PlayerProfileTest.SIGNATURE);
         assertTrue(CraftProfileProperty.hasValidSignature(property), "Invalid test property signature, has the public key changed?");
     }
 
@@ -84,9 +84,9 @@ public class PlayerProfileTest {
         });
 
         // Valid profiles:
-        new CraftPlayerProfile(UNIQUE_ID, null);
-        new CraftPlayerProfile(null, NAME);
-        new CraftPlayerProfile(UNIQUE_ID, NAME);
+        new CraftPlayerProfile(PlayerProfileTest.UNIQUE_ID, null);
+        new CraftPlayerProfile(null, PlayerProfileTest.NAME);
+        new CraftPlayerProfile(PlayerProfileTest.UNIQUE_ID, PlayerProfileTest.NAME);
     }
 
     @Test
@@ -100,49 +100,49 @@ public class PlayerProfileTest {
         });
 
         // Valid profiles:
-        CraftPlayerProfile profile1 = new CraftPlayerProfile(new GameProfile(UNIQUE_ID, NAME));
-        assertEquals(UNIQUE_ID, profile1.getUniqueId(), "Unique id is not the same");
-        assertEquals(NAME, profile1.getName(), "Name is not the same");
+        CraftPlayerProfile profile1 = new CraftPlayerProfile(new GameProfile(PlayerProfileTest.UNIQUE_ID, PlayerProfileTest.NAME));
+        assertEquals(PlayerProfileTest.UNIQUE_ID, profile1.getUniqueId(), "Unique id is not the same");
+        assertEquals(PlayerProfileTest.NAME, profile1.getName(), "Name is not the same");
 
-        CraftPlayerProfile profile2 = new CraftPlayerProfile(new GameProfile(UNIQUE_ID, ""));
-        assertEquals(UNIQUE_ID, profile2.getUniqueId(), "Unique id is not the same");
+        CraftPlayerProfile profile2 = new CraftPlayerProfile(new GameProfile(PlayerProfileTest.UNIQUE_ID, ""));
+        assertEquals(PlayerProfileTest.UNIQUE_ID, profile2.getUniqueId(), "Unique id is not the same");
         assertEquals(null, profile2.getName(), "Name is not null");
 
-        CraftPlayerProfile profile3 = new CraftPlayerProfile(new GameProfile(SystemUtils.NIL_UUID, NAME));
+        CraftPlayerProfile profile3 = new CraftPlayerProfile(new GameProfile(Util.NIL_UUID, PlayerProfileTest.NAME));
         assertEquals(null, profile3.getUniqueId(), "Unique id is not null");
-        assertEquals(NAME, profile3.getName(), "Name is not the same");
+        assertEquals(PlayerProfileTest.NAME, profile3.getName(), "Name is not the same");
     }
 
     @Test
     public void testTexturesLoading() {
-        CraftPlayerProfile profile = buildPlayerProfile();
-        assertEquals(UNIQUE_ID, profile.getUniqueId(), "Unique id is not the same");
-        assertEquals(NAME, profile.getName(), "Name is not the same");
-        assertEquals(SKIN, profile.getTextures().getSkin(), "Skin url is not the same");
+        CraftPlayerProfile profile = PlayerProfileTest.buildPlayerProfile();
+        assertEquals(PlayerProfileTest.UNIQUE_ID, profile.getUniqueId(), "Unique id is not the same");
+        assertEquals(PlayerProfileTest.NAME, profile.getName(), "Name is not the same");
+        assertEquals(PlayerProfileTest.SKIN, profile.getTextures().getSkin(), "Skin url is not the same");
         assertEquals(PlayerTextures.SkinModel.SLIM, profile.getTextures().getSkinModel(), "Skin model is not the same");
-        assertEquals(CAPE, profile.getTextures().getCape(), "Cape url is not the same");
-        assertEquals(TIMESTAMP, profile.getTextures().getTimestamp(), "Timestamp is not the same");
+        assertEquals(PlayerProfileTest.CAPE, profile.getTextures().getCape(), "Cape url is not the same");
+        assertEquals(PlayerProfileTest.TIMESTAMP, profile.getTextures().getTimestamp(), "Timestamp is not the same");
     }
 
     @Test
     @EnableIfMojangServerAvailable
     public void testBuildGameProfile() {
-        CraftPlayerProfile profile = buildPlayerProfile();
+        CraftPlayerProfile profile = PlayerProfileTest.buildPlayerProfile();
         GameProfile gameProfile = profile.buildGameProfile();
         assertNotNull(gameProfile, "GameProfile is null");
 
         Property property = CraftPlayerProfile.getProperty(gameProfile, CraftPlayerTextures.PROPERTY_NAME);
         assertNotNull(property, "Textures property is null");
-        assertEquals(VALUE, property.value(), "Property values are not the same");
-        assertEquals(NAME, gameProfile.getName(), "Names are not the same");
-        assertEquals(UNIQUE_ID, gameProfile.getId(), "Unique ids are not the same");
+        assertEquals(PlayerProfileTest.VALUE, property.value(), "Property values are not the same");
+        assertEquals(PlayerProfileTest.NAME, gameProfile.getName(), "Names are not the same");
+        assertEquals(PlayerProfileTest.UNIQUE_ID, gameProfile.getId(), "Unique ids are not the same");
         assertTrue(property.hasSignature(), "Signature is missing");
         assertTrue(CraftProfileProperty.hasValidSignature(property), "Signature is not valid");
     }
 
     @Test
     public void testBuildGameProfileReturnsNewInstance() {
-        CraftPlayerProfile profile = buildPlayerProfile();
+        CraftPlayerProfile profile = PlayerProfileTest.buildPlayerProfile();
         GameProfile gameProfile1 = profile.buildGameProfile();
         GameProfile gameProfile2 = profile.buildGameProfile();
         assertNotSame(gameProfile1, gameProfile2, "CraftPlayerProfile#buildGameProfile() does not produce a new instance");
@@ -151,13 +151,13 @@ public class PlayerProfileTest {
     @Test
     @EnableIfMojangServerAvailable
     public void testSignatureValidation() {
-        CraftPlayerProfile profile = buildPlayerProfile();
+        CraftPlayerProfile profile = PlayerProfileTest.buildPlayerProfile();
         assertTrue(profile.getTextures().isSigned(), "Signature is not valid");
     }
 
     @Test
     public void testSignatureInvalidation() {
-        CraftPlayerProfile profile = buildPlayerProfile();
+        CraftPlayerProfile profile = PlayerProfileTest.buildPlayerProfile();
         profile.getTextures().setSkin(null);
         assertEquals(0L, profile.getTextures().getTimestamp(), "Textures has a timestamp");
         assertFalse(profile.getTextures().isSigned(), "Textures signature is valid");
@@ -170,16 +170,16 @@ public class PlayerProfileTest {
 
     @Test
     public void testSetSkinResetsSkinModel() {
-        CraftPlayerProfile profile = buildPlayerProfile();
+        CraftPlayerProfile profile = PlayerProfileTest.buildPlayerProfile();
         assertEquals(PlayerTextures.SkinModel.SLIM, profile.getTextures().getSkinModel(), "Skin model is not the same");
-        profile.getTextures().setSkin(SKIN);
+        profile.getTextures().setSkin(PlayerProfileTest.SKIN);
         assertEquals(PlayerTextures.SkinModel.CLASSIC, profile.getTextures().getSkinModel(), "Skin model was not reset by skin change");
     }
 
     @Test
     public void testSetTextures() {
-        CraftPlayerProfile profile = buildPlayerProfile();
-        CraftPlayerProfile profile2 = new CraftPlayerProfile(new GameProfile(UNIQUE_ID, NAME));
+        CraftPlayerProfile profile = PlayerProfileTest.buildPlayerProfile();
+        CraftPlayerProfile profile2 = new CraftPlayerProfile(new GameProfile(PlayerProfileTest.UNIQUE_ID, PlayerProfileTest.NAME));
 
         assertFalse(profile.getTextures().isEmpty(), "profile has no textures");
         assertTrue(profile2.getTextures().isEmpty(), "profile2 has textures");
@@ -196,7 +196,7 @@ public class PlayerProfileTest {
 
     @Test
     public void testClearTextures() {
-        CraftPlayerProfile profile = buildPlayerProfile();
+        CraftPlayerProfile profile = PlayerProfileTest.buildPlayerProfile();
         assertFalse(profile.getTextures().isEmpty(), "profile has no textures");
 
         profile.getTextures().clear();
@@ -207,19 +207,19 @@ public class PlayerProfileTest {
 
     @Test
     public void testCustomSkin() {
-        CraftPlayerProfile profile = new CraftPlayerProfile(UNIQUE_ID, NAME);
-        profile.getTextures().setSkin(SKIN);
-        assertEquals(COMPACT_VALUE, profile.getTextures().getProperty().value(), "profile with custom skin does not match expected value");
+        CraftPlayerProfile profile = new CraftPlayerProfile(PlayerProfileTest.UNIQUE_ID, PlayerProfileTest.NAME);
+        profile.getTextures().setSkin(PlayerProfileTest.SKIN);
+        assertEquals(PlayerProfileTest.COMPACT_VALUE, profile.getTextures().getProperty().value(), "profile with custom skin does not match expected value");
     }
 
     @Test
     public void testEquals() {
-        CraftPlayerProfile profile1 = buildPlayerProfile();
-        CraftPlayerProfile profile2 = buildPlayerProfile();
-        CraftPlayerProfile profile3 = new CraftPlayerProfile(UNIQUE_ID, NAME);
-        CraftPlayerProfile profile4 = new CraftPlayerProfile(UNIQUE_ID, NAME);
-        CraftPlayerProfile profile5 = new CraftPlayerProfile(UNIQUE_ID, null);
-        CraftPlayerProfile profile6 = new CraftPlayerProfile(null, NAME);
+        CraftPlayerProfile profile1 = PlayerProfileTest.buildPlayerProfile();
+        CraftPlayerProfile profile2 = PlayerProfileTest.buildPlayerProfile();
+        CraftPlayerProfile profile3 = new CraftPlayerProfile(PlayerProfileTest.UNIQUE_ID, PlayerProfileTest.NAME);
+        CraftPlayerProfile profile4 = new CraftPlayerProfile(PlayerProfileTest.UNIQUE_ID, PlayerProfileTest.NAME);
+        CraftPlayerProfile profile5 = new CraftPlayerProfile(PlayerProfileTest.UNIQUE_ID, null);
+        CraftPlayerProfile profile6 = new CraftPlayerProfile(null, PlayerProfileTest.NAME);
 
         assertEquals(profile1, profile2, "profile1 and profile2 are not equal");
         assertEquals(profile3, profile4, "profile3 and profile4 are not equal");
@@ -230,8 +230,8 @@ public class PlayerProfileTest {
 
     @Test
     public void testTexturesEquals() {
-        CraftPlayerProfile profile1 = buildPlayerProfile();
-        CraftPlayerProfile profile2 = buildPlayerProfile();
+        CraftPlayerProfile profile1 = PlayerProfileTest.buildPlayerProfile();
+        CraftPlayerProfile profile2 = PlayerProfileTest.buildPlayerProfile();
         assertEquals(profile1.getTextures(), profile2.getTextures(), "Profile textures are not equal");
 
         profile1.getTextures().setCape(null);
@@ -243,19 +243,19 @@ public class PlayerProfileTest {
 
     @Test
     public void testClone() {
-        PlayerProfile profile = buildPlayerProfile();
+        PlayerProfile profile = PlayerProfileTest.buildPlayerProfile();
         PlayerProfile copy = profile.clone();
         assertEquals(profile, copy, "profile and copy are not equal");
 
         // New copies are independent (don't affect the original profile):
         copy.getTextures().setSkin(null);
-        assertEquals(SKIN, profile.getTextures().getSkin(), "copy is not independent");
+        assertEquals(PlayerProfileTest.SKIN, profile.getTextures().getSkin(), "copy is not independent");
     }
 
     @Test
     public void testSerializationFullProfile() throws InvalidConfigurationException {
         ConfigurationSerialization.registerClass(CraftPlayerProfile.class);
-        PlayerProfile playerProfile = buildPlayerProfile();
+        PlayerProfile playerProfile = PlayerProfileTest.buildPlayerProfile();
         YamlConfiguration configuration = new YamlConfiguration();
 
         configuration.set("test", playerProfile);
diff --git a/paper-server/src/test/java/org/bukkit/craftbukkit/util/CraftChatMessageTest.java b/paper-server/src/test/java/org/bukkit/craftbukkit/util/CraftChatMessageTest.java
index 006a2cc413..1601a27d8b 100644
--- a/paper-server/src/test/java/org/bukkit/craftbukkit/util/CraftChatMessageTest.java
+++ b/paper-server/src/test/java/org/bukkit/craftbukkit/util/CraftChatMessageTest.java
@@ -1,9 +1,10 @@
 package org.bukkit.craftbukkit.util;
 
 import static org.junit.jupiter.api.Assertions.*;
-import net.minecraft.network.chat.IChatBaseComponent;
-import net.minecraft.network.chat.IChatMutableComponent;
-import net.minecraft.network.chat.contents.LiteralContents;
+
+import net.minecraft.network.chat.Component;
+import net.minecraft.network.chat.MutableComponent;
+import net.minecraft.network.chat.contents.PlainTextContents;
 import org.bukkit.support.environment.Normal;
 import org.junit.jupiter.api.Test;
 
@@ -13,29 +14,29 @@ public class CraftChatMessageTest {
     @Test
     public void testSimpleStrings() {
         // These should be able to go from legacy to comp to legacy back without data changing
-        testString("§fFoo");
-        testString("§fFoo§f§l"); // Keeps empty format at end
-        testString("Foo");
+        this.testString("§fFoo");
+        this.testString("§fFoo§f§l"); // Keeps empty format at end
+        this.testString("Foo");
         // testString("§r§oFoo"); // Retains reset at start (item names can use this to get rid of italics)
-        testString("Foo§bBar");
-        testString("F§loo§b§oBa§b§lr"); // any non color formatting code implies previous color code.
+        this.testString("Foo§bBar");
+        this.testString("F§loo§b§oBa§b§lr"); // any non color formatting code implies previous color code.
         // So §l at start has no inherited color code, so that's fine, but the one at the end,
         // while Ba§l would work visually, serializing back will include the implied color
 
-        testString("F§loo§rBa§lr"); // But if reset was used before.... then it can be standalone
-        testString("§fFoo§bBar");
-        testString("§fFoo§bBar§rBaz");
+        this.testString("F§loo§rBa§lr"); // But if reset was used before.... then it can be standalone
+        this.testString("§fFoo§bBar");
+        this.testString("§fFoo§bBar§rBaz");
     }
 
     @Test
     public void testNewLineBehavior() {
         // new line retain should stay as 1 comp
-        testString("Hello§0\n§rFoo\n§5Test", true);
-        testString("§0Foo!\n", true);
-        testString("§0Foo!§0\\n§0\\n§0Bar\n", true);
+        this.testString("Hello§0\n§rFoo\n§5Test", true);
+        this.testString("§0Foo!\n", true);
+        this.testString("§0Foo!§0\\n§0\\n§0Bar\n", true);
 
         // dont retain line returns multiple components
-        IChatBaseComponent[] components = CraftChatMessage.fromString("Hello§0\n§rFoo\n§5Test");
+        Component[] components = CraftChatMessage.fromString("Hello§0\n§rFoo\n§5Test");
         assertEquals(3, components.length, "Has 3 components");
         assertEquals("Hello§0", CraftChatMessage.fromComponent(components[0]));
         assertEquals(/*§r*/"Foo", CraftChatMessage.fromComponent(components[1]));
@@ -44,26 +45,26 @@ public class CraftChatMessageTest {
 
     @Test
     public void testComponents() {
-        testComponent("Foo§bBar§rBaz", create("Foo", "§bBar", "Baz"));
-        testComponent("§fFoo§bBar§rBaz", create("", "§fFoo", "§bBar", "Baz"));
-        testComponent("§fFoo§bBar§rBaz", create("", "§fFoo", "§bBar", "", "Baz"));
-        testComponent("§fFoo§bBar§rBaz", create("§fFoo", "§bBar", "Baz"));
-        testComponent("Foo§bBar§rBaz", create("", "Foo", "§bBar", "Baz"));
-        testComponent("§fFoo§bBar§rBaz", create("§fFoo", "§bBar", "Baz"));
-        testComponent("F§foo§bBar§rBaz", create("F§foo", "§bBar", "Baz"));
+        this.testComponent("Foo§bBar§rBaz", this.create("Foo", "§bBar", "Baz"));
+        this.testComponent("§fFoo§bBar§rBaz", this.create("", "§fFoo", "§bBar", "Baz"));
+        this.testComponent("§fFoo§bBar§rBaz", this.create("", "§fFoo", "§bBar", "", "Baz"));
+        this.testComponent("§fFoo§bBar§rBaz", this.create("§fFoo", "§bBar", "Baz"));
+        this.testComponent("Foo§bBar§rBaz", this.create("", "Foo", "§bBar", "Baz"));
+        this.testComponent("§fFoo§bBar§rBaz", this.create("§fFoo", "§bBar", "Baz"));
+        this.testComponent("F§foo§bBar§rBaz", this.create("F§foo", "§bBar", "Baz"));
     }
 
     @Test
     public void testPlainText() {
-        testPlainString("");
-        testPlainString("Foo§f§mBar§0");
-        testPlainString("Link to https://www.spigotmc.org/ ...");
-        testPlainString("Link to http://www.spigotmc.org/ ...");
-        testPlainString("Link to www.spigotmc.org ...");
+        this.testPlainString("");
+        this.testPlainString("Foo§f§mBar§0");
+        this.testPlainString("Link to https://www.spigotmc.org/ ...");
+        this.testPlainString("Link to http://www.spigotmc.org/ ...");
+        this.testPlainString("Link to www.spigotmc.org ...");
     }
 
-    private IChatBaseComponent create(String txt, String... rest) {
-        IChatMutableComponent cmp = CraftChatMessage.fromString(txt, false)[0].copy();
+    private Component create(String txt, String... rest) {
+        MutableComponent cmp = CraftChatMessage.fromString(txt, false)[0].copy();
         for (String s : rest) {
             cmp.append(CraftChatMessage.fromString(s, true)[0]);
         }
@@ -72,44 +73,44 @@ public class CraftChatMessageTest {
     }
 
     private void testString(String expected) {
-        testString(expected, false);
+        this.testString(expected, false);
     }
 
     private void testString(String expected, boolean keepNewLines) {
-        testString(expected, expected, keepNewLines);
+        this.testString(expected, expected, keepNewLines);
     }
 
     private void testString(String input, String expected) {
-        testString(input, expected, false);
+        this.testString(input, expected, false);
     }
 
     private void testString(String input, String expected, boolean keepNewLines) {
-        IChatBaseComponent cmp = CraftChatMessage.fromString(input, keepNewLines)[0];
+        Component cmp = CraftChatMessage.fromString(input, keepNewLines)[0];
         String actual = CraftChatMessage.fromComponent(cmp);
         assertEquals(expected, actual, "\nComponent: " + cmp + "\n");
     }
 
     private void testPlainString(String expected) {
-        IChatBaseComponent component = CraftChatMessage.fromString(expected, false, true)[0];
+        Component component = CraftChatMessage.fromString(expected, false, true)[0];
         String actual = CraftChatMessage.fromComponent(component);
         assertEquals(expected, actual, "fromComponent does not match input: " + component);
-        assertFalse(containsNonPlainComponent(component), "Non-plain component: " + component);
+        assertFalse(this.containsNonPlainComponent(component), "Non-plain component: " + component);
     }
 
-    private boolean containsNonPlainComponent(IChatBaseComponent component) {
-        for (IChatBaseComponent c : component) {
-            if (c.getContents() != LiteralContents.EMPTY && !(c.getContents() instanceof LiteralContents)) {
+    private boolean containsNonPlainComponent(Component component) {
+        for (Component c : component) {
+            if (c.getContents() != PlainTextContents.EMPTY && !(c.getContents() instanceof PlainTextContents)) {
                 return true;
             }
         }
         return false;
     }
 
-    private void testComponent(String expected, IChatBaseComponent cmp) {
+    private void testComponent(String expected, Component cmp) {
         String actual = CraftChatMessage.fromComponent(cmp);
         assertEquals(expected, actual, "\nComponent: " + cmp + "\n");
 
-        IChatBaseComponent expectedCmp = CraftChatMessage.fromString(expected, true)[0];
+        Component expectedCmp = CraftChatMessage.fromString(expected, true)[0];
         String actualExpectedCmp = CraftChatMessage.fromComponent(expectedCmp);
         assertEquals(expected, actualExpectedCmp, "\nComponent: " + expectedCmp + "\n");
     }
diff --git a/paper-server/src/test/java/org/bukkit/entity/EnderDragonPhaseTest.java b/paper-server/src/test/java/org/bukkit/entity/EnderDragonPhaseTest.java
index 0dbe6aa0f1..5b1eb1fe65 100644
--- a/paper-server/src/test/java/org/bukkit/entity/EnderDragonPhaseTest.java
+++ b/paper-server/src/test/java/org/bukkit/entity/EnderDragonPhaseTest.java
@@ -1,7 +1,8 @@
 package org.bukkit.entity;
 
 import static org.junit.jupiter.api.Assertions.*;
-import net.minecraft.world.entity.boss.enderdragon.phases.DragonControllerPhase;
+
+import net.minecraft.world.entity.boss.enderdragon.phases.EnderDragonPhase;
 import org.bukkit.craftbukkit.entity.CraftEnderDragon;
 import org.bukkit.support.environment.Normal;
 import org.junit.jupiter.api.Test;
@@ -12,7 +13,7 @@ public class EnderDragonPhaseTest {
     @Test
     public void testNotNull() {
         for (EnderDragon.Phase phase : EnderDragon.Phase.values()) {
-            DragonControllerPhase dragonControllerPhase = CraftEnderDragon.getMinecraftPhase(phase);
+            EnderDragonPhase dragonControllerPhase = CraftEnderDragon.getMinecraftPhase(phase);
             assertNotNull(dragonControllerPhase, phase.name());
             assertNotNull(CraftEnderDragon.getBukkitPhase(dragonControllerPhase), phase.name());
         }
@@ -20,31 +21,31 @@ public class EnderDragonPhaseTest {
 
     @Test
     public void testBukkitToMinecraft() {
-        assertEquals(CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.CIRCLING), DragonControllerPhase.HOLDING_PATTERN, "CIRCLING");
-        assertEquals(CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.STRAFING), DragonControllerPhase.STRAFE_PLAYER, "STRAFING");
-        assertEquals(CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.FLY_TO_PORTAL), DragonControllerPhase.LANDING_APPROACH, "FLY_TO_PORTAL");
-        assertEquals(CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.LAND_ON_PORTAL), DragonControllerPhase.LANDING, "LAND_ON_PORTAL");
-        assertEquals(CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.LEAVE_PORTAL), DragonControllerPhase.TAKEOFF, "LEAVE_PORTAL");
-        assertEquals(CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.BREATH_ATTACK), DragonControllerPhase.SITTING_FLAMING, "BREATH_ATTACK");
-        assertEquals(CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.SEARCH_FOR_BREATH_ATTACK_TARGET), DragonControllerPhase.SITTING_SCANNING, "SEARCH_FOR_BREATH_ATTACK_TARGET");
-        assertEquals(CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.ROAR_BEFORE_ATTACK), DragonControllerPhase.SITTING_ATTACKING, "ROAR_BEFORE_ATTACK");
-        assertEquals(CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.CHARGE_PLAYER), DragonControllerPhase.CHARGING_PLAYER, "CHARGE_PLAYER");
-        assertEquals(CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.DYING), DragonControllerPhase.DYING, "DYING");
-        assertEquals(CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.HOVER), DragonControllerPhase.HOVERING, "HOVER");
+        assertEquals(CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.CIRCLING), EnderDragonPhase.HOLDING_PATTERN, "CIRCLING");
+        assertEquals(CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.STRAFING), EnderDragonPhase.STRAFE_PLAYER, "STRAFING");
+        assertEquals(CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.FLY_TO_PORTAL), EnderDragonPhase.LANDING_APPROACH, "FLY_TO_PORTAL");
+        assertEquals(CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.LAND_ON_PORTAL), EnderDragonPhase.LANDING, "LAND_ON_PORTAL");
+        assertEquals(CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.LEAVE_PORTAL), EnderDragonPhase.TAKEOFF, "LEAVE_PORTAL");
+        assertEquals(CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.BREATH_ATTACK), EnderDragonPhase.SITTING_FLAMING, "BREATH_ATTACK");
+        assertEquals(CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.SEARCH_FOR_BREATH_ATTACK_TARGET), EnderDragonPhase.SITTING_SCANNING, "SEARCH_FOR_BREATH_ATTACK_TARGET");
+        assertEquals(CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.ROAR_BEFORE_ATTACK), EnderDragonPhase.SITTING_ATTACKING, "ROAR_BEFORE_ATTACK");
+        assertEquals(CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.CHARGE_PLAYER), EnderDragonPhase.CHARGING_PLAYER, "CHARGE_PLAYER");
+        assertEquals(CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.DYING), EnderDragonPhase.DYING, "DYING");
+        assertEquals(CraftEnderDragon.getMinecraftPhase(EnderDragon.Phase.HOVER), EnderDragonPhase.HOVERING, "HOVER");
     }
 
     @Test
     public void testMinecraftToBukkit() {
-        assertEquals(CraftEnderDragon.getBukkitPhase(DragonControllerPhase.HOLDING_PATTERN), EnderDragon.Phase.CIRCLING, "CIRCLING");
-        assertEquals(CraftEnderDragon.getBukkitPhase(DragonControllerPhase.STRAFE_PLAYER), EnderDragon.Phase.STRAFING, "STRAFING");
-        assertEquals(CraftEnderDragon.getBukkitPhase(DragonControllerPhase.LANDING_APPROACH), EnderDragon.Phase.FLY_TO_PORTAL, "FLY_TO_PORTAL");
-        assertEquals(CraftEnderDragon.getBukkitPhase(DragonControllerPhase.LANDING), EnderDragon.Phase.LAND_ON_PORTAL, "LAND_ON_PORTAL");
-        assertEquals(CraftEnderDragon.getBukkitPhase(DragonControllerPhase.TAKEOFF), EnderDragon.Phase.LEAVE_PORTAL, "LEAVE_PORTAL");
-        assertEquals(CraftEnderDragon.getBukkitPhase(DragonControllerPhase.SITTING_FLAMING), EnderDragon.Phase.BREATH_ATTACK, "BREATH_ATTACK");
-        assertEquals(CraftEnderDragon.getBukkitPhase(DragonControllerPhase.SITTING_SCANNING), EnderDragon.Phase.SEARCH_FOR_BREATH_ATTACK_TARGET, "SEARCH_FOR_BREATH_ATTACK_TARGET");
-        assertEquals(CraftEnderDragon.getBukkitPhase(DragonControllerPhase.SITTING_ATTACKING), EnderDragon.Phase.ROAR_BEFORE_ATTACK, "ROAR_BEFORE_ATTACK");
-        assertEquals(CraftEnderDragon.getBukkitPhase(DragonControllerPhase.CHARGING_PLAYER), EnderDragon.Phase.CHARGE_PLAYER, "CHARGE_PLAYER");
-        assertEquals(CraftEnderDragon.getBukkitPhase(DragonControllerPhase.DYING), EnderDragon.Phase.DYING, "DYING");
-        assertEquals(CraftEnderDragon.getBukkitPhase(DragonControllerPhase.HOVERING), EnderDragon.Phase.HOVER, "HOVER");
+        assertEquals(CraftEnderDragon.getBukkitPhase(EnderDragonPhase.HOLDING_PATTERN), EnderDragon.Phase.CIRCLING, "CIRCLING");
+        assertEquals(CraftEnderDragon.getBukkitPhase(EnderDragonPhase.STRAFE_PLAYER), EnderDragon.Phase.STRAFING, "STRAFING");
+        assertEquals(CraftEnderDragon.getBukkitPhase(EnderDragonPhase.LANDING_APPROACH), EnderDragon.Phase.FLY_TO_PORTAL, "FLY_TO_PORTAL");
+        assertEquals(CraftEnderDragon.getBukkitPhase(EnderDragonPhase.LANDING), EnderDragon.Phase.LAND_ON_PORTAL, "LAND_ON_PORTAL");
+        assertEquals(CraftEnderDragon.getBukkitPhase(EnderDragonPhase.TAKEOFF), EnderDragon.Phase.LEAVE_PORTAL, "LEAVE_PORTAL");
+        assertEquals(CraftEnderDragon.getBukkitPhase(EnderDragonPhase.SITTING_FLAMING), EnderDragon.Phase.BREATH_ATTACK, "BREATH_ATTACK");
+        assertEquals(CraftEnderDragon.getBukkitPhase(EnderDragonPhase.SITTING_SCANNING), EnderDragon.Phase.SEARCH_FOR_BREATH_ATTACK_TARGET, "SEARCH_FOR_BREATH_ATTACK_TARGET");
+        assertEquals(CraftEnderDragon.getBukkitPhase(EnderDragonPhase.SITTING_ATTACKING), EnderDragon.Phase.ROAR_BEFORE_ATTACK, "ROAR_BEFORE_ATTACK");
+        assertEquals(CraftEnderDragon.getBukkitPhase(EnderDragonPhase.CHARGING_PLAYER), EnderDragon.Phase.CHARGE_PLAYER, "CHARGE_PLAYER");
+        assertEquals(CraftEnderDragon.getBukkitPhase(EnderDragonPhase.DYING), EnderDragon.Phase.DYING, "DYING");
+        assertEquals(CraftEnderDragon.getBukkitPhase(EnderDragonPhase.HOVERING), EnderDragon.Phase.HOVER, "HOVER");
     }
 }
diff --git a/paper-server/src/test/java/org/bukkit/entity/EntityPoseTest.java b/paper-server/src/test/java/org/bukkit/entity/EntityPoseTest.java
index c1e1929e45..1c3694adc4 100644
--- a/paper-server/src/test/java/org/bukkit/entity/EntityPoseTest.java
+++ b/paper-server/src/test/java/org/bukkit/entity/EntityPoseTest.java
@@ -1,7 +1,8 @@
 package org.bukkit.entity;
 
 import static org.junit.jupiter.api.Assertions.*;
-import net.minecraft.world.entity.EntityPose;
+
+import net.minecraft.world.entity.Pose;
 import org.bukkit.support.environment.Normal;
 import org.junit.jupiter.api.Test;
 
@@ -11,14 +12,14 @@ public class EntityPoseTest {
     @Test
     public void testBukkitToMinecraft() {
         for (Pose pose : Pose.values()) {
-            assertNotNull(EntityPose.values()[pose.ordinal()], pose.name());
+            assertNotNull(Pose.values()[pose.ordinal()], pose.name());
         }
     }
 
     @Test
     public void testMinecraftToBukkit() {
-        for (EntityPose entityPose : EntityPose.values()) {
-            assertNotNull(Pose.values()[entityPose.ordinal()], entityPose.name());
+        for (Pose entityPose : Pose.values()) {
+            assertNotNull(org.bukkit.entity.Pose.values()[entityPose.ordinal()], entityPose.name());
         }
     }
 }
diff --git a/paper-server/src/test/java/org/bukkit/entity/EntityTypesTest.java b/paper-server/src/test/java/org/bukkit/entity/EntityTypesTest.java
index 146510cd5c..9df52ab0f0 100644
--- a/paper-server/src/test/java/org/bukkit/entity/EntityTypesTest.java
+++ b/paper-server/src/test/java/org/bukkit/entity/EntityTypesTest.java
@@ -5,8 +5,8 @@ import java.util.Arrays;
 import java.util.Set;
 import java.util.stream.Collectors;
 import net.minecraft.core.registries.BuiltInRegistries;
-import net.minecraft.resources.MinecraftKey;
-import net.minecraft.world.entity.EntityTypes;
+import net.minecraft.resources.ResourceLocation;
+import net.minecraft.world.entity.EntityType;
 import org.bukkit.support.environment.AllFeatures;
 import org.junit.jupiter.api.Test;
 
@@ -17,10 +17,10 @@ public class EntityTypesTest {
     public void testMaps() {
         Set<EntityType> allBukkit = Arrays.stream(EntityType.values()).filter((b) -> b.getName() != null).collect(Collectors.toSet());
 
-        for (EntityTypes<?> nms : BuiltInRegistries.ENTITY_TYPE) {
-            MinecraftKey key = EntityTypes.getKey(nms);
+        for (EntityType<?> nms : BuiltInRegistries.ENTITY_TYPE) {
+            ResourceLocation key = EntityType.getKey(nms);
 
-            EntityType bukkit = EntityType.fromName(key.getPath());
+            org.bukkit.entity.EntityType bukkit = org.bukkit.entity.EntityType.fromName(key.getPath());
             assertNotNull(bukkit, "Missing nms->bukkit " + key);
 
             assertTrue(allBukkit.remove(bukkit), "Duplicate entity nms->" + bukkit);
@@ -31,7 +31,7 @@ public class EntityTypesTest {
 
     @Test
     public void testTranslationKey() {
-        for (EntityType entityType : EntityType.values()) {
+        for (org.bukkit.entity.EntityType entityType : org.bukkit.entity.EntityType.values()) {
             // Currently EntityType#getTranslationKey has a validation for null name then for test skip this and check correct names.
             if (entityType.getName() != null) {
                 assertNotNull(entityType.getTranslationKey(), "Nulllable translation key for " + entityType);
diff --git a/paper-server/src/test/java/org/bukkit/entity/PandaGeneTest.java b/paper-server/src/test/java/org/bukkit/entity/PandaGeneTest.java
index 5ba726b6b3..4a3ac959f0 100644
--- a/paper-server/src/test/java/org/bukkit/entity/PandaGeneTest.java
+++ b/paper-server/src/test/java/org/bukkit/entity/PandaGeneTest.java
@@ -1,7 +1,8 @@
 package org.bukkit.entity;
 
 import static org.junit.jupiter.api.Assertions.*;
-import net.minecraft.world.entity.animal.EntityPanda;
+
+import net.minecraft.world.entity.animal.Panda;
 import org.bukkit.craftbukkit.entity.CraftPanda;
 import org.bukkit.support.environment.Normal;
 import org.junit.jupiter.api.Test;
@@ -12,7 +13,7 @@ public class PandaGeneTest {
     @Test
     public void testBukkit() {
         for (Panda.Gene gene : Panda.Gene.values()) {
-            EntityPanda.Gene nms = CraftPanda.toNms(gene);
+            Panda.Gene nms = CraftPanda.toNms(gene);
 
             assertNotNull(nms, "NMS gene null for " + gene);
             assertEquals(gene.isRecessive(), nms.isRecessive(), "Recessive status did not match " + gene);
@@ -22,8 +23,8 @@ public class PandaGeneTest {
 
     @Test
     public void testNMS() {
-        for (EntityPanda.Gene gene : EntityPanda.Gene.values()) {
-            Panda.Gene bukkit = CraftPanda.fromNms(gene);
+        for (Panda.Gene gene : Panda.Gene.values()) {
+            org.bukkit.entity.Panda.Gene bukkit = CraftPanda.fromNms(gene);
 
             assertNotNull(bukkit, "Bukkit gene null for " + gene);
             assertEquals(gene.isRecessive(), bukkit.isRecessive(), "Recessive status did not match " + gene);
diff --git a/paper-server/src/test/java/org/bukkit/entity/SpawnCategoryTest.java b/paper-server/src/test/java/org/bukkit/entity/SpawnCategoryTest.java
index e5fb357531..62816aadf2 100644
--- a/paper-server/src/test/java/org/bukkit/entity/SpawnCategoryTest.java
+++ b/paper-server/src/test/java/org/bukkit/entity/SpawnCategoryTest.java
@@ -1,6 +1,6 @@
 package org.bukkit.entity;
 
-import net.minecraft.world.entity.EnumCreatureType;
+import net.minecraft.world.entity.MobCategory;
 import org.bukkit.craftbukkit.util.CraftSpawnCategory;
 import org.bukkit.support.environment.Normal;
 import org.junit.jupiter.api.Test;
@@ -10,7 +10,7 @@ public class SpawnCategoryTest {
 
     @Test
     public void testMatch() {
-        for (EnumCreatureType enumCreatureType : EnumCreatureType.values()) {
+        for (MobCategory enumCreatureType : MobCategory.values()) {
             // If it is missing a convert to Bukkit then throw a UnsupportedOperationException
             SpawnCategory spawnCategory = CraftSpawnCategory.toBukkit(enumCreatureType);
 
@@ -23,7 +23,7 @@ public class SpawnCategoryTest {
 
         for (SpawnCategory spawnCategory : SpawnCategory.values()) {
             // If it is missing a convert to NMS then throw a UnsupportedOperationException
-            EnumCreatureType enumCreatureType = CraftSpawnCategory.toNMS(spawnCategory);
+            MobCategory enumCreatureType = CraftSpawnCategory.toNMS(spawnCategory);
         }
     }
 }
diff --git a/paper-server/src/test/java/org/bukkit/entity/TropicalFishTest.java b/paper-server/src/test/java/org/bukkit/entity/TropicalFishTest.java
index c70e90904f..4175cab793 100644
--- a/paper-server/src/test/java/org/bukkit/entity/TropicalFishTest.java
+++ b/paper-server/src/test/java/org/bukkit/entity/TropicalFishTest.java
@@ -13,28 +13,28 @@ public class TropicalFishTest {
 
     @Test
     public void testVariants() {
-        testVariant(65536, DyeColor.ORANGE, DyeColor.WHITE, Pattern.KOB);
-        testVariant(917504, DyeColor.RED, DyeColor.WHITE, Pattern.KOB);
-        testVariant(918273, DyeColor.RED, DyeColor.WHITE, Pattern.BLOCKFISH);
-        testVariant(918529, DyeColor.RED, DyeColor.WHITE, Pattern.BETTY);
-        testVariant(16778497, DyeColor.WHITE, DyeColor.ORANGE, Pattern.CLAYFISH);
-        testVariant(50660352, DyeColor.LIME, DyeColor.LIGHT_BLUE, Pattern.BRINELY);
-        testVariant(50726144, DyeColor.PINK, DyeColor.LIGHT_BLUE, Pattern.SPOTTY);
-        testVariant(50790656, DyeColor.GRAY, DyeColor.LIGHT_BLUE, Pattern.SUNSTREAK);
-        testVariant(67108865, DyeColor.WHITE, DyeColor.YELLOW, Pattern.FLOPPER);
-        testVariant(67110144, DyeColor.WHITE, DyeColor.YELLOW, Pattern.SPOTTY);
-        testVariant(67371265, DyeColor.YELLOW, DyeColor.YELLOW, Pattern.STRIPEY);
-        testVariant(67764993, DyeColor.PURPLE, DyeColor.YELLOW, Pattern.BLOCKFISH);
-        testVariant(101253888, DyeColor.CYAN, DyeColor.PINK, Pattern.DASHER);
-        testVariant(117441025, DyeColor.WHITE, DyeColor.GRAY, Pattern.GLITTER);
-        testVariant(117441280, DyeColor.WHITE, DyeColor.GRAY, Pattern.DASHER);
-        testVariant(117441536, DyeColor.WHITE, DyeColor.GRAY, Pattern.BRINELY);
-        testVariant(117506305, DyeColor.ORANGE, DyeColor.GRAY, Pattern.STRIPEY);
-        testVariant(117899265, DyeColor.GRAY, DyeColor.GRAY, Pattern.FLOPPER);
-        testVariant(118161664, DyeColor.BLUE, DyeColor.GRAY, Pattern.SUNSTREAK);
-        testVariant(134217984, DyeColor.WHITE, DyeColor.LIGHT_GRAY, Pattern.SUNSTREAK);
-        testVariant(234882305, DyeColor.WHITE, DyeColor.RED, Pattern.CLAYFISH);
-        testVariant(235340288, DyeColor.GRAY, DyeColor.RED, Pattern.SNOOPER);
+        this.testVariant(65536, DyeColor.ORANGE, DyeColor.WHITE, Pattern.KOB);
+        this.testVariant(917504, DyeColor.RED, DyeColor.WHITE, Pattern.KOB);
+        this.testVariant(918273, DyeColor.RED, DyeColor.WHITE, Pattern.BLOCKFISH);
+        this.testVariant(918529, DyeColor.RED, DyeColor.WHITE, Pattern.BETTY);
+        this.testVariant(16778497, DyeColor.WHITE, DyeColor.ORANGE, Pattern.CLAYFISH);
+        this.testVariant(50660352, DyeColor.LIME, DyeColor.LIGHT_BLUE, Pattern.BRINELY);
+        this.testVariant(50726144, DyeColor.PINK, DyeColor.LIGHT_BLUE, Pattern.SPOTTY);
+        this.testVariant(50790656, DyeColor.GRAY, DyeColor.LIGHT_BLUE, Pattern.SUNSTREAK);
+        this.testVariant(67108865, DyeColor.WHITE, DyeColor.YELLOW, Pattern.FLOPPER);
+        this.testVariant(67110144, DyeColor.WHITE, DyeColor.YELLOW, Pattern.SPOTTY);
+        this.testVariant(67371265, DyeColor.YELLOW, DyeColor.YELLOW, Pattern.STRIPEY);
+        this.testVariant(67764993, DyeColor.PURPLE, DyeColor.YELLOW, Pattern.BLOCKFISH);
+        this.testVariant(101253888, DyeColor.CYAN, DyeColor.PINK, Pattern.DASHER);
+        this.testVariant(117441025, DyeColor.WHITE, DyeColor.GRAY, Pattern.GLITTER);
+        this.testVariant(117441280, DyeColor.WHITE, DyeColor.GRAY, Pattern.DASHER);
+        this.testVariant(117441536, DyeColor.WHITE, DyeColor.GRAY, Pattern.BRINELY);
+        this.testVariant(117506305, DyeColor.ORANGE, DyeColor.GRAY, Pattern.STRIPEY);
+        this.testVariant(117899265, DyeColor.GRAY, DyeColor.GRAY, Pattern.FLOPPER);
+        this.testVariant(118161664, DyeColor.BLUE, DyeColor.GRAY, Pattern.SUNSTREAK);
+        this.testVariant(134217984, DyeColor.WHITE, DyeColor.LIGHT_GRAY, Pattern.SUNSTREAK);
+        this.testVariant(234882305, DyeColor.WHITE, DyeColor.RED, Pattern.CLAYFISH);
+        this.testVariant(235340288, DyeColor.GRAY, DyeColor.RED, Pattern.SNOOPER);
     }
 
     private void testVariant(int variant, DyeColor bodyColor, DyeColor patternColor, Pattern pattern) {
diff --git a/paper-server/src/test/java/org/bukkit/event/EntityRemoveEventTest.java b/paper-server/src/test/java/org/bukkit/event/EntityRemoveEventTest.java
index b5fd6d205f..87b1f48797 100644
--- a/paper-server/src/test/java/org/bukkit/event/EntityRemoveEventTest.java
+++ b/paper-server/src/test/java/org/bukkit/event/EntityRemoveEventTest.java
@@ -45,7 +45,7 @@ public class EntityRemoveEventTest {
 
                 if (instruction instanceof MethodInsnNode methodInsnNode) {
                     // Check for discard and remove method call
-                    if (check(methodInsnNode.owner, methodInsnNode.name, methodInsnNode.desc)) {
+                    if (this.check(methodInsnNode.owner, methodInsnNode.name, methodInsnNode.desc)) {
                         // Add to list
                         missingReason.add(String.format("Method name: %s, name: %s, line number: %s", methodNode.name, methodInsnNode.name, lastLineNumber.line));
                     }
@@ -58,7 +58,7 @@ public class EntityRemoveEventTest {
 
                     Handle handle = (Handle) dynamicInsnNode.bsmArgs[1];
 
-                    if (check(handle.getOwner(), handle.getName(), handle.getDesc())) {
+                    if (this.check(handle.getOwner(), handle.getName(), handle.getDesc())) {
                         // Add to list
                         missingReason.add(String.format("[D] Method name: %s, name: %s, line number: %s", methodNode.name, handle.getName(), lastLineNumber.line));
                     }
@@ -93,7 +93,7 @@ public class EntityRemoveEventTest {
 
     private boolean check(String owner, String name, String desc) throws ClassNotFoundException {
         if (!name.equals("discard") && !name.equals("remove") && !name.equals("setRemoved")) {
-            if (!checkExtraMethod(owner, name, desc)) {
+            if (!this.checkExtraMethod(owner, name, desc)) {
                 return false;
             }
         }
@@ -102,7 +102,7 @@ public class EntityRemoveEventTest {
             return false;
         }
 
-        Class<?> ownerClass = Class.forName(owner.replace('/', '.'), false, getClass().getClassLoader());
+        Class<?> ownerClass = Class.forName(owner.replace('/', '.'), false, this.getClass().getClassLoader());
 
         // Found missing discard, remove or setRemoved method call
         return EntityAccess.class.isAssignableFrom(ownerClass);
diff --git a/paper-server/src/test/java/org/bukkit/generator/structure/StructureTest.java b/paper-server/src/test/java/org/bukkit/generator/structure/StructureTest.java
index ad8c112e5e..cbfc533ed8 100644
--- a/paper-server/src/test/java/org/bukkit/generator/structure/StructureTest.java
+++ b/paper-server/src/test/java/org/bukkit/generator/structure/StructureTest.java
@@ -4,9 +4,8 @@ import static org.junit.jupiter.api.Assertions.*;
 import java.lang.reflect.Field;
 import java.lang.reflect.Modifier;
 import java.util.Locale;
-import net.minecraft.core.IRegistry;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.resources.MinecraftKey;
+import net.minecraft.resources.ResourceLocation;
 import org.bukkit.NamespacedKey;
 import org.bukkit.Registry;
 import org.bukkit.craftbukkit.CraftRegistry;
@@ -34,9 +33,9 @@ public class StructureTest {
 
     @Test
     public void testMinecraftToBukkitFieldName() {
-        IRegistry<net.minecraft.world.level.levelgen.structure.Structure> structureBuiltInRegistries = CraftRegistry.getMinecraftRegistry(Registries.STRUCTURE);
+        net.minecraft.core.Registry<net.minecraft.world.level.levelgen.structure.Structure> structureBuiltInRegistries = CraftRegistry.getMinecraftRegistry(Registries.STRUCTURE);
         for (net.minecraft.world.level.levelgen.structure.Structure structure : structureBuiltInRegistries) {
-            MinecraftKey minecraftKey = structureBuiltInRegistries.getKey(structure);
+            ResourceLocation minecraftKey = structureBuiltInRegistries.getKey(structure);
 
             try {
                 Structure bukkit = (Structure) Structure.class.getField(minecraftKey.getPath().toUpperCase(Locale.ROOT)).get(null);
diff --git a/paper-server/src/test/java/org/bukkit/generator/structure/StructureTypeTest.java b/paper-server/src/test/java/org/bukkit/generator/structure/StructureTypeTest.java
index 0f0ef765d6..78fa3f3166 100644
--- a/paper-server/src/test/java/org/bukkit/generator/structure/StructureTypeTest.java
+++ b/paper-server/src/test/java/org/bukkit/generator/structure/StructureTypeTest.java
@@ -6,7 +6,7 @@ import java.lang.reflect.Modifier;
 import java.util.Locale;
 import net.minecraft.core.registries.BuiltInRegistries;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.resources.MinecraftKey;
+import net.minecraft.resources.ResourceLocation;
 import org.bukkit.NamespacedKey;
 import org.bukkit.Registry;
 import org.bukkit.craftbukkit.CraftRegistry;
@@ -35,7 +35,7 @@ public class StructureTypeTest {
     @Test
     public void testMinecraftToBukkitFieldName() {
         for (net.minecraft.world.level.levelgen.structure.StructureType<?> structureType : CraftRegistry.getMinecraftRegistry(Registries.STRUCTURE_TYPE)) {
-            MinecraftKey minecraftKey = BuiltInRegistries.STRUCTURE_TYPE.getKey(structureType);
+            ResourceLocation minecraftKey = BuiltInRegistries.STRUCTURE_TYPE.getKey(structureType);
 
             try {
                 StructureType bukkit = (StructureType) StructureType.class.getField(minecraftKey.getPath().toUpperCase(Locale.ROOT)).get(null);
diff --git a/paper-server/src/test/java/org/bukkit/map/MapTest.java b/paper-server/src/test/java/org/bukkit/map/MapTest.java
index 161c39d6b6..51ee862f3e 100644
--- a/paper-server/src/test/java/org/bukkit/map/MapTest.java
+++ b/paper-server/src/test/java/org/bukkit/map/MapTest.java
@@ -5,7 +5,7 @@ import java.awt.Color;
 import java.util.concurrent.ExecutionException;
 import java.util.logging.Level;
 import java.util.logging.Logger;
-import net.minecraft.world.level.material.MaterialMapColor;
+import net.minecraft.world.level.material.MapColor;
 import org.bukkit.craftbukkit.map.CraftMapColorCache;
 import org.bukkit.support.environment.Normal;
 import org.bukkit.support.environment.Slow;
@@ -20,7 +20,7 @@ public class MapTest {
     @Test
     @Normal
     public void testColors() {
-        MaterialMapColor[] nmsColors = MaterialMapColor.MATERIAL_COLORS;
+        MapColor[] nmsColors = MapColor.MATERIAL_COLORS;
         Color[] bukkitColors = MapPalette.colors;
 
         boolean fail = false;
@@ -35,23 +35,23 @@ public class MapTest {
             int b = rgb & 0xFF;
 
             if (i + 1 > bukkitColors.length / 4) {
-                for (int modi : modifiers) {
+                for (int modi : MapTest.modifiers) {
                     int mr = (r * modi) / 255;
                     int mg = (g * modi) / 255;
                     int mb = (b * modi) / 255;
-                    logger.log(Level.WARNING, "Missing color (check CraftMapView#render and update md5 hash in CraftMapColorCache): c({0}, {1}, {2})", new Object[]{mr, mg, mb});
+                    MapTest.logger.log(Level.WARNING, "Missing color (check CraftMapView#render and update md5 hash in CraftMapColorCache): c({0}, {1}, {2})", new Object[]{mr, mg, mb});
                 }
                 fail = true;
             } else {
-                for (int j = 0; j < modifiers.length; j++) {
-                    int modi = modifiers[j];
+                for (int j = 0; j < MapTest.modifiers.length; j++) {
+                    int modi = MapTest.modifiers[j];
                     Color bukkit = bukkitColors[i * 4 + j];
                     int mr = (r * modi) / 255;
                     int mg = (g * modi) / 255;
                     int mb = (b * modi) / 255;
 
                     if (bukkit.getRed() != mr || bukkit.getGreen() != mg || bukkit.getBlue() != mb) {
-                        logger.log(Level.WARNING, "Incorrect color: {6} {7} c({0}, {1}, {2}) != c({3}, {4}, {5})", new Object[]{
+                        MapTest.logger.log(Level.WARNING, "Incorrect color: {6} {7} c({0}, {1}, {2}) != c({3}, {4}, {5})", new Object[]{
                             bukkit.getRed(), bukkit.getGreen(), bukkit.getBlue(),
                             mr, mg, mb,
                             i, j
@@ -67,7 +67,7 @@ public class MapTest {
     @Test
     @Slow("Test takes around 25 seconds, should be run by changes to the map color conversion")
     public void testMapColorCacheBuilding() throws ExecutionException, InterruptedException {
-        CraftMapColorCache craftMapColorCache = new CraftMapColorCache(logger);
+        CraftMapColorCache craftMapColorCache = new CraftMapColorCache(MapTest.logger);
         craftMapColorCache.initCache().get();
 
         for (int r = 0; r < 256; r++) {
diff --git a/paper-server/src/test/java/org/bukkit/potion/PotionTest.java b/paper-server/src/test/java/org/bukkit/potion/PotionTest.java
index 08f516e9a5..b07e88813c 100644
--- a/paper-server/src/test/java/org/bukkit/potion/PotionTest.java
+++ b/paper-server/src/test/java/org/bukkit/potion/PotionTest.java
@@ -5,10 +5,10 @@ import java.util.EnumMap;
 import java.util.List;
 import java.util.Map;
 import net.minecraft.core.registries.BuiltInRegistries;
-import net.minecraft.resources.MinecraftKey;
+import net.minecraft.resources.ResourceLocation;
 import net.minecraft.world.effect.MobEffect;
-import net.minecraft.world.effect.MobEffectList;
-import net.minecraft.world.item.alchemy.PotionRegistry;
+import net.minecraft.world.effect.MobEffectInstance;
+import net.minecraft.world.item.alchemy.Potion;
 import org.bukkit.craftbukkit.legacy.FieldRename;
 import org.bukkit.craftbukkit.potion.CraftPotionEffectType;
 import org.bukkit.support.environment.AllFeatures;
@@ -19,8 +19,8 @@ public class PotionTest {
     @Test
     public void testEffectCompleteness() throws Throwable {
         Map<PotionType, String> effects = new EnumMap(PotionType.class);
-        for (PotionRegistry reg : BuiltInRegistries.POTION) {
-            List<MobEffect> eff = reg.getEffects();
+        for (Potion reg : BuiltInRegistries.POTION) {
+            List<MobEffectInstance> eff = reg.getEffects();
             if (eff.size() != 1) continue;
             PotionEffectType type = CraftPotionEffectType.minecraftHolderToBukkit(eff.get(0).getEffect());
             assertNotNull(type, String.valueOf(reg));
@@ -36,8 +36,8 @@ public class PotionTest {
 
     @Test
     public void testEffectType() {
-        for (MobEffectList nms : BuiltInRegistries.MOB_EFFECT) {
-            MinecraftKey key = BuiltInRegistries.MOB_EFFECT.getKey(nms);
+        for (MobEffect nms : BuiltInRegistries.MOB_EFFECT) {
+            ResourceLocation key = BuiltInRegistries.MOB_EFFECT.getKey(nms);
 
             PotionEffectType bukkit = CraftPotionEffectType.minecraftToBukkit(nms);
 
diff --git a/paper-server/src/test/java/org/bukkit/registry/PerRegistryTest.java b/paper-server/src/test/java/org/bukkit/registry/PerRegistryTest.java
index 9d52970414..18859eea52 100644
--- a/paper-server/src/test/java/org/bukkit/registry/PerRegistryTest.java
+++ b/paper-server/src/test/java/org/bukkit/registry/PerRegistryTest.java
@@ -23,7 +23,7 @@ public class PerRegistryTest {
 
     @BeforeAll
     public static void init() {
-        random = new Random();
+        PerRegistryTest.random = new Random();
     }
 
     public static Stream<Arguments> data() {
@@ -63,12 +63,12 @@ public class PerRegistryTest {
         registry.forEach(element -> {
             NamespacedKey key = element.getKey();
 
-            assertSameMatchWithKeyMessage(registry, element, key.toString()); // namespace:key
-            assertSameMatchWithKeyMessage(registry, element, key.getKey()); // key
-            assertSameMatchWithKeyMessage(registry, element, key.toString().replace('_', ' ')); // namespace:key with space
-            assertSameMatchWithKeyMessage(registry, element, key.getKey().replace('_', ' ')); // key with space
-            assertSameMatchWithKeyMessage(registry, element, randomizeCase(key.toString())); // nAmeSPaCe:kEY
-            assertSameMatchWithKeyMessage(registry, element, randomizeCase(key.getKey())); // kEy
+            this.assertSameMatchWithKeyMessage(registry, element, key.toString()); // namespace:key
+            this.assertSameMatchWithKeyMessage(registry, element, key.getKey()); // key
+            this.assertSameMatchWithKeyMessage(registry, element, key.toString().replace('_', ' ')); // namespace:key with space
+            this.assertSameMatchWithKeyMessage(registry, element, key.getKey().replace('_', ' ')); // key with space
+            this.assertSameMatchWithKeyMessage(registry, element, this.randomizeCase(key.toString())); // nAmeSPaCe:kEY
+            this.assertSameMatchWithKeyMessage(registry, element, this.randomizeCase(key.getKey())); // kEy
         });
     }
 
@@ -82,7 +82,7 @@ public class PerRegistryTest {
 
         for (int i = 0; i < size; i++) {
             char character = input.charAt(i);
-            builder.append(random.nextBoolean() ? Character.toUpperCase(character) : character);
+            builder.append(PerRegistryTest.random.nextBoolean() ? Character.toUpperCase(character) : character);
         }
 
         return builder.toString();
diff --git a/paper-server/src/test/java/org/bukkit/registry/RegistryClassTest.java b/paper-server/src/test/java/org/bukkit/registry/RegistryClassTest.java
index efb6bed5ee..297700b237 100644
--- a/paper-server/src/test/java/org/bukkit/registry/RegistryClassTest.java
+++ b/paper-server/src/test/java/org/bukkit/registry/RegistryClassTest.java
@@ -23,10 +23,9 @@ import java.util.jar.JarEntry;
 import java.util.jar.JarFile;
 import java.util.logging.Logger;
 import java.util.stream.Stream;
-import net.minecraft.core.IRegistry;
-import net.minecraft.core.IRegistryCustom;
-import net.minecraft.resources.MinecraftKey;
+import net.minecraft.core.RegistryAccess;
 import net.minecraft.resources.ResourceKey;
+import net.minecraft.resources.ResourceLocation;
 import net.minecraft.world.flag.FeatureElement;
 import net.minecraft.world.flag.FeatureFlags;
 import org.bukkit.Bukkit;
@@ -62,26 +61,26 @@ public class RegistryClassTest {
 
     private static final Map<Class<? extends Keyed>, Data> INIT_DATA = new HashMap<>();
     private static final List<Arguments> FIELD_DATA_CACHE = new ArrayList<>();
-    private static IRegistryCustom.Dimension vanilla_registry;
+    private static RegistryAccess.Frozen vanilla_registry;
 
     public static Stream<Arguments> fieldData() {
-        return FIELD_DATA_CACHE.stream();
+        return RegistryClassTest.FIELD_DATA_CACHE.stream();
     }
 
     @BeforeAll
     public static void init() {
-        initValueClasses();
-        initFieldDataCache();
+        RegistryClassTest.initValueClasses();
+        RegistryClassTest.initFieldDataCache();
     }
 
     @AfterAll
     public static void cleanUp() {
-        INIT_DATA.clear();
-        FIELD_DATA_CACHE.clear();
+        RegistryClassTest.INIT_DATA.clear();
+        RegistryClassTest.FIELD_DATA_CACHE.clear();
     }
 
     private static void initValueClasses() {
-        vanilla_registry = RegistryHelper.createRegistry(FeatureFlags.VANILLA_SET);
+        RegistryClassTest.vanilla_registry = RegistryHelper.createRegistry(FeatureFlags.VANILLA_SET);
 
         Map<Class<? extends Keyed>, List<NamespacedKey>> outsideRequest = new LinkedHashMap<>();
 
@@ -183,13 +182,13 @@ public class RegistryClassTest {
     private static void initFieldDataCache() {
         RegistriesArgumentProvider.getData().map(arguments -> {
             Class<? extends Keyed> type = (Class<? extends Keyed>) arguments.get()[0];
-            Map<String, List<Class<? extends Annotation>>> annotations = getFieldAnnotations(type);
+            Map<String, List<Class<? extends Annotation>>> annotations = RegistryClassTest.getFieldAnnotations(type);
 
             List<FieldData> fields = new ArrayList<>();
             for (Field field : type.getFields()) {
                 // We ignore each field that does not have the class itself as its type,
                 // is not static, public, or is deprecated.
-                if (!isValidField(type, field)) {
+                if (!RegistryClassTest.isValidField(type, field)) {
                     continue;
                 }
 
@@ -258,7 +257,7 @@ public class RegistryClassTest {
 
     @RegistriesTest
     public <T extends Keyed> void testOutsideRequests(Class<T> type) {
-        Data data = INIT_DATA.get(type);
+        Data data = RegistryClassTest.INIT_DATA.get(type);
 
         assertNotNull(data, String.format("No data present for %s. This should never happen since the same data source is used.\n"
                 + "Something has gone horribly wrong.", type));
@@ -288,7 +287,7 @@ public class RegistryClassTest {
 
     @RegistriesTest
     public <T extends Keyed> void testNoNullValuePresent(Class<T> type) {
-        Data data = INIT_DATA.get(type);
+        Data data = RegistryClassTest.INIT_DATA.get(type);
 
         assertNotNull(data, String.format("No data present for %s. This should never happen since the same data source is used.\n"
                 + "Something has gone horribly wrong.", type));
@@ -308,7 +307,7 @@ public class RegistryClassTest {
 
         for (Field field : type.getFields()) {
             // We ignore each field that does not have the class itself as its type, is not static, public, or is deprecated.
-            if (!isValidField(type, field)) {
+            if (!RegistryClassTest.isValidField(type, field)) {
                 continue;
             }
 
@@ -330,7 +329,7 @@ public class RegistryClassTest {
 
     @ParameterizedTest
     @MethodSource("fieldData")
-    public <T extends Keyed> void testExcessExperimentalAnnotation(Class<T> type, ResourceKey<IRegistry<?>> registryKey, List<FieldData> fieldDataList) throws IllegalAccessException {
+    public <T extends Keyed> void testExcessExperimentalAnnotation(Class<T> type, ResourceKey<net.minecraft.core.Registry<?>> registryKey, List<FieldData> fieldDataList) throws IllegalAccessException {
         List<Field> excess = new ArrayList<>();
 
         for (FieldData fieldData : fieldDataList) {
@@ -339,7 +338,7 @@ public class RegistryClassTest {
                 continue;
             }
 
-            IRegistry<?> registry = vanilla_registry.lookupOrThrow(registryKey);
+            net.minecraft.core.Registry<?> registry = RegistryClassTest.vanilla_registry.lookupOrThrow(registryKey);
 
             Optional<?> optionalValue = registry.getOptional(CraftNamespacedKey.toMinecraft(((Keyed) fieldData.field().get(null)).getKey()));
 
@@ -367,8 +366,8 @@ public class RegistryClassTest {
 
     @ParameterizedTest
     @MethodSource("fieldData")
-    public <T extends Keyed> void testMissingExperimentalAnnotation(Class<T> type, ResourceKey<IRegistry<?>> registryKey, List<FieldData> fieldDataList) throws IllegalAccessException {
-        IRegistry<?> registry = vanilla_registry.lookupOrThrow(registryKey);
+    public <T extends Keyed> void testMissingExperimentalAnnotation(Class<T> type, ResourceKey<net.minecraft.core.Registry<?>> registryKey, List<FieldData> fieldDataList) throws IllegalAccessException {
+        net.minecraft.core.Registry<?> registry = RegistryClassTest.vanilla_registry.lookupOrThrow(registryKey);
         List<Field> missing = new ArrayList<>();
 
         for (FieldData fieldData : fieldDataList) {
@@ -402,10 +401,10 @@ public class RegistryClassTest {
 
     @ParameterizedTest
     @MethodSource("fieldData")
-    public <T extends Keyed> void testExcessNullCheck(Class<T> type, ResourceKey<IRegistry<?>> registryKey, List<FieldData> fieldDataList) throws IllegalAccessException {
-        IRegistry<?> registry = vanilla_registry.lookupOrThrow(registryKey);
+    public <T extends Keyed> void testExcessNullCheck(Class<T> type, ResourceKey<net.minecraft.core.Registry<?>> registryKey, List<FieldData> fieldDataList) throws IllegalAccessException {
+        net.minecraft.core.Registry<?> registry = RegistryClassTest.vanilla_registry.lookupOrThrow(registryKey);
         List<Field> excess = new ArrayList<>();
-        Data data = INIT_DATA.get(type);
+        Data data = RegistryClassTest.INIT_DATA.get(type);
 
         for (FieldData fieldData : fieldDataList) {
             NamespacedKey key = ((Keyed) fieldData.field().get(null)).getKey();
@@ -433,10 +432,10 @@ public class RegistryClassTest {
 
     @ParameterizedTest
     @MethodSource("fieldData")
-    public <T extends Keyed> void testMissingNullCheck(Class<T> type, ResourceKey<IRegistry<?>> registryKey, List<FieldData> fieldDataList) throws IllegalAccessException {
-        IRegistry<?> registry = vanilla_registry.lookupOrThrow(registryKey);
+    public <T extends Keyed> void testMissingNullCheck(Class<T> type, ResourceKey<net.minecraft.core.Registry<?>> registryKey, List<FieldData> fieldDataList) throws IllegalAccessException {
+        net.minecraft.core.Registry<?> registry = RegistryClassTest.vanilla_registry.lookupOrThrow(registryKey);
         List<Field> missing = new ArrayList<>();
-        Data data = INIT_DATA.get(type);
+        Data data = RegistryClassTest.INIT_DATA.get(type);
 
         for (FieldData fieldData : fieldDataList) {
             NamespacedKey key = ((Keyed) fieldData.field().get(null)).getKey();
@@ -464,13 +463,13 @@ public class RegistryClassTest {
 
     @ParameterizedTest
     @MethodSource("fieldData")
-    public <T extends Keyed> void testMatchingFieldNames(Class<T> type, ResourceKey<IRegistry<?>> registryKey, List<FieldData> fieldDataList) throws IllegalAccessException {
+    public <T extends Keyed> void testMatchingFieldNames(Class<T> type, ResourceKey<net.minecraft.core.Registry<?>> registryKey, List<FieldData> fieldDataList) throws IllegalAccessException {
         Map<Field, NamespacedKey> notMatching = new LinkedHashMap<>();
 
         for (FieldData fieldData : fieldDataList) {
             NamespacedKey key = ((Keyed) fieldData.field().get(null)).getKey();
 
-            if (fieldData.field().getName().equals(convertToFieldName(key.getKey()))) {
+            if (fieldData.field().getName().equals(this.convertToFieldName(key.getKey()))) {
                 continue;
             }
 
@@ -490,19 +489,19 @@ public class RegistryClassTest {
 
     @ParameterizedTest
     @MethodSource("fieldData")
-    public <T extends Keyed> void testMissingConstants(Class<T> type, ResourceKey<IRegistry<?>> registryKey) throws IllegalAccessException {
-        IRegistry<Object> registry = RegistryHelper.getRegistry().lookupOrThrow(registryKey);
-        List<MinecraftKey> missingKeys = new ArrayList<>();
+    public <T extends Keyed> void testMissingConstants(Class<T> type, ResourceKey<net.minecraft.core.Registry<?>> registryKey) throws IllegalAccessException {
+        net.minecraft.core.Registry<Object> registry = RegistryHelper.getRegistry().lookupOrThrow(registryKey);
+        List<ResourceLocation> missingKeys = new ArrayList<>();
 
         for (Object nmsObject : registry) {
-            MinecraftKey minecraftKey = registry.getKey(nmsObject);
+            ResourceLocation minecraftKey = registry.getKey(nmsObject);
 
             try {
-                Field field = type.getField(convertToFieldName(minecraftKey.getPath()));
+                Field field = type.getField(this.convertToFieldName(minecraftKey.getPath()));
 
                 // Only fields which are not Deprecated
                 // and have the right registry item associated with the field count.
-                if (!isValidField(type, field)) {
+                if (!RegistryClassTest.isValidField(type, field)) {
                     missingKeys.add(minecraftKey);
                     continue;
                 }
diff --git a/paper-server/src/test/java/org/bukkit/registry/RegistryConstantsTest.java b/paper-server/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
index cff9bd134c..9654a6b8d5 100644
--- a/paper-server/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
+++ b/paper-server/src/test/java/org/bukkit/registry/RegistryConstantsTest.java
@@ -6,10 +6,9 @@ import java.lang.reflect.Modifier;
 import java.util.ArrayList;
 import java.util.List;
 import java.util.Locale;
-import net.minecraft.core.IRegistry;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.resources.MinecraftKey;
 import net.minecraft.resources.ResourceKey;
+import net.minecraft.resources.ResourceLocation;
 import org.bukkit.Keyed;
 import org.bukkit.NamespacedKey;
 import org.bukkit.Registry;
@@ -61,12 +60,12 @@ public class RegistryConstantsTest {
         assertTrue(excessKeys.isEmpty(), excessKeys.size() + " excess constants(s) in " + clazz.getSimpleName() + " that do not exist: " + excessKeys);
     }
 
-    private <T extends Keyed, M> void testMissingConstants(Class<T> clazz, ResourceKey<IRegistry<M>> nmsRegistryKey) {
-        List<MinecraftKey> missingKeys = new ArrayList<>();
+    private <T extends Keyed, M> void testMissingConstants(Class<T> clazz, ResourceKey<net.minecraft.core.Registry<M>> nmsRegistryKey) {
+        List<ResourceLocation> missingKeys = new ArrayList<>();
 
-        IRegistry<M> nmsRegistry = RegistryHelper.getRegistry().lookupOrThrow(nmsRegistryKey);
+        net.minecraft.core.Registry<M> nmsRegistry = RegistryHelper.getRegistry().lookupOrThrow(nmsRegistryKey);
         for (M nmsObject : nmsRegistry) {
-            MinecraftKey minecraftKey = nmsRegistry.getKey(nmsObject);
+            ResourceLocation minecraftKey = nmsRegistry.getKey(nmsObject);
 
             try {
                 @SuppressWarnings("unchecked")
diff --git a/paper-server/src/test/java/org/bukkit/registry/RegistryConversionTest.java b/paper-server/src/test/java/org/bukkit/registry/RegistryConversionTest.java
index c7450bb171..e97328b959 100644
--- a/paper-server/src/test/java/org/bukkit/registry/RegistryConversionTest.java
+++ b/paper-server/src/test/java/org/bukkit/registry/RegistryConversionTest.java
@@ -11,7 +11,6 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Map;
 import java.util.Set;
-import net.minecraft.core.IRegistry;
 import net.minecraft.resources.ResourceKey;
 import org.bukkit.Bukkit;
 import org.bukkit.Keyed;
@@ -59,14 +58,14 @@ public class RegistryConversionTest {
                 The following implementation do not implement Handleable:
                 %s""", clazz.getName(), Joiner.on('\n').join(notImplemented)));
 
-        IMPLEMENT_HANDLE_ABLE.add(clazz);
+        RegistryConversionTest.IMPLEMENT_HANDLE_ABLE.add(clazz);
     }
 
     @Order(2)
     @RegistriesTest
-    public void testMinecraftToBukkitPresent(Class<? extends Keyed> clazz, ResourceKey<IRegistry<?>> registryKey,
+    public void testMinecraftToBukkitPresent(Class<? extends Keyed> clazz, ResourceKey<net.minecraft.core.Registry<?>> registryKey,
                                              Class<? extends Keyed> craftClazz, Class<?> minecraftClazz, boolean newMethod) {
-        String methodName = (newMethod) ? MINECRAFT_TO_BUKKIT_NEW : MINECRAFT_TO_BUKKIT;
+        String methodName = (newMethod) ? RegistryConversionTest.MINECRAFT_TO_BUKKIT_NEW : RegistryConversionTest.MINECRAFT_TO_BUKKIT;
         Method method = null;
         try {
             method = craftClazz.getDeclaredMethod(methodName, minecraftClazz);
@@ -76,7 +75,7 @@ public class RegistryConversionTest {
 
                     Following method should be add which, returns the bukkit value based on the minecraft value.
                     %s
-                    """, craftClazz, buildMinecraftToBukkitMethod(clazz, methodName, minecraftClazz)));
+                    """, craftClazz, this.buildMinecraftToBukkitMethod(clazz, methodName, minecraftClazz)));
         }
 
         assertTrue(Modifier.isPublic(method.getModifiers()), String.format("""
@@ -84,23 +83,23 @@ public class RegistryConversionTest {
 
                 The method should be made public, method structure:
                 %s
-                """, methodName, craftClazz, buildMinecraftToBukkitMethod(clazz, methodName, minecraftClazz)));
+                """, methodName, craftClazz, this.buildMinecraftToBukkitMethod(clazz, methodName, minecraftClazz)));
 
         assertTrue(Modifier.isStatic(method.getModifiers()), String.format("""
                 The method %s in class %s is not static.
 
                 The method should be made static, method structure:
                 %s
-                """, methodName, craftClazz, buildMinecraftToBukkitMethod(clazz, methodName, minecraftClazz)));
+                """, methodName, craftClazz, this.buildMinecraftToBukkitMethod(clazz, methodName, minecraftClazz)));
 
         assertSame(clazz, method.getReturnType(), String.format("""
                 The method %s in class %s has the wrong return value.
 
                 The method should have the correct return value, method structure:
                 %s
-                """, methodName, craftClazz, buildMinecraftToBukkitMethod(clazz, methodName, minecraftClazz)));
+                """, methodName, craftClazz, this.buildMinecraftToBukkitMethod(clazz, methodName, minecraftClazz)));
 
-        MINECRAFT_TO_BUKKIT_METHODS.put(clazz, method);
+        RegistryConversionTest.MINECRAFT_TO_BUKKIT_METHODS.put(clazz, method);
     }
 
     private String buildMinecraftToBukkitMethod(Class<? extends Keyed> clazz, String methodName, Class<?> minecraftClazz) {
@@ -113,9 +112,9 @@ public class RegistryConversionTest {
 
     @Order(2)
     @RegistriesTest
-    public void testBukkitToMinecraftPresent(Class<? extends Keyed> clazz, ResourceKey<IRegistry<?>> registryKey,
+    public void testBukkitToMinecraftPresent(Class<? extends Keyed> clazz, ResourceKey<net.minecraft.core.Registry<?>> registryKey,
                                              Class<? extends Keyed> craftClazz, Class<?> minecraftClazz, boolean newMethod) {
-        String methodName = (newMethod) ? BUKKIT_TO_MINECRAFT_NEW : BUKKIT_TO_MINECRAFT;
+        String methodName = (newMethod) ? RegistryConversionTest.BUKKIT_TO_MINECRAFT_NEW : RegistryConversionTest.BUKKIT_TO_MINECRAFT;
         Method method = null;
         try {
             method = craftClazz.getDeclaredMethod(methodName, clazz);
@@ -125,7 +124,7 @@ public class RegistryConversionTest {
 
                     Following method should be add which, returns the minecraft value based on the bukkit value.
                     %s
-                    """, craftClazz, buildBukkitToMinecraftMethod(clazz, methodName, minecraftClazz)));
+                    """, craftClazz, this.buildBukkitToMinecraftMethod(clazz, methodName, minecraftClazz)));
         }
 
         assertTrue(Modifier.isPublic(method.getModifiers()), String.format("""
@@ -133,23 +132,23 @@ public class RegistryConversionTest {
 
                 The method should be made public, method structure:
                 %s
-                """, methodName, craftClazz, buildBukkitToMinecraftMethod(clazz, methodName, minecraftClazz)));
+                """, methodName, craftClazz, this.buildBukkitToMinecraftMethod(clazz, methodName, minecraftClazz)));
 
         assertTrue(Modifier.isStatic(method.getModifiers()), String.format("""
                 The method %s in class %s is not static.
 
                 The method should be made static, method structure:
                 %s
-                """, methodName, craftClazz, buildBukkitToMinecraftMethod(clazz, methodName, minecraftClazz)));
+                """, methodName, craftClazz, this.buildBukkitToMinecraftMethod(clazz, methodName, minecraftClazz)));
 
         assertSame(minecraftClazz, method.getReturnType(), String.format("""
                 The method %s in class %s has the wrong return value.
 
                 The method should have the correct return value, method structure:
                 %s
-                """, methodName, craftClazz, buildBukkitToMinecraftMethod(clazz, methodName, minecraftClazz)));
+                """, methodName, craftClazz, this.buildBukkitToMinecraftMethod(clazz, methodName, minecraftClazz)));
 
-        BUKKIT_TO_MINECRAFT_METHODS.put(clazz, method);
+        RegistryConversionTest.BUKKIT_TO_MINECRAFT_METHODS.put(clazz, method);
     }
 
     private String buildBukkitToMinecraftMethod(Class<? extends Keyed> clazz, String methodName, Class<?> minecraftClazz) {
@@ -163,49 +162,49 @@ public class RegistryConversionTest {
     @Order(2)
     @RegistriesTest
     public void testMinecraftToBukkitNullValue(Class<? extends Keyed> clazz) throws IllegalAccessException {
-        checkValidMinecraftToBukkit(clazz);
+        this.checkValidMinecraftToBukkit(clazz);
 
         try {
-            Object result = MINECRAFT_TO_BUKKIT_METHODS.get(clazz).invoke(null, (Object) null);
+            Object result = RegistryConversionTest.MINECRAFT_TO_BUKKIT_METHODS.get(clazz).invoke(null, (Object) null);
             fail(String.format("""
                     Method %s in class %s should not accept null values and should throw a IllegalArgumentException.
                     Got '%s' as return object.
-                    """, MINECRAFT_TO_BUKKIT, clazz.getName(), result));
+                    """, RegistryConversionTest.MINECRAFT_TO_BUKKIT, clazz.getName(), result));
         } catch (InvocationTargetException e) {
             // #invoke wraps the error in a InvocationTargetException, so we need to check it this way
             assertSame(IllegalArgumentException.class, e.getCause().getClass(), String.format("""
                     Method %s in class %s should not accept null values and should throw a IllegalArgumentException.
-                    """, MINECRAFT_TO_BUKKIT, clazz.getName()));
+                    """, RegistryConversionTest.MINECRAFT_TO_BUKKIT, clazz.getName()));
         }
     }
 
     @Order(3)
     @RegistriesTest
     public void testBukkitToMinecraftNullValue(Class<? extends Keyed> clazz) throws IllegalAccessException {
-        checkValidBukkitToMinecraft(clazz);
+        this.checkValidBukkitToMinecraft(clazz);
 
         try {
-            Object result = BUKKIT_TO_MINECRAFT_METHODS.get(clazz).invoke(null, (Object) null);
+            Object result = RegistryConversionTest.BUKKIT_TO_MINECRAFT_METHODS.get(clazz).invoke(null, (Object) null);
             fail(String.format("""
                     Method %s in class %s should not accept null values and should throw a IllegalArgumentException.
                     Got '%s' as return object.
-                    """, BUKKIT_TO_MINECRAFT, clazz.getName(), result));
+                    """, RegistryConversionTest.BUKKIT_TO_MINECRAFT, clazz.getName(), result));
         } catch (InvocationTargetException e) {
             // #invoke wraps the error in a InvocationTargetException, so we need to check it this way
             assertSame(IllegalArgumentException.class, e.getCause().getClass(), String.format("""
                     Method %s in class %s should not accept null values and should throw a IllegalArgumentException.
-                    """, BUKKIT_TO_MINECRAFT, clazz.getName()));
+                    """, RegistryConversionTest.BUKKIT_TO_MINECRAFT, clazz.getName()));
         }
     }
 
     @Order(3)
     @RegistriesTest
     public void testMinecraftToBukkit(Class<? extends Keyed> clazz) {
-        checkValidMinecraftToBukkit(clazz);
-        checkValidHandle(clazz);
+        this.checkValidMinecraftToBukkit(clazz);
+        this.checkValidHandle(clazz);
 
         Map<Object, Object> notMatching = new HashMap<>();
-        Method method = MINECRAFT_TO_BUKKIT_METHODS.get(clazz);
+        Method method = RegistryConversionTest.MINECRAFT_TO_BUKKIT_METHODS.get(clazz);
 
         RegistryArgumentProvider.getValues(clazz).map(Arguments::get).forEach(arguments -> {
             Keyed bukkit = (Keyed) arguments[0];
@@ -225,18 +224,18 @@ public class RegistryConversionTest {
                         The method %s in class %s does not match all registry items correctly.
 
                         Following registry items where match not correctly:
-                        %s""", MINECRAFT_TO_BUKKIT, clazz.getName(),
+                        %s""", RegistryConversionTest.MINECRAFT_TO_BUKKIT, clazz.getName(),
                 Joiner.on('\n').withKeyValueSeparator(" got: ").join(notMatching)));
     }
 
     @Order(3)
     @RegistriesTest
     public void testBukkitToMinecraft(Class<? extends Keyed> clazz) {
-        checkValidBukkitToMinecraft(clazz);
-        checkValidHandle(clazz);
+        this.checkValidBukkitToMinecraft(clazz);
+        this.checkValidHandle(clazz);
 
         Map<Object, Object> notMatching = new HashMap<>();
-        Method method = BUKKIT_TO_MINECRAFT_METHODS.get(clazz);
+        Method method = RegistryConversionTest.BUKKIT_TO_MINECRAFT_METHODS.get(clazz);
 
         RegistryArgumentProvider.getValues(clazz).map(Arguments::get).forEach(arguments -> {
             Keyed bukkit = (Keyed) arguments[0];
@@ -256,7 +255,7 @@ public class RegistryConversionTest {
                         The method %s in class %s does not match all registry items correctly.
 
                         Following registry items where match not correctly:
-                        %s""", BUKKIT_TO_MINECRAFT, clazz.getName(),
+                        %s""", RegistryConversionTest.BUKKIT_TO_MINECRAFT, clazz.getName(),
                 Joiner.on('\n').withKeyValueSeparator(" got: ").join(notMatching)));
     }
 
@@ -266,44 +265,44 @@ public class RegistryConversionTest {
      */
     @Order(3)
     @RegistriesTest
-    public void testMinecraftToBukkitNoValidMinecraft(Class<? extends Keyed> clazz, ResourceKey<IRegistry<?>> registryKey,
+    public void testMinecraftToBukkitNoValidMinecraft(Class<? extends Keyed> clazz, ResourceKey<net.minecraft.core.Registry<?>> registryKey,
                                                       Class<? extends Keyed> craftClazz, Class<?> minecraftClazz) throws IllegalAccessException {
-        checkValidMinecraftToBukkit(clazz);
+        this.checkValidMinecraftToBukkit(clazz);
 
         try {
 
             Object minecraft = mock(minecraftClazz);
-            Object result = MINECRAFT_TO_BUKKIT_METHODS.get(clazz).invoke(null, minecraft);
+            Object result = RegistryConversionTest.MINECRAFT_TO_BUKKIT_METHODS.get(clazz).invoke(null, minecraft);
             fail(String.format("""
                     Method %s in class %s should not accept a none registered value and should throw a IllegalStateException.
                     Got '%s' as return object.
-                    """, MINECRAFT_TO_BUKKIT, clazz.getName(), result));
+                    """, RegistryConversionTest.MINECRAFT_TO_BUKKIT, clazz.getName(), result));
         } catch (InvocationTargetException e) {
             // #invoke wraps the error in a InvocationTargetException, so we need to check it this way
             assertSame(IllegalStateException.class, e.getCause().getClass(), String.format("""
                     Method %s in class %s should not accept a none registered value and should throw a IllegalStateException.
-                    """, MINECRAFT_TO_BUKKIT, clazz.getName()));
+                    """, RegistryConversionTest.MINECRAFT_TO_BUKKIT, clazz.getName()));
         }
     }
 
     private void checkValidBukkitToMinecraft(Class<? extends Keyed> clazz) {
-        assumeTrue(BUKKIT_TO_MINECRAFT_METHODS.containsKey(clazz), String.format("""
+        assumeTrue(RegistryConversionTest.BUKKIT_TO_MINECRAFT_METHODS.containsKey(clazz), String.format("""
                 Cannot test class %s, because it does not have a valid %s method.
 
                 Check test results of testBukkitToMinecraftPresent for more information.
-                """, clazz.getName(), BUKKIT_TO_MINECRAFT));
+                """, clazz.getName(), RegistryConversionTest.BUKKIT_TO_MINECRAFT));
     }
 
     private void checkValidMinecraftToBukkit(Class<? extends Keyed> clazz) {
-        assumeTrue(MINECRAFT_TO_BUKKIT_METHODS.containsKey(clazz), String.format("""
+        assumeTrue(RegistryConversionTest.MINECRAFT_TO_BUKKIT_METHODS.containsKey(clazz), String.format("""
                 Cannot test class %s, because it does not have a valid %s method.
 
                 Check test results of testMinecraftToBukkitPresent for more information.
-                """, clazz.getName(), MINECRAFT_TO_BUKKIT));
+                """, clazz.getName(), RegistryConversionTest.MINECRAFT_TO_BUKKIT));
     }
 
     private void checkValidHandle(Class<? extends Keyed> clazz) {
-        assumeTrue(IMPLEMENT_HANDLE_ABLE.contains(clazz), String.format("""
+        assumeTrue(RegistryConversionTest.IMPLEMENT_HANDLE_ABLE.contains(clazz), String.format("""
                 Cannot test class %s, because it does not implement Handleable.
 
                 Check test results of testHandleableImplementation for more information.
diff --git a/paper-server/src/test/java/org/bukkit/registry/RegistryLoadOrderTest.java b/paper-server/src/test/java/org/bukkit/registry/RegistryLoadOrderTest.java
index f743977389..52f057a3b8 100644
--- a/paper-server/src/test/java/org/bukkit/registry/RegistryLoadOrderTest.java
+++ b/paper-server/src/test/java/org/bukkit/registry/RegistryLoadOrderTest.java
@@ -6,11 +6,10 @@ import java.util.Optional;
 import java.util.function.BiFunction;
 import java.util.function.Supplier;
 import java.util.stream.Stream;
-import net.minecraft.core.IRegistry;
+import net.minecraft.core.MappedRegistry;
 import net.minecraft.core.RegistrationInfo;
-import net.minecraft.core.RegistryMaterials;
-import net.minecraft.resources.MinecraftKey;
 import net.minecraft.resources.ResourceKey;
+import net.minecraft.resources.ResourceLocation;
 import org.bukkit.Keyed;
 import org.bukkit.NamespacedKey;
 import org.bukkit.Registry;
@@ -31,14 +30,14 @@ public class RegistryLoadOrderTest {
     public static Stream<Arguments> data() {
         return Stream.of(
                 Arguments.of(
-                        (Supplier<Boolean>) () -> initInterface,
+                        (Supplier<Boolean>) () -> RegistryLoadOrderTest.initInterface,
                         BukkitInterfaceTestType.class,
                         (BiFunction<NamespacedKey, MinecraftTestType, Keyed>) CraftBukkitInterfaceTestType::new,
                         (Supplier<Keyed>) () -> BukkitInterfaceTestType.TEST_ONE,
                         (Supplier<Keyed>) () -> BukkitInterfaceTestType.TEST_TWO
                 ),
                 Arguments.of(
-                        (Supplier<Boolean>) () -> initAbstract,
+                        (Supplier<Boolean>) () -> RegistryLoadOrderTest.initAbstract,
                         BukkitAbstractTestType.class,
                         (BiFunction<NamespacedKey, MinecraftTestType, Keyed>) CraftBukkitAbstractTestType::new,
                         (Supplier<Keyed>) () -> BukkitAbstractTestType.TEST_ONE,
@@ -50,21 +49,21 @@ public class RegistryLoadOrderTest {
     @ParameterizedTest
     @MethodSource("data")
     public void testRegistryLoadOrder(Supplier<Boolean> init, Class<Keyed> keyedClass, BiFunction<NamespacedKey, MinecraftTestType, Keyed> minecraftToBukkit, Supplier<Keyed> first, Supplier<Keyed> second) {
-        testClassNotLoaded(init.get());
+        this.testClassNotLoaded(init.get());
 
-        ResourceKey<IRegistry<MinecraftTestType>> resourceKey = ResourceKey.createRegistryKey(MinecraftKey.tryBuild("bukkit", "test-registry"));
-        RegistryMaterials<MinecraftTestType> minecraftRegistry = new RegistryMaterials<>(resourceKey, Lifecycle.experimental());
+        ResourceKey<net.minecraft.core.Registry<MinecraftTestType>> resourceKey = ResourceKey.createRegistryKey(ResourceLocation.tryBuild("bukkit", "test-registry"));
+        MappedRegistry<MinecraftTestType> minecraftRegistry = new MappedRegistry<>(resourceKey, Lifecycle.experimental());
 
-        minecraftRegistry.register(ResourceKey.create(resourceKey, MinecraftKey.tryBuild("bukkit", "test-one")), new MinecraftTestType(), new RegistrationInfo(Optional.empty(), Lifecycle.experimental()));
-        minecraftRegistry.register(ResourceKey.create(resourceKey, MinecraftKey.tryBuild("bukkit", "test-two")), new MinecraftTestType(), new RegistrationInfo(Optional.empty(), Lifecycle.experimental()));
+        minecraftRegistry.register(ResourceKey.create(resourceKey, ResourceLocation.tryBuild("bukkit", "test-one")), new MinecraftTestType(), new RegistrationInfo(Optional.empty(), Lifecycle.experimental()));
+        minecraftRegistry.register(ResourceKey.create(resourceKey, ResourceLocation.tryBuild("bukkit", "test-two")), new MinecraftTestType(), new RegistrationInfo(Optional.empty(), Lifecycle.experimental()));
         minecraftRegistry.freeze();
 
-        registry = new CraftRegistry<>(keyedClass, minecraftRegistry, minecraftToBukkit, (namespacedKey, apiVersion) -> namespacedKey);
-        testClassNotLoaded(init.get());
+        RegistryLoadOrderTest.registry = new CraftRegistry<>(keyedClass, minecraftRegistry, minecraftToBukkit, (namespacedKey, apiVersion) -> namespacedKey);
+        this.testClassNotLoaded(init.get());
 
-        Object testOne = registry.get(new NamespacedKey("bukkit", "test-one"));
-        Object otherTestOne = registry.get(new NamespacedKey("bukkit", "test-one"));
-        Object testTwo = registry.get(new NamespacedKey("bukkit", "test-two"));
+        Object testOne = RegistryLoadOrderTest.registry.get(new NamespacedKey("bukkit", "test-one"));
+        Object otherTestOne = RegistryLoadOrderTest.registry.get(new NamespacedKey("bukkit", "test-one"));
+        Object testTwo = RegistryLoadOrderTest.registry.get(new NamespacedKey("bukkit", "test-two"));
 
         assertNotNull(testOne);
         assertNotNull(otherTestOne);
@@ -89,16 +88,16 @@ public class RegistryLoadOrderTest {
     }
 
     public interface BukkitInterfaceTestType extends Keyed {
-        BukkitInterfaceTestType TEST_ONE = get("test-one");
-        BukkitInterfaceTestType TEST_TWO = get("test-two");
+        BukkitInterfaceTestType TEST_ONE = BukkitInterfaceTestType.get("test-one");
+        BukkitInterfaceTestType TEST_TWO = BukkitInterfaceTestType.get("test-two");
 
         private static BukkitInterfaceTestType get(String key) {
-            initInterface = true;
-            if (registry == null) {
+            RegistryLoadOrderTest.initInterface = true;
+            if (RegistryLoadOrderTest.registry == null) {
                 return null;
             }
 
-            return (BukkitInterfaceTestType) registry.get(new NamespacedKey("bukkit", key));
+            return (BukkitInterfaceTestType) RegistryLoadOrderTest.registry.get(new NamespacedKey("bukkit", key));
         }
     }
 
@@ -113,21 +112,21 @@ public class RegistryLoadOrderTest {
         @NotNull
         @Override
         public NamespacedKey getKey() {
-            return key;
+            return this.key;
         }
     }
 
     public abstract static class BukkitAbstractTestType implements Keyed {
-        public static final BukkitAbstractTestType TEST_ONE = get("test-one");
-        public static final BukkitAbstractTestType TEST_TWO = get("test-two");
+        public static final BukkitAbstractTestType TEST_ONE = BukkitAbstractTestType.get("test-one");
+        public static final BukkitAbstractTestType TEST_TWO = BukkitAbstractTestType.get("test-two");
 
         private static BukkitAbstractTestType get(String key) {
-            initAbstract = true;
-            if (registry == null) {
+            RegistryLoadOrderTest.initAbstract = true;
+            if (RegistryLoadOrderTest.registry == null) {
                 return null;
             }
 
-            return (BukkitAbstractTestType) registry.get(new NamespacedKey("bukkit", key));
+            return (BukkitAbstractTestType) RegistryLoadOrderTest.registry.get(new NamespacedKey("bukkit", key));
         }
     }
 
@@ -142,7 +141,7 @@ public class RegistryLoadOrderTest {
         @NotNull
         @Override
         public NamespacedKey getKey() {
-            return key;
+            return this.key;
         }
     }
 
diff --git a/paper-server/src/test/java/org/bukkit/support/DummyServerHelper.java b/paper-server/src/test/java/org/bukkit/support/DummyServerHelper.java
index fa6a70ecd2..a678510df2 100644
--- a/paper-server/src/test/java/org/bukkit/support/DummyServerHelper.java
+++ b/paper-server/src/test/java/org/bukkit/support/DummyServerHelper.java
@@ -5,13 +5,10 @@ import com.google.common.base.Preconditions;
 import java.util.logging.Logger;
 import net.minecraft.core.registries.BuiltInRegistries;
 import net.minecraft.core.registries.Registries;
-import net.minecraft.resources.MinecraftKey;
 import net.minecraft.resources.ResourceKey;
 import net.minecraft.tags.TagKey;
-import net.minecraft.world.entity.EntityTypes;
 import net.minecraft.world.item.Item;
 import net.minecraft.world.level.block.Block;
-import net.minecraft.world.level.material.FluidType;
 import org.bukkit.Material;
 import org.bukkit.Server;
 import org.bukkit.craftbukkit.CraftLootTable;
diff --git a/paper-server/src/test/java/org/bukkit/support/LegacyHelper.java b/paper-server/src/test/java/org/bukkit/support/LegacyHelper.java
index 0552a6fa16..25e999bf5d 100644
--- a/paper-server/src/test/java/org/bukkit/support/LegacyHelper.java
+++ b/paper-server/src/test/java/org/bukkit/support/LegacyHelper.java
@@ -24,6 +24,6 @@ public final class LegacyHelper {
     }
 
     public static List<Material> getInvalidatedMaterials() {
-        return INVALIDATED_MATERIALS;
+        return LegacyHelper.INVALIDATED_MATERIALS;
     }
 }
diff --git a/paper-server/src/test/java/org/bukkit/support/Matchers.java b/paper-server/src/test/java/org/bukkit/support/Matchers.java
index 324bbc7367..2204c32561 100644
--- a/paper-server/src/test/java/org/bukkit/support/Matchers.java
+++ b/paper-server/src/test/java/org/bukkit/support/Matchers.java
@@ -16,17 +16,17 @@ public final class Matchers {
         private final int expected;
 
         SameHash(T object) {
-            expected = object.hashCode();
+            this.expected = object.hashCode();
         }
 
         @Override
         public boolean matches(Object item) {
-            return item.hashCode() == expected;
+            return item.hashCode() == this.expected;
         }
 
         @Override
         public void describeTo(Description description) {
-            description.appendValue(expected);
+            description.appendValue(this.expected);
         }
     }
 }
diff --git a/paper-server/src/test/java/org/bukkit/support/RegistryHelper.java b/paper-server/src/test/java/org/bukkit/support/RegistryHelper.java
index d729b17254..f9ed3fd96c 100644
--- a/paper-server/src/test/java/org/bukkit/support/RegistryHelper.java
+++ b/paper-server/src/test/java/org/bukkit/support/RegistryHelper.java
@@ -4,66 +4,66 @@ import com.google.common.util.concurrent.MoreExecutors;
 import java.util.List;
 import java.util.Locale;
 import net.minecraft.SharedConstants;
-import net.minecraft.commands.CommandDispatcher;
+import net.minecraft.commands.Commands;
 import net.minecraft.core.HolderLookup;
-import net.minecraft.core.IRegistry;
-import net.minecraft.core.IRegistryCustom;
 import net.minecraft.core.LayeredRegistryAccess;
+import net.minecraft.core.Registry;
+import net.minecraft.core.RegistryAccess;
 import net.minecraft.core.registries.Registries;
 import net.minecraft.resources.RegistryDataLoader;
-import net.minecraft.server.DataPackResources;
-import net.minecraft.server.DispenserRegistry;
+import net.minecraft.server.Bootstrap;
 import net.minecraft.server.RegistryLayer;
-import net.minecraft.server.packs.EnumResourcePackType;
-import net.minecraft.server.packs.repository.ResourcePackLoader;
-import net.minecraft.server.packs.repository.ResourcePackRepository;
-import net.minecraft.server.packs.repository.ResourcePackSourceVanilla;
-import net.minecraft.server.packs.resources.IResourceManager;
+import net.minecraft.server.ReloadableServerResources;
+import net.minecraft.server.packs.PackType;
+import net.minecraft.server.packs.repository.Pack;
+import net.minecraft.server.packs.repository.PackRepository;
+import net.minecraft.server.packs.repository.ServerPacksSource;
+import net.minecraft.server.packs.resources.MultiPackResourceManager;
 import net.minecraft.server.packs.resources.ResourceManager;
-import net.minecraft.tags.TagDataPack;
+import net.minecraft.tags.TagLoader;
 import net.minecraft.world.flag.FeatureFlagSet;
-import net.minecraft.world.level.biome.BiomeBase;
+import net.minecraft.world.level.biome.Biome;
 import org.bukkit.Keyed;
 import org.bukkit.NamespacedKey;
 
 public final class RegistryHelper {
 
-    private static DataPackResources dataPack;
-    private static IRegistryCustom.Dimension registry;
-    private static IRegistry<BiomeBase> biomes;
+    private static ReloadableServerResources dataPack;
+    private static RegistryAccess.Frozen registry;
+    private static Registry<Biome> biomes;
 
     private RegistryHelper() {
     }
 
-    public static DataPackResources getDataPack() {
-        if (dataPack == null) {
-            throwError("dataPack");
+    public static ReloadableServerResources getDataPack() {
+        if (RegistryHelper.dataPack == null) {
+            RegistryHelper.throwError("dataPack");
         }
-        return dataPack;
+        return RegistryHelper.dataPack;
     }
 
-    public static IRegistryCustom.Dimension getRegistry() {
-        if (registry == null) {
-            throwError("registry");
+    public static RegistryAccess.Frozen getRegistry() {
+        if (RegistryHelper.registry == null) {
+            RegistryHelper.throwError("registry");
         }
-        return registry;
+        return RegistryHelper.registry;
     }
 
-    public static IRegistry<BiomeBase> getBiomes() {
-        if (biomes == null) {
-            throwError("biomes");
+    public static Registry<Biome> getBiomes() {
+        if (RegistryHelper.biomes == null) {
+            RegistryHelper.throwError("biomes");
         }
-        return biomes;
+        return RegistryHelper.biomes;
     }
 
-    public static IRegistryCustom.Dimension createRegistry(FeatureFlagSet featureFlagSet) {
-        ResourceManager ireloadableresourcemanager = createResourceManager(featureFlagSet);
+    public static RegistryAccess.Frozen createRegistry(FeatureFlagSet featureFlagSet) {
+        MultiPackResourceManager ireloadableresourcemanager = RegistryHelper.createResourceManager(featureFlagSet);
         // add tags and loot tables for unit tests
         LayeredRegistryAccess<RegistryLayer> layeredregistryaccess = RegistryLayer.createRegistryAccess();
-        List<IRegistry.a<?>> list = TagDataPack.loadTagsForExistingRegistries(ireloadableresourcemanager, layeredregistryaccess.getLayer(RegistryLayer.STATIC));
-        IRegistryCustom.Dimension iregistrycustom_dimension = layeredregistryaccess.getAccessForLoading(RegistryLayer.WORLDGEN);
-        List<HolderLookup.b<?>> list1 = TagDataPack.buildUpdatedLookups(iregistrycustom_dimension, list);
-        IRegistryCustom.Dimension iregistrycustom_dimension1 = RegistryDataLoader.load((IResourceManager) ireloadableresourcemanager, list1, RegistryDataLoader.WORLDGEN_REGISTRIES);
+        List<Registry.PendingTags<?>> list = TagLoader.loadTagsForExistingRegistries(ireloadableresourcemanager, layeredregistryaccess.getLayer(RegistryLayer.STATIC));
+        RegistryAccess.Frozen iregistrycustom_dimension = layeredregistryaccess.getAccessForLoading(RegistryLayer.WORLDGEN);
+        List<HolderLookup.RegistryLookup<?>> list1 = TagLoader.buildUpdatedLookups(iregistrycustom_dimension, list);
+        RegistryAccess.Frozen iregistrycustom_dimension1 = RegistryDataLoader.load((ResourceManager) ireloadableresourcemanager, list1, RegistryDataLoader.WORLDGEN_REGISTRIES);
         LayeredRegistryAccess<RegistryLayer> layers = layeredregistryaccess.replaceFrom(RegistryLayer.WORLDGEN, iregistrycustom_dimension1);
 
         return layers.compositeAccess().freeze();
@@ -71,23 +71,23 @@ public final class RegistryHelper {
 
     public static void setup(FeatureFlagSet featureFlagSet) {
         SharedConstants.tryDetectVersion();
-        DispenserRegistry.bootStrap();
+        Bootstrap.bootStrap();
 
-        ResourceManager ireloadableresourcemanager = createResourceManager(featureFlagSet);
+        MultiPackResourceManager ireloadableresourcemanager = RegistryHelper.createResourceManager(featureFlagSet);
         // add tags and loot tables for unit tests
         LayeredRegistryAccess<RegistryLayer> layeredregistryaccess = RegistryLayer.createRegistryAccess();
-        List<IRegistry.a<?>> list = TagDataPack.loadTagsForExistingRegistries(ireloadableresourcemanager, layeredregistryaccess.getLayer(RegistryLayer.STATIC));
-        IRegistryCustom.Dimension iregistrycustom_dimension = layeredregistryaccess.getAccessForLoading(RegistryLayer.WORLDGEN);
-        List<HolderLookup.b<?>> list1 = TagDataPack.buildUpdatedLookups(iregistrycustom_dimension, list);
-        IRegistryCustom.Dimension iregistrycustom_dimension1 = RegistryDataLoader.load((IResourceManager) ireloadableresourcemanager, list1, RegistryDataLoader.WORLDGEN_REGISTRIES);
+        List<Registry.PendingTags<?>> list = TagLoader.loadTagsForExistingRegistries(ireloadableresourcemanager, layeredregistryaccess.getLayer(RegistryLayer.STATIC));
+        RegistryAccess.Frozen iregistrycustom_dimension = layeredregistryaccess.getAccessForLoading(RegistryLayer.WORLDGEN);
+        List<HolderLookup.RegistryLookup<?>> list1 = TagLoader.buildUpdatedLookups(iregistrycustom_dimension, list);
+        RegistryAccess.Frozen iregistrycustom_dimension1 = RegistryDataLoader.load((ResourceManager) ireloadableresourcemanager, list1, RegistryDataLoader.WORLDGEN_REGISTRIES);
         LayeredRegistryAccess<RegistryLayer> layers = layeredregistryaccess.replaceFrom(RegistryLayer.WORLDGEN, iregistrycustom_dimension1);
-        registry = layers.compositeAccess().freeze();
+        RegistryHelper.registry = layers.compositeAccess().freeze();
         // Register vanilla pack
-        dataPack = DataPackResources.loadResources(ireloadableresourcemanager, layers, list, featureFlagSet, CommandDispatcher.ServerType.DEDICATED, 0, MoreExecutors.directExecutor(), MoreExecutors.directExecutor()).join();
+        RegistryHelper.dataPack = ReloadableServerResources.loadResources(ireloadableresourcemanager, layers, list, featureFlagSet, Commands.CommandSelection.DEDICATED, 0, MoreExecutors.directExecutor(), MoreExecutors.directExecutor()).join();
         // Bind tags
-        dataPack.updateStaticRegistryTags();
+        RegistryHelper.dataPack.updateStaticRegistryTags();
         // Biome shortcut
-        biomes = registry.lookupOrThrow(Registries.BIOME);
+        RegistryHelper.biomes = RegistryHelper.registry.lookupOrThrow(Registries.BIOME);
     }
 
     public static <T extends Keyed> Class<T> updateClass(Class<T> aClass, NamespacedKey key) {
@@ -104,12 +104,12 @@ public final class RegistryHelper {
         return theClass;
     }
 
-    private static ResourceManager createResourceManager(FeatureFlagSet featureFlagSet) {
+    private static MultiPackResourceManager createResourceManager(FeatureFlagSet featureFlagSet) {
         // Populate available packs
-        ResourcePackRepository resourceRepository = ResourcePackSourceVanilla.createVanillaTrustedRepository();
+        PackRepository resourceRepository = ServerPacksSource.createVanillaTrustedRepository();
         resourceRepository.reload();
         // Set up resource manager
-        return new ResourceManager(EnumResourcePackType.SERVER_DATA, resourceRepository.getAvailablePacks().stream().filter(pack -> pack.getRequestedFeatures().isSubsetOf(featureFlagSet)).map(ResourcePackLoader::open).toList());
+        return new MultiPackResourceManager(PackType.SERVER_DATA, resourceRepository.getAvailablePacks().stream().filter(pack -> pack.getRequestedFeatures().isSubsetOf(featureFlagSet)).map(Pack::open).toList());
     }
 
     private static void throwError(String field) {
diff --git a/paper-server/src/test/java/org/bukkit/support/extension/AllFeaturesExtension.java b/paper-server/src/test/java/org/bukkit/support/extension/AllFeaturesExtension.java
index f759b6c978..e9eb521419 100644
--- a/paper-server/src/test/java/org/bukkit/support/extension/AllFeaturesExtension.java
+++ b/paper-server/src/test/java/org/bukkit/support/extension/AllFeaturesExtension.java
@@ -24,11 +24,11 @@ public class AllFeaturesExtension extends BaseExtension {
     }
 
     public static <T extends Keyed> Registry<T> getRealRegistry(Class<T> clazz) {
-        return (Registry<T>) realRegistries.get(clazz);
+        return (Registry<T>) AllFeaturesExtension.realRegistries.get(clazz);
     }
 
     public static Map<Class<? extends Keyed>, Registry<?>> getRealRegistries() {
-        return realRegistries;
+        return AllFeaturesExtension.realRegistries;
     }
 
     @Override
diff --git a/paper-server/src/test/java/org/bukkit/support/extension/BaseExtension.java b/paper-server/src/test/java/org/bukkit/support/extension/BaseExtension.java
index 0c02dbbc5a..780988a699 100644
--- a/paper-server/src/test/java/org/bukkit/support/extension/BaseExtension.java
+++ b/paper-server/src/test/java/org/bukkit/support/extension/BaseExtension.java
@@ -27,50 +27,50 @@ public abstract class BaseExtension implements BeforeAllCallback, BeforeEachCall
 
     @Override
     public final void beforeAll(ExtensionContext extensionContext) throws Exception {
-        if (!isTestCase(extensionContext)) {
+        if (!this.isTestCase(extensionContext)) {
             return;
         }
 
-        checkRunBeforeOnce(extensionContext);
+        this.checkRunBeforeOnce(extensionContext);
     }
 
     @Override
     public final void beforeEach(ExtensionContext extensionContext) throws Exception {
-        if (!isTestCase(extensionContext)) {
+        if (!this.isTestCase(extensionContext)) {
             return;
         }
 
-        checkRunBeforeOnce(extensionContext);
-        runBeforeEach(extensionContext);
+        this.checkRunBeforeOnce(extensionContext);
+        this.runBeforeEach(extensionContext);
     }
 
     private boolean isTestCase(ExtensionContext extensionContext) {
-        if (currentlyRunning != null) {
-            return testSuite.equals(currentlyRunning);
+        if (BaseExtension.currentlyRunning != null) {
+            return this.testSuite.equals(BaseExtension.currentlyRunning);
         }
 
         Optional<String> runningTestSuite = extensionContext.getConfigurationParameter("TestSuite");
         if (runningTestSuite.isPresent()) {
             // We are inside a test suite, check if it is the test suite from this extension
-            if (!runningTestSuite.get().equals(testSuite)) {
+            if (!runningTestSuite.get().equals(this.testSuite)) {
                 return false;
             }
 
-            currentlyRunning = testSuite;
-            logger.info("Running tests with environment: " + testSuite);
+            BaseExtension.currentlyRunning = this.testSuite;
+            this.logger.info("Running tests with environment: " + this.testSuite);
             return true;
         }
 
         Set<String> tags = new HashSet<>(extensionContext.getTags());
-        tags.removeAll(IGNORE_TAGS);
+        tags.removeAll(BaseExtension.IGNORE_TAGS);
 
-        if (!tags.contains(testSuite)) {
+        if (!tags.contains(this.testSuite)) {
             fail(String.format("""
                     Extension was triggered without the tag for the test suite being present. This should not happen.
                     Did you forget to add @Tag to a new environment annotation? Or maybe a spelling mistake?
 
                     Expected %s, but found:
-                    %s""", testSuite, Joiner.on('\n').join(tags)));
+                    %s""", this.testSuite, Joiner.on('\n').join(tags)));
             return false; // Will never reach ):
         }
 
@@ -89,18 +89,18 @@ public abstract class BaseExtension implements BeforeAllCallback, BeforeEachCall
             return false; // Will never reach ):
         }
 
-        currentlyRunning = testSuite;
-        logger.info("Running tests with environment: " + testSuite);
+        BaseExtension.currentlyRunning = this.testSuite;
+        this.logger.info("Running tests with environment: " + this.testSuite);
         return true;
     }
 
     private void checkRunBeforeOnce(ExtensionContext extensionContext) {
-        if (run) {
+        if (BaseExtension.run) {
             return;
         }
 
-        init(extensionContext);
-        run = true;
+        this.init(extensionContext);
+        BaseExtension.run = true;
     }
 
     abstract void init(ExtensionContext extensionContext);
diff --git a/paper-server/src/test/java/org/bukkit/support/extension/NormalExtension.java b/paper-server/src/test/java/org/bukkit/support/extension/NormalExtension.java
index 1dae017504..8b5dcc4d0e 100644
--- a/paper-server/src/test/java/org/bukkit/support/extension/NormalExtension.java
+++ b/paper-server/src/test/java/org/bukkit/support/extension/NormalExtension.java
@@ -4,7 +4,7 @@ import static org.mockito.ArgumentMatchers.*;
 import static org.mockito.Mockito.*;
 import java.util.HashMap;
 import java.util.Map;
-import net.minecraft.core.IRegistryCustom;
+import net.minecraft.core.RegistryAccess;
 import net.minecraft.world.flag.FeatureFlags;
 import org.bukkit.Bukkit;
 import org.bukkit.Keyed;
@@ -48,7 +48,7 @@ public class NormalExtension extends BaseExtension {
                 });
 
 
-        IRegistryCustom registry = mock(withSettings().stubOnly().defaultAnswer(DEFAULT_ANSWER));
+        RegistryAccess registry = mock(withSettings().stubOnly().defaultAnswer(NormalExtension.DEFAULT_ANSWER));
         CraftRegistry.setMinecraftRegistry(registry);
     }
 
@@ -58,7 +58,7 @@ public class NormalExtension extends BaseExtension {
 
     private <T extends Keyed> Registry<T> createMockBukkitRegistry(Class<T> keyed) {
         Map<NamespacedKey, T> mocks = new HashMap<>();
-        Registry<T> registry = mock(withSettings().stubOnly().defaultAnswer(DEFAULT_ANSWER));
+        Registry<T> registry = mock(withSettings().stubOnly().defaultAnswer(NormalExtension.DEFAULT_ANSWER));
 
         doAnswer(invocation ->
                 mocks.computeIfAbsent(invocation.getArgument(0), k -> mock(RegistryHelper.updateClass(keyed, invocation.getArgument(0)), withSettings().stubOnly().defaultAnswer(DEFAULT_ANSWER)))
diff --git a/paper-server/src/test/java/org/bukkit/support/provider/ClassNodeArgumentProvider.java b/paper-server/src/test/java/org/bukkit/support/provider/ClassNodeArgumentProvider.java
index 522d3fdc1f..44eae40868 100644
--- a/paper-server/src/test/java/org/bukkit/support/provider/ClassNodeArgumentProvider.java
+++ b/paper-server/src/test/java/org/bukkit/support/provider/ClassNodeArgumentProvider.java
@@ -24,7 +24,7 @@ public class ClassNodeArgumentProvider implements ArgumentsProvider, AnnotationC
         this.excludedClasses = classNodeTest.excludedClasses();
         this.excludedPackages = classNodeTest.excludedPackages();
 
-        for (int i = 0; i < excludedPackages.length; i++) {
+        for (int i = 0; i < this.excludedPackages.length; i++) {
             this.excludedPackages[i] = this.excludedPackages[i].replace('.', '/');
         }
     }
@@ -32,16 +32,16 @@ public class ClassNodeArgumentProvider implements ArgumentsProvider, AnnotationC
     @Override
     public Stream<? extends Arguments> provideArguments(ExtensionContext extensionContext) throws Exception {
         ClassReaderArgumentProvider classReaderArgumentProvider = new ClassReaderArgumentProvider();
-        classReaderArgumentProvider.accept(new ClassReaderArguments(classReaderClassType(), excludedClasses, excludedPackages));
+        classReaderArgumentProvider.accept(new ClassReaderArguments(this.classReaderClassType(), this.excludedClasses, this.excludedPackages));
 
         return classReaderArgumentProvider.getClassReaders().map(this::toClassNode).map(Arguments::of);
     }
 
     private ClassReaderTest.ClassType[] classReaderClassType() {
-        ClassReaderTest.ClassType[] newValues = new ClassReaderTest.ClassType[classTypes.length];
+        ClassReaderTest.ClassType[] newValues = new ClassReaderTest.ClassType[this.classTypes.length];
 
-        for (int i = 0; i < classTypes.length; i++) {
-            newValues[i] = switch (classTypes[i]) {
+        for (int i = 0; i < this.classTypes.length; i++) {
+            newValues[i] = switch (this.classTypes[i]) {
                 case BUKKIT -> ClassReaderTest.ClassType.BUKKIT;
                 case CRAFT_BUKKIT -> ClassReaderTest.ClassType.CRAFT_BUKKIT;
                 case MINECRAFT_UNMODIFIED -> ClassReaderTest.ClassType.MINECRAFT_UNMODIFIED;
diff --git a/paper-server/src/test/java/org/bukkit/support/provider/ClassReaderArgumentProvider.java b/paper-server/src/test/java/org/bukkit/support/provider/ClassReaderArgumentProvider.java
index f025491032..5386eee2ff 100644
--- a/paper-server/src/test/java/org/bukkit/support/provider/ClassReaderArgumentProvider.java
+++ b/paper-server/src/test/java/org/bukkit/support/provider/ClassReaderArgumentProvider.java
@@ -52,34 +52,34 @@ public class ClassReaderArgumentProvider implements ArgumentsProvider, Annotatio
         this.excludedClasses = classReaderTest.excludedClasses();
         this.excludedPackages = classReaderTest.excludedPackages();
 
-        for (int i = 0; i < excludedPackages.length; i++) {
+        for (int i = 0; i < this.excludedPackages.length; i++) {
             this.excludedPackages[i] = this.excludedPackages[i].replace('.', '/');
         }
     }
 
     @Override
     public Stream<? extends Arguments> provideArguments(ExtensionContext extensionContext) throws Exception {
-        return getClassReaders().map(Arguments::of);
+        return this.getClassReaders().map(Arguments::of);
     }
 
     public Stream<ClassReader> getClassReaders() {
-        assertNotEquals(CRAFT_BUKKIT_CLASSES, MINECRAFT_CLASSES, """
+        assertNotEquals(ClassReaderArgumentProvider.CRAFT_BUKKIT_CLASSES, ClassReaderArgumentProvider.MINECRAFT_CLASSES, """
                 The Minecraft and CraftBukkit uri point to the same directory / file.
                 Please make sure the CRAFT_BUKKIT_CLASSES points to the test class directory and MINECRAFT_CLASSES to the minecraft server jar.
                 """);
 
         Stream<InputStream> result = Stream.empty();
 
-        if (contains(ClassReaderTest.ClassType.MINECRAFT_UNMODIFIED)) {
-            result = Stream.concat(result, readMinecraftClasses());
+        if (this.contains(ClassReaderTest.ClassType.MINECRAFT_UNMODIFIED)) {
+            result = Stream.concat(result, this.readMinecraftClasses());
         }
 
-        if (contains(ClassReaderTest.ClassType.CRAFT_BUKKIT) || contains(ClassReaderTest.ClassType.MINECRAFT_MODIFIED)) {
-            result = Stream.concat(result, readCraftBukkitAndOrMinecraftModifiedClasses(contains(ClassReaderTest.ClassType.CRAFT_BUKKIT), contains(ClassReaderTest.ClassType.MINECRAFT_MODIFIED)));
+        if (this.contains(ClassReaderTest.ClassType.CRAFT_BUKKIT) || this.contains(ClassReaderTest.ClassType.MINECRAFT_MODIFIED)) {
+            result = Stream.concat(result, this.readCraftBukkitAndOrMinecraftModifiedClasses(this.contains(ClassReaderTest.ClassType.CRAFT_BUKKIT), this.contains(ClassReaderTest.ClassType.MINECRAFT_MODIFIED)));
         }
 
-        if (contains(ClassReaderTest.ClassType.BUKKIT)) {
-            result = Stream.concat(result, readBukkitClasses());
+        if (this.contains(ClassReaderTest.ClassType.BUKKIT)) {
+            result = Stream.concat(result, this.readBukkitClasses());
         }
 
         return result.map(this::toClassReader);
@@ -94,7 +94,7 @@ public class ClassReaderArgumentProvider implements ArgumentsProvider, Annotatio
     }
 
     private boolean contains(ClassReaderTest.ClassType classType) {
-        for (ClassReaderTest.ClassType c : classTypes) {
+        for (ClassReaderTest.ClassType c : this.classTypes) {
             if (c == classType) {
                 return true;
             }
@@ -104,21 +104,21 @@ public class ClassReaderArgumentProvider implements ArgumentsProvider, Annotatio
     }
 
     private Stream<InputStream> readMinecraftClasses() {
-        return readJarFile(MINECRAFT_CLASSES, true);
+        return this.readJarFile(ClassReaderArgumentProvider.MINECRAFT_CLASSES, true);
     }
 
     private Stream<InputStream> readBukkitClasses() {
-        return readJarFile(BUKKIT_CLASSES, false);
+        return this.readJarFile(ClassReaderArgumentProvider.BUKKIT_CLASSES, false);
     }
 
     private Stream<InputStream> readJarFile(URI uri, boolean filterModified) {
         try {
             JarFile jarFile = new JarFile(new File(uri));
-            return jarFile.stream().onClose(() -> closeJarFile(jarFile))
+            return jarFile.stream().onClose(() -> this.closeJarFile(jarFile))
                     .filter(entry -> entry.getName().endsWith(".class"))
-                    .filter(entry -> filterModifiedIfNeeded(entry, filterModified))
-                    .filter(entry -> filterPackageNames(entry.getName()))
-                    .filter(entry -> filterClass(entry.getName()))
+                    .filter(entry -> this.filterModifiedIfNeeded(entry, filterModified))
+                    .filter(entry -> this.filterPackageNames(entry.getName()))
+                    .filter(entry -> this.filterClass(entry.getName()))
                     .map(entry -> {
                         try {
                             return jarFile.getInputStream(entry);
@@ -136,11 +136,11 @@ public class ClassReaderArgumentProvider implements ArgumentsProvider, Annotatio
             return true;
         }
 
-        return !new File(CRAFT_BUKKIT_CLASSES.resolve(entry.getName())).exists();
+        return !new File(ClassReaderArgumentProvider.CRAFT_BUKKIT_CLASSES.resolve(entry.getName())).exists();
     }
 
     private boolean filterPackageNames(String name) {
-        for (String packageName : excludedPackages) {
+        for (String packageName : this.excludedPackages) {
             if (name.startsWith(packageName)) {
                 return false;
             }
@@ -150,7 +150,7 @@ public class ClassReaderArgumentProvider implements ArgumentsProvider, Annotatio
     }
 
     private boolean filterClass(String name) {
-        for (Class<?> clazz : excludedClasses) {
+        for (Class<?> clazz : this.excludedClasses) {
             if (name.equals(clazz.getName().replace('.', '/') + ".class")) {
                 return false;
             }
@@ -161,13 +161,13 @@ public class ClassReaderArgumentProvider implements ArgumentsProvider, Annotatio
 
     private Stream<InputStream> readCraftBukkitAndOrMinecraftModifiedClasses(boolean craftBukkit, boolean minecraftModified) {
         try {
-            return Files.walk(Path.of(CRAFT_BUKKIT_CLASSES))
+            return Files.walk(Path.of(ClassReaderArgumentProvider.CRAFT_BUKKIT_CLASSES))
                     .map(Path::toFile)
                     .filter(File::isFile)
                     .filter(file -> file.getName().endsWith(".class"))
-                    .filter(file -> shouldInclude(removeHomeDirectory(file), craftBukkit, minecraftModified))
-                    .filter(file -> filterPackageNames(removeHomeDirectory(file)))
-                    .filter(file -> filterClass(removeHomeDirectory(file)))
+                    .filter(file -> this.shouldInclude(this.removeHomeDirectory(file), craftBukkit, minecraftModified))
+                    .filter(file -> this.filterPackageNames(this.removeHomeDirectory(file)))
+                    .filter(file -> this.filterClass(this.removeHomeDirectory(file)))
                     .map(file -> {
                         try {
                             return new FileInputStream(file);
@@ -181,7 +181,7 @@ public class ClassReaderArgumentProvider implements ArgumentsProvider, Annotatio
     }
 
     private String removeHomeDirectory(File file) {
-        return file.getAbsolutePath().substring(CRAFT_BUKKIT_CLASSES.getPath().length());
+        return file.getAbsolutePath().substring(ClassReaderArgumentProvider.CRAFT_BUKKIT_CLASSES.getPath().length());
     }
 
     private boolean shouldInclude(String name, boolean craftBukkit, boolean minecraftModified) {
diff --git a/paper-server/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java b/paper-server/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java
index 9ed690ad3e..bfec6280e8 100644
--- a/paper-server/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java
+++ b/paper-server/src/test/java/org/bukkit/support/provider/RegistriesArgumentProvider.java
@@ -5,20 +5,16 @@ import java.util.List;
 import java.util.stream.Stream;
 import net.minecraft.core.registries.Registries;
 import net.minecraft.resources.ResourceKey;
-import net.minecraft.sounds.SoundEffect;
-import net.minecraft.world.effect.MobEffectList;
-import net.minecraft.world.entity.ai.attributes.AttributeBase;
+import net.minecraft.sounds.SoundEvent;
+import net.minecraft.world.effect.MobEffect;
 import net.minecraft.world.entity.animal.CatVariant;
 import net.minecraft.world.entity.animal.FrogVariant;
 import net.minecraft.world.entity.animal.WolfVariant;
 import net.minecraft.world.entity.decoration.PaintingVariant;
 import net.minecraft.world.entity.npc.VillagerProfession;
 import net.minecraft.world.entity.npc.VillagerType;
-import net.minecraft.world.inventory.Containers;
 import net.minecraft.world.item.Instrument;
-import net.minecraft.world.level.biome.BiomeBase;
-import net.minecraft.world.level.block.entity.EnumBannerPatternType;
-import net.minecraft.world.level.material.FluidType;
+import net.minecraft.world.level.block.entity.BannerPattern;
 import net.minecraft.world.level.saveddata.maps.MapDecorationType;
 import org.bukkit.Art;
 import org.bukkit.Fluid;
@@ -79,15 +75,15 @@ public class RegistriesArgumentProvider implements ArgumentsProvider {
     static {
         // Order: Bukkit class, Minecraft Registry key, CraftBukkit class, Minecraft class
         register(Art.class, Registries.PAINTING_VARIANT, CraftArt.class, PaintingVariant.class);
-        register(Attribute.class, Registries.ATTRIBUTE, CraftAttribute.class, AttributeBase.class);
-        register(Biome.class, Registries.BIOME, CraftBiome.class, BiomeBase.class);
+        register(Attribute.class, Registries.ATTRIBUTE, CraftAttribute.class, net.minecraft.world.entity.ai.attributes.Attribute.class);
+        register(Biome.class, Registries.BIOME, CraftBiome.class, net.minecraft.world.level.biome.Biome.class);
         register(Enchantment.class, Registries.ENCHANTMENT, CraftEnchantment.class, net.minecraft.world.item.enchantment.Enchantment.class);
-        register(Fluid.class, Registries.FLUID, CraftFluid.class, FluidType.class);
+        register(Fluid.class, Registries.FLUID, CraftFluid.class, net.minecraft.world.level.material.Fluid.class);
         register(GameEvent.class, Registries.GAME_EVENT, CraftGameEvent.class, net.minecraft.world.level.gameevent.GameEvent.class);
         register(MusicInstrument.class, Registries.INSTRUMENT, CraftMusicInstrument.class, Instrument.class);
-        register(MenuType.class, Registries.MENU, CraftMenuType.class, Containers.class);
-        register(PotionEffectType.class, Registries.MOB_EFFECT, CraftPotionEffectType.class, MobEffectList.class);
-        register(Sound.class, Registries.SOUND_EVENT, CraftSound.class, SoundEffect.class);
+        register(MenuType.class, Registries.MENU, CraftMenuType.class, net.minecraft.world.inventory.MenuType.class);
+        register(PotionEffectType.class, Registries.MOB_EFFECT, CraftPotionEffectType.class, MobEffect.class);
+        register(Sound.class, Registries.SOUND_EVENT, CraftSound.class, SoundEvent.class);
         register(Structure.class, Registries.STRUCTURE, CraftStructure.class, net.minecraft.world.level.levelgen.structure.Structure.class);
         register(StructureType.class, Registries.STRUCTURE_TYPE, CraftStructureType.class, net.minecraft.world.level.levelgen.structure.StructureType.class);
         register(Villager.Type.class, Registries.VILLAGER_TYPE, CraftVillager.CraftType.class, VillagerType.class);
@@ -102,24 +98,24 @@ public class RegistriesArgumentProvider implements ArgumentsProvider {
         register(Frog.Variant.class, Registries.FROG_VARIANT, CraftFrog.CraftVariant.class, FrogVariant.class);
         register(Cat.Type.class, Registries.CAT_VARIANT, CraftCat.CraftType.class, CatVariant.class);
         register(MapCursor.Type.class, Registries.MAP_DECORATION_TYPE, CraftMapCursor.CraftType.class, MapDecorationType.class);
-        register(PatternType.class, Registries.BANNER_PATTERN, CraftPatternType.class, EnumBannerPatternType.class);
+        register(PatternType.class, Registries.BANNER_PATTERN, CraftPatternType.class, BannerPattern.class);
 
     }
 
     private static void register(Class bukkit, ResourceKey registry, Class craft, Class minecraft) {
-        register(bukkit, registry, craft, minecraft, false);
+        RegistriesArgumentProvider.register(bukkit, registry, craft, minecraft, false);
     }
 
     private static void register(Class bukkit, ResourceKey registry, Class craft, Class minecraft, boolean newClass) {
-        DATA.add(Arguments.of(bukkit, registry, craft, minecraft, newClass));
+        RegistriesArgumentProvider.DATA.add(Arguments.of(bukkit, registry, craft, minecraft, newClass));
     }
 
     @Override
     public Stream<? extends Arguments> provideArguments(ExtensionContext extensionContext) throws Exception {
-        return getData();
+        return RegistriesArgumentProvider.getData();
     }
 
     public static Stream<? extends Arguments> getData() {
-        return DATA.stream();
+        return RegistriesArgumentProvider.DATA.stream();
     }
 }
diff --git a/paper-server/src/test/java/org/bukkit/support/provider/RegistryArgumentProvider.java b/paper-server/src/test/java/org/bukkit/support/provider/RegistryArgumentProvider.java
index 537621806b..f2ceb5e675 100644
--- a/paper-server/src/test/java/org/bukkit/support/provider/RegistryArgumentProvider.java
+++ b/paper-server/src/test/java/org/bukkit/support/provider/RegistryArgumentProvider.java
@@ -17,12 +17,12 @@ public class RegistryArgumentProvider implements ArgumentsProvider, AnnotationCo
 
     @Override
     public void accept(RegistryTest registryTest) {
-        registryType = registryTest.value();
+        this.registryType = registryTest.value();
     }
 
     @Override
     public Stream<? extends Arguments> provideArguments(ExtensionContext extensionContext) throws Exception {
-        return getValues(registryType);
+        return RegistryArgumentProvider.getValues(this.registryType);
     }
 
     public static Stream<? extends Arguments> getValues(Class<? extends Keyed> registryType) {